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; |
} |