Bug 61578 - HTMLVideoElement::currentSrc() should return a KURL
: HTMLVideoElement::currentSrc() should return a KURL
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-05-26 16:29 PST by
Modified: 2011-05-27 12:54 PST (History)


Attachments
Patch (8.18 KB, patch)
2011-05-27 00:43 PST, Adam Barth
no flags Review Patch | Details | Formatted Diff | Diff
Patch for landing (9.89 KB, patch)
2011-05-27 10:51 PST, Adam Barth
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-05-26 16:29:46 PST
HTMLVideoElement::currentSrc() should return a KURL
Requested by abarth on #webkit.
------- Comment #1 From 2011-05-27 00:43:52 PST -------
Created an attachment (id=95132) [details]
Patch
------- Comment #2 From 2011-05-27 05:11:44 PST -------
(From update of attachment 95132 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=95132&action=review

> Source/WebCore/html/canvas/CanvasRenderingContext.cpp:75
> +    // HTMLMediaElement.currentSrc DOM API would leak redirect detinations!

Typo here.

> Source/WebCore/rendering/HitTestResult.cpp:315
> +        return mediaElt->currentSrc();

I believe this is the same code because currentSrc has already his baseURL set.
------- Comment #3 From 2011-05-27 07:00:12 PST -------
(From update of attachment 95132 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=95132&action=review

> Source/WebCore/html/HTMLMediaElement.cpp:678
> +    LOG(Media, "HTMLMediaElement::loadResource(%s, %s)", urlForLogging(initialURL).utf8().data(), contentType.raw().utf8().data());

Ha.  Seems urlForLogging should return a char*...

>> Source/WebCore/rendering/HitTestResult.cpp:315
>> +        return mediaElt->currentSrc();
> 
> I believe this is the same code because currentSrc has already his baseURL set.

Is this tested anywhere?  How do I as a reviewer know it's already absolute. :)
------- Comment #4 From 2011-05-27 10:45:34 PST -------
(In reply to comment #3)
> (From update of attachment 95132 [details] [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=95132&action=review
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:678
> > +    LOG(Media, "HTMLMediaElement::loadResource(%s, %s)", urlForLogging(initialURL).utf8().data(), contentType.raw().utf8().data());
> 
> Ha.  Seems urlForLogging should return a char*...

Very true.

> >> Source/WebCore/rendering/HitTestResult.cpp:315
> >> +        return mediaElt->currentSrc();
> > 
> > I believe this is the same code because currentSrc has already his baseURL set.
> 
> Is this tested anywhere?  How do I as a reviewer know it's already absolute. :)

I'm not sure whether this is tested, but AFAIK the KURL type only holds absolute URLs, so the C++ type system (such as it is) can tell you that.  :)
------- Comment #5 From 2011-05-27 10:51:56 PST -------
Created an attachment (id=95190) [details]
Patch for landing
------- Comment #6 From 2011-05-27 12:53:59 PST -------
(From update of attachment 95190 [details])
Clearing flags on attachment: 95190

Committed r87539: <http://trac.webkit.org/changeset/87539>
------- Comment #7 From 2011-05-27 12:54:04 PST -------
All reviewed patches have been landed.  Closing bug.