Title: [93556] trunk
Revision
93556
Author
pkast...@chromium.org
Date
2011-08-22 16:15:05 -0700 (Mon, 22 Aug 2011)

Log Message

Unreviewed, rolling out r93538.
http://trac.webkit.org/changeset/93538
https://bugs.webkit.org/show_bug.cgi?id=66143

Broke Leopard, SnowLeopard, and Chromium Mac bots

Source/WebCore: 

* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):

LayoutTests: 

* fast/regions/webkit-flow-floats-inside-regions-bounds-expected.txt: Removed.
* fast/regions/webkit-flow-floats-inside-regions-bounds.html: Removed.
* fast/regions/webkit-flow-inlines-inside-regions-bounds-expected.txt: Removed.
* fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr-expected.txt: Removed.
* fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html: Removed.
* fast/regions/webkit-flow-inlines-inside-regions-bounds.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (93555 => 93556)


--- trunk/LayoutTests/ChangeLog	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/ChangeLog	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,3 +1,18 @@
+2011-08-22  Peter Kasting  <pkast...@google.com>
+
+        Unreviewed, rolling out r93538.
+        http://trac.webkit.org/changeset/93538
+        https://bugs.webkit.org/show_bug.cgi?id=66143
+
+        Broke Leopard, SnowLeopard, and Chromium Mac bots
+
+        * fast/regions/webkit-flow-floats-inside-regions-bounds-expected.txt: Removed.
+        * fast/regions/webkit-flow-floats-inside-regions-bounds.html: Removed.
+        * fast/regions/webkit-flow-inlines-inside-regions-bounds-expected.txt: Removed.
+        * fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr-expected.txt: Removed.
+        * fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html: Removed.
+        * fast/regions/webkit-flow-inlines-inside-regions-bounds.html: Removed.
+
 2011-08-22  Tony Chang  <t...@chromium.org>
 
         Move chromium-mac/plugins/keyboard-events-expected.txt to

Deleted: trunk/LayoutTests/fast/regions/webkit-flow-floats-inside-regions-bounds-expected.txt (93555 => 93556)


