[GStreamer] Add Opus MIME type to the list of supported ones
https://bugs.webkit.org/show_bug.cgi?id=98759

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2013-01-23
Reviewed by Philippe Normand.

Source/WebCore:

GStreamer has support for the Opus codec (http://opus-codec.org) by
using a plugin present in the "gst-plugins-bad" repository. Opus
streams may be embedded in a Ogg container, or standalone. The case
of the Ogg container is already covered by the "*/ogg" MIME types
declared as supported by the GStreamer media playing code, but for
standalone streams to work, "audio/opus" has to be added.

With this, and the needed GStreamer plugin installed, the GTK+
launcher is able to correctly play the example streams from
http://opus-codec.org/examples

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

LayoutTests:

Opus (http://opus-codec.org) streams are typically embedded into
Ogg containers, so add a check for it in the test case.

* media/media-can-play-ogg-expected.txt:
* media/media-can-play-ogg.html:
* platform/chromium-android/media/media-can-play-ogg-expected.txt:
* platform/chromium/media/media-can-play-ogg-expected.txt: Copied from LayoutTests/media/media-can-play-ogg-expected.txt.
* platform/efl/media/media-can-play-ogg-expected.txt: Copied from LayoutTests/media/media-can-play-ogg-expected.txt.
* platform/gtk/media/media-can-play-ogg-expected.txt: Copied from LayoutTests/media/media-can-play-ogg-expected.txt.
* platform/qt-linux/media/media-can-play-ogg-expected.txt: Copied from LayoutTests/media/media-can-play-ogg-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening.
Rebaselining after r140448, r140459 and r140493.

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2013-01-23

* platform/qt-5.0/fast/js/global-constructors-expected.txt:
* platform/qt/fast/dom/constructed-objects-prototypes-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: some measurements are missing in PerformanceTests/inspector/heap-*.html
https://bugs.webkit.org/show_bug.cgi?id=107687

Reviewed by Pavel Feldman.

* inspector/heap-snapshot-performance-test.js: override methods on JSHeapSnapshot instead
of HeapSnapshot, otherwise overrides from JSHeapSnapshot will rule.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: heap profiler shows nodes with distance 0
https://bugs.webkit.org/show_bug.cgi?id=107425

Reviewed by Pavel Feldman.

"Document DOM tree" entities now have distance 1. So if there is a DOM
wrapper that is not referenced from javascript it will anyways be shown
in the heap snapshot and will have distance 2. Also such DOM wrappers
are considered to be reachable from user roots (e.g. global Window objects)
otherwice they are not event shown in the heap snapshots.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype.distanceForUserRoot):
(WebInspector.HeapSnapshot.prototype._calculateDistances):
* inspector/front-end/JSHeapSnapshot.js:
(WebInspector.JSHeapSnapshot.prototype.distanceForUserRoot): distance for
"(Document DOM trees)" is set to 0 to make sure distance of "Ddocument DOM tree" is 1.
(WebInspector.JSHeapSnapshot.prototype._markPageOwnedNodes):
(WebInspector.JSHeapSnapshotNode.prototype.isDocumentDOMTreesRoot):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Layout test rebaselines

Unreviewed rebaseline

* platform/chromium-linux-x86/media/media-can-play-ogg-expected.txt: Added.
* platform/chromium-linux/media/media-can-play-ogg-expected.txt: Added.
* platform/chromium-mac-lion/media/media-can-play-ogg-expected.txt: Added.
* platform/chromium-mac-snowleopard/media/media-can-play-ogg-expected.txt: Added.
* platform/chromium-mac/media/media-can-play-ogg-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r140101): caused debug asserts in fast/forms/associated-element-crash.html and html5lib/run-template.html
https://bugs.webkit.org/show_bug.cgi?id=107237

Patch by Rafael Weinstein <rafaelw@chromium.org> on 2013-01-23
Reviewed by Adam Barth.

Source/WebCore:

No new tests needed.

When the parser foster-parent's a node out of a table context and the foster parent is a template element, set the Task.parent
to be the template element's content, rather than the element itself. This ensures the foster-parented node isn't errorenously
reparented.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::findFosterSite):

LayoutTests:

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: remove invisibleLineRow code from paintLines DTE method
https://bugs.webkit.org/show_bug.cgi?id=107649

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-01-23
Reviewed by Pavel Feldman.

Remove invisibleLineRow logic from TextEditorMainPanel._paintLines method.

