[Qt] When calling accept() on the FilePickerContextObject with an empty list, early return and call reject().
https://bugs.webkit.org/show_bug.cgi?id=89755

Reviewed by Simon Hausmann.

When calling accept with an empty list of files we can just bailout
and call reject(). Any other processing is pointless.

       * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml:
       * UIProcess/qt/QtDialogRunner.cpp:
(WebKit::FilePickerContextObject::accept):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] Fix broken QtWebKit5.lib linking
https://bugs.webkit.org/show_bug.cgi?id=88321

Patch by Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>  Joel Dillon <joel.dillon@codethink.co.uk> on 2012-07-03
Reviewed by Kenneth Rohde Christiansen.

Source/JavaScriptCore:

The goal is to have different ports build systems define STATICALLY_LINKED_WITH_WTF
when building JavaScriptCore, if both are packaged in the same DLL, instead
of relying on the code to handle this.
The effects of BUILDING_* and STATICALLY_LINKED_WITH_* are currently the same
except for a check in Source/JavaScriptCore/config.h.

Keeping the old way for the WX port as requested by the port's contributors.
For non-Windows ports there is no difference between IMPORT and EXPORT, no
change is needed.

* API/JSBase.h:
  JS symbols shouldn't be included by WTF objects anymore. Remove the export when BUILDING_WTF.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  Make sure that JavaScriptCore uses import symbols of WTF for the Win port.
* runtime/JSExportMacros.h:

Source/WebCore:

* platform/PlatformExportMacros.h:

Source/WTF:

Instead of letting a module's headers know which other modules depend on them,
have depending modules define explicitely that they want its symbols exported too.

JavaScriptCore should then be compiled with both BUILDING_JavaScriptCore and
STATICALLY_LINKED_WITH_WTF.

* wtf/ExportMacros.h:

Tools:

On windows the import/export definition is part of the symbol's signature.
Define STATICALLY_LINKED_WITH_$$library for each dependend module
that is being linked statically to make sure that they can be linked together
later on.

Also do not compile Assertions.cpp in DumpRenderTree anymore since all the
used symbols are exported and it would cause a duplicate symbols error.

* DumpRenderTree/qt/DumpRenderTree.pro:
* qmake/mkspecs/features/default_post.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: display time intervals measured with console.time() and console.timeEnd() in Timeline
https://bugs.webkit.org/show_bug.cgi?id=90442

Reviewed by Pavel Feldman.

Source/WebCore:

- added Time and TimeEnd record types produced by console.time() and console.timeEnd()
- connect Time to TimeEnd in "glue" mode to better visualize the interval;
- always make Time a top-level record;

* English.lproj/localizedStrings.js:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::startConsoleTimingImpl):
(WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
* inspector/InspectorTimelineAgent.cpp:
(TimelineRecordType):
(WebCore::InspectorTimelineAgent::didStartTiming):
(WebCore):
(WebCore::InspectorTimelineAgent::didStopTiming):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):
* inspector/front-end/TimelineModel.js:
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.recordStyle):
(WebInspector.TimelinePresentationModel.categoryForRecord):
(WebInspector.TimelinePresentationModel.prototype.reset):
(WebInspector.TimelinePresentationModel.prototype.addRecord):
(WebInspector.TimelinePresentationModel.prototype._findParentRecord):
(WebInspector.TimelinePresentationModel.Record):
(WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):

LayoutTests:

- added Time & TimeEnd;

* inspector/timeline/timeline-enum-stability-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[REGRESSION] Crash when copying a StyleRuleMedia with a NULL m_mediaQueries
https://bugs.webkit.org/show_bug.cgi?id=90459

Reviewed by Andreas Kling.

Source/WebCore:

Create StyleRuleMedia with a non-NULL MediaQuerySet. The respective NULL checks for it were all over the code,
except the copy constructor. Added the check, just in case.

* css/CSSParser.cpp:
(WebCore::CSSParser::createMediaRule):
* css/StyleRule.cpp:
(WebCore::StyleRuleMedia::StyleRuleMedia):

LayoutTests:

* inspector/styles/get-set-stylesheet-text-expected.txt:
* inspector/styles/resources/get-set-stylesheet-text.css:
(@media):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
inspector/debugger/script-snippet-model.html fails
https://bugs.webkit.org/show_bug.cgi?id=90385

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/ScriptSnippetModel.js:

LayoutTests:

* inspector/debugger/script-snippet-model-expected.txt:
* platform/chromium/inspector/debugger/script-snippet-model-expected.txt: Copied from LayoutTests/inspector/debugger/script-snippet-model-expected.txt.
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make use of .qmake.cache for caching features

