Chromium Code Reviews| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 #include "core/editing/Editor.h" | 42 #include "core/editing/Editor.h" |
| 43 #include "core/editing/FrameSelection.h" | 43 #include "core/editing/FrameSelection.h" |
| 44 #include "core/editing/InputMethodController.h" | 44 #include "core/editing/InputMethodController.h" |
| 45 #include "core/editing/iterators/TextIterator.h" | 45 #include "core/editing/iterators/TextIterator.h" |
| 46 #include "core/editing/markers/DocumentMarkerController.h" | 46 #include "core/editing/markers/DocumentMarkerController.h" |
| 47 #include "core/editing/serializers/HTMLInterchange.h" | 47 #include "core/editing/serializers/HTMLInterchange.h" |
| 48 #include "core/editing/serializers/Serialization.h" | 48 #include "core/editing/serializers/Serialization.h" |
| 49 #include "core/events/KeyboardEvent.h" | 49 #include "core/events/KeyboardEvent.h" |
| 50 #include "core/events/UIEventWithKeyState.h" | 50 #include "core/events/UIEventWithKeyState.h" |
| 51 #include "core/events/WheelEvent.h" | 51 #include "core/events/WheelEvent.h" |
| 52 #include "core/fetch/MemoryCache.h" | |
| 52 #include "core/fetch/UniqueIdentifier.h" | 53 #include "core/fetch/UniqueIdentifier.h" |
| 53 #include "core/frame/BrowserControls.h" | 54 #include "core/frame/BrowserControls.h" |
| 54 #include "core/frame/EventHandlerRegistry.h" | 55 #include "core/frame/EventHandlerRegistry.h" |
| 55 #include "core/frame/FrameHost.h" | 56 #include "core/frame/FrameHost.h" |
| 56 #include "core/frame/FrameView.h" | 57 #include "core/frame/FrameView.h" |
| 57 #include "core/frame/LocalFrame.h" | 58 #include "core/frame/LocalFrame.h" |
| 58 #include "core/frame/PageScaleConstraintsSet.h" | 59 #include "core/frame/PageScaleConstraintsSet.h" |
| 59 #include "core/frame/RemoteFrame.h" | 60 #include "core/frame/RemoteFrame.h" |
| 60 #include "core/frame/Settings.h" | 61 #include "core/frame/Settings.h" |
| 61 #include "core/frame/SmartClip.h" | 62 #include "core/frame/SmartClip.h" |
| (...skipping 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3448 } | 3449 } |
| 3449 | 3450 |
| 3450 unsigned long WebViewImpl::createUniqueIdentifierForRequest() { | 3451 unsigned long WebViewImpl::createUniqueIdentifierForRequest() { |
| 3451 return createUniqueIdentifier(); | 3452 return createUniqueIdentifier(); |
| 3452 } | 3453 } |
| 3453 | 3454 |
| 3454 void WebViewImpl::setCompositorDeviceScaleFactorOverride( | 3455 void WebViewImpl::setCompositorDeviceScaleFactorOverride( |
| 3455 float deviceScaleFactor) { | 3456 float deviceScaleFactor) { |
| 3456 if (m_compositorDeviceScaleFactorOverride == deviceScaleFactor) | 3457 if (m_compositorDeviceScaleFactorOverride == deviceScaleFactor) |
| 3457 return; | 3458 return; |
| 3459 memoryCache()->evictResources(); | |
|
dgozman
2016/12/14 20:05:39
This is a strange place for evicting from memory c
| |
| 3458 m_compositorDeviceScaleFactorOverride = deviceScaleFactor; | 3460 m_compositorDeviceScaleFactorOverride = deviceScaleFactor; |
| 3459 if (m_zoomFactorForDeviceScaleFactor) { | 3461 if (m_zoomFactorForDeviceScaleFactor) { |
| 3460 setZoomLevel(zoomLevel()); | 3462 setZoomLevel(zoomLevel()); |
| 3461 return; | 3463 return; |
| 3462 } | 3464 } |
| 3463 if (page() && m_layerTreeView) | 3465 if (page() && m_layerTreeView) |
| 3464 updateLayerTreeDeviceScaleFactor(); | 3466 updateLayerTreeDeviceScaleFactor(); |
| 3465 } | 3467 } |
| 3466 | 3468 |
| 3467 void WebViewImpl::setDeviceEmulationTransform( | 3469 void WebViewImpl::setDeviceEmulationTransform( |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4214 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4216 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4215 return nullptr; | 4217 return nullptr; |
| 4216 return focusedFrame; | 4218 return focusedFrame; |
| 4217 } | 4219 } |
| 4218 | 4220 |
| 4219 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4221 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4220 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4222 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4221 } | 4223 } |
| 4222 | 4224 |
| 4223 } // namespace blink | 4225 } // namespace blink |
| OLD | NEW |