[GStreamer] Floating reference handling fix
https://bugs.webkit.org/show_bug.cgi?id=101349

Patch by Thiago Santos <thiago.sousa.santos@collabora.com> on 2012-11-26
Reviewed by Philippe Normand.

GStreamer 0.10 and 1.0 differ when creating GstGhostPad from pad
templates, the 1.0 doesn't take ownership on the passed
GstPadTemplate, while 0.10 does. So this patch adds a
GStreamerVersioning function to handle this different approach
transparently in Webkit gstreamer elements.

Existing media tests cover this change.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init):
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
(webkitGstGhostPadFromStaticTemplate):
* platform/graphics/gstreamer/GStreamerVersioning.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsSurface should only store its size in a single place.
https://bugs.webkit.org/show_bug.cgi?id=103143

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
    Cosmetics only.
* platform/graphics/surfaces/GraphicsSurface.cpp:
(WebCore::GraphicsSurface::size):
    Return the size as received from the platform abstraction.
(WebCore):
(WebCore::GraphicsSurface::GraphicsSurface):
* platform/graphics/surfaces/GraphicsSurface.h:
(GraphicsSurface):
    Remove data member m_size.
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
    Always take the size of the GraphicsSurface as an argument.
(WebCore::GraphicsSurfacePrivate::size):
(GraphicsSurfacePrivate):
(WebCore::GraphicsSurface::platformPaintToTextureMapper):
    Retrieve the size from GraphicsSurfacePrivate where necessary.
(WebCore::GraphicsSurface::platformSize):
(WebCore):
(WebCore::GraphicsSurface::platformImport):
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
    Add a constructor that takes a window id as an argument
    for the receiving side of the GraphcisSurface.
    The GraphicsSurface can then determine its dimensions
    from the provided XWindow.
(WebCore::GraphicsSurfacePrivate::createPixmap):
(WebCore::GraphicsSurfacePrivate::size):
    Query the size of the GraphicsSurface backing from X.
(WebCore::GraphicsSurface::platformPaintToTextureMapper):
    Retrieve the size from GraphicsSurfacePrivate where necessary.
(WebCore::GraphicsSurface::platformSize):
(WebCore):
(WebCore::GraphicsSurface::platformImport):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening: update test expectations
https://bugs.webkit.org/show_bug.cgi?id=103119

Unreviewed gardening. timeline-timer-fired-from-eval-call-site-expected.html
is passing now, other changes are just marking tests as flaky based on
the flakiness dashboard.

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-11-26

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: HeapProfiler: remove snapshotView reference from data-grids.
https://bugs.webkit.org/show_bug.cgi?id=103240

Patch by Eugene Klyuchnikov <eustas@chromium.org> on 2012-11-26
Reviewed by Yury Semikhatsky.

Source/WebCore:

Cleanup: remove redundant dependency.

* inspector/front-end/HeapSnapshotDataGrids.js: Do not store view ref.
* inspector/front-end/HeapSnapshotGridNodes.js:
Removed unused assignments.
* inspector/front-end/HeapSnapshotView.js:
Do not pass self to data-grids.

LayoutTests:

Directly access current view instead of getting if from the data grid.

