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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
711 clearStyleResolver(); | 711 clearStyleResolver(); |
712 } | 712 } |
713 | 713 |
714 DOMImplementation& Document::implementation() | 714 DOMImplementation& Document::implementation() |
715 { | 715 { |
716 if (!m_implementation) | 716 if (!m_implementation) |
717 m_implementation = DOMImplementation::create(*this); | 717 m_implementation = DOMImplementation::create(*this); |
718 return *m_implementation; | 718 return *m_implementation; |
719 } | 719 } |
720 | 720 |
721 bool Document::hasManifest() const | 721 bool Document::hasAppCacheManifest() const |
722 { | 722 { |
723 return isHTMLHtmlElement(documentElement()) && documentElement()->hasAttribu te(manifestAttr); | 723 return isHTMLHtmlElement(documentElement()) && documentElement()->hasAttribu te(manifestAttr); |
724 } | 724 } |
725 | 725 |
726 Location* Document::location() const | 726 Location* Document::location() const |
727 { | 727 { |
728 if (!frame()) | 728 if (!frame()) |
729 return 0; | 729 return 0; |
730 | 730 |
731 return &domWindow()->location(); | 731 return &domWindow()->location(); |
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2455 HTMLElement* oldBody = body(); | 2455 HTMLElement* oldBody = body(); |
2456 if (oldBody == newBody) | 2456 if (oldBody == newBody) |
2457 return; | 2457 return; |
2458 | 2458 |
2459 if (oldBody) | 2459 if (oldBody) |
2460 documentElement()->replaceChild(newBody.release(), oldBody, exceptionSta te); | 2460 documentElement()->replaceChild(newBody.release(), oldBody, exceptionSta te); |
2461 else | 2461 else |
2462 documentElement()->appendChild(newBody.release(), exceptionState); | 2462 documentElement()->appendChild(newBody.release(), exceptionState); |
2463 } | 2463 } |
2464 | 2464 |
2465 HTMLHeadElement* Document::head() | 2465 HTMLHeadElement* Document::head() const |
2466 { | 2466 { |
2467 Node* de = documentElement(); | 2467 Node* de = documentElement(); |
2468 if (!de) | 2468 if (!de) |
2469 return 0; | 2469 return 0; |
2470 | 2470 |
2471 return Traversal<HTMLHeadElement>::firstChild(*de); | 2471 return Traversal<HTMLHeadElement>::firstChild(*de); |
2472 } | 2472 } |
2473 | 2473 |
2474 Element* Document::viewportDefiningElement(RenderStyle* rootStyle) const | 2474 Element* Document::viewportDefiningElement(RenderStyle* rootStyle) const |
2475 { | 2475 { |
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4679 | 4679 |
4680 if (firstTouchIcon.m_iconType != InvalidIcon) | 4680 if (firstTouchIcon.m_iconType != InvalidIcon) |
4681 iconURLs.append(firstTouchIcon); | 4681 iconURLs.append(firstTouchIcon); |
4682 if (firstTouchPrecomposedIcon.m_iconType != InvalidIcon) | 4682 if (firstTouchPrecomposedIcon.m_iconType != InvalidIcon) |
4683 iconURLs.append(firstTouchPrecomposedIcon); | 4683 iconURLs.append(firstTouchPrecomposedIcon); |
4684 for (int i = secondaryIcons.size() - 1; i >= 0; --i) | 4684 for (int i = secondaryIcons.size() - 1; i >= 0; --i) |
4685 iconURLs.append(secondaryIcons[i]); | 4685 iconURLs.append(secondaryIcons[i]); |
4686 return iconURLs; | 4686 return iconURLs; |
4687 } | 4687 } |
4688 | 4688 |
4689 HTMLLinkElement* Document::linkManifest() const | |
4690 { | |
4691 // The first link element with a manifest rel must be used. Others are ignor ed. | |
Inactive
2014/05/08 20:13:29
May be a bit simpler to return early if head() is
Inactive
2014/05/10 00:40:20
Did you disagree with this proposal? It avoided ca
mlamouri (slow - plz ping)
2014/05/10 11:28:45
Eh, sorry about that. I got focused on the tests a
| |
4692 for (HTMLLinkElement* linkElement = head() ? Traversal<HTMLLinkElement>::fir stChild(*head()) : 0; linkElement; linkElement = Traversal<HTMLLinkElement>::nex tSibling(*linkElement)) { | |
4693 if (!linkElement->relAttribute().isManifest()) | |
4694 continue; | |
4695 return linkElement; | |
4696 } | |
4697 | |
4698 return 0; | |
4699 } | |
4700 | |
4689 void Document::setUseSecureKeyboardEntryWhenActive(bool usesSecureKeyboard) | 4701 void Document::setUseSecureKeyboardEntryWhenActive(bool usesSecureKeyboard) |
4690 { | 4702 { |
4691 if (m_useSecureKeyboardEntryWhenActive == usesSecureKeyboard) | 4703 if (m_useSecureKeyboardEntryWhenActive == usesSecureKeyboard) |
4692 return; | 4704 return; |
4693 | 4705 |
4694 m_useSecureKeyboardEntryWhenActive = usesSecureKeyboard; | 4706 m_useSecureKeyboardEntryWhenActive = usesSecureKeyboard; |
4695 m_frame->selection().updateSecureKeyboardEntryIfActive(); | 4707 m_frame->selection().updateSecureKeyboardEntryIfActive(); |
4696 } | 4708 } |
4697 | 4709 |
4698 bool Document::useSecureKeyboardEntryWhenActive() const | 4710 bool Document::useSecureKeyboardEntryWhenActive() const |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5708 visitor->trace(m_visibilityObservers); | 5720 visitor->trace(m_visibilityObservers); |
5709 visitor->trace(m_userActionElements); | 5721 visitor->trace(m_userActionElements); |
5710 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5722 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5711 DocumentSupplementable::trace(visitor); | 5723 DocumentSupplementable::trace(visitor); |
5712 TreeScope::trace(visitor); | 5724 TreeScope::trace(visitor); |
5713 ContainerNode::trace(visitor); | 5725 ContainerNode::trace(visitor); |
5714 ExecutionContext::trace(visitor); | 5726 ExecutionContext::trace(visitor); |
5715 } | 5727 } |
5716 | 5728 |
5717 } // namespace WebCore | 5729 } // namespace WebCore |
OLD | NEW |