Changeset 70997 in webkit
- Timestamp:
- Oct 31, 2010 1:20:42 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70981 r70997 1 2010-10-31 Darin Adler <darin@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Visited links not populated correctly in new web processes after the first 6 https://bugs.webkit.org/show_bug.cgi?id=48735 7 rdar://problem/8442177 8 9 * UIProcess/VisitedLinkProvider.cpp: 10 (WebKit::VisitedLinkProvider::VisitedLinkProvider): Initialize 11 m_webProcessHasVisitedLinkState. 12 (WebKit::VisitedLinkProvider::processDidFinishLaunching): Renamed 13 from populateVisitedLinksIfNeeded. Set m_webProcessHasVisitedLinkState 14 to false, since this is a new process, and also start the timer 15 so the visited links messages will be sent. 16 (WebKit::VisitedLinkProvider::processDidClose): Renamed from 17 stopVisitedLinksTimer. 18 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired): 19 Added logic so we send SetVisitedLinkTable and 20 AllVisitedLinkStateChanged once to each new process and to set 21 m_webProcessHasVisitedLinkState to true once that is done. 22 23 * UIProcess/VisitedLinkProvider.h: Updated for above changes. 24 25 * UIProcess/WebContext.cpp: 26 (WebKit::WebContext::processDidFinishLaunching): Called 27 VisitedLinkProvider function under its new name. Also used 28 ASSERT_UNUSED rather than ASSERT since the argument is used 29 only for the assertion. 30 (WebKit::WebContext::processDidClose): Ditto. 31 1 32 2010-10-30 Andreas Kling <kling@webkit.org> 2 33 -
trunk/WebKit2/UIProcess/VisitedLinkProvider.cpp
r70346 r70997 40 40 : m_context(context) 41 41 , m_visitedLinksPopulated(false) 42 , m_webProcessHasVisitedLinkState(false) 42 43 , m_keyCount(0) 43 44 , m_tableSize(0) … … 46 47 } 47 48 48 void VisitedLinkProvider::p opulateVisitedLinksIfNeeded()49 void VisitedLinkProvider::processDidFinishLaunching() 49 50 { 51 m_webProcessHasVisitedLinkState = false; 52 53 if (m_keyCount) 54 m_pendingVisitedLinksTimer.startOneShot(0); 55 50 56 if (m_visitedLinksPopulated) 51 57 return; … … 64 70 } 65 71 66 void VisitedLinkProvider:: stopVisitedLinksTimer()72 void VisitedLinkProvider::processDidClose() 67 73 { 68 74 m_pendingVisitedLinksTimer.stop(); … … 150 156 m_keyCount += pendingVisitedLinks.size(); 151 157 152 if ( currentTableSize != newTableSize) {158 if (!m_webProcessHasVisitedLinkState || currentTableSize != newTableSize) { 153 159 // Send the new visited link table. 154 160 … … 161 167 162 168 // We now need to let the web process know that we've added links. 163 if ( addedVisitedLinks.size() <= 20) {169 if (m_webProcessHasVisitedLinkState && addedVisitedLinks.size() <= 20) { 164 170 m_context->process()->send(Messages::WebProcess::VisitedLinkStateChanged(addedVisitedLinks), 0); 165 171 return; … … 168 174 // Just recalculate all the visited links. 169 175 m_context->process()->send(Messages::WebProcess::AllVisitedLinkStateChanged(), 0); 176 m_webProcessHasVisitedLinkState = true; 170 177 } 171 178 -
trunk/WebKit2/UIProcess/VisitedLinkProvider.h
r70346 r70997 42 42 explicit VisitedLinkProvider(WebContext*); 43 43 44 void populateVisitedLinksIfNeeded();45 44 void addVisitedLink(WebCore::LinkHash); 46 45 47 void stopVisitedLinksTimer(); 46 void processDidFinishLaunching(); 47 void processDidClose(); 48 48 49 49 private: … … 52 52 WebContext* m_context; 53 53 bool m_visitedLinksPopulated; 54 bool m_webProcessHasVisitedLinkState; 54 55 55 56 unsigned m_keyCount; -
trunk/WebKit2/UIProcess/WebContext.cpp
r70702 r70997 190 190 { 191 191 // FIXME: Once we support multiple processes per context, this assertion won't hold. 192 ASSERT (process == m_process);193 194 m_visitedLinkProvider.p opulateVisitedLinksIfNeeded();192 ASSERT_UNUSED(process, process == m_process); 193 194 m_visitedLinkProvider.processDidFinishLaunching(); 195 195 } 196 196 … … 198 198 { 199 199 // FIXME: Once we support multiple processes per context, this assertion won't hold. 200 ASSERT (process == m_process);201 202 m_visitedLinkProvider. stopVisitedLinksTimer();200 ASSERT_UNUSED(process, process == m_process); 201 202 m_visitedLinkProvider.processDidClose(); 203 203 204 204 m_process = 0;
Note: See TracChangeset
for help on using the changeset viewer.