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

260 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez f7d932d9fe Bug 1433591: Update the style of child anon box wrapper after owned anon boxes. r=bz
Since the former could inherit from the latter.

Test incoming in a followup.

MozReview-Commit-ID: LJjprcyjDyU
2018-01-28 05:11:07 +01:00
Emilio Cobos Álvarez 271544691d Bug 1430844: Add assertions that would've caught this. r=bz
MozReview-Commit-ID: 1UfhIRn2We2
2018-01-17 19:12:34 +01:00
KuoE0 1de9a1005f Bug 1428276 - Make ExpectedOwnerForChild deal with abs.pos. anon boxes. r=heycam
For an OOF frame, the parent frame that's associated with our parent
style context is the *placeholder's* parent -- not the OOF frame's
parent.

MozReview-Commit-ID: CUSBkWDqxWz

--HG--
extra : rebase_source : 96dfef60ed87b94fe7ec1ea5c3104658e283b3ea
2018-01-05 16:26:01 +08:00
Emilio Cobos Álvarez 9cd802936b Bug 1428164: Restyle owned anon boxes after processing children. r=bz
MozReview-Commit-ID: 4QcJPY9hkSm
2018-01-05 11:57:47 +01:00
Emilio Cobos Álvarez f14389a065 Bug 1422654: stylo: Avoid restyling XBL-bound element if the binding doesn't have stylesheets. r=heycam
MozReview-Commit-ID: An2McUbpCLk

--HG--
extra : rebase_source : 1c869057d032773fbfd426d6f392cc936c81029c
2017-12-04 02:47:54 +01:00
Xidorn Quan c131c02332 Bug 1417824 part 1 - Query theme for attribute change on element with appearance. r=heycam
The change is mostly copied from GeckoRestyleManager::AttributeChanged.
It is not clear to me whether it's worth moving it to the superclass so
that we don't duplicate the code. If we are removing the Gecko code in
short term, it probably doesn't matter.

It is also not clear whether we should port other code from that method
to ServoRestyleManager.

MozReview-Commit-ID: Fd1nbwgLGa1

--HG--
extra : rebase_source : 7bba8907fa7e57695a8294cf9277804fbe23ff8f
2017-11-22 15:35:12 -06:00
Xidorn Quan d1120869f6 Bug 1417281 part 1 - Trigger subtree restyle when lwtheme / lwthemetextcolor attribute on root element of XUL document is changed. r=heycam
MozReview-Commit-ID: 2RM3ZkWKiSl

--HG--
extra : rebase_source : a4619229de23a55696a37974d2daa007b7e803a3
2017-11-14 17:53:11 -08:00
Emilio Cobos Álvarez 9bd202a77c Bug 1413288: The owner of a bullet frame is the first continuation of the parent. r=xidorn
MozReview-Commit-ID: FUsdsETkV2Q

--HG--
extra : rebase_source : 9c6183e567321c9ee541a04d001dc00fbcc7e94b
2017-11-01 12:20:55 +01:00
Emilio Cobos Álvarez 7a3d033bd5 Bug 1409931: nsImageControlFrame can also be using a <map> element. r=xidorn
This goes with a crashtest, as soon as I get a usable build.

MozReview-Commit-ID: LqmPWoJZ7AJ

--HG--
extra : rebase_source : a2f2e4b0b2f3cfa4c0f53bc5110d31f0fb86667f
2017-10-20 12:00:49 +02:00
Emilio Cobos Álvarez bce283e551 Bug 1409088: Fix destination insertion point removal algorithm. r=bz
When an insertion point (a) is added to the document before another insertion
point (b), and that insertion point matches nodes that used to match (b), the
following happens in RedistributeAllNodes:

 * Loop through (a), and clear the existing insertion points on nodes
   distributed into it (none, since it was just inserted).

 * Go through the node pool and add the matched nodes. That makes the node
   (which already had (b) in the insertion point array) have [(b), (a)] as the
   insertion points.

 * Go through (b), and clear the existing insertion points on the nodes
   distributed to it. That used to do IndexOf() + SetLength(), but since (b) was
   the first node by then in the insertion point array, we'll leave the
   insertion point array empty, while (a) would still think that the node is
   distributed to it.

