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

Unified Diff: Source/core/page/TouchAdjustment.cpp

Issue 1261653002: Move SelectionState out of LayoutObject and into Line Layout API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2 legit 5ever Created 5 years, 5 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/layout/line/RootInlineBox.cpp ('k') | Source/core/paint/EllipsisBoxPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/TouchAdjustment.cpp
diff --git a/Source/core/page/TouchAdjustment.cpp b/Source/core/page/TouchAdjustment.cpp
index 4fb4c09327669606a0a7c5af04b3a39725862d83..2bf87509748d8ef5f8c7f0acc2d57de3c2af3044 100644
--- a/Source/core/page/TouchAdjustment.cpp
+++ b/Source/core/page/TouchAdjustment.cpp
@@ -32,6 +32,7 @@
#include "core/layout/LayoutBox.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/LayoutText.h"
+#include "core/layout/api/SelectionState.h"
#include "core/style/ComputedStyle.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatQuad.h"
@@ -131,7 +132,7 @@ bool providesContextMenuItems(Node* node)
return true;
// Only the selected part of the layoutObject is a valid target, but this will be corrected in
// appendContextSubtargetsForNode.
- if (node->layoutObject()->selectionState() != LayoutObject::SelectionNone)
+ if (node->layoutObject()->selectionState() != SelectionNone)
return true;
}
return false;
@@ -185,24 +186,24 @@ static inline void appendContextSubtargetsForNode(Node* node, SubtargetGeometryL
lastOffset = offset;
}
} else {
- if (textLayoutObject->selectionState() == LayoutObject::SelectionNone)
+ if (textLayoutObject->selectionState() == SelectionNone)
return appendBasicSubtargetsForNode(node, subtargets);
// If selected, make subtargets out of only the selected part of the text.
int startPos, endPos;
switch (textLayoutObject->selectionState()) {
- case LayoutObject::SelectionInside:
+ case SelectionInside:
startPos = 0;
endPos = textLayoutObject->textLength();
break;
- case LayoutObject::SelectionStart:
+ case SelectionStart:
textLayoutObject->selectionStartEnd(startPos, endPos);
endPos = textLayoutObject->textLength();
break;
- case LayoutObject::SelectionEnd:
+ case SelectionEnd:
textLayoutObject->selectionStartEnd(startPos, endPos);
startPos = 0;
break;
- case LayoutObject::SelectionBoth:
+ case SelectionBoth:
textLayoutObject->selectionStartEnd(startPos, endPos);
break;
default:
« no previous file with comments | « Source/core/layout/line/RootInlineBox.cpp ('k') | Source/core/paint/EllipsisBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698