DescriptionSupport getComputedStyle for non-rendered pseudo elements.
Computed style for pseudo elements exist and is defined by [1] regardless
of whether the pseudo element, or its ancestor, is rendered or not [2].
We make sure that the computed pseudo element style hangs off of the
RenderStyle of the ancestor, or the computed style in the ancestor's
rare-data if the ancestor is not rendered.
getCachedPseudoStyle, getUncachedPseudoStyle, and pseudoStyleForElement are
all written to not return anything if the pseudo element is not rendered.
That is the reason for calling pseudoStyleForElement in a special mode at
the end of Element::computedStyle to force creating and adding the pseudo
style to the cache.
This CL does not try to support computed style for pseudo elements which
are not in the document.
[1] http://dev.w3.org/csswg/cssom/#dom-window-getcomputedstyle
[2] http://dev.w3.org/csswg/cssom/#::after-pseudo-element
R=esprehn@chromium.org
BUG=414088
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182203
Patch Set 1 #
Total comments: 2
Messages
Total messages: 9 (1 generated)
|