| 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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2316 setReadyState(Loading); | 2316 setReadyState(Loading); |
| 2317 | 2317 |
| 2318 return m_parser; | 2318 return m_parser; |
| 2319 } | 2319 } |
| 2320 | 2320 |
| 2321 HTMLElement* Document::body() const | 2321 HTMLElement* Document::body() const |
| 2322 { | 2322 { |
| 2323 if (!documentElement()) | 2323 if (!documentElement()) |
| 2324 return 0; | 2324 return 0; |
| 2325 | 2325 |
| 2326 for (Node* child = documentElement()->firstChild(); child; child = child->ne
xtSibling()) { | 2326 for (Element* child = ElementTraversal::firstWithin(*documentElement()); chi
ld; child = ElementTraversal::nextSibling(*child)) { |
| 2327 if (child->hasTagName(framesetTag) || child->hasTagName(bodyTag)) | 2327 if (child->hasTagName(framesetTag) || child->hasTagName(bodyTag)) |
| 2328 return toHTMLElement(child); | 2328 return toHTMLElement(child); |
| 2329 } | 2329 } |
| 2330 | 2330 |
| 2331 return 0; | 2331 return 0; |
| 2332 } | 2332 } |
| 2333 | 2333 |
| 2334 void Document::setBody(PassRefPtr<HTMLElement> prpNewBody, ExceptionState& excep
tionState) | 2334 void Document::setBody(PassRefPtr<HTMLElement> prpNewBody, ExceptionState& excep
tionState) |
| 2335 { | 2335 { |
| 2336 RefPtr<HTMLElement> newBody = prpNewBody; | 2336 RefPtr<HTMLElement> newBody = prpNewBody; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2358 else | 2358 else |
| 2359 documentElement()->appendChild(newBody.release(), exceptionState); | 2359 documentElement()->appendChild(newBody.release(), exceptionState); |
| 2360 } | 2360 } |
| 2361 | 2361 |
| 2362 HTMLHeadElement* Document::head() | 2362 HTMLHeadElement* Document::head() |
| 2363 { | 2363 { |
| 2364 Node* de = documentElement(); | 2364 Node* de = documentElement(); |
| 2365 if (!de) | 2365 if (!de) |
| 2366 return 0; | 2366 return 0; |
| 2367 | 2367 |
| 2368 for (Node* node = de->firstChild(); node; node = node->nextSibling()) { | 2368 for (Element* child = ElementTraversal::firstWithin(*de); child; child = Ele
mentTraversal::nextSibling(*child)) { |
| 2369 if (node->hasTagName(headTag)) | 2369 if (child->hasTagName(headTag)) |
| 2370 return toHTMLHeadElement(node); | 2370 return toHTMLHeadElement(child); |
| 2371 } | 2371 } |
| 2372 return 0; | 2372 return 0; |
| 2373 } | 2373 } |
| 2374 | 2374 |
| 2375 Element* Document::viewportDefiningElement(RenderStyle* rootStyle) const | 2375 Element* Document::viewportDefiningElement(RenderStyle* rootStyle) const |
| 2376 { | 2376 { |
| 2377 // If a BODY element sets non-visible overflow, it is to be propagated to th
e viewport, as long | 2377 // If a BODY element sets non-visible overflow, it is to be propagated to th
e viewport, as long |
| 2378 // as the following conditions are all met: | 2378 // as the following conditions are all met: |
| 2379 // (1) The root element is HTML. | 2379 // (1) The root element is HTML. |
| 2380 // (2) It is the primary BODY element (we only assert for this, expecting ca
llers to behave). | 2380 // (2) It is the primary BODY element (we only assert for this, expecting ca
llers to behave). |
| (...skipping 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5441 void Document::defaultEventHandler(Event* event) | 5441 void Document::defaultEventHandler(Event* event) |
| 5442 { | 5442 { |
| 5443 if (frame() && frame()->remotePlatformLayer()) { | 5443 if (frame() && frame()->remotePlatformLayer()) { |
| 5444 frame()->chromeClient().forwardInputEvent(this, event); | 5444 frame()->chromeClient().forwardInputEvent(this, event); |
| 5445 return; | 5445 return; |
| 5446 } | 5446 } |
| 5447 Node::defaultEventHandler(event); | 5447 Node::defaultEventHandler(event); |
| 5448 } | 5448 } |
| 5449 | 5449 |
| 5450 } // namespace WebCore | 5450 } // namespace WebCore |
| OLD | NEW |