Changeset 131314 in webkit
- Timestamp:
- Oct 15, 2012 10:15:34 AM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/InRegionScroller.cpp
r129916 r131314 300 300 301 301 view->setCanBlitOnScroll(false); 302 303 BackingStoreClient* backingStoreClient = m_webPage->backingStoreClientForFrame(view->frame());304 if (backingStoreClient) {305 backingStoreClient->setIsClientGeneratedScroll(true);306 backingStoreClient->setIsScrollNotificationSuppressed(true);307 }308 309 302 view->setScrollPosition(scrollPosition); 310 311 if (backingStoreClient) {312 backingStoreClient->setIsClientGeneratedScroll(false);313 backingStoreClient->setIsScrollNotificationSuppressed(false);314 }315 303 316 304 } else { -
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r131257 r131314 2480 2480 } 2481 2481 2482 BackingStoreClient* WebPagePrivate::backingStoreClientForFrame(const Frame* frame) const 2483 { 2484 ASSERT(frame); 2485 BackingStoreClient* backingStoreClient = 0; 2486 if (m_backingStoreClientForFrameMap.contains(frame)) 2487 backingStoreClient = m_backingStoreClientForFrameMap.get(frame); 2488 return backingStoreClient; 2489 } 2490 2491 void WebPagePrivate::addBackingStoreClientForFrame(const Frame* frame, BackingStoreClient* client) 2492 { 2493 ASSERT(frame); 2494 ASSERT(client); 2495 m_backingStoreClientForFrameMap.add(frame, client); 2496 } 2497 2498 void WebPagePrivate::removeBackingStoreClientForFrame(const Frame* frame) 2499 { 2500 ASSERT(frame); 2501 if (m_backingStoreClientForFrameMap.contains(frame)) 2502 m_backingStoreClientForFrameMap.remove(frame); 2503 } 2504 2482 BackingStoreClient* WebPagePrivate::backingStoreClient() const 2483 { 2484 return m_backingStoreClient; 2485 } 2505 2486 2506 2487 void WebPagePrivate::clearDocumentData(const Document* documentGoingAway) … … 3126 3107 FrameLoader* loader = d->m_mainFrame->loader(); 3127 3108 3128 // Remove main frame's backing store client from the map3129 // to prevent FrameLoaderClientBlackyBerry::detachFromParent2(),3130 // which is called by loader->detachFromParent(), deleting it.3131 // We will delete it in ~WebPagePrivate().3132 // Reason: loader->detachFromParent() may ping back to backing store3133 // indirectly through ChromeClientBlackBerry::invalidateContentsAndWindow().3134 // see RIM PR #93256.3135 d->removeBackingStoreClientForFrame(d->m_mainFrame);3136 3137 3109 // Set m_mainFrame to 0 to avoid calls back in to the backingstore during webpage deletion. 3138 3110 d->m_mainFrame = 0; -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r131257 r131314 433 433 bool dispatchMouseEventToFullScreenPlugin(WebCore::PluginView*, const Platform::MouseEvent&); 434 434 435 BackingStoreClient* backingStoreClientForFrame(const WebCore::Frame*) const; 436 void addBackingStoreClientForFrame(const WebCore::Frame*, BackingStoreClient*); 437 void removeBackingStoreClientForFrame(const WebCore::Frame*); 435 BackingStoreClient* backingStoreClient() const; 438 436 439 437 void setParentPopup(WebCore::PagePopupBlackBerry* webPopup); -
trunk/Source/WebKit/blackberry/ChangeLog
r131305 r131314 1 2012-10-15 Antonio Gomes <agomes@rim.com> 2 3 [BlackBerry] Clean up BackingStoreClient (part II) 4 https://bugs.webkit.org/show_bug.cgi?id=99327 5 6 Reviewed by Yong Li. 7 8 Remove more unneeded BackingStoreClient <-> WebPageClient integration 9 methods: 10 - BackingStoreClient* backingStoreClientForFrame(...) 11 - void addBackingStoreClientForFrame(...) 12 - void removeBackingStoreClientForFrame(...) 13 14 Change places calling WPPriv::backingStoreClientForFrame to directly 15 access WPPriv::backingStoreClient instead, since only the main frame will 16 have a BackingStoreClient instance associated with it, and it is owned by 17 the WKPriv. 18 19 Remove non-mainframe only references to BackingStoreClient completely, 20 since it is dead code now. 21 22 * Api/InRegionScroller.cpp: 23 (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): 24 * Api/WebPage.cpp: 25 (BlackBerry::WebKit::WebPagePrivate::backingStoreClient): 26 (BlackBerry::WebKit::WebPage::destroy): 27 * Api/WebPage_p.h: 28 (WebPagePrivate): 29 * WebCoreSupport/ChromeClientBlackBerry.cpp: 30 (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll): 31 (WebCore::ChromeClientBlackBerry::scroll): 32 * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 33 (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage): 34 (WebCore::FrameLoaderClientBlackBerry::createFrame): 35 (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2): 36 * WebKitSupport/BackingStoreClient.cpp: 37 (BlackBerry::WebKit::BackingStoreClient::create): 38 (BlackBerry::WebKit::BackingStoreClient::BackingStoreClient): 39 (BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient): 40 * WebKitSupport/BackingStoreClient.h: 41 (BackingStoreClient): 42 * WebKitSupport/InputHandler.cpp: 43 (BlackBerry::WebKit::InputHandler::setBatchEditingActive): 44 1 45 2012-10-15 Antonio Gomes <agomes@rim.com> 2 46 -
trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
r130400 r131314 586 586 invalidateContentsAndRootView(updateRect, true /*immediate*/); 587 587 else { 588 BackingStoreClient* backingStoreClient ForFrame = m_webPagePrivate->backingStoreClientForFrame(m_webPagePrivate->m_mainFrame);589 ASSERT(backingStoreClient ForFrame);590 backingStoreClient ForFrame->checkOriginOfCurrentScrollOperation();588 BackingStoreClient* backingStoreClient = m_webPagePrivate->backingStoreClient(); 589 ASSERT(backingStoreClient); 590 backingStoreClient->checkOriginOfCurrentScrollOperation(); 591 591 592 592 m_webPagePrivate->m_backingStore->d->slowScroll(delta, updateRect, immediate); … … 602 602 return; 603 603 604 BackingStoreClient* backingStoreClient ForFrame = m_webPagePrivate->backingStoreClientForFrame(m_webPagePrivate->m_mainFrame);605 ASSERT(backingStoreClient ForFrame);606 backingStoreClient ForFrame->checkOriginOfCurrentScrollOperation();604 BackingStoreClient* backingStoreClient = m_webPagePrivate->backingStoreClient(); 605 ASSERT(backingStoreClient); 606 backingStoreClient->checkOriginOfCurrentScrollOperation(); 607 607 608 608 m_webPagePrivate->m_backingStore->d->scroll(delta, scrollViewRect, clipRect); -
trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
r129924 r131314 436 436 // so we suspend and resume screen update to make sure we do not get a invalid FrameView 437 437 // state. 438 BackingStoreClient* backingStoreClientForFrame = m_webPagePrivate->backingStoreClientForFrame(m_frame); 439 if (backingStoreClientForFrame) 440 backingStoreClientForFrame->backingStore()->d->suspendScreenAndBackingStoreUpdates(); 438 if (isMainFrame() && m_webPagePrivate->backingStoreClient()) 439 m_webPagePrivate->backingStoreClient()->backingStore()->d->suspendScreenAndBackingStoreUpdates(); 441 440 442 441 // We are navigating away from this document, so clean up any footprint we might have. … … 457 456 true); /* lock the mode */ 458 457 459 if (backingStoreClientForFrame) 460 backingStoreClientForFrame->backingStore()->d->resumeScreenAndBackingStoreUpdates(BackingStore::None); 458 if (isMainFrame() && m_webPagePrivate->backingStoreClient()) 459 m_webPagePrivate->backingStoreClient()->backingStore()->d->resumeScreenAndBackingStoreUpdates(BackingStore::None); 460 461 461 m_frame->view()->updateCanHaveScrollbars(); 462 462 … … 788 788 return 0; 789 789 790 BackingStoreClient::create(childFrame.get(), m_frame, m_webPagePrivate->m_webPage);791 792 790 m_frame->loader()->loadURLIntoChildFrame(url, referrer, childFrame.get()); 793 791 … … 957 955 void FrameLoaderClientBlackBerry::detachedFromParent2() 958 956 { 959 BackingStoreClient* backingStoreClientForFrame = m_webPagePrivate->backingStoreClientForFrame(m_frame);960 if (backingStoreClientForFrame) {961 delete backingStoreClientForFrame;962 backingStoreClientForFrame = 0;963 }964 965 957 if (m_frame->document()) 966 958 m_webPagePrivate->clearDocumentData(m_frame->document()); -
trunk/Source/WebKit/blackberry/WebKitSupport/BackingStoreClient.cpp
r131305 r131314 52 52 BackingStoreClient* BackingStoreClient::create(Frame* frame, Frame* parentFrame, WebPage* parentPage) 53 53 { 54 ASSERT(parentPage); 55 ASSERT(frame->view()); 56 57 // FIXME: We do not support inner frames for now. 58 if (parentFrame) 59 return 0; 60 61 BackingStoreClient* parentBackingStoreClient 62 = parentFrame 63 ? parentPage->d->backingStoreClientForFrame(parentFrame) 64 : 0; 65 66 // If this frame has a parent with no backingstore then just stop since 67 // our frame heirarchy is done. 68 if (parentFrame && !parentBackingStoreClient) 69 return 0; 70 71 BackingStoreClient* it = new BackingStoreClient(frame, parentFrame, parentPage); 72 ASSERT(it); 73 74 // Frame -> BackingStoreClient mapping is controlled by the Page. 75 parentPage->d->addBackingStoreClientForFrame(frame, it); 76 77 // Add the backing store client to the child list of its parent. 78 if (parentBackingStoreClient) 79 parentBackingStoreClient->addChild(it); 80 54 ASSERT(!parentFrame); 55 BackingStoreClient* it = new BackingStoreClient(frame, parentPage); 81 56 return it; 82 57 } 83 58 84 BackingStoreClient::BackingStoreClient(Frame* frame, Frame* parentFrame,WebPage* parentPage)59 BackingStoreClient::BackingStoreClient(Frame* frame, WebPage* parentPage) 85 60 : m_frame(frame) 86 61 , m_webPage(parentPage) 87 62 , m_backingStore(0) 88 , m_parent(0)89 63 , m_isClientGeneratedScroll(false) 90 64 , m_isScrollNotificationSuppressed(false) 91 65 { 92 UNUSED_PARAM(parentFrame);93 66 m_backingStore = new BackingStore(m_webPage, this); 94 67 } … … 96 69 BackingStoreClient::~BackingStoreClient() 97 70 { 98 m_webPage->d->removeBackingStoreClientForFrame(m_frame);99 100 71 delete m_backingStore; 101 72 m_backingStore = 0; 102 73 m_frame = 0; 103 }104 105 void BackingStoreClient::addChild(BackingStoreClient* child)106 {107 ASSERT(child);108 child->m_parent = this;109 }110 111 WTF::Vector <BackingStoreClient*> BackingStoreClient::children() const112 {113 WTF::Vector<BackingStoreClient*> children;114 for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {115 BlackBerry::WebKit::BackingStoreClient* client =116 m_webPage->d->backingStoreClientForFrame(child);117 118 if (client)119 children.append(client);120 }121 122 return children;123 74 } 124 75 -
trunk/Source/WebKit/blackberry/WebKitSupport/BackingStoreClient.h
r120463 r131314 45 45 WebCore::Frame* frame() const { return m_frame; } 46 46 bool isMainFrame() const { return m_frame == m_webPage->d->m_mainFrame; } 47 48 void addChild(BackingStoreClient* child);49 WTF::Vector <BackingStoreClient*> children() const;50 BackingStoreClient* parent() const { return m_parent; }51 47 52 48 WebCore::IntPoint absoluteLocation() const; … … 105 101 106 102 private: 107 BackingStoreClient(WebCore::Frame*, Web Core::Frame* parentFrame, WebPage* parentPage);103 BackingStoreClient(WebCore::Frame*, WebPage* parentPage); 108 104 109 105 WebCore::Frame* m_frame; 110 106 WebPage* m_webPage; 111 107 BackingStore* m_backingStore; 112 BackingStoreClient* m_parent;113 108 bool m_isClientGeneratedScroll; 114 109 bool m_isScrollNotificationSuppressed; -
trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
r130990 r131314 1746 1746 // FIXME switch this to m_currentFocusElement->document()->frame() when we have separate 1747 1747 // backingstore for each frame. 1748 BackingStoreClient* backingStoreClient ForFrame = m_webPage->backingStoreClientForFrame(m_webPage->mainFrame());1749 ASSERT(backingStoreClient ForFrame);1748 BackingStoreClient* backingStoreClient = m_webPage->backingStoreClient(); 1749 ASSERT(backingStoreClient); 1750 1750 1751 1751 // Enable / Disable the backingstore to prevent visual updates. 1752 1752 if (!active) 1753 backingStoreClient ForFrame->backingStore()->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);1753 backingStoreClient->backingStore()->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit); 1754 1754 else 1755 backingStoreClient ForFrame->backingStore()->suspendScreenAndBackingStoreUpdates();1755 backingStoreClient->backingStore()->suspendScreenAndBackingStoreUpdates(); 1756 1756 1757 1757 return true;
Note: See TracChangeset
for help on using the changeset viewer.