Changeset 44946 in webkit
- Timestamp:
- Jun 22, 2009 11:47:51 AM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r44944 r44946 1 2009-06-22 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 https://bugs.webkit.org/show_bug.cgi?id=26615 6 7 Add IDL interface for datagrid cell elements. Add a few more properties to the datagrid itself that 8 correspond to ones you find on <select> elements. 9 10 Add an expanded property to row elements. 11 12 * DerivedSources.cpp: 13 * DerivedSources.make: 14 * GNUmakefile.am: 15 * WebCore.pro: 16 * WebCore.vcproj/WebCore.vcproj: 17 * WebCore.xcodeproj/project.pbxproj: 18 * WebCoreSources.bkl: 19 * html/HTMLAttributeNames.in: 20 * html/HTMLDataGridCellElement.cpp: Added. 21 (WebCore::HTMLDataGridCellElement::HTMLDataGridCellElement): 22 (WebCore::HTMLDataGridCellElement::label): 23 (WebCore::HTMLDataGridCellElement::setLabel): 24 (WebCore::HTMLDataGridCellElement::focused): 25 (WebCore::HTMLDataGridCellElement::setFocused): 26 (WebCore::HTMLDataGridCellElement::checked): 27 (WebCore::HTMLDataGridCellElement::setChecked): 28 (WebCore::HTMLDataGridCellElement::indeterminate): 29 (WebCore::HTMLDataGridCellElement::setIndeterminate): 30 (WebCore::HTMLDataGridCellElement::progress): 31 (WebCore::HTMLDataGridCellElement::setProgress): 32 * html/HTMLDataGridCellElement.h: Added. 33 (WebCore::HTMLDataGridCellElement::endTagRequirement): 34 (WebCore::HTMLDataGridCellElement::tagPriority): 35 * html/HTMLDataGridCellElement.idl: Added. 36 * html/HTMLDataGridElement.cpp: 37 (WebCore::HTMLDataGridElement::autofocus): 38 (WebCore::HTMLDataGridElement::setAutofocus): 39 (WebCore::HTMLDataGridElement::disabled): 40 (WebCore::HTMLDataGridElement::setDisabled): 41 (WebCore::HTMLDataGridElement::size): 42 (WebCore::HTMLDataGridElement::setSize): 43 * html/HTMLDataGridElement.h: 44 * html/HTMLDataGridElement.idl: 45 * html/HTMLDataGridRowElement.cpp: 46 (WebCore::HTMLDataGridRowElement::checkDTD): 47 (WebCore::HTMLDataGridRowElement::expanded): 48 (WebCore::HTMLDataGridRowElement::setExpanded): 49 * html/HTMLDataGridRowElement.h: 50 * html/HTMLDataGridRowElement.idl: 51 * html/HTMLElementsAllInOne.cpp: 52 * html/HTMLTagNames.in: 53 1 54 2009-06-22 Sam Weinig <sam@webkit.org> 2 55 -
trunk/WebCore/DerivedSources.cpp
r44943 r44946 85 85 #include "JSHTMLCollection.cpp" 86 86 #include "JSHTMLDataGridElement.cpp" 87 #include "JSHTMLDataGridCellElement.cpp" 87 88 #include "JSHTMLDataGridColElement.cpp" 88 89 #include "JSHTMLDataGridRowElement.cpp" -
trunk/WebCore/DerivedSources.make
r44943 r44946 111 111 HTMLCollection \ 112 112 HTMLDataGridElement \ 113 HTMLDataGridCellElement \ 113 114 HTMLDataGridColElement \ 114 115 HTMLDataGridRowElement \ -
trunk/WebCore/GNUmakefile.am
r44943 r44946 169 169 WebCore/html/HTMLCollection.idl \ 170 170 WebCore/html/HTMLDataGridElement.idl \ 171 WebCore/html/HTMLDataGridCellElement.idl \ 171 172 WebCore/html/HTMLDataGridColElement.idl \ 172 173 WebCore/html/HTMLDataGridRowElement.idl \ … … 922 923 WebCore/html/HTMLDataGridElement.cpp \ 923 924 WebCore/html/HTMLDataGridElement.h \ 925 WebCore/html/HTMLDataGridCellElement.cpp \ 926 WebCOre/html/HTMLDataGridCellElement.h \ 924 927 WebCore/html/HTMLDataGridColElement.cpp \ 925 928 WebCore/html/HTMLDataGridColElement.h \ -
trunk/WebCore/WebCore.pro
r44943 r44946 346 346 html/HTMLCollection.idl \ 347 347 html/HTMLDataGridElement.idl \ 348 html/HTMLDataGridCellElement.idl \ 348 349 html/HTMLDataGridColElement.idl \ 349 350 html/HTMLDataGridRowElement.idl \ … … 756 757 html/HTMLCollection.cpp \ 757 758 html/HTMLDataGridElement.cpp \ 759 html/HTMLDataGridCellElement.cpp \ 758 760 html/HTMLDataGridColElement.cpp \ 759 761 html/HTMLDataGridRowElement.cpp \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r44943 r44946 3396 3396 <File 3397 3397 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDataGridElement.h" 3398 > 3399 </File> 3400 <File 3401 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDataGridCellElement.cpp" 3402 > 3403 <FileConfiguration 3404 Name="Debug|Win32" 3405 ExcludedFromBuild="true" 3406 > 3407 <Tool 3408 Name="VCCLCompilerTool" 3409 /> 3410 </FileConfiguration> 3411 <FileConfiguration 3412 Name="Release|Win32" 3413 ExcludedFromBuild="true" 3414 > 3415 <Tool 3416 Name="VCCLCompilerTool" 3417 /> 3418 </FileConfiguration> 3419 <FileConfiguration 3420 Name="Debug_Internal|Win32" 3421 ExcludedFromBuild="true" 3422 > 3423 <Tool 3424 Name="VCCLCompilerTool" 3425 /> 3426 </FileConfiguration> 3427 <FileConfiguration 3428 Name="Debug_Cairo|Win32" 3429 ExcludedFromBuild="true" 3430 > 3431 <Tool 3432 Name="VCCLCompilerTool" 3433 /> 3434 </FileConfiguration> 3435 <FileConfiguration 3436 Name="Release_Cairo|Win32" 3437 ExcludedFromBuild="true" 3438 > 3439 <Tool 3440 Name="VCCLCompilerTool" 3441 /> 3442 </FileConfiguration> 3443 </File> 3444 <File 3445 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDataGridCellElement.h" 3398 3446 > 3399 3447 </File> … … 24752 24800 </File> 24753 24801 <File 24802 RelativePath="..\html\HTMLDataGridCellElement.cpp" 24803 > 24804 <FileConfiguration 24805 Name="Debug|Win32" 24806 ExcludedFromBuild="true" 24807 > 24808 <Tool 24809 Name="VCCLCompilerTool" 24810 /> 24811 </FileConfiguration> 24812 <FileConfiguration 24813 Name="Release|Win32" 24814 ExcludedFromBuild="true" 24815 > 24816 <Tool 24817 Name="VCCLCompilerTool" 24818 /> 24819 </FileConfiguration> 24820 <FileConfiguration 24821 Name="Debug_Internal|Win32" 24822 ExcludedFromBuild="true" 24823 > 24824 <Tool 24825 Name="VCCLCompilerTool" 24826 /> 24827 </FileConfiguration> 24828 <FileConfiguration 24829 Name="Debug_Cairo|Win32" 24830 ExcludedFromBuild="true" 24831 > 24832 <Tool 24833 Name="VCCLCompilerTool" 24834 /> 24835 </FileConfiguration> 24836 <FileConfiguration 24837 Name="Release_Cairo|Win32" 24838 ExcludedFromBuild="true" 24839 > 24840 <Tool 24841 Name="VCCLCompilerTool" 24842 /> 24843 </FileConfiguration> 24844 </File> 24845 <File 24846 RelativePath="..\html\HTMLDataGridCellElement.h" 24847 > 24848 </File> 24849 <File 24754 24850 RelativePath="..\html\HTMLDataGridColElement.cpp" 24755 24851 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r44943 r44946 4047 4047 BC77CD4E0FEFE1610070887B /* JSHTMLDataGridRowElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC77CD4C0FEFE1610070887B /* JSHTMLDataGridRowElement.cpp */; }; 4048 4048 BC77CD4F0FEFE1610070887B /* JSHTMLDataGridRowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC77CD4D0FEFE1610070887B /* JSHTMLDataGridRowElement.h */; }; 4049 BC77CDA30FEFEB530070887B /* HTMLDataGridCellElement.idl in Resources */ = {isa = PBXBuildFile; fileRef = BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */; }; 4050 BC77CDB80FEFF1210070887B /* HTMLDataGridCellElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */; }; 4051 BC77CDBC0FEFF1420070887B /* HTMLDataGridCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */; }; 4052 BC77CDCE0FEFF33B0070887B /* JSHTMLDataGridCellElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC77CDCC0FEFF33B0070887B /* JSHTMLDataGridCellElement.cpp */; }; 4053 BC77CDCF0FEFF33B0070887B /* JSHTMLDataGridCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC77CDCD0FEFF33B0070887B /* JSHTMLDataGridCellElement.h */; }; 4049 4054 BC7F44A80B9E324E00A9D081 /* ImageObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F44A70B9E324E00A9D081 /* ImageObserver.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4050 4055 BC7FA6200D1F0CBD00DB22A9 /* DynamicNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7FA61E0D1F0CBD00DB22A9 /* DynamicNodeList.cpp */; }; … … 8839 8844 BC77CD4C0FEFE1610070887B /* JSHTMLDataGridRowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLDataGridRowElement.cpp; sourceTree = "<group>"; }; 8840 8845 BC77CD4D0FEFE1610070887B /* JSHTMLDataGridRowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDataGridRowElement.h; sourceTree = "<group>"; }; 8846 BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLDataGridCellElement.idl; sourceTree = "<group>"; }; 8847 BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDataGridCellElement.cpp; sourceTree = "<group>"; }; 8848 BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLDataGridCellElement.h; sourceTree = "<group>"; }; 8849 BC77CDCC0FEFF33B0070887B /* JSHTMLDataGridCellElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLDataGridCellElement.cpp; sourceTree = "<group>"; }; 8850 BC77CDCD0FEFF33B0070887B /* JSHTMLDataGridCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDataGridCellElement.h; sourceTree = "<group>"; }; 8841 8851 BC7B2AF80450824100A8000F /* Scrollbar.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Scrollbar.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 8842 8852 BC7F44A70B9E324E00A9D081 /* ImageObserver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageObserver.h; sourceTree = "<group>"; }; … … 11642 11652 BC212A1E0FE8333200EC3708 /* HTMLDataGridElement.h */, 11643 11653 BC212A230FE8345D00EC3708 /* HTMLDataGridElement.idl */, 11654 BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */, 11655 BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */, 11644 11656 BC77CBA90FEBF6C90070887B /* HTMLDataGridColElement.cpp */, 11645 11657 BC77CB860FEBF5AF0070887B /* HTMLDataGridColElement.h */, 11658 BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */, 11646 11659 BC77CB880FEBF5BA0070887B /* HTMLDataGridColElement.idl */, 11647 11660 BC77CD410FEFE0C40070887B /* HTMLDataGridRowElement.cpp */, … … 11917 11930 BC212A3F0FE83A1800EC3708 /* JSHTMLDataGridElement.cpp */, 11918 11931 BC212A400FE83A1800EC3708 /* JSHTMLDataGridElement.h */, 11932 BC77CDCC0FEFF33B0070887B /* JSHTMLDataGridCellElement.cpp */, 11933 BC77CDCD0FEFF33B0070887B /* JSHTMLDataGridCellElement.h */, 11919 11934 BC77CBD10FEBF8310070887B /* JSHTMLDataGridColElement.cpp */, 11920 11935 BC77CBD20FEBF8310070887B /* JSHTMLDataGridColElement.h */, … … 16836 16851 BC77CCEE0FEFDE6C0070887B /* HTMLDataGridRowElement.h in Headers */, 16837 16852 BC77CD4F0FEFE1610070887B /* JSHTMLDataGridRowElement.h in Headers */, 16853 BC77CDBC0FEFF1420070887B /* HTMLDataGridCellElement.h in Headers */, 16854 BC77CDCF0FEFF33B0070887B /* JSHTMLDataGridCellElement.h in Headers */, 16838 16855 ); 16839 16856 runOnlyForDeploymentPostprocessing = 0; … … 16941 16958 BC77CB890FEBF5BA0070887B /* HTMLDataGridColElement.idl in Resources */, 16942 16959 BC77CC6C0FEC3D5F0070887B /* HTMLDataGridRowElement.idl in Resources */, 16960 BC77CDA30FEFEB530070887B /* HTMLDataGridCellElement.idl in Resources */, 16943 16961 ); 16944 16962 runOnlyForDeploymentPostprocessing = 0; … … 18837 18855 BC77CD420FEFE0C40070887B /* HTMLDataGridRowElement.cpp in Sources */, 18838 18856 BC77CD4E0FEFE1610070887B /* JSHTMLDataGridRowElement.cpp in Sources */, 18857 BC77CDB80FEFF1210070887B /* HTMLDataGridCellElement.cpp in Sources */, 18858 BC77CDCE0FEFF33B0070887B /* JSHTMLDataGridCellElement.cpp in Sources */, 18839 18859 ); 18840 18860 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/WebCoreSources.bkl
r44943 r44946 294 294 DerivedSources/WebCore/JSHTMLCollection.cpp 295 295 DerivedSources/WebCore/JSHTMLDataGridElement.cpp 296 DerivedSources/WebCore/JSHTMLDataGridCellElement.cpp 296 297 DerivedSources/WebCore/JSHTMLDataGridColElement.cpp 297 298 DerivedSources/WebCore/JSHTMLDataGridRowElement.cpp … … 577 578 html/HTMLCollection.cpp 578 579 html/HTMLDataGridElement.cpp 580 html/HTMLDataGridCellElement.cpp 579 581 html/HTMLDataGridColElement.cpp 580 582 html/HTMLDataGridRowElement.cpp -
trunk/WebCore/html/HTMLAttributeNames.in
r44937 r44946 68 68 enctype 69 69 end 70 expanded 70 71 face 71 72 focused … … 82 83 id 83 84 incremental 85 indeterminate 84 86 ismap 85 87 keytype … … 165 167 primary 166 168 profile 169 progress 167 170 prompt 168 171 readonly -
trunk/WebCore/html/HTMLDataGridElement.cpp
r44937 r44946 46 46 } 47 47 48 bool HTMLDataGridElement::autofocus() const 49 { 50 return hasAttribute(autofocusAttr); 51 } 52 53 void HTMLDataGridElement::setAutofocus(bool autofocus) 54 { 55 setAttribute(autofocusAttr, autofocus ? "" : 0); 56 } 57 58 bool HTMLDataGridElement::disabled() const 59 { 60 return hasAttribute(disabledAttr); 61 } 62 63 void HTMLDataGridElement::setDisabled(bool disabled) 64 { 65 setAttribute(disabledAttr, disabled ? "" : 0); 66 } 67 48 68 bool HTMLDataGridElement::multiple() const 49 69 { … … 56 76 } 57 77 78 int HTMLDataGridElement::size() const 79 { 80 return getAttribute(sizeAttr).toInt(); 58 81 } 82 83 void HTMLDataGridElement::setSize(int size) 84 { 85 setAttribute(sizeAttr, String::number(size)); 86 } 87 88 } -
trunk/WebCore/html/HTMLDataGridElement.h
r44937 r44946 39 39 virtual bool checkDTD(const Node*); 40 40 41 bool autofocus() const; 42 void setAutofocus(bool); 43 44 bool disabled() const; 45 void setDisabled(bool); 46 41 47 bool multiple() const; 42 48 void setMultiple(bool); 49 50 int size() const; 51 void setSize(int); 43 52 }; 44 53 -
trunk/WebCore/html/HTMLDataGridElement.idl
r44937 r44946 27 27 28 28 interface [GenerateConstructor] HTMLDataGridElement : HTMLElement { 29 attribute boolean autofocus; // Whether or not the datagrid should autofocus. 30 attribute boolean disabled; // Whether or not the datagrid can be interacted with. 29 31 attribute boolean multiple; // Whether or not the datagrid supports multiple selection. 32 33 attribute boolean size; // The number of rows that the datagrid should be sized to (excludes column headers). 30 34 }; 31 35 -
trunk/WebCore/html/HTMLDataGridRowElement.cpp
r44937 r44946 28 28 29 29 #include "HTMLNames.h" 30 #include "Text.h" 30 31 31 32 namespace WebCore { … … 36 37 : HTMLElement(name, doc) 37 38 { 39 } 40 41 bool HTMLDataGridRowElement::checkDTD(const Node* newChild) 42 { 43 if (newChild->isTextNode()) 44 return static_cast<const Text*>(newChild)->containsOnlyWhitespace(); 45 return newChild->hasTagName(drowTag) || newChild->hasTagName(dcellTag); 38 46 } 39 47 … … 58 66 } 59 67 68 bool HTMLDataGridRowElement::expanded() const 69 { 70 return hasAttribute(expandedAttr); 60 71 } 72 73 void HTMLDataGridRowElement::setExpanded(bool expanded) 74 { 75 setAttribute(expandedAttr, expanded ? "" : 0); 76 } 77 78 } -
trunk/WebCore/html/HTMLDataGridRowElement.h
r44937 r44946 37 37 38 38 virtual int tagPriority() const { return 2; } // Same as <option>s. 39 39 virtual bool checkDTD(const Node*); 40 40 41 bool selected() const; 41 42 void setSelected(bool); … … 43 44 bool focused() const; 44 45 void setFocused(bool); 46 47 bool expanded() const; 48 void setExpanded(bool); 45 49 }; 46 50 -
trunk/WebCore/html/HTMLDataGridRowElement.idl
r44937 r44946 29 29 attribute boolean selected; // Whether or not the row is currently selected. 30 30 attribute boolean focused; // Whether or not the row is the current object in the tree for keyboard navigation (or as the principal item of a multiple selection). 31 32 attribute boolean expanded; // Whether or not the row is open (if it is, child rows will be shown). 31 33 }; 32 34 -
trunk/WebCore/html/HTMLElementsAllInOne.cpp
r44942 r44946 44 44 #include "HTMLCanvasElement.cpp" 45 45 #include "HTMLDataGridElement.cpp" 46 #include "HTMLDataGridCellElement.cpp" 46 47 #include "HTMLDataGridColElement.cpp" 47 48 #include "HTMLDataGridRowElement.cpp" -
trunk/WebCore/html/HTMLTagNames.in
r44937 r44946 27 27 colgroup interfaceName=HTMLTableColElement 28 28 datagrid interfaceName=HTMLDataGridElement 29 dcell interfaceName=HTMLDataGridCellElement 29 30 dcol interfaceName=HTMLDataGridColElement 30 31 drow interfaceName=HTMLDataGridRowElement
Note: See TracChangeset
for help on using the changeset viewer.