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 10 matching lines...) Expand all Loading... |
21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
22 */ | 22 */ |
23 | 23 |
24 #include "config.h" | 24 #include "config.h" |
25 #include "core/layout/FloatingObjects.h" | 25 #include "core/layout/FloatingObjects.h" |
26 | 26 |
27 #include "core/layout/LayoutBlockFlow.h" | 27 #include "core/layout/LayoutBlockFlow.h" |
28 #include "core/layout/LayoutBox.h" | 28 #include "core/layout/LayoutBox.h" |
29 #include "core/layout/LayoutView.h" | 29 #include "core/layout/LayoutView.h" |
30 #include "core/layout/shapes/ShapeOutsideInfo.h" | 30 #include "core/layout/shapes/ShapeOutsideInfo.h" |
| 31 #include "wtf/SizeAssertions.h" |
31 | 32 |
32 using namespace WTF; | 33 using namespace WTF; |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
36 struct SameSizeAsFloatingObject { | 37 ASSERT_SIZE(FloatingObject, 32, 40); |
37 void* pointers[2]; | |
38 LayoutRect rect; | |
39 int paginationStrut; | |
40 uint32_t bitfields : 8; | |
41 }; | |
42 | |
43 static_assert(sizeof(FloatingObject) == sizeof(SameSizeAsFloatingObject), "Float
ingObject should stay small"); | |
44 | 38 |
45 FloatingObject::FloatingObject(LayoutBox* layoutObject) | 39 FloatingObject::FloatingObject(LayoutBox* layoutObject) |
46 : m_layoutObject(layoutObject) | 40 : m_layoutObject(layoutObject) |
47 , m_originatingLine(nullptr) | 41 , m_originatingLine(nullptr) |
48 , m_paginationStrut(0) | 42 , m_paginationStrut(0) |
49 , m_ownership(DirectlyContained) | 43 , m_ownership(DirectlyContained) |
50 , m_isPlaced(false) | 44 , m_isPlaced(false) |
51 , m_isLowestNonOverhangingFloatInChild(false) | 45 , m_isLowestNonOverhangingFloatInChild(false) |
52 #if ENABLE(ASSERT) | 46 #if ENABLE(ASSERT) |
53 , m_isInPlacedTree(false) | 47 , m_isInPlacedTree(false) |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 } | 545 } |
552 | 546 |
553 String ValueToString<FloatingObject*>::string(const FloatingObject* floatingObje
ct) | 547 String ValueToString<FloatingObject*>::string(const FloatingObject* floatingObje
ct) |
554 { | 548 { |
555 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr
ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating
Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped
MaxY()); | 549 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr
ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating
Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped
MaxY()); |
556 } | 550 } |
557 #endif | 551 #endif |
558 | 552 |
559 | 553 |
560 } // namespace blink | 554 } // namespace blink |
OLD | NEW |