Title: [105297] branches/safari-534.54-branch

Diff

Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (105296 => 105297)


--- branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-18 18:49:51 UTC (rev 105296)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-18 18:51:40 UTC (rev 105297)
@@ -1,5 +1,29 @@
 2011-01-18  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 97088
+
+    2011-10-10  Jeremy Apthorp  <jere...@chromium.org>
+
+            Exiting fullscreen shouldn't crash if the element that was fullscreened
+            had associated anonymous blocks.
+            https://bugs.webkit.org/show_bug.cgi?id=68503
+
+            When exiting fullscreen, if the child of the RenderFullScreen is a
+            block and the parent has inline flow elements, the parent's children
+            should be made non-inline before adding the fullscreened element back
+            to the parent.
+
+            Reviewed by Simon Fraser.
+
+            * fullscreen/full-screen-render-inline.html: Added.
+            * fullscreen/full-screen-render-inline-expected.png: Added.
+            * fullscreen/full-screen-render-inline-expected.txt: Added.
+            * fullscreen/parent-flow-inline-with-block-child.html: Added.
+            * fullscreen/parent-flow-inline-with-block-child-expected.png: Added.
+            * fullscreen/parent-flow-inline-with-block-child-expected.txt: Added.
+
+2011-01-18  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 95371
 
     2011-09-16  Jeremy Apthorp <jere...@chromium.org> and James Kozianski  <k...@chromium.org>

Copied: branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline-expected.png (from rev 97088, trunk/LayoutTests/fullscreen/full-screen-render-inline-expected.png) (0 => 105297)


--- branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline-expected.png	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline-expected.png	2012-01-18 18:51:40 UTC (rev 105297)
@@ -0,0 +1,4 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82p)tEXtchecksumb18b65cdba862a3c73de2fb5e5a1ec37\xA0A1\x95IDATx\x9C\xED\xDD1\xC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C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2/\x8F\xC0\xAE\xB8\xFB\xA0\xABIEND\xAEB`\x82
\ No newline at end of file

Copied: branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline-expected.txt (from rev 97088, trunk/LayoutTests/fullscreen/full-screen-render-inline-expected.txt) (0 => 105297)


--- branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline-expected.txt	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline-expected.txt	2012-01-18 18:51:40 UTC (rev 105297)
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderSummary {SUMMARY} at (0,0) size 784x48
+        RenderBlock (anonymous) at (0,0) size 784x0
+        RenderBlock (anonymous) at (0,0) size 784x0
+        RenderBlock (anonymous) at (0,0) size 784x16
+          RenderText {#text} at (0,0) size 16x16
+            text run at (0,0) width 16: "a"
+          RenderInline {SPAN} at (0,0) size 16x16
+            RenderText {#text} at (16,0) size 16x16
+              text run at (16,0) width 16: "b"
+        RenderBlock (anonymous) at (0,16) size 784x16
+          RenderBlock {DIV} at (0,0) size 784x16
+            RenderText {#text} at (0,0) size 16x16
+              text run at (0,0) width 16: "c"
+        RenderBlock (anonymous) at (0,32) size 784x16
+          RenderInline {SPAN} at (0,0) size 16x16
+            RenderText {#text} at (0,0) size 16x16
+              text run at (0,0) width 16: "d"
+          RenderText {#text} at (16,0) size 16x16
+            text run at (16,0) width 16: "e"

Copied: branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline.html (from rev 97088, trunk/LayoutTests/fullscreen/full-screen-render-inline.html) (0 => 105297)


--- branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline.html	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fullscreen/full-screen-render-inline.html	2012-01-18 18:51:40 UTC (rev 105297)
@@ -0,0 +1,34 @@
+<style>
+body {
+    font-family: ahem;
+    -webkit-font-smoothing: none;
+}
+</style>
+<summary>a<span>b<div>c</div>d</span>e</summary>
+<script>
+    if ("webkitRequestFullScreen" in Element.prototype) {
+        if (window.layoutTestController)
+            layoutTestController.waitUntilDone();
+        document.body.offsetTop;
+        var span = document.getElementsByTagName('span')[0];
+
+        var fullscreenChangeEvent = function(event) {
+            if (document.webkitIsFullScreen) {
+                setTimeout(function () {
+                    document.webkitCancelFullScreen();
+                }, 0)
+            } else {
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+            }
+        };
+
+        document.addEventListener('webkitfullscreenchange', fullscreenChangeEvent);
+
+        document.addEventListener('keydown', function () {
+            span.webkitRequestFullScreen();
+        });
+        if (window.eventSender)
+            eventSender.keyDown('a');
+    }
+</script>

Copied: branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.png (from rev 97088, trunk/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.png) (0 => 105297)


--- branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.png	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.png	2012-01-18 18:51:40 UTC (rev 105297)
@@ -0,0 +1,4 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82p)tEXtchecksum0b447b9d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#@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 s?H\xAD\xF7>IEND\xAEB`\x82
\ No newline at end of file

