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

Unified Diff: Source/core/editing/Position.cpp

Issue 1288873009: Move hasRenderedNonAnonymousDescendantsWithHeight() to VisibleUnits.cpp from Position.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-20T18:59:16 Created 5 years, 4 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 | « Source/core/editing/Position.h ('k') | Source/core/editing/VisibleUnits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Position.cpp
diff --git a/Source/core/editing/Position.cpp b/Source/core/editing/Position.cpp
index 332cf9d84587b6c3943dfcce73c8fe03a109a7d7..2bf3ceef08fdedb80042536c4c41131a1b455734 100644
--- a/Source/core/editing/Position.cpp
+++ b/Source/core/editing/Position.cpp
@@ -42,7 +42,6 @@
#include "core/layout/LayoutBlock.h"
#include "core/layout/LayoutInline.h"
#include "core/layout/LayoutText.h"
-#include "core/layout/line/InlineIterator.h"
#include "core/layout/line/InlineTextBox.h"
#include "wtf/text/CString.h"
#include <stdio.h>
@@ -528,27 +527,6 @@ PositionAlgorithm<Strategy> PositionAlgorithm<Strategy>::downstream(EditingBound
return mostBackwardCaretPosition(*this, rule);
}
-static int boundingBoxLogicalHeight(LayoutObject *o, const IntRect &rect)
-{
- return o->style()->isHorizontalWritingMode() ? rect.height() : rect.width();
-}
-
-// TODO(yosin) We should move |hasRenderedNonAnonymousDescendantsWithHeight|
-// to "VisibleUnits.cpp" to reduce |LayoutObject| dependency in "Position.cpp"
-bool hasRenderedNonAnonymousDescendantsWithHeight(LayoutObject* layoutObject)
-{
- LayoutObject* stop = layoutObject->nextInPreOrderAfterChildren();
- for (LayoutObject *o = layoutObject->slowFirstChild(); o && o != stop; o = o->nextInPreOrder()) {
- if (o->nonPseudoNode()) {
- if ((o->isText() && boundingBoxLogicalHeight(o, toLayoutText(o)->linesBoundingBox()))
- || (o->isBox() && toLayoutBox(o)->pixelSnappedLogicalHeight())
- || (o->isLayoutInline() && isEmptyInline(LineLayoutItem(o)) && boundingBoxLogicalHeight(o, toLayoutInline(o)->linesBoundingBox())))
- return true;
- }
- }
- return false;
-}
-
template <typename Strategy>
Node* PositionAlgorithm<Strategy>::rootUserSelectAllForNode(Node* node)
{
« no previous file with comments | « Source/core/editing/Position.h ('k') | Source/core/editing/VisibleUnits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698