| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void setWidth(LayoutUnit width) { ASSERT(!isInPlacedTree()); m_frameRect.set
Width(width); } | 70 void setWidth(LayoutUnit width) { ASSERT(!isInPlacedTree()); m_frameRect.set
Width(width); } |
| 71 void setHeight(LayoutUnit height) { ASSERT(!isInPlacedTree()); m_frameRect.s
etHeight(height); } | 71 void setHeight(LayoutUnit height) { ASSERT(!isInPlacedTree()); m_frameRect.s
etHeight(height); } |
| 72 | 72 |
| 73 const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect
; } | 73 const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect
; } |
| 74 | 74 |
| 75 #if ENABLE(ASSERT) | 75 #if ENABLE(ASSERT) |
| 76 bool isInPlacedTree() const { return m_isInPlacedTree; } | 76 bool isInPlacedTree() const { return m_isInPlacedTree; } |
| 77 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } | 77 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 bool shouldPaint() const { return m_shouldPaint; } | 80 bool shouldPaint() const; |
| 81 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } | 81 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } |
| 82 bool isDescendant() const { return m_isDescendant; } | 82 bool isDescendant() const { return m_isDescendant; } |
| 83 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } | 83 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } |
| 84 bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverha
ngingFloatInChild; } | 84 bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverha
ngingFloatInChild; } |
| 85 void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatI
nChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInCh
ild; } | 85 void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatI
nChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInCh
ild; } |
| 86 | 86 |
| 87 // FIXME: Callers of these methods are dangerous and should be whitelisted e
xplicitly or removed. | 87 // FIXME: Callers of these methods are dangerous and should be whitelisted e
xplicitly or removed. |
| 88 RootInlineBox* originatingLine() const { return m_originatingLine; } | 88 RootInlineBox* originatingLine() const { return m_originatingLine; } |
| 89 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; } | 89 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; } |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 explicit FloatingObject(LayoutBox*); | 92 explicit FloatingObject(LayoutBox*); |
| 93 FloatingObject(LayoutBox*, Type, const LayoutRect&, bool shouldPaint, bool i
sDescendant, bool isLowestNonOverhangingFloatInChild); | 93 FloatingObject(LayoutBox*, Type, const LayoutRect&, bool shouldPaint, bool i
sDescendant, bool isLowestNonOverhangingFloatInChild); |
| 94 | 94 |
| 95 bool shouldPaintForCompositedLayoutPart(); |
| 96 |
| 95 LayoutBox* m_layoutObject; | 97 LayoutBox* m_layoutObject; |
| 96 RootInlineBox* m_originatingLine; | 98 RootInlineBox* m_originatingLine; |
| 97 LayoutRect m_frameRect; | 99 LayoutRect m_frameRect; |
| 98 | 100 |
| 99 unsigned m_type : 2; // Type (left or right aligned) | 101 unsigned m_type : 2; // Type (left or right aligned) |
| 100 unsigned m_shouldPaint : 1; | 102 unsigned m_shouldPaint : 1; |
| 101 unsigned m_isDescendant : 1; | 103 unsigned m_isDescendant : 1; |
| 102 unsigned m_isPlaced : 1; | 104 unsigned m_isPlaced : 1; |
| 103 unsigned m_isLowestNonOverhangingFloatInChild : 1; | 105 unsigned m_isLowestNonOverhangingFloatInChild : 1; |
| 104 #if ENABLE(ASSERT) | 106 #if ENABLE(ASSERT) |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 static String toString(const LayoutUnit value); | 200 static String toString(const LayoutUnit value); |
| 199 }; | 201 }; |
| 200 template<> struct ValueToString<FloatingObject*> { | 202 template<> struct ValueToString<FloatingObject*> { |
| 201 static String toString(const FloatingObject*); | 203 static String toString(const FloatingObject*); |
| 202 }; | 204 }; |
| 203 #endif | 205 #endif |
| 204 | 206 |
| 205 } // namespace blink | 207 } // namespace blink |
| 206 | 208 |
| 207 #endif // FloatingObjects_h | 209 #endif // FloatingObjects_h |
| OLD | NEW |