Comments

Move back pointer event maps to WTF
In an earlier change we changed all WTF maps
to std maps to account for all the values in
the key range (i.e. PointerId). But the solution
of using WTF with a bigger type as key (in this
case int64_t) is better than using std map.
Bug: 921325
Change-Id: Ice58c0fb55ab12138467de9f18fadc33b0815215
Reviewed-on: https://chromium-review.googlesource.com/c/1477755
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633767}

Comments

Propagate the frame visibility change into web contents.
In change d6703f917ddafe9c18b7b71b011bb4c23144e17e the entire visibility
state is provided, however it would cause hidden->hidden transitions.
To correct this we really should just replicate the state into
web_contents entirely because it has the same states.
BUG=932059
Change-Id: I67895d97e7da5ea5903fe7e9bd7d03fc38a03113
Reviewed-on: https://chromium-review.googlesource.com/c/1478935
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633766}

Comments

Use base::BindOnce for PostTask callbacks.
TaskRunner::PostTask() takes a OnceCallback. Replace usage of
base::Bind(), which produces a RepeatingCallback, with base::BindOnce()
when the callback is created as a temporary inside of PostTask(). The
following regex was used to find instances that could be replaced:
(Post(?:Delayed)?Task)\((?:\n\s*)?FROM_HERE,(?:\n)?\s*base::Bind\(
Also replace any usage of base::Passed(&var) with std::move(var) for
variables passed to base::BindOnce(). base::Passed() isn't needed for
move-only types with OnceCallbacks.
This CL was uploaded by git cl split.
R=rockot@google.com
Bug: 714018
Change-Id: I6d57907a3aa4886b00851416b9ea002a39c9c5f9
Reviewed-on: https://chromium-review.googlesource.com/c/1475639
Auto-Submit: kylechar <kylechar@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#633762}

Comments

Move MediaStream renderer interfaces to Blink
This CL moves MediaStreamAudioRenderer, MediaStreamVideoRenderer
and MediaStreamRendererFactory from content/public/renderer
to blink/public/platform/modules/mediastream
All three interfaces get a Web prefix since they are intended to
remain in public/platform, as they come form content/public/renderer.
This is a straightforward move and rename and all changes outside
third_party/blink are mechanical (#include, namespace and type name
updates).
Bug: 921006
Change-Id: I1568e58ccaf8d4581ce8bc4ebdae199c3e67366d
TBR: haraken@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1450128
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633759}

Comments

Synthetic input waits on compositor display
This CL makes synthetic input - the kind used in web tests and
telemetry (e.g. gpuBenchmarking.scrollBy) - wait until a CompositorFrame
has been submitted by the renderer and displayed by the display
compositor before resolving the completion callback. This means client
code that wants to wait until any observable side-effects of this input
is visible to further input need only wait on the gesture's completion
callback.
To give a motivating example: suppose we wish to write a test that
scrolls an out-of-process iframe into view and clicks on a button in the
frame. The code might look something like this:
gpuBenchmarking.smoothScroll(1000, () => {
gpuBenchmarking.tap(0, 0);
});
This code contains a race today. The callback for smoothScroll is
invoked as soon as the ScrollEnd is received in the renderer. However,
until a new compositor frame is submitted from the renderer, the tap
may occur against stale hit testing geometry. This is a major source of
flakiness in our tests.
This CL fixes the problem by forcing the renderer to perform a full
redraw at the end of each gesture. The redraw produces a compositor
frame and we invoke the callback once the compositor frame is displayed.
We do this by reusing the RequestPresentation mechanism in RenderWidget.
RequestPresentation required two modifications to work in web tests
which use a single thread proxy with no scheduler:
- LayerTreeHost::Composite needs to check the forced redraw flag to
determine whether we need to raster, otherwise it won't produce a
frame
- RequestPresentation must request a main frame since there's no
scheduler to perform the commit, which is what SetNeedsForcedRedraw
requests.
The timing change exposed an issue in the
overlay-play-button-tap-to-hide.html test so this CL also cleans that
test up to listen to the animation changes in media controls properly.
Finally, it's possible we may get input in a RenderWidget that's not
currently displayed. e.g. A click event sent via ChromeDriver causes a
TouchStart followed by a TouchEnd. The TouchStart causes a window.open
which opens and focuses a new tab. The TouchEnd then happens on the
background tab. In this case, we should resolve the callback rather than
waiting on a CompositorFrame that'll never come. See ChromeDriver test
testNetworkConnectionTypeIsAppliedToAllTabs for an example of this.
Bug: 902446
Change-Id: Ib2dddee08400dfa1137c674c47c0d7106961162f
Reviewed-on: https://chromium-review.googlesource.com/c/1390329
Reviewed-by: Saman Sami <samans@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633753}

Comments

[Autofill Assistant] Wait for the document to become interactive before issuing click
The target element may be there but may not be interactive.
Bug: 806868
Change-Id: Ia89f7e52421cf61ffa87271565b6a5ed75603d42
Reviewed-on: https://chromium-review.googlesource.com/c/1476544
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Reviewed-by: Stephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633751}

Comments

Updating the timeout for SecurityKeyIpcServerTest
The SecurityKeyResponseTimeout test is flaky on MacOS
as the timeout observed can vary by a couple hundred
milliseconds which makes the test flaky. The original
timeout was just a 'sensible' value so we can increase
that value so the test is more consistent.
BUG=933522
Change-Id: I9ca78270c7446760022e97a4b477b6bc7074dcee
Reviewed-on: https://chromium-review.googlesource.com/c/1478253
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Auto-Submit: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633749}

Comments

