[wk2] Don't send intrinsic content size updates more than once per runloop
https://bugs.webkit.org/show_bug.cgi?id=113258
<rdar://problem/13492038>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
Add a zero-delay timer for intrinsic content size updates.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Add a zero-delay timer for intrinsic content size updates.
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
Start our new one-shot zero-delay timer.
(WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
Inform the WebPage that the intrinsic content size has changed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] QML WebView asserts when double clicking a link
https://bugs.webkit.org/show_bug.cgi?id=113329

Reviewed by Jocelyn Turcotte.

Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30288

Remove an erroneous assert which is no longer valid if
mouse gestures are enabled.

* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::handleInputEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces
https://bugs.webkit.org/show_bug.cgi?id=113328

Reviewed by Jocelyn Turcotte.

Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249

We use QProcess::start() with a commandline string to start the web process
and the string is treated by QProcess as a whitespace delimeted list of the
command and the arguments, thus we have to escape the path to the process
binaries so that if the path contains spaces we still run the appropriate
command.

* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some entries since those tests have been passing.
Also update the test expectations for the bug 113227 flaky since they're passing most of the time.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Expose setSelectionIncludesAltImageText in WebSettings
https://bugs.webkit.org/show_bug.cgi?id=113316

Reviewed by Dimitri Glazkov.

Enabling this setting allows plain text clipboard content to include alt
text like on Firefox and IE10.

* public/WebSettings.h:
(WebSettings):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setSelectionIncludesAltImageText):
* src/WebSettingsImpl.h:
(WebSettingsImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Faster drawer animation.
https://bugs.webkit.org/show_bug.cgi?id=113330

250ms -> 100ms

Patch by Dmitry Zvorygin <zvorygin@chromium.org> on 2013-03-26
Reviewed by Pavel Feldman.

* inspector/front-end/inspector.css:
(.animate #main):
(.animate #floating-status-bar-container):
(.animate #drawer):
(.animate #bottom-status-bar-container > *):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update bots on test-results.appspot
https://bugs.webkit.org/show_bug.cgi?id=113333

Patch by Isaac Levy <ilevy@google.com> on 2013-03-26
Reviewed by Ojan Vafai.

* TestResultServer/static-dashboards/builders.jsonp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] In RSSFilterStream, don't swallow headers when there's no body
https://bugs.webkit.org/show_bug.cgi?id=113334

Patch by Joe Mason <jmason@blackberry.com> on 2013-03-26
Reviewed by Rob Buis.

RIM PR 316345

When receiving an HTTP response that has a Content-Type header such as text/xml, but no
body, RSSFilterStream::notifyHeadersReceived reads the Content-Type as "potential RSS", and
calls saveHeaders. It expects to sniff the body in notifyDataReceived to see if it's RSS,
and then call sendSavedHeaders to pass on the headers. But since there is no body,
notifyDataReceived is never called. So call sendSavedHeaders in notifyClose too (it will not
send them again if they were already sent.)

* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::RSSFilterStream::notifyClose):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove stray newline. This newline is messing up mozilla's test harness
and we share this file with them via html5lib.

* html5lib/resources/template.dat:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Autogenerate the scrollAnimatorEnabled setting in Settings.in
https://bugs.webkit.org/show_bug.cgi?id=113253

Reviewed by James Robinson.

Source/WebCore:

Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
updating the callers. I didn't change any WebKit API methods.

Also remove the code in InternalSettings since it's never used and will now be
autogenerated with proper resetting code.

No new tests, this is a refactor and should compile.

* page/Settings.cpp:
(WebCore::Settings::Settings): Remove code that is now autogenerated.
* page/Settings.h:
(Settings): Remove code that is now autogenerated.
* page/Settings.in: Add entry for scrollAnimatorEnabled.
* testing/InternalSettings.cpp: Remove unused code.
* testing/InternalSettings.h: Remove unused code.
* testing/InternalSettings.idl: Remove unused code.

Source/WebKit/chromium:

* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setEnableScrollAnimator): Update call to WebCore to use setScrollAnimatorEnabled(bool).

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings): Update call to WebCore to use setScrollAnimatorEnabled(bool).
(webkit_web_view_settings_notify): Update call to WebCore to use setScrollAnimatorEnabled(bool).

Source/WebKit/qt:

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply): Update call to WebCore to use setScrollAnimatorEnabled(bool).

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
(WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline text output for opaque GraphicsLayers
https://bugs.webkit.org/show_bug.cgi?id=109507

Unreviewed rebaseline.

* platform/chromium-linux-x86/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Removed.
* platform/chromium-linux/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium-linux/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt:
* platform/chromium-linux/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt:
* platform/chromium-linux/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt:
* platform/chromium-linux/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-overflow-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-overflow-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt.
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/chromium-win-xp/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-win/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt.
* platform/chromium/TestExpectations:
* platform/chromium/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt: Copied from LayoutTests/platform/chromium-linux/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt.
* platform/chromium/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt.
* platform/chromium/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt: Copied from LayoutTests/platform/chromium-linux/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt.
* platform/chromium/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt.
* platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-overflow-expected.txt: Copied from LayoutTests/platform/chromium-linux/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt.
* platform/chromium/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt.
* platform/chromium/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-overflow-expected.txt: Copied from LayoutTests/platform/chromium-linux/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt.
* platform/chromium/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flakiness dashboard: simplify logic around which tests to show.
https://bugs.webkit.org/show_bug.cgi?id=113250

Reviewed by Ojan Vafai.

The different filters for showing results are only used for layout
tests, otherwise, we show everything.

Change the defaults to false (what layout tests used), and only
look at the values when viewing layout tests.

* TestResultServer/static-dashboards/flakiness_dashboard.js:
(htmlForTestsWithExpectationsButNoFailures):
(shouldHideTest):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert test from UTF-16 to UTF-8

Rubber stamped by James Robinson.

* fast/dom/34176.html: Convert from little endian UTF-16 to UTF-8
to make git diff happy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] Don't send intrinsic content size updates more than once per runloop
https://bugs.webkit.org/show_bug.cgi?id=113258
<rdar://problem/13492038>

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
Only start the zero-delay timer if it's not already active.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
        https://bugs.webkit.org/show_bug.cgi?id=113256

        Reviewed by Brady Eidson.

        Added a new code path in ResourceHandle/ResourceHandleClient that doesn't need
        blocking calls. Implemented it for NSURLConnection by changing NSOperationQueue
        version to forward calls to main thread.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Set mouse document position for mouse event in updateCursor
