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/RenderObject.h

    r156527 r156608  
    760760
    761761    RenderStyle* style() const;
    762     RenderStyle* firstLineStyle() const { return document().styleSheetCollection().usesFirstLineRules() ? cachedFirstLineStyle() : style(); }
    763     RenderStyle* style(bool firstLine) const { return firstLine ? firstLineStyle() : style(); }
    764 
    765     // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style based off of a
    766     // given new style, without accessing the cache.
    767     PassRefPtr<RenderStyle> uncachedFirstLineStyle(RenderStyle*) const;
     762    RenderStyle* firstLineStyle() const;
    768763
    769764    // Anonymous blocks that are part of of a continuation chain will return their inline continuation's outline style instead.
     
    971966    void removeFromRenderFlowThread();
    972967    void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
    973 
    974     RenderStyle* cachedFirstLineStyle() const;
    975968
    976969    Color selectionColor(int colorProperty) const;
Note: See TracChangeset for help on using the changeset viewer.