| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 , m_baseBackgroundColor(Color::white) | 437 , m_baseBackgroundColor(Color::white) |
| 438 , m_backgroundColorOverride(Color::transparent) | 438 , m_backgroundColorOverride(Color::transparent) |
| 439 , m_zoomFactorOverride(0) | 439 , m_zoomFactorOverride(0) |
| 440 , m_userGestureObserved(false) | 440 , m_userGestureObserved(false) |
| 441 , m_shouldDispatchFirstVisuallyNonEmptyLayout(false) | 441 , m_shouldDispatchFirstVisuallyNonEmptyLayout(false) |
| 442 , m_shouldDispatchFirstLayoutAfterFinishedParsing(false) | 442 , m_shouldDispatchFirstLayoutAfterFinishedParsing(false) |
| 443 , m_shouldDispatchFirstLayoutAfterFinishedLoading(false) | 443 , m_shouldDispatchFirstLayoutAfterFinishedLoading(false) |
| 444 , m_displayMode(WebDisplayModeBrowser) | 444 , m_displayMode(WebDisplayModeBrowser) |
| 445 , m_elasticOverscroll(FloatSize()) | 445 , m_elasticOverscroll(FloatSize()) |
| 446 , m_scheduler(adoptPtr(Platform::current()->currentThread()->scheduler()->cr
eateWebViewScheduler(this).release())) | 446 , m_scheduler(adoptPtr(Platform::current()->currentThread()->scheduler()->cr
eateWebViewScheduler(this).release())) |
| 447 , m_lastFrameTimeMonotonic(0) |
| 447 { | 448 { |
| 448 Page::PageClients pageClients; | 449 Page::PageClients pageClients; |
| 449 pageClients.chromeClient = m_chromeClientImpl.get(); | 450 pageClients.chromeClient = m_chromeClientImpl.get(); |
| 450 pageClients.contextMenuClient = &m_contextMenuClientImpl; | 451 pageClients.contextMenuClient = &m_contextMenuClientImpl; |
| 451 pageClients.editorClient = &m_editorClientImpl; | 452 pageClients.editorClient = &m_editorClientImpl; |
| 452 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; | 453 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; |
| 453 | 454 |
| 454 m_page = Page::createOrdinary(pageClients); | 455 m_page = Page::createOrdinary(pageClients); |
| 455 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl); | 456 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl); |
| 456 provideSpeechRecognitionTo(*m_page, SpeechRecognitionClientProxy::create(cli
ent ? client->speechRecognizer() : nullptr)); | 457 provideSpeechRecognitionTo(*m_page, SpeechRecognitionClientProxy::create(cli
ent ? client->speechRecognizer() : nullptr)); |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 IntSize(), 0, PlatformEvent::NoModifiers, lastFlingSourceDevice
== WebGestureDeviceTouchpad ? PlatformGestureSourceTouchpad : PlatformGestureSou
rceTouchscreen); | 1953 IntSize(), 0, PlatformEvent::NoModifiers, lastFlingSourceDevice
== WebGestureDeviceTouchpad ? PlatformGestureSourceTouchpad : PlatformGestureSou
rceTouchscreen); |
| 1953 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0
, true, false, -1 /* null plugin id */); | 1954 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0
, true, false, -1 /* null plugin id */); |
| 1954 | 1955 |
| 1955 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); | 1956 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); |
| 1956 } | 1957 } |
| 1957 } | 1958 } |
| 1958 | 1959 |
| 1959 if (!mainFrameImpl()) | 1960 if (!mainFrameImpl()) |
| 1960 return; | 1961 return; |
| 1961 | 1962 |
| 1963 m_lastFrameTimeMonotonic = lastFrameTimeMonotonic; |
| 1964 |
| 1962 DocumentLifecycle::AllowThrottlingScope throttlingScope(mainFrameImpl()->fra
me()->document()->lifecycle()); | 1965 DocumentLifecycle::AllowThrottlingScope throttlingScope(mainFrameImpl()->fra
me()->document()->lifecycle()); |
| 1963 PageWidgetDelegate::animate(*m_page, lastFrameTimeMonotonic); | 1966 PageWidgetDelegate::animate(*m_page, lastFrameTimeMonotonic); |
| 1964 } | 1967 } |
| 1965 | 1968 |
| 1966 void WebViewImpl::updateAllLifecyclePhases() | 1969 void WebViewImpl::updateAllLifecyclePhases() |
| 1967 { | 1970 { |
| 1968 TRACE_EVENT0("blink", "WebViewImpl::updateAllLifecyclePhases"); | 1971 TRACE_EVENT0("blink", "WebViewImpl::updateAllLifecyclePhases"); |
| 1969 if (!mainFrameImpl()) | 1972 if (!mainFrameImpl()) |
| 1970 return; | 1973 return; |
| 1971 | 1974 |
| (...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4567 { | 4570 { |
| 4568 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4571 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4569 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4572 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4570 if (!page()) | 4573 if (!page()) |
| 4571 return 1; | 4574 return 1; |
| 4572 | 4575 |
| 4573 return page()->deviceScaleFactor(); | 4576 return page()->deviceScaleFactor(); |
| 4574 } | 4577 } |
| 4575 | 4578 |
| 4576 } // namespace blink | 4579 } // namespace blink |
| OLD | NEW |