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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 5379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5390 if (firstTouchIcon.m_iconType != InvalidIcon) | 5390 if (firstTouchIcon.m_iconType != InvalidIcon) |
5391 iconURLs.append(firstTouchIcon); | 5391 iconURLs.append(firstTouchIcon); |
5392 if (firstTouchPrecomposedIcon.m_iconType != InvalidIcon) | 5392 if (firstTouchPrecomposedIcon.m_iconType != InvalidIcon) |
5393 iconURLs.append(firstTouchPrecomposedIcon); | 5393 iconURLs.append(firstTouchPrecomposedIcon); |
5394 for (int i = secondaryIcons.size() - 1; i >= 0; --i) | 5394 for (int i = secondaryIcons.size() - 1; i >= 0; --i) |
5395 iconURLs.append(secondaryIcons[i]); | 5395 iconURLs.append(secondaryIcons[i]); |
5396 return iconURLs; | 5396 return iconURLs; |
5397 } | 5397 } |
5398 | 5398 |
5399 Color Document::themeColor() const { | 5399 Color Document::themeColor() const { |
5400 for (HTMLMetaElement* metaElement = | 5400 for (HTMLMetaElement& metaElement : |
5401 head() ? Traversal<HTMLMetaElement>::firstChild(*head()) : 0; | 5401 Traversal<HTMLMetaElement>::descendantsOf(*documentElement())) { |
tkent
2016/12/09 08:48:38
Crash if documentElement() is nullptr.
lpy
2016/12/09 09:17:37
Done.
| |
5402 metaElement; | |
5403 metaElement = Traversal<HTMLMetaElement>::nextSibling(*metaElement)) { | |
5404 Color color = Color::transparent; | 5402 Color color = Color::transparent; |
5405 if (equalIgnoringCase(metaElement->name(), "theme-color") && | 5403 if (equalIgnoringCase(metaElement.name(), "theme-color") && |
5406 CSSParser::parseColor( | 5404 CSSParser::parseColor( |
5407 color, metaElement->content().getString().stripWhiteSpace(), true)) | 5405 color, metaElement.content().getString().stripWhiteSpace(), true)) |
5408 return color; | 5406 return color; |
5409 } | 5407 } |
5410 return Color(); | 5408 return Color(); |
5411 } | 5409 } |
5412 | 5410 |
5413 HTMLLinkElement* Document::linkManifest() const { | 5411 HTMLLinkElement* Document::linkManifest() const { |
5414 HTMLHeadElement* head = this->head(); | 5412 HTMLHeadElement* head = this->head(); |
5415 if (!head) | 5413 if (!head) |
5416 return 0; | 5414 return 0; |
5417 | 5415 |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6589 } | 6587 } |
6590 | 6588 |
6591 void showLiveDocumentInstances() { | 6589 void showLiveDocumentInstances() { |
6592 WeakDocumentSet& set = liveDocumentSet(); | 6590 WeakDocumentSet& set = liveDocumentSet(); |
6593 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6591 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6594 for (Document* document : set) | 6592 for (Document* document : set) |
6595 fprintf(stderr, "- Document %p URL: %s\n", document, | 6593 fprintf(stderr, "- Document %p URL: %s\n", document, |
6596 document->url().getString().utf8().data()); | 6594 document->url().getString().utf8().data()); |
6597 } | 6595 } |
6598 #endif | 6596 #endif |
OLD | NEW |