[CSSRegions][CSSOM] Implement NamedFlow interface
authormihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Dec 2011 14:23:10 +0000 (14:23 +0000)
committermihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Dec 2011 14:23:10 +0000 (14:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=66642

Reviewed by David Hyatt.

Add WebKitNamedFlow to support the NamedFlow interface. No methods are
yet implemented on this interface. The NamedFlow object is a live object.
The first time user asks for it, it gets a valid JS object whose properties
will reflect the changes to the flow thread.

Source/WebCore:

Tests: fast/regions/webkit-named-flow-existing-flow.html
       fast/regions/webkit-named-flow-flow-added.html
       fast/regions/webkit-named-flow-modified-flow.html
       fast/regions/webkit-named-flow-non-existing-flow.html
       fast/regions/webkit-named-flow-removed-flow.html
       fast/regions/webkit-named-flow-same-object.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:
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::webkitGetFlowByName):
* dom/Document.h:
* dom/Document.idl:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
* dom/WebKitNamedFlow.cpp: Added.
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::~WebKitNamedFlow):
* dom/WebKitNamedFlow.h: Added.
(WebCore::WebKitNamedFlow::create):
* dom/WebKitNamedFlow.idl: Added.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::ensureNamedFlow):
* rendering/RenderFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderView.cpp:
(WebCore::RenderView::ensureRenderFlowThreadWithName):
* rendering/RenderView.h:

LayoutTests:

* fast/dom/Window/window-properties-expected.txt:
* fast/regions/webkit-named-flow-existing-flow-expected.txt: Added.
* fast/regions/webkit-named-flow-existing-flow.html: Added.
* fast/regions/webkit-named-flow-flow-added-expected.txt: Added.
* fast/regions/webkit-named-flow-flow-added.html: Added.
* fast/regions/webkit-named-flow-modified-flow-expected.txt: Added.
* fast/regions/webkit-named-flow-modified-flow.html: Added.
* fast/regions/webkit-named-flow-non-existing-flow-expected.txt: Added.
* fast/regions/webkit-named-flow-non-existing-flow.html: Added.
* fast/regions/webkit-named-flow-removed-flow-expected.txt: Added.
* fast/regions/webkit-named-flow-removed-flow.html: Added.
* fast/regions/webkit-named-flow-same-object-expected.txt: Added.
* fast/regions/webkit-named-flow-same-object.html: Added.
* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/mac/fast/dom/Window/window-properties-expected.txt:
* platform/qt-wk2/fast/dom/Window/window-properties-expected.txt:
* platform/qt/fast/dom/Window/window-properties-expected.txt:
* platform/win/fast/dom/Window/window-properties-expected.txt:

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

