Bug 8992 - Some HTML DOM attributes have incorrect types
Summary: Some HTML DOM attributes have incorrect types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-19 03:36 PDT by Anders Carlsson
Modified: 2006-07-27 13:13 PDT (History)
1 user (show)

See Also:


Attachments
Test case (800 bytes, text/html)
2006-05-19 03:40 PDT, Anders Carlsson
no flags Details
Improved patch (6.88 KB, patch)
2006-07-27 12:17 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Improved testcase (6.73 KB, patch)
2006-07-27 12:32 PDT, Rob Buis
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2006-05-19 03:36:03 PDT
The attached test program gives:

HTMLImageElement.border is of type number
HTMLPreElement.width is of type number
HTMLBaseFontElement.size is of type string

on Safari. Firefox (which matches the DOM HTML spec) gives:

HTMLImageElement.border is of type string
HTMLPreElement.width is of type number
HTMLBaseFontElement.size is of type number
Comment 1 Anders Carlsson 2006-05-19 03:40:19 PDT
Created attachment 8403 [details]
Test case
Comment 2 Rob Buis 2006-07-27 12:17:35 PDT
Created attachment 9722 [details]
Improved patch

I just copied the original testcase for this one. I tried to use resources/js-test-pre.js,
but shouldBe("typeof img.border", "string"); doesnt work, it gives no output.
Cheers,

Rob.
Comment 3 Rob Buis 2006-07-27 12:32:30 PDT
Created attachment 9724 [details]
Improved testcase

Mitz pointed out a way to make it work using shouldBe, so this patch is better.
Cheers,

Rob.
Comment 4 Anders Carlsson 2006-07-27 12:53:21 PDT
Comment on attachment 9724 [details]
Improved testcase

r=me