Unreviewed, rolling out r150014.
http://trac.webkit.org/changeset/150014
https://bugs.webkit.org/show_bug.cgi?id=86410

Broke video playback on WK2 and some webgl tests

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Mark fast/css/variables/var-inside-shape.html as failing on EFL after
r150025.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Unskip several tests that stopped crashing after r150030.

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regressions in flexbox layout caused by the flexing optimizations.
https://bugs.webkit.org/show_bug.cgi?id=116058
<rdar://problem/13863647>
        
Reviewed by Beth Dakin.

Roll out the flex-related changes from r149597 so that the layout
algorithm goes back to the way it was. Leave the repainting optimizations
in place though.

* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::gatherFlexChildrenInfo):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Mark fast/table/crash-split-table-section-no-cell-recalc.html as crashing
on EFL port.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
toDataURL can return an empty image in some cases
https://bugs.webkit.org/show_bug.cgi?id=115981
<rdar://problem/13760256>

Reviewed by Darin Adler.

Source/WebCore:

In some accelerated rendering cases, calling toDataURL on
an off-screen canvas produced an empty image. The solution
was to force a CGContextFlush before extracting the data
for image generation.

While here, I collected the flushing code from other methods
into a single place. Also we were getting into a situation where
we called flush two times in a row.

Test: fast/canvas/toDataURL-not-empty.html

* platform/graphics/ImageBuffer.h:
(ImageBuffer): Define two new methods flushContext and flushContextIfNecessary.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::context): Call flushContextIfNecessary.
(WebCore::ImageBuffer::flushContextIfNecessary): Moved the 10.7 code in here.
(WebCore::ImageBuffer::flushContext): Calls CGContextFlush.
(WebCore::ImageBuffer::getUnmultipliedImageData): Call new helper.
(WebCore::ImageBuffer::getPremultipliedImageData): Call new helper.
(WebCore::ImageBuffer::toDataURL): Flush the CG context.

LayoutTests:

Make sure that a canvas with content is not the same as one
without content.

* fast/canvas/toDataURL-not-empty-expected.txt: Added.
* fast/canvas/toDataURL-not-empty.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for updating the Web Inspector toolbar height.

https://bugs.webkit.org/show_bug.cgi?id=115996

Reviewed by Joseph Pecoraro and Benjamin Poulain.

Source/WebCore:

* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setToolbarHeight):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:

Source/WebKit/efl:

* WebCoreSupport/InspectorClientEfl.cpp:
(WebCore::InspectorFrontendClientEfl::setToolbarHeight):
* WebCoreSupport/InspectorClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorFrontendClient::setToolbarHeight):
* WebCoreSupport/InspectorClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::setToolbarHeight):

Source/WebKit/qt:

* WebCoreSupport/InspectorClientQt.cpp:
(WebCore::InspectorFrontendClientQt::setToolbarHeight):
* WebCoreSupport/InspectorClientQt.h:

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::setToolbarHeight):
* WebCoreSupport/WebInspectorClient.h:

Source/WebKit2:

* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::setToolbarHeight):
(WebInspectorProxy):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
(WebKit):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::setToolbarHeight):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
(WebInspectorFrontendClient):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setToolbarHeight):
* WebProcess/WebPage/WebInspector.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve stringProtoFuncLastIndexOf for the prefix case
https://bugs.webkit.org/show_bug.cgi?id=115952

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncLastIndexOf):
Use the optimized string search when possible.

On Joseph Pecoraro's tests, this gives a ~30% speed improvement.

Source/WTF: 

Add an optimized version of StringImpl::startsWith() for JavaScriptCore.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::startsWith):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::startsWith):
* wtf/text/WTFString.h:
(WTF::String::startsWith):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Headers and footers should be pinned to the left edge of the window when scrolling 
horizontally
https://bugs.webkit.org/show_bug.cgi?id=116061
-and corresponding-
<rdar://problem/13599215>

Reviewed by Simon Fraser.

The scrolling thread will need to know about the header and footer layers in order 
the implement this custom scrolling behavior. 

These getters will fetch the header or footer layer from the FrameView as 
appropriate.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::headerLayerForFrameView):
(WebCore::ScrollingCoordinator::footerLayerForFrameView):
* page/scrolling/ScrollingCoordinator.h:

When we’re scrolling on the main thread, adjust the position of the header and 
footer layers here.
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):

ScrollingStateScrollingNode now stores GraphicsLayers and PlatformLayers for the 
header and footer, just like it already does for the counterScrollingLayer.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::headerLayer):
(WebCore::ScrollingStateScrollingNode::footerLayer):

Setters for the new layers.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::setHeaderLayerForNode):
(WebCore::ScrollingCoordinatorMac::setFooterLayerForNode):

These setters and getters mirror the existing one for counterScrollingLayer.
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::headerPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setHeaderLayer):
(WebCore::ScrollingStateScrollingNode::footerPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setFooterLayer):

And the ScrollingTree will store CALayers for the header and footer.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
(ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):

This is where the magic happens when we are scrolling on the scrolling thread. 
Adjust the horizontal position the behave like a fixed object, but keep the 
vertical position what it was when layer was created.
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

RenderLayerCompositor must now provide getters for the header and footer.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::headerLayer):
(WebCore::RenderLayerCompositor::footerLayer):

Set the anchor point for when we adjust the position later on. Also call 
frameViewRootLayerDidChange() to get the new layers picked up and sent to the 
scrolling tree.
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ChromeClient::willPopupMenu
https://bugs.webkit.org/show_bug.cgi?id=116063

