[EFL][WK1] Obsolete a case in test_ewk_frame api test to not make bot sick
https://bugs.webkit.org/show_bug.cgi?id=105142

Patch by Kangil Han <kangil.han@samsung.com> on 2012-12-21
Reviewed by Gyuyoung Kim.

BUG 49246 has changed load behavior on malformed url input.
That is why test_ewk_frame api test is timed out.
To not make bot sick, this patch comments out that test case at a moment.

* tests/test_ewk_frame.cpp:
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Buffering ranges are reported incorrectly with GStreamer 1.0
https://bugs.webkit.org/show_bug.cgi?id=105319

Patch by Xabier Rodriguez Calvar <calvaris@igalia.com> on 2012-12-21
Reviewed by Philippe Normand.

We add the gPercentMax constant to select between 100 and
GST_FORMAT_PERCENT_MAX depending if we are compiling against
GStreamer 0.10 or 1.0 and we use that in the corresponding method.

Current tests should suffice.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered): Added the use of
gPercentMax constant instead of 100 to have the different code
paths for GStreamer 0.10 and 1.0.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix typing zero into multiple field input
https://bugs.webkit.org/show_bug.cgi?id=105501

Reviewed by Kent Tamura.

Source/WebCore:

We have a couple of problems when handling zero in a multiple fields
element.
1. Typing '02' into a month field will set '12'.
2. Typing '0' into 12 hour hour field will set '12' and move to the
   focus to the next field.
This change adds a type ahead buffer so we can handle these cases
properly. If the value in the type ahead buffer is valid we set it so a
change event will fire.

Added tests to *-multiple-fields-keyboard-events.html.

* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::didBlur): Clear the type ahead
buffer. handleKeyboardEvent() won't set the type ahead value if it is
not in range, so we set the value here.
(WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
(WebCore::DateTimeNumericFieldElement::setEmptyValue): Clear type ahead buffer.
(WebCore::DateTimeNumericFieldElement::setValueAsInteger):
(WebCore::DateTimeNumericFieldElement::stepDown): Clear type ahead buffer.
(WebCore::DateTimeNumericFieldElement::stepUp): Clear type ahead buffer.
(WebCore::DateTimeNumericFieldElement::typeAheadValue): Returns integer
value for the type ahead characters.
(WebCore):
(WebCore::DateTimeNumericFieldElement::visibleValue): If we have type
ahead characters, show that.
* html/shadow/DateTimeNumericFieldElement.h:
(DateTimeNumericFieldElement):

LayoutTests:

* fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events-expected.txt:
* fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html:
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events-expected.txt:
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events.html:
* fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html:
* fast/forms/week-multiple-fields/week-multiple-fields-keyboard-events-expected.txt:
* fast/forms/week-multiple-fields/week-multiple-fields-keyboard-events.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Rebaseline after r138365.

* platform/chromium-mac-snowleopard/fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] TiledBackingStore: Scroll position is not reset when new page is loaded
https://bugs.webkit.org/show_bug.cgi?id=105627

Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Reset scroll position to (0,0) when new page is loaded.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):

LayoutTests:

Added a layout test checking scroll position for newly loaded pages.

* fast/dom/resources/check-scroll-position-onload.html: Added.
* fast/dom/scroll-position-for-new-loads-expected.txt: Added.
* fast/dom/scroll-position-for-new-loads.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] REGRESSION(r138232): It made 4 tests timeout
https://bugs.webkit.org/show_bug.cgi?id=105623

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-12-21
Reviewed by Kenneth Rohde Christiansen.

r138232 changed functionality so that empty text output
no longer leads to a dump() call, which leads to a timeout.
Instead do a text dump if there is text output or if there
is no audio output.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Enable feature option for the CSS sticky position
https://bugs.webkit.org/show_bug.cgi?id=105630

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2012-12-21
Reviewed by Kenneth Rohde Christiansen.

Enable CSS sticky position feature by default for the
EFL port. This feature option was added in r138252.

No new tests. Existing layout tests pass.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add guard around ContextMenuItemTagInspectElement
https://bugs.webkit.org/show_bug.cgi?id=105267

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2012-12-21
Reviewed by Ryosuke Niwa.

Need INSPECTOR guard for using ContextMenuItemTagInspectElement.

Source/WebKit/efl:

* WebCoreSupport/AssertMatchingEnums.cpp:

Source/WebKit2:

* UIProcess/API/efl/ewk_context_menu_item.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Mark svg/custom/feDisplacementMap-01.svg as missing.

* platform/efl/TestExpectations:

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

* platform/chromium-win-xp/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-keyboard-events-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Rebaseline fast/js/global-constructors.html after r138248.

* platform/efl/fast/js/global-constructors-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Slow performance with <select> with many options and size >= 2
https://bugs.webkit.org/show_bug.cgi?id=105483

Source/WebCore:

Reviewed by Eric Seidel.

