| Index: Source/core/editing/Position.cpp
|
| diff --git a/Source/core/editing/Position.cpp b/Source/core/editing/Position.cpp
|
| index 21a7b184faf15c9020f6a598970f025a19661818..ef1893e6fa2b861b5c77ee16a73c22334ca3fcee 100644
|
| --- a/Source/core/editing/Position.cpp
|
| +++ b/Source/core/editing/Position.cpp
|
| @@ -28,13 +28,9 @@
|
|
|
| #include "core/dom/shadow/ElementShadow.h"
|
| #include "core/editing/EditingUtilities.h"
|
| -#include "core/editing/PositionIterator.h"
|
| #include "core/editing/TextAffinity.h"
|
| #include "core/editing/VisibleUnits.h"
|
| -#include "core/layout/LayoutBlock.h"
|
| -#include "core/layout/LayoutInline.h"
|
| -#include "core/layout/LayoutText.h"
|
| -#include "core/layout/line/InlineTextBox.h"
|
| +#include "core/layout/LayoutObject.h"
|
| #include "wtf/text/CString.h"
|
| #include <stdio.h>
|
|
|
| @@ -459,45 +455,6 @@ PositionAlgorithm<Strategy> PositionAlgorithm<Strategy>::downstream(EditingBound
|
| }
|
|
|
| template <typename Strategy>
|
| -static bool inRenderedTextAlgorithm(const PositionAlgorithm<Strategy>& position)
|
| -{
|
| - Node* const anchorNode = position.anchorNode();
|
| - if (!anchorNode || !anchorNode->isTextNode())
|
| - return false;
|
| -
|
| - LayoutObject* layoutObject = anchorNode->layoutObject();
|
| - if (!layoutObject)
|
| - return false;
|
| -
|
| - const int offsetInNode = position.computeEditingOffset();
|
| - LayoutText* textLayoutObject = toLayoutText(layoutObject);
|
| - for (InlineTextBox *box = textLayoutObject->firstTextBox(); box; box = box->nextTextBox()) {
|
| - if (offsetInNode < static_cast<int>(box->start()) && !textLayoutObject->containsReversedText()) {
|
| - // The offset we're looking for is before this node
|
| - // this means the offset must be in content that is
|
| - // not laid out. Return false.
|
| - return false;
|
| - }
|
| - if (box->containsCaretOffset(offsetInNode)) {
|
| - // Return false for offsets inside composed characters.
|
| - return offsetInNode == 0 || offsetInNode == textLayoutObject->nextOffset(textLayoutObject->previousOffset(offsetInNode));
|
| - }
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| -bool inRenderedText(const Position& position)
|
| -{
|
| - return inRenderedTextAlgorithm<EditingStrategy>(position);
|
| -}
|
| -
|
| -bool inRenderedText(const PositionInComposedTree& position)
|
| -{
|
| - return inRenderedTextAlgorithm<EditingInComposedTreeStrategy>(position);
|
| -}
|
| -
|
| -template <typename Strategy>
|
| void PositionAlgorithm<Strategy>::debugPosition(const char* msg) const
|
| {
|
| static const char* const anchorTypes[] = {
|
|
|