Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index 512cc75da1ae88b491bf368f156a884b82810cc0..b0afe11cf3ad4f2948a756ca972c01a4afc39771 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -1670,7 +1670,7 @@ void FrameView::updateLayersAndCompositingAfterScrollIfNeeded() |
} |
} |
-bool FrameView::computeCompositedSelectionBounds(LocalFrame& frame, CompositedSelectionBound& start, CompositedSelectionBound& end) |
+bool FrameView::computeCompositedSelectionBounds(LocalFrame& frame, CompositedSelectionBounds& bounds) |
{ |
const VisibleSelection &selection = frame.selection().selection(); |
if (!selection.isCaretOrRange()) |
@@ -1682,23 +1682,26 @@ bool FrameView::computeCompositedSelectionBounds(LocalFrame& frame, CompositedSe |
RenderedPosition renderedStart(visibleStart); |
RenderedPosition renderedEnd(visibleEnd); |
- renderedStart.positionInGraphicsLayerBacking(start); |
- if (!start.layer) |
+ renderedStart.positionInGraphicsLayerBacking(bounds.start); |
+ if (!bounds.start.layer) |
return false; |
- renderedEnd.positionInGraphicsLayerBacking(end); |
- if (!end.layer) |
+ renderedEnd.positionInGraphicsLayerBacking(bounds.end); |
+ if (!bounds.end.layer) |
return false; |
+ bounds.isEditable = selection.hasEditableStyle(); |
+ bounds.isUserTriggered = selection.(); |
+ |
if (selection.isCaret()) { |
- start.type = end.type = CompositedSelectionBound::Caret; |
+ bounds.start.type = bounds.end.type = CompositedSelectionBound::Caret; |
return true; |
} |
TextDirection startDir = visibleStart.deepEquivalent().primaryDirection(); |
TextDirection endDir = visibleEnd.deepEquivalent().primaryDirection(); |
- start.type = startDir == RTL ? CompositedSelectionBound::SelectionRight : CompositedSelectionBound::SelectionLeft; |
- end.type = endDir == RTL ? CompositedSelectionBound::SelectionLeft : CompositedSelectionBound::SelectionRight; |
+ bounds.start.type = startDir == RTL ? CompositedSelectionBound::SelectionRight : CompositedSelectionBound::SelectionLeft; |
+ bounds.end.type = endDir == RTL ? CompositedSelectionBound::SelectionLeft : CompositedSelectionBound::SelectionRight; |
return true; |
} |
@@ -1710,14 +1713,14 @@ void FrameView::updateCompositedSelectionBoundsIfNeeded() |
Page* page = frame().page(); |
ASSERT(page); |
- CompositedSelectionBound start, end; |
+ CompositedSelectionBounds bounds; |
LocalFrame* frame = toLocalFrame(page->focusController().focusedOrMainFrame()); |
- if (!frame || !computeCompositedSelectionBounds(*frame, start, end)) { |
+ if (!frame || !computeCompositedSelectionBounds(*frame, bounds)) { |
page->chrome().client().clearCompositedSelectionBounds(); |
return; |
} |
- page->chrome().client().updateCompositedSelectionBounds(start, end); |
+ page->chrome().client().updateCompositedSelectionBounds(bounds); |
} |
bool FrameView::isRubberBandInProgress() const |