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

Side by Side Diff: sky/engine/core/rendering/RenderObject.h

Issue 748943002: remove childrenInline & setChildrenInline (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/rendering/RenderInline.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // FIXME: This could be used when changing the size of a renderer without ch ildren to skip some invalidations. 257 // FIXME: This could be used when changing the size of a renderer without ch ildren to skip some invalidations.
258 bool rendererHasNoBoxEffect() const 258 bool rendererHasNoBoxEffect() const
259 { 259 {
260 return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() & & !style()->hasBackground(); 260 return !style()->hasVisualOverflowingEffect() && !style()->hasBorder() & & !style()->hasBackground();
261 } 261 }
262 262
263 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline 263 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
264 // children. 264 // children.
265 virtual RenderBlock* firstLineBlock() const; 265 virtual RenderBlock* firstLineBlock() const;
266 266
267 // Called when an object that was floating or positioned becomes a normal fl ow object
268 // again. We have to make sure the render tree updates as needed to accommo date the new
269 // normal flow object.
270 void handleDynamicFloatPositionChange();
271
272 // RenderObject tree manipulation 267 // RenderObject tree manipulation
273 ////////////////////////////////////////// 268 //////////////////////////////////////////
274 virtual bool canHaveChildren() const { return virtualChildren(); } 269 virtual bool canHaveChildren() const { return virtualChildren(); }
275 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true ; } 270 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true ; }
276 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ; 271 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ;
277 virtual void removeChild(RenderObject*); 272 virtual void removeChild(RenderObject*);
278 ////////////////////////////////////////// 273 //////////////////////////////////////////
279 274
280 protected: 275 protected:
281 ////////////////////////////////////////// 276 //////////////////////////////////////////
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 virtual bool isRenderBlockFlow() const { return false; } 320 virtual bool isRenderBlockFlow() const { return false; }
326 virtual bool isRenderParagraph() const { return false; } 321 virtual bool isRenderParagraph() const { return false; }
327 virtual bool isRenderImage() const { return false; } 322 virtual bool isRenderImage() const { return false; }
328 virtual bool isRenderInline() const { return false; } 323 virtual bool isRenderInline() const { return false; }
329 virtual bool isRenderView() const { return false; } 324 virtual bool isRenderView() const { return false; }
330 325
331 bool isDocumentElement() const { return document().documentElement() == m_no de; } 326 bool isDocumentElement() const { return document().documentElement() == m_no de; }
332 327
333 bool everHadLayout() const { return m_bitfields.everHadLayout(); } 328 bool everHadLayout() const { return m_bitfields.everHadLayout(); }
334 329
335 // FIXME(sky): Remove this concept.
336 bool childrenInline() const { return isRenderParagraph(); }
337 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); }
338
339 bool alwaysCreateLineBoxesForRenderInline() const 330 bool alwaysCreateLineBoxesForRenderInline() const
340 { 331 {
341 ASSERT(isRenderInline()); 332 ASSERT(isRenderInline());
342 return m_bitfields.alwaysCreateLineBoxesForRenderInline(); 333 return m_bitfields.alwaysCreateLineBoxesForRenderInline();
343 } 334 }
344 void setAlwaysCreateLineBoxesForRenderInline(bool alwaysCreateLineBoxes) 335 void setAlwaysCreateLineBoxesForRenderInline(bool alwaysCreateLineBoxes)
345 { 336 {
346 ASSERT(isRenderInline()); 337 ASSERT(isRenderInline());
347 m_bitfields.setAlwaysCreateLineBoxesForRenderInline(alwaysCreateLineBoxe s); 338 m_bitfields.setAlwaysCreateLineBoxesForRenderInline(alwaysCreateLineBoxe s);
348 } 339 }
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 , m_isBox(false) 973 , m_isBox(false)
983 , m_isInline(true) 974 , m_isInline(true)
984 , m_isReplaced(false) 975 , m_isReplaced(false)
985 , m_isDragging(false) 976 , m_isDragging(false)
986 , m_hasLayer(false) 977 , m_hasLayer(false)
987 , m_hasOverflowClip(false) 978 , m_hasOverflowClip(false)
988 , m_hasTransform(false) 979 , m_hasTransform(false)
989 , m_everHadLayout(false) 980 , m_everHadLayout(false)
990 , m_ancestorLineBoxDirty(false) 981 , m_ancestorLineBoxDirty(false)
991 , m_layoutDidGetCalled(false) 982 , m_layoutDidGetCalled(false)
992 , m_childrenInline(false)
993 , m_alwaysCreateLineBoxesForRenderInline(false) 983 , m_alwaysCreateLineBoxesForRenderInline(false)
994 , m_positionedState(IsStaticallyPositioned) 984 , m_positionedState(IsStaticallyPositioned)
995 , m_selectionState(SelectionNone) 985 , m_selectionState(SelectionNone)
996 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 986 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
997 { 987 {
998 } 988 }
999 989
1000 // 32 bits have been used in the first word, and 11 in the second. 990 // 32 bits have been used in the first word, and 11 in the second.
1001 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 991 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1002 ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidation, ShouldDoFullPaintInv alidation); 992 ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidation, ShouldDoFullPaintInv alidation);
(...skipping 19 matching lines...) Expand all
1022 1012
1023 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); 1013 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer);
1024 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca se of overflow:auto/scroll/hidden 1014 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca se of overflow:auto/scroll/hidden
1025 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform); 1015 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform);
1026 1016
1027 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); 1017 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout);
1028 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); 1018 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty);
1029 1019
1030 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); 1020 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled);
1031 1021
1032 // from RenderBlock
1033 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
1034
1035 // from RenderInline 1022 // from RenderInline
1036 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForRenderInline, AlwaysCreateL ineBoxesForRenderInline); 1023 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForRenderInline, AlwaysCreateL ineBoxesForRenderInline);
1037 1024
1038 private: 1025 private:
1039 unsigned m_positionedState : 2; // PositionedState 1026 unsigned m_positionedState : 2; // PositionedState
1040 unsigned m_selectionState : 3; // SelectionState 1027 unsigned m_selectionState : 3; // SelectionState
1041 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate 1028 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate
1042 1029
1043 public: 1030 public:
1044 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; } 1031 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 void showTree(const blink::RenderObject*); 1193 void showTree(const blink::RenderObject*);
1207 void showLineTree(const blink::RenderObject*); 1194 void showLineTree(const blink::RenderObject*);
1208 void showRenderTree(const blink::RenderObject* object1); 1195 void showRenderTree(const blink::RenderObject* object1);
1209 // We don't make object2 an optional parameter so that showRenderTree 1196 // We don't make object2 an optional parameter so that showRenderTree
1210 // can be called from gdb easily. 1197 // can be called from gdb easily.
1211 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1198 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1212 1199
1213 #endif 1200 #endif
1214 1201
1215 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 1202 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderInline.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698