Copied: branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.txt (from rev 97088, trunk/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.txt) (0 => 105297)


--- branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.txt	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.txt	2012-01-18 18:51:40 UTC (rev 105297)
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x32
+        RenderBlock (anonymous) at (0,0) size 784x16
+          RenderInline {SPAN} at (0,0) size 16x16
+            RenderText {#text} at (0,0) size 16x16
+              text run at (0,0) width 16: "1"
+          RenderText {#text} at (0,0) size 0x0
+        RenderBlock (anonymous) at (0,16) size 784x16
+          RenderInline {SPAN} at (0,0) size 16x16
+            RenderText {#text} at (0,0) size 16x16
+              text run at (0,0) width 16: "2"
+        RenderBlock (anonymous) at (0,32) size 784x0
+          RenderBlock {DIV} at (0,0) size 784x0
+        RenderBlock (anonymous) at (0,32) size 784x0
+          RenderInline {SPAN} at (0,0) size 0x0
+        RenderBlock (anonymous) at (0,32) size 784x0
+          RenderText {#text} at (0,0) size 0x0

Copied: branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child.html (from rev 97088, trunk/LayoutTests/fullscreen/parent-flow-inline-with-block-child.html) (0 => 105297)


--- branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child.html	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fullscreen/parent-flow-inline-with-block-child.html	2012-01-18 18:51:40 UTC (rev 105297)
@@ -0,0 +1,38 @@
+<style>
+body {
+    font-family: ahem;
+    -webkit-font-smoothing: none;
+}
+</style>
+
+<div>
+  <span>1</span>
+  <span id='c2'>2</span>
+</div>
+
+<script>
+    if ("webkitRequestFullScreen" in Element.prototype) {
+        if (window.layoutTestController) 
+            layoutTestController.waitUntilDone();
+        document.body.offsetTop;
+        var span = document.getElementById('c2');
+        var div = span.parentNode;
+
+        var spanEnteredFullScreen = function(event) {
+            setTimeout(function () {
+                span.appendChild(document.createElement('div'));
+                document.webkitCancelFullScreen();
+                if (window.layoutTestController)
+                    layoutTestController.notifyDone();
+            }, 0);
+        };
+
+        document.addEventListener('webkitfullscreenchange', spanEnteredFullScreen);
+
+        document.addEventListener('keydown', function () {
+            span.webkitRequestFullScreen();
+        });
+        if (window.eventSender)
+            eventSender.keyDown('a');
+    }
+</script>

Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (105296 => 105297)


--- branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-18 18:49:51 UTC (rev 105296)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-18 18:51:40 UTC (rev 105297)
@@ -1,5 +1,31 @@
 2011-01-18  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 97088
+
+    2011-10-10  Jeremy Apthorp  <jere...@chromium.org>
+
+            Exiting fullscreen shouldn't crash if the element that was fullscreened
+            had associated anonymous blocks.
+            https://bugs.webkit.org/show_bug.cgi?id=68503
+
+            Reviewed by Simon Fraser.
+
+            Test: fullscreen/full-screen-render-inline.html
+            Test: fullscreen/parent-flow-inline-with-block-child.html
+
+            * rendering/RenderBlock.cpp:
+            (WebCore::RenderBlock::moveChildTo):
+            (WebCore::RenderBlock::moveChildrenTo):
+            * rendering/RenderBlock.h:
+            (WebCore::RenderBlock::moveChildTo):
+            (WebCore::RenderBlock::moveAllChildrenTo):
+            (WebCore::RenderBlock::moveChildrenTo):
+            * rendering/RenderFullScreen.cpp:
+            (RenderFullScreen::unwrapRenderer):
+            Move all children back to the parent, not just the firstChild.
+
+2011-01-18  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 95371
 
     2011-09-16  Jeremy Apthorp <jere...@chromium.org> and James Kozianski  <k...@chromium.org>

Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderFullScreen.cpp (105296 => 105297)


--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderFullScreen.cpp	2012-01-18 18:49:51 UTC (rev 105296)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderFullScreen.cpp	2012-01-18 18:51:40 UTC (rev 105297)
@@ -124,13 +124,16 @@
 
 void RenderFullScreen::unwrapRenderer()
 {
-    RenderObject* wrappedRenderer = firstChild();
-    if (wrappedRenderer) {
-        wrappedRenderer->remove();
-        RenderObject* holder = placeholder() ? placeholder() : this;
-        RenderObject* parent = holder->parent();
-        if (parent)
-            parent->addChild(wrappedRenderer, holder);
+    RenderObject* holder = placeholder() ? placeholder() : this;
+    RenderObject* parent = holder->parent();
+    if (parent) {
+        RenderObject* child = firstChild();
+        while (child) {
+            RenderObject* nextChild = child->nextSibling();
+            child->remove();
+            parent->addChild(child, holder);
+            child = nextChild;
+        }
     }
     remove();
     document()->setFullScreenRenderer(0);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to