| 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 rect.move(offset); | 969 rect.move(offset); |
| 970 } | 970 } |
| 971 | 971 |
| 972 bool LayoutBox::applyOverflowClip(LayoutRect& rect, VisualRectFlags visualRectFl
ags) const | 972 bool LayoutBox::applyOverflowClip(LayoutRect& rect, VisualRectFlags visualRectFl
ags) const |
| 973 { | 973 { |
| 974 ASSERT(hasLayer()); | 974 ASSERT(hasLayer()); |
| 975 ASSERT(hasOverflowClip()); | 975 ASSERT(hasOverflowClip()); |
| 976 | 976 |
| 977 flipForWritingMode(rect); | 977 flipForWritingMode(rect); |
| 978 | 978 |
| 979 // size() is inaccurate if we're in the middle of a layout of this LayoutBox
, so use the | 979 LayoutRect clipRect = overflowClipRect(LayoutPoint()); |
| 980 // layer's size instead. Even if the layer's size is wrong, the layer itself
will issue paint invalidations | 980 |
| 981 // anyway if its size does change. | |
| 982 LayoutRect clipRect(LayoutPoint(), LayoutSize(layer()->size())); | |
| 983 bool doesIntersect; | 981 bool doesIntersect; |
| 984 if (visualRectFlags & EdgeInclusive) { | 982 if (visualRectFlags & EdgeInclusive) { |
| 985 doesIntersect = rect.inclusiveIntersect(clipRect); | 983 doesIntersect = rect.inclusiveIntersect(clipRect); |
| 986 } else { | 984 } else { |
| 987 rect.intersect(clipRect); | 985 rect.intersect(clipRect); |
| 988 doesIntersect = !rect.isEmpty(); | 986 doesIntersect = !rect.isEmpty(); |
| 989 } | 987 } |
| 990 if (doesIntersect) | 988 if (doesIntersect) |
| 991 flipForWritingMode(rect); | 989 flipForWritingMode(rect); |
| 992 return doesIntersect; | 990 return doesIntersect; |
| (...skipping 3708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4701 | 4699 |
| 4702 void LayoutBox::clearPercentHeightDescendants() | 4700 void LayoutBox::clearPercentHeightDescendants() |
| 4703 { | 4701 { |
| 4704 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { | 4702 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { |
| 4705 if (curr->isBox()) | 4703 if (curr->isBox()) |
| 4706 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4704 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
| 4707 } | 4705 } |
| 4708 } | 4706 } |
| 4709 | 4707 |
| 4710 } // namespace blink | 4708 } // namespace blink |
| OLD | NEW |