Revision ec35b03ca5e8eec6eb1767a77f0aea13855515a3 authored by Rune Lillesveen on 29 June 2018, 22:17:37 UTC, committed by Blink WPT Bot on 29 June 2018, 22:26:52 UTC
We used to create these pseudo elements and their computed styles in
Element::AttachLayoutTree when building the layout tree. Now we create
or dispose these elements from style recalc, that is,
UpdatePseudoElement. To make pseudo elements live through a style recalc
with a layout tree re-attach we no longer clear the pseudo elements
during DetachLayoutTree for performing_reattach=true. We do however need
to clear the pseudo elements which do not get a layout object for the
re-attach. That is done in AttachLayoutTree for the originating element
when the originating element does not generate a layout box.

We stop using the pseudo style cache on ComputedStyle for PseudoElements
and instead return the ComputedStyle when creating the pseudo element
and store it as non-attached style which can later be retrieved when
attaching the layout object.

An effect of this change is that we can detect transitions on pseudo
elements when ancestors display types changes and causes re-attachment.
That is issue 836140.

::first-letter may still be generated during layout tree building, and
the ::first-letter layout structure may still be updated during style
recalc.

Bug: 836126, 836140
Change-Id: Iafad705b7a7b988d4c1598e8a126ce0d79c5873d
Reviewed-on: https://chromium-review.googlesource.com/1112244
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571665}
1 parent c360ca0
Raw File
css-animations.idl
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "CSS Animations Level 1" spec.
// See: https://drafts.csswg.org/css-animations/

[Exposed=Window,
 Constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict)]
interface AnimationEvent : Event {
  readonly attribute CSSOMString animationName;
  readonly attribute double elapsedTime;
  readonly attribute CSSOMString pseudoElement;
};
dictionary AnimationEventInit : EventInit {
  CSSOMString animationName = "";
  double elapsedTime = 0.0;
  CSSOMString pseudoElement = "";
};

partial interface CSSRule {
    const unsigned short KEYFRAMES_RULE = 7;
    const unsigned short KEYFRAME_RULE = 8;
};

[Exposed=Window]
interface CSSKeyframeRule : CSSRule {
  attribute CSSOMString keyText;
  [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
};

[Exposed=Window]
interface CSSKeyframesRule : CSSRule {
           attribute CSSOMString name;
  readonly attribute CSSRuleList cssRules;

  void             appendRule(CSSOMString rule);
  void             deleteRule(CSSOMString select);
  CSSKeyframeRule? findRule(CSSOMString select);
};

partial interface GlobalEventHandlers {
  attribute EventHandler onanimationstart;
  attribute EventHandler onanimationiteration;
  attribute EventHandler onanimationend;
  attribute EventHandler onanimationcancel;
};
back to top