RESOLVED FIXED 134466
REGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org
https://bugs.webkit.org/show_bug.cgi?id=134466
Summary REGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org
Enrica Casucci
Reported 2014-06-30 15:57:18 PDT
This bugs track a number of issues in block selections in WK2: - incorrect block detections shrinking a block selection - crashes when extending a selection across frame boundaries - bugs in switching from text to block selection. <rdar://problem/16817263>
Attachments
Patch (8.24 KB, patch)
2014-06-30 16:44 PDT, Enrica Casucci
benjamin: review+
benjamin: commit-queue-
Enrica Casucci
Comment 1 2014-06-30 16:44:34 PDT
Benjamin Poulain
Comment 2 2014-06-30 17:00:17 PDT
Comment on attachment 234117 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234117&action=review > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:760 > + // Make sure the block is selectable. Probably not useful. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:764 > + if (renderer->childrenInline() && (renderer->isRenderBlock() && toRenderBlock(renderer)->inlineElementContinuation() == nil) && !renderer->isTable()) { This "== nil" probably comes from UIKit, you can update this to the WebKit style. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:770 > + // If all we could find is a block whose height is veriy close to the height Typo: "veriy" > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:772 > + const float factor = .97; Maybe find a better name for this? > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:774 > + boundingRectInScrollViewCoordinates.scale(m_page->pageScaleFactor()); This is unlikely correct. The absoluteBoundingBoxRect and unobscuredContentRect should be in the same coordinate system already. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:776 > + if (boundingRectInScrollViewCoordinates.height() > m_page->mainFrame().view()->unobscuredContentRect().height() * factor) You may want to use the exposedContentRect() here to make the behavior more predictable. Otherwise the behavior would change depending if the bars are in or out. It probably does not matter much. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1258 > - newRange = Range::create(newRange->startContainer()->document(), newRange->startPosition(), currentRange->endPosition()); > + newRange = Range::create(newRange->startContainer()->document(), newRange->endPosition(), currentRange->endPosition()); > else > - newRange = Range::create(newRange->startContainer()->document(), currentRange->startPosition(), newRange->endPosition()); > + newRange = Range::create(newRange->startContainer()->document(), currentRange->startPosition(), newRange->startPosition()); Can you add an explanation for this fix in the ChangeLog?
Enrica Casucci
Comment 3 2014-06-30 17:28:05 PDT
Committed revision 170620.
Note You need to log in before you can comment on or make changes to this bug.