Reviewed by Andreas Kling.

Source/WebCore:

Remove ChromeClient::willPopupMenu.

* page/ChromeClient.h:

Source/WebKit/mac:

ChromeClient::willPopupMenu is only called in one place from WebKit, so just move the function to the call site.

* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::show):
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename BarInfo to BarProp and remove [NoInterfaceObject]
https://bugs.webkit.org/show_bug.cgi?id=116027

Reviewed by Andreas Kling.

Source/WebCore:

Rename BarInfo to BarProp and remove [NoInterfaceObject] extended attribute from
the IDL interface to match the specification:
http://www.w3.org/html/wg/drafts/html/master/browsers.html#barprop

The new behavior also matches Firefox and Blink.

No new tests, covered by LayoutTests/fast/js/global-constructors-attributes.html.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* page/BarProp.cpp: Renamed from Source/WebCore/page/BarInfo.cpp.
* page/BarProp.h: Renamed from Source/WebCore/page/BarInfo.h.
* page/BarProp.idl: Renamed from Source/WebCore/page/BarInfo.idl.
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:

LayoutTests:

Rebaseline fast/js/global-constructors-attributes.html now that there is a new
'BarProp' global constructor.

Rebaseline a few other tests now that BarInfo was renamed to BarProp.

* fast/dom/Window/window-lookup-precedence-expected.txt:
* fast/js/global-constructors-attributes-expected.txt:
* fast/loader/window-properties-restored-from-page-cache-expected.txt:
* http/tests/security/cross-frame-access-put-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-expected.txt:
* platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
* platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added testRunner.setPrinting.
https://bugs.webkit.org/show_bug.cgi?id=42693
rdar://problem/8213845

Patch by Alex Christensen <achristensen@apple.com> on 2013-05-13
Reviewed by Darin Adler.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCopyRenderTreeExternalRepresentationForPrinting): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
Added WKBundlePageCopyRenderTreeExternalRepresentationForPrinting declaration.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::renderTreeExternalRepresentationForPrinting): Added.
* WebProcess/WebPage/WebPage.h:
Added renderTreeExternalRepresentationForPrinting declaration.

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
Added setPrinting JavaScript function.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump):
Dump the external representation for printing if setPrinting has been called.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::isPrinting): Added.
(WTR::TestRunner::setPrinting): Added.
Added and initialized m_isPrinting member boolean.

LayoutTests:

* platform/wk2/TestExpectations:
Unskipped printing tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
https://bugs.webkit.org/show_bug.cgi?id=107359

Patch by Huang Dongsung <luxtella@company100.net> on 2013-05-13
Reviewed by Darin Adler.

Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
them.
It is because:
1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
pixel unit.
2. computePixelAlignment() uses the scale to compute an aligned layer position
in the device pixel unit.

No new tests. We can not test about requiresTiledLayer() because it depends on
gpu. computePixelAlignment() is correct now because fortunately Mac uses
only 2 (for retina display) as a deviceScaleFactor.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
compositing/transitions/transform-on-large-layer.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=110099

Reviewed by Darin Adler.

Only set the timeout for test end after the resize event has been
received. This helps slow test bots, and also makes it easier to
tell rendering failures from failures to send resize event.

* compositing/transitions/transform-on-large-layer.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Upstream iOS Clipboard and Pasteboard changes
<http://webkit.org/b/116062>

Reviewed by Darin Adler.

* WebCore.xcodeproj/project.pbxproj:
* dom/Clipboard.h:
* platform/Pasteboard.h:
* platform/ios/ClipboardIOS.h: Added.
* platform/ios/ClipboardIOS.mm: Added.
* platform/ios/PasteboardIOS.mm: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Objective-C API: scanExternalObjectGraph should not create new JSVirtualMachine wrappers
https://bugs.webkit.org/show_bug.cgi?id=116074

If scanExternalObjectGraph creates a new JSVirtualMachine wrapper during collection, when the 
scanExternalObjectGraph call finishes and the autorelease pool is drained we will dealloc the 
JSVirtualMachine which will cause us to try to take the API lock for the corresponding VM. 
If this happens on a GC thread other than the "main" thread, we will deadlock. The solution 
is to just check the VM cache, and if there is no JSVirtualMachine wrapper, return early.

Reviewed by Darin Adler.

* API/JSVirtualMachine.mm:
(scanExternalObjectGraph):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Nightly build's jsc doesn't work without DYLD_FRAMEWORK...
https://bugs.webkit.org/show_bug.cgi?id=79065

Patch by Alvaro Lopez Ortega <alvaro@alobbs.com> on 2013-05-13
Reviewed by Darin Adler.

Fixes the build process so the depencencies of the jsc binary are
modified before its copied to its target directory. In this way
jsc should always use relative reference to the JavaScriptCore
libraries.

* JavaScriptCore.xcodeproj/project.pbxproj: Fixes the commands in
the "Copy Into Framework" target.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Unskip several tests which already passed and add png expected results.

* platform/efl/TestExpectations:
* platform/efl/editing/selection/doubleclick-crash-expected.png: Added.
* platform/efl/editing/selection/select-missing-image-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove platform/graphic's Generator
https://bugs.webkit.org/show_bug.cgi?id=116084

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-05-13
Reviewed by Darin Adler.

The Generator no longer abstract anything useful, its only
implementation is Gradient.

* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GeneratedImage.h:
* platform/graphics/Generator.h: Removed.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::create):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
(GeneratorGeneratedImage):
* platform/graphics/Gradient.h:
(WebCore):
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRect):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
instead of RetainPtr<NSString>.

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