Web Inspector: [Elements] Sidebar panes not updated on style changes due to "class" attribute modifications
https://bugs.webkit.org/show_bug.cgi?id=95722

Reviewed by Vsevolod Vlasov.

Source/WebCore:

The DOMAgent StyleInvalidated event has been removed in favor of the StylesSidebarPane explicitly listening on the
AttrModified/AttrRemoved events that result in those same updates.

* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype._attributeModified):
(WebInspector.DOMAgent.prototype._loadNodeAttributes):
(WebInspector.DOMAgent.prototype._childNodeRemoved):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype.updateSelection): Drive-by: avoid a costly synchronous layout during DOM tree updates.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane):
(WebInspector.StylesSidebarPane.prototype._attributeChanged):
(WebInspector.StylesSidebarPane.prototype._canAffectCurrentStyles):

LayoutTests:

* inspector/elements/edit-style-attribute.html: Renamed events on which to listen.
* inspector/styles/override-screen-size.html: Drive-by: fixed race condition that was resulting in this test's failures.
* inspector/styles/styles-update-from-js-expected.txt:
* inspector/styles/styles-update-from-js.html: Added test cases for style updates on ancestor and sibling attributes' changes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Make DumpRenderTree smarter at finding the fonts
http://webkit.org/b/96281

Reviewed by Gyuyoung Kim.

Respect WEBKITOUTPUTDIR and expand the font dir from it.
Use CString consistently.

* DumpRenderTree/efl/FontManagement.cpp:
(buildPath):
(getCoreFontFiles):
(addFontDirectory):
(addFontFiles):
(getCustomBuildDir):
(getPlatformFontsPath):
(addFontsToEnvironment):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Protocol Extension: Add "regionLayoutUpdate" event
https://bugs.webkit.org/show_bug.cgi?id=93443

Patch by Andrei Poenaru <poenaru@adobe.com> on 2012-09-12
Reviewed by Alexander Pavlov.

Source/WebCore:

Added "regionLayoutUpdate" event to the protocol.

Removed "getFlowByName" from protocol.

The front-end keeps in sync the requested Named Flow Collections.

Modified existing test: inspector/styles/protocol-css-regions-commands.html

* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::ensureFlowWithName):
(WebCore::NamedFlowCollection::discardNamedFlow):
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(UpdateRegionLayoutTask):
(WebCore):
(WebCore::UpdateRegionLayoutTask::UpdateRegionLayoutTask):
(WebCore::UpdateRegionLayoutTask::scheduleFor):
(WebCore::UpdateRegionLayoutTask::unschedule):
(WebCore::UpdateRegionLayoutTask::reset):
(WebCore::UpdateRegionLayoutTask::onTimer):
(WebCore::InspectorCSSAgent::reset):
(WebCore::InspectorCSSAgent::didCreateNamedFlow):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::InspectorCSSAgent::didUpdateRegionLayout):
(WebCore::InspectorCSSAgent::regionLayoutUpdated):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::documentNodeWithRequestedFlowsId):
* inspector/InspectorCSSAgent.h:
(WebCore):
(InspectorCSSAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
(WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl):
(WebCore::InspectorInstrumentation::didUpdateRegionLayoutImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didCreateNamedFlow):
(WebCore::InspectorInstrumentation::willRemoveNamedFlow):
(WebCore):
(WebCore::InspectorInstrumentation::didUpdateRegionLayout):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync.callback):
(WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
(WebInspector.CSSStyleModel.prototype.getFlowByNameAsync.callback):
(WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
(WebInspector.CSSStyleModel.prototype._namedFlowCreated):
(WebInspector.CSSStyleModel.prototype._namedFlowRemoved):
(WebInspector.CSSStyleModel.prototype._regionLayoutUpdated):
(WebInspector.CSSStyleModel.prototype._resetNamedFlowCollections):
(WebInspector.CSSDispatcher.prototype.namedFlowCreated):
(WebInspector.CSSDispatcher.prototype.namedFlowRemoved):
(WebInspector.CSSDispatcher.prototype.regionLayoutUpdated):
(WebInspector.NamedFlow):
(WebInspector.NamedFlowCollection):
(WebInspector.NamedFlowCollection.prototype._appendNamedFlow):
(WebInspector.NamedFlowCollection.prototype._removeNamedFlow):
(WebInspector.NamedFlowCollection.prototype.flowByName):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):

LayoutTests:

Validate "regionLayoutUpdate" event.

* inspector/styles/protocol-css-regions-commands-expected.txt:
* inspector/styles/protocol-css-regions-commands.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Build on X11 with GraphicsSurface but without NPAPI is broken
https://bugs.webkit.org/show_bug.cgi?id=96495

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-12
Reviewed by Kenneth Rohde Christiansen.

When enabling NPAPI we link against XRender on X11. The other component that needs Xrender
is GraphicsSurface. So when building without NPAPI we need to make sure that we link in Xrender.

This patch cleans up the GraphicsSurface related linkage required on Mac OS X and X11 by wrapping
it in use?(graphics_surface) instead of 3D_GRAPHICS. It is not neccesary to perform the have?(XCOMPOSITE)
check anymore because it's already done in features.prf before enabling use_graphics_surface in the
first place.

* WebCore.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make it possible to build with "make release" and "make debug" on Windows
https://bugs.webkit.org/show_bug.cgi?id=96488

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-12
Reviewed by Tor Arne Vestbø.

A "make debug" is passed through recursively and currently it aborts at Makefile.DerivedSources
because there are no such targets. We want the generated sources to be independent from release
or debug build configurations, so it is sufficient to provide fake debug and release targets that
redirect to the same general-purpose target (first) of creating the derived sources.

* qmake/mkspecs/features/default_post.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r128280.
http://trac.webkit.org/changeset/128280
https://bugs.webkit.org/show_bug.cgi?id=96498

it broke compilation on windows debug bot (Requested by loislo
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-12

Source/WebKit2:

* Shared/APIClientTraits.cpp:
(WebKit):
* Shared/APIClientTraits.h:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetApplicationCacheOriginQuota):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
(WebKit):
(InjectedBundlePageUIClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
(InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix the build with ENABLE_NETSCAPE_PLUGIN_API=0
https://bugs.webkit.org/show_bug.cgi?id=96494

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-12
Reviewed by Tor Arne Vestbø.

WK2's ENABLE_PLUGIN_PROCESS uses the NPAPI functions unconditionally, so disable the
plugin process feature if we don't have NPAPI.

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Audio device not closed after playing sound
https://bugs.webkit.org/show_bug.cgi?id=89122

Reviewed by Martin Robinson.

Set the GStreamer pipeline to NULL instead of PAUSED on EOS. This
allows the audio-sink to release its connection to the audio
device. This is done only if the Media element is not
looping. To make the MediaPlayerPrivate layer aware of that
information the MediaPlayerClient interface was updated with a new
method mediaPlayerIsLooping, implemented by the HTMLMediaElement.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerIsLooping): Implementation of
MediaPlayerClient::mediaPlayerLoop, proxies to ::loop();
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerIsLooping): New method allowing
the MediaPlayer and its backend to know if a playback loop is
requested by the client.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): Report
seek time or media duration if EOS was reached. These early
returns are needed because the position query doesn't work on a
NULL pipeline.
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
Refactored to use an early return.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Reset the
seeking flag.
(WebCore::MediaPlayerPrivateGStreamer::play): reset m_isEndReached.
(WebCore::MediaPlayerPrivateGStreamer::pause): Don't pause on EOS.
(WebCore::MediaPlayerPrivateGStreamer::seek): Refactor, call
currentTime() after we're sure playbin is valid and no error occured.
(WebCore::MediaPlayerPrivateGStreamer::paused): Fake paused state
on EOS.

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