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 3856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3867 { | 3867 { |
3868 if (PaintLayerScrollableArea* scrollableArea = this->getScrollableArea()) { | 3868 if (PaintLayerScrollableArea* scrollableArea = this->getScrollableArea()) { |
3869 if (scrollableArea->hasHorizontalScrollbar() && !scrollableArea->layerFo
rHorizontalScrollbar()) | 3869 if (scrollableArea->hasHorizontalScrollbar() && !scrollableArea->layerFo
rHorizontalScrollbar()) |
3870 return true; | 3870 return true; |
3871 if (scrollableArea->hasVerticalScrollbar() && !scrollableArea->layerForV
erticalScrollbar()) | 3871 if (scrollableArea->hasVerticalScrollbar() && !scrollableArea->layerForV
erticalScrollbar()) |
3872 return true; | 3872 return true; |
3873 } | 3873 } |
3874 return false; | 3874 return false; |
3875 } | 3875 } |
3876 | 3876 |
3877 PaintInvalidationReason LayoutBox::getPaintInvalidationReason(const LayoutBoxMod
elObject& paintInvalidationContainer, | 3877 PaintInvalidationReason LayoutBox::getPaintInvalidationReason(const PaintInvalid
ationState& paintInvalidationState, |
3878 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) const | 3878 const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRec
t& newBounds, const LayoutPoint& newLocation) const |
3879 { | 3879 { |
3880 PaintInvalidationReason invalidationReason = LayoutBoxModelObject::getPaintI
nvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds,
newLocation); | 3880 PaintInvalidationReason invalidationReason = LayoutBoxModelObject::getPaintI
nvalidationReason(paintInvalidationState, oldBounds, oldLocation, newBounds, new
Location); |
3881 if (isFullPaintInvalidationReason(invalidationReason)) | 3881 if (isFullPaintInvalidationReason(invalidationReason)) |
3882 return invalidationReason; | 3882 return invalidationReason; |
3883 | 3883 |
3884 if (isLayoutView()) { | 3884 if (isLayoutView()) { |
3885 const LayoutView* layoutView = toLayoutView(this); | 3885 const LayoutView* layoutView = toLayoutView(this); |
3886 // In normal compositing mode, root background doesn't need to be invali
dated for | 3886 // In normal compositing mode, root background doesn't need to be invali
dated for |
3887 // box changes, because the background always covers the whole document
rect | 3887 // box changes, because the background always covers the whole document
rect |
3888 // and clipping is done by compositor()->m_containerLayer. Also the scro
llbars | 3888 // and clipping is done by compositor()->m_containerLayer. Also the scro
llbars |
3889 // are always composited. There are no other box decoration on the Layou
tView thus | 3889 // are always composited. There are no other box decoration on the Layou
tView thus |
3890 // we can safely exit here. | 3890 // we can safely exit here. |
3891 if (layoutView->usesCompositing() && (!document().settings() || !documen
t().settings()->rootLayerScrolls())) | 3891 if (layoutView->usesCompositing() && (!document().settings() || !documen
t().settings()->rootLayerScrolls())) |
3892 return invalidationReason; | 3892 return invalidationReason; |
3893 } | 3893 } |
3894 | 3894 |
3895 // If the transform is not identity or translation, incremental invalidation
is not applicable | 3895 // If the transform is not identity or translation, incremental invalidation
is not applicable |
3896 // because the difference between oldBounds and newBounds doesn't cover all
area needing invalidation. | 3896 // because the difference between oldBounds and newBounds doesn't cover all
area needing invalidation. |
3897 // FIXME: Should also consider ancestor transforms since paintInvalidationCo
ntainer. crbug.com/426111. | 3897 // FIXME: Should also consider ancestor transforms since paintInvalidationCo
ntainer. crbug.com/426111. |
3898 if (invalidationReason == PaintInvalidationIncremental | 3898 if (invalidationReason == PaintInvalidationIncremental |
3899 && paintInvalidationContainer != this | 3899 && paintInvalidationState.paintInvalidationContainer() != this |
3900 && hasLayer() && layer()->transform() && !layer()->transform()->isIdenti
tyOrTranslation()) | 3900 && hasLayer() && layer()->transform() && !layer()->transform()->isIdenti
tyOrTranslation()) |
3901 return PaintInvalidationBoundsChange; | 3901 return PaintInvalidationBoundsChange; |
3902 | 3902 |
3903 if (style()->backgroundLayers().thisOrNextLayersUseContentBox() || style()->
maskLayers().thisOrNextLayersUseContentBox() || style()->boxSizing() == BoxSizin
gBorderBox) { | 3903 if (style()->backgroundLayers().thisOrNextLayersUseContentBox() || style()->
maskLayers().thisOrNextLayersUseContentBox() || style()->boxSizing() == BoxSizin
gBorderBox) { |
3904 LayoutRect oldContentBoxRect = m_rareData ? m_rareData->m_previousConten
tBoxRect : LayoutRect(); | 3904 LayoutRect oldContentBoxRect = m_rareData ? m_rareData->m_previousConten
tBoxRect : LayoutRect(); |
3905 LayoutRect newContentBoxRect = contentBoxRect(); | 3905 LayoutRect newContentBoxRect = contentBoxRect(); |
3906 if (oldContentBoxRect != newContentBoxRect) | 3906 if (oldContentBoxRect != newContentBoxRect) |
3907 return PaintInvalidationContentBoxChange; | 3907 return PaintInvalidationContentBoxChange; |
3908 } | 3908 } |
3909 | 3909 |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4850 if (!flowThread) { | 4850 if (!flowThread) { |
4851 // If there's no flow thread, we're not nested. All pages have the same
height. Give up. | 4851 // If there's no flow thread, we're not nested. All pages have the same
height. Give up. |
4852 return strutToNextPage; | 4852 return strutToNextPage; |
4853 } | 4853 } |
4854 // Start searching for a suitable offset at the top of the next page or colu
mn. | 4854 // Start searching for a suitable offset at the top of the next page or colu
mn. |
4855 LayoutUnit flowThreadOffset = offsetFromLogicalTopOfFirstPage() + nextPageLo
gicalTop; | 4855 LayoutUnit flowThreadOffset = offsetFromLogicalTopOfFirstPage() + nextPageLo
gicalTop; |
4856 return strutToNextPage + flowThread->nextLogicalTopForUnbreakableContent(flo
wThreadOffset, contentLogicalHeight) - flowThreadOffset; | 4856 return strutToNextPage + flowThread->nextLogicalTopForUnbreakableContent(flo
wThreadOffset, contentLogicalHeight) - flowThreadOffset; |
4857 } | 4857 } |
4858 | 4858 |
4859 } // namespace blink | 4859 } // namespace blink |
OLD | NEW |