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

112 Коммитов

Автор SHA1 Сообщение Дата
Robert Longson 7e65e06613 Bug 1826001 - Change SVGUtils::IsInSVGTextSubtree into a member function on nsIFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D174375
2023-04-02 21:17:07 +00:00
Emilio Cobos Álvarez e18c9b7ad6 Bug 1815552 - Make positioned table parts deal correctly with switching position without being reframed. r=TYLin,layout-reviewers
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.

Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.

Depends on D169127

Differential Revision: https://phabricator.services.mozilla.com/D170969
2023-03-01 19:04:17 +00:00
Cristina Horotan e15f3e3295 Backed out 2 changesets (bug 1815552) for causing Bp-hybrid bustages at ComputedStyle.h on a CLOSED TREE
Backed out changeset da0f9295df91 (bug 1815552)
Backed out changeset cda1ee891058 (bug 1815552)
2023-03-01 16:05:19 +02:00
Emilio Cobos Álvarez 029e62f738 Bug 1815552 - Make positioned table parts deal correctly with switching position without being reframed. r=TYLin,layout-reviewers
While looking at the backout, I noticed table parts relied on reframing
on abspos-container-ness changes in a subtle way, see the test, which
fails with the first patch of this bug applied without these changes.

Make the NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN mean the same for table parts
as for everything else. Instead, keep the registration status on each
relevant frame class individually.

Depends on D169127

Differential Revision: https://phabricator.services.mozilla.com/D170969
2023-03-01 10:36:54 +00:00
Emilio Cobos Álvarez 5302cc0936 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
Ting-Yu Lin b48196dcda Bug 1758018 Part 2 - Add helpers testing only "position:relative", and adapt them at some callsites. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D140274
2022-03-04 03:02:01 +00:00
Ting-Yu Lin 7e0c39f9b1 Bug 1758018 Part 1 - Rename the helpers testing "position:relative" or "position:sticky". r=emilio
`nsIFrame::IsRelativelyPositioned()` tests "position:relative" or
"position:sticky", but its naming is misleading until you've dug into the
underlying helper `nsStyleDisplay::IsRelativelyPositionedStyle()`.

Differential Revision: https://phabricator.services.mozilla.com/D140273
2022-03-04 03:02:00 +00:00
Emilio Cobos Álvarez 9fbc18ca4c Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 17:00:36 +00:00
Butkovits Atila 4d927c1fb4 Backed out 4 changesets (bug 1733384) for causing failures at browser_windowPrompt.js. CLOSED TREE
Backed out changeset fa609fadac26 (bug 1733384)
Backed out changeset dd1936d9fe17 (bug 1733384)
Backed out changeset 1a073e40ab1a (bug 1733384)
Backed out changeset 65708a4c708f (bug 1733384)
2021-10-07 17:52:51 +03:00
Emilio Cobos Álvarez bfdd0fcc77 Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 11:47:34 +00:00
Emilio Cobos Álvarez a64efcd48e Bug 1727709 - Simplify nsMenuPopupFrame mouse transparent handling. r=stransky
Make sure it's always in sync with the style.

Keeping a boolean field was useful when we didn't handle dynamic changes
to it, but now we do it's just redundant, and could cause correctness
issues.

Differential Revision: https://phabricator.services.mozilla.com/D124081
2021-09-01 19:24:39 +00:00
Andi-Bogdan Postelnicu 1cf28e7475 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D115804
2021-05-24 15:08:47 +00:00
Emilio Cobos Álvarez 6fc419fb56 Bug 1707170 - Fix unused variable in opt builds.
MANUAL PUSH: Trivial fixup CLOSED TREE
2021-05-10 15:45:43 +02:00
Emilio Cobos Álvarez c8aa59aaae Bug 1707170 - Will-change should only create stacking contexts / containing blocks / etc if the property it'd change would apply. r=miko
As per https://drafts.csswg.org/css-will-change/#will-change.

> If any non-initial value of a property would cause the element to
> generate a containing block for absolutely positioned elements,
> specifying that property in will-change must cause the element to
> generate a containing block for absolutely positioned elements.

But in this case the transform property wouldn't apply to the element so
there's no reason to create a stacking-context.

