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

17078 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 53e865c922 Bug 1614198 - Make CachedBorderImageData a frame property. r=aosmond
Storing it in the style value doesn't make much sense, specially since we store
drawing-dependent stuff there like the svg viewport size, which clearly depends
on the size of the frame.

This cache may not be very useful anymore, see the linked bug, but this unblocks
me with other style system cleanups and seems safer.

Differential Revision: https://phabricator.services.mozilla.com/D62162

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:05 +00:00
Timothy Nikkel 9f865561a5 Bug 1614550. Don't ifdef nsDisplayCanvasBackgroundColor::WriteDebugInfo on MOZ_DUMP_PAINTING. r=miko
All the other WriteDebugInfo are not ifdef'd.

Differential Revision: https://phabricator.services.mozilla.com/D62401

--HG--
extra : moz-landing-system : lando
2020-02-11 12:17:34 +00:00
Mirko Brodesser 4a2c7022b1 Bug 1613378: part 6) Remove copy&pasted `IsValidSelectionPoint` function. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62039

--HG--
extra : moz-landing-system : lando
2020-02-11 10:50:57 +00:00
Brindusan Cristian a68356b907 Backed out 5 changesets (bug 1613378) for mochitest failures at test_general.html. CLOSED TREE
Backed out changeset f38b806ee78b (bug 1613378)
Backed out changeset cee4bbabc4b5 (bug 1613378)
Backed out changeset e3a2ab6d7267 (bug 1613378)
Backed out changeset 6fe76439f1d3 (bug 1613378)
Backed out changeset f3baf3407cbe (bug 1613378)
2020-02-11 12:27:49 +02:00
Mirko Brodesser dd99b9338c Bug 1613378: part 6) Remove copy&pasted `IsValidSelectionPoint` function. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62039

--HG--
extra : moz-landing-system : lando
2020-02-10 13:25:03 +00:00
Hiroyuki Ikezoe d4fa8f4fad Bug 1599795 - Change the remote document rect to size in gfx. r=emilio
What we really needed in the first place was the size not the rect.

Differential Revision: https://phabricator.services.mozilla.com/D62215

--HG--
extra : moz-landing-system : lando
2020-02-11 03:57:14 +00:00
Emilio Cobos Álvarez 49abab29a5 Bug 1614208 - Remove nsStyleConsts usage from TextRange.h. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D62172

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:12 +00:00
Emilio Cobos Álvarez b997cfcaf4 Bug 1614208 - Stop including PresShell.h and nsPresContext.h from Element.h. r=smaug
nsPresContext.h is only used for unit conversion, which can be done by Units.h
in a similar fashion.

PresShell.h was needed for some capturing-content stuff which can be moved out
of line.

Differential Revision: https://phabricator.services.mozilla.com/D62170

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:12 +00:00
Emilio Cobos Álvarez 298c598770 Bug 1614208 - Forward-declare StaticPresData in nsPresContext.h. r=jfkthame
This avoids including nsFont.h and a bunch of other stuff in nsPresContext.h

Differential Revision: https://phabricator.services.mozilla.com/D62166

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:37 +00:00
Emilio Cobos Álvarez d7841a5f17 Bug 1614208 - Remove some include dependencies in nsStyleConsts.h. r=jfkthame,jgilbert
We include it everywhere because it's included from gfxTypes.h.

This should avoid including all the generated bindings _everywhere_.

Differential Revision: https://phabricator.services.mozilla.com/D62174

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:37 +00:00
Mirko Brodesser ce8bf8cde1 Bug 1613378: part 4) Declare some methods in `nsFrameSelection` static. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62037

--HG--
extra : moz-landing-system : lando
2020-02-07 16:13:27 +00:00
Ting-Yu Lin 9855c6722f Bug 1614082 Part 4 - Add spec links to steps in the flex layout algorithm. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D62134

