[GTK] GTK does not expose heading level correctly. Was: accessibility/heading-level.html is failing
https://bugs.webkit.org/show_bug.cgi?id=106924

Reviewed by Chris Fleizach.

Tools:

Consider headings levels as values to be returned in intValue()
both in DRT and WKTR, so we can share more tests with other ports.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::intValue): Consider headings too.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::intValue): Ditto.

LayoutTests:

Removed accesibility/heading-level.html from failure expectations.

* platform/gtk/TestExpectations: Removed test now passing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix windows build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide 2D Matrix decomposition for animation
https://bugs.webkit.org/show_bug.cgi?id=112824
<rdar://problem/15091882>

Reviewed by Eric Carlson (and Ian Henderson offline).

Source/WebCore:

Implement a new 2d matrix blend, which is triggered
when animating between two affine 3d matrices. This
is intended to be the official algorithm that gets
put into the W3C Transforms specification.

The old code is renamed with a 4 prefix (indicating
it is a blend between 3d matrices using quaternions),
and new methods and structures for 2d blending were added.

I also took the opportunity to clean up a lot of
bad WebKit style.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::maxScaleFromTransform): Use 3d decomposition.
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend): Ditto.
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend): Ditto.

* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::decompose2): New method to decompose an affine 3d matrix
into X/Y scale + translate, a rotation angle, plus some extracted
a,b,c,d fields from the affine section.
(WebCore::decompose4): New name for the old function.
(WebCore::TransformationMatrix::blend2): Perform linear interpolation
between two 2d decompositions.
(WebCore::TransformationMatrix::blend4): New name for the old function.
(WebCore::TransformationMatrix::blend): Call blend2 or blend4 depending
on the type of matrix.
(WebCore::TransformationMatrix::decompose2): Calls into the decompose2
method above.
(WebCore::TransformationMatrix::decompose4): New name.
(WebCore::TransformationMatrix::recompose2): Recomposes a 3d matrix from
a 2d decomposition.
(WebCore::TransformationMatrix::recompose4): New name.
* platform/graphics/transforms/TransformationMatrix.h: All the changes
for the new methods above.

LayoutTests:

This test was only exercising the fact that our
software decomposition did not match our hardware
decomposition (although that required visual inspection).
Now that our 2d decomposition is correct, update the
test and its expected result.

* animations/transform-non-accelerated-expected.txt:
* animations/transform-non-accelerated.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MediaStream API] update SourceInfo object to match spec
https://bugs.webkit.org/show_bug.cgi?id=121941

Reviewed by Dean Jackson.

Source/WebCore: 

No new tests, existing test updated.

* Modules/mediastream/SourceInfo.cpp:
(WebCore::SourceInfo::kind): Get rid of "none".
* Modules/mediastream/SourceInfo.h:
(WebCore::SourceInfo::sourceId): Renamed from "id".
* Modules/mediastream/SourceInfo.idl:

* platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
(WebCore::TrackSourceInfo::create):
(WebCore::TrackSourceInfo::kind):
(WebCore::TrackSourceInfo::TrackSourceInfo):

* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::getMediaStreamTrackSources): "facing" isn't a part of sourceInfo.
    Return a non-NULL ID because a source must always have one.

LayoutTests: 

* fast/mediastream/MediaStreamTrack-getSources-expected.txt:
* fast/mediastream/MediaStreamTrack-getSources.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Make WebKitGTK+ port work with Eclipse chromedevtools plugin
https://bugs.webkit.org/show_bug.cgi?id=121121

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-27
Reviewed by Gustavo Noronha Silva.

The chromedevtools plugin (http://code.google.com/p/chromedevtools/) requires a specific
json format to connect to the webkit inspector.

The current format is missing some required fields that make the connection with the plugin
fail.

The format expected by the plugin is as follows:
  {
   "title": "Foo",
   "url": "http://foo",
   "devtoolsFrontendUrl": "/Main.html?ws=localhost:9222/devtools/page/1",
   "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/1"
  }

The current format is missing the entries for "devtoolsFrontendUrl" and
"webSocketDebuggerUrl".

The plugin also sends an HTTP GET request to http://host:port/json instead of
http://host:port/pagelist.json when retrieving the pages list.

This patch fixes the issues by adding support for the missing fields and accepting requests
for "/json" alongside "/pagelist.json".

* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
Also accept requests for "/json" alongside "pagelist.json".
(WebKit::WebInspectorServer::buildPageList):
Add fields required by chromedevtools plugin.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-indent Settings.h

Rubber-stamped by Anders Carlsson.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move line grid functionality from RenderBlock into RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=121502

Reviewed by Dean Jackson.

* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::establishLineGrid):
* rendering/LayoutState.h:
(WebCore::LayoutState::lineGrid):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::layoutLineGridBox):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::lineGridBox):
(WebCore::RenderBlockFlow::setLineGridBox):
* rendering/RenderBlockLineLayout.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSnapAdjustment):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ScrollbarPainterController should adopt the api to lock overlay scrollbar state
https://bugs.webkit.org/show_bug.cgi?id=121928

