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

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, 3 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 4c60c7e24355f2e9960226707124cc234e13194b..f4b03f59c2086db479931012e068cb7d1b010e36 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,25 @@ 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 WebData& themeInputMultipleFieldsCssResource = Platform::current()->loadResource("themeInputMultipleFields.css");
+ String themeInputMultipleFieldsRules = themeInputMultipleFieldsCssResource.toASCIIString();
+ ASSERT(!themeInputMultipleFieldsRules.isEmpty());
+ otherDefaultStyleSheets = otherDefaultStyleSheets + themeInputMultipleFieldsRules;
#endif
- String(themeChromiumLinuxCss, sizeof(themeChromiumLinuxCss));
+ const WebData& themeChromiumLinuxCssResource = Platform::current()->loadResource("themeChromiumLinux.css");
+ String themeChromiumLinuxRules = themeChromiumLinuxCssResource.toASCIIString();
+ ASSERT(!themeChromiumLinuxRules.isEmpty());
+ otherDefaultStyleSheets = otherDefaultStyleSheets + themeChromiumLinuxRules;
#else
- return RenderThemeChromiumSkia::extraDefaultStyleSheet() +
- String(themeInputMultipleFieldsCss, sizeof(themeInputMultipleFieldsCss));
+ const WebData& themeInputMultipleFieldsCssResource = Platform::current()->loadResource("themeInputMultipleFields.css");
+ String themeInputMultipleFieldsRules = themeInputMultipleFieldsCssResource.toASCIIString();
+ ASSERT(!themeInputMultipleFieldsRules.isEmpty());
+ otherDefaultStyleSheets = otherDefaultStyleSheets + themeInputMultipleFieldsRules;
#endif
+ return RenderThemeChromiumSkia::extraDefaultStyleSheet() + otherDefaultStyleSheets;
}
Color RenderThemeChromiumDefault::activeListBoxSelectionBackgroundColor() const

Powered by Google App Engine
This is Rietveld 408576698