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

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

Issue 729693003: First step at getting rid of anonymous blocks and continuations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review 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/RenderBox.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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 public: 320 public:
321 virtual bool isBoxModelObject() const { return false; } 321 virtual bool isBoxModelObject() const { return false; }
322 virtual bool isCanvas() const { return false; } 322 virtual bool isCanvas() const { return false; }
323 virtual bool isImage() const { return false; } 323 virtual bool isImage() const { return false; }
324 virtual bool isInlineBlock() const { return false; } 324 virtual bool isInlineBlock() const { return false; }
325 virtual bool isLayerModelObject() const { return false; } 325 virtual bool isLayerModelObject() const { return false; }
326 virtual bool isMedia() const { return false; } 326 virtual bool isMedia() const { return false; }
327 virtual bool isRenderBlock() const { return false; } 327 virtual bool isRenderBlock() const { return false; }
328 virtual bool isRenderBlockFlow() const { return false; } 328 virtual bool isRenderBlockFlow() const { return false; }
329 virtual bool isRenderParagraph() const { return false; }
329 virtual bool isRenderImage() const { return false; } 330 virtual bool isRenderImage() const { return false; }
330 virtual bool isRenderInline() const { return false; } 331 virtual bool isRenderInline() const { return false; }
331 virtual bool isRenderView() const { return false; } 332 virtual bool isRenderView() const { return false; }
332 virtual bool isWidget() const { return false; } 333 virtual bool isWidget() const { return false; }
333 334
334 bool isDocumentElement() const { return document().documentElement() == m_no de; } 335 bool isDocumentElement() const { return document().documentElement() == m_no de; }
335 336
336 bool everHadLayout() const { return m_bitfields.everHadLayout(); } 337 bool everHadLayout() const { return m_bitfields.everHadLayout(); }
337 338
338 bool childrenInline() const { return m_bitfields.childrenInline(); } 339 // FIXME(sky): Remove this concept.
340 bool childrenInline() const { return isRenderParagraph(); }
339 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } 341 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); }
340 342
341 bool alwaysCreateLineBoxesForRenderInline() const 343 bool alwaysCreateLineBoxesForRenderInline() const
342 { 344 {
343 ASSERT(isRenderInline()); 345 ASSERT(isRenderInline());
344 return m_bitfields.alwaysCreateLineBoxesForRenderInline(); 346 return m_bitfields.alwaysCreateLineBoxesForRenderInline();
345 } 347 }
346 void setAlwaysCreateLineBoxesForRenderInline(bool alwaysCreateLineBoxes) 348 void setAlwaysCreateLineBoxesForRenderInline(bool alwaysCreateLineBoxes)
347 { 349 {
348 ASSERT(isRenderInline()); 350 ASSERT(isRenderInline());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 { 395 {
394 return !isFlexibleBox(); 396 return !isFlexibleBox();
395 } 397 }
396 398
397 bool isAnonymous() const { return m_bitfields.isAnonymous(); } 399 bool isAnonymous() const { return m_bitfields.isAnonymous(); }
398 bool isAnonymousBlock() const 400 bool isAnonymousBlock() const
399 { 401 {
400 // This function is kept in sync with anonymous block creation condition s in 402 // This function is kept in sync with anonymous block creation condition s in
401 // RenderBlock::createAnonymousBlock(). This includes creating an anonym ous 403 // RenderBlock::createAnonymousBlock(). This includes creating an anonym ous
402 // RenderBlock having a BLOCK or BOX display. See https://bugs.webkit.or g/show_bug.cgi?id=56709. 404 // RenderBlock having a BLOCK or BOX display. See https://bugs.webkit.or g/show_bug.cgi?id=56709.
403 return isAnonymous() && style()->display() == BLOCK && style()->styleTyp e() == NOPSEUDO && isRenderBlock(); 405 return isAnonymous() && style()->display() == PARAGRAPH;
404 } 406 }
405 407
406 bool isElementContinuation() const { return node() && node()->renderer() != this; } 408 bool isElementContinuation() const { return node() && node()->renderer() != this; }
407 bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); } 409 bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); }
408 virtual RenderBoxModelObject* virtualContinuation() const { return 0; } 410 virtual RenderBoxModelObject* virtualContinuation() const { return 0; }
409 411
410 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione d(); } // absolute or fixed positioning 412 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione d(); } // absolute or fixed positioning
411 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re lative positioning 413 bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // re lative positioning
412 bool isPositioned() const { return m_bitfields.isPositioned(); } 414 bool isPositioned() const { return m_bitfields.isPositioned(); }
413 415
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 void showTree(const blink::RenderObject*); 1271 void showTree(const blink::RenderObject*);
1270 void showLineTree(const blink::RenderObject*); 1272 void showLineTree(const blink::RenderObject*);
1271 void showRenderTree(const blink::RenderObject* object1); 1273 void showRenderTree(const blink::RenderObject* object1);
1272 // We don't make object2 an optional parameter so that showRenderTree 1274 // We don't make object2 an optional parameter so that showRenderTree
1273 // can be called from gdb easily. 1275 // can be called from gdb easily.
1274 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1276 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1275 1277
1276 #endif 1278 #endif
1277 1279
1278 #endif // RenderObject_h 1280 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698