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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumSkia.cpp

Issue 16357011: Remove support for -webkit-color-correction (which we've never supported on (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: resolve merge conflicts, obey brace style changes Created 7 years, 6 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 unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. 2 * Copyright (C) 2007 Apple Inc.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2008 Collabora Ltd. 4 * Copyright (C) 2008 Collabora Ltd.
5 * Copyright (C) 2008, 2009 Google Inc. 5 * Copyright (C) 2008, 2009 Google Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // Calculate cancel button's coordinates relative to the input element. 244 // Calculate cancel button's coordinates relative to the input element.
245 // Center the button vertically. Round up though, so if it has to be one pi xel off-center, it will 245 // Center the button vertically. Round up though, so if it has to be one pi xel off-center, it will
246 // be one pixel closer to the bottom of the field. This tends to look bette r with the text. 246 // be one pixel closer to the bottom of the field. This tends to look bette r with the text.
247 LayoutRect cancelButtonRect(cancelButtonObject->offsetFromAncestorContainer( inputRenderBox).width(), 247 LayoutRect cancelButtonRect(cancelButtonObject->offsetFromAncestorContainer( inputRenderBox).width(),
248 inputContentBox.y() + (inputContentBox.height() - cancelButtonSize + 1) / 2, 248 inputContentBox.y() + (inputContentBox.height() - cancelButtonSize + 1) / 2,
249 cancelButtonSize, cancelButtonSize); 249 cancelButtonSize, cancelButtonSize);
250 IntRect paintingRect = convertToPaintingRect(inputRenderBox, cancelButtonObj ect, cancelButtonRect, r); 250 IntRect paintingRect = convertToPaintingRect(inputRenderBox, cancelButtonObj ect, cancelButtonRect, r);
251 251
252 static Image* cancelImage = Image::loadPlatformResource("searchCancel").leak Ref(); 252 static Image* cancelImage = Image::loadPlatformResource("searchCancel").leak Ref();
253 static Image* cancelPressedImage = Image::loadPlatformResource("searchCancel Pressed").leakRef(); 253 static Image* cancelPressedImage = Image::loadPlatformResource("searchCancel Pressed").leakRef();
254 paintInfo.context->drawImage(isPressed(cancelButtonObject) ? cancelPressedIm age : cancelImage, 254 paintInfo.context->drawImage(isPressed(cancelButtonObject) ? cancelPressedIm age : cancelImage, paintingRect);
255 cancelButtonObject->style()->colorSpace(), pain tingRect);
256 return false; 255 return false;
257 } 256 }
258 257
259 void RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle(StyleResolver*, R enderStyle* style, Element*) const 258 void RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle(StyleResolver*, R enderStyle* style, Element*) const
260 { 259 {
261 IntSize emptySize(1, 11); 260 IntSize emptySize(1, 11);
262 style->setWidth(Length(emptySize.width(), Fixed)); 261 style->setWidth(Length(emptySize.width(), Fixed));
263 style->setHeight(Length(emptySize.height(), Fixed)); 262 style->setHeight(Length(emptySize.height(), Fixed));
264 } 263 }
265 264
(...skipping 21 matching lines...) Expand all
287 LayoutUnit magnifierSize = std::min(inputContentBox.width(), std::min<Layout Unit>(inputContentBox.height(), r.height())); 286 LayoutUnit magnifierSize = std::min(inputContentBox.width(), std::min<Layout Unit>(inputContentBox.height(), r.height()));
288 // Calculate decoration's coordinates relative to the input element. 287 // Calculate decoration's coordinates relative to the input element.
289 // Center the decoration vertically. Round up though, so if it has to be on e pixel off-center, it will 288 // Center the decoration vertically. Round up though, so if it has to be on e pixel off-center, it will
290 // be one pixel closer to the bottom of the field. This tends to look bette r with the text. 289 // be one pixel closer to the bottom of the field. This tends to look bette r with the text.
291 LayoutRect magnifierRect(magnifierObject->offsetFromAncestorContainer(inputR enderBox).width(), 290 LayoutRect magnifierRect(magnifierObject->offsetFromAncestorContainer(inputR enderBox).width(),
292 inputContentBox.y() + (inputContentBox.height() - m agnifierSize + 1) / 2, 291 inputContentBox.y() + (inputContentBox.height() - m agnifierSize + 1) / 2,
293 magnifierSize, magnifierSize); 292 magnifierSize, magnifierSize);
294 IntRect paintingRect = convertToPaintingRect(inputRenderBox, magnifierObject , magnifierRect, r); 293 IntRect paintingRect = convertToPaintingRect(inputRenderBox, magnifierObject , magnifierRect, r);
295 294
296 static Image* magnifierImage = Image::loadPlatformResource("searchMagnifier" ).leakRef(); 295 static Image* magnifierImage = Image::loadPlatformResource("searchMagnifier" ).leakRef();
297 paintInfo.context->drawImage(magnifierImage, magnifierObject->style()->color Space(), paintingRect); 296 paintInfo.context->drawImage(magnifierImage, paintingRect);
298 return false; 297 return false;
299 } 298 }
300 299
301 bool RenderThemeChromiumSkia::paintMediaSliderTrack(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) 300 bool RenderThemeChromiumSkia::paintMediaSliderTrack(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
302 { 301 {
303 return RenderMediaControlsChromium::paintMediaControlsPart(MediaSlider, obje ct, paintInfo, rect); 302 return RenderMediaControlsChromium::paintMediaControlsPart(MediaSlider, obje ct, paintInfo, rect);
304 } 303 }
305 304
306 bool RenderThemeChromiumSkia::paintMediaVolumeSliderTrack(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) 305 bool RenderThemeChromiumSkia::paintMediaVolumeSliderTrack(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
307 { 306 {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 } 483 }
485 484
486 RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope() 485 RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope()
487 { 486 {
488 if (!m_needsFlipping) 487 if (!m_needsFlipping)
489 return; 488 return;
490 m_paintInfo.context->restore(); 489 m_paintInfo.context->restore();
491 } 490 }
492 491
493 } // namespace WebCore 492 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698