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

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

Issue 2429113002: Don't update height in LayoutBlock::markFixedPositionObjectForLayoutIfNeeded. (Closed)
Patch Set: address review comments Created 4 years, 2 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/Source/core/layout/LayoutBox.h ('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 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 // auto margins will just turn into 0. 2879 // auto margins will just turn into 0.
2880 marginStart = marginStartWidth; 2880 marginStart = marginStartWidth;
2881 marginEnd = marginEndWidth; 2881 marginEnd = marginEndWidth;
2882 } 2882 }
2883 2883
2884 DISABLE_CFI_PERF 2884 DISABLE_CFI_PERF
2885 void LayoutBox::updateLogicalHeight() { 2885 void LayoutBox::updateLogicalHeight() {
2886 m_intrinsicContentLogicalHeight = contentLogicalHeight(); 2886 m_intrinsicContentLogicalHeight = contentLogicalHeight();
2887 2887
2888 LogicalExtentComputedValues computedValues; 2888 LogicalExtentComputedValues computedValues;
2889 LayoutUnit height = style()->containsSize() ? borderAndPaddingLogicalHeight() 2889 computeLogicalHeight(computedValues);
2890 : logicalHeight();
2891 computeLogicalHeight(height, logicalTop(), computedValues);
2892 2890
2893 setLogicalHeight(computedValues.m_extent); 2891 setLogicalHeight(computedValues.m_extent);
2894 setLogicalTop(computedValues.m_position); 2892 setLogicalTop(computedValues.m_position);
2895 setMarginBefore(computedValues.m_margins.m_before); 2893 setMarginBefore(computedValues.m_margins.m_before);
2896 setMarginAfter(computedValues.m_margins.m_after); 2894 setMarginAfter(computedValues.m_margins.m_after);
2897 } 2895 }
2898 2896
2899 static inline Length heightForDocumentElement(const Document& document) { 2897 static inline Length heightForDocumentElement(const Document& document) {
2900 return document.documentElement()->layoutObject()->style()->logicalHeight(); 2898 return document.documentElement()->layoutObject()->style()->logicalHeight();
2901 } 2899 }
2902 2900
2903 void LayoutBox::computeLogicalHeight( 2901 void LayoutBox::computeLogicalHeight(
2902 LogicalExtentComputedValues& computedValues) const {
2903 LayoutUnit height = style()->containsSize() ? borderAndPaddingLogicalHeight()
2904 : logicalHeight();
2905 computeLogicalHeight(height, logicalTop(), computedValues);
2906 }
2907
2908 void LayoutBox::computeLogicalHeight(
2904 LayoutUnit logicalHeight, 2909 LayoutUnit logicalHeight,
2905 LayoutUnit logicalTop, 2910 LayoutUnit logicalTop,
2906 LogicalExtentComputedValues& computedValues) const { 2911 LogicalExtentComputedValues& computedValues) const {
2907 computedValues.m_extent = logicalHeight; 2912 computedValues.m_extent = logicalHeight;
2908 computedValues.m_position = logicalTop; 2913 computedValues.m_position = logicalTop;
2909 2914
2910 // Cell height is managed by the table. 2915 // Cell height is managed by the table.
2911 if (isTableCell()) 2916 if (isTableCell())
2912 return; 2917 return;
2913 2918
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
5587 LayoutRect rect = frameRect(); 5592 LayoutRect rect = frameRect();
5588 5593
5589 LayoutBlock* block = containingBlock(); 5594 LayoutBlock* block = containingBlock();
5590 if (block) 5595 if (block)
5591 block->adjustChildDebugRect(rect); 5596 block->adjustChildDebugRect(rect);
5592 5597
5593 return rect; 5598 return rect;
5594 } 5599 }
5595 5600
5596 } // namespace blink 5601 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698