Changeset 41876 in webkit
- Timestamp:
- Mar 20, 2009, 4:41:54 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r41875 r41876 1 2009-03-20 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 - test, updated test and results for https://bugs.webkit.org/show_bug.cgi?id=23739 6 <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load 7 8 * fast/replaced/percent-height-in-anonymous-block-in-table.html: Added. 9 * fast/replaced/table-percent-height-expected.txt: 10 * fast/replaced/table-percent-height.html: 11 * platform/mac/fast/replaced/percent-height-in-anonymous-block-in-table-expected.checksum: Added. 12 * platform/mac/fast/replaced/percent-height-in-anonymous-block-in-table-expected.png: Added. 13 * platform/mac/fast/replaced/percent-height-in-anonymous-block-in-table-expected.txt: Added. 14 1 15 2009-03-20 Dmitry Titov <dimich@chromium.org> 2 16 -
trunk/LayoutTests/fast/replaced/table-percent-height-expected.txt
r29039 r41876 93 93 PASS getComputedStyleForElement(document.getElementById('input-text-100'), 'height') is '13px' 94 94 PASS getComputedStyleForElement(document.getElementById('isindex-75'), 'width') is '142px' 95 PASS getComputedStyleForElement(document.getElementById('isindex-75'), 'height') is ' 13px'95 PASS getComputedStyleForElement(document.getElementById('isindex-75'), 'height') is '35px' 96 96 PASS getComputedStyleForElement(document.getElementById('isindex-100'), 'width') is '142px' 97 PASS getComputedStyleForElement(document.getElementById('isindex-100'), 'height') is ' 13px'97 PASS getComputedStyleForElement(document.getElementById('isindex-100'), 'height') is '49px' 98 98 PASS getComputedStyleForElement(document.getElementById('select-75'), 'width') is '68px' 99 99 PASS getComputedStyleForElement(document.getElementById('select-75'), 'height') is '18px' -
trunk/LayoutTests/fast/replaced/table-percent-height.html
r29039 r41876 100 100 101 101 shouldBe("getComputedStyleForElement(document.getElementById('isindex-75'), 'width')", "'142px'"); 102 shouldBe("getComputedStyleForElement(document.getElementById('isindex-75'), 'height')", "' 13px'");102 shouldBe("getComputedStyleForElement(document.getElementById('isindex-75'), 'height')", "'35px'"); 103 103 shouldBe("getComputedStyleForElement(document.getElementById('isindex-100'), 'width')", "'142px'"); 104 shouldBe("getComputedStyleForElement(document.getElementById('isindex-100'), 'height')", "' 13px'");104 shouldBe("getComputedStyleForElement(document.getElementById('isindex-100'), 'height')", "'49px'"); 105 105 106 106 shouldBe("getComputedStyleForElement(document.getElementById('select-75'), 'width')", "'68px'"); -
trunk/WebCore/ChangeLog
r41871 r41876 1 2009-03-20 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 - fix https://bugs.webkit.org/show_bug.cgi?id=23739 6 <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load 7 8 * rendering/RenderBlock.cpp: 9 (WebCore::RenderBlock::percentHeightDescendants): Added this accessor. 10 * rendering/RenderBlock.h: 11 * rendering/RenderTableSection.cpp: 12 (WebCore::RenderTableSection::layoutRows): Extended the check for 13 children that flex to include other descendants with percent height 14 which is relative to the cell. 15 1 16 2009-03-20 Dmitry Titov <dimich@chromium.org> 2 17 -
trunk/WebCore/rendering/RenderBlock.cpp
r41769 r41876 2529 2529 2530 2530 delete containerSet; 2531 } 2532 2533 HashSet<RenderBox*>* RenderBlock::percentHeightDescendants() const 2534 { 2535 return gPercentHeightDescendantsMap ? gPercentHeightDescendantsMap->get(this) : 0; 2531 2536 } 2532 2537 -
trunk/WebCore/rendering/RenderBlock.h
r41422 r41876 132 132 void addPercentHeightDescendant(RenderBox*); 133 133 static void removePercentHeightDescendant(RenderBox*); 134 HashSet<RenderBox*>* percentHeightDescendants() const; 134 135 135 136 virtual void positionListMarker() { } -
trunk/WebCore/rendering/RenderTableSection.cpp
r41203 r41876 538 538 539 539 for (RenderObject* o = cell->firstChild(); o; o = o->nextSibling()) { 540 if (!o->isText() && o->style()->height().isPercent() && ( o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow()) || flexAllChildren)) {540 if (!o->isText() && o->style()->height().isPercent() && (flexAllChildren || o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow()))) { 541 541 // Tables with no sections do not flex. 542 542 if (!o->isTable() || static_cast<RenderTable*>(o)->hasSections()) { 543 543 o->setNeedsLayout(true, false); 544 cell->setChildNeedsLayout(true, false);545 544 cellChildrenFlex = true; 546 545 } 547 546 } 548 547 } 549 548 549 if (HashSet<RenderBox*>* percentHeightDescendants = cell->percentHeightDescendants()) { 550 HashSet<RenderBox*>::iterator end = percentHeightDescendants->end(); 551 for (HashSet<RenderBox*>::iterator it = percentHeightDescendants->begin(); it != end; ++it) { 552 RenderBox* box = *it; 553 if (!box->isReplaced() && !box->scrollsOverflow() && !flexAllChildren) 554 continue; 555 556 while (box != cell) { 557 if (box->normalChildNeedsLayout()) 558 break; 559 box->setChildNeedsLayout(true, false); 560 box = box->containingBlock(); 561 ASSERT(box); 562 if (!box) 563 break; 564 } 565 cellChildrenFlex = true; 566 } 567 } 568 550 569 if (cellChildrenFlex) { 570 cell->setChildNeedsLayout(true, false); 551 571 // Alignment within a cell is based off the calculated 552 572 // height, which becomes irrelevant once the cell has
Note:
See TracChangeset
for help on using the changeset viewer.