generate-message-receiver.py can't handle nested #ifs
https://bugs.webkit.org/show_bug.cgi?id=121877

Reviewed by Alexey Proskuryakov.

* Scripts/webkit2/parser.py:
(parse): Exit early until proper fix instead of generating buggy output.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, roll out r157193. It broke some builds.

* JavaScriptCore.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r157203): WebKit crashes after dispatching gesture event
https://bugs.webkit.org/show_bug.cgi?id=122615

Reviewed by Anders Carlsson.

Don't release the event until the end of the function where we call member functions on it.

* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove the old front-end from WebKit
https://bugs.webkit.org/show_bug.cgi?id=122295

Patch by Marcelo Morais <m.morais@samsung.com> on 2013-10-10
Reviewed by Timothy Hatcher.

Skipping the tests of the old Inspector UI for all ports.

* TestExpectations:
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-lion/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Store uniform type information in WebGLUniformationLocation.
https://bugs.webkit.org/show_bug.cgi?id=122607.

Reviewed by Dean Jackson.

Covered by Khronos Conformance Suite 1.0.2.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniform):
(WebCore::WebGLRenderingContext::getUniformLocation):
* html/canvas/WebGLUniformLocation.cpp:
(WebCore::WebGLUniformLocation::create):
(WebCore::WebGLUniformLocation::WebGLUniformLocation):
(WebCore::WebGLUniformLocation::type):
* html/canvas/WebGLUniformLocation.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert some OwnPtr/PassOwnPtr in CoordinatedGraphics code to std::unique_ptr's
https://bugs.webkit.org/show_bug.cgi?id=122614

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-10
Reviewed by Anders Carlsson.

Source/WebCore:

No new tests, covered by existing ones.

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
(WebCore::CoordinatedGraphicsLayer::createBackingStore):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createLayer):
(WebCore::CoordinatedGraphicsScene::deleteLayer):
(WebCore::CoordinatedGraphicsScene::ensureRootLayer):
(WebCore::CoordinatedGraphicsScene::purgeGLResources):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp:
(WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::buildLayoutIfNeeded):
(WebCore::UpdateAtlas::didSwapBuffers):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
(WebCore::UpdateAtlas::isInUse):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CallbackData unnecessarily caches the JSValue for currentThis
https://bugs.webkit.org/show_bug.cgi?id=122616

Reviewed by Oliver Hunt.

CallbackData implements its own version of caching the JSValue* for the JSValueRef it stores.
+[JSValue valueWithJSValueRef:inContext:] already does caching, thus obviating the need for
CallbackData to do its own caching.

* API/JSContext.mm:
(+[JSContext currentThis]):
(-[JSContext beginCallbackWithData:thisValue:argumentCount:arguments:]):
(-[JSContext endCallbackWithData:]):
* API/JSContextInternal.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make all functions of EventDispatcher static
https://bugs.webkit.org/show_bug.cgi?id=122591

Reviewed by Antti Koivisto.

Now that EventDispatchMediator is gone, we don't have to have an EventDispatcher object.
Turn EventDispatcher into an empty class with a bunch of static functions.

We can convert it to a namespace or whatever later.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventDispatcher.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Port RemoteNetworkingContext for Soup
https://bugs.webkit.org/show_bug.cgi?id=110097

Reviewed by Darin Adler.

Original patch by Balazs Kelemen <kbalazs@webkit.org> and Kwang Yul Seo <skyul@company100.net>.

This should be a cross-platform interface so I lifted the header from
the mac directory. Removed mac specific arguments from constructor,
added setters instead. Moved platform things behind ifdefs and added
Soup specific bits.

The following things were fixed by Csaba Osztrogonác:
- solved conflicts in project.pbxproj
- removed the change in the non-existent SyncNetworkResourceLoader.cpp
- marked RemoteNetworkingContext class as FINAL
- reordered the members for platform specific initialization
- added initializers to m_needsSiteSpecificQuirks and m_localFileContentSniffingEnabled members on PLATFORM(MAC)

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/RemoteNetworkingContext.h: Renamed from Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.h.
(WebKit::RemoteNetworkingContext::create):
(WebKit::RemoteNetworkingContext::RemoteNetworkingContext):
(WebKit::RemoteNetworkingContext::setNeedsSiteSpecificQuirks):
(WebKit::RemoteNetworkingContext::setLocalFileContentSniffingEnabled):
* NetworkProcess/mac/RemoteNetworkingContext.mm:
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Added.
(WebKit::RemoteNetworkingContext::~RemoteNetworkingContext):
(WebKit::RemoteNetworkingContext::isValid):
(WebKit::RemoteNetworkingContext::initiatingPageID):
(WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
(WebKit::RemoteNetworkingContext::storageSession):
(WebKit::RemoteNetworkingContext::privateBrowsingSession):
* WebKit2.xcodeproj/project.pbxproj:


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

The changes in r157228 trigger a bug in VS2010. This patch works around the compiler bug
to allow this platform to build.

* dom/Range.cpp: Move implementation to header file.
* dom/Range.h: Inline the method.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open): Add stub method (with pointer arguments) to call the real
method with references.
* page/DOMWindow.h: Declare stub method taking pointer arguments to avoid compiler bug.
* testing/Internals.cpp:
(WebCore::Internals::openDummyInspectorFrontend): Use work-around method when building under
the buggy version of Visual Studio.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Scrollbars are updated on the main thread rather than the scrolling thread 
(causing scroll bars not to appear/update quickly in some cases)
https://bugs.webkit.org/show_bug.cgi?id=122585
-and corresponding-
<rdar://problem/10710775>