--HG--
extra : moz-landing-system : lando
2020-02-08 03:57:45 +00:00
Ting-Yu Lin 475a216245 Bug 1614082 Part 3 - Fix static-analysis nits in nsFlexContainerFrame.cpp. r=dholbert
This patch is generated via
`./mach static-analysis check -f layout/generic/nsFlexContainerFrame.cpp` and
`./mach clang-format`.

Differential Revision: https://phabricator.services.mozilla.com/D62133

--HG--
extra : moz-landing-system : lando
2020-02-08 03:58:02 +00:00
Ting-Yu Lin d961c6d216 Bug 1614082 Part 2 - Rename nsStyleDisplay argument on ShouldUseMozBoxCollapseBehavior() to match its declaration in the header. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D62132

--HG--
extra : moz-landing-system : lando
2020-02-08 03:58:10 +00:00
Ting-Yu Lin fe439623bc Bug 1614082 Part 1 - Remove unused axis tracker arguments from FlexItem methods. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D62131

--HG--
extra : moz-landing-system : lando
2020-02-08 02:45:11 +00:00
Emilio Cobos Álvarez 8ce4456bc5 Bug 1606628 - Fix background and border image association to be symmetric. r=tnikkel
And add an assertion to ensure callers get it right. The only thing that needs
it AFAICT is the canvas frame background, so remove the border-image caller...

Differential Revision: https://phabricator.services.mozilla.com/D61950

--HG--
extra : moz-landing-system : lando
2020-02-07 20:36:34 +00:00
Emilio Cobos Álvarez 374cabd6e7 Bug 1606628 - Remove nsStyleImageRequest. r=tnikkel,heycam
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).

That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.

This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.

It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.

The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.

Differential Revision: https://phabricator.services.mozilla.com/D58519

--HG--
extra : moz-landing-system : lando
2020-02-07 20:36:34 +00:00
Ting-Yu Lin c26c7aeb90 Bug 1613380 - Use FlexboxAxisTracker's main axis to initialize strut FlexItem's mMainAxis. r=dholbert
Annotate optiontext.html for Android as slightly fuzzy, to account for
reftest rebucketing fuzzy-failure fallout. It has 0 in the lower bound
of the fuzzy annotation because not every Android has this
fuzzy-failure.

Meanwhile, bug453105.html no longer fails due to reftest rebucketing, so
I remove its fuzzy annotation.

Differential Revision: https://phabricator.services.mozilla.com/D61877

--HG--
extra : moz-landing-system : lando
2020-02-07 18:53:28 +00:00
Emilio Cobos Álvarez 61d0c10572 Bug 1613490 - Cleanup usage of ReferenceBox. r=miko
To avoid computing transform bounds over and over. It is generally just better.

Replace the various "overridebounds" thingies by using the "fallback" of the
transform-reference-box code which we need anyway.

Differential Revision: https://phabricator.services.mozilla.com/D61890

--HG--
extra : moz-landing-system : lando
2020-02-07 13:34:42 +00:00
Miko Mynttinen ad2536665d Bug 1612895 - Rename nsDisplayHitTestInfoItem to nsDisplayHitTestInfoBase r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61472

--HG--
extra : moz-landing-system : lando
2020-02-04 22:01:48 +00:00
Miko Mynttinen 448bd0baea Bug 1612318 - Use nsDisplayEventReceiver for main thread hit testing instead of nsDisplayBackgroundColor r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61471

--HG--
extra : moz-landing-system : lando
2020-02-04 22:01:00 +00:00
Thomas Dolezal 062c15357a Bug 1611733 - Bug 1611633 - convert ns style position defines to enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61958

--HG--
extra : moz-landing-system : lando
2020-02-07 12:35:30 +00:00
Mirko Brodesser 6c8a08fecb Bug 1613378: part 2) Remove unnecessary dependency from `nsFrameSelection::GetCellLayout` to `mPresShell` and declare it static. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61692