43 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-properties-expected.txt
LayoutTests/fast/regions/webkit-named-flow-existing-flow-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-existing-flow.html [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-flow-added-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-flow-added.html [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-modified-flow-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-modified-flow.html [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-non-existing-flow-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-non-existing-flow.html [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-removed-flow-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-removed-flow.html [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-same-object-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-named-flow-same-object.html [new file with mode: 0644]
LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt
LayoutTests/platform/mac/fast/dom/Window/window-properties-expected.txt
LayoutTests/platform/qt-wk2/fast/dom/Window/window-properties-expected.txt
LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt
LayoutTests/platform/win/fast/dom/Window/window-properties-expected.txt
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/dom/DOMAllInOne.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/dom/WebKitNamedFlow.cpp [new file with mode: 0644]
Source/WebCore/dom/WebKitNamedFlow.h [new file with mode: 0644]
Source/WebCore/dom/WebKitNamedFlow.idl [new file with mode: 0644]
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFlowThread.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h

index 6816794..b18de63 100644 (file)
@@ -1,3 +1,34 @@
+2011-12-08  Mihnea Ovidenie  <mihnea@adobe.com>
+
+        [CSSRegions][CSSOM] Implement NamedFlow interface
+        https://bugs.webkit.org/show_bug.cgi?id=66642
+
+        Reviewed by David Hyatt.
+
+        Add WebKitNamedFlow to support the NamedFlow interface. No methods are
+        yet implemented on this interface. The NamedFlow object is a live object.
+        The first time user asks for it, it gets a valid JS object whose properties
+        will reflect the changes to the flow thread.
+
+        * fast/dom/Window/window-properties-expected.txt:
+        * fast/regions/webkit-named-flow-existing-flow-expected.txt: Added.
+        * fast/regions/webkit-named-flow-existing-flow.html: Added.
+        * fast/regions/webkit-named-flow-flow-added-expected.txt: Added.
+        * fast/regions/webkit-named-flow-flow-added.html: Added.
+        * fast/regions/webkit-named-flow-modified-flow-expected.txt: Added.
+        * fast/regions/webkit-named-flow-modified-flow.html: Added.
+        * fast/regions/webkit-named-flow-non-existing-flow-expected.txt: Added.
+        * fast/regions/webkit-named-flow-non-existing-flow.html: Added.
+        * fast/regions/webkit-named-flow-removed-flow-expected.txt: Added.
+        * fast/regions/webkit-named-flow-removed-flow.html: Added.
+        * fast/regions/webkit-named-flow-same-object-expected.txt: Added.
+        * fast/regions/webkit-named-flow-same-object.html: Added.
+        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
+        * platform/mac/fast/dom/Window/window-properties-expected.txt:
+        * platform/qt-wk2/fast/dom/Window/window-properties-expected.txt:
+        * platform/qt/fast/dom/Window/window-properties-expected.txt:
+        * platform/win/fast/dom/Window/window-properties-expected.txt:
+
 2011-12-08  Takashi Toyoshima  <toyoshim@chromium.org>
 
         Fix failed layout test, bufferedAmount-after-close-in-busy.html
index fbb564f..75b54f9 100644 (file)
@@ -680,6 +680,7 @@ window.Document.prototype.removeChild [function]
 window.Document.prototype.removeEventListener [function]
 window.Document.prototype.replaceChild [function]
 window.Document.prototype.webkitCancelFullScreen [function]
+window.Document.prototype.webkitGetFlowByName [function]
 window.DocumentFragment [object DocumentFragmentConstructor]
 window.DocumentFragment.prototype [object DocumentFragmentPrototype]
 window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
diff --git a/LayoutTests/fast/regions/webkit-named-flow-existing-flow-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-existing-flow-expected.txt
new file mode 100644 (file)
index 0000000..c7131ec
--- /dev/null
@@ -0,0 +1,7 @@
+Test for 66642: [CSSRegions]Implement NamedFlow interface
+
+Getting a WebKitNamedFlow object for an existing flow should return a non-null object.
+
+On success, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/fast/regions/webkit-named-flow-existing-flow.html b/LayoutTests/fast/regions/webkit-named-flow-existing-flow.html
new file mode 100644 (file)
index 0000000..57270b8
--- /dev/null
@@ -0,0 +1,42 @@
+<!doctype html>
+<html>
+    <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
+    Test that getting a WebKitNamedFlow for an existing flow returns a non-null object.
+    On success, you should see a PASS below.
+    -->
+    <head>
+        <style>
+            .pass {
+                font-weight: bold;
+                color: green;
+            }
+
+            .fail {
+                font-weight: bold;
+                color: red;
+            }
+
+            .flow {
+                -webkit-flow-into: flow;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
+        <p>Getting a WebKitNamedFlow object for an existing flow should return a non-null object.</p>
+        <p>On success, you should see PASS below.</p>
+        <div id="article" class="flow"></div>
+        <div id="result" class="fail">FAIL</div>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            var namedFlow = document.webkitGetFlowByName("flow");
+            if (namedFlow) {
+                document.getElementById("result").innerText = "PASS";
+                document.getElementById("result").className = "pass";
+            }
+        </script>
+    </body>
+</html>
diff --git a/LayoutTests/fast/regions/webkit-named-flow-flow-added-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-flow-added-expected.txt
new file mode 100644 (file)
index 0000000..0e0a152
--- /dev/null
@@ -0,0 +1,7 @@
+Test for 66642: [CSSRegions]Implement NamedFlow interface
+
+Getting a WebKitNamedFlow object for a flow that was added should return a non-null object.
+
+On success, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/fast/regions/webkit-named-flow-flow-added.html b/LayoutTests/fast/regions/webkit-named-flow-flow-added.html
new file mode 100644 (file)
index 0000000..33c3ef8
--- /dev/null
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+    <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
+    Test that getting a WebKitNamedFlow for a flow that was added returns a non-null object.
+    On success, you should see a PASS below.
+    -->
+    <head>
+        <style>
+            .pass {
+                font-weight: bold;
+                color: green;
+            }
+
+            .fail {
+                font-weight: bold;
+                color: red;
+            }
+
+            .flow {
+                -webkit-flow-into: flow;
+            }
+
+            .noFlow {
+                -webkit-flow-into: none;
+            }
+        </style>
+    </head>
+    <body onload="test()">
+        <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
+        <p>Getting a WebKitNamedFlow object for a flow that was added should return a non-null object.</p>
+        <p>On success, you should see PASS below.</p>
+        <div id="article" class="noFlow"></div>
+        <div id="result" class="fail">FAIL</div>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            // Get the named flow object before adding the flow thread.
+            var namedFlow = document.webkitGetFlowByName("flow");
+            var namedFlow2;
+
+            function test()
+            {
+                namedFlow2 = document.webkitGetFlowByName("flow");
+                if (namedFlow && namedFlow2) {
+                    document.getElementById("result").innerText = "PASS";
+                    document.getElementById("result").className = "pass";
+                }
+            }
+
+            document.getElementById("article").className = "flow";
+        </script>
+    </body>
+</html>
diff --git a/LayoutTests/fast/regions/webkit-named-flow-modified-flow-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-modified-flow-expected.txt
new file mode 100644 (file)
index 0000000..21e5fe4
--- /dev/null
@@ -0,0 +1,9 @@
+Test for 66642: [CSSRegions]Implement NamedFlow interface
+
+Getting the webkit flow name for the previous flow should return a non-null object.
+
+Getting the webkit flow name for the new flow should return a non-null object.
+
+On success, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/fast/regions/webkit-named-flow-modified-flow.html b/LayoutTests/fast/regions/webkit-named-flow-modified-flow.html
new file mode 100644 (file)
index 0000000..73ec70f
--- /dev/null
@@ -0,0 +1,59 @@
+<!doctype html>
+<html>
+    <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
+    Modify the flow name for an existing flow thread. 
+    Getting the webkit flow name for the previous flow returns a valid object.
+    Getting the webkit flow name for the new flow returns a valid object.
+    On success, you should see a PASS below.
+    -->
+    <head>
+        <style>
+            .pass {
+                font-weight: bold;
+                color: green;
+            }
+
+            .fail {
+                font-weight: bold;
+                color: red;
+            }
+
+            .flow {
+                -webkit-flow-into: flow;
+            }
+
+            .flow2 {
+                -webkit-flow-into: flow2;
+            }
+
+            .noFlow {
+                -webkit-flow-into: none;
+            }
+        </style>
+    </head>
+    <body onload="test()">
+        <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
+        <p>Getting the webkit flow name for the previous flow should return a non-null object.</p>
+        <p>Getting the webkit flow name for the new flow should return a non-null object.</p>
+        <p>On success, you should see PASS below.</p>
+        <div id="article" class="flow"></div>
+        <div id="result" class="fail">FAIL</div>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            function test()
+            {
+                var namedFlow = document.webkitGetFlowByName("flow");
+                var namedFlow2 = document.webkitGetFlowByName("flow2");
+                if (namedFlow && namedFlow2) {
+                    document.getElementById("result").innerText = "PASS";
+                    document.getElementById("result").className = "pass";
+                }
+            }
+
+            document.getElementById("article").className = "flow2";
+        </script>
+    </body>
+</html>
diff --git a/LayoutTests/fast/regions/webkit-named-flow-non-existing-flow-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-non-existing-flow-expected.txt
new file mode 100644 (file)
index 0000000..ea321f7
--- /dev/null
@@ -0,0 +1,7 @@
+Test for 66642: [CSSRegions]Implement NamedFlow interface
+
+Getting a WebKitNamedFlow object for a non-existant flow should return a non-null object.
+
+On success, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/fast/regions/webkit-named-flow-non-existing-flow.html b/LayoutTests/fast/regions/webkit-named-flow-non-existing-flow.html
new file mode 100644 (file)
index 0000000..3da8a7b
--- /dev/null
@@ -0,0 +1,39 @@
+<!doctype html>
+<html>
+    <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
+    Test that getting a WebKitNamedFlow for a non-existant flow returns a non-null object.
+    On success, you should see a PASS below.
+    -->
+    <head>
+        <style>
+            .pass {
+                font-weight: bold;
+                color: green;
+            }
+
+            .fail {
+                font-weight: bold;
+                color: red;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
+        <p>Getting a WebKitNamedFlow object for a non-existant flow should return a non-null object.</p>
+        <p>On success, you should see PASS below.</p>
+        <div id="article"></div>
+        <div id="result" class="fail">FAIL</div>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            var namedFlow = document.webkitGetFlowByName("flow");
+            if (namedFlow) {
+                document.getElementById("result").innerText = "PASS";
+                document.getElementById("result").className = "pass";
+            }
+            document.getElementById("article").style.display = "none";
+        </script>
+    </body>
+</html>
diff --git a/LayoutTests/fast/regions/webkit-named-flow-removed-flow-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-removed-flow-expected.txt
new file mode 100644 (file)
index 0000000..3a4c228
--- /dev/null
@@ -0,0 +1,7 @@
+Test for 66642: [CSSRegions]Implement NamedFlow interface
+
+Getting a WebKitNamedFlow object for a flow that was removed returns a non-null object.
+
+On success, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/fast/regions/webkit-named-flow-removed-flow.html b/LayoutTests/fast/regions/webkit-named-flow-removed-flow.html
new file mode 100644 (file)
index 0000000..e2a69ce
--- /dev/null
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+    <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
+    Test that getting a WebKitNamedFlow for a flow that was removed returns a valid non-null object.
+    On success, you should see a PASS below.
+    -->
+    <head>
+        <style>
+            .pass {
+                font-weight: bold;
+                color: green;
+            }
+
+            .fail {
+                font-weight: bold;
+                color: red;
+            }
+
+            .flow {
+                -webkit-flow-into: flow;
+            }
+
+            .noFlow {
+                -webkit-flow-into: none;
+            }
+        </style>
+    </head>
+    <body onload="test()">
+        <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
+        <p>Getting a WebKitNamedFlow object for a flow that was removed returns a non-null object.</p>
+        <p>On success, you should see PASS below.</p>
+        <div id="article" class="flow"></div>
+        <div id="result" class="fail">FAIL</div>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            // Get the named flow object before removing the flow thread.
+            var namedFlow = document.webkitGetFlowByName("flow");
+            var namedFlow2;
+
+            function test()
+            {
+                namedFlow2 = document.webkitGetFlowByName("flow");
+                if (namedFlow && namedFlow2) {
+                    document.getElementById("result").innerText = "PASS";
+                    document.getElementById("result").className = "pass";
+                }
+            }
+
+            document.getElementById("article").className = "noFlow";
+        </script>
+    </body>
+</html>
diff --git a/LayoutTests/fast/regions/webkit-named-flow-same-object-expected.txt b/LayoutTests/fast/regions/webkit-named-flow-same-object-expected.txt
new file mode 100644 (file)
index 0000000..8df0ea6
--- /dev/null
@@ -0,0 +1,7 @@
+Test for 66642: [CSSRegions]Implement NamedFlow interface
+
+Asking for the same webkit named flow twice should return the same non-null object.
+
+On success, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/fast/regions/webkit-named-flow-same-object.html b/LayoutTests/fast/regions/webkit-named-flow-same-object.html
new file mode 100644 (file)
index 0000000..6a54d51
--- /dev/null
@@ -0,0 +1,43 @@
+<!doctype html>
+<html>
+    <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=66642 ([CSSRegions][CSSOM] Implement NamedFlow interface).
+    Test that asking for the same webkit named flow twice returns the same object.
+    On success, you should see a PASS below.
+    -->
+    <head>
+        <style>
+            .pass {
+                font-weight: bold;
+                color: green;
+            }
+
+            .fail {
+                font-weight: bold;
+                color: red;
+            }
+
+            .flow {
+                -webkit-flow-into: flow;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66642">66642: [CSSRegions]Implement NamedFlow interface</a></p>
+        <p>Asking for the same webkit named flow twice should return the same non-null object.</p>
+        <p>On success, you should see PASS below.</p>
+        <div id="article" class="flow"></div>
+        <div id="result" class="fail">FAIL</div>
+        <script>
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            var namedFlow = document.webkitGetFlowByName("flow");
+            var namedFlow2 = document.webkitGetFlowByName("flow");
+            if (namedFlow === namedFlow2) {
+                document.getElementById("result").innerText = "PASS";
+                document.getElementById("result").className = "pass";
+            }
+        </script>
+    </body>
+</html>
index 0bfde07..332b1d4 100644 (file)
@@ -732,6 +732,7 @@ window.Document.prototype.removeChild [function]
 window.Document.prototype.removeEventListener [function]
 window.Document.prototype.replaceChild [function]
 window.Document.prototype.webkitCancelFullScreen [function]
+window.Document.prototype.webkitGetFlowByName [function]
 window.DocumentFragment [object DocumentFragmentConstructor]
 window.DocumentFragment.prototype [object DocumentFragmentPrototype]
 window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
index be575f9..e4455d2 100644 (file)
@@ -757,6 +757,7 @@ window.Document.prototype.removeChild [function]
 window.Document.prototype.removeEventListener [function]
 window.Document.prototype.replaceChild [function]
 window.Document.prototype.webkitCancelFullScreen [function]
+window.Document.prototype.webkitGetFlowByName [function]
 window.DocumentFragment [object DocumentFragmentConstructor]
 window.DocumentFragment.prototype [object DocumentFragmentPrototype]
 window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
index 586c24e..f46db7a 100644 (file)
@@ -678,6 +678,7 @@ window.Document.prototype.querySelectorAll [function]
 window.Document.prototype.removeChild [function]
 window.Document.prototype.removeEventListener [function]
 window.Document.prototype.replaceChild [function]
+window.Document.prototype.webkitGetFlowByName [function]
 window.DocumentFragment [object DocumentFragmentConstructor]
 window.DocumentFragment.prototype [object DocumentFragmentPrototype]
 window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
index 30752fe..4aa41af 100644 (file)
@@ -731,6 +731,7 @@ window.Document.prototype.querySelectorAll [function]
 window.Document.prototype.removeChild [function]
 window.Document.prototype.removeEventListener [function]
 window.Document.prototype.replaceChild [function]
+window.Document.prototype.webkitGetFlowByName [function]
 window.DocumentFragment [object DocumentFragmentConstructor]
 window.DocumentFragment.prototype [object DocumentFragmentPrototype]
 window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
index 894d037..353530a 100644 (file)
@@ -679,6 +679,7 @@ window.Document.prototype.removeChild [function]
 window.Document.prototype.removeEventListener [function]
 window.Document.prototype.replaceChild [function]
 window.Document.prototype.webkitCancelFullScreen [function]
+window.Document.prototype.webkitGetFlowByName [function]
 window.DocumentFragment [object DocumentFragmentConstructor]
 window.DocumentFragment.prototype [object DocumentFragmentPrototype]
 window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
index 5855ad4..18fa5a2 100644 (file)
@@ -188,6 +188,7 @@ SET(WebCore_IDL_FILES
     dom/UIEvent.idl
     dom/WebKitAnimationEvent.idl
     dom/WebKitMutationObserver.idl
+    dom/WebKitNamedFlow.idl
     dom/WebKitTransitionEvent.idl
     dom/WheelEvent.idl
 
@@ -612,6 +613,7 @@ SET(WebCore_SOURCES
     dom/ViewportArguments.cpp
     dom/WebKitAnimationEvent.cpp
     dom/WebKitMutationObserver.cpp
+    dom/WebKitNamedFlow.cpp
     dom/WebKitTransitionEvent.cpp
     dom/WheelEvent.cpp
     dom/WindowEventContext.cpp
index 3fda43e..e9aeaf4 100644 (file)
@@ -1,3 +1,54 @@
+2011-12-08  Mihnea Ovidenie  <mihnea@adobe.com>
+
+        [CSSRegions][CSSOM] Implement NamedFlow interface
+        https://bugs.webkit.org/show_bug.cgi?id=66642
+
+        Reviewed by David Hyatt.
+
+        Add WebKitNamedFlow to support the NamedFlow interface. No methods are
+        yet implemented on this interface. The NamedFlow object is a live object.
+        The first time user asks for it, it gets a valid JS object whose properties
+        will reflect the changes to the flow thread.
+
+        Tests: fast/regions/webkit-named-flow-existing-flow.html
+               fast/regions/webkit-named-flow-flow-added.html
+               fast/regions/webkit-named-flow-modified-flow.html
+               fast/regions/webkit-named-flow-non-existing-flow.html
+               fast/regions/webkit-named-flow-removed-flow.html
+               fast/regions/webkit-named-flow-same-object.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:
+        * dom/DOMAllInOne.cpp:
+        * dom/Document.cpp:
+        (WebCore::Document::webkitGetFlowByName):
+        * dom/Document.h:
+        * dom/Document.idl:
+        * dom/NodeRenderingContext.cpp:
+        (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
+        * dom/WebKitNamedFlow.cpp: Added.
+        (WebCore::WebKitNamedFlow::WebKitNamedFlow):
+        (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
+        * dom/WebKitNamedFlow.h: Added.
+        (WebCore::WebKitNamedFlow::create):
+        * dom/WebKitNamedFlow.idl: Added.
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::ensureNamedFlow):
+        * rendering/RenderFlowThread.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::createObject):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::ensureRenderFlowThreadWithName):
+        * rendering/RenderView.h:
+
 2011-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r102321.
index 053101e..22cbeee 100644 (file)
 #include "JSWebKitCSSTransformValue.cpp"
 #include "JSWebKitCSSMatrix.cpp"
 #include "JSWebKitMutationObserver.cpp"
+#include "JSWebKitNamedFlow.cpp"
 #include "JSWebKitPoint.cpp"
 #include "JSWebKitTransitionEvent.cpp"
 #include "JSWebSocket.cpp"
index f508037..00e3da2 100644 (file)
@@ -550,6 +550,7 @@ DOM_CLASSES = \
     WebKitFlags \
     WebKitLoseContext \
     WebKitMutationObserver \
+       WebKitNamedFlow \
     WebKitPoint \
     WebKitTransitionEvent \
     WebSocket \
index 9d4bb51..82c3b69 100644 (file)
@@ -174,6 +174,7 @@ IDL_BINDINGS += \
     dom/TreeWalker.idl \
     dom/UIEvent.idl \
     dom/WebKitAnimationEvent.idl \
+    dom/WebKitNamedFlow.idl \
     dom/WebKitTransitionEvent.idl \
     dom/WheelEvent.idl \
     fileapi/Blob.idl \
index e175122..a44c907 100644 (file)
@@ -580,6 +580,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSWebKitCSSTransformValue.h \
        DerivedSources/WebCore/JSWebKitLoseContext.cpp \
        DerivedSources/WebCore/JSWebKitLoseContext.h \
+       DerivedSources/WebCore/JSWebKitNamedFlow.cpp \
+       DerivedSources/WebCore/JSWebKitNamedFlow.h \
        DerivedSources/WebCore/JSWebKitPoint.cpp \
        DerivedSources/WebCore/JSWebKitPoint.h \
        DerivedSources/WebCore/JSWebKitTransitionEvent.cpp \
@@ -1386,6 +1388,8 @@ webcore_sources += \
        Source/WebCore/dom/WebKitAnimationEvent.h \
        Source/WebCore/dom/WebKitMutationObserver.cpp \
        Source/WebCore/dom/WebKitMutationObserver.h \
+       Source/WebCore/dom/WebKitNamedFlow.cpp \
+       Source/WebCore/dom/WebKitNamedFlow.h \
        Source/WebCore/dom/WebKitTransitionEvent.cpp \
        Source/WebCore/dom/WebKitTransitionEvent.h \
        Source/WebCore/dom/WheelEvent.cpp \
index 0102173..fffcba9 100644 (file)
@@ -580,6 +580,7 @@ SOURCES += \
     dom/ViewportArguments.cpp \
     dom/WebKitAnimationEvent.cpp \
     dom/WebKitMutationObserver.cpp \
+    dom/WebKitNamedFlow.cpp \
     dom/WebKitTransitionEvent.cpp \
     dom/WheelEvent.cpp \
     dom/WindowEventContext.cpp \
@@ -1668,6 +1669,7 @@ HEADERS += \
     dom/ViewportArguments.h \
     dom/WebKitAnimationEvent.h \
     dom/WebKitMutationObserver.h \
+    dom/WebKitNamedFlow.h \
     dom/WebKitTransitionEvent.h \
     dom/WheelEvent.h \
     editing/AppendNodeCommand.h \
index f432a55..4c37949 100644 (file)
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMTextEvent.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMTreeWalker.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMUIEvent.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitNamedFlow.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWebKitNamedFlowInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMWheelEvent.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMXPathExpression.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMXPathNSResolver.h',
             'dom/UIEvent.idl',
             'dom/WebKitAnimationEvent.idl',
             'dom/WebKitMutationObserver.idl',
+            'dom/WebKitNamedFlow.idl',
             'dom/WebKitTransitionEvent.idl',
             'dom/WheelEvent.idl',
             'fileapi/Blob.idl',
             'dom/WebKitAnimationEvent.h',
             'dom/WebKitMutationObserver.cpp',
             'dom/WebKitMutationObserver.h',
+            'dom/WebKitNamedFlow.cpp',
+            'dom/WebKitNamedFlow.h',
             'dom/WebKitTransitionEvent.cpp',
             'dom/WebKitTransitionEvent.h',
             'dom/WheelEvent.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitMutationObserver.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitPoint.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitPoint.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitNamedFlow.cpp',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitNamedFlow.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitTransitionEvent.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitTransitionEvent.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebSocket.cpp',
index 2264fbb..df83885 100755 (executable)
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitMutationObserver.h"
                                >
                        </File>
+             <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.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\JSWebKitNamedFlow.h"
+                               >
+                       </File>
                        <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitPoint.cpp"
                                >
                                >
                        </File>
                        <File
+                               RelativePath="..\dom\WebKitNamedFlow.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\WebKitNamedFlow.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\dom\WebKitTransitionEvent.cpp"
                                >
                                <FileConfiguration
index 73e9857..7ab3809 100644 (file)
                89D08DA012228451001241DF /* AsyncFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 89D08D9D12228451001241DF /* AsyncFileSystem.h */; };
                89D08DA112228451001241DF /* AsyncFileSystemCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 89D08D9E12228451001241DF /* AsyncFileSystemCallbacks.h */; };
                8A12E35D11FA33280025836A /* DocumentLoadTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A12E35C11FA33280025836A /* DocumentLoadTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               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 */; };
                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 */; };
                D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = D6E276AE14637455001D280A /* MutationObserverRegistration.h */; };
                D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D70AD65513E1342B005B50B4 /* RenderRegion.cpp */; };
                D70AD65813E1342B005B50B4 /* RenderRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = D70AD65613E1342B005B50B4 /* RenderRegion.h */; };
+               D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */; };
+               D7613AC414753E5600DB8606 /* JSWebKitNamedFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */; };
                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 */; };
                89D08D9D12228451001241DF /* AsyncFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileSystem.h; sourceTree = "<group>"; };
                89D08D9E12228451001241DF /* AsyncFileSystemCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileSystemCallbacks.h; sourceTree = "<group>"; };
                8A12E35C11FA33280025836A /* DocumentLoadTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentLoadTiming.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>"; };
                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>"; };
                D6E276AE14637455001D280A /* MutationObserverRegistration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationObserverRegistration.h; sourceTree = "<group>"; };
                D70AD65513E1342B005B50B4 /* RenderRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRegion.cpp; sourceTree = "<group>"; };
                D70AD65613E1342B005B50B4 /* RenderRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRegion.h; sourceTree = "<group>"; };
+               D7613A4A1474EE9500DB8606 /* WebKitNamedFlow.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitNamedFlow.idl; sourceTree = "<group>"; };
+               D7613A4D1474F13F00DB8606 /* WebKitNamedFlow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNamedFlow.h; 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>"; };
                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>"; };
                                85F56A790A98CE3700ADB60A /* DOMProcessingInstruction.mm */,
                                85ACA99A0A9B575900671E90 /* DOMText.h */,
                                85ACA99B0A9B575900671E90 /* DOMText.mm */,
