| Index: Source/core/dom/NamedFlow.cpp
|
| diff --git a/Source/core/dom/NamedFlow.cpp b/Source/core/dom/NamedFlow.cpp
|
| index 4f4d2044d32a3aa2a2dd88d1a37c8872ae99bfdf..a6265fca46d01382a27d2903c3d68b292b69f5ae 100644
|
| --- a/Source/core/dom/NamedFlow.cpp
|
| +++ b/Source/core/dom/NamedFlow.cpp
|
| @@ -31,7 +31,9 @@
|
| #include "core/dom/NamedFlow.h"
|
|
|
| #include "RuntimeEnabledFeatures.h"
|
| +#include "core/css/CSSRegion.h"
|
| #include "core/dom/NamedFlowCollection.h"
|
| +#include "core/dom/Range.h"
|
| #include "core/dom/StaticNodeList.h"
|
| #include "core/events/ThreadLocalEventNames.h"
|
| #include "core/events/UIEvent.h"
|
| @@ -117,12 +119,12 @@ int NamedFlow::firstEmptyRegionIndex() const
|
| return -1;
|
| }
|
|
|
| -PassRefPtr<NodeList> NamedFlow::getRegionsByContent(Node* contentNode)
|
| +Vector<const RenderRegion*> NamedFlow::getRegionsByContent(Node* contentNode)
|
| {
|
| - Vector<RefPtr<Node> > regionNodes;
|
| + Vector<const RenderRegion*> regionObjects;
|
|
|
| if (!contentNode)
|
| - return StaticNodeList::adopt(regionNodes);
|
| + return regionObjects;
|
|
|
| if (m_flowManager->document())
|
| m_flowManager->document()->updateLayoutIgnorePendingStylesheets();
|
| @@ -130,27 +132,23 @@ PassRefPtr<NodeList> NamedFlow::getRegionsByContent(Node* contentNode)
|
| // The renderer may be destroyed or created after the style update.
|
| // Because this is called from JS, where the wrapper keeps a reference to the NamedFlow, no guard is necessary.
|
| if (!m_parentFlowThread)
|
| - return StaticNodeList::adopt(regionNodes);
|
| + return regionObjects;
|
|
|
| if (inFlowThread(contentNode->renderer(), m_parentFlowThread)) {
|
| const RenderRegionList& regionList = m_parentFlowThread->renderRegionList();
|
| for (RenderRegionList::const_iterator iter = regionList.begin(); iter != regionList.end(); ++iter) {
|
| const RenderRegion* renderRegion = *iter;
|
| - // They will be included when we will properly support the Region interface
|
| - // http://dev.w3.org/csswg/css-regions/#the-region-interface
|
| - if (renderRegion->isPseudoElement())
|
| - continue;
|
| if (m_parentFlowThread->objectInFlowRegion(contentNode->renderer(), renderRegion))
|
| - regionNodes.append(renderRegion->node());
|
| + regionObjects.append(renderRegion);
|
| }
|
| }
|
|
|
| - return StaticNodeList::adopt(regionNodes);
|
| + return regionObjects;
|
| }
|
|
|
| -PassRefPtr<NodeList> NamedFlow::getRegions()
|
| +Vector<const RenderRegion*> NamedFlow::getRegions()
|
| {
|
| - Vector<RefPtr<Node> > regionNodes;
|
| + Vector<const RenderRegion*> regionObjects;
|
|
|
| if (m_flowManager->document())
|
| m_flowManager->document()->updateLayoutIgnorePendingStylesheets();
|
| @@ -158,19 +156,15 @@ PassRefPtr<NodeList> NamedFlow::getRegions()
|
| // The renderer may be destroyed or created after the style update.
|
| // Because this is called from JS, where the wrapper keeps a reference to the NamedFlow, no guard is necessary.
|
| if (!m_parentFlowThread)
|
| - return StaticNodeList::adopt(regionNodes);
|
| + return regionObjects;
|
|
|
| const RenderRegionList& regionList = m_parentFlowThread->renderRegionList();
|
| for (RenderRegionList::const_iterator iter = regionList.begin(); iter != regionList.end(); ++iter) {
|
| const RenderRegion* renderRegion = *iter;
|
| - // They will be included when we will properly support the Region interface
|
| - // http://dev.w3.org/csswg/css-regions/#the-region-interface
|
| - if (renderRegion->isPseudoElement())
|
| - continue;
|
| - regionNodes.append(renderRegion->node());
|
| + regionObjects.append(renderRegion);
|
| }
|
|
|
| - return StaticNodeList::adopt(regionNodes);
|
| + return regionObjects;
|
| }
|
|
|
| PassRefPtr<NodeList> NamedFlow::getContent()
|
|
|