Do a bit of optimization and cleanup in the HTMLElement class
https://bugs.webkit.org/show_bug.cgi?id=122640

Reviewed by Andreas Kling.

* html/HTMLElement.cpp:
(WebCore::unicodeBidiAttributeForDirAuto): Take a reference.
(WebCore::HTMLElement::collectStyleForPresentationAttribute): Pass one.
(WebCore::mergeWithNextTextNode): Take a reference to a Text node instead
of a PassRefPtr to a Node. Also removed unnecessary check of parentNode.
Also update to new calling convention for mergeWithNextTextNode.
(WebCore::HTMLElement::setOuterHTML): Use parentElement instead of
parentNode, since Antti says that's the future, and either will work here.
Also use nullptr.
(WebCore::HTMLElement::textToFragment): Fix indentation and use nullptr.
(WebCore::HTMLElement::setOuterText): Use a RefPtr for the parent here,
since otherwise there is no guarantee it survives. Also use nullptr and
update to new calling convention for mergeWithNextTextNode.
(WebCore::HTMLElement::insertAdjacent): Use nullptr.
(WebCore::HTMLElement::insertAdjacentElement): Use nullptr.
(WebCore::contextElementForInsertion): Use nullptr.
(WebCore::HTMLElement::contentEditable): Use ASCIILiteral.
(WebCore::HTMLElement::setContentEditable): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::draggable): Use fastGetAttribute.
(WebCore::HTMLElement::setDraggable): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::setSpellcheck): Use AtomicString::ConstructFromLiteral.
(WebCore::HTMLElement::click): Use nullptr.
(WebCore::HTMLElement::accessKeyAction): Use nullptr.
(WebCore::HTMLElement::title): Use fastGetAttribute.
(WebCore::HTMLElement::translateAttributeMode): Use fastGetAttribute, isNull,
and isEmpty.
(WebCore::HTMLElement::translate): Use parentElement and toHTMLElement.
Use early-continue style instead of nesting the whole loop body inside an if.
(WebCore::setHasDirAutoFlagRecursively): Use nullptr.
(WebCore::HTMLElement::hasDirectionAuto): Use isNull.
(WebCore::HTMLElement::directionality): Use nullptr.
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): Use nullptr.
(WebCore::HTMLElement::addHTMLLengthToStyle): Use longer variable names.

* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::abbr): Use fastGetAttribute.
(WebCore::HTMLTableCellElement::axis): Ditto.
(WebCore::HTMLTableCellElement::headers): Ditto.
(WebCore::HTMLTableCellElement::scope): Ditto.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::width): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass VM instead of ExecState to JSGenericTypedArrayViewPrototype.
<https://webkit.org/b/122632>

Reviewed by Sam Weinig.

This code was only using the ExecState to find the VM.


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

* html/HTMLElement.cpp:
(WebCore::HTMLElement::translate): Do a const_cast when creating the
lineage, since it doesn't yet work with const pointers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for --64-bit target.

* Scripts/webkitdirs.pm:
(argumentsForConfiguration): Use 'isWin64' test, since @ARGV value may have
been removed by this point.
(hasArgument): Remove unused temporary.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Added new accessibility expectation after r154697
https://bugs.webkit.org/show_bug.cgi?id=122646

Unreviewed EFL gardening

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-11

* platform/efl-wk2/TestExpectations:
* platform/efl/accessibility/aria-checkbox-sends-notification-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] New positioning model: Negative margins
https://bugs.webkit.org/show_bug.cgi?id=118090

Reviewed by Darin Adler.

Tests for shape-outside with negative margins:

negative top margin
negative left margin
negative right margin
negative bottom margin
negative top margin vertical right-left writing mode
negative left margin vertical right-left writing mode
negative right margin vertical right-left writing mode
negative bottom margin vertical right-left writing mode
negative top margin vertical left-right writing mode
negative left margin vertical left-right writing mode
negative right margin vertical left-right writing mode
negative bottom margin vertical left-right writing mode

