[Qt] Unreviewed gardening. Skip a failing tests after r146174 and r146178.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Add iframe option to inspectedWindow.eval() extension API
https://bugs.webkit.org/show_bug.cgi?id=106811

Patch by John J. Barton <johnjbarton@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Add a new case to the options processing in inspectedWindow.eval(), look
for option.frameURL <string> and/or option.scriptExecutionContext: <string>, find the
matching JS context in the runtimeModel, and call evaluate() in that
context; or error if the context is not found.

Test: http/tests/inspector/extensions-iframe-eval.html

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.frames):
   Added read access to _frames
       * inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
   Added access to a frame's contextList, removed contextByFrameAndSecurityOrigin()
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):
   Added access to frame's mainWorldContext, rather than implicit first context.
   Now we can go from ResourceTreeModel -> frame -> contextList then either
   mainWorldContext() or contextBySecurityOrigin() to access contexts.

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onReload):
(WebInspector.ExtensionServer.prototype.resolveURLToFrame.hasMatchingURL):
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.frames):
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):

* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype.resolveURLToFrame.hasMatchingURL):
(WebInspector.ExtensionServer.prototype.):
(WebInspector.ExtensionServer.prototype.evaluate):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.frames):
* inspector/front-end/RuntimeModel.js:
(WebInspector.RuntimeModel.prototype.contextListByFrame):
(WebInspector.FrameExecutionContextList.prototype.mainWorldContext):

LayoutTests:

New tests for evaluate in iframe options in extension API

* http/tests/inspector/extensions-iframe-eval-expected.txt: Added.
* http/tests/inspector/extensions-iframe-eval.html: Added.
* http/tests/inspector/resources/extensions-frame-eval.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Monospace font does not render in proper sizes
https://bugs.webkit.org/show_bug.cgi?id=93263

Reviewed by Jocelyn Turcotte.

Do not force fonts to use integer metrics. This was necessary when the fast font path
only worked in integer but is now hindering accurate metrics. This is also required to
make kerning in the fast-path look acceptable

Only enabled for Qt 5.1+ to avoid changing all the baselines for 5.0.

* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: move OverviewGrid and OverviewWindow into separate file.
https://bugs.webkit.org/show_bug.cgi?id=112693

Reviewed by Yury Semikhatsky.

It is the third patch for the meta bug "Web Inspector: meta bug: extract OverviewGrid from TimelineOverviewPane"
It just moves the OverviewGrid and the related classes into its own file.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* inspector/compile-front-end.py:
* inspector/front-end/OverviewGrid.js: Added.
(WebInspector.OverviewGrid):
(WebInspector.OverviewGrid.prototype.itemsGraphsElement):
(WebInspector.OverviewGrid.prototype.insertBeforeItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.clientWidth):
(WebInspector.OverviewGrid.prototype.showItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.hideItemsGraphsElement):
(WebInspector.OverviewGrid.prototype.updateDividers):
(WebInspector.OverviewGrid.prototype.addEventDividers):
(WebInspector.OverviewGrid.prototype.removeEventDividers):
(WebInspector.OverviewGrid.prototype.setWindowPosition):
(WebInspector.OverviewGrid.prototype.reset):
(WebInspector.OverviewGrid.prototype.windowLeft):
(WebInspector.OverviewGrid.prototype.windowRight):
(WebInspector.OverviewGrid.prototype.setWindow):
(WebInspector.OverviewGrid.prototype.addEventListener):
(WebInspector.OverviewGrid.Window):
(WebInspector.OverviewGrid.Window.prototype.reset):
(WebInspector.OverviewGrid.Window.prototype._leftResizeElementDragging):
(WebInspector.OverviewGrid.Window.prototype._rightResizeElementDragging):
(WebInspector.OverviewGrid.Window.prototype._startWindowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._windowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._endWindowSelectorDragging):
(WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
(WebInspector.OverviewGrid.Window.prototype._windowDragging):
(WebInspector.OverviewGrid.Window.prototype._endWindowDragging):
(WebInspector.OverviewGrid.Window.prototype._moveWindow):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowLeft):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowRight):
(WebInspector.OverviewGrid.Window.prototype._resizeWindowMaximum):
(WebInspector.OverviewGrid.Window.prototype._setWindow):
(WebInspector.OverviewGrid.Window.prototype._setWindowPosition):
(WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
(WebInspector.OverviewGrid.Window.prototype._zoom):
(WebInspector.OverviewGrid.WindowSelector):
(WebInspector.OverviewGrid.WindowSelector.prototype._createSelectorElement):
(WebInspector.OverviewGrid.WindowSelector.prototype._close):
(WebInspector.OverviewGrid.WindowSelector.prototype._updatePosition):
* inspector/front-end/TimelineOverviewPane.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] QStyle: Set State_Enabled by default when painting style widgets.
https://bugs.webkit.org/show_bug.cgi?id=112688

