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

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

Issue 1070233002: Remove dead code around anonymous renderers. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/dom/Position.h ('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 980260f08f6eb2207ca631401517bf622b06753a..f7fe53494c2e9a8a9858ed14886f02ee145e0d28 100644
--- a/sky/engine/core/dom/Position.cpp
+++ b/sky/engine/core/dom/Position.cpp
@@ -743,7 +743,7 @@ Position Position::downstream(EditingBoundaryCrossingRule rule) const
return lastVisible;
}
-bool Position::hasRenderedNonAnonymousDescendantsWithHeight(RenderObject* renderer)
+bool Position::hasRenderedDescendantsWithHeight(RenderObject* renderer)
{
RenderObject* stop = renderer->nextInPreOrderAfterChildren();
for (RenderObject *o = renderer->slowFirstChild(); o && o != stop; o = o->nextInPreOrder())
@@ -805,7 +805,7 @@ bool Position::isCandidate() const
if (renderer->isRenderParagraph()) {
if (toRenderParagraph(renderer)->logicalHeight()) {
- if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer))
+ if (!Position::hasRenderedDescendantsWithHeight(renderer))
return atFirstEditingPositionForNode() && !Position::nodeIsUserSelectNone(deprecatedNode());
return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary();
}
@@ -1004,7 +1004,7 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
if (!renderer->isText()) {
inlineBox = 0;
- if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isRenderParagraph() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
+ if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isRenderParagraph() && hasRenderedDescendantsWithHeight(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().
« no previous file with comments | « sky/engine/core/dom/Position.h ('k') | sky/engine/core/dom/PositionIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698