Web Inspector: Add requestFileContent command and fileContentReceived event
https://bugs.webkit.org/show_bug.cgi?id=89642

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-07-02
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Test: http/tests/inspector/filesystem/read-file.html

* inspector/Inspector.json:
* inspector/InspectorFileSystemAgent.cpp:
(WebCore):
(WebCore::InspectorFileSystemAgent::requestFileContent):
* inspector/InspectorFileSystemAgent.h:
(InspectorFileSystemAgent):
* inspector/front-end/FileSystemModel.js:
(WebInspector.FileSystemModel.prototype.requestMetadata):
(WebInspector.FileSystemModel.prototype.requestFileContent):
(WebInspector.FileSystemModel.File.prototype.get resourceType):
(WebInspector.FileSystemModel.File.prototype.requestFileContent):
(WebInspector.FileSystemRequestManager):
(WebInspector.FileSystemRequestManager.prototype._metadataReceived):
(WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted):
(WebInspector.FileSystemRequestManager.prototype.requestFileContent):
(WebInspector.FileSystemRequestManager.prototype._fileContentReceived):
(WebInspector.FileSystemDispatcher.prototype.metadataReceived):
(WebInspector.FileSystemDispatcher.prototype.fileContentReceived):

LayoutTests:

* http/tests/inspector/filesystem/read-file-expected.txt: Added.
* http/tests/inspector/filesystem/read-file.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: replace recursion with a stack in DOM nodes snapshot traversal.
https://bugs.webkit.org/show_bug.cgi?id=89889

Number of DOM nodes native snapshots can handle was limited
by the process stack size because of recursion used to traverse the nodes.
The patch changes the recursion to a stack based algorithm.

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-07-02
Reviewed by Yury Semikhatsky.

