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/RenderReplica.cpp

    r156876 r157408  
    3535namespace WebCore {
    3636
    37 RenderReplica::RenderReplica()
    38     : RenderBox(nullptr, 0)
     37RenderReplica::RenderReplica(Document& document)
     38    : RenderBox(document, 0)
    3939{
    4040    // This is a hack. Replicas are synthetic, and don't pick up the attributes of the
     
    4343    // the if (!isInline() || isReplaced()) check before setHasTransform().
    4444    setReplaced(true);
    45 }
    46 
    47 RenderReplica* RenderReplica::createAnonymous(Document& document)
    48 {
    49     RenderReplica* renderer = new (*document.renderArena()) RenderReplica();
    50     renderer->setDocumentForAnonymous(document);
    51     return renderer;
    5245}
    5346
Note: See TracChangeset for help on using the changeset viewer.