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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return HTMLElement::isPresentationAttribute(name); | 63 return HTMLElement::isPresentationAttribute(name); |
64 } | 64 } |
65 | 65 |
66 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName&
name, const AtomicString& value, MutableStylePropertySet* style) | 66 void HTMLBodyElement::collectStyleForPresentationAttribute(const QualifiedName&
name, const AtomicString& value, MutableStylePropertySet* style) |
67 { | 67 { |
68 if (name == backgroundAttr) { | 68 if (name == backgroundAttr) { |
69 String url = stripLeadingAndTrailingHTMLSpaces(value); | 69 String url = stripLeadingAndTrailingHTMLSpaces(value); |
70 if (!url.isEmpty()) { | 70 if (!url.isEmpty()) { |
71 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create
(url, document().completeURL(url)); | 71 RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create
(url, document().completeURL(url)); |
72 imageValue->setInitiator(localName()); | 72 imageValue->setInitiator(localName()); |
| 73 imageValue->setReferrer(Referrer(document().outgoingReferrer(), docu
ment().referrerPolicy())); |
73 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu
e.release())); | 74 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValu
e.release())); |
74 } | 75 } |
75 } else if (name == marginwidthAttr || name == leftmarginAttr) { | 76 } else if (name == marginwidthAttr || name == leftmarginAttr) { |
76 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); | 77 addHTMLLengthToStyle(style, CSSPropertyMarginRight, value); |
77 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); | 78 addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value); |
78 } else if (name == marginheightAttr || name == topmarginAttr) { | 79 } else if (name == marginheightAttr || name == topmarginAttr) { |
79 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); | 80 addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value); |
80 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); | 81 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); |
81 } else if (name == bgcolorAttr) { | 82 } else if (name == bgcolorAttr) { |
82 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); | 83 addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 double HTMLBodyElement::scrollWidth() | 324 double HTMLBodyElement::scrollWidth() |
324 { | 325 { |
325 // Update the document's layout. | 326 // Update the document's layout. |
326 Document& document = this->document(); | 327 Document& document = this->document(); |
327 document.updateLayoutIgnorePendingStylesheets(); | 328 document.updateLayoutIgnorePendingStylesheets(); |
328 FrameView* view = document.view(); | 329 FrameView* view = document.view(); |
329 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; | 330 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; |
330 } | 331 } |
331 | 332 |
332 } // namespace WebCore | 333 } // namespace WebCore |
OLD | NEW |