Title: [92692] trunk
Revision
92692
Author
[email protected]
Date
2011-08-09 11:18:36 -0700 (Tue, 09 Aug 2011)

Log Message

Source/WebCore: Regression(83075): Fix updateAlwaysCreateLineBoxes on information 
about full layout which is needed when dirtying lineboxes.
https://bugs.webkit.org/show_bug.cgi?id=65924

Reviewed by Dave Hyatt.

Test: fast/inline/update-always-create-line-boxes-full-layout-crash.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
* rendering/RenderInline.h:

LayoutTests: Tests that we do not crash when trying to dirty line boxes on
a RenderInline needing full relayout.
https://bugs.webkit.org/show_bug.cgi?id=65924

Reviewed by Dave Hyatt.

* fast/inline/update-always-create-line-boxes-full-layout-crash-expected.txt: Added.
* fast/inline/update-always-create-line-boxes-full-layout-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (92691 => 92692)


--- trunk/LayoutTests/ChangeLog	2011-08-09 18:05:30 UTC (rev 92691)
+++ trunk/LayoutTests/ChangeLog	2011-08-09 18:18:36 UTC (rev 92692)
@@ -1,3 +1,14 @@
+2011-08-09  Abhishek Arya  <[email protected]>
+
+        Tests that we do not crash when trying to dirty line boxes on
+        a RenderInline needing full relayout.
+        https://bugs.webkit.org/show_bug.cgi?id=65924
+
+        Reviewed by Dave Hyatt.
+
+        * fast/inline/update-always-create-line-boxes-full-layout-crash-expected.txt: Added.
+        * fast/inline/update-always-create-line-boxes-full-layout-crash.html: Added.
+
 2011-08-09  Pavel Feldman  <[email protected]>
 
         Not reviewed: rebaselining inspector test.

Added: trunk/LayoutTests/fast/inline/update-always-create-line-boxes-full-layout-crash-expected.txt (0 => 92692)


--- trunk/LayoutTests/fast/inline/update-always-create-line-boxes-full-layout-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/update-always-create-line-boxes-full-layout-crash-expected.txt	2011-08-09 18:18:36 UTC (rev 92692)
@@ -0,0 +1,2 @@
+PASS
+

Added: trunk/LayoutTests/fast/inline/update-always-create-line-boxes-full-layout-crash.html (0 => 92692)


--- trunk/LayoutTests/fast/inline/update-always-create-line-boxes-full-layout-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/update-always-create-line-boxes-full-layout-crash.html	2011-08-09 18:18:36 UTC (rev 92692)
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<html>
+<style>
+.table:nth-last-child(even) { line-height: 100%; }
+</style>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function runTest()
+{
+    var test = document.getElementById('test');
+    test.parentNode.removeChild(test);
+
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+
+setTimeout("runTest()", 0); 
+</script>
+<table class=table>
+<td><rt>PASS</rt></junk></td>
+<table><span id="test"></table>
+</table>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (92691 => 92692)


--- trunk/Source/WebCore/ChangeLog	2011-08-09 18:05:30 UTC (rev 92691)
+++ trunk/Source/WebCore/ChangeLog	2011-08-09 18:18:36 UTC (rev 92692)
@@ -1,3 +1,19 @@
+2011-08-09  Abhishek Arya  <[email protected]>
+
+        Regression(83075): Fix updateAlwaysCreateLineBoxes on information 
+        about full layout which is needed when dirtying lineboxes.
+        https://bugs.webkit.org/show_bug.cgi?id=65924
+
+        Reviewed by Dave Hyatt.
+
+        Test: fast/inline/update-always-create-line-boxes-full-layout-crash.html
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlock::layoutInlineChildren):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
+        * rendering/RenderInline.h:
+
 2011-08-09  Nate Chapin  <[email protected]>
 
         Remove receivedCancellation() from SubresourceLoaderClient.

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (92691 => 92692)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2011-08-09 18:05:30 UTC (rev 92691)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2011-08-09 18:18:36 UTC (rev 92692)
@@ -1256,7 +1256,7 @@
                 }
             } else if (o->isText() || (o->isRenderInline() && !walker.atEndOfInline())) {
                 if (!o->isText())
-                    toRenderInline(o)->updateAlwaysCreateLineBoxes();
+                    toRenderInline(o)->updateAlwaysCreateLineBoxes(layoutState.isFullLayout());
                 if (layoutState.isFullLayout() || o->selfNeedsLayout())
                     dirtyLineBoxesForRenderer(o, layoutState.isFullLayout());
                 o->setNeedsLayout(false);

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (92691 => 92692)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2011-08-09 18:05:30 UTC (rev 92691)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2011-08-09 18:18:36 UTC (rev 92692)
@@ -162,7 +162,7 @@
     }
 }
 
-void RenderInline::updateAlwaysCreateLineBoxes()
+void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout)
 {
     // Once we have been tainted once, just assume it will happen again. This way effects like hover highlighting that change the
     // background color will only cause a layout on the first rollover.
@@ -189,7 +189,8 @@
     }
 
     if (alwaysCreateLineBoxes) {
-        dirtyLineBoxes(false);
+        if (!fullLayout)
+            dirtyLineBoxes(false);
         m_alwaysCreateLineBoxes = true;
     }
 }

Modified: trunk/Source/WebCore/rendering/RenderInline.h (92691 => 92692)


--- trunk/Source/WebCore/rendering/RenderInline.h	2011-08-09 18:05:30 UTC (rev 92691)
+++ trunk/Source/WebCore/rendering/RenderInline.h	2011-08-09 18:18:36 UTC (rev 92692)
@@ -81,7 +81,7 @@
 
     bool alwaysCreateLineBoxes() const { return m_alwaysCreateLineBoxes; }
     void setAlwaysCreateLineBoxes() { m_alwaysCreateLineBoxes = true; }
-    void updateAlwaysCreateLineBoxes();
+    void updateAlwaysCreateLineBoxes(bool fullLayout);
 
 protected:
     virtual void willBeDestroyed();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to