• Rune Lillesveen's avatar
    Don't re-attach ::first-letter during style recalc. · 66094461
    Rune Lillesveen authored
    Update (create or destroy) the FirstLetterPseudoElement and its style
    at the point where the block level element's layout sub-tree is up-to-
    date. This means we will always attach the layout tree for the
    ::first-letter element in Element::AttachLayoutTree, but the pseudo
    element and its style may be created/updated at style recalc time,
    layout tree rebuild time, or layout tree attachment time depending on
    when we know what will be the LayoutText from which we will format the
    first letter if any.
    
    UpdateFirstLetterPseudoElement is split out from UpdatePseudoElement to
    make the code easier to read as the former case has some exceptional
    cases.
    
    We no longer use the pseudo style cache for ::first-letter as we will
    now compute the style only once per pass with the correct inheritance
    parent.
    
    Bug: 847218
    Change-Id: I7a1e2a60122891fa38998ff85e566bec0a38b513
    Reviewed-on: https://chromium-review.googlesource.com/1155591Reviewed-by: default avatarAnders Ruud <andruud@chromium.org>
    Commit-Queue: Rune Lillesveen <futhark@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#581320}
    66094461
dynamic-class-pseudo-elements-expected.txt 1.09 KB