Bug 123714 - RenderTextFragment: Tighten first-letter logic.
Summary: RenderTextFragment: Tighten first-letter logic.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-03 14:58 PST by Andreas Kling
Modified: 2013-11-03 16:37 PST (History)
1 user (show)

See Also:


Attachments
Patch (6.37 KB, patch)
2013-11-03 14:59 PST, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-11-03 14:58:51 PST
RenderTextFragment: Tighten first-letter logic.
Comment 1 Andreas Kling 2013-11-03 14:59:17 PST
Created attachment 215879 [details]
Patch
Comment 2 Antti Koivisto 2013-11-03 15:36:12 PST
Comment on attachment 215879 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215879&action=review

> Source/WebCore/editing/TextIterator.cpp:672
> -static inline RenderText* firstRenderTextInFirstLetter(RenderObject* firstLetter)
> +static inline RenderText* firstRenderTextInFirstLetter(RenderBoxModelObject* firstLetter)
>  {
>      if (!firstLetter)
> -        return 0;
> +        return nullptr;

Maybe you could just remove this helper? Only one call site needs the null test.
Comment 3 Andreas Kling 2013-11-03 16:35:41 PST
(In reply to comment #2)
> (From update of attachment 215879 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215879&action=review
> 
> > Source/WebCore/editing/TextIterator.cpp:672
> > -static inline RenderText* firstRenderTextInFirstLetter(RenderObject* firstLetter)
> > +static inline RenderText* firstRenderTextInFirstLetter(RenderBoxModelObject* firstLetter)
> >  {
> >      if (!firstLetter)
> > -        return 0;
> > +        return nullptr;
> 
> Maybe you could just remove this helper? Only one call site needs the null test.

I like that it provides a home for the FIXME. I don't know what to do about that FIXME, otherwise I'd be fixing it. :(
Comment 4 Andreas Kling 2013-11-03 16:37:38 PST
Committed r158551: <http://trac.webkit.org/changeset/158551>