[V8] Rename V8Helpers to V8BindingHelpers
https://bugs.webkit.org/show_bug.cgi?id=93318

Reviewed by Eric Seidel.

For naming consistency, a file including binding utility methods
should be prefixed by "V8Binding". In a follow-up patch, I'll move
methods from V8Binding to V8BindingHelpers.

In addition this patch makes V8Binding.h include V8BindingHelpers.h,
and removes #include V8BindingHelpers.h from binding files.

No tests. No change in behavior.

* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/NPV8Object.cpp:
* bindings/v8/V8BindingHelpers.cpp: Renamed from Source/WebCore/bindings/v8/V8Helpers.cpp.
(WebCore):
(WebCore::toV8Context):
(WebCore::toV8Proxy):
* bindings/v8/V8BindingHelpers.h: Renamed from Source/WebCore/bindings/v8/V8Helpers.h.
(WebCore):
* bindings/v8/V8NPObject.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor console logging out of CSPDirectiveList into ContentSecurityPolicy
https://bugs.webkit.org/show_bug.cgi?id=93205

Patch by Mike West <mkwst@chromium.org> on 2012-08-08
Reviewed by Adam Barth.

We currently pass a protected resource's ScriptExecutionContext down
into CSPDirectiveList in order to log errors, grab the SecurityOrigin,
resolve relative URLs, and one or two other bits. This implementation
requires us to maintain state inside of low-level objects that shouldn't
really know about the ScriptExecutionContext, and makes logging errors
difficult, as CSPDirectiveList is the only piece of the puzzle that can
interact with the console.

This patch removes the dependence on ScriptExecutionContext, replacing
it with a pointer to the ContentSecurityPolicy object itself. The low-
level objects like CSPDirectiveList now make requests to the policy
object, which understands how to resolve them. This gives a cleaner
separation between the CSP implementation and the rest of WebCore, and
opens the door for future patches that teach the remaining low-level
objects about the policy in which they're contained in order to improve
error logging.

This should be a purely internal refactoring of the location from which
warnings are logged to the console. No new tests have been added; the
behavior should be covered by the existing CSP tests.

* page/ContentSecurityPolicy.cpp:
(CSPSourceList):
(WebCore::CSPSourceList::CSPSourceList):
    Pass the policy object into CSPSourceList, rather than a pointer to
    ScriptExecutionContext.
(WebCore::CSPSourceList::parse):
(WebCore::CSPSourceList::addSourceSelf):
    Read the SecurityOrigin from the policy object, rather than from the
    ScriptExecutionContext.
(WebCore::CSPDirective::CSPDirective):
    Pass the policy object into CSPDirective, rather than a pointer to
    ScriptExecutionContext. Use it to read the protected resource's
    URL.
(CSPDirectiveList):
(WebCore::CSPDirectiveList::CSPDirectiveList):
    Pass the policy object into CSPSourceList, rather than a pointer to
    ScriptExecutionContext.
(WebCore::CSPDirectiveList::create):
    Move the enforcement of eval restrictions out of CSPDirectiveList,
    and into ContentSecurityPolicy::ContentSecurityPolicy.
(WebCore::CSPDirectiveList::reportViolation):
    Move most of the logic out of this method, and into
    ContentSecurityPolicy::reportViolation.
(WebCore::CSPDirectiveList::parseDirective):
    Use the policy object for logging.
(WebCore::CSPDirectiveList::parseReportURI):
    Use the policy object for logging, and URL completion.
(WebCore::CSPDirectiveList::parseScriptNonce):
    Use the policy object for logging.
(WebCore::CSPDirectiveList::setCSPDirective):
    Use the policy object for logging.
(WebCore::CSPDirectiveList::applySandboxPolicy):
    Use the policy object for logging, and move enforcement to
    ContentSecurityPolicy::enforceSandboxFlags.
(WebCore::CSPDirectiveList::addDirective):
    Use the policy object for logging.
(WebCore::ContentSecurityPolicy::didReceiveHeader):
    Pass the policy object to CSPDirectiveList, and disable eval if
    necessary after parsing the policy.
(WebCore::ContentSecurityPolicy::securityOrigin):
(WebCore):
(WebCore::ContentSecurityPolicy::url):
(WebCore::ContentSecurityPolicy::completeURL):
(WebCore::ContentSecurityPolicy::enforceSandboxFlags):
    Move the enforcement of the sandbox directive out of
    CSPDirectiveList and into the policy object.
(WebCore::ContentSecurityPolicy::reportViolation):
(WebCore::ContentSecurityPolicy::reportUnrecognizedDirective):
(WebCore::ContentSecurityPolicy::reportDuplicateDirective):
(WebCore::ContentSecurityPolicy::reportInvalidNonce):
    Move CSPDirectiveList::logXXX out to the policy object. The
    directive list is now responsible for reporting errors and
    violations; the policy decides what to do with them.
(WebCore::ContentSecurityPolicy::logToConsole):
    Wrap the call to addConsoleMessage to make it simpler for the
    various ContentSecurityPolicy::reportXXX methods.
* page/ContentSecurityPolicy.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Blackberry] missing a Multipart header when m_multipartResponse is null
https://bugs.webkit.org/show_bug.cgi?id=93440

Patch by Chris Guan <chris.guan@torchmobile.com.cn> on 2012-08-08
Reviewed by George Staikos.

when m_multipartResponse is null, we just created new one but not called
setHTTPHeaderField. So we missed this received multipart Header. We should
call setHTTPHeaderField for each reveived header.

No new tests, because those current multipart test cases (http/tests/multipart/*)
are enough.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] Fix compilation of DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=93461

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-08-08
Reviewed by Tor Arne Vestbø.

DRT includes stdint.h, for which we have wrappers in Source/JavaScriptCore/os-win32. Use these not only
for libraries but any building template.

* qmake/mkspecs/features/default_post.prf:

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