+                               8A19592F147EA16E00D1EA61 /* DOMWebKitNamedFlow.h */,
+                               8A195930147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm */,
+                               8A195931147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h */,
                        );
                        name = Core;
                        sourceTree = "<group>";
                                65DF31F009D1CC60000BE325 /* JSText.h */,
                                C6F0902414327D4F00685849 /* JSWebKitMutationObserver.cpp */,
                                C6F0902514327D4F00685849 /* JSWebKitMutationObserver.h */,
+                               D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */,
+                               D7613AC314753E5600DB8606 /* JSWebKitNamedFlow.h */,
                        );
                        name = Core;
                        sourceTree = "<group>";
                                C6F0900514327B6100685849 /* WebKitMutationObserver.cpp */,
                                C6F0900614327B6100685849 /* WebKitMutationObserver.h */,
                                C6F0900714327B6100685849 /* WebKitMutationObserver.idl */,
+                               D7613A4A1474EE9500DB8606 /* WebKitNamedFlow.idl */,
+                               D7613A4D1474F13F00DB8606 /* WebKitNamedFlow.h */,
+                               D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */,
                                31C0FF1E0E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp */,
                                31C0FF1F0E4CEB6E007D6FE5 /* WebKitTransitionEvent.h */,
                                31C0FF200E4CEB6E007D6FE5 /* WebKitTransitionEvent.idl */,
                                6E3FAD3914733F4000E42306 /* JSWebGLCompressedTextures.h in Headers */,
                                6E3FAE8F14733FDB00E42306 /* WebGLCompressedTextures.h in Headers */,
                                265541391489811C000DFC5D /* KeyEventCodesIOS.h in Headers */,
