Граф коммитов

75711 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke 628cc55f22 Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 17:56:46 +00:00
Simon Giesecke 4803e61816 Bug 708901 - Migrate to nsTHashSet in dom/base. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108593
2021-03-24 17:56:46 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke c73f87b72b Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 16:58:58 +00:00
Simon Giesecke 82e566bfca Bug 708901 - Migrate to nsTHashSet in dom/base. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108593
2021-03-24 16:58:58 +00:00
Jonathan Kew 93e84147b4 Bug 1697666 followup - Make the osaka-mono-exists test confirm that if Osaka is present, then Osaka-Mono is also available. r=arai
This version of the test passes for me locally with Osaka/Osaka-Mono installed, and also passes
(because both test and reference fall back to serif) if they're absent. It should fail only if
the Osaka family is present, but the Osaka-Mono family name (which is the special-case entry
that was broken) is not recognized.

Differential Revision: https://phabricator.services.mozilla.com/D109223
2021-03-24 15:15:23 +00:00
Emilio Cobos Álvarez 8b97179d90 Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

We have to add width: 100% to the UA sheet because we don't get it
automatically set to the scrollport size to by the scrollport anymore.
Otherwise this would regress vertical writing-modes.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-24 11:21:14 +00:00
Emilio Cobos Álvarez 0c7e8b4d04 Bug 1700472 - Add braces to SetPaginatedScrolling. r=dholbert
Drive-by fixup while I was reading related code.

Depends on D109545

Differential Revision: https://phabricator.services.mozilla.com/D109546
2021-03-24 10:13:26 +00:00
Emilio Cobos Álvarez 2656f9a4d1 Bug 1700472 - Minor cleanup in ConstructDocElementFrame. r=dholbert
No behavior change, just compute the different things we need upfront.
At first I was going to use this in the following patch but it ended up
not being needed.

Differential Revision: https://phabricator.services.mozilla.com/D109545
2021-03-24 10:13:25 +00:00
Butkovits Atila 6cc3507063 Backed out 3 changesets (bug 1700472) for causing reftest failures.
Backed out changeset df4d74e9669f (bug 1700472)
Backed out changeset ec476bf43984 (bug 1700472)
Backed out changeset 168b31448423 (bug 1700472)
2021-03-24 03:12:44 +02:00
Timothy Nikkel 52941487d7 Bug 1700250. Dump the uri when we are dumping the display list. r=mstange,miko
Differential Revision: https://phabricator.services.mozilla.com/D109450
2021-03-23 22:43:12 +00:00
Emilio Cobos Álvarez 966d0f4dfc Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-23 22:31:08 +00:00
Emilio Cobos Álvarez 0bdcb35e12 Bug 1700472 - Add braces to SetPaginatedScrolling. r=dholbert
Drive-by fixup while I was reading related code.

Depends on D109545

Differential Revision: https://phabricator.services.mozilla.com/D109546
2021-03-23 22:31:07 +00:00
Emilio Cobos Álvarez 96b57ed405 Bug 1700472 - Minor cleanup in ConstructDocElementFrame. r=dholbert
No behavior change, just compute the different things we need upfront.
At first I was going to use this in the following patch but it ended up
not being needed.

Differential Revision: https://phabricator.services.mozilla.com/D109545
2021-03-23 22:31:07 +00:00
Emilio Cobos Álvarez 6ed1fcf4d1 Bug 1700478 - Fix geometry-properties-in-css.html by restoring a call to IsSVGTransformed.
And also fix the relevant comment.

MANUAL PUSH: Orange in a CLOSED TREE
2021-03-24 00:17:45 +01:00
Emilio Cobos Álvarez 5a6212f1ce Bug 1700478 - Make IsTransformed cheaper for non-transformed frames. r=longsonr
Remove a bit of the aStyleDisplay gunk that shouldn't be needed because
of two reasons:

 * Stylo is faster / has the style display one pointer-chase away, as
   opposed to the old style system.

 * We now check the MAY_BE_TRANSFORMED bit first now, and we deal with
   SVG-transformed frames, so for non-transformed frames IsTransformed
   should just be a bit-check now.

Differential Revision: https://phabricator.services.mozilla.com/D109511
2021-03-23 22:01:25 +00:00
Emilio Cobos Álvarez 2366c509a8 WIP: Bug 1700132 - Annotate an intermittent test failure in forms/input/number/focus-handling.html.
This is a real issue, but realistically we're probably not going to dig
a lot into it, and it wasn't really caused by the regressing bug in any
meaningful way.

