[Qt][NRWT] Enable cascaded TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=89108

Patch by János Badics <jbadics@inf.u-szeged.hu> on 2012-07-10
Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort.expectations_files):
* Scripts/webkitpy/layout_tests/port/qt_unittest.py:
(QtPortTest._assert_expectations_files):
(QtPortTest.test_expectations_files):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][ARM] Unreviewed gardening, skip failing/crashing tests to try to make the bot green.

* platform/qt-arm/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r122175): It broke the Windows build
https://bugs.webkit.org/show_bug.cgi?id=90850

Reviewed by Noam Rosenthal.

* qmake/mkspecs/features/features.prf: Disable USE(3D_GRAPHICS) on Windows temporarily until proper fix.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r122207.
http://trac.webkit.org/changeset/122207
https://bugs.webkit.org/show_bug.cgi?id=90874

Broke the cr-windows bot (Requested by beverloo on #webkit).

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, remove unnecessary expectations.

* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling-expected.txt: Removed.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling2-expected.txt: Removed.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling3-expected.txt: Removed.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling4-expected.txt: Removed.
* platform/qt-mac/plugins/mouse-click-plugin-clears-selection-expected.txt: Removed.
* platform/qt-mac/transforms/svg-vs-css-expected.txt: Removed.
* platform/qt-win/Skipped:
* platform/qt-win/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/qt/fast/css/first-line-text-decoration-expected.png: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-expected.png.
* platform/qt/fast/css/first-line-text-decoration-expected.txt: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-expected.txt.
* platform/qt/fast/css/first-line-text-decoration-inherited-from-parent-expected.png: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-inherited-from-parent-expected.png.
* platform/qt/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, adding a text expectation for the
fast/js/global-constructors.html test. The test is failing because
of the in-progress removal of vendor prefix from DOM MutationObservers.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add API to clear the cache to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=90856

Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache): Call
WKResourceCacheManagerClearCacheForAllOrigins() to clear all
resources currently cached.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Input type=range issue with events not being raised when value set in js
https://bugs.webkit.org/show_bug.cgi?id=84674

Source/WebCore:

Fix dispatching of change and click events for the input slider.
Prior to the fix, change events were not fired if the new value
matched the value at last change notification based on expected
behavior for text fields.  Clicks were not fired if the thumb
element was repositioned under the cursor on mouse down.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-07-10
Reviewed by Kent Tamura.

Tests: fast/events/click-range-slider.html
       fast/events/onchange-range-slider.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):

LayoutTests:

Ensure that click and change events are properly triggered for range
sliders.  Prior to the fix, change events were not fired if the new
value matched the value at last change notification based on expected
behavior for text fields.  Clicks were not fired if the thumb element
was positioned under the cursor on mouse down.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-07-10
Reviewed by Kent Tamura.

* fast/events/click-range-slider-expected.txt: Added.
* fast/events/click-range-slider.html: Added.
* fast/events/onchange-range-slider-expected.txt: Added.
* fast/events/onchange-range-slider.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebSurroundingText layout tests should use the same code path as the rest of the feature.
https://bugs.webkit.org/show_bug.cgi?id=90807

Reviewed by Adam Barth.

Source/WebKit/chromium:

Replace the offset-based initialize method used only by LayoutTestController
with a point-based version to follow the same code path.

* public/WebSurroundingText.h:
(WebKit):
(WebSurroundingText):
* src/WebSurroundingText.cpp:
(WebKit::WebSurroundingText::initialize):

Tools:

Make the textSurroundingNode method take a pair of point coordinates
instead of a node offset.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::textSurroundingNode):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):

LayoutTests:

Make the textSurroundingNode method take a pair of point coordinates
instead of a node offset.

* platform/chromium/editing/surrounding-text/surrounding-text-expected.txt:
* platform/chromium/editing/surrounding-text/surrounding-text.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r122168): Layout Test http/tests/misc/script-defer.html is failing
https://bugs.webkit.org/show_bug.cgi?id=90845

Reviewed by Alexey Proskuryakov.

Source/WebCore:

I was a bit overzealous in removing bool returns. This one still makes sense.
This just reverts the wrong part of my previous change.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
* html/parser/HTMLScriptRunner.h:
(HTMLScriptRunner):

LayoutTests:

The test should no longer flake.

* platform/chromium/TestExpectations:
* platform/qt/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Make the Tab character 4 spaces width
https://bugs.webkit.org/show_bug.cgi?id=90172

