| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 WebViewImpl* WebViewHelper::initialize(bool enableJavascript, TestWebFrameClient
* webFrameClient, WebViewClient* webViewClient, void (*updateSettingsFunc)(WebSe
ttings*)) | 265 WebViewImpl* WebViewHelper::initialize(bool enableJavascript, TestWebFrameClient
* webFrameClient, WebViewClient* webViewClient, void (*updateSettingsFunc)(WebSe
ttings*)) |
| 266 { | 266 { |
| 267 reset(); | 267 reset(); |
| 268 | 268 |
| 269 if (!webFrameClient) | 269 if (!webFrameClient) |
| 270 webFrameClient = defaultWebFrameClient(); | 270 webFrameClient = defaultWebFrameClient(); |
| 271 if (!webViewClient) | 271 if (!webViewClient) |
| 272 webViewClient = defaultWebViewClient(); | 272 webViewClient = defaultWebViewClient(); |
| 273 m_webView = WebViewImpl::create(webViewClient); | 273 m_webView = WebViewImpl::create(webViewClient); |
| 274 m_webView->settings()->setJavaScriptEnabled(enableJavascript); | 274 m_webView->settings()->setJavaScriptEnabled(enableJavascript); |
| 275 if (updateSettingsFunc) { | 275 if (updateSettingsFunc) |
| 276 updateSettingsFunc(m_webView->settings()); | 276 updateSettingsFunc(m_webView->settings()); |
| 277 } else { | 277 else |
| 278 m_webView->settings()->setDeviceSupportsMouse(false); | 278 m_webView->settings()->setDeviceSupportsMouse(false); |
| 279 m_webView->settings()->setForceCompositingMode(true); | |
| 280 } | |
| 281 | 279 |
| 282 m_webView->setMainFrame(WebLocalFrameImpl::create(webFrameClient)); | 280 m_webView->setMainFrame(WebLocalFrameImpl::create(webFrameClient)); |
| 283 | 281 |
| 284 return m_webView; | 282 return m_webView; |
| 285 } | 283 } |
| 286 | 284 |
| 287 WebViewImpl* WebViewHelper::initializeAndLoad(const std::string& url, bool enabl
eJavascript, TestWebFrameClient* webFrameClient, WebViewClient* webViewClient, v
oid (*updateSettingsFunc)(WebSettings*)) | 285 WebViewImpl* WebViewHelper::initializeAndLoad(const std::string& url, bool enabl
eJavascript, TestWebFrameClient* webFrameClient, WebViewClient* webViewClient, v
oid (*updateSettingsFunc)(WebSettings*)) |
| 288 { | 286 { |
| 289 initialize(enableJavascript, webFrameClient, webViewClient, updateSettingsFu
nc); | 287 initialize(enableJavascript, webFrameClient, webViewClient, updateSettingsFu
nc); |
| 290 | 288 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 330 } |
| 333 | 331 |
| 334 void TestWebViewClient::initializeLayerTreeView() | 332 void TestWebViewClient::initializeLayerTreeView() |
| 335 { | 333 { |
| 336 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); | 334 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); |
| 337 ASSERT(m_layerTreeView); | 335 ASSERT(m_layerTreeView); |
| 338 } | 336 } |
| 339 | 337 |
| 340 } // namespace FrameTestHelpers | 338 } // namespace FrameTestHelpers |
| 341 } // namespace blink | 339 } // namespace blink |
| OLD | NEW |