Commit Graph
3109 Commits
Author SHA1 Message Date
Alex Henrie 5b412df3c4 Bug 1604394 - Remove dead assignment from nsIFrame::PeekOffset. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D57418
2019-12-17 05:09:00 +00:00
Alex Henrie 94bba66028 Bug 1603995 - Remove dead assignments from nsFrame::BoxReflow. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D57233
2019-12-15 06:23:01 +00:00
jeffin143 d3b5feefb7 Bug 1601990 : convert NS_STYLE_POINTER_EVENTS_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56203
2019-12-12 10:24:16 +00:00
Emilio Cobos Álvarez d761604f5f Bug 1600536 - user-select: auto on input / textarea should behave as text. r=mats
This is covered by existing tests, via the removal of the rule in forms.css

Differential Revision: https://phabricator.services.mozilla.com/D56355
2019-12-09 18:16:57 +00:00
Emilio Cobos Álvarez c1ea9d632b Bug 1596050 - When ignoring document colors, ignore ::selection styles altogether. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D53171
2019-12-09 17:24:06 +00:00
Emilio Cobos Álvarez 1fccbabe09 Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

Differential Revision: https://phabricator.services.mozilla.com/D56306
2019-12-09 03:32:28 +00:00
Gabriele Svelto eeb9bfc398 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443
2019-12-06 09:16:44 +00:00
Hiroyuki Ikezoe 03cf2ccce1 Bug 1593362 - Bail out from nsFrame::HandleDrag if the corresponding nsFrameSelection has been already destroyed. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D56109
2019-12-06 05:43:03 +00:00
jeffin143 608491cf62 Bug 1600481 : convert NS_STYLE_ISOLATION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55378
2019-12-06 04:42:18 +00:00
Coroiu Cristina 90a190ac06 Backed out changeset 6c09d8b07585 (bug 1596050) for reftest failures at layout/reftests/high-contrast/selection-001.html on a CLOSED TREE 2019-12-02 21:29:26 +02:00
Emilio Cobos Álvarez bfb689a2d1 Bug 1596050 - When ignoring document colors, ignore ::selection styles altogether. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D53171
2019-12-02 17:42:35 +00:00
Emilio Cobos Álvarez 3f9cab940b Bug 1597160 - Remove nsChangeHint_UpdateWidgetProperties. r=mstange
:ntim was about to add another widget-affecting property (pointer-events) to
menupopups to replace the mousethrough attribute, see bug 1597120.

But pointer-events is inherited, and thus changing pointer-events on any element
would cause a change list of length == the number of descendants of the element,
which is not amazing.

So I suggested using DidSetComputedStyle instead, as this is fairly
popup-specific, but we may as well be consistent and do the same everywhere.

This removes the code to handle the -moz-window-* properties on the root frame,
as I haven't seen any usage of them (we always set them in panel or menupopup).

Differential Revision: https://phabricator.services.mozilla.com/D53377
2019-11-20 02:37:06 +00:00
James Hooks ba8488e17f Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D51291
2019-11-16 20:59:34 +00:00
Emilio Cobos Álvarez 4f61d0a1b3 Bug 1596768 - Remove GetBindingParent usage in layout. r=smaug
We only use it to escape out of NAC trees for ::selection pseudo-element.

Differential Revision: https://phabricator.services.mozilla.com/D53216
2019-11-15 16:18:06 +00:00
Ting-Yu Lin bd54ded89f Bug 1596339 Part 6 - Use ToString() on nsPoint and nsSize in frame tree dump. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D52967
2019-11-15 03:59:28 +00:00
Ting-Yu Lin 59090d73dd Bug 1596339 Part 5 - Use ToString() on nsRect in frame tree dump. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D52966
2019-11-15 03:52:14 +00:00
Ting-Yu Lin 5f3ec28dc0 Bug 1596339 Part 3 - Implement operator<< for LogicalSize, and use it in frame tree dump. r=dholbert
Note: The output format of BaseSize is "3 x 5", so a pair of parentheses
is added around %s in "logical-size=(%s)" to make it looks better.

