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

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

Issue 2769283004: Remove referrer setter from CSSImageValue (Closed)
Patch Set: Created 3 years, 9 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 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 void HTMLBodyElement::collectStyleForPresentationAttribute( 60 void HTMLBodyElement::collectStyleForPresentationAttribute(
61 const QualifiedName& name, 61 const QualifiedName& name,
62 const AtomicString& value, 62 const AtomicString& value,
63 MutableStylePropertySet* style) { 63 MutableStylePropertySet* style) {
64 if (name == backgroundAttr) { 64 if (name == backgroundAttr) {
65 String url = stripLeadingAndTrailingHTMLSpaces(value); 65 String url = stripLeadingAndTrailingHTMLSpaces(value);
66 if (!url.isEmpty()) { 66 if (!url.isEmpty()) {
67 CSSImageValue* imageValue = 67 CSSImageValue* imageValue =
68 CSSImageValue::create(url, document().completeURL(url)); 68 CSSImageValue::create(url, document().completeURL(url),
69 Referrer(document().outgoingReferrer(),
70 document().getReferrerPolicy()));
69 imageValue->setInitiator(localName()); 71 imageValue->setInitiator(localName());
70 imageValue->setReferrer(Referrer(document().outgoingReferrer(),
71 document().getReferrerPolicy()));
72 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, *imageValue)); 72 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, *imageValue));
73 } 73 }
74 } else if (name == marginwidthAttr || name == leftmarginAttr) { 74 } else if (name == marginwidthAttr || name == leftmarginAttr) {
75 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); 75 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
76 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); 76 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
77 } else if (name == marginheightAttr || name == topmarginAttr) { 77 } else if (name == marginheightAttr || name == topmarginAttr) {
78 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); 78 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
79 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); 79 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
80 } else if (name == bgcolorAttr) { 80 } else if (name == bgcolorAttr) {
81 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); 81 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 return backgroundAttr; 251 return backgroundAttr;
252 } 252 }
253 253
254 bool HTMLBodyElement::supportsFocus() const { 254 bool HTMLBodyElement::supportsFocus() const {
255 // This override is needed because the inherited method bails if the parent is 255 // This override is needed because the inherited method bails if the parent is
256 // editable. The <body> should be focusable even if <html> is editable. 256 // editable. The <body> should be focusable even if <html> is editable.
257 return hasEditableStyle(*this) || HTMLElement::supportsFocus(); 257 return hasEditableStyle(*this) || HTMLElement::supportsFocus();
258 } 258 }
259 259
260 } // namespace blink 260 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698