Bug 126568

Summary: Move RenderObject::firstLineBlock() to RenderElement.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: NEW ---    
Severity: Normal CC: commit-queue, d-r, esprehn+autocc, fmalita, glenn, gyuyoung.kim, koivisto, kondapallykalyan, pdr, schenney
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch koivisto: review+

Description Andreas Kling 2014-01-07 01:35:37 PST
Move RenderObject::firstLineBlock() to RenderElement.
Comment 1 Andreas Kling 2014-01-07 01:39:04 PST
Created attachment 220502 [details]
Patch
Comment 2 Antti Koivisto 2014-01-07 06:27:30 PST
Comment on attachment 220502 [details]
Patch

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

> Source/WebCore/rendering/RenderElement.h:145
> +    // Obtains the nearest enclosing block (including this block) that contributes a first-line style to our inline children.
> +    virtual RenderBlock* firstLineBlock();

Since this is null except for RenderBlocks this virtual shouldn't really exists. It would be good to eventually tighten the call sites to check and cast to RenderBlock.
Comment 3 Antti Koivisto 2014-01-07 06:36:09 PST
firstLineBlock() has only one call site so you can do this trivially.