| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA
ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr
|| name == textAttr || name == bgpropertiesAttr) | 62 if (name == backgroundAttr || name == marginwidthAttr || name == leftmarginA
ttr || name == marginheightAttr || name == topmarginAttr || name == bgcolorAttr
|| name == textAttr || name == bgpropertiesAttr) |
| 63 return true; | 63 return true; |
| 64 return HTMLElement::isPresentationAttribute(name); | 64 return HTMLElement::isPresentationAttribute(name); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName&
name, const AtomicString& value, MutableStylePropertySet* style) | 67 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName&
name, const AtomicString& value, MutableStylePropertySet* style) |
| 68 { | 68 { |
| 69 if (name == backgroundAttr) { | 69 if (name == backgroundAttr) { |
| 70 String url = stripLeadingAndTrailingHTMLSpaces(value); | 70 String url = stripLeadingAndTrailingHTMLSpaces(value); |
| 71 if (!url.isEmpty()) { | 71 if (!url.isEmpty()) { |
| 72 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create
(document().completeURL(url)); | 72 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create
(url, document().completeURL(url)); |
| 73 imageValue->setInitiator(localName()); | 73 imageValue->setInitiator(localName()); |
| 74 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu
e.release())); | 74 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu
e.release())); |
| 75 } | 75 } |
| 76 } else if (name == marginwidthAttr || name == leftmarginAttr) { | 76 } else if (name == marginwidthAttr || name == leftmarginAttr) { |
| 77 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); | 77 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); |
| 78 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); | 78 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); |
| 79 } else if (name == marginheightAttr || name == topmarginAttr) { | 79 } else if (name == marginheightAttr || name == topmarginAttr) { |
| 80 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); | 80 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); |
| 81 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); | 81 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); |
| 82 } else if (name == bgcolorAttr) { | 82 } else if (name == bgcolorAttr) { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 int HTMLBodyElement::scrollWidth() | 313 int HTMLBodyElement::scrollWidth() |
| 314 { | 314 { |
| 315 // Update the document's layout. | 315 // Update the document's layout. |
| 316 Document& document = this->document(); | 316 Document& document = this->document(); |
| 317 document.updateLayoutIgnorePendingStylesheets(); | 317 document.updateLayoutIgnorePendingStylesheets(); |
| 318 FrameView* view = document.view(); | 318 FrameView* view = document.view(); |
| 319 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; | 319 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace WebCore | 322 } // namespace WebCore |
| OLD | NEW |