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

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

Issue 2465983002: Rename "paint invalidation rect" etc. to "visual rect". (Closed)
Patch Set: - Created 4 years, 1 month 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, 492 PaintInvalidationState newPaintInvalidationState(paintInvalidationState,
493 *this); 493 *this);
494 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) 494 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState))
495 return; 495 return;
496 496
497 if (mayNeedPaintInvalidationSubtree()) 497 if (mayNeedPaintInvalidationSubtree())
498 newPaintInvalidationState 498 newPaintInvalidationState
499 .setForceSubtreeInvalidationCheckingWithinContainer(); 499 .setForceSubtreeInvalidationCheckingWithinContainer();
500 500
501 LayoutRect previousPaintInvalidationRect = 501 LayoutRect previousVisualRect = this->previousVisualRect();
502 this->previousPaintInvalidationRect();
503 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking(); 502 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking();
504 PaintInvalidationReason reason = 503 PaintInvalidationReason reason =
505 invalidatePaintIfNeeded(newPaintInvalidationState); 504 invalidatePaintIfNeeded(newPaintInvalidationState);
506 clearPaintInvalidationFlags(); 505 clearPaintInvalidationFlags();
507 506
508 if (previousPosition != previousPositionFromPaintInvalidationBacking()) 507 if (previousPosition != previousPositionFromPaintInvalidationBacking())
509 newPaintInvalidationState 508 newPaintInvalidationState
510 .setForceSubtreeInvalidationCheckingWithinContainer(); 509 .setForceSubtreeInvalidationCheckingWithinContainer();
511 510
512 // TODO(wangxianzhu): Combine this function into LayoutObject:: 511 // TODO(wangxianzhu): Combine this function into LayoutObject::
513 // invalidateTreeIfNeeded() when removing the following workarounds. 512 // invalidateTreeIfNeeded() when removing the following workarounds.
514 513
515 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove 514 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove
516 // when we enable paint offset caching. 515 // when we enable paint offset caching.
517 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) 516 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef()))
518 newPaintInvalidationState 517 newPaintInvalidationState
519 .setForceSubtreeInvalidationCheckingWithinContainer(); 518 .setForceSubtreeInvalidationCheckingWithinContainer();
520 519
521 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't have 520 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't have
522 // enough saved information to do accurate check of clipping change. Will 521 // enough saved information to do accurate check of clipping change. Will
523 // remove when we remove rect-based paint invalidation. 522 // remove when we remove rect-based paint invalidation.
524 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && 523 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
525 previousPaintInvalidationRect != this->previousPaintInvalidationRect() && 524 previousVisualRect != this->previousVisualRect() &&
526 !usesCompositedScrolling() 525 !usesCompositedScrolling()
527 // Note that isLayoutView() below becomes unnecessary after the launch of 526 // Note that isLayoutView() below becomes unnecessary after the launch of
528 // root layer scrolling. 527 // root layer scrolling.
529 && (hasOverflowClip() || isLayoutView())) 528 && (hasOverflowClip() || isLayoutView()))
530 newPaintInvalidationState 529 newPaintInvalidationState
531 .setForceSubtreeInvalidationRectUpdateWithinContainer(); 530 .setForceSubtreeInvalidationRectUpdateWithinContainer();
532 531
533 newPaintInvalidationState.updateForChildren(reason); 532 newPaintInvalidationState.updateForChildren(reason);
534 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); 533 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
535 } 534 }
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 if (rootElementStyle->hasBackground()) 1375 if (rootElementStyle->hasBackground())
1377 return false; 1376 return false;
1378 1377
1379 if (node() != document().firstBodyElement()) 1378 if (node() != document().firstBodyElement())
1380 return false; 1379 return false;
1381 1380
1382 return true; 1381 return true;
1383 } 1382 }
1384 1383
1385 } // namespace blink 1384 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.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