Changeset 149471 in webkit
- Timestamp:
- May 1, 2013 6:09:18 PM (11 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/InRegionScroller.cpp
r147744 r149471 307 307 Platform::ScrollViewBase* selectionScrollView = firstScrollableInRegionForNode(node); 308 308 m_webPage->m_client->notifySelectionScrollView(selectionScrollView); 309 // if there's no subframe set an empty rect so that we default to the main frame.310 m_webPage->m_selectionHandler->setSelection ViewportRect(selectionScrollView ? WebCore::IntRect(selectionScrollView->documentViewportRect()) : WebCore::IntRect());309 // If there's no subframe set an empty rect so that we default to the main frame. 310 m_webPage->m_selectionHandler->setSelectionSubframeViewportRect(selectionScrollView ? WebCore::IntRect(selectionScrollView->documentViewportRect()) : WebCore::IntRect()); 311 311 } 312 312 -
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r149193 r149471 4433 4433 } 4434 4434 4435 void WebPage::setSelectionDocumentViewportSize(const Platform::IntSize& selectionDocumentViewportSize) 4436 { 4437 d->m_selectionHandler->setSelectionViewportSize(selectionDocumentViewportSize); 4438 } 4439 4435 4440 BackingStore* WebPage::backingStore() const 4436 4441 { -
trunk/Source/WebKit/blackberry/Api/WebPage.h
r149180 r149471 265 265 void setOverlayExpansionPixelHeight(int); 266 266 void setParagraphExpansionPixelScrollMargin(const Platform::IntSize&); 267 void setSelectionDocumentViewportSize(const Platform::IntSize&); 267 268 void selectionCancelled(); 268 269 bool selectionContainsDocumentPoint(const Platform::IntPoint&); -
trunk/Source/WebKit/blackberry/ChangeLog
r149412 r149471 1 2013-05-01 Iris Wu <shuwu@blackberry.com> 2 3 [BlackBerry] Upstream smart selection 4 https://bugs.webkit.org/show_bug.cgi?id=111226 5 6 Reviewed by Rob Buis. 7 8 Calling userInterfaceViewportAccessor()->documentViewportRect() on WK thread 9 caused crash. 10 But viewport from webkitThreadViewportAccessor uses unadjusted size which is 11 wrong for email. 12 The solution here is to get actual viewport size on UI thread and then pass it 13 to WebKit::SelectionHandler. 14 15 PR 333763 16 Reviewed Internally By Jakob Petsovits. 17 18 * Api/InRegionScroller.cpp: 19 (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView): 20 * Api/WebPage.cpp: 21 (BlackBerry::WebKit::WebPage::setSelectionDocumentViewportSize): 22 (WebKit): 23 * Api/WebPage.h: 24 * WebKitSupport/SelectionHandler.cpp: 25 (BlackBerry::WebKit::SelectionHandler::selectAtPoint): 26 (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible): 27 (BlackBerry::WebKit::SelectionHandler::selectionViewportRect): 28 * WebKitSupport/SelectionHandler.h: 29 (BlackBerry::WebKit::SelectionHandler::setSelectionViewportSize): 30 (BlackBerry::WebKit::SelectionHandler::setSelectionSubframeViewportRect): 31 (SelectionHandler): 32 1 33 2013-04-30 Genevieve Mak <gmak@rim.com> 2 34 -
trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
r148302 r149471 657 657 m_currentAnimationOverlayRegion = IntRectRegion(); 658 658 m_nextAnimationOverlayRegion = IntRectRegion(); 659 m_selection ViewportRect = WebCore::IntRect();659 m_selectionSubframeViewportRect = WebCore::IntRect(); 660 660 } 661 661 … … 797 797 798 798 // Scroll position adjustment here is based on main frame. If selecting in a subframe, don't do animation. 799 if (!m_selection ViewportRect.isEmpty())799 if (!m_selectionSubframeViewportRect.isEmpty()) 800 800 return false; 801 801 … … 830 830 WebCore::IntRect SelectionHandler::selectionViewportRect() const 831 831 { 832 if (m_selectionViewportRect.isEmpty()) { 833 WebCore::IntPoint scrollPosition = m_webPage->scrollPosition(); 834 WebCore::IntSize actualVisibleSize = m_webPage->client()->userInterfaceViewportAccessor()->documentViewportRect().size(); // viewport size for both Cascades and browser 835 return WebCore::IntRect(scrollPosition, actualVisibleSize); 836 } 837 return m_selectionViewportRect; 832 if (m_selectionSubframeViewportRect.isEmpty()) 833 return WebCore::IntRect(m_webPage->scrollPosition(), m_selectionViewportSize); 834 return m_selectionSubframeViewportRect; 838 835 } 839 836 -
trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
r148302 r149471 81 81 void setOverlayExpansionHeight(int dy) { m_overlayExpansionHeight = dy; } 82 82 void setParagraphExpansionScrollMargin(const WebCore::IntSize&); 83 void setSelectionViewportRect(const WebCore::IntRect& selectionViewportRect) { m_selectionViewportRect = selectionViewportRect; } 83 void setSelectionViewportSize(const WebCore::IntSize& selectionViewportSize) { m_selectionViewportSize = selectionViewportSize; } 84 void setSelectionSubframeViewportRect(const WebCore::IntRect& selectionSubframeViewportRect) { m_selectionSubframeViewportRect = selectionSubframeViewportRect; } 84 85 WebCore::IntRect selectionViewportRect() const; 85 86 … … 127 128 128 129 WebCore::IntSize m_scrollMargin; 129 WebCore::IntRect m_selectionViewportRect; 130 WebCore::IntSize m_selectionViewportSize; 131 WebCore::IntRect m_selectionSubframeViewportRect; 130 132 WebCore::VisibleSelection m_lastSelection; 131 133 };
Note: See TracChangeset
for help on using the changeset viewer.