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

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

Issue 1980103002: Include auto vertical scrollbar in intrinsicScrollbarLogicalWidth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Restore list box height calculation, fix scrollbar width factor Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 LayoutUnit previousHeight = logicalHeight(); 464 LayoutUnit previousHeight = logicalHeight();
465 setLogicalHeight(beforeEdge); 465 setLogicalHeight(beforeEdge);
466 466
467 m_paintInvalidationLogicalTop = LayoutUnit(); 467 m_paintInvalidationLogicalTop = LayoutUnit();
468 m_paintInvalidationLogicalBottom = LayoutUnit(); 468 m_paintInvalidationLogicalBottom = LayoutUnit();
469 if (!firstChild() && !isAnonymousBlock()) 469 if (!firstChild() && !isAnonymousBlock())
470 setChildrenInline(true); 470 setChildrenInline(true);
471 471
472 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); 472 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope);
473 473
474 bool preferredLogicalWidthsWereDirty = preferredLogicalWidthsDirty();
475
474 // Reset the flag here instead of in layoutInlineChildren() in case that 476 // Reset the flag here instead of in layoutInlineChildren() in case that
475 // all inline children are removed from this block. 477 // all inline children are removed from this block.
476 setContainsInlineWithOutlineAndContinuation(false); 478 setContainsInlineWithOutlineAndContinuation(false);
477 if (childrenInline()) 479 if (childrenInline())
478 layoutInlineChildren(relayoutChildren, m_paintInvalidationLogicalTop, m_ paintInvalidationLogicalBottom, afterEdge); 480 layoutInlineChildren(relayoutChildren, m_paintInvalidationLogicalTop, m_ paintInvalidationLogicalBottom, afterEdge);
479 else 481 else
480 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge ); 482 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge );
481 483
484 bool preferredLogicalWidthsBecameDirty = !preferredLogicalWidthsWereDirty && preferredLogicalWidthsDirty();
485 if (preferredLogicalWidthsBecameDirty)
486 return false;
487
482 // Expand our intrinsic height to encompass floats. 488 // Expand our intrinsic height to encompass floats.
483 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew FormattingContext()) 489 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew FormattingContext())
484 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); 490 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge);
485 491
486 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { 492 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) {
487 if (flowThread->columnHeightsChanged()) { 493 if (flowThread->columnHeightsChanged()) {
488 setChildNeedsLayout(MarkOnlyThis); 494 setChildNeedsLayout(MarkOnlyThis);
489 return false; 495 return false;
490 } 496 }
491 } 497 }
(...skipping 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after
3841 if (!rect.isEmpty()) 3847 if (!rect.isEmpty())
3842 rects.append(rect); 3848 rects.append(rect);
3843 } 3849 }
3844 } 3850 }
3845 3851
3846 if (inlineElementContinuation) 3852 if (inlineElementContinuation)
3847 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in lineElementContinuation->containingBlock()->location() - location()), includeBlo ckOverflows); 3853 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in lineElementContinuation->containingBlock()->location() - location()), includeBlo ckOverflows);
3848 } 3854 }
3849 3855
3850 } // namespace blink 3856 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698