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

55 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez c3325072d0 Bug 1567094 - Make GetVisitedDependentColor const-friendly. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D41934

--HG--
extra : moz-landing-system : lando
2019-08-15 03:01:01 +00:00
Cameron McCormack 9bbe5b00a3 Bug 1554571 - Part 3: Cache computed styles of scrollbar part anonymous content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33123

--HG--
extra : moz-landing-system : lando
2019-06-27 07:22:22 +00:00
Mihai Alexandru Michis b485399185 Backed out 4 changesets (bug 1554571) for causing failures in minimal-xul.css
Backed out changeset 1cc4e6374b8a (bug 1554571)
Backed out changeset 30728685499e (bug 1554571)
Backed out changeset c14e9c381345 (bug 1554571)
Backed out changeset a2143551d7bc (bug 1554571)

--HG--
extra : rebase_source : 4b4442d96eb40e57b0a9834b4048b11f9be1a964
2019-06-27 07:09:55 +03:00
Cameron McCormack 8538a62557 Bug 1554571 - Part 3: Cache computed styles of scrollbar part anonymous content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D33123

--HG--
extra : moz-landing-system : lando
2019-06-27 00:25:03 +00:00
Emilio Cobos Álvarez 980074a5b2 Bug 1544242 - Cleanup selector-matching for nested pseudo-elements, match ::slotted correctly when there's no selector before it, and add tests. r=heycam,mats
D29542 fixed the bogus checks that was making nested pseudo-elements match
author rules. This adds tests and ends up being just a cleanup, though as it
turns out we it also fixes an issue with ::slotted() matched from
Element.matches.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 01:09:15 +00:00
Noemi Erli f1ef21cbc7 Backed out changeset 8c89fd37b79d (bug 1544242) for failures in browser_rules_shadowdom_slot_rules.js CLOSED TREE 2019-05-01 22:03:06 +03:00
Emilio Cobos Álvarez fb5b637f4f Bug 1544242 - Fix selector-matching for nested pseudo-elements. r=heycam,mats
We always include the combinator for pseudo-elements now (not including it was
just an optimization) in order to not match when nested pseudo-elements are
involved.

We could add a more generic check in `matches_simple_selector` like:

```
if element.is_pseudo_element() {
    match *selector {
        Component::PseudoElement(..) |
        Component::NonTSPseudoClass(..) => {},
        _ => return false,
    }
}
```

But even that wouldn't be enough to make selectors like `:hover::marker` not
match on the `::before::marker` pseudo-element, plus that code is really hot.

So for now do the check on the `next_element_for_combinator` function. It's a
bit hacky but it's the best I could came up with...

While at it, simplify some checks to use is_pseudo_element() instead of
implemented_pseudo_element() directly.

Only the Rust patch as-is would make markers for ::before and ::after on list
items not show up, so we also need to switch ::marker to use ProbeMarkerStyle()
rather than ProbePseudoElementStyle(), since the marker should exist even if it
matches no rules.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:19:08 +00:00
Masayuki Nakano f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Emilio Cobos Álvarez 68aa7a9c80 Bug 1541546 - Use only the new name for StyleColor. r=heycam
That is, change all uses of StyleComplexColor to just StyleColor.

Differential Revision: https://phabricator.services.mozilla.com/D25977
2019-04-04 14:53:47 +02:00
Cosmin Sabou 8731816b89 Backed out 3 changesets (bug 1541546) for causing build bustages. CLOSED TREE
Backed out changeset 895863144707 (bug 1541546)
Backed out changeset 4da6fb98e8f9 (bug 1541546)
Backed out changeset ba71816514eb (bug 1541546)

--HG--
rename : layout/style/StyleColor.cpp => layout/style/StyleComplexColor.cpp
rename : layout/style/StyleColorInlines.h => layout/style/StyleComplexColor.h
2019-04-04 15:04:25 +03:00
Emilio Cobos Álvarez 271376a85f Bug 1541546 - Use only the new name for StyleColor. r=heycam
That is, change all uses of StyleComplexColor to just StyleColor.

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

