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 23 matching lines...) Expand all Loading... |
34 #include "core/frame/FrameView.h" | 34 #include "core/frame/FrameView.h" |
35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
36 #include "core/html/HTMLFrameElementBase.h" | 36 #include "core/html/HTMLFrameElementBase.h" |
37 #include "core/html/parser/HTMLParserIdioms.h" | 37 #include "core/html/parser/HTMLParserIdioms.h" |
38 #include "core/rendering/RenderBox.h" | 38 #include "core/rendering/RenderBox.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 using namespace HTMLNames; | 42 using namespace HTMLNames; |
43 | 43 |
44 HTMLBodyElement::HTMLBodyElement(Document& document) | 44 inline HTMLBodyElement::HTMLBodyElement(Document& document) |
45 : HTMLElement(bodyTag, document) | 45 : HTMLElement(bodyTag, document) |
46 { | 46 { |
47 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
48 } | 48 } |
49 | 49 |
50 PassRefPtrWillBeRawPtr<HTMLBodyElement> HTMLBodyElement::create(Document& docume
nt) | 50 DEFINE_NODE_FACTORY(HTMLBodyElement) |
51 { | |
52 return adoptRefWillBeRefCountedGarbageCollected(new HTMLBodyElement(document
)); | |
53 } | |
54 | 51 |
55 HTMLBodyElement::~HTMLBodyElement() | 52 HTMLBodyElement::~HTMLBodyElement() |
56 { | 53 { |
57 } | 54 } |
58 | 55 |
59 bool HTMLBodyElement::isPresentationAttribute(const QualifiedName& name) const | 56 bool HTMLBodyElement::isPresentationAttribute(const QualifiedName& name) const |
60 { | 57 { |
61 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA
ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr
|| name == textAttr || name == bgpropertiesAttr) | 58 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA
ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr
|| name == textAttr || name == bgpropertiesAttr) |
62 return true; | 59 return true; |
63 return HTMLElement::isPresentationAttribute(name); | 60 return HTMLElement::isPresentationAttribute(name); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 double HTMLBodyElement::scrollWidth() | 321 double HTMLBodyElement::scrollWidth() |
325 { | 322 { |
326 // Update the document's layout. | 323 // Update the document's layout. |
327 Document& document = this->document(); | 324 Document& document = this->document(); |
328 document.updateLayoutIgnorePendingStylesheets(); | 325 document.updateLayoutIgnorePendingStylesheets(); |
329 FrameView* view = document.view(); | 326 FrameView* view = document.view(); |
330 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; | 327 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; |
331 } | 328 } |
332 | 329 |
333 } // namespace WebCore | 330 } // namespace WebCore |
OLD | NEW |