Bug 23339

Summary: Add preference to disable web security
Product: WebKit Reporter: Adam Barth <abarth>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: abarth, aroben, patrick, sam, sfalken
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
patch (privatized) sam: review+

Description Adam Barth 2009-01-14 20:39:51 PST
As discussed on IRC, web developers find it useful to disable the same-origin policy when regression testing their web site (e.g., with Selenium).  Firefox has this option.  So should we.

Patch forthcoming.
Comment 1 Adam Barth 2009-01-14 21:33:27 PST
Created attachment 26745 [details]
Comment 2 Mark Rowe (bdash) 2009-01-14 22:29:22 PST
These methods should be added to WebPreferencesPrivate rather than WebPreferences as they need to go through Apple API review before they can be added to an API header file.
Comment 3 Adam Barth 2009-01-14 23:09:06 PST
Comment on attachment 26745 [details]

Ok.  Clearing review flag.
Comment 4 Adam Barth 2009-01-14 23:15:31 PST
Created attachment 26747 [details]

I figured out how to do this for mac.  Is there a similar issue on windows?
Comment 5 Mark Rowe (bdash) 2009-01-14 23:28:48 PST
Steve or Adam Roben would know what our policy is for API vs SPI on Windows.
Comment 6 Steve Falkenburg 2009-01-15 23:03:01 PST
We make the Windows API change in the interface that matches the Mac.  So WebPreferences->IWebPreferences, WebPreferencesPrivate->IWebPreferencesPrivate.

One problem with your patch: you need to add new methods to COM interfaces at the *end* to preserve the vtable order.  Otherwise, you break compatibility.
Comment 7 Adam Barth 2009-01-15 23:17:58 PST
Comment on attachment 26747 [details]

Ok.  Will do.  Clearing review flag while I re-spin the patch.
Comment 8 Adam Barth 2009-01-17 14:37:07 PST
Created attachment 26828 [details]
patch (privatized)

This version should address the above comments (thanks!).
Comment 9 Adam Barth 2009-01-30 14:08:04 PST
Friendly ping.  :)

(I secretly want to land this because it will help with Bug 20249.)
Comment 10 Sam Weinig 2009-01-30 14:11:27 PST
Comment on attachment 26828 [details]
patch (privatized)

Doh.  r=me
Comment 11 Adam Barth 2009-01-30 14:18:58 PST
(In reply to comment #10)
> Doh.  r=me

Thanks Sam.
Comment 12 Adam Barth 2009-01-31 01:17:15 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       WebCore/ChangeLog
        M       WebCore/WebCore.base.exp
        M       WebCore/dom/Document.cpp
        M       WebCore/page/SecurityOrigin.cpp
        M       WebCore/page/SecurityOrigin.h
        M       WebCore/page/Settings.cpp
        M       WebCore/page/Settings.h
        M       WebKit/mac/ChangeLog
        M       WebKit/mac/WebView/WebPreferenceKeysPrivate.h
        M       WebKit/mac/WebView/WebPreferences.mm
        M       WebKit/mac/WebView/WebPreferencesPrivate.h
        M       WebKit/mac/WebView/WebView.mm
        M       WebKit/win/ChangeLog
        M       WebKit/win/Interfaces/IWebPreferencesPrivate.idl
        M       WebKit/win/WebPreferenceKeysPrivate.h
        M       WebKit/win/WebPreferences.cpp
        M       WebKit/win/WebPreferences.h
        M       WebKit/win/WebView.cpp
Committed r40449