Summary: | HTMLLinkElement should resolve resource URLs when resources will be fetched | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rafael Weinstein <rafaelw> | ||||||||||||||
Component: | DOM | Assignee: | Rafael Weinstein <rafaelw> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | abarth, adamk, ericbidelman, eric, esprehn+autocc, ojan.autocc, ojan, webkit.review.bot | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Attachments: |
|
Description
Rafael Weinstein
2013-03-29 17:15:28 PDT
Created attachment 195823 [details]
Patch
Created attachment 195825 [details]
Patch
this time with layout test attached. Comment on attachment 195825 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195825&action=review > Source/WebCore/ChangeLog:6 > + HTMLLinkElement was resolving its URL when the href attribute was processed and caching it without ever Extra space. > Source/WebCore/html/HTMLLinkElement.cpp:138 > + String url = stripLeadingAndTrailingHTMLSpaces(href); > + return url.isEmpty() ? KURL() : document()->completeURL(url); I'm surprised we need this ternary? Since I would expect other palces to treat empty urls as urls to the document? I guess this si so the later isValid() check works? > Source/WebCore/html/HTMLLinkElement.h:108 > + KURL getURL() const; I believe webkit style is to avoid using "get" in getters. Created attachment 195865 [details]
Patch
Comment on attachment 195865 [details]
Patch
I believe WebKIt style would have you rename "URL()" to "url()". Otherwise this LGTM.
Created attachment 195867 [details]
Patch
Created attachment 195868 [details]
Patch for landing
just noticed getNonEmptyURLAttribute() on Element.cpp. using that instead. Comment on attachment 195868 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=195868&action=review > Source/WebCore/html/HTMLLinkElement.cpp:180 > + KURL url = getNonEmptyURLAttribute(hrefAttr); You've got an extra space after the = on this line. Created attachment 195878 [details]
Patch for landing
Comment on attachment 195868 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=195868&action=review >> Source/WebCore/html/HTMLLinkElement.cpp:180 >> + KURL url = getNonEmptyURLAttribute(hrefAttr); > > You've got an extra space after the = on this line. fixed. Comment on attachment 195878 [details] Patch for landing Clearing flags on attachment: 195878 Committed r147291: <http://trac.webkit.org/changeset/147291> All reviewed patches have been landed. Closing bug. |