| 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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 }; | 377 }; |
| 378 | 378 |
| 379 struct FloatingObject { | 379 struct FloatingObject { |
| 380 WTF_MAKE_NONCOPYABLE(FloatingObject); WTF_MAKE_FAST_ALLOCATED; | 380 WTF_MAKE_NONCOPYABLE(FloatingObject); WTF_MAKE_FAST_ALLOCATED; |
| 381 public: | 381 public: |
| 382 // Note that Type uses bits so you can use FloatBoth as a mask to query
for both left and right. | 382 // Note that Type uses bits so you can use FloatBoth as a mask to query
for both left and right. |
| 383 enum Type { FloatLeft = 1, FloatRight = 2, FloatBoth = 3 }; | 383 enum Type { FloatLeft = 1, FloatRight = 2, FloatBoth = 3 }; |
| 384 | 384 |
| 385 FloatingObject(Type type) | 385 FloatingObject(Type type) |
| 386 : m_renderer(0) | 386 : m_renderer(0) |
| 387 , m_originatingLine(0) |
| 387 , m_paginationStrut(0) | 388 , m_paginationStrut(0) |
| 388 , m_type(type) | 389 , m_type(type) |
| 389 , m_shouldPaint(true) | 390 , m_shouldPaint(true) |
| 390 , m_isDescendant(false) | 391 , m_isDescendant(false) |
| 391 , m_isPlaced(false) | 392 , m_isPlaced(false) |
| 392 { | 393 { |
| 393 } | 394 } |
| 394 | 395 |
| 395 FloatingObject(Type type, const IntRect& frameRect) | 396 FloatingObject(Type type, const IntRect& frameRect) |
| 396 : m_renderer(0) | 397 : m_renderer(0) |
| 398 , m_originatingLine(0) |
| 397 , m_frameRect(frameRect) | 399 , m_frameRect(frameRect) |
| 398 , m_paginationStrut(0) | 400 , m_paginationStrut(0) |
| 399 , m_type(type) | 401 , m_type(type) |
| 400 , m_shouldPaint(true) | 402 , m_shouldPaint(true) |
| 401 , m_isDescendant(false) | 403 , m_isDescendant(false) |
| 402 , m_isPlaced(true) | 404 , m_isPlaced(true) |
| 403 { | 405 { |
| 404 } | 406 } |
| 405 | 407 |
| 406 Type type() const { return static_cast<Type>(m_type); } | 408 Type type() const { return static_cast<Type>(m_type); } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 418 | 420 |
| 419 void setX(int x) { m_frameRect.setX(x); } | 421 void setX(int x) { m_frameRect.setX(x); } |
| 420 void setY(int y) { m_frameRect.setY(y); } | 422 void setY(int y) { m_frameRect.setY(y); } |
| 421 void setWidth(int width) { m_frameRect.setWidth(width); } | 423 void setWidth(int width) { m_frameRect.setWidth(width); } |
| 422 void setHeight(int height) { m_frameRect.setHeight(height); } | 424 void setHeight(int height) { m_frameRect.setHeight(height); } |
| 423 | 425 |
| 424 const IntRect& frameRect() const { ASSERT(isPlaced()); return m_frameRec
t; } | 426 const IntRect& frameRect() const { ASSERT(isPlaced()); return m_frameRec
t; } |
| 425 void setFrameRect(const IntRect& frameRect) { m_frameRect = frameRect; } | 427 void setFrameRect(const IntRect& frameRect) { m_frameRect = frameRect; } |
| 426 | 428 |
| 427 RenderBox* m_renderer; | 429 RenderBox* m_renderer; |
| 430 RootInlineBox* m_originatingLine; |
| 428 IntRect m_frameRect; | 431 IntRect m_frameRect; |
| 429 int m_paginationStrut; | 432 int m_paginationStrut; |
| 430 unsigned m_type : 2; // Type (left or right aligned) | 433 unsigned m_type : 2; // Type (left or right aligned) |
| 431 bool m_shouldPaint : 1; | 434 bool m_shouldPaint : 1; |
| 432 bool m_isDescendant : 1; | 435 bool m_isDescendant : 1; |
| 433 bool m_isPlaced : 1; | 436 bool m_isPlaced : 1; |
| 434 }; | 437 }; |
| 435 | 438 |
| 436 IntPoint flipFloatForWritingMode(const FloatingObject*, const IntPoint&) con
st; | 439 IntPoint flipFloatForWritingMode(const FloatingObject*, const IntPoint&) con
st; |
| 437 | 440 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 ASSERT(!object || object->isRenderBlock()); | 803 ASSERT(!object || object->isRenderBlock()); |
| 801 return static_cast<const RenderBlock*>(object); | 804 return static_cast<const RenderBlock*>(object); |
| 802 } | 805 } |
| 803 | 806 |
| 804 // This will catch anyone doing an unnecessary cast. | 807 // This will catch anyone doing an unnecessary cast. |
| 805 void toRenderBlock(const RenderBlock*); | 808 void toRenderBlock(const RenderBlock*); |
| 806 | 809 |
| 807 } // namespace WebCore | 810 } // namespace WebCore |
| 808 | 811 |
| 809 #endif // RenderBlock_h | 812 #endif // RenderBlock_h |
| OLD | NEW |