This causes the bloom filter code, which loops through the flattened tree
parents, to not insert any (because the node doesn't know about where it's
inserted).

Also, add a debug phase to verify the flat tree before restyling that would've
caught this more clearly (happy to remove it if you don't think it's worth).

We still can't assert that the insertion point is properly referenced due to the
hacky way mInsertionPoints is cleared in
HTMLContentElement::UpdateFallbackDistribution, but we'll still clear the
insertion points either there, or on the rest of insertion point removal code in
ShadowRoot::DistributeAllNodes.

MozReview-Commit-ID: 9k2gnsAKMEe

--HG--
extra : rebase_source : 7e8371199bde8148d77cb69417a8dd8b1ee77078
2017-10-19 14:45:16 +02:00
Xidorn Quan 5767c9b968 Bug 1406562 - Return first continuation for parent of first-letter in ExpectedOwnerForChild. r=emilio
MozReview-Commit-ID: KkBDMStwQ6r

--HG--
extra : rebase_source : 7e0ffbf2ebff5d7d08d324c61736805adc9ea846
2017-10-09 11:07:17 +11: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
Boris Zbarsky 984aba4875 Bug 1391736. Relax the ExpectedOwnerForChild assert in the ServoRestyleState constructor. r=emilio 2017-10-02 16:36:49 -04:00
Boris Zbarsky 4a228305f6 Bug 1402476. ExpectedOwnerForChild should not return a first-letter frame for a text child. r=emilio
The expected owner is the DOM parent.  The first-letter then does some reparenting of the text style later.
2017-10-02 16:36:47 -04:00
Emilio Cobos Álvarez 78eab7101d Bug 1404167: Properly update the styles of first-letter childs of anon boxes. r=bz
MozReview-Commit-ID: Cyxs4FxGj6B
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-29 13:14:37 +02:00
Sebastian Hengst 9aa7a73678 Backed out changeset 710b592482ee (bug 1404167) for asserting mOwner == ExpectedOwnerForChild(aFrame) at ServoRestyleManager.cpp:125. r=backout 2017-09-29 11:39:12 +02:00
Emilio Cobos Álvarez 6f5e0eacb8 Bug 1404167: Properly update the styles of first-letter childs of anon boxes. r=bz
MozReview-Commit-ID: Cyxs4FxGj6B
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-29 08:50:47 +02:00
Emilio Cobos Álvarez 0b1b86082e Bug 1403615: Also follow the NODE_DESCENDANTS_NEED_FRAMES bit in ClearRestyleStateFromSubtree. r=bholley
We don't follow this bit intentionally because we know that even if it's set,
when none of the other two bits are set there are no other restyle / change
hints down the tree.

We rely on the frame constructor to clean the mess up, though, and it doesn't
really do a good work about it.

In particular, the case we're hitting on the test-case is:

<body descendant-need-frames change=reconstruct style="display: table-column-group">
  <div descendant-need-frames>
    <div descendant-need-frames>
      <span needs-frame></span>
    </div>
  </div>
</body>

When we see we need to reconstruct the body, we call
ClearRestyleStateFromSubtree, but that doesn't do much now, since we don't
follow the descendant-need-frames bits.

Then, when we reconstruct the content, we arrive at[1] when constructing the
first child <div>. The <div> flags have been cleared, but not the children's!

Then a text-node is inserted in a <div>, breaking all sorts of invariants.

This is the easiest fix. Other fixes include clearing the flags on
SetAsUndisplayedContent. But that implies not clearing them in
ShouldCreateItemsForChild, and doing that somewhere more sensible.

I suspect it's not too hard, but that's a slightly more risky change, will do it
if you prefer it.

