Web Inspector [chromium]: Debugger.globalObjectCleared is not dispatched on reload after renderer swap
https://bugs.webkit.org/show_bug.cgi?id=106555

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Wrong ::enable was made virtual in the InspectorDebuggerAgent.

Test: inspector/debugger/debugger-scripts-reload.html

* inspector/InspectorDebuggerAgent.h:
(InspectorDebuggerAgent):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::enable):
(WebCore::PageDebuggerAgent::disable):
* inspector/PageDebuggerAgent.h:
(PageDebuggerAgent):

LayoutTests:

* http/tests/inspector/debugger-test.js:
(initialize_DebuggerTest):
* inspector/debugger/debugger-scripts-reload-expected.txt: Added.
* inspector/debugger/debugger-scripts-reload.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Fix unused parameter build error
https://bugs.webkit.org/show_bug.cgi?id=106639

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2013-01-11
Reviewed by Kentaro Hara.

Use UNUSED_PARAM macro to fix build error.

Source/WebCore:

No new tests, no behavior change.

* platform/efl/EflScreenUtilities.cpp:
(WebCore::isUsingEcoreX):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::supportsDataListUI):

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::intentMessagePorts):
* ewk/ewk_contextmenu.cpp:
(ewk_context_menu_destroy):
(ewk_context_menu_item_select):
* ewk/ewk_file_chooser.cpp:
(ewk_file_chooser_capture_get):
* ewk/ewk_frame.cpp:
(ewk_frame_feed_touch_event):
* ewk/ewk_intent.cpp:
(ewk_intent_action_get):
(ewk_intent_type_get):
(ewk_intent_service_get):
(ewk_intent_suggestions_get):
(ewk_intent_extra_get):
(ewk_intent_extra_names_get):
* ewk/ewk_intent_request.cpp:
(ewk_intent_request_ref):
(ewk_intent_request_unref):
(ewk_intent_request_intent_get):
* ewk/ewk_security_origin.cpp:
(ewk_security_origin_web_database_usage_get):
(ewk_security_origin_web_database_quota_get):
* ewk/ewk_settings.cpp:
(ewk_settings_shadow_dom_enable_set):
* ewk/ewk_view.cpp:
(ewk_view_context_menu_forward_event):
(ewk_view_setting_should_display_subtitles_get):
(ewk_view_setting_should_display_captions_get):
(ewk_view_setting_should_display_captions_set):
(ewk_view_setting_should_display_subtitles_set):
(ewk_view_setting_should_display_text_descriptions_get):
(ewk_view_setting_should_display_text_descriptions_set):

Source/WebKit2:

* UIProcess/API/efl/ewk_color_picker.cpp:
(ewk_color_picker_color_set):
(ewk_color_picker_color_get):
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_additional_plugin_path_set):
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_fullscreen_enabled_set):
(ewk_settings_fullscreen_enabled_get):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_intent_deliver):
(ewk_view_feed_touch_event):
(ewk_view_touch_events_enabled_set):
(ewk_view_touch_events_enabled_get):
(ewk_view_fullscreen_exit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Resources] "Delete" cookie deletes all cookies with matching name.
https://bugs.webkit.org/show_bug.cgi?id=105633

Patch by Eugene Klyuchnikov <eustas@chromium.org> on 2013-01-11
Reviewed by Pavel Feldman.

Source/WebCore:

"Delete" cookie deletes all cookies with matching name,
ignoring domain and path.

* inspector/Inspector.json: Change argument "domain" to "url"
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::deleteCookie): Use url to delte cookies.
* inspector/InspectorPageAgent.h: Adopt new signature.
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView.prototype._deleteCookie): Ditto.

LayoutTests:

Adopt new signatures.

* http/tests/inspector/resource-main-cookies.php:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Connect UserGestureIndicator for mousedown and mouseup events
https://bugs.webkit.org/show_bug.cgi?id=105138

Reviewed by Adam Barth.

Source/WebCore:

Ports that consume user gestures to prevent certain types of pop-ups
need to be able to connect mousedown and mouseup events, otherwise, a
single mouse click will allow for opening multiple pop-ups.

Note that a mousedown is not always followed by a mouseup and vice
versa, e.g. when the mousedown results in a context menu being shown, or
something is dragged into the page.

Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-two-events.html

* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h:

LayoutTests:

* platform/chromium/fast/events/popup-allowed-from-gesture-only-once-two-events-expected.txt: Added.
* platform/chromium/fast/events/popup-allowed-from-gesture-only-once-two-events.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139419 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow arbitrary queue launch parameters in EWSTools/start-queue.sh
https://bugs.webkit.org/show_bug.cgi?id=106636

