| OLD | NEW |
| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 updateBackgroundAttachmentFixedStatusAfterStyleChange(); | 318 updateBackgroundAttachmentFixedStatusAfterStyleChange(); |
| 319 | 319 |
| 320 if (oldStyle) { | 320 if (oldStyle) { |
| 321 LayoutFlowThread* flowThread = flowThreadContainingBlock(); | 321 LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
| 322 if (flowThread && flowThread != this) | 322 if (flowThread && flowThread != this) |
| 323 flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle); | 323 flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle); |
| 324 | 324 |
| 325 updateScrollSnapMappingAfterStyleChange(&newStyle, oldStyle); | 325 updateScrollSnapMappingAfterStyleChange(&newStyle, oldStyle); |
| 326 } | 326 } |
| 327 | 327 |
| 328 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 329 if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip()) { |
| 330 // The overflow clip paint property depends on border sizes through |
| 331 // overflowClipRect() so we update properties on border size changes. |
| 332 if (oldStyle && !oldStyle->border().sizeEquals(newStyle.border())) |
| 333 setNeedsPaintPropertyUpdate(); |
| 334 } |
| 335 } |
| 336 |
| 328 // Non-atomic inlines should be LayoutInline or LayoutText, not LayoutBox. | 337 // Non-atomic inlines should be LayoutInline or LayoutText, not LayoutBox. |
| 329 DCHECK(!isInline() || isAtomicInlineLevel()); | 338 DCHECK(!isInline() || isAtomicInlineLevel()); |
| 330 } | 339 } |
| 331 | 340 |
| 332 void LayoutBox::updateBackgroundAttachmentFixedStatusAfterStyleChange() { | 341 void LayoutBox::updateBackgroundAttachmentFixedStatusAfterStyleChange() { |
| 333 if (!frameView()) | 342 if (!frameView()) |
| 334 return; | 343 return; |
| 335 | 344 |
| 336 // On low-powered/mobile devices, preventing blitting on a scroll can cause | 345 // On low-powered/mobile devices, preventing blitting on a scroll can cause |
| 337 // noticeable delays when scrolling a page with a fixed background image. As | 346 // noticeable delays when scrolling a page with a fixed background image. As |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 | 1694 |
| 1686 void LayoutBox::frameRectChanged() { | 1695 void LayoutBox::frameRectChanged() { |
| 1687 if (node() && node()->isElementNode()) { | 1696 if (node() && node()->isElementNode()) { |
| 1688 Element& element = toElement(*node()); | 1697 Element& element = toElement(*node()); |
| 1689 element.setNeedsResizeObserverUpdate(); | 1698 element.setNeedsResizeObserverUpdate(); |
| 1690 } | 1699 } |
| 1691 // The frame rect may change because of layout of other objects. | 1700 // The frame rect may change because of layout of other objects. |
| 1692 // Should check this object for paint invalidation. | 1701 // Should check this object for paint invalidation. |
| 1693 if (!needsLayout()) | 1702 if (!needsLayout()) |
| 1694 setMayNeedPaintInvalidation(); | 1703 setMayNeedPaintInvalidation(); |
| 1704 |
| 1705 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 1706 // The overflow clip paint property depends on the border box rect through |
| 1707 // overflowClipRect(). The border box rect's size equals the frame rect's |
| 1708 // size, so we trigger a paint property update when the framerect changes. |
| 1709 if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip()) |
| 1710 setNeedsPaintPropertyUpdate(); |
| 1711 } |
| 1695 } | 1712 } |
| 1696 | 1713 |
| 1697 bool LayoutBox::intersectsVisibleViewport() const { | 1714 bool LayoutBox::intersectsVisibleViewport() const { |
| 1698 LayoutRect rect = visualOverflowRect(); | 1715 LayoutRect rect = visualOverflowRect(); |
| 1699 LayoutView* layoutView = view(); | 1716 LayoutView* layoutView = view(); |
| 1700 while (!layoutView->frame()->ownerLayoutItem().isNull()) | 1717 while (!layoutView->frame()->ownerLayoutItem().isNull()) |
| 1701 layoutView = | 1718 layoutView = |
| 1702 LayoutAPIShim::layoutObjectFrom(layoutView->frame()->ownerLayoutItem()) | 1719 LayoutAPIShim::layoutObjectFrom(layoutView->frame()->ownerLayoutItem()) |
| 1703 ->view(); | 1720 ->view(); |
| 1704 mapToVisualRectInAncestorSpace(layoutView, rect); | 1721 mapToVisualRectInAncestorSpace(layoutView, rect); |
| (...skipping 3918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5623 LayoutRect rect = frameRect(); | 5640 LayoutRect rect = frameRect(); |
| 5624 | 5641 |
| 5625 LayoutBlock* block = containingBlock(); | 5642 LayoutBlock* block = containingBlock(); |
| 5626 if (block) | 5643 if (block) |
| 5627 block->adjustChildDebugRect(rect); | 5644 block->adjustChildDebugRect(rect); |
| 5628 | 5645 |
| 5629 return rect; | 5646 return rect; |
| 5630 } | 5647 } |
| 5631 | 5648 |
| 5632 } // namespace blink | 5649 } // namespace blink |
| OLD | NEW |