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

206 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano b7fbcf781f Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:22 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 2137fa4b14 Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 12:13:08 +00:00
Mats Palmgren 9e5f85edc2 Bug 1538618 - [css-pseudo] implement animation support for ::marker pseudos. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D25003

--HG--
extra : rebase_source : 999373f16c816cdd0dd64b1cc3f9f3f30bb12003
extra : amend_source : 829c0fc25afc55d50b70aebc1f3b9f0e8f06c458
2019-03-26 05:48:26 +01:00
Brian Birtles 75b97de014 Bug 1518816 - Rename EffectSet::GetEffectSet(const nsIFrame*) to make it more clear what it does; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D23286

--HG--
extra : moz-landing-system : lando
2019-03-18 04:12:14 +00:00
Emilio Cobos Álvarez 5aa8533517 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828

--HG--
extra : moz-landing-system : lando
2019-03-14 11:47:50 +00:00
Emilio Cobos Álvarez 5696ae7e4c Bug 1531582 - Don't drop the change hint for ContentStateChanged on the floor. r=heycam
This doesn't matter yet because all the states that return a change hint are on
stylesheets, but will matter with bug 1472637.

Differential Revision: https://phabricator.services.mozilla.com/D21616
2019-03-01 11:16:36 +01:00
Narcis Beleuzu 98480534f6 Backed out changeset 60128088f862 (bug 1531582) for reftest failures on value-prop.html . CLOSED TREE 2019-03-01 07:55:22 +02:00
Emilio Cobos Álvarez 94bec57b28 Bug 1531582 - Don't drop the change hint for ContentStateChanged on the floor. r=heycam
This doesn't matter yet because all the states that return a change hint are on
stylesheets, but will matter with bug 1472637.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 02:04:12 +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
garvitdelhi 6bd950c37a Bug 1519185: Remove AttributeWillChange aNewValue parameter r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17073
2019-01-29 17:59:38 +01:00
Cosmin Sabou 6b126c3ff0 Backed out 2 changesets (bug 1519185) build bustages on nsMenuGroupOwnerX.mm. CLOSED TREE
Backed out changeset e1de5282e21a (bug 1519185)
Backed out changeset 00d8afb01890 (bug 1519185)

--HG--
extra : rebase_source : d92a7d4606992503f24c66093d35676e12a84ff0
2019-01-29 18:22:46 +02:00
garvitdelhi 3b6550b93f Bug 1519185: Remove AttributeWillChange aNewValue parameter r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17073

--HG--
extra : moz-landing-system : lando
2019-01-29 15:27:02 +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
Ting-Yu Lin 1fdd6d2def Bug 1493043 - Change function arguments in RestyleManager from nsIFrame& to nsIFrame* r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D6452

--HG--
extra : moz-landing-system : lando
2018-09-21 17:45:49 +00:00
Emilio Cobos Álvarez 60a4d14017 Bug 1481155 - Use more references in the snapshot code. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D2766

--HG--
extra : moz-landing-system : lando
2018-08-06 23:44:56 +00:00
Hiroyuki Ikezoe 0ffcf23607 Bug 1478643 - Apply change hints for transform animation in the case where the current transform style is 'none' and no change hint produced in AddLayerChangesForAnimation. r=birtles
The applying change hints are the same as what we apply for transform style
changed from something to 'none'.

All test cases pass with this fix fail without the fix.

MozReview-Commit-ID: 7HStU26lRPq

--HG--
extra : rebase_source : 701361d477ab7954ab15fde75fd40d98724e47b3
2018-07-30 11:13:54 +09:00
Emilio Cobos Álvarez cb56e2c9f3 Bug 1459529: Remove UPDATE_STYLE. r=heycam
Now that BeginUpdate is useless for the UPDATE_STYLE case, we don't need the
update mechanism at all. Just ensure that ApplicableStylesChanged is called on
the pres shell via the relevant RuleChanged, etc. notifications.

There's a big hidden gotcha here. nsIDocument::BeginUpdate does put a script
blocker on the stack for these updates. However it's not needed, since no script
can run during these notifications (only the stylesheet events we post for
devtools, but those use AsyncEventDispatcher and PostDOMEvents, so they don't
try to run immediately).

nsIDocument::BeginUpdate also does XBL binding attached queue stuff, but we
can't change bindings during these notifications anyway, so it also doesn't
matter.

MozReview-Commit-ID: HJvK6zQfloh
2018-05-15 18:44:29 +02:00
Emilio Cobos Álvarez 592affc9c0 Bug 1454503: Remove unused RestyleManager refcounting. r=xidorn
MozReview-Commit-ID: DILRptmC8wJ
2018-04-17 11:24:52 +02: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
Emilio Cobos Álvarez e1aec7cd95 Bug 1447827: Rename the reparenting stuff. r=xidorn
MozReview-Commit-ID: H7tl6O8Ju32
2018-04-07 15:51:19 +02:00
Emilio Cobos Álvarez a2cb2d85cd Bug 1447827: Remove unused hover generation. r=xidorn
Not worth to keep the dead code, even if we may end up having to do something
about it in bug 1376082.