Differential Revision: https://phabricator.services.mozilla.com/D109532
2021-03-23 19:27:51 +00:00
Masayuki Nakano 2ad57f8fae Bug 1528289 - part 1: Move selection at middle button down rather than middle button up r=edgar
Chrome and Safari move selection at middle button down and does not modify the
range at middle button up.  However, they handle middle button down with
`Shift` key is "continue selection".  So, we should handle selection in
nsIFrame when `mousedown` event for middle mouse button is fired, but ignore
multiple selection, drag and drop and maintaining selection for aligning the
behavior to the other browsers.

This patch splits `nsIFrame::HandlePress()` and calls new method which
moves selection from `nsIFrame::HandleEvent()` when middle button is pressed.
(Note that this patch does not check whether middle click paste is enabled
because Chrome moves selection even on Windows which Chrome always disable
middle click paste on.)

With this change, "paste" event target is changed.  Previously, we used target
of the preceding `mouseup` event, but we start to use the target of the
preceding `mousedown` event.

Note that even with this patch, we still behave differently from Chrome even
in the following cases:
- middle mouse button down in selected range, we collapse it, but Chrome keeps
  the selection.
- middle mouse button click in selected range, we dispatch "paste" event, but
  Chrome collapse selection and not dispatch "paste" event.
- middle mouse button down in selected range and up in different element,
  Chrome does not modify the range nor dispatch "paste" event.
- Shift + middle mouse button in editable `<table>` works as non-editable
  in Chrome, but our editor handles it with special path.  Therefore, we
  don't modify the range but dispatch "paste" event in the selected range.

Changing them requires bigger change and probably requires some other features'
behavior changes.  Therefore, we shouldn't touch these issues until they are
actually reported as web-compat issues.

Differential Revision: https://phabricator.services.mozilla.com/D103997
2021-03-23 19:22:48 +00:00
Butkovits Atila 7ff95ae753 Backed out changeset 01519685a650 (bug 1679645) for causing failures at test_bug600570.html. 2021-03-23 22:44:33 +02:00
Miko Mynttinen 40648350fd Bug 1679645 - Cache the selection state in nsTextFrame rather than in nsDisplayText r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108646
2021-03-23 18:21:02 +00:00
Emilio Cobos Álvarez 51a69dce6a Bug 1700379 - Remove unused nsDisplayListBuilder::IsInPageSequence. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D109509
2021-03-23 18:02:49 +00:00
Anny Gakhokidze eb737dfce2 Bug 1698104 - Fix session restore for about:reader, r=nika,kashav
Implement an observer to wait for correct window events in order to restore tab
content.  Non-SHIP code restores about:reader scroll position after receiving
"AboutReaderContentReady" event, so to achieve the same thing with session
history in parent enabled, we can wait for "AboutReader:Ready" event.

Differential Revision: https://phabricator.services.mozilla.com/D108712
2021-03-23 18:01:23 +00:00
Jonathan Kew 6aa01e5aa4 Bug 1681691 - Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109289
2021-03-23 17:10:24 +00:00
Jonathan Kew fc722045b9 Bug 1681691 - Add metrics override descriptors to webidl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109288
2021-03-23 17:10:23 +00:00
Jonathan Kew 8b75657e88 Bug 1681691 - Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109287
2021-03-23 17:10:22 +00:00
Markus Stange f92e83a7db Bug 1698997 - Make nsXULPopupManager::ShowPopupAtScreen open a native context menu, if preffed on. r=tnikkel
This is macOS only and behind the prefs widget.macos.native-context-menus and
browser.proton.contextmenus.enabled .

The big design question here is: Where do we put the fork in the road? How much
should the existing non-native popup management machinery know about the state
of the native menu? Which parts of the non-native state should a) reflect the
true native state, b) enter a special "handled natively" state, or c) lie?

This patch picks the following approach:

 - The nsMenuPopupFrame of the root menupopup knows about the native menu; it
   keeps it alive in its new mNativeMenu field.
 - If the context menu has submenus, i.e. nested <menupopup> elements, the
   nsMenuPopupFrames for those nested menupopups do not know anything about the
   native menu.
 - The mPopupState of natively-handled nsMenuPopupFrames is ePopupClosed.
 - XULPopupElement::GetState, which queries the frame's mPopupState, also
   returns "closed". This might cause problems in the future.
 - The XUL popup manager's mPopups "menu chain" does not know about any open
   native menus.
 - The rollup widget also does not know about the native popup.

