[CSSRegions]Expose WebKitNamedFlowCollection interface through document.getNamedFlows()
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Aug 2012 21:46:24 +0000 (21:46 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Aug 2012 21:46:24 +0000 (21:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93368

Patch by Andrei Onea <onea@adobe.com> on 2012-08-24
Reviewed by Ryosuke Niwa.

Source/WebCore:

The WebKitNamedFlowCollection already implemented was being used by Document to store all
the named flows - regardless of state - so we need to use another class to expose to JS.
WebKitNamedFlowCollection was renamed to NamedFlowCollection since it is used only internally,
and the C++ class used to expose to JS is DOMNamedFlowCollection (with the interface name
WebKitNamedFlowCollection). DOMNamedFlowCollection is exposed via Document::webKitGetFlows(),
and it itself exposes the length property, the indexed getter, and the named getter.
http://dev.w3.org/csswg/css3-regions/#document-getnamedflows

Test: fast/regions/webkit-named-flow-collection.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
We need to use same trick as with HTMLPropertiesCollection, to make NamedGetter generate required code.
* dom/DOMAllInOne.cpp:
* dom/DOMNamedFlowCollection.cpp:
(WebCore):
(WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection):
(WebCore::DOMNamedFlowCollection::length):
(WebCore::DOMNamedFlowCollection::item):
(WebCore::DOMNamedFlowCollection::namedItem):
(WebCore::DOMNamedFlowCollection::hasNamedItem):
* dom/DOMNamedFlowCollection.h:
(WebCore):
(DOMNamedFlowCollection):
(WebCore::DOMNamedFlowCollection::create):
* dom/DOMNamedFlowCollection.idl:
* dom/Document.cpp:
(WebCore):
(WebCore::Document::webkitGetNamedFlows):
(WebCore::Document::namedFlows):
* dom/Document.h:
(WebCore):
(Document):
* dom/Document.idl:
* dom/NamedFlowCollection.cpp:
Renamed from Source/WebCore/dom/WebKitNamedFlowCollection.cpp.
(WebCore):
(WebCore::NamedFlowCollection::NamedFlowCollection):
(WebCore::NamedFlowCollection::namedFlows):
(WebCore::NamedFlowCollection::flowByName):
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
(WebCore::NamedFlowCollection::documentDestroyed):
(WebCore::NamedFlowCollection::createCSSOMSnapshot):
Used to create a snapshot of current named flows in CREATED state.
* dom/NamedFlowCollection.h:
Renamed from Source/WebCore/dom/WebKitNamedFlowCollection.h.
(WebCore):
(NamedFlowCollection):
(WebCore::NamedFlowCollection::create):
(WebCore::NamedFlowCollection::document):
(WebCore::NamedFlowCollection::~NamedFlowCollection):
(WebCore::NamedFlowCollection::NamedFlowHashFunctions::hash):
(WebCore::NamedFlowCollection::NamedFlowHashFunctions::equal):
(NamedFlowCollection::NamedFlowHashFunctions):
(WebCore::NamedFlowCollection::NamedFlowHashTranslator::hash):
(WebCore::NamedFlowCollection::NamedFlowHashTranslator::equal):
Moved NamedFlowHashFunctions and NamedFlowHashTranslator definitions to .h
and made them public, so they can be used in DOMNamedFlow as well.
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::create):
* dom/WebKitNamedFlow.h:
(WebCore):
(WebKitNamedFlow):
* inspector/InspectorCSSAgent.cpp:
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):

LayoutTests:

Added test for WebKitNamedFlowCollection interface.

* fast/regions/webkit-named-flow-collection-expected.txt: Added.
* fast/regions/webkit-named-flow-collection.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126627 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/regions/webkit-named-flow-collection-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-collection.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/dom/DOMAllInOne.cpp
Source/WebCore/dom/DOMNamedFlowCollection.cpp [new file with mode: 0644]
Source/WebCore/dom/DOMNamedFlowCollection.h [moved from Source/WebCore/dom/WebKitNamedFlowCollection.h with 61% similarity]
Source/WebCore/dom/DOMNamedFlowCollection.idl [new file with mode: 0644]
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/dom/NamedFlowCollection.cpp [moved from Source/WebCore/dom/WebKitNamedFlowCollection.cpp with 69% similarity]
Source/WebCore/dom/NamedFlowCollection.h [new file with mode: 0644]
Source/WebCore/dom/WebKitNamedFlow.cpp
Source/WebCore/dom/WebKitNamedFlow.h
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/rendering/FlowThreadController.cpp

index eed159a..4c60af1 100644 (file)
@@ -1,3 +1,15 @@
+2012-08-24  Andrei Onea  <onea@adobe.com>
+
+        [CSSRegions]Expose WebKitNamedFlowCollection interface through document.getNamedFlows()
+        https://bugs.webkit.org/show_bug.cgi?id=93368
+
+        Reviewed by Ryosuke Niwa.
+
+        Added test for WebKitNamedFlowCollection interface.
+
+        * fast/regions/webkit-named-flow-collection-expected.txt: Added.
+        * fast/regions/webkit-named-flow-collection.html: Added.
+
 2012-08-24  Mark Lam  <mark.lam@apple.com>
 
         Skipping svg/custom/getBBox-path.svg on platform mac.