MozReview-Commit-ID: 8GG7O9ujtk0
2018-04-07 15:50:59 +02:00
Emilio Cobos Álvarez b508e66696 Bug 1447827: Move members from ServoRestyleManager to RestyleManager. r=xidorn
This leaves ServoRestyleManager as just a typedef.

MozReview-Commit-ID: 5wfTkiDc2Nr
2018-04-07 15:40:00 +02:00
Emilio Cobos Álvarez 0ea369c6a3 Bug 1450717: Remove unneeded / inconsistent arguments from nsCSSFrameConstructor. r=mats
Much in the spirit of bug 1442207.

They're not only unneeded, and cheap to get, but also we call them
inconsistently with the light DOM and flattened tree parent (like ContentRemoved
for display: contents), so they're really confusing, and kind of a footgun.

MozReview-Commit-ID: 9u3Kp8Kpp5i
2018-04-07 15:37:39 +02:00
Xidorn Quan efc0cdde02 Bug 1447828 part 8 - Remove remaining uses of StyleBackendType as well as the type itself. r=emilio
MozReview-Commit-ID: 6sh4eKvDpRF

--HG--
extra : rebase_source : 7d83f2b2d4e2739333016ed82754bf3a4a700de4
extra : source : 147ca562a24652c3f30add793213db70aff65e9e
2018-03-29 02:34:34 +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
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez a133a50ada Bug 1427625: Optimize appends to avoid restyling unnecessarily. r=xidorn
This unfortunately doesn't fix my test-case (because we're replacing the text
content all the time and all that), but it's still worth it, since it fixes the
case we care about (the parser appending).

We could also optimize pure insertions (since in that case we can still figure
out what the old text was), but it's probably annoying and not worth the churn.

In any case, we cannot optimize anything that resembles any kind of removal,
because from there we don't know the old text in any way (and the text nodes
like to reuse string buffers and such).

We could do two other optimizations to replace / extend this one, in that order:

 * Pass the buffer and length to CharacterDataWillChange, and use that to get
   the exact old text and the new one in RestyleManager. That would make the
   optimization exact.

 * Pass some sort of Maybe<bool> mWasWhitespace down the CharacterDataChangeInfo
   which is computed like:

    HasFlag(NS_CACHED_TEXT_IS_ONLY_WHITESPACE)
      ? Some(NS_TEXT_IS_ONLY_WHITESPACE)
      : Nothing()

It's not clear to me it's going to be completely worth the churn, so I haven't
done those yet, if we see code in the wild which resembles my testcase, we can
think of doing it.

MozReview-Commit-ID: 2rTWaZti8rv

--HG--
extra : rebase_source : 7390b8740801eb7b91700bb2533c43c173ac5db9
2018-02-27 17:02:52 +01:00
Jeremy Chen d4489c8a64 Bug 1421197 - use 64-bit for restyle generation counters to avoid overflow issues. r=heycam
It is expected to use 64-bit for all the restyle generation counters, since the
getter methods all return uint64_t type at present. However, we're using uint32_t
for the actual counter variables, which means the potential overflow issue is not
avoided.

In this patch, we use 64-bit for the restyle generation counters, so the overflow
issue can be avoided as expected.

MozReview-Commit-ID: 2y2afIcuwvc

--HG--
extra : rebase_source : 3fe64d7d3fc00fa1031eef9f0c15b64405435dfd
2017-11-28 17:42:22 +08:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Brad Werth 1174656d6b Bug 1385789: Refactor RestyleManager::ContentStateChangedInternal to move nsRestyleHint calculation out to GeckoRestyleManager. r=bholley
MozReview-Commit-ID: 7GXkPcjfYe6

--HG--
extra : rebase_source : d493227f872f2698d2f7d48df4132377b2d43c36
2017-08-29 15:50:50 -07:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Sebastian Hengst 2f2796d731 Backed out changeset 27e08c76b767 (bug 1388692) for failing mochitest layout/style/test/test_animations_styles_on_event.html on Android. r=backout 2017-08-14 15:16:28 +02:00
Hiroyuki Ikezoe 4a2f4eaddc Bug 1388692 - When doing hit testing, only flush animations if there are throttled compositor animations. r=birtles
This patch changes UpdateAnimationOnlyStyles to only flush animation styles if
there are throttled animation styles that could affect hit-testing and renames
the function to UpdateAnimationStylesForHitTesting at the same time.

For GeckoRestyleManager, the original UpdateAnimationOnlyStyles which flushes
animation styles if there are any pending animation styles, is renamed to
UpdateAnimationStyles for consistency.

MozReview-Commit-ID: 89UleXjI2OE

--HG--
extra : rebase_source : cac59f9d48b096aee718f89ffe203d38d39027fd
2017-08-14 19:59:59 +09:00
Emilio Cobos Álvarez 2b7de51623 Bug 1381844: Be more explicit about the kind of style context we handle all the time. r=bholley
MozReview-Commit-ID: E0mdkhU3XBz
2017-07-22 18:02:57 +02:00
Wei-Cheng Pan ef1ad5c8c6 Bug 1366964 - Update style context generation after style resolved. r=heycam
Adds another restyle generation which represents the dirty state of raw
style changes, so that getComputedStyle() wont be confused by optimizations
made by style engines.

