[Mac] Flaky crash in SliderThumbElement::defaultEventHandler on fast/forms/range/slider-delete-while-dragging-thumb.html
https://bugs.webkit.org/show_bug.cgi?id=108223

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inspector: IndexedDB clear button and menu item
https://bugs.webkit.org/show_bug.cgi?id=112066

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Adds a button that can clear the contents of an objectStore from
the IDBDataView, and a context menu from the ResourcesPanel that
can do the same.

This also disables the Refresh button from the IDBDataView, so there
is at least some visual feedback that the refresh button is working.

Tests: http/tests/inspector/indexeddb/database-data.html

* inspector/Inspector.json: New API clearObjectStore.
* inspector/InspectorIndexedDBAgent.cpp: Implementation of clearObjectStore
(WebCore):
(ClearObjectStoreListener): Calls the original closure after the objectStore is cleared.
(ClearObjectStore): Initiates the clear operation after the DB opens.
* inspector/front-end/IndexedDBModel.js: Exposes clearObjectStore to the Model API.
(WebInspector.IDBDataView): Add clear button and enable/disable clear and refresh buttons appropriately.
* inspector/front-end/ResourcesPanel.js: Add a menu item and refresh the displayed data after the clear.
* inspector/front-end/inspector.css: Add a style to show the right button for clear.

LayoutTests:

Add extra methods to test clearing the database after populating it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: m_scheduledTasksAreSuspended
https://bugs.webkit.org/show_bug.cgi?id=97124

Mark fast/loader/dynamic-iframe-extra-back-forward-item.html as sometimes crashing in debug.

* platform/mac-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix menu items capitalization.
https://bugs.webkit.org/show_bug.cgi?id=112553

The context menu items should be correctly capitalized.

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-19
Reviewed by Pavel Feldman.

* English.lproj/localizedStrings.js:
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._emptyElementContextMenu):
(WebInspector.XHRBreakpointsSidebarPane.prototype._emptyElementContextMenu):
(WebInspector.XHRBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._handleContextMenuEvent.get var):
(WebInspector.ConsoleView.prototype._handleContextMenuEvent.set get contextMenu):
* inspector/front-end/DOMBreakpointsSidebarPane.js:
(WebInspector.DOMBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
(WebInspector.ElementsPanel.prototype.appendApplicableItems):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
(WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype.appendApplicableItems):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
(WebInspector.ProfilesPanel.prototype.appendApplicableItems):
(WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
(WebInspector.ScriptsPanel.prototype._appendFunctionItems):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPaneTab.prototype._tabContextMenu):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._contextMenu):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype._emptyElementContextMenu):
(WebInspector.WatchExpressionTreeElement.prototype.populateContextMenu):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion in LegacyWebArchive::create() in editing tests
https://bugs.webkit.org/show_bug.cgi?id=112642

editing/pasteboard/5780697-1.html is also a flakey assertion.

Move to mac-wk2 beacuse these only seem to happen in WK2.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable USE_SYSTEM_MALLOC by default
https://bugs.webkit.org/show_bug.cgi?id=112365

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-19
Reviewed by Benjamin Poulain.

Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
harcoding it in wtf/Platform.h

Source/WTF:

* wtf/Platform.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hover effects from a GestureTapDown are dismissed by a GestureTap on the hover element
https://bugs.webkit.org/show_bug.cgi?id=103283

Reviewed by Antonio Gomes.

Source/WebCore:

On a GestureTap event over an element that was made visible as a hover effect, the
GestureTap should be applied to that element and the hover effects should not be dismissed.
A GestureTap or a mouse move to a location outside of the element should still dismiss the
hover effects.

Tests: fast/events/touch/gesture/gesture-tap-hover-clear.html
       fast/events/touch/gesture/gesture-tap-on-hover-element.html

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

LayoutTests:

Two layout tests added. See descriptions inline.

* fast/events/touch/gesture/gesture-tap-hover-clear-expected.txt: Added.
* fast/events/touch/gesture/gesture-tap-hover-clear.html: Added.
      Tests that a GestureTap or a mouse move outside of the hovered element
      clears its hover effects.
* fast/events/touch/gesture/gesture-tap-on-hover-element-expected.txt: Added.
* fast/events/touch/gesture/gesture-tap-on-hover-element.html: Added.
      Tests that a GestureTap on an element which has been made visible as
      a hover effect is dispatched to the element and does not dismiss the
      hover effect.
* platform/chromium/fast/events/touch/gesture/gesture-tap-hover-clear-expected.txt: Added.
* platform/chromium/fast/events/touch/gesture/gesture-tap-on-hover-element-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Use integer plumbing for deleteDatabase onVersionChange calls
https://bugs.webkit.org/show_bug.cgi?id=112715

