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

Unified Diff: sky/engine/core/rendering/RenderObject.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderObject.cpp
diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
index f1ffdeb61182ecc84b1d38a02826ce1a8129e80a..1d85606838161ef4eebb8f1bf4aa09113806bbfc 100644
--- a/sky/engine/core/rendering/RenderObject.cpp
+++ b/sky/engine/core/rendering/RenderObject.cpp
@@ -52,6 +52,7 @@
#include "core/rendering/RenderInline.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderObjectInlines.h"
+#include "core/rendering/RenderParagraph.h"
#include "core/rendering/RenderText.h"
#include "core/rendering/RenderTheme.h"
#include "core/rendering/RenderView.h"
@@ -141,6 +142,8 @@ RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
case BLOCK:
case INLINE_BLOCK:
return new RenderBlockFlow(element);
+ case PARAGRAPH:
+ return new RenderParagraph(element);
case FLEX:
case INLINE_FLEX:
return new RenderFlexibleBox(element);
@@ -1645,21 +1648,13 @@ void RenderObject::selectionStartEnd(int& spos, int& epos) const
void RenderObject::handleDynamicFloatPositionChange()
{
+ // FIXME(sky): Inline this function.
+
// We have gone from not affecting the inline status of the parent flow to suddenly
// having an impact. See if there is a mismatch between the parent flow's
// childrenInline() state and our state.
setInline(style()->isDisplayInlineType());
- if (isInline() != parent()->childrenInline()) {
- if (!isInline())
- toRenderBoxModelObject(parent())->childBecameNonInline(this);
- else {
- // An anonymous block must be made to wrap this inline.
- RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock();
- RenderObjectChildList* childlist = parent()->virtualChildren();
- childlist->insertChildNode(parent(), block, this);
- block->children()->appendChildNode(block, childlist->removeChildNode(parent(), this));
- }
- }
+ ASSERT(isInline() == parent()->childrenInline());
}
StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698