+                               8A195932147EA16E00D1EA61 /* DOMWebKitNamedFlow.h in Headers */,
+                               8A195934147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                6E3FAD3814733F4000E42306 /* JSWebGLCompressedTextures.cpp in Sources */,
                                6E3FAE8E14733FDB00E42306 /* WebGLCompressedTextures.cpp in Sources */,
                                2655413A1489811C000DFC5D /* KeyEventIOS.mm in Sources */,
+                               D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */,
+                               D7613AC414753E5600DB8606 /* JSWebKitNamedFlow.cpp in Sources */,
+                               8A195933147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 45150e1..08e7721 100644 (file)
@@ -246,6 +246,7 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMWebKitAnimationList.cpp \
        DerivedSources/webkit/WebKitDOMWebKitPoint.cpp \
        DerivedSources/webkit/WebKitDOMWebKitPointPrivate.h \
+       DerivedSources/webkit/WebKitDOMWebKitNamedFlow.cpp \
        DerivedSources/webkit/WebKitDOMXPathExpression.cpp \
        DerivedSources/webkit/WebKitDOMXPathExpressionPrivate.h \
        DerivedSources/webkit/WebKitDOMXPathNSResolver.cpp \
@@ -375,6 +376,7 @@ webkitgtk_built_h_api += \
        DerivedSources/webkit/WebKitDOMWebKitAnimation.h \
        DerivedSources/webkit/WebKitDOMWebKitAnimationList.h \
        DerivedSources/webkit/WebKitDOMWebKitPoint.h \
