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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "bindings/core/v8/ScriptEventListener.h" | 27 #include "bindings/core/v8/ScriptEventListener.h" |
28 #include "core/CSSValueKeywords.h" | 28 #include "core/CSSValueKeywords.h" |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
30 #include "core/css/CSSImageValue.h" | 30 #include "core/css/CSSImageValue.h" |
31 #include "core/css/parser/BisonCSSParser.h" | 31 #include "core/css/parser/BisonCSSParser.h" |
32 #include "core/css/StylePropertySet.h" | 32 #include "core/css/StylePropertySet.h" |
33 #include "core/dom/Attribute.h" | 33 #include "core/dom/Attribute.h" |
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/frame/UseCounter.h" |
36 #include "core/html/HTMLFrameElementBase.h" | 37 #include "core/html/HTMLFrameElementBase.h" |
37 #include "core/html/parser/HTMLParserIdioms.h" | 38 #include "core/html/parser/HTMLParserIdioms.h" |
38 #include "core/rendering/RenderBox.h" | 39 #include "core/rendering/RenderBox.h" |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 using namespace HTMLNames; | 43 using namespace HTMLNames; |
43 | 44 |
44 inline HTMLBodyElement::HTMLBodyElement(Document& document) | 45 inline HTMLBodyElement::HTMLBodyElement(Document& document) |
45 : HTMLElement(bodyTag, document) | 46 : HTMLElement(bodyTag, document) |
(...skipping 28 matching lines...) Expand all Loading... |
74 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); | 75 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); |
75 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); | 76 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); |
76 } else if (name == marginheightAttr || name == topmarginAttr) { | 77 } else if (name == marginheightAttr || name == topmarginAttr) { |
77 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); | 78 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); |
78 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); | 79 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); |
79 } else if (name == bgcolorAttr) { | 80 } else if (name == bgcolorAttr) { |
80 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); | 81 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); |
81 } else if (name == textAttr) { | 82 } else if (name == textAttr) { |
82 addHTMLColorToStyle(style, CSSPropertyColor, value); | 83 addHTMLColorToStyle(style, CSSPropertyColor, value); |
83 } else if (name == bgpropertiesAttr) { | 84 } else if (name == bgpropertiesAttr) { |
84 if (equalIgnoringCase(value, "fixed")) | 85 if (equalIgnoringCase(value, "fixed")) { |
85 addPropertyToPresentationAttributeStyle(style, CSSPropertyBackgroundA
ttachment, CSSValueFixed); | 86 UseCounter::count(document(), UseCounter::BgPropertiesFixed); |
| 87 addPropertyToPresentationAttributeStyle(style, CSSPropertyBackground
Attachment, CSSValueFixed); |
| 88 } |
86 } else | 89 } else |
87 HTMLElement::collectStyleForPresentationAttribute(name, value, style); | 90 HTMLElement::collectStyleForPresentationAttribute(name, value, style); |
88 } | 91 } |
89 | 92 |
90 void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) | 93 void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) |
91 { | 94 { |
92 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { | 95 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { |
93 if (value.isNull()) { | 96 if (value.isNull()) { |
94 if (name == linkAttr) | 97 if (name == linkAttr) |
95 document().textLinkColors().resetLinkColor(); | 98 document().textLinkColors().resetLinkColor(); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 int HTMLBodyElement::scrollWidth() | 327 int HTMLBodyElement::scrollWidth() |
325 { | 328 { |
326 // Update the document's layout. | 329 // Update the document's layout. |
327 Document& document = this->document(); | 330 Document& document = this->document(); |
328 document.updateLayoutIgnorePendingStylesheets(); | 331 document.updateLayoutIgnorePendingStylesheets(); |
329 FrameView* view = document.view(); | 332 FrameView* view = document.view(); |
330 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; | 333 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; |
331 } | 334 } |
332 | 335 |
333 } // namespace blink | 336 } // namespace blink |
OLD | NEW |