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/editing/markers/RenderedDocumentMarker.h" | |
11 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
12 #include "core/layout/LayoutBlock.h" | |
13 #include "core/layout/LayoutTextCombine.h" | 11 #include "core/layout/LayoutTextCombine.h" |
14 #include "core/layout/LayoutTheme.h" | 12 #include "core/layout/LayoutTheme.h" |
15 #include "core/layout/api/LineLayoutAPIShim.h" | 13 #include "core/layout/api/LineLayoutAPIShim.h" |
16 #include "core/layout/api/LineLayoutBox.h" | 14 #include "core/layout/api/LineLayoutBox.h" |
17 #include "core/layout/api/LineLayoutText.h" | |
18 #include "core/layout/line/InlineTextBox.h" | 15 #include "core/layout/line/InlineTextBox.h" |
19 #include "core/paint/BoxPainter.h" | |
20 #include "core/paint/PaintInfo.h" | 16 #include "core/paint/PaintInfo.h" |
21 #include "core/paint/TextPainter.h" | 17 #include "core/paint/TextPainter.h" |
22 #include "platform/graphics/GraphicsContextStateSaver.h" | 18 #include "platform/graphics/GraphicsContextStateSaver.h" |
23 #include "platform/graphics/paint/DrawingRecorder.h" | 19 #include "platform/graphics/paint/DrawingRecorder.h" |
24 #include "wtf/Optional.h" | 20 #include "wtf/Optional.h" |
25 | 21 |
26 namespace blink { | 22 namespace blink { |
27 | 23 |
28 typedef WTF::HashMap<const InlineTextBox*, TextBlobPtr> InlineTextBoxBlobCacheMa
p; | 24 typedef WTF::HashMap<const InlineTextBox*, TextBlobPtr> InlineTextBoxBlobCacheMa
p; |
29 static InlineTextBoxBlobCacheMap* gTextBlobCache; | 25 static InlineTextBoxBlobCacheMap* gTextBlobCache; |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 | 849 |
854 Color color = LayoutTheme::theme().platformTextSearchHighlightColor(marker->
activeMatch()); | 850 Color color = LayoutTheme::theme().platformTextSearchHighlightColor(marker->
activeMatch()); |
855 GraphicsContext& context = paintInfo.context; | 851 GraphicsContext& context = paintInfo.context; |
856 GraphicsContextStateSaver stateSaver(context); | 852 GraphicsContextStateSaver stateSaver(context); |
857 context.clip(FloatRect(boxOrigin.x().toFloat(), (boxOrigin.y() - deltaY).toF
loat(), m_inlineTextBox.logicalWidth().toFloat(), selHeight)); | 853 context.clip(FloatRect(boxOrigin.x().toFloat(), (boxOrigin.y() - deltaY).toF
loat(), m_inlineTextBox.logicalWidth().toFloat(), selHeight)); |
858 context.drawHighlightForText(font, run, FloatPoint(boxOrigin.x().toFloat(),
(boxOrigin.y() - deltaY).toFloat()), selHeight, color, sPos, ePos); | 854 context.drawHighlightForText(font, run, FloatPoint(boxOrigin.x().toFloat(),
(boxOrigin.y() - deltaY).toFloat()), selHeight, color, sPos, ePos); |
859 } | 855 } |
860 | 856 |
861 | 857 |
862 } // namespace blink | 858 } // namespace blink |
OLD | NEW |