Commit Graph

404 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fe32378bf5 Bug 1781034 - Remove layout debugger's visual debugging. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D152628
2022-07-26 15:06:30 +00:00
Marian-Vasile Laza
e74e7b0a1a Backed out 2 changesets (bug 1781034) for causing bustages on nsImageFrame.cpp. CLOSED TREE
Backed out changeset 6a7a9375987a (bug 1781034)
Backed out changeset 58728270361e (bug 1781034)
2022-07-26 17:45:06 +03:00
Emilio Cobos Álvarez
9833ad7c5e Bug 1781034 - Remove layout debugger's visual debugging. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D152628
2022-07-26 14:08:56 +00:00
Martin Robinson
2875313e4e Bug 1777478 - Animations in content hidden by content-visibility should not fire events or resolve promises r=hiro
Keep a separate list of animations in the timeline that are hidden by
content visibility. This allows the DocumentTimeline to disconnect from
the refresh driver when all animations are hidden and prevents ticking
hidden animations in general.

Differential Revision: https://phabricator.services.mozilla.com/D150764
2022-07-19 09:57:21 +00:00
Emilio Cobos Álvarez
b88e86947b Bug 1780075 - Remove outline-style: auto pref. r=layout-reviewers,dholbert
All platforms support it, so just assert instead.

Differential Revision: https://phabricator.services.mozilla.com/D152109
2022-07-19 09:25:11 +00:00
Narcis Beleuzu
8dcae7e3fc Backed out changeset 1861b83150d9 (bug 1774697) for wpt failure on user-select-on-input-and-contenteditable.html CLOSED TREE 2022-07-11 17:15:34 +03:00
Tiaan Louw
792dae3219 Bug 1774697 - Ignore the computed "user-select" on editable elements r=dholbert
Check for a text input or editable host first, because they always set
the used style to 'contain' (The spec actually requires 'contain', but
we implement the 'contain' behavior as a flavor of 'text')

https://drafts.csswg.org/css-ui-4/#content-selection

Differential Revision: https://phabricator.services.mozilla.com/D149731
2022-07-11 11:45:22 +00:00
Mirko Brodesser
5e7375898c Bug 1778286: declare aEvent of nsIFrame::GetContentForEvent const. r=emilio
Simplifies reasoning about it.

Differential Revision: https://phabricator.services.mozilla.com/D151118
2022-07-06 10:22:30 +00:00
Hiroyuki Ikezoe
a8cab6ca5b Bug 1530253 - Trigger resnap on scroll-snap-type or scroll-snap-align changes. r=emilio
Depends on D148863

Differential Revision: https://phabricator.services.mozilla.com/D148864
2022-07-01 01:35:33 +00:00
Daniel Holbert
0d0df2e61c Bug 1774261 part 1: Simplify nsCSSRendering::FindBackground to directly return its result instead of using an outparam. r=emilio
This patch doesn't change behavior.

Before this patch, the FindBackground API returns a bool to indicate
success/failure, and sets its outparam to a non-null pointer-value on success.

This patch simplifies the API by just promoting the promoting the outparam to
be the actual return value, with nullptr as a sentinel value to indicate
failure.

(This patch adds some braces to affected/contextual if statements, too, to
match our coding style guide.)

Differential Revision: https://phabricator.services.mozilla.com/D149337
2022-06-17 21:55:20 +00:00
Emilio Cobos Álvarez
5400f4f368 Bug 1771262 - z-index should apply to menupopup frames. r=stransky
nsMenuPopupFrame initialized the view z-index to a hard-coded INT32_MAX, but
then reset it on restyles based on ZIndex() in SyncFrameViewProperties().

We specify z-index here, so use a consistent z-index all around:

  https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/toolkit/content/xul.css#255-256

I suspect this is also causing that weird bug about menus going under other
menus on macOS (bug 1763990).