I've chosen to use ePopupClosed for native menus for the following reasons:
 1. While mirroring / updating the state for the root menu would be doable
    without too much trouble, it would be much more annoying to do the same for
    nested menupopups of submenus. So if submenus will be ePopupClosed, it's
    consistent for the root menu to also be ePopupClosed.
 2. nsXULPopupManager has assertions (for example in MayShowPopup) that make
    sure that the menu popup frame's mPopupState is consistent with the XUL
    popup manager's mPopups menu chain. Keeping the two both "closed" is the
    easiest way to achieve consistency.

Unless there are grave concerns with this approach, I suggest we go with it for
now and see what trouble arises.

Differential Revision: https://phabricator.services.mozilla.com/D109183
2021-03-23 14:38:29 +00:00
Noemi Erli 9ec97e75b1 Backed out changeset 1d4a266e0e49 (bug 1699768) for causing multiple failures CLOSED TREE 2021-03-23 13:44:39 +02:00
Simon Giesecke 79fddefe02 Bug 708901 - Migrate to nsTHashSet in gfx/ipc. r=jrmuizel
Depends on D109316

Differential Revision: https://phabricator.services.mozilla.com/D109317
2021-03-23 10:36:37 +00:00
Simon Giesecke e5674e128d Bug 708901 - Add nsTHashSet. r=xpcom-reviewers,nika
Depends on D109276

Differential Revision: https://phabricator.services.mozilla.com/D107684
2021-03-23 10:36:31 +00:00
Xidorn Quan 735ba70f94 Bug 1696721 part 3 - Fix intrinsic isize calculation for ruby frame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D109228
2021-03-23 10:26:17 +00:00
Xidorn Quan 91de536124 Bug 1696721 part 2 - Refactor DoIntrinsicInlineISize to make it accept a function for handling children. r=dholbert
While nsInlineFrame and nsFirstLetterFrame are going to continue sharing the same code, nsRubyFrame will use the refactored version to compute its intrinsic sizes.

This way we can also eliminate the need for checking the intrinsic type inside the function.

This patch shouldn't change behavior. It's just a refactoring of existing code.

Differential Revision: https://phabricator.services.mozilla.com/D109227
2021-03-23 10:26:17 +00:00
Xidorn Quan 2de293553b Bug 1696721 part 1 - Fix incorrect span sizing on ruby with border / padding. r=dholbert
This issue is revealed by the test for this bug in a later part, so it's also covered by that test.

Differential Revision: https://phabricator.services.mozilla.com/D109226
2021-03-23 10:26:16 +00:00
Emilio Cobos Álvarez ca2819c13c Bug 1699768 - Don't unsuppress painting until we've known the website background, to prevent flashing. r=smaug
Actually the page in this case starts getting styled _after_ the load
event, sometimes, but when that happens that also causes a white flash
in other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D109392
2021-03-23 10:16:52 +00:00
smolnar 03eae2c9a5 Backed out 8 changesets (bug 1681691) for causing wpt failures in idlharness.https.html. CLOSED TREE
Backed out changeset dda736a69ceb (bug 1681691)
Backed out changeset 64edecd0df6f (bug 1681691)
Backed out changeset a19844063d00 (bug 1681691)
Backed out changeset 5dd06c73f703 (bug 1681691)
Backed out changeset 1bc4081f95e4 (bug 1681691)
Backed out changeset e7887dc9a3c6 (bug 1681691)
Backed out changeset d9b488c09c23 (bug 1681691)
Backed out changeset b45b607fee4d (bug 1681691)
2021-03-23 12:00:39 +02:00
Jonathan Kew 31e403716c Bug 1681691 - Add support for metrics overrides to gfxUserFontEntry, dom::FontFace, etc r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109289
2021-03-23 08:37:07 +00:00
Jonathan Kew a7442dc478 Bug 1681691 - Add metrics override descriptors to webidl. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109288
2021-03-23 08:37:07 +00:00
Jonathan Kew 9c70dc7340 Bug 1681691 - Add ascent-, descent- and line-gap-override descriptors to the style system. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109287
2021-03-23 08:37:06 +00:00
Timothy Nikkel 379be147cb Bug 1700064. Disable double tap to zoom inside pdf.js. r=botond
Chrome and Safari either disable this or handle it badly. We don't handle it great so disable it.

Although the document principal looks like it can change I think if that happened at minimum the presshell would be recreated, which creates the ZoomConstraintsClient so we shouldn't need to register to be notified if this changes.

