[EFL] Build fix after r143192 when SPELLCHECK is off

Unreviewed build fix when SPELLCHECK macro is off.

* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][GTK][WKTR] Regression(r145231): Undefined symbol in libTestRunnerInjectedBundle.so
https://bugs.webkit.org/show_bug.cgi?id=111970

Reviewed by Chris Fleizach.

Provide dummy implementation for AccessibilityUIElement::supportedActions() in ATK
or libTestRunnerInjectedBundle.so cannot be loaded in EFL / GTK otherwise, due to
undefined symbol.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::supportedActions):
(WTR):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inappropriate validation message for required number/date input elements
https://bugs.webkit.org/show_bug.cgi?id=111982

Reviewed by Kentaro Hara.

Source/WebCore:

For validation message, badInput messages should take precedence
over valueMissing messages because users already filled out the
field with a bad value.

Tests: Update fast/forms/validationMessage.html

* html/InputType.cpp:
(WebCore::InputType::validationMessage):
Check badInput first.

LayoutTests:

* fast/forms/validationMessage-expected.txt:
* fast/forms/validationMessage.html:
* platform/chromium/fast/forms/validationMessage-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
https://bugs.webkit.org/show_bug.cgi?id=111997

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

This changed in r130439 but the old name was introduced again by
mistake in r144465.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
(WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::setNeedsCommit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
(tests) make nodesFromRect.js print a list of nodes that were found
https://bugs.webkit.org/show_bug.cgi?id=111793

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-11
Reviewed by Allan Sandfeld Jensen.

* fast/dom/nodesFromRect/resources/nodesFromRect.js:
(nodeToString):
(nodeListToString):
(check):
(nodesFromRectAsString):
Move node prettyprinting code from nodesFromRectAsString to new
functions nodeToString and nodeListToString, and make use of it in
check().
I've also converted the nodeType checks to use the constants on Node
instead of using magic numbers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] SelectionHandler: bring back m_lastSelection attribute
https://bugs.webkit.org/show_bug.cgi?id=111972

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

This was removed in r144515 but is still needed by
SelectionHandler::selectionPositionChanged().

* WebKitSupport/SelectionHandler.h:
(SelectionHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Enable tiled shadow blur for inset box shadows
https://bugs.webkit.org/show_bug.cgi?id=111736

Reviewed by Noam Rosenthal.

Paint inset box-shadows using the optimized tiled shadow blur, instead of
applying shadow blur to the entire painted rect.

This optimizes the default CSS on common pastebin sites.

Tested by existing tests.

* platform/graphics/GraphicsContext.cpp:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
    Must set fill color before calling clearShadow, as that might clear m_color.
(WebCore::ShadowBlur::drawLayerPieces):
    Ditto.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::fillRectWithRoundedHole):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: add per image statistics to the native memory snapshot
https://bugs.webkit.org/show_bug.cgi?id=112011

Reviewed by Pavel Feldman.

Added per-image statistics to the native memory distribution table.

* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotWorker):
(WebInspector.HeapSnapshotWorker.prototype.createLoader):
(WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
(WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
(WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
proxy constructor function instead of its name. This eliminates unnecessary function lookup.
(WebInspector.HeapSnapshotLoaderProxy):
(WebInspector.HeapSnapshotLoaderProxy.prototype.close):
(WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
(WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
(WebInspector.NativeHeapSnapshotProxy):
(WebInspector.NativeHeapSnapshotProxy.prototype.images):
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
(WebInspector.HeapProfileHeader.prototype._setupWorker):
* inspector/front-end/NativeHeapSnapshot.js:
(WebInspector.NativeHeapSnapshot.prototype.images):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotNode):
(WebInspector.NativeSnapshotNode.prototype._createSizeCell):
(WebInspector.NativeSnapshotNode.prototype._populate):
(WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
(WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
(WebInspector.NativeSnapshotNode.prototype._addImageDetails):
(WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CodeMirror] set indentation size according to devtools settings
https://bugs.webkit.org/show_bug.cgi?id=111717

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-11
Reviewed by Pavel Feldman.

Set up codemirror indent size according to devtools settings.

No new tests.

* inspector/front-end/CodeMirrorTextEditor.js:
(.get if):
(WebInspector.CodeMirrorTextEditor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make it possible to reuse sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=111883

Reviewed by Anders Carlsson.

This allows for properly keeping extensions in NetworkBlobRegistry for as long as
they are needed.

The patch also fixes a bug where extensions would leak when navigating between
file:// pages.

* NetworkProcess/SchedulableLoader.cpp:
Revoke the extensions, but don't invalidate - we may need them later.

* Shared/Downloads/Download.cpp:
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):
Replaced invalidate() with revoke() and clearing out. SandboxExtension destructor
now requires revocations wto be balanced, as otherwise understanding dual reference
counting in SandboxExtension would be too difficult.

* Shared/SandboxExtension.h: We now keep track of how many times the extension
was consumed. Eventually, we should refactor the class to not have such duplicate
reference counting.
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::SandboxExtension): Initialize use count.
(WebKit::SandboxExtension::~SandboxExtension): We now require consume/revoke calls
to be balanced. This is not hard to do in existing usage, and makes the design much
more reliable.
(WebKit::SandboxExtension::revoke): Don't permanently destroy the extension when
invalidatid, we may need it in the future.
(WebKit::SandboxExtension::consume): Added use counting.

* Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): This extension
is not going to be reused.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction): Pending extensions are not consumed,
so there is no need to revoke.
(WebKit::WebPage::SandboxExtensionTracker::invalidate): Pending extension is not
consumed, and the other two always are.
(WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
Pending extension is never consumed in place, no need to revoke.
(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Do not unset
reused committed extension yet - we may need it later if provisional load fails.
Thanks to use counting, we can now consume the same extension as both committed
and provisional.
(WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Now the
committed extension can be revoked and replaced.
(WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): Just revoke
provisional extension, committed one is still in place.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CodeMirror] add token highlight feature
https://bugs.webkit.org/show_bug.cgi?id=112009

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-11
Reviewed by Pavel Feldman.

Handle CodeMirror's "cursorActivity" event, check selection for being
a word and highlight all its occurrences via CodeMirror.addOverlay method.

No new tests.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
* inspector/front-end/cm/cmdevtools.css:
(.cm-token-highlight):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: fix styles toolbar in the vertical mode.
Not reviewed: swapped two lines.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
https://bugs.webkit.org/show_bug.cgi?id=110580

Patch by Xan Lopez <xlopez@igalia.com> on 2013-03-11
Reviewed by Rob Buis.

Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
link phase fails.

* PlatformBlackBerry.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Disable MathML support
https://bugs.webkit.org/show_bug.cgi?id=111929

Patch by Jeff Rogers <jrogers@rim.com> on 2013-03-11
Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake:

Tools:

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Protect against key prefix overflows
https://bugs.webkit.org/show_bug.cgi?id=111138

Reviewed by Tony Chang.

Source/WebCore:

This reworks the boundary checking for all databaseId,
objectStoreId, and indexId, including negative and
zero-based ids. All entrypoints into IDBLevelDBCoding
are protected with explicit checks and all internal
uses of KeyPrefix are protected with ASSERTs in the
various constructors.

Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium

* Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
* Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.

Source/WebKit/chromium:

Add tests for invalid indexIds in basic get/put operations.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
https://bugs.webkit.org/show_bug.cgi?id=112040

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-11
Reviewed by Gustavo Noronha Silva.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessage): Update the soup
message URI with the ResourceRequest URL.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace SVG's static_cast<SVGElement> with toSVGElement()
https://bugs.webkit.org/show_bug.cgi?id=111651

Reviewed by Abhishek Arya.

toSVGElement is preferred over static_cast because bad casts can be caught on
our testing infrastructure. This patch replaces all static_cast<SVGElement>
instances with toSVGElement.

No new tests as this is just a refactoring.

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::matchAllRules):
(WebCore::StyleResolver::locateCousinList):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
* dom/Element.cpp:
(WebCore::Element::synchronizeAllAttributes):
(WebCore::Element::synchronizeAttribute):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::getElementCTM):
(WebCore::RenderSVGModelObject::checkIntersection):
(WebCore::RenderSVGModelObject::checkEnclosure):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::removeFromCacheAndInvalidateDependencies):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeWidth):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGPaintingResource):
(WebCore::writeStyle):
(WebCore::operator<<):
* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::buildCachedResources):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::createRenderer):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::adjustForInheritance):
* svg/SVGElement.cpp:
(WebCore::SVGElement::viewportElement):
(WebCore::SVGElement::haveLoadedRequiredResources):
(WebCore::SVGElement::sendSVGLoadEventIfPossible):
(WebCore::SVGElement::childShouldCreateRenderer):
* svg/SVGElement.h:
(WebCore::toSVGElement):
(WebCore):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::buildPendingResource):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::buildStops):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::nearestViewportElement):
(WebCore::SVGLocatable::farthestViewportElement):
(WebCore::SVGLocatable::computeCTM):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::buildPendingResource):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::updateRelativeLengthsInformation):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::childShouldCreateRenderer):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::buildPendingResource):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildPendingResource):
(WebCore::SVGUseElement::toClipPath):
(WebCore::SVGUseElement::rendererClipChild):
(WebCore::SVGUseElement::buildInstanceTree):
(WebCore::SVGUseElement::hasCycleUseReferencing):
(WebCore::SVGUseElement::expandUseElementsInShadowTree):
(WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewTarget):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Handle spanning grid items over specified grid tracks
https://bugs.webkit.org/show_bug.cgi?id=111918