Reviewed by Simon Fraser.

Source/WebCore: 

This patch does a few things in order to allow scrollbars to be updated on the 
scrolling thread:

1. This patch adds the ability to know if the lower-level APIs necessary to get 
this to work right are available, AND if the content is actually capable of taking 
advantage of this feature. This is currently implemented as 
Scrollbar::supportsUpdateOnSecondaryThread() which makes use of a new 
ScrollableArea function called updatesScrollLayerPositionOnMainThread()
        
2. To update on the scrolling thread, the scrolling tree needs to know about the 
ScrollbarPainters.
        
3. Once it knows about them, it should update the presentation value whenever the 
layer position changes.
        
4. Presentation value is basically the same thing as double value. There is a bit 
of code we maintain currently to compute that. This patch moves that code to a 
static function on ScrollableArea that can be called from both the main thread and 
the scrolling thread.
        
5. ScrollbarPainter API needs to know about the layers we have created for the 
vertical and horizontal scrollbars, then they will use those layers and the 
presentation value that we set on the scrolling thread to move the layers around.

This is part of #1 above. 
* page/FrameView.cpp:
(WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
* page/FrameView.h:

This is part of #2. ScrollingStateScrollingNodes now have vertical and horizontal 
ScrollbarPainters for Mac only.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::verticalScrollbarPainter):
(WebCore::ScrollingStateScrollingNode::horizontalScrollbarPainter):

Also part of #2. Make sure to set the ScrollbarPainters for scrolling nodes when 
appropriate.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):

Implement this function that was just stubbed out before. This is part of #5 in 
that is will allow the ScrollbarPainter API to know about any layer changes. 
(WebCore::ScrollingCoordinatorMac::scrollableAreaScrollbarLayerDidChange):

Back to #2, making sure we properly set the ScrollbarPainters to send over to the 
scrolling thread.
(WebCore::ScrollingCoordinatorMac::setScrollbarPaintersForNode):
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::setScrollbarPainters):

This code achieves #3. It uses new ScrollbarPainter API to adjust the position of 
the scrollbars from the scrolling thread.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

This is for #5. ScrollbarPainter needs to know about our scrollbar layers.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimator::horizontalScrollbarLayerDidChange):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
(WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):

This is for #4. This code computes the scrollbar’s value and current overhang 
amount.
(WebCore::ScrollableArea::computeScrollbarValueAndOverhang):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::layerForHorizontalScrollbar):
(WebCore::ScrollableArea::layerForVerticalScrollbar):
(WebCore::ScrollableArea::layerForScrolling):

This is for #1. We need to know if we have the ability to update scrollbars on a 
different thread. We can do that only on certain versions of the OS, only when 
threaded scrolling is enabled, and only when the current page is actually using 
the scrolling thread to scroll.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
* platform/Scrollbar.h:
* platform/ScrollbarThemeClient.h:

New ScrollbarPainter APIs.
* platform/mac/NSScrollerImpDetails.h:

This is for #5, letting the ScrollbarPainter API  know about the layers.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate layer]):
(-[WebScrollbarPainterDelegate convertRectToLayer:]):
(-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):

Before we kick off a scroll animation, set the current painting characteristics so 
they are up-to-date in case we are scrolling on the scrolling thread.
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):

Only paint the scrollbars through ScrollbarThemeMac if they are NOT being updated 
by the scrolling thread.
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::setCurrentPaintCharacteristics):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):

Back to #1.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updatesScrollLayerPositionOnMainThread):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
* rendering/RenderListBox.h:

Source/WebKit2: 

New pure virtual function.
* WebProcess/Plugins/PDF/PDFPlugin.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Soup] Add platform specific stubs for NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=110115

Reviewed by Carlos Garcia Campos.

Original patch by Balazs Kelemen <kbalazs@webkit.org> and Kwang Yul Seo  <skyul@company100.net>.

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* NetworkProcess/gtk/NetworkProcessSoup.cpp: Added.
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::NetworkProcess::platformSetCacheModel):
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
Stubs.
(WebKit::NetworkProcess::clearCacheForAllOrigins):
(WebKit::NetworkProcess::platformTerminate):
* NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Added.
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
Added platform default based on the comment in ResourceRequestSoup.cpp.
* UIProcess/Network/soup/NetworkProcessProxySoup.cpp: Added.
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
Stub.
* UIProcess/soup/WebContextSoup.cpp: Added.
(WebKit::WebContext::platformInitializeNetworkProcess):
Stub.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused attribute in CoordinatedTile class
https://bugs.webkit.org/show_bug.cgi?id=122619

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-10
Reviewed by Noam Rosenthal.

No new tests, covered by existing ones.

* platform/graphics/texmap/coordinated/CoordinatedTile.h: Remove
m_localBuffer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CallbackData unnecessarily caches the JSValue for currentThis
https://bugs.webkit.org/show_bug.cgi?id=122616

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2013-10-10
Reviewed by Oliver Hunt.

CallbackData implements its own version of caching the JSValue* for the JSValueRef it stores. 
+[JSValue valueWithJSValueRef:inContext:] already does caching, thus obviating the need for 
CallbackData to do its own caching.

* API/JSContext.mm:
(+[JSContext currentThis]):
(-[JSContext beginCallbackWithData:thisValue:argumentCount:arguments:]):
(-[JSContext endCallbackWithData:]):
* API/JSContextInternal.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix changelog entry order.

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