Title: [101454] trunk/Source/WebKit2
- Revision
- 101454
- Author
- [email protected]
- Date
- 2011-11-30 00:11:24 -0800 (Wed, 30 Nov 2011)
Log Message
-[WKView attributedSubstringForProposedRange:actualRange:] doesn't update actualRange when it's out of bounds
https://bugs.webkit.org/show_bug.cgi?id=67813
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView attributedSubstringForProposedRange:actualRange:]): Update actualRange to match
result length.
(-[WKView firstRectForCharacterRange:actualRange:]): Added a FIXME. This is harder to
implement, and it's unclear if clients care at this time.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (101453 => 101454)
--- trunk/Source/WebKit2/ChangeLog 2011-11-30 08:07:45 UTC (rev 101453)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-30 08:11:24 UTC (rev 101454)
@@ -1,3 +1,16 @@
+2011-11-30 Alexey Proskuryakov <[email protected]>
+
+ -[WKView attributedSubstringForProposedRange:actualRange:] doesn't update actualRange when it's out of bounds
+ https://bugs.webkit.org/show_bug.cgi?id=67813
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView attributedSubstringForProposedRange:actualRange:]): Update actualRange to match
+ result length.
+ (-[WKView firstRectForCharacterRange:actualRange:]): Added a FIXME. This is harder to
+ implement, and it's unclear if clients care at this time.
+
2011-11-29 Sam Weinig <[email protected]>
Remove RetainPtr::releaseRef
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (101453 => 101454)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-11-30 08:07:45 UTC (rev 101453)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-11-30 08:11:24 UTC (rev 101454)
@@ -1513,8 +1513,10 @@
AttributedString result;
_data->_page->getAttributedSubstringFromRange(nsRange.location, NSMaxRange(nsRange), result);
- if (actualRange)
+ if (actualRange) {
*actualRange = nsRange;
+ actualRange->length = [result.string.get() length];
+ }
LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> \"%@\"", nsRange.location, nsRange.length, [result.string.get() string]);
return [[result.string.get() retain] autorelease];
@@ -1552,8 +1554,10 @@
if (window)
resultRect.origin = [window convertBaseToScreen:resultRect.origin];
- if (actualRange)
+ if (actualRange) {
+ // FIXME: Update actualRange to match the range of first rect.
*actualRange = theRange;
+ }
LOG(TextInput, "firstRectForCharacterRange:(%u, %u) -> (%f, %f, %f, %f)", theRange.location, theRange.length, resultRect.origin.x, resultRect.origin.y, resultRect.size.width, resultRect.size.height);
return resultRect;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes