[Webkit-unassigned] [Bug 64580] Add support for download='filename' in anchors

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 22 14:09:53 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64580


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #101754|1                           |0
        is obsolete|                            |




--- Comment #46 from Alexey Proskuryakov <ap at webkit.org>  2011-07-22 14:09:53 PST ---
(From update of attachment 101754)
View in context: https://bugs.webkit.org/attachment.cgi?id=101754&action=review

> Source/WebCore/html/HTMLAnchorElement.cpp:507
> +    bool download = hasAttribute(downloadAttr);
> +    if (download) {

Why not "if (hasAttribute(downloadAttr))"?

> Source/WebCore/html/HTMLAnchorElement.cpp:515
> +        if (!hasRel(RelationNoReferrer)) {
> +            String referrer = frame->loader()->outgoingReferrer();
> +            if (!referrer.isEmpty() && !SecurityOrigin::shouldHideReferrer(kurl, referrer))
> +                request.setHTTPReferrer(referrer);
> +            frame->loader()->addExtraFieldsToMainResourceRequest(request);
> +        }

It's pretty horrible to duplicate this code.

> Source/WebCore/html/HTMLAnchorElement.idl:60
> +#if defined(ENABLE_DOWNLOAD_ATTRIBUTE)
> +        attribute [Reflect] DOMString download;

Don't we have Conditional for attributes now?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list