Ignore:
Timestamp:
Sep 28, 2013, 11:30:16 AM (12 years ago)
Author:
Antti Koivisto
Message:

Clean up code for getting first line style
https://bugs.webkit.org/show_bug.cgi?id=122037

Reviewed by Andreas Kling.

We have confusing RenderObject::style(bool firstLine). Get rid of it in favour of
just using RenderObject::firstLineStyle() where appropriate.

Also switch to RenderStyle references in many places and move first line style caching
code down to RenderElement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r155689 r156608  
    10091009        DEFINE_STATIC_LOCAL(AtomicString, ellipsisAndSpaceStr, (ellipsisAndSpace, 2));
    10101010        DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1));
    1011         const Font& font = style(numVisibleLines == 1)->font();
     1011        const RenderStyle& lineStyle = numVisibleLines == 1 ? *firstLineStyle() : *style();
     1012        const Font& font = lineStyle.font();
    10121013
    10131014        // Get ellipsis width, and if the last child is an anchor, it will go after the ellipsis, so add in a space and the anchor width too
Note: See TracChangeset for help on using the changeset viewer.