Patch by David Rosca <nowrep@gmail.com> on 2013-03-19
Reviewed by Jocelyn Turcotte.

All Qt style widgets were painted with a disabled state, even when
they actually were enabled.
This change fixes it by setting State_Enabled as a default state,
which is then correctly removed when element is disabled.

* Source/WebCore/platform/qt/RenderThemeQStyle.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make ImageDiff similar to Chromium's ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=94782

Based on patch by Csaba Osztrogonác.
Reviewed by Jocelyn Turcotte.

The diff image is generated with bright red indicating errors, but letting the base image
shine through so the context of the error-pixel can be identified.

* DumpRenderTree/qt/ImageDiff.cpp:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix WebKit2 builds after r146193
https://bugs.webkit.org/show_bug.cgi?id=112700

Reviewed by Martin Robinson.

Apply changes to the LayerTreeHostGtk class that are analogous to changes made in r146193
to the LayerTreeHostMac class, namely introducing a PageOverlayLayersMap and using that as
the source of GraphicsLayer objects that should be operated on, making it possible to
support multiple page overlays.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::invalidate):
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHostGtk::sizeDidChange):
(WebKit::LayerTreeHostGtk::didInstallPageOverlay):
(WebKit::LayerTreeHostGtk::didUninstallPageOverlay):
(WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay):
(WebKit::LayerTreeHostGtk::paintContents):
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
(WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
(LayerTreeHostGtk):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: split Console into two entities, a web-facing bound object and page console.
https://bugs.webkit.org/show_bug.cgi?id=111578

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-19
Reviewed by Vsevolod Vlasov.

Otherwise, a lot of logging in WebCore needs to go through the DOMWindow which is unnecessary.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::muteConsole):
(WebCore::PageDebuggerAgent::unmuteConsole):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::muteConsole):
(WebCore::PageRuntimeAgent::unmuteConsole):
* page/Console.cpp:
(WebCore::internalAddMessage):
* page/Console.h:
(WebCore):
(Console):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::pageConsole):
(WebCore):
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
(WebCore::DOMWindow::printErrorMessage):
* page/DOMWindow.h:
(WebCore):
(DOMWindow):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore):
(WebCore::Page::console):
(Page):
* page/PageConsole.cpp: Added.
(WebCore::PageConsole::PageConsole):
(WebCore):
(WebCore::PageConsole::~PageConsole):
(WebCore::PageConsole::printSourceURLAndLine):
(WebCore::PageConsole::printMessageSourceAndLevelPrefix):
(WebCore::PageConsole::addMessage):
(WebCore::PageConsole::mute):
(WebCore::PageConsole::unmute):
(WebCore::PageConsole::shouldPrintExceptions):
(WebCore::PageConsole::setShouldPrintExceptions):
* page/PageConsole.h: Copied from Source/WebCore/page/Console.h.
(WebCore):
(PageConsole):
(WebCore::PageConsole::create):
(WebCore::PageConsole::page):
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
(WebCore::docLoaderFunc):

Source/WebKit/mac:

* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Support kerning in fast path font rendering
https://bugs.webkit.org/show_bug.cgi?id=106013

Reviewed by Jocelyn Turcotte.

To support kerning in the fast font path we need to implement SimpleFontData::applyTransforms.

This patch changes the types used by the fast path GlyphBuffer to match those used by Qt,
and implements SimpleFontData::applyTransforms using QRawFont::advancesForGlyphIndexes.

