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

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

Issue 1738613002: Rename enums/functions that collide in chromium style in core/dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-3
Patch Set: get-names-4: Created 4 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 reserv ed. 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return HTMLElement::isPresentationAttribute(name); 56 return HTMLElement::isPresentationAttribute(name);
57 } 57 }
58 58
59 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) 59 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
60 { 60 {
61 if (name == backgroundAttr) { 61 if (name == backgroundAttr) {
62 String url = stripLeadingAndTrailingHTMLSpaces(value); 62 String url = stripLeadingAndTrailingHTMLSpaces(value);
63 if (!url.isEmpty()) { 63 if (!url.isEmpty()) {
64 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create (url, document().completeURL(url)); 64 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create (url, document().completeURL(url));
65 imageValue->setInitiator(localName()); 65 imageValue->setInitiator(localName());
66 imageValue->setReferrer(Referrer(document().outgoingReferrer(), docu ment().referrerPolicy())); 66 imageValue->setReferrer(Referrer(document().outgoingReferrer(), docu ment().getReferrerPolicy()));
67 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu e.release())); 67 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu e.release()));
68 } 68 }
69 } else if (name == marginwidthAttr || name == leftmarginAttr) { 69 } else if (name == marginwidthAttr || name == leftmarginAttr) {
70 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); 70 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
71 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); 71 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
72 } else if (name == marginheightAttr || name == topmarginAttr) { 72 } else if (name == marginheightAttr || name == topmarginAttr) {
73 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); 73 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
74 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); 74 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
75 } else if (name == bgcolorAttr) { 75 } else if (name == bgcolorAttr) {
76 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); 76 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 bool HTMLBodyElement::supportsFocus() const 186 bool HTMLBodyElement::supportsFocus() const
187 { 187 {
188 // This override is needed because the inherited method bails if the parent is editable. 188 // This override is needed because the inherited method bails if the parent is editable.
189 // The <body> should be focusable even if <html> is editable. 189 // The <body> should be focusable even if <html> is editable.
190 return hasEditableStyle() || HTMLElement::supportsFocus(); 190 return hasEditableStyle() || HTMLElement::supportsFocus();
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698