Patch by Alan Cutter <alancutter@chromium.org> on 2013-01-11
Reviewed by Adam Barth.

This parameter will allow the bot boot script to use start-queue.sh and provide an IRC password for sheriffbot.

* EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
* EWSTools/GoogleComputeEngine/build-commit-queue.sh:
* EWSTools/screen-config:
* EWSTools/start-queue.sh:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Missing HAVE(ACCESSIBILITY) guards to some atk/ accessibility files.
https://bugs.webkit.org/show_bug.cgi?id=106447

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-01-11
Reviewed by Andreas Kling.

Files do not have HAVE(ACCESSIBILITY) guards.
This is source of potential build breakes, when macro is not enabled.

* WebProcess/WebPage/atk/WebPageAccessibilityObject.h:
* WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add ewk_view_page_contents_get() API
https://bugs.webkit.org/show_bug.cgi?id=106440

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2013-01-11
Reviewed by Gyuyoung Kim.

Add ewk_view_page_contents_get() API for getting contents of the current page.
Currently, it supports only MHTML type.

* UIProcess/API/efl/ewk_view.cpp:
(Ewk_Page_Contents_Context):
(ewkViewPageContentsCallback):
(ewk_view_page_contents_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(PageContentsCallback):
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable concatenating headers with same field name
https://bugs.webkit.org/show_bug.cgi?id=106625

Reviewed by Rob Buis.

RFC 2616 specifies that headers could concatenate with comma if they have
same field name. We should enable this if the header allows multiple values.

RIM PR# 275508, internally reviewed by Joe Mason

(WebCore):
(WebCore::isAppendableHeader):
(WebCore::NetworkJob::handleNotifyHeaderReceived):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BaseDateAndTimeInputType should not inherit from TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=106306

Reviewed by Hajime Morita.

Date/time input types don't need text-field features at all.

No new tests. This should not make any behavior changes except reduction
of memory usage.

* html/BaseDateAndTimeInputType.h:
Inherit InputType instead of TextFieldInputType.
(WebCore::BaseDateAndTimeInputType::BaseDateAndTimeInputType):
(BaseDateAndTimeInputType): Update function declarations.
* html/BaseDateAndTimeInputType.cpp:
Remove handleKeydownEvent and convertFromVisibleValue, which are for
TextFieldInputType.
(WebCore::BaseDateAndTimeInputType::shouldRespectListAttribute):
Added. This is necessary for <datalist> support. TextFieldInputType has
the same code.
(WebCore::BaseDateAndTimeInputType::valueMissing):
Added. This is necessary for validity.valueMissing. TextFieldInputType
has the same code.

* html/BaseChooserOnlyDateAndTimeInputType.cpp:
Remove unnecessary functions which cancel TextFieldInputType behavior.
* html/BaseChooserOnlyDateAndTimeInputType.h:
(BaseChooserOnlyDateAndTimeInputType): Remove declarations for them.

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
Remove unnecessary functions which cancel TextFieldInputType behavior.
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
Add SpinButtonOwner interface. We didn't need it because
TextFieldInputType implements it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139424 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add ImageOnlyFailure for fast/css/font-face-unicode-range.html on win
https://bugs.webkit.org/show_bug.cgi?id=100806

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Canvas] a minor follow-up to r137262
https://bugs.webkit.org/show_bug.cgi?id=106644

Reviewed by Pavel Feldman.

* inspector/InjectedScriptCanvasModuleSource.js:
(.):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Elements] Search in the DOM tree does not scroll horizontally
https://bugs.webkit.org/show_bug.cgi?id=106648

Reviewed by Vsevolod Vlasov.

Scroll into view the first match in every tree element, if needed.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._highlightCurrentSearchResult):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove support for global extensions in WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=106646

Reviewed by Xan Lopez.

We have now API to set the web extensions directory. A global web
estensions directory doesn't make sense anymore.

* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::WebGtkExtensionManager::scanModules): Only scan the given
directory for modules.
(WebKit::WebGtkExtensionManager::initialize): Load modules found
in the given directory only.
* WebProcess/gtk/WebGtkExtensionManager.h:
(WebGtkExtensionManager): Remove appendModuleDirectories().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time
https://bugs.webkit.org/show_bug.cgi?id=66868

Source/WebCore:

Up to now, the TreeElement.prototype.expandRecursively() method would correctly
expand children recursively based on the provided depth, but would not wait to
perform this task until all child nodes had been populated, which means that this
would only work incrementally with one additional level of child nodes being shown
expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.

In order to fix this, this patch adds a new optional argument to the DOMAgent's
requestChildNodes() methods to provide the depth at which we want to retrieve children
of a given node. The DOMAgent provides a new .getSubtree() method that calls
requestChildNodes() with the provided depth.

Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's
new .getSubtree() method and then call the default implementation when all nodes
have been retrieved from the backend.

Patch by Antoine Quint <graouts@apple.com> on 2013-01-11
Reviewed by Pavel Feldman.

Tests: inspector-protocol/dom-request-child-nodes-depth.html
       inspector/elements/expand-recursively.html

* inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes().
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter
which defaults to 1.
(WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter
which defaults to 1 and allows -1 as an unbound value.
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode.prototype.):
(WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth
we want to retrieve children of a given node from the backend.
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation
to first obtain the deepest subtree for the current node so that deep expansion happens as expected.

LayoutTests:

Adding a new protocol test that covers the new `depth` parameter for the
requestChildNodes method and a new front-end method that tests correct
behavior of the expandRecursively() method.

Patch by Antoine Quint <graouts@apple.com> on 2013-01-11
Reviewed by Pavel Feldman.

* inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added.
* inspector-protocol/dom-request-child-nodes-depth.html: Added.
* inspector/elements/expand-recursively-expected.txt: Added.
* inspector/elements/expand-recursively.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Disable the ENABLE_LEGACY_WEB_AUDIO feature define in release builds
https://bugs.webkit.org/show_bug.cgi?id=106577

Reviewed by Philippe Normand.

The Web Audio feature is not enabled in the release builds, so there's
no need to enable the legacy Web Audio API either.

No new tests - no new functionality.

* GNUmakefile.features.am.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[jhbuild] Remove the "run-with-jhbuild" scripts.
https://bugs.webkit.org/show_bug.cgi?id=106572

Patch by Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> on 2013-01-11
Reviewed by Martin Robinson.

Both ports which use jhbuild were mostly duplicating the
`run-with-jhbuild' script in their own directories for no clear reason.

The script itself was just a thin wrapper around the `jhbuild-wrapper',
so just start using that directly and get rid of a useless middle man.

Adjust scripts which called run-with-jhbuild to call jhbuild-wrapper
instead.

* Scripts/run-javascriptcore-tests:
* Scripts/run-launcher:
* Scripts/webkitdirs.pm:
(runAutogenForAutotoolsProjectIfNecessary):
(buildAutotoolsProject):
(jhbuildWrapperPrefixIfNeeded):
(generateBuildSystemFromCMakeProject):
(buildCMakeGeneratedProject):
* Scripts/webkitpy/common/multiprocessing_bootstrap.py:
(run):
* Scripts/webkitpy/layout_tests/port/efl.py:
(EflPort.__init__):
(EflPort._image_diff_command):
* efl/run-with-jhbuild: Removed.
* gtk/run-with-jhbuild: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused CSSSelector(QualifiedName) constructor.
<http://webkit.org/b/106652>

Reviewed by Antti Koivisto.

* css/CSSSelector.h:
(CSSSelector):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed typo fixes after r139431.

* Scripts/run-javascriptcore-tests:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed jhbuild-related fix after r139431.

* Scripts/webkitpy/layout_tests/port/efl.py:
(EflPort.__init__): Pass a string to set_option_default(), since
shlex.split() will be called on it later.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text Autosizing - elements much narrower than its parent autosizing clusters should be autosized separately.
https://bugs.webkit.org/show_bug.cgi?id=105188

Patch by Anton Vayvod <avayvod@chromium.org> on 2013-01-11
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Some blocks of text might be narrower than their parent clusters and should be autosized separately.
This helps with autosizing for the pages implementing the sidebars as a narrow blocks of text with wide margins and
the main content being positioned atop this margin (or vice versa).

* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::isContainerAutosizingCluster):

    Returns true if the container is more than 200 pixels narrower than its parent cluster's lowest common
    ancestor of all the text nodes.

LayoutTests:

Checked that a narrow autosizing container becomes an autosizing cluster.
Fixed other tests that used narrow descendant blocks.

* fast/text-autosizing/cluster-narrow-in-wide-expected.html:
* fast/text-autosizing/cluster-narrow-in-wide-ohidden-expected.html:
* fast/text-autosizing/cluster-narrow-in-wide-ohidden.html:
* fast/text-autosizing/cluster-narrow-in-wide.html:
* fast/text-autosizing/cluster-with-wide-lca-expected.html:
* fast/text-autosizing/cluster-with-wide-lca.html:
* fast/text-autosizing/narrow-child-expected.html:
* fast/text-autosizing/narrow-child.html:

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