OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 #include "core/rendering/RenderLayerCompositor.h" | 158 #include "core/rendering/RenderLayerCompositor.h" |
159 #include "core/rendering/RenderView.h" | 159 #include "core/rendering/RenderView.h" |
160 #include "core/rendering/RenderWidget.h" | 160 #include "core/rendering/RenderWidget.h" |
161 #include "core/rendering/TextAutosizer.h" | 161 #include "core/rendering/TextAutosizer.h" |
162 #include "modules/geolocation/GeolocationController.h" | 162 #include "modules/geolocation/GeolocationController.h" |
163 #include "weborigin/SchemeRegistry.h" | 163 #include "weborigin/SchemeRegistry.h" |
164 #include "weborigin/SecurityOrigin.h" | 164 #include "weborigin/SecurityOrigin.h" |
165 #include "weborigin/SecurityPolicy.h" | 165 #include "weborigin/SecurityPolicy.h" |
166 #include "painting/ContinuousPainter.h" | 166 #include "painting/ContinuousPainter.h" |
167 | 167 |
168 #if ENABLE(DEFAULT_RENDER_THEME) | 168 #if USE(DEFAULT_RENDER_THEME) |
169 #include "core/platform/chromium/PlatformThemeChromiumDefault.h" | 169 #include "core/platform/chromium/PlatformThemeChromiumDefault.h" |
170 #include "core/rendering/RenderThemeChromiumDefault.h" | 170 #include "core/rendering/RenderThemeChromiumDefault.h" |
171 #endif | 171 #endif |
172 | 172 |
173 #if OS(WIN) | 173 #if OS(WIN) |
174 #if !ENABLE(DEFAULT_RENDER_THEME) | 174 #if !USE(DEFAULT_RENDER_THEME) |
175 #include "core/rendering/RenderThemeChromiumWin.h" | 175 #include "core/rendering/RenderThemeChromiumWin.h" |
176 #endif | 176 #endif |
177 #else | 177 #else |
178 #include "core/rendering/RenderTheme.h" | 178 #include "core/rendering/RenderTheme.h" |
179 #endif | 179 #endif |
180 | 180 |
181 // Get rid of WTF's pow define so we can use std::pow. | 181 // Get rid of WTF's pow define so we can use std::pow. |
182 #undef pow | 182 #undef pow |
183 #include <cmath> // for std::pow | 183 #include <cmath> // for std::pow |
184 | 184 |
(...skipping 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3593 } | 3593 } |
3594 | 3594 |
3595 void WebViewImpl::setWindowFeatures(const WebWindowFeatures& features) | 3595 void WebViewImpl::setWindowFeatures(const WebWindowFeatures& features) |
3596 { | 3596 { |
3597 m_page->chrome().setWindowFeatures(features); | 3597 m_page->chrome().setWindowFeatures(features); |
3598 } | 3598 } |
3599 | 3599 |
3600 void WebViewImpl::setScrollbarColors(unsigned inactiveColor, | 3600 void WebViewImpl::setScrollbarColors(unsigned inactiveColor, |
3601 unsigned activeColor, | 3601 unsigned activeColor, |
3602 unsigned trackColor) { | 3602 unsigned trackColor) { |
3603 #if ENABLE(DEFAULT_RENDER_THEME) | 3603 #if USE(DEFAULT_RENDER_THEME) |
3604 PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor,
trackColor); | 3604 PlatformThemeChromiumDefault::setScrollbarColors(inactiveColor, activeColor,
trackColor); |
3605 #endif | 3605 #endif |
3606 } | 3606 } |
3607 | 3607 |
3608 void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, | 3608 void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, |
3609 unsigned activeForegroundColor, | 3609 unsigned activeForegroundColor, |
3610 unsigned inactiveBackgroundColor, | 3610 unsigned inactiveBackgroundColor, |
3611 unsigned inactiveForegroundColor) { | 3611 unsigned inactiveForegroundColor) { |
3612 #if ENABLE(DEFAULT_RENDER_THEME) | 3612 #if USE(DEFAULT_RENDER_THEME) |
3613 RenderThemeChromiumDefault::setSelectionColors(activeBackgroundColor, active
ForegroundColor, inactiveBackgroundColor, inactiveForegroundColor); | 3613 RenderThemeChromiumDefault::setSelectionColors(activeBackgroundColor, active
ForegroundColor, inactiveBackgroundColor, inactiveForegroundColor); |
3614 RenderTheme::theme().platformColorsDidChange(); | 3614 RenderTheme::theme().platformColorsDidChange(); |
3615 #endif | 3615 #endif |
3616 } | 3616 } |
3617 | 3617 |
3618 void WebView::addUserStyleSheet(const WebString& sourceCode, | 3618 void WebView::addUserStyleSheet(const WebString& sourceCode, |
3619 const WebVector<WebString>& patternsIn, | 3619 const WebVector<WebString>& patternsIn, |
3620 WebView::UserContentInjectIn injectIn, | 3620 WebView::UserContentInjectIn injectIn, |
3621 WebView::UserStyleInjectionTime injectionTime) | 3621 WebView::UserStyleInjectionTime injectionTime) |
3622 { | 3622 { |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4158 // the initial viewport width. | 4158 // the initial viewport width. |
4159 // 2. The author has disabled viewport zoom. | 4159 // 2. The author has disabled viewport zoom. |
4160 | 4160 |
4161 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4161 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4162 | 4162 |
4163 return fixedLayoutSize().width == m_size.width | 4163 return fixedLayoutSize().width == m_size.width |
4164 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4164 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4165 } | 4165 } |
4166 | 4166 |
4167 } // namespace WebKit | 4167 } // namespace WebKit |
OLD | NEW |