Use CFNotificationCenter instead of NSNotificationCenter for SharedTimerIOS
https://bugs.webkit.org/show_bug.cgi?id=110544

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-02-22
Reviewed by Daniel Bates.

Previously, we were instantiating the Obj-C object WebCoreResumeNotifierIOS
with the only purpose of forwarding one notification to a C function.

This patch updates the code to use CFNotificationCenter to dispatch the notification
without the intermediary object.

* platform/ios/SharedTimerIOS.mm:
(WebCore::applicationDidBecomeActive):
(WebCore::setSharedTimerFireInterval):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Reread cookies when retrying a request with new auth credentials
https://bugs.webkit.org/show_bug.cgi?id=110628

Patch by Joe Mason <jmason@rim.com> on 2013-02-22
Reviewed by George Staikos.

Internal PR: 298805
Internally Reviewed By: Leo Yang

The "isRedirect" parameter of initializePlatformRequest is only used to decide whether to
reread cookies. Since we must reread cookies when resending a request with new auth
credentials as well, rename this to "rereadCookies".

The only caller which sets this parameter rather than using the default value is
NetworkManager::startJob, which also has other processing on redirect. So add a new
"rereadCookies" parameter to startJob and ensure it is always set to true on a redirect, but
can also be set to true on a non-redirect. And when startJob is called due to new auth
credentials, set it to true.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::startNewJobWithRequest): Add rereadCookies parameter, pass it to
startJob.
(WebCore::NetworkJob::handleRedirect): Set new rereadCookies param of startNewJob to true.
(WebCore::NetworkJob::notifyChallengeResult): Set new rereadCookies param of startNewJob to
true.
* platform/network/blackberry/NetworkJob.h:
(NetworkJob): Add rereadCookies parameter to startNewJobWithRequest.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Add rereadCookies parameter, pass it instead of
redirectCount to initializePlatformRequest.
* platform/network/blackberry/NetworkManager.h:
(NetworkManager): Add rereadCookies parameter to startJob.
* platform/network/blackberry/ResourceRequest.h:
(ResourceRequest): Rename isRedirect parameter to rereadCookies.
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest): Rename isRedirect to rereadCookies.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Threaded HTML parser should pass fast/parser/iframe-sets-parent-to-javascript-url.html
https://bugs.webkit.org/show_bug.cgi?id=110637

Reviewed by Eric Seidel.

With the main thread parser, we always parse the first chunk of content
returned as the result of evaluating a JavaScript URL synchronously. In
particular, if the first chunk has an inline script, we'll execute it
synchronously.

Previous to this patch, the threaded parser would always parse this
content asynchronously. It's conceivable that there could be some
content relying on the synchronous behavior, so this patch introduces
the notion of "pinning" a parser to the main thread and uses that
concept to force the result of JavaScript URLs to be parsed on the main
thread (which is probably desirable anyway because they're likely to be
quite short).

This patch fixes fast/parser/iframe-sets-parent-to-javascript-url.html
and fast/dom/javascript-url-crash-function.html with the threaded
parser with --enable-threaded-html-parser.

* dom/DocumentParser.h:
(WebCore::DocumentParser::pinToMainThread):
(DocumentParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
(WebCore):
(WebCore::HTMLDocumentParser::pinToMainThread):
* html/parser/HTMLDocumentParser.h:
(HTMLDocumentParser):
(WebCore::HTMLDocumentParser::shouldUseThreading):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):


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