CTTE: Drag events are only dispatched on Elements.
<https://webkit.org/b/122250>

Reviewed by Antti Koivisto.

We never dispatch drag events on non-Element nodes so tighten up the
code to operate on Elements instead.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move setting of some layout bits to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122256

Reviewed by Andreas Kling.
        
These bits never apply to RenderText nodes:
        
normalChildNeedsLayout
posChildNeedsLayout
needsSimplifiedNormalFlowLayout
normalChildNeedsLayout
positionedMovementLayout

The code for setting them can be moved to RenderElement.

Also separated the code paths for setting and clearing the bits and uninlined
everything that is not massively popular.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The DFG should use always DFG::Graph methods for determining where special registers are
https://bugs.webkit.org/show_bug.cgi?id=122248

Reviewed by Michael Saboff.
        
This makes it possible to have the DFG use different registers than the other engines
for things like activation and arguments.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::setLocalStoreElimination):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::activationRegister):
(JSC::DFG::Graph::uncheckedActivationRegister):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::baselineArgumentsRegisterFor):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make LLINT exception stack unwinding consistent with the JIT.
https://bugs.webkit.org/show_bug.cgi?id=122255.

Reviewed by Filip Pizlo.

Previously, the CommonSlowPaths code is expected to behave in an
inconsistent way in terms of whether to unwind the stack when handling
exceptions or not. For the LLINT, the slow path should unwind the stack
before returning. For the JIT, the slow path should not unwind the stack.
This can result in the stack being unwound twice when the exception
being handled is a TerminationException.

This patch fixes the LLINT's expectation so that it expects the same
slow path behavior as the JIT does.

* llint/LLIntExceptions.cpp:
(JSC::LLInt::returnToThrow):
(JSC::LLInt::callToThrow):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPathsExceptions.cpp:
(JSC::CommonSlowPaths::interpreterThrowInCaller):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Keep SVGElementRareData in an SVGElement member instead of a hashmap.
<https://webkit.org/b/122253>

Reviewed by Antti Koivisto.

Free up another Node flag by moving SVGElement's SVG-specific rare data
to a member variable instead of tracking them in a hashmap on the side.

This grows SVGElement by one pointer, but I will make up for this in
subsequent patches.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improved painting behavior in SunSpider 1.0.2
https://bugs.webkit.org/show_bug.cgi?id=122257

Reviewed by Oliver Hunt.

Individual test names with times was a good painting strategy years
back, when each benchmark took hundreds of milliseconds to run. Now,
the whole suite can finish in a a few hundres milliseconds, and things
look pretty flashy.

Instead, display a countdown that indicates which iteration of the
test we're on.

* resources/TEMPLATE.html: Work around a bug in Firefox by specifying
our style inside the .html file instead of in an external stylesheet.
Under heavy JavaScript load, Firefox neglects to apply external
stylesheets -- probably due to a starved timer.
        
* resources/driver-TEMPLATE.html: Delay a little between runs to ensure
that our countdown has enough time to paint.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-10-02  Geoffrey Garen  <ggaren@apple.com>

        Sync'd sunspider-1.0.2 to PerformanceTests/SunSpider/hosted/sunspider-1.0.2.

        * perf/sunspider-1.0.2/sunspider-1.0.2/driver.html:
        * perf/sunspider-1.0.2/sunspider-1.0.2/sunspider-test-contents.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r156816.
http://trac.webkit.org/changeset/156816
https://bugs.webkit.org/show_bug.cgi?id=122259