[1]: http://searchfox.org/mozilla-central/rev/3dbb47302e114219c53e99ebaf50c5cb727358ab/layout/base/nsCSSFrameConstructor.cpp#6092

MozReview-Commit-ID: 7026wkQLQkz
2017-09-28 08:53:51 +02:00
Sebastian Hengst dc3edbabca Backed out changeset 379e7e7bf80d (bug 1403615) for failing own crashtest. r=backout 2017-09-27 21:27:08 +02:00
Emilio Cobos Álvarez db0476916e Bug 1403615: Also follow the NODE_DESCENDANTS_NEED_FRAMES bit in ClearRestyleStateFromSubtree. r=bholley
We don't follow this bit intentionally because we know that even if it's set,
when none of the other two bits are set there are no other restyle / change
hints down the tree.

We rely on the frame constructor to clean the mess up, though, and it doesn't
really do a good work about it.

In particular, the case we're hitting on the test-case is:

<body descendant-need-frames change=reconstruct style="display: table-column-group">
  <div descendant-need-frames>
    <div descendant-need-frames>
      <span needs-frame></span>
    </div>
  </div>
</body>

When we see we need to reconstruct the body, we call
ClearRestyleStateFromSubtree, but that doesn't do much now, since we don't
follow the descendant-need-frames bits.

Then, when we reconstruct the content, we arrive at[1] when constructing the
first child <div>. The <div> flags have been cleared, but not the children's!

Then a text-node is inserted in a <div>, breaking all sorts of invariants.

This is the easiest fix. Other fixes include clearing the flags on
SetAsUndisplayedContent. But that implies not clearing them in
ShouldCreateItemsForChild, and doing that somewhere more sensible.

I suspect it's not too hard, but that's a slightly more risky change, will do it
if you prefer it.

[1]: http://searchfox.org/mozilla-central/rev/3dbb47302e114219c53e99ebaf50c5cb727358ab/layout/base/nsCSSFrameConstructor.cpp#6092

MozReview-Commit-ID: 7026wkQLQkz
2017-09-27 20:02:04 +02:00
Emilio Cobos Álvarez 1ae8fc2d3a Bug 1403078: Lazily tweak the traversal root to account for sibling invalidations. r=heycam
MozReview-Commit-ID: Ij3nMOKu5FO
2017-09-26 14:20:11 +02:00
Emilio Cobos Álvarez 4b5023d5d3 Bug 1403028: Ensure the parent is in the composed doc before marking it as dirty. r=heycam
We could do the check earlier, but the end result is effectively the same, and
this makes it easier to remove.

MozReview-Commit-ID: 5c8TFHK1ciD
2017-09-26 10:02:23 +02:00
Wes Kocher 7bf1b49628 Merge inbound to central, a=merge
MozReview-Commit-ID: 7EzhCCVVn7n
2017-09-25 16:41:34 -07:00
Boris Zbarsky e04143fa91 Bug 1401739. Make sure to always call UpdateStyleOfChildAnonBox with the first continuation as "this". r=emilio
MozReview-Commit-ID: KhfvBuCeoex
2017-09-25 10:58:39 -04:00
Emilio Cobos Álvarez afb59c871d Bug 1387942: Relax backdrop frame parenthood assertion, and re-enable test. r=xidorn
MozReview-Commit-ID: 99I3apwe52l

--HG--
extra : rebase_source : a9900b925cb58e095572fca75e211cc0e16c942f
2017-09-12 08:41:17 +02:00
Wei-Cheng Pan 4c6b1c3dec Bug 1397168 - Add a function to find out if a node has any ancestor that is pending for restyling. r=emilio
MozReview-Commit-ID: DXcodMcQP59

