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

Side by Side Diff: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp

Issue 1690493002: Switch to LayoutThemeMobile when emulating mobile device in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Invalidate tapHighlightColor only Created 4 years, 9 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
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 * Copyright (C) 2009 Kenneth Rohde Christiansen 6 * Copyright (C) 2009 Kenneth Rohde Christiansen
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Move the rect into partLayoutObject's coords. 126 // Move the rect into partLayoutObject's coords.
127 partRect.move(offsetFromInputLayoutObject); 127 partRect.move(offsetFromInputLayoutObject);
128 // Account for the local drawing offset. 128 // Account for the local drawing offset.
129 partRect.move(localOffset.x(), localOffset.y()); 129 partRect.move(localOffset.x(), localOffset.y());
130 130
131 return pixelSnappedIntRect(partRect); 131 return pixelSnappedIntRect(partRect);
132 } 132 }
133 133
134 } // namespace 134 } // namespace
135 135
136 ThemePainterDefault::ThemePainterDefault()
137 : ThemePainter(nullptr)
138 {
139 }
140
136 bool ThemePainterDefault::paintCheckbox(const LayoutObject& o, const PaintInfo& i, const IntRect& rect) 141 bool ThemePainterDefault::paintCheckbox(const LayoutObject& o, const PaintInfo& i, const IntRect& rect)
137 { 142 {
138 WebThemeEngine::ExtraParams extraParams; 143 WebThemeEngine::ExtraParams extraParams;
139 WebCanvas* canvas = i.context.canvas(); 144 WebCanvas* canvas = i.context.canvas();
140 extraParams.button.checked = LayoutTheme::isChecked(o); 145 extraParams.button.checked = LayoutTheme::isChecked(o);
141 extraParams.button.indeterminate = LayoutTheme::isIndeterminate(o); 146 extraParams.button.indeterminate = LayoutTheme::isIndeterminate(o);
142 147
143 float zoomLevel = o.styleRef().effectiveZoom(); 148 float zoomLevel = o.styleRef().effectiveZoom();
144 GraphicsContextStateSaver stateSaver(i.context, false); 149 GraphicsContextStateSaver stateSaver(i.context, false);
145 IntRect unzoomedRect = rect; 150 IntRect unzoomedRect = rect;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 inputContentBox.y() + (inputContentBox.height() - magnifierSize + 1) / 2 , 419 inputContentBox.y() + (inputContentBox.height() - magnifierSize + 1) / 2 ,
415 magnifierSize, magnifierSize); 420 magnifierSize, magnifierSize);
416 IntRect paintingRect = convertToPaintingRect(inputLayoutBox, magnifierObject , magnifierRect, r); 421 IntRect paintingRect = convertToPaintingRect(inputLayoutBox, magnifierObject , magnifierRect, r);
417 422
418 DEFINE_STATIC_REF(Image, magnifierImage, (Image::loadPlatformResource("searc hMagnifier"))); 423 DEFINE_STATIC_REF(Image, magnifierImage, (Image::loadPlatformResource("searc hMagnifier")));
419 paintInfo.context.drawImage(magnifierImage, paintingRect); 424 paintInfo.context.drawImage(magnifierImage, paintingRect);
420 return false; 425 return false;
421 } 426 }
422 427
423 } // namespace blink 428 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterDefault.h ('k') | third_party/WebKit/Source/core/paint/ThemePainterMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698