[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
Clean up RenderFrameSet::nodeAtPoint
https://bugs.webkit.org/show_bug.cgi?id=112450

Reviewed by Eric Seidel.

Remove handling of resizing framesets from RenderFrameSet::nodeAtPoint.
The code has been incorrect since a mistake in r18333 (December 2006),
but has been dead code since r17770 (November 2006) where the then new
EventHandler started taking care of routing events to resizing FrameSets.

Since this was the only special feature of RenderFrameSet::nodeAtPoint,
the method has been removed.

* rendering/RenderFrameSet.cpp:
* rendering/RenderFrameSet.h:
(RenderFrameSet):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Resources] Local Storage: duplicate keys are processed inappropriately.
https://bugs.webkit.org/show_bug.cgi?id=112402

Reviewed by Alexander Pavlov.

When user creates new items or renames existing one some existing item
may be overriden. If value is changed, then frontend will receive
notification and update record appropriately.

If item value hasn't been changed, then no notification comes.
But UI still expect / rely on this notification.

With this patch the "no notification" scenario is fixed:
duplicate items are removed.

Another scenario is when update notification comes when we started
editing value (after entering / renaming key). In this case
selected node should not be changed to leave user in editing mode.

* inspector/front-end/DOMStorageItemsView.js:
Added workarounds for "no notification" and "useless notification".


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Detach overlays from page when compositor is detached
https://bugs.webkit.org/show_bug.cgi?id=112424

Reviewed by Rob Buis.

PR 309160

Source/WebCore:

Expose a method to retrieve a compositing thread layer's client.

No change in behavior, no new tests.

* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::client):

Source/WebKit/blackberry:

If not detached properly, the overlays would have a dangling pointer to
the page.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
(BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread):
(BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
* Api/WebOverlay_p.h:
(BlackBerry::WebKit::WebOverlayPrivate::setClient):
(WebOverlayLayerCompositingThreadClient):
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::overlay):
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::overlayDestroyed):
(WebOverlayPrivateCompositingThread):
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::detach):
(BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
(WebKit):
(BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
* Api/WebPageCompositor_p.h:
(BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
(BlackBerry::WebKit::WebPageCompositorPrivate::detachOverlays):
(WebPageCompositorPrivate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Exports leveldb symbols
https://bugs.webkit.org/show_bug.cgi?id=112526

Reviewed by Carlos Garcia Campos.

* Source/autotools/symbols.filter: make leveldb symbols local.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] EditorClientBlackBerry: fix access to WebPage attribute
https://bugs.webkit.org/show_bug.cgi?id=112556

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

This changed in r145849 and broke the BlackBerry build.

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::smartInsertDeleteEnabled):
(WebCore::EditorClientBlackBerry::isSelectTrailingWhitespaceEnabled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: TabbedEditorContainer does not restore last shown file on reload sometimes.
https://bugs.webkit.org/show_bug.cgi?id=112561

Reviewed by Alexander Pavlov.

* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.prototype.addUISourceCode):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add USE(PLATFORM_STRATEGIES) ifdefs to StorageNamespace.cpp
https://bugs.webkit.org/show_bug.cgi?id=112004

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-18
Reviewed by Rob Buis.

Check if platform strategies is enabled before using it, falling
back to StorageNamespaceImpl if it isn't.

* storage/StorageNamespace.cpp:
(WebCore::StorageNamespace::localStorageNamespace):
(WebCore::StorageNamespace::sessionStorageNamespace):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Settings] Register "?" shortcut.
https://bugs.webkit.org/show_bug.cgi?id=112545

Reviewed by Vsevolod Vlasov.

F1 and "?" (show shortcuts page) are not mentioned on shortcuts page.

* English.lproj/localizedStrings.js: Added string.
* inspector/front-end/inspector.js: Registered F1 / "?" shortcut.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] plugins/plugin-clip-subframe.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112570

Reviewed by Martin Robinson.

Tools: 

* GNUmakefile.am: Add the LogNPPSetWindow.cpp file to the build.

LayoutTests: 

* platform/gtk-wk2/plugins/plugin-clip-subframe-expected.txt: Added the required baseline.
* platform/gtk/TestExpectations: Removing the failure expectation.
* platform/gtk/plugins/plugin-clip-subframe-expected.txt: Added the required baseline.


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

* platform/efl/TestExpectations: Remove
editing/pasteboard/paste-4035648-fix.html from the skipped list after
r144999.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need to use const String in HTMLVideoElement::posterImageURL
https://bugs.webkit.org/show_bug.cgi?id=112317

