Instead of recursively walking through the rules of the stylesheet, we use the
new `InspectorUtils.getAllStyleSheetCSSStyleRules` method that returns a flat
list of all the rules of a given stylesheet.
We also merge the StyleSheetsManager `getAtRules` and `getStyleSheetRuleCount`
methods into one, as there were always called from the same places, and we can
save some cycle by only retrieving the stylesheet rules once.
Differential Revision: https://phabricator.services.mozilla.com/D181506
This method returns a flat list of all the rules in a given stylesheet.
This will be helpful for DevTools so we don't have to recursively walk through
all the children rules (which is slow on the JS DevTools server).
Differential Revision: https://phabricator.services.mozilla.com/D181505
Upstream highway project has a check for the availability of the asm/hwcap.h
header, because it doesn't exist on all platforms. Work around it statically
in moz.build.
Differential Revision: https://phabricator.services.mozilla.com/D181468
It's common when using canvas to create circles using the arc() function.
This lets us detect those cases and stroke them directly.
Differential Revision: https://phabricator.services.mozilla.com/D181550
PR 40058 changed the behaviour here to reject the promise when an
action failed rather than throwing an exception. However there were
two problems:
* It implemented the new behaviour for Firefox, but failed to use the
implementation
* It changed the existing code to log an Error, which causes problems
in Gecko's CI
This reverts the logging behaviour, and fixes / wires up the
implementation of the new exception handling behaviour in gecko.
Differential Revision: https://phabricator.services.mozilla.com/D181455
Automatic update from web-platform-tests
Inherit COOP: restrict-properties and un-suppress opener
To make the `Cross-Origin-Opener-Policy: restrict-properties` (COOP:RP)
more useful, we'd like to let cross-origin iframes inherit this policy
from their parent and keep the opener connection between windows that
the iframes open. See
https://github.com/hemeryar/coi-with-popups/blob/main/docs/cross_origin_iframe_popup.MD
for more explanations.
In https://crrev.com/c/4404116, we've bundled the origin that sets the
COOP with the policy. This CL is to use the stored origin in COOP
algorithms:
1. In `RenderFrameHostImpl::DidCommitNewDocument`, we let embedded
documents inherit the COOP:RP bundle when the policy is COOP:RP.
2. To keep the opener connection, we return false in
`COOPSuppressOpener` when COOP value is RP.
3. Since we allow the popup's initial empty document and its subframes
to stay in the process, we had to restrict its crossOriginIsolated
capability. Otherwise, a cross-origin iframe can get around permission
policy that restricts it from using crossOriginIsolated APIs.
- For the initial empty document, we pass a boolean to the renderer
via CreateNewWindow.
- For the subframes of the initial empty document, we pass a boolean
via CommitNavigation.
This CL also adds new test cases for
1. Cross-origin iframe opener v.s. same-origin iframe opener.
2. Checking the popup's subframe's `crossOriginIsolated`.
3. Checking popup's `crossOriginIsolated` after it navigates away from
the initial empty document. (This is to make sure that we don't
restrict the `crossOriginIsolated` when we shouldn't)
Bug: 1385827
Change-Id: I39cd140f70b628114205640af2220ec2de45ac06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4479858
Auto-Submit: Jonathan Hao <phao@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Jonathan Hao <phao@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1159514}
--
wpt-commits: f54e23527ff683dc481c72fb6e9965da6c46ad6e
wpt-pr: 39823