Bug 17061

Summary: Acid3 expects HTMLIFrameElement to implement getSVGDocument()
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
URL: http://www.w3.org/TR/SVG11/struct.html#InterfaceGetSVGDocument
Bug Depends on:    
Bug Blocks: 17064    
Attachments:
Description Flags
First pass at code change
none
First pass, now compiles. non-working tests
none
Add support for getSVGDocument to iframe and frame oliver: review+

Description Eric Seidel (no email) 2008-01-29 00:30:02 PST
Acid3 expects HTMLIFrameElement to implement getSVGDocument()

I guess this is a reasonable expectation given the vague wording of:
http://www.w3.org/TR/SVG11/struct.html#InterfaceGetSVGDocument

Should be very easy to fix.  This is mostly just an IDL change.
Comment 1 Eric Seidel (no email) 2008-01-29 00:30:22 PST
Btw, this is:
Test 75: getSVGDocument missing on <iframe> element.
Comment 2 Eric Seidel (no email) 2008-01-29 01:20:29 PST
Created attachment 18760 [details]
First pass at code change

 WebCore/html/HTMLEmbedElement.cpp      |   12 ------------
 WebCore/html/HTMLEmbedElement.h        |    4 ----
 WebCore/html/HTMLFrameElement.idl      |    5 +++++
 WebCore/html/HTMLFrameOwnerElement.cpp |   12 ++++++++++++
 WebCore/html/HTMLFrameOwnerElement.h   |    4 ++++
 WebCore/html/HTMLIFrameElement.idl     |    5 +++++
 WebCore/html/HTMLObjectElement.cpp     |   12 ------------
 WebCore/html/HTMLObjectElement.h       |    4 ----
 8 files changed, 26 insertions(+), 32 deletions(-)
Comment 3 Eric Seidel (no email) 2008-01-29 01:21:04 PST
Still needs at least one test case and a changelog.  But I expect that that code change is correct.
Comment 4 Eric Seidel (no email) 2008-01-29 02:01:50 PST
Created attachment 18761 [details]
First pass, now compiles.  non-working tests

 LayoutTests/svg/custom/frame-getSVGDocument.html   |   13 +++++++++
 LayoutTests/svg/custom/resources/TEMPLATE.html     |   13 +++++++++
 .../svg/custom/resources/frame-getSVGDocument.js   |   27 ++++++++++++++++++++
 WebCore/html/HTMLEmbedElement.cpp                  |   17 ------------
 WebCore/html/HTMLEmbedElement.h                    |    6 ----
 WebCore/html/HTMLFrameElement.idl                  |    5 +++
 WebCore/html/HTMLFrameOwnerElement.cpp             |   17 ++++++++++++
 WebCore/html/HTMLFrameOwnerElement.h               |    8 ++++++
 WebCore/html/HTMLIFrameElement.idl                 |    5 +++
 WebCore/html/HTMLObjectElement.cpp                 |   16 -----------
 WebCore/html/HTMLObjectElement.h                   |    8 ------
 WebKitTools/Scripts/make-js-test-wrappers          |    2 +-
 12 files changed, 89 insertions(+), 48 deletions(-)
Comment 5 Eric Seidel (no email) 2008-01-29 02:03:47 PST
The tests depend on a synchronous load, which can't work.  So I'll have to either fix js-tests-pre.js to support this type of non-immediate test, or make these not a simple .js test (so I can use a onload handlers, and call layoutTestController.waitUntilDone()
Comment 6 Eric Seidel (no email) 2008-02-01 01:04:27 PST
Created attachment 18842 [details]
Add support for getSVGDocument to iframe and frame

 LayoutTests/ChangeLog                            |    9 +++
 LayoutTests/svg/custom/frame-getSVGDocument.html |   77 ++++++++++++++++++++++
 LayoutTests/svg/custom/resources/TEMPLATE.html   |   13 ++++
 WebCore/ChangeLog                                |   18 +++++
 WebCore/html/HTMLEmbedElement.cpp                |   17 -----
 WebCore/html/HTMLEmbedElement.h                  |    6 --
 WebCore/html/HTMLFrameElement.idl                |    5 ++
 WebCore/html/HTMLFrameOwnerElement.cpp           |   17 +++++
 WebCore/html/HTMLFrameOwnerElement.h             |    8 ++
 WebCore/html/HTMLIFrameElement.idl               |    5 ++
 WebCore/html/HTMLObjectElement.cpp               |   16 -----
 WebCore/html/HTMLObjectElement.h                 |    8 --
 WebKitTools/ChangeLog                            |    8 ++
 WebKitTools/Scripts/make-js-test-wrappers        |    2 +-
 14 files changed, 161 insertions(+), 48 deletions(-)
Comment 7 Oliver Hunt 2008-02-01 01:36:07 PST
Comment on attachment 18842 [details]
Add support for getSVGDocument to iframe and frame

r=me, with the actual layout test results included :D
Comment 8 Eric Seidel (no email) 2008-02-01 01:38:57 PST
Comment on attachment 18842 [details]
Add support for getSVGDocument to iframe and frame

Landed as r29913.  The acid3 subtest still fails, but that's due to Hixie sending an XML mime type and expecting an SVGDocument.  We're still arguing with him about why that's wrong. :)