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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 { | 159 { |
160 HTMLElement::insertedInto(insertionPoint); | 160 HTMLElement::insertedInto(insertionPoint); |
161 return InsertionShouldCallDidNotifySubtreeInsertions; | 161 return InsertionShouldCallDidNotifySubtreeInsertions; |
162 } | 162 } |
163 | 163 |
164 void HTMLBodyElement::didNotifySubtreeInsertionsToDocument() | 164 void HTMLBodyElement::didNotifySubtreeInsertionsToDocument() |
165 { | 165 { |
166 // FIXME: It's surprising this is web compatible since it means a | 166 // FIXME: It's surprising this is web compatible since it means a |
167 // marginwidth and marginheight attribute can magically appear on the <body> | 167 // marginwidth and marginheight attribute can magically appear on the <body> |
168 // of all documents embedded through <iframe> or <frame>. | 168 // of all documents embedded through <iframe> or <frame>. |
169 Element* ownerElement = document().ownerElement(); | 169 HTMLFrameOwnerElement* ownerElement = document().ownerElement(); |
170 if (!isHTMLFrameElementBase(ownerElement)) | 170 if (!isHTMLFrameElementBase(ownerElement)) |
171 return; | 171 return; |
172 HTMLFrameElementBase& ownerFrameElement = toHTMLFrameElementBase(*ownerEleme
nt); | 172 HTMLFrameElementBase& ownerFrameElement = toHTMLFrameElementBase(*ownerEleme
nt); |
173 int marginWidth = ownerFrameElement.marginWidth(); | 173 int marginWidth = ownerFrameElement.marginWidth(); |
174 int marginHeight = ownerFrameElement.marginHeight(); | 174 int marginHeight = ownerFrameElement.marginHeight(); |
175 if (marginWidth != -1) | 175 if (marginWidth != -1) |
176 setIntegralAttribute(marginwidthAttr, marginWidth); | 176 setIntegralAttribute(marginwidthAttr, marginWidth); |
177 if (marginHeight != -1) | 177 if (marginHeight != -1) |
178 setIntegralAttribute(marginheightAttr, marginHeight); | 178 setIntegralAttribute(marginheightAttr, marginHeight); |
179 } | 179 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 int HTMLBodyElement::scrollWidth() | 327 int HTMLBodyElement::scrollWidth() |
328 { | 328 { |
329 // Update the document's layout. | 329 // Update the document's layout. |
330 Document& document = this->document(); | 330 Document& document = this->document(); |
331 document.updateLayoutIgnorePendingStylesheets(); | 331 document.updateLayoutIgnorePendingStylesheets(); |
332 FrameView* view = document.view(); | 332 FrameView* view = document.view(); |
333 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; | 333 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; |
334 } | 334 } |
335 | 335 |
336 } // namespace blink | 336 } // namespace blink |
OLD | NEW |