Bug 13722 - Finish testing and fixing the setting of DOM attributes to JS null
Summary: Finish testing and fixing the setting of DOM attributes to JS null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-14 19:19 PDT by Sam Weinig
Modified: 2019-02-06 09:04 PST (History)
3 users (show)

See Also:


Attachments
patch to fix Core DOM attributes (10.35 KB, patch)
2007-05-15 10:33 PDT, Sam Weinig
darin: review+
Details | Formatted Diff | Diff
Patch to fix CSSOM attributes (13.13 KB, patch)
2007-05-15 15:49 PDT, Sam Weinig
oliver: review+
Details | Formatted Diff | Diff
Patch to fix CanvasRenderingContext2D attributes (6.70 KB, patch)
2007-05-15 19:34 PDT, Sam Weinig
oliver: review+
Details | Formatted Diff | Diff
Patch to fix SVG attributes (8.79 KB, patch)
2007-05-15 20:48 PDT, Sam Weinig
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2007-05-14 19:19:45 PDT
A number of attributes that were not tested in bug 13541 should be tested and if need be fixed.  These include:

-from the Core DOM
CharacterData.data
ProcessingInstruction.data
Attr.value

-from the CSSOM
CSSPageRule.selectorText
CSSRule.cssText
CSSStyleDeclaration.cssText
CSSStyleRule.selectorText
CSSValue.cssText
MediaList.mediaText

-from  the SVG DOM
SVGElement.id
SVGElement.xmlbase
SVGAngle.valueAsString
SVGLength.valueAsString
SVGScriptElement.type

-and from CanvasRenderingContext2D
CanvasRenderingContext2D.globalCompositeOperation
CanvasRenderingContext2D.lineCap
CanvasRenderingContext2D.lineJoin
CanvasRenderingContext2D.shadowColor

Test cases forthcoming
Comment 1 Sam Weinig 2007-05-15 10:33:08 PDT
Created attachment 14570 [details]
patch to fix Core DOM attributes

This patch fixes the remaining attributes in the Core DOM (CharacterData.data, ProcessingInstruction.data, and Attr.value).  Patched Attr.value to not throw an exception for null values as this matches the spec and Firefox.
Comment 2 Darin Adler 2007-05-15 10:46:37 PDT
Comment on attachment 14570 [details]
patch to fix Core DOM attributes

How about using dumpAsText for this test?

         [ConvertNullStringTo=Null, OldStyleObjC] DOMString substringData(in [IsIndex] unsigned long offset, 
-                                                           in [IsIndex] unsigned long length)
+                                                                         in [IsIndex] unsigned long length)

I'm not a big fan of "high-maintenance" formatting that requires changes to indentation when you rename things or add keywords. Maybe we can reconsider the way we're formatting .idl files at some point.

r=me
Comment 3 Sam Weinig 2007-05-15 11:18:49 PDT
Landed first patch in r21489 with Darin's suggestions.  Keeping bug open for remaining cases.
Comment 4 Sam Weinig 2007-05-15 15:49:07 PDT
Created attachment 14575 [details]
Patch to fix CSSOM attributes

Patch changes and tests the CSSOM attributes.  I could not test the PageRule one as we never create a PageRule as far as I can tell.
Comment 5 Sam Weinig 2007-05-15 19:34:23 PDT
Created attachment 14576 [details]
Patch to fix CanvasRenderingContext2D attributes
Comment 6 Sam Weinig 2007-05-15 20:48:12 PDT
Created attachment 14578 [details]
Patch to fix SVG attributes

Last one.
Comment 7 Oliver Hunt 2007-05-15 20:50:05 PDT
Comment on attachment 14578 [details]
Patch to fix SVG attributes

yay for idl!
Comment 8 Sam Weinig 2007-05-15 20:52:34 PDT
Second patch landed in r21502.  Third in r21504.
Comment 9 Sam Weinig 2007-05-15 20:58:17 PDT
Last patch landed in r21505!
Comment 10 Lucas Forschler 2019-02-06 09:04:01 PST
Mass moving XML DOM bugs to the "DOM" Component.