* inspector/profiler/heap-snapshot-test.js:
(initialize_HeapSnapshotTest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Circular reference between Document and MediaQueryMatcher.
https://bugs.webkit.org/show_bug.cgi?id=103242

Patch by Marja Hölttä <marja@chromium.org> on 2012-11-26
Reviewed by Kenneth Rohde Christiansen.

It's not enough to clean up listeners in MediaQueryMatcher in ~Document,
since MediaQueryListListener keeps the Document alive. This caused
www.crbug.com/113983.

No new tests: No visible change in behavior (except that it doesn't leak memory).

* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::detach):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HitTestResult should not be a HitTestLocation
https://bugs.webkit.org/show_bug.cgi?id=101590

Reviewed by Sam Weinig.

Change HitTestResult from being a HitTestLocation to having a HitTestLocation.
A result of a test should not be a special case of the location of the test.

No change in functionality. No new tests.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::HitTestResult):
(WebCore::HitTestResult::operator=):
(WebCore::HitTestResult::isSelected):
(WebCore::HitTestResult::spellingToolTip):
(WebCore::HitTestResult::replacedString):
* rendering/HitTestResult.h:
(WebCore::HitTestResult::isRectBasedTest):
(WebCore::HitTestResult::pointInInnerNodeFrame):
(WebCore::HitTestResult::hitTestLocation):
(HitTestResult):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [WebGL] Save WebGL extensions and restore on replay
https://bugs.webkit.org/show_bug.cgi?id=103141

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-11-26
Reviewed by Yury Semikhatsky.

Save WebGL extensions that were enabled by the application, and restore it before the replay.
Drive-by: remove redundant if- checks in WebGL custom function wrappers (similar to 2D canvas).

* inspector/InjectedScriptCanvasModuleSource.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: object preview does not render node id, className; logs too many functions for jQuery.
https://bugs.webkit.org/show_bug.cgi?id=103222

Reviewed by Yury Semikhatsky.

Source/WebCore:

- Added node class name and id into the preview
- Now keeps track of properties separately from array indexes.

* inspector/InjectedScriptSource.js:
(.):
* inspector/InspectorOverlayPage.html:
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):

LayoutTests:

* inspector/console/command-line-api-expected.txt:
* inspector/console/console-dir-expected.txt:
* inspector/console/console-format-expected.txt:
* inspector/elements/event-listener-sidebar-expected.txt:
* inspector/elements/event-listeners-about-blank-expected.txt:
* platform/chromium/inspector/console/console-dir-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: unify agents handling in Page and Worker inspector controllers
https://bugs.webkit.org/show_bug.cgi?id=103238

Reviewed by Alexander Pavlov.

Introduced a class that represents a collection of inspector agents and allows
to call methods declared on InspectorAgentBaseInterface for all registered agents.
InspectorController and WorkerInspectorController switched to this class.

* inspector/InspectorBaseAgent.cpp:
(WebCore::InspectorAgentRegistry::append):
(WebCore):
(WebCore::InspectorAgentRegistry::setFrontend):
(WebCore::InspectorAgentRegistry::clearFrontend):
(WebCore::InspectorAgentRegistry::restore):
(WebCore::InspectorAgentRegistry::registerInDispatcher):
(WebCore::InspectorAgentRegistry::discardAgents):
* inspector/InspectorBaseAgent.h:
(InspectorAgentRegistry):
(WebCore):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::~InspectorController):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::reconnectFrontend):
* inspector/InspectorController.h:
(InspectorController):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not reviewed: rolling out accidental TestExpectations change.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] buildfix after r135706.
https://bugs.webkit.org/show_bug.cgi?id=103249

The Windows implementation of GraphicsSurface cannot use
m_size anymore, as this member has been removed.
Further it needs to implement a platformSize() function.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:
(WebCore::GraphicsSurfacePrivate::size):
(WebCore::GraphicsSurface::platformPaintToTextureMapper):
(WebCore::GraphicsSurface::platformSize):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not reviewed: rolling out r135714 and r135712 for breaking debug tests.

Source/WebCore:

* inspector/InjectedScriptSource.js:
(.):
* inspector/InspectorOverlayPage.html:
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):

LayoutTests:

* inspector/console/command-line-api-expected.txt:
* inspector/console/command-line-api-inspect-expected.txt:
* inspector/console/console-dir-expected.txt:
* inspector/console/console-format-collections-expected.txt:
* inspector/console/console-format-expected.txt:
* inspector/elements/event-listener-sidebar-expected.txt:
* inspector/elements/event-listeners-about-blank-expected.txt:
* platform/chromium-linux/inspector/console/console-format-collections-expected.txt: Copied from LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt.
* platform/chromium/inspector/console/command-line-api-inspect-expected.txt:
* platform/chromium/inspector/console/console-dir-expected.txt:
* platform/chromium/inspector/console/console-format-collections-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][ARM] REGRESSION(r130826): It made 33 JSC test and 466 layout tests crash
https://bugs.webkit.org/show_bug.cgi?id=98857