Differential Revision: https://phabricator.services.mozilla.com/D148762
2022-06-09 16:44:43 +00:00
Emilio Cobos Álvarez
54fb7a2e28 Bug 1773070 - While at it rename ContentStateChanged to ElementStateChanged, and make it take elements. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148553
2022-06-07 23:09:54 +00:00
Emilio Cobos Álvarez
1c58e2a928 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Jonathan Kew
39ac62422e Bug 1771609 - patch 3 - Remove nsAutoLineIterator, as it no longer serves any useful purpose since the iterator is owned by the target frame. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147579
2022-06-03 22:05:36 +00:00
MartinH
310d938b35 Bug 1475232 - When next line selection moves to a valid frame without line iterator, drill down to a first selectable child with line iterator r=emilio
Also bug 1216483

The problem was that GetNextPrevLineFromeBlockFrame correctly identified the target frame but in case it was a flex/grid container, PeekOffsetForLine didn't accept it as a valid result due to a missing line iterator.

There was an existing case which handled this similarly for a table target, drilling into a first child with line iterator, but it was also incomplete.

Extended the drill condition for flex/grid and made the drilling algorithm more robust to be able to also crawl siblings and skip non-selectable elements (e.g. :before pseudoelement, contenteditable="false")

Differential Revision: https://phabricator.services.mozilla.com/D147752
2022-06-01 09:57:46 +00:00
Miko Mynttinen
642d4a804e Bug 1771754 - Improve display list logging r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147665
2022-05-31 15:45:31 +00:00
Norisz Fay
fd054310de Backed out changeset b4f7e56bdfbb (bug 1771754) for causing build bustages CLOSED TREE 2022-05-31 16:11:37 +03:00
Miko Mynttinen
adae79a954 Bug 1771754 - Improve display list logging r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D147665
2022-05-31 12:46:22 +00:00
Miko Mynttinen
45c5c7a493 Bug 1766650 - Store modified frames in display root frame RetainedDisplayListBuilder r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D144889
2022-05-30 14:20:58 +00:00
Emilio Cobos Álvarez
7916def5c5 Bug 1769774 - Stop tracking painted PresShells. r=mstange
After bug 1730284 we don't use it for throttling iframes, so the only
remaining use the test-only nsIDOMWindowUtils.paintCount. None of the
tests using it rely on the empty transaction case, so we should be able
to just remove this.

Differential Revision: https://phabricator.services.mozilla.com/D146589
2022-05-27 11:12:19 +00:00
Cristian Tuns
07eaf7e321 Backed out changeset ad9f67e4e822 (bug 1769774) for causing build bustages after backout of Bug 1730284 CLOSED TREE 2022-05-25 16:10:08 -04:00
Noemi Erli
7c6784310f Backed out 2 changesets (bug 1730284) for causing devtools,web-platform and mochitest failures CLOSED TREE
Backed out changeset 98834b863104 (bug 1730284)
Backed out changeset 1ec157459e8c (bug 1730284)
2022-05-25 22:51:20 +03:00
Emilio Cobos Álvarez
89ef246dc0 Bug 1769774 - Stop tracking painted PresShells. r=mstange
After bug 1730284 we don't use it for throttling iframes, so the only
remaining use the test-only nsIDOMWindowUtils.paintCount. None of the
tests using it rely on the empty transaction case, so we should be able
to just remove this.

Differential Revision: https://phabricator.services.mozilla.com/D146589
2022-05-25 17:55:17 +00:00
Emilio Cobos Álvarez
d8b88859f0 Bug 1730284 - Use whether the embedder element intersects the viewport to decide whether to throttle in-process iframes. r=smaug
This is more likely to be understandable by developers, matches other
browsers more closely (see bug comments), and seems more in-line with
what we do for OOP iframes.

Add a pref to not do this throttling at all (which would match Chrome),
though this is probably good enough for now.

Differential Revision: https://phabricator.services.mozilla.com/D146574
2022-05-25 17:54:22 +00:00
Emilio Cobos Álvarez
c7e23e16d2 Bug 1769512 - Fix partial prerender tests by preserving sketchy behavior.
See linked bug from the comment.