--HG--
rename : layout/style/StyleComplexColor.cpp => layout/style/StyleColor.cpp
rename : layout/style/StyleComplexColor.h => layout/style/StyleColorInlines.h
extra : moz-landing-system : lando
2019-04-04 11:35:33 +00:00
Emilio Cobos Álvarez b3c3646515 Bug 1538694 - Cleanup refcounted types. r=boris
And make the handling of ComputedStyle more similar to these.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 18:16:01 +00:00
Bogdan Tara b68e341245 Backed out 4 changesets (bug 1536584, bug 1538661, bug 1538694) for causing build bustages CLOSED TREE
Backed out changeset 563e8fb1be5d (bug 1538694)
Backed out changeset 7bd834c5800c (bug 1536584)
Backed out changeset f1eec8f7a3f8 (bug 1538694)
Backed out changeset 73a48619739e (bug 1538661)
2019-03-26 16:40:20 +02:00
Emilio Cobos Álvarez 45bc2e8f6c Bug 1538694 - Cleanup refcounted types. r=boris
And make the handling of ComputedStyle more similar to these.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 13:26:33 +00:00
Emilio Cobos Álvarez fcc161a573 Bug 1516780 - Remove ComputedStyle::mBits. r=jfkthame,heycam
Use the Servo flags instead.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 21:10:30 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Sylvestre Ledru 41d1d79094 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-15 08:15:57 +00:00
Emilio Cobos Álvarez 286396f97a Bug 1525955 - Cleanup a bit after bug 1525371. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D19001

--HG--
extra : moz-landing-system : lando
2019-02-08 22:40:26 +00:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Emilio Cobos Álvarez 15e84a4c1c Bug 1525371 - Kill ComputedStyle::ComputedData. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18733
2019-02-07 11:15:33 +01: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
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
Cameron McCormack fe196275ba Bug 1489529 - Update comments to no longer point to nsRuleNode. r=emilio
There are a few mentions of nsRuleNode left but they are mostly
historical references so it makes sense to keep them.

Differential Revision: https://phabricator.services.mozilla.com/D5505
2018-09-12 17:37:37 +10:00
Cameron McCormack 426af33a36 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack 99d9013b12 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Narcis Beleuzu d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack ec18757d45 Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Summary: Depends On D3285

Reviewers: njn!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3286
2018-08-15 15:46:42 +10:00
Cameron McCormack d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Emilio Cobos Álvarez 3f97dd5cab Bug 1464060: Make the general setup for computed style bits nicer. r=xidorn
This patch:

 * Makes StyleStructID an enum class, and moves it to the mozilla namespaces.

 * Introduces StyleStructConstants with some constants scattered through the
   codebase.

 * Makes the computed style bits an enum class, and splits mPseudoType and mBits
   into their own members, since we were using a uint64_t when we have only a
   couple flags and CSSPseudoElementType is a byte. We statically assert that
   the number of style structs is less or equal to 32.

 * Makes mPseudoTag, mPseudoType and mBits const, since we don't want them to be
   mutated from C++, and we still need a few more refactorings (mostly getting
   rid of FinishStyle) to avoid mutating ComputedStyle instead.

MozReview-Commit-ID: 7qsTtASGcYB
2018-05-28 10:40:00 +02:00
Emilio Cobos Álvarez dc60d6f0c2 Bug 1464060: Remove a bunch of unused style bits. r=xidorn
MozReview-Commit-ID: FLACqfSHfSO
2018-05-28 10:17:11 +02:00
Xidorn Quan 5896b33074 Bug 1461933 - Remove ServoBindings.h from ComputedStyleInline.h. r=emilio
For doing this, ServoComputedData is split into separate files, so that
files don't need to include ServoBindings.h just for accessing style
structs from ComputedStyles.

MozReview-Commit-ID: DPAd7PUUCl9

--HG--
extra : rebase_source : 7d6f739b7fb58a46e1624ba62e717412057ea9c1
2018-05-16 15:35:59 +10:00
Cameron McCormack 9e26b4d88e Bug 1375536 - Remove nsStyleVariables. r=emilio,xidorn
MozReview-Commit-ID: BqyhXc4W4Aq

--HG--
extra : rebase_source : f2e00ba1e52437a9e7041aa35e2095038812fc4d
2018-04-10 15:11:12 +10:00
Noemi Erli b55e1a1cbc Merge inbound to mozilla-central. a=merge 2018-04-09 19:46:07 +03:00
Jonathan Watt 782365b415 Bug 1452170 - Remove RestyleLogging.h, RestyleTrackerInlines.h and related RESTYLE_LOGGING cruft. r=heycam 2018-04-09 09:33:56 +01:00
Xidorn Quan 2cf16e2fd3 Bug 1452534 part 4 - Remove unused ComputedStyle::{IsReset,IsInherited}. r=emilio
MozReview-Commit-ID: DHOhrznm3ac

