| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |