Add toHTMLTableSectionElement() functions, and use it
https://bugs.webkit.org/show_bug.cgi?id=126418

Reviewed by Anders Carlsson.

HTMLTableSectionElement covers tbody, tfoot, and thead tags. So, we can't
generate isHTMLTableSectionElement() by using template. This patch add
toHTMLTableSectionElement() manually in order to cleanup static_cast<>.

No new tests, no behavior change.

* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::tHead):
(WebCore::HTMLTableElement::tFoot):
(WebCore::HTMLTableElement::lastBody):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableSectionElement.h:
* html/HTMLTagNames.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove canOverrideDeviceMetrics and setDeviceMetricsOverride from protocol
https://bugs.webkit.org/show_bug.cgi?id=126149

Reviewed by Joseph Pecoraro.

Source/WebCore:

No new tests, No changes in behavior.

These are not used anywhere in WebInspectorUI.
So, it removes unused Protocols and APIs.

* inspector/InspectorClient.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::disable):
* inspector/InspectorPageAgent.h:
* inspector/protocol/Page.json:

Source/WebInspectorUI:

* UserInterface/InspectorWebBackendCommands.js: Remove unused codes.
* UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Ditto.
* UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Ditto.
* Versions/Inspector-iOS-6.0.json: Ditto.
* Versions/Inspector-iOS-7.0.json: Ditto.

Source/WebKit/blackberry:

* WebCoreSupport/InspectorClientBlackBerry.cpp: Remove dead codes.
* WebCoreSupport/InspectorClientBlackBerry.h: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r157851): trailing space inside an editable region could be erroneously collapsed
https://bugs.webkit.org/show_bug.cgi?id=126549

Reviewed by Sam Weinig.

Source/WebCore:

The regression was caused by erroneous use of m_currentCharacterIsSpace in place of m_currentCharacterIsWS.

See the following two lines before the refactoring:
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp?rev=157850#L3074
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp?rev=157850#L3198

I've also cross-checked other places where m_currentCharacterIsSpace and m_currentCharacterIsWS are used.

Test: editing/inserting/inserting-trailing-space-and-letter.html

* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):

LayoutTests:

Added a regression test and reverted the erroneous rebaseline in r157851.

* editing/inserting/inserting-trailing-space-and-letter-expected.html: Added.
* editing/inserting/inserting-trailing-space-and-letter.html: Added.
* platform/mac/editing/selection/after-line-wrap-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/126500> Move Objective-C DOM bindings off the legacy WebKit availability macros

The legacy WebKit availability macros are verbose, confusing, and provide no benefit
over using the system availability macros directly. The original vision was that
they'd serve a cross-platform purpose but that never came to be.

The OS X version used in the new availability macros is based on the mapping in
JavaScriptCore/WebKitAvailability.h.

Part of <rdar://problem/15512304>.

Reviewed by Sam Weinig.

* bindings/objc/DOMCSS.h:
* bindings/objc/DOMEventException.h:
* bindings/objc/DOMException.h:
* bindings/objc/DOMExtensions.h:
* bindings/objc/DOMObject.h:
* bindings/objc/DOMRangeException.h:
* bindings/objc/DOMXPathException.h:
* bindings/objc/PublicDOMInterfaces.h:
* bindings/objc/WebScriptObject.h:
* bindings/scripts/CodeGeneratorObjC.pm:
(ReadPublicInterfaces):
(GenerateHeader): Tag enums with WK_ENUM_AVAILABLE_MAC and classes with WEBKIT_CLASS_AVAILABLE_MAC.
Remove the #ifs that we were previously generating now that enums are appropriately tagged.
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
* bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
* bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
* bindings/scripts/test/ObjC/DOMTestEventTarget.h:
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
* bindings/scripts/test/ObjC/DOMTestException.h:
* bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h:
* bindings/scripts/test/ObjC/DOMTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
* bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
* bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
* bindings/scripts/test/ObjC/DOMTestNode.h:
* bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObjInternal.h:
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
* bindings/scripts/test/ObjC/DOMattribute.h:
* bindings/scripts/test/ObjC/DOMattributeInternal.h:
* bindings/scripts/test/ObjC/DOMreadonly.h:
* bindings/scripts/test/ObjC/DOMreadonlyInternal.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r161401.
http://trac.webkit.org/changeset/161401
https://bugs.webkit.org/show_bug.cgi?id=126418

REGRESSION(r161401): Break layout test on mac-wk1(Debug)

* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::tHead):
(WebCore::HTMLTableElement::tFoot):
(WebCore::HTMLTableElement::lastBody):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableSectionElement.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mountain Lion build fix.

* bindings/objc/WebKitAvailability.h: #define __AVAILABILITY_INTERNAL__MAC_TBD so that
the TBD version works on Mountain Lion. Newer OS versions use a slightly different set
of macros that already support this version. Add a missing #include so that defintions
of the Foundation availability macros can be found even if no other Foundation headers
were included first.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SetLocal for a FlushedArguments should not claim that the dataFormat is DataFormatJS
https://bugs.webkit.org/show_bug.cgi?id=126563

Reviewed by Gavin Barraclough.

