Ignore:
Timestamp:
Oct 13, 2013, 8:56:39 AM (12 years ago)
Author:
[email protected]
Message:

Move setPseudoStyle() to RenderImage (from RenderElement.)
<https://webkit.org/b/122726>

Reviewed by Antti Koivisto.

Only RenderImages ever use setPseudoStyle() so move it there and
remove the non-image codepath.

File:
1 edited

Legend:

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

    r157222 r157371  
    426426}
    427427
    428 void RenderElement::setPseudoStyle(PassRefPtr<RenderStyle> pseudoStyle)
    429 {
    430     ASSERT(pseudoStyle->styleType() == BEFORE || pseudoStyle->styleType() == AFTER);
    431 
    432     // Images are special and must inherit the pseudoStyle so the width and height of
    433     // the pseudo element doesn't change the size of the image. In all other cases we
    434     // can just share the style.
    435     if (isImage()) {
    436         RefPtr<RenderStyle> style = RenderStyle::create();
    437         style->inheritFrom(pseudoStyle.get());
    438         setStyle(style.release());
    439         return;
    440     }
    441 
    442     setStyle(pseudoStyle);
    443 }
    444 
    445428void RenderElement::addChild(RenderObject* newChild, RenderObject* beforeChild)
    446429{
Note: See TracChangeset for help on using the changeset viewer.