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, 2009, 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. |
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 else if (name == onofflineAttr) | 140 else if (name == onofflineAttr) |
141 document().setWindowAttributeEventListener(EventTypeNames::offline, crea
teAttributeEventListener(document().frame(), name, value, eventParameterName()))
; | 141 document().setWindowAttributeEventListener(EventTypeNames::offline, crea
teAttributeEventListener(document().frame(), name, value, eventParameterName()))
; |
142 else if (name == onpopstateAttr) | 142 else if (name == onpopstateAttr) |
143 document().setWindowAttributeEventListener(EventTypeNames::popstate, cre
ateAttributeEventListener(document().frame(), name, value, eventParameterName())
); | 143 document().setWindowAttributeEventListener(EventTypeNames::popstate, cre
ateAttributeEventListener(document().frame(), name, value, eventParameterName())
); |
144 else if (name == onlanguagechangeAttr) | 144 else if (name == onlanguagechangeAttr) |
145 document().setWindowAttributeEventListener(EventTypeNames::languagechang
e, createAttributeEventListener(document().frame(), name, value, eventParameterN
ame())); | 145 document().setWindowAttributeEventListener(EventTypeNames::languagechang
e, createAttributeEventListener(document().frame(), name, value, eventParameterN
ame())); |
146 else | 146 else |
147 HTMLElement::parseAttribute(name, value); | 147 HTMLElement::parseAttribute(name, value); |
148 } | 148 } |
149 | 149 |
150 bool HTMLFrameSetElement::layoutObjectIsNeeded(const LayoutStyle& style) | 150 bool HTMLFrameSetElement::layoutObjectIsNeeded(const ComputedStyle& style) |
151 { | 151 { |
152 // For compatibility, frames render even when display: none is set. | 152 // For compatibility, frames render even when display: none is set. |
153 // However, we delay creating a renderer until stylesheets have loaded. | 153 // However, we delay creating a renderer until stylesheets have loaded. |
154 return style.isStyleAvailable(); | 154 return style.isStyleAvailable(); |
155 } | 155 } |
156 | 156 |
157 LayoutObject* HTMLFrameSetElement::createLayoutObject(const LayoutStyle& style) | 157 LayoutObject* HTMLFrameSetElement::createLayoutObject(const ComputedStyle& style
) |
158 { | 158 { |
159 if (style.hasContent()) | 159 if (style.hasContent()) |
160 return LayoutObject::createObject(this, style); | 160 return LayoutObject::createObject(this, style); |
161 return new LayoutFrameSet(this); | 161 return new LayoutFrameSet(this); |
162 } | 162 } |
163 | 163 |
164 void HTMLFrameSetElement::attach(const AttachContext& context) | 164 void HTMLFrameSetElement::attach(const AttachContext& context) |
165 { | 165 { |
166 // Inherit default settings from parent frameset | 166 // Inherit default settings from parent frameset |
167 // FIXME: This is not dynamic. | 167 // FIXME: This is not dynamic. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 Element* frameElement = children()->namedItem(name); | 214 Element* frameElement = children()->namedItem(name); |
215 if (!isHTMLFrameElement(frameElement)) | 215 if (!isHTMLFrameElement(frameElement)) |
216 return nullptr; | 216 return nullptr; |
217 Document* document = toHTMLFrameElement(frameElement)->contentDocument(); | 217 Document* document = toHTMLFrameElement(frameElement)->contentDocument(); |
218 if (!document || !document->frame()) | 218 if (!document || !document->frame()) |
219 return nullptr; | 219 return nullptr; |
220 return document->domWindow(); | 220 return document->domWindow(); |
221 } | 221 } |
222 | 222 |
223 } // namespace blink | 223 } // namespace blink |
OLD | NEW |