+       DerivedSources/webkit/WebKitDOMWebKitNamedFlow.h \
        DerivedSources/webkit/WebKitDOMDOMMimeType.h \
        DerivedSources/webkit/WebKitDOMDOMMimeTypeArray.h \
        DerivedSources/webkit/WebKitDOMDOMPlugin.h \
index 035f97a..d0bceca 100644 (file)
 #include "UserTypingGestureIndicator.cpp"
 #include "ViewportArguments.cpp"
 #include "WebKitAnimationEvent.cpp"
+#include "WebKitNamedFlow.cpp"
 #include "WebKitTransitionEvent.cpp"
 #include "WheelEvent.cpp"
 #include "WindowEventContext.cpp"
index f23c2e6..a59b7a6 100644 (file)
 #include "ProcessingInstruction.h"
 #include "RegisteredEventListener.h"
 #include "RenderArena.h"
+#include "RenderFlowThread.h"
 #include "RenderLayer.h"
 #include "RenderLayerBacking.h"
 #include "RenderTextControl.h"
 #include "TransformSource.h"
 #include "TreeWalker.h"
 #include "UserContentURLPattern.h"
+#include "WebKitNamedFlow.h"
 #include "XMLDocumentParser.h"
 #include "XMLHttpRequest.h"
 #include "XMLNSNames.h"
