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

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

Issue 202633009: Add Element::subResourceAttributeName() virtual function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use nullQName() Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLBodyElement.h ('k') | Source/core/html/HTMLEmbedElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 bool HTMLBodyElement::isURLAttribute(const Attribute& attribute) const 177 bool HTMLBodyElement::isURLAttribute(const Attribute& attribute) const
178 { 178 {
179 return attribute.name() == backgroundAttr || HTMLElement::isURLAttribute(att ribute); 179 return attribute.name() == backgroundAttr || HTMLElement::isURLAttribute(att ribute);
180 } 180 }
181 181
182 bool HTMLBodyElement::hasLegalLinkAttribute(const QualifiedName& name) const 182 bool HTMLBodyElement::hasLegalLinkAttribute(const QualifiedName& name) const
183 { 183 {
184 return name == backgroundAttr || HTMLElement::hasLegalLinkAttribute(name); 184 return name == backgroundAttr || HTMLElement::hasLegalLinkAttribute(name);
185 } 185 }
186 186
187 const QualifiedName& HTMLBodyElement::subResourceAttributeName() const
188 {
189 return backgroundAttr;
190 }
191
187 bool HTMLBodyElement::supportsFocus() const 192 bool HTMLBodyElement::supportsFocus() const
188 { 193 {
189 // This override is needed because the inherited method bails if the parent is editable. 194 // 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. 195 // The <body> should be focusable even if <html> is editable.
191 return rendererIsEditable() || HTMLElement::supportsFocus(); 196 return rendererIsEditable() || HTMLElement::supportsFocus();
192 } 197 }
193 198
194 static int adjustForZoom(int value, Document* document) 199 static int adjustForZoom(int value, Document* document)
195 { 200 {
196 LocalFrame* frame = document->frame(); 201 LocalFrame* frame = document->frame();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 int HTMLBodyElement::scrollWidth() 323 int HTMLBodyElement::scrollWidth()
319 { 324 {
320 // Update the document's layout. 325 // Update the document's layout.
321 Document& document = this->document(); 326 Document& document = this->document();
322 document.updateLayoutIgnorePendingStylesheets(); 327 document.updateLayoutIgnorePendingStylesheets();
323 FrameView* view = document.view(); 328 FrameView* view = document.view();
324 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; 329 return view ? adjustForZoom(view->contentsWidth(), &document) : 0;
325 } 330 }
326 331
327 } // namespace WebCore 332 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLBodyElement.h ('k') | Source/core/html/HTMLEmbedElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698