* csswg/contributors/adobe/submitted/shapes/shape-outside/resources/w3c-import.log:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-010.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-011.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-012.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-013-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-013.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-014.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-015.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-016.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-017.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-018.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-019-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-019.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-020-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-020.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-021.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/w3c-import.log:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r157297.
http://trac.webkit.org/changeset/157297
https://bugs.webkit.org/show_bug.cgi?id=122651

Caused crashes on multiple platform/mac-wk2/tiled-drawing
tests (Requested by ap on #webkit).

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::operator new):
(WebCore::RenderLayer::operator delete):
(WebCore::RenderLayer::destroy):
* rendering/RenderLayer.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
(WebCore::RenderLayerModelObject::destroyLayer):
(WebCore::RenderLayerModelObject::ensureLayer):
* rendering/RenderLayerModelObject.h:
(WebCore::RenderLayerModelObject::layer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Separate out array iteration intrinsics
https://bugs.webkit.org/show_bug.cgi?id=122656

Reviewed by Michael Saboff.

Separate out the intrinsics for key and values iteration
of arrays.

This requires moving moving array iteration into the iterator
instance, rather than the prototype, but this is essentially
unobservable so we'll live with it for now.

* jit/ThunkGenerators.cpp:
(JSC::arrayIteratorNextThunkGenerator):
(JSC::arrayIteratorNextKeyThunkGenerator):
(JSC::arrayIteratorNextValueThunkGenerator):
* jit/ThunkGenerators.h:
* runtime/ArrayIteratorPrototype.cpp:
(JSC::ArrayIteratorPrototype::finishCreation):
* runtime/Intrinsic.h:
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::finishCreation):
(JSC::createIteratorResult):
(JSC::arrayIteratorNext):
(JSC::arrayIteratorNextKey):
(JSC::arrayIteratorNextValue):
(JSC::arrayIteratorNextGeneric):
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Remove a Windows work-around that is not needed.

* dom/Range.cpp:
(WebCore::rangeOfContents): Move implementation back to source file.
* dom/Range.h: Remove inline I added to work around a compiler bug.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Shape-Image-Threshold should be animatable
https://bugs.webkit.org/show_bug.cgi?id=122622

Reviewed by Darin Adler.

Source/WebCore:

Make the shape-image-threshold property respond to dynamic changes
made through JS or CSS animations. Responding to changes made to
shape-image-threshold is handled in RenderBox::updateShapeOutsideInfoAfterStyleChange,
while CSSPropertyAnimation.cpp adds the property to the list of
animatable properties.

Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold.html
       fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add
shape-image-threshold to the list of animatable properties.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange): updateShapeOutsideInfoAfterStyleChange
needs to take two RenderStyle arguments to compare multiple shape properties,
rather than just the shape-outside property.
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Compare
shape-image-threshold values to see if they changed, and invalidate the layout
if necessary.
* rendering/RenderBox.h:

LayoutTests:

Adding tests for dynamically changing shape-image threshold via JS and CSS
animations. Included are some SVG resources used as the shape image sources.

* fast/shapes/resources/svg-shape-002.svg: Added.
* fast/shapes/resources/svg-shape-003.svg: Added.
* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Confusing CGImageRef memory management in ImageBuffer::copyImage
https://bugs.webkit.org/show_bug.cgi?id=122605

Source/WebCore:

BitmapImage::create was adopting the CGImage passed into it, which
resulted in some strange contortions in ImageBuffer::copyImage that
made it look like it was leaking CGImages, when in fact it was just
relying on BitmapImage to adopt the extra references.

BitmapImage::create now retains the passed-in CGImage, and I updated
the two callers to it to expect that (one here, one in WebKit2). I
also changed ImageBuffer::copyNativeImage to return a RetainPtr to
reduce the number of adoptCF()s needed and make it harder to make
programming mistakes.

Reviewed by Simon Fraser.

No new tests because this is just a code cleanup.

* platform/graphics/ImageBuffer.h: Changed copyNativeImage to return a
RetainPtr<CGImageRef.

* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::BitmapImage): Adopt the passed-in CGImage,
since we're taking ownership of it. (We release it in
FrameData::clear.)

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage): Updated for copyNativeImage's new
return type and to take into account BitmapImage::create's new
retaining semantics. This makes this function not have to be so clever
about retain counts.

(WebCore::ImageBuffer::copyNativeImage): Changed to return a
RetainPtr<CGImageRef>.

(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::clip):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBuffer::toDataURL):
Updated for changes to copyNativeImage.

Source/WebKit2:

Reviewed by Simon Fraser.

* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::createImage): BitmapImage::create now
retains the passed-in CGImage, so we don't need to dance around it
anymore. Also changed to use nullptr instead of 0 while I was in here.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LeaksViewer fails to present recent results list if current build is still updating svn
https://bugs.webkit.org/show_bug.cgi?id=122670

Reviewed by Adam Roben.

* BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:
(RecentBuildsLoader.prototype.start): Skip builds that don't have an svn revision yet.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LeaksViewer fails to present recent results list if current build is still updating svn
https://bugs.webkit.org/show_bug.cgi?id=122670

Fixed an obvious mistake in the previous patch.

* BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:
(RecentBuildsLoader.prototype.start):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Transition op_new_* JITStubs to JIT operations.
https://bugs.webkit.org/show_bug.cgi?id=122460.

Reviewed by Michael Saboff.

Also:
- Removed the redundant operationNewFunctionExpression().  It is identical to
  operationNewFunctionNoCheck().
- Sorted JIT operation signature keys in the comment in JITOperations.h.
- Removed the unused returnValue2Register definition for X86_64.

* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_new_func_exp):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_new_array_buffer):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_new_object):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JSInterfaceJIT.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some dead code from PlatformCALayer*
https://bugs.webkit.org/show_bug.cgi?id=122641

Reviewed by Anders Carlsson.

Remove some unused getters from PlatformCALayer and its implementations.

No new tests, just removing dead code.

* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:


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

* platform/gtk/editing/unsupported-content/table-delete-001-expected.txt:
* platform/gtk/editing/unsupported-content/table-delete-003-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove gesture event support from WebCore
https://bugs.webkit.org/show_bug.cgi?id=122650

Reviewed by Ryosuke Niwa.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/GestureEvent.cpp: Removed.
* dom/GestureEvent.h: Removed.
* dom/Node.cpp:
* dom/Node.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::sendContextMenuEventForKey):
* page/EventHandler.h:
* platform/PlatformGestureEvent.h: Removed.
* platform/Scrollbar.cpp:
* platform/Scrollbar.h:
* platform/mac/PlatformEventFactoryMac.h:
* platform/mac/PlatformEventFactoryMac.mm:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/nix/FeatureDefinesNix.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r157307.
http://trac.webkit.org/changeset/157307
https://bugs.webkit.org/show_bug.cgi?id=122671

Many assertion failures (Requested by ap on #webkit).

* jit/ThunkGenerators.cpp:
(JSC::arrayIteratorNextThunkGenerator):
* jit/ThunkGenerators.h:
* runtime/ArrayIteratorPrototype.cpp:
(JSC::ArrayIteratorPrototype::finishCreation):
(JSC::createIteratorResult):
(JSC::arrayIteratorPrototypeNext):
* runtime/Intrinsic.h:
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::finishCreation):
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Use the floatingObject's logical coordinates to determine its size in computeLogicalLocationForFloat
https://bugs.webkit.org/show_bug.cgi?id=122663

Reviewed by David Hyatt.

Covered by existing float tests in fast/shapes/shape-inside.
I'll add additional tests in bug #122664.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ENABLE(GESTURE_EVENTS) from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=122673

Reviewed by Ryosuke Niwa.

* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
* Shared/WebEventConversion.h:
* Shared/WebGestureEvent.cpp: Removed.
* Shared/mac/WebEventFactory.h:
* Shared/mac/WebEventFactory.mm:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/EventDispatcher.cpp:
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:

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