* platform/graphics/GlyphBuffer.h:
(GlyphBufferAdvance):
(WebCore::GlyphBufferAdvance::GlyphBufferAdvance):
(WebCore::GlyphBufferAdvance::setWidth):
(WebCore::GlyphBufferAdvance::width):
(WebCore::GlyphBufferAdvance::height):
(WebCore::GlyphBuffer::add):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::applyTransforms):
* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix heap profiler performance tests.
https://bugs.webkit.org/show_bug.cgi?id=112701

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Yury Semikhatsky.

The tests were broken by profile types refactoring.

* inspector/heap-snapshot-performance-test.js:
(test.performanceTest.step0):
(test.performanceTest.step1):

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

* platform/gtk/TestExpectations: Adding failure expectation for fast/dom/icon-url-property.html after r146173.
* platform/gtk/http/tests/security/contentSecurityPolicy/source-list-parsing-10-expected.txt: Rebaselining after r146141.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove flaky part of testRendererProcessNativeMemorySize test.
https://bugs.webkit.org/show_bug.cgi?id=112703

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Yury Semikhatsky.

The memory increase size check happened to be flaky. Remove it.

* src/js/Tests.js:
(.TestSuite.prototype.testRendererProcessNativeMemorySize.step1):
(.TestSuite.prototype.testRendererProcessNativeMemorySize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor conditions for setCompositingLayersNeedRebuild in RenderLayer::styleChanged
https://bugs.webkit.org/show_bug.cgi?id=112606

Reviewed by Simon Fraser.

To fix bug 109098 [1], we will need to add more conditions for calling
RenderLayerCompositor::setCompositingLayersNeedRebuild in RenderLayer::styleChanged.
Adding more non-trivial conditions will make this block of code even harder to follow.
This patch refactors the current conditions into functions:
    needsCompositingLayersRebuiltForClip
    needsCompositingLayersRebuiltForOverflow

In bug 109098 [1], I'm planning to add:
    needsCompositingLayersRebuiltForFilters

[1]: https://bugs.webkit.org/show_bug.cgi?id=109098

No new tests. Just refactoring.

* rendering/RenderLayer.cpp:
(WebCore):
(WebCore::RenderLayer::needsCompositingLayersRebuiltForClip):
(WebCore::RenderLayer::needsCompositingLayersRebuiltForOverflow):
    This is a method and not a file static function because it needs to look at the
    RenderLayer's stackingContainer(), which is a private method.
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
(RenderLayer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Increase DataGrid default font size.
https://bugs.webkit.org/show_bug.cgi?id=112692

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Pavel Feldman.

The default font of 10px is too small. Most instances of DataGrid set
font to 11px.

* inspector/front-end/dataGrid.css:
(.data-grid table):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup defaultUnifiedTextCheckerEnabled type
https://bugs.webkit.org/show_bug.cgi?id=112640

Reviewed by Adam Barth.

It's a bool setting. I accidentally declared the default value as a double
in r139202.

No new tests, this is a refactor/code cleanup.

* page/Settings.cpp:
(WebCore): Switch from double to a bool.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge MainResourceLoader::responseReceived into DocumentLoader
https://bugs.webkit.org/show_bug.cgi?id=112593

Part of the ongoing effort to merge MainResourceLoader entirely
into DocumentLoader.

Reviewed by Adam Barth.

No new tests, refactor only.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::finishedLoading): The only thing left in
    MainResourceLoader related to this function was a RefPtr which indirectly
    protected DocumentLoader. Move the RefPtr here and protect DocumentLoader directly.
(WebCore::DocumentLoader::responseReceived): Moved from MainResourceLoader.
(WebCore::DocumentLoader::callContinueAfterContentPolicy): Moved from MainResourceLoader.
(WebCore::DocumentLoader::continueAfterContentPolicy): Moved from MainResourceLoader.
(WebCore::DocumentLoader::interruptedForPolicyChangeError): Moved from MainResourceLoader.
(WebCore::DocumentLoader::stopLoadingForPolicyChange): Moved from MainResourceLoader.
(WebCore::DocumentLoader::receivedData):
(WebCore::DocumentLoader::cancelMainResourceLoad):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::isLoadingMultipartContent): Store multipart bit here.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::MainResourceLoader):
(WebCore::MainResourceLoader::cancel):
(WebCore::MainResourceLoader::responseReceived):
(WebCore::MainResourceLoader::notifyFinished):
* loader/MainResourceLoader.h:


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