Changeset 126911 in webkit
- Timestamp:
- Aug 28, 2012 12:18:40 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r126909 r126911 1 2012-08-28 Robert Hogan <robert@webkit.org> 2 3 REGRESSION (r94492): Unstable layout of static block inside text-align: center div 4 https://bugs.webkit.org/show_bug.cgi?id=77754 5 6 Reviewed by David Hyatt. 7 8 * fast/css/align-positioned-object-on-resize-expected.txt: Removed. 9 * fast/css/align-positioned-object-on-resize.html: Removed. 10 * fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.png: Removed. 11 * fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt: Removed. 12 * fast/css/bug4860-absolute-inline-child-inherits-alignment.html: Removed. 13 These tests are no longer valid. They expect an out-of-flow block to align with the 14 center of their parent. The valid behaviour for an out-of-flow element with a center-align 15 parent is take the center of the parent as their start position. The expected behaviour is 16 now covered by center-align-absolute-position.html below. 17 18 * fast/css/center-align-absolute-position-expected.html: Added. 19 * fast/css/center-align-absolute-position-inline-block-expected.html: Added. 20 * fast/css/center-align-absolute-position-inline-block.html: Added. 21 * fast/css/center-align-absolute-position.html: Added. 22 23 * fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html: 24 * platform/chromium-linux/fast/inline/absolute-positioned-inline-in-centred-block-expected.png: 25 * platform/chromium-linux/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.png: 26 This isn't a very helpful test - but note that the alignment of LTR-RTL centers on an axis. The behaviour 27 now matches FF. 28 * platform/chromium-mac/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.png: Removed. 29 * platform/chromium-win/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.png: 30 * platform/chromium-win/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.png: Removed. 31 * platform/chromium-win/fast/inline/absolute-positioned-inline-in-centred-block-expected.txt: 32 * platform/chromium-win/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.txt: 33 * platform/chromium/TestExpectations: 34 * platform/chromium/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt: 35 * platform/chromium/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt: Removed. 36 * platform/efl/TestExpectations: 37 * platform/gtk/TestExpectations: 38 * platform/mac/TestExpectations: 39 * platform/qt/TestExpectations: 40 * platform/qt/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.png: Removed. 41 * platform/qt/fast/css/bug4860-absolute-inline-child-inherits-alignment-expected.txt: Removed. 42 The rebaselined results on each of these now matches FF. 43 1 44 2012-08-24 Jon Lee <jonlee@apple.com> 2 45 -
trunk/LayoutTests/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html
r95726 r126911 5 5 https://bugs.webkit.org/show_bug.cgi?id=4860--> 6 6 </head> 7 <body >7 <body style="width: 800px;"> 8 8 9 9 <div align="center" style="direction: rtl;"> … … 36 36 37 37 <div style="direction: ltr;"> 38 <font style="font-size:24px; font-variant:small-caps;letter-spacing:2px; position:absolute; bottom:3 00px;">LTR-No-Aligned</font>38 <font style="font-size:24px; font-variant:small-caps;letter-spacing:2px; position:absolute; bottom:350px;">LTR-No-Aligned</font> 39 39 </div> 40 40 -
trunk/LayoutTests/platform/chromium-win/fast/inline/absolute-positioned-inline-in-centred-block-expected.txt
r117903 r126911 5 5 RenderBody {BODY} at (8,8) size 784x584 6 6 RenderBlock {DIV} at (0,0) size 784x0 7 layer at ( 102,562) size 297x288 RenderBlock (positioned) {FONT} at ( 101,562) size 298x287 layer at (250,562) size 297x28 8 RenderBlock (positioned) {FONT} at (250,562) size 297x28 9 9 RenderText {#text} at (0,0) size 297x27 10 10 text run at (0,0) width 297: "Hello World, And Stuff!" -
trunk/LayoutTests/platform/chromium-win/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.txt
r117821 r126911 1 layer at (0,0) size 800x6002 RenderView at (0,0) size 800x 6003 layer at (0,0) size 800x 6004 RenderBlock {HTML} at (0,0) size 800x 6005 RenderBody {BODY} at (8,8) size 784x5846 RenderBlock {DIV} at (0,0) size 784x07 RenderBlock {DIV} at (0,0) size 784x08 RenderBlock {DIV} at (0,0) size 784x09 RenderBlock {DIV} at (0,0) size 784x010 RenderBlock {DIV} at (0,0) size 784x011 RenderBlock {DIV} at (0,0) size 784x012 RenderBlock {DIV} at (0,0) size 784x013 RenderBlock {DIV} at (0,0) size 784x014 layer at ( 279,562) size 243x2815 RenderBlock (positioned) {FONT} at ( 278,562) size 244x281 layer at (0,0) size 900x585 2 RenderView at (0,0) size 800x585 3 layer at (0,0) size 800x585 4 RenderBlock {HTML} at (0,0) size 800x585 5 RenderBody {BODY} at (8,8) size 800x569 6 RenderBlock {DIV} at (0,0) size 800x0 7 RenderBlock {DIV} at (0,0) size 800x0 8 RenderBlock {DIV} at (0,0) size 800x0 9 RenderBlock {DIV} at (0,0) size 800x0 10 RenderBlock {DIV} at (0,0) size 800x0 11 RenderBlock {DIV} at (0,0) size 800x0 12 RenderBlock {DIV} at (0,0) size 800x0 13 RenderBlock {DIV} at (0,0) size 800x0 14 layer at (165,547) size 243x28 15 RenderBlock (positioned) {FONT} at (165,547) size 243x28 16 16 RenderText {#text} at (0,0) size 243x27 17 17 text run at (0,0) width 243: "RTL-Center-Aligned" 18 layer at ( 0,466) size 100x8419 RenderBlock (positioned) {FONT} at ( 0,466) size 100x8418 layer at (-84,451) size 92x84 backgroundClip at (0,0) size 900x585 clip at (0,0) size 900x585 outlineClip at (0,0) size 900x585 19 RenderBlock (positioned) {FONT} at (-84,451) size 92x84 20 20 RenderText {#text} at (0,0) size 92x83 21 21 text run at (0,0) width 61: "RTL-" 22 22 text run at (0,28) width 61: "Left-" 23 23 text run at (0,56) width 92: "Aligned" 24 layer at (5 65,472) size 227x2825 RenderBlock (positioned) {FONT} at (5 65,472) size 227x2824 layer at (581,457) size 227x28 25 RenderBlock (positioned) {FONT} at (581,457) size 227x28 26 26 RenderText {#text} at (0,0) size 227x27 27 27 text run at (0,0) width 227: "RTL-Right-Aligned" 28 layer at ( 596,422) size 196x2829 RenderBlock (positioned) {FONT} at ( 596,422) size 196x2828 layer at (612,407) size 196x28 29 RenderBlock (positioned) {FONT} at (612,407) size 196x28 30 30 RenderText {#text} at (0,0) size 196x27 31 31 text run at (0,0) width 196: "RTL-No-Aligned" 32 layer at ( 279,372) size 243x2833 RenderBlock (positioned) {FONT} at ( 278,372) size 244x2832 layer at (408,357) size 243x28 33 RenderBlock (positioned) {FONT} at (408,357) size 243x28 34 34 RenderText {#text} at (0,0) size 243x27 35 35 text run at (0,0) width 243: "LTR-Center-Aligned" 36 layer at (8,3 22) size 214x2837 RenderBlock (positioned) {FONT} at (8,3 22) size 214x2836 layer at (8,307) size 214x28 37 RenderBlock (positioned) {FONT} at (8,307) size 214x28 38 38 RenderText {#text} at (0,0) size 214x27 39 39 text run at (0,0) width 214: "LTR-Left-Aligned" 40 layer at ( 700,216) size 100x8441 RenderBlock (positioned) {FONT} at ( 700,216) size 100x8442 RenderText {#text} at (3 9,0) size 92x8343 text run at (3 9,0) width 61: "LTR-"44 text run at ( 26,28) width 74: "Right-"45 text run at ( 8,56) width 92: "Aligned"46 layer at (8,2 72) size 196x2847 RenderBlock (positioned) {FONT} at (8,2 72) size 196x2840 layer at (808,201) size 92x84 41 RenderBlock (positioned) {FONT} at (808,201) size 92x84 42 RenderText {#text} at (31,0) size 92x83 43 text run at (31,0) width 61: "LTR-" 44 text run at (18,28) width 74: "Right-" 45 text run at (0,56) width 92: "Aligned" 46 layer at (8,207) size 196x28 47 RenderBlock (positioned) {FONT} at (8,207) size 196x28 48 48 RenderText {#text} at (0,0) size 196x27 49 49 text run at (0,0) width 196: "LTR-No-Aligned" -
trunk/LayoutTests/platform/chromium/TestExpectations
r126894 r126911 3611 3611 BUGWK95136 WIN LINUX : fast/css/sticky/sticky-writing-mode-vertical-lr.html = IMAGE 3612 3612 BUGWK95136 : fast/css/sticky/sticky-writing-mode-vertical-rl.html = IMAGE 3613 3614 // Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=77754 3615 BUGWK77754 MAC WIN : fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html = IMAGE+TEXT 3616 BUGWK77754 MAC WIN : fast/inline/absolute-positioned-inline-in-centred-block.html = IMAGE+TEXT 3617 BUGWK77754 MAC WIN : fast/css/absolute-child-with-percent-height-inside-relative-parent.html = IMAGE+TEXT 3618 -
trunk/LayoutTests/platform/chromium/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt
r117903 r126911 1 layer at (0,0) size 800x6002 RenderView at (0,0) size 800x 6003 layer at (0,0) size 800x 6004 RenderBlock {HTML} at (0,0) size 800x 6005 RenderBody {BODY} at (8,8) size 784x5 841 layer at (0,0) size 902x585 2 RenderView at (0,0) size 800x585 3 layer at (0,0) size 800x585 4 RenderBlock {HTML} at (0,0) size 800x585 5 RenderBody {BODY} at (8,8) size 784x569 6 6 RenderText {#text} at (0,0) size 0x0 7 7 layer at (86,8) size 628x230 8 8 RenderBlock (relative positioned) {DIV} at (78,0) size 628x230 [bgcolor=#0000FF] 9 layer at ( 154,8) size 501x23010 RenderBlock (positioned) {DIV} at ( 67,0) size 503x230 [bgcolor=#FF0000]9 layer at (400,8) size 501x230 10 RenderBlock (positioned) {DIV} at (313,0) size 503x230 [bgcolor=#FF0000] 11 11 RenderImage {IMG} at (49,0) size 403x230 12 12 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/efl/TestExpectations
r126881 r126911 926 926 BUGWK94880 : fast/forms/search-rtl.html = MISSING 927 927 928 //Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=77754 929 BUGWK77754 : fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html = TEXT 930 BUGWK77754 : fast/inline/absolute-positioned-inline-in-centred-block.html = TEXT 931 BUGWK77754 : fast/css/absolute-child-with-percent-height-inside-relative-parent.html = TEXT 932 -
trunk/LayoutTests/platform/gtk/TestExpectations
r126888 r126911 37 37 ////////////////////////////////////////////////////////////////////////////////////////// 38 38 39 BUGWK77754 : fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html = TEXT 40 BUGWK77754 : fast/inline/absolute-positioned-inline-in-centred-block.html = TEXT 41 BUGWK77754 : fast/css/absolute-child-with-percent-height-inside-relative-parent.html = TEXT 39 42 40 43 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/mac/TestExpectations
r126704 r126911 392 392 BUGWK93560 : fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551.html = PASS TEXT 393 393 BUGWK93560 : fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html = PASS TEXT 394 395 //Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=77754 396 BUGWK77754 : fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html = TEXT 397 BUGWK77754 : fast/inline/absolute-positioned-inline-in-centred-block.html = TEXT 398 BUGWK77754 : fast/css/absolute-child-with-percent-height-inside-relative-parent.html = TEXT 399 -
trunk/LayoutTests/platform/qt/TestExpectations
r126707 r126911 197 197 BUGWK84286 : css2.1/t0805-c5521-brdr-l-01-e.html = TEXT 198 198 BUGWK84286 : css2.1/t0805-c5521-ibrdr-l-00-a.html = TEXT 199 200 //Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=77754 201 BUGWK77754 : fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html = TEXT 202 BUGWK77754 : fast/inline/absolute-positioned-inline-in-centred-block.html = TEXT 203 BUGWK77754 : fast/css/absolute-child-with-percent-height-inside-relative-parent.html = TEXT 204 -
trunk/LayoutTests/platform/win/Skipped
r126785 r126911 2134 2134 tables/mozilla_expected_failures/collapsing_borders/bug41262-6.html 2135 2135 http/tests/security/referrer-policy-https-origin.html 2136 2137 # Rebaseline after bug 77754 2138 fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks.html 2139 fast/inline/absolute-positioned-inline-in-centred-block.html 2140 fast/css/absolute-child-with-percent-height-inside-relative-parent.html 2141 2142 -
trunk/Source/WebCore/ChangeLog
r126909 r126911 1 2012-07-10 Robert Hogan <robert@webkit.org> 2 3 REGRESSION (r94492): Unstable layout of static block inside text-align: center div 4 https://bugs.webkit.org/show_bug.cgi?id=77754 5 6 Reviewed by David Hyatt. 7 8 Text-align of 'center' on an out-of-flow element determines its x-position in the line - it 9 doesn't mean that the element should be centred in the line as though it were a block of text. 10 11 This is a partial revert of http://trac.webkit.org/changeset/113584 and a correction to 12 http://trac.webkit.org/changeset/94492. 13 14 Tests: fast/css/center-align-absolute-position-inline-block.html 15 fast/css/center-align-absolute-position.html 16 17 * rendering/RenderBlock.cpp: 18 (WebCore::RenderBlock::layoutPositionedObjects): Remove an update to the static position when 19 it depended on the child's width. Reverts code added in r113584. 20 * rendering/RenderBlock.h: 21 (RenderBlock): Remove child parameter from startAlignedOffsetForLine() 22 * rendering/RenderBlockLineLayout.cpp: 23 (WebCore::setStaticPositions): ditto 24 (WebCore::RenderBlock::startAlignedOffsetForLine): No need to account for the child's width when calculating 25 the offset for the line. 26 1 27 2012-08-27 Jon Lee <jonlee@apple.com> 2 28 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r126859 r126911 2649 2649 r->layoutIfNeeded(); 2650 2650 2651 // Adjust the static position of a center-aligned inline positioned object with a block child now that the child's width has been computed.2652 if (!r->parent()->isRenderView() && r->parent()->isRenderBlock() && r->firstChild() && r->style()->position() == AbsolutePosition2653 && r->style()->isOriginalDisplayInlineType() && (r->style()->textAlign() == CENTER || r->style()->textAlign() == WEBKIT_CENTER)) {2654 RenderBlock* block = toRenderBlock(r->parent());2655 LayoutUnit blockHeight = block->logicalHeight();2656 block->setStaticInlinePositionForChild(r, blockHeight, block->startAlignedOffsetForLine(r, blockHeight, false));2657 }2658 2659 2651 // Lay out again if our estimate was wrong. 2660 2652 if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) { -
trunk/Source/WebCore/rendering/RenderBlock.h
r126859 r126911 201 201 } 202 202 203 LayoutUnit startAlignedOffsetForLine( RenderBox* child,LayoutUnit position, bool firstLine);203 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool firstLine); 204 204 LayoutUnit textIndentOffset() const; 205 205 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r126837 r126911 922 922 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned 923 923 // inline so that we can obtain the value later. 924 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startAlignedOffsetForLine( child,blockHeight, false));924 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startAlignedOffsetForLine(blockHeight, false)); 925 925 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHeight); 926 926 } 927 927 928 928 if (child->style()->isOriginalDisplayInlineType()) 929 block->setStaticInlinePositionForChild(child, blockHeight, block->startAlignedOffsetForLine( child,blockHeight, false));929 block->setStaticInlinePositionForChild(child, blockHeight, block->startAlignedOffsetForLine(blockHeight, false)); 930 930 else 931 931 block->setStaticInlinePositionForChild(child, blockHeight, block->startOffsetForContent(blockHeight)); … … 2890 2890 } 2891 2891 2892 LayoutUnit RenderBlock::startAlignedOffsetForLine( RenderBox* child,LayoutUnit position, bool firstLine)2892 LayoutUnit RenderBlock::startAlignedOffsetForLine(LayoutUnit position, bool firstLine) 2893 2893 { 2894 2894 ETextAlign textAlign = style()->textAlign(); … … 2898 2898 2899 2899 // updateLogicalWidthForAlignment() handles the direction of the block so no need to consider it here 2900 float logicalLeft; 2901 float availableLogicalWidth; 2902 logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); 2903 availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) - logicalLeft; 2904 float totalLogicalWidth = logicalWidthForChild(child); 2900 float totalLogicalWidth = 0; 2901 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); 2902 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) - logicalLeft; 2905 2903 updateLogicalWidthForAlignment(textAlign, 0, logicalLeft, totalLogicalWidth, availableLogicalWidth, 0); 2906 2904 2907 2905 if (!style()->isLeftToRightDirection()) 2908 return logicalWidth() - (logicalLeft + totalLogicalWidth);2906 return logicalWidth() - logicalLeft; 2909 2907 return logicalLeft; 2910 2908 }
Note: See TracChangeset
for help on using the changeset viewer.