broke 8 tests (Requested by kling on #webkit).

* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::willRecalcStyle):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::listAttributeTargetChanged):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::layout):
(WebCore::SliderThumbElement::setPositionFromValue):
(WebCore::SliderThumbElement::setPositionFromPoint):
(WebCore::SliderThumbElement::stopDragging):
* page/FrameView.cpp:
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):
(WebCore::FrameView::layout):
(WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::setNeedsLayout):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* rendering/FlowThreadController.h:
(WebCore::FlowThreadController::setIsRenderNamedFlowThreadOrderDirty):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::relayoutShapeDescendantIfMoved):
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout):
(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markPositionedObjectsForLayout):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
(WebCore::RenderBlock::removePositionedObjects):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlock::getClearDelta):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloats):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlock::positionNewFloatOnLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::layout):
(WebCore::RenderBox::positionLineBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
(WebCore::gatherFlexChildrenInfo):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
* rendering/RenderElement.h:
(WebCore::RenderElement::setAncestorLineBoxDirty):
(WebCore::RenderObject::setNeedsLayout):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::layoutSpecialExcludedChild):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::styleDidChange):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::invalidateRegions):
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layout):
(WebCore::RenderFrameSet::positionFrames):
(WebCore::RenderFrameSet::positionFramesWithFlattening):
(WebCore::RenderFrameSet::continueResizing):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageDimensionsChanged):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::layout):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::updateMarqueeStyle):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::relayoutForPagination):
(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::markContainingBlocksForLayout):
(WebCore::RenderObject::layout):
* rendering/RenderObject.h:
(WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
(WebCore::RenderObject::setNeedsPositionedMovementLayout):
(WebCore::RenderObject::setNormalChildNeedsLayout):
(WebCore::RenderObject::setPosChildNeedsLayout):
(WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
(WebCore::RenderObject::setChildNeedsLayout):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::layout):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layoutSpecialExcludedChild):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::updateScrollbarParts):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::layout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTable.h:
(WebCore::RenderTable::setNeedsSectionRecalc):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeIntrinsicPadding):
(WebCore::RenderTableCell::setCellLogicalWidth):
(WebCore::RenderTableCell::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::recalcCells):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::layoutSpecialExcludedChild):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::setNeedsLayoutOnAncestors):
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::styleDidChange):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::layout):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::layout):
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::layout):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::layout):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::registerResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::layout):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::setFilterRes):
(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::svgAttributeChanged):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::updateCurrentTranslate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r156811): Objective-C JavaScriptCore API test failing on Mountain Lion bots
https://bugs.webkit.org/show_bug.cgi?id=122260

Reviewed by Mark Rowe.

For the API to work, the tests need to be compiled with a newer version of the LLVM
compiler. Until the bots are updated to that version, disable the tests on 10.8.

* API/tests/testapi.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update binding test results after r156808 for r156769.

* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributeOwner::finalize):
* bindings/scripts/test/JS/JSattribute.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyOwner::finalize):
* bindings/scripts/test/JS/JSreadonly.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of Node::preDispatchEventHandler and Node::postDispatchEventHandler
https://bugs.webkit.org/show_bug.cgi?id=122144

Reviewed by Darin Adler.

Get rid of pre/post event dispatch callbacks preDispatchEventHandler and postDispatchEventHandler since
the former was only called by HTMLMediaElement and HTMLInputElement and the latter was only called by
HTMLInputElement.

Explicitly call HTMLMediaElement's willDispatchFullScreenChangeEvent in fullScreenChangeDelayTimerFired
of Document since this is the only place that fires the fullscreenchange event.

Also add an explicit call to willDispatchEvent and didDispatchClickEvent in EventDispatcher::dispatch.
This also allows us to stack-allocate InputElementClickHandlingState instead of having willDispatchEvent
heap-allocate it and pass it around as void*.

* WebCore.order:
* dom/Document.cpp:
(WebCore::Document::fullScreenChangeDelayTimerFired):
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
* dom/Document.h:
* dom/EventContext.cpp:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::callWillDispatchEventOnInputElement):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::willDispatchClick):
* html/CheckboxInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::willDispatchEvent):
(WebCore::HTMLInputElement::didDispatchClickEvent):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::willDispatchFullScreenChangeEvent): Renamed from preDispatchEventHandler.
* html/HTMLTextFormControlElement.h:
* html/InputType.cpp:
(WebCore::InputType::willDispatchClick):
* html/InputType.h:
* html/RadioInputType.cpp:
(WebCore::RadioInputType::willDispatchClick):
* html/RadioInputType.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove preDispatchEventHandler and postDispatchEventHandler,
functions that are supposed to be removed in the previous commit (r156825).

* dom/Node.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Remove empty directories.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed fix of DrawingArea creation on non-Mac platforms after r156793.
std::make_unique<DrawingAreaImpl>() should be used, as before that revision.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove Qt specific expected files and directories.
Reviewed by Csaba Osztrogonác.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG: ConstProp the pattern ValueToInt32(Bool(x)) -> Int32(x)
https://bugs.webkit.org/show_bug.cgi?id=122263

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-03
Reviewed by Geoffrey Garen.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the NotDeletable, OperationsNotDeletable IDL attributes
https://bugs.webkit.org/show_bug.cgi?id=122217

Reviewed by Darin Adler.

