Changeset 85703 in webkit
- Timestamp:
- May 3, 2011 7:08:54 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r85660 r85703 1 2011-05-03 John Abd-El-Malek <jam@chromium.org> 2 3 Reviewed by James Robinson. 4 5 [chromium] Go through WebPermissionClient for local storage access. Also cleanup left over code from previous WebPermissionClient change. 6 https://bugs.webkit.org/show_bug.cgi?id=60066 7 8 * public/WebFrameClient.h: 9 * public/WebPermissionClient.h: 10 (WebKit::WebPermissionClient::allowLocalStorage): 11 * src/DatabaseObserver.cpp: 12 (WebCore::DatabaseObserver::canEstablishDatabase): 13 * src/FrameLoaderClientImpl.cpp: 14 (WebKit::FrameLoaderClientImpl::allowScriptExtension): 15 (WebKit::FrameLoaderClientImpl::allowJavaScript): 16 (WebKit::FrameLoaderClientImpl::allowPlugins): 17 (WebKit::FrameLoaderClientImpl::allowImages): 18 (WebKit::FrameLoaderClientImpl::didNotAllowScript): 19 (WebKit::FrameLoaderClientImpl::didNotAllowPlugins): 20 * src/StorageAreaProxy.cpp: 21 (WebCore::StorageAreaProxy::setItem): 22 1 23 2011-05-03 Tony Chang <tony@chromium.org> 2 24 -
trunk/Source/WebKit/chromium/DEPS
r85660 r85703 33 33 vars = { 34 34 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', 35 'chromium_rev': '8 3922'35 'chromium_rev': '84023' 36 36 } 37 37 -
trunk/Source/WebKit/chromium/public/WebFrameClient.h
r85241 r85703 295 295 virtual void didCreateIsolatedScriptContext(WebFrame*) { } 296 296 297 // FIXME(jam): remove me once Chrome's WebKit is rolled.298 virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }299 virtual void didNotAllowPlugins(WebFrame*) { }300 virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }301 virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }302 virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) { return true; }303 virtual void didNotAllowScript(WebFrame*) { }304 virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; }305 306 297 307 298 // Geometry notifications ---------------------------------------------- -
trunk/Source/WebKit/chromium/public/WebPermissionClient.h
r85241 r85703 58 58 virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; } 59 59 60 // Controls whether HTML5 Web Storage is allowed for this frame. 61 // If local is true, then this is for local storage, otherwise it's for session storage. 62 virtual bool allowStorage(WebFrame*, bool local) { return true; } 63 60 64 // Controls whether access to read the clipboard is allowed for this frame. 61 65 virtual bool allowReadFromClipboard(WebFrame*, bool defaultValue) { return defaultValue; } -
trunk/Source/WebKit/chromium/public/WebStorageArea.h
r55659 r85703 49 49 enum Result { 50 50 ResultOK = 0, 51 ResultBlockedByQuota, 52 ResultBlockedByPolicy 51 ResultBlockedByQuota 53 52 }; 54 53 -
trunk/Source/WebKit/chromium/src/DatabaseObserver.cpp
r85241 r85703 62 62 if (webView->permissionClient()) 63 63 return webView->permissionClient()->allowDatabase(webFrame, name, displayName, estimatedSize); 64 // FIXME(jam): remove this.65 return webFrame->client()->allowDatabase(webFrame, name, displayName, estimatedSize);66 64 } else { 67 65 WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext); -
trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r85287 r85703 159 159 return webview->permissionClient()->allowScriptExtension(m_webFrame, extensionName, extensionGroup); 160 160 161 // FIXME(jam): remove this.162 if (m_webFrame->client())163 return m_webFrame->client()->allowScriptExtension(m_webFrame, extensionName, extensionGroup);164 165 161 return true; 166 162 } … … 186 182 return webview->permissionClient()->allowScript(m_webFrame, enabledPerSettings); 187 183 188 // FIXME(jam): remove this.189 if (m_webFrame->client())190 return m_webFrame->client()->allowScript(m_webFrame, enabledPerSettings);191 192 184 return enabledPerSettings; 193 185 } … … 199 191 return webview->permissionClient()->allowPlugins(m_webFrame, enabledPerSettings); 200 192 201 // FIXME(jam): remove this.202 if (m_webFrame->client())203 return m_webFrame->client()->allowPlugins(m_webFrame, enabledPerSettings);204 205 193 return enabledPerSettings; 206 194 } … … 212 200 return webview->permissionClient()->allowImages(m_webFrame, enabledPerSettings); 213 201 214 // FIXME(jam): remove this.215 if (m_webFrame->client())216 return m_webFrame->client()->allowImages(m_webFrame, enabledPerSettings);217 218 202 return enabledPerSettings; 219 203 } … … 224 208 if (webview && webview->permissionClient()) 225 209 webview->permissionClient()->didNotAllowScript(m_webFrame); 226 227 // FIXME(jam): remove this.228 if (m_webFrame->client())229 m_webFrame->client()->didNotAllowScript(m_webFrame);230 210 } 231 211 … … 236 216 webview->permissionClient()->didNotAllowPlugins(m_webFrame); 237 217 238 // FIXME(jam): remove this.239 if (m_webFrame->client())240 m_webFrame->client()->didNotAllowPlugins(m_webFrame);241 218 } 242 219 -
trunk/Source/WebKit/chromium/src/StorageAreaProxy.cpp
r84933 r85703 46 46 47 47 #include "WebFrameImpl.h" 48 #include "WebPermissionClient.h" 48 49 #include "WebStorageArea.h" 49 50 #include "WebString.h" 50 51 #include "WebURL.h" 52 #include "WebViewImpl.h" 51 53 52 54 namespace WebCore { … … 81 83 WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK; 82 84 WebKit::WebString oldValue; 83 WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); 84 m_storageArea->setItem(key, value, frame->document()->url(), result, oldValue, webFrame); 85 ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR; 86 String oldValueString = oldValue; 87 if (oldValueString != value && result == WebKit::WebStorageArea::ResultOK) 88 storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame); 85 WebKit::WebFrameImpl* webFrame = WebKit::WebFrameImpl::fromFrame(frame); 86 WebKit::WebViewImpl* webView = webFrame->viewImpl(); 87 if (webView->permissionClient() && !webView->permissionClient()->allowStorage(webFrame, m_storageType == LocalStorage)) 88 ec = QUOTA_EXCEEDED_ERR; 89 else { 90 m_storageArea->setItem(key, value, frame->document()->url(), result, oldValue, webFrame); 91 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 } 89 96 return oldValue; 90 97 }
Note: See TracChangeset
for help on using the changeset viewer.