[Title] Selection mode on images is not working
[Issue#] WEB-3582
[Problem] Long tap on image with hyperlink and select
selection mode, selection mode is not wokring
[Cause] In this case there is a anchor tag and image tag
is child of anchor, but before image there is another
tag. Using this tag we create a selection range and
once the range is created we check if its not image and
extent the selection. This is not correct, we must
extend the selection even if there is image
[Solution] Removed the check to block extending seletion
when there is image tag
Change-Id: I6db5848ea72e14cdd7ee3789af6cf4c1995d9fb8
if (r && (r->isText() || r->isImage())) {
if (!range)
range = VisibleSelection::selectionFromContentsOfNode(childNode).toNormalizedRange();
- else if (!hitTestResult.image()) {
+ else {
RefPtr<Range> extendedRange = VisibleSelection::selectionFromContentsOfNode(childNode).toNormalizedRange();
range->setEnd(childNode, extendedRange->endOffset());
}