Before adjusting the JSC bindings generator to enforce configurable operations and thus conform to the
WebIDL specification in this regard, two no-op attributes are introduced that will preserve the current
behavior of operations being non-configurable.

All the relevant interfaces will be annotated with the OperationsNotDeletable attribute first. After the
generator is properly modified, this attribute will be removed from the interfaces after checking that
the operations' configurability also matches the configurability of operations in other browser engines
and that the change introduces no regressions in tests.

The NotDeletable attribute will be used as required to annotate operations that should stay
non-configurable for backwards compatibility or cross-browser compatibility.

* bindings/scripts/IDLAttributes.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add back .htaccess files erroneously removed in r156827.

* http/tests/appcache/resources/intercept: Copied from LayoutTests/http/tests/appcache/resources/intercept.
* http/tests/uri/intercept: Copied from LayoutTests/http/tests/uri/intercept.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Expose aria-invalid as a text attribute (not object attribute)
https://bugs.webkit.org/show_bug.cgi?id=122015

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the aria-invalid attribute correctly through a text
attribute (through the AtkText interface) instead of using an
object, according to what the WAI-ARIA specs says.
http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property

This will be tested by accesibility/aria-invalid.html, which should
keep passing after thanks to the changes done in the DRT and WKTR.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::invalidStatus): Update this method
to only return values recognized by the WAI-ARIA specification.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject): Expose aria-invalid as a
custom text attribute 'invalid', following the lead of Firefox.
Also register that custom attribute as a AtkTextAttribute.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Remove exposure of aria-invalid
as an object attribute from here.

Tools:

Adapted DRT and WKTR to check the exposure of the aria-invalid
attribute as a text attribute, instead of an object attribute.

Also, done some refactoring of the code to try to keep things
simpler and more coherent, by defining new helper functions,
simplifying code, moving static variables and functions into
unnammed namespaces and so on, without altering the logic other
than for checking the text attribute for aria-invalid.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(coreAttributeToAtkAttribute): Consider 'invalid' as the name of
the attribute exposed by the ATK wrapper, not 'aria-invalid'.
Also, never return an empty string if not falling through any of
the cases checked here, and return the original attribute instead.
(atkAttributeValueToCoreAttributeValue): New helper function to
match the attributes values returned by the ATK wrapper with the
values expected by the layout tests. Moved the mappings for the
values of AXSortDirection here as well.
(getAttributeSet): New helper function to retrieve a list of
attributes (an AtkAttributeSet) from an AtkObject using the right
API depending on whether we want the object attributes or the text
attributes (in case the object implements AtkText).
(getAttributeSetValueForId): Simplified by using getAttributeSet
and atkAttributeValueToCoreAttributeValue. Also, added a new
parameter to indicater whether we are interested in object
attributes or text attributes.
(getAtkAttributeSetAsString): Ditto.
(attributesOfElement): Updated to pass the new required parameter
to getAtkAttributeSetAsString, indicating that we want the object
attributes in this case, for backwards compatibility.
(indexRangeInTable): Moved up in the file into the unnammed namespace.
(alterCurrentValue): Ditto.
(AccessibilityUIElement::stringAttributeValue): After moving most
of the code here to the new helper functions, simplified it by
just checking whether the required attribute is provided as an
object attribute or, if that's not the case, as a text attribute.
(AccessibilityUIElement::isAttributeSupported): Ditto.
(AccessibilityUIElement::intValue): Updated to pass the new
required parameter to getAttributeSetValueForId, indicating that
we want the object attributes in this case.
(AccessibilityUIElement::hasPopup): Ditto.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::coreAttributeToAtkAttribute): Same changes than for DRT.
(WTR::atkAttributeValueToCoreAttributeValue): Ditto.
(WTR::getAttributeSet): Ditto.
(WTR::getAttributeSetValueForId): Ditto.
(WTR::getAtkAttributeSetAsString): Ditto.
(WTR::attributesOfElement): Ditto.
(WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
(WTR::AccessibilityUIElement::isAttributeSupported): Ditto.
(WTR::AccessibilityUIElement::intValue): Ditto.
(WTR::AccessibilityUIElement::hasPopup): Ditto.

LayoutTests:

Updated the aria-invalid.html layout test to make sure that it
behaves as defined by the WAI-ARIA specification for values other
than 'false', 'true', 'grammar' and 'spelling'.

* accessibility/aria-invalid.html: Updated test.
* accessibility/aria-invalid-expected.txt: Updated expectations.

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