[Refactoring] Get rid of ContentDistribution::Item
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2012 06:30:25 +0000 (06:30 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2012 06:30:25 +0000 (06:30 +0000)
commit192b7fd4d807754e5f9015158495c99f8fe98c9f
tree3a67262aa4b46a34ef2ad4987c5ac6bd94c20414
parent3d657edbd753e942ea646e16ca738a10042086b4
[Refactoring] Get rid of ContentDistribution::Item
https://bugs.webkit.org/show_bug.cgi?id=86350

This change replaces the linked list on ContentDistribution with a Vector.
We no longer link item class ContentDistribution::Item.
This simplification also allows ContentDistribution to go.
ContentDistribution is now just a typedef of Vector<RefPtr<Node> >.

Reviewed by Dimitri Glazkov.

No new tests. Covered by existing tests.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseNode):
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
* dom/ElementShadow.cpp:
* dom/ElementShadow.h:
(ElementShadow):
* dom/NodeRenderingContext.cpp:
(WebCore::nextRendererOfInsertionPoint):
(WebCore::previousRendererOfInsertionPoint):
(WebCore::firstRendererOfInsertionPoint):
(WebCore::lastRendererOfInsertionPoint):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::clearDistribution):
(WebCore::ContentDistributor::findInsertionPointFor):
* html/shadow/ContentDistributor.h:
(WebCore):
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::attachDistributedNode):
(WebCore::InsertionPoint::assignShadowRoot):
(WebCore::InsertionPoint::nextTo):
(WebCore):
(WebCore::InsertionPoint::previousTo):
* html/shadow/InsertionPoint.h: Added a set of delegate method to m_distribution.
(WebCore::InsertionPoint::hasDistribution):
(WebCore::InsertionPoint::indexOf):
(WebCore::InsertionPoint::size):
(WebCore::InsertionPoint::at):
(WebCore::InsertionPoint::first):
(WebCore::InsertionPoint::last):
(InsertionPoint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ComposedShadowTreeWalker.cpp
Source/WebCore/dom/ElementShadow.cpp
Source/WebCore/dom/ElementShadow.h
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/html/shadow/ContentDistributor.cpp
Source/WebCore/html/shadow/ContentDistributor.h
Source/WebCore/html/shadow/InsertionPoint.cpp
Source/WebCore/html/shadow/InsertionPoint.h