Differential Revision: https://phabricator.services.mozilla.com/D114121
2021-05-10 13:09:42 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
Emilio Cobos Álvarez 3b9c28af7a Bug 1256980 - Make z-index only apply to positioned and grid / flex item frames. r=miko,hiro
Differential Revision: https://phabricator.services.mozilla.com/D81557
2020-06-30 22:51:12 +00:00
Emilio Cobos Álvarez 006e5cca66 Bug 1614198 - Use cbindgen instead of nsStyleImage. r=aosmond
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.

But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().

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

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:20 +00:00
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
jeffin143 4298d3f098 Bug 1601990 : convert NS_STYLE_POINTER_EVENTS_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56203

--HG--
extra : moz-landing-system : lando
2019-12-12 10:24:16 +00:00
Emilio Cobos Álvarez 4a3be9604a 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

--HG--
extra : moz-landing-system : lando
2019-12-09 03:32:28 +00:00
Emilio Cobos Álvarez e789ad73c7 Bug 1577745 - Remove dead version of nsStyleDisplay::IsOriginalDisplayInlineOutside. r=mats
SVG Text stuff doesn't support abspos or anything like that, so it's not like it
is useful.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 13:21:42 +00:00
Mats Palmgren 22f32f1001 Bug 1574107 - Remove nsIFrame::IsBlockInside since it's dead code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42088

--HG--
extra : moz-landing-system : lando
2019-08-16 06:29:59 +00:00
Connor Brewster 04d4ece0af Bug 1178765 - Part 3: Add backdrop-filter display items to Gecko r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D39099

--HG--
extra : moz-landing-system : lando
2019-08-13 22:02:57 +00:00
Emilio Cobos Álvarez 0b89333979 Bug 1550554 - Use OwnedSlice for will-change. r=heycam
We could use ArcSlice if wanted I guess, your call. Though will change is not
supposed to be used very frequently.

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

--HG--
extra : moz-landing-system : lando
2019-05-16 23:23:28 +00:00
Emilio Cobos Álvarez 987519e4da Bug 1550554 - Add bindings for box shadows, and remove nsCSSShadowArray and friends. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30547

--HG--
extra : moz-landing-system : lando
2019-05-16 23:04:32 +00:00
Ciure Andrei 00a73f5055 Backed out 17 changesets (bug 1550554, bug 1549593, bug 1551991, bug 1529002) for failing multiple Android tests and Windows 2012 bustages CLOSED TREE
Backed out changeset 3bb3fafa62e2 (bug 1551991)
Backed out changeset e12a979de502 (bug 1551991)
Backed out changeset d81e4aa6bf0c (bug 1551991)
Backed out changeset c354e61f2a34 (bug 1551991)
Backed out changeset 37fd602bebc2 (bug 1551991)
Backed out changeset 6c1f00cc30ca (bug 1551991)
Backed out changeset 8a7a0329bdc3 (bug 1551991)
Backed out changeset 86159475ddd3 (bug 1551991)
Backed out changeset 35f91a9ea82a (bug 1529002)
Backed out changeset 6798155e71dc (bug 1529002)
Backed out changeset b90c2cf5b8c5 (bug 1550554)
Backed out changeset 882ab9868c95 (bug 1550554)
Backed out changeset b28a48e2ed21 (bug 1550554)
Backed out changeset 2c31fe18eefd (bug 1550554)
Backed out changeset 57f2362aa538 (bug 1550554)
Backed out changeset 45f171b26e95 (bug 1550554)
Backed out changeset 2e4b263c9410 (bug 1549593)
2019-05-16 13:17:10 +03:00
Emilio Cobos Álvarez 6634361c43 Bug 1550554 - Use OwnedSlice for will-change. r=heycam
We could use ArcSlice if wanted I guess, your call. Though will change is not
supposed to be used very frequently.

Differential Revision: https://phabricator.services.mozilla.com/D30548
2019-05-16 16:24:31 +02:00
Emilio Cobos Álvarez 0fe081bb39 Bug 1550554 - Add bindings for box shadows, and remove nsCSSShadowArray and friends. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D30547
2019-05-16 16:24:28 +02:00
Emilio Cobos Álvarez 5bf307c2a8 Bug 1535165 - Make the will-change bitfield use cbindgen. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D23414