https://bugs.webkit.org/show_bug.cgi?id=109094

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-03-26
Reviewed by Rob Buis.

Internally Reviewed by Jakob Petsovits.

Mouse content position should be in document coordinate.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::updateCursor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Follow-up to:
        <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
        https://bugs.webkit.org/show_bug.cgi?id=113256

        Reviewed by Mark Rowe.

        * NetworkProcess/NetworkResourceLoader.h: Added some forgotten OVERRIDEs.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
https://bugs.webkit.org/show_bug.cgi?id=113144

Source/JavaScriptCore: 

Reviewed by Geoffrey Garen.
        
Added the ability to save profiler output with JSC_enableProfiler=true. It will save it
to the current directory, or JSC_PROFILER_PATH if the latter was specified.
        
This works by saving the Profiler::Database either when it is destroyed or atexit(),
whichever happens first.
        
This allows use of the profiler from any WebKit client.

* jsc.cpp:
(jscmain):
* profiler/ProfilerDatabase.cpp:
(Profiler):
(JSC::Profiler::Database::Database):
(JSC::Profiler::Database::~Database):
(JSC::Profiler::Database::registerToSaveAtExit):
(JSC::Profiler::Database::addDatabaseToAtExit):
(JSC::Profiler::Database::removeDatabaseFromAtExit):
(JSC::Profiler::Database::performAtExitSave):
(JSC::Profiler::Database::removeFirstAtExitDatabase):
(JSC::Profiler::Database::atExitCallback):
* profiler/ProfilerDatabase.h:
(JSC::Profiler::Database::databaseID):
(Database):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):

Source/WTF: 

Reviewed by Geoffrey Garen.
        
I got tired of the fact that getpid(2) is not a syscall on Windows (unless you do
_getpid() I believe), so I wrote a header that abstracts it. I also changed existing
code that uses getpid() to use WTF::getCurrentProcessID().

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::dumpProfile):
* wtf/ProcessID.h: Added.
(WTF):
(WTF::getCurrentProcessID):
* wtf/text/StringImpl.cpp:
(WTF::StringStats::printStats):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
https://bugs.webkit.org/show_bug.cgi?id=113144

Reviewed by Geoffrey Garen.
        
Forgot to include Geoff's requested change in the original commit.

* profiler/ProfilerDatabase.cpp:
(Profiler):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Include accelerated compositing layers in screen captures.
https://bugs.webkit.org/show_bug.cgi?id=113335

Patch by Mike Lattanzio <mlattanzio@blackberry.com> on 2013-03-26
Reviewed by Rob Buis.

PR# 280374
Include accelerated compositing layers in screen captures.
Reviewed Internally By: Jakob Petsovits

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::render):
(BlackBerry::WebKit::BackingStorePrivate::renderContents):
(BlackBerry::WebKit::BackingStore::drawContents):
* Api/BackingStore_p.h:

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