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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1531473004: Fix selection handles in vertical writing modes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply code review comments Created 4 years, 11 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index a81f7c15579ed5db9dc9e0cd00e22044bd265d46..07f9195602793404f08f8f0dbc75b863e52a8ef7 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1585,19 +1585,15 @@ bool FrameView::computeCompositedSelection(LocalFrame& frame, CompositedSelectio
VisiblePosition visibleStart(visibleSelection.visibleStart());
RenderedPosition renderedStart(visibleStart);
- renderedStart.positionInGraphicsLayerBacking(selection.start);
+ renderedStart.positionInGraphicsLayerBacking(selection.start, true);
if (!selection.start.layer)
return false;
- if (visibleSelection.isCaret()) {
- selection.end = selection.start;
- } else {
- VisiblePosition visibleEnd(visibleSelection.visibleEnd());
- RenderedPosition renderedEnd(visibleEnd);
- renderedEnd.positionInGraphicsLayerBacking(selection.end);
- if (!selection.end.layer)
- return false;
- }
+ VisiblePosition visibleEnd(visibleSelection.visibleEnd());
+ RenderedPosition renderedEnd(visibleEnd);
+ renderedEnd.positionInGraphicsLayerBacking(selection.end, false);
+ if (!selection.end.layer)
+ return false;
selection.type = visibleSelection.selectionType();
selection.isEditable = visibleSelection.isContentEditable();
@@ -1605,8 +1601,8 @@ bool FrameView::computeCompositedSelection(LocalFrame& frame, CompositedSelectio
if (HTMLTextFormControlElement* enclosingTextFormControlElement = enclosingTextFormControl(visibleSelection.rootEditableElement()))
selection.isEmptyTextFormControl = enclosingTextFormControlElement->value().isEmpty();
}
- selection.start.isTextDirectionRTL = primaryDirectionOf(*visibleSelection.start().anchorNode()) == RTL;
- selection.end.isTextDirectionRTL = primaryDirectionOf(*visibleSelection.end().anchorNode()) == RTL;
+ selection.start.isTextDirectionRTL |= primaryDirectionOf(*visibleSelection.start().anchorNode()) == RTL;
+ selection.end.isTextDirectionRTL |= primaryDirectionOf(*visibleSelection.end().anchorNode()) == RTL;
return true;
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/RenderedPosition.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698