MANUAL PUSH: Trivial-ish orange fix CLOSED TREE
2022-05-23 11:10:53 +02:00
Emilio Cobos Álvarez
86c3ed6655 Bug 1769512 - Implement overflow-clip-margin: <length>. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D146432
2022-05-23 07:21:43 +00:00
Cristian Tuns
41beb2d000 Backed out changeset c2e017726323 (bug 1769512) for causing multiple failures(wr and c1) CLOSED TREE 2022-05-20 14:46:22 -04:00
Emilio Cobos Álvarez
3ed65f2021 Bug 1769512 - Implement overflow-clip-margin: <length>. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D146432
2022-05-20 17:43:58 +00:00
Emilio Cobos Álvarez
104c0b911e Bug 1769512 - Support both negative and positive offsets in border radius adjustments. r=jwatt
Depends on D146430

Differential Revision: https://phabricator.services.mozilla.com/D146431
2022-05-20 15:16:39 +00:00
Emilio Cobos Álvarez
72e4133c8f Bug 560067 - Ensure visibility tracking code doesn't choke on visibility:hidden images. r=tnikkel
visibility: hidden still goes into BuildDisplayListForChild (because
children might be visible), but the child itself might not be visible.

Differential Revision: https://phabricator.services.mozilla.com/D122117
2022-05-20 12:22:05 +00:00
Glenn Watson
08f082e5cd Bug 1769682 - Add support for filters on backdrop-filter elements r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146529
2022-05-17 19:51:24 +00:00
Bogdan Szekely
2e6bbe8888 Merge autoland to mozilla-central. a=merge 2022-05-17 12:26:46 +03:00
Glenn Watson
ee42920c34 Bug 1765525 - Fix gecko DL creation for backdrop-filters with clips r=gfx-reviewers,miko
Change to derive from nsDisplayEffectsBase, since the backdrop-filter
can still have a visual bounds (and effect) even if the child
stacking context has no items. Also use the same approach to get
the bounding rect and implement GetBounds as nsDisplayFilters uses.

Differential Revision: https://phabricator.services.mozilla.com/D145295
2022-05-17 01:53:33 +00:00
Glenn Watson
3b0a70b95b Bug 1768986 - Remove nsDisplayBackdropRoot r=gfx-reviewers,lsalzman
It's not possible to implement backdrop-filter with gecko adding
explicit boundaries for backdrop roots, since backdrop filters
can sample from a backdrop in a parent iframe. In this case, the
parent display list (in one process) doesn't see a backdrop filter,
so no root display item is added, even if there is a child display
list (in another process) that has a backdrop-filter.

This patch just removes the existing backdrop-filter root display
items from Gecko. A follow up patch will add implicit backdrop
root handling inside WR itself, where we have access to all of the
display lists.

Differential Revision: https://phabricator.services.mozilla.com/D146148
2022-05-15 22:42:22 +00:00
Emilio Cobos Álvarez
fc9cc3fd0e Bug 1423746 - Filter on root should not establish containing block for fixedpos elements. r=mstange
Teach nsDisplay{Filters,BackdropFilters} to use a style that doesn't
belong to mFrame for the root frame, and use it as needed.

Remove the BackdropFilters::CanCreateWebrenderCommands call because it
was testing for StyleSVGEffects::mFilters rather than mBackdropFilters,
so it was doing nothing.

Differential Revision: https://phabricator.services.mozilla.com/D146188
2022-05-13 10:02:58 +00:00
Emilio Cobos Álvarez
bb392e4593 Bug 1769034 - Remove ContainerTracker. r=miko
We don't use the stored container anymore, this can just be a boolean.

