Chromium Code Reviews
DescriptionAvoid creating first-letter RenderTextFragments for unsuitable text nodes
First-letter code would formerly find the first RenderText in a RenderBlock
and pass it off to be split into RenderTextFragments. If no suitable letter
was found in that RenderText, we'd use its entire contents (be it whitespace
or punctuation) in the RenderTextFragment. When the RenderText is whitespace
only and was combined with column handling code that splits blocks, this
could lead to creating first-letter renderers out of pre-existing first-
letter renderers, which could cause crashes.
Adding some assertions and changing the search algorithm for the first
text node to also check for a valid first-letter character. This avoids
the crashes and leads to results that are closer to my interpretation of
what the spec suggests (i.e. we won't apply first-letter to only punctuation).
BUG=264574
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=159205
Patch Set 1 #
Total comments: 2
Patch Set 2 : Update to ToT. #Patch Set 3 : Fixing test expectations (test was updated last night) #Patch Set 4 : Merged to ToT again. #
Messages
Total messages: 11 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||