Title: [125463] branches/safari-536.26-branch
Revision
125463
Author
[email protected]
Date
2012-08-13 15:39:44 -0700 (Mon, 13 Aug 2012)

Log Message

Merge fix for <rdar://problem/12050793>.

Modified Paths


Removed Paths

Diff

Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,3 +1,29 @@
+2012-08-13  Andy Estes  <[email protected]>
+
+        <rdar://problem/12050793> Brahms: REGRESSION (r113584): Apple reseller website does not display correctly. (91452)
+
+        Roll out <http://trac.webkit.org/changeset/94492>,
+        <http://trac.webkit.org/changeset/103851>, and
+        <http://trac.webkit.org/changeset/113584> from safari-536.26-branch.
+
+        * fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt:
+        * fast/css/absolute-inline-alignment-2-expected.html: Removed.
+        * fast/css/absolute-inline-alignment-2.html: Removed.
+        * fast/css/absolute-inline-alignment-expected.html: Removed.
+        * fast/css/absolute-inline-alignment.html: Removed.
+        * fast/css/align-positioned-object-on-resize-expected.txt: Removed.
+        * fast/css/align-positioned-object-on-resize.html: Removed.
+        * fast/css/bug4860-absolute-block-child-does-not-inherit-alignment-expected.png: Removed.
+        * fast/css/bug4860-absolute-block-child-does-not-inherit-alignment-expected.txt: Removed.
+        * fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html: Removed.
+        * fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.png: Removed.
+        * fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt: Removed.
+        * fast/css/bug4860-absolute-inline-child-inherits-alignment.html: Removed.
+        * fast/inline/absolute-positioned-block-in-centred-block-expected.txt: Removed.
+        * fast/inline/absolute-positioned-block-in-centred-block.html: Removed.
+        * fast/inline/absolute-positioned-inline-in-centred-block-expected.txt: Removed.
+        * fast/inline/absolute-positioned-inline-in-centred-block.html: Removed.
+
 2012-08-13  Lucas Forschler  <[email protected]>
 
     Merge r125086.

