Prefer using value-based instead of unique_ptr-based APIs where it is
not too intrusive. Use the new representation to more efficiently
translate list and dictionary values (per the documented
recommendations). Replace CreateWithCopiedBuffer with construction from
a span.
base::PickleIterator was augmented with a span-of-bytes ReadData API, to
make this a little cleaner, since this is now preferred over a pair of a
const char* and length.
Bug: 646113
Change-Id: I6361bfffe65e2d84aa8d50390648bb7ac194f205
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241936
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777516}
If a session ID is not in the map, we propagate the null value to the
caller, which already handles null WebContents.
Bug: b/158602213
Test: cast_shell_junit_tests
Change-Id: Ib8d4d6fcaea7cf7a3df833199a379afe342b3aee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238516
Reviewed-by: Simeon Anfinrud <sanfin@chromium.org>
Commit-Queue: Thoren Paulson <thoren@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777515}
This debugging switch adds special padding to every localized string,
to make debugging localization layout and clipping issues easier.
Some localized strings shouldn't be mangled though because they aren't
actually prose strings but rather other localized data. This CL has
the mangling logic not mangle URLs.
Bug: 1093821
Change-Id: I50abab16467e7f92098fc766dfbd276bf9519cee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241500
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777514}
Dark mode image classifier needs PaintImage than Image for classifying
image content. Removing blink::Image for this helps make dark mode
module independent of blink code.
Bug: 1091095
Change-Id: I3e19fbebc2e73bb707f134dbde15ee0d15784f93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2182098
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Prashant Nevase <prashant.n@samsung.com>
Cr-Commit-Position: refs/heads/master@{#777512}
Add a generic "stable ID" to WebLocalFrame. The embedder can set this
when creating an isolated world with WebIsolatedWorldInfo and retrieve
it with an accessor on WebLocalFrame. Extensions set this to host_id.
Also exposes the human readable name which already exists in
WebLocalFrame through an accessor.
V8PerFrameMemoryDecorator will retrieve the stable ID and human readable
name to annotate the memory usage of non-main isolated worlds.
R=siggi,jochen
Bug: 1080672
Change-Id: I01bdc6a2d6fd404053a0990cad9e9855189e9584
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231668
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Auto-Submit: Joe Mason <joenotcharles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777509}
Switches Pixel_DirectComposition_Nonroot off the permissive Sobel
algorithm and onto exact matching. The test is stable enough (only 3
produced images across all configurations) that inexact matching should
not be necessary.
TBR=kbr@chromium.org
Bug: 1078914
Change-Id: I99d93ed361c673ea3a10d582aab51221c5e98aa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240897
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777505}
This CL uses the va/va_str.h functions vaProfileStr() and
vaEntrypointStr() for better stringifications of test messages
and logs. No new functionality intended, just touching logs.
Bug: b:158713599
Change-Id: I1094b40adf3ed887b078fe936aebf56b04466b4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241503
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777500}
The following change was made to keep from clipping off the "deep
scanned, safe" status label on download items:
358ef51f54
However, this change allowed the download item's preferred size to
expand in a number of cases where the status label became even
momentarily larger than the default size, resulting in the boundaries of
download items shifting during download on some platforms and for some
files (see associated bug).
This CL restricts the change in the preferred size of the download item
to only happen specifically in the "deep scanned, safe" state,
preventing visual jitter during download.
In the future, it would be good to rewrite the layout code for download
items entirely to use a modern declarative layout, which would allow us
to reason about these kinds of issues and make needed visual changes
much more efficiently.
Bug: 1093343
Change-Id: Ie2492c0fc15209b51db6bf6c3624501e2be388c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240591
Commit-Queue: Dana Fried <dfried@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777499}
As a temporary fix for android webview regression b/157318961 this cl
rolls back the protobuf lite runtime to 3.0.1 using the codegen plugin.
Binary-Size: This is temporary and there is not really much we could do.
Bug: 1093059, b/157318961
Change-Id: I2bbaf6d3b434221b667901423c4616e26a7550c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238872
Reviewed-by: Dan H <harringtond@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777495}
This CL removes a few of the media .typemap files, moving them into the
BUILD.gn file. This will help with consistency for the upcoming
VideoFrameMetadata changes.
Bug: 1059389
Change-Id: Ib4461498282add853d1b957cb41a12ec46f43433
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2239903
Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Emily Stark <estark@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777494}
Per Java style guide https://google.github.io/styleguide/javaguide.html#s5.3-camel-case,
Javascript is better to be JavaScript.
We will need to do a 3-way patching for the AndroidX boundary interface,
so adding the addDocumentStartJavaScript() first in this CL, we need to
remove the original addDocumentStartJavascript() after aosp/1329732
landed.
We also upgrade the feature version to avoiding old AndroidX calling
newer WebView or vice versa.
Bug: 918065
Test: Covered by existing tests
Change-Id: I1f5eee713d521ac5f480eee670f5f5be674de553
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240283
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777493}
This looked working in native UI as textfield treat them as
"select next/previous word".( See the bug for more details)
Map directly to "select-to-home/end" shortcuts instead.
This also fixes key report issue, where the strict mode rejected
the repeated key.
Bug: 1093430
Change-Id: I50a9113f3e97f3bc68ac5737a7fa6fa168511eca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238782
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777490}
Strips the revision that's at the end of some ANGLE driver versions, as
it changes frequently and can mess with inexact matching since each
revision is treated as a separate trace in Gold.
Also reports the driver vendor in the data uploaded to Gold.
Bug: 1078914
Change-Id: I745993d8e7318c991cac2625718d5fd24b277a79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241996
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777489}
Adds support for generating JS protos so that
the Kaleidoscope UI can deserialize the protos
from the Google API.
The generated code needs the protobuf JS library
which depends on parts of the closure library so
we add that to third_party.
BUG=1087037
Change-Id: Iee388e02f0ffcc0d1108a7f816da9f88c01fa58b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218554
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Becca Hughes <beccahughes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777486}
gfx::CreateSkBitmapFromJavaBitmap only support ARGB_8888 and ALPHA_8,
So covert all the formats other than this two, then send to native.
Bug: 1086990
Change-Id: I140d778725c8faf747d078a5f1dd82bd19b14164
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240588
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Gang Wu <gangwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777480}
This is a reland of 0063a381fa
The issue with original change is fix and run_perf_tests() method is
simplified as the rerun argument is not needed as much.
Original change's description:
> Reporting the results only for initial run
>
> For reducing the time of representative perf test, we only rerun the failed stories
> and update the results of the initial run based on the reruns. If the
> failed stories pass in rerun, the output will be updated to report all
> tests as passing.
>
> The current bug in these tests is that it would report values before
> considering the rerun results. So even if the failed tests pass after
> rerun, the output is still reporting the failures. This would cause the
> return_code to be set as 1 (Failed/Interrupted) while the tests has
> already passed via rerun.
>
> Bug: chromium:1091743
> Change-Id: I9eef7250bc2dad649fef49cf9a5ccd8195190f80
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2232603
> Reviewed-by: John Chen <johnchen@chromium.org>
> Commit-Queue: Behdad Bakhshinategh <behdadb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#775682}
Bug: chromium:1091743
Change-Id: Iceeeff232f4740d25dcc2799f6e329399e0101ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2239534
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Auto-Submit: Behdad Bakhshinategh <behdadb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777476}
Adds support to submit a query by pressing <ENTER> or <SPACE>.
We accomplish this by installing a voice search overlay wide keydown
listener to process this keyboard shortcut. Unfortunately, the same
keyboard shortcut also triggers the close button, which was the first
element focused upon opening the overlay before this CL. To submit a
query instead of closing the dialog by default, this CL adds a hidden
focusable div that captures the focus upon opening the dialog. This CL
also turns the close button into a cr-icon-button, which makes the UI
more consistent and makes the button swallow keydown events (that way we
don't both submit a query and close the overlay with <Enter> and
<SPACE>).
+ Add <SPACE> keyboard shortcut to trigger links.
+ Fix bug where any keyboard shortcut other than <CTRL> + <SHIFT> +
<.> closes the voice search overlay.
Fixed: 1088482
Change-Id: I0c7c40d88503a3ae0d7343a077f8b086968e470b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238781
Reviewed-by: Esmael Elmoslimany <aee@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777474}
Add media::cast::FrameId, which handles the following messages:
CastMsg_RtcpCastMessage, CastMsg_RawEvents, CastHostMsg_InsertFrame,
CastHostMsg_CancelSendingFrames, CastHostMsg_ResendFrameForKickstart,
CastHostMsg_AddCastFeedback.
Add media::OverlayInfo, which handles the following message:
AcceleratedVideoDecoderMsg_SetOverlayInfo.
Add media::VideoPixelFormat, which handles the following message:
AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers.
Add blink::WebDeviceEmulationParams::ScreenPosition, which handles the
following message:
WidgetMsg_EnableDeviceEmulation.
Add util::StrongAlias<extensions::ActivationSequenceTag, int>, which
handles the following messages:
ExtensionHostMsg_DidStartServiceWorkerContext,
ExtensionHostMsg_DidStopServiceWorkerContext.
Add base::UnsafeSharedMemoryRegion, which handles the following message:
GpuCommandBufferMsg_RegisterTransferBuffer.
Change-Id: I2a36ab93185effc7090f53705d261e86a7090b30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2237990
Commit-Queue: Martin Barbella <mbarbella@chromium.org>
Reviewed-by: Martin Barbella <mbarbella@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777468}
Previously, we had a regression where changes to the state of an
animation were not always picked up by the compositor. Some WPT
tests were written to verify that the compositor picks up the changes;
however, these tests are prone to flaking due to the need to take a
screenshot while the animation is running to verify the behavior. This
patch does not address the flakiness of the ref tests, but ensures
proper unit test coverage in the event that the ref tests get disabled.
Followup patches will address flakiness in the WPT tests.
Bug: 1093812
Change-Id: Iab5c6853e86f0b86cf554b803bbb6c3ab47725c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2232800
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777467}