Reviewed by Tony Chang.

Source/WebCore:

This change updates the containing block override logic to handle multiple
spanned tracks. This makes the multiple specified grid tracks case work and
will enable us to handle the minmax case once the computation logic has been
updated.

Test: fast/css-grid-layout/grid-item-spanning-resolution.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
Updated these functions to use gridAreaBreadthForChild.

(WebCore::RenderGrid::gridAreaBreadthForChild):
Added this helper function to handle multiple spanned grid tracks.

* rendering/RenderGrid.h: Added the previous function.

LayoutTests:

* fast/css-grid-layout/grid-item-spanning-resolution-expected.txt:
We now pass all the tests.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MutationCallback should be a WebIDL 'callback', not a [Callback] interface
https://bugs.webkit.org/show_bug.cgi?id=91406

Reviewed by Adam Barth.

Source/WebCore:

Spec: http://dom.spec.whatwg.org/#mutationcallback

Besides no longer calling handleEvent methods on passed-in objects,
throw a TypeError if a non-function is passed to the MutationObserver constructor.
This is per WebIDL: http://www.w3.org/TR/WebIDL/#es-callback-function

Updated MutationObserver constructor tests to exercise TypeError-throwing behavior.

* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call): Call the callback directly instead of handing off to JSCallbackData; make return value void.
Use jsArray() to convert from WTF::Vector -> JSArray.
* bindings/js/JSMutationCallback.h:
(JSMutationCallback): Rename handleEvent() to call(), make it void.
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Throw if passed a non-function.
* bindings/v8/V8MutationCallback.cpp:
(WebCore::V8MutationCallback::V8MutationCallback): Take a v8::Function instead of a v8::Object.
(WebCore::V8MutationCallback::call): Call the callback directly instead of handing off to invokeCallback(); make return value void.
Use v8Array() to convert form WTF::Vector -> JSArray.
* bindings/v8/V8MutationCallback.h:
(WebCore::V8MutationCallback::create): Take a v8::Function instead of a v8::Object.
(V8MutationCallback): ditto
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCustom): Throw if passed a non-function, cast to a v8::Function when constructing callback.
* dom/MutationCallback.h:
(WebCore): Remove unnecessary typedef.
(MutationCallback): Rename handleEvent() to call(), make it void.
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliver): Update MutationCallback method name.

LayoutTests:

* fast/dom/MutationObserver/mutation-observer-constructor-expected.txt:
* fast/dom/MutationObserver/mutation-observer-constructor.html: Add test for TypeError-throwing.
Note that the Number and String cases already threw before this patch.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CoreIPC crash in NetworkProcess after WebProcess crash.
<rdar://problem/13124146> and https://bugs.webkit.org/show_bug.cgi?id=112046

Reviewed by Alexey Proskuryakov.

* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::connectionToWebProcessDidClose): Don't null out the connection backpointer on crash.

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