[Chromium] Remove unused WebNode::hasEventListeners API
https://bugs.webkit.org/show_bug.cgi?id=112529

Reviewed by James Robinson.

This API no longer has any callers and can be removed.

* public/WebNode.h:
* src/WebNode.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
INPUT_MULTIPLE_FIELDS_UI: Step-up/-down of minute/second/millisecond fields should respect min/max attributes
https://bugs.webkit.org/show_bug.cgi?id=112527

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-03-17
Reviewed by Kent Tamura.

Source/WebCore:

Make step-up/-down of the minute, second, and millisecond field
respect the min/max attributes of the element.
Note that it still accepts any keyboard inputs (the element
becomes 'invalid' state when out-of-range values entered).
Also, disable these fields when there is only single possible value.

Tests: fast/forms/time-multiple-fields/time-multiple-fields-readonly-subfield.html
       fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html

* html/shadow/DateTimeEditElement.cpp:
(DateTimeEditBuilder): Add fields for min/max of minute/second/millisecond.
(WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Set min/max for the fields.
(WebCore::DateTimeEditBuilder::visitField): Pass min/max parameters to the field constructors.
(WebCore::DateTimeEditBuilder::shouldHourFieldDisabled): Does not disable if minute, second, millisecond fields are all disabled, because we need at least one editable field.
(WebCore::DateTimeEditBuilder::shouldMillisecondFieldDisabled): Disables if min, max, and value are equal.
(WebCore::DateTimeEditBuilder::shouldMinuteFieldDisabled): Ditto.
(WebCore::DateTimeEditBuilder::shouldSecondFieldDisabled): Ditto.
* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeDayFieldElement::DateTimeDayFieldElement):
(WebCore::DateTimeHourFieldElementBase::DateTimeHourFieldElementBase):
(WebCore::DateTimeHour11FieldElement::DateTimeHour11FieldElement):
(WebCore::DateTimeHour12FieldElement::DateTimeHour12FieldElement):
(WebCore::DateTimeHour23FieldElement::DateTimeHour23FieldElement):
(WebCore::DateTimeHour24FieldElement::DateTimeHour24FieldElement):
(WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement):
(WebCore::DateTimeMillisecondFieldElement::create):
(WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement):
(WebCore::DateTimeMinuteFieldElement::create):
(WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement):
(WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement):
(WebCore::DateTimeSecondFieldElement::create):
(WebCore::DateTimeWeekFieldElement::DateTimeWeekFieldElement):
(WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
* html/shadow/DateTimeFieldElements.h:
(DateTimeDayFieldElement):
(DateTimeHourFieldElementBase):
(DateTimeHour11FieldElement):
(DateTimeHour12FieldElement):
(DateTimeHour23FieldElement):
(DateTimeHour24FieldElement):
(DateTimeMillisecondFieldElement): Add minimum/maximum parameters.
(DateTimeMinuteFieldElement): Add minimum/maximum parameters.
(DateTimeMonthFieldElement):
(DateTimeSecondFieldElement): Add minimum/maximum parameters.
(DateTimeWeekFieldElement):
(DateTimeYearFieldElement):
* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
(WebCore::DateTimeNumericFieldElement::formatValue): Use hard-limit value instead of m_range.maximum, because millisecond field with max<100 will be displayed in two digits otherwise.
(WebCore::DateTimeNumericFieldElement::setValueAsInteger):
* html/shadow/DateTimeNumericFieldElement.h:
(DateTimeNumericFieldElement): Changed to have hard limits as a data member.

LayoutTests:

* fast/forms/time-multiple-fields/time-multiple-fields-readonly-subfield-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-readonly-subfield.html:
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ScriptProcessorNode is garbage collected while still active if unreachable
https://bugs.webkit.org/show_bug.cgi?id=112521

Patch by Russell McClellan <russell.mcclellan@gmail.com> on 2013-03-17
Reviewed by Kentaro Hara.

Source/WebCore:

Fix for issue where ScriptProcessorNodes (and AudioNode js wrappers generally)
would be garbage collected before their time.  Made AudioNode an ActiveDOMElement
marked pending if there are any open audio connections.

Test: webaudio/javascriptaudionode.html

* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::AudioNode):
(WebCore::AudioNode::hasPendingActivity): it's pending (and thus not GCed)
if it has open audio connections.
* Modules/webaudio/AudioNode.h: AudioNode is now an ActiveDOMElement
* Modules/webaudio/AudioScheduledSourceNode.h: added a using declaration
to avoid function name hiding.
* Modules/webaudio/ScriptProcessorNode.idl: AudioNode is an ActiveDOMElement

