Title: [109355] branches/chromium/963
Revision
109355
Author
[email protected]
Date
2012-03-01 09:50:09 -0800 (Thu, 01 Mar 2012)

Log Message

Merge 108415
BUG=105867
Review URL: https://chromiumcodereview.appspot.com/9567011

Modified Paths

Added Paths

Diff

Copied: branches/chromium/963/LayoutTests/fast/dom/title-directionality-removeChild-expected.txt (from rev 108415, trunk/LayoutTests/fast/dom/title-directionality-removeChild-expected.txt) (0 => 109355)


--- branches/chromium/963/LayoutTests/fast/dom/title-directionality-removeChild-expected.txt	                        (rev 0)
+++ branches/chromium/963/LayoutTests/fast/dom/title-directionality-removeChild-expected.txt	2012-03-01 17:50:09 UTC (rev 109355)
@@ -0,0 +1,6 @@
+
+<html><title>foo</title></html> should have title direction "ltr". PASS
+<html><title dir=rtl>foo</title></html> should have title direction "rtl". PASS
+<html dir=rtl><title>foo</title></html> should have title direction "rtl". PASS
+<html dir=rtl><title dir=ltr>foo</title></html> should have title direction "ltr". PASS
+

Copied: branches/chromium/963/LayoutTests/fast/dom/title-directionality-removeChild.html (from rev 108415, trunk/LayoutTests/fast/dom/title-directionality-removeChild.html) (0 => 109355)


--- branches/chromium/963/LayoutTests/fast/dom/title-directionality-removeChild.html	                        (rev 0)
+++ branches/chromium/963/LayoutTests/fast/dom/title-directionality-removeChild.html	2012-03-01 17:50:09 UTC (rev 109355)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>page title</title>
+</head>
+<body>
+<iframe id=iframe></iframe>
+<script>
+var iframe = document.getElementById('iframe');
+
+function assertDirection(label, expectedDirection, html)
+{
+    var doc = iframe.contentDocument;
+    doc.removeChild(doc.documentElement);
+    doc.open();
+    doc.write(html);
+    doc.close();
+
+    var dir = window.layoutTestController ? layoutTestController.titleTextDirection : 'layoutTestController unavailable';
+    var status = html + ' should have title direction "' + expectedDirection + '". ';
+    if (dir == expectedDirection) {
+        status += 'PASS';
+    } else {
+        status += 'FAIL (got: "' + dir + '")';
+    }
+    var div = document.createElement('div');
+    div.innerText = status;
+    document.body.appendChild(div);
+}
+
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+assertDirection('normal doc', 'ltr',
+                '<html><title>foo</title></html>');
+assertDirection('title dir=rtl', 'rtl',
+                '<html><title dir=rtl>foo</title></html>');
+assertDirection('html dir=rtl', 'rtl',
+                '<html dir=rtl><title>foo</title></html>');
+assertDirection('html dir=rtl, title dir=ltr', 'ltr',
+                '<html dir=rtl><title dir=ltr>foo</title></html>');
+</script>
+</body>
+</html>

Modified: branches/chromium/963/Source/WebCore/dom/ContainerNode.cpp (109354 => 109355)


--- branches/chromium/963/Source/WebCore/dom/ContainerNode.cpp	2012-03-01 17:49:11 UTC (rev 109354)
+++ branches/chromium/963/Source/WebCore/dom/ContainerNode.cpp	2012-03-01 17:50:09 UTC (rev 109355)
@@ -479,13 +479,13 @@
     Node* next = child->nextSibling();
     removeBetween(prev, next, child.get());
 
+    childrenChanged(false, prev, next, -1);
+
     if (child->inDocument())
         child->removedFromDocument();
     else
         child->removedFromTree(true);
 
-    // Dispatch post-removal mutation events
-    childrenChanged(false, prev, next, -1);
     dispatchSubtreeModifiedEvent();
 
     return child;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to