Avoids creating renderers for children of list <select>s that are not
<option> or <optgroup>. This is both more correct (no other browser
displays them) and provides a performance benefit (direct text children
of <select> would have O(N^2) behavior; this usually happened due to
whitespace between <option>...</option> tags).

Test: fast/forms/menulist-no-renderer-for-unexpected-children.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childShouldCreateRenderer):

LayoutTests:

Reviewed by Eric Seidel.

Test that checks that text and non-<option> and <optgroup> element
children of <select> do not get a renderer.

* fast/forms/menulist-no-renderer-for-unexpected-children-expected.txt: Added.
* fast/forms/menulist-no-renderer-for-unexpected-children.html: Added.


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

* platform/chromium-win-xp/fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow DOM]: ShadowRoot wrong nodeName attribute
https://bugs.webkit.org/show_bug.cgi?id=104995

Reviewed by Dimitri Glazkov.

Source/WebCore:

According to the Shadow DOM spec, ShadowRoot.nodeName should return '#document-fragment' instead of '#shadow-root'.
We remove ShadowRoot::nodeName.

No new tests, covered by existing tests.

* dom/ShadowRoot.cpp:
* dom/ShadowRoot.h:
(ShadowRoot):

LayoutTests:

Uses 'instanceof' to check the instance is ShadowRoot or not.
Update dump-as-markup.js to see 'instanceof' instead of nodeType.
Also, a lot of rebaselines have been conducted.

* editing/deleting/delete-ligature-001-expected.txt:
* editing/pasteboard/copy-in-password-field-expected.txt:
* editing/selection/select-all-textarea-expected.txt:
* fast/dom/shadow/layout-tests-can-access-shadow-expected.txt:
* fast/dom/shadow/layout-tests-can-access-shadow.html:
* fast/dom/shadow/resources/shadow-dom.js:
(isShadowRoot):
* fast/events/5056619-expected.txt:
* fast/forms/focus-selection-input-expected.txt:
* inspector/elements/shadow-dom-modify-chardata-expected.txt:
* inspector/elements/shadow-root-expected.txt:
* inspector/elements/update-shadowdom-expected.txt:
* platform/chromium-linux/editing/selection/select-from-textfield-outwards-expected.txt:
* platform/chromium-linux/fast/forms/input-text-double-click-expected.txt:
* platform/chromium-linux/fast/forms/textfield-outline-expected.txt:
* platform/chromium-linux/fast/forms/validation-message-appearance-expected.txt:
* platform/chromium-win/editing/deleting/delete-all-text-in-text-field-assertion-expected.txt:
* platform/chromium-win/editing/input/caret-at-the-edge-of-input-expected.txt:
* platform/chromium-win/editing/input/reveal-caret-of-multiline-input-expected.txt:
* platform/chromium-win/editing/inserting/4960120-1-expected.txt:
* platform/chromium-win/editing/pasteboard/drop-text-without-selection-expected.txt:
* platform/chromium-win/editing/pasteboard/pasting-tabs-expected.txt:
* platform/chromium-win/editing/selection/4895428-3-expected.txt:
* platform/chromium-win/editing/selection/4975120-expected.txt:
* platform/chromium-win/editing/selection/select-across-readonly-input-1-expected.txt:
* platform/chromium-win/editing/selection/select-across-readonly-input-4-expected.txt:
* platform/chromium-win/editing/selection/select-across-readonly-input-5-expected.txt:
* platform/chromium-win/fast/events/autoscroll-expected.txt:
* platform/chromium-win/fast/events/context-no-deselect-expected.txt:
* platform/chromium-win/fast/forms/input-appearance-focus-expected.txt:
* platform/chromium-win/fast/forms/input-appearance-readonly-expected.txt:
* platform/chromium-win/fast/forms/input-appearance-selection-expected.txt:
* platform/chromium-win/fast/forms/input-double-click-selection-gap-bug-expected.txt:
* platform/chromium-win/fast/forms/input-placeholder-visibility-1-expected.txt:
* platform/chromium-win/fast/forms/input-placeholder-visibility-3-expected.txt:
* platform/chromium-win/fast/forms/input-readonly-autoscroll-expected.txt:
* platform/chromium-win/fast/forms/input-text-click-inside-expected.txt:
* platform/chromium-win/fast/forms/input-text-drag-down-expected.txt:
* platform/chromium-win/fast/forms/input-text-option-delete-expected.txt:
* platform/chromium-win/fast/forms/input-text-scroll-left-on-blur-expected.txt:
* platform/chromium-win/fast/forms/input-text-self-emptying-click-expected.txt:
* platform/chromium-win/fast/forms/number/number-appearance-rtl-expected.txt:
* platform/chromium-win/fast/forms/plaintext-mode-2-expected.txt:
* platform/chromium-win/fast/forms/search-rtl-expected.txt:
* platform/chromium-win/fast/forms/tabbing-input-iframe-expected.txt:
* platform/chromium-win/fast/forms/textarea-placeholder-visibility-1-expected.txt:
* platform/chromium-win/fast/forms/textarea-placeholder-visibility-2-expected.txt:
* platform/chromium-win/fast/forms/textarea-scrollbar-expected.txt:
* platform/chromium-win/fast/forms/textarea-scrolled-type-expected.txt:
* platform/chromium-win/fast/forms/textfield-focus-ring-expected.txt:
* platform/chromium-win/fast/forms/textfield-overflow-expected.txt:
* platform/chromium-win/fast/frames/take-focus-from-iframe-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-1-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-10-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-2-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-3-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-4-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-5-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-6-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-7-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-8-and-click-expected.txt:
* platform/chromium-win/fast/html/details-add-summary-9-and-click-expected.txt:
* platform/chromium-win/fast/html/details-remove-summary-1-and-click-expected.txt:
* platform/chromium-win/fast/html/details-remove-summary-2-and-click-expected.txt:
* platform/chromium-win/fast/html/details-remove-summary-3-and-click-expected.txt:
* platform/chromium-win/fast/html/details-remove-summary-4-and-click-expected.txt:
* platform/chromium-win/fast/html/details-remove-summary-5-and-click-expected.txt:
* platform/chromium-win/fast/html/details-remove-summary-6-and-click-expected.txt:
* platform/chromium-win/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt:
* platform/chromium-win/fast/transforms/transformed-focused-text-input-expected.txt:
* resources/dump-as-markup.js:
(Markup._get):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Add Crash test expectation to the media/track/ tests which have explicit expectations.
It needs to be removed after fixing https://bugs.webkit.org/show_bug.cgi?id=105606

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Never create WebCore scrollbars for EFL/WK2
https://bugs.webkit.org/show_bug.cgi?id=105632

