- Revision
- 165750
- Author
- [email protected]
- Date
- 2014-03-17 13:19:24 -0700 (Mon, 17 Mar 2014)
Log Message
[Mac] getAttributedSubstringFromRange arguments are incorrectly named
https://bugs.webkit.org/show_bug.cgi?id=130349
Reviewed by Tim Horton.
There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
all, but now, let's at least name them correctly.
No behavior change.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getAttributedSubstringFromRange):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (165749 => 165750)
--- trunk/Source/WebKit2/ChangeLog 2014-03-17 20:10:12 UTC (rev 165749)
+++ trunk/Source/WebKit2/ChangeLog 2014-03-17 20:19:24 UTC (rev 165750)
@@ -1,3 +1,23 @@
+2014-03-17 Alexey Proskuryakov <[email protected]>
+
+ [Mac] getAttributedSubstringFromRange arguments are incorrectly named
+ https://bugs.webkit.org/show_bug.cgi?id=130349
+
+ Reviewed by Tim Horton.
+
+ There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
+ all, but now, let's at least name them correctly.
+
+ No behavior change.
+
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/mac/WebPageProxyMac.mm:
+ (WebKit::WebPageProxy::getAttributedSubstringFromRange):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::getAttributedSubstringFromRange):
+
2014-03-17 Tim Horton <[email protected]>
WKThumbnailView should support snapshots
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (165749 => 165750)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-03-17 20:10:12 UTC (rev 165749)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-03-17 20:19:24 UTC (rev 165750)
@@ -532,7 +532,7 @@
bool insertDictatedText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, const Vector<WebCore::TextAlternativeWithRange>& dictationAlternatives);
void getMarkedRange(uint64_t& location, uint64_t& length);
void getSelectedRange(uint64_t& location, uint64_t& length);
- void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
+ void getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString&);
uint64_t characterIndexForPoint(const WebCore::IntPoint);
WebCore::IntRect firstRectForCharacterRange(uint64_t, uint64_t);
bool executeKeypressCommands(const Vector<WebCore::KeypressCommand>&);
Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (165749 => 165750)
--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2014-03-17 20:10:12 UTC (rev 165749)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2014-03-17 20:19:24 UTC (rev 165750)
@@ -241,11 +241,11 @@
process().sendSync(Messages::WebPage::GetSelectedRange(), Messages::WebPage::GetSelectedRange::Reply(location, length), m_pageID);
}
-void WebPageProxy::getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString& result)
+void WebPageProxy::getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString& result)
{
if (!isValid())
return;
- process().sendSync(Messages::WebPage::GetAttributedSubstringFromRange(location, length), Messages::WebPage::GetAttributedSubstringFromRange::Reply(result), m_pageID);
+ process().sendSync(Messages::WebPage::GetAttributedSubstringFromRange(rangeStart, rangeEnd), Messages::WebPage::GetAttributedSubstringFromRange::Reply(result), m_pageID);
}
uint64_t WebPageProxy::characterIndexForPoint(const IntPoint point)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (165749 => 165750)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-03-17 20:10:12 UTC (rev 165749)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-03-17 20:19:24 UTC (rev 165750)
@@ -544,7 +544,7 @@
#endif
void getMarkedRange(uint64_t& location, uint64_t& length);
void getSelectedRange(uint64_t& location, uint64_t& length);
- void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
+ void getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString&);
void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
void executeKeypressCommands(const Vector<WebCore::KeypressCommand>&, bool& handled, EditorState& newState);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (165749 => 165750)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2014-03-17 20:10:12 UTC (rev 165749)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2014-03-17 20:19:24 UTC (rev 165750)
@@ -294,7 +294,7 @@
CancelComposition() -> (WebKit::EditorState newState)
GetMarkedRange() -> (uint64_t location, uint64_t length)
GetSelectedRange() -> (uint64_t location, uint64_t length)
- GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
+ GetAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd) -> (WebKit::AttributedString result)
CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (165749 => 165750)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2014-03-17 20:10:12 UTC (rev 165749)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2014-03-17 20:19:24 UTC (rev 165750)
@@ -347,7 +347,7 @@
}
}
-void WebPage::getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString& result)
+void WebPage::getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString& result)
{
Frame& frame = m_page->focusController().focusedOrMainFrame();
@@ -355,7 +355,7 @@
if (selection.isNone() || !selection.isContentEditable() || selection.isInPasswordField())
return;
- NSRange nsRange = NSMakeRange(location, length - location);
+ NSRange nsRange = NSMakeRange(rangeStart, rangeEnd - rangeStart);
RefPtr<Range> range = convertToRange(&frame, nsRange);
if (!range)
return;