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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2709473003: Add internals.textAffinity (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/core/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index dc9440c2e30d3484e279a8c4a977016f5c3e3e2e..3283e38a36bb6ae7a3d941408e493a513613650d 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -913,6 +913,18 @@ ClientRect* Internals::absoluteCaretBounds(ExceptionState& exceptionState) {
return ClientRect::create(frame()->selection().absoluteCaretBounds());
}
+String Internals::textAffinity() {
+ if (frame()
+ ->page()
+ ->focusController()
+ .focusedFrame()
+ ->selection()
+ .affinity() == TextAffinity::Upstream) {
yosin_UTC9 2017/02/21 02:21:13 Could you write as: ->selection().selectionInDOMTr
yoichio 2017/02/21 04:38:22 Done.
+ return "Upstream";
+ }
+ return "Downstream";
+}
+
ClientRect* Internals::boundingBox(Element* element) {
DCHECK(element);
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698