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

Unified Diff: sky/engine/core/dom/Position.cpp

Issue 1068683002: Delete RenderBlockFlow. (Closed) Base URL: https://github.com/domokit/mojo.git@block
Patch Set: Remove unused float-related code instead of moving it. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/dom/PositionIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Position.cpp
diff --git a/sky/engine/core/dom/Position.cpp b/sky/engine/core/dom/Position.cpp
index 8cd1499aee4018567acf724217c029ee7fc34dab..980260f08f6eb2207ca631401517bf622b06753a 100644
--- a/sky/engine/core/dom/Position.cpp
+++ b/sky/engine/core/dom/Position.cpp
@@ -40,6 +40,7 @@
#include "sky/engine/core/rendering/InlineTextBox.h"
#include "sky/engine/core/rendering/RenderBlock.h"
#include "sky/engine/core/rendering/RenderInline.h"
+#include "sky/engine/core/rendering/RenderParagraph.h"
#include "sky/engine/core/rendering/RenderText.h"
#include "sky/engine/platform/Logging.h"
#include "sky/engine/wtf/text/CString.h"
@@ -802,8 +803,8 @@ bool Position::isCandidate() const
if (editingIgnoresContent(deprecatedNode()))
return (atFirstEditingPositionForNode() || atLastEditingPositionForNode()) && !nodeIsUserSelectNone(deprecatedNode()->parentNode());
- if (renderer->isRenderBlockFlow()) {
- if (toRenderBlock(renderer)->logicalHeight()) {
+ if (renderer->isRenderParagraph()) {
+ if (toRenderParagraph(renderer)->logicalHeight()) {
if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer))
return atFirstEditingPositionForNode() && !Position::nodeIsUserSelectNone(deprecatedNode());
return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary();
@@ -1003,7 +1004,7 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
if (!renderer->isText()) {
inlineBox = 0;
- if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isRenderBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
+ if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isRenderParagraph() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
// Try a visually equivalent position with possibly opposite editability. This helps in case |this| is in
// an editable block but surrounded by non-editable positions. It acts to negate the logic at the beginning
// of RenderObject::createVisiblePosition().
@@ -1151,7 +1152,7 @@ TextDirection Position::primaryDirection() const
{
TextDirection primaryDirection = LTR;
for (const RenderObject* r = m_anchorNode->renderer(); r; r = r->parent()) {
- if (r->isRenderBlockFlow()) {
+ if (r->isRenderParagraph()) {
primaryDirection = r->style()->direction();
break;
}
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/dom/PositionIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698