Differential Revision: https://phabricator.services.mozilla.com/D52964
2019-11-15 04:49:27 +00:00
Ting-Yu Lin 661474d8d1 Bug 1596339 Part 2 - Implement operator<< for LogicalRect, and use it in frame tree dump. r=dholbert
This change uses parentheses, i.e. '(' and ')', to enclose the dimension
of LogicalRect. This match the output of BaseRect's operator<<.

Note: This introduces inconsistency in the frame tree dump because some
of the output format still use braces to enclose the data. But in later
patches, I'll gradually change the format to use parentheses.

Differential Revision: https://phabricator.services.mozilla.com/D52963
2019-11-15 03:51:56 +00:00
Ting-Yu Lin 055c7552c1 Bug 1596339 Part 1 - Implement operator<< for WritingMode, and use it in frame tree dump. r=dholbert
WritingMode.h already depends on ostream header implicitly via
nsBidiUtils.h -> nsString.h. For completeness, I still add #include
<ostream>.

While I'm here, I make the format of debug prints in nsLineBox more
consistent with the counter-part in nsFrame. Some of them will be
revised in the later patches.

Differential Revision: https://phabricator.services.mozilla.com/D52962
2019-11-15 03:51:54 +00:00
Boris Chiou ec0567a623 Bug 1484780 - Cache gfx::Path to avoid building and flattening path at each restyle cycle. r=heycam
In most cases, we run an animation on an object by changing its
offset-distance/offset-rotate, but keep its offset-path the same.
Building and flattening the path is sometime expensive, especially for
large path, so caching it makes sense to us and have a significant
performance improvement. This is for the main thread motion path
animations.

Note: Even though we support compositor animations for motion path,
nsIFrame::GetTransformMatrix() is still called during the animations for
other usages, so we may still build the gfx::Path on the main thread
without this patch, so this improvement becomes necessary for most cases.

Differential Revision: https://phabricator.services.mozilla.com/D46667
2019-11-07 03:17:58 +00:00
Boris Chiou 8d68be5653 Bug 1592787 - Don't run compositor animations if offset-path is not animating and is none. r=hiro
So, we don't create a stacking context for this case. Besides, we also
make sure FindAnimationsForCompositor() work properly for motion-path if
offset-path is not effective (i.e. none and no animations).

Differential Revision: https://phabricator.services.mozilla.com/D51895
2019-11-06 20:17:07 +00:00
Emilio Cobos Álvarez 83b1a9e41d Bug 1590550 - Don't do the "simple display list" optimization when we have overflow clips. r=mattwoodrow
The previous code tried to do it, but it did it wrongly, as the overflow clip
comes from the parent, not the child.

Thus when we change a style that influences it, we weren't invalidating the
SIMPLE_DISPLAY_LIST bit, and such.

Make the reftest that caught this fail more reliable.

Differential Revision: https://phabricator.services.mozilla.com/D51805
2019-11-06 12:17:26 +00:00
Emilio Cobos Álvarez c6153f3d3a Bug 1590550 - Don't apply contain: paint inappropriately. r=mattwoodrow
This fixes css/css-contain/contain-paint-{002,012,024}.html when not using the
fast path (i.e., with the following patch).

Also invert the check in IsStackingContext as IsFrameOfType is a virtual method,
and IsContain* is just a bitflag.

Differential Revision: https://phabricator.services.mozilla.com/D51804
2019-11-06 12:10:34 +00:00
Narcis Beleuzu 01d8959d52 Backed out 2 changesets (bug 1590550) for wr failures on contain-paint-025.html . CLOSED TREE
Backed out changeset 6400ccbce0a2 (bug 1590550)
Backed out changeset 2248bd863a26 (bug 1590550)
2019-11-06 03:52:41 +02:00
Emilio Cobos Álvarez 62c766577d Bug 1590550 - Don't do the "simple display list" optimization when we have overflow clips. r=mattwoodrow
The previous code tried to do it, but it did it wrongly, as the overflow clip
comes from the parent, not the child.

Thus when we change a style that influences it, we weren't invalidating the
SIMPLE_DISPLAY_LIST bit, and such.

Make the reftest that caught this fail more reliable.

Differential Revision: https://phabricator.services.mozilla.com/D51805
2019-11-05 20:55:40 +00:00
Emilio Cobos Álvarez 761268c37e Bug 1590550 - Don't apply contain: paint inappropriately. r=mattwoodrow
This fixes css/css-contain/contain-paint-{002,012,024}.html when not using the
fast path (i.e., with the following patch).