* dom/MemoryInstrumentation.h:
(MemoryInstrumentation):
(InstrumentedPointerBase):
(WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
(InstrumentedPointer):
(WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
(WebCore::MemoryInstrumentation::reportInstrumentedPointer):
(WebCore):
(WebCore::::process):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed build fix with ENABLE_NETSCAPE_PLUGIN_API after r121467.

* plugins/efl/PluginPackageEfl.cpp:
(WebCore::PluginPackage::load): Move the declaration of `err'
before the first `goto' statement.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Rename NotificationPresenterEfl with NotificationClientEfl
https://bugs.webkit.org/show_bug.cgi?id=90370

Reviewed by Csaba Osztrogonác.

Source/WebKit:

Bug 80488 renamed NotificationPresenter with NotificationClient. So, EFL port needs to adjust
it as well.

* PlatformEfl.cmake:

Source/WebKit/efl:

Bug 80488 renamed NotificationPresenter with NotificationClient. So, EFL port needs to adjust it as well.

* WebCoreSupport/ChromeClientEfl.cpp:
* WebCoreSupport/NotificationClientEfl.cpp: Renamed from Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp.
(WebCore):
(WebCore::NotificationClientEfl::NotificationClientEfl):
(WebCore::NotificationClientEfl::~NotificationClientEfl):
(WebCore::NotificationClientEfl::show):
(WebCore::NotificationClientEfl::cancel):
(WebCore::NotificationClientEfl::notificationObjectDestroyed):
(WebCore::NotificationClientEfl::notificationControllerDestroyed):
(WebCore::NotificationClientEfl::requestPermission):
(WebCore::NotificationClientEfl::checkPermission):
(WebCore::NotificationClientEfl::cancelRequestsForPermission):
* WebCoreSupport/NotificationClientEfl.h: Renamed from Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.h.
(WebCore):
(NotificationClientEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, update expected files, skip new failing tests.

* platform/qt-5.0-wk2/Skipped: Skip fast/viewport/viewport-91.html because of bug90376.
* platform/qt-5.0/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: Updated after r121599.
* platform/qt-5.0/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt: Updated after r121599.
* platform/qt/Skipped: Skip inspector/debugger/script-snippet-model.html because of bug90385.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Don't run the tests with jhbuild wrapper if it's already running under jhbuild
https://bugs.webkit.org/show_bug.cgi?id=89435

Reviewed by Martin Robinson.

* Scripts/new-run-webkit-tests: Don't run the tests with the
jhbuild wrapper if there isn't a Dependencies directory inside the
build directory.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] [WK2] Remove content sniffer and decoder initialization from WebProcess
https://bugs.webkit.org/show_bug.cgi?id=90275

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-07-02
Reviewed by Martin Robinson.

Do not initialize content sniffer and decoder in the WebProcess
because the initialization is now done in WebCore.

* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
A start "body" tag in the "in body" insertion mode is a parse error
https://bugs.webkit.org/show_bug.cgi?id=90373

Patch by Kwang Yul Seo <skyul@company100.net> on 2012-07-02
Reviewed by Eric Seidel.

According to HTML5 specification (http://www.w3.org/TR/html5/tree-construction.html#parsing-main-inbody),
a start "body" tag in the "in body" insertion mode is a parse error. So parseError(token) is required here.
No behavior change because parseError(token) is just a marker.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Read fonts path when running layout tests from alternative fonts dir when main dir doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=89437

Reviewed by Martin Robinson.

If main fonts directory doesn't exist, try with an alternative
fonts directory at build directory.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(getOutputDir):
(getFontsPath):
(initializeFonts):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getOutputDir):
(WTR):
(WTR::getFontsPath):
(WTR::inititializeFontConfigSetting):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
This test is a flaky crash on the cr-linux-ews, which is causing the
bot to be very slow in processing patches and to spam bugs with false
failures. Mark this test as flaky while we investigate.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix WebProcess crash on Mac when accessing a site with video tag.
https://bugs.webkit.org/show_bug.cgi?id=90384

Reviewed by Jocelyn Turcotte.

We need to initialize the private symbols used by MediaPlayerPrivateQTKit
otherwise they will be null and it will lead to a crash. We copy WebSystemInterface
files for WK2 just like the Mac port as WK2 may have different needs than WK1 layer (we
may add or remove symbols in here). It doesn't fix the video rendering yet but it's
first step.

* Target.pri:
* WebProcess/WebCoreSupport/qt/WebSystemInterface.h: Added.
* WebProcess/WebCoreSupport/qt/WebSystemInterface.mm: Added.
(InitWebCoreSystemInterfaceForWK2):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed: Fix a flexbox reftest that was failing on most platforms.

Remove the test case that caused the image diff.  I'll try to come up
with a different way to test this.

* css3/flexbox/anonymous-block-expected.html:
* css3/flexbox/anonymous-block.html:
* platform/chromium/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium expectations update.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MICRODATA] Build failure in html/HTMLPropertiesCollection.h
https://bugs.webkit.org/show_bug.cgi?id=90379

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-02
Reviewed by Ryosuke Niwa.

Switch HTMLCollection::append() visibility from private
to protected so that HTMLPropertiesCollection subclass
can call it. This fixes build when MICRODATA flag is
turned on.

No new tests, build fix.

* html/HTMLCollection.h:
(HTMLCollectionCacheBase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: incorrect height of main timeline pane after switching to memory mode
https://bugs.webkit.org/show_bug.cgi?id=90387

Reviewed by Pavel Feldman.

- update cached container height when setting vertical splitter position.

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.set _setSplitterPosition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Update MediaStreamTrackList to match the specification
https://bugs.webkit.org/show_bug.cgi?id=90171

Reviewed by Adam Barth.

Source/Platform:

The latest update to the specification added add and remove methods with corresponding callbacks.
The callbacks can be triggered both from JS and from the platform layer.

* chromium/public/WebMediaStreamCenterClient.h:
(WebKit):
(WebMediaStreamCenterClient):

Source/WebCore:

The latest update to the specification added add and remove methods with corresponding callbacks.
The callbacks can be triggered both from JS and from the platform layer.

Test: fast/mediastream/MediaStreamTrackList.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::streamEnded):
(WebCore::MediaStream::addTrack):
(WebCore):
(WebCore::MediaStream::removeTrack):
* Modules/mediastream/MediaStream.h:
(MediaStream):
* Modules/mediastream/MediaStreamTrackEvent.cpp: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.cpp.
(WebCore):
(WebCore::MediaStreamTrackEvent::create):
(WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent):
(WebCore::MediaStreamTrackEvent::~MediaStreamTrackEvent):
(WebCore::MediaStreamTrackEvent::track):
(WebCore::MediaStreamTrackEvent::interfaceName):
* Modules/mediastream/MediaStreamTrackEvent.h: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.h.
(WebCore):
(MediaStreamTrackEvent):
* Modules/mediastream/MediaStreamTrackEvent.idl: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.idl.
* Modules/mediastream/MediaStreamTrackList.cpp:
(WebCore::MediaStreamTrackList::create):
(WebCore::MediaStreamTrackList::MediaStreamTrackList):
(WebCore::MediaStreamTrackList::detachOwner):
(WebCore):
(WebCore::MediaStreamTrackList::add):
(WebCore::MediaStreamTrackList::remove):
(WebCore::MediaStreamTrackList::stop):
(WebCore::MediaStreamTrackList::interfaceName):
(WebCore::MediaStreamTrackList::scriptExecutionContext):
(WebCore::MediaStreamTrackList::eventTargetData):
(WebCore::MediaStreamTrackList::ensureEventTargetData):
* Modules/mediastream/MediaStreamTrackList.h:
(MediaStreamTrackList):
* Modules/mediastream/MediaStreamTrackList.idl:
* WebCore.gypi:
* dom/EventNames.h:
(WebCore):
* dom/EventNames.in:
* dom/EventTargetFactory.in:
* platform/mediastream/MediaStreamCenter.cpp:
(WebCore::MediaStreamCenter::addMediaStreamTrack):
(WebCore):
(WebCore::MediaStreamCenter::removeMediaStreamTrack):
* platform/mediastream/MediaStreamCenter.h:
(MediaStreamCenter):
* platform/mediastream/MediaStreamDescriptor.h:
(MediaStreamDescriptorOwner):
* platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
(WebCore::MediaStreamCenterChromium::didAddMediaStreamTrack):
(WebCore):
(WebCore::MediaStreamCenterChromium::didRemoveMediaStreamTrack):
(WebCore::MediaStreamCenterChromium::addMediaStreamTrack):
(WebCore::MediaStreamCenterChromium::removeMediaStreamTrack):
* platform/mediastream/chromium/MediaStreamCenterChromium.h:
(WebKit):
(MediaStreamCenterChromium):
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::didAddMediaStreamTrack):
(WebCore):
(WebCore::MediaStreamCenterGStreamer::didRemoveMediaStreamTrack):
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
(MediaStreamCenterGStreamer):