diff --git a/LayoutTests/fast/regions/webkit-named-flow-collection-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-collection-expected.txt
new file mode 100644 (file)
index 0000000..9ce4560
--- /dev/null
@@ -0,0 +1,20 @@
+Tests WebKitNamedFlowCollection interface
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test WebKitNamedFlowCollection length property
+PASS document.webkitGetNamedFlows().length is 0
+PASS region1.style.webkitFlowFrom = 'flow1'; document.webkitGetNamedFlows().length is 1
+PASS region2.style.webkitFlowFrom = 'flow2'; document.webkitGetNamedFlows().length is 2
+PASS region1.style.webkitFlowFrom = ''; document.webkitGetNamedFlows().length is 1
+PASS region2.style.webkitFlowFrom = ''; document.webkitGetNamedFlows().length is 0
+Test WebKitNamedFlowCollection index getter
+PASS (document.webkitGetNamedFlows()[0].name == 'flow1' && document.webkitGetNamedFlows()[1].name == 'flow2')         || (document.webkitGetNamedFlows()[0].name == 'flow2' && document.webkitGetNamedFlows()[1].name == 'flow1') is true
+Test WebKitNamedFlowCollection name getter
+PASS document.webkitGetNamedFlows().flow1.name is "flow1"
+PASS document.webkitGetNamedFlows().flow2.name is "flow2"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/regions/webkit-named-flow-collection.html b/LayoutTests/fast/regions/webkit-named-flow-collection.html
new file mode 100644 (file)
index 0000000..545f469
--- /dev/null
@@ -0,0 +1,47 @@
+<!doctype html>
+<html>
+<body>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script>
+    description("Tests WebKitNamedFlowCollection interface")
+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    var region1 = document.createElement("div");
+    var region2 = document.createElement("div");
+
+    debug("Test WebKitNamedFlowCollection length property");
+
+    shouldBe("document.webkitGetNamedFlows().length", "0");
+
+    document.body.appendChild(region1);
+    shouldBe("region1.style.webkitFlowFrom = 'flow1'; document.webkitGetNamedFlows().length", "1");
+
+    document.body.appendChild(region2);
+    shouldBe("region2.style.webkitFlowFrom = 'flow2'; document.webkitGetNamedFlows().length", "2");
+
+    document.body.removeChild(region1);
+    shouldBe("region1.style.webkitFlowFrom = ''; document.webkitGetNamedFlows().length", "1");
+
+    document.body.removeChild(region2);
+    shouldBe("region2.style.webkitFlowFrom = ''; document.webkitGetNamedFlows().length", "0");
+
+    document.body.appendChild(region1);
+    document.body.appendChild(region2);
+    region1.style.webkitFlowFrom = 'flow1';
+    region2.style.webkitFlowFrom = 'flow2';
+
+    debug("Test WebKitNamedFlowCollection index getter");
+    shouldBeTrue("(document.webkitGetNamedFlows()[0].name == 'flow1' && document.webkitGetNamedFlows()[1].name == 'flow2') \
+        || (document.webkitGetNamedFlows()[0].name == 'flow2' && document.webkitGetNamedFlows()[1].name == 'flow1')");
+
+    debug("Test WebKitNamedFlowCollection name getter");
+    shouldBeEqualToString("document.webkitGetNamedFlows().flow1.name", "flow1");
+    shouldBeEqualToString("document.webkitGetNamedFlows().flow2.name", "flow2");
+
+    document.body.removeChild(region1);
+    document.body.removeChild(region2);
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index ddc3390..2ae36db 100644 (file)
@@ -391,6 +391,7 @@ SET(WebCore_IDL_FILES
     dom/UIEvent.idl
     dom/WebKitAnimationEvent.idl
     dom/WebKitNamedFlow.idl
+    dom/DOMNamedFlowCollection.idl
     dom/WebKitTransitionEvent.idl
     dom/WheelEvent.idl
 
@@ -1108,6 +1109,7 @@ SET(WebCore_SOURCES
     dom/DOMCoreException.cpp
     dom/DOMError.cpp
     dom/DOMImplementation.cpp
+    dom/DOMNamedFlowCollection.cpp
     dom/DOMStringList.cpp
     dom/DOMStringMap.cpp
     dom/Document.cpp
@@ -1154,6 +1156,7 @@ SET(WebCore_SOURCES
     dom/MutationObserverInterestGroup.cpp
     dom/MutationObserverRegistration.cpp
     dom/MutationRecord.cpp
+    dom/NamedFlowCollection.cpp
     dom/NamedNodeMap.cpp
     dom/NameNodeList.cpp
     dom/Node.cpp
@@ -1208,7 +1211,6 @@ SET(WebCore_SOURCES
     dom/ViewportArguments.cpp
     dom/WebKitAnimationEvent.cpp
     dom/WebKitNamedFlow.cpp
-    dom/WebKitNamedFlowCollection.cpp
     dom/WebKitTransitionEvent.cpp
     dom/WheelEvent.cpp
     dom/WindowEventContext.cpp
index f80c546..98af18b 100644 (file)
@@ -1,3 +1,89 @@
+2012-08-24  Andrei Onea  <onea@adobe.com>
+
+        [CSSRegions]Expose WebKitNamedFlowCollection interface through document.getNamedFlows()
+        https://bugs.webkit.org/show_bug.cgi?id=93368
+
+        Reviewed by Ryosuke Niwa.
+
+        The WebKitNamedFlowCollection already implemented was being used by Document to store all
+        the named flows - regardless of state - so we need to use another class to expose to JS.
+        WebKitNamedFlowCollection was renamed to NamedFlowCollection since it is used only internally,
+        and the C++ class used to expose to JS is DOMNamedFlowCollection (with the interface name
+        WebKitNamedFlowCollection). DOMNamedFlowCollection is exposed via Document::webKitGetFlows(),
+        and it itself exposes the length property, the indexed getter, and the named getter.
+        http://dev.w3.org/csswg/css3-regions/#document-getnamedflows
+
+        Test: fast/regions/webkit-named-flow-collection.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/gobject/GNUmakefile.am:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        We need to use same trick as with HTMLPropertiesCollection, to make NamedGetter generate required code.
+        * dom/DOMAllInOne.cpp:
+        * dom/DOMNamedFlowCollection.cpp:
+        (WebCore):
+        (WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection):
+        (WebCore::DOMNamedFlowCollection::length):
+        (WebCore::DOMNamedFlowCollection::item):
+        (WebCore::DOMNamedFlowCollection::namedItem):
+        (WebCore::DOMNamedFlowCollection::hasNamedItem):
+        * dom/DOMNamedFlowCollection.h:
+        (WebCore):
+        (DOMNamedFlowCollection):
+        (WebCore::DOMNamedFlowCollection::create):
+        * dom/DOMNamedFlowCollection.idl:
+        * dom/Document.cpp:
+        (WebCore):
+        (WebCore::Document::webkitGetNamedFlows):
+        (WebCore::Document::namedFlows):
+        * dom/Document.h:
+        (WebCore):
+        (Document):
+        * dom/Document.idl:
+        * dom/NamedFlowCollection.cpp:
+        Renamed from Source/WebCore/dom/WebKitNamedFlowCollection.cpp.
+        (WebCore):
+        (WebCore::NamedFlowCollection::NamedFlowCollection):
+        (WebCore::NamedFlowCollection::namedFlows):
+        (WebCore::NamedFlowCollection::flowByName):
+        (WebCore::NamedFlowCollection::ensureFlowWithName):
+        (WebCore::NamedFlowCollection::discardNamedFlow):
+        (WebCore::NamedFlowCollection::documentDestroyed):
+        (WebCore::NamedFlowCollection::createCSSOMSnapshot):
+        Used to create a snapshot of current named flows in CREATED state.
+        * dom/NamedFlowCollection.h:
+        Renamed from Source/WebCore/dom/WebKitNamedFlowCollection.h.
+        (WebCore):
+        (NamedFlowCollection):
+        (WebCore::NamedFlowCollection::create):
+        (WebCore::NamedFlowCollection::document):
+        (WebCore::NamedFlowCollection::~NamedFlowCollection):
+        (WebCore::NamedFlowCollection::NamedFlowHashFunctions::hash):
+        (WebCore::NamedFlowCollection::NamedFlowHashFunctions::equal):
+        (NamedFlowCollection::NamedFlowHashFunctions):
+        (WebCore::NamedFlowCollection::NamedFlowHashTranslator::hash):
+        (WebCore::NamedFlowCollection::NamedFlowHashTranslator::equal):
+        Moved NamedFlowHashFunctions and NamedFlowHashTranslator definitions to .h
+        and made them public, so they can be used in DOMNamedFlow as well.
+        * dom/WebKitNamedFlow.cpp:
+        (WebCore::WebKitNamedFlow::WebKitNamedFlow):
+        (WebCore::WebKitNamedFlow::create):
+        * dom/WebKitNamedFlow.h:
+        (WebCore):
+        (WebKitNamedFlow):
+        * inspector/InspectorCSSAgent.cpp:
+        * rendering/FlowThreadController.cpp:
+        (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
+
 2012-08-24  Chris Evans  <cevans@google.com>
 
         Update comment regarding root node handling in XPath for detached trees.
index 2763a4b..f00d556 100644 (file)
@@ -91,6 +91,7 @@
 #include "JSDOMImplementation.cpp"
 #include "JSDOMMimeType.cpp"
 #include "JSDOMMimeTypeArray.cpp"
+#include "JSDOMNamedFlowCollection.cpp"
 #include "JSDOMParser.cpp"
 #include "JSDOMPlugin.cpp"
 #include "JSDOMPluginArray.cpp"
index ff76c3a..4737a09 100644 (file)
@@ -236,6 +236,7 @@ BINDING_IDLS = \
     $(WebCore)/dom/MutationEvent.idl \
     $(WebCore)/dom/MutationObserver.idl \
     $(WebCore)/dom/MutationRecord.idl \
+    $(WebCore)/dom/DOMNamedFlowCollection.idl \
     $(WebCore)/dom/NamedNodeMap.idl \
     $(WebCore)/dom/Node.idl \
     $(WebCore)/dom/NodeFilter.idl \
index 7b5cd21..4145480 100644 (file)
@@ -267,6 +267,7 @@ IDL_BINDINGS += \
     $$PWD/dom/UIEvent.idl \
     $$PWD/dom/WebKitAnimationEvent.idl \
     $$PWD/dom/WebKitNamedFlow.idl \
+    $$PWD/dom/DOMNamedFlowCollection.idl \
     $$PWD/dom/WebKitTransitionEvent.idl \
     $$PWD/dom/WheelEvent.idl \
     $$PWD/editing/DOMTransaction.idl \
index b27784c..060a247 100644 (file)
@@ -188,6 +188,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSDOMMimeTypeArray.h \
        DerivedSources/WebCore/JSDOMMimeType.cpp \
        DerivedSources/WebCore/JSDOMMimeType.h \
+       DerivedSources/WebCore/JSDOMNamedFlowCollection.cpp \
+       DerivedSources/WebCore/JSDOMNamedFlowCollection.h \
        DerivedSources/WebCore/JSDOMParser.cpp \
        DerivedSources/WebCore/JSDOMParser.h \
        DerivedSources/WebCore/JSDOMPluginArray.cpp \
@@ -1348,6 +1350,7 @@ dom_binding_idls += \
        $(WebCore)/dom/MutationObserver.idl \
        $(WebCore)/dom/MutationRecord.idl \
        $(WebCore)/dom/NamedNodeMap.idl \
+       $(WebCore)/dom/DOMNamedFlowCollection.idl \
        $(WebCore)/dom/Node.idl \
        $(WebCore)/dom/NodeFilter.idl \
        $(WebCore)/dom/NodeIterator.idl \
@@ -2720,6 +2723,8 @@ webcore_sources += \
        Source/WebCore/dom/DOMError.h \
        Source/WebCore/dom/DOMImplementation.cpp \
        Source/WebCore/dom/DOMImplementation.h \
+    Source/WebCore/dom/DOMNamedFlowCollection.cpp \
+       Source/WebCore/dom/DOMNamedFlowCollection.h \
        Source/WebCore/dom/DOMStringList.cpp \
        Source/WebCore/dom/DOMStringList.h \
        Source/WebCore/dom/DOMStringMap.cpp \
@@ -2809,6 +2814,8 @@ webcore_sources += \
        Source/WebCore/dom/MutationObserverRegistration.h \
        Source/WebCore/dom/MutationRecord.cpp \
        Source/WebCore/dom/MutationRecord.h \
+       Source/WebCore/dom/NamedFlowCollection.cpp \
+       Source/WebCore/dom/NamedFlowCollection.h \
        Source/WebCore/dom/NamedNodeMap.cpp \
        Source/WebCore/dom/NamedNodeMap.h \
        Source/WebCore/dom/NameNodeList.cpp \
@@ -2922,8 +2929,6 @@ webcore_sources += \
        Source/WebCore/dom/WebKitAnimationEvent.h \
        Source/WebCore/dom/WebKitNamedFlow.cpp \
        Source/WebCore/dom/WebKitNamedFlow.h \
-       Source/WebCore/dom/WebKitNamedFlowCollection.cpp \
-       Source/WebCore/dom/WebKitNamedFlowCollection.h \
        Source/WebCore/dom/WebKitTransitionEvent.cpp \
        Source/WebCore/dom/WebKitTransitionEvent.h \
        Source/WebCore/dom/WheelEvent.cpp \
index 4741ca6..7bf321d 100644 (file)
@@ -375,6 +375,7 @@ SOURCES += \
     dom/DOMCoreException.cpp \
     dom/DOMError.cpp \
     dom/DOMImplementation.cpp \
+    dom/DOMNamedFlowCollection.cpp \
     dom/DOMStringList.cpp \
     dom/DOMStringMap.cpp \
     dom/DatasetDOMStringMap.cpp \
@@ -414,6 +415,8 @@ SOURCES += \
     dom/MutationObserverInterestGroup.cpp \
     dom/MutationObserverRegistration.cpp \
     dom/MutationRecord.cpp \
+    dom/WebKitNamedFlow.cpp \
+    dom/NamedFlowCollection.cpp \
     dom/NamedNodeMap.cpp \
     dom/NameNodeList.cpp \
     dom/Node.cpp \
@@ -466,8 +469,6 @@ SOURCES += \
     dom/UserTypingGestureIndicator.cpp \
     dom/ViewportArguments.cpp \
     dom/WebKitAnimationEvent.cpp \
-    dom/WebKitNamedFlow.cpp \
-    dom/WebKitNamedFlowCollection.cpp \
     dom/WebKitTransitionEvent.cpp \
     dom/WheelEvent.cpp \
     dom/WindowEventContext.cpp \
@@ -1558,6 +1559,7 @@ HEADERS += \
     dom/MutationObserver.h \
     dom/MutationObserverRegistration.h \
     dom/MutationRecord.h \
+    dom/NamedFlowCollection.h \
     dom/NamedNodeMap.h \
     dom/NameNodeList.h \
     dom/NodeFilterCondition.h \
@@ -1606,7 +1608,6 @@ HEADERS += \
     dom/ViewportArguments.h \
     dom/WebKitAnimationEvent.h \
     dom/WebKitNamedFlow.h \
-    dom/WebKitNamedFlowCollection.h \
     dom/WebKitTransitionEvent.h \
     dom/WheelEvent.h \
     editing/AlternativeTextController.h \
index 8ae34be..a44b8dc 100644 (file)
             'dom/MutationEvent.idl',
             'dom/MutationObserver.idl',
             'dom/MutationRecord.idl',
+            'dom/DOMNamedFlowCollection.idl',
             'dom/NamedNodeMap.idl',
             'dom/Node.idl',
             'dom/NodeFilter.idl',
             'dom/DOMError.cpp',
             'dom/DOMError.h',
             'dom/DOMImplementation.cpp',
+            'dom/DOMNamedFlowCollection.cpp',
+            'dom/DOMNamedFlowCollection.h',
             'dom/DOMStringList.cpp',
             'dom/DOMStringList.h',
             'dom/DOMStringMap.cpp',
             'dom/MutationObserverRegistration.h',
             'dom/MutationRecord.cpp',
             'dom/MutationRecord.h',
+            'dom/NamedFlowCollection.cpp',
+            'dom/NamedFlowCollection.h',
             'dom/NameNodeList.cpp',
             'dom/NameNodeList.h',
             'dom/NamedNodeMap.cpp',
             'dom/WebKitAnimationEvent.h',
             'dom/WebKitNamedFlow.cpp',
             'dom/WebKitNamedFlow.h',
-            'dom/WebKitNamedFlowCollection.cpp',
-            'dom/WebKitNamedFlowCollection.h',
             'dom/WebKitTransitionEvent.cpp',
             'dom/WebKitTransitionEvent.h',
             'dom/WheelEvent.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMCounterInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMImplementation.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMImplementationInternal.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMNamedFlowCollection.mm',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMNamedFlowCollectionInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMTokenList.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMTokenList.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMDOMTokenListInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMMimeType.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMMimeTypeArray.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMMimeTypeArray.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMNamedFlowCollection.cpp',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMNamedFlowCollection.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMParser.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMParser.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSDOMPlugin.cpp',
index 8822116..d7dd0ac 100755 (executable)
                                >
                        </File>
                        <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSDOMNamedFlowCollection.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Production|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSDOMNamedFlowCollection.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitPoint.cpp"
                                >
                                <FileConfiguration
                                >
                        </File>
                    <File
-                               RelativePath="..\dom\WebKitNamedFlowCollection.cpp"
+                               RelativePath="..\dom\NamedFlowCollection.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Production|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\dom\NamedFlowCollection.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\dom\DOMNamedFlowCollection.cpp"
                                >
                                <FileConfiguration
                                        Name="Debug|Win32"
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\dom\WebKitNamedFlowCollection.h"
+                               RelativePath="..\dom\DOMNamedFlowCollection.h"
                                >
                        </File>
                        <File
index 142a8cc..0585082 100644 (file)
                1059459D15B42B0C004D37FD /* JSPropertyNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1059459C15B42B0C004D37FD /* JSPropertyNodeList.cpp */; };
                1059459F15B42B1A004D37FD /* JSPropertyNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1059459E15B42B1A004D37FD /* JSPropertyNodeList.h */; };
                10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */; };
-               12F35EB6158745A40035CB63 /* WebKitNamedFlowCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 12F35EB4158745A40035CB63 /* WebKitNamedFlowCollection.h */; };
-               12F35EB7158745A40035CB63 /* WebKitNamedFlowCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 12F35EB5158745A40035CB63 /* WebKitNamedFlowCollection.cpp */; };
                1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1402645D0AFDC19B005919E2 /* LoggingMac.mm */; };
                1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1403B99509EB13AF00797C7F /* DOMWindow.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1403B99609EB13AF00797C7F /* DOMWindow.cpp */; };
                8A195932147EA16E00D1EA61 /* DOMWebKitNamedFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A19592F147EA16E00D1EA61 /* DOMWebKitNamedFlow.h */; };
                8A195933147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8A195930147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm */; };
                8A195934147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A195931147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h */; };
