| 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 4061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4072 } | 4072 } |
| 4073 | 4073 |
| 4074 void LayoutBox::invalidatePaintRectClippedByOldAndNewBounds(const LayoutBoxModel
Object& paintInvalidationContainer, const LayoutRect& rect, const LayoutRect& ol
dBounds, const LayoutRect& newBounds) | 4074 void LayoutBox::invalidatePaintRectClippedByOldAndNewBounds(const LayoutBoxModel
Object& paintInvalidationContainer, const LayoutRect& rect, const LayoutRect& ol
dBounds, const LayoutRect& newBounds) |
| 4075 { | 4075 { |
| 4076 if (rect.isEmpty()) | 4076 if (rect.isEmpty()) |
| 4077 return; | 4077 return; |
| 4078 LayoutRect rectClippedByOldBounds = intersection(rect, oldBounds); | 4078 LayoutRect rectClippedByOldBounds = intersection(rect, oldBounds); |
| 4079 LayoutRect rectClippedByNewBounds = intersection(rect, newBounds); | 4079 LayoutRect rectClippedByNewBounds = intersection(rect, newBounds); |
| 4080 // Invalidate only once if the clipped rects equal. | 4080 // Invalidate only once if the clipped rects equal. |
| 4081 if (rectClippedByOldBounds == rectClippedByNewBounds) { | 4081 if (rectClippedByOldBounds == rectClippedByNewBounds) { |
| 4082 invalidatePaintUsingContainer(&paintInvalidationContainer, rectClippedBy
OldBounds, PaintInvalidationIncremental); | 4082 invalidatePaintUsingContainer(paintInvalidationContainer, rectClippedByO
ldBounds, PaintInvalidationIncremental); |
| 4083 return; | 4083 return; |
| 4084 } | 4084 } |
| 4085 // Invalidate the bigger one if one contains another. Otherwise invalidate b
oth. | 4085 // Invalidate the bigger one if one contains another. Otherwise invalidate b
oth. |
| 4086 if (!rectClippedByNewBounds.contains(rectClippedByOldBounds)) | 4086 if (!rectClippedByNewBounds.contains(rectClippedByOldBounds)) |
| 4087 invalidatePaintUsingContainer(&paintInvalidationContainer, rectClippedBy
OldBounds, PaintInvalidationIncremental); | 4087 invalidatePaintUsingContainer(paintInvalidationContainer, rectClippedByO
ldBounds, PaintInvalidationIncremental); |
| 4088 if (!rectClippedByOldBounds.contains(rectClippedByNewBounds)) | 4088 if (!rectClippedByOldBounds.contains(rectClippedByNewBounds)) |
| 4089 invalidatePaintUsingContainer(&paintInvalidationContainer, rectClippedBy
NewBounds, PaintInvalidationIncremental); | 4089 invalidatePaintUsingContainer(paintInvalidationContainer, rectClippedByN
ewBounds, PaintInvalidationIncremental); |
| 4090 } | 4090 } |
| 4091 | 4091 |
| 4092 void LayoutBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
e) | 4092 void LayoutBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
e) |
| 4093 { | 4093 { |
| 4094 ASSERT(!needsLayout()); | 4094 ASSERT(!needsLayout()); |
| 4095 // If fragmentation height has changed, we need to lay out. No need to enter
the layoutObject if it | 4095 // If fragmentation height has changed, we need to lay out. No need to enter
the layoutObject if it |
| 4096 // is childless, though. | 4096 // is childless, though. |
| 4097 if (view()->layoutState()->pageLogicalHeightChanged() && slowFirstChild()) | 4097 if (view()->layoutState()->pageLogicalHeightChanged() && slowFirstChild()) |
| 4098 layoutScope.setChildNeedsLayout(this); | 4098 layoutScope.setChildNeedsLayout(this); |
| 4099 } | 4099 } |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4796 bool LayoutBox::canRenderBorderImage() const | 4796 bool LayoutBox::canRenderBorderImage() const |
| 4797 { | 4797 { |
| 4798 if (!style()->hasBorder()) | 4798 if (!style()->hasBorder()) |
| 4799 return false; | 4799 return false; |
| 4800 | 4800 |
| 4801 StyleImage* borderImage = style()->borderImage().image(); | 4801 StyleImage* borderImage = style()->borderImage().image(); |
| 4802 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4802 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
| 4803 } | 4803 } |
| 4804 | 4804 |
| 4805 } // namespace blink | 4805 } // namespace blink |
| OLD | NEW |