LayoutTests:

* fast/mediastream/MediaStreamTrackList-expected.txt: Added.
* fast/mediastream/MediaStreamTrackList.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Microdata: Fix build failure after r121580.
https://bugs.webkit.org/show_bug.cgi?id=90378

Reviewed by Ryosuke Niwa.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::properties):
* html/HTMLElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up slow HTTP tests on GTK platform

Rubber-stamped by Martin Robinson.

Skip the HTTP tests that take half a minute to run, most oftenly failing
as well. These tests only extend the overall testing time.
Also group the tests failing due to missing authentication handling in DRT,
missing multipart/x-mixed-replace support in libsoup and open a new bug
for the failing http/tests/plugins/plugin-document-has-focus.html test.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gtk] Many tests revealed as passing after moving from Skipped to test_expectations.txt
https://bugs.webkit.org/show_bug.cgi?id=85591

Reviewed by Martin Robinson.

Create a new category for test failures that only fail on specific architecture. Tests
under this category are essentially marked as flaky, but in reality only fail on the
build architecture under which they are listed. This is a convenient workaround for
keeping tests from being recognized as newly-passing on architectures where the failure
does not occur.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix posting from garden-o-matic. This broke in moving away from jquery's ajax method
in http://trac.webkit.org/changeset/121617.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/net.js:

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