| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 136 } |
| 137 | 137 |
| 138 bool shouldDisableLayoutStateForSubtree(RenderObject&) const; | 138 bool shouldDisableLayoutStateForSubtree(RenderObject&) const; |
| 139 | 139 |
| 140 // Returns true if layoutState should be used for its cached offset and clip
. | 140 // Returns true if layoutState should be used for its cached offset and clip
. |
| 141 bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m
_layoutState; } | 141 bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m
_layoutState; } |
| 142 LayoutState* layoutState() const { return m_layoutState; } | 142 LayoutState* layoutState() const { return m_layoutState; } |
| 143 | 143 |
| 144 bool canUseLayoutStateForContainer(const RenderObject* repaintContainer) con
st | 144 bool canUseLayoutStateForContainer(const RenderObject* repaintContainer) con
st |
| 145 { | 145 { |
| 146 // FIXME: Repaint container should never be null. crbug.com/363699 | |
| 147 // FIXME: LayoutState should be enabled for other repaint containers tha
n the RenderView. crbug.com/363834 | 146 // FIXME: LayoutState should be enabled for other repaint containers tha
n the RenderView. crbug.com/363834 |
| 148 return layoutStateEnabled() && (!repaintContainer || repaintContainer ==
this); | 147 return layoutStateEnabled() && (repaintContainer == this); |
| 149 } | 148 } |
| 150 | 149 |
| 151 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID
E; | 150 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID
E; |
| 152 | 151 |
| 153 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } | 152 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } |
| 154 void setPageLogicalHeight(LayoutUnit height) | 153 void setPageLogicalHeight(LayoutUnit height) |
| 155 { | 154 { |
| 156 if (m_pageLogicalHeight != height) { | 155 if (m_pageLogicalHeight != height) { |
| 157 m_pageLogicalHeight = height; | 156 m_pageLogicalHeight = height; |
| 158 m_pageLogicalHeightChanged = true; | 157 m_pageLogicalHeightChanged = true; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 { | 373 { |
| 375 m_view.enableLayoutState(); | 374 m_view.enableLayoutState(); |
| 376 } | 375 } |
| 377 private: | 376 private: |
| 378 RenderView& m_view; | 377 RenderView& m_view; |
| 379 }; | 378 }; |
| 380 | 379 |
| 381 } // namespace WebCore | 380 } // namespace WebCore |
| 382 | 381 |
| 383 #endif // RenderView_h | 382 #endif // RenderView_h |
| OLD | NEW |