--HG--
extra : rebase_source : e31ed0d2471150bfdf30ac656f39795d11a4fed5
2017-09-06 15:42:05 +08:00
Brian Birtles eda7cfac2e Bug 1365855 - Drop comment about needing to update SMIL animation styles in ServoRestyleManager::UpdateOnlyAnimationStyles; r=hiro; DONTBUILD
Unlike GeckoRestyleManager::UpdateOnlyAnimationStyles which is called from
*both* GeckoRestyleManager::ProcessPendingRestyles and FlushThrottledStyles,
ServoRestyleManager::UpdateOnlyAnimationStyles is only called from
FlushThrottledStyles which is what we use to update transform animations before
doing hit-testing. In this case, there doesn't appear to be any situation where
throttled SMIL animations need to be updated since SMIL animations are only
throttled when they apply to display:none content (bug 1209405 and bug 1322970)
in which case they should not affect hit testing.

MozReview-Commit-ID: 4bt7hCSa7Xr

--HG--
extra : rebase_source : 72641ee76a953357a00cb58b993a4316a86be618
extra : amend_source : 97b7053710039859dfe18c073c6414b129030757
2017-09-07 16:24:12 +09:00
Wei-Cheng Pan f3f406f76b Bug 1363805 - Part 3: Do lazy flushing if possible. r=heycam
Skips flushing current document if the target of getComputedDOMStyle cannot be
affected by any pending restyles.

MozReview-Commit-ID: C87HDIDvOth

--HG--
extra : rebase_source : 064880493f9aac2599689cdd0749200bb579c60b
2017-05-23 12:02:11 +08:00
Boris Zbarsky 71d6942bcb Bug 1395650. Make anonymous column groups into non-inheriting anon boxes, to better match the behavior of other browsers. r=heycam 2017-09-01 00:53:33 -04:00
Boris Zbarsky 11a90dfbd9 Bug 1395591. When looking for our layout parent style, make sure to start with the placeholder if we're out of flow. r=emilio
MozReview-Commit-ID: 1M52bi3oQFX
2017-08-31 22:46:35 -04:00
Boris Zbarsky c7c1bed48a Bug 1390389. Fix anon box restyling assertions to correctly handle ib splits. r=xidorn
MozReview-Commit-ID: AtBFlvLyg6b
2017-08-31 09:12:13 -04: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
Xidorn Quan 01c064e2fc Bug 1390409 part 3 - Send a11y notification for visibility changes. r=emilio
MozReview-Commit-ID: I48OhzekXvD

--HG--
extra : rebase_source : f825f629fc1a9a224e7c385a0e644827ec29f9bb
2017-08-28 16:58:25 +10:00
Xidorn Quan affc2f9936 Bug 1390409 part 2 - Replace aParentWasRestyled with a bitflag. r=emilio
MozReview-Commit-ID: 49C1N6LNXi7

--HG--
extra : rebase_source : 4f85d1bfa647c9cce3230ab4a5a1ad335e26e999
2017-08-28 14:53:35 +10:00
Xidorn Quan 07c894d22f Bug 1390409 part 1 - Remove unused ServoTraversalFlags param from ServoRestyleManager::ProcessPostTraversal. r=emilio
This was added in bug 1384769 for passing into Servo_TakeChangeHint,
but bug 1388031 changed Servo_TakeChangeHint to no longer take it, and
there is nothing else in the function which uses the flags.

MozReview-Commit-ID: LvZkJZHENUB

--HG--
extra : rebase_source : 609ad8d6be0946898622671b4f8092745e9da36a
2017-08-28 14:27:46 +10:00
Wei-Cheng Pan e55f4e59ec Bug 1388298 - Add an API to process all invalidations on the main thread. r=emilio
MozReview-Commit-ID: I7rBwvPQykR

--HG--
extra : rebase_source : 432210b2798c8b602fb7659e097721c6fbc1d60d
2017-08-24 15:36:48 +08:00
Bobby Holley 7174bd25c7 Bug 1392863 - Clean up DoProcessPendingRestyles. r=emilio
MozReview-Commit-ID: 4JhWFNPVvGn
2017-08-26 12:28:25 -07:00
Emilio Cobos Álvarez 8700c2a4c3 Bug 1392170: Don't call ResolveServoStyle unnecessarily for undisplayed and not restyled stuff. r=heycam
In particular, this avoids the stupid calls in display: none roots.