Instead of loading() features from the files that need them (and re-running
a bunch of checks), we now run feature detection as part of configure.pro,
and have build-webkit write the computed feature-defines and CONFIG to
.qmake.cache, which is then loaded by qmake _before_ even defaults_pre
when building WebKit.pro.

At some point we'll be able to selectivly prevent running of config tests
in configure.pro, which means we don't need a separate code-path for
the build-webkit --help case.

We should also move the code in build-webkit that now uses .webkit.config
to detect clean builds, to use .qmake.cache, since we now store the same
thing there.

Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

https://bugs.webkit.org/show_bug.cgi?id=90461

Reviewed by Tor Arne Vestbø.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Forward message loop instrumentation data to frontend.
https://bugs.webkit.org/show_bug.cgi?id=89584

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-07-03
Reviewed by Yury Semikhatsky.

Transmit collected message loop tasks to inspector frontend.
Now "Program" should be a top-level event on browsers that
support message loop instrumentation.
Frontend was changed so that user will not see any changes.

Source/WebCore:

* inspector/InspectorTimelineAgent.cpp:
(TimelineRecordType):
Added new event type - "Program"
(WebCore::InspectorTimelineAgent::willProcessTask):
Begin "Program" event.
(WebCore::InspectorTimelineAgent::didProcessTask):
Finish "Program" event.
(WebCore::InspectorTimelineAgent::setHeapSizeStatistic):
Do not add counters to "Program" events.
(WebCore):
(WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic):
Renamed from "setHeapSizeStatistic"
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):
* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics.prototype._onRecordAdded):
Unwraps "Program" events.
(WebInspector.MemoryStatistics.prototype._innerRecordAdded):
Renamed from "_onRecordAdded"
* inspector/front-end/TimelineFrameController.js:
(WebInspector.TimelineFrameController.prototype._addRecord):
Unwraps "Program" events.
(WebInspector.TimelineFrameController.prototype._innerAddRecord):
Renamed from "_addRecord"
* inspector/front-end/TimelineModel.js:
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineCategoryStrips.prototype.update.appendRecord):
Filter out "Program" category.
(WebInspector.TimelineCategoryStrips.prototype.update):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._createStatusbarButtons):
Filter out "Program" category.
(WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
Unwraps "Program" events.
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.categories):
Added "Program" category.
(WebInspector.TimelinePresentationModel.recordStyle):
Ditto.
(WebInspector.TimelinePresentationModel.prototype.addRecord):
Unwraps "Program" events.
(WebInspector.TimelinePresentationModel.prototype._addRecord):
Renamed from "addRecord"

LayoutTests:

* inspector/timeline/timeline-enum-stability-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add run API tests as a step on the build bots
https://bugs.webkit.org/show_bug.cgi?id=87252

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-07-03
Reviewed by Daniel Bates.

Run EFL API test suite on the build bots.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunEflAPITests):
(TestFactory.__init__):
(BuildAndTestFactory.__init__):
* Scripts/run-efl-tests: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] API tests randomly asserts in QQuickWebPage::setContentsScale(qreal)
https://bugs.webkit.org/show_bug.cgi?id=88679

Reviewed by Csaba Osztrogonác.

Viewport parameters cannot be calculated while viewport is not visible and
viewport size is 0, so let's delay calculation of viewport parameters until view
becomes visible.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::pageContentsSizeChanged):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Added missing WebPageProxy::ViewIsFocused flag to WebPageProxy::viewStateDidChange()
call in _ewk_view_smart_focus_out() function.
https://bugs.webkit.org/show_bug.cgi?id=89877

Patch by Piotr Roguski <p.roguski@samsung.com> on 2012-07-03
Reviewed by Andreas Kling.

Although name of the flag suggest it should be used only on focus in,
omitting it in case of focus out will prevent WebPageProxy::viewStateDidChange()
from sending Messages::WebPage::SetFocused(false).

* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_focus_out):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add WebKitWebView::context-menu-dismissed signal to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=90386

Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init): Add context-menu-dismissed signal.
(contextMenuDismissed): Emit context-menu-dismissed signal.
(webkitWebViewPopulateContextMenu): Connect to deactivate signal
of the GtkMenu and emit WebKitWebView::context-menu-dismissed when
the gtk menu is deactivated.
* UIProcess/API/gtk/WebKitWebView.h:
(_WebKitWebViewClass): Add virtual methos for
context-menu-dismissed signal.
* UIProcess/API/gtk/tests/TestContextMenu.cpp:
(testContextMenuDismissed):
(beforeAll):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::gtkMenu): Get the GtkMenu built
for the context menu proxy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Need to bump libsoup requirements (for `soup_cookie_jar_get_cookie_list`)
https://bugs.webkit.org/show_bug.cgi?id=90332