+               52CCA9E815E3F64C0053C77F /* DOMDOMNamedFlowCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 52CCA9E515E3F64C0053C77F /* DOMDOMNamedFlowCollection.h */; };
+               52CCA9E915E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52CCA9E615E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm */; };
+               52CCA9EA15E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 52CCA9E715E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h */; };
                8A309C9F123950BE00CB9204 /* NestingLevelIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A309C9E123950BE00CB9204 /* NestingLevelIncrementer.h */; };
                8A413AE01207BBA50082016E /* ScriptRunner.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A413ADE1207BBA50082016E /* ScriptRunner.h */; settings = {ATTRIBUTES = (Private, ); }; };
                8A413AE11207BBA50082016E /* ScriptRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A413ADF1207BBA50082016E /* ScriptRunner.cpp */; };
                D72F6D7A153159A3001EE44E /* FlowThreadController.h in Headers */ = {isa = PBXBuildFile; fileRef = D72F6D78153159A3001EE44E /* FlowThreadController.h */; };
                D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */; };
                D7613AC414753E5600DB8606 /* JSWebKitNamedFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */; };
+               52B6C9C215E3F4DF00690B05 /* DOMNamedFlowCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52B6C9BD15E3F4DF00690B05 /* DOMNamedFlowCollection.cpp */; };
+               52B6C9C315E3F4DF00690B05 /* DOMNamedFlowCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B6C9BE15E3F4DF00690B05 /* DOMNamedFlowCollection.h */; };
+               52B6C9C515E3F4DF00690B05 /* NamedFlowCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52B6C9C015E3F4DF00690B05 /* NamedFlowCollection.cpp */; };
+               52B6C9C615E3F4DF00690B05 /* NamedFlowCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B6C9C115E3F4DF00690B05 /* NamedFlowCollection.h */; };
+               52CCA9E215E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52CCA9E015E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp */; };
+               52CCA9E315E3F62C0053C77F /* JSDOMNamedFlowCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 52CCA9E115E3F62C0053C77F /* JSDOMNamedFlowCollection.h */; };
                D8B6152F1032495100C8554A /* Cookie.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6152E1032495100C8554A /* Cookie.h */; settings = {ATTRIBUTES = (Private, ); }; };
                DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */; };
                DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */; };
                1059459C15B42B0C004D37FD /* JSPropertyNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPropertyNodeList.cpp; sourceTree = "<group>"; };
                1059459E15B42B1A004D37FD /* JSPropertyNodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPropertyNodeList.h; sourceTree = "<group>"; };
                10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicURLManager.h; sourceTree = "<group>"; };
-               12F35EB4158745A40035CB63 /* WebKitNamedFlowCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNamedFlowCollection.h; sourceTree = "<group>"; };
-               12F35EB5158745A40035CB63 /* WebKitNamedFlowCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitNamedFlowCollection.cpp; sourceTree = "<group>"; };
                1402645D0AFDC19B005919E2 /* LoggingMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = LoggingMac.mm; sourceTree = "<group>"; };
                1403B90C09EB124500797C7F /* DOMWindow.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMWindow.idl; sourceTree = "<group>"; };
                1403B99509EB13AF00797C7F /* DOMWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindow.h; sourceTree = "<group>"; };
                8A19592F147EA16E00D1EA61 /* DOMWebKitNamedFlow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitNamedFlow.h; sourceTree = "<group>"; };
                8A195930147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitNamedFlow.mm; sourceTree = "<group>"; };
                8A195931147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitNamedFlowInternal.h; sourceTree = "<group>"; };
+               52CCA9E515E3F64C0053C77F /* DOMDOMNamedFlowCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMDOMNamedFlowCollection.h; path = DOMDOMNamedFlowCollection.h; sourceTree = "<group>"; };
+               52CCA9E615E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DOMDOMNamedFlowCollection.mm; path = DOMDOMNamedFlowCollection.mm; sourceTree = "<group>"; };
+               52CCA9E715E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMDOMNamedFlowCollectionInternal.h; path = DOMDOMNamedFlowCollectionInternal.h; sourceTree = "<group>"; };
                8A309C9E123950BE00CB9204 /* NestingLevelIncrementer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NestingLevelIncrementer.h; path = parser/NestingLevelIncrementer.h; sourceTree = "<group>"; };
                8A413ADE1207BBA50082016E /* ScriptRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptRunner.h; sourceTree = "<group>"; };
                8A413ADF1207BBA50082016E /* ScriptRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptRunner.cpp; sourceTree = "<group>"; };
                D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitNamedFlow.cpp; sourceTree = "<group>"; };
                D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitNamedFlow.cpp; sourceTree = "<group>"; };
                D7613AC314753E5600DB8606 /* JSWebKitNamedFlow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitNamedFlow.h; sourceTree = "<group>"; };
+               52B6C9BD15E3F4DF00690B05 /* DOMNamedFlowCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMNamedFlowCollection.cpp; sourceTree = "<group>"; };
+               52B6C9BE15E3F4DF00690B05 /* DOMNamedFlowCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMNamedFlowCollection.h; sourceTree = "<group>"; };
+               52B6C9BF15E3F4DF00690B05 /* DOMNamedFlowCollection.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMNamedFlowCollection.idl; sourceTree = "<group>"; };
+               52B6C9C015E3F4DF00690B05 /* NamedFlowCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NamedFlowCollection.cpp; sourceTree = "<group>"; };
+               52B6C9C115E3F4DF00690B05 /* NamedFlowCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedFlowCollection.h; sourceTree = "<group>"; };
+               52CCA9E015E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMNamedFlowCollection.cpp; path = JSDOMNamedFlowCollection.cpp; sourceTree = "<group>"; };
+               52CCA9E115E3F62C0053C77F /* JSDOMNamedFlowCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMNamedFlowCollection.h; path = JSDOMNamedFlowCollection.h; sourceTree = "<group>"; };
                D8B6152E1032495100C8554A /* Cookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cookie.h; sourceTree = "<group>"; };
                DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndentOutdentCommand.cpp; sourceTree = "<group>"; };
                DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndentOutdentCommand.h; sourceTree = "<group>"; };
                                8A19592F147EA16E00D1EA61 /* DOMWebKitNamedFlow.h */,
                                8A195930147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm */,
                                8A195931147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h */,