Patch by Tao Bai <michaelbai@chromium.org> on 2013-03-18
Reviewed by Andreas Kling.

No behavioral changes.

This is the followup of https://bugs.webkit.org/show_bug.cgi?id=110263
Need to use String instead of const AtomicString& which means we will do an extra hash lookup

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::posterImageURL): Change to use String for url

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Access settings.defaultVideoPosterURL
https://bugs.webkit.org/show_bug.cgi?id=112378

Patch by Tao Bai <michaelbai@chromium.org> on 2013-03-18
Reviewed by Dimitri Glazkov.

The defaultVideoPosterURL setting has been added in
https://bugs.webkit.org/show_bug.cgi?id=110263,
this added methods to access it in Chromium.
The settings will be used by Android WebView API
WebChromeClient.getDefaultVideoPoster()

* public/WebSettings.h: add setDefaultVideoPosterURL
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setDefaultVideoPosterURL): set defaultVideoPosterURL
* src/WebSettingsImpl.h: add setDefaultVideoPosterURL

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ObjectPrototype properties should be eagerly created rather than lazily via static tables
https://bugs.webkit.org/show_bug.cgi?id=112539

Reviewed by Oliver Hunt.
        
This is the first part of https://bugs.webkit.org/show_bug.cgi?id=112233. Rolling this
in first since it's the less-likely-to-be-broken part.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* interpreter/CallFrame.h:
(JSC::ExecState::objectConstructorTable):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalData.cpp:
(JSC):
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
* runtime/JSGlobalData.h:
(JSGlobalData):
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectNativeFunction):
(JSC):
* runtime/JSObject.h:
(JSObject):
(JSC):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/ObjectPrototype.cpp:
(JSC):
(JSC::ObjectPrototype::finishCreation):
(JSC::ObjectPrototype::create):
* runtime/ObjectPrototype.h:
(ObjectPrototype):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change RenderTableCell to use pixelSnappedSize when painting
https://bugs.webkit.org/show_bug.cgi?id=112562

Reviewed by Eric Seidel.

Source/WebCore:

Change the paining code in RenderTableCell to use the pixel snapped size
to ensure consistent rounding given that the location was rounded during
layout.

It is currently constructing a paint rect by taking the rounded location
and the precise size and then pixel snapping it. This causes the size to
be rounded incorrectly. By instead using the pixel snapped size the
rounding problem can be avoided.

Test: fast/sub-pixel/table-cell-background.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
(WebCore::RenderTableCell::paintMask):

LayoutTests:

Add test for painting of cell backgrounds on a sub-pixel boundary.

* fast/sub-pixel/table-cell-background-expected.html: Added.
* fast/sub-pixel/table-cell-background.html: Added.
* platform/chromium-linux/tables/mozilla/bugs/bug73321-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Specifying polygonal -webkit-shape-inside value can crash browser (debug mode)
https://bugs.webkit.org/show_bug.cgi?id=112157

Reviewed by David Hyatt.

Source/WebCore:

Corrected the code which maps exclusion segments to pairs of InlineIterators. We now handle the
cases where the end of the line occurs within an exclusion segment or when it occurs before
the last exclusion segment has been reached. This can occur when a non-convex polygonal shape-inside
breaks a line up into two segments, but the shape-inside element's content only fills (or partially
fills) the first exclusion shape segment.

Tests: fast/exclusions/shape-inside/shape-inside-partial-fill-001.html
       fast/exclusions/shape-inside/shape-inside-partial-fill-002.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak):

LayoutTests:

Added tests with a polygonal shape-inside exclusion shape, where multiple shape
segments exist on one line, but the line's text either partially or completely
fills only the first exclusion shape segment.

* fast/exclusions/shape-inside/shape-inside-partial-fill-001-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-partial-fill-001.html: Added.
* fast/exclusions/shape-inside/shape-inside-partial-fill-002-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-partial-fill-002.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Crash when accessing onclick attribute of document from XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=112585

Reviewed by Eric Seidel.

Source/WebCore:

This ASSERT was bogus. The frame can be 0 for frameless documents, like
those created by XMLHttpRequest. When there is no frame, we act as if
JavaScript was disabled, which it is.

Test: fast/events/xhr-onclick-crash.html

* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):

LayoutTests:

* fast/events/resources/onclick.html: Added.
* fast/events/xhr-onclick-crash-expected.txt: Added.
* fast/events/xhr-onclick-crash.html: Added.


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