Changeset 145553 in webkit


Ignore:
Timestamp:
Mar 12, 2013 8:57:01 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Notify client if the selection is in a subframe when started.
https://bugs.webkit.org/show_bug.cgi?id=112065

Patch by Genevieve Mak <gmak@rim.com> on 2013-03-12
Reviewed by Rob Buis.

PR #278490
Internally Reviewed by Mike Fenton.

  • Api/InRegionScroller.cpp:

(BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView):
(WebKit):

  • Api/InRegionScroller_p.h:

(InRegionScrollerPrivate):

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::updateSelectionScrollView):
(WebKit):

  • Api/WebPageClient.h:
  • Api/WebPage_p.h:

(WebPagePrivate):

  • WebKitSupport/SelectionHandler.cpp:

(BlackBerry::WebKit::SelectionHandler::cancelSelection):
(BlackBerry::WebKit::SelectionHandler::setSelection):

Location:
trunk/Source/WebKit/blackberry
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/InRegionScroller.cpp

    r145415 r145553  
    296296}
    297297
     298void InRegionScrollerPrivate::updateSelectionScrollView(const Node* node)
     299{
     300    // TODO: don't notify the client if the node didn't change.
     301    // Deleting the scrollview is handled by the client.
     302    m_webPage->m_client->notifySelectionScrollView(firstScrollableInRegionForNode(node));
     303}
     304
    298305Platform::ScrollViewBase* InRegionScrollerPrivate::firstScrollableInRegionForNode(const Node* node)
    299306{
  • trunk/Source/WebKit/blackberry/Api/InRegionScroller_p.h

    r145415 r145553  
    5454    void calculateInRegionScrollableAreasForPoint(const WebCore::IntPoint&);
    5555    const std::vector<Platform::ScrollViewBase*>& activeInRegionScrollableAreas() const;
    56     Platform::ScrollViewBase* firstScrollableInRegionForNode(const WebCore::Node*);
     56    void updateSelectionScrollView(const WebCore::Node*);
    5757
    5858    void clearDocumentData(const WebCore::Document*);
     
    6464
    6565private:
     66    Platform::ScrollViewBase* firstScrollableInRegionForNode(const WebCore::Node*);
    6667    bool setLayerScrollPosition(WebCore::RenderLayer*, const WebCore::IntPoint& scrollPosition);
    6768
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r144955 r145553  
    33123312}
    33133313
     3314void WebPagePrivate::updateSelectionScrollView(const Node* node)
     3315{
     3316    m_inRegionScroller->d->updateSelectionScrollView(node);
     3317}
     3318
    33143319void WebPagePrivate::updateDelegatedOverlays(bool dispatched)
    33153320{
  • trunk/Source/WebKit/blackberry/Api/WebPageClient.h

    r144955 r145553  
    160160    virtual void notifySelectionHandlesReversed() = 0;
    161161    virtual void notifyCaretChanged(const Platform::IntRect& documentCaretRect, bool userTouchTriggered, bool isSingleLineInput = false, const Platform::IntRect& singleLineDocumentBoundingBox = Platform::IntRect(), bool textFieldIsEmpty = false) = 0;
     162    virtual void notifySelectionScrollView(Platform::ScrollViewBase*) = 0;
    162163
    163164    virtual void cursorChanged(Platform::CursorType, const char* url, const Platform::IntPoint& hotSpotInImage) = 0;
  • trunk/Source/WebKit/blackberry/Api/WebPage_p.h

    r144750 r145553  
    323323    void selectionChanged(WebCore::Frame*);
    324324    void setOverlayExpansionPixelHeight(int);
     325    void updateSelectionScrollView(const WebCore::Node*);
    325326
    326327    void updateDelegatedOverlays(bool dispatched = false);
  • trunk/Source/WebKit/blackberry/ChangeLog

    r145534 r145553  
     12013-03-12  Genevieve Mak  <gmak@rim.com>
     2
     3        [BlackBerry] Notify client if the selection is in a subframe when started.
     4        https://bugs.webkit.org/show_bug.cgi?id=112065
     5
     6        Reviewed by Rob Buis.
     7
     8        PR #278490
     9        Internally Reviewed by Mike Fenton.
     10
     11        * Api/InRegionScroller.cpp:
     12        (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView):
     13        (WebKit):
     14        * Api/InRegionScroller_p.h:
     15        (InRegionScrollerPrivate):
     16        * Api/WebPage.cpp:
     17        (BlackBerry::WebKit::WebPagePrivate::updateSelectionScrollView):
     18        (WebKit):
     19        * Api/WebPageClient.h:
     20        * Api/WebPage_p.h:
     21        (WebPagePrivate):
     22        * WebKitSupport/SelectionHandler.cpp:
     23        (BlackBerry::WebKit::SelectionHandler::cancelSelection):
     24        (BlackBerry::WebKit::SelectionHandler::setSelection):
     25
    1262013-03-12  Alberto Garcia  <agarcia@igalia.com>
    227
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

    r145534 r145553  
    9292    m_webPage->m_client->notifySelectionDetailsChanged(SelectionDetails());
    9393
     94    m_webPage->updateSelectionScrollView(0);
     95
    9496    SelectionLog(Platform::LogLevelInfo, "SelectionHandler::cancelSelection");
    9597
     
    537539    }
    538540
     541    if (!controller->selection().isRange())
     542        m_webPage->updateSelectionScrollView(newSelection.visibleEnd().deepEquivalent().anchorNode());
     543
    539544    newSelection.setIsDirectional(true);
    540545
     
    849854        findNextAnimationOverlayRegion();
    850855
     856    if (granularity == WordGranularity)
     857        m_webPage->updateSelectionScrollView(selection.visibleEnd().deepEquivalent().anchorNode());
     858
    851859    return true;
    852860}
     
    916924    drawAnimationOverlay(regionForSelectionQuads(selection), false /* isExpandingOverlayAtConstantRate */, true /* isStartOfSelection */);
    917925    focusedFrame->selection()->setSelection(selection);
     926    m_webPage->updateSelectionScrollView(node);
    918927}
    919928
Note: See TracChangeset for help on using the changeset viewer.