The cache stuff should be unnecessary, but there's still some fishy stuff going
on.

MozReview-Commit-ID: LgnW0k1gmsN

--HG--
extra : rebase_source : b07e1f2533e4a2fc1610f35351fc2964f37e82e2
2017-08-23 13:34:17 +02:00
Bobby Holley 7210bd7226 Bug 1383332 - Track the restyle root and use it to do less work during the traversal. r=emilio
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 21:19:24 -07:00
Emilio Cobos Álvarez 977a701ae1 Bug 1392093: Remove dead code to get the old style context. r=heycam
Unused since https://github.com/servo/servo/pull/18153.

MozReview-Commit-ID: DtQdm3ONS5E

--HG--
extra : rebase_source : 8a781dfdd4963b73c0f6a0c5bc2de8041bcc0db9
2017-08-20 18:01:25 +02:00
J. Ryan Stinnett f68386ce04 Bug 1390691 - Fix up Servo_TakeChangeHint for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: 6qqVVfU8Mb2

--HG--
extra : rebase_source : 825985977307b50ae8a80ab182e54a3f7b95eafc
2017-08-14 22:11:53 -05: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 b452d01c4c Bug 1389790: Ensure we always have an up-to-date style context even if we have no frame. r=heycam
I'm still not quite sure how may we end up restyling a text node under there,
but all my attempts to build a test-case have failed.

Anyway this is the right thing to do.

MozReview-Commit-ID: FitqSKhNt2n

--HG--
extra : rebase_source : 23daa450b11d3bbee458973fc62e95338328fe02
2017-08-12 22:17:44 +02:00
Hiroyuki Ikezoe 0d870b1b90 Bug 1388031 - Cleanup code that was used for verifying styling results for throttled animation flush in post traversal. r=bholley
Now that we do process normal traversal even in the case of throttled animation
flush so that we don't need to do special handling for the case.

Note about the comment in has_current_styles():
the remaining animation hints is not caused by either this patch or the
previous patch in this patch series, it's been there in the first place, but
it should be fixed somehow later. See bug 1389675.

MozReview-Commit-ID: JojHufxNCiS
2017-08-11 20:34:08 -07:00
Hiroyuki Ikezoe fb03af5d7d Bug 1388031 - Process normal traversal for throttled animation flush as well. r=bholley
MozReview-Commit-ID: BirD8BDMifp
2017-08-11 20:34:06 -07:00
Bobby Holley 3e308bd38d Bug 1389385 - Rearrange dirty noting to operate on the element rather than the parent. r=emilio
This will allow us to scope restyle roots more tightly.

MozReview-Commit-ID: 2t2lp5sKBHH
2017-08-11 18:18:22 -07:00
Boris Zbarsky efd62c0c96 Bug 1388877. Fix insertions under a ::first-line in stylo. r=heycam
MozReview-Commit-ID: CDolJpTtGki

--HG--
extra : rebase_source : dbef95a652491fbfee0a462995938b4801a785ad
2017-08-11 09:11:23 -04:00
Boris Zbarsky b183fe45c1 Bug 1388625 part 5. Implement wrapper anonymous box restyling in ServoRestyleManager. r=heycam
MozReview-Commit-ID: FRW4RCR1GT4

--HG--
extra : rebase_source : 4b3788a93173d73c0a47c92a3e8574bae713862f
2017-08-11 00:10:26 -04:00
Hiroyuki Ikezoe 80dfc0d6fb Bug 1379516 - Mark animation timerline marker for stylo. r=birtles
MozReview-Commit-ID: GkPSXEk4xua

--HG--
extra : rebase_source : 3fa0f5029bcfd87e9d6abfec9c6ea5d03a7656e6
2017-08-11 08:44:11 +09:00