Differential Revision: https://phabricator.services.mozilla.com/D146187
2022-05-12 13:43:18 +00:00
Emilio Cobos Álvarez
b7f3d09457 Bug 1768846 - Don't compute transform matrix twice while untransforming dirty / visible rects. r=boris
This code can appear in profiles as seen in bug 1768766.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D146070
2022-05-11 19:20:04 +00:00
Narcis Beleuzu
9a4880ff1f Merge autoland to Mozilla-Central. a=merge 2022-05-07 12:41:16 +03:00
Emilio Cobos Álvarez
83678aa490 Bug 1768157 - Remove kSelectPopupList. r=jwatt
It's unused since bug 1744009 at least, so no behavior change.

Depends on D145714

Differential Revision: https://phabricator.services.mozilla.com/D145715
2022-05-06 15:46:49 +00:00
Glenn Watson
5c4e2788a0 Bug 1765862 - Skip backdrop-filter if nsIFrame reports not visible for painting r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D145526
2022-05-06 01:12:05 +00:00
Narcis Beleuzu
e5c608544f Backed out changeset bcc1a29ee9c8 (bug 1765525) for wr failure on backdrop-filter-svg-foreignObject.html 2022-05-05 03:42:35 +03:00
Glenn Watson
6f4dc47480 Bug 1765525 - Fix gecko DL creation for backdrop-filters with clips r=gfx-reviewers,lsalzman
Change to derive from nsDisplayEffectsBase, since the backdrop-filter
can still have a visual bounds (and effect) even if the child
stacking context has no items. Also use the same approach to get
the bounding rect and implement GetBounds as nsDisplayFilters uses.

Differential Revision: https://phabricator.services.mozilla.com/D145295
2022-05-04 19:08:31 +00:00
Emily McDonough
7012139569 Bug 1740366 - Implement paginated fragmentation on page-name boundaries r=dholbert
This has a TODO about empty page names on previous sibling frames, to match
Chrome's behavior of page break coalescing we should be looking to the frame
before that sibling and check for page breaks there instead.

Differential Revision: https://phabricator.services.mozilla.com/D140423
2022-04-28 00:03:19 +00:00
Boris Chiou
ad45a4e14e Bug 1696560 - Apply transferred min & max sizes for flex base size if main is the inline axis. r=dholbert
Basically, the transferred min & max sizes shouldn't override the min &
max sizing properties, so applying it earlier than these properties
should be identical. This just makes the flex base size and main size be
more correct at the beginning (and so other adjustments of sizes
in flex algorithm can override the transferred min/max sizes), for
non-replaced elements.

Note:
In Chromium code, it clamps the flex items' base size by transferred min &
max sizes, but the computation of items' used min & used max sizes doesn't
include the transferred min & max sizes.

So in this patch, I'm trying to make this patch simple: we let minimum &
maximum sizes only taken into account for flex base size and only for
non-replaced elements for now. So the behavior should be similar to other
browsers.

And we may have to update this tentative solution once these spec words get
updated.

Differential Revision: https://phabricator.services.mozilla.com/D144499
2022-04-26 19:31:25 +00:00
Martin Robinson
6b10ffbb17 Bug 1764721 - Content skipped via content-visibility should not be focusable r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143723
2022-04-26 08:35:53 +00:00
David Shin
fa30ed0b4a Bug 1755565 - Implement contain: inline-size. r=emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D143501
2022-04-19 17:44:16 +00:00
Martin Robinson
842c8ed0b0 Bug 1762407 - Do not scroll content with content-visibility: hidden ancestors into view r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D142563
2022-04-07 10:38:27 +00:00
Martin Robinson
ca0375e365 Bug 1761995 - Skip content-visibility: hidden content in display lists r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D142341
2022-04-05 09:10:42 +00:00
Emilio Cobos Álvarez
5faef83506 Bug 1761839 - Allow user-select: none to override modal dialog selectability. r=sefeng
Instead of enforcing it in C++ use a UA rule instead, so that authors
can override it if needed.

Depends on D142582

Differential Revision: https://phabricator.services.mozilla.com/D142583
2022-03-31 19:49:53 +00:00
Emilio Cobos Álvarez
e4291f8aba Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00