When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
https://bugs.webkit.org/show_bug.cgi?id=111675

Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2013-03-08
Reviewed by Stephen Chenney.

Source/WebCore:

RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().

In the following spec, SVG don't perform automatic line break or word wrapping.
http://www.w3.org/TR/SVG/text.html#Introduction
> SVG performs no automatic line breaking or word wrapping.
However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
This make single character lines and make RenderSVGText narrow.

We must ignore word-wrap property to make the text a single line.

We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.

Test: svg/text/preserve-break-word.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.

LayoutTests:

Test combination of xml:space="preserve" and word-wrap: break-word to SVG Text.
These text should not be collapsed.

* svg/text/preserve-break-word-expected.html: Added.
* svg/text/preserve-break-word.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent infinite loop in SVG use cycle detection
https://bugs.webkit.org/show_bug.cgi?id=111822

Reviewed by Stephen Chenney.

Source/WebCore:

SVG use cycle detection depended on idForStyleResolution() which differs from
getIdAttribute() in quirks mode. During use tree cycle detection, this difference
resulted in an infinite loop because idForStyleResolution() used lower-cased id
attributes. This patch removes an existing fixme for this and switches to using
getIdAttribute().

Test: svg/custom/use-cycle-detection.html

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::hasCycleUseReferencing):

LayoutTests:

* svg/custom/use-cycle-detection-expected.html: Added.
* svg/custom/use-cycle-detection.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Memory leak at WKViewClientWebProcessCallbacks API test
https://bugs.webkit.org/show_bug.cgi?id=111851

Reviewed by Kenneth Rohde Christiansen.

* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp:
(TestWebKitAPI::TEST):

    Fixed WKURLRef instance leaking.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Add shortcut for running a snippet.
https://bugs.webkit.org/show_bug.cgi?id=111680

Reviewed by Pavel Feldman.

Added Ctrl/Cmd+Enter as a shortcut for running a snippet.

