Ignore:
Timestamp:
Oct 14, 2013, 10:55:52 AM (12 years ago)
Author:
[email protected]
Message:

Pass Document directly to anonymous renderer constructors.
<https://webkit.org/b/122752>

Reviewed by Antti Koivisto.

Added separate constructors for creating anonymous renderers that
take a Document& instead of a null Element*/Text*.

Removed setDocumentForAnonymous() and all createAnonymous() helpers.
...and RenderObject::m_node is now a Node&, wohoo!

File:
1 edited

Legend:

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

    r157371 r157408  
    5454using namespace HTMLNames;
    5555
    56 RenderImage::RenderImage(Element* element)
     56RenderImage::RenderImage(Element& element)
    5757    : RenderReplaced(element, IntSize())
    5858    , m_needsToSetSizeForAltText(false)
     
    6363}
    6464
    65 RenderImage* RenderImage::createAnonymous(Document& document)
    66 {
    67     RenderImage* image = new (*document.renderArena()) RenderImage(0);
    68     image->setDocumentForAnonymous(document);
    69     return image;
     65RenderImage::RenderImage(Document& document)
     66    : RenderReplaced(document, IntSize())
     67    , m_needsToSetSizeForAltText(false)
     68    , m_didIncrementVisuallyNonEmptyPixelCount(false)
     69    , m_isGeneratedContent(false)
     70{
    7071}
    7172
Note: See TracChangeset for help on using the changeset viewer.