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

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

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Comment 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 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // then an incremental layout on the element's containing block lays out the element through 259 // then an incremental layout on the element's containing block lays out the element through
260 // LayoutPositionedObjects, which skips laying out the element's parent. 260 // LayoutPositionedObjects, which skips laying out the element's parent.
261 // The element's parent needs to relayout so that it calls 261 // The element's parent needs to relayout so that it calls
262 // LayoutBlockFlow::setStaticInlinePositionForChild with the out-of-flow-pos itioned child, so 262 // LayoutBlockFlow::setStaticInlinePositionForChild with the out-of-flow-pos itioned child, so
263 // that when it's laid out, its LayoutBox::computePositionedLogicalWidth/Hei ght takes into 263 // that when it's laid out, its LayoutBox::computePositionedLogicalWidth/Hei ght takes into
264 // account its new inline/block position rather than its old block/inline po sition. 264 // account its new inline/block position rather than its old block/inline po sition.
265 // Position changes and other types of display changes are handled elsewhere . 265 // Position changes and other types of display changes are handled elsewhere .
266 if (oldStyle && isOutOfFlowPositioned() && parent() && (parent() != containi ngBlock()) 266 if (oldStyle && isOutOfFlowPositioned() && parent() && (parent() != containi ngBlock())
267 && (styleRef().position() == oldStyle->position()) 267 && (styleRef().position() == oldStyle->position())
268 && (styleRef().originalDisplay() != oldStyle->originalDisplay()) 268 && (styleRef().originalDisplay() != oldStyle->originalDisplay())
269 && ((styleRef().originalDisplay() == BLOCK) || (styleRef().originalDispl ay() == INLINE_BLOCK)) 269 && ((styleRef().originalDisplay() == EDisplay::Block) || (styleRef().ori ginalDisplay() == EDisplay::InlineBlock))
270 && ((oldStyle->originalDisplay() == BLOCK) || (oldStyle->originalDisplay () == INLINE_BLOCK))) 270 && ((oldStyle->originalDisplay() == EDisplay::Block) || (oldStyle->origi nalDisplay() == EDisplay::InlineBlock)))
271 parent()->setNeedsLayout(LayoutInvalidationReason::ChildChanged, MarkCon tainerChain); 271 parent()->setNeedsLayout(LayoutInvalidationReason::ChildChanged, MarkCon tainerChain);
272 272
273 PaintLayerType type = layerTypeRequired(); 273 PaintLayerType type = layerTypeRequired();
274 if (type != NoPaintLayer) { 274 if (type != NoPaintLayer) {
275 if (!layer() && layerCreationAllowedForSubtree()) { 275 if (!layer() && layerCreationAllowedForSubtree()) {
276 if (wasFloatingBeforeStyleChanged && isFloating()) 276 if (wasFloatingBeforeStyleChanged && isFloating())
277 setChildNeedsLayout(); 277 setChildNeedsLayout();
278 createLayer(); 278 createLayer();
279 if (parent() && !needsLayout()) { 279 if (parent() && !needsLayout()) {
280 // FIXME: We should call a specialized version of this function. 280 // FIXME: We should call a specialized version of this function.
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 if (rootElementStyle->hasBackground()) 1194 if (rootElementStyle->hasBackground())
1195 return false; 1195 return false;
1196 1196
1197 if (node() != document().firstBodyElement()) 1197 if (node() != document().firstBodyElement())
1198 return false; 1198 return false;
1199 1199
1200 return true; 1200 return true;
1201 } 1201 }
1202 1202
1203 } // namespace blink 1203 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698