Chromium Code Reviews| 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 (HTMLElement* child = |
|
tkent
2016/12/09 06:07:25
Do you need nested-|for|s? Why don't you do someth
lpy
2016/12/09 08:43:43
Done.
| |
| 5401 head() ? Traversal<HTMLMetaElement>::firstChild(*head()) : 0; | 5401 documentElement() |
| 5402 metaElement; | 5402 ? Traversal<HTMLElement>::firstChild(*documentElement()) |
| 5403 metaElement = Traversal<HTMLMetaElement>::nextSibling(*metaElement)) { | 5403 : 0; |
| 5404 Color color = Color::transparent; | 5404 child; child = Traversal<HTMLElement>::nextSibling(*child)) { |
| 5405 if (equalIgnoringCase(metaElement->name(), "theme-color") && | 5405 for (HTMLMetaElement* metaElement = |
| 5406 CSSParser::parseColor( | 5406 Traversal<HTMLMetaElement>::firstChild(*child); |
| 5407 color, metaElement->content().getString().stripWhiteSpace(), true)) | 5407 metaElement; |
| 5408 return color; | 5408 metaElement = Traversal<HTMLMetaElement>::nextSibling(*metaElement)) { |
| 5409 Color color = Color::transparent; | |
| 5410 if (equalIgnoringCase(metaElement->name(), "theme-color") && | |
| 5411 CSSParser::parseColor( | |
| 5412 color, metaElement->content().getString().stripWhiteSpace(), | |
| 5413 true)) | |
| 5414 return color; | |
| 5415 } | |
| 5409 } | 5416 } |
| 5410 return Color(); | 5417 return Color(); |
| 5411 } | 5418 } |
| 5412 | 5419 |
| 5413 HTMLLinkElement* Document::linkManifest() const { | 5420 HTMLLinkElement* Document::linkManifest() const { |
| 5414 HTMLHeadElement* head = this->head(); | 5421 HTMLHeadElement* head = this->head(); |
| 5415 if (!head) | 5422 if (!head) |
| 5416 return 0; | 5423 return 0; |
| 5417 | 5424 |
| 5418 // The first link element with a manifest rel must be used. Others are | 5425 // The first link element with a manifest rel must be used. Others are |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6589 } | 6596 } |
| 6590 | 6597 |
| 6591 void showLiveDocumentInstances() { | 6598 void showLiveDocumentInstances() { |
| 6592 WeakDocumentSet& set = liveDocumentSet(); | 6599 WeakDocumentSet& set = liveDocumentSet(); |
| 6593 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6600 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6594 for (Document* document : set) | 6601 for (Document* document : set) |
| 6595 fprintf(stderr, "- Document %p URL: %s\n", document, | 6602 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6596 document->url().getString().utf8().data()); | 6603 document->url().getString().utf8().data()); |
| 6597 } | 6604 } |
| 6598 #endif | 6605 #endif |
| OLD | NEW |