[Webkit-unassigned] [Bug 87533] Crash in styleForFirstLetter (pseudoStyle is null)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 30 11:12:24 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=87533





--- Comment #12 from Joe Thomas <joethomas at motorola.com>  2012-05-30 11:12:24 PST ---
(In reply to comment #11)
> (From update of attachment 144630 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=144630&action=review
> 
> >>> Source/WebCore/rendering/RenderBlock.cpp:6024
> >>> +        return;
> >> 
> >> What if the style changed to detach? or to no longer be a first letter?  Is this early-return safe?
> > 
> > With my limited knowledge in rendering, early return looks fine to me as we cannot execute these functions further without Pseudo RenderStyle.
> 
> I am also concerned about the already returns. If you have no pseudo-style, it looks like you either shouldn't be calling the updateFirstLetter* function or should be detaching your first letter renderers as it means the first letter selector don't apply anymore.

After some more debugging, it looks like null check is required only in RenderBlock::createFirstLetterRenderer and not needed in RenderBlock::updateFirstLetterStyle. Renderer for FirstLetter pseudo element will not be created in createFirstLetterRenderer() if there is no pseudoStyle because of the newly introduced null check. And before calling updateFirstLetterStyle(), we check whether FirstLetter renderer is there.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list