This was a rookie arguments simplification mistake: the SetLocal needs to record the fact
that although it set JSValue(), OSR should think it set Arguments. DataFormatArguments
conveys this, and dataFormatFor(FlushFormat) will do the right thing.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js: Added.
(foo):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another Mountain Lion build fix.

The Mountain Lion version of NS_DEPRECATED_MAC generates a reference to a nonexistent
availability macro when the introduced and deprecated versions are the same. Follow
AppKit's lead in working around this by defining the macros that will be referenced
for the various possible OS version numbers. This isn't an issue on newer versions of
OS X as the Foundation availability macros expand directly in to __attributes__ rather
than in to the legacy availability maros.

* bindings/objc/WebKitAvailability.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 EFL build fix after r161387
https://bugs.webkit.org/show_bug.cgi?id=126566

Reviewed by Andreas Kling.

Add missing ASYNC_SCROLLING macro.

* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/126567> Remove the legacy WebKit availability macros

They're no longer used.

Reviewed by Ryosuke Niwa.

* API/WebKitAvailability.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/126562> DOMProgressEvent has unspecified availability

Reviewed by Ryosuke Niwa.

Source/WebCore:

* bindings/objc/PublicDOMInterfaces.h: Add DOMProgressEvent. It first appeared in 10.6.

Source/WebKit/mac:

* MigrateHeaders.make: Ensure that public DOM headers do not have unspecified availability.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash when trying to register a custom scheme before network process has been launched
https://bugs.webkit.org/show_bug.cgi?id=126385

Reviewed by Anders Carlsson.

WebContext::registerSchemeForCustomProtocol() uses
sendToNetworkingProcess() to send the message to the appropriate
networking process. In the case of using web process,
sendToNetworkingProcess() first checks if there's already a web
process, doing nothing otherwise, but when using the network
process it assumes there's already a network process. In both
cases it's safe to do nothing, because the schemes will be passed
as creation parameters to the process when launched.

* UIProcess/WebContext.h:
(WebKit::WebContext::sendToNetworkingProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Expose aria-checked mixed state as ATK_STATE_INDETERMINATE
https://bugs.webkit.org/show_bug.cgi?id=125855

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Test: accessibility/aria-checked-mixed-value.html

Expose ATK_STATE_INDETERMINATE to support aria-checked mixed state
for radio and checkbox types.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):

Tools:

Added new function isIndeterminate for testing aria-checked mixed state.
I provided respective, but empty function in mac port. Mac testing it differently.

* DumpRenderTree/AccessibilityUIElement.cpp:
(getIsIndeterminate):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::isIndeterminate):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm: Added empty function.
(AccessibilityUIElement::isIndeterminate):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm: Added empty function.
(AccessibilityUIElement::isIndeterminate):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp: Added empty function.
(AccessibilityUIElement::isIndeterminate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::isIndeterminate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isIndeterminate):

LayoutTests:

* accessibility/aria-checked-mixed-value-expected.txt: Added.
* accessibility/aria-checked-mixed-value.html: Added.
* platform/mac/TestExpectations: Skipped it, missing implementation.
* platform/win/TestExpectations: Skipped it, missing implementation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some extra includes from SVG.
https://bugs.webkit.org/show_bug.cgi?id=126565

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-01-07
Reviewed by Dirk Schulze.

No new tests, no functionality changed.

* rendering/svg/RenderSVGBlock.cpp:
* rendering/svg/RenderSVGContainer.cpp:
* rendering/svg/RenderSVGEllipse.cpp:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
* rendering/svg/RenderSVGImage.cpp:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInlineText.cpp:
* rendering/svg/RenderSVGModelObject.cpp:
* rendering/svg/RenderSVGPath.cpp:
* rendering/svg/RenderSVGRect.cpp:
* rendering/svg/RenderSVGResource.cpp:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
* rendering/svg/RenderSVGResourceSolidColor.cpp:
* rendering/svg/RenderSVGResourceSolidColor.h:
* rendering/svg/RenderSVGRoot.cpp:
* rendering/svg/RenderSVGShape.cpp:
* rendering/svg/RenderSVGText.cpp:
* rendering/svg/RenderSVGTransformableContainer.cpp:
* rendering/svg/SVGInlineFlowBox.cpp:
* rendering/svg/SVGInlineTextBox.cpp:
* rendering/svg/SVGRenderSupport.cpp:
* rendering/svg/SVGRenderTreeAsText.cpp:
* rendering/svg/SVGRenderingContext.cpp:
* rendering/svg/SVGResources.cpp:
* rendering/svg/SVGResourcesCache.cpp:
* rendering/svg/SVGResourcesCycleSolver.cpp:
* rendering/svg/SVGRootInlineBox.cpp:
* rendering/svg/SVGTextChunk.cpp:
* rendering/svg/SVGTextChunkBuilder.cpp:
* rendering/svg/SVGTextLayoutAttributes.h:
* rendering/svg/SVGTextLayoutAttributesBuilder.h:
* rendering/svg/SVGTextLayoutEngine.cpp:
* rendering/svg/SVGTextLayoutEngine.h:
* rendering/svg/SVGTextMetricsBuilder.h:
* rendering/svg/SVGTextQuery.cpp:
* rendering/svg/SVGTextRunRenderingContext.cpp:

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