No new tests: no change in behaviour.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._paintLines):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
https://bugs.webkit.org/show_bug.cgi?id=107523

Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::isUnderTest):
(WebCore):
(WebCore::InspectorController::evaluateForTestInFrontend):
* inspector/InspectorController.h:
(InspectorController):
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::canAttachWindow):
(WebCore::InspectorFrontendClientLocal::isUnderTest):
(WebCore):
* inspector/InspectorFrontendClientLocal.h:
(InspectorFrontendClientLocal):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::isUnderTest):
(WebCore):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/DOMExtension.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.canInspectWorkers):
(.WebInspector.InspectorFrontendHostStub.prototype.isUnderTest):
* inspector/front-end/TestController.js:
(.invokeMethod):
(WebInspector.evaluateForTestInFrontend):
* inspector/front-end/externs.js:

Source/WebKit/chromium:

* public/WebDevToolsFrontendClient.h:
(WebKit::WebDevToolsFrontendClient::isUnderTest):
(WebDevToolsFrontendClient):
* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::isUnderTest):
* src/InspectorFrontendClientImpl.h:
(InspectorFrontendClientImpl):

Tools:

* DumpRenderTree/chromium/DRTDevToolsClient.cpp:
(DRTDevToolsClient::isUnderTest):
(DRTDevToolsClient::call):
* DumpRenderTree/chromium/DRTDevToolsClient.h:
(DRTDevToolsClient):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Create Regions watchlist
https://bugs.webkit.org/show_bug.cgi?id=107281

Patch by Andrei Bucur <abucur@adobe.com> on 2013-01-23
Reviewed by Adam Barth.

This patch adds 4 new definitions:
- RegionsDevelopment - used to track the development progress for regions
- RegionsExpectationsMore and RegionsExpectationsLess - used to track expectations changes for the regions tests
- RegionsUsage - used to track changes that make use of regions in all the code base

For now, the Adobe internal tracker is the only email address listening for these patterns.

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
https://bugs.webkit.org/show_bug.cgi?id=107624

Reviewed by Dimitri Glazkov.

Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.

Source/WebCore:

No new tests, simple refactoring.

* WebCore.order:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
* dom/Document.cpp:
(WebCore::Document::handleZeroPadding):
* dom/Node.cpp:
(WebCore::Node::deprecatedShadowAncestorNode):
* dom/Node.h:
(Node):
* editing/Editor.cpp:
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setToNonShadowAncestor):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
* WebKitSupport/FatFingers.h:
(BlackBerry::WebKit::FatFingersResult::node):
* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::scopeStringMatches):
(WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):

Source/WebKit/qt:

* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::inputMethodEvent):
(QWebPageAdapter::inputMethodQuery):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Use C API inside ewk_cookie_manager
https://bugs.webkit.org/show_bug.cgi?id=107661

Reviewed by Alexey Proskuryakov.

Use C API inside ewk_cookie_manager instead of
accessing C++ classes directly and violating
layering.

* PlatformEfl.cmake:
* UIProcess/API/C/soup/WKCookieManagerSoup.cpp: Added.
(toSoupCookiePersistentStorageType):
(WKCookieManagerSetCookiePersistentStorage): Add C API for setting
the persistent storage path and type when using libsoup.
* UIProcess/API/C/soup/WKCookieManagerSoup.h: Added.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::cookieManager):
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookieManager::EwkCookieManager):
(EwkCookieManager::~EwkCookieManager):
(EwkCookieManager::setPersistentStorage):
(EwkCookieManager::setHTTPAcceptPolicy):
(EwkCookieManager::clearHostnameCookies):
(EwkCookieManager::clearAllCookies):
(EwkCookieManager::watchChanges):
(EwkCookieManager::getHostNamesWithCookies):
(EwkCookieManager::getHTTPAcceptPolicy):
(ewk_cookie_manager_persistent_storage_set):
(ewk_cookie_manager_hostname_cookies_clear):
* UIProcess/API/efl/ewk_cookie_manager_private.h:
(EwkCookieManager::create):
(EwkCookieManager):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Web Inspector: allow user to resize inspector window by dragging the toolbar
https://bugs.webkit.org/show_bug.cgi?id=107648

Patch by Dmitry Gozman <dgozman@chromium.org> on 2013-01-23
Reviewed by Pavel Feldman.

This did not work before you click dock button once.
Also, last drag position was not respected.

No new tests, because of pure inspector UI change.

* inspector/front-end/DockController.js:
(WebInspector.DockController.prototype.isDockedToBottom):
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar.prototype._isDockedToBottom):
(WebInspector.Toolbar.prototype._toolbarDragStart):
(WebInspector.Toolbar.prototype._toolbarDragEnd):
(WebInspector.Toolbar.prototype._toolbarDrag):

Source/WebKit/chromium: Added changeAttachedWindowHeight method to inspector frontend API, which
allows to change inspector window height from inside.
https://bugs.webkit.org/show_bug.cgi?id=107648

