Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/rendering/LayoutRectRecorder.h"
26 #include "core/rendering/RenderBoxModelObject.h" 27 #include "core/rendering/RenderBoxModelObject.h"
27 #include "core/rendering/RenderOverflow.h" 28 #include "core/rendering/RenderOverflow.h"
28 #include "core/rendering/shapes/ShapeOutsideInfo.h" 29 #include "core/rendering/shapes/ShapeOutsideInfo.h"
29 #include "platform/scroll/ScrollTypes.h" 30 #include "platform/scroll/ScrollTypes.h"
30 31
31 namespace WebCore { 32 namespace WebCore {
32 33
33 struct PaintInfo; 34 struct PaintInfo;
34 35
35 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; 36 enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE D(); } 511 virtual void paintObject(PaintInfo&, const LayoutPoint&) { ASSERT_NOT_REACHE D(); }
511 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); 512 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&);
512 virtual void paintMask(PaintInfo&, const LayoutPoint&); 513 virtual void paintMask(PaintInfo&, const LayoutPoint&);
513 virtual void paintClippingMask(PaintInfo&, const LayoutPoint&); 514 virtual void paintClippingMask(PaintInfo&, const LayoutPoint&);
514 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; 515 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
515 516
516 // Called when a positioned object moves but doesn't necessarily change size . A simplified layout is attempted 517 // Called when a positioned object moves but doesn't necessarily change size . A simplified layout is attempted
517 // that just updates the object's position. If the size does change, the obj ect remains dirty. 518 // that just updates the object's position. If the size does change, the obj ect remains dirty.
518 bool tryLayoutDoingPositionedMovementOnly() 519 bool tryLayoutDoingPositionedMovementOnly()
519 { 520 {
521 LayoutRectRecorder recorder(*this);
520 LayoutUnit oldWidth = width(); 522 LayoutUnit oldWidth = width();
521 updateLogicalWidth(); 523 updateLogicalWidth();
522 // If we shrink to fit our width may have changed, so we still need full layout. 524 // If we shrink to fit our width may have changed, so we still need full layout.
523 if (oldWidth != width()) 525 if (oldWidth != width())
524 return false; 526 return false;
525 updateLogicalHeight(); 527 updateLogicalHeight();
526 return true; 528 return true;
527 } 529 }
528 530
529 LayoutRect maskClipRect(); 531 LayoutRect maskClipRect();
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 if (UNLIKELY(inlineBoxWrapper() != 0)) 776 if (UNLIKELY(inlineBoxWrapper() != 0))
775 deleteLineBoxWrapper(); 777 deleteLineBoxWrapper();
776 } 778 }
777 779
778 ensureRareData().m_inlineBoxWrapper = boxWrapper; 780 ensureRareData().m_inlineBoxWrapper = boxWrapper;
779 } 781 }
780 782
781 } // namespace WebCore 783 } // namespace WebCore
782 784
783 #endif // RenderBox_h 785 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698