Title: [179847] trunk/Source/WebKit2
- Revision
- 179847
- Author
- [email protected]
- Date
- 2015-02-09 15:19:20 -0800 (Mon, 09 Feb 2015)
Log Message
Selection flickers when trying to change size of selection.
https://bugs.webkit.org/show_bug.cgi?id=141404
rdar://problem/18824863
Reviewed by Benjamin Poulain.
When looking for the contracted range from the current range,
we were incorrectly choosing a selection whose rectangle is empty
as a best match candidate. This was throwing off all the logic
and producing a contracted range whose rectangle was bigger than the
expanded range, therefore producing a shrink threshold larger than the
growth one.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::contractedRangeFromHandle):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (179846 => 179847)
--- trunk/Source/WebKit2/ChangeLog 2015-02-09 23:19:20 UTC (rev 179846)
+++ trunk/Source/WebKit2/ChangeLog 2015-02-09 23:19:20 UTC (rev 179847)
@@ -1,3 +1,21 @@
+2015-02-09 Enrica Casucci <[email protected]>
+
+ Selection flickers when trying to change size of selection.
+ https://bugs.webkit.org/show_bug.cgi?id=141404
+ rdar://problem/18824863
+
+ Reviewed by Benjamin Poulain.
+
+ When looking for the contracted range from the current range,
+ we were incorrectly choosing a selection whose rectangle is empty
+ as a best match candidate. This was throwing off all the logic
+ and producing a contracted range whose rectangle was bigger than the
+ expanded range, therefore producing a shrink threshold larger than the
+ growth one.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::contractedRangeFromHandle):
+
2015-02-09 Brian J. Burg <[email protected]>
REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (179846 => 179847)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-02-09 23:19:20 UTC (rev 179846)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-02-09 23:19:20 UTC (rev 179847)
@@ -1274,8 +1274,10 @@
IntRect copyRect = selectionBoxForRange(newRange.get());
if (copyRect.isEmpty()) {
- bestRange = rangeForBlockAtPoint(testPoint);
- break;
+ // If the new range is an empty rectangle, we try the block at the current point
+ // and see if that has a rectangle that is a better choice.
+ newRange = rangeForBlockAtPoint(testPoint);
+ copyRect = selectionBoxForRange(newRange.get());
}
bool isBetterChoice;
switch (handlePosition) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes