Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/WebKit/Source/core/dom/ViewportDescription.h

Issue 2443753002: Count presence of viewport tag as mobile-friendly
Patch Set: default false Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
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) 2012-2013 Intel Corporation. All rights reserved. 10 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 bool operator!=(const ViewportDescription& other) const { 117 bool operator!=(const ViewportDescription& other) const {
118 return !(*this == other); 118 return !(*this == other);
119 } 119 }
120 120
121 bool isLegacyViewportType() const { 121 bool isLegacyViewportType() const {
122 return type >= HandheldFriendlyMeta && type <= ViewportMeta; 122 return type >= HandheldFriendlyMeta && type <= ViewportMeta;
123 } 123 }
124 bool isMetaViewportType() const { return type == ViewportMeta; } 124 bool isMetaViewportType() const { return type == ViewportMeta; }
125 bool isSpecifiedByAuthor() const { return type != UserAgentStyleSheet; } 125 bool isSpecifiedByAuthor() const { return type != UserAgentStyleSheet; }
126 bool matchesHeuristicsForGpuRasterization() const;
127 126
128 // Reports UMA stat on whether the page is considered mobile or desktop and 127 // Reports UMA stat on whether the page is considered mobile or desktop and
129 // what kind of mobile it is. Applies only to Android, must only be called 128 // what kind of mobile it is. Applies only to Android, must only be called
130 // once per page load. 129 // once per page load.
131 void reportMobilePageStats(const LocalFrame*) const; 130 void reportMobilePageStats(const LocalFrame*) const;
132 131
133 private: 132 private:
134 enum Direction { Horizontal, Vertical }; 133 enum Direction { Horizontal, Vertical };
135 static float resolveViewportLength(const Length&, 134 static float resolveViewportLength(const Length&,
136 const FloatSize& initialViewportSize, 135 const FloatSize& initialViewportSize,
137 Direction); 136 Direction);
138 }; 137 };
139 138
140 } // namespace blink 139 } // namespace blink
141 140
142 #endif // ViewportDescription_h 141 #endif // ViewportDescription_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698