LayoutTests:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mark some more tests as flakey, or asserting in debug.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support Windows HTMLSelectElement keystrokes on Chromium win
https://bugs.webkit.org/show_bug.cgi?id=112460

Reviewed by Kent Tamura.

Compile in the windows-specific variant of
HTMLSelectElement::platformHandleKeydownEvent
on Chromium win, in addition to PLATFORM(WIN).

* WebCore.gypi:
    Add html/HTMLSelectElementWin.cpp.
* html/HTMLSelectElement.cpp:
    Don't compile generic platformHandleKeydownEvent on
    Chromium win.
* html/HTMLSelectElementWin.cpp:
    Only compile platformHandleKeydownEvent on Windows.
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow] offsetParent should never return nodes in user agent Shadow DOM to script
https://bugs.webkit.org/show_bug.cgi?id=112530

Reviewed by Elliott Sprehn.

Source/WebCore:

Test: fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html

* dom/Element.cpp:
(WebCore::Element::bindingsOffsetParent): Filter nodes in UA shadows.
* dom/Element.h:
(Element): Add bindingsOffsetParent.
* dom/Element.idl: bindingsOffsetParent is the implementation of offsetParent.

LayoutTests:

* fast/dom/shadow/offset-parent-does-not-leak-ua-shadow-expected.txt: Added.
* fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
A placeholder renderer should not be taken to imply the existence of a text renderer in single line text controls
https://bugs.webkit.org/show_bug.cgi?id=112410

Reviewed by Tony Chang.

Source/WebCore:

The assumption that if a text control had a placeholder renderer
then it also had a text renderer is not valid. If
::-webkit-textfield-decoration-controller is set to display: none;
a single line text control's decoration container renderer and
hence text renderer are not created. This change handles this
corner case where a text control has a placeholder renderer but
not a text renderer.

Tests: fast/forms/search/search-hide-decoration-container-crash.html (Updated)

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):

LayoutTests:

Update search-hide-decoration-container-crash.html to exercise
non-null placeholder renderers and null text renderers.

Cases where neither are rendered already get coverage in
search-scroll-hidden-decoration-container-crash.html and
search-autoscroll-hidden-decoration-container-crash.html.

* fast/forms/search/search-hide-decoration-container-crash.html:
* fast/forms/search/search-hide-decoration-container-crash-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update test expectations.

Unreviewed gardening.

* platform/chromium-win/fast/forms/color/input-appearance-color-expected.png:
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r146033.
http://trac.webkit.org/changeset/146033
https://bugs.webkit.org/show_bug.cgi?id=112521

web audio tests are broken

Source/WebCore:

* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::AudioNode):
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/ScriptProcessorNode.idl:

LayoutTests:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r146035.
http://trac.webkit.org/changeset/146035
https://bugs.webkit.org/show_bug.cgi?id=112540

fails to build on Windows: singned/unsigned mismatch at ln. 53
of html\HTMLSelectElementWin.cpp (Requested by antonm on
#webkit).

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

* WebCore.gypi:
* html/HTMLSelectElement.cpp:
(WebCore):
* html/HTMLSelectElementWin.cpp:

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

* platform/qt-5.0-wk1/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: make number of stack frames to capture in Timeline a setting
https://bugs.webkit.org/show_bug.cgi?id=110619

Reviewed by Pavel Feldman.

- factor out creation of input type="text" control for better reuse;
- add timelineLimitStackFramesFlag & timelineStackFramesToCapture settings;

* English.lproj/localizedStrings.js: add "Frames to capture" and "Limit number of captured JS stack frames"
* inspector/front-end/Settings.js: add 2 settings;
(WebInspector.Settings):
* inspector/front-end/SettingsScreen.js: UI for the setting;
(WebInspector.GenericSettingsTab):
(WebInspector.GenericSettingsTab.prototype.get _createCSSAutoReloadControls.validateReloadTimeout):
* inspector/front-end/TimelineModel.js: pass the setting value to back-end.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mediastream.ended should return true when all tracks were removed.
https://bugs.webkit.org/show_bug.cgi?id=112528

Reviewed by Kentaro Hara.

Source/WebCore:

Spec: http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStream-ended
When all tracks have been removed, it should return true as well as all the tracks
were ended.

Test: fast/mediastream/MediaStream-add-remove-tracks.html

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::removeTrack):

LayoutTests:

* fast/mediastream/MediaStream-add-remove-tracks-expected.txt:
* fast/mediastream/MediaStream-add-remove-tracks.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Exception in timeline DOMCounters
https://bugs.webkit.org/show_bug.cgi?id=112427

Reviewed by Pavel Feldman.

Do not update marker on DOM counters graph if the graphs haven't been
drawn yet.

* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics.prototype._refreshCurrentValues):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Native Memory Timeline affects the performace even if was switched off.
https://bugs.webkit.org/show_bug.cgi?id=112428

Reviewed by Pavel Feldman.

Source/WebCore:

Whether to include DOM counters and native memory statistics is now
configured using Timeline.start parameters instead of sending separate
commands Timeline.setIncludeDomCounters and Timeline.setIncludeNativeMemoryStatistics.

* inspector/Inspector.json:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::restore):
(WebCore::InspectorTimelineAgent::start):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):
* inspector/front-end/DOMCountersGraph.js:
(WebInspector.DOMCountersGraph):
* inspector/front-end/NativeMemoryGraph.js:
(WebInspector.NativeMemoryGraph):
* inspector/front-end/TimelineManager.js:
(WebInspector.TimelineManager.prototype.start):
* inspector/front-end/TimelineModel.js:
(WebInspector.TimelineModel.prototype.startRecord):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.get _toggleTimelineButtonClicked):

LayoutTests:

* http/tests/inspector/timeline-test.js: chaned Timeline.start parameters
to match previous behavior.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Cancel mark on search field is not displayed
https://bugs.webkit.org/show_bug.cgi?id=94880

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

adjustSearchFieldCancelButtonStyle() doesn't set style width and height for search cancel button.
So, the button isn't showing up in search input field. Besides the button size should be scaled based
on the font size as chromium, qt, and blackberry ports.

Tests: fast/forms/search-cancel-button-style-sharing.html
       fast/forms/search-rtl.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):

LayoutTests:

Rebaseline expected results related to search cancel button.

* platform/efl-wk1/TestExpectations: These tests don't work with WK1 pixel test yet.
* platform/efl/TestExpectations:
* platform/efl/fast/forms/search-cancel-button-style-sharing-expected.png:
* platform/efl/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/efl/fast/forms/search-rtl-expected.png:
* platform/efl/fast/forms/search-rtl-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] BackingStoreClient: remove unnecessary call to toElement()
https://bugs.webkit.org/show_bug.cgi?id=112547

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-18
Reviewed by Carlos Garcia Campos.

