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

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

Issue 2529293012: Invalidate paint properties on paint offset changes (Closed)
Patch Set: Fix more underinvalidation 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, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1685
1686 void LayoutBox::frameRectChanged() { 1686 void LayoutBox::frameRectChanged() {
1687 if (node() && node()->isElementNode()) { 1687 if (node() && node()->isElementNode()) {
1688 Element& element = toElement(*node()); 1688 Element& element = toElement(*node());
1689 element.setNeedsResizeObserverUpdate(); 1689 element.setNeedsResizeObserverUpdate();
1690 } 1690 }
1691 // The frame rect may change because of layout of other objects. 1691 // The frame rect may change because of layout of other objects.
1692 // Should check this object for paint invalidation. 1692 // Should check this object for paint invalidation.
1693 if (!needsLayout()) 1693 if (!needsLayout())
1694 setMayNeedPaintInvalidation(); 1694 setMayNeedPaintInvalidation();
1695
1696 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
1697 // The overflow clip paint property depends on the frame rect
1698 // (see: PaintPropertyTreeBuilder::updateOverflowClip).
1699 if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip())
1700 setNeedsPaintPropertyUpdate();
trchen 2016/12/02 22:32:40 This feel weird to me. The frameRect.location() sh
pdr. 2016/12/05 04:31:05 +1, good catch. This is hard to fix because we do
1701 }
1695 } 1702 }
1696 1703
1697 bool LayoutBox::intersectsVisibleViewport() const { 1704 bool LayoutBox::intersectsVisibleViewport() const {
1698 LayoutRect rect = visualOverflowRect(); 1705 LayoutRect rect = visualOverflowRect();
1699 LayoutView* layoutView = view(); 1706 LayoutView* layoutView = view();
1700 while (!layoutView->frame()->ownerLayoutItem().isNull()) 1707 while (!layoutView->frame()->ownerLayoutItem().isNull())
1701 layoutView = 1708 layoutView =
1702 LayoutAPIShim::layoutObjectFrom(layoutView->frame()->ownerLayoutItem()) 1709 LayoutAPIShim::layoutObjectFrom(layoutView->frame()->ownerLayoutItem())
1703 ->view(); 1710 ->view();
1704 mapToVisualRectInAncestorSpace(layoutView, rect); 1711 mapToVisualRectInAncestorSpace(layoutView, rect);
(...skipping 3918 matching lines...) Expand 10 before | Expand all | Expand 10 after
5623 LayoutRect rect = frameRect(); 5630 LayoutRect rect = frameRect();
5624 5631
5625 LayoutBlock* block = containingBlock(); 5632 LayoutBlock* block = containingBlock();
5626 if (block) 5633 if (block)
5627 block->adjustChildDebugRect(rect); 5634 block->adjustChildDebugRect(rect);
5628 5635
5629 return rect; 5636 return rect;
5630 } 5637 }
5631 5638
5632 } // namespace blink 5639 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698