+                               52CCA9E515E3F64C0053C77F /* DOMDOMNamedFlowCollection.h */,
+                               52CCA9E615E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm */,
+                               52CCA9E715E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h */,
                        );
                        name = Core;
                        sourceTree = "<group>";
                A83B79100CCB001B000B0825 /* Core */ = {
                        isa = PBXGroup;
                        children = (
+                               52CCA9E015E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp */,
+                               52CCA9E115E3F62C0053C77F /* JSDOMNamedFlowCollection.h */,
                                65DF31D809D1C122000BE325 /* JSAttr.cpp */,
                                65DF31D909D1C123000BE325 /* JSAttr.h */,
                                93F9B79E0BA6032600854064 /* JSCDATASection.cpp */,
                F523D32402DE4478018635CA /* dom */ = {
                        isa = PBXGroup;
                        children = (
+                               52B6C9BF15E3F4DF00690B05 /* DOMNamedFlowCollection.idl */,
+                               52B6C9C015E3F4DF00690B05 /* NamedFlowCollection.cpp */,
+                               52B6C9C115E3F4DF00690B05 /* NamedFlowCollection.h */,
                                E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */,
                                E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
                                A8C4A7FC09D563270003AC8D /* Attr.cpp */,
                                A8185F3609765765005826D9 /* DOMImplementation.cpp */,
                                A8185F3309765765005826D9 /* DOMImplementation.h */,
                                93EEC1E909C2877700C515D1 /* DOMImplementation.idl */,
+                               52B6C9BD15E3F4DF00690B05 /* DOMNamedFlowCollection.cpp */,
+                               52B6C9BE15E3F4DF00690B05 /* DOMNamedFlowCollection.h */,
                                C55610F011A704EB00B82D27 /* DOMStringList.cpp */,
                                C544274911A57E7A0063A749 /* DOMStringList.h */,
                                C544274A11A57E7A0063A749 /* DOMStringList.idl */,
                                D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */,
                                D7613A4D1474F13F00DB8606 /* WebKitNamedFlow.h */,
                                D7613A4A1474EE9500DB8606 /* WebKitNamedFlow.idl */,
-                               12F35EB5158745A40035CB63 /* WebKitNamedFlowCollection.cpp */,
-                               12F35EB4158745A40035CB63 /* WebKitNamedFlowCollection.h */,
                                31C0FF1E0E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp */,
                                31C0FF1F0E4CEB6E007D6FE5 /* WebKitTransitionEvent.h */,
                                31C0FF200E4CEB6E007D6FE5 /* WebKitTransitionEvent.idl */,
                                85E711960AC5D5350053270F /* DOMDocumentTypeInternal.h in Headers */,
                                8518DCE90A9CC80D0091B7A6 /* DOMDOMImplementation.h in Headers */,
                                85E711970AC5D5350053270F /* DOMDOMImplementationInternal.h in Headers */,
+                               52CCA9E815E3F64C0053C77F /* DOMDOMNamedFlowCollection.h in Headers */,
+                               52CCA9EA15E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h in Headers */,
                                2D9A247415B9C2E300D34527 /* DOMDOMSecurityPolicy.h in Headers */,
                                2D9A247515B9C2E300D34527 /* DOMDOMSecurityPolicyInternal.h in Headers */,
                                9B3A8872145632F9003AE8F5 /* DOMDOMSettableTokenList.h in Headers */,
                                85989DCD0ACC8BBD00A0BC51 /* DOMMouseEventInternal.h in Headers */,
                                85C7F5BF0AAFB7CC004014DD /* DOMMutationEvent.h in Headers */,
                                85989DCE0ACC8BBD00A0BC51 /* DOMMutationEventInternal.h in Headers */,
+                               52B6C9C315E3F4DF00690B05 /* DOMNamedFlowCollection.h in Headers */,
                                8518DD780A9CF31B0091B7A6 /* DOMNamedNodeMap.h in Headers */,
                                85E711D20AC5D5350053270F /* DOMNamedNodeMapInternal.h in Headers */,
                                853BF4DB0ABB6B55008647BB /* DOMNode.h in Headers */,
                                2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */,
                                E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */,
                                65DF31F809D1CC60000BE325 /* JSDOMImplementation.h in Headers */,
+                               52CCA9E315E3F62C0053C77F /* JSDOMNamedFlowCollection.h in Headers */,
                                A9D248070D757E7D00FDF959 /* JSDOMMimeType.h in Headers */,
                                A9D248090D757E7D00FDF959 /* JSDOMMimeTypeArray.h in Headers */,
                                1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */,
                                D6E528A4149A926D00EFE1F3 /* MutationObserverInterestGroup.h in Headers */,
                                D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */,
                                C6F08FBD1430FE8F00685849 /* MutationRecord.h in Headers */,
+                               52B6C9C615E3F4DF00690B05 /* NamedFlowCollection.h in Headers */,
                                A81872230977D3C0005826D9 /* NamedNodeMap.h in Headers */,
                                A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
                                6B3480940EEF50D400AC1B41 /* NativeImagePtr.h in Headers */,
                                29CD61DE146D02890068E82A /* WebKitCSSShaderValue.h in Headers */,
                                0562F9471573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.h in Headers */,
                                BC9ADD230CC4032600098C4C /* WebKitCSSTransformValue.h in Headers */,
-                               12F35EB6158745A40035CB63 /* WebKitNamedFlowCollection.h in Headers */,
                                494BD7950F55C8EE00747828 /* WebKitPoint.h in Headers */,
                                31C0FF250E4CEB6E007D6FE5 /* WebKitTransitionEvent.h in Headers */,
                                0FCF332F0F2B9A25004B6795 /* WebLayer.h in Headers */,
                                85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
                                1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
                                1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
+                               52B6C9C415E3F4DF00690B05 /* DOMNamedFlowCollection.idl in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                BC9ADD800CC4092200098C4C /* WebKitCSSTransformValue.cpp in Sources */,
                                1A1414B513A0F0500019996C /* WebKitFontFamilyNames.cpp in Sources */,
                                D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */,
-                               12F35EB7158745A40035CB63 /* WebKitNamedFlowCollection.cpp in Sources */,
                                31C0FF240E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp in Sources */,
                                0FCF332E0F2B9A25004B6795 /* WebLayer.mm in Sources */,
                                E1A3162E134BC32D007C9A4F /* WebNSAttributedStringExtras.mm in Sources */,
                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
                                977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
                                FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
+                               52B6C9C215E3F4DF00690B05 /* DOMNamedFlowCollection.cpp in Sources */,
+                               52B6C9C515E3F4DF00690B05 /* NamedFlowCollection.cpp in Sources */,
+                               52CCA9E215E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp in Sources */,
+                               52CCA9E915E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 44a51cd..4d9933f 100644 (file)
@@ -39,6 +39,7 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMDOMMimeTypeArrayPrivate.h \
        DerivedSources/webkit/WebKitDOMDOMMimeType.cpp \
        DerivedSources/webkit/WebKitDOMDOMMimeTypePrivate.h \
+       DerivedSources/webkit/WebKitDOMDOMNamedFlowCollection.cpp \
        DerivedSources/webkit/WebKitDOMDOMPluginArray.cpp \
        DerivedSources/webkit/WebKitDOMDOMPluginArrayPrivate.h \
        DerivedSources/webkit/WebKitDOMDOMPlugin.cpp \
@@ -281,6 +282,7 @@ webkitgtk_built_h_api += \
        DerivedSources/webkit/WebKitDOMDocumentFragment.h \
        DerivedSources/webkit/WebKitDOMDocumentType.h \
        DerivedSources/webkit/WebKitDOMDOMImplementation.h \
+       DerivedSources/webkit/WebKitDOMDOMNamedFlowCollection.h \
        DerivedSources/webkit/WebKitDOMDOMSettableTokenList.h \
        DerivedSources/webkit/WebKitDOMDOMSecurityPolicy.h \
        DerivedSources/webkit/WebKitDOMDOMStringList.h \
index 758c33b..2f9258f 100644 (file)
@@ -2367,7 +2367,7 @@ sub GenerateImplementation
         }
     }
 
-    if ($interfaceName eq "HTMLPropertiesCollection") {
+    if ($interfaceName eq "HTMLPropertiesCollection" or $interfaceName eq "DOMNamedFlowCollection") {
         if ($dataNode->extendedAttributes->{"NamedGetter"}) {
             push(@implContent, "bool ${className}::canGetItemsForName(ExecState*, $implClassName* collection, PropertyName propertyName)\n");
             push(@implContent, "{\n");
index be7bd07..fcb5695 100644 (file)
@@ -48,6 +48,7 @@
 #include "CustomEvent.cpp"
 #include "DOMCoreException.cpp"
 #include "DOMImplementation.cpp"
+#include "DOMNamedFlowCollection.cpp"
 #include "DOMStringList.cpp"
 #include "DOMStringMap.cpp"
 #include "DatasetDOMStringMap.cpp"
 #include "MutationObserverRegistration.cpp"
 #include "MutationRecord.cpp"
 #include "NameNodeList.cpp"
+#include "NamedFlowCollection.cpp"
 #include "NodeFilter.cpp"
 #include "NodeFilterCondition.cpp"
 #include "NodeIterator.cpp"
 #include "ViewportArguments.cpp"
 #include "WebKitAnimationEvent.cpp"
 #include "WebKitNamedFlow.cpp"
-#include "WebKitNamedFlowCollection.cpp"
 #include "WebKitTransitionEvent.cpp"
 #include "WheelEvent.cpp"
 #include "WindowEventContext.cpp"
diff --git a/Source/WebCore/dom/DOMNamedFlowCollection.cpp b/Source/WebCore/dom/DOMNamedFlowCollection.cpp
new file mode 100644 (file)
index 0000000..30fbab3
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials
+ *    provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include "config.h"
+#include "DOMNamedFlowCollection.h"
+
+#include "NamedFlowCollection.h"
+#include "WebKitNamedFlow.h"
+
+namespace WebCore {
+
+DOMNamedFlowCollection::DOMNamedFlowCollection(NamedFlowCollection::NamedFlowSet& set)
+{
+    m_namedFlows.swap(set);
+}
+
+unsigned long DOMNamedFlowCollection::length() const
+{
+    return m_namedFlows.size();
+}
+
+PassRefPtr<WebKitNamedFlow> DOMNamedFlowCollection::item(unsigned long index) const
+{
+    if (index >= static_cast<unsigned long>(m_namedFlows.size()))
+        return 0;
+    NamedFlowCollection::NamedFlowSet::const_iterator it = m_namedFlows.begin();
+    for (unsigned long i = 0; i < index; ++i)
+        ++it;
+    return *it;
+}
+
+PassRefPtr<WebKitNamedFlow> DOMNamedFlowCollection::namedItem(const AtomicString& name) const
+{
+    NamedFlowCollection::NamedFlowSet::const_iterator it = m_namedFlows.find<String, NamedFlowCollection::NamedFlowHashTranslator>(name);
+    if (it != m_namedFlows.end())
+        return *it;
+    return 0;
+}
+
+bool DOMNamedFlowCollection::hasNamedItem(const AtomicString& name) const
+{
+    return namedItem(name);
+}
+} // namespace WebCore
+
+
+
similarity index 61%
rename from Source/WebCore/dom/WebKitNamedFlowCollection.h
rename to Source/WebCore/dom/DOMNamedFlowCollection.h
index bf01d4b..02fb58c 100644 (file)
  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+#ifndef DOMNamedFlowCollection_h
+#define DOMNamedFlowCollection_h
 
-#ifndef WebKitNamedFlowCollection_h
-#define WebKitNamedFlowCollection_h
-
-#include <wtf/Forward.h>
-#include <wtf/ListHashSet.h>
+#include "NamedFlowCollection.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
 
 namespace WebCore {
 
 class Document;
 class WebKitNamedFlow;
 
-class WebKitNamedFlowCollection : public RefCounted<WebKitNamedFlowCollection> {
+class DOMNamedFlowCollection : public RefCounted<DOMNamedFlowCollection> {
 public:
-    static PassRefPtr<WebKitNamedFlowCollection> create(Document* doc) { return adoptRef(new WebKitNamedFlowCollection(doc)); }
-
-    Vector<RefPtr<WebKitNamedFlow> > namedFlows();
-    WebKitNamedFlow* flowByName(const String&);
-    PassRefPtr<WebKitNamedFlow> ensureFlowWithName(const String&);
+    static PassRefPtr<DOMNamedFlowCollection> create(NamedFlowCollection::NamedFlowSet& set)
+    {
+        return adoptRef(new DOMNamedFlowCollection(set));
+    }
 
-    void discardNamedFlow(WebKitNamedFlow*);
+    unsigned long length() const;
+    PassRefPtr<WebKitNamedFlow> item(unsigned long index) const;
+    PassRefPtr<WebKitNamedFlow> namedItem(const AtomicString& name) const;
 
-    void documentDestroyed();
-
-    Document* document() const { return m_document; }
+    bool hasNamedItem(const AtomicString& name) const;
 
 private:
-    explicit WebKitNamedFlowCollection(Document*);
-
-    Document* m_document;
-
-    struct NamedFlowHashFunctions;
-    struct NamedFlowHashTranslator;
-
-    typedef ListHashSet<WebKitNamedFlow*, 1, NamedFlowHashFunctions> NamedFlowSet;
-
-    NamedFlowSet m_namedFlows;
+    explicit DOMNamedFlowCollection(NamedFlowCollection::NamedFlowSet&);
+    NamedFlowCollection::NamedFlowSet m_namedFlows;
 };
 
 } // namespace WebCore
+#endif
 
-#endif // WebKitNamedFlowCollection_h
diff --git a/Source/WebCore/dom/DOMNamedFlowCollection.idl b/Source/WebCore/dom/DOMNamedFlowCollection.idl
new file mode 100644 (file)
index 0000000..3e9f3a1
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials
+ *    provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+module core {
+    interface [
+        Conditional=CSS_REGIONS,
+        InterfaceName=WebKitNamedFlowCollection,
+        JSGenerateToJSObject,
+        IndexedGetter,
+        NamedGetter
+    ] DOMNamedFlowCollection {
+        readonly attribute unsigned long length;
+        WebKitNamedFlow item(in unsigned long index);
+        WebKitNamedFlow namedItem(in DOMString name);
+    };
+}
+
index b495e22..91fa2e8 100644 (file)
@@ -47,6 +47,7 @@
 #include "ContextFeatures.h"
 #include "CookieJar.h"
 #include "DOMImplementation.h"
+#include "DOMNamedFlowCollection.h"
 #include "DOMSelection.h"
 #include "DOMWindow.h"
 #include "DateComponents.h"
 #include "MemoryInstrumentation.h"
 #include "MouseEventWithHitTestResults.h"
 #include "NameNodeList.h"
+#include "NamedFlowCollection.h"
 #include "NestingLevelIncrementer.h"
 #include "NewXMLDocumentParser.h"
 #include "NodeFilter.h"
 #include "UndoManager.h"
 #include "UserContentURLPattern.h"
 #include "WebKitNamedFlow.h"
-#include "WebKitNamedFlowCollection.h"
 #include "XMLDocumentParser.h"
 #include "XMLHttpRequest.h"
 #include "XMLNSNames.h"
@@ -1157,12 +1158,23 @@ PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName
 
     return namedFlows()->flowByName(flowName);
 }
+
+PassRefPtr<DOMNamedFlowCollection> Document::webkitGetNamedFlows()
+{
+    if (!cssRegionsEnabled() || !renderer())
+        return 0;
+
+    updateStyleIfNeeded();
+
+    return namedFlows()->createCSSOMSnapshot();
+}
+
 #endif
 
-WebKitNamedFlowCollection* Document::namedFlows()
+NamedFlowCollection* Document::namedFlows()
 {
     if (!m_namedFlows)
-        m_namedFlows = WebKitNamedFlowCollection::create(this);
+        m_namedFlows = NamedFlowCollection::create(this);
 
     return m_namedFlows.get();
 }
index a0419aa..b85c544 100644 (file)
@@ -69,6 +69,7 @@ class CharacterData;
 class Comment;
 class ContextFeatures;
 class DOMImplementation;
+class DOMNamedFlowCollection;
 class DOMSelection;
 class DOMWindow;
 class Database;
@@ -110,6 +111,7 @@ class MediaCanStartListener;
 class MediaQueryList;
 class MediaQueryMatcher;
 class MouseEventWithHitTestResults;
+class NamedFlowCollection;
 class NodeFilter;
 class NodeIterator;
 class NodeRareData;
@@ -138,7 +140,6 @@ class TextResourceDecoder;
 class TreeWalker;
 class UndoManager;
 class WebKitNamedFlow;
-class WebKitNamedFlowCollection;
 class XMLHttpRequest;
 class XPathEvaluator;
 class XPathExpression;
@@ -352,9 +353,10 @@ public:
     bool cssRegionsEnabled() const;
 #if ENABLE(CSS_REGIONS)
     PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&);
+    PassRefPtr<DOMNamedFlowCollection> webkitGetNamedFlows();
 #endif
 
-    WebKitNamedFlowCollection* namedFlows();
+    NamedFlowCollection* namedFlows();
 
     bool regionBasedColumnsEnabled() const;
 
@@ -1560,7 +1562,7 @@ private:
     bool m_visualUpdatesAllowed;
     Timer<Document> m_visualUpdatesSuppressionTimer;
 
-    RefPtr<WebKitNamedFlowCollection> m_namedFlows;
+    RefPtr<NamedFlowCollection> m_namedFlows;
 
 #if ENABLE(CSP_NEXT)
     RefPtr<DOMSecurityPolicy> m_domSecurityPolicy;
index b83f40c..bba4322 100644 (file)
@@ -268,9 +268,8 @@ module core {
         [Conditional=POINTER_LOCK, V8EnabledAtRuntime=pointerLock] void webkitExitPointerLock();
         readonly attribute [Conditional=POINTER_LOCK, V8EnabledAtRuntime=pointerLock] Element webkitPointerLockElement;
 
-#if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
-        WebKitNamedFlow webkitGetFlowByName(in DOMString name);
-#endif
+        [Conditional=CSS_REGIONS] WebKitNamedFlow webkitGetFlowByName(in DOMString name);
+        [Conditional=CSS_REGIONS] DOMNamedFlowCollection webkitGetNamedFlows();
 
 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
         // Event handler DOM attributes
@@ -28,8 +28,9 @@
  */
 
 #include "config.h"
-#include "WebKitNamedFlowCollection.h"
+#include "NamedFlowCollection.h"
 
+#include "DOMNamedFlowCollection.h"
 #include "Document.h"
 #include "InspectorInstrumentation.h"
 #include "WebKitNamedFlow.h"
 
 namespace WebCore {
 
-WebKitNamedFlowCollection::WebKitNamedFlowCollection(Document* doc)
+NamedFlowCollection::NamedFlowCollection(Document* doc)
     : m_document(doc)
 {
 }
 
-Vector<RefPtr<WebKitNamedFlow> > WebKitNamedFlowCollection::namedFlows()
+Vector<RefPtr<WebKitNamedFlow> > NamedFlowCollection::namedFlows()
 {
     Vector<RefPtr<WebKitNamedFlow> > namedFlows;
 
@@ -58,7 +59,7 @@ Vector<RefPtr<WebKitNamedFlow> > WebKitNamedFlowCollection::namedFlows()
     return namedFlows;
 }
 
-WebKitNamedFlow* WebKitNamedFlowCollection::flowByName(const String& flowName)
+WebKitNamedFlow* NamedFlowCollection::flowByName(const String& flowName)
 {
     NamedFlowSet::iterator it = m_namedFlows.find<String, NamedFlowHashTranslator>(flowName);
     if (it == m_namedFlows.end() || (*it)->flowState() == WebKitNamedFlow::FlowStateNull)
@@ -67,7 +68,7 @@ WebKitNamedFlow* WebKitNamedFlowCollection::flowByName(const String& flowName)
     return *it;
 }
 
-PassRefPtr<WebKitNamedFlow> WebKitNamedFlowCollection::ensureFlowWithName(const String& flowName)
+PassRefPtr<WebKitNamedFlow> NamedFlowCollection::ensureFlowWithName(const String& flowName)
 {
     NamedFlowSet::iterator it = m_namedFlows.find<String, NamedFlowHashTranslator>(flowName);
     if (it != m_namedFlows.end()) {
@@ -85,7 +86,7 @@ PassRefPtr<WebKitNamedFlow> WebKitNamedFlowCollection::ensureFlowWithName(const
     return newFlow.release();
 }
 
-void WebKitNamedFlowCollection::discardNamedFlow(WebKitNamedFlow* namedFlow)
+void NamedFlowCollection::discardNamedFlow(WebKitNamedFlow* namedFlow)
 {
     // The document is not valid anymore so the collection will be destroyed anyway.
     if (!m_document)
@@ -99,23 +100,17 @@ void WebKitNamedFlowCollection::discardNamedFlow(WebKitNamedFlow* namedFlow)
     InspectorInstrumentation::didRemoveNamedFlow(m_document, namedFlow->name());
 }
 
-void WebKitNamedFlowCollection::documentDestroyed()
+void NamedFlowCollection::documentDestroyed()
 {
     m_document = 0;
 }
-
-// The HashFunctions object used by the HashSet to compare between NamedFlows.
-// It is safe to set safeToCompareToEmptyOrDeleted because the HashSet will never contain null pointers or deleted values.
-struct WebKitNamedFlowCollection::NamedFlowHashFunctions {
-    static unsigned hash(WebKitNamedFlow* key) { return DefaultHash<String>::Hash::hash(key->name()); }
-    static bool equal(WebKitNamedFlow* a, WebKitNamedFlow* b) { return a->name() == b->name(); }
-    static const bool safeToCompareToEmptyOrDeleted = true;
-};
-
-// The HashTranslator is used to lookup a NamedFlow in the set using a name.
-struct WebKitNamedFlowCollection::NamedFlowHashTranslator {
-    static unsigned hash(const String& key) { return DefaultHash<String>::Hash::hash(key); }
-    static bool equal(WebKitNamedFlow* a, const String& b) { return a->name() == b; }
-};
+PassRefPtr<DOMNamedFlowCollection> NamedFlowCollection::createCSSOMSnapshot()
+{
+    NamedFlowSet createdFlows;
+    for (NamedFlowSet::iterator it = m_namedFlows.begin(); it != m_namedFlows.end(); ++it)
+        if ((*it)->flowState() == WebKitNamedFlow::FlowStateCreated)
+            createdFlows.add(*it);
+    return DOMNamedFlowCollection::create(createdFlows);
+}
 
 } // namespace WebCore
diff --git a/Source/WebCore/dom/NamedFlowCollection.h b/Source/WebCore/dom/NamedFlowCollection.h
new file mode 100644 (file)
index 0000000..175b5e7
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials
+ *    provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef NamedFlowCollection_h
+#define NamedFlowCollection_h
+
+#include "WebKitNamedFlow.h"
+#include <wtf/Forward.h>
+#include <wtf/ListHashSet.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class Document;
+class DOMNamedFlowCollection;
+
+class NamedFlowCollection : public RefCounted<NamedFlowCollection> {
+public:
+    static PassRefPtr<NamedFlowCollection> create(Document* doc) { return adoptRef(new NamedFlowCollection(doc)); }
+
+    Vector<RefPtr<WebKitNamedFlow> > namedFlows();
+    WebKitNamedFlow* flowByName(const String&);
+    PassRefPtr<WebKitNamedFlow> ensureFlowWithName(const String&);
+
+    void discardNamedFlow(WebKitNamedFlow*);
+
+    void documentDestroyed();
+
+    Document* document() const { return m_document; }
+
+    virtual ~NamedFlowCollection() { }
+
+    PassRefPtr<DOMNamedFlowCollection> createCSSOMSnapshot();
+
+    struct NamedFlowHashFunctions;
+    struct NamedFlowHashTranslator;
+
+    typedef ListHashSet<WebKitNamedFlow*, 1, NamedFlowHashFunctions> NamedFlowSet;
+
+private:
+
+    explicit NamedFlowCollection(Document*);
+
+    Document* m_document;
+    NamedFlowSet m_namedFlows;
+};
+
+// The HashFunctions object used by the HashSet to compare between NamedFlows.
+// It is safe to set safeToCompareToEmptyOrDeleted because the HashSet will never contain null pointers or deleted values.
+struct NamedFlowCollection::NamedFlowHashFunctions {
+    static unsigned hash(WebKitNamedFlow* key) { return DefaultHash<String>::Hash::hash(key->name()); }
+    static bool equal(WebKitNamedFlow* a, WebKitNamedFlow* b) { return a->name() == b->name(); }
+    static const bool safeToCompareToEmptyOrDeleted = true;
+};
+
+// The HashTranslator is used to lookup a NamedFlow in the set using a name.
+struct NamedFlowCollection::NamedFlowHashTranslator {
+    static unsigned hash(const String& key) { return DefaultHash<String>::Hash::hash(key); }
+    static bool equal(WebKitNamedFlow* a, const String& b) { return a->name() == b; }
+};
+} // namespace WebCore
+
+#endif // NamedFlowCollection_h
index aa5901b..142788b 100644 (file)
 #include "WebKitNamedFlow.h"
 
 #include "EventNames.h"
+#include "NamedFlowCollection.h"
 #include "RenderNamedFlowThread.h"
 #include "RenderRegion.h"
 #include "ScriptExecutionContext.h"
 #include "StaticNodeList.h"
 #include "UIEvent.h"
-#include "WebKitNamedFlowCollection.h"
 
 namespace WebCore {
 
-WebKitNamedFlow::WebKitNamedFlow(PassRefPtr<WebKitNamedFlowCollection> manager, const AtomicString& flowThreadName)
+WebKitNamedFlow::WebKitNamedFlow(PassRefPtr<NamedFlowCollection> manager, const AtomicString& flowThreadName)
     : m_flowThreadName(flowThreadName)
     , m_flowManager(manager)
     , m_parentFlowThread(0)
@@ -53,7 +53,7 @@ WebKitNamedFlow::~WebKitNamedFlow()
     m_flowManager->discardNamedFlow(this);
 }
 
-PassRefPtr<WebKitNamedFlow> WebKitNamedFlow::create(PassRefPtr<WebKitNamedFlowCollection> manager, const AtomicString& flowThreadName)
+PassRefPtr<WebKitNamedFlow> WebKitNamedFlow::create(PassRefPtr<NamedFlowCollection> manager, const AtomicString& flowThreadName)
 {
     return adoptRef(new WebKitNamedFlow(manager, flowThreadName));
 }
index b51eadf..9069ad5 100644 (file)
 namespace WebCore {
 
 class Document;
+class NamedFlowCollection;
 class Node;
 class NodeList;
 class RenderNamedFlowThread;
 class ScriptExecutionContext;
-class WebKitNamedFlowCollection;
 
 class WebKitNamedFlow : public RefCounted<WebKitNamedFlow>, public EventTarget {
 public:
-    static PassRefPtr<WebKitNamedFlow> create(PassRefPtr<WebKitNamedFlowCollection> manager, const AtomicString& flowThreadName);
+    static PassRefPtr<WebKitNamedFlow> create(PassRefPtr<NamedFlowCollection> manager, const AtomicString& flowThreadName);
 
     ~WebKitNamedFlow();
 
@@ -81,7 +81,7 @@ public:
     void dispatchRegionLayoutUpdateEvent();
 
 private:
-    WebKitNamedFlow(PassRefPtr<WebKitNamedFlowCollection>, const AtomicString&);
+    WebKitNamedFlow(PassRefPtr<NamedFlowCollection>, const AtomicString&);
 
     // EventTarget implementation.
     virtual void refEventTarget() { ref(); }
@@ -93,7 +93,7 @@ private:
     // The name of the flow thread as specified in CSS.
     AtomicString m_flowThreadName;
 
-    RefPtr<WebKitNamedFlowCollection> m_flowManager;
+    RefPtr<NamedFlowCollection> m_flowManager;
     RenderNamedFlowThread* m_parentFlowThread;
 
     EventTargetData m_eventTargetData;
index 9d62698..53a353f 100644 (file)
@@ -45,6 +45,7 @@
 #include "InspectorTypeBuilder.h"
 #include "InspectorValues.h"
 #include "InstrumentingAgents.h"
+#include "NamedFlowCollection.h"
 #include "Node.h"
 #include "NodeList.h"
 #include "RenderRegion.h"
@@ -54,7 +55,6 @@
 #include "StyleRule.h"
 #include "StyleSheetList.h"
 #include "WebKitNamedFlow.h"
-#include "WebKitNamedFlowCollection.h"
 
 #include <wtf/CurrentTime.h>
 #include <wtf/HashSet.h>
index 476c924..013e4a2 100644 (file)
 
 #include "FlowThreadController.h"
 
+#include "NamedFlowCollection.h"
 #include "RenderFlowThread.h"
 #include "RenderFlowThreadContainer.h"
 #include "RenderNamedFlowThread.h"
 #include "StyleInheritedData.h"
 #include "WebKitNamedFlow.h"
-#include "WebKitNamedFlowCollection.h"
 #include <wtf/text/AtomicString.h>
 
 namespace WebCore {
@@ -75,7 +75,7 @@ RenderNamedFlowThread* FlowThreadController::ensureRenderFlowThreadWithName(cons
         }
     }
 
-    WebKitNamedFlowCollection* namedFlows = m_view->document()->namedFlows();
+    NamedFlowCollection* namedFlows = m_view->document()->namedFlows();
 
     // Sanity check for the absence of a named flow in the "CREATED" state with the same name.
     ASSERT(!namedFlows->flowByName(name));