Reviewed by Antonio Gomes.

Source/WebCore:

For delegates scroll we must not use the scroll animator,
or similar as those depends on creating WebCore scrollbars.

Handle the wheel event manually for delegates scrolling.

* page/FrameView.cpp:
(WebCore::FrameView::wheelEvent):

Source/WebKit2:

Then creating the frame ask to not create scrollbars and
lock it so they won't be created at any later time.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement ShadowRoot::elementFromPoint
https://bugs.webkit.org/show_bug.cgi?id=104579

Reviewed by Dimitri Glazkov.

Source/WebCore:

Move elementFromPoint and nodeFromPoint to TreeScope from Document so that ShadowRoot can call it.
In the elementFromPoint(), the element taken by nodeFromPoint is not in the same tree scope, its ancestor is returned.

Since nodeFromPoint does not return the shadow ancestor of the result node, I don't make it TreeScope method.

Test: fast/dom/shadow/elementfrompoint.html

* dom/Document.cpp:
(WebCore::Document::elementFromPoint): Code is shared with TreeScope.
(WebCore::Document::caretRangeFromPoint):
* dom/ShadowRoot.idl:
* dom/TreeScope.cpp:
(WebCore::nodeFromPoint): Moved from Document.cpp
(WebCore):
(WebCore::TreeScope::elementFromPoint):
* dom/TreeScope.h:
(WebCore):
(TreeScope):

LayoutTests:

* fast/dom/shadow/elementfrompoint-expected.txt: Added.
* fast/dom/shadow/elementfrompoint.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium/Mac] Don't send an onclick event from a ctrl-click
https://bugs.webkit.org/show_bug.cgi?id=105554

Patch by Alexei Svitkine <asvitkine@chromium.org> on 2012-12-21
Reviewed by Dimitri Glazkov.

Don't send the onclick event on a control click event (which
triggers the context menu on the Mac). This matches the
behaviour of the Apple Mac port, although the Apple port
does this by checking whether the context menu is visible
in WebPage::mouseEvent().

This is a fix for http://crbug.com/146143

Source/WebCore:

Test: fast/events/controlclick-no-onclick.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):

LayoutTests:

* fast/events/controlclick-no-onclick-expected.txt: Added.
* fast/events/controlclick-no-onclick.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Various tests in media/track are intermittently crashing.
https://bugs.webkit.org/show_bug.cgi?id=105606

Reviewed by Eric Seidel.

The root of problem is the fact that we update tracks even if we are in process of deleting the document.
Media element can stop doing that if the document informed the element via ::stop that it is going away.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add WebKit1-specific TestExpectations file
https://bugs.webkit.org/show_bug.cgi?id=97562

Reviewed by Dirk Pranke.

Tools: 

Implement the expectations_files method inside the GtkPort class that
returns the list of the TestExpectations files the current test configuration
requires. The method is implemented in a similar way as on the EFL port.
A unit test is also added.

* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort._search_paths):
(GtkPort):
(GtkPort.expectations_files):
* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
(GtkPortTest.test_expectations_files):

LayoutTests: 

Add properly formatted but currently empty TestExpectations file
for GTK WebKit1-specific test expectations.

* platform/gtk-wk1/TestExpectations: Added.


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