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

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

Issue 2002153007: Refactor to simplify how layerType is stored on PaintLayers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 setChildNeedsLayout(); 221 setChildNeedsLayout();
222 if (hadTransform) 222 if (hadTransform)
223 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva lidationReason::StyleChange); 223 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva lidationReason::StyleChange);
224 if (!needsLayout()) { 224 if (!needsLayout()) {
225 // FIXME: We should call a specialized version of this function. 225 // FIXME: We should call a specialized version of this function.
226 parentLayer->updateLayerPositionsAfterLayout(); 226 parentLayer->updateLayerPositionsAfterLayout();
227 } 227 }
228 } 228 }
229 229
230 if (layer()) { 230 if (layer()) {
231 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
232 // from the style.
233 layer()->setLayerType(type);
234
235 layer()->styleDidChange(diff, oldStyle); 231 layer()->styleDidChange(diff, oldStyle);
236 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) 232 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)
237 setChildNeedsLayout(); 233 setChildNeedsLayout();
238 } 234 }
239 235
240 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) { 236 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) {
241 // Changing the getWritingMode() may change isOrthogonalWritingModeRoot( ) 237 // Changing the getWritingMode() may change isOrthogonalWritingModeRoot( )
242 // of children. Make sure all children are marked/unmarked as orthogonal 238 // of children. Make sure all children are marked/unmarked as orthogonal
243 // writing-mode roots. 239 // writing-mode roots.
244 bool newHorizontalWritingMode = isHorizontalWritingMode(); 240 bool newHorizontalWritingMode = isHorizontalWritingMode();
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 if (rootElementStyle->hasBackground()) 1114 if (rootElementStyle->hasBackground())
1119 return false; 1115 return false;
1120 1116
1121 if (node() != document().firstBodyElement()) 1117 if (node() != document().firstBodyElement())
1122 return false; 1118 return false;
1123 1119
1124 return true; 1120 return true;
1125 } 1121 }
1126 1122
1127 } // namespace blink 1123 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698