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

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

Issue 2060053002: Set paintingLayerNeedsRepaint() in layout tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set paintingLayerNeedsRepaint() in layout tree 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th is); 382 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th is);
383 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) 383 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState))
384 return; 384 return;
385 385
386 if (mayNeedPaintInvalidationSubtree()) 386 if (mayNeedPaintInvalidationSubtree())
387 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta iner(); 387 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta iner();
388 388
389 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe ct(); 389 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe ct();
390 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking( ); 390 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking( );
391 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio nState); 391 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio nState);
392 clearPaintInvalidationFlags(newPaintInvalidationState);
393 392
394 if (previousPosition != previousPositionFromPaintInvalidationBacking()) 393 if (previousPosition != previousPositionFromPaintInvalidationBacking())
395 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta iner(); 394 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta iner();
396 395
397 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre eIfNeeded() when removing the following workarounds. 396 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre eIfNeeded() when removing the following workarounds.
398 397
399 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove when we enable paint offset caching. 398 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove when we enable paint offset caching.
400 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) 399 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef()))
401 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta iner(); 400 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta iner();
402 401
403 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check 402 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check
404 // of clipping change. Will remove when we remove rect-based paint invalidat ion. 403 // of clipping change. Will remove when we remove rect-based paint invalidat ion.
405 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() 404 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
406 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( ) 405 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( )
407 && !usesCompositedScrolling() 406 && !usesCompositedScrolling()
408 && hasOverflowClip()) 407 && hasOverflowClip())
409 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer(); 408 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer();
410 409
411 newPaintInvalidationState.updateForChildren(reason); 410 newPaintInvalidationState.updateForChildren(reason);
412 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); 411 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
412 clearPaintInvalidationFlags(newPaintInvalidationState);
413 } 413 }
414 414
415 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason, const LayoutObject& object) c onst 415 void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe ct& r, PaintInvalidationReason invalidationReason, const LayoutObject& object) c onst
416 { 416 {
417 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready. 417 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready.
418 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 418 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
419 419
420 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, 420 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
421 // so assert but check that the layer is composited. 421 // so assert but check that the layer is composited.
422 ASSERT(compositingState() != NotComposited); 422 ASSERT(compositingState() != NotComposited);
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 if (rootElementStyle->hasBackground()) 1126 if (rootElementStyle->hasBackground())
1127 return false; 1127 return false;
1128 1128
1129 if (node() != document().firstBodyElement()) 1129 if (node() != document().firstBodyElement())
1130 return false; 1130 return false;
1131 1131
1132 return true; 1132 return true;
1133 } 1133 }
1134 1134
1135 } // namespace blink 1135 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698