This allows to use the feature from the context menu and is very
straight-forward.
This has the benefit of working with fission (as print from the focused
frame) and so on.
Making a checkbox on the UI on top of this is doable, but it is a lot
more complex (requires a bunch of both front-end and platform work)
because undoing this implies restoring the DOM which "print selection"
removes.
I think the context menu entry is very useful regardless of whether we
add a checkbox to undo it, and other browsers (with smaller context
menus) seem to agree.
Differential Revision: https://phabricator.services.mozilla.com/D92205
I guess in order to make this 100% sound we should check the whole
template mode stack, but that seemed more expensive than what I'd really
like, and I think it's not likely to be an issue in practice (maybe we
can too-eagerly preload some images inside tables inside templates, or
something of that sort?).
Differential Revision: https://phabricator.services.mozilla.com/D92773
ExternMozLog treated aMsg as a format, instead of the string being printed.
If it happened to contain any escape sequences, it led to a crash as the parameters weren't there.
Differential Revision: https://phabricator.services.mozilla.com/D92886
Automatic update from web-platform-tests
[layout] Introduce the NGLayoutOverflowCalculator.
This patch moves the layout-overflow calculation "into" NG.
It does several interconnected things:
- Just before a fragment is created we calculate the layout-overflow
for a fragment. This is more correct than doing it for the layout
object as a whole, resulting in more multi-col passes.
The additional regression was caused the layout-overflow
calculation hiding a bug with large column gaps (which exceed the
inline-size of the container).
- Once this is calculated, we run the
SetLayoutOverflowFromLayoutResults function which "joins" all the
layout-overflow from the fragments into the layout-object, used for
JS API calls.
- Finally there is the LayoutNGMixin::RecalcLayoutOverflow which
allows for recalculating of layout-overflow, and correctly rebuilding
the fragment-tree.
Bug: 1066616
Change-Id: I25987a32b0254eafc2d7aad90ef6a36b60f1e1dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333083
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814090}
--
wpt-commits: 16c99fc3f05855a7d7d19397a19f49d2dbf429b9
wpt-pr: 25827
Automatic update from web-platform-tests
Reland "[Editing] Fix canonical caret position at line break"
This is a reland of d46bdb4f3a1ac1f89c0445875150ff2e9c341141
It was reverted because the new test could time out in Mac.
Fixed by adding '<meta name="timeout" content="long">'.
Original change's description:
> [Editing] Fix canonical caret position at line break
>
> Consider this testcase:
> <style>div { width: min-content; padding: 5px; }</style>
> <div contenteditable>line1<wbr>line2</div>
> which is rendered as
> line1
> line2
>
> Before this patch, when clicking at the beginning of the 2nd line, the
> caret would appear at the end of the 1st one, because CanonicalPosition
> would search backwards even with a downstream affinity.
>
> Also, when clicking at the beginning of the 1st line and pressing the
> down arrow key, the caret would move to the end of the 1st line instead
> of to the beginning of the 2nd one. And pressing the key again would
> have no effect, the caret would refuse to go down.
>
> This patch fixes these problems by making CanonicalPosition take a
> TextAffinity parameter which affects whether the canonical position is
> first searched backwards or forwards. If no suitable candidate is found,
> it will still search in the other direction.
>
> And then, VisiblePosition::Create takes care of deciding between the
> upstream and the downstream canonical positions, depending on the
> affinity and whether there is a line break.
>
> Bug: 1002937
>
> Web tests:
> TEST=external/wpt/editing/run/caret-navigation-around-line-break.html
>
> Unit tests:
> TEST=All/ParameterizedVisibleUnitsLineTest.inSameLine/0
> TEST=All/ParameterizedVisibleUnitsLineTest.inSameLine/1
> TEST=All/ParameterizedVisibleUnitsWordTest.StartOfWordShadowDOM/0
> TEST=All/ParameterizedVisibleUnitsWordTest.StartOfWordShadowDOM/1
> TEST=VisiblePositionTest.ShadowV0DistributedNodes
> TEST=VisibleUnitsLineTest.endOfLine
> TEST=VisibleUnitsLineTest.isEndOfLine
> TEST=VisibleUnitsLineTest.isLogicalEndOfLine
> TEST=VisibleUnitsLineTest.isStartOfLine
> TEST=VisibleUnitsLineTest.logicalEndOfLine
> TEST=VisibleUnitsLineTest.logicalStartOfLine
> TEST=VisibleUnitsLineTest.startOfLine
> TEST=VisibleUnitsTest.canonicalPositionOfWithHTMLHtmlElement
> TEST=VisibleUnitsTest.canonicalPositionOfWithInputElement
> TEST=VisibleUnitsTest.canonicalizationWithCollapsedSpaceAndIsolatedCombiningCharacter
>
> Change-Id: I82d86d40a87513b2e92c024735957e9f71154094
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410404
> Commit-Queue: Oriol Brufau <obrufau@igalia.com>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#813744}
Bug: 1002937
Change-Id: Ida01b6d838f03cfbe66e4cba86472ed90499af45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450292
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#814053}
--
wpt-commits: 080f375b310f3fbd380b00f29f0dd7198af46cb0
wpt-pr: 25998
Automatic update from web-platform-tests
Add reftests for transform animations
Because composited animations are inaccessible from js, reftests are
necessary to test their behavior. In this set, the file
transform-interpolation-reftests.js defines the tests themselves and
several wrapper html files each run a subset of them (this structure
is due to the lack of support for test variants in reftests).
As these tests are specifically meant for testing compositor animations,
add css-transforms to the virtual/threaded suite to test with threaded
compositing. As this has found several errors, bugs have been filed and
linked to the threaded cases in TestExpectations
Bug: 1131196, 1133901, 1131252
Change-Id: I9c6d92727e52a3ec11fe56f3375fc352baeadf04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2443209
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: George Steel <gtsteel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813921}
--
wpt-commits: 624b20a0818a7b22f33aa14385670b5e3c187812
wpt-pr: 25937
Automatic update from web-platform-tests
[LayoutNG] Correct column balancing for horizontal-rl.
We got it wrong when there was overflow. Use WritingModeConverter.
Bug: 829028
Change-Id: Idf060c3417f254f414251a9e3287a3c8f5c6cd97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450315
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813898}
--
wpt-commits: 5484d8df43a5a2daba5ca6b372cb5fe05c21a825
wpt-pr: 25993
Automatic update from web-platform-tests
[LayoutNG] Don't truncate margins after spanners.
A column spanner forcefully breaks a column, so any leading margins on
content right after the spanner shouldn't be discarded.
Bug: 829028
Change-Id: I767466677d72be2760306ddd531e847f52cfa8ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2445482
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813892}
--
wpt-commits: f26f2afa7190bd5996071f56fdc5557c4828a695
wpt-pr: 25957
Automatic update from web-platform-tests
Cross-ref css2 tests into css-text-3 (#25983)
Add references along the way
--
wpt-commits: 7d49534b1fb1c1c78f7f3272d3c2563b4612a1f4
wpt-pr: 25983
Automatic update from web-platform-tests
[encoding] Add a test with a decoding error in the middle of a stream chunk.
This test comes from http://trac.webkit.org/r266668 and is the only stream
decoding test that has an error in the middle of a chunk given to the decoder.
I had an implementation that passed all other tests then realized I had done it
all wrong and added this test that would have failed with my first implementation.
--
wpt-commits: c30d682aaa8aaf9eb7b3f5681213e44def45412e
wpt-pr: 25988
Automatic update from web-platform-tests
[url] Add a few url tests to cover cases that were not tested before.
The first tests around edge cases of the U_IS_UNICODE_CHAR macro,
which my younger and more naive self used until http://trac.webkit.org/r267963
and Chrome seems to do something similar.
The second and third test what happens when parsing terminates in the file slash
state with relative file URLs with and without windows drive letters, which
terminal state I forgot in my initial implementation of file host copying in
http://trac.webkit.org/r267896
The last verifies that using a windows drive letter as a relative file URL path
removes all of the base URL's path including any drive letter it may have.
This is something I was unsure about when implementing r267964 but matches the
behavior of IE and Edge.
--
wpt-commits: 4e15edcc3ca51c72c3846133c7b175ecd94b3a9b
wpt-pr: 25987
Automatic update from web-platform-tests
Revert "[Editing] Fix canonical caret position at line break"
This reverts commit d46bdb4f3a1ac1f89c0445875150ff2e9c341141.
Reason for revert: Added web test is timing out on Mac10.15 Tests
https://ci.chromium.org/p/chromium/builders/ci/Mac10.15%20Tests/4574
Original change's description:
> [Editing] Fix canonical caret position at line break
>
> Consider this testcase:
> <style>div { width: min-content; padding: 5px; }</style>
> <div contenteditable>line1<wbr>line2</div>
> which is rendered as
> line1
> line2
>
> Before this patch, when clicking at the beginning of the 2nd line, the
> caret would appear at the end of the 1st one, because CanonicalPosition
> would search backwards even with a downstream affinity.
>
> Also, when clicking at the beginning of the 1st line and pressing the
> down arrow key, the caret would move to the end of the 1st line instead
> of to the beginning of the 2nd one. And pressing the key again would
> have no effect, the caret would refuse to go down.
>
> This patch fixes these problems by making CanonicalPosition take a
> TextAffinity parameter which affects whether the canonical position is
> first searched backwards or forwards. If no suitable candidate is found,
> it will still search in the other direction.
>
> And then, VisiblePosition::Create takes care of deciding between the
> upstream and the downstream canonical positions, depending on the
> affinity and whether there is a line break.
>
> Bug: 1002937
>
> Web tests:
> TEST=external/wpt/editing/run/caret-navigation-around-line-break.html
>
> Unit tests:
> TEST=All/ParameterizedVisibleUnitsLineTest.inSameLine/0
> TEST=All/ParameterizedVisibleUnitsLineTest.inSameLine/1
> TEST=All/ParameterizedVisibleUnitsWordTest.StartOfWordShadowDOM/0
> TEST=All/ParameterizedVisibleUnitsWordTest.StartOfWordShadowDOM/1
> TEST=VisiblePositionTest.ShadowV0DistributedNodes
> TEST=VisibleUnitsLineTest.endOfLine
> TEST=VisibleUnitsLineTest.isEndOfLine
> TEST=VisibleUnitsLineTest.isLogicalEndOfLine
> TEST=VisibleUnitsLineTest.isStartOfLine
> TEST=VisibleUnitsLineTest.logicalEndOfLine
> TEST=VisibleUnitsLineTest.logicalStartOfLine
> TEST=VisibleUnitsLineTest.startOfLine
> TEST=VisibleUnitsTest.canonicalPositionOfWithHTMLHtmlElement
> TEST=VisibleUnitsTest.canonicalPositionOfWithInputElement
> TEST=VisibleUnitsTest.canonicalizationWithCollapsedSpaceAndIsolatedCombiningCharacter
>
> Change-Id: I82d86d40a87513b2e92c024735957e9f71154094
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410404
> Commit-Queue: Oriol Brufau <obrufau@igalia.com>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#813744}
TBR=yosin@chromium.org,xiaochengh@chromium.org,obrufau@igalia.com
Change-Id: I5f6da8b5b9be5167cf49dd5b27d0f9c03b0b285e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1002937
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2450770
Reviewed-by: Kristi Park <kristipark@chromium.org>
Commit-Queue: Kristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813814}
--
wpt-commits: c538cb209de8d296fe3ab910aa95e850303450c5
wpt-pr: 25996
Automatic update from web-platform-tests
Fix overscroll-deltas.html
This test incorrectly allows overscroll actions like gesture-navigation
which would interfere with the reported overscroll delta. This CL
disables overscroll actions with |overscroll-behavior:none|; however,
Chrome has a bug where it consumes overscroll delta, even when
overscroll-behavior is set to none.
Because of this bug, this test uses very approximate values for
expectations and were right on the edge of what was frequently being
seen. However, due to the nature of the bug a timing change here nudged
it below the thresholds so I've loosened these.
Bug: 1112183
Change-Id: If4ecf7a263385ddc3211f7776aca21eb8ec3aa95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442152
Reviewed-by: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813770}
--
wpt-commits: 7d790439c38dddeb7fcb1fa17f967b2f7b2e117e
wpt-pr: 25930
Automatic update from web-platform-tests
[Editing] Fix canonical caret position at line break
Consider this testcase:
<style>div { width: min-content; padding: 5px; }</style>
<div contenteditable>line1<wbr>line2</div>
which is rendered as
line1
line2
Before this patch, when clicking at the beginning of the 2nd line, the
caret would appear at the end of the 1st one, because CanonicalPosition
would search backwards even with a downstream affinity.
Also, when clicking at the beginning of the 1st line and pressing the
down arrow key, the caret would move to the end of the 1st line instead
of to the beginning of the 2nd one. And pressing the key again would
have no effect, the caret would refuse to go down.
This patch fixes these problems by making CanonicalPosition take a
TextAffinity parameter which affects whether the canonical position is
first searched backwards or forwards. If no suitable candidate is found,
it will still search in the other direction.
And then, VisiblePosition::Create takes care of deciding between the
upstream and the downstream canonical positions, depending on the
affinity and whether there is a line break.
Bug: 1002937
Web tests:
TEST=external/wpt/editing/run/caret-navigation-around-line-break.html
Unit tests:
TEST=All/ParameterizedVisibleUnitsLineTest.inSameLine/0
TEST=All/ParameterizedVisibleUnitsLineTest.inSameLine/1
TEST=All/ParameterizedVisibleUnitsWordTest.StartOfWordShadowDOM/0
TEST=All/ParameterizedVisibleUnitsWordTest.StartOfWordShadowDOM/1
TEST=VisiblePositionTest.ShadowV0DistributedNodes
TEST=VisibleUnitsLineTest.endOfLine
TEST=VisibleUnitsLineTest.isEndOfLine
TEST=VisibleUnitsLineTest.isLogicalEndOfLine
TEST=VisibleUnitsLineTest.isStartOfLine
TEST=VisibleUnitsLineTest.logicalEndOfLine
TEST=VisibleUnitsLineTest.logicalStartOfLine
TEST=VisibleUnitsLineTest.startOfLine
TEST=VisibleUnitsTest.canonicalPositionOfWithHTMLHtmlElement
TEST=VisibleUnitsTest.canonicalPositionOfWithInputElement
TEST=VisibleUnitsTest.canonicalizationWithCollapsedSpaceAndIsolatedCombiningCharacter
Change-Id: I82d86d40a87513b2e92c024735957e9f71154094
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410404
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813744}
--
wpt-commits: a3dc64332af60e6c833eef715db21ec519a7a0e8
wpt-pr: 25936
Automatic update from web-platform-tests
[webdriver] click elements in Shadow DOM
--
wpt-commits: bf1e14596aa50bb56dbbc0cb3bd988e5a74168f7
wpt-pr: 25962
Automatic update from web-platform-tests
Add link to l3 spec and comment about validity in that context (#25984)
--
wpt-commits: 84d3ce92b0fc2659afe4110220a6ba0fae65743b
wpt-pr: 25984
Automatic update from web-platform-tests
[taskcluster] Pass --use-gl=swiftshader-webgl for Chrome (#25655)
The taskcluster machines do not have discrete GPUs, and Chrome does not
default advertise WebGL 2.0 if software rendering is being used (for
performance concerns). This breaks a few tests that test webgl2 content,
so set this flag to fix them.
Fixes https://crbug.com/1130585
--
wpt-commits: ffdd53d8c2df2f767d02f2c9b987e969a26b70ab
wpt-pr: 25655
Automatic update from web-platform-tests
Delete broken tests (#25976)
-057 is not even close to testing what it claims to test,
and the behavior in Level 2 is very fuzzily defined anyway.
This is much better defined, with many more tests excercising it,
in level 3.
-058 is less far off, but still wrong, and the same logic applies.
--
wpt-commits: 7ad65cf5cb23cbcf48be601caab258103497bd73
wpt-pr: 25976
Automatic update from web-platform-tests
Cross-ref test from css2 to css-text-3 (#25978)
Add a few references and bugfixes along the way
--
wpt-commits: cc204b843e3dea664f63130742155f174c4b6afd
wpt-pr: 25978
Automatic update from web-platform-tests
More test cross-referencing (#25972)
* More test cross-referencing
With references added along the way, and some smaller fonts to make sure
everything fits the screen.
* Rename files to avoid conflicts
--
wpt-commits: 1a422322bb530ae6b8e51d518ce84cf05d85e772
wpt-pr: 25972
Automatic update from web-platform-tests
More cross-referencing tests from CSS 2 into css-text-3 (#25971)
With new refs along the way
--
wpt-commits: 6748172de5cc6e4999fb8620eb83cf5c54a0a18e
wpt-pr: 25971
Automatic update from web-platform-tests
Link a bunch of tests to the css-text-3 (#25970)
Add a few references along the way
Also, correct the interpretation of percentage text intent to match the
disambiguated modern understanding (% of the block itself, not of its
parent).
--
wpt-commits: 5d60588a6eca892bc9f93b03a4c861013904a5d4
wpt-pr: 25970