Suppress animation from some UI components.
When gfx::Animation::ShouldRenderRichAnimation() returns false,
we shouldn't do heavy animation. In favor of this, disable
the following animations:
* find bar
* info bar
* download shelf
* bookmarks bar
While doing this, fix a bug in gfx::SlideAnimtion::Hide().
As the previous comment mentioned, we should pass 1.0
to AnimateToState() in order to skip to the end of animation.
The parameter represents the progress of each animation, not
the value.
Bug: 8944
Change-Id: Ifc7d3ea8a5379d41f37cafa5a3094a0fe4555dd4
Reviewed-on: https://chromium-review.googlesource.com/c/1457697
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Sang Woo Ko <sangwoo108@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633747}

Comments

Relocate Omnibox Answers to separate namespace
This change separates AnswerSuggestionView from SuggestionView.
Because the current functionality still depends on SuggestionView to
present answers, the new mechanism still supports a little bit of both.
Decision which should be used depends on the state of the omnibox new
answer layout flag.
Bug: 920396
Change-Id: I84864ecbb52e025c1cb58f6c8f1bca2a85c4a3ee
Reviewed-on: https://chromium-review.googlesource.com/c/1471461
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Commit-Queue: Ender <ender@google.com>
Cr-Commit-Position: refs/heads/master@{#633740}

Comments

Reland: Ensure page visibility is consistent after load
Broken case is WebContents::WasHidden is called before the first load
then page visibility remains visible because nothing handles
PageMsg_WasHidden, and nothing rechecks the state after first load.
Note RenderView is invisible due to
EnsureRenderFrameHostVisibilityConsistent.
A related bug is that in this case RenderView is created to be visible
and then marked visible after. Turns out fixing this will also
correctly set page visibility, so this CL fixes this bug instead.
Previously reverted due to test flake due to test environment changing
visibility of WebContents under test. New version uses a WebContents
that's detached from the window, so should not be subject to such
external signals.
Bug: 929860
Change-Id: Id163bc57c79dbaf628eac50014d571aa76ad4ef6
Reviewed-on: https://chromium-review.googlesource.com/c/1476812
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633739}

Comments

Sec-CH-UA: Send only the major version by default.
Rather than sending a `Sec-CH-UA` header containing the full version
number by default (e.g. "Chromium 99.0.1232.12"), send only the major
version (e.g. "Chromium 99").
This does not effect the value of `UserAgent.version` obtained from
`navigator.getUserAgent()`, but only the HTTP request header.
Bug: 928669
Change-Id: I074e244a3918b0bdab4453c2f56dc737c506f732
Reviewed-on: https://chromium-review.googlesource.com/c/1475438
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633726}

Comments

Toggle the Contained Shell pref from chrome://settings.
This change adds a button that toggles the Contained Shell pref and
signs out the current user. Since this is a rough transition, we are
also adding a dialog that warns users that we need to sign them out.
Bug: 922687
Change-Id: I88f161ee7bfd2e1f26c00840c6ac66c65d8eed64
Reviewed-on: https://chromium-review.googlesource.com/c/1471110
Commit-Queue: Lucas Tenório <ltenorio@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633722}

Comments

ozone/wayland: xkbcommon: Fix layout switching
Wayland compositors let clients know about keyboard
layout index currently set using the "group" parameter
in wl_keyboard::modifiers event[1]. Currently it is used
to update the libxkbcommon modifiers mask and generate
the corresponding event flags value, but is not used later
on when translating keysyms into UTF characters (when
xkb_state_update_modifiers function is used again). That
makes the keys to be converted using incorrect layout.
To fix it, this CL does the following:
1. Rename GetModifierFlags -> UpdateModifiers; modifying it
to be non-const and then be able to cache 'group' value
(coming from wl_keyboard::modifiers event) into the new
layout_index_ class variable;
2. In XkbLookup method, pass in the previously cached
layout_index_ when calling xkb_state_update_modifiers
function, making the characters to be correctly
converted when xkb_state_key_get_utf32 is called.
[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_keyboard
Bug: 921947
Change-Id: I5758da5b771bd46c6a43250439b63b0911f51fbb
Reviewed-on: https://chromium-review.googlesource.com/c/1474041
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Kevin Schoedel <kpschoedel@chromium.org>
Commit-Queue: Nick Diego Yamane <nickdiego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#633718}

Comments

[base] Move TaskAnnotator to base/task.
Move TaskAnnotator out of base::debug namespace (as is also runs tasks,
which can be useful not only for debug but also in some other cases).
Move it to base/task/common to other task posting and running
infrastructure.
R=gab@chromium.org
TBR=gab@chromium.org
Change-Id: Ia464c7476f9d8342f417f364fb2a66a87899b02b
Reviewed-on: https://chromium-review.googlesource.com/c/1477894
Commit-Queue: Alexander Timin <altimin@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633717}

Comments

Use base::BindOnce for PostTask callbacks.
TaskRunner::PostTask() takes a OnceCallback. Replace usage of
base::Bind(), which produces a RepeatingCallback, with base::BindOnce()
when the callback is created as a temporary inside of PostTask(). The
following regex was used to find instances that could be replaced:
(Post(?:Delayed)?Task)\((?:\n\s*)?FROM_HERE,(?:\n)?\s*base::Bind\(
Also replace any usage of base::Passed(&var) with std::move(var) for
variables passed to base::BindOnce(). base::Passed() isn't needed for
move-only types with OnceCallbacks.
This CL was uploaded by git cl split.
R=rohitrao@chromium.org
Bug: 714018
Change-Id: If0230073d1b8e9f1f54985af1214ec8d005be52e
Reviewed-on: https://chromium-review.googlesource.com/c/1475648
Auto-Submit: kylechar <kylechar@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633706}