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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr || name == textAttr) 55 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr || name == textAttr)
56 return true; 56 return true;
57 return HTMLElement::isPresentationAttribute(name); 57 return HTMLElement::isPresentationAttribute(name);
58 } 58 }
59 59
60 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) 60 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
61 { 61 {
62 if (name == backgroundAttr) { 62 if (name == backgroundAttr) {
63 String url = stripLeadingAndTrailingHTMLSpaces(value); 63 String url = stripLeadingAndTrailingHTMLSpaces(value);
64 if (!url.isEmpty()) { 64 if (!url.isEmpty()) {
65 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create (url, document().completeURL(url)); 65 RawPtr<CSSImageValue> imageValue = CSSImageValue::create(url, docume nt().completeURL(url));
66 imageValue->setInitiator(localName()); 66 imageValue->setInitiator(localName());
67 imageValue->setReferrer(Referrer(document().outgoingReferrer(), docu ment().getReferrerPolicy())); 67 imageValue->setReferrer(Referrer(document().outgoingReferrer(), docu ment().getReferrerPolicy()));
68 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu e.release())); 68 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu e.release()));
69 } 69 }
70 } else if (name == marginwidthAttr || name == leftmarginAttr) { 70 } else if (name == marginwidthAttr || name == leftmarginAttr) {
71 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); 71 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
72 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); 72 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
73 } else if (name == marginheightAttr || name == topmarginAttr) { 73 } else if (name == marginheightAttr || name == topmarginAttr) {
74 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); 74 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
75 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); 75 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 bool HTMLBodyElement::supportsFocus() const 187 bool HTMLBodyElement::supportsFocus() const
188 { 188 {
189 // This override is needed because the inherited method bails if the parent is editable. 189 // This override is needed because the inherited method bails if the parent is editable.
190 // The <body> should be focusable even if <html> is editable. 190 // The <body> should be focusable even if <html> is editable.
191 return hasEditableStyle() || HTMLElement::supportsFocus(); 191 return hasEditableStyle() || HTMLElement::supportsFocus();
192 } 192 }
193 193
194 } // namespace blink 194 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAudioElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLButtonElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698