@@ -992,6 +994,15 @@ PassRefPtr<Element> Document::createElement(const QualifiedName& qName, bool cre
     return e.release();
 }
 
+PassRefPtr<WebKitNamedFlow> Document::webkitGetFlowByName(const String& flowName)
+{
+    if (!renderer())
+        return 0;
+    if (RenderView* view = renderer()->view())
+        return view->ensureRenderFlowThreadWithName(flowName)->ensureNamedFlow();
+    return 0;
+}
+
 PassRefPtr<Element> Document::createElementNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode& ec)
 {
     String prefix, localName;
index 51ca8b9..43c7ebd 100644 (file)
@@ -130,6 +130,7 @@ class Text;
 class TextResourceDecoder;
 class DocumentParser;
 class TreeWalker;
+class WebKitNamedFlow;
 class XMLHttpRequest;
 class XPathEvaluator;
 class XPathExpression;
@@ -351,6 +352,8 @@ public:
     virtual PassRefPtr<Element> createElementNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&);
     PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser);
 
+    PassRefPtr<WebKitNamedFlow> webkitGetFlowByName(const String&);
+
     /**
      * Retrieve all nodes that intersect a rect in the window's document, until it is fully enclosed by
      * the boundaries of a node.
index b1337f9..9bb8a2c 100644 (file)
@@ -247,6 +247,8 @@ module core {
         [EnabledAtRuntime] void webkitCancelFullScreen();
 #endif
 
+        WebKitNamedFlow webkitGetFlowByName(in DOMString name);
+
 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
         // Event handler DOM attributes
         attribute [DontEnum] EventListener onabort;
index d68077e..96529fb 100644 (file)
@@ -279,7 +279,7 @@ void NodeRenderingContext::moveToFlowThreadIfNeeded()
 
     m_flowThread = m_style->flowThread();
     ASSERT(m_node->document()->renderView());
-    m_parentFlowRenderer = m_node->document()->renderView()->renderFlowThreadWithName(m_flowThread);
+    m_parentFlowRenderer = m_node->document()->renderView()->ensureRenderFlowThreadWithName(m_flowThread);
 }
 
 NodeRendererFactory::NodeRendererFactory(Node* node)
diff --git a/Source/WebCore/dom/WebKitNamedFlow.cpp b/Source/WebCore/dom/WebKitNamedFlow.cpp
new file mode 100644 (file)
index 0000000..e002636
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2011 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 "WebKitNamedFlow.h"
+
+namespace WebCore {
+
+WebKitNamedFlow::WebKitNamedFlow()
+{
+}
+
+WebKitNamedFlow::~WebKitNamedFlow()
+{
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/dom/WebKitNamedFlow.h b/Source/WebCore/dom/WebKitNamedFlow.h
new file mode 100644 (file)
index 0000000..2767961
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2011 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 WebKitNamedFlow_h
+#define WebKitNamedFlow_h
+
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class WebKitNamedFlow : public RefCounted<WebKitNamedFlow> {
+public:
+    static PassRefPtr<WebKitNamedFlow> create()
+    {
+        return adoptRef(new WebKitNamedFlow);
+    }
+
+    ~WebKitNamedFlow();
+
+private:
+    WebKitNamedFlow();
+};
+
+}
+
+#endif
diff --git a/Source/WebCore/dom/WebKitNamedFlow.idl b/Source/WebCore/dom/WebKitNamedFlow.idl
new file mode 100644 (file)
index 0000000..2eb9e7f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2011 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 [
+        GenerateToJS
+    ] WebKitNamedFlow {
+    };
+}
index 152d9a9..90d903e 100644 (file)
@@ -40,6 +40,7 @@
 #include "RenderRegion.h"
 #include "RenderView.h"
 #include "TransformState.h"
+#include "WebKitNamedFlow.h"
 
 namespace WebCore {
 
@@ -815,5 +816,13 @@ void RenderFlowThread::getRegionRangeForBox(const RenderBox* box, RenderRegion*&
     startRegion = range->startRegion();
     endRegion = range->endRegion();
 }
-    
+
+WebKitNamedFlow* RenderFlowThread::ensureNamedFlow()
+{
+    if (!m_namedFlow)
+        m_namedFlow = WebKitNamedFlow::create();
+
+    return m_namedFlow.get();
+}
+
 } // namespace WebCore
index 71f8fe1..0bbb181 100644 (file)
@@ -43,6 +43,7 @@ namespace WebCore {
 class RenderFlowThread;
 class RenderStyle;
 class RenderRegion;
+class WebKitNamedFlow;
 
 typedef ListHashSet<RenderFlowThread*> RenderFlowThreadList;
 typedef HashCountedSet<RenderFlowThread*> RenderFlowThreadCountedSet;
@@ -74,6 +75,7 @@ public:
     
     void addFlowChild(RenderObject* newChild, RenderObject* beforeChild = 0);
     void removeFlowChild(RenderObject*);
+    bool hasChildren() const { return !m_flowThreadChildList.isEmpty(); }
 
     void addRegionToThread(RenderRegion*);
     void removeRegionFromThread(RenderRegion*);
@@ -125,6 +127,8 @@ public:
                                       const RenderRegion* oldStartRegion = 0, const RenderRegion* oldEndRegion = 0,
                                       const RenderRegion* newStartRegion = 0, const RenderRegion* newEndRegion = 0);
 
+    WebKitNamedFlow* ensureNamedFlow();
+
 private:
     virtual const char* renderName() const { return "RenderFlowThread"; }
 
@@ -182,6 +186,7 @@ private:
     bool m_regionsInvalidated;
     bool m_regionsHaveUniformLogicalWidth;
     bool m_regionsHaveUniformLogicalHeight;
+    RefPtr<WebKitNamedFlow> m_namedFlow;
 };
 
 inline RenderFlowThread* toRenderFlowThread(RenderObject* object)
index 19c6ce2..99da7bf 100755 (executable)
@@ -146,7 +146,7 @@ RenderObject* RenderObject::createObject(Node* node, RenderStyle* style)
     case COMPACT:
         // Only non-replaced block elements can become a region.
         if (!style->regionThread().isEmpty() && doc->renderView())
-            return new (arena) RenderRegion(node, doc->renderView()->renderFlowThreadWithName(style->regionThread()));
+            return new (arena) RenderRegion(node, doc->renderView()->ensureRenderFlowThreadWithName(style->regionThread()));
         return new (arena) RenderBlock(node);
     case LIST_ITEM:
         return new (arena) RenderListItem(node);
index f2fbad4..907aa8b 100644 (file)
@@ -879,7 +879,7 @@ void RenderView::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl
     }
 }
 
-RenderFlowThread* RenderView::renderFlowThreadWithName(const AtomicString& flowThread)
+RenderFlowThread* RenderView::ensureRenderFlowThreadWithName(const AtomicString& flowThread)
 {
     if (!m_renderFlowThreadList)
         m_renderFlowThreadList = adoptPtr(new RenderFlowThreadList());
@@ -894,7 +894,7 @@ RenderFlowThread* RenderView::renderFlowThreadWithName(const AtomicString& flowT
     RenderFlowThread* flowRenderer = new (renderArena()) RenderFlowThread(document(), flowThread);
     flowRenderer->setStyle(RenderFlowThread::createFlowThreadStyle(style()));
     addChild(flowRenderer);
-    
+
     m_renderFlowThreadList->add(flowRenderer);
     setIsRenderFlowThreadOrderDirty(true);
 
index 00caf8a..fd49d2a 100644 (file)
@@ -172,7 +172,7 @@ public:
 
     IntRect documentRect() const;
 
-    RenderFlowThread* renderFlowThreadWithName(const AtomicString& flowThread);
+    RenderFlowThread* ensureRenderFlowThreadWithName(const AtomicString& flowThread);
     bool hasRenderFlowThreads() const { return m_renderFlowThreadList && !m_renderFlowThreadList->isEmpty(); }
     void layoutRenderFlowThreads();
     bool isRenderFlowThreadOrderDirty() const { return m_isRenderFlowThreadOrderDirty; }