Bug 126568 - Move RenderObject::firstLineBlock() to RenderElement.
Summary: Move RenderObject::firstLineBlock() to RenderElement.
Status: NEW
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: 2014-01-07 01:35 PST by Andreas Kling
Modified: 2014-01-07 06:36 PST (History)
10 users (show)

See Also:


Attachments
Patch (8.02 KB, patch)
2014-01-07 01:39 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 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.