Also invert the check in IsStackingContext as IsFrameOfType is a virtual method,
and IsContain* is just a bitflag.

Differential Revision: https://phabricator.services.mozilla.com/D51804
2019-11-05 22:26:38 +00:00
alaskanemily 5c30d7831a Bug 1588017 - Clean up nsIFrame::IntrinsicISizeOffsetData r=TYLin,dholbert
Update the comments, name, and fields to show it is agnostic of isize/bsize.

Differential Revision: https://phabricator.services.mozilla.com/D51739
2019-11-05 18:52:03 +00:00
Csoregi Natalia e4cb05795c Backed out changeset e75d9dbb4853 (bug 1590550) for reftest failures on contain-paint-clip-001.html . CLOSED TREE 2019-11-04 23:38:56 +02:00
Emilio Cobos Álvarez 0088918f2c Bug 1590550 - Don't do the "simple display list" optimization when we have overflow clips. r=mattwoodrow
The previous code tried to do it, but it did it wrongly, as the overflow clip
comes from the parent, not the child.

Thus when we change a style that influences it, we weren't invalidating the
SIMPLE_DISPLAY_LIST bit, and such.

Make the reftest that caught this fail more reliable.

Differential Revision: https://phabricator.services.mozilla.com/D51683
2019-11-04 19:30:24 +00:00
Emilio Cobos Álvarez 6d62ed1ab8 Bug 1591282 - Display carets in the outline list, so that descendant backgrounds don't occlude it. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D50701
2019-10-29 04:30:54 +00:00
Ting-Yu Lin 09f346351c Bug 1588025 - Make the custom content container a font inflation root. r=emilio
font-inflation-1e.html is adapted from font-inflation-1a.html with the
writing-mode set on <html> instead of <body>. It can trigger the
assertion "current writing mode should match that of our flow root" in
nsFontInflationData::FindFontInflationDataFor().

The root cause is: nsCanvasFrame can generate the position:absolute
custom content container to contain elements like AccessibleCaret. When
the container is constructed, the container's writing-mode is always
horizontal-rl, which is getting from nsCanvasFrame that uses
ViewportFrame's style.

If <html> has a vertical writing-mode, custom content container's used
mWritingMode becomes orthogonal to ViewportFrame, because <html>'s used
mWritingMode is propagated all the way up to ViewportFrame.

This patch solves the above issue by making the custom content container
a font inflation root, so FindFontInflationDataFor() stops at it instead
of finding all the way up to the ViewportFrame.