--HG--
extra : moz-landing-system : lando
2020-02-07 09:24:43 +00:00
Bogdan Tara e0728bbf97 Backed out changeset 7dc1fd3fa679 (bug 1613380) for optiontext.html failures CLOSED TREE 2020-02-07 07:31:19 +02:00
Ting-Yu Lin b7d5c92a10 Bug 1613732 Part 3 - Use logical ReflowChild() and FinishReflowChild() to do "measuring reflow" of flex items. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D61887

--HG--
extra : moz-landing-system : lando
2020-02-07 04:17:35 +00:00
Ting-Yu Lin bb0d044a16 Bug 1613732 Part 2 - Remove unused ReflowChildFlags::NoVisibility. r=dholbert
This bit is set, but no function uses it.

Differential Revision: https://phabricator.services.mozilla.com/D61886

--HG--
extra : moz-landing-system : lando
2020-02-07 04:17:33 +00:00
Ting-Yu Lin e50292bfb5 Bug 1613732 Part 1 - Revise documentation for ReflowChildFlags, ReflowChild(), and FinishReflowChild(). r=dholbert
The entire comment deleted in nsContainerFrame.cpp belongs to
FinishReflowChild(), which is already documented in the header.

Change `aChildFrame` to `aKidFrame` for ReflowChild() to match its
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D61885

--HG--
extra : moz-landing-system : lando
2020-02-07 04:17:30 +00:00
Daniel Holbert a4b224a290 Bug 1541095: Remove an unnecessary static_cast in WritingModes.h. r=TYLin
The variables involved in the bitwise arithmetic are all of type uint8_t, so
we end up with that type automatically (no need to bother with a static_cast).

Note that we *do* need to declare the type (we can't use `auto`, or else
the compiler wants to upgrade the local variable to have a wider type --
"int", I think -- and that then produces an build warning when we pass
that variable as a uint8_t param further down).

Differential Revision: https://phabricator.services.mozilla.com/D61893

--HG--
extra : moz-landing-system : lando
2020-02-07 00:39:28 +00:00
Ting-Yu Lin 8a678ca086 Bug 1613380 - Use FlexboxAxisTracker's main axis to initialize strut FlexItem's mMainAxis. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D61877

--HG--
extra : moz-landing-system : lando
2020-02-06 23:33:24 +00:00
Mihai Alexandru Michis 823e8c21f1 Backed out changeset c9f4dd3ed78b (bug 1606628) for causing failures in ImageLoader.cpp
CLOSED TREE
2020-02-06 23:19:55 +02:00
Emilio Cobos Álvarez 77c6b3e983 Bug 1606628 - Remove nsStyleImageRequest. r=tnikkel,heycam
This removes nsStyleImageRequest by moving the load state to LoadData instead
(where other lazy state like the resolved URL and load id lives).

That way we can use cbindgen for more stuff (there's no blocker for using it for
all images now), and we can undo the image tracking shenanigans that I had to do
in bug 1605803 in nsImageFrame.

This removes the mDocGroup member because well, there's no real upside of that
now that quantum DOM is not a thing.

It also removes the static clones of the image requests, and the need for each
computed value instance to have its own request. These were needed because we
needed the image loader for the particular document to observe the image
changes. But we were also tracking the request -> loader for other purposes.
Instead, Now all the images get loaded with GlobalImageObserver as a listener,
which looks in the image map and forwards the notification to all the interested
loaders instead dynamically.

The style value is only responsible to load the image, and no longer tracks /
locks it. Instead, the loader does so, via the image tracker.

Differential Revision: https://phabricator.services.mozilla.com/D58519

--HG--
extra : moz-landing-system : lando
2020-02-06 20:32:59 +00:00
Emilio Cobos Álvarez 69c87f6cb2 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

Differential Revision: https://phabricator.services.mozilla.com/D61768

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez c5c0ef9787 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

