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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 1690493002: Switch to LayoutThemeMobile when emulating mobile device in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed the flag Created 4 years, 10 months 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/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 89a762a575958b1e46e6cc459ae1baed7f3f3a6e..18dbc6ae417865f81223ec0697862d17c37aeb70 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -83,6 +83,18 @@ PassRefPtr<ComputedStyle> ComputedStyle::createInitialStyle()
return adoptRef(new ComputedStyle(InitialStyle));
}
+void ComputedStyle::clearInitialStyle()
+{
+ ComputedStyle** pointer = initialStylePointer();
+ if (!*pointer)
+ return;
+ RefPtr<ComputedStyle> holder = adoptRef(*pointer);
+ {
+ LEAK_SANITIZER_DISABLED_SCOPE;
+ *pointer = createInitialStyle().leakRef();
+ }
+}
+
PassRefPtr<ComputedStyle> ComputedStyle::createAnonymousStyleWithDisplay(const ComputedStyle& parentStyle, EDisplay display)
{
RefPtr<ComputedStyle> newStyle = ComputedStyle::create();

Powered by Google App Engine
This is Rietveld 408576698