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

Unified Diff: ui/gfx/render_text.cc

Issue 10387121: Revert 136996 - ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « ui/gfx/native_theme_win_unittest.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.cc
===================================================================
--- ui/gfx/render_text.cc (revision 137002)
+++ ui/gfx/render_text.cc (working copy)
@@ -15,12 +15,11 @@
#include "third_party/skia/include/effects/SkBlurMaskFilter.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
-#include "ui/base/native_theme/native_theme.h"
#include "ui/base/text/utf16_indexing.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/insets.h"
-#include "ui/gfx/shadow_value.h"
#include "ui/gfx/skia_util.h"
+#include "ui/gfx/shadow_value.h"
namespace {
@@ -738,12 +737,7 @@
// Apply a selection style override to a copy of the style ranges.
if (!selection().is_empty()) {
StyleRange selection_style(default_style_);
-<<<<<<< HEAD
selection_style.foreground = selection_color_;
-=======
- selection_style.foreground = ui::NativeTheme::instance()->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldSelectionColor);
->>>>>>> ui: Move NativeTheme files into ui/base/native_theme/ directory.
selection_style.range = ui::Range(selection().GetMin(),
selection().GetMax());
ApplyStyleRangeImpl(style_ranges, selection_style);
@@ -758,13 +752,7 @@
// http://crbug.com/110109
if (!insert_mode_ && cursor_visible() && focused()) {
StyleRange replacement_mode_style(default_style_);
-<<<<<<< HEAD
replacement_mode_style.foreground = selection_color_;
-=======
- replacement_mode_style.foreground =
- ui::NativeTheme::instance()->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldSelectionColor);
->>>>>>> ui: Move NativeTheme files into ui/base/native_theme/ directory.
size_t cursor = cursor_position();
replacement_mode_style.range.set_start(cursor);
replacement_mode_style.range.set_end(
@@ -962,17 +950,9 @@
}
void RenderText::DrawSelection(Canvas* canvas) {
-<<<<<<< HEAD
const SkColor color = focused() ? selection_background_focused_color_ :
selection_background_unfocused_color_;
const std::vector<Rect> sel = GetSubstringBounds(selection());
-=======
- std::vector<Rect> sel = GetSubstringBounds(selection());
- ui::NativeTheme::ColorId color_id = focused() ?
- ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused :
- ui::NativeTheme::kColorId_TextfieldSelectionBackgroundUnfocused;
- SkColor color = ui::NativeTheme::instance()->GetSystemColor(color_id);
->>>>>>> ui: Move NativeTheme files into ui/base/native_theme/ directory.
for (std::vector<Rect>::const_iterator i = sel.begin(); i < sel.end(); ++i)
canvas->FillRect(*i, color);
}
« no previous file with comments | « ui/gfx/native_theme_win_unittest.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698