Changeset 116712 in webkit
- Timestamp:
- May 10, 2012 5:42:34 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 3 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116711 r116712 1 2012-05-10 Michael Nordman <michaeln@google.com> 2 3 [chromium] DomStorage events handling needs TLC (2) 4 https://bugs.webkit.org/show_bug.cgi?id=85221 5 Alter the StorageArea virtual interface such that the mutators no longer 6 return old values. This is to allow implementations of the interface to operate 7 more asynchronously. 8 9 Reviewed by Adam Barth. 10 11 No new tests. Existing tests cover this. 12 13 * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values 14 * storage/StorageAreaImpl.cpp: 15 (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame): removed an unneeded PLATFORM(CHROMIUM) guard 16 (WebCore::StorageAreaImpl::setItem): no longer return the old value 17 (WebCore::StorageAreaImpl::removeItem): no longer return the old value 18 (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared 19 * storage/StorageAreaImpl.h: match StorageArea's virtual interface 20 1 21 2012-05-10 Beth Dakin <bdakin@apple.com> 2 22 -
trunk/Source/WebCore/storage/StorageArea.h
r99439 r116712 50 50 virtual String key(unsigned index, Frame* sourceFrame) const = 0; 51 51 virtual String getItem(const String& key, Frame* sourceFrame) const = 0; 52 virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame) = 0;53 virtual StringremoveItem(const String& key, Frame* sourceFrame) = 0;54 virtual boolclear(Frame* sourceFrame) = 0;52 virtual void setItem(const String& key, const String& value, ExceptionCode&, Frame* sourceFrame) = 0; 53 virtual void removeItem(const String& key, Frame* sourceFrame) = 0; 54 virtual void clear(Frame* sourceFrame) = 0; 55 55 virtual bool contains(const String& key, Frame* sourceFrame) const = 0; 56 56 -
trunk/Source/WebCore/storage/StorageAreaImpl.cpp
r104257 r116712 103 103 bool StorageAreaImpl::disabledByPrivateBrowsingInFrame(const Frame* frame) const 104 104 { 105 #if PLATFORM(CHROMIUM)106 // The frame pointer can be NULL in Chromium since this call is made in a different107 // process from where the Frame object exists. Luckily, private browseing is108 // implemented differently in Chromium, so it'd never return true anyway.109 ASSERT(!frame);110 return false;111 #else112 105 if (!frame->page()) 113 106 return true; … … 117 110 return true; 118 111 return !SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing(frame->document()->securityOrigin()->protocol()); 119 #endif120 112 } 121 113 … … 144 136 } 145 137 146 StringStorageAreaImpl::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)138 void StorageAreaImpl::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame) 147 139 { 148 140 ASSERT(!m_isShutdown); … … 152 144 if (disabledByPrivateBrowsingInFrame(frame)) { 153 145 ec = QUOTA_EXCEEDED_ERR; 154 return String();146 return; 155 147 } 156 148 … … 163 155 if (quotaException) { 164 156 ec = QUOTA_EXCEEDED_ERR; 165 return oldValue;157 return; 166 158 } 167 159 168 160 if (oldValue == value) 169 return oldValue;161 return; 170 162 171 163 if (m_storageAreaSync) 172 164 m_storageAreaSync->scheduleItemForSync(key, value); 173 165 StorageEventDispatcher::dispatch(key, oldValue, value, m_storageType, m_securityOrigin.get(), frame); 174 return oldValue; 175 } 176 177 String StorageAreaImpl::removeItem(const String& key, Frame* frame) 166 } 167 168 void StorageAreaImpl::removeItem(const String& key, Frame* frame) 178 169 { 179 170 ASSERT(!m_isShutdown); … … 181 172 182 173 if (disabledByPrivateBrowsingInFrame(frame)) 183 return String();174 return; 184 175 185 176 String oldValue; … … 189 180 190 181 if (oldValue.isNull()) 191 return oldValue;182 return; 192 183 193 184 if (m_storageAreaSync) 194 185 m_storageAreaSync->scheduleItemForSync(key, String()); 195 186 StorageEventDispatcher::dispatch(key, oldValue, String(), m_storageType, m_securityOrigin.get(), frame); 196 return oldValue; 197 } 198 199 bool StorageAreaImpl::clear(Frame* frame) 187 } 188 189 void StorageAreaImpl::clear(Frame* frame) 200 190 { 201 191 ASSERT(!m_isShutdown); … … 203 193 204 194 if (disabledByPrivateBrowsingInFrame(frame)) 205 return false;195 return; 206 196 207 197 if (!m_storageMap->length()) 208 return false;198 return; 209 199 210 200 unsigned quota = m_storageMap->quota(); … … 214 204 m_storageAreaSync->scheduleClear(); 215 205 StorageEventDispatcher::dispatch(String(), String(), String(), m_storageType, m_securityOrigin.get(), frame); 216 return true;217 206 } 218 207 -
trunk/Source/WebCore/storage/StorageAreaImpl.h
r99439 r116712 47 47 virtual String key(unsigned index, Frame* sourceFrame) const; 48 48 virtual String getItem(const String& key, Frame* sourceFrame) const; 49 virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);50 virtual StringremoveItem(const String& key, Frame* sourceFrame);51 virtual boolclear(Frame* sourceFrame);49 virtual void setItem(const String& key, const String& value, ExceptionCode&, Frame* sourceFrame); 50 virtual void removeItem(const String& key, Frame* sourceFrame); 51 virtual void clear(Frame* sourceFrame); 52 52 virtual bool contains(const String& key, Frame* sourceFrame) const; 53 53 -
trunk/Source/WebKit/chromium/ChangeLog
r116709 r116712 1 2012-05-10 Michael Nordman <michaeln@google.com> 2 3 [chromium] DomStorage events handling needs TLC (2) 4 https://bugs.webkit.org/show_bug.cgi?id=85221 5 Alter the WebStorageArea virtual interface such that the mutators no longer 6 return old values. This is to allow implementations of the interface to operate 7 more asynchronously. 8 9 Also clean up from the last patch, remove support for the DEPRECATED event 10 dispatching API. 11 12 Reviewed by Adam Barth. 13 14 * WebKit.gyp: delete three files indicated below 15 * public/WebStorageArea.h: 16 (WebKit::WebStorageArea::setItem): no longer returns the old value 17 (WebKit::WebStorageArea::removeItem): no longer returns the old value 18 (WebKit::WebStorageArea::clear): no longer returns a bool indicated if something was cleared 19 * public/WebStorageEventDispatcher.h: removed the DEPRECATED instance methods 20 * public/WebStorageNamespace.h: removed the DEPRECATED close() method 21 * public/platform/WebKitPlatformSupport.h: removed the DEPRECATED dispatchStorageEvent() method 22 * src/StorageAreaProxy.cpp: removed the DEPREACTED storageEvent() method 23 (WebCore::StorageAreaProxy::setItem): no return value 24 (WebCore::StorageAreaProxy::removeItem): no return value 25 (WebCore::StorageAreaProxy::clear): no return value 26 (WebCore::StorageAreaProxy::dispatchLocalStorageEvent): remove an early return thats no longer needed 27 (WebCore::findPageWithSessionStorageNamespace): switched to passing pageGroup by ptr value instead of by name 28 (WebCore::StorageAreaProxy::dispatchSessionStorageEvent): remove an early return thats no longer needed 29 * src/StorageAreaProxy.h: 30 (WebCore): 31 (StorageAreaProxy): 32 * src/StorageEventDispatcherImpl.cpp: Deleted the file. 33 * src/StorageEventDispatcherImpl.h: Deleted the file. 34 * src/WebStorageEventDispatcherImpl.cpp: Deleted the DEPRECATED instance methods. 35 (WebKit::WebStorageEventDispatcher::dispatchLocalStorageEvent): use WebViewImpl::defaultPageGroup 36 (WebKit::WebStorageEventDispatcher::dispatchSessionStorageEvent): use WebViewImpl::defaultPageGroup 37 * src/WebStorageEventDispatcherImpl.h: Deleted the file. 38 * src/WebViewImpl.cpp: added a static method to retrieve a ptr to the default page group, 39 (WebKit::WebViewImpl::defaultPageGroup): 40 * src/WebViewImpl.h: 41 42 1 43 2012-05-10 Anders Carlsson <andersca@apple.com> 2 44 -
trunk/Source/WebKit/chromium/WebKit.gyp
r116641 r116712 474 474 'src/StorageAreaProxy.cpp', 475 475 'src/StorageAreaProxy.h', 476 'src/StorageEventDispatcherImpl.cpp',477 'src/StorageEventDispatcherImpl.h',478 476 'src/StorageInfoChromium.cpp', 479 477 'src/StorageNamespaceProxy.cpp', … … 653 651 'src/WebSpeechRecognitionResult.cpp', 654 652 'src/WebStorageEventDispatcherImpl.cpp', 655 'src/WebStorageEventDispatcherImpl.h',656 653 'src/WebStorageQuotaCallbacksImpl.cpp', 657 654 'src/WebStorageQuotaCallbacksImpl.h', -
trunk/Source/WebKit/chromium/public/WebStorageArea.h
r101122 r116712 39 39 class WebURL; 40 40 41 // In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This42 // class wraps a StorageArea. All the methods have obvious connections to the spec:43 // http://dev.w3.org/html5/webstorage/44 41 class WebStorageArea { 45 42 public: … … 64 61 65 62 // Set the value that corresponds to a specific key. Result will either be ResultOK 66 // or some particular error. The value is NOT set when there's an error. urlis the63 // or some particular error. The value is NOT set when there's an error. |pageUrl| is the 67 64 // url that should be used if a storage event fires. 65 virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& pageUrl, Result& result) 66 { 67 WebString unused; 68 setItem(key, newValue, pageUrl, result, unused); 69 } 70 71 72 // Remove the value associated with a particular key. |pageUrl| is the url that should be used 73 // if a storage event fires. 74 virtual void removeItem(const WebString& key, const WebURL& pageUrl) 75 { 76 WebString unused; 77 removeItem(key, pageUrl, unused); 78 } 79 80 // Clear all key/value pairs. |pageUrl| is the url that should be used if a storage event fires. 81 virtual void clear(const WebURL& pageUrl) 82 { 83 bool unused; 84 clear(pageUrl, unused); 85 } 86 87 // DEPRECATED - being replaced by the async variants above which do not return oldValues or block until completion. 68 88 virtual void setItem(const WebString& key, const WebString& newValue, const WebURL&, Result&, WebString& oldValue) = 0; 69 70 // Remove the value associated with a particular key. url is the url that should be used 71 // if a storage event fires. 72 virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue) = 0; 73 74 // Clear all key/value pairs. url is the url that should be used if a storage event fires. 75 virtual void clear(const WebURL& url, bool& somethingCleared) = 0; 89 virtual void removeItem(const WebString& key, const WebURL& pageUrl, WebString& oldValue) = 0; 90 virtual void clear(const WebURL& pageUrl, bool& somethingCleared) = 0; 76 91 }; 77 92 -
trunk/Source/WebKit/chromium/public/WebStorageEventDispatcher.h
r114993 r116712 56 56 WebStorageArea* sourceAreaInstance, bool originatedInProcess); 57 57 58 // DEPRECATED - The instance methods are going away soon in favor 59 // of the two static dispatch methods above. 60 WEBKIT_EXPORT static WebStorageEventDispatcher* create(); 61 virtual ~WebStorageEventDispatcher() { } 62 virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue, 63 const WebString& newValue, const WebString& origin, 64 const WebURL& url, bool isLocalStorage) = 0; 58 private: 59 WebStorageEventDispatcher() { } 65 60 }; 66 61 -
trunk/Source/WebKit/chromium/public/WebStorageNamespace.h
r114993 r116712 56 56 // Returns true of the two instances represent the same storage namespace. 57 57 virtual bool isSameNamespace(const WebStorageNamespace&) const { return false; } 58 59 // DEPRECATED60 virtual void close() { }61 58 }; 62 59 -
trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
r116566 r116712 88 88 // Return a LocalStorage namespace that corresponds to the following path. 89 89 virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; } 90 91 // DEPRECATED92 virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,93 const WebString& newValue, const WebString& origin,94 const WebURL& url, bool isLocalStorage) { }95 90 96 91 -
trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp
r114993 r116712 81 81 } 82 82 83 StringStorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)83 void StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame) 84 84 { 85 WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK;86 WebKit::WebString oldValue;87 85 if (!canAccessStorage(frame)) 88 86 ec = QUOTA_EXCEEDED_ERR; 89 87 else { 90 m_storageArea->setItem(key, value, frame->document()->url(), result, oldValue); 88 WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK; 89 m_storageArea->setItem(key, value, frame->document()->url(), result); 91 90 ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR; 92 String oldValueString = oldValue;93 if (oldValueString != value && result == WebKit::WebStorageArea::ResultOK)94 storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame);95 91 } 96 return oldValue;97 92 } 98 93 99 StringStorageAreaProxy::removeItem(const String& key, Frame* frame)94 void StorageAreaProxy::removeItem(const String& key, Frame* frame) 100 95 { 101 96 if (!canAccessStorage(frame)) 102 return String(); 103 WebKit::WebString oldValue; 104 m_storageArea->removeItem(key, frame->document()->url(), oldValue); 105 if (!oldValue.isNull()) 106 storageEvent(key, oldValue, String(), m_storageType, frame->document()->securityOrigin(), frame); 107 return oldValue; 97 return; 98 m_storageArea->removeItem(key, frame->document()->url()); 108 99 } 109 100 110 boolStorageAreaProxy::clear(Frame* frame)101 void StorageAreaProxy::clear(Frame* frame) 111 102 { 112 103 if (!canAccessStorage(frame)) 113 return false; 114 bool clearedSomething; 115 m_storageArea->clear(frame->document()->url(), clearedSomething); 116 if (clearedSomething) 117 storageEvent(String(), String(), String(), m_storageType, frame->document()->securityOrigin(), frame); 118 return clearedSomething; 104 return; 105 m_storageArea->clear(frame->document()->url()); 119 106 } 120 107 … … 122 109 { 123 110 return !getItem(key, frame).isNull(); 124 }125 126 // FIXME: remove this method and the calls to it from our setters after multi-side patch landing is done.127 // Copied from WebCore/storage/StorageEventDispatcher.cpp out of necessity. It's probably best to keep it current.128 void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Frame* sourceFrame)129 {130 Page* page = sourceFrame->page();131 if (!page)132 return;133 134 // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree135 // of any given page in the group or mutate the page group itself.136 Vector<RefPtr<Frame> > frames;137 if (storageType == SessionStorage) {138 // Send events only to our page.139 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {140 if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin))141 frames.append(frame);142 }143 144 for (unsigned i = 0; i < frames.size(); ++i) {145 // FIXME: maybe only raise if the window has an onstorage listener146 // attached to avoid creating the Storage instance.147 ExceptionCode ec = 0;148 Storage* storage = frames[i]->domWindow()->sessionStorage(ec);149 if (!ec)150 frames[i]->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));151 }152 } else {153 // Send events to every page.154 const HashSet<Page*>& pages = page->group().pages();155 HashSet<Page*>::const_iterator end = pages.end();156 for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {157 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {158 if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin))159 frames.append(frame);160 }161 }162 163 for (unsigned i = 0; i < frames.size(); ++i) {164 // FIXME: maybe only raise if the window has an onstorage listener165 // attached to avoid creating the Storage instance.166 ExceptionCode ec = 0;167 Storage* storage = frames[i]->domWindow()->localStorage(ec);168 if (!ec)169 frames[i]->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));170 }171 }172 111 } 173 112 … … 181 120 } 182 121 183 void StorageAreaProxy::dispatchLocalStorageEvent( const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,122 void StorageAreaProxy::dispatchLocalStorageEvent(PageGroup* pageGroup, const String& key, const String& oldValue, const String& newValue, 184 123 SecurityOrigin* securityOrigin, const KURL& pageURL, WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess) 185 124 { 186 // FIXME: Multi-sided patch engineering alert ! 187 // step 1: this method gets defined and implemented in webkit/webcore with the early return. 188 // step 2: this method starts getting called by chromium still with the early return. 189 // step 3: This class's setters are modified to no longer raise SessionStorage 190 // events for inprocess changes and this early return is removed. 191 if (originatedInProcess) 192 return; 193 194 const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroupName)->pages(); 125 const HashSet<Page*>& pages = pageGroup->pages(); 195 126 for (HashSet<Page*>::const_iterator it = pages.begin(); it != pages.end(); ++it) { 196 127 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) { … … 206 137 } 207 138 208 static Page* findPageWithSessionStorageNamespace( const String& pageGroupName, const WebKit::WebStorageNamespace& sessionNamespace)139 static Page* findPageWithSessionStorageNamespace(PageGroup* pageGroup, const WebKit::WebStorageNamespace& sessionNamespace) 209 140 { 210 const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroupName)->pages();141 const HashSet<Page*>& pages = pageGroup->pages(); 211 142 for (HashSet<Page*>::const_iterator it = pages.begin(); it != pages.end(); ++it) { 212 143 const bool createIfNeeded = true; … … 218 149 } 219 150 220 void StorageAreaProxy::dispatchSessionStorageEvent( const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,151 void StorageAreaProxy::dispatchSessionStorageEvent(PageGroup* pageGroup, const String& key, const String& oldValue, const String& newValue, 221 152 SecurityOrigin* securityOrigin, const KURL& pageURL, const WebKit::WebStorageNamespace& sessionNamespace, 222 153 WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess) 223 154 { 224 // FIXME: Multi-sided patch engineering alert ! 225 // step 1: this method gets defined and implemented in webkit/webcore with the early return. 226 // step 2: this method starts getting called by chromium still with the early return. 227 // step 3: This class's setters are modified to no longer raise SessionStorage 228 // events for inprocess changes and this early return is removed. 229 if (originatedInProcess) 230 return; 231 232 Page* page = findPageWithSessionStorageNamespace(pageGroupName, sessionNamespace); 155 Page* page = findPageWithSessionStorageNamespace(pageGroup, sessionNamespace); 233 156 if (!page) 234 157 return; -
trunk/Source/WebKit/chromium/src/StorageAreaProxy.h
r114993 r116712 39 39 class KURL; 40 40 class Page; 41 class PageGroup; 41 42 class SecurityOrigin; 42 43 class Storage; … … 51 52 virtual String key(unsigned index, Frame* sourceFrame) const; 52 53 virtual String getItem(const String& key, Frame* sourceFrame) const; 53 virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame);54 virtual StringremoveItem(const String& key, Frame* sourceFrame);55 virtual boolclear(Frame* sourceFrame);54 virtual void setItem(const String& key, const String& value, ExceptionCode&, Frame* sourceFrame); 55 virtual void removeItem(const String& key, Frame* sourceFrame); 56 virtual void clear(Frame* sourceFrame); 56 57 virtual bool contains(const String& key, Frame* sourceFrame) const; 57 58 … … 59 60 60 61 static void dispatchLocalStorageEvent( 61 const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,62 PageGroup*, const String& key, const String& oldValue, const String& newValue, 62 63 SecurityOrigin*, const KURL& pageURL, WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess); 63 64 static void dispatchSessionStorageEvent( 64 const String& pageGroupName, const String& key, const String& oldValue, const String& newValue,65 PageGroup*, const String& key, const String& oldValue, const String& newValue, 65 66 SecurityOrigin*, const KURL& pageURL, const WebKit::WebStorageNamespace&, 66 67 WebKit::WebStorageArea* sourceAreaInstance, bool originatedInProcess); 67 68 68 69 private: 69 void storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame);70 70 bool canAccessStorage(Frame*) const; 71 71 -
trunk/Source/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp
r114993 r116712 30 30 31 31 #include "config.h" 32 #include "WebStorageEventDispatcher Impl.h"32 #include "WebStorageEventDispatcher.h" 33 33 34 34 #include "KURL.h" 35 35 #include "SecurityOrigin.h" 36 36 #include "StorageAreaProxy.h" 37 #include "WebViewImpl.h" 37 38 38 39 #include "platform/WebURL.h" 39 40 #include <wtf/PassOwnPtr.h> 40 41 42 // FIXME: move this file to WebStorageEventDispatcher.cpp 43 41 44 namespace WebKit { 42 43 extern const char* pageGroupName;44 45 45 46 void WebStorageEventDispatcher::dispatchLocalStorageEvent( … … 51 52 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::create(origin); 52 53 WebCore::StorageAreaProxy::dispatchLocalStorageEvent( 53 pageGroupName, key, oldValue, newValue, securityOrigin.get(), pageURL,54 WebViewImpl::defaultPageGroup(), key, oldValue, newValue, securityOrigin.get(), pageURL, 54 55 sourceAreaInstance, originatedInProcess); 55 56 } … … 63 64 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::create(origin); 64 65 WebCore::StorageAreaProxy::dispatchSessionStorageEvent( 65 pageGroupName, key, oldValue, newValue, securityOrigin.get(), pageURL,66 WebViewImpl::defaultPageGroup(), key, oldValue, newValue, securityOrigin.get(), pageURL, 66 67 sessionNamespace, sourceAreaInstance, originatedInProcess); 67 68 } 68 69 69 70 // FIXME: remove the WebStorageEventDispatcherImpl class soon.71 72 WebStorageEventDispatcher* WebStorageEventDispatcher::create()73 {74 return new WebStorageEventDispatcherImpl();75 }76 77 WebStorageEventDispatcherImpl::WebStorageEventDispatcherImpl()78 : m_eventDispatcher(adoptPtr(new WebCore::StorageEventDispatcherImpl(pageGroupName)))79 {80 ASSERT(m_eventDispatcher);81 }82 83 void WebStorageEventDispatcherImpl::dispatchStorageEvent(const WebString& key, const WebString& oldValue,84 const WebString& newValue, const WebString& origin,85 const WebURL& pageURL, bool isLocalStorage)86 {87 WebCore::StorageType storageType = isLocalStorage ? WebCore::LocalStorage : WebCore::SessionStorage;88 RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::createFromString(origin);89 m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, securityOrigin.get(), pageURL, storageType);90 }91 92 70 } // namespace WebKit -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r116671 r116712 1262 1262 } 1263 1263 1264 PageGroup* WebViewImpl::defaultPageGroup() 1265 { 1266 return PageGroup::pageGroup(pageGroupName); 1267 } 1268 1264 1269 // WebWidget ------------------------------------------------------------------ 1265 1270 -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r114987 r116712 70 70 class KeyboardEvent; 71 71 class Page; 72 class PageGroup; 72 73 class PagePopup; 73 74 class PagePopupClient; … … 301 302 static WebViewImpl* fromPage(WebCore::Page*); 302 303 304 // A pageGroup identifies a namespace of pages. Page groups are used on PLATFORM(MAC) 305 // for some programs that use HTML views to display things that don't seem like 306 // web pages to the user (so shouldn't have visited link coloring). We only use 307 // one page group. 308 static WebCore::PageGroup* defaultPageGroup(); 309 303 310 WebViewClient* client() 304 311 {
Note: See TracChangeset
for help on using the changeset viewer.