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

Unified Diff: Source/core/rendering/RenderThemeChromiumDefault.cpp

Issue 438843004: Move the user agent styles sheets to blink_resources.grd (Part 3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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: Source/core/rendering/RenderThemeChromiumDefault.cpp
diff --git a/Source/core/rendering/RenderThemeChromiumDefault.cpp b/Source/core/rendering/RenderThemeChromiumDefault.cpp
index eb88f0064ddba03f78823faca9dcfc01284cadaa..66e4d8dadc50d6bc6887830a6473c457ffec13f7 100644
--- a/Source/core/rendering/RenderThemeChromiumDefault.cpp
+++ b/Source/core/rendering/RenderThemeChromiumDefault.cpp
@@ -26,7 +26,6 @@
#include "core/rendering/RenderThemeChromiumDefault.h"
#include "core/CSSValueKeywords.h"
-#include "core/UserAgentStyleSheets.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderProgress.h"
@@ -35,6 +34,7 @@
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebData.h"
#include "public/platform/WebRect.h"
#include "public/platform/WebThemeEngine.h"
#include "wtf/StdLibExtras.h"
@@ -130,16 +130,20 @@ String RenderThemeChromiumDefault::extraDefaultStyleSheet()
// FIXME: We should not have OS() branches here.
// We should have something like RenderThemeWin, RenderThemeLinux, or
// should concatenate UA stylesheets on build time.
+ String otherDefaultStyleSheets;
#if !OS(WIN)
- return RenderThemeChromiumSkia::extraDefaultStyleSheet() +
#if !OS(ANDROID)
- String(themeInputMultipleFieldsCss, sizeof(themeInputMultipleFieldsCss)) +
+ const blink::WebData& themeInputMultipleFieldsCssResource = blink::Platform::current()->loadResource("themeInputMultipleFields.css");
+ otherDefaultStyleSheets = otherDefaultStyleSheets + String(themeInputMultipleFieldsCssResource.data(), themeInputMultipleFieldsCssResource.size());
#endif
- String(themeChromiumLinuxCss, sizeof(themeChromiumLinuxCss));
+ const blink::WebData& themeChromiumLinuxCssResource = blink::Platform::current()->loadResource("themeChromiumLinux.css");
+ otherDefaultStyleSheets = otherDefaultStyleSheets + String(themeChromiumLinuxCssResource.data(), themeChromiumLinuxCssResource.size());
#else
- return RenderThemeChromiumSkia::extraDefaultStyleSheet() +
- String(themeInputMultipleFieldsCss, sizeof(themeInputMultipleFieldsCss));
+ const blink::WebData& themeInputMultipleFieldsCssResource = blink::Platform::current()->loadResource("themeInputMultipleFields.css");
+ otherDefaultStyleSheets = otherDefaultStyleSheets + String(themeInputMultipleFieldsCssResource.data(), themeInputMultipleFieldsCssResource.size());
#endif
+
+ return RenderThemeChromiumSkia::extraDefaultStyleSheet() + otherDefaultStyleSheets;
}
bool RenderThemeChromiumDefault::controlSupportsTints(const RenderObject* o) const

Powered by Google App Engine
This is Rietveld 408576698