| OLD | NEW |
| 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/DocumentMarkerController.h" | 9 #include "core/editing/markers/DocumentMarkerController.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 marker.BackgroundColor()); | 1081 marker.BackgroundColor()); |
| 1082 if (marker_paint_phase == DocumentMarkerPaintPhase::kBackground) | 1082 if (marker_paint_phase == DocumentMarkerPaintPhase::kBackground) |
| 1083 PaintSingleCompositionBackgroundRun( | 1083 PaintSingleCompositionBackgroundRun( |
| 1084 paint_info.context, box_origin, style, font, | 1084 paint_info.context, box_origin, style, font, |
| 1085 underline.BackgroundColor(), UnderlinePaintStart(underline), | 1085 underline.BackgroundColor(), UnderlinePaintStart(underline), |
| 1086 UnderlinePaintEnd(underline)); | 1086 UnderlinePaintEnd(underline)); |
| 1087 else | 1087 else |
| 1088 PaintCompositionUnderline(paint_info.context, box_origin, underline); | 1088 PaintCompositionUnderline(paint_info.context, box_origin, underline); |
| 1089 } break; | 1089 } break; |
| 1090 default: | 1090 default: |
| 1091 ASSERT_NOT_REACHED(); | 1091 NOTREACHED(); |
| 1092 } | 1092 } |
| 1093 } | 1093 } |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 namespace { | 1096 namespace { |
| 1097 | 1097 |
| 1098 #if !OS(MACOSX) | 1098 #if !OS(MACOSX) |
| 1099 | 1099 |
| 1100 sk_sp<PaintRecord> RecordMarker(DocumentMarker::MarkerType marker_type) { | 1100 sk_sp<PaintRecord> RecordMarker(DocumentMarker::MarkerType marker_type) { |
| 1101 SkColor color = (marker_type == DocumentMarker::kGrammar) | 1101 SkColor color = (marker_type == DocumentMarker::kGrammar) |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 | 1571 |
| 1572 LayoutRect box_rect(box_origin, LayoutSize(inline_text_box_.LogicalWidth(), | 1572 LayoutRect box_rect(box_origin, LayoutSize(inline_text_box_.LogicalWidth(), |
| 1573 inline_text_box_.LogicalHeight())); | 1573 inline_text_box_.LogicalHeight())); |
| 1574 context.Clip(FloatRect(box_rect)); | 1574 context.Clip(FloatRect(box_rect)); |
| 1575 context.DrawHighlightForText(font, run, FloatPoint(box_origin), | 1575 context.DrawHighlightForText(font, run, FloatPoint(box_origin), |
| 1576 box_rect.Height().ToInt(), color, | 1576 box_rect.Height().ToInt(), color, |
| 1577 paint_offsets.first, paint_offsets.second); | 1577 paint_offsets.first, paint_offsets.second); |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 } // namespace blink | 1580 } // namespace blink |
| OLD | NEW |