Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: third_party/WebKit/Source/core/layout/FloatingObjects.h

Issue 1899193007: Remove special-code for paginating floats followed by lines of text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 LayoutUnit width() const { return m_frameRect.width(); } 65 LayoutUnit width() const { return m_frameRect.width(); }
66 LayoutUnit height() const { return m_frameRect.height(); } 66 LayoutUnit height() const { return m_frameRect.height(); }
67 67
68 void setX(LayoutUnit x) { ASSERT(!isInPlacedTree()); m_frameRect.setX(x); } 68 void setX(LayoutUnit x) { ASSERT(!isInPlacedTree()); m_frameRect.setX(x); }
69 void setY(LayoutUnit y) { ASSERT(!isInPlacedTree()); m_frameRect.setY(y); } 69 void setY(LayoutUnit y) { ASSERT(!isInPlacedTree()); m_frameRect.setY(y); }
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 int paginationStrut() const { return m_paginationStrut; }
76 void setPaginationStrut(int strut) { m_paginationStrut = strut; }
77
78 #if ENABLE(ASSERT) 75 #if ENABLE(ASSERT)
79 bool isInPlacedTree() const { return m_isInPlacedTree; } 76 bool isInPlacedTree() const { return m_isInPlacedTree; }
80 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } 77 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; }
81 #endif 78 #endif
82 79
83 bool shouldPaint() const { return m_shouldPaint; } 80 bool shouldPaint() const { return m_shouldPaint; }
84 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } 81 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; }
85 bool isDescendant() const { return m_isDescendant; } 82 bool isDescendant() const { return m_isDescendant; }
86 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } 83 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; }
87 bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverha ngingFloatInChild; } 84 bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverha ngingFloatInChild; }
88 void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatI nChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInCh ild; } 85 void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatI nChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInCh ild; }
89 86
90 // 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.
91 RootInlineBox* originatingLine() const { return m_originatingLine; } 88 RootInlineBox* originatingLine() const { return m_originatingLine; }
92 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; } 89 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; }
93 90
94 private: 91 private:
95 explicit FloatingObject(LayoutBox*); 92 explicit FloatingObject(LayoutBox*);
96 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);
97 94
98 LayoutBox* m_layoutObject; 95 LayoutBox* m_layoutObject;
99 RootInlineBox* m_originatingLine; 96 RootInlineBox* m_originatingLine;
100 LayoutRect m_frameRect; 97 LayoutRect m_frameRect;
101 int m_paginationStrut; // FIXME: Is this class size-sensitive? Does this nee d 32-bits?
102 98
103 unsigned m_type : 2; // Type (left or right aligned) 99 unsigned m_type : 2; // Type (left or right aligned)
104 unsigned m_shouldPaint : 1; 100 unsigned m_shouldPaint : 1;
105 unsigned m_isDescendant : 1; 101 unsigned m_isDescendant : 1;
106 unsigned m_isPlaced : 1; 102 unsigned m_isPlaced : 1;
107 unsigned m_isLowestNonOverhangingFloatInChild : 1; 103 unsigned m_isLowestNonOverhangingFloatInChild : 1;
108 #if ENABLE(ASSERT) 104 #if ENABLE(ASSERT)
109 unsigned m_isInPlacedTree : 1; 105 unsigned m_isInPlacedTree : 1;
110 #endif 106 #endif
111 }; 107 };
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 static String toString(const LayoutUnit value); 200 static String toString(const LayoutUnit value);
205 }; 201 };
206 template<> struct ValueToString<FloatingObject*> { 202 template<> struct ValueToString<FloatingObject*> {
207 static String toString(const FloatingObject*); 203 static String toString(const FloatingObject*);
208 }; 204 };
209 #endif 205 #endif
210 206
211 } // namespace blink 207 } // namespace blink
212 208
213 #endif // FloatingObjects_h 209 #endif // FloatingObjects_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698