Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / themes / browser_theme_pack.cc
index 9610340..fe2f645 100644 (file)
@@ -493,9 +493,9 @@ class ThemeImageSource: public gfx::ImageSkiaSource {
  public:
   explicit ThemeImageSource(const gfx::ImageSkia& source) : source_(source) {
   }
-  virtual ~ThemeImageSource() {}
+  ~ThemeImageSource() override {}
 
-  virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+  gfx::ImageSkiaRep GetImageForScale(float scale) override {
     if (source_.HasRepresentation(scale))
       return source_.GetRepresentation(scale);
     const gfx::ImageSkiaRep& rep_100p = source_.GetRepresentation(1.0f);
@@ -522,10 +522,10 @@ class ThemeImagePngSource : public gfx::ImageSkiaSource {
 
   explicit ThemeImagePngSource(const PngMap& png_map) : png_map_(png_map) {}
 
-  virtual ~ThemeImagePngSource() {}
+  ~ThemeImagePngSource() override {}
 
  private:
-  virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+  gfx::ImageSkiaRep GetImageForScale(float scale) override {
     ui::ScaleFactor scale_factor = ui::GetSupportedScaleFactor(scale);
     // Look up the bitmap for |scale factor| in the bitmap map. If found
     // return it.
@@ -611,11 +611,10 @@ class TabBackgroundImageSource: public gfx::CanvasImageSource {
         vertical_offset_(vertical_offset) {
   }
 
-  virtual ~TabBackgroundImageSource() {
-  }
+  ~TabBackgroundImageSource() override {}
 
   // Overridden from CanvasImageSource:
-  virtual void Draw(gfx::Canvas* canvas) OVERRIDE {
+  void Draw(gfx::Canvas* canvas) override {
     gfx::ImageSkia bg_tint =
         gfx::ImageSkiaOperations::CreateHSLShiftedImage(image_to_tint_,
             hsl_shift_);
@@ -997,6 +996,7 @@ void BrowserThemePack::BuildTintsFromJSON(
       if (tint_list->GetDouble(0, &hsl.h) &&
           tint_list->GetDouble(1, &hsl.s) &&
           tint_list->GetDouble(2, &hsl.l)) {
+        MakeHSLShiftValid(&hsl);
         int id = GetIntForString(iter.key(), kTintTable, kTintTableLength);
         if (id != -1) {
           temp_tints[id] = hsl;