| 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 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 void Document::processHttpEquivRefresh(const AtomicString& content) | 1767 void Document::processHttpEquivRefresh(const AtomicString& content) |
| 1768 { | 1768 { |
| 1769 maybeHandleHttpRefresh(content, HttpRefreshFromMetaTag); | 1769 maybeHandleHttpRefresh(content, HttpRefreshFromMetaTag); |
| 1770 } | 1770 } |
| 1771 | 1771 |
| 1772 void Document::maybeHandleHttpRefresh(const String& content, HttpRefreshType htt
pRefreshType) | 1772 void Document::maybeHandleHttpRefresh(const String& content, HttpRefreshType htt
pRefreshType) |
| 1773 { | 1773 { |
| 1774 // FIXME(sky): remove | 1774 // FIXME(sky): remove |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) | |
| 1778 { | |
| 1779 // The UA-defined min-width is used by the processing of legacy meta tags. | |
| 1780 if (!viewportDescription.isSpecifiedByAuthor()) | |
| 1781 m_viewportDefaultMinWidth = viewportDescription.minWidth; | |
| 1782 | |
| 1783 if (viewportDescription.isLegacyViewportType()) { | |
| 1784 if (settings() && !settings()->viewportMetaEnabled()) | |
| 1785 return; | |
| 1786 | |
| 1787 m_legacyViewportDescription = viewportDescription; | |
| 1788 | |
| 1789 // When no author style for @viewport is present, and a meta tag for def
ining | |
| 1790 // the viewport is, apply the meta tag viewport instead of the UA styles
. | |
| 1791 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) | |
| 1792 return; | |
| 1793 m_viewportDescription = viewportDescription; | |
| 1794 } else { | |
| 1795 // If the legacy viewport tag has higher priority than the cascaded @vie
wport | |
| 1796 // descriptors, use the values from the legacy tag. | |
| 1797 if (!shouldOverrideLegacyDescription(viewportDescription.type)) | |
| 1798 m_viewportDescription = m_legacyViewportDescription; | |
| 1799 else | |
| 1800 m_viewportDescription = viewportDescription; | |
| 1801 } | |
| 1802 | |
| 1803 updateViewportDescription(); | |
| 1804 } | |
| 1805 | |
| 1806 void Document::updateViewportDescription() | |
| 1807 { | |
| 1808 if (frame()) { | |
| 1809 frameHost()->chrome().dispatchViewportPropertiesDidChange(m_viewportDesc
ription); | |
| 1810 } | |
| 1811 } | |
| 1812 | |
| 1813 void Document::processReferrerPolicy(const String& policy) | 1777 void Document::processReferrerPolicy(const String& policy) |
| 1814 { | 1778 { |
| 1815 ASSERT(!policy.isNull()); | 1779 ASSERT(!policy.isNull()); |
| 1816 | 1780 |
| 1817 if (equalIgnoringCase(policy, "never")) { | 1781 if (equalIgnoringCase(policy, "never")) { |
| 1818 setReferrerPolicy(ReferrerPolicyNever); | 1782 setReferrerPolicy(ReferrerPolicyNever); |
| 1819 } else if (equalIgnoringCase(policy, "always")) { | 1783 } else if (equalIgnoringCase(policy, "always")) { |
| 1820 setReferrerPolicy(ReferrerPolicyAlways); | 1784 setReferrerPolicy(ReferrerPolicyAlways); |
| 1821 } else if (equalIgnoringCase(policy, "origin")) { | 1785 } else if (equalIgnoringCase(policy, "origin")) { |
| 1822 setReferrerPolicy(ReferrerPolicyOrigin); | 1786 setReferrerPolicy(ReferrerPolicyOrigin); |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3272 using namespace blink; | 3236 using namespace blink; |
| 3273 void showLiveDocumentInstances() | 3237 void showLiveDocumentInstances() |
| 3274 { | 3238 { |
| 3275 WeakDocumentSet& set = liveDocumentSet(); | 3239 WeakDocumentSet& set = liveDocumentSet(); |
| 3276 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 3240 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 3277 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 3241 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 3278 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 3242 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 3279 } | 3243 } |
| 3280 } | 3244 } |
| 3281 #endif | 3245 #endif |
| OLD | NEW |