OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. | 2 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 , m_hasAuthorStyle(false) | 53 , m_hasAuthorStyle(false) |
54 { | 54 { |
55 ASSERT(m_document); | 55 ASSERT(m_document); |
56 } | 56 } |
57 | 57 |
58 void ViewportStyleResolver::collectViewportRules() | 58 void ViewportStyleResolver::collectViewportRules() |
59 { | 59 { |
60 CSSDefaultStyleSheets& defaultStyleSheets = CSSDefaultStyleSheets::instance(
); | 60 CSSDefaultStyleSheets& defaultStyleSheets = CSSDefaultStyleSheets::instance(
); |
61 collectViewportRules(defaultStyleSheets.defaultStyle(), UserAgentOrigin); | 61 collectViewportRules(defaultStyleSheets.defaultStyle(), UserAgentOrigin); |
62 | 62 |
63 bool useMobileViewportStyle = m_document->settings() && m_document->settings
()->useMobileViewportStyle(); | 63 if (m_document->settings() && m_document->settings()->useMobileViewportStyle
()) |
64 #if OS(ANDROID) | |
65 // FIXME: Remove when useMobileViewportStyle is set from chromium. | |
66 useMobileViewportStyle = true; | |
67 #endif | |
68 if (useMobileViewportStyle) | |
69 collectViewportRules(defaultStyleSheets.defaultMobileViewportStyle(), Us
erAgentOrigin); | 64 collectViewportRules(defaultStyleSheets.defaultMobileViewportStyle(), Us
erAgentOrigin); |
70 | 65 |
71 if (m_document->isMobileDocument()) | 66 if (m_document->isMobileDocument()) |
72 collectViewportRules(defaultStyleSheets.defaultXHTMLMobileProfileStyle()
, UserAgentOrigin); | 67 collectViewportRules(defaultStyleSheets.defaultXHTMLMobileProfileStyle()
, UserAgentOrigin); |
73 | 68 |
74 if (ScopedStyleResolver* scopedResolver = m_document->scopedStyleResolver()) | 69 if (ScopedStyleResolver* scopedResolver = m_document->scopedStyleResolver()) |
75 scopedResolver->collectViewportRulesTo(this); | 70 scopedResolver->collectViewportRulesTo(this); |
76 | 71 |
77 resolve(); | 72 resolve(); |
78 } | 73 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 return result; | 221 return result; |
227 } | 222 } |
228 | 223 |
229 DEFINE_TRACE(ViewportStyleResolver) | 224 DEFINE_TRACE(ViewportStyleResolver) |
230 { | 225 { |
231 visitor->trace(m_propertySet); | 226 visitor->trace(m_propertySet); |
232 visitor->trace(m_document); | 227 visitor->trace(m_document); |
233 } | 228 } |
234 | 229 |
235 } // namespace blink | 230 } // namespace blink |
OLD | NEW |