Changeset 45888 in webkit
- Timestamp:
- Jul 14, 2009 7:03:02 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r45886 r45888 1 2009-07-14 Michelangelo De Simone <micdesim@gmail.com> 2 3 Reviewed by Adele Peterson. 4 5 https://bugs.webkit.org/show_bug.cgi?id=19562 6 Minimal test case for ValidityState; more tests are going to be added 7 along with specific validation routines. 8 9 * fast/dom/domListEnumeration-expected.txt: increased expected value 10 of 1 to match the new "validity" attribute 11 * fast/dom/resources/domListEnumeration.js: ditto 12 * fast/forms/ValidityState-001-expected.txt: Added. 13 * fast/forms/ValidityState-001.html: Added. 14 1 15 2009-07-14 Ryosuke Niwa <rniwa@google.com> 2 16 -
trunk/LayoutTests/fast/dom/domListEnumeration-expected.txt
r45851 r45888 42 42 43 43 [object HTMLSelectElement] 44 PASS resultArray.length is 13 644 PASS resultArray.length is 137 45 45 PASS resultArray[0].i is '0' 46 46 PASS resultArray[0].item is document.getElementsByTagName('option')[0] -
trunk/LayoutTests/fast/dom/resources/domListEnumeration.js
r45851 r45888 142 142 var htmlSelectElement = document.getElementsByTagName('select')[0]; 143 143 resultArray = iterateList(htmlSelectElement); 144 shouldBe("resultArray.length", "13 6");144 shouldBe("resultArray.length", "137"); 145 145 shouldBe("resultArray[0].i", "'0'"); 146 146 shouldBe("resultArray[0].item", "document.getElementsByTagName('option')[0]"); -
trunk/WebCore/ChangeLog
r45886 r45888 1 2009-07-14 Michelangelo De Simone <micdesim@gmail.com> 2 3 Reviewed by Adele Peterson. 4 5 https://bugs.webkit.org/show_bug.cgi?id=19562 6 Added build stuff and stub for the ValidityState class, part of HTML5 7 section Forms: 8 http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#validitystate 9 10 Test: fast/forms/ValidityState-001.html 11 12 * DerivedSources.cpp: Inclusion of ValidityState files 13 * DerivedSources.make: ditto 14 * GNUmakefile.am: ditto 15 * WebCore.gypi: ditto 16 * WebCore.pro: ditto 17 * WebCore.vcproj/WebCore.vcproj: ditto 18 * WebCore.xcodeproj/project.pbxproj: ditto 19 * WebCoreSources.bkl: ditto 20 * html/HTMLButtonElement.idl: validity attribute 21 * html/HTMLFieldSetElement.idl: ditto 22 * html/HTMLFormControlElement.cpp: 23 (WebCore::HTMLFormControlElement::validity): ValidityState getter 24 * html/HTMLFormControlElement.h: ditto 25 * html/HTMLInputElement.idl: validity attribute 26 * html/HTMLSelectElement.idl: ditto 27 * html/HTMLTextAreaElement.idl: ditto 28 * html/ValidityState.cpp: Added. 29 (WebCore::ValidityState::ValidityState): 30 (WebCore::ValidityState::valid): validation flag 31 * html/ValidityState.h: Added. 32 (WebCore::ValidityState::create): validation flag 33 (WebCore::ValidityState::control): ditto 34 (WebCore::ValidityState::valueMissing): ditto 35 (WebCore::ValidityState::typeMismatch): ditto 36 (WebCore::ValidityState::patternMismatch): ditto 37 (WebCore::ValidityState::tooLong): ditto 38 (WebCore::ValidityState::rangeUnderflow): ditto 39 (WebCore::ValidityState::rangeOverflow): ditto 40 (WebCore::ValidityState::stepMismatch): ditto 41 (WebCore::ValidityState::customError): ditto 42 * html/ValidityState.idl: Added. 43 1 44 2009-07-14 Ryosuke Niwa <rniwa@google.com> 2 45 -
trunk/WebCore/DerivedSources.cpp
r45830 r45888 318 318 #include "JSTreeWalker.cpp" 319 319 #include "JSUIEvent.cpp" 320 #include "JSValidityState.cpp" 320 321 #include "JSVoidCallback.cpp" 321 322 #include "JSWebKitAnimationEvent.cpp" -
trunk/WebCore/DerivedSources.make
r45830 r45888 363 363 TreeWalker \ 364 364 UIEvent \ 365 ValidityState \ 365 366 VoidCallback \ 366 367 WebKitAnimationEvent \ -
trunk/WebCore/GNUmakefile.am
r45830 r45888 229 229 WebCore/html/ImageData.idl \ 230 230 WebCore/html/TextMetrics.idl \ 231 WebCore/html/ValidityState.idl \ 231 232 WebCore/html/VoidCallback.idl \ 232 233 WebCore/inspector/JavaScriptCallFrame.idl \ … … 1082 1083 WebCore/html/PreloadScanner.h \ 1083 1084 WebCore/html/TextMetrics.h \ 1085 WebCore/html/ValidityState.cpp \ 1086 WebCore/html/ValidityState.h \ 1084 1087 WebCore/html/VoidCallback.h \ 1085 1088 WebCore/icu/unicode/parseerr.h \ -
trunk/WebCore/WebCore.gypi
r45872 r45888 154 154 'html/TextMetrics.idl', 155 155 'html/TimeRanges.idl', 156 'html/ValidityState.idl', 156 157 'html/VoidCallback.idl', 157 158 'inspector/InspectorController.idl', … … 1355 1356 'html/TimeRanges.cpp', 1356 1357 'html/TimeRanges.h', 1358 'html/ValidityState.cpp', 1359 'html/ValidityState.h', 1357 1360 'html/VoidCallback.h', 1358 1361 'inspector/InspectorClient.h', -
trunk/WebCore/WebCore.pro
r45830 r45888 413 413 html/MediaError.idl \ 414 414 html/TextMetrics.idl \ 415 html/ValidityState.idl \ 415 416 html/VoidCallback.idl \ 416 417 inspector/InspectorController.idl \ … … 843 844 html/ImageData.cpp \ 844 845 html/PreloadScanner.cpp \ 846 html/ValidityState.cpp \ 845 847 inspector/ConsoleMessage.cpp \ 846 848 inspector/InspectorDatabaseResource.cpp \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r45831 r45888 14776 14776 <File 14777 14777 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSUIEvent.h" 14778 > 14779 </File> 14780 <File 14781 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSValidityState.cpp" 14782 > 14783 <FileConfiguration 14784 Name="Debug|Win32" 14785 ExcludedFromBuild="true" 14786 > 14787 <Tool 14788 Name="VCCLCompilerTool" 14789 /> 14790 </FileConfiguration> 14791 <FileConfiguration 14792 Name="Release|Win32" 14793 ExcludedFromBuild="true" 14794 > 14795 <Tool 14796 Name="VCCLCompilerTool" 14797 /> 14798 </FileConfiguration> 14799 <FileConfiguration 14800 Name="Debug_Internal|Win32" 14801 ExcludedFromBuild="true" 14802 > 14803 <Tool 14804 Name="VCCLCompilerTool" 14805 /> 14806 </FileConfiguration> 14807 <FileConfiguration 14808 Name="Debug_Cairo|Win32" 14809 ExcludedFromBuild="true" 14810 > 14811 <Tool 14812 Name="VCCLCompilerTool" 14813 /> 14814 </FileConfiguration> 14815 <FileConfiguration 14816 Name="Release_Cairo|Win32" 14817 ExcludedFromBuild="true" 14818 > 14819 <Tool 14820 Name="VCCLCompilerTool" 14821 /> 14822 </FileConfiguration> 14823 </File> 14824 <File 14825 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSValidityState.h" 14778 14826 > 14779 14827 </File> … … 27924 27972 </File> 27925 27973 <File 27974 RelativePath="..\html\ValidityState.cpp" 27975 > 27976 </File> 27977 <File 27978 RelativePath="..\html\ValidityState.h" 27979 > 27980 </File> 27981 <File 27926 27982 RelativePath="..\html\VoidCallback.h" 27927 27983 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r45830 r45888 205 205 14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 206 206 14FFE31E0AE1963300136BF5 /* HTMLFrameElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */; }; 207 15C7708C100D3C6A005BA267 /* ValidityState.idl in Resources */ = {isa = PBXBuildFile; fileRef = 15C77089100D3C6A005BA267 /* ValidityState.idl */; }; 208 15C7708D100D3C6B005BA267 /* ValidityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C7708A100D3C6A005BA267 /* ValidityState.h */; }; 209 15C7708E100D3C6B005BA267 /* ValidityState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C7708B100D3C6A005BA267 /* ValidityState.cpp */; }; 210 15C77093100D3CA8005BA267 /* JSValidityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C77091100D3CA8005BA267 /* JSValidityState.h */; }; 211 15C77094100D3CA8005BA267 /* JSValidityState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15C77092100D3CA8005BA267 /* JSValidityState.cpp */; }; 212 15C770A5100D41CD005BA267 /* DOMValidityState.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15C770A3100D41CD005BA267 /* DOMValidityState.mm */; }; 213 15C770A6100D41CD005BA267 /* DOMValidityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C770A4100D41CD005BA267 /* DOMValidityState.h */; }; 207 214 185BCF280F3279CE000EA262 /* ThreadTimers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 185BCF260F3279CE000EA262 /* ThreadTimers.cpp */; }; 208 215 185BCF290F3279CE000EA262 /* ThreadTimers.h in Headers */ = {isa = PBXBuildFile; fileRef = 185BCF270F3279CE000EA262 /* ThreadTimers.h */; }; … … 5114 5121 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLFrameElementBase.h; sourceTree = "<group>"; }; 5115 5122 14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFrameElementBase.cpp; sourceTree = "<group>"; }; 5123 15C77089100D3C6A005BA267 /* ValidityState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ValidityState.idl; sourceTree = "<group>"; }; 5124 15C7708A100D3C6A005BA267 /* ValidityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidityState.h; sourceTree = "<group>"; }; 5125 15C7708B100D3C6A005BA267 /* ValidityState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ValidityState.cpp; sourceTree = "<group>"; }; 5126 15C77091100D3CA8005BA267 /* JSValidityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSValidityState.h; sourceTree = "<group>"; }; 5127 15C77092100D3CA8005BA267 /* JSValidityState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSValidityState.cpp; sourceTree = "<group>"; }; 5128 15C770A3100D41CD005BA267 /* DOMValidityState.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMValidityState.mm; sourceTree = "<group>"; }; 5129 15C770A4100D41CD005BA267 /* DOMValidityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMValidityState.h; sourceTree = "<group>"; }; 5116 5130 185BCF260F3279CE000EA262 /* ThreadTimers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadTimers.cpp; sourceTree = "<group>"; }; 5117 5131 185BCF270F3279CE000EA262 /* ThreadTimers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadTimers.h; sourceTree = "<group>"; }; … … 11267 11281 85BA4D090AA688680088052D /* DOMHTMLUListElement.h */, 11268 11282 85BA4D0A0AA688680088052D /* DOMHTMLUListElement.mm */, 11283 15C770A3100D41CD005BA267 /* DOMValidityState.mm */, 11284 15C770A4100D41CD005BA267 /* DOMValidityState.h */, 11269 11285 ); 11270 11286 name = HTML; … … 11955 11971 E446139E0CD6331000FADA75 /* TimeRanges.h */, 11956 11972 E446139F0CD6331000FADA75 /* TimeRanges.idl */, 11973 15C7708B100D3C6A005BA267 /* ValidityState.cpp */, 11974 15C7708A100D3C6A005BA267 /* ValidityState.h */, 11975 15C77089100D3C6A005BA267 /* ValidityState.idl */, 11957 11976 E44613B40CD6344E00FADA75 /* VoidCallback.h */, 11958 11977 E44613A00CD6331000FADA75 /* VoidCallback.idl */, … … 12146 12165 E44614120CD6826900FADA75 /* JSTimeRanges.cpp */, 12147 12166 E44614130CD6826900FADA75 /* JSTimeRanges.h */, 12167 15C77092100D3CA8005BA267 /* JSValidityState.cpp */, 12168 15C77091100D3CA8005BA267 /* JSValidityState.h */, 12148 12169 BC8243270D0CE8A200460C8F /* JSVoidCallback.cpp */, 12149 12170 BC8243280D0CE8A200460C8F /* JSVoidCallback.h */, … … 16981 17002 41D07A7F0FF935CA0095EDCE /* JSSharedWorker.h in Headers */, 16982 17003 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */, 17004 15C7708D100D3C6B005BA267 /* ValidityState.h in Headers */, 17005 15C77093100D3CA8005BA267 /* JSValidityState.h in Headers */, 17006 15C770A6100D41CD005BA267 /* DOMValidityState.h in Headers */, 16983 17007 ); 16984 17008 runOnlyForDeploymentPostprocessing = 0; … … 17091 17115 41E1B1D20FF5986900576B3B /* AbstractWorker.idl in Resources */, 17092 17116 41E1B1D50FF5986900576B3B /* SharedWorker.idl in Resources */, 17117 15C7708C100D3C6A005BA267 /* ValidityState.idl in Resources */, 17093 17118 ); 17094 17119 runOnlyForDeploymentPostprocessing = 0; … … 19008 19033 41D07A7E0FF935CA0095EDCE /* JSSharedWorker.cpp in Sources */, 19009 19034 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */, 19035 15C7708E100D3C6B005BA267 /* ValidityState.cpp in Sources */, 19036 15C77094100D3CA8005BA267 /* JSValidityState.cpp in Sources */, 19037 15C770A5100D41CD005BA267 /* DOMValidityState.mm in Sources */, 19010 19038 ); 19011 19039 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/WebCoreSources.bkl
r45830 r45888 396 396 DerivedSources/WebCore/JSTreeWalker.cpp 397 397 DerivedSources/WebCore/JSUIEvent.cpp 398 DerivedSources/WebCore/JSValidityState.cpp 398 399 DerivedSources/WebCore/JSWebKitAnimationEvent.cpp 399 400 DerivedSources/WebCore/JSWebKitCSSKeyframeRule.cpp … … 654 655 html/ImageData.cpp 655 656 html/PreloadScanner.cpp 657 html/ValidityState.cpp 656 658 </set> 657 659 -
trunk/WebCore/html/HTMLButtonElement.idl
r45830 r45888 27 27 ] HTMLButtonElement : HTMLElement { 28 28 readonly attribute HTMLFormElement form; 29 #if !defined(LANGUAGE_COM) || !LANGUAGE_COM 30 readonly attribute ValidityState validity; 31 #endif 29 32 attribute [ConvertNullToNullString] DOMString accessKey; 30 33 attribute boolean disabled; -
trunk/WebCore/html/HTMLFieldSetElement.idl
r45830 r45888 26 26 ] HTMLFieldSetElement : HTMLElement { 27 27 readonly attribute HTMLFormElement form; 28 #if !defined(LANGUAGE_COM) || !LANGUAGE_COM 29 readonly attribute ValidityState validity; 30 #endif 28 31 readonly attribute boolean willValidate; 29 32 }; -
trunk/WebCore/html/HTMLFormControlElement.cpp
r45830 r45888 40 40 #include "RenderBox.h" 41 41 #include "RenderTheme.h" 42 #include "ValidityState.h" 42 43 43 44 namespace WebCore { … … 62 63 if (m_form) 63 64 m_form->removeFormElement(this); 65 } 66 67 ValidityState* HTMLFormControlElement::validity() 68 { 69 if (!m_validityState) 70 m_validityState = ValidityState::create(this); 71 72 return m_validityState.get(); 64 73 } 65 74 -
trunk/WebCore/html/HTMLFormControlElement.h
r45830 r45888 31 31 class FormDataList; 32 32 class HTMLFormElement; 33 class ValidityState; 33 34 34 35 class HTMLFormControlElement : public HTMLElement { … … 41 42 42 43 HTMLFormElement* form() const { return m_form; } 44 virtual ValidityState* validity(); 43 45 44 46 virtual bool isTextFormControl() const { return false; } … … 111 113 112 114 HTMLFormElement* m_form; 115 RefPtr<ValidityState> m_validityState; 113 116 bool m_disabled; 114 117 bool m_readOnly; -
trunk/WebCore/html/HTMLInputElement.idl
r45830 r45888 29 29 attribute boolean defaultChecked; 30 30 readonly attribute HTMLFormElement form; 31 #if !defined(LANGUAGE_COM) || !LANGUAGE_COM 32 readonly attribute ValidityState validity; 33 #endif 31 34 attribute [ConvertNullToNullString] DOMString accept; 32 35 attribute [ConvertNullToNullString] DOMString accessKey; … … 70 73 #endif 71 74 72 #if !defined(LANGUAGE_COM) 75 #if !defined(LANGUAGE_COM) || !LANGUAGE_COM 73 76 readonly attribute FileList files; 74 77 #endif -
trunk/WebCore/html/HTMLSelectElement.idl
r45830 r45888 42 42 43 43 readonly attribute HTMLFormElement form; 44 #if !defined(LANGUAGE_COM) || !LANGUAGE_COM 45 readonly attribute ValidityState validity; 46 #endif 44 47 readonly attribute boolean willValidate; 45 48 -
trunk/WebCore/html/HTMLTextAreaElement.idl
r45830 r45888 28 28 attribute [ConvertNullToNullString] DOMString defaultValue; 29 29 readonly attribute HTMLFormElement form; 30 #if !defined(LANGUAGE_COM) || !LANGUAGE_COM 31 readonly attribute ValidityState validity; 32 #endif 30 33 attribute [ConvertNullToNullString] DOMString accessKey; 31 34 attribute long cols;
Note: See TracChangeset
for help on using the changeset viewer.