Changeset 165750 in webkit


Ignore:
Timestamp:
Mar 17, 2014 1:19:24 PM (10 years ago)
Author:
ap@apple.com
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):

Location:
trunk/Source/WebKit2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r165748 r165750  
     12014-03-17  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] getAttributedSubstringFromRange arguments are incorrectly named
     4        https://bugs.webkit.org/show_bug.cgi?id=130349
     5
     6        Reviewed by Tim Horton.
     7
     8        There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
     9        all, but now, let's at least name them correctly.
     10
     11        No behavior change.
     12
     13        * UIProcess/WebPageProxy.h:
     14        * UIProcess/mac/WebPageProxyMac.mm:
     15        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
     16        * WebProcess/WebPage/WebPage.h:
     17        * WebProcess/WebPage/WebPage.messages.in:
     18        * WebProcess/WebPage/mac/WebPageMac.mm:
     19        (WebKit::WebPage::getAttributedSubstringFromRange):
     20
    1212014-03-17  Tim Horton  <timothy_horton@apple.com>
    222
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r165748 r165750  
    533533    void getMarkedRange(uint64_t& location, uint64_t& length);
    534534    void getSelectedRange(uint64_t& location, uint64_t& length);
    535     void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
     535    void getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString&);
    536536    uint64_t characterIndexForPoint(const WebCore::IntPoint);
    537537    WebCore::IntRect firstRectForCharacterRange(uint64_t, uint64_t);
  • trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm

    r165356 r165750  
    242242}
    243243
    244 void WebPageProxy::getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString& result)
    245 {
    246     if (!isValid())
    247         return;
    248     process().sendSync(Messages::WebPage::GetAttributedSubstringFromRange(location, length), Messages::WebPage::GetAttributedSubstringFromRange::Reply(result), m_pageID);
     244void WebPageProxy::getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString& result)
     245{
     246    if (!isValid())
     247        return;
     248    process().sendSync(Messages::WebPage::GetAttributedSubstringFromRange(rangeStart, rangeEnd), Messages::WebPage::GetAttributedSubstringFromRange::Reply(result), m_pageID);
    249249}
    250250
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r165748 r165750  
    545545    void getMarkedRange(uint64_t& location, uint64_t& length);
    546546    void getSelectedRange(uint64_t& location, uint64_t& length);
    547     void getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString&);
     547    void getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString&);
    548548    void characterIndexForPoint(const WebCore::IntPoint point, uint64_t& result);
    549549    void firstRectForCharacterRange(uint64_t location, uint64_t length, WebCore::IntRect& resultRect);
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in

    r165748 r165750  
    295295    GetMarkedRange() -> (uint64_t location, uint64_t length)
    296296    GetSelectedRange() -> (uint64_t location, uint64_t length)
    297     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
     297    GetAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd) -> (WebKit::AttributedString result)
    298298    CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
    299299    FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

    r165356 r165750  
    348348}
    349349
    350 void WebPage::getAttributedSubstringFromRange(uint64_t location, uint64_t length, AttributedString& result)
     350void WebPage::getAttributedSubstringFromRange(uint64_t rangeStart, uint64_t rangeEnd, AttributedString& result)
    351351{
    352352    Frame& frame = m_page->focusController().focusedOrMainFrame();
     
    356356        return;
    357357
    358     NSRange nsRange = NSMakeRange(location, length - location);
     358    NSRange nsRange = NSMakeRange(rangeStart, rangeEnd - rangeStart);
    359359    RefPtr<Range> range = convertToRange(&frame, nsRange);
    360360    if (!range)
Note: See TracChangeset for help on using the changeset viewer.