Null check m_frame in maximum and minimumScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=119109
<rdar://problem/14545393>

Reviewed by Darin Adler.

* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
Null-check m_frame (and move the early-return after the clamp-to-0
as the revert in r152911 should have).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Add missing includes to shape-inside polygon tests
https://bugs.webkit.org/show_bug.cgi?id=119098

Reviewed by Dirk Schulze.

We need to include subpixel-utils.js for tests which use simple-polygon.js, since it uses
SubPixelLayout, otherwise both the result/expected are generating incorrect output.

* fast/shapes/shape-inside/shape-inside-regular-polygon16-expected.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon16.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon8-expected.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon8.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix.

* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Add missing 'ftl'
include path.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix: use of long long in CoreIPC::ArgumentEncoder and CoreIPC::ArgumentDecoder
https://bugs.webkit.org/show_bug.cgi?id=118228

Reviewed by Anders Carlsson.

Build fails on some platforms where int64_t and long long are different types.

* Shared/FileAPI/BlobRegistrationData.cpp:
(WebKit::BlobRegistrationData::encode):
Add explicit casts to int64_t.
(WebKit::BlobRegistrationData::decode):
Use int64_t instead of long long.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build of DumpRenderTree and WebKitTestRunner when building against an SDK.

* DumpRenderTree/mac/Configurations/Base.xcconfig: Fix framework search path when building against an SDK.
* WebKitTestRunner/Configurations/Base.xcconfig: Ditto. Also fix where our scripts look for WebCore.framework
so they pull the version out of the SDK.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(FTL): Most layout tests crashes
https://bugs.webkit.org/show_bug.cgi?id=119089

Reviewed by Oliver Hunt.

* runtime/ExecutionHarness.h:
(JSC::prepareForExecution): Move prepareForExecutionImpl call into its own statement. This prevents the GCC-compiled
code to create the PassOwnPtr<JSC::JITCode> (intended as a parameter to the installOptimizedCode call) from the jitCode
RefPtr<JSC::JITCode> parameter before the latter was actually given a proper value through the prepareForExecutionImpl call.
Currently it's created beforehand and therefor holds a null pointer before it's anchored as the JIT code in
JSC::CodeBlock::setJITCode, which later indirectly causes assertions in JSC::CodeBlock::jitCompile.
(JSC::prepareFunctionForExecution): Ditto for prepareFunctionForExecutionImpl.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Soup] Add private browsing support
https://bugs.webkit.org/show_bug.cgi?id=118657

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Support private browsing by adding a method to create a private
browsing soup session. This private browsing session uses a
non-persistent cookie jar and does not use the disk cache feature.

No new tests. Covered by existing private browsing tests.

* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::isPrivateBrowsingSession):
Add USE(SOUP) guard to isPrivateBrowsingSession() and m_isPrivate.

* platform/network/ResourceHandle.h:
Add a factory method to create a private browsing session for soup.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::createPrivateBrowsingCookieJar):
* platform/network/soup/CookieJarSoup.h:
Add a method to create a non-persistent cookie jar for private browsing.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
Initialize m_isPrivate to false.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
Implement the method by invoking ResourceHandle::createPrivateBrowsingSession.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupSession):
Extract common soup session creation code so that both defaultSession
and createPrivateBrowsingSession can use this function to create a soup
session.
(WebCore::ResourceHandle::defaultSession):
Change to use createSoupSession.
(WebCore::ResourceHandle::createPrivateBrowsingSession):
Create a session which uses a non-persistent cookie jar.

Source/WebKit2:

Support private browsing in WK2 by implementing private browsing
related methods in WebFrameNetworkingContext.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
Add USE(SOUP) guard.

* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
Add private browsing support methods. Copied from the Mac port.
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
Check if the frame enables private browsing and return the private
browsing session.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession):
Add USE(SOUP) guard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChromeClient::focusedNodeChanged() should be focusedElementChanged().
<http://webkit.org/b/119110>

Reviewed by Anders Carlsson.

Source/WebCore:

Because only Elements can be focused.

* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::focusedElementChanged):
* page/Chrome.cpp:
(WebCore::Chrome::focusedElementChanged):
* page/Chrome.h:
* page/ChromeClient.h:

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::focusedElementChanged):
* WebCoreSupport/ChromeClientBlackBerry.h:

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::focusedElementChanged):
* WebCoreSupport/ChromeClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::focusedElementChanged):
* WebCoreSupport/ChromeClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedElementChanged):

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::focusedElementChanged):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::focusedElementChanged):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::focusedElementChanged):
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERT(m_vm->apiLock().currentThreadIsHoldingLock()); fails for Safari on current ToT
https://bugs.webkit.org/show_bug.cgi?id=119108

Reviewed by Mark Hahnenberg.

Add a currentThreadIsHoldingAPILock() function to VM that checks if the current thread is the exclusive API thread.

* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::tryAllocateSlowCase):
* heap/Heap.cpp:
(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::collect):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateSlowCase):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/VM.h:
(JSC::VM::currentThreadIsHoldingAPILock):

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