Reviewed by Sam Weinig.

Source/WebCore: 

ScrollbarPainterController should adopt the api to lock overlay scrollbar state. 
This will allow the ScrollbarPainterController and ScrollAnimatorMac to have 
control over knowing whether or not the scrollbars are currently active, which 
will allow us to remove a bunch of functions previously implemented in 
ScrollableArea subclasses to answer that question.

ScrollableArea::scrollbarsCanBeActive() is not longer virtual. It used to 
implemented on ScrollableArea subclasses, but now ScrollableArea can just get the 
information from the ScrollAnimator.
* WebCore.exp.in:

When ScrollableArea subclasses implemented scrollbarsCanBeActive(), they would 
check to see if the document was in the page cache. Instead of that model, this 
patch adopts a model where ScrollbarPainterController is told directly whether or 
not it is active via shouldLockOverlayScrollbarsToHidden(bool).
* dom/Document.cpp:
(WebCore::Document::setInPageCache):

setAnimatorsAreActive() is no longer necessary. The functionality can be bundled 
into shouldLockOverlayScrollbarsToHidden(bool).
(WebCore::Document::documentDidResumeFromPageCache):

Remove implementations of scrollbarsCanBeActive(), setAnimatorsAreActive(), and 
scrollbarAnimationsAreSuppressed(). 
* page/FrameView.cpp:
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
* page/FrameView.h:

setShouldSuppressScrollbarAnimations(bool) now calls 
setShouldLockOverlayScrollbars(bool). 
* page/Page.cpp:
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::setShouldLockOverlayScrollbars):
* page/Page.h:

setIsActive() is now implemented in the ScrollAnimator instead of ScrollableArea 
subclasses. finishCurrentScrollAnimations() is replaced by 
lockOverlayScrollbarStateToHidden(bool).
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::lockOverlayScrollbarStateToHidden):
(WebCore::ScrollAnimator::scrollbarsCanBeActive):

New enum ScrollbarOverlayState.
* platform/ScrollTypes.h:

Go to the animator for both of these functions.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::lockOverlayScrollbarStateToHidden):
(WebCore::ScrollableArea::scrollbarsCanBeActive):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::setVisibleScrollerThumbRect):

Three new pieces of ScrollbarPainterController api.
* platform/mac/NSScrollerImpDetails.h:

Instead of asking the ScrollableArea if scrollbars can be active, just find out if 
the ScrollbarPaintController has been locked.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
(WebCore::ScrollAnimatorMac::lockOverlayScrollbarStateToHidden):
(WebCore::ScrollAnimatorMac::scrollbarsCanBeActive):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):

Remove implementations of scrollbarsCanBeActive() and 
scrollbarAnimationsAreSuppressed().
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:

Source/WebKit2: 

This function no longer needs to be implemented by ScrollablArea subclasses.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed Win64 build after r156184.
https://bugs.webkit.org/show_bug.cgi?id=121994

Reviewed by Oliver Hunt.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupTwoStubArgsGPR):
(JSC::CCallHelpers::setupTwoStubArgsFPR):
Renamed from setupTwoStubArgs.
Visual Studio x64 compiler fails to see that this is an overloaded template function.
(JSC::CCallHelpers::setupStubArguments):
(JSC::CCallHelpers::setupArguments):
(JSC::CCallHelpers::setupArgumentsWithExecState):
Use setupTwoStubArgsGPR or setupTwoStubArgsFPR instead of setupTwoStubArgs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use std::unique_ptr for GraphicsLayer creation
https://bugs.webkit.org/show_bug.cgi?id=122020

Reviewed by Antti Koivisto.

Source/WebCore:

* platform/graphics/GraphicsLayer.h:
* platform/graphics/GraphicsLayerFactory.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::createGraphicsLayer):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::hasScrollingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
* rendering/RenderLayerCompositor.h:

Source/WebKit2:

* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::getOrCreateLayer):
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::paintContents):
(WebKit::LayerTreeHostMac::createPageOverlayLayer):
(WebKit::LayerTreeHostMac::destroyPageOverlayLayer):
* WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
* WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::createGraphicsLayer):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::paintContents):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
(WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r156546): 17 media tests broken
https://bugs.webkit.org/show_bug.cgi?id=122021

Unreviewed gardening; add failing tests to TestExpectations while triaging new failures.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Deoptimize 32-bit deoptimization
https://bugs.webkit.org/show_bug.cgi?id=122025

Reviewed by Oliver Hunt.
        
Just simplifying a bunch of code. I don't want the old, super-complicated,
deoptimization code to get in the way of changes I'll be making to DFG stack layout.

* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::inGPR):
(JSC::ValueRecovery::isInRegisters):
(JSC::ValueRecovery::gpr):
(JSC::ValueRecovery::dumpInContext):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):



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