Remove two unused AX functions for getting a FrameView*.
<https://webkit.org/b/122724>

Reviewed by Anders Carlsson.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: RenderSlider always has an HTMLInputElement.
<https://webkit.org/b/122728>

Reviewed by Anders Carlsson.

This renderer is never anonymous and always has a corresponding
HTMLInputElement. Tighten this up by having the constructor take
the element by reference, and override element() with a stronger
return type.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move setPseudoStyle() to RenderImage (from RenderElement.)
<https://webkit.org/b/122726>

Reviewed by Antti Koivisto.

Only RenderImages ever use setPseudoStyle() so move it there and
remove the non-image codepath.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Devirtualize RenderView::viewRect().
<https://webkit.org/b/122730>

Reviewed by Antti Koivisto.

There's no need for viewRect() to be a virtual RenderObject function.
The single call site that didn't already access it through RenderView
can just go via view().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text::renderer() should return RenderText
https://bugs.webkit.org/show_bug.cgi?id=122729

Reviewed by Andreas Kling.
        
Tighten typing.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change callOnMainThread to take an std::function
https://bugs.webkit.org/show_bug.cgi?id=122698

Reviewed by Darin Adler.

This will let us pass anything that can be converted to an std::function (including lambdas and
WTF::Function objects) to callOnMainThread.

* wtf/MainThread.cpp:
(WTF::callOnMainThread):
* wtf/MainThread.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make element predicates and type casts work more consistently on more types
https://bugs.webkit.org/show_bug.cgi?id=122718

Reviewed by Antti Koivisto.

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::collectFrameOwners):
Updated for name change.

* dom/Document.cpp:
(WebCore::Document::adoptNode): Use a reference instead of a pointer.
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Updated for
typecast name change and also to cast a reference, since we don't overload
for pointers.
(WebCore::Document::updateHoverActiveState): Ditto.

* dom/Element.h: Made the isElementOfType functions take references instead
of pointers. Also use const in the type template argument. These changes go
hand in hand with the changes in the generated code and all the classes.
Also use a bit of nullptr.

* dom/ElementIterator.h:
(WebCore::findElementAncestorOfType): Got rid of the ElementTypeWithConst
naming since this works with or without const. Added const to the call site
for isElementOfType, because it works that way now.

* dom/ElementTraversal.h:
(WebCore::Traversal::firstChildTemplate): Add const to the type when calling
isElementOfType. Along with the corresponding changes, this makes these
templates work for const types.
(WebCore::Traversal::lastChildTemplate): Ditto.
(WebCore::Traversal::firstWithinTemplate): Ditto.
(WebCore::Traversal::lastWithinTemplate): Ditto.
(WebCore::Traversal::nextTemplate): Ditto.
(WebCore::Traversal::previousTemplate): Ditto.
(WebCore::Traversal::nextSiblingTemplate): Ditto.
(WebCore::Traversal::previousSiblingTemplate): Ditto.
(WebCore::Traversal::nextSkippingChildrenTemplate): Ditto.

* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Check isElementNode and then call the
isDisabledFormControl member function, since we no longer have a helper that
takes a node.
(WebCore::Node::willRespondToMouseMoveEvents): Ditto.
(WebCore::Node::willRespondToMouseClickEvents): Ditto.
(WebCore::Node::willRespondToTouchEvents): Ditto.

* dom/PseudoElement.h: Use some nullptr. Added an isPseudoElement function
that the ELEMENT_TYPE_CASTS macro can use, and also used that macro to make
the toPseudoElement functions instead of a hand-written local variant.

* dom/make_names.pl:
(printTypeHelpers): Added unimplemented versions of the element predicate
functions that return void to catch unnecessary runtime checks of types
that are already known at compile time. Added assertions to the pointer
overloads of the predicates. Maybe later we can delete them. Added const
to the isElementOf template arguments to make these work with both const
and non-const. Put overloads in a consistent order, most specific class
first, then less specific. Changed isElementOfType to take references
rather than pointers.

* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand): Updated to pass a reference.
(WebCore::Editor::setBaseWritingDirection): Ditto.
(WebCore::findFirstMarkable): Ditto.

* html/FormAssociatedElement.h: Tweaked a comment.

* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Updated for name change and to
pass a reference.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::translate): Removed FIXME and const_cast since the
problem is fixed.
(WebCore::HTMLElement::directionality): Use a reference.

* html/HTMLElement.h: Use const in the type of the isElementOfType functions.
Use references for all the arguments, not pointers.

* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): Use documentVersion
instead of docVersion for local variable name. Use elementDescendants instead
of elementTraversal.
(WebCore::HTMLFieldSetElement::length): Use length instead of len for name.

* html/HTMLFormControlElement.h: Put predicates into the standard format and
did them on single lines. Added ELEMENT_TYPE_CASTS so we get standard casts.
* html/HTMLFrameElementBase.h: Ditto.
* html/HTMLFrameOwnerElement.h: Ditto, but changed the name to match the class,
so it's now isHTMLFrameOwnerElement and toHTMLFrameOwnerElement.

* html/HTMLLabelElement.cpp:
(WebCore::nodeAsSupportedLabelableElement): Updated to use references.

* html/HTMLMediaElement.h: Put predicates into the standard format and did
them on single lines. Added ELEMENT_TYPE_CASTS so we get standard casts.
* html/HTMLPlugInElement.h: Ditto. Also marked isPluginElement FINAL.
* html/HTMLPlugInImageElement.h: Ditto.
* html/HTMLTableCellElement.cpp: Removed old hand-written cast functions.
* html/HTMLTableCellElement.h: Did same predicate and ELEMENT_TYPE_CASTS
changes. Also fixed up the ordering of functions in the class.