* WebKitSupport/BackingStoreClient.cpp:
(BlackBerry::WebKit::BackingStoreClient::absoluteRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add touch support to the calendar picker
https://bugs.webkit.org/show_bug.cgi?id=112256

Reviewed by Kent Tamura.

Source/WebCore:

This patch increases the hit target sizes for touch and adds touch event
support to the scroll view, scroll bar and navigation button.

Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-touch-operations.html
       platform/chromium/fast/forms/calendar-picker/month-picker-touch-operations.html
       platform/chromium/fast/forms/calendar-picker/week-picker-touch-operations.html

* Resources/pagepopups/calendarPicker.js:
(hasInaccuratePointingDevice):
(Animator): Super class for TransitionAnimator and FlingGestureAnimator.
(Animator.prototype.start):
(Animator.prototype.stop):
(Animator.prototype.onAnimationFrame):
(TransitionAnimator): Same as the old Animator. Transition from one value to another.
(TransitionAnimator.prototype.setFrom):
(TransitionAnimator.prototype.start):
(TransitionAnimator.prototype.stop):
(TransitionAnimator.prototype.setTo):
(TransitionAnimator.prototype.onAnimationFrame):
(FlingGestureAnimator):Animates the fling scroll.
(FlingGestureAnimator.prototype._valueAtTime): Returns the value at the given time.
(FlingGestureAnimator.prototype._velocityAtTime): Returns the value change velocity at the given time.
(FlingGestureAnimator.prototype._timeAtVelocity): Returns the time when the value is changing at the given velocity.
(FlingGestureAnimator.prototype.start):
(FlingGestureAnimator.prototype.onAnimationFrame):
(ScrollView): Added support for touch gesture scrolling.
(ScrollView.prototype.onTouchStart):
(ScrollView.prototype.onWindowTouchMove):
(ScrollView.prototype.onWindowTouchEnd):
(ScrollView.prototype.onFlingGestureAnimatorStep):
(ScrollView.prototype.scrollTo):
(ScrubbyScrollBar): Added support for touch.
(ScrubbyScrollBar.prototype.onTouchStart):
(ScrubbyScrollBar.prototype.onWindowTouchMove):
(ScrubbyScrollBar.prototype.onWindowTouchEnd):
(ScrubbyScrollBar.prototype._setThumbPositionFromEventPosition): Accept MouseEvent or Touch.
(ScrubbyScrollBar.prototype.onMouseDown):
(ScrubbyScrollBar.prototype.onWindowMouseMove):
(ScrubbyScrollBar.prototype.onWindowMouseUp):
(YearListCell):
(YearListView):
(YearListView.prototype.onTouchStart):
(YearListView.prototype._animateRow):
(CalendarNavigationButton): Add touch support for long press.
(CalendarNavigationButton.prototype.onTouchStart):
(CalendarNavigationButton.prototype.onWindowTouchEnd):
(CalendarNavigationButton.prototype.onMouseDown):
(CalendarNavigationButton.prototype.onWindowMouseUp):
(CalendarTableView): Disable touch gesture scrolling in the calendar table.

LayoutTests:

* platform/chromium/fast/forms/calendar-picker/calendar-picker-touch-operations-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/calendar-picker-touch-operations.html: Added.
* platform/chromium/fast/forms/calendar-picker/month-picker-touch-operations-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/month-picker-touch-operations.html: Added.
* platform/chromium/fast/forms/calendar-picker/resources/calendar-picker-common.js:
(hoverOverMonthPopupButton):
(clickMonthPopupButton): Use hoverOverMonthPopupButton.
* platform/chromium/fast/forms/calendar-picker/week-picker-touch-operations-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-touch-operations.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL rebaseline after r146050.

* platform/efl/fast/css/input-search-padding-expected.txt:
* platform/efl/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/efl/fast/css/text-overflow-input-expected.txt:
* platform/efl/fast/forms/box-shadow-override-expected.txt:
* platform/efl/fast/forms/control-restrict-line-height-expected.txt:
* platform/efl/fast/forms/input-appearance-height-expected.txt:
* platform/efl/fast/forms/placeholder-position-expected.txt:
* platform/efl/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/efl/fast/forms/search-styled-expected.txt:
* platform/efl/fast/forms/search-vertical-alignment-expected.txt:
* platform/efl/fast/forms/searchfield-heights-expected.txt:
* platform/efl/fast/repaint/search-field-cancel-expected.txt:
* platform/efl/fast/replaced/width100percent-searchfield-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The 'formnovalidate' attribute doesn't work correctly on button elements with child elements
https://bugs.webkit.org/show_bug.cgi?id=112541

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-03-18
Reviewed by Kent Tamura.

Source/WebCore:

Fix a bug where formnovalidate attribute of <button> is not honored
if the target of the click event is an element nested within the button.

Test: fast/forms/interactive-validation-formnovalidate-child.html

* html/HTMLFormElement.cpp:
(WebCore::submitElementFromEvent): Looks for the nearest FormControlElement ancestor of the event target.

LayoutTests:

* fast/forms/interactive-validation-formnovalidate-child-expected.txt: Added.
* fast/forms/interactive-validation-formnovalidate-child.html: Added.

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