MozReview-Commit-ID: 7RYeNCzFygO

--HG--
extra : rebase_source : e2a6bd73f4b2b71115abe68b5cce95be57cbd9b2
2017-05-23 14:13:47 +08:00
Emilio Cobos Álvarez ffbc62fe44 Bug 1379421: followup: Remove more dead code, and mark RestyleManager::mType as protected. r=me
The protected thing is needed to silence a clang warning about unused fields on
non-stylo builds.

MozReview-Commit-ID: CsFuIGmKfJx
2017-07-09 03:42:14 +02:00
Emilio Cobos Álvarez 0eea23decf Bug 1357583: Tidy the PostRestyleEventForCSSRuleChanges API. r=heycam
MozReview-Commit-ID: BtOWWC5knsi
2017-05-29 23:01:50 +02:00
Jonathan Kew a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
Hiroyuki Ikezoe 665da78452 Bug 1364799 - Add PostRestyleEventForCSSRuleChanges to distinguish PostRestyleEvent. r=birtles,heycam
The difference is that PostRestyleEventForCSSRuleChanges sets
mRestyleForCSSRuleChanges true. In a subsequent patch,
we propagate a new TraversalRestyleBehavior flag to servo side
if mRestyleForCSSRuleChanges is true.

MozReview-Commit-ID: IKsBbm09uT9

--HG--
extra : rebase_source : 5014c0a978f98e81543ec7766d2daa415317069c
2017-05-21 08:16:26 +09:00
Boris Chiou 38215cedea Bug 1334036 - Part 11: Trigger animation-only restyle when we handle an event with coordinates. r=birtles,heycam
We need to request an animation-only restyle to force flush all throttled
animations on main thread when we handle an event with coordinates
(e.g. mouse event).

MozReview-Commit-ID: KkjeQVsLgTl

--HG--
extra : rebase_source : 314408062e719e9f52df9a6726e2f3dad817bbef
2017-05-19 16:16:41 +08:00
Boris Chiou 9a42bdba22 Bug 1334036 - Part 8: Add AddLayerChangesForAnimation in ServoRestyleManager. r=birtles
Some changes to animations don't affect the computed style and yet still
require the layer to be updated. Therefore, we also need to call
AddLayerChangesForAnimation in ServoRestyleManager. In this patch, we
factor out this function from GeckoRestyleManager, so we can reuse it.

MozReview-Commit-ID: LL7D1oGS65l

--HG--
extra : rebase_source : cd028a3d8f5dc251ec6615918a0f9569f0af44f5
2017-05-02 14:03:16 +08:00
Boris Chiou 2317c8957e Bug 1343753 - Part 6: Move mAnimationGeneration into RestyleManager. r=birtles
So stylo can also use mAnimationGeneration.

MozReview-Commit-ID: KTc8vs2RKMm

--HG--
extra : rebase_source : 52aeb3bf91fa849cbddbedff28418736f96086bb
2017-03-09 17:15:08 +08:00
Emilio Cobos Álvarez 9aaeccc118 Bug 1351791: Move PostRestyleEventForLazyConstruction and PostRestyleEventInternal to GeckoRestyleManager. r=bholley
MozReview-Commit-ID: 5lrNlkbrnZb
2017-03-31 11:56:29 +02:00
Emilio Cobos Álvarez fc80cf434d Bug 1351275: Move style flush observer logic to nsIPresShell, and align layout observing code. r=bholley
MozReview-Commit-ID: 2oUTNfTS4Ku
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 97d055e6682cbe81eaf32c365004f194a0ae1935
2017-03-29 15:41:11 +02:00
Emilio Cobos Álvarez 6c40f8a40b Bug 1296516: Tidy RestyleManager::ContentStateChanged. r=heycam
MozReview-Commit-ID: 7iWc6JvljhT
2017-03-20 22:28:13 +01:00
Emilio Cobos Álvarez ddc24400e5 Bug 1341083: Cleanup infallible ProcessRestyledFrames. r=heycam
MozReview-Commit-ID: JfugKoU6caG
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-25 19:15:33 +01:00
Cameron McCormack 87681c4e08 Bug 1297899 - Part 9: Move RestyleFor{InsertOrChange,Append,EmptyChange} and ContentRemoved up to RestyleManager. r=bholley
MozReview-Commit-ID: 4iK7oG20awJ

--HG--
extra : rebase_source : 239f6bb272e68d1afe7314177e1b74bc0166dc2e
2017-02-13 11:21:33 +08:00
Cameron McCormack b063ce2515 Bug 1297899 - Part 8: Move Content{Inserted,Appended} up to RestyleManager. r=bholley
MozReview-Commit-ID: G2XyuyxhzOz

--HG--
extra : rebase_source : 28e1674562348bf92c2c55e1f5947a1c67666e22
2017-02-13 11:21:33 +08:00