Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLImageElement.cpp

Issue 2628613002: Add UseCounters for referrerpolicy attributes (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * Copyright (C) 2010 Google Inc. All rights reserved. 6 * Copyright (C) 2010 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr) { 261 } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr) {
262 selectSourceURL(ImageLoader::UpdateIgnorePreviousError); 262 selectSourceURL(ImageLoader::UpdateIgnorePreviousError);
263 } else if (name == usemapAttr) { 263 } else if (name == usemapAttr) {
264 setIsLink(!params.newValue.isNull()); 264 setIsLink(!params.newValue.isNull());
265 } else if (name == referrerpolicyAttr) { 265 } else if (name == referrerpolicyAttr) {
266 m_referrerPolicy = ReferrerPolicyDefault; 266 m_referrerPolicy = ReferrerPolicyDefault;
267 if (!params.newValue.isNull()) { 267 if (!params.newValue.isNull()) {
268 SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords( 268 SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(
269 params.newValue, &m_referrerPolicy); 269 params.newValue, &m_referrerPolicy);
270 UseCounter::count(document(),
271 UseCounter::HTMLImageElementReferrerPolicyAttribute);
270 } 272 }
271 } else { 273 } else {
272 HTMLElement::parseAttribute(params); 274 HTMLElement::parseAttribute(params);
273 } 275 }
274 } 276 }
275 277
276 String HTMLImageElement::altText() const { 278 String HTMLImageElement::altText() const {
277 // lets figure out the alt text.. magic stuff 279 // lets figure out the alt text.. magic stuff
278 // http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#altgen 280 // http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#altgen
279 // also heavily discussed by Hixie on bugzilla 281 // also heavily discussed by Hixie on bugzilla
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 void HTMLImageElement::associateWith(HTMLFormElement* form) { 912 void HTMLImageElement::associateWith(HTMLFormElement* form) {
911 if (form && form->isConnected()) { 913 if (form && form->isConnected()) {
912 m_form = form; 914 m_form = form;
913 m_formWasSetByParser = true; 915 m_formWasSetByParser = true;
914 m_form->associate(*this); 916 m_form->associate(*this);
915 m_form->didAssociateByParser(); 917 m_form->didAssociateByParser();
916 } 918 }
917 }; 919 };
918 920
919 } // namespace blink 921 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698