Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 2570733002: [Devtools] Fixed devtools altering srcset image after close (Closed)
Patch Set: added test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index e3f8ce90e4eae1afe9e86c579be5acb22e2634b8..3f45ff0f59a27a6dfb61fb7e472b3d296f35c6f2 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -4,6 +4,7 @@
#include "web/DevToolsEmulator.h"
+#include "core/fetch/MemoryCache.h"
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
@@ -200,7 +201,7 @@ void DevToolsEmulator::enableDeviceEmulation(
m_emulationParams.scale == params.scale) {
return;
}
-
+ memoryCache()->evictResources();
dgozman 2016/12/13 20:56:11 Let's only do this when necessary, e.g. deviceScal
allada 2016/12/14 19:50:47 Done. I moved it into blink instead.
m_emulationParams = params;
if (!m_deviceMetricsEnabled) {
@@ -234,7 +235,7 @@ void DevToolsEmulator::enableDeviceEmulation(
void DevToolsEmulator::disableDeviceEmulation() {
if (!m_deviceMetricsEnabled)
return;
-
+ memoryCache()->evictResources();
m_deviceMetricsEnabled = false;
m_webViewImpl->setBackgroundColorOverride(Color::transparent);
m_webViewImpl->page()->settings().setDeviceScaleAdjustment(

Powered by Google App Engine
This is Rietveld 408576698