Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ | 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ |
| 4 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 4 * Copyright (C) 2010 Google Inc. All Rights Reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 530 return; | 530 return; |
| 531 } | 531 } |
| 532 if (match(tagImpl, htmlTag) && token.getAttributeItem(manifestAttr)) { | 532 if (match(tagImpl, htmlTag) && token.getAttributeItem(manifestAttr)) { |
| 533 m_isAppCacheEnabled = true; | 533 m_isAppCacheEnabled = true; |
| 534 return; | 534 return; |
| 535 } | 535 } |
| 536 if (match(tagImpl, metaTag)) { | 536 if (match(tagImpl, metaTag)) { |
| 537 const typename Token::Attribute* equivAttribute = token.getAttribute Item(http_equivAttr); | 537 const typename Token::Attribute* equivAttribute = token.getAttribute Item(http_equivAttr); |
| 538 if (equivAttribute) { | 538 if (equivAttribute) { |
| 539 String equivAttributeValue(equivAttribute->value); | 539 String equivAttributeValue(equivAttribute->value); |
| 540 if (equalIgnoringCase(equivAttributeValue, "content-security-pol icy")) | 540 if (equalIgnoringCase(equivAttributeValue, "content-security-pol icy")) { |
| 541 m_isCSPEnabled = true; | 541 m_isCSPEnabled = true; |
| 542 else if (equalIgnoringCase(equivAttributeValue, "accept-ch")) | 542 } else if (equalIgnoringCase(equivAttributeValue, "accept-ch")) { |
| 543 handleAcceptClientHintsHeader(equivAttributeValue, m_clientH intsPreferences, nullptr); | 543 const typename Token::Attribute* contentAttribute = token.ge tAttributeItem(contentAttr); |
| 544 if (contentAttribute) | |
| 545 handleAcceptClientHintsHeader(String(contentAttribute->v alue), m_clientHintsPreferences, nullptr); | |
|
Mike West
2015/06/19 12:16:07
Heh. Your reviewer should totally have caught that
| |
| 546 } | |
| 544 return; | 547 return; |
| 545 } | 548 } |
| 546 const typename Token::Attribute* nameAttribute = token.getAttributeI tem(nameAttr); | 549 const typename Token::Attribute* nameAttribute = token.getAttributeI tem(nameAttr); |
| 547 if (nameAttribute && equalIgnoringCase(String(nameAttribute->value), "viewport")) { | 550 if (nameAttribute && equalIgnoringCase(String(nameAttribute->value), "viewport")) { |
| 548 const typename Token::Attribute* contentAttribute = token.getAtt ributeItem(contentAttr); | 551 const typename Token::Attribute* contentAttribute = token.getAtt ributeItem(contentAttr); |
| 549 if (contentAttribute) | 552 if (contentAttribute) |
| 550 handleMetaViewport(String(contentAttribute->value), m_docume ntParameters.get()); | 553 handleMetaViewport(String(contentAttribute->value), m_docume ntParameters.get()); |
| 551 return; | 554 return; |
| 552 } | 555 } |
| 553 } | 556 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 628 mediaValues = givenMediaValues; | 631 mediaValues = givenMediaValues; |
| 629 else | 632 else |
| 630 mediaValues = MediaValuesCached::create(*document); | 633 mediaValues = MediaValuesCached::create(*document); |
| 631 ASSERT(mediaValues->isSafeToSendToAnotherThread()); | 634 ASSERT(mediaValues->isSafeToSendToAnotherThread()); |
| 632 defaultViewportMinWidth = document->viewportDefaultMinWidth(); | 635 defaultViewportMinWidth = document->viewportDefaultMinWidth(); |
| 633 viewportMetaZeroValuesQuirk = document->settings() && document->settings()-> viewportMetaZeroValuesQuirk(); | 636 viewportMetaZeroValuesQuirk = document->settings() && document->settings()-> viewportMetaZeroValuesQuirk(); |
| 634 viewportMetaEnabled = document->settings() && document->settings()->viewport MetaEnabled(); | 637 viewportMetaEnabled = document->settings() && document->settings()->viewport MetaEnabled(); |
| 635 } | 638 } |
| 636 | 639 |
| 637 } | 640 } |
| OLD | NEW |