| 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 4074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4085 LayoutUnit borderWidth = std::max<LayoutUnit>(borderRight(), std::max<La
youtUnit>(valueForLength(style()->borderTopRightRadius().width(), boxWidth), val
ueForLength(style()->borderBottomRightRadius().width(), boxWidth))); | 4085 LayoutUnit borderWidth = std::max<LayoutUnit>(borderRight(), std::max<La
youtUnit>(valueForLength(style()->borderTopRightRadius().width(), boxWidth), val
ueForLength(style()->borderBottomRightRadius().width(), boxWidth))); |
| 4086 LayoutUnit decorationsLeftWidth = std::max<LayoutUnit>(-outlineStyle->ou
tlineOffset(), borderWidth + minInsetRightShadowExtent) + std::max<LayoutUnit>(o
utlineWidth, -shadowLeft); | 4086 LayoutUnit decorationsLeftWidth = std::max<LayoutUnit>(-outlineStyle->ou
tlineOffset(), borderWidth + minInsetRightShadowExtent) + std::max<LayoutUnit>(o
utlineWidth, -shadowLeft); |
| 4087 LayoutUnit decorationsRightWidth = std::max<LayoutUnit>(-outlineStyle->o
utlineOffset(), borderWidth + minInsetRightShadowExtent) + std::max<LayoutUnit>(
outlineWidth, shadowRight); | 4087 LayoutUnit decorationsRightWidth = std::max<LayoutUnit>(-outlineStyle->o
utlineOffset(), borderWidth + minInsetRightShadowExtent) + std::max<LayoutUnit>(
outlineWidth, shadowRight); |
| 4088 LayoutRect rightRect(newBounds.x() + std::min(newBounds.width(), oldBoun
ds.width()) - decorationsLeftWidth, | 4088 LayoutRect rightRect(newBounds.x() + std::min(newBounds.width(), oldBoun
ds.width()) - decorationsLeftWidth, |
| 4089 newBounds.y(), | 4089 newBounds.y(), |
| 4090 deltaWidth + decorationsLeftWidth + decorationsRightWidth, | 4090 deltaWidth + decorationsLeftWidth + decorationsRightWidth, |
| 4091 std::max(newBounds.height(), oldBounds.height())); | 4091 std::max(newBounds.height(), oldBounds.height())); |
| 4092 LayoutUnit right = std::min<LayoutUnit>(newBounds.maxX(), oldBounds.maxX
()); | 4092 LayoutUnit right = std::min<LayoutUnit>(newBounds.maxX(), oldBounds.maxX
()); |
| 4093 if (rightRect.x() < right) { | 4093 if (rightRect.x() < right) { |
| 4094 rightRect.setWidth(std::min(rightRect.width(), right - rightRect.x()
)); | 4094 rightRect.setWidth(std::min(rightRect.width(), right - rightRect.x()
)); |
| 4095 invalidatePaintUsingContainer(paintInvalidationContainer, pixelSnapp
edIntRect(rightRect), InvalidationIncremental); | 4095 invalidatePaintUsingContainer(paintInvalidationContainer, rightRect,
InvalidationIncremental); |
| 4096 } | 4096 } |
| 4097 } | 4097 } |
| 4098 | 4098 |
| 4099 LayoutUnit deltaHeight = absoluteValue(newBounds.height() - oldBounds.height
()); | 4099 LayoutUnit deltaHeight = absoluteValue(newBounds.height() - oldBounds.height
()); |
| 4100 if (deltaHeight) { | 4100 if (deltaHeight) { |
| 4101 LayoutUnit shadowTop; | 4101 LayoutUnit shadowTop; |
| 4102 LayoutUnit shadowBottom; | 4102 LayoutUnit shadowBottom; |
| 4103 style()->getBoxShadowVerticalExtent(shadowTop, shadowBottom); | 4103 style()->getBoxShadowVerticalExtent(shadowTop, shadowBottom); |
| 4104 LayoutUnit boxHeight = height(); | 4104 LayoutUnit boxHeight = height(); |
| 4105 LayoutUnit minInsetBottomShadowExtent = std::min<LayoutUnit>(-insetShado
wExtent.bottom(), std::min<LayoutUnit>(newBounds.height(), oldBounds.height())); | 4105 LayoutUnit minInsetBottomShadowExtent = std::min<LayoutUnit>(-insetShado
wExtent.bottom(), std::min<LayoutUnit>(newBounds.height(), oldBounds.height())); |
| 4106 LayoutUnit borderHeight = std::max<LayoutUnit>(borderBottom(), std::max<
LayoutUnit>(valueForLength(style()->borderBottomLeftRadius().height(), boxHeight
), valueForLength(style()->borderBottomRightRadius().height(), boxHeight))); | 4106 LayoutUnit borderHeight = std::max<LayoutUnit>(borderBottom(), std::max<
LayoutUnit>(valueForLength(style()->borderBottomLeftRadius().height(), boxHeight
), valueForLength(style()->borderBottomRightRadius().height(), boxHeight))); |
| 4107 LayoutUnit decorationsTopHeight = std::max<LayoutUnit>(-outlineStyle->ou
tlineOffset(), borderHeight + minInsetBottomShadowExtent) + std::max<LayoutUnit>
(outlineWidth, -shadowTop); | 4107 LayoutUnit decorationsTopHeight = std::max<LayoutUnit>(-outlineStyle->ou
tlineOffset(), borderHeight + minInsetBottomShadowExtent) + std::max<LayoutUnit>
(outlineWidth, -shadowTop); |
| 4108 LayoutUnit decorationsBottomHeight = std::max<LayoutUnit>(-outlineStyle-
>outlineOffset(), borderHeight + minInsetBottomShadowExtent) + std::max<LayoutUn
it>(outlineWidth, shadowBottom); | 4108 LayoutUnit decorationsBottomHeight = std::max<LayoutUnit>(-outlineStyle-
>outlineOffset(), borderHeight + minInsetBottomShadowExtent) + std::max<LayoutUn
it>(outlineWidth, shadowBottom); |
| 4109 LayoutRect bottomRect(newBounds.x(), | 4109 LayoutRect bottomRect(newBounds.x(), |
| 4110 std::min(newBounds.maxY(), oldBounds.maxY()) - decorationsTopHeight, | 4110 std::min(newBounds.maxY(), oldBounds.maxY()) - decorationsTopHeight, |
| 4111 std::max(newBounds.width(), oldBounds.width()), | 4111 std::max(newBounds.width(), oldBounds.width()), |
| 4112 deltaHeight + decorationsTopHeight + decorationsBottomHeight); | 4112 deltaHeight + decorationsTopHeight + decorationsBottomHeight); |
| 4113 LayoutUnit bottom = std::min(newBounds.maxY(), oldBounds.maxY()); | 4113 LayoutUnit bottom = std::min(newBounds.maxY(), oldBounds.maxY()); |
| 4114 if (bottomRect.y() < bottom) { | 4114 if (bottomRect.y() < bottom) { |
| 4115 bottomRect.setHeight(std::min(bottomRect.height(), bottom - bottomRe
ct.y())); | 4115 bottomRect.setHeight(std::min(bottomRect.height(), bottom - bottomRe
ct.y())); |
| 4116 invalidatePaintUsingContainer(paintInvalidationContainer, pixelSnapp
edIntRect(bottomRect), InvalidationIncremental); | 4116 invalidatePaintUsingContainer(paintInvalidationContainer, bottomRect
, InvalidationIncremental); |
| 4117 } | 4117 } |
| 4118 } | 4118 } |
| 4119 } | 4119 } |
| 4120 | 4120 |
| 4121 void RenderBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
e) | 4121 void RenderBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
e) |
| 4122 { | 4122 { |
| 4123 ASSERT(!needsLayout()); | 4123 ASSERT(!needsLayout()); |
| 4124 // If fragmentation height has changed, we need to lay out. No need to enter
the renderer if it | 4124 // If fragmentation height has changed, we need to lay out. No need to enter
the renderer if it |
| 4125 // is childless, though. | 4125 // is childless, though. |
| 4126 if (view()->layoutState()->pageLogicalHeightChanged() && slowFirstChild()) | 4126 if (view()->layoutState()->pageLogicalHeightChanged() && slowFirstChild()) |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4667 return 0; | 4667 return 0; |
| 4668 | 4668 |
| 4669 if (!layoutState && !flowThreadContainingBlock()) | 4669 if (!layoutState && !flowThreadContainingBlock()) |
| 4670 return 0; | 4670 return 0; |
| 4671 | 4671 |
| 4672 RenderBlock* containerBlock = containingBlock(); | 4672 RenderBlock* containerBlock = containingBlock(); |
| 4673 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4673 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4674 } | 4674 } |
| 4675 | 4675 |
| 4676 } // namespace WebCore | 4676 } // namespace WebCore |
| OLD | NEW |