--HG--
extra : moz-landing-system : lando
2019-03-18 18:08:08 +00:00
Emilio Cobos Álvarez e38aff2db7 Bug 1525134 - Move image loads out of the style struct accessors. r=heycam
After this I can pass the document from the caller to ResolveSameStructsAs, and
get rid of the pres context pointer.

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

--HG--
extra : moz-landing-system : lando
2019-02-05 19:47:29 +00:00
Razvan Maries de782903b2 Backed out changeset 919de32d4905 (bug 1525134) for build bustages. CLOSED TREE 2019-02-05 19:36:46 +02:00
Emilio Cobos Álvarez 3fe47839c0 Bug 1525134 - Move image loads out of the style struct accessors. r=heycam
After this I can pass the document from the caller to ResolveSameStructsAs, and
get rid of the pres context pointer.

Differential Revision: https://phabricator.services.mozilla.com/D18600
2019-02-05 18:07:18 +01:00
Razvan Maries 0b09448bc6 Backed out changeset 992f27cfecac (bug 1525134) for build bustages. CLOSED TREE 2019-02-05 18:54:14 +02:00
Emilio Cobos Álvarez 0996652d1a Bug 1525134 - Move image loads out of the style struct accessors. r=heycam
After this I can pass the document from the caller to
ResolveSameStructsAs, and get rid of the pres context pointer.

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

--HG--
extra : moz-landing-system : lando
2019-02-05 13:45:04 +00:00
Ryan Hunt 3627f69c8f Bug 1305957 part 3 - Add IsStickyPositioned() method to nsStyleDisplay. r=emilio
This commit is used in a later commit to exclude frames that are sticky positioned
from being scroll anchors.

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

--HG--
extra : rebase_source : efa0b81269dbf55d14d5702e4e4d4970cce2e5cb
extra : source : 6b96050386f6e9bae6b61747145e204d12cd7cf3
2018-11-21 22:35:23 -06:00
Bogdan Tara 6d78d1e2c9 Backed out 15 changesets (bug 1305957) for ASAN failures CLOSED TREE
Backed out changeset 4d5eb85d3155 (bug 1305957)
Backed out changeset 51c86d025ecb (bug 1305957)
Backed out changeset d8eef8f3e396 (bug 1305957)
Backed out changeset 950bf6ad1ef2 (bug 1305957)
Backed out changeset b4cb2cbebdb6 (bug 1305957)
Backed out changeset bfca5019a9cc (bug 1305957)
Backed out changeset e76b842c7b7f (bug 1305957)
Backed out changeset d9445a5f3458 (bug 1305957)
Backed out changeset d9052f7b34d9 (bug 1305957)
Backed out changeset e7124fecb721 (bug 1305957)
Backed out changeset bdb766faa867 (bug 1305957)
Backed out changeset 3033401ef320 (bug 1305957)
Backed out changeset 6b96050386f6 (bug 1305957)
Backed out changeset c66c00f73296 (bug 1305957)
Backed out changeset 6bd0bdab93cb (bug 1305957)
2019-01-10 18:49:22 +02:00
Ryan Hunt 1041d94fae Bug 1305957 part 3 - Add IsStickyPositioned() method to nsStyleDisplay. r=emilio
This commit is used in a later commit to exclude frames that are sticky positioned
from being scroll anchors.

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

--HG--
extra : rebase_source : 50cddce18bbc0164bfff70bf00ab698354ede375
extra : histedit_source : 7cad7389e6958d3107e43e5f915139f6682c168d
2018-11-21 22:35:23 -06:00
Daniel Holbert 9b2496feff Bug 1510369 part 1: Make IsFixedPosContainingBlock assert that all fixed-pos CBs must also be abs-pos CBs. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D13131

--HG--
extra : moz-landing-system : lando
2018-12-13 17:46:48 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ryan Hunt 3bb5661553 Bug 1508789 - Force 'pointer-events: auto' used value for root content. r=mstange
It seems that other browsers don't allow 'pointer-events: none' on the root content,
and this can cause us interoperability issues.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 14:16:14 +00:00
Xidorn Quan 33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Morgan Rae Reschenberg f72ce47c36 Bug 1472919 - Establish stacking context, containing block, independent formatting context for contain:layout. r=dbaron
MozReview-Commit-ID: H36HpePX29C

