[BlackBerry] Unify slow and fast in-region scrolling code paths
https://bugs.webkit.org/show_bug.cgi?id=94834
PR #197662

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>
Internally reviewed by Arvid Nilsson.

In order to be able to remove a bunch of obsolete code from
InRegionScroller.cpp, we need to unify the codepaths for slow
and fast in-region scrolling.

This patch caches the root scrollable node of each scrollable block
in InRegionScrollableArea also for the non-composited-scrolling case now too
(analogly to the way we cache LayerWebKitThread for the composited scrolling case).

Now the client (libwebview) can dispatch an in-region scrolling with one single code path,
making use of a boolean (argh!) to inform if the scroll of the given
layer supports compositing or not. Later on, this boolean is used to casting the proper element.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
(BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
* Api/InRegionScroller.h:
* Api/InRegionScroller_p.h:
(InRegionScrollerPrivate):
* WebKitSupport/InRegionScrollableArea.cpp:
(WebKit):
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
(BlackBerry::WebKit::enclosingLayerNode):
* WebKitSupport/InRegionScrollableArea.h:
(WebCore):
(InRegionScrollableArea):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make WTF build with the latest version of clang.

Reviewed by Dan Bernstein.

* wtf/FastMalloc.cpp:
(WTF): Disable the -Wunused-private-field warning around the declaration of
TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
(WTF::AdminRegionRecorder): Remove the unused m_reader member.
(WTF::FastMallocZone::enumerate): Don't pass in the RemoteMemoryReader since
it is no longer needed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make JavaScriptCore build with the latest version of clang.

Reviewed by Dan Bernstein.

* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads): The m_heap member is only used within
assertions, so guard its initialization with !ASSERT_DISABLED.
* heap/MachineStackMarker.h:
(MachineThreads): Ditto for its declaration.
* jit/JITStubCall.h:
(JSC::JITStubCall::JITStubCall): The m_returnType member is only used within
assertions or if we're using JSVALUE32_64, so guard its uses with the appropriate
(JITStubCall): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make WebCore build with the latest version of clang.

Reviewed by Dan Bernstein.

* html/shadow/MediaControlRootElement.h: Remove m_textTrackDisplay as it is unused.
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::AudioFileReader): Remove m_filePath as it is unused.
* platform/audio/mac/AudioFileReaderMac.h:
(AudioFileReader): Ditto.
* platform/graphics/ImageSource.h:
(ImageSource): Guard m_alphaOption and m_gammaAndColorProfileOption with !USE(CG)
as they're unused on platforms using CG.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(MediaPlayerPrivateAVFoundationObjC): Remove m_player as it is unused.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::ImageSource): Don't initialize the m_alphaOption and
m_gammaAndColorProfileOption members since we never use them.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): Remove m_graphicsContext3D
as it is unused.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make WebKit2 build with the latest version of clang.

Reviewed by Dan Bernstein.

* Configurations/Base.xcconfig: Ensure that operator new isn't exported as a weak external symbol.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make gtest build with the latest version of clang.

Reviewed by Dan Bernstein.

* gtest/src/gtest-internal-inl.h:
(GTestFlagSaver): Remove an unused member.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not reviewed - fixing input list for timeline inspector module.
https://bugs.webkit.org/show_bug.cgi?id=94829

* WebKit.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll out part of r126475 that breaks the build with older versions of Clang.

* wtf/FastMalloc.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Create sharedQuadState at same time as creating quads and give them to the quadSink
https://bugs.webkit.org/show_bug.cgi?id=94752

Reviewed by Adrienne Walker.

Source/WebCore:

Previously, CCRenderPass would create a sharedQuadState for a layer,
and pass it in to the layer. Then the layer would point all its quads
at the sharedQuadState.

After this change, the layer creates its own sharedQuadState, gives it
to the RenderPass (via CCQuadSink), and points its quads at it.

This approach allows a layer to generate more than one sharedQuadState
with different quads pointing to different shared states. Also, this
will allow the layer representing a delegating renderer (via ubercomp)
to copy sharedQuadStates from the delegating renderer in order to
merge its quads into the RenderPass for the current renderer.

Covered by existing tests, no change in behaviour.

* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
(WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h:
(CCHeadsUpDisplayLayerImpl):
* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
(WebCore::CCIOSurfaceLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h:
(CCIOSurfaceLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::createSharedQuadState):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
(WebCore::CCLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
(WebCore::CCQuadCuller::CCQuadCuller):
(WebCore::CCQuadCuller::append):
(WebCore::CCQuadCuller::useSharedQuadState):
(WebCore):
* platform/graphics/chromium/cc/CCQuadCuller.h:
(WebCore):
(CCQuadCuller):
* platform/graphics/chromium/cc/CCQuadSink.h:
(WebCore):
(CCQuadSink):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsForLayer):
(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
(WebCore::CCRenderPass::appendQuadsToFillScreen):
* platform/graphics/chromium/cc/CCRenderPass.h:
(WebCore):
(CCRenderPass):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::appendQuads):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(CCRenderSurface):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
(CCScrollbarLayerImpl):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp:
(WebCore::CCSharedQuadState::create):
(WebCore::CCSharedQuadState::CCSharedQuadState):
* platform/graphics/chromium/cc/CCSharedQuadState.h:
(CCSharedQuadState):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
(WebCore::CCSolidColorLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
(CCSolidColorLayerImpl):
* platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
(WebCore::CCTextureLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCTextureLayerImpl.h:
(CCTextureLayerImpl):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
(CCTiledLayerImpl):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:
(CCVideoLayerImpl):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCLayerTreeHostTest.cpp:
(WTF::EvictionTestLayerImpl::appendQuads):
* tests/CCQuadCullerTest.cpp:
* tests/CCRenderSurfaceTest.cpp:
* tests/CCSolidColorLayerImplTest.cpp:
(CCLayerTestCommon::TEST):
* tests/CCTiledLayerImplTest.cpp:
(CCLayerTestCommon::TEST):
(CCLayerTestCommon::getQuads):
(CCLayerTestCommon::coverageVisibleRectOnTileBoundaries):
(CCLayerTestCommon::coverageVisibleRectIntersectsTiles):
(CCLayerTestCommon::coverageVisibleRectIntersectsBounds):
* tests/MockCCQuadCuller.h:
(WebCore::MockCCQuadCuller::MockCCQuadCuller):
(MockCCQuadCuller):
(WebCore::MockCCQuadCuller::quadList):
(WebCore::MockCCQuadCuller::sharedQuadStateList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ProgressTracker never completes if iframe detached during parsing
https://bugs.webkit.org/show_bug.cgi?id=92272

Reviewed by Adam Barth.

Add a simple helper class to FrameLoader to ensure progressStarted/progressCompleted calls are matched,
and balance the calls when the Frame is detached.

No new tests, as this behavior has only been producing reliably by setting a breakpoint in a specific place.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::FrameProgressTracker::progressStarted):
(WebCore::FrameLoader::FrameProgressTracker::progressCompleted):
(WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::clearProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachFromParent):
* loader/FrameLoader.h:
(FrameProgressTracker):
(WebCore::FrameLoader::FrameProgressTracker::create):
(WebCore::FrameLoader::FrameProgressTracker::FrameProgressTracker):


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