Modified: branches/safari-536.26-branch/LayoutTests/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt	2012-08-13 22:39:44 UTC (rev 125463)
@@ -6,7 +6,7 @@
       RenderText {#text} at (0,0) size 0x0
 layer at (87,8) size 627x230
   RenderBlock (relative positioned) {DIV} at (79,0) size 627x230 [bgcolor=#0000FF]
-layer at (154,8) size 501x230
-  RenderBlock (positioned) {DIV} at (67,0) size 501x230 [bgcolor=#FF0000]
+layer at (87,8) size 501x230
+  RenderBlock (positioned) {DIV} at (0,0) size 501x230 [bgcolor=#FF0000]
     RenderImage {IMG} at (51,0) size 400x230
     RenderText {#text} at (0,0) size 0x0

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-2-expected.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-2-expected.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-2-expected.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,25 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<style>
-    body {
-        height: 200%;
-    }
-    div {
-        width: 400px;
-        height: 25px;
-        background-color: silver;
-        text-align: center;
-        margin: 8px 0;
-    }
-    #absolute {
-        position: absolute;
-        width: 25px;
-        height: 25px;
-        background-color: rgba(0, 0, 255, 0.5);
-    }
-</style>
-<div dir="rtl">&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</span></div>
-<div dir="ltr">&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</span></div>
-<div>&#x200b;<span dir="rtl"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div style="text-align: left;">&#x200b;<span dir="rtl"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>
-<div style="text-align: right;">&#x200b;<span dir="rtl"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-2.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-2.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-2.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<style>
-    body {
-        height: 200%;
-    }
-    div {
-        width: 400px;
-        height: 25px;
-        background-color: silver;
-        text-align: center;
-        margin: 8px 0;
-    }
-    #absolute {
-        position: absolute;
-        width: 25px;
-        height: 25px;
-        background-color: rgba(0, 0, 255, 0.5);
-    }
-</style>
-<div dir="rtl"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></div>
-<div dir="ltr"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></div>
-<div><span dir="rtl"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></span></div>
-<div> <span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div style="text-align: left;"><span dir="rtl"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></span></div>
-<div style="text-align: right;"><span dir="rtl"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></span></div>

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-expected.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-expected.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment-expected.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<style>
-    body {
-        height: 200%;
-    }
-    div {
-        width: 400px;
-        height: 25px;
-        background-color: silver;
-        text-align: center;
-        margin: 8px 0;
-    }
-
-    #float {
-        float: left;
-        width: 25px;
-        height: 25px;
-        background-color: rgba(0, 0, 255, 0.5);
-    }
-    #absolute {
-        position: absolute;
-        width: 25px;
-        height: 25px;
-        background-color: rgba(0, 0, 255, 0.5);
-    }
-</style>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum<span id="absolute"></span>    dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span><span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span><span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="float"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span>Lorem ipsum<span id="absolute"></span> dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span><span id="float"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="float"></span><span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div>&#x200b;<span id="absolute"></span><span id="float"></span>Lorem ipsum dolor sit amet</div>

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/absolute-inline-alignment.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<style>
-    body {
-        height: 200%;
-    }
-    div {
-        width: 400px;
-        height: 25px;
-        background-color: silver;
-        text-align: center;
-        margin: 8px 0;
-    }
-
-    #float {
-        float: left;
-        width: 25px;
-        height: 25px;
-        background-color: rgba(0, 0, 255, 0.5);
-    }
-    #absolute {
-        position: absolute;
-        width: 25px;
-        height: 25px;
-        background-color: rgba(0, 0, 255, 0.5);
-    }
-</style>
-<div><span id="absolute"></span>Lorem ipsum dolor sit amet</div>
-<div> <span id="absolute"></span> Lorem ipsum dolor sit amet</div>
-<div><span id="absolute"></span> Lorem ipsum<span id="absolute"></span>    dolor sit amet</div>
-<div><span id="absolute"></span> <span id="absolute"></span> Lorem ipsum dolor sit amet</div>
-<div>  <span id="absolute"></span> <span id="absolute"></span>    Lorem ipsum dolor sit amet</div>
-<div> <span id="absolute"></span>     Lorem ipsum dolor sit amet</div>
-<div> <span id="absolute"></span> Lorem ipsum dolor sit amet</div>
-<div><span id="float"></span>Lorem ipsum dolor sit amet</div>
-<div><span id="absolute"></span> Lorem ipsum<span id="absolute"></span>    dolor sit amet</div>
-<div> <span id="absolute"></span> <span id="float"></span> Lorem ipsum dolor sit amet</div>
-<div> <span id="float"></span> <span id="absolute"></span> Lorem ipsum dolor sit amet</div>
-<div>  <span id="absolute"></span> <span id="float"></span>    Lorem ipsum dolor sit amet</div>

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/align-positioned-object-on-resize-expected.txt (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/align-positioned-object-on-resize-expected.txt	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/align-positioned-object-on-resize-expected.txt	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,3 +0,0 @@
-
-PASS
-

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/align-positioned-object-on-resize.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/align-positioned-object-on-resize.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/align-positioned-object-on-resize.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,55 +0,0 @@
-<html>
-<head>
-    <style>
-    input {
-        left: 5px;
-        right: 5px;
-        position: absolute;
-    }
-    </style>
-    <script>
-    if (window.layoutTestController) {
-        layoutTestController.display();
-        layoutTestController.waitUntilDone();
-        layoutTestController.dumpAsText();
-    }
-    function log(message)
-    {
-        document.getElementById("result").innerHTML += message + "<br>";
-    }
-
-    function measureAfter()
-    {
-        totalWidth = document.getElementById("div").offsetWidth;
-        spanOffset = document.getElementById("span").offsetLeft - document.getElementById("div").offsetLeft;
-        spanWidth = document.getElementById("span").offsetWidth;
-        if (spanWidth + (spanOffset * 2) == totalWidth)
-            log('PASS');
-        else
-            log('FAIL');
-        layoutTestController.notifyDone();
-    }
-
-    function runTest()
-    {
-        window.resizeTo(400,200);
-        setTimeout("measureBefore();",10);
-    }
-
-    function measureBefore()
-    {
-        window.resizeTo(800,400);
-        setTimeout("measureAfter();",10);
-    }
-    </script>
-</head>
-<body _onload_="setTimeout(runTest(),0)">
-    <div style="text-align: center" id="div">
-        <span style="position: absolute; width: 90%;" id="span">
-            <input id="input">
-        </span>
-    </div>
-<div id='result'>
-</div>
-</body>
-</html>
\ No newline at end of file

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment-expected.png


(Binary files differ)

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment-expected.txt (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment-expected.txt	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment-expected.txt	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,9 +0,0 @@
-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
-layer at (8,8) size 627x200
-  RenderBlock (relative positioned) {DIV} at (0,0) size 627x200 [bgcolor=#0000FF]
-layer at (8,8) size 501x200
-  RenderBlock (positioned) {DIV} at (0,0) size 501x200 [bgcolor=#FF0000]

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,20 +0,0 @@
-<html>
-<head>
-    <style type="text/css">
-        body {text-align:center;}
-        body * {
-            width: 80%;
-        }
-        body > div {background: blue;}
-        body > div > div {background: red;}
-    </style>
-</head>
-<!--A block with a block display type does not inherit alignment from its parent.
-    The red block should be aligned to the left.-->
- <body>
-  <div style="position:relative;padding-bottom:200px;">
-   <div style="height: 100%;position:absolute;">
-   </div>
-  </div>
- </body>
-</html>

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.png


(Binary files differ)

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,9 +0,0 @@
-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
-layer at (8,8) size 627x200
-  RenderBlock (relative positioned) {DIV} at (0,0) size 627x200 [bgcolor=#0000FF]
-layer at (75,8) size 501x200
-  RenderBlock (positioned) {DIV} at (67,0) size 501x200 [bgcolor=#FF0000]

Deleted: branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/css/bug4860-absolute-inline-child-inherits-alignment.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,20 +0,0 @@
-<html>
-<head>
-    <style type="text/css">
-        body {text-align:center;}
-        body * {
-            width: 80%;
-        }
-        body > div {background: blue;}
-        body > div > div {background: red;}
-    </style>
-</head>
-<!--A block with an inline display type inherits alignment from its parent.
-    The red block should be centred.-->
- <body>
-  <div style="position:relative;padding-bottom:200px;">
-   <div style="height: 100%;position:absolute; display: inline-block;">
-   </div>
-  </div>
- </body>
-</html>

Deleted: branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-block-in-centred-block-expected.txt (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-block-in-centred-block-expected.txt	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-block-in-centred-block-expected.txt	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,8 +0,0 @@
-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 784x0
-layer at (-142,540) size 200x50 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
-  RenderBlock (positioned) {DIV} at (-142,540) size 200x50 [bgcolor=#0000FF]

Deleted: branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-block-in-centred-block.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-block-in-centred-block.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-block-in-centred-block.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,12 +0,0 @@
-<html>
-<head>
-<!--An absolute positioned block should not obey the alignment of its parent block.
-    The blue block should be 150 pixels off the left of the page.
-    https://bugs.webkit.org/show_bug.cgi?id=4860-->
-</head>
-<body>
-<div align="center">
-<div style="position:absolute; bottom:10px; width:200px; height:50px; margin-left:-150px; background:blue;"></div>
-</div>
-
-</body></html>
\ No newline at end of file

Deleted: branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-inline-in-centred-block-expected.txt (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-inline-in-centred-block-expected.txt	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-inline-in-centred-block-expected.txt	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,10 +0,0 @@
-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 784x0
-layer at (101,562) size 297x28
-  RenderBlock (positioned) {FONT} at (101,562) size 297x28
-    RenderText {#text} at (0,0) size 297x27
-      text run at (0,0) width 297: "Hello World, And Stuff!"

Deleted: branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-inline-in-centred-block.html (125462 => 125463)


--- branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-inline-in-centred-block.html	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/LayoutTests/fast/inline/absolute-positioned-inline-in-centred-block.html	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,11 +0,0 @@
-<html>
-<head>
-<!-- An absolute-positioned inline element, with no leading text, should still obey the alignment of its parent block.
-    'Hello World, And Stuff!' should be aligned 150 pixels to the left of the center.
-    https://bugs.webkit.org/show_bug.cgi?id=4860-->
-</head>
-<body>
-<div align="center">
-<font style="font-size:24px; font-variant:small-caps;letter-spacing:2px; position:absolute; bottom:10px; margin-left:-150px">Hello World, And Stuff!</font>
-</div>
-</body></html>
\ No newline at end of file

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (125462 => 125463)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-13 22:39:44 UTC (rev 125463)
@@ -1,3 +1,26 @@
+2012-08-13  Andy Estes  <[email protected]>
+
+        <rdar://problem/12050793> Brahms: REGRESSION (r113584): Apple reseller website does not display correctly. (91452)
+
+        Roll out <http://trac.webkit.org/changeset/94492>,
+        <http://trac.webkit.org/changeset/103851>, and
+        <http://trac.webkit.org/changeset/113584> from safari-536.26-branch.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutPositionedObjects):
+        * rendering/RenderBlock.h:
+        (RenderBlock):
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::LineInfo::LineInfo):
+        (WebCore::LineInfo::floatPaginationStrut):
+        (LineInfo):
+        (WebCore::RenderBlock::constructLine):
+        (WebCore):
+        (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
+        (WebCore::setStaticPositions):
+        (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
+
 2012-08-13  Lucas Forschler  <[email protected]>
 
     Merge r125104.

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlock.cpp (125462 => 125463)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlock.cpp	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlock.cpp	2012-08-13 22:39:44 UTC (rev 125463)
@@ -2446,17 +2446,9 @@
                 r->computeLogicalWidth();
             oldLogicalTop = logicalTopForChild(r);
         }
-        
+            
         r->layoutIfNeeded();
-
-        // Adjust the static position of a center-aligned inline positioned object with a block child now that the child's width has been computed.
-        if (!r->parent()->isRenderView() && r->parent()->isRenderBlock() && r->firstChild() && r->style()->position() == AbsolutePosition
-            && r->style()->isOriginalDisplayInlineType() && (r->style()->textAlign() == CENTER || r->style()->textAlign() == WEBKIT_CENTER)) {
-            RenderBlock* block = toRenderBlock(r->parent());
-            LayoutUnit blockHeight = block->logicalHeight();
-            block->setStaticInlinePositionForChild(r, blockHeight, block->startAlignedOffsetForLine(r, blockHeight, false));
-        }
-
+        
         // Lay out again if our estimate was wrong.
         if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) {
             r->setChildNeedsLayout(true, MarkOnlyThis);

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlock.h (125462 => 125463)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlock.h	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlock.h	2012-08-13 22:39:44 UTC (rev 125463)
@@ -188,7 +188,6 @@
             : logicalWidth() - logicalRightOffsetForLine(position, firstLine);
     }
 
-    LayoutUnit startAlignedOffsetForLine(RenderBox* child, LayoutUnit position, bool firstLine);
     LayoutUnit textIndentOffset() const;
 
     virtual VisiblePosition positionForPoint(const LayoutPoint&);
@@ -301,8 +300,6 @@
     LayoutUnit collapsedMarginBeforeForChild(const RenderBox* child) const;
     LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const;
 
-    void updateLogicalWidthForAlignment(const ETextAlign&, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount);
-
     virtual void updateFirstLetter();
 
     class MarginValues {

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp (125462 => 125463)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-08-13 22:37:21 UTC (rev 125462)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-08-13 22:39:44 UTC (rev 125463)
@@ -193,7 +193,6 @@
         , m_isEmpty(true)
         , m_previousLineBrokeCleanly(true)
         , m_floatPaginationStrut(0)
-        , m_runsFromLeadingWhitespace(0)
     { }
 
     bool isFirstLine() const { return m_isFirstLine; }
@@ -201,9 +200,6 @@
     bool isEmpty() const { return m_isEmpty; }
     bool previousLineBrokeCleanly() const { return m_previousLineBrokeCleanly; }
     LayoutUnit floatPaginationStrut() const { return m_floatPaginationStrut; }
-    unsigned runsFromLeadingWhitespace() const { return m_runsFromLeadingWhitespace; }
-    void resetRunsFromLeadingWhitespace() { m_runsFromLeadingWhitespace = 0; }
-    void incrementRunsFromLeadingWhitespace() { m_runsFromLeadingWhitespace++; }
 
     void setFirstLine(bool firstLine) { m_isFirstLine = firstLine; }
     void setLastLine(bool lastLine) { m_isLastLine = lastLine; }
@@ -228,7 +224,6 @@
     bool m_isEmpty;
     bool m_previousLineBrokeCleanly;
     LayoutUnit m_floatPaginationStrut;
-    unsigned m_runsFromLeadingWhitespace;
 };
 
 static inline LayoutUnit borderPaddingMarginStart(RenderInline* child)
@@ -483,11 +478,10 @@
 
     bool rootHasSelectedChildren = false;
     InlineFlowBox* parentBox = 0;
-    int runCount = bidiRuns.runCount() - lineInfo.runsFromLeadingWhitespace();
     for (BidiRun* r = bidiRuns.firstRun(); r; r = r->next()) {
         // Create a box for our object.
-        bool isOnlyRun = (runCount == 1);
-        if (runCount == 2 && !r->m_object->isListMarker())
+        bool isOnlyRun = (bidiRuns.runCount() == 1);
+        if (bidiRuns.runCount() == 2 && !r->m_object->isListMarker())
             isOnlyRun = (!style()->isLeftToRightDirection() ? bidiRuns.lastRun() : bidiRuns.firstRun())->m_object->isListMarker();
 
         if (lineInfo.isEmpty())
@@ -703,57 +697,6 @@
     }
 }
 
-void RenderBlock::updateLogicalWidthForAlignment(const ETextAlign& textAlign, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount)
-{
-    // Armed with the total width of the line (without justification),
-    // we now examine our text-align property in order to determine where to position the
-    // objects horizontally. The total width of the line can be increased if we end up
-    // justifying text.
-    switch (textAlign) {
-    case LEFT:
-    case WEBKIT_LEFT:
-        updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        break;
-    case JUSTIFY:
-        adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, availableLogicalWidth);
-        if (expansionOpportunityCount) {
-            if (trailingSpaceRun) {
-                totalLogicalWidth -= trailingSpaceRun->m_box->logicalWidth();
-                trailingSpaceRun->m_box->setLogicalWidth(0);
-            }
-            break;
-        }
-        // fall through
-    case TAAUTO:
-        // for right to left fall through to right aligned
-        if (style()->isLeftToRightDirection()) {
-            if (totalLogicalWidth > availableLogicalWidth && trailingSpaceRun)
-                trailingSpaceRun->m_box->setLogicalWidth(max<float>(0, trailingSpaceRun->m_box->logicalWidth() - totalLogicalWidth + availableLogicalWidth));
-            break;
-        }
-    case RIGHT:
-    case WEBKIT_RIGHT:
-        updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        break;
-    case CENTER:
-    case WEBKIT_CENTER:
-        updateLogicalWidthForCenterAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        break;
-    case TASTART:
-        if (style()->isLeftToRightDirection())
-            updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        else
-            updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        break;
-    case TAEND:
-        if (style()->isLeftToRightDirection())
-            updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        else
-            updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
-        break;
-    }
-}
-
 void RenderBlock::computeInlineDirectionPositionsForLine(RootInlineBox* lineBox, const LineInfo& lineInfo, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd,
                                                          GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache)
 {
@@ -810,7 +753,53 @@
         expansionOpportunityCount--;
     }
 
-    updateLogicalWidthForAlignment(textAlign, trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth, expansionOpportunityCount);
+    // Armed with the total width of the line (without justification),
+    // we now examine our text-align property in order to determine where to position the
+    // objects horizontally.  The total width of the line can be increased if we end up
+    // justifying text.
+    switch (textAlign) {
+        case LEFT:
+        case WEBKIT_LEFT:
+            updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            break;
+        case JUSTIFY:
+            adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, availableLogicalWidth);
+            if (expansionOpportunityCount) {
+                if (trailingSpaceRun) {
+                    totalLogicalWidth -= trailingSpaceRun->m_box->logicalWidth();
+                    trailingSpaceRun->m_box->setLogicalWidth(0);
+                }
+                break;
+            }
+            // fall through
+        case TAAUTO:
+            // for right to left fall through to right aligned
+            if (style()->isLeftToRightDirection()) {
+                if (totalLogicalWidth > availableLogicalWidth && trailingSpaceRun)
+                    trailingSpaceRun->m_box->setLogicalWidth(max<float>(0, trailingSpaceRun->m_box->logicalWidth() - totalLogicalWidth + availableLogicalWidth));
+                break;
+            }
+        case RIGHT:
+        case WEBKIT_RIGHT:
+            updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            break;
+        case CENTER:
+        case WEBKIT_CENTER:
+            updateLogicalWidthForCenterAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            break;
+        case TASTART:
+            if (style()->isLeftToRightDirection())
+                updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            else
+                updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            break;
+        case TAEND:
+            if (style()->isLeftToRightDirection())
+                updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            else
+                updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
+            break;
+    }
 
     computeExpansionForJustifiedText(firstRun, trailingSpaceRun, expansionOpportunities, expansionOpportunityCount, totalLogicalWidth, availableLogicalWidth);
 
@@ -870,12 +859,12 @@
         // A relative positioned inline encloses us. In this case, we also have to determine our
         // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned
         // inline so that we can obtain the value later.
-        toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startAlignedOffsetForLine(child, blockHeight, false));
+        toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startOffsetForLine(blockHeight, false));
         toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHeight);
     }
 
     if (child->style()->isOriginalDisplayInlineType())
-        block->setStaticInlinePositionForChild(child, blockHeight, block->startAlignedOffsetForLine(child, blockHeight, false));
+        child->layer()->setStaticInlinePosition(block->startOffsetForLine(blockHeight, false));
     else
         block->setStaticInlinePositionForChild(child, blockHeight, block->startOffsetForContent(blockHeight));
     child->layer()->setStaticBlockPosition(blockHeight);
@@ -1243,7 +1232,6 @@
         lineMidpointState.reset();
 
         layoutState.lineInfo().setEmpty(true);
-        layoutState.lineInfo().resetRunsFromLeadingWhitespace();
 
         const InlineIterator oldEnd = end;
         bool isNewUBAParagraph = layoutState.lineInfo().previousLineBrokeCleanly();
@@ -1901,13 +1889,9 @@
 {
     while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(), lineInfo, LeadingWhitespace)) {
         RenderObject* object = resolver.position().m_obj;
-        if (object->isPositioned()) {
+        if (object->isPositioned())
             setStaticPositions(m_block, toRenderBox(object));
-            if (object->style()->isOriginalDisplayInlineType()) {
-                resolver.runs().addRun(createRun(0, 1, object, resolver));
-                lineInfo.incrementRunsFromLeadingWhitespace();
-            }
-        } else if (object->isFloating())
+        else if (object->isFloating())
             m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine, lineInfo, width);
         else if (object->isText() && object->style()->hasTextCombine() && object->isCombineText() && !toRenderCombineText(object)->isCombined()) {
             toRenderCombineText(object)->combineText();
@@ -2766,27 +2750,6 @@
     return true;
 }
 
-LayoutUnit RenderBlock::startAlignedOffsetForLine(RenderBox* child, LayoutUnit position, bool firstLine)
-{
-    ETextAlign textAlign = style()->textAlign();
-
-    if (textAlign == TAAUTO)
-        return startOffsetForLine(position, firstLine);
-
-    // updateLogicalWidthForAlignment() handles the direction of the block so no need to consider it here
-    float logicalLeft;
-    float availableLogicalWidth;
-    logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false);
-    availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) - logicalLeft;
-    float totalLogicalWidth = logicalWidthForChild(child);
-    updateLogicalWidthForAlignment(textAlign, 0l, logicalLeft, totalLogicalWidth, availableLogicalWidth, 0);
-
-    if (!style()->isLeftToRightDirection())
-        return logicalWidth() - (logicalLeft + totalLogicalWidth);
-    return logicalLeft;
-}
-
-
 void RenderBlock::layoutLineGridBox()
 {
     if (style()->lineGrid() == RenderStyle::initialLineGrid()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to