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

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

Issue 2570423003: Remove paintOffsetTranslation for fixed-position elements. (Closed)
Patch Set: none 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()) { 301 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
302 // hasLayer status will affect whether to create localBorderBoxProperties. 302 // hasLayer status will affect whether to create localBorderBoxProperties.
303 if (hadLayer != hasLayer()) { 303 if (hadLayer != hasLayer()) {
Xianzhu 2016/12/15 22:37:11 Nit: if (RuntimeEnabledFeatures::slimmingPaintInva
304 setNeedsPaintPropertyUpdate(); 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 } 305 }
313 } 306 }
314 307
315 if (layer()) { 308 if (layer()) {
316 layer()->styleDidChange(diff, oldStyle); 309 layer()->styleDidChange(diff, oldStyle);
317 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) 310 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)
318 setChildNeedsLayout(); 311 setChildNeedsLayout();
319 } 312 }
320 313
321 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) { 314 if (oldStyle && wasHorizontalWritingMode != isHorizontalWritingMode()) {
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 if (rootElementStyle->hasBackground()) 1323 if (rootElementStyle->hasBackground())
1331 return false; 1324 return false;
1332 1325
1333 if (node() != document().firstBodyElement()) 1326 if (node() != document().firstBodyElement())
1334 return false; 1327 return false;
1335 1328
1336 return true; 1329 return true;
1337 } 1330 }
1338 1331
1339 } // namespace blink 1332 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698