* html/HTMLTextFormControlElement.cpp:
(WebCore::enclosingTextFormControl): Updated to use references and nullptr.

* html/HTMLTextFormControlElement.h: Did same predicate and ELEMENT_TYPE_CASTS.

* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::removedFrom): Call isHTMLMediaElement by its new name.

* html/LabelableElement.h: Did same predicate and ELEMENT_TYPE_CASTS.

* html/track/WebVTTElement.h: Made isWebVTTElement private. Changed the argument
type of setLanguage to const AtomicString& to avoid excess reference count churn.
Did the predicate and type casts thing.

* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Update for name changes and use references.

* mathml/MathMLElement.h: Did same predicate and ELEMENT_TYPE_CASTS.

* page/FocusController.cpp:
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
(WebCore::FocusController::advanceFocusInDocumentOrder):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
Update for name change.

* platform/Pasteboard.h: Removed unneeded forward declaration.

* rendering/RenderWidget.h: Updated for name change.

* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives): Use element iterator
and nullptr.

* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler): Update for name changes.

* svg/SVGAnimateElement.cpp:
(WebCore::isSVGAnimateElement): Moved here since we don't want to inline such
a long list of tag names.

* svg/SVGAnimateElement.h: Marked a lot more virtual functions OVERRIDE.
Did predicate and ELEMENT_TYPE_CASTS changes, but did not make the predicate
be inlined.

* svg/SVGElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGFilterPrimitiveStandardAttributes.h: Ditto.

* svg/SVGGradientElement.cpp:
(WebCore::isSVGGradientElement): Moved here since we don't want to inline
the two tag names.

* svg/SVGGradientElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGGraphicsElement.h: Ditto.

* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement): Took out assertion, since it
was asserting the class of the obejct we just created.

* svg/SVGPolyElement.cpp:
(WebCore::isSVGPolyElement): Moved here since we don't want to inline the
two tag names.

* svg/SVGPolyElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGTextContentElement.h: Ditto.

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::connectConditions): Update for name changes,
to use references and nullptr, and to get rid of a non-helpful local.

* svg/animation/SVGSMILElement.h: Added a virtual function to check if a
given SVGElement is an SVGSMILElement so we don't have to check a long list
of tag names instead. Also did the predicate and ELEMENT_TYPE_CASTS changes.

* testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder): Updated to use references.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Lion build.

* Configurations/JavaScriptCore.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removing  input-file-entries.html from TestExpectation
https://bugs.webkit.org/show_bug.cgi?id=122674

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-13
Reviewed by Anders Carlsson.

input-file-entries.html has been removed in
changeset 156692. so removing references to this file.

* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderLayerBacking should have RenderLayer& backpointer.
<https://webkit.org/b/122731>

Reviewed by Anders Carlsson.

RenderLayerBacking is always owned by a RenderLayer and so should
store its backpointer in a reference.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

* platform/gtk-wk2/TestExpectations:
Add bug number to the failing animation tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll deps^H^H^H^HChangeLogs.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rewrite Document::body and Document::head in modern style, way clearer and shorter
https://bugs.webkit.org/show_bug.cgi?id=122717

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::body): Use iterator to make this way easier to read.
(WebCore::Document::head): Ditto.

* html/HTMLTagNames.in: Added generateTypeHelpers for body and head.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL OSR exit should perform zero extension on values smaller than 64-bit
https://bugs.webkit.org/show_bug.cgi?id=122688

Reviewed by Gavin Barraclough.
        
In the DFG we usually make the simplistic assumption that a 32-bit value in a 64-bit
register will have zeros on the high bits.  In the few cases where the high bits are
non-zero, the DFG sort of tells us this explicitly.

But when working with llvm.webkit.stackmap, it doesn't work that way.  Consider we might
emit LLVM IR like:

    %2 = trunc i64 %1 to i32
    stuff %2
    call @llvm.webkit.stackmap(...., %2)

LLVM may never actually emit a truncation instruction of any kind.  And that's great - in
many cases it won't be needed, like if 'stuff %2' is a 32-bit op that ignores the high
bits anyway.  Hence LLVM may tell us that %2 is in the register that still had the value
from before truncation, and that register may have garbage in the high bits.

This means that on our end, if we want a 32-bit value and we want that value to be
zero-extended, we should zero-extend it ourselves.  This is pretty easy and should be
cheap, so we should just do it and not make it a requirement that LLVM does it on its
end.
        
This makes all tests pass with JSC_ftlOSRExitUsesStackmap=true.

* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStubWithOSRExitStackmap):
* ftl/FTLValueFormat.cpp:
(JSC::FTL::reboxAccordingToFormat):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r157381): Make Document::body() crash less when there is no documentElement.

Unreviewed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Uncrashify Document::head() too. (Why am I even awake?)

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS
https://bugs.webkit.org/show_bug.cgi?id=122735

Reviewed by Antti Koivisto.

NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS are identical. Let them become one
with one another.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
build.webkit.org/dashboard incorrectly shows interrupted builds as green
https://bugs.webkit.org/show_bug.cgi?id=122732

Reviewed by Tim Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update): Removed a special case for status 4 (EXCEPTION).
I don't see it occur any time in recent history, but judging from what happens for
status 5 (RETRY), we can just finish this function normally.
Record overall text description for iteration as BuildbotIteration.text.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): If an iteration is a failure,
but no tests failed, make it yellow, and use buildbot-provided description for it.



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