If the override height is indefinite, this function should return true.
This fixes the case of max-height: xx% on a replaced item in a flexbox,
which otherwise would get resolved to 0 because resolving the percentage
for replaced items would convert negative numbers to 0.
Fixed: 1048051
Change-Id: I192e65b37a3670226fa764662448bdb4216c9fe1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100771
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750285}
Upstream PR:
Introduce a crdtp/dispatch.{h,cc} library.
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1974680
New Rev: 8c2064ea99cffdb5647760ad3953c43e612e07fc
Notable downstream changes:
- ChromeDevToolsManagerDelegate::HandleCommand no longer carries
a method. Reason being, the shallow parser (crdtp::Dispatchable)
should be efficient enough to parse an incoming message a couple
of times, e.g. once for the content layer and once for the
embedder, and if we felt differently then we'd quite possibly
want to carry more than just the method - e.g., we'd want to also
pass the params. Anyway, for now simplifying this interface.
- crdtp::FrontendChannel::FallThrough; here, it's advantagueous
to keep the method around, but now it's a crdtp::span. This is
much better than const std::string& because the generated code
knows exactly which method is going to fall through and we
can pass a C++ string literal via this span.
- The crdtp/dispatch library presents a somewhat different surface
between the UberDispatcher and the session implementations.
The session implementations are responsible for creating a
crdtp::Dispatchable instance (the shallow parser) which
it then hands to the dispatcher for dispatching. Rather than
querying for whether it can dispatch and then doing it,
the result of the Dispatch indicates whether a method was
found and can be executed. There's no more need to instantiate
protocol::Value in a devtools session class.
- Since the dispatch library uses crdtp::span to represent
method names, we no longer need to reference platform specific
routines for finding strings and making substrings. As a result,
v8_inspector_string.h is losing a few more methods
(and same for base_string_adapter_h.template).
- crdtp::DispatchResponse (also known as protocol::Response) has
some renames for consistency (
Response::Error -> Response::SeverError,
Response::OK -> Response::Success). Touches all domain handlers
but is mechanical.
- All protocol error messages, such as the parameters passed
to DispatchResponse::ServerError are required to be UTF8 strings,
even for Blink, so when code generates them as WTF::String,
we convert them to std::string using WTF::String::Utf8()
before passing them to DispatchResponse::ServerError.
- We're better about checking messages and sending errors when we
can't parse them - esp. we no longer drop messages on the floor
if we can't make sense of them; the LOG statements are gone,
because we can either send an error or assume that we've
previously parsed the message elsewhere and put a DCHECK (e.g.,
a message received by blink has always been shallow-parsed by the
browser before).
- DevToolsAgentHost::DispatchProtocolMessage no longer has a boolean
return value. Reason being, it's not well defined what the
boolean should indicate. If we reject the message and send
an error, arguably we've also handled it. And of course, we
always do that (now). So it's not useful to generate or check
this return value, and there is only one DCHECK on it currently,
which is also not covered by tests.
- content::DevToolsSession uses binary searches to match method names
(e.g. in ShouldSendOnIO).
This is because I've switched the method names to span, and
implemented similar searches for the dispatching library, so
it's best to be consistent. It will also scale better if we add
more methods.
- The additional unittests added to the CRDTP library upstream cover
shallow parsing, dispatching, etc. and are now also part of
the content_unittests.
- Improves Android binary size by about 36k, by reducing code
duplication. There's now just one UberDispatcher, for example,
as opposed to one for blink, one for content, one for headless,
one for chromium, ...
- Speeds up execution by 1-2% (based on internal measurements),
because message serialization no longer takes a detour via
protocol::Value.
Change-Id: I422fe527d6f8a6ffb098b3992728ecba408b571f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2047966
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Ganggui Tang <gogerald@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750284}
Enterprise deep scanning for DLP violations has a specific list of
supported file types and the policy BlockUnsupportedFiletypes should
determine whether to blocked files not on that list. This CL introduces
a new download danger type for files blocked for that reason so that
we can, in future CLs, add UX specific to those files. It also generates
this danger type when appropriate, but uses the generic blocking UX.
Bug: 1060853
Change-Id: I6a670664d766bed860625cabcbd0d0e9a142e38e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2101294
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: Dominique Fauteux-Chapleau <domfc@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750276}
Adds a PORTAL_ACTIVATED generated event and handles it on Mac by
dispatching the load complete notification which ensures the page gets
focus (and VoiceOver also navigates through all the elements on the
page, similar to what happens after a regular navigation).
Bug: 1057804, 1045608
Change-Id: I2ca343e141c1011a862dd0f5bccd9b329e8f8498
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050603
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750271}
The pause_cb_ Closure is a OnceClosure. Change Pause() and Flush() to
take a OnceClosure.
This fixes text_render.cc not to use Closure. Every instance is now
either RepeatingClosure or OnceClosure.
Bug: 1007799
Change-Id: I6ad66ccb149cac914325da98da2f4c0a3965fd7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095709
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750269}
|has_hw_overlay_support_| in the DC overlay Processor is updated after
display change. This cap is queried directly from
direct_composition_surface_win. All the other overlay_support
capabilities which are used for passing data have been removed.
|use_dc_overlays_for_video| is removed from |capabilities| of
gles2_cmd_decoder and gles2_cmd_decoder_passthrough.
|supports_dc_video_overlays| is removed from |capabilities| of
output_surface.
Bug: 1042989
Change-Id: I9fcfd0a0e9e2e19db00ea0418cfd299e17664cae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2068920
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: weiliangc <weiliangc@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750268}
This change adds metrics, for the gesture navigation screen, which
records the amount of time that each individual page is shown to the
user (pages include Intro, Home, Overview, and Back).
Bug: 1055690
Change-Id: Iddc76fc5f3b1666813693418b51ae943eec067fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098770
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Commit-Queue: Matthew Mourgos <mmourgos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750267}
- Defined QueryTile proto and in-memory struct.
- Defined a collection_store interface.
- Implemented QueryTileStore.
TODO in next CLs: proto_conversion, query_tile_store_unittest,
query_tile_group_manager(tree operations).
Bug: 1060805
Change-Id: I6da3c9be67b34843594476ae1c1302206a19f1fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2099228
Commit-Queue: Hesen Zhang <hesen@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750265}
In https://crrev.com/4d25b125dae5 I changed the scroll tree parenting
logic so that elements in position:fixed subtrees have the LayoutView's
ScrollNode as the scroll parent. This made sense since scrolling over a
fixed element should cause the document to scroll. However, this is
slightly different from how the transform tree looks. Because scrolling
the document doesn't cause position:fixed eement so translate, these
nodes don't have the LayoutView's ScrollTranslation transform node as an
ancestor.
As a simple example, a scrolling document with a position:fixed <div>
scroller will generate the following scroll and transform trees
(approximately):
*ScrollTree* *TransformTree*
Root Root
| |
VisualViewport Translation VisualViewport
| / \
LayoutView Translation / \
| Fixed LayoutView
Fixed Scroller Translation
The situation above makes sense for what parent-child relationships mean
in each tree: the scroll tree encodes how scrolls chain; scrolling on a
child should bubble up to its parent in this tree. The transform tree
encodes the physical effect of scrolling a node. In the above example,
scrolling from the fixed scroller should bubble up to the LayoutView
(when the scroller is fully scrolled) but scrolling the LayoutView will
not cause movement of the fixed scroller.
The above makes sense but caused sticky code to get confused. A sticky
constraint is attached to the scroll translation node. With the above
situation, this meant that inside a fixed subtree, we'd attach it to the
VisualViewport's scroll translation node. This was unexpected; the
constraints are in "document coordinates", meaning that to translate
them into the viewport space we must apply the scroll offset [1]. The
compositor would use the visual viewport's (typically 0) scroll offset
to adjust these values, leading to incorrect calculations.
This previously worked because the scroll node used in a fixed subtree
would be the visual viewport (before the CL mentioned at the top). In
[2] we check whether the current overflow clip is also our scroller,
prior to the CL this check have failed because "our scroller" was the
visual viewport but our clip was the LayoutView. Now they are both the
LayoutView.
The fix in this CL is to make the check in [2] more stringent; we also
want to make sure that our scroller is the nearest scroller in the
transform tree. That is, if we scroll it, will we cause the current node
to move? If not, we don't need a sticky constraint on the compositor
because user scrolling can't change the sticky's offset relative to its
clip.
[1] https://cs.chromium.org/chromium/src/cc/trees/property_tree.cc?l=321&rcl=628f869d1fda631a85f051ad13b5d278319298fc
[2] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc?l=553&rcl=99a5a1266f303ba6ae46174a2b4cbd165ea7e934
Bug: 1019142
Change-Id: I781943ff43514905d399803c780c6081d7d47e8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097542
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750264}
Today, most parts of the code assume the browser controls min-height
is 0. This causes issues with the layout size and the fullscreen mode.
The most obvious issues currently are:
- If a min-height is set, ChromeFullscreenManager#controlsResizeView()
always returns true since the controls aren't completely hidden.
- Similarly if a min-height is set, position: fixed elements are sized
as if the controls are fully showing.
This CL changes the "browser controls resize/shrink blink" logic to try
and fix the issues listed above. With the changes in this CL, the
controlsResizeView bit will be false if the controls are at the
min-height.
Bug: 1049301
Change-Id: Ieb95e92c983b56b42a640f726c60c2eec9964064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2048276
Commit-Queue: Sinan Sahin <sinansahin@google.com>
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750260}
This uses the Clang profiling config during the instrumentation step of
a PGO build. This allows getting the profiling data out of the sandboxed
processes. This is not an ideal end state, ideally the coverage
configuration should be refactored and things common to the two
configurations should be moved to a new base config.
This requires to use the new version of goma, see go/ma-rbe-dogfood
(see crbug.com/990981#c26 for more details).
To build a PGInstrumented build (first step to do a PGO build) compile
with the following GN args:
is_component_build = false
is_debug = false
chrome_pgo_phase = 1
use_goma = true
Bug: 1056189
Change-Id: I717efdcbb6993ad574acce4c0f91eb5fb5bf3972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076424
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750258}
When Wi-Fi sync is first enabled and a list of synced networks
has to be merged with the local networks on a device, use the last
connected timestamp to decide which configuration should be used.
Bug: 966270
Change-Id: Id7688a0fdb9e7922cee8ffec0ef69b804436e3e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093274
Reviewed-by: James Vecore <vecore@google.com>
Commit-Queue: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750257}
The iOS tests were being run as gtests, but with the isolated merge
script because of iOS' output format (standard JSON output). Moving
them to use isolated_scripts instead, as it shortens the definition
in test_suites.pyl, and accomplishes the same.
Bug: 1055164
Change-Id: Icffb1a1cf72681e2ad08c5a3031d50e842a003f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100714
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Jeff Yoon <jeffyoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750256}
The first ever default desk created after boot should not
trigger any UMA stat reporting.
The histograms are deprecated, and replaced by
Ash.Desks.NewDesk2, and Ash.Desks.DesksCount2 respectively.
BUG=1060709
Change-Id: I09f851009aa05a71e73e914692919d2f8150344e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095973
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750254}
This change modifies LeakDetectionRequest to explicitly check for
HTTP_TOO_MANY_REQUESTS, indicating the user ran out of quota. It
modifies corresponding enums and introduces an optional LeakDetectionError
to the LookupSingleLeakCallback, so that the error can be forwarded to
consumers like the Password and Safety Check.
Bug: 1061108
Change-Id: I86d561b47bbf39e996a425dbd3459eb8bbda52ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100941
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750252}
No change to production logic, only test shell.
This adds 'system_webview_shell_package_name' to configure WebView
shell's package name. This is handy for Android emulators, because the
default package name will cause signature mismatches.
I kept the original documentation (for removing the shell from the
system image) because it may be relevant for some use cases. But I hope
the GN arg is a simpler solution for most developers.
Fixed: 1061211
Test: $OUT/bin/system_webview_shell_apk package-info (verify name)
Test: $OUT/bin/system_webview_shell_apk install (succeeds on emulator)
Test: Upload to gerrit > open file > click "gitiles" > verify markdown
Change-Id: I24a35524bc5042da33b8203637ec67a0f610f363
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2101859
Reviewed-by: Hazem Ashmawy <hazems@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750249}
There are variants of viz_unittests that use SkiaRenderer Dawn if it is
enabled in the build, and variants of cc_unittests are underway. Add
them to the SkiaRenderer Dawn FYI bot, which builds with the gn arg
"use_skia_dawn = true".
Bug: 1021566
Change-Id: Ia0d96a9389308f45e4a697455f396d69d7d20db4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2094758
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750247}
This CL migrates UnsizedMedia from feature policy to document policy.
Following web tests are being migrated:
- unsized-media.tentative.https.sub.html
- unsized-media-reporting.html
Following web tests are removed, because document policy currently
does not have a js API to list all features available.
- feature-policy-unsized-media-disabled.html
- feature-policy-unsized-media-enabled.html
Bug: 993790
Change-Id: Id5e0189c0277c940177460380970eab0015109d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097028
Commit-Queue: Charlie Hu <chenleihu@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750246}
This CL moves the Java-side definition of the kGenericSensorExtraClasses
Feature from ChromeFeatureList to a new DeviceFeatureList class that
lives in //services/device/public/java. This will allow non-Chrome
embedders to query the status of the Feature from Java.
Bug: 1058597
Change-Id: Iab3c75fea6c8755de52714be7776547a774842d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095445
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750245}
There is a discrepancy between BlinkAXTreeSource::GetChildren() and
BlinkAXTreeSource::GetParent().
- GetChildren() does not return direct children when they are ignored
and not included in the tree. This is because when
AXNodeObject::InsertChild() visits an object that is ignored and not
included in tree, it recurses and inserts the next generation.
- GetParent() always returns the direct parent.
This discrepancy an lead to confusion within AXTreeSerializer, with
respect to analyzing reparenting.
Bug: 651614
Change-Id: I4e4c8c6a2900cf5516cc98f3b260e619220ea7e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095882
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Adam Ettenberger <Adam.Ettenberger@microsoft.com>
Reviewed-by: Jacques Newman <janewman@microsoft.com>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750243}
This moves ChromeFeatureList.setTestFeatures to a new base.FeatureList
class so it can be shared by other *FeatureList implementations.
Eventually this class will the the primary method of querying Feature
state, but for now it only handles test configuration.
See crrev.com/c/2095445 and the bug for more information.
Bug: 1060097
Change-Id: Idd0c8ebc447f9f936192f81fc1465600f28ad7d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2099470
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750241}
A number of browser tests use URLLoaderInterceptors solely to look at
parameters for requests, and they have similar boilerplate code to set
that up. This CL moves URLLoaderMonitor from web_request_apitest to
content/public/test/, and switches over a couple browser tests to use
it.
Bug: 1052148
Change-Id: Id1e9a474ecd77017659f471a54621d0b9c35b0ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2092276
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Shivani Sharma <shivanisha@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750240}