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 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 RenderInline* inlineContinuation() const { return m_inlineContinuation; } | 135 RenderInline* inlineContinuation() const { return m_inlineContinuation; } |
136 void setInlineContinuation(RenderInline* c) { m_inlineContinuation = c; } | 136 void setInlineContinuation(RenderInline* c) { m_inlineContinuation = c; } |
137 | 137 |
138 // This function is a convenience helper for creating an anonymous block tha
t inherits its | 138 // This function is a convenience helper for creating an anonymous block tha
t inherits its |
139 // style from this RenderBlock. | 139 // style from this RenderBlock. |
140 RenderBlock* createAnonymousBlock(bool isFlexibleBox = false) const; | 140 RenderBlock* createAnonymousBlock(bool isFlexibleBox = false) const; |
141 | 141 |
142 protected: | 142 protected: |
143 void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, Rende
rObject* child); | 143 void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, Rende
rObject* child); |
144 void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, Rende
rObject* beforeChild, RenderObject* child); | 144 void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, Rende
rObject* beforeChild, RenderObject* child); |
| 145 void moveAllChildrenTo(RenderObject* to, RenderObjectChildList* toChildList)
; |
| 146 void moveAllChildrenTo(RenderObject* to, RenderObjectChildList* toChildList,
RenderObject* beforeChild); |
145 | 147 |
146 int maxTopPosMargin() const { return m_maxMargin ? m_maxMargin->m_topPos : M
axMargin::topPosDefault(this); } | 148 int maxTopPosMargin() const { return m_maxMargin ? m_maxMargin->m_topPos : M
axMargin::topPosDefault(this); } |
147 int maxTopNegMargin() const { return m_maxMargin ? m_maxMargin->m_topNeg : M
axMargin::topNegDefault(this); } | 149 int maxTopNegMargin() const { return m_maxMargin ? m_maxMargin->m_topNeg : M
axMargin::topNegDefault(this); } |
148 int maxBottomPosMargin() const { return m_maxMargin ? m_maxMargin->m_bottomP
os : MaxMargin::bottomPosDefault(this); } | 150 int maxBottomPosMargin() const { return m_maxMargin ? m_maxMargin->m_bottomP
os : MaxMargin::bottomPosDefault(this); } |
149 int maxBottomNegMargin() const { return m_maxMargin ? m_maxMargin->m_bottomN
eg : MaxMargin::bottomNegDefault(this); } | 151 int maxBottomNegMargin() const { return m_maxMargin ? m_maxMargin->m_bottomN
eg : MaxMargin::bottomNegDefault(this); } |
150 void setMaxTopMargins(int pos, int neg); | 152 void setMaxTopMargins(int pos, int neg); |
151 void setMaxBottomMargins(int pos, int neg); | 153 void setMaxBottomMargins(int pos, int neg); |
152 | 154 |
153 void initMaxMarginValues() | 155 void initMaxMarginValues() |
154 { | 156 { |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 int m_bottomPos; | 511 int m_bottomPos; |
510 int m_bottomNeg; | 512 int m_bottomNeg; |
511 }; | 513 }; |
512 | 514 |
513 MaxMargin* m_maxMargin; | 515 MaxMargin* m_maxMargin; |
514 | 516 |
515 RenderObjectChildList m_children; | 517 RenderObjectChildList m_children; |
516 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t
his block flow. For example, <div>Hello<br>world.</div> will have two total lin
es for the <div>. | 518 RenderLineBoxList m_lineBoxes; // All of the root line boxes created for t
his block flow. For example, <div>Hello<br>world.</div> will have two total lin
es for the <div>. |
517 | 519 |
518 mutable int m_lineHeight; | 520 mutable int m_lineHeight; |
| 521 |
| 522 // RenderRubyBase objects need to be able to split and merge, moving their c
hildren around |
| 523 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). |
| 524 friend class RenderRubyBase; |
519 }; | 525 }; |
520 | 526 |
521 inline RenderBlock* toRenderBlock(RenderObject* object) | 527 inline RenderBlock* toRenderBlock(RenderObject* object) |
522 { | 528 { |
523 ASSERT(!object || object->isRenderBlock()); | 529 ASSERT(!object || object->isRenderBlock()); |
524 return static_cast<RenderBlock*>(object); | 530 return static_cast<RenderBlock*>(object); |
525 } | 531 } |
526 | 532 |
527 inline const RenderBlock* toRenderBlock(const RenderObject* object) | 533 inline const RenderBlock* toRenderBlock(const RenderObject* object) |
528 { | 534 { |
529 ASSERT(!object || object->isRenderBlock()); | 535 ASSERT(!object || object->isRenderBlock()); |
530 return static_cast<const RenderBlock*>(object); | 536 return static_cast<const RenderBlock*>(object); |
531 } | 537 } |
532 | 538 |
533 // This will catch anyone doing an unnecessary cast. | 539 // This will catch anyone doing an unnecessary cast. |
534 void toRenderBlock(const RenderBlock*); | 540 void toRenderBlock(const RenderBlock*); |
535 | 541 |
536 } // namespace WebCore | 542 } // namespace WebCore |
537 | 543 |
538 #endif // RenderBlock_h | 544 #endif // RenderBlock_h |
OLD | NEW |