Differential Revision: https://phabricator.services.mozilla.com/D48942
2019-10-28 20:42:06 +00:00
Ting-Yu Lin 1714657884 Bug 1591546 Part 1 - Add WritingMode::IsBidiRTL(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D50771
2019-10-28 09:33:05 +00:00
Miko Mynttinen 3f5b05efbf Bug 1567889 - Part 3: Cleanup will change budgeting r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38853
2019-10-28 14:11:45 +00:00
Miko Mynttinen 605061ed09 Bug 1567889 - Part 2: Avoid will-change budget lookups if the frame does not have the will-change bit set r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38852
2019-10-28 14:11:26 +00:00
Daniel Holbert bee0f244b9 Bug 1590639 part 1: Fix non-unified build issues in layout/generic. r=TYLin
The issues fall into these categories:
 - Files that used StaticPrefs::layout_XYZ() API or gfxVars::XYZ that needed an
   include. (Addressed by adding the missing include.)
 - Files that use mozilla::dom::XYZ or mozilla::gfx::XYZ without qualifying the
   namespace & without a 'using' decl. (Addressed by adding "using".)
 - A few other includes for types/inlines that were used without their header.

Depends on D50162

Differential Revision: https://phabricator.services.mozilla.com/D50163
2019-10-23 22:05:22 +00:00
Emilio Cobos Álvarez b560263d99 Bug 1581467 - Fix checks for display: inline{,-block} which don't account for inline list items. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D48346
2019-10-12 21:05:16 +00:00
Ting-Yu Lin 5fefff9390 Bug 1102175 Part 1 - Propagate used writing-mode from body element to its ancestors. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D45481
2019-10-10 04:44:44 +00:00
Emilio Cobos Álvarez e4f3b429e1 Bug 1513282 - Don't crash in some first-line + display: contents edge cases. r=heycam
... where we've lost track of the display: contents style already since the
ancestor has become display: none, but the first-line belongs to a higher
ancestor that hasn't. Pretty nasty.

Differential Revision: https://phabricator.services.mozilla.com/D48368
2019-10-11 08:11:27 +00:00
Emilio Cobos Álvarez f9ac927de1 Bug 1587661 - Really minor cleanup to the scroll anchoring suppression code. r=dholbert
Should have no behavior change, just moving the code a bit together.

Differential Revision: https://phabricator.services.mozilla.com/D48792
2019-10-10 07:06:08 +00:00
Gurzau Raul 1b7047f374 Backed out 4 changesets (bug 1102175) for Android reftest failures at font-inflation-1a.html
Backed out changeset 33914610f60f (bug 1102175)
Backed out changeset 004a0cb8af9f (bug 1102175)
Backed out changeset 2ac28b335c3c (bug 1102175)
Backed out changeset 50b041e06f23 (bug 1102175)
2019-10-10 07:40:38 +03:00
Ting-Yu Lin 07000ca10b Bug 1102175 Part 1 - Propagate used writing-mode from body element to its ancestors. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D45481
2019-10-09 22:11:02 +00:00
Matt Woodrow 2c0a970e4e Bug 1580738 - Generate unique per-frame-keys for all nsDisplayOwnLayer call sites. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D47673
2019-09-30 21:01:20 +00:00
Emilio Cobos Álvarez 7c1349401b Bug 1584285 - Add a pref to disable scroll anchoring suppression triggers on Nightly. r=dholbert
I think most of them should not be needed after bug 1561450. From our discussion
at TPAC in https://github.com/w3c/csswg-drafts/issues/4239, there should be no
reason not to do this unless we find fallout.

We need to enable the pref in tests that test these particular heuristics of
course.

Differential Revision: https://phabricator.services.mozilla.com/D47315
2019-09-26 18:57:52 +00:00
Cameron McCormack d8273089ee Bug 1482778 - Include captions within table outlines. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D45802
2019-09-22 23:42:04 +00:00
Botond Ballo 29206c258d Bug 1578777 - Use UsesSVGEffectsNotSupportedInCompositor() in ShouldBuildScrollInfoItemsForHoisting(). r=tnikkel
This required replacing nsDisplayListBuilder::mSVGEffectsBuildingDepth with
a stack of the SVG effects frames that we're currently building inside.

Depends on D46063

Differential Revision: https://phabricator.services.mozilla.com/D46064
2019-09-17 00:06:30 +00:00
Andrew Osmond 985dac6203 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

Differential Revision: https://phabricator.services.mozilla.com/D45058
2019-09-14 16:17:04 +00:00
Ciure Andrei c5f80130da Backed out 6 changesets (bug 1574493) for causing nested-sticky-2.html to perma fail CLOSED TREE
Backed out changeset 358746636448 (bug 1574493)
Backed out changeset 34aef5498237 (bug 1574493)
Backed out changeset 1f88e2031c76 (bug 1574493)
Backed out changeset 07c588b5ea10 (bug 1574493)
Backed out changeset 0685e8d3510e (bug 1574493)
Backed out changeset 15d4390220c4 (bug 1574493)
2019-09-13 19:26:50 +03:00
Andrew Osmond 56529c6d35 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

Differential Revision: https://phabricator.services.mozilla.com/D45058
2019-09-13 14:03:23 +00:00
Ciure Andrei 604db60afa Backed out 6 changesets (bug 1574493) for causing nested-sticky-1.html to perma fail CLOSED TREE
Backed out changeset fdc25a90b0ef (bug 1574493)
Backed out changeset 0ce3c48c1f79 (bug 1574493)
Backed out changeset 326b9f96614b (bug 1574493)
Backed out changeset b0817c0aee77 (bug 1574493)
Backed out changeset 70d99c264df9 (bug 1574493)
Backed out changeset e5217ab4b668 (bug 1574493)
2019-09-13 16:17:47 +03:00
Andrew Osmond b46396996b Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

Differential Revision: https://phabricator.services.mozilla.com/D45058
2019-09-13 10:48:31 +00:00