--HG--
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-absolute-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-containing-block-absolute-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-fixed-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-containing-block-fixed-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-formatting-context-float-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-formatting-context-float-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-formatting-context-margin-001-ref.html => layout/reftests/w3c-css/submitted/contain/contain-layout-formatting-context-margin-001-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-formatting-context-margin-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-formatting-context-margin-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-no-principal-box-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-absolute-001-ref.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-002-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-absolute-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-002.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-fixed-001-ref.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-003-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-fixed-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-003.html
extra : rebase_source : d6e53cd496c98949b0b4ecfb96d6a8a5eb4d6635
2018-07-20 10:57:22 -07:00
L. David Baron 5933830a47 Bug 1479859 patch 4 - Test becoming a containing block for contain:paint only for those frames that support it. r=dholbert
This fixes the regression of three web-platform-test reftests:
  testing/web-platform/tests/css/css-contain/contain-paint-002.html
  testing/web-platform/tests/css/css-contain/contain-paint-011.html
  testing/web-platform/tests/css/css-contain/contain-paint-012.html
that was caused by patch 1, but it's written on top of the code in
patches 2 and 3 so it's easier to fix afterwards.

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

--HG--
extra : rebase_source : 030c72d1f2945795afe8a81112cd6cb7035d9d6b
2018-08-07 15:02:08 -07:00
L. David Baron 552f835723 Bug 1479859 patch 2 - Send nsChangeHint_UpdateContainingBlock when containing block-ness changes due to one property change, while another property that might trigger containing block-ness doesn't do so because of the frame type. r=emilio
This fixes a rather subtle bug.  What the underlying code here is trying
to do is remove nsChangeHint_UpdateContainingBlock when some properties
that influence whether a frame is a containing block for absolutely
positioned or fixed positioned elements have changed, but the final
calculation of being a containing block has not changed.  However, the
old code was using a function that tested whether the style could
*possibly* lead to a frame being a containing block.  Some of the
properties (like the transform properties) that lead to being a
containing block, for example, don't apply to non-replaced inlines.
Some, however, do (such as 'filter').  So if there's a dynamic change
adding or removing a filter, on an inline that also has an *ignored*
transform property (like 'transform' or 'perspective') set, then the
code prior to this patch causes us to remove the UpdateContainingBlock
hint.

This patch fixes things by testing whether being a containing block
could have changed for *any* type of frame, by separately testing the
changes.

The added tests fail without the patch and pass with the patch, viewed
in isolation.  However, without the previous patch, test 003 passes.

Test 003 also fails in Chrome (but 001 and 002 pass).

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

--HG--
extra : rebase_source : 0a5dbb15a058cf4a43d989bf53f042c5b718e24d
2018-08-07 15:02:07 -07:00
Emilio Cobos Álvarez de6fa5fd09 Bug 1464060: Remove some unused templating and arguments. r=xidorn
Also don't rely on 'using namespace mozilla' in the cpp files that include
nsStyleStructInlines.h.

MozReview-Commit-ID: DLZiMpSzIFn
2018-05-28 10:40:00 +02:00
Matt Woodrow 95856dac21 Bug 1462412 - Correctly ignore the perspective property for frames that aren't transformable. r=dbaron 2018-05-23 10:41:19 +12:00
Kristen Wright 031610cc8e Bug 1459367 - Convert NS_STYLE_IMAGELAYER_ATTACHMENT_* to enum class. r=manishearth
Converted NS_STYLE_IMAGELAYER_ATTATCHMENT_* vals to enum class, StyleImageLayerAttachment.
2018-05-08 15:05:33 -07:00
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Xidorn Quan 3c6f12cb3a Bug 1449039 part 5 - Remove CSS_PROPERTY_{ABS,FIX}POS_CB constants. r=emilio
MozReview-Commit-ID: 9QZyI1EsJ6l

--HG--
extra : rebase_source : 75aa10ede53d2dd4d6014dfdf6b56b9d13b6d2a5
2018-03-27 11:05:05 +11:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00