<https://webkit.org/b/128640>
Since we always create the flow-thread child list, there's no reason
to put it in a separate heap allocation. Also remove the typedef and
use auto instead.
Reviewed by Anders Carlsson.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::nextRendererForNode):
(WebCore::RenderNamedFlowThread::addFlowChild):
(WebCore::RenderNamedFlowThread::removeFlowChild):
* rendering/RenderNamedFlowThread.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163933
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-02-11 Andreas Kling <akling@apple.com>
+
+ Don't allocate RenderNamedFlowThread's child list separately.
+ <https://webkit.org/b/128640>
+
+ Since we always create the flow-thread child list, there's no reason
+ to put it in a separate heap allocation. Also remove the typedef and
+ use auto instead.
+
+ Reviewed by Anders Carlsson.
+
+ * rendering/RenderNamedFlowThread.cpp:
+ (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
+ (WebCore::RenderNamedFlowThread::nextRendererForNode):
+ (WebCore::RenderNamedFlowThread::addFlowChild):
+ (WebCore::RenderNamedFlowThread::removeFlowChild):
+ * rendering/RenderNamedFlowThread.h:
+
2014-02-11 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
RenderNamedFlowThread::RenderNamedFlowThread(Document& document, PassRef<RenderStyle> style, PassRef<WebKitNamedFlow> namedFlow)
: RenderFlowThread(document, std::move(style))
- , m_flowThreadChildList(adoptPtr(new FlowThreadChildList()))
, m_overset(true)
, m_hasRegionsWithStyling(false)
, m_namedFlow(std::move(namedFlow))
RenderObject* RenderNamedFlowThread::nextRendererForNode(Node* node) const
{
- const FlowThreadChildList& childList = *(m_flowThreadChildList.get());
- for (auto& child : childList) {
+ for (auto& child : m_flowThreadChildList) {
ASSERT(child->node());
unsigned short position = node->compareDocumentPosition(child->node());
if (position & Node::DOCUMENT_POSITION_FOLLOWING)
RenderObject* beforeChild = nextRendererForNode(childNode);
if (beforeChild)
- m_flowThreadChildList->insertBefore(beforeChild, newChild);
+ m_flowThreadChildList.insertBefore(beforeChild, newChild);
else
- m_flowThreadChildList->add(newChild);
+ m_flowThreadChildList.add(newChild);
}
void RenderNamedFlowThread::removeFlowChild(RenderObject* child)
{
- m_flowThreadChildList->remove(child);
+ m_flowThreadChildList.remove(child);
}
bool RenderNamedFlowThread::dependsOn(RenderNamedFlowThread* otherRenderFlowThread) const
void addFlowChild(RenderObject* newChild);
void removeFlowChild(RenderObject*);
- bool hasChildren() const { return !m_flowThreadChildList->isEmpty(); }
+ bool hasChildren() const { return !m_flowThreadChildList.isEmpty(); }
#ifndef NDEBUG
- bool hasChild(RenderObject* child) const { return m_flowThreadChildList->contains(child); }
+ bool hasChild(RenderObject* child) const { return m_flowThreadChildList.contains(child); }
#endif
void pushDependencies(RenderNamedFlowThreadList&);
RenderNamedFlowThreadCountedSet m_layoutBeforeThreadsSet;
// Holds the sorted children of a named flow. This is the only way we can get the ordering right.
- typedef ListHashSet<RenderObject*> FlowThreadChildList;
- OwnPtr<FlowThreadChildList> m_flowThreadChildList;
+ ListHashSet<RenderObject*> m_flowThreadChildList;
NamedFlowContentElements m_contentElements;