* inspector/front-end/SnippetJavaScriptSourceFrame.js:
(WebInspector.SnippetJavaScriptSourceFrame):
(WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
(WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
(WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations: Skip test after r145195.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
https://bugs.webkit.org/show_bug.cgi?id=111732

Reviewed by Pavel Feldman.

Resources matching inspectedPageURL are always expanded in NavigatorView now.
Snippets tab in scripts navigator is not automatically opened anymore.
Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.

* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorView):
(WebInspector.NavigatorView.prototype.addUISourceCode):
(WebInspector.NavigatorView.prototype._inspectedURLChanged):
(WebInspector.NavigatorView.prototype.revealUISourceCode):
(WebInspector.NavigatorView.prototype.removeUISourceCode):
(WebInspector.NavigatorFolderTreeElement.prototype.onattach):
(WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
(WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._showFile):
* inspector/front-end/Settings.js:
(WebInspector.VersionController.prototype._updateVersionFrom1To2):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
(WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
(WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
https://bugs.webkit.org/show_bug.cgi?id=111753

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/FileSystemMapping.js:
(WebInspector.FileSystemMappingImpl):
(WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
(WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
(WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
(WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
(WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
(WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
(WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
* inspector/front-end/FileSystemProjectDelegate.js:
(WebInspector.FileSystemProjectDelegate.projectId):
(WebInspector.FileSystemProjectDelegate.prototype.id):
(WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
(WebInspector.FileSystemWorkspaceProvider):
(WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
(WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
(WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
* inspector/front-end/IsolatedFileSystemManager.js:
(WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
(WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
* inspector/front-end/Workspace.js:
(WebInspector.Workspace.prototype.uiSourceCodeForURL):

LayoutTests:

* inspector/file-system-mapping-expected.txt:
* inspector/file-system-mapping.html:
* inspector/file-system-project-expected.txt:
* inspector/workspace-mapping-expected.txt:
* inspector/workspace-mapping.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Unskip now passing compositing tests.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:
* platform/qt/compositing/visibility/visibility-image-layers-dynamic-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
https://bugs.webkit.org/show_bug.cgi?id=111836

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This parameter was added in r139967.

* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::canvasClip):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
https://bugs.webkit.org/show_bug.cgi?id=111838

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This was removed in r139138.

* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
https://bugs.webkit.org/show_bug.cgi?id=111840

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This parameter was added in r137011.

* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
https://bugs.webkit.org/show_bug.cgi?id=111852

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This changed in r139353.

* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
(WebCore::GraphicsContext::clipRoundedRect):

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

Skip failing tests on EFL bots.

* platform/efl/TestExpectations:

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

Update platform expectations for failing tests after r145024 and r145067.

* platform/efl/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/efl/fast/forms/datalist/input-list-expected.txt:
* platform/efl/fast/forms/validationMessage-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
       Adding a hook to collect data for a Google UMA histogram to track when
       m_needsCompositedScrolling is turned on and off.
       https://bugs.webkit.org/show_bug.cgi?id=111725

       Reviewed by Julien Chaffraix.

       We want to keep track of this information to quantify the effects of a
       few patches that will cause us to opt in to composited scrolling.
       Specifically, we want to measure the effects of
       https://bugs.webkit.org/show_bug.cgi?id=109302,
       https://bugs.webkit.org/show_bug.cgi?id=109966,
       https://bugs.webkit.org/show_bug.cgi?id=109591, and
       https://bugs.webkit.org/show_bug.cgi?id=107618.

       We do this by measuring a per-layer boolean value, and comparing the
       ratio between number of layers opted in and number of layers that remain
       uncomposited. We hope the relative number of layers opting in will
       increase after the relevant patches land and are enabled.

       Unfortunately implementing extra statistics is impractical at the
       moment since most of the actionable relevant data is expensive to
       compute. For example, it would be useful to know if the layers that opt
       out do so because of invisible or non-overlapping layers that cause a
       potential stacking container's children to be discontiguous, because we
       would potentially be able to mitigate the problem. However, this would
       add considerable overhead to perform overlap testing just to gather
       data.

       No new tests (no change in behaviour).

       * rendering/RenderLayer.cpp:
       (WebCore::RenderLayer::updateNeedsCompositedScrolling):

Patch by Glenn Hartmann <hartmanng@chromium.org> on 2013-03-08

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Handle scrolling correctly.
https://bugs.webkit.org/show_bug.cgi?id=111406

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-08
Reviewed by Simon Fraser.

Coordinated Graphics deals with fast scrolling and slow scrolling in the same
routine, so WebChromeClient::invalidateContentsForSlowScroll() should call
DrawingArea:scroll().

When CoordinatedLayerTreeHost::scrollNonCompositedContents() is called, we
should call scheduleLayerFlush() to notify to UI Process. In addition, when we
don't use fixed layout, we should call setNonCompositedContentsNeedDisplay() to
update non composited contents.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateContentsForSlowScroll):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] [WK2] platform/mac/accessibility/press-action-is-first.html fails
https://bugs.webkit.org/show_bug.cgi?id=111814

Reviewed by Ryosuke Niwa.

Tools:

Add the needed supportedActions() attribute to WKTestRunner.

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::supportedActions):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::supportedActions):

LayoutTests:

* platform/mac-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add stubs for DNSResolveQueue platform specific methods
https://bugs.webkit.org/show_bug.cgi?id=111841

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

Add empty implementations of
DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
build.

* platform/network/blackberry/DNSBlackBerry.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
(WebCore::DNSResolveQueue::platformResolve):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@media queries do not take zooming into account
https://bugs.webkit.org/show_bug.cgi?id=53186

Patch by John Mellor <johnme@chromium.org> on 2013-03-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Fixes @media width and height to take into account full page zoom, by
adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
corresponding to the existing code in Element::clientWidth which makes
document.documentElement.clientWidth take into account page zoom.

Test: fast/media/mq-width-pagezoom.html

* css/MediaQueryEvaluator.cpp:
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):

LayoutTests:

* fast/media/mq-width-pagezoom-expected.html: Added.
* fast/media/mq-width-pagezoom.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make the WebKit2 Web Inspector use tiled drawing and accelerated drawing.

<rdar://problem/12676223>

Reviewed by David Kilzer.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::createInspectorPageGroup): Call setAcceleratedDrawingEnabled with true on 10.8+.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorWKView _shouldUseTiledDrawingArea]): Added. Return YES on 10.8+.

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