Remove unneeded extra memory allocation and indirection for ValidityState
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Oct 2013 05:00:42 +0000 (05:00 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Oct 2013 05:00:42 +0000 (05:00 +0000)
commitacc4cb2097f305c645a11387eab43b3c9c8d67f6
treed1d2e3a65d4eca46e72aa5acf62de85ebe13c0b5
parentc5c4a895e9950aa590d134f0344b67d2cfbd46d7
Remove unneeded extra memory allocation and indirection for ValidityState
https://bugs.webkit.org/show_bug.cgi?id=122705

Reviewed by Anders Carlsson.

* CMakeLists.txt: Removed ValidityState.cpp.
* GNUmakefile.list.am: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* html/FormAssociatedElement.cpp: Removed ValidityState.h include and the
FormAssociatedElement::validity function. That function is now an inline
in the ValidityState.h header.

* html/FormAssociatedElement.h: Added badInput function, the only function
from the ValidityState interface that was not already present here. Removed
m_validityState.

* html/HTMLFormControlElement.cpp: Removed include of ValidityState.h.
(WebCore::HTMLFormControlElement::isValidFormControlElement): Use the valid
function directly instead of indirectly through the validity state.
(WebCore::HTMLFormControlElement::setNeedsValidityCheck): Ditto.

* html/ValidityState.cpp: Removed.

* html/ValidityState.h: Removed the body of the ValidityState class and
made it effectively a "typedef" for FormAssociatedElement. It's actually
a derived class that adds no members, which is not quite right but will
work just fine for this.
(WebCore::FormAssociatedElement::validity): Implemented; just returns the
FormAssociatedElement, which the bindings expose as a ValidityState.

* html/ValidityState.idl: Use SkipVTableValidation instead of
ImplementationLacksVTable because FormAssociatedElement does have a vtable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/FormAssociatedElement.cpp
Source/WebCore/html/FormAssociatedElement.h
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/ValidityState.cpp [deleted file]
Source/WebCore/html/ValidityState.h
Source/WebCore/html/ValidityState.idl