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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 | 155 |
156 Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode*
insertionPoint) | 156 Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode*
insertionPoint) |
157 { | 157 { |
158 HTMLElement::insertedInto(insertionPoint); | 158 HTMLElement::insertedInto(insertionPoint); |
159 if (insertionPoint->inDocument()) { | 159 if (insertionPoint->inDocument()) { |
160 // FIXME: It's surprising this is web compatible since it means a margin
width | 160 // FIXME: It's surprising this is web compatible since it means a margin
width |
161 // and marginheight attribute can magically appear on the <body> of all
documents | 161 // and marginheight attribute can magically appear on the <body> of all
documents |
162 // embedded through <iframe> or <frame>. | 162 // embedded through <iframe> or <frame>. |
163 Element* ownerElement = document().ownerElement(); | 163 Element* ownerElement = document().ownerElement(); |
164 if (ownerElement && ownerElement->isFrameElementBase()) { | 164 if (isHTMLFrameElementBase(ownerElement)) { |
165 HTMLFrameElementBase* ownerFrameElement = toHTMLFrameElementBase(own
erElement); | 165 HTMLFrameElementBase& ownerFrameElement = toHTMLFrameElementBase(*ow
nerElement); |
166 int marginWidth = ownerFrameElement->marginWidth(); | 166 int marginWidth = ownerFrameElement.marginWidth(); |
167 if (marginWidth != -1) | 167 if (marginWidth != -1) |
168 setIntegralAttribute(marginwidthAttr, marginWidth); | 168 setIntegralAttribute(marginwidthAttr, marginWidth); |
169 int marginHeight = ownerFrameElement->marginHeight(); | 169 int marginHeight = ownerFrameElement.marginHeight(); |
170 if (marginHeight != -1) | 170 if (marginHeight != -1) |
171 setIntegralAttribute(marginheightAttr, marginHeight); | 171 setIntegralAttribute(marginheightAttr, marginHeight); |
172 } | 172 } |
173 } | 173 } |
174 return InsertionDone; | 174 return InsertionDone; |
175 } | 175 } |
176 | 176 |
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); |
(...skipping 133 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 |