зеркало из https://github.com/mozilla/gecko-dev.git
Bug 623432 part 2 - Ignore scrollbars while drag-selecting content. r=tn
This commit is contained in:
Родитель
36610cc2fe
Коммит
c491890f51
|
@ -3553,17 +3553,17 @@ NS_IMETHODIMP nsFrame::HandleDrag(nsPresContext* aPresContext,
|
|||
MOZ_ASSERT(aEvent->mClass == eMouseEventClass,
|
||||
"HandleDrag can only handle mouse event");
|
||||
|
||||
bool selectable;
|
||||
IsSelectable(&selectable, nullptr);
|
||||
|
||||
nsIFrame* scrollbar =
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, nsGkAtoms::scrollbarFrame);
|
||||
if (!scrollbar) {
|
||||
// XXX Do we really need to exclude non-selectable content here?
|
||||
// GetContentOffsetsFromPoint can handle it just fine, although some
|
||||
// other stuff might not like it.
|
||||
if (!selectable)
|
||||
return NS_OK;
|
||||
// NOTE: DisplaySelection() returns SELECTION_OFF for non-selectable frames.
|
||||
if (DisplaySelection(aPresContext) == nsISelectionController::SELECTION_OFF) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
nsIPresShell *presShell = aPresContext->PresShell();
|
||||
|
||||
RefPtr<nsFrameSelection> frameselection = GetFrameSelection();
|
||||
|
|
Загрузка…
Ссылка в новой задаче