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 4822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4833 | 4833 |
4834 Vector<IconURL> Document::iconURLs(int iconTypesMask) | 4834 Vector<IconURL> Document::iconURLs(int iconTypesMask) |
4835 { | 4835 { |
4836 IconURL firstFavicon; | 4836 IconURL firstFavicon; |
4837 IconURL firstTouchIcon; | 4837 IconURL firstTouchIcon; |
4838 IconURL firstTouchPrecomposedIcon; | 4838 IconURL firstTouchPrecomposedIcon; |
4839 Vector<IconURL> secondaryIcons; | 4839 Vector<IconURL> secondaryIcons; |
4840 | 4840 |
4841 // Start from the last child node so that icons seen later take precedence a
s required by the spec. | 4841 // Start from the last child node so that icons seen later take precedence a
s required by the spec. |
4842 for (HTMLLinkElement* linkElement = head() ? Traversal<HTMLLinkElement>::fir
stChild(*head()) : 0; linkElement; linkElement = Traversal<HTMLLinkElement>::nex
tSibling(*linkElement)) { | 4842 for (HTMLLinkElement* linkElement = head() ? Traversal<HTMLLinkElement>::fir
stChild(*head()) : 0; linkElement; linkElement = Traversal<HTMLLinkElement>::nex
tSibling(*linkElement)) { |
4843 if (!(linkElement->iconType() & iconTypesMask)) | 4843 if (!(linkElement->getIconType() & iconTypesMask)) |
4844 continue; | 4844 continue; |
4845 if (linkElement->href().isEmpty()) | 4845 if (linkElement->href().isEmpty()) |
4846 continue; | 4846 continue; |
4847 | 4847 |
4848 IconURL newURL(linkElement->href(), linkElement->iconSizes(), linkElemen
t->type(), linkElement->iconType()); | 4848 IconURL newURL(linkElement->href(), linkElement->iconSizes(), linkElemen
t->type(), linkElement->getIconType()); |
4849 if (linkElement->iconType() == Favicon) { | 4849 if (linkElement->getIconType() == Favicon) { |
4850 if (firstFavicon.m_iconType != InvalidIcon) | 4850 if (firstFavicon.m_iconType != InvalidIcon) |
4851 secondaryIcons.append(firstFavicon); | 4851 secondaryIcons.append(firstFavicon); |
4852 firstFavicon = newURL; | 4852 firstFavicon = newURL; |
4853 } else if (linkElement->iconType() == TouchIcon) { | 4853 } else if (linkElement->getIconType() == TouchIcon) { |
4854 if (firstTouchIcon.m_iconType != InvalidIcon) | 4854 if (firstTouchIcon.m_iconType != InvalidIcon) |
4855 secondaryIcons.append(firstTouchIcon); | 4855 secondaryIcons.append(firstTouchIcon); |
4856 firstTouchIcon = newURL; | 4856 firstTouchIcon = newURL; |
4857 } else if (linkElement->iconType() == TouchPrecomposedIcon) { | 4857 } else if (linkElement->getIconType() == TouchPrecomposedIcon) { |
4858 if (firstTouchPrecomposedIcon.m_iconType != InvalidIcon) | 4858 if (firstTouchPrecomposedIcon.m_iconType != InvalidIcon) |
4859 secondaryIcons.append(firstTouchPrecomposedIcon); | 4859 secondaryIcons.append(firstTouchPrecomposedIcon); |
4860 firstTouchPrecomposedIcon = newURL; | 4860 firstTouchPrecomposedIcon = newURL; |
4861 } else { | 4861 } else { |
4862 ASSERT_NOT_REACHED(); | 4862 ASSERT_NOT_REACHED(); |
4863 } | 4863 } |
4864 } | 4864 } |
4865 | 4865 |
4866 Vector<IconURL> iconURLs; | 4866 Vector<IconURL> iconURLs; |
4867 if (firstFavicon.m_iconType != InvalidIcon) | 4867 if (firstFavicon.m_iconType != InvalidIcon) |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5998 #ifndef NDEBUG | 5998 #ifndef NDEBUG |
5999 using namespace blink; | 5999 using namespace blink; |
6000 void showLiveDocumentInstances() | 6000 void showLiveDocumentInstances() |
6001 { | 6001 { |
6002 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6002 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
6003 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6003 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6004 for (Document* document : set) | 6004 for (Document* document : set) |
6005 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 6005 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
6006 } | 6006 } |
6007 #endif | 6007 #endif |
OLD | NEW |