Patch by Gabor Ballabas <gaborb@inf.u-szeged.hu> on 2012-11-26
Reviewed by Zoltan Herczeg.

Implement a new version of patchableBranch32 to fix crashing JSC
tests.

* assembler/MacroAssembler.h:
(MacroAssembler):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::patchableBranch32):
(MacroAssemblerARM):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Make use_default_render_theme compile the right set of files
https://bugs.webkit.org/show_bug.cgi?id=102952

Patch by Scott Violet <sky@chromium.org> on 2012-11-26
Reviewed by Kent Tamura.

* WebKit.gyp: Adds WebRenderTheme.* and updates rules as to when to compile them.
* features.gypi: Removes use_default_render_theme default values as common.gypi sets them.
* public/default: Added.
* public/default/WebRenderTheme.h: Copy of linux/WebRenderTheme.h
* src/default: Added.
* src/default/WebRenderTheme.cpp: Copy of linux/WebRenderTheme.cpp

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderSVGResourceContainer does not clear cached data on removal
https://bugs.webkit.org/show_bug.cgi?id=102620

Reviewed by Dirk Schulze.

Source/WebCore:

RenderSVGResourceContainer::removeClient needs to also remove the client from specialized
caches, otherwise we can end up with stale references.

Test: svg/custom/stale-resource-data-crash.svg

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::removeClient):

LayoutTests:

* svg/custom/stale-resource-data-crash-expected.txt: Added.
* svg/custom/stale-resource-data-crash.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: object preview does not render node id, className; logs too many functions for jQuery.
https://bugs.webkit.org/show_bug.cgi?id=103222

Reviewed by Yury Semikhatsky.

Source/WebCore:

- Added node class name and id into the preview
- Now keeps track of properties separately from array indexes.

* inspector/InjectedScriptSource.js:
(.):
* inspector/InspectorOverlayPage.html:
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):

LayoutTests:

* inspector/console/command-line-api-expected.txt:
* inspector/console/command-line-api-inspect-expected.txt:
* inspector/console/console-dir-expected.txt:
* inspector/console/console-format-collections-expected.txt:
* inspector/console/console-format-expected.txt:
* inspector/elements/event-listener-sidebar-expected.txt:
* inspector/elements/event-listeners-about-blank-expected.txt:
* platform/chromium-linux/inspector/console/console-format-collections-expected.txt: Removed.
* platform/chromium/inspector/console/command-line-api-inspect-expected.txt:
* platform/chromium/inspector/console/console-dir-expected.txt:
* platform/chromium/inspector/console/console-format-collections-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix Qt minimal compilation after r135713.

* inspector/InspectorController.h: hid file content behind ENABLE(INSPECTOR)

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewd Gardening: updated TestExpecations for additional failures in
media/video-preload.html
https://bugs.webkit.org/show_bug.cgi?id=103093

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: URLs containing '^' are improperly linked in console messages.
https://bugs.webkit.org/show_bug.cgi?id=103248

Reviewed by Yury Semikhatsky.

Source/WebCore:

This patch adds '^' to WebInspector's regex of acceptable characters for
URLs that it knows how to display.

Test: http/tests/inspector/network/script-as-text-loading-with-caret.html

* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):

LayoutTests:

* http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt: Added.
* http/tests/inspector/network/script-as-text-loading-with-caret.html: Added.
* platform/chromium/http/tests/inspector/network/script-as-text-loading-with-caret-expected.txt:
    JSC vs V8. :(


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for WinCE after r135640.

* wtf/DataLog.cpp:

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