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

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

Issue 2670643004: Rename EDisplay values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 9 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) 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 3194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3205 3205
3206 // Anonymous blocks should not impede percentage resolution on a child. 3206 // Anonymous blocks should not impede percentage resolution on a child.
3207 // Examples of such anonymous blocks are blocks wrapped around inlines that 3207 // Examples of such anonymous blocks are blocks wrapped around inlines that
3208 // have block siblings (from the CSS spec) and multicol flow threads (an 3208 // have block siblings (from the CSS spec) and multicol flow threads (an
3209 // implementation detail). Another implementation detail, ruby runs, create 3209 // implementation detail). Another implementation detail, ruby runs, create
3210 // anonymous inline-blocks, so skip those too. All other types of anonymous 3210 // anonymous inline-blocks, so skip those too. All other types of anonymous
3211 // objects, such as table-cells, will be treated just as if they were 3211 // objects, such as table-cells, will be treated just as if they were
3212 // non-anonymous. 3212 // non-anonymous.
3213 if (containingBlock->isAnonymous()) { 3213 if (containingBlock->isAnonymous()) {
3214 EDisplay display = containingBlock->styleRef().display(); 3214 EDisplay display = containingBlock->styleRef().display();
3215 return display == EDisplay::Block || display == EDisplay::InlineBlock; 3215 return display == EDisplay::kBlock || display == EDisplay::kInlineBlock;
3216 } 3216 }
3217 3217
3218 // For quirks mode, we skip most auto-height containing blocks when computing 3218 // For quirks mode, we skip most auto-height containing blocks when computing
3219 // percentages. 3219 // percentages.
3220 return document().inQuirksMode() && !containingBlock->isTableCell() && 3220 return document().inQuirksMode() && !containingBlock->isTableCell() &&
3221 !containingBlock->isOutOfFlowPositioned() && 3221 !containingBlock->isOutOfFlowPositioned() &&
3222 !containingBlock->isLayoutGrid() && 3222 !containingBlock->isLayoutGrid() &&
3223 containingBlock->style()->logicalHeight().isAuto(); 3223 containingBlock->style()->logicalHeight().isAuto();
3224 } 3224 }
3225 3225
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
4750 (toElement(node)->isFormControlElement() || 4750 (toElement(node)->isFormControlElement() ||
4751 isHTMLImageElement(toElement(node))); 4751 isHTMLImageElement(toElement(node)));
4752 } 4752 }
4753 4753
4754 DISABLE_CFI_PERF 4754 DISABLE_CFI_PERF
4755 bool LayoutBox::avoidsFloats() const { 4755 bool LayoutBox::avoidsFloats() const {
4756 // crbug.com/460704: This should be merged with createsNewFormattingContext(). 4756 // crbug.com/460704: This should be merged with createsNewFormattingContext().
4757 return shouldBeConsideredAsReplaced() || hasOverflowClip() || isHR() || 4757 return shouldBeConsideredAsReplaced() || hasOverflowClip() || isHR() ||
4758 isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated() || 4758 isLegend() || isWritingModeRoot() || isFlexItemIncludingDeprecated() ||
4759 style()->containsPaint() || style()->containsLayout() || 4759 style()->containsPaint() || style()->containsLayout() ||
4760 style()->display() == EDisplay::FlowRoot; 4760 style()->display() == EDisplay::kFlowRoot;
4761 } 4761 }
4762 4762
4763 bool LayoutBox::hasNonCompositedScrollbars() const { 4763 bool LayoutBox::hasNonCompositedScrollbars() const {
4764 if (PaintLayerScrollableArea* scrollableArea = this->getScrollableArea()) { 4764 if (PaintLayerScrollableArea* scrollableArea = this->getScrollableArea()) {
4765 if (scrollableArea->hasHorizontalScrollbar() && 4765 if (scrollableArea->hasHorizontalScrollbar() &&
4766 !scrollableArea->layerForHorizontalScrollbar()) 4766 !scrollableArea->layerForHorizontalScrollbar())
4767 return true; 4767 return true;
4768 if (scrollableArea->hasVerticalScrollbar() && 4768 if (scrollableArea->hasVerticalScrollbar() &&
4769 !scrollableArea->layerForVerticalScrollbar()) 4769 !scrollableArea->layerForVerticalScrollbar())
4770 return true; 4770 return true;
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
5750 5750
5751 void LayoutBox::MutableForPainting:: 5751 void LayoutBox::MutableForPainting::
5752 savePreviousContentBoxSizeAndLayoutOverflowRect() { 5752 savePreviousContentBoxSizeAndLayoutOverflowRect() {
5753 auto& rareData = layoutBox().ensureRareData(); 5753 auto& rareData = layoutBox().ensureRareData();
5754 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; 5754 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true;
5755 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); 5755 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size();
5756 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); 5756 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect();
5757 } 5757 }
5758 5758
5759 } // namespace blink 5759 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698