mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 088f14a0 (#373530)
- Building on Windows now requires the Windows 10.0.10586 SDK. - Remove CefParseCSSColor which was implemented using Blink code in the browser process. This is longer advisable now that the Oilpan GC is enabled. - Avoid potential renderer process crashes by disabling script actions on the CefV8Context passed to CefRenderProcessHandler::OnContextReleased.
This commit is contained in:
@@ -14,6 +14,27 @@ namespace {
|
||||
// The default URL to load in a browser window.
|
||||
const char kDefaultUrl[] = "http://www.google.com";
|
||||
|
||||
// Returns the ARGB value for |color|.
|
||||
cef_color_t ParseColor(const std::string& color) {
|
||||
std::string colorToLower;
|
||||
colorToLower.resize(color.size());
|
||||
std::transform(color.begin(), color.end(), colorToLower.begin(), ::tolower);
|
||||
|
||||
if (colorToLower == "black")
|
||||
return CefColorSetARGB(255, 0, 0, 0);
|
||||
else if (colorToLower == "blue")
|
||||
return CefColorSetARGB(255, 0, 0, 255);
|
||||
else if (colorToLower == "green")
|
||||
return CefColorSetARGB(255, 0, 255, 0);
|
||||
else if (colorToLower == "red")
|
||||
return CefColorSetARGB(255, 255, 0, 0);
|
||||
else if (colorToLower == "white")
|
||||
return CefColorSetARGB(255, 255, 255, 255);
|
||||
|
||||
// Use the default color.
|
||||
return 0U;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
|
||||
@@ -33,8 +54,8 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
|
||||
|
||||
if (command_line_->HasSwitch(switches::kBackgroundColor)) {
|
||||
// Parse the background color value.
|
||||
CefParseCSSColor(command_line_->GetSwitchValue(switches::kBackgroundColor),
|
||||
false, background_color_);
|
||||
background_color_ =
|
||||
ParseColor(command_line_->GetSwitchValue(switches::kBackgroundColor));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user