Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2684073004: [css-flexbox] Clear override sizes when we're no longer a flex item (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/change-flexitem-into-abspos.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 scrollableArea->horizontalScrollbar()->styleChanged(); 305 scrollableArea->horizontalScrollbar()->styleChanged();
306 if (scrollableArea->verticalScrollbar() && 306 if (scrollableArea->verticalScrollbar() &&
307 scrollableArea->verticalScrollbar()->isCustomScrollbar()) 307 scrollableArea->verticalScrollbar()->isCustomScrollbar())
308 scrollableArea->verticalScrollbar()->styleChanged(); 308 scrollableArea->verticalScrollbar()->styleChanged();
309 } 309 }
310 } 310 }
311 } 311 }
312 updateShapeOutsideInfoAfterStyleChange(*style(), oldStyle); 312 updateShapeOutsideInfoAfterStyleChange(*style(), oldStyle);
313 updateGridPositionAfterStyleChange(oldStyle); 313 updateGridPositionAfterStyleChange(oldStyle);
314 314
315 // When we're no longer a flex item because we're now absolutely positioned,
316 // we need to clear the override size so we're not affected by it anymore.
317 // This technically covers too many cases (even when out-of-flow did not
318 // change) but that should be harmless.
319 if (isOutOfFlowPositioned() && parent() &&
320 parent()->styleRef().isDisplayFlexibleOrGridBox())
321 clearOverrideSize();
322
315 if (LayoutMultiColumnSpannerPlaceholder* placeholder = 323 if (LayoutMultiColumnSpannerPlaceholder* placeholder =
316 this->spannerPlaceholder()) 324 this->spannerPlaceholder())
317 placeholder->layoutObjectInFlowThreadStyleDidChange(oldStyle); 325 placeholder->layoutObjectInFlowThreadStyleDidChange(oldStyle);
318 326
319 updateBackgroundAttachmentFixedStatusAfterStyleChange(); 327 updateBackgroundAttachmentFixedStatusAfterStyleChange();
320 328
321 if (oldStyle) { 329 if (oldStyle) {
322 LayoutFlowThread* flowThread = flowThreadContainingBlock(); 330 LayoutFlowThread* flowThread = flowThreadContainingBlock();
323 if (flowThread && flowThread != this) 331 if (flowThread && flowThread != this)
324 flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle); 332 flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle);
(...skipping 5368 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 block->adjustChildDebugRect(rect); 5701 block->adjustChildDebugRect(rect);
5694 5702
5695 return rect; 5703 return rect;
5696 } 5704 }
5697 5705
5698 bool LayoutBox::shouldClipOverflow() const { 5706 bool LayoutBox::shouldClipOverflow() const {
5699 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); 5707 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip();
5700 } 5708 }
5701 5709
5702 } // namespace blink 5710 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/change-flexitem-into-abspos.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698