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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #ifndef RenderBox_h | 23 #ifndef RenderBox_h |
24 #define RenderBox_h | 24 #define RenderBox_h |
25 | 25 |
26 #include "core/animation/ActiveAnimations.h" | 26 #include "core/animation/ActiveAnimations.h" |
| 27 #include "core/rendering/LayoutRectRecorder.h" |
27 #include "core/rendering/RenderBoxModelObject.h" | 28 #include "core/rendering/RenderBoxModelObject.h" |
28 #include "core/rendering/RenderOverflow.h" | 29 #include "core/rendering/RenderOverflow.h" |
29 #include "core/rendering/shapes/ShapeOutsideInfo.h" | 30 #include "core/rendering/shapes/ShapeOutsideInfo.h" |
30 #include "platform/scroll/ScrollTypes.h" | 31 #include "platform/scroll/ScrollTypes.h" |
31 | 32 |
32 namespace WebCore { | 33 namespace WebCore { |
33 | 34 |
34 struct PaintInfo; | 35 struct PaintInfo; |
35 | 36 |
36 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; | 37 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE
D(); } | 513 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE
D(); } |
513 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); | 514 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); |
514 virtual void paintMask(PaintInfo&, const LayoutPoint&); | 515 virtual void paintMask(PaintInfo&, const LayoutPoint&); |
515 virtual void paintClippingMask(PaintInfo&, const LayoutPoint&); | 516 virtual void paintClippingMask(PaintInfo&, const LayoutPoint&); |
516 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 517 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; |
517 | 518 |
518 // Called when a positioned object moves but doesn't necessarily change size
. A simplified layout is attempted | 519 // Called when a positioned object moves but doesn't necessarily change size
. A simplified layout is attempted |
519 // that just updates the object's position. If the size does change, the obj
ect remains dirty. | 520 // that just updates the object's position. If the size does change, the obj
ect remains dirty. |
520 bool tryLayoutDoingPositionedMovementOnly() | 521 bool tryLayoutDoingPositionedMovementOnly() |
521 { | 522 { |
| 523 LayoutRectRecorder recorder(*this); |
522 LayoutUnit oldWidth = width(); | 524 LayoutUnit oldWidth = width(); |
523 updateLogicalWidth(); | 525 updateLogicalWidth(); |
524 // If we shrink to fit our width may have changed, so we still need full
layout. | 526 // If we shrink to fit our width may have changed, so we still need full
layout. |
525 if (oldWidth != width()) | 527 if (oldWidth != width()) |
526 return false; | 528 return false; |
527 updateLogicalHeight(); | 529 updateLogicalHeight(); |
528 return true; | 530 return true; |
529 } | 531 } |
530 | 532 |
531 LayoutRect maskClipRect(); | 533 LayoutRect maskClipRect(); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 if (UNLIKELY(inlineBoxWrapper() != 0)) | 778 if (UNLIKELY(inlineBoxWrapper() != 0)) |
777 deleteLineBoxWrapper(); | 779 deleteLineBoxWrapper(); |
778 } | 780 } |
779 | 781 |
780 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 782 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
781 } | 783 } |
782 | 784 |
783 } // namespace WebCore | 785 } // namespace WebCore |
784 | 786 |
785 #endif // RenderBox_h | 787 #endif // RenderBox_h |
OLD | NEW |