Changeset 141492 in webkit
- Timestamp:
- Jan 31, 2013 3:12:05 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141487 r141492 1 2013-01-31 Uday Kiran <udaykiran@motorola.com> 2 3 CSS3's vh attribute is not adjusting while browser resizes 4 https://bugs.webkit.org/show_bug.cgi?id=86418 5 6 Reviewed by Antti Koivisto. 7 8 Added test to check element with vh units gets resized when 9 viewport height is increased or decreased. 10 11 * css3/viewport-percentage-lengths/vh-resize-expected.html: Added. 12 * css3/viewport-percentage-lengths/vh-resize.html: Added. 13 1 14 2013-01-31 Jessie Berlin <jberlin@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r141489 r141492 1 2013-01-31 Uday Kiran <udaykiran@motorola.com> 2 3 CSS3's vh attribute is not adjusting while browser resizes 4 https://bugs.webkit.org/show_bug.cgi?id=86418 5 6 Reviewed by Antti Koivisto. 7 8 Elements with viewport percentage units needs layout whenever 9 viewport size changes. Check for viewport percentage unit 10 was missing for height. 11 12 Test: css3/viewport-percentage-lengths/vh-resize.html 13 14 * rendering/RenderBlock.cpp: 15 (WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): 16 * rendering/RenderBox.cpp: 17 (WebCore::RenderBox::hasViewportPercentageLogicalHeight): Check if style 18 is specified in viewport percentage units. 19 (WebCore): 20 * rendering/RenderBox.h: 21 (RenderBox): 22 * rendering/RenderView.cpp: 23 (WebCore::RenderView::layout): Elements with viewport percentage units 24 needs relayout when viewport size changes. 25 1 26 2013-01-31 Anton Vayvod <avayvod@chromium.org> 2 27 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r140978 r141492 2335 2335 // FIXME: Technically percentage height objects only need a relayout if their percentage isn't going to be turned into 2336 2336 // an auto value. Add a method to determine this, so that we can avoid the relayout. 2337 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView()) )2337 if (relayoutChildren || (child->hasRelativeLogicalHeight() && !isRenderView()) || child->hasViewportPercentageLogicalHeight()) 2338 2338 child->setChildNeedsLayout(true, MarkOnlyThis); 2339 2339 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r141459 r141492 4403 4403 } 4404 4404 4405 bool RenderBox::hasViewportPercentageLogicalHeight() const 4406 { 4407 return style()->logicalHeight().isViewportPercentage() 4408 || style()->logicalMinHeight().isViewportPercentage() 4409 || style()->logicalMaxHeight().isViewportPercentage(); 4410 } 4411 4405 4412 static void markBoxForRelayoutAfterSplit(RenderBox* box) 4406 4413 { -
trunk/Source/WebCore/rendering/RenderBox.h
r141459 r141492 548 548 virtual bool hasRelativeDimensions() const; 549 549 virtual bool hasRelativeLogicalHeight() const; 550 virtual bool hasViewportPercentageLogicalHeight() const; 550 551 551 552 bool hasHorizontalLayoutOverflow() const -
trunk/Source/WebCore/rendering/RenderView.cpp
r140948 r141492 188 188 setChildNeedsLayout(true, MarkOnlyThis); 189 189 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 190 if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight())190 if ((child->isBox() && (toRenderBox(child)->hasRelativeLogicalHeight() || toRenderBox(child)->hasViewportPercentageLogicalHeight())) 191 191 || child->style()->logicalHeight().isPercent() 192 192 || child->style()->logicalMinHeight().isPercent() 193 || child->style()->logicalMaxHeight().isPercent()) 193 || child->style()->logicalMaxHeight().isPercent() 194 || child->style()->logicalHeight().isViewportPercentage() 195 || child->style()->logicalMinHeight().isViewportPercentage() 196 || child->style()->logicalMaxHeight().isViewportPercentage()) 194 197 child->setChildNeedsLayout(true, MarkOnlyThis); 195 198 }
Note: See TracChangeset
for help on using the changeset viewer.