Patch by Dmitry Gozman <dgozman@chromium.org> on 2013-01-23
Reviewed by Pavel Feldman.

* public/WebDevToolsFrontendClient.h:
(WebKit::WebDevToolsFrontendClient::changeAttachedWindowHeight):
* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::changeAttachedWindowHeight):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r140307, r140411, and r140512.
http://trac.webkit.org/changeset/140307
http://trac.webkit.org/changeset/140411
http://trac.webkit.org/changeset/140512
https://bugs.webkit.org/show_bug.cgi?id=107689

Perf regression on DOMDivWalk (bug 106726) (Requested by
falken on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-23

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore):
(WebCore::Element::isInTopLayer):
(WebCore::Element::setIsInTopLayer):
* dom/Element.h:
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::isInTopLayer):
(WebCore::ElementRareData::setIsInTopLayer):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
* dom/Node.h:
(Node):
* dom/NodeRenderingContext.cpp:
(WebCore::isRendererReparented):
(WebCore::NodeRenderingContext::previousRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isInTopLayer):
(WebCore::RenderLayer::rebuildZOrderLists):

LayoutTests:

* fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer-expected.html: Removed.
* fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html: Removed.
* fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd-expected.html: Removed.
* fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r140518): Broke Chromium Win build (gyp file not updated) (Requested by arv on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=107691

Unreviewed build fix. Removed TextureMapperShaderManager.* from WebCore.gypi.

Patch by Noam Rosenthal <noam@webkit.org> on 2013-01-23

* WebCore.gypi:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Unflag tests related to layoutTestController.setViewModeMediaFeature
https://bugs.webkit.org/show_bug.cgi?id=107660

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-01-23
Reviewed by Philippe Normand.

* platform/gtk-wk2/TestExpectations: Remove tests related to
layoutTestController.setViewModeMediaFeature as they are passing now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Follow up to 140539, adding exports for Win build.

Not reviewed.

* WebKit.vcproj/WebKitExports.def.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assert that computePreferredLogicalWidths never calls setNeedsLayout
https://bugs.webkit.org/show_bug.cgi?id=107613

Reviewed by Eric Seidel.

computePreferredLogicalWidths should only set m_minPreferredLogicalWidth
and m_maxPreferredLogicalWidth. It shouldn't have other side-effects.
The mathml bits can be removed once https://bugs.webkit.org/show_bug.cgi?id=107353
is resolved.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::minPreferredLogicalWidth):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::computePreferredLogicalWidths):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: speedup highlight regex API in DefaultTextEditor
https://bugs.webkit.org/show_bug.cgi?id=107238

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-01-23
Reviewed by Pavel Feldman.

Source/WebCore:

Move overlay highlight measurement (highlight regex API) from DefaultTextEditor._paintLine
method to the DefaultTextEditor._paintLines method which allows to relayout dom only
once. This is a significant improvement to the current state of the
art which does relayout on each regex occurence.
In addition, use "left" css attribute instead of "margin-left": this
way it will be possible to avoid an unnecessary relayouting during
appending overlay highlight.

No new tests: no change in behaviour.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
(WebInspector.TextEditorMainPanel.prototype._paintLines):
(WebInspector.TextEditorMainPanel.prototype._measureRegexHighlight):
(WebInspector.TextEditorMainPanel.prototype._measureSpans):
(WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
(WebInspector.TextEditorMainPanel.prototype._paintLine):
(WebInspector.TextEditorMainPanel.ElementMetrics):
(WebInspector.TextEditorMainPanel.LineOverlayHighlight):
(WebInspector.TextEditorMainChunk.prototype.expand):

LayoutTests:

Corrected layout test expectations to correspond to refactoring.

* inspector/editor/text-editor-highlight-regexp-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Avoid reset title for navigation within the page
https://bugs.webkit.org/show_bug.cgi?id=106908

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-01-23
Reviewed by Martin Robinson.

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): Call
dispatchDidCommitLoad with true as param.
(WebKit::FrameLoaderClient::dispatchDidCommitLoad): The method has been
overloaded. The default implementation (without params) simply calls
dispatchDidCommitLoad with false. The new private method with
isNavigatingWithinPage as param will avoid to reset the title for
navigation within the page.
* WebCoreSupport/FrameLoaderClientGtk.h:
(FrameLoaderClient): Add new private method dispatchDidCommitLoad with a
boolean parameter to know if it is navigating withing the same page or
not.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Remove dependence on Microsoft Embedded OpenType Font Engine (T2EMBED.DLL)  from FontCustomPlatformData.cpp.
https://bugs.webkit.org/show_bug.cgi?id=107153

Reviewed by Dan Bernstein.

* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):


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