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

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

Issue 734813004: Get rid of continuations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // again. We have to make sure the render tree updates as needed to accommo date the new 268 // again. We have to make sure the render tree updates as needed to accommo date the new
269 // normal flow object. 269 // normal flow object.
270 void handleDynamicFloatPositionChange(); 270 void handleDynamicFloatPositionChange();
271 271
272 // RenderObject tree manipulation 272 // RenderObject tree manipulation
273 ////////////////////////////////////////// 273 //////////////////////////////////////////
274 virtual bool canHaveChildren() const { return virtualChildren(); } 274 virtual bool canHaveChildren() const { return virtualChildren(); }
275 virtual bool canHaveGeneratedChildren() const; 275 virtual bool canHaveGeneratedChildren() const;
276 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true ; } 276 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true ; }
277 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ; 277 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ;
278 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild = 0) { return addChild(newChild, beforeChild); }
279 virtual void removeChild(RenderObject*); 278 virtual void removeChild(RenderObject*);
280 ////////////////////////////////////////// 279 //////////////////////////////////////////
281 280
282 protected: 281 protected:
283 ////////////////////////////////////////// 282 //////////////////////////////////////////
284 // Helper functions. Dangerous to use! 283 // Helper functions. Dangerous to use!
285 void setPreviousSibling(RenderObject* previous) { m_previous = previous; } 284 void setPreviousSibling(RenderObject* previous) { m_previous = previous; }
286 void setNextSibling(RenderObject* next) { m_next = next; } 285 void setNextSibling(RenderObject* next) { m_next = next; }
287 void setParent(RenderObject* parent) { m_parent = parent; } 286 void setParent(RenderObject* parent) { m_parent = parent; }
288 287
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 397
399 bool isAnonymous() const { return m_bitfields.isAnonymous(); } 398 bool isAnonymous() const { return m_bitfields.isAnonymous(); }
400 bool isAnonymousBlock() const 399 bool isAnonymousBlock() const
401 { 400 {
402 // This function is kept in sync with anonymous block creation condition s in 401 // This function is kept in sync with anonymous block creation condition s in
403 // RenderBlock::createAnonymousBlock(). This includes creating an anonym ous 402 // RenderBlock::createAnonymousBlock(). This includes creating an anonym ous
404 // RenderBlock having a BLOCK or BOX display. See https://bugs.webkit.or g/show_bug.cgi?id=56709. 403 // RenderBlock having a BLOCK or BOX display. See https://bugs.webkit.or g/show_bug.cgi?id=56709.
405 return isAnonymous() && style()->display() == PARAGRAPH; 404 return isAnonymous() && style()->display() == PARAGRAPH;
406 } 405 }
407 406
408 bool isElementContinuation() const { return node() && node()->renderer() != this; }
409 bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); }
410 virtual RenderBoxModelObject* virtualContinuation() const { return 0; }
411
412 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione d(); } // absolute or fixed positioning 407 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione d(); } // absolute or fixed positioning
413 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re lative positioning 408 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re lative positioning
414 bool isPositioned() const { return m_bitfields.isPositioned(); } 409 bool isPositioned() const { return m_bitfields.isPositioned(); }
415 410
416 bool isText() const { return m_bitfields.isText(); } 411 bool isText() const { return m_bitfields.isText(); }
417 bool isBox() const { return m_bitfields.isBox(); } 412 bool isBox() const { return m_bitfields.isBox(); }
418 bool isInline() const { return m_bitfields.isInline(); } // inline object 413 bool isInline() const { return m_bitfields.isInline(); } // inline object
419 bool isDragging() const { return m_bitfields.isDragging(); } 414 bool isDragging() const { return m_bitfields.isDragging(); }
420 bool isReplaced() const { return m_bitfields.isReplaced(); } // a "replaced" element (see CSS) 415 bool isReplaced() const { return m_bitfields.isReplaced(); } // a "replaced" element (see CSS)
421 416
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 Node* generatingNode() const { return node(); } 495 Node* generatingNode() const { return node(); }
501 496
502 Document& document() const { return m_node->document(); } 497 Document& document() const { return m_node->document(); }
503 LocalFrame* frame() const { return document().frame(); } 498 LocalFrame* frame() const { return document().frame(); }
504 499
505 // Returns the object containing this one. Can be different from parent for positioned elements. 500 // Returns the object containing this one. Can be different from parent for positioned elements.
506 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped 501 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped
507 // is true if the renderer returned is an ancestor of paintInvalidationConta iner. 502 // is true if the renderer returned is an ancestor of paintInvalidationConta iner.
508 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const; 503 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const;
509 504
510 virtual RenderObject* hoverAncestor() const { return parent(); } 505 // FIXME(sky): Inline this
506 RenderObject* hoverAncestor() const { return parent(); }
511 507
512 Element* offsetParent() const; 508 Element* offsetParent() const;
513 509
514 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); 510 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0);
515 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0); 511 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0);
516 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining BlockChain, SubtreeLayoutScope* = 0); 512 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining BlockChain, SubtreeLayoutScope* = 0);
517 void clearNeedsLayout(); 513 void clearNeedsLayout();
518 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); 514 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0);
519 void setNeedsPositionedMovementLayout(); 515 void setNeedsPositionedMovementLayout();
520 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); 516 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in);
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 void showTree(const blink::RenderObject*); 1267 void showTree(const blink::RenderObject*);
1272 void showLineTree(const blink::RenderObject*); 1268 void showLineTree(const blink::RenderObject*);
1273 void showRenderTree(const blink::RenderObject* object1); 1269 void showRenderTree(const blink::RenderObject* object1);
1274 // We don't make object2 an optional parameter so that showRenderTree 1270 // We don't make object2 an optional parameter so that showRenderTree
1275 // can be called from gdb easily. 1271 // can be called from gdb easily.
1276 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1272 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1277 1273
1278 #endif 1274 #endif
1279 1275
1280 #endif // RenderObject_h 1276 #endif // 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