The other option would be to implement support for prevent default of double taps and then have modify pdf.js (if it doesn't already prevent default ctrl wheel events).

Differential Revision: https://phabricator.services.mozilla.com/D109421
2021-03-22 21:45:40 +00:00
Kagami Sascha Rosylight dc1c69954e Bug 1697829 - Part 2: Make sure mRelevantGlobal exists for constructed stylesheets r=emilio
Depends on D108873

Differential Revision: https://phabricator.services.mozilla.com/D109398
2021-03-22 21:15:34 +00:00
Kagami Sascha Rosylight ae57171286 Bug 1697829 - Part 1: Get relevant global for disassociated CSS rule objects r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108873
2021-03-22 21:15:34 +00:00
Sean Feng 2d171637c1 Bug 1689156 - Don't generate first-contentful-paint if the paint doesn't come from Tick r=smaug
When a contentful paint occurs which doesn't come from Tick, we should
not generate a first-contentful-paint entry for it because
    1) It violates the spec
    2) It usually means some magical paints which we should not expose
    to the web.

So this patches stop generating a contentful paint entry for that,
instead asking the next tick to generate the entry.

Depends on D107858

Differential Revision: https://phabricator.services.mozilla.com/D107859
2021-03-22 20:49:05 +00:00
Emily McDonough 44fd9a31e7 Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
This parsing is hidden behind the pref layout.css.page-size.enabled.

It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.

Differential Revision: https://phabricator.services.mozilla.com/D103958
2021-03-22 19:08:59 +00:00
Emily McDonough 2af314b97a Bug 1647845 Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing properties r=emilio
To know the valid rules for each property, we need to put this information
into the Servo prop list and add an appropriate getter to Longhand/Shorthand.

Differential Revision: https://phabricator.services.mozilla.com/D105825
2021-03-22 19:08:59 +00:00
Ting-Yu Lin 3699230bff Bug 1697349 - Incorporate flex item's margin and flex container's padding when computing flex container's overflow area. r=dholbert
This patch incorporates flex item's margin and flex container's padding
when computing flex container's overflow area in both the inline axis
and block axis.

overflow-top-left.html starts to fail because the test has flex items
with margin contributing to the overflow area now. We leave the test
unchanged for now until the webcompat situation is clear (Bug1698428).

flexbox-overflow-padding-002.html is based on
flexbox-overflow-padding-001.html with `writing-mode: vertical-rl` and
`direction: rtl` added to `.flexContainer`.

Differential Revision: https://phabricator.services.mozilla.com/D107936
2021-03-22 18:24:46 +00:00
Ting-Yu Lin 43f0d51226 Bug 1226305 - Fix clipRect if overflow-clip-box is content-box in any axis. r=emilio
In ScrollFrameHelper::BuildDisplayList(), before comparing the clipRect
with scrollable overflow area, we should deflate the clipRect with
padding if overflow-clip-box is content-box in any axis, to get the
correct content-box dimension in that axis.

overflow-clip-box-3.html is adapted from the testcase attached in
bug 1226305 comment 0.

Differential Revision: https://phabricator.services.mozilla.com/D109097
2021-03-22 17:57:35 +00:00
Ting-Yu Lin 7ba64928c3 Bug 1699878 - Speed up and reduce fuzziness for reftest 966992-1.html. r=emilio
Delete <script> and reftest-wait because the scrollbar shouldn't be
fading in the reftest, and we can save 5 seconds on CI!

Use default monospace font which is good enough without fuzziness.

Delete style for textarea because there is no textarea in the test nor
in the reference.

Differential Revision: https://phabricator.services.mozilla.com/D109193
2021-03-22 17:57:03 +00:00
Cosmin Sabou 193a73a5ea Backed out 10 changesets (bug 1681691) for wpt failures on fontface-override-descriptor-getter-setter.sub.html and idlharness.https.html. CLOSED TREE
Backed out changeset e43fba82fb31 (bug 1681691)
Backed out changeset 104675869016 (bug 1681691)
Backed out changeset 536bbc4b9ecd (bug 1681691)
Backed out changeset bb53155c3dd0 (bug 1681691)
Backed out changeset 9f9c3c13801a (bug 1681691)
Backed out changeset af79bc7f7919 (bug 1681691)
Backed out changeset e86d980f511e (bug 1681691)
Backed out changeset 12418707741d (bug 1681691)
Backed out changeset 8d5c2106a2b4 (bug 1681691)
Backed out changeset 4805e23e62d2 (bug 1681691)
2021-03-22 20:37:38 +02:00
Andrew Halberstadt d581304cf1 Bug 1699932 - [ci] Run mochitest and reftest selftests with Python 3, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D109207
2021-03-22 16:36:34 +00:00