Adds CompareCaseInsensitiveASCII and EqualsCaseInsensitiveASCII helper functions and removes base::strcasecmp and base::strncasecmp. This avoids the dangerous locale-sensitive behavior.
ClientIsAdvertisingSdchEncoding in sdch_browsertest had the condition inverted, but because it returned true any time the given line wasn't found, the test didn't notice.
cups_helper changed most significantly. I redid the loop to use StringPieces which saves a lot of copies. On line 82 cups_helper used to do a prefix match which I'm pretty sure it wanted a regular compare. I changed this.
render_text_harfbuzz set "<" operator was also doing a prefix comparison only, when it looks like it really just wanted to compare the strings.
file_path passed string pieces into strcasecmp which could then read off the end if they're not null terminated. This patch fixes the bug and calls the native strcasecmp which is probably the best we can do for Posix file names.
Removed additional version of the same function in net.
Adds a backwards-compat hack for crashpad which improperly uses base from a DEPS-ed in repo.
Review URL: https://codereview.chromium.org/1224553010
Cr-Commit-Position: refs/heads/master@{#338324}
On Android, it's possible that a WebContents is created and
cannot be loaded immediately, which occurs when Chrome needs
to start an Activity asynchronously. There's currently no
good way to know when the WebContents is in this state, though.
* Start storing whether the WebContents has needs to resume loading
in the WebContentsImpl, which can then be checked when the
WebContentsImpl may begin accepting requests from the renderer.
* Clean up Android code that heuristically tracks whether the
WebContents could be in this state.
* Existing Java and Chromium tests catch regressions.
BUG=508186
Review URL: https://codereview.chromium.org/1214723012
Cr-Commit-Position: refs/heads/master@{#338323}
https://codereview.chromium.org/1225083002 fixed the core issue but left an
incorrect DCHECK in the code. It is not the case that only a single
BrowserCdmManager per RPH ID may be alive at a time, only that a single one
corresponds to a given live process. (A reference-counted type can never be
assumed to have bounded lifetime for the same reason garbage-collected types
can never be assumed to have bounded lifetime.)
This fixes ChildProcessLauncherBrowserTest.ChildSpawnFail's flakiness on
cast_shell_linux when use_openssl is switched.
BUG=506188,462040
Review URL: https://codereview.chromium.org/1235653002
Cr-Commit-Position: refs/heads/master@{#338312}
The crash (crbug.com/508775) in ServiceWorkerHandler::UpdateHosts() seems to be caused by wrong state of render_frame_host_.
After ServiceWorkerHandler is created in the constructor of RenderFrameDevToolsAgentHost, ServiceWorkerHandler::SetRenderFrameHost() must be called before UpdateHosts() is called.
So render_frame_host_ must be set correctly before UpdateHosts() is called even if we are not initializing render_frame_host_ now.
So I think this change doesn't fix the crash.
But to make the code safe, we should initialize render_frame_host_ in the constructor.
BUG=508775
Review URL: https://codereview.chromium.org/1233633002
Cr-Commit-Position: refs/heads/master@{#338290}
This allows Cmd-A / "Select All" to be used on SSL interstitials on OSX.
BUG=507416
Review URL: https://codereview.chromium.org/1212373009
Cr-Commit-Position: refs/heads/master@{#338248}
Instead of explicitly passing |cgl_context|, get it from
GLContext::GetCurrent().
Review URL: https://codereview.chromium.org/1228253002
Cr-Commit-Position: refs/heads/master@{#338219}
This patch adds net log types for each ServiceWorkerURLRequestJob result type
(already used for UMA), and logs the result as a net event. This may help
debugging user issues when something goes wrong with Service Worker.
It also folds DESTROYED and KILLED UMAs into just KILLED,
as it turned out we got no DESTROYED UMAs.
BUG=499143
Review URL: https://codereview.chromium.org/1229733003
Cr-Commit-Position: refs/heads/master@{#338207}
Preparation for creating an alternative non-crazy linker based
chromium Linker:
- Convert Linker from pure static into a singleton class.
- Split into an abstract base class containing (expected) common code,
and (for now) a single concrete subclass that implements the current
crazy linker based loading of libchrome.so.
- Update client code to handle the singleton getInstance() requirement
and class name changes.
- Modernize logging.
Later changes will introduce a second concrete Linker subclass that is
free of crazy linker code, for Android platform system linkers that
handle packed relocations, load from apk, and shared relro natively.
BUG=385553
Review URL: https://codereview.chromium.org/1224963002
Cr-Commit-Position: refs/heads/master@{#338182}
ContentHandlerConnection will serve as the equivalent of SiteInstance in Chromium.
In the future, ContentHandlerConnection will represent an Application instance for a particular origin/site.
As the complexity of this object will grow soon, it makes sense to move it out as a first step.
ContentHandlerConnection now also uses the same lifetime management idiom used in ApplicationConnection and elsewhere to help guard against reentrant calls during destruction and double deletes. This also makes it easier to unit test this class in the future as more functionality is added.
BUG=496937
Review URL: https://codereview.chromium.org/1228743002
Cr-Commit-Position: refs/heads/master@{#338173}
Reason for revert:
Broke three video-related WebGL conformance tests on Nexus 5; see https://code.google.com/p/chromium/issues/detail?id=504773#c3 .
Original issue's description:
> Flush pending writes on Skia scratch textures used in Chromium
>
> Chromium uses textures allocated by Skia's internal resource manager for
> video rendering. In case the textures are recycled, they might have
> pending write operations on them. Most commonly they have a pending
> framebuffer discard that gets inserted when a texture is chosen for
> recycling. These pending operations need to be flushed before the texture
> is accessed outside of Skia. Otherwise it's possible that the pending
> operations get deferred until after Chromium uses the texture.
>
> In other words, we need to guarantee that the order of operations is:
>
> 1. Pending writes from Skia are flushed
> 2. Chromium writes to the texture without involving Skia
> 3. Chromium requests a readback of the texture using Skia
> 4. Skia reads back the texture
>
> instead of
>
> 1. Chromium writes to the texture without involving Skia
> 2. Chromium requests a readback of the texture using Skia
> 3. Pending writes from Skia are flushed
> 4. Skia reads back the texture
>
> BUG=504773, 499555
> TEST=WebGL conformance tests
>
> Committed: https://crrev.com/140faf7e1dbc0f41a57242b4d3114bad6b9552fd
> Cr-Commit-Position: refs/heads/master@{#338089}
TBR=dalecurtis@chromium.org,qinmin@chromium.org,bsalomon@google.com,xhwang@chromium.org,oetuaho@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=504773, 499555
Review URL: https://codereview.chromium.org/1226093008
Cr-Commit-Position: refs/heads/master@{#338165}
This change adds a new UMA entry for the final MidiManager
result code on browser shutdown.
To report the result correctly, I assigned new numbers for
the result code. As a side effect, this patch can fix an
existing problem that the result code for NOT_INITIALIZED
was not propagated to renderer side correctly.
BUG=465661
Review URL: https://codereview.chromium.org/1217853007
Cr-Commit-Position: refs/heads/master@{#338148}
Based on nick@chromium.org's CL: http://crrev.com/1214073015#ps1
Instead of having RenderProcessHostImpl hosts BrowserCdmManager, add
BrowserCdmManagerProcessWatcher, a RenderProcessHostObserver, to keep a
reference to BrowserCdmManager, and manage the entries in
g_browser_cdm_manager_map.
BUG=506188
TEST=Test reenabled.
Review URL: https://codereview.chromium.org/1225083002
Cr-Commit-Position: refs/heads/master@{#338146}
There's no reason to gate RenderWidget frame unregistration
on the kSitePerProcess flag; it should be gated using the
same policy as the creation of the RenderWidget.
Moving the RenderWidget cleanup out of the is_subframe
block also paves the way for when the main frame also has a
RenderWidget.
BUG=419087
R=creis@chromium.org
Review URL: https://codereview.chromium.org/1229083002 .
Cr-Commit-Position: refs/heads/master@{#338145}
It is possible that, when closing a tab on Mac, the RWHVMac that
is being closed will have requested that the ui::Compositor draw, and
that draw will have not happened yet. The draw will happen after
the RWHVMac and its renderer have been destroyed which is wasteful
in that the draw is unwanted and buggy in that the resources needed
by the draw are destroyed.
To avoid this, ensure that the cc::Surface does not draw if the output
surface is suspended.
BUG=508287
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1227233002
Cr-Commit-Position: refs/heads/master@{#338131}
Reason for revert:
Causing official continuous builds to fail with the following:
../../media/cast/sender/h264_vt_encoder_unittest.cc:308:22: error: no matching constructor for initialization of 'media::VideoDecoderConfig'
VideoDecoderConfig config(kCodecH264, H264PROFILE_MAIN, frame_->format(),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../media/base/video_decoder_config.h:78:3: note: candidate constructor not viable: requires 10 arguments, but 9 were provided
VideoDecoderConfig(VideoCodec codec,
^
../../media/base/video_decoder_config.h:70:20: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 9 were provided
class MEDIA_EXPORT VideoDecoderConfig {
^
../../media/base/video_decoder_config.h:74:3: note: candidate constructor not viable: requires 0 arguments, but 9 were provided
VideoDecoderConfig();
^
1 error generated.
Original issue's description:
> Change the video color space default.
>
> Previously video without color space metadata was assumed to be in
> Rec601. Now the default depends on the kind of playback. Normal src=
> defaults to Rec601 for SD sized video (<720 pixels high), and Rec709 for
> HD. MSE will always default to Rec709. Using a size based heuristic
> doesn't make sense for MSE where it is common for the resolution to
> change mid playback.
>
> This CL doesn't change the meaning of COLOR_SPACE_UNSPECIFIED. Instead,
> it adds a color space field to VideoDecoderConfig, and updates the video
> decoders to use this as the default if they don't find a more
> authoritative value in the bitstream.
>
> This also fixes a (year old!) bug causing the blackwhite
> tests to always succeed, renames the rec709 blackwhite test
> file to match the name in blackwhite.html, and re-encodes it
> to contain the color space metadata (previously it had none).
>
> BUG=333619
>
> Committed: https://crrev.com/4dc6c2ad0e595a5e0b543e8e1b8961ee0d742a32
> Cr-Commit-Position: refs/heads/master@{#338110}
TBR=dalecurtis@chromium.org,bbudge@chromium.org,codebythepound@gmail.com,gunsch@chromium.org,lcwu@chromium.org,watk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=333619
Review URL: https://codereview.chromium.org/1228843003
Cr-Commit-Position: refs/heads/master@{#338124}
Touch-related constants in Android's ViewConfiguration are exposed in
device pixels. However, all native code that uses these values need
DIPs. Rather than relying on the caller to do the scaling, which may be
incorrect for external displays with different densities, expose the
constants as DIPs directly.
Longer term, we should instead use a context-specific lookup for
ViewConfiguration values.
BUG=310763
Review URL: https://codereview.chromium.org/1216933013
Cr-Commit-Position: refs/heads/master@{#338114}
Switched to using ScopedBstr and removed memory leaks with BSTRs.
Switched to using SUCCESS macro instead of comparing to S_OK because there are methods which might return other success codes such as S_FALSE, the results of which we would want to capture in tests.
Switched to using "auto" in some instances.
Renamed some variables to more descriptive or more concise names.
R=dmazzoni@chromium.org,aboxhall@chromium.org
Review URL: https://codereview.chromium.org/1228793003
Cr-Commit-Position: refs/heads/master@{#338112}
Previously video without color space metadata was assumed to be in
Rec601. Now the default depends on the kind of playback. Normal src=
defaults to Rec601 for SD sized video (<720 pixels high), and Rec709 for
HD. MSE will always default to Rec709. Using a size based heuristic
doesn't make sense for MSE where it is common for the resolution to
change mid playback.
This CL doesn't change the meaning of COLOR_SPACE_UNSPECIFIED. Instead,
it adds a color space field to VideoDecoderConfig, and updates the video
decoders to use this as the default if they don't find a more
authoritative value in the bitstream.
This also fixes a (year old!) bug causing the blackwhite
tests to always succeed, renames the rec709 blackwhite test
file to match the name in blackwhite.html, and re-encodes it
to contain the color space metadata (previously it had none).
BUG=333619
Review URL: https://codereview.chromium.org/1221903003
Cr-Commit-Position: refs/heads/master@{#338110}
- VideoFrameWrapper points to the underlying media::VideoFrame via native_handle()
- WebRtcVideoCapturerAdapter uses VideoFrameWrapper to pass Native Texture backed VideoFrame
- RTCVideoEncoder accesses the media::VideoFrame via native_handle() and passes
BUG=440843,503835
Review URL: https://codereview.chromium.org/1212133002
Cr-Commit-Position: refs/heads/master@{#338092}
Chromium uses textures allocated by Skia's internal resource manager for
video rendering. In case the textures are recycled, they might have
pending write operations on them. Most commonly they have a pending
framebuffer discard that gets inserted when a texture is chosen for
recycling. These pending operations need to be flushed before the texture
is accessed outside of Skia. Otherwise it's possible that the pending
operations get deferred until after Chromium uses the texture.
In other words, we need to guarantee that the order of operations is:
1. Pending writes from Skia are flushed
2. Chromium writes to the texture without involving Skia
3. Chromium requests a readback of the texture using Skia
4. Skia reads back the texture
instead of
1. Chromium writes to the texture without involving Skia
2. Chromium requests a readback of the texture using Skia
3. Pending writes from Skia are flushed
4. Skia reads back the texture
BUG=504773, 499555
TEST=WebGL conformance tests
Review URL: https://codereview.chromium.org/1225583003
Cr-Commit-Position: refs/heads/master@{#338089}
Update the app window custom bindings to use render frame logic
instead of render view logic. This involves changes to the custom
bindings themselves, as well as app window creation logic. And, for fun,
a few small cleanups while I was in the area.
BUG=455776
TBR=dbeam@chromium.org (webui)
Review URL: https://codereview.chromium.org/1211003006
Cr-Commit-Position: refs/heads/master@{#338076}
Reason for revert:
See crbug.com/508509.
We need to fix this case before relanding.
Original issue's description:
> Cleanup viewport scrolling for future scroll customization work.
>
> Viewport scrolling previously returned a struct of information about
> what scrolled. This complicated scroll customization. This patch makes
> |Viewport::ScrollBy| return a single |Vector2dF|, as well as performing
> some other cleanup that will simplify scroll customization.
>
> BUG=505851
> TEST=LayerTreeHostImplTest, WebContentsViewAuraTest.VerticalOverscroll
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/3e773d7aeba1eb0077a7907d0f5ff2e72e1c6753
> Cr-Commit-Position: refs/heads/master@{#337694}
TBR=vollick@chromium.org,enne@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=505851
Review URL: https://codereview.chromium.org/1227823005
Cr-Commit-Position: refs/heads/master@{#338071}
Async revalidation requests are low priority, but they must be started
eventually even if the tab is closed.
Add unit tests to ensure that ResourceScheduler starts all requests
eventually, even if the client is deleted.
Also, modify ResourceScheduler to start any pending requests when the
client is deleted. This satisfies the requirement in the simplest way.
BUG=501805
TEST=content_unittests
Review URL: https://codereview.chromium.org/1192673002
Cr-Commit-Position: refs/heads/master@{#338058}
To support manual reset event in blink, implement new blink API
to create WebWaitableEvent with two new arguments.
BUG=507224
Review URL: https://codereview.chromium.org/1225243002
Cr-Commit-Position: refs/heads/master@{#338045}
Background:
When exiting video fullscreen, UI thread sends two
IPC-messages the player's (renderer) thread.
1. MediaPlayerMsg_DidExitFullscreen is sent to tell
player to EstablishSurfaceTexturePeer() for inline
video. needs_establish_peer_ gets true.
2. SynchronousCompositorFactoryImpl posts a
callback to player's ResetStreamTextureProxy().
In *almost* all cases (1) happens before (2).
Problem:
When (2) happens before (1), (2) does not create a
new proxy because needs_establish_peer_ has not yet
been set. (1)'s EstablishSurfaceTexturePeer() fails
because there is no proxy.
Solution:
Let (1) do TryCreateStreamTextureProxyIfNeeded()
before EstablishSurfaceTexturePeer().
BUG=504800
TEST=See bug
Review URL: https://codereview.chromium.org/1212823003
Cr-Commit-Position: refs/heads/master@{#338027}
This CL allows a new RenderView to set its main frame's opener to any
frame, rather than a top-level frame. I.e., it is now possible to use
window.opener to refer to a cross-process subframe.
Summary of changes:
* The ViewMsg_New IPC now passes the opener's frame ID rather than
view ID. RenderView::Initialize resolves this into the opener's
WebFrame.
* The flow of opener routing IDs from RFHM::InitRenderView to
RenderViewHostImpl::CreateRenderView (which sends the IPC) is moved
from view to frame IDs.
* The passing of opener routing IDs from CreateOpenerProxies, etc.,
into RFHM::InitRenderView is removed. Instead, InitRenderView now
looks up the proper opener frame routing ID itself. This is because
(1) the previous flow would complicate implementing opener updates,
which would allow subframes to have openers and FrameTrees to have
more than one opener to traverse, and (2) previous plumbing missed
some cases (e.g., creating swapped-out RVs via
CreateRenderFrameProxy or CreateProxiesForSiteInstance), and fixing
this would add more complexity.
* There are paths where the opener chain is intentionally suppressed
from a new RenderView, for example for <webview>: see
WCI::CreateSwappedOutRenderView and EnsureOpenerProxiesExist. This
is now supported via an explicit flag which is passed into
InitRenderView rather than passing around MSG_ROUTING_NONE for the
opener's routing ID.
BUG=225940, 304341
Review URL: https://codereview.chromium.org/1202593002
Cr-Commit-Position: refs/heads/master@{#337995}
cpu governor: performance
jpeg clock: 200 MHz
software decode: latency 10.42ms, cpu 18.85%
hardware decode: latency 5.67ms, cpu 13.98%
hardware decode with output memcpy: latency 12.57ms, cpu 20.62%
We are fixing driver to support IOMMU to avoid memcpy overhead.
BUG=426383
TEST=run unittest on peach_pi, apprtc website over night.
Review URL: https://codereview.chromium.org/1125263005
Cr-Commit-Position: refs/heads/master@{#337990}
BUG=479935
TEST=Manually tested by connecting PlatformVerification service from
MojoCdmService.
Review URL: https://codereview.chromium.org/1209283003
Cr-Commit-Position: refs/heads/master@{#337953}
Two tests were flaking on Chrome OS builds.
Re-enabling to confirm that fixes to Screen Orientation API also fixed these tests.
TEST=ScreenOrientationBrowserTest.ScreenOrientationChange,
ScreenOrientationBrowserTest.WindowOrientationChange
BUG=468259
Review URL: https://codereview.chromium.org/1225093002
Cr-Commit-Position: refs/heads/master@{#337950}
This dates to https://chromiumcodereview.appspot.com/11411013 which was added
to resolve the ClearKey CDM. ClearKey uses routines from //crypto which may use
NSS. But it doesn't need NSS in the chimera build, so we should limit this to
!USE_OPENSSL builds.
(The tests in question have also since moved to browser_tests and out of
//content.)
BUG=506323
Review URL: https://codereview.chromium.org/1222103005
Cr-Commit-Position: refs/heads/master@{#337935}
For now, in the document mode switching tabs always releases all the
moderate bindings because the app goes into the background when launching
the Recents to select a tab.
To relieve this problem, this CL delays cleanup of moderate bindings by 10s.
BUG=485867
Review URL: https://codereview.chromium.org/1214193006
Cr-Commit-Position: refs/heads/master@{#337928}
Changes use of URLRequest::request_time() to URLRequest::creation_time(),
which is much closer to the information actually desired (how long the
consumer of the request waited for an error).
BUG=487663
R=mmenke@chromium.org
Review URL: https://codereview.chromium.org/1211023003
Cr-Commit-Position: refs/heads/master@{#337899}