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. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 3832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3843 { | 3843 { |
3844 if (PaintLayerScrollableArea* scrollableArea = this->getScrollableArea()) { | 3844 if (PaintLayerScrollableArea* scrollableArea = this->getScrollableArea()) { |
3845 if (scrollableArea->hasHorizontalScrollbar() && !scrollableArea->layerFo
rHorizontalScrollbar()) | 3845 if (scrollableArea->hasHorizontalScrollbar() && !scrollableArea->layerFo
rHorizontalScrollbar()) |
3846 return true; | 3846 return true; |
3847 if (scrollableArea->hasVerticalScrollbar() && !scrollableArea->layerForV
erticalScrollbar()) | 3847 if (scrollableArea->hasVerticalScrollbar() && !scrollableArea->layerForV
erticalScrollbar()) |
3848 return true; | 3848 return true; |
3849 } | 3849 } |
3850 return false; | 3850 return false; |
3851 } | 3851 } |
3852 | 3852 |
3853 PaintInvalidationReason LayoutBox::getPaintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, | 3853 PaintInvalidationReason LayoutBox::getPaintInvalidationReason(const PaintInvalid
ationState& paintInvalidationState, |
3854 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) const | 3854 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) const |
3855 { | 3855 { |
3856 PaintInvalidationReason invalidationReason = LayoutBoxModelObject::getPaintI
nvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds,
newLocation); | 3856 PaintInvalidationReason invalidationReason = LayoutBoxModelObject::getPaintI
nvalidationReason(paintInvalidationState, oldBounds, oldLocation, newBounds, new
Location); |
3857 if (isFullPaintInvalidationReason(invalidationReason)) | 3857 if (isFullPaintInvalidationReason(invalidationReason)) |
3858 return invalidationReason; | 3858 return invalidationReason; |
3859 | 3859 |
3860 if (isLayoutView()) { | 3860 if (isLayoutView()) { |
3861 const LayoutView* layoutView = toLayoutView(this); | 3861 const LayoutView* layoutView = toLayoutView(this); |
3862 // In normal compositing mode, root background doesn't need to be invali
dated for | 3862 // In normal compositing mode, root background doesn't need to be invali
dated for |
3863 // box changes, because the background always covers the whole document
rect | 3863 // box changes, because the background always covers the whole document
rect |
3864 // and clipping is done by compositor()->m_containerLayer. Also the scro
llbars | 3864 // and clipping is done by compositor()->m_containerLayer. Also the scro
llbars |
3865 // are always composited. There are no other box decoration on the Layou
tView thus | 3865 // are always composited. There are no other box decoration on the Layou
tView thus |
3866 // we can safely exit here. | 3866 // we can safely exit here. |
3867 if (layoutView->usesCompositing() && (!document().settings() || !documen
t().settings()->rootLayerScrolls())) | 3867 if (layoutView->usesCompositing() && (!document().settings() || !documen
t().settings()->rootLayerScrolls())) |
3868 return invalidationReason; | 3868 return invalidationReason; |
3869 } | 3869 } |
3870 | 3870 |
3871 // If the transform is not identity or translation, incremental invalidation
is not applicable | 3871 // If the transform is not identity or translation, incremental invalidation
is not applicable |
3872 // because the difference between oldBounds and newBounds doesn't cover all
area needing invalidation. | 3872 // because the difference between oldBounds and newBounds doesn't cover all
area needing invalidation. |
3873 // FIXME: Should also consider ancestor transforms since paintInvalidationCo
ntainer. crbug.com/426111. | 3873 // FIXME: Should also consider ancestor transforms since paintInvalidationCo
ntainer. crbug.com/426111. |
3874 if (invalidationReason == PaintInvalidationIncremental | 3874 if (invalidationReason == PaintInvalidationIncremental |
3875 && paintInvalidationContainer != this | 3875 && paintInvalidationState.paintInvalidationContainer() != this |
3876 && hasLayer() && layer()->transform() && !layer()->transform()->isIdenti
tyOrTranslation()) | 3876 && hasLayer() && layer()->transform() && !layer()->transform()->isIdenti
tyOrTranslation()) |
3877 return PaintInvalidationBoundsChange; | 3877 return PaintInvalidationBoundsChange; |
3878 | 3878 |
3879 if (style()->backgroundLayers().thisOrNextLayersUseContentBox() || style()->
maskLayers().thisOrNextLayersUseContentBox() || style()->boxSizing() == BoxSizin
gBorderBox) { | 3879 if (style()->backgroundLayers().thisOrNextLayersUseContentBox() || style()->
maskLayers().thisOrNextLayersUseContentBox() || style()->boxSizing() == BoxSizin
gBorderBox) { |
3880 LayoutRect oldContentBoxRect = m_rareData ? m_rareData->m_previousConten
tBoxRect : LayoutRect(); | 3880 LayoutRect oldContentBoxRect = m_rareData ? m_rareData->m_previousConten
tBoxRect : LayoutRect(); |
3881 LayoutRect newContentBoxRect = contentBoxRect(); | 3881 LayoutRect newContentBoxRect = contentBoxRect(); |
3882 if (oldContentBoxRect != newContentBoxRect) | 3882 if (oldContentBoxRect != newContentBoxRect) |
3883 return PaintInvalidationContentBoxChange; | 3883 return PaintInvalidationContentBoxChange; |
3884 } | 3884 } |
3885 | 3885 |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4776 | 4776 |
4777 void LayoutBox::clearPercentHeightDescendants() | 4777 void LayoutBox::clearPercentHeightDescendants() |
4778 { | 4778 { |
4779 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { | 4779 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { |
4780 if (curr->isBox()) | 4780 if (curr->isBox()) |
4781 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4781 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
4782 } | 4782 } |
4783 } | 4783 } |
4784 | 4784 |
4785 } // namespace blink | 4785 } // namespace blink |
OLD | NEW |