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