Reviewed by Tony Chang.

When deleteDatabase on the back-end needs to send the front-end an
onVersionChange notification it does so using the string overload. That's
the only remaining use of that overload and we'd like to delete it. Switch
to using the integer overload, with an already defined special value.
This will unblock http://wkbug.com/112712 to delete the dead code.

No new tests - no functional change.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::onVersionChange): Map NoIntVersion to null.
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteDatabase): Call integer overload.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] When selecting an object, assign focus to new node instead of clearing previous focused node
https://bugs.webkit.org/show_bug.cgi?id=112707

Patch by Andy Chen <andchen@blackberry.com> on 2013-03-19
Reviewed by Rob Buis.

In SelectionHandler, when selecting a new object, we should set focus
to the anchor node of selection instead of removing it from the old input.
In InputHandler, when focusedNodeChanged is called, if the new node is
not an Element node, we need to set focus to its Element parent node,
instead of removing focus from the old node.
PR 304631
Internally reviewed by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::focusedNodeChanged):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectObject):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Separate SVG image size and container size
https://bugs.webkit.org/show_bug.cgi?id=112651

Reviewed by Stephen Chenney.

Source/WebCore:

Previously, SVG images could retain their cached size between reloads due to a bug where an
old container size would be re-used if the image's new container size was not available yet.

This patch changes SVGImage::size() to return the intrinsic size of the image before a
container size has been set. SVGImageCache::imageSizeForRenderer will now return the
image's intrinsic size instead of a cached value if the container size cannot be looked up.
In javascript, querying [SVGImage].width will now return either the image's intrinsic size
or the size of 'imageForContainer'.

Test: svg/as-image/svg-container-size-after-reload.html

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):
(WebCore::SVGImage::draw):
(WebCore::SVGImage::dataChanged):
* svg/graphics/SVGImage.h:

    The member variable 'm_intrinsicSize' has been added to track the image's intrinsic
    size. This term can be found in: http://www.w3.org/TR/css3-images/#default-sizing

* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageSizeForRenderer):
(WebCore::SVGImageCache::imageForRenderer):

    In both of these functions, image has been renamed to imageForContainer here to clarify
    that the cached container size is being returned, not the image's intrinsic size.

LayoutTests:

* svg/as-image/svg-container-size-after-reload-expected.txt: Added.
* svg/as-image/svg-container-size-after-reload.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement onRefEncodedData for lazy pixel refs.
This allows printToSkPicture to write the original
encoded data to the stream.
Add a method to ImageFrameGenerator to copy its
data, which is used by onRefEncodedData.
https://bugs.webkit.org/show_bug.cgi?id=110759

Patch by Leon Scroggins <scroggo@chromium.org> on 2013-03-19
Reviewed by Stephen White.

No new tests. New functionality is for testing purposes
(creating SKP files).

* platform/graphics/chromium/ImageFrameGenerator.cpp:
(WebCore::ImageFrameGenerator::data):
(WebCore):
* platform/graphics/chromium/ImageFrameGenerator.h:
(ImageFrameGenerator):
* platform/graphics/chromium/LazyDecodingPixelRef.cpp:
(WebCore::LazyDecodingPixelRef::isClipped):
(WebCore):
(WebCore::LazyDecodingPixelRef::onRefEncodedData):
* platform/graphics/chromium/LazyDecodingPixelRef.h:
(LazyDecodingPixelRef):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove deprecated/unused bits of WebLayerTreeView
https://bugs.webkit.org/show_bug.cgi?id=112714

Patch by James Robinson <jamesr@chromium.org> on 2013-03-19
Reviewed by Adam Barth.

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the WTF gyp build for GTK+.

* WTF.gyp/WTFGTK.gyp: Skip files with CF in the name.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Unreviewed build correction for WebCore library.

* WebCore.vcxproj/WebCore.vcxproj: Exclude CG-specific frame source
from WinCairo build.
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Pass correct
parameter to build-generated-files.sh for WinCairo build.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] IndexedDB: index-duplicate-keypaths test is flaky under content_shell
https://bugs.webkit.org/show_bug.cgi?id=112723

Reviewed by Tony Chang.

Root cause is a race between the "versionchange" transaction's "complete" event
being dispatched to script and the "success" call arriving from the back-end
which updates the metadata. Tracked as https://bugs.webkit.org/show_bug.cgi?id=111642

* storage/indexeddb/resources/index-duplicate-keypaths.js:
(testCollideAutoIncrementSetup): Trigger test from open's onsuccess...
(testCollideAutoIncrement): ... rather than transaction's oncomplete.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Don't handle keyboard scrolling shortcuts in webkit
https://bugs.webkit.org/show_bug.cgi?id=112716