Differential Revision: https://phabricator.services.mozilla.com/D61764

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez bf6256b1fc Bug 1613349 - Make nsIFrame::TakeProperty MOZ_MUST_USE. r=dholbert
Depends on D61756

Differential Revision: https://phabricator.services.mozilla.com/D61757

--HG--
extra : moz-landing-system : lando
2020-02-06 00:39:10 +00:00
Emilio Cobos Álvarez bba367ec8f Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

Differential Revision: https://phabricator.services.mozilla.com/D61755

--HG--
extra : moz-landing-system : lando
2020-02-06 00:13:38 +00:00
Emilio Cobos Álvarez c413ac1229 Bug 1613572 - Restore the meaning of text-decoration-thickness: auto. r=jfkthame
While using always the underline thickness seemed ok when I reviewed the
regressing bug, it seems it's not always fine to use the font-provided value.

At least I see the same thing as
https://bugzilla.mozilla.org/show_bug.cgi?id=1613285#c0 it in two different
(though similarly configured, in fairness) Linux machines.

Keep `auto` meaning the slightly different thing that it used to mean, and use
`from-font` for the underline thickness (though there's at least one case where
`from-font` could maybe be the `strikeOutSize`... wdyt?).

In particular, for spell-checking markers, we have a somewhat bespoke
`ComputeSelectionUnderlineHeight`...

Differential Revision: https://phabricator.services.mozilla.com/D61781

--HG--
extra : moz-landing-system : lando
2020-02-06 08:41:54 +00:00
Boris Zbarsky 4c46b448a8 Bug 1611993. nsImageBoxFrame should not UpdateImage when it's not safe to run script. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61718

--HG--
extra : moz-landing-system : lando
2020-02-05 23:14:37 +00:00
Daniel Holbert bf616e9f11 Bug 1613198: Move inline impls for nsIFrame::GetNormalPosition and GetLogicalNormalPosition into nsIFrameInlines.h. r=jfkthame
Also, add an nsIFrameInlines.h include to all .cpp files who call these APIs
and who don't yet have an include for this header.

Differential Revision: https://phabricator.services.mozilla.com/D61615

--HG--
extra : moz-landing-system : lando
2020-02-05 09:52:35 +00:00
Emilio Cobos Álvarez 4ce82f5a4c Bug 1613285 - Reintroduce the skip-ink mitigation lost during bug 1612822. r=jfkthame
I should've caught this during review, sorry :(

Differential Revision: https://phabricator.services.mozilla.com/D61649

--HG--
extra : moz-landing-system : lando
2020-02-05 16:14:57 +00:00
Mirko Brodesser a205cfcd91 Bug 1613071: rename `RangeData` to `StyledRange` and move it to separate file. r=smaug
Breaks the dependency from Selection.h. Allows reuse for Selection
across the Shadow DOM boundary, which will require styled ranges to be
stored in `DocumentOrShadowRoot` too.

Differential Revision: https://phabricator.services.mozilla.com/D61549

--HG--
extra : moz-landing-system : lando
2020-02-05 09:12:23 +00:00
Emilio Cobos Álvarez 610d79f6ea Bug 1611462 - Use DeleteProperty rather than RemoveProperty to avoid leaking. CLOSED TREE
MANUAL PUSH: LSAN failures.

--HG--
extra : amend_source : e647b5a819ca876e63d1e6fea5be1ea8c9dfbef1
2020-02-05 00:40:14 +01:00
Ting-Yu Lin a61421c269 Bug 1612401 - Prevent absolute-positioned children from contributing gap size to flexbox's inline-size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D61622

--HG--
extra : moz-landing-system : lando
2020-02-04 21:34:18 +00:00
Ting-Yu Lin ade0bafa9a Bug 1230378 - Add a crashtest. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D61593

