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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 470883002: Add |WebTextDirection toWebTextDirection(TextDirection)|. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 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/web/WebPopupMenuImpl.cpp ('k') | public/web/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 1b3aa3ed31d52c0d60fd5fcf93ad07499d51043f..f8dc7383f629551522a827034a4c4b8fc571156e 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2430,8 +2430,8 @@ bool WebViewImpl::selectionTextDirection(WebTextDirection& start, WebTextDirecti
FrameSelection& selection = frame->selection();
if (!selection.toNormalizedRange())
return false;
- start = selection.start().primaryDirection() == RTL ? WebTextDirectionRightToLeft : WebTextDirectionLeftToRight;
- end = selection.end().primaryDirection() == RTL ? WebTextDirectionRightToLeft : WebTextDirectionLeftToRight;
+ start = toWebTextDirection(selection.start().primaryDirection());
+ end = toWebTextDirection(selection.end().primaryDirection());
return true;
}
« no previous file with comments | « Source/web/WebPopupMenuImpl.cpp ('k') | public/web/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698