Patch by Nikita Vasilyev <me@elv1s.ru> on 2012-07-10
Reviewed by Pavel Feldman.

Do it to match most code editors' behavior.

* inspector/front-end/inspectorCommon.css:
(body):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Editing: Reproducible crasher when pasting a 0x0 image into Mail
https://bugs.webkit.org/show_bug.cgi?id=90640
<rdar://problem/11141920>

Patch by Alice Cheng <alice_cheng@apple.com> on 2012-07-10
Reviewed by Brady Eidson.

Source/WebCore:

0x0 images don't get a resource representation in the WebArchive, so we need a null check

Test: TestWebKitAPI/Tests/mac/0.png
      TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm

* platform/mac/PasteboardMac.mm:
(WebCore::documentFragmentWithImageResource):

Tools:

Test cases for the patch. 0x0 images don't get a resource representation in the WebArchive, so we need a null check.

* TestWebKitAPI/Tests/mac/0.png: Added.
* TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm: Added.
(TestWebKitAPI):
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Refactor resource revisions before moving to UISourceCode.
https://bugs.webkit.org/show_bug.cgi?id=90855

Reviewed by Pavel Feldman.

Revisions are now persisted based on mainFrame.loaderId, not resource.loaderId which makes filtering out stale persisted revisions easier.
Restoring revisions from local storage is separated from filtering out stale persisted revisions.
Resource._clearRevisionHistory and Resource._restoreRevisions are not static anymore.
Renamed localStorage field for persisting revisions: "resource-history" -> "revision-history"

