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

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

Issue 2009353003: Add a hack to set shouldPaint to true for force-composited iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void setWidth(LayoutUnit width) { ASSERT(!isInPlacedTree()); m_frameRect.set Width(width); } 71 void setWidth(LayoutUnit width) { ASSERT(!isInPlacedTree()); m_frameRect.set Width(width); }
72 void setHeight(LayoutUnit height) { ASSERT(!isInPlacedTree()); m_frameRect.s etHeight(height); } 72 void setHeight(LayoutUnit height) { ASSERT(!isInPlacedTree()); m_frameRect.s etHeight(height); }
73 73
74 const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect ; } 74 const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect ; }
75 75
76 #if ENABLE(ASSERT) 76 #if ENABLE(ASSERT)
77 bool isInPlacedTree() const { return m_isInPlacedTree; } 77 bool isInPlacedTree() const { return m_isInPlacedTree; }
78 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } 78 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; }
79 #endif 79 #endif
80 80
81 bool shouldPaint() const { return m_shouldPaint; } 81 bool shouldPaint() const;
82 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } 82 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; }
83 bool isDescendant() const { return m_isDescendant; } 83 bool isDescendant() const { return m_isDescendant; }
84 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } 84 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; }
85 bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverha ngingFloatInChild; } 85 bool isLowestNonOverhangingFloatInChild() const { return m_isLowestNonOverha ngingFloatInChild; }
86 void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatI nChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInCh ild; } 86 void setIsLowestNonOverhangingFloatInChild(bool isLowestNonOverhangingFloatI nChild) { m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInCh ild; }
87 87
88 // FIXME: Callers of these methods are dangerous and should be whitelisted e xplicitly or removed. 88 // FIXME: Callers of these methods are dangerous and should be whitelisted e xplicitly or removed.
89 RootInlineBox* originatingLine() const { return m_originatingLine; } 89 RootInlineBox* originatingLine() const { return m_originatingLine; }
90 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; } 90 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; }
91 91
92 private: 92 private:
93 explicit FloatingObject(LayoutBox*); 93 explicit FloatingObject(LayoutBox*);
94 FloatingObject(LayoutBox*, Type, const LayoutRect&, bool shouldPaint, bool i sDescendant, bool isLowestNonOverhangingFloatInChild); 94 FloatingObject(LayoutBox*, Type, const LayoutRect&, bool shouldPaint, bool i sDescendant, bool isLowestNonOverhangingFloatInChild);
95 95
96 bool shouldPaintForCompositedLayoutPart();
97
96 LayoutBox* m_layoutObject; 98 LayoutBox* m_layoutObject;
97 RootInlineBox* m_originatingLine; 99 RootInlineBox* m_originatingLine;
98 LayoutRect m_frameRect; 100 LayoutRect m_frameRect;
99 101
100 unsigned m_type : 2; // Type (left or right aligned) 102 unsigned m_type : 2; // Type (left or right aligned)
101 unsigned m_shouldPaint : 1; 103 unsigned m_shouldPaint : 1;
102 unsigned m_isDescendant : 1; 104 unsigned m_isDescendant : 1;
103 unsigned m_isPlaced : 1; 105 unsigned m_isPlaced : 1;
104 unsigned m_isLowestNonOverhangingFloatInChild : 1; 106 unsigned m_isLowestNonOverhangingFloatInChild : 1;
105 #if ENABLE(ASSERT) 107 #if ENABLE(ASSERT)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 static String toString(const LayoutUnit value); 201 static String toString(const LayoutUnit value);
200 }; 202 };
201 template<> struct ValueToString<FloatingObject*> { 203 template<> struct ValueToString<FloatingObject*> {
202 static String toString(const FloatingObject*); 204 static String toString(const FloatingObject*);
203 }; 205 };
204 #endif 206 #endif
205 207
206 } // namespace blink 208 } // namespace blink
207 209
208 #endif // FloatingObjects_h 210 #endif // FloatingObjects_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698