--HG--
extra : rebase_source : 9ca0d5208fbdbc34057f4e59a344dbf085b1addf
2018-04-09 15:57:53 +10:00
Emilio Cobos Álvarez b27ddd74b9 Bug 1452080: Rename ComputedStyle::PresContext to PresContextForFrame. r=xidorn
And make nsIFrame its only caller, modulo a safety assertion.

The safety assertion will be removed at the same time as the pres context
member, since the only purpose of it is to ensure we don't keep a pres context
reference for too long.

MozReview-Commit-ID: CD5zOHVO9ub
2018-04-09 11:19:50 +02:00
Noemi Erli 5d9588e156 Backed out 3 changesets (bug 1452080) for bustage in /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp on a CLOSED TREE
Backed out changeset 7f5104c7a242 (bug 1452080)
Backed out changeset 806a9c95a243 (bug 1452080)
Backed out changeset bffebe8aa254 (bug 1452080)
2018-04-09 11:18:12 +03:00
Emilio Cobos Álvarez b6bb80b714 Bug 1452080: Rename ComputedStyle::PresContext to PresContextForFrame. r=xidorn
And make nsIFrame its only caller, modulo a safety assertion.

The safety assertion will be removed at the same time as the pres context
member, since the only purpose of it is to ensure we don't keep a pres context
reference for too long.

MozReview-Commit-ID: CD5zOHVO9ub
2018-04-09 09:57:57 +02: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 3181988f2e Bug 1449400 part 2 - Remove some dependencies from ServoStyleSet.h and add some random stuff to fix breakage. r=emilio
Some of the definitions are needed for the headers removal in
following patches.

MozReview-Commit-ID: BCj7U7RgBLj

--HG--
extra : rebase_source : e8e437f76c4db6ec930ea0481b6c1a38129a5477
extra : source : a1c42220e5070fa4beea438859ab0daec3f3fe7b
2018-03-29 22:15:46 +11:00
Xidorn Quan b4a5ee99b5 Bug 1449400 part 1 - Move NS_STYLE_* constants from nsStyleStruct.h to ComputedStyle.h. r=emilio
Since ComputedStyle is where they are actually used. This would also
allow us to avoid including nsStyleStruct.h from ComputedStyle.h after
some header file changes in later patches.

MozReview-Commit-ID: 8aBuNO9CRN0

--HG--
extra : rebase_source : e3c4294192ad5b0fcd635d19ada94800fb0a4ef3
extra : source : 86698696c3d8db942b5031ef6c671c7796268007
2018-03-29 22:15:46 +11:00
Xidorn Quan 8324509a8c Bug 1448728 followup - Move ServoComputedValuesMallocEnclosingSizeOf to ComputedStyle.cpp. 2018-03-28 10:57:35 +11:00
Xidorn Quan 1962625a79 Bug 1448728 part 1 - Make popular headers not include nsWindowSizes.h. r=njn
MozReview-Commit-ID: EC5J9Im3gfu

--HG--
extra : source : 9fa9209aeeb00009143c5c21f21210c93184e61f
2018-03-28 10:44:49 +11:00
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00:00
Xidorn Quan 051a0fc278 Bug 1448526 part 2 - Make nsStyleStructList.h not generated. r=emilio
nsStyleStructList.h was initially made generated in bug 873368 to avoid
manually maintaining boilerplate for if-dispatch, while the if-dispatch
was replaced by jump table in bug 1171842, so the boilerplate went away.

However, in bug 1122781 (before bug 1171842), boilerplate for dependency
check, so it still needs to be generated.

The dependency table is removed in the previous patch, so we no longer
have any boilerplate in the style struct list, and thus it doesn't need
to be generated anymore.

MozReview-Commit-ID: GkbJZ98ojbE

--HG--
extra : rebase_source : a148b97c051bb6c88846cf6ba617c4edef70ca24
extra : source : f1c7d19cde195fb90ac2627d16ed69d020de01b9
2018-03-26 20:09:17 +11:00
Xidorn Quan 9d334f6911 Bug 1448526 part 1 - Remove ComputedStyle::sDependencyTable. r=emilio
MozReview-Commit-ID: Jh7Z4Rg354I

--HG--
extra : rebase_source : 5e936a385f5329fb9c376ade10593988d534dca2
extra : source : eb04dd75e9b00636aa22f291b362e0c74eb0b77b
2018-03-26 20:09:17 +11:00