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

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

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Undid accidental renames 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
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. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 if (isHorizontalWritingMode() != containingBlock->isHorizontalWritingMode()) 2810 if (isHorizontalWritingMode() != containingBlock->isHorizontalWritingMode())
2811 return false; 2811 return false;
2812 2812
2813 // Anonymous blocks should not impede percentage resolution on a child. Exam ples of such 2813 // Anonymous blocks should not impede percentage resolution on a child. Exam ples of such
2814 // anonymous blocks are blocks wrapped around inlines that have block siblin gs (from the CSS 2814 // anonymous blocks are blocks wrapped around inlines that have block siblin gs (from the CSS
2815 // spec) and multicol flow threads (an implementation detail). Another imple mentation detail, 2815 // spec) and multicol flow threads (an implementation detail). Another imple mentation detail,
2816 // ruby runs, create anonymous inline-blocks, so skip those too. All other t ypes of anonymous 2816 // ruby runs, create anonymous inline-blocks, so skip those too. All other t ypes of anonymous
2817 // objects, such as table-cells, will be treated just as if they were non-an onymous. 2817 // objects, such as table-cells, will be treated just as if they were non-an onymous.
2818 if (containingBlock->isAnonymous()) { 2818 if (containingBlock->isAnonymous()) {
2819 EDisplay display = containingBlock->styleRef().display(); 2819 EDisplay display = containingBlock->styleRef().display();
2820 return display == BLOCK || display == INLINE_BLOCK; 2820 return display == EDisplay::Block || display == EDisplay::InlineBlock;
2821 } 2821 }
2822 2822
2823 // For quirks mode, we skip most auto-height containing blocks when computin g percentages. 2823 // For quirks mode, we skip most auto-height containing blocks when computin g percentages.
2824 return document().inQuirksMode() && !containingBlock->isTableCell() && !cont ainingBlock->isOutOfFlowPositioned() && !containingBlock->isLayoutGrid() && cont ainingBlock->style()->logicalHeight().isAuto(); 2824 return document().inQuirksMode() && !containingBlock->isTableCell() && !cont ainingBlock->isOutOfFlowPositioned() && !containingBlock->isLayoutGrid() && cont ainingBlock->style()->logicalHeight().isAuto();
2825 } 2825 }
2826 2826
2827 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const 2827 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const
2828 { 2828 {
2829 LayoutBlock* cb = containingBlock(); 2829 LayoutBlock* cb = containingBlock();
2830 const LayoutBox* containingBlockChild = this; 2830 const LayoutBox* containingBlockChild = this;
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
4874 LayoutRect rect = frameRect(); 4874 LayoutRect rect = frameRect();
4875 4875
4876 LayoutBlock* block = containingBlock(); 4876 LayoutBlock* block = containingBlock();
4877 if (block) 4877 if (block)
4878 block->adjustChildDebugRect(rect); 4878 block->adjustChildDebugRect(rect);
4879 4879
4880 return rect; 4880 return rect;
4881 } 4881 }
4882 4882
4883 } // namespace blink 4883 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698