| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. 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 12 matching lines...) Expand all Loading... |
| 23 * | 23 * |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/rendering/LayoutRepainter.h" | 27 #include "core/rendering/LayoutRepainter.h" |
| 28 | 28 |
| 29 #include "core/rendering/RenderObject.h" | 29 #include "core/rendering/RenderObject.h" |
| 30 | 30 |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 LayoutRepainter::LayoutRepainter(RenderObject& object, bool checkForRepaint, |
| 34 const LayoutRect& oldBounds, const LayoutRect&
oldOutlineBox) |
| 35 : m_object(object) |
| 36 , m_repaintContainer(0) |
| 37 , m_checkForRepaint(checkForRepaint) |
| 38 { |
| 39 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 40 return; |
| 41 |
| 42 if (m_checkForRepaint) { |
| 43 m_repaintContainer = m_object.containerForRepaint(); |
| 44 m_oldBounds = oldBounds; |
| 45 m_oldOutlineBox = oldOutlineBox; |
| 46 } |
| 47 } |
| 48 |
| 33 LayoutRepainter::LayoutRepainter(RenderObject& object, bool checkForRepaint) | 49 LayoutRepainter::LayoutRepainter(RenderObject& object, bool checkForRepaint) |
| 34 : m_object(object) | 50 : m_object(object) |
| 35 , m_repaintContainer(0) | 51 , m_repaintContainer(0) |
| 36 , m_checkForRepaint(checkForRepaint) | 52 , m_checkForRepaint(checkForRepaint) |
| 37 { | 53 { |
| 38 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 54 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 39 return; | 55 return; |
| 40 | 56 |
| 41 if (m_checkForRepaint) { | 57 if (m_checkForRepaint) { |
| 42 m_repaintContainer = m_object.containerForRepaint(); | 58 m_repaintContainer = m_object.containerForRepaint(); |
| 43 m_oldBounds = m_object.clippedOverflowRectForRepaint(m_repaintContainer)
; | 59 m_oldBounds = m_object.clippedOverflowRectForRepaint(m_repaintContainer)
; |
| 44 m_oldOutlineBox = m_object.outlineBoundsForRepaint(m_repaintContainer); | 60 m_oldOutlineBox = m_object.outlineBoundsForRepaint(m_repaintContainer); |
| 45 } | 61 } |
| 46 } | 62 } |
| 47 | 63 |
| 48 bool LayoutRepainter::repaintAfterLayout() | 64 bool LayoutRepainter::repaintAfterLayout() |
| 49 { | 65 { |
| 50 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 66 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 51 return false; | 67 return false; |
| 52 | 68 |
| 53 return m_checkForRepaint ? m_object.repaintAfterLayoutIfNeeded(m_repaintCont
ainer, m_object.selfNeedsLayout(), m_oldBounds, m_oldOutlineBox) : false; | 69 return m_checkForRepaint ? m_object.repaintAfterLayoutIfNeeded(m_repaintCont
ainer, m_object.selfNeedsLayout(), m_oldBounds, m_oldOutlineBox) : false; |
| 54 } | 70 } |
| 55 | 71 |
| 56 } // namespace WebCore | 72 } // namespace WebCore |
| OLD | NEW |