Bug 14448

Summary: HTMLObjectElement::data should return an absolute URL
Product: WebKit Reporter: Darin Fisher (:fishd, Google) <fishd>
Component: DOMAssignee: Darin Fisher (:fishd, Google) <fishd>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P3    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
Attachments:
Description Flags
simple patch + testcase mrowe: review-

Description Darin Fisher (:fishd, Google) 2007-06-28 13:45:49 PDT
HTMLObjectElement::data should return an absolute URL

The spec says to return an abs URL, Firefox returns an abs URL, but WebKit and IE both return a relative URL when this property is accessed.

Based on discussions on #webkit, it sounds like webkit should be changed to return an abs URL.
Comment 1 Darin Fisher (:fishd, Google) 2007-06-28 16:47:50 PDT
patch w/ testcase coming up...
Comment 2 Darin Fisher (:fishd, Google) 2007-06-28 19:40:57 PDT
Created attachment 15302 [details]
simple patch + testcase

This patch is modelled after the code for HTMLImageElement::src().  I changed the FrameLoader::completeURL call to a Document::completeURL as a minor simplification since HTMLObjectElement already has direct access to its Document.
Comment 3 Darin Adler 2007-06-30 11:42:53 PDT
Comment on attachment 15302 [details]
simple patch + testcase

Looks good. r=me

What about the usemap attribute?
Comment 4 Darin Fisher (:fishd, Google) 2007-06-30 15:24:58 PDT
Yes, good question.  I'll investigate and file a new bug if there are similar changed needed for that.
Comment 5 Darin Fisher (:fishd, Google) 2007-06-30 15:41:09 PDT
It looks like FF and IE do not return an absolute URL for the DOM useMap property; however, Opera does.
Comment 6 Mark Rowe (bdash) 2007-07-01 07:21:25 PDT
Landed in r23911.
Comment 7 Mark Rowe (bdash) 2007-07-01 08:48:52 PDT
This introduced two test failures: <http://build.webkit.org/results/post-commit-powerpc-mac-os-x/7125/results.html>.  I will be rolling it out in a moment as we can't have regressions in the tree.
Comment 8 Mark Rowe (bdash) 2007-07-01 08:54:37 PDT
Rolled out in r23913.  Please be sure to run the entire layout test suite when resubmitting an updated patch.
Comment 9 Darin Fisher (:fishd, Google) 2007-07-01 09:55:25 PDT
It looks like fast/loader/xmlhttprequest-bad-mimetype is still failing even after this patch was rolled back.

That just leaves the two instances of object06.html (one for html and one for xhtml).  It turns out that both of those tests are actually asserting the opposite of this bug report.  They are testing that indeed the HTMLObjectElement's data accessor returns a relative URL instead of an absolute URL!  The object06.html test seems to originate from some w3.org test suite.  So, does that make this bug invalid??
Comment 10 Mark Rowe (bdash) 2007-07-01 10:04:35 PDT
Comment on attachment 15302 [details]
simple patch + testcase

Changing to r- to get this out of the commit queue.
Comment 11 Darin Fisher (:fishd, Google) 2008-02-05 08:53:04 PST

*** This bug has been marked as a duplicate of 16799 ***