--- trunk/LayoutTests/fast/regions/webkit-flow-floats-inside-regions-bounds-expected.txt	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/fast/regions/webkit-flow-floats-inside-regions-bounds-expected.txt	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,52 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x422
-  RenderBlock {HTML} at (0,0) size 800x422
-    RenderBody {BODY} at (8,8) size 784x406
-      RenderBlock {DIV} at (0,0) size 784x406
-        RenderRegion {DIV} at (0,0) size 202x102 [border: (1px solid #000000)]
-        RenderRegion {DIV} at (0,102) size 302x182 [border: (1px solid #000000)]
-        RenderRegion {DIV} at (0,284) size 122x122 [border: (1px solid #000000)]
-Flow Threads
-  Thread with flow-name 'flow1'
-    layer at (0,0) size 300x400
-      RenderFlowThread at (0,0) size 300x400
-        RenderBlock {DIV} at (0,0) size 300x474
-          RenderBlock {DIV} at (5,5) size 290x464 [border: (1px solid #0000FF)]
-            RenderBlock {DIV} at (11,11) size 268x442 [border: (1px solid #008000)]
-              RenderBlock {P} at (1,17) size 266x36
-                RenderText {#text} at (0,0) size 166x36
-                  text run at (0,0) width 166: "This line of text should"
-                  text run at (0,18) width 155: "not get out of the region."
-              RenderBlock (floating) {DIV} at (95,69) size 72x37 [border: (1px solid #FF0000)]
-                RenderText {#text} at (1,1) size 44x18
-                  text run at (1,1) width 44: "Float 1"
-              RenderBlock (anonymous) at (1,69) size 266x108
-                RenderText {#text} at (0,0) size 266x108
-                  text run at (0,0) width 94: "This line of"
-                  text run at (0,18) width 94: "text should not"
-                  text run at (0,36) width 94: "get out of the"
-                  text run at (0,54) width 266: "region. This line of text should not get out"
-                  text run at (0,72) width 266: "of the region. This line of text should not"
-                  text run at (0,90) width 131: "get out of the region."
-              RenderBlock {P} at (1,193) size 266x0
-              RenderBlock {P} at (1,193) size 266x126
-                RenderText {#text} at (0,0) size 266x126
-                  text run at (0,0) width 266: "This line of text should not get out of the"
-                  text run at (0,18) width 266: "region. This line of text should not get out"
-                  text run at (0,36) width 266: "of the region. This line of text should not"
-                  text run at (0,54) width 266: "get out of the region. This line of text"
-                  text run at (0,72) width 86: "should not"
-                  text run at (0,90) width 86: "get out of the"
-                  text run at (0,108) width 44: "region."
-              RenderBlock {P} at (1,335) size 266x90
-                RenderText {#text} at (0,0) size 86x90
-                  text run at (0,0) width 86: "This line of"
-                  text run at (0,18) width 86: "text should"
-                  text run at (0,36) width 86: "not get out of"
-                  text run at (0,54) width 19: "the"
-                  text run at (0,72) width 44: "region."
-  Regions for flow 'flow1'
-    RenderRegion {DIV} #region1 with index 0
-    RenderRegion {DIV} #region2 with index 0
-    RenderRegion {DIV} #region3 with index 0

Deleted: trunk/LayoutTests/fast/regions/webkit-flow-floats-inside-regions-bounds.html (93555 => 93556)


--- trunk/LayoutTests/fast/regions/webkit-flow-floats-inside-regions-bounds.html	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/fast/regions/webkit-flow-floats-inside-regions-bounds.html	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,61 +0,0 @@
-<!doctype html>
-
- <style>
-    #content {
-        -webkit-flow: "flow1";
-        text-align: justify;
-        padding: 5px;
-    }
-    
-    #first-box {
-        border: 1px solid blue;
-    }
-    
-    #second-box {
-        margin:10px;
-        border: 1px solid green;
-    }
-    
-    #float1 {
-        float: right;
-        width: 70px;
-        height: 35px;
-        border: 1px solid red;
-    }
-    
-    #region1, #region2, #region3 {
-        border: 1px solid black;
-        content: -webkit-from-flow("flow1");
-    }
-
-    #region1 {
-        width: 200px;
-        height: 100px;
-    }
-    
-    #region2 {
-        width: 300px;
-        height: 180px;
-    }
-    
-    #region3 {
-        width: 120px;
-        height: 120px;
-    }
-</style>
-
-<div id="content">
-    <div id="first-box">
-        <div id="second-box">
-            <p>This line of text should not get out of the region.<div id="float1">Float 1</div> This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region.</p>
-            <p>This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region.</p>
-            <p>This line of text should not get out of the region.</p>
-        </div>
-    </div>
-</div>
-
-<div id="container">
-    <div id="region1"></div>
-    <div id="region2"></div>
-    <div id="region3"></div>
-</div>

Deleted: trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-expected.txt (93555 => 93556)


--- trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-expected.txt	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-expected.txt	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,42 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x422
-  RenderBlock {HTML} at (0,0) size 800x422
-    RenderBody {BODY} at (8,8) size 784x406
-      RenderBlock {DIV} at (0,0) size 784x406
-        RenderRegion {DIV} at (0,0) size 202x102 [border: (1px solid #000000)]
-        RenderRegion {DIV} at (0,102) size 302x182 [border: (1px solid #000000)]
-        RenderRegion {DIV} at (0,284) size 122x122 [border: (1px solid #000000)]
-Flow Threads
-  Thread with flow-name 'flow1'
-    layer at (0,0) size 300x400
-      RenderFlowThread at (0,0) size 300x400
-        RenderBlock {DIV} at (0,0) size 300x386
-          RenderBlock {DIV} at (5,5) size 290x376 [border: (1px solid #0000FF)]
-            RenderBlock {DIV} at (11,11) size 268x354 [border: (1px solid #008000)]
-              RenderBlock {P} at (1,17) size 266x126
-                RenderText {#text} at (0,0) size 266x126
-                  text run at (0,0) width 166: "This line of text should"
-                  text run at (0,18) width 166: "not get out of the region."
-                  text run at (0,36) width 166: "This line of text should"
-                  text run at (0,54) width 166: "not get out of the region."
-                  text run at (0,72) width 266: "This line of text should not get out of the"
-                  text run at (0,90) width 266: "region. This line of text should not get out"
-                  text run at (0,108) width 84: "of the region."
-              RenderBlock {P} at (1,159) size 266x90
-                RenderText {#text} at (0,0) size 266x90
-                  text run at (0,0) width 266: "This line of text should not get out of the"
-                  text run at (0,18) width 266: "region. This line of text should not get out"
-                  text run at (0,36) width 266: "of the region. This line of text should not"
-                  text run at (0,54) width 266: "get out of the region. This line of text"
-                  text run at (0,72) width 201: "should not get out of the region."
-              RenderBlock {P} at (1,265) size 266x72
-                RenderText {#text} at (0,0) size 86x72
-                  text run at (0,0) width 86: "This line of"
-                  text run at (0,18) width 86: "text should"
-                  text run at (0,36) width 86: "not get out of"
-                  text run at (0,54) width 67: "the region."
-  Regions for flow 'flow1'
-    RenderRegion {DIV} #region1 with index 0
-    RenderRegion {DIV} #region2 with index 0
-    RenderRegion {DIV} #region3 with index 0

Deleted: trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr-expected.txt (93555 => 93556)


--- trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr-expected.txt	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr-expected.txt	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,53 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (158,0) size 642x600
-  RenderBlock {HTML} at (0,0) size 642x600
-    RenderBody {BODY} at (8,8) size 626x584
-      RenderBlock {DIV} at (0,0) size 626x584
-        RenderRegion {DIV} at (0,0) size 202x102 [border: (1px solid #000000)]
-        RenderRegion {DIV} at (202,0) size 302x182 [border: (1px solid #000000)]
-        RenderRegion {DIV} at (504,0) size 122x122 [border: (1px solid #000000)]
-Flow Threads
-  Thread with flow-name 'flow1'
-    layer at (180,0) size 620x180
-      RenderFlowThread at (0,0) size 620x180
-        RenderBlock {DIV} at (0,0) size 584x180
-          RenderBlock {DIV} at (5,5) size 574x170 [border: (1px solid #0000FF)]
-            RenderBlock {DIV} at (11,11) size 552x148 [border: (1px solid #008000)]
-              RenderBlock {P} at (17,1) size 270x146
-                RenderText {#text} at (0,0) size 270x146
-                  text run at (0,0) width 66: "This line"
-                  text run at (18,0) width 66: "of text"
-                  text run at (36,0) width 66: "should not"
-                  text run at (54,0) width 66: "get out of"
-                  text run at (72,0) width 19: "the"
-                  text run at (90,0) width 44: "region."
-                  text run at (108,0) width 66: "This line"
-                  text run at (126,0) width 66: "of text"
-                  text run at (144,0) width 66: "should not"
-                  text run at (162,0) width 66: "get out of"
-                  text run at (180,0) width 146: "the region. This line of"
-                  text run at (198,0) width 146: "text should not get out"
-                  text run at (216,0) width 146: "of the region. This line"
-                  text run at (234,0) width 146: "of text should not get"
-                  text run at (252,0) width 108: "out of the region."
-              RenderBlock {P} at (303,1) size 162x146
-                RenderText {#text} at (0,0) size 162x146
-                  text run at (0,0) width 146: "This line of text should"
-                  text run at (18,0) width 146: "not get out of the"
-                  text run at (36,0) width 146: "region. This line of"
-                  text run at (54,0) width 146: "text should not get out"
-                  text run at (72,0) width 146: "of the region. This line"
-                  text run at (90,0) width 146: "of text should not get"
-                  text run at (108,0) width 146: "out of the region. This"
-                  text run at (126,0) width 146: "line of text should not"
-                  text run at (144,0) width 131: "get out of the region."
-              RenderBlock {P} at (481,1) size 54x146
-                RenderText {#text} at (0,0) size 54x146
-                  text run at (0,0) width 146: "This line of text should"
-                  text run at (18,0) width 86: "not get out of"
-                  text run at (36,0) width 67: "the region."
-  Regions for flow 'flow1'
-    RenderRegion {DIV} #region1 with index 0
-    RenderRegion {DIV} #region2 with index 0
-    RenderRegion {DIV} #region3 with index 0

Deleted: trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html (93555 => 93556)


--- trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,56 +0,0 @@
-<!doctype html>
-
- <style>
-    html { -webkit-writing-mode: vertical-rl }
- 
-    #content {
-        -webkit-flow: "flow1";
-        text-align: justify;
-        padding: 5px;
-    }
-    
-    #first-box {
-        border: 1px solid blue;
-    }
-    
-    #second-box {
-        margin:10px;
-        border: 1px solid green;
-    }
-    
-    #region1, #region2, #region3 {
-        border: 1px solid black;
-        content: -webkit-from-flow("flow1");
-    }
-
-    #region1 {
-        width: 200px;
-        height: 100px;
-    }
-    
-    #region2 {
-        width: 300px;
-        height: 180px;
-    }
-    
-    #region3 {
-        width: 120px;
-        height: 120px;
-    }
-</style>
-
-<div id="content">
-    <div id="first-box">
-        <div id="second-box">
-            <p>This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region.</p>
-            <p>This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region.</p>
-            <p>This line of text should not get out of the region.</p>
-        </div>
-    </div>
-</div>
-
-<div id="container">
-    <div id="region1"></div>
-    <div id="region2"></div>
-    <div id="region3"></div>
-</div>

Deleted: trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds.html (93555 => 93556)


--- trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds.html	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/LayoutTests/fast/regions/webkit-flow-inlines-inside-regions-bounds.html	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,54 +0,0 @@
-<!doctype html>
-
- <style>
-    #content {
-        -webkit-flow: "flow1";
-        text-align: justify;
-        padding: 5px;
-    }
-    
-    #first-box {
-        border: 1px solid blue;
-    }
-    
-    #second-box {
-        margin:10px;
-        border: 1px solid green;
-    }
-    
-    #region1, #region2, #region3 {
-        border: 1px solid black;
-        content: -webkit-from-flow("flow1");
-    }
-
-    #region1 {
-        width: 200px;
-        height: 100px;
-    }
-    
-    #region2 {
-        width: 300px;
-        height: 180px;
-    }
-    
-    #region3 {
-        width: 120px;
-        height: 120px;
-    }
-</style>
-
-<div id="content">
-    <div id="first-box">
-        <div id="second-box">
-            <p>This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region.</p>
-            <p>This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region. This line of text should not get out of the region.</p>
-            <p>This line of text should not get out of the region.</p>
-        </div>
-    </div>
-</div>
-
-<div id="container">
-    <div id="region1"></div>
-    <div id="region2"></div>
-    <div id="region3"></div>
-</div>

Modified: trunk/Source/WebCore/ChangeLog (93555 => 93556)


--- trunk/Source/WebCore/ChangeLog	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/ChangeLog	2011-08-22 23:15:05 UTC (rev 93556)
@@ -1,3 +1,29 @@
+2011-08-22  Peter Kasting  <pkast...@google.com>
+
+        Unreviewed, rolling out r93538.
+        http://trac.webkit.org/changeset/93538
+        https://bugs.webkit.org/show_bug.cgi?id=66143
+
+        Broke Leopard, SnowLeopard, and Chromium Mac bots
+
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::LayoutState):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutBlock):
+        (WebCore::RenderBlock::logicalRightOffsetForLine):
+        * rendering/RenderBlock.h:
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::RenderFlowThread):
+        (WebCore::RenderFlowThread::layout):
+        (WebCore::RenderFlowThread::repaintRectangleInRegions):
+        * rendering/RenderFlowThread.h:
+        * rendering/RenderRegion.cpp:
+        * rendering/RenderRegion.h:
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::RenderView):
+        * rendering/RenderView.h:
+        (WebCore::RenderView::pushLayoutState):
+
 2011-08-22  Tony Chang  <t...@chromium.org>
 
         Add CSS parsing of -webkit-flex-pack

Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (93555 => 93556)


--- trunk/Source/WebCore/rendering/LayoutState.cpp	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp	2011-08-22 23:15:05 UTC (rev 93556)
@@ -82,7 +82,7 @@
 
     // If we establish a new page height, then cache the offset to the top of the first page.
     // We can compare this later on to figure out what part of the page we're actually on,
-    if (pageLogicalHeight || m_columnInfo || renderer->isRenderFlowThread()) {
+    if (pageLogicalHeight || m_columnInfo) {
         m_pageLogicalHeight = pageLogicalHeight;
         m_pageOffset = LayoutSize(m_layoutOffset.width() + renderer->borderLeft() + renderer->paddingLeft(),
                                m_layoutOffset.height() + renderer->borderTop() + renderer->paddingTop());

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2011-08-22 23:15:05 UTC (rev 93556)
@@ -41,7 +41,6 @@
 #include "PaintInfo.h"
 #include "RenderCombineText.h"
 #include "RenderDeprecatedFlexibleBox.h"
-#include "RenderFlowThread.h"
 #include "RenderImage.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
@@ -1223,12 +1222,8 @@
             colInfo->clearForcedBreaks();
     }
 
-    RenderView* renderView = view();
-    LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo);
+    LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(), pageLogicalHeight, pageLogicalHeightChanged, colInfo);
 
-    bool disableRegionFitting = renderView->hasRenderFlowThread() && (hasColumns() || (isPositioned() && !isRenderFlowThread()) || isFloating());
-    RegionFittingDisabler regionFittingDisabler(renderView->currentRenderFlowThread(), disableRegionFitting);
-
     // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track
     // our current maximal positive and negative margins.  These values are used when we
     // are collapsed with adjacent blocks, so for example, if you have block A and B
@@ -1310,8 +1305,8 @@
     
     statePusher.pop();
 
-    if (renderView->layoutState()->m_pageLogicalHeight)
-        setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(logicalTop()));
+    if (view()->layoutState()->m_pageLogicalHeight)
+        setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(logicalTop()));
 
     updateLayerTransform();
 
@@ -3561,36 +3556,16 @@
     return left;
 }
 
-void RenderBlock::adjustForRegionFittingIfNeeded(LayoutUnit logicalTop, LayoutUnit& rightOffset) const
-{
-    RenderView* renderView = view();
-    if (!renderView->hasRenderFlowThread())
-        return;
-    
-    RenderFlowThread* flowThread = renderView->currentRenderFlowThread();
-    if (!flowThread->isRegionFittingEnabled())
-        return;
-
-    LayoutState* layoutState = renderView->layoutState();
-    IntSize delta = layoutState->m_layoutOffset - layoutState->m_pageOffset;
-    int offset = isHorizontalWritingMode() ? delta.height() : delta.width();
-    LayoutUnit regionWidth = flowThread->regionLogicalWidthForLine(offset + logicalTop);
-    rightOffset -= flowThread->logicalWidth() - regionWidth;
-}
-
 LayoutUnit RenderBlock::logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const
 {
     LayoutUnit right = fixedOffset;
-    adjustForRegionFittingIfNeeded(logicalTop, right);
 
     if (m_floatingObjects && m_floatingObjects->hasRightObjects()) {
         if (heightRemaining)
             *heightRemaining = 1;
 
-        LayoutUnit rightFloatOffset = fixedOffset;
-        FloatIntervalSearchAdapter<FloatingObject::FloatRight> adapter(this, logicalTop, rightFloatOffset, heightRemaining);
+        FloatIntervalSearchAdapter<FloatingObject::FloatRight> adapter(this, logicalTop, right, heightRemaining);
         m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter);
-        right = min(right, rightFloatOffset);
     }
     
     if (applyTextIndent && !style()->isLeftToRightDirection()) {

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2011-08-22 23:15:05 UTC (rev 93556)
@@ -311,8 +311,6 @@
     virtual void paint(PaintInfo&, const LayoutPoint&);
     virtual void paintObject(PaintInfo&, const LayoutPoint&);
 
-    void adjustForRegionFittingIfNeeded(LayoutUnit logicalTop, LayoutUnit& rightOffset) const;
-
     LayoutUnit logicalRightOffsetForLine(LayoutUnit position, LayoutUnit fixedOffset, bool applyTextIndent = true, LayoutUnit* logicalHeightRemaining = 0) const;
     LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, LayoutUnit fixedOffset, bool applyTextIndent = true, LayoutUnit* logicalHeightRemaining = 0) const;
 

Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp	2011-08-22 23:15:05 UTC (rev 93556)
@@ -45,7 +45,6 @@
     : RenderBlock(node)
     , m_flowThread(flowThread)
     , m_regionsInvalidated(false)
-    , m_regionFittingDisableCount(0)
 {
     setIsAnonymous(false);
 }
@@ -271,30 +270,8 @@
     }
 }
 
-class CurrentRenderFlowThreadMaintainer {
-    WTF_MAKE_NONCOPYABLE(CurrentRenderFlowThreadMaintainer);
-public:
-    CurrentRenderFlowThreadMaintainer(RenderFlowThread* renderFlowThread)
-        : m_renderFlowThread(renderFlowThread)
-    {
-        RenderView* view = m_renderFlowThread->view();
-        ASSERT(!view->currentRenderFlowThread());
-        view->setCurrentRenderFlowThread(m_renderFlowThread);
-    }
-    ~CurrentRenderFlowThreadMaintainer()
-    {
-        RenderView* view = m_renderFlowThread->view();
-        ASSERT(view->currentRenderFlowThread() == m_renderFlowThread);
-        view->setCurrentRenderFlowThread(0);
-    }
-private:
-    RenderFlowThread* m_renderFlowThread;
-};
-
 void RenderFlowThread::layout()
 {
-    CurrentRenderFlowThreadMaintainer currentFlowThreadSetter(this);
-
     if (m_regionsInvalidated) {
         m_regionsInvalidated = false;
         if (hasRegions()) {
@@ -459,40 +436,4 @@
     }
 }
 
-RenderRegion* RenderFlowThread::renderRegionForLine(LayoutUnit position) const
-{
-    ASSERT(!m_regionsInvalidated);
-
-    // FIXME: The regions are always in order, optimize this search.
-    bool useHorizontalWritingMode = isHorizontalWritingMode();
-    for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
-        RenderRegion* region = *iter;
-        if (!region->isValid())
-            continue;
-
-        LayoutRect regionRect = region->regionRect();
-
-        if (useHorizontalWritingMode) {
-            if (regionRect.y() <= position && position < regionRect.maxY())
-                return region;
-            continue;
-        }
-
-        if (regionRect.x() <= position && position < regionRect.maxX())
-            return region;
-    }
-
-    return 0;
-}
-
-LayoutUnit RenderFlowThread::regionLogicalWidthForLine(LayoutUnit position) const
-{
-    RenderRegion* region = renderRegionForLine(position);
-    if (!region)
-        return 0;
-
-    return isHorizontalWritingMode() ? region->regionRect().width() : region->regionRect().height();
-}
-
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderFlowThread.h (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderFlowThread.h	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.h	2011-08-22 23:15:05 UTC (rev 93556)
@@ -96,17 +96,9 @@
 
     void repaintRectangleInRegions(const LayoutRect&, bool immediate);
 
-    LayoutUnit regionLogicalWidthForLine(LayoutUnit position) const;
-
-    bool isRegionFittingEnabled() const { return !m_regionFittingDisableCount; }
-    void disableRegionFitting() { m_regionFittingDisableCount++; }
-    void enableRegionFitting() { ASSERT(m_regionFittingDisableCount > 0); m_regionFittingDisableCount--; }
-
 private:
     virtual const char* renderName() const { return "RenderFlowThread"; }
 
-    RenderRegion* renderRegionForLine(LayoutUnit position) const;
-
     bool dependsOn(RenderFlowThread* otherRenderFlowThread) const;
     void addDependencyOnFlowThread(RenderFlowThread*);
     void removeDependencyOnFlowThread(RenderFlowThread*);
@@ -131,7 +123,6 @@
     RenderFlowThreadCountedSet m_layoutBeforeThreadsSet;
 
     bool m_regionsInvalidated;
-    unsigned m_regionFittingDisableCount;
 };
 
 inline RenderFlowThread* toRenderFlowThread(RenderObject* object)
@@ -149,28 +140,6 @@
 // This will catch anyone doing an unnecessary cast.
 void toRenderFlowThread(const RenderFlowThread*);
 
-class RegionFittingDisabler {
-    WTF_MAKE_NONCOPYABLE(RegionFittingDisabler);
-public:
-    RegionFittingDisabler(RenderFlowThread* flowThread, bool disable)
-    {
-        if (flowThread && disable) {
-            m_flowThread = flowThread;
-            m_flowThread->disableRegionFitting();
-        } else
-            m_flowThread = 0;
-    }
-
-    ~RegionFittingDisabler()
-    {
-        if (m_flowThread)
-            m_flowThread->enableRegionFitting();
-    }
-private:
-    RenderFlowThread* m_flowThread;
-};
-
-
 } // namespace WebCore
 
 #endif // RenderFlowThread_h

Modified: trunk/Source/WebCore/rendering/RenderRegion.cpp (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderRegion.cpp	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderRegion.cpp	2011-08-22 23:15:05 UTC (rev 93556)
@@ -82,13 +82,6 @@
     return false;
 }
 
-void RenderRegion::layout()
-{
-    RenderReplaced::layout();
-    if (m_flowThread && isValid())
-        m_flowThread->invalidateRegions();
-}
-
 void RenderRegion::attachRegion()
 {
     if (!m_flowThread)

Modified: trunk/Source/WebCore/rendering/RenderRegion.h (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderRegion.h	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderRegion.h	2011-08-22 23:15:05 UTC (rev 93556)
@@ -58,8 +58,6 @@
     bool isValid() const { return m_isValid; }
     void setIsValid(bool valid) { m_isValid = valid; }
 
-    virtual void layout();
-
 private:
     virtual const char* renderName() const { return "RenderRegion"; }
 

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2011-08-22 23:15:05 UTC (rev 93556)
@@ -55,7 +55,6 @@
     , m_isRenderFlowThreadOrderDirty(false)
     , m_layoutState(0)
     , m_layoutStateDisableCount(0)
-    , m_currentRenderFlowThread(0)
 {
     // Clear our anonymous bit, set because RenderObject assumes
     // any renderer with document as the node is anonymous.

Modified: trunk/Source/WebCore/rendering/RenderView.h (93555 => 93556)


--- trunk/Source/WebCore/rendering/RenderView.h	2011-08-22 23:08:37 UTC (rev 93555)
+++ trunk/Source/WebCore/rendering/RenderView.h	2011-08-22 23:15:05 UTC (rev 93556)
@@ -181,10 +181,6 @@
     }
     const RenderFlowThreadList* renderFlowThreadList() const { return m_renderFlowThreadList.get(); }
 
-    bool hasRenderFlowThread() const { return m_currentRenderFlowThread; }
-    RenderFlowThread* currentRenderFlowThread() const { return m_currentRenderFlowThread; }
-    void setCurrentRenderFlowThread(RenderFlowThread* flowThread) { m_currentRenderFlowThread = flowThread; }
-
     void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
     
 protected:
@@ -200,7 +196,7 @@
     bool pushLayoutState(RenderBox* renderer, const LayoutSize& offset, LayoutUnit pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0)
     {
         // We push LayoutState even if layoutState is disabled because it stores layoutDelta too.
-        if (!doingFullRepaint() || renderer->hasColumns() || m_layoutState->isPaginated() || hasRenderFlowThread()) {
+        if (!doingFullRepaint() || renderer->hasColumns() || m_layoutState->isPaginated()) {
             m_layoutState = new (renderArena()) LayoutState(m_layoutState, renderer, offset, pageHeight, pageHeightChanged, colInfo);
             return true;
         }
@@ -269,7 +265,6 @@
     OwnPtr<RenderLayerCompositor> m_compositor;
 #endif
     OwnPtr<RenderFlowThreadList> m_renderFlowThreadList;
-    RenderFlowThread* m_currentRenderFlowThread;
 };
 
 inline RenderView* toRenderView(RenderObject* object)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to