--HG--
extra : moz-landing-system : lando
2020-02-04 21:41:15 +00:00
Emilio Cobos Álvarez 09932803bc Bug 1611462 - Optimize position changes better. r=dholbert
When our position changes from / to absolute / fixed, then we need to reframe
(most likely, at least). But in some easier cases we can just live with a reflow
plus (optionally) a containing-block update or a repaint, depending on the case.

We need to delete the normal position property when this happens and we switch
from static to relative/sticky, and also need to update the handling of
UpdateContainingBlock to avoid making decisions based on position not changing.

This will actually not cause more reframes, as one would expect, because that
optimization became somewhat obsolete by bug 1519371 (which made the
optimization exact).

Differential Revision: https://phabricator.services.mozilla.com/D61142

--HG--
extra : moz-landing-system : lando
2020-02-04 21:20:34 +00:00
Daniel Holbert ae192ec3a5 Bug 1613192: Fix non-unified build bustage in layout/{base,generic} directories. r=TYLin
Summary of the changes/reasons:

- LayoutTelemetryTools.h directly uses several types whose headers it needs to
  include. (These includes were present in its .cpp file; I'm migrating them
  from there to the .h file, and I'm adding a new include for "Saturate.h" to
  provide the SaturateUint8 type.)

- LayoutTelemetryTools.cpp needs an include for MainThreadUtils.h, to provide
  NS_IsMainThread().

- StaticPresData.cpp needs an include for ServoUtils.h, to provide
  AssertIsMainThreadOrServoFontMetricsLocked().

- ZoomConstraintsClient.h needs a forward-decl for mozilla::dom::Document since
  it uses a pointer of that type in a function-decl.

- ScrollSnap.h needs forward-decls of nsPoint/nsRect for some references to
  those types in a method signature.

- nsGridContainerFrame.cpp needs an include for nsBoxLayoutState.h since it
  uses that type (it instantiates a nsBoxLayoutState instance).

- nsPlaceholderFrame.cpp needs a "using" decl for the mozilla::dom namespace in
  order to use the un-namespace-prefixed "Element" type.

Differential Revision: https://phabricator.services.mozilla.com/D61603

--HG--
extra : moz-landing-system : lando
2020-02-04 19:34:51 +00:00
Kousuke Takaki b03e71473c Bug 1613094 - The parameter 'aStartPos' should use const reference. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61585

--HG--
extra : moz-landing-system : lando
2020-02-04 16:11:21 +00:00
Christian Holler 71231ac083 Bug 1612707 - Disable various slow tests under TSan. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D61562

--HG--
extra : moz-landing-system : lando
2020-02-04 14:34:07 +00:00
Cosmin Sabou 8833c36c14 Backed out changeset 6c68992f760e (bug 1613071) for build bustages on XPathGenerator.cpp
CLOSED TREE
2020-02-04 16:40:28 +02:00
Mirko Brodesser b6e8bf3ef9 Bug 1613071: rename `RangeData` to `StyledRange` and move it to separate file. r=smaug
Breaks the dependency from Selection.h. Allows reuse for Selection
across the Shadow DOM boundary, which will require styled ranges to be
stored in `DocumentOrShadowRoot` too.

Differential Revision: https://phabricator.services.mozilla.com/D61549

--HG--
extra : moz-landing-system : lando
2020-02-04 14:14:03 +00:00
Ting-Yu Lin 22ea8326d7 Bug 1610670 - Add AllPhysicalHalfCorners() to support range-based for loops. r=mats
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.
3. Add brackets for the for loop in nsCSSRendering.cpp.

```

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "NS_FOR_CSS_HALF_CORNERS\(i\)" "for (const auto i : mozilla::AllPhysicalHalfCorners())"
rename "NS_FOR_CSS_HALF_CORNERS\(corner\)" "for (const auto corner : mozilla::AllPhysicalHalfCorners())"
```

Differential Revision: https://phabricator.services.mozilla.com/D61252

--HG--
extra : moz-landing-system : lando
2020-02-04 03:28:47 +00:00