Changeset 108185 in webkit
- Timestamp:
- Feb 19, 2012 7:24:50 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 43 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r108183 r108185 1 2012-02-18 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: inline-box-002.htm fails 4 https://bugs.webkit.org/show_bug.cgi?id=69210 5 6 Reviewed by David Hyatt. 7 8 * css2.1/20110323/dynamic-top-change-005-expected.html: Added. 9 * css2.1/20110323/dynamic-top-change-005.htm: Added. 10 * css2.1/20110323/dynamic-top-change-005a-expected.html: Added. 11 * css2.1/20110323/dynamic-top-change-005a.htm: Added. 12 * css2.1/20110323/dynamic-top-change-005b-expected.html: Added. 13 * css2.1/20110323/dynamic-top-change-005b.htm: Added. 14 * css2.1/20110323/inline-box-002-expected.html: Added. 15 * css2.1/20110323/inline-box-002.htm: Added. 16 * fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html: Added. 17 * fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html: Added. 18 * fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html: Added. 19 * fast/css/relative-positioned-block-nested-with-inline-parent.html: Added. 20 * fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html: Added. 21 * fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html: Added. 22 * fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html: Added. 23 * fast/css/relative-positioned-block-with-inline-ancestor.html: Added. 24 * fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html: Added. 25 * fast/css/relative-positioned-block-with-inline-parent-dynamic.html: Added. 26 * fast/css/relative-positioned-block-with-inline-parent-expected.html: Added. 27 * fast/css/relative-positioned-block-with-inline-parent-keeps-style.html: Added. 28 * fast/css/relative-positioned-block-with-inline-parent.html: Added. 29 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.png: Added. 30 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-expected.txt: Added. 31 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.png: Added. 32 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed-expected.txt: Added. 33 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.png: Added. 34 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-expected.txt: Added. 35 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.png: Added. 36 * platform/chromium-linux-x86/fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic-expected.txt: Added. 37 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png: Added. 38 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.txt: Added. 39 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.png: Added. 40 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-expected.txt: Added. 41 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.png: Added. 42 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed-expected.txt: Added. 43 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.png: Added. 44 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-ancestor-expected.txt: Added. 45 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.png: Added. 46 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-expected.txt: Added. 47 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.png: Added. 48 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed-expected.txt: Added. 49 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.png: Added. 50 * platform/chromium-linux-x86/fast/css/relative-positioned-block-with-inline-parent-keeps-style-expected.txt: Added. 51 * platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.png: 52 * platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.png: 53 * platform/chromium-linux/fast/inline/continuation-outlines-with-layers-2-expected.txt: 54 * platform/chromium-linux/fast/inline/continuation-outlines-with-layers-expected.png: 55 * platform/chromium-linux/fast/repaint/transform-absolute-in-positioned-container-expected.png: 56 * platform/chromium-win/fast/encoding/utf-16-big-endian-expected.txt: 57 * platform/chromium-win/fast/encoding/utf-16-little-endian-expected.txt: 58 * platform/chromium-win/fast/inline/continuation-outlines-with-layers-expected.txt: 59 * platform/chromium-win/fast/repaint/transform-absolute-in-positioned-container-expected.txt: 60 * platform/chromium/test_expectations.txt: Suppress existing tests until results rebaselined. 61 * platform/gtk/test_expectations.txt: ditto 62 * platform/mac/test_expectations.txt: ditto 63 * platform/qt/test_expectations.txt: ditto 64 * platform/win/Skipped: ditto 65 1 66 2012-02-18 Abhishek Arya <inferno@chromium.org> 2 67 -
trunk/LayoutTests/platform/chromium-linux/fast/inline/continuation-outlines-with-layers-2-expected.txt
r63086 r108185 9 9 RenderBlock {DIV} at (0,36) size 784x100 10 10 RenderBlock (anonymous) at (0,0) size 784x50 11 RenderBlock (anonymous) at (0,50) size 784x012 RenderBlock {DIV} at (0,0) size 784x013 11 RenderBlock (anonymous) at (0,50) size 784x50 14 12 RenderText {#text} at (0,0) size 0x0 … … 42 40 text run at (60,0) width 50: " " 43 41 text run at (110,0) width 50: " " 42 layer at (8,102) size 784x0 43 RenderBlock (anonymous) at (0,50) size 784x0 44 RenderBlock {DIV} at (0,0) size 784x0 44 45 layer at (8,102) size 60x50 45 46 RenderInline (relative positioned) {SPAN} at (0,0) size 60x50 [bgcolor=#FFFFFF] -
trunk/LayoutTests/platform/chromium-win/fast/encoding/utf-16-big-endian-expected.txt
r69281 r108185 1 layer at (0,0) size 7 85x11462 RenderView at (0,0) size 785x 6001 layer at (0,0) size 792x1146 2 RenderView at (0,0) size 785x585 3 3 layer at (0,0) size 785x1146 4 4 RenderBlock {HTML} at (0,0) size 785x1146 … … 71 71 RenderBR {BR} at (126,15) size 0x0 72 72 RenderText {#text} at (0,0) size 0x0 73 RenderBlock (anonymous) at (0,217) size 769x6274 73 RenderBlock (anonymous) at (0,279) size 769x0 75 74 RenderInline {SPAN} at (0,0) size 0x0 … … 469 468 RenderImage {IMG} at (0,21) size 20x20 470 469 RenderText {#text} at (0,0) size 0x0 471 layer at (28,210) size 520x62 470 layer at (23,225) size 769x62 471 RenderBlock (anonymous) at (0,217) size 769x62 472 layer at (43,210) size 520x62 472 473 RenderTable {TABLE} at (0,0) size 520x62 [border: (1px outset #808080)] 473 474 RenderTableSection {TBODY} at (1,1) size 518x60 -
trunk/LayoutTests/platform/chromium-win/fast/encoding/utf-16-little-endian-expected.txt
r69281 r108185 1 layer at (0,0) size 7 85x11462 RenderView at (0,0) size 785x 6001 layer at (0,0) size 792x1146 2 RenderView at (0,0) size 785x585 3 3 layer at (0,0) size 785x1146 4 4 RenderBlock {HTML} at (0,0) size 785x1146 … … 71 71 RenderBR {BR} at (126,15) size 0x0 72 72 RenderText {#text} at (0,0) size 0x0 73 RenderBlock (anonymous) at (0,217) size 769x6274 73 RenderBlock (anonymous) at (0,279) size 769x0 75 74 RenderInline {SPAN} at (0,0) size 0x0 … … 469 468 RenderImage {IMG} at (0,21) size 20x20 470 469 RenderText {#text} at (0,0) size 0x0 471 layer at (28,210) size 520x62 470 layer at (23,225) size 769x62 471 RenderBlock (anonymous) at (0,217) size 769x62 472 layer at (43,210) size 520x62 472 473 RenderTable {TABLE} at (0,0) size 520x62 [border: (1px outset #808080)] 473 474 RenderTableSection {TBODY} at (1,1) size 518x60 -
trunk/LayoutTests/platform/chromium-win/fast/inline/continuation-outlines-with-layers-expected.txt
r76837 r108185 9 9 RenderBlock {DIV} at (0,36) size 784x99 10 10 RenderBlock (anonymous) at (0,0) size 784x20 11 RenderBlock (anonymous) at (0,38) size 784x2312 RenderBlock {H3} at (0,0) size 784x2313 RenderText {#text} at (0,0) size 146x2214 text run at (0,0) width 146: "Bold with margin."15 11 RenderBlock (anonymous) at (0,79) size 784x20 16 12 RenderBlock {DIV} at (0,153) size 784x61 17 13 RenderBlock (anonymous) at (0,0) size 784x0 18 RenderBlock (anonymous) at (0,0) size 784x2319 RenderBlock {H3} at (0,0) size 784x2320 RenderText {#text} at (0,0) size 151x2221 text run at (0,0) width 151: "No content before."22 14 RenderBlock (anonymous) at (0,41) size 784x20 23 15 RenderBlock {DIV} at (0,230) size 784x61 24 16 RenderBlock (anonymous) at (0,0) size 784x20 25 RenderBlock (anonymous) at (0,38) size 784x2326 RenderBlock {H3} at (0,0) size 784x2327 RenderText {#text} at (0,0) size 175x2228 text run at (0,0) width 175: "But No Content After"29 17 RenderBlock (anonymous) at (0,79) size 784x0 30 18 RenderBlock {DIV} at (0,309) size 784x23 31 19 RenderBlock (anonymous) at (0,0) size 784x0 32 RenderBlock (anonymous) at (0,0) size 784x2333 RenderBlock {H3} at (0,0) size 784x2334 RenderText {#text} at (0,0) size 218x2235 text run at (0,0) width 218: "No content before or after."36 20 RenderBlock (anonymous) at (0,41) size 784x0 37 21 layer at (8,52) size 95x19 … … 39 23 RenderText {#text} at (0,0) size 95x19 40 24 text run at (0,0) width 95: "Content before." 25 layer at (8,90) size 784x23 26 RenderBlock (anonymous) at (0,38) size 784x23 27 RenderBlock {H3} at (0,0) size 784x23 28 RenderText {#text} at (0,0) size 146x22 29 text run at (0,0) width 146: "Bold with margin." 41 30 layer at (8,131) size 79x19 42 31 RenderInline (relative positioned) {SPAN} at (0,0) size 79x19 … … 45 34 layer at (8,169) size 0x0 46 35 RenderInline (relative positioned) {SPAN} at (0,0) size 0x0 36 layer at (8,169) size 784x23 37 RenderBlock (anonymous) at (0,0) size 784x23 38 RenderBlock {H3} at (0,0) size 784x23 39 RenderText {#text} at (0,0) size 151x22 40 text run at (0,0) width 151: "No content before." 47 41 layer at (8,210) size 83x19 48 42 RenderInline (relative positioned) {SPAN} at (0,0) size 83x19 … … 53 47 RenderText {#text} at (0,0) size 91x19 54 48 text run at (0,0) width 91: "Content before" 49 layer at (8,284) size 784x23 50 RenderBlock (anonymous) at (0,38) size 784x23 51 RenderBlock {H3} at (0,0) size 784x23 52 RenderText {#text} at (0,0) size 175x22 53 text run at (0,0) width 175: "But No Content After" 55 54 layer at (8,325) size 0x0 56 55 RenderInline (relative positioned) {SPAN} at (0,0) size 0x0 57 56 layer at (8,325) size 0x0 58 57 RenderInline (relative positioned) {SPAN} at (0,0) size 0x0 58 layer at (8,325) size 784x23 59 RenderBlock (anonymous) at (0,0) size 784x23 60 RenderBlock {H3} at (0,0) size 784x23 61 RenderText {#text} at (0,0) size 218x22 62 text run at (0,0) width 218: "No content before or after." 59 63 layer at (8,366) size 0x0 60 64 RenderInline (relative positioned) {SPAN} at (0,0) size 0x0 -
trunk/LayoutTests/platform/chromium-win/fast/repaint/transform-absolute-in-positioned-container-expected.txt
r73401 r108185 1 layer at (0,0) size 80 0x6002 RenderView at (0,0) size 800x 6001 layer at (0,0) size 802x585 2 RenderView at (0,0) size 800x585 3 3 layer at (0,0) size 800x302 4 4 RenderBlock {HTML} at (0,0) size 800x302 … … 13 13 text run at (342,0) width 282: ". The rotated box should be correctly redrawn." 14 14 RenderBlock (anonymous) at (0,36) size 784x20 15 RenderBlock (anonymous) at (0,56) size 784x20216 15 RenderBlock (anonymous) at (0,258) size 784x20 17 16 RenderText {#text} at (0,0) size 0x0 … … 20 19 RenderText {#text} at (20,0) size 59x19 21 20 text run at (20,0) width 59: "Container" 22 layer at (108,172) size 202x202 21 layer at (18,132) size 784x202 22 RenderBlock (anonymous) at (0,56) size 784x202 23 layer at (118,232) size 202x202 23 24 RenderBlock (relative positioned) {DIV} at (0,0) size 202x202 [bgcolor=#CCCCCC] [border: (1px solid #000000)] 24 25 layer at (18,334) size 20x59 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r108139 r108185 4182 4182 // Needs baselines for MAC and WIN. 4183 4183 BUGWK76465 MAC WIN : fast/css/non-empty-span.html = IMAGE+TEXT 4184 4185 // Need rebaselining. 4186 BUGWK69210 MAC : fast/encoding/utf-16-big-endian.html = IMAGE+TEXT 4187 BUGWK69210 MAC : fast/encoding/utf-16-little-endian.html = IMAGE+TEXT 4188 BUGWK69210 MAC : fast/inline/continuation-outlines-with-layers-2.html = TEXT 4189 BUGWK69210 MAC : fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT -
trunk/LayoutTests/platform/gtk/test_expectations.txt
r108073 r108185 101 101 102 102 BUGWK76639 : fast/table/multiple-captions-crash3.html = IMAGE FAIL 103 104 // Need rebaselining. 105 BUGWK69210: fast/encoding/utf-16-big-endian.html = IMAGE+TEXT 106 BUGWK69210: fast/encoding/utf-16-little-endian.html = IMAGE+TEXT 107 BUGWK69210: fast/inline/continuation-outlines-with-layers-2.html = TEXT 108 BUGWK69210: fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT 109 BUGWK69210: fast/repaint/transform-absolute-in-positioned-container.html = IMAGE+TEXT -
trunk/LayoutTests/platform/mac/test_expectations.txt
r107971 r108185 208 208 BUGWK37244: tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT 209 209 BUGWK37244: tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT 210 211 // Need rebaselining. 212 BUGWK69210: fast/encoding/utf-16-big-endian.html = IMAGE+TEXT 213 BUGWK69210: fast/encoding/utf-16-little-endian.html = IMAGE+TEXT 214 BUGWK69210: fast/inline/continuation-outlines-with-layers-2.html = TEXT 215 BUGWK69210: fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT 216 BUGWK69210: fast/repaint/transform-absolute-in-positioned-container.html = IMAGE+TEXT -
trunk/LayoutTests/platform/qt/test_expectations.txt
r108160 r108185 29 29 // Needs baseline 30 30 BUGWK76118 : fast/css/text-overflow-input.html = MISSING 31 32 // Need rebaselining. 33 BUGWK69210: fast/encoding/utf-16-big-endian.html = IMAGE+TEXT 34 BUGWK69210: fast/encoding/utf-16-little-endian.html = IMAGE+TEXT 35 BUGWK69210: fast/inline/continuation-outlines-with-layers-2.html = TEXT 36 BUGWK69210: fast/inline/continuation-outlines-with-layers.html = IMAGE+TEXT 37 BUGWK69210: fast/repaint/transform-absolute-in-positioned-container.html = IMAGE+TEXT -
trunk/LayoutTests/platform/win/Skipped
r108084 r108185 1646 1646 tables/mozilla/bugs/bug27038-1.html 1647 1647 tables/mozilla/bugs/bug27038-2.html 1648 1649 // Need rebaselining after bug 69210. 1650 fast/encoding/utf-16-big-endian.html 1651 fast/encoding/utf-16-little-endian.html 1652 fast/inline/continuation-outlines-with-layers-2.html 1653 fast/inline/continuation-outlines-with-layers.html 1654 fast/repaint/transform-absolute-in-positioned-container.html -
trunk/Source/WebCore/ChangeLog
r108184 r108185 1 2012-02-18 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: inline-box-002.htm fails 4 https://bugs.webkit.org/show_bug.cgi?id=69210 5 6 Reviewed by David Hyatt. 7 8 Tests: css2.1/20110323/dynamic-top-change-005.htm 9 css2.1/20110323/dynamic-top-change-005a.htm 10 css2.1/20110323/dynamic-top-change-005b.htm 11 css2.1/20110323/inline-box-002.htm 12 fast/css/relative-positioned-block-nested-with-inline-parent-dynamic-removed.html 13 fast/css/relative-positioned-block-nested-with-inline-parent-dynamic.html 14 fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html 15 fast/css/relative-positioned-block-nested-with-inline-parent.html 16 fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic.html 17 fast/css/relative-positioned-block-with-inline-ancestor-dynamic-removed.html 18 fast/css/relative-positioned-block-with-inline-ancestor-dynamic.html 19 fast/css/relative-positioned-block-with-inline-ancestor.html 20 fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html 21 fast/css/relative-positioned-block-with-inline-parent-dynamic.html 22 fast/css/relative-positioned-block-with-inline-parent-keeps-style.html 23 fast/css/relative-positioned-block-with-inline-parent.html 24 25 A block within an inline is affected by relative positioning on the inline box. Give 26 the anonymous block containing the block a layer and make it relative positioned. Then 27 calculate the offset of the anonymous block's layer by accumulating the offsets from its 28 inline continuation and the inline continuation's inline parents. 29 If the position of an inline changes from or to relative positioned then ensure that any 30 descendant blocks update their position and layer accordingly. 31 32 * rendering/RenderBoxModelObject.cpp: 33 (): add an enum RelPosAxis 34 (WebCore::accumulateRelativePositionOffsets): 35 Total up the offsets of all relatively positioned inlines that are de-facto parents of the relatively 36 positioned anonymous block's child block. 37 38 (WebCore): 39 (WebCore::RenderBoxModelObject::relativePositionOffsetX): 40 Use accumulateRelativePositionOffsets when calculating the relative position offset of a relatively positioned anonymous block. 41 42 (WebCore::RenderBoxModelObject::relativePositionOffsetY): ditto 43 44 * rendering/RenderInline.cpp: 45 (WebCore::hasRelPositionedInlineAncestor): 46 Detects if the anonymous block contains a block that is the de-facto descendant of a relatively positioned inline. 47 48 (WebCore::updateStyleOfAnonymousBlockContinuations): 49 Update the style's positioning for each anonymous block containing a block that is descendant from the inline whose style has changed. 50 51 (WebCore::RenderInline::styleDidChange): 52 If an inline changes to or from relative positioning ensure that any descendant blocks change to or from relative positioning 53 as well, unless they still have a relatively positioned ancestor after the current ancestor loses its relative positioning. 54 55 (WebCore::RenderInline::addChildIgnoringContinuation): 56 If the anonymous block contains a block that is effectively descended from a relatively positioned inline, make it relatively 57 positioned so the block will respect its inline ancestor's relative positioning. 58 59 * rendering/RenderObject.cpp: 60 (WebCore::RenderObject::propagateStyleToAnonymousChildren): 61 Preserve style position in anonymous block continuations when the parent block propagates a style change. 62 1 63 2012-02-18 raman Tenneti <rtenneti@chromium.org> 2 64 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r108079 r108185 402 402 } 403 403 404 enum RelPosAxis { RelPosX, RelPosY }; 405 406 static LayoutUnit accumulateRelativePositionOffsets(const RenderObject* child, RelPosAxis axis) 407 { 408 if (!child->isAnonymousBlock() || !child->isRelPositioned()) 409 return 0; 410 LayoutUnit offset = 0; 411 RenderObject* p = toRenderBlock(child)->inlineElementContinuation(); 412 while (p && p->isRenderInline()) { 413 if (p->isRelPositioned()) 414 offset += (axis == RelPosX) ? toRenderInline(p)->relativePositionOffsetX() : toRenderInline(p)->relativePositionOffsetY(); 415 p = p->parent(); 416 } 417 return offset; 418 } 419 404 420 LayoutUnit RenderBoxModelObject::relativePositionOffsetX() const 405 421 { 422 LayoutUnit offset = accumulateRelativePositionOffsets(this, RelPosX); 423 406 424 // Objects that shrink to avoid floats normally use available line width when computing containing block width. However 407 425 // in the case of relative positioning using percentages, we can't do this. The offset should always be resolved using the … … 412 430 if (!style()->right().isAuto() && !cb->style()->isLeftToRightDirection()) 413 431 return -style()->right().calcValue(cb->availableWidth()); 414 return style()->left().calcValue(cb->availableWidth());432 return offset + style()->left().calcValue(cb->availableWidth()); 415 433 } 416 434 if (!style()->right().isAuto()) { 417 435 RenderBlock* cb = containingBlock(); 418 return -style()->right().calcValue(cb->availableWidth());419 } 420 return 0;436 return offset + -style()->right().calcValue(cb->availableWidth()); 437 } 438 return offset; 421 439 } 422 440 423 441 LayoutUnit RenderBoxModelObject::relativePositionOffsetY() const 424 442 { 443 LayoutUnit offset = accumulateRelativePositionOffsets(this, RelPosY); 444 425 445 RenderBlock* containingBlock = this->containingBlock(); 426 427 446 // If the containing block of a relatively positioned element does not 428 447 // specify a height, a percentage top or bottom offset should be resolved as … … 435 454 || !style()->top().isPercent() 436 455 || containingBlock->stretchesToViewport())) 437 return style()->top().calcValue(containingBlock->availableHeight());456 return offset + style()->top().calcValue(containingBlock->availableHeight()); 438 457 439 458 if (!style()->bottom().isAuto() … … 441 460 || !style()->bottom().isPercent() 442 461 || containingBlock->stretchesToViewport())) 443 return -style()->bottom().calcValue(containingBlock->availableHeight());444 445 return 0;462 return offset + -style()->bottom().calcValue(containingBlock->availableHeight()); 463 464 return offset; 446 465 } 447 466 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r107880 r108185 127 127 } 128 128 129 static bool hasRelPositionedInlineAncestor(RenderObject* p) 130 { 131 while (p && p->isRenderInline()) { 132 if (p->isRelPositioned()) 133 return true; 134 p = p->parent(); 135 } 136 return false; 137 } 138 139 static void updateStyleOfAnonymousBlockContinuations(RenderObject* block, const RenderStyle* newStyle, const RenderStyle* oldStyle) 140 { 141 for (;block && block->isAnonymousBlock(); block = block->nextSibling()) { 142 if (!toRenderBlock(block)->isAnonymousBlockContinuation() || block->style()->position() == newStyle->position()) 143 continue; 144 // If we are no longer relatively positioned but our descendant block(s) still have a relatively positioned ancestor then 145 // their containing anonymous block should keep its relative positioning. 146 RenderInline* cont = toRenderBlock(block)->inlineElementContinuation(); 147 if (oldStyle->position() == RelativePosition && hasRelPositionedInlineAncestor(cont)) 148 continue; 149 RefPtr<RenderStyle> blockStyle = RenderStyle::createAnonymousStyle(block->style()); 150 blockStyle->setPosition(newStyle->position()); 151 blockStyle->setDisplay(BLOCK); 152 block->setStyle(blockStyle); 153 } 154 } 155 129 156 void RenderInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 130 157 { … … 138 165 // need to pass its style on to anyone else. 139 166 RenderStyle* newStyle = style(); 140 for (RenderInline* currCont = inlineElementContinuation(); currCont; currCont = currCont->inlineElementContinuation()) { 167 RenderInline* continuation = inlineElementContinuation(); 168 for (RenderInline* currCont = continuation; currCont; currCont = currCont->inlineElementContinuation()) { 141 169 RenderBoxModelObject* nextCont = currCont->continuation(); 142 170 currCont->setContinuation(0); 143 171 currCont->setStyle(newStyle); 144 172 currCont->setContinuation(nextCont); 173 } 174 175 // If an inline's relative positioning has changed then any descendant blocks will need to change their relative positioning accordingly. 176 // Do this by updating the position of the descendant blocks' containing anonymous blocks - there may be more than one. 177 if (continuation && oldStyle && newStyle->position() != oldStyle->position() 178 && (newStyle->position() == RelativePosition || (oldStyle->position() == RelativePosition))) { 179 // If any descendant blocks exist then they will be in the next anonymous block and its siblings. 180 RenderObject* block = containingBlock()->nextSibling(); 181 ASSERT(block && block->isAnonymousBlock()); 182 updateStyleOfAnonymousBlockContinuations(block, newStyle, oldStyle); 145 183 } 146 184 … … 246 284 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style()); 247 285 newStyle->setDisplay(BLOCK); 286 287 // If inside an inline affected by relative positioning the block needs to be affected by it too. 288 // Giving the block a layer like this allows it to collect the x/y offsets from inline parents later. 289 if (hasRelPositionedInlineAncestor(this)) 290 newStyle->setPosition(RelativePosition); 248 291 249 292 RenderBlock* newBox = new (renderArena()) RenderBlock(document() /* anonymous box */); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r108127 r108185 1938 1938 newStyle->setColumnSpan(ColumnSpanAll); 1939 1939 } 1940 1941 // Preserve the position style of anonymous block continuations as they can have relative position when 1942 // they contain block descendants of relative positioned inlines. 1943 if (child->isRelPositioned() && toRenderBlock(child)->isAnonymousBlockContinuation()) 1944 newStyle->setPosition(child->style()->position()); 1945 1940 1946 newStyle->setDisplay(child->style()->display()); 1941 1947 child->setStyle(newStyle.release());
Note: See TracChangeset
for help on using the changeset viewer.