Changeset 147754 in webkit


Ignore:
Timestamp:
Apr 5, 2013 9:40:31 AM (11 years ago)
Author:
timothy@apple.com
Message:

Allow the Web Inspector to use WebSQL.

This fixes an exception on load in the Safari Web Inspector.

https://webkit.org/b/114040
rdar://problem/13581422

Reviewed by Anders Carlsson.

Source/WebKit/mac:

  • WebCoreSupport/WebInspectorClient.mm:

(-[WebInspectorWindowController webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]): Added.

Source/WebKit2:

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::exceededDatabaseQuota): Added.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Hook up exceededDatabaseQuota.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r147485 r147754  
     12013-04-05  Timothy Hatcher  <timothy@apple.com>
     2
     3        Allow the Web Inspector to use WebSQL.
     4
     5        This fixes an exception on load in the Safari Web Inspector.
     6
     7        https://webkit.org/b/114040
     8        rdar://problem/13581422
     9
     10        Reviewed by Anders Carlsson.
     11
     12        * WebCoreSupport/WebInspectorClient.mm:
     13        (-[WebInspectorWindowController webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]): Added.
     14
    1152013-04-02  Timothy Hatcher  <timothy@apple.com>
    216
  • trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm

    r147482 r147754  
    3434#import "WebFrameView.h"
    3535#import "WebInspector.h"
     36#import "WebInspectorFrontend.h"
    3637#import "WebInspectorPrivate.h"
    37 #import "WebInspectorFrontend.h"
    3838#import "WebLocalizableStringsInternal.h"
    3939#import "WebNodeHighlighter.h"
     40#import "WebPolicyDelegate.h"
     41#import "WebQuotaManager.h"
     42#import "WebSecurityOriginPrivate.h"
    4043#import "WebUIDelegate.h"
    41 #import "WebPolicyDelegate.h"
    4244#import "WebViewInternal.h"
     45#import <algorithm>
    4346#import <WebCore/Frame.h>
    4447#import <WebCore/InspectorController.h>
     
    688691}
    689692
     693- (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier
     694{
     695    id <WebQuotaManager> databaseQuotaManager = origin.databaseQuotaManager;
     696    databaseQuotaManager.quota = std::max<unsigned long long>(5 * 1024 * 1024, databaseQuotaManager.usage * 1.25);
     697}
     698
    690699// MARK: -
    691700// MARK: Policy delegate
  • trunk/Source/WebKit2/ChangeLog

    r147752 r147754  
     12013-04-05  Timothy Hatcher  <timothy@apple.com>
     2
     3        Allow the Web Inspector to use WebSQL.
     4
     5        This fixes an exception on load in the Safari Web Inspector.
     6
     7        https://webkit.org/b/114040
     8        rdar://problem/13581422
     9
     10        Reviewed by Anders Carlsson.
     11
     12        * UIProcess/mac/WebInspectorProxyMac.mm:
     13        (WebKit::exceededDatabaseQuota): Added.
     14        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Hook up exceededDatabaseQuota.
     15
    1162013-04-04  Brady Eidson  <beidson@apple.com>
    217
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r147004 r147754  
    3737#import "WebPreferences.h"
    3838#import "WebProcessProxy.h"
     39#import <algorithm>
    3940#import <mach-o/dyld.h>
    4041#import <WebKitSystemInterface.h>
     
    223224
    224225    webInspectorProxy->setInspectorWindowFrame(frame);
     226}
     227
     228static unsigned long long exceededDatabaseQuota(WKPageRef, WKFrameRef, WKSecurityOriginRef, WKStringRef, WKStringRef, unsigned long long, unsigned long long, unsigned long long currentDatabaseUsage, unsigned long long expectedUsage, const void*)
     229{
     230    return std::max<unsigned long long>(expectedUsage, currentDatabaseUsage * 1.25);
    225231}
    226232
     
    411417        0, // didDraw
    412418        0, // pageDidScroll
    413         0, // exceededDatabaseQuota
     419        exceededDatabaseQuota,
    414420        0, // runOpenPanel
    415421        0, // decidePolicyForGeolocationPermissionRequest
Note: See TracChangeset for help on using the changeset viewer.