Bug 1102135 - When select word, bailed out if frame is not selectable. r=roc

This commit is contained in:
Morris Tseng 2014-11-27 23:57:00 +01:00
parent c02688e4f4
commit 6338d7697a

View File

@ -565,6 +565,12 @@ SelectionCarets::SelectWord()
return NS_OK; return NS_OK;
} }
bool selectable;
ptFrame->IsSelectable(&selectable, nullptr);
if (!selectable) {
return NS_OK;
}
nsPoint ptInFrame = mDownPoint; nsPoint ptInFrame = mDownPoint;
nsLayoutUtils::TransformPoint(rootFrame, ptFrame, ptInFrame); nsLayoutUtils::TransformPoint(rootFrame, ptFrame, ptInFrame);