* inspector/front-end/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.addRevision):
(WebInspector.Resource.prototype._restoreRevisionHistory):
(WebInspector.Resource.prototype._clearRevisionHistory):
(WebInspector.Resource.prototype.revertAndClearHistory.clearHistory):
(WebInspector.Resource.prototype.revertAndClearHistory):
(WebInspector.Revision):
(WebInspector.Revision._revisionHistoryRegistry):
(WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist):
(WebInspector.Revision._ensureStaleRevisionsFileteredOut):
(WebInspector.Revision.prototype._persist):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._processCachedResources):
(WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
* inspector/front-end/RevisionHistoryView.js:
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype._revisionAdded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium build fix for mac-release.

Fixing clang build after https://bugs.webkit.org/show_bug.cgi?id=90807

* public/WebSurroundingText.h:
(WebKit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DelayNode test should cover relate attribute
https://bugs.webkit.org/show_bug.cgi?id=90876

Patch by Li Yin <li.yin@intel.com> on 2012-07-10
Reviewed by Chris Rogers.

Let the test cover attributes of DelayNode.

* webaudio/delaynode-expected.txt:
* webaudio/delaynode.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Geolocation override
https://bugs.webkit.org/show_bug.cgi?id=89365

Reviewed by Yong Li.

Source/WebCore:

Added a way to override the geoloation of a client using Web
Inspector.

New tests added.
* LayoutTests/inspector/geolocation-success.html:
* LayoutTests/inspector/getlocation-error.html:

* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController): Now store and
save the Page in m_page.
(WebCore::GeolocationController::positionChanged): Check if position
is overriden in Web Inspector.
* Modules/geolocation/GeolocationController.h:
(GeolocationController): Add member variable m_page for Page*.
* inspector/Inspector.json: Add new methods for setting and clearing
the GeoloationPosition and GeolocationError objects in InspectorPageAgent.
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::checkGeolocationPositionOrErrorImpl):
Add methods to check whether GeolocationPosition or GeolocationError
are set in InspectorPageAgent.
* inspector/InspectorInstrumentation.h:
(WebCore):
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::checkGeolocationPositionOrError):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent): Initialize new
member variables of GeolocationPosition and GeolocationError.
(WebCore::InspectorPageAgent::setGeolocationData): Set Position and
Error data and call appropriate GeolocaitonController methods.
(WebCore):
(WebCore::InspectorPageAgent::clearGeolocationData):
(WebCore::InspectorPageAgent::sendGeolocationError):
* inspector/InspectorPageAgent.h:
(WebCore::InspectorPageAgent::geolocationPosition): Getter for
GeolocationPosition.
(InspectorPageAgent):
* inspector/front-end/Settings.js: Added new settings for
GeolocationPosition and GeolocationError
* inspector/front-end/SettingsScreen.js: Added new control for
Geolocaiton.
(WebInspector.UserAgentSettingsTab):
(WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
(WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
(WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
(WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
(WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
(WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
(WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
* inspector/front-end/UserAgentSupport.js: New GeolocationPosition
Object added along with setting helper methods.  Added new setting
changed handlers for Position and Error.
(WebInspector.UserAgentSupport.GeolocationPosition):
(WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
(WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
(WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
(WebInspector.UserAgentSupport.prototype.get _onGeolocationErrorChanged):

LayoutTests:

Added new tests for Web Inspector overriding geolocation.

* inspector/geolocation-error-expected.txt: Added.
* inspector/geolocation-error.html: Added.
* inspector/geolocation-success-expected.txt: Added.
* inspector/geolocation-success.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix memory leaks by adopting allocation of GdkPixbuf
https://bugs.webkit.org/show_bug.cgi?id=90790

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-07-10
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Fixed a memory leak in paintGdkPixbuf by adopting an allocation
of GdkPixbuf.

No new tests. No change in behavior.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::paintGdkPixbuf):

Source/WebKit/gtk:

Fixed a memory leak in WebKitFaviconDatabase by adopting an
allocation of GdkPixbuf.

* webkit/webkitfavicondatabase.cpp:
(getIconPixbufSynchronously):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve webkit-patch rebaseline to work for more cases
https://bugs.webkit.org/show_bug.cgi?id=90504

Reviewed by Adam Barth.

-Makes it work for the build.chromium.org bots.
-Lets you rebaseline all builders instead of just one.
-Lets you pass in the builders or tests to rebaseline.

* Scripts/webkitpy/common/host.py:
(Host.buildbot_for_builder_name):
* Scripts/webkitpy/common/net/buildbot/buildbot.py:
(Builder.__init__):
(Builder.latest_layout_test_results):
Provide a way to get to the LayoutTestResults of the latest build.
Most of the time we only need to get the latest one and the Chromium bots
only expose the full_results.json file for the latest build.

(Builder):
(Builder._fetch_file_from_results):
(Builder.fetch_layout_test_results):
Move these functions into Builder so that Builder and Build can both
fetch layout test results.

(Build.results_zip_url):
(Build.layout_test_results):
* Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
(BuilderTest.test_latest_layout_test_results):
(BuildTest.test_layout_test_results):
* Scripts/webkitpy/common/system/user.py:
(User.prompt_with_multiple_lists):
Prompt with multiple sublists, but still have a global numbering.
This lets the build.chromium.org bots be clearly separated from the
build.webkit.org bots, which helps understand the builder names.

(User):
(User._wait_on_list_response):
(User.prompt_with_list):
* Scripts/webkitpy/common/system/user_unittest.py:
(UserTest.test_prompt_with_multiple_lists):
(UserTest.test_prompt_with_multiple_lists.run_prompt_test):
(UserTest.test_prompt_with_multiple_lists.run_prompt_test.mock_raw_input):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.is_chromium):
Provide a way to tell if a port is a Chromium port that doesn't involve string
manipulation on the port name or builder name.

* Scripts/webkitpy/layout_tests/port/builders.py:
(builder_path_from_name):
(all_builder_names):
Memoizing here is incorrect because the test override _exact_matches,
so these can return different values. In either case, I'm pretty sure these
are not remotely hot codepaths. I manually inspected all call sites and they're
all in high-level calls (e.g. execute calls for webkit-patch commands) and not
called in a loop.

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.is_chromium):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest._results_url):
(AbstractParallelRebaselineCommand.__init__):
(Rebaseline.__init__):
(Rebaseline):
(Rebaseline._builders_to_pull_from):
(Rebaseline._tests_to_update):
(Rebaseline.execute):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline.mock_builders_to_pull_from):
(test_rebaseline):
(test_rebaseline_command_line_flags):
(test_rebaseline_multiple_builders):
(test_rebaseline_multiple_builders.mock_builders_to_pull_from):
(test_rebaseline_multiple_builders.mock_tests_to_update):
(test_rebaseline_multiple_builders_and_tests_command_line):
* Scripts/webkitpy/tool/mocktool.py:
(MockTool.irc):
(MockTool):
(MockTool.buildbot_for_builder_name):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Adding another flaky test to bug 90469 (storage tests).

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. fast/js/dfg-cross-global-object-inline-array-literal.html is racey (and thus flaky).

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