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

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

Issue 2906953002: [DMC #26] Add CompositionMarker::Thickness enum (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/InlineTextBoxPainter.h" 5 #include "core/paint/InlineTextBoxPainter.h"
6 6
7 #include "core/editing/CompositionUnderline.h" 7 #include "core/editing/CompositionUnderline.h"
8 #include "core/editing/Editor.h" 8 #include "core/editing/Editor.h"
9 #include "core/editing/markers/CompositionMarker.h" 9 #include "core/editing/markers/CompositionMarker.h"
10 #include "core/editing/markers/DocumentMarkerController.h" 10 #include "core/editing/markers/DocumentMarkerController.h"
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 } else { 685 } else {
686 inline_text_box_.PaintTextMatchMarkerForeground( 686 inline_text_box_.PaintTextMatchMarkerForeground(
687 paint_info, box_origin, ToTextMatchMarker(marker), style, font); 687 paint_info, box_origin, ToTextMatchMarker(marker), style, font);
688 } 688 }
689 break; 689 break;
690 case DocumentMarker::kComposition: { 690 case DocumentMarker::kComposition: {
691 const CompositionMarker& composition_marker = 691 const CompositionMarker& composition_marker =
692 ToCompositionMarker(marker); 692 ToCompositionMarker(marker);
693 CompositionUnderline underline( 693 CompositionUnderline underline(
694 composition_marker.StartOffset(), composition_marker.EndOffset(), 694 composition_marker.StartOffset(), composition_marker.EndOffset(),
695 composition_marker.UnderlineColor(), composition_marker.Thick(), 695 composition_marker.UnderlineColor(), composition_marker.IsThick(),
696 composition_marker.BackgroundColor()); 696 composition_marker.BackgroundColor());
697 if (marker_paint_phase == DocumentMarkerPaintPhase::kBackground) 697 if (marker_paint_phase == DocumentMarkerPaintPhase::kBackground)
698 PaintSingleCompositionBackgroundRun( 698 PaintSingleCompositionBackgroundRun(
699 paint_info.context, box_origin, style, font, 699 paint_info.context, box_origin, style, font,
700 underline.BackgroundColor(), UnderlinePaintStart(underline), 700 underline.BackgroundColor(), UnderlinePaintStart(underline),
701 UnderlinePaintEnd(underline)); 701 UnderlinePaintEnd(underline));
702 else 702 else
703 PaintCompositionUnderline(paint_info.context, box_origin, underline); 703 PaintCompositionUnderline(paint_info.context, box_origin, underline);
704 } break; 704 } break;
705 default: 705 default:
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 1187
1188 LayoutRect box_rect(box_origin, LayoutSize(inline_text_box_.LogicalWidth(), 1188 LayoutRect box_rect(box_origin, LayoutSize(inline_text_box_.LogicalWidth(),
1189 inline_text_box_.LogicalHeight())); 1189 inline_text_box_.LogicalHeight()));
1190 context.Clip(FloatRect(box_rect)); 1190 context.Clip(FloatRect(box_rect));
1191 context.DrawHighlightForText(font, run, FloatPoint(box_origin), 1191 context.DrawHighlightForText(font, run, FloatPoint(box_origin),
1192 box_rect.Height().ToInt(), color, 1192 box_rect.Height().ToInt(), color,
1193 paint_offsets.first, paint_offsets.second); 1193 paint_offsets.first, paint_offsets.second);
1194 } 1194 }
1195 1195
1196 } // namespace blink 1196 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698