Use native function bind in page popups
https://bugs.webkit.org/show_bug.cgi?id=95976

Reviewed by Kent Tamura.

We should be using Function.prototype.bind instead of our own bind implementation.

No new tests. No behavior change.

* Resources/pagepopups/calendarPicker.js:
(CalendarPicker):
(CalendarPicker.prototype._layoutButtons):
(YearMonthController.prototype.attachTo):
(YearMonthController.prototype._attachLeftButtonsTo):
(YearMonthController.prototype._attachRightButtonsTo):
(DaysTable.prototype.attachTo):
* Resources/pagepopups/colorSuggestionPicker.js:
(ColorPicker):
(ColorPicker.prototype._layout):
* Resources/pagepopups/pickerCommon.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add API to get/set the security policy of a given URI scheme
https://bugs.webkit.org/show_bug.cgi?id=95549

Reviewed by Martin Robinson.

Add WebKitSecurityPolicy enum with flags that represent the
security policy of a URI scheme. Add methods to get and set the
security policy flags for a given URI scheme.

* docs/webkitgtk-sections.txt: Add new symbols.
* tests/testglobals.c:
(test_globals_security_policy):
(main):
* webkit/webkitglobals.cpp:
(webkit_set_security_policy_for_uri_scheme):
(webkit_get_security_policy_for_uri_scheme):
* webkit/webkitglobals.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [WK2] Crash when navigating between pages
https://bugs.webkit.org/show_bug.cgi?id=95949

Reviewed by Martin Robinson.

Do not trust isMainResource parameter in
webkitWebViewResourceLoadStarted(), because it's always true for
all subresources of pages loaded from the history cache. We can
simply assume that the first resource loaded for the main frame
is the main web view resource.

* UIProcess/API/gtk/WebKitResourceLoadClient.cpp:
(didInitiateLoadForResource):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewResourceLoadStarted):
* UIProcess/API/gtk/WebKitWebViewPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r127712): It broke http/tests/xmlhttprequest/basic-auth.html on JSC platforms
https://bugs.webkit.org/show_bug.cgi?id=95972

Source/WebCore: 

Reverted r127712, because it was based on the false premise that “[Optional] works the way
XMLHttpRequest expects”.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::openCallback):
(WebCore):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open):
(WebCore):
* xml/XMLHttpRequest.h:
(XMLHttpRequest):
* xml/XMLHttpRequest.idl:

LayoutTests: 

Removed the failing test from the skipped list.

* platform/qt/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove extraneous includes (HTMLElement, SVGElement, GlyphBuffer, Clipboard)
https://bugs.webkit.org/show_bug.cgi?id=95780

Patch by Nikhil Bhargava <nbhargava@google.com> on 2012-09-06
Reviewed by Eric Seidel.

Removes extraneous includes of type HTMLElement, SVGElement, GlyphBuffer,
and Clipboard. There is a minor compile-time performance boost.

* Modules/mediastream/MediaStreamEvent.h:
* dom/Event.cpp:
* dom/Event.h:
(WebCore):
* dom/EventDispatchMediator.cpp:
* dom/EventListenerMap.cpp:
* dom/MouseRelatedEvent.h:
* dom/UIEvent.cpp:
* html/FormAssociatedElement.h:
(WebCore):
* inspector/TimelineRecordFactory.cpp:
* platform/graphics/FontPlatformData.h:
* rendering/RenderLineBoxList.h:
* rendering/style/RenderStyle.h:
(WebCore):
* svg/SVGAnimatedType.h:
* svg/SVGExternalResourcesRequired.cpp:
* svg/SVGExternalResourcesRequired.h:
(WebCore):
* svg/SVGURIReference.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 IPC always sends strings using 16 bit data format
https://bugs.webkit.org/show_bug.cgi?id=95811

Reviewed by Benjamin Poulain.

Changed string encoding to pass an 8bit flag and then send either 8 or 16 bit
character data.

* Platform/CoreIPC/ArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::decodeStringText): New templatized string creation and decoder method.
(CoreIPC::::decode):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Annotate multi-process FIXMEs with bug numbers
        https://bugs.webkit.org/show_bug.cgi?id=95916

        Reviewed by Eric Carlson.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::setProcessModel): Ensure that plug-in process is enabled.
        Comments in WebPluginSiteDataManager said that it's required for multi-process.
        (WebKit::WebContext::createNewWebProcess): Added a bug number.
        (WebKit::WebContext::disconnectProcess): Ditto.
        (WebKit::WebContext::createWebPage): Ditto.
        (WebKit::WebContext::download): Ditto.
        (WebKit::WebContext::getWebCoreStatistics): Ditto.

        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
        (WebKit::WebPluginSiteDataManager::getSitesWithData):
        (WebKit::WebPluginSiteDataManager::clearSiteData):
        Removed FIXMEs - some ports haven't switched to plugin process yet, but that
        doesn't stop others from having a multi-process model. Added an ASSERT to document
        this requirement (in addition to the check in WebContext).

        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::cancel):
        (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
        (WebKit::DownloadProxy::startTransfer):
        * UIProcess/WebApplicationCacheManagerProxy.cpp:
        (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
        (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
        * UIProcess/WebCookieManagerProxy.cpp:
        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
        * UIProcess/WebDatabaseManagerProxy.cpp:
        (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
        (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
        (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
        (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
        (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
        (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
        * UIProcess/WebIconDatabase.cpp:
        (WebKit::WebIconDatabase::getLoadDecisionForIconURL):
        (WebKit::WebIconDatabase::didFinishURLImport):
        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
        (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
        (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
        * UIProcess/WebMediaCacheManagerProxy.cpp:
        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
        * UIProcess/WebResourceCacheManagerProxy.cpp:
        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
        Added bug numbers.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
gradient-with-scaled-ancestor.html is not calling setDeviceScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=95847

Patch by Alex Sakhartchouk <alexst@chromium.org> on 2012-09-06
Reviewed by Beth Dakin.

Setting the device scale factor in the layout test and updating expectations until we can rebase

* fast/hidpi/gradient-with-scaled-ancestor.html:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add a customized copy() method to CCRenderPassDrawQuad
https://bugs.webkit.org/show_bug.cgi?id=95871

Reviewed by Adrienne Walker.

Source/WebCore:

CCRenderPassDrawQuad is special because a copied quad will need to
point to a different RenderPass id, since new ids are given to copied
RenderPasses. Add a custom copy() method to CCRenderPassDrawQuad that
takes as input the new RenderPass id that should appear in the copied
quad.

Test: CCDrawQuad.copyRenderPassDrawQuad

* platform/graphics/chromium/cc/CCDrawQuad.cpp:
(WebCore::CCDrawQuad::copy):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
(WebCore::CCRenderPassDrawQuad::copy):
(WebCore):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
(CCRenderPassDrawQuad):

Source/WebKit/chromium:

* tests/CCDrawQuadTest.cpp:
(WebCore):
(WebCore::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127756 268f45cc-cd09-0410-ab3c-d52691b4dbfc