Patch by Priit Laes <plaes@plaes.org> on 2012-07-03
Reviewed by Gustavo Noronha Silva.

* configure.ac: Bump libsoup requirements to 2.39.2

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
https://bugs.webkit.org/show_bug.cgi?id=90422

Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake:

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore):
(WebCore::ChromeClientBlackBerry::registerProtocolHandler):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Tools:

* Scripts/webkitperl/FeatureList.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
https://bugs.webkit.org/show_bug.cgi?id=90422

Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake:

Source/WebCore:

* page/NavigatorRegisterProtocolHandler.cpp:
(WebCore::initProtocolHandlerWhitelist): Disable the overrides as
                                         they're undesired by BlackBerry

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore):
(WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
(WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Tools:

* Scripts/webkitperl/FeatureList.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r121766.
http://trac.webkit.org/changeset/121766
https://bugs.webkit.org/show_bug.cgi?id=90465

It caused flakey build errors on the bots (Requested by Ossy
on #webkit).

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

.:

* Source/QtWebKit.pro:
* Source/api.pri:
* Source/tests.pri:
* WebKit.pro:

Source/WebCore:

* DerivedSources.pri:
* WebCore.pri:

Source/WebKit/qt:

* declarative/declarative.pro:
* declarative/public.pri:
* tests/qgraphicswebview/qgraphicswebview.pro:

Source/WebKit2:

* DerivedSources.pri:
* Target.pri:

Source/WTF:

* WTF.pri:

Tools:

* DumpRenderTree/qt/DumpRenderTree.pro:
* QtTestBrowser/QtTestBrowser.pro:
* Scripts/webkitdirs.pm:
(qtFeatureDefaults):
(buildQMakeProjects):
* Tools.pro:
* WebKitTestRunner/InjectedBundle/DerivedSources.pri:
* WebKitTestRunner/InjectedBundle/Target.pri:
* WebKitTestRunner/Target.pri:
* qmake/.qmake.conf: Removed.
* qmake/configure.pro:
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/default_pre.prf:
* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-Wunused-private-field cleanup, linux edition
https://bugs.webkit.org/show_bug.cgi?id=90463

Reviewed by Stephen White.

* DumpRenderTree/chromium/DRTDevToolsAgent.h:
* DumpRenderTree/chromium/GamepadController.h:
(GamepadController):
* DumpRenderTree/chromium/NotificationPresenter.h:
(NotificationPresenter::NotificationPresenter):
(NotificationPresenter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make use of .qmake.cache for caching features

Instead of loading() features from the files that need them (and re-running
a bunch of checks), we now run feature detection as part of configure.pro,
and have build-webkit write the computed feature-defines and CONFIG to
.qmake.cache, which is then loaded by qmake _before_ even defaults_pre
when building WebKit.pro.

At some point we'll be able to selectivly prevent running of config tests
in configure.pro, which means we don't need a separate code-path for
the build-webkit --help case.

We should also move the code in build-webkit that now uses .webkit.config
to detect clean builds, to use .qmake.cache, since we now store the same
thing there.

Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

https://bugs.webkit.org/show_bug.cgi?id=90461

Reviewed by Tor Arne Vestbø.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Introduce Workspace make it UISourceCode provider for ScriptsPanel.
https://bugs.webkit.org/show_bug.cgi?id=90466

Reviewed by Pavel Feldman.

Introduced WebInspector.Workspace as a model (UISourceCode provider) behind ScriptsPanel.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/Workspace.js: Added.
(WebInspector.CompositeUISourceCodeProvider):
(WebInspector.CompositeUISourceCodeProvider.prototype._registerUISourceCodeProvider):
(WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeAdded):
(WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeReplaced):
(WebInspector.CompositeUISourceCodeProvider.prototype._handleUISourceCodeRemoved):
(WebInspector.CompositeUISourceCodeProvider.prototype.uiSourceCodes):
(WebInspector.Workspace):
(WebInspector.Workspace.prototype.registerUISourceCodeProvider):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable microdata support for BlackBerry.
https://bugs.webkit.org/show_bug.cgi?id=90429

Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake:

Tools:

* Scripts/webkitperl/FeatureList.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium mac rebaseline.

* platform/chromium-linux-x86/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt:
* platform/chromium-mac-snowleopard/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png: Removed.
* platform/chromium-mac-snowleopard/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt:
* platform/chromium-mac/http/tests/misc/acid3-expected.txt:
* platform/chromium-mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png:
* platform/chromium-mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt:
* platform/chromium-mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.png:
* platform/chromium-mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt:
* platform/chromium-win-xp/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt:


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