Informally Reviewed by Mike Fenton (mifenton@rim.com)
Patch by Chris Hutten-Czapski <chutten@blackberry.com> on 2013-03-19
Reviewed by Rob Buis.

The comment is right, this isn't the correct place to handle keyboard
scrolling shortcuts. That's what we have clients for.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::keyEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r146101.
https://bugs.webkit.org/show_bug.cgi?id=111884

re-enable custom freetype on asan; this needs to be on
now that the bot is running lucid.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled Chromium DEPS to r189038.  Requested by
"Mark Pilgrim" <pilgrim@chromium.org> via sheriffbot.

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening of AppleWin port.

* platform/win/fast/dom/icon-url-property-expected.txt: Added.
* platform/win/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GIFImageReader to count frames and decode in one pass
https://bugs.webkit.org/show_bug.cgi?id=111144

Reviewed by Stephen White.

Source/WebCore:

OBJECTIVE

This change has the objective of improving performance reading GIF
files. This implementation can parse the entire GIF file in one pass
and saves information about each frame, such that decoding in a later
pass does not need to parse the file again.

This change fixes the performance problem of decoding GIF files when
they are received very slowly. Existing implementation creates a new
GIFImageReader for counting frames for every time it is notified that
new data has been received, this has O(n^2) behavior when data is
received very slowly.

ALGORITHM

This implementation divides the decoding process into two separate
steps: parse and LZW decoding.

In the parse step, the state machine is similar to the existing
implementation. However this algorithm does not perform any decoding
while scanning through the file. Intead it creates a new data structure
for caching all frame information and the corresponding LZW blocks.

If a full decode is requested then LZW decoding is performed. This
implementation looks through all frame information saved and decodes
each frame sequentially until the target frame is reached.

Because of the separation of parse and decode, each frame can be
decoded separately. This paves the way to support seeking in GIF files.

TESTING

Added a new unit test to cover progressively decoding a GIF image.
There are already GIF unit tests for functional testing.
Exhaustive testing was done locally with a corpus of 60k images.
I mixed the corpus with some generated bad data and truncated files.
The results was bit-identical when compared to the previous
implementation.

These was also no crashing when decoding the entire corpus.

* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::GIFImageDecoder):
(WebCore::GIFImageDecoder::setData):
(WebCore::GIFImageDecoder::frameCount):
(WebCore::GIFImageDecoder::repetitionCount):
(WebCore::GIFImageDecoder::decode):
* platform/image-decoders/gif/GIFImageDecoder.h:
(GIFImageDecoder):
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFLZWContext::outputRow):
(GIFLZWContext::doLZW):
(GIFFrameContext::decode):
(GIFImageReader::decode):
(GIFImageReader::parse):
(GIFImageReader::addFrameIfNecessary):
(GIFLZWContext::prepareToDecode):
* platform/image-decoders/gif/GIFImageReader.h:
There is a lot of reshuffling in GIFLZWContext and GIFFrameContext.
These changes has the goal of having GIFLZWContext be a pure decoding
state machine. GIFFrameContext is mostly a read-only container for
frame information. With all these changes we can decode each
GIFFrameContext independently.

The ownership pattern is:
GIFImageReader owns GIFFrameContext owns GIFLZWContext.

(GIFLZWContext::GIFLZWContext):
(GIFLZWContext):
(GIFLZWContext::hasRemainingRows):
GIFLZWContext is moved to the top of file.
(GIFLZWBlock):
(GIFLZWBlock::GIFLZWBlock):
New data structure to save block position and size.
(GIFFrameContext):
(GIFFrameContext::GIFFrameContext):
(GIFFrameContext::~GIFFrameContext):
(GIFFrameContext::addLzwBlock):
(GIFFrameContext::isComplete):
(GIFFrameContext::isHeaderDefined):
(GIFFrameContext::isDataSizeDefined):
(GIFFrameContext::setComplete):
(GIFFrameContext::setHeaderDefined):
(GIFFrameContext::setDataSize):
Now owns GIFLZWContext for decoding.
(GIFImageReader::GIFImageReader):
(GIFImageReader::~GIFImageReader):
(GIFImageReader::imagesCount):
(GIFImageReader::frameContext):
(GIFImageReader):
(GIFImageReader::parseFailed):
(GIFImageReader::isFirstFrame):
Owns a list of GIFFrameContxt.

Source/WebKit/chromium:

Added a new GIF unit test for progressive decoding. The test is to verify
that continually re-decoding an image one additional byte at a time produces
the same outputs as repeatedly decoding (with brand new decoders) truncated
versions of the image that are one byte longer each time.

* tests/GIFImageDecoderTest.cpp:
(WebKit::TEST):


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