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 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3039 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; | 3039 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; |
3040 } | 3040 } |
3041 | 3041 |
3042 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) | 3042 void Document::setViewportDescription(const ViewportDescription& viewportDescrip
tion) |
3043 { | 3043 { |
3044 // The UA-defined min-width is used by the processing of legacy meta tags. | 3044 // The UA-defined min-width is used by the processing of legacy meta tags. |
3045 if (!viewportDescription.isSpecifiedByAuthor()) | 3045 if (!viewportDescription.isSpecifiedByAuthor()) |
3046 m_viewportDefaultMinWidth = viewportDescription.minWidth; | 3046 m_viewportDefaultMinWidth = viewportDescription.minWidth; |
3047 | 3047 |
3048 if (viewportDescription.isLegacyViewportType()) { | 3048 if (viewportDescription.isLegacyViewportType()) { |
3049 if (settings() && !settings()->viewportMetaEnabled()) | |
3050 return; | |
3051 | |
3052 m_legacyViewportDescription = viewportDescription; | 3049 m_legacyViewportDescription = viewportDescription; |
3053 | 3050 |
3054 // When no author style for @viewport is present, and a meta tag for def
ining | 3051 // When no author style for @viewport is present, and a meta tag for def
ining |
3055 // the viewport is, apply the meta tag viewport instead of the UA styles
. | 3052 // the viewport is, apply the meta tag viewport instead of the UA styles
. |
3056 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) | 3053 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) |
3057 return; | 3054 return; |
3058 m_viewportDescription = viewportDescription; | 3055 m_viewportDescription = viewportDescription; |
3059 } else { | 3056 } else { |
3060 // If the legacy viewport tag has higher priority than the cascaded @vie
wport | 3057 // If the legacy viewport tag has higher priority than the cascaded @vie
wport |
3061 // descriptors, use the values from the legacy tag. | 3058 // descriptors, use the values from the legacy tag. |
(...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5741 #ifndef NDEBUG | 5738 #ifndef NDEBUG |
5742 using namespace blink; | 5739 using namespace blink; |
5743 void showLiveDocumentInstances() | 5740 void showLiveDocumentInstances() |
5744 { | 5741 { |
5745 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5742 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5746 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5743 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5747 for (Document* document : set) | 5744 for (Document* document : set) |
5748 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5745 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5749 } | 5746 } |
5750 #endif | 5747 #endif |
OLD | NEW |