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

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

Issue 2574293003: [SPInvalidation] Update paint properties when layer or paintsWithTransform status change (Closed)
Patch Set: Rebase on origin/master Created 4 years 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 setChildNeedsLayout(); 291 setChildNeedsLayout();
292 if (hadTransform) 292 if (hadTransform)
293 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( 293 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
294 LayoutInvalidationReason::StyleChange); 294 LayoutInvalidationReason::StyleChange);
295 if (!needsLayout()) { 295 if (!needsLayout()) {
296 // FIXME: We should call a specialized version of this function. 296 // FIXME: We should call a specialized version of this function.
297 parentLayer->updateLayerPositionsAfterLayout(); 297 parentLayer->updateLayerPositionsAfterLayout();
298 } 298 }
299 } 299 }
300 300
301 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
302 // hasLayer status will affect whether to create localBorderBoxProperties.
303 if (hadLayer != hasLayer()) {
304 setNeedsPaintPropertyUpdate();
305 } else if (oldStyle && oldStyle->position() != styleRef().position() &&
306 (oldStyle->position() == FixedPosition ||
307 styleRef().position() == FixedPosition)) {
308 // Fixed-position status affects whether to create paintOffsetTranslation.
309 // TODO(chrishtr): Update the condition here when changing the condition
310 // in PaintPropertyTreeBuilder::updatePaintOffsetTranslation().
311 setNeedsPaintPropertyUpdate();
312 }
313 }
314
301 if (layer()) { 315 if (layer()) {
302 layer()->styleDidChange(diff, oldStyle); 316 layer()->styleDidChange(diff, oldStyle);
303 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) 317 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)
304 setChildNeedsLayout(); 318 setChildNeedsLayout();
305 } 319 }
306 320
307 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) { 321 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) {
308 // Changing the getWritingMode() may change isOrthogonalWritingModeRoot() 322 // Changing the getWritingMode() may change isOrthogonalWritingModeRoot()
309 // of children. Make sure all children are marked/unmarked as orthogonal 323 // of children. Make sure all children are marked/unmarked as orthogonal
310 // writing-mode roots. 324 // writing-mode roots.
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 if (rootElementStyle->hasBackground()) 1330 if (rootElementStyle->hasBackground())
1317 return false; 1331 return false;
1318 1332
1319 if (node() != document().firstBodyElement()) 1333 if (node() != document().firstBodyElement())
1320 return false; 1334 return false;
1321 1335
1322 return true; 1336 return true;
1323 } 1337 }
1324 1338
1325 } // namespace blink 1339 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698