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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/SVGInlineTextBoxPainter.h" | 6 #include "core/paint/SVGInlineTextBoxPainter.h" |
7 | 7 |
8 #include "core/dom/DocumentMarkerController.h" | 8 #include "core/dom/DocumentMarkerController.h" |
9 #include "core/dom/RenderedDocumentMarker.h" | 9 #include "core/dom/RenderedDocumentMarker.h" |
10 #include "core/editing/Editor.h" | 10 #include "core/editing/Editor.h" |
11 #include "core/frame/LocalFrame.h" | 11 #include "core/frame/LocalFrame.h" |
12 #include "core/layout/LayoutTheme.h" | 12 #include "core/layout/LayoutTheme.h" |
13 #include "core/layout/line/InlineFlowBox.h" | 13 #include "core/layout/line/InlineFlowBox.h" |
14 #include "core/layout/svg/LayoutSVGInlineText.h" | 14 #include "core/layout/svg/LayoutSVGInlineText.h" |
15 #include "core/layout/svg/SVGLayoutSupport.h" | 15 #include "core/layout/svg/SVGLayoutSupport.h" |
16 #include "core/layout/svg/SVGResourcesCache.h" | 16 #include "core/layout/svg/SVGResourcesCache.h" |
17 #include "core/layout/svg/line/SVGInlineTextBox.h" | 17 #include "core/layout/svg/line/SVGInlineTextBox.h" |
18 #include "core/paint/InlineTextBoxPainter.h" | 18 #include "core/paint/InlineTextBoxPainter.h" |
19 #include "core/paint/LayoutObjectDrawingRecorder.h" | 19 #include "core/paint/LayoutObjectDrawingRecorder.h" |
20 #include "core/paint/PaintInfo.h" | 20 #include "core/paint/PaintInfo.h" |
21 #include "core/paint/SVGPaintContext.h" | 21 #include "core/paint/SVGPaintContext.h" |
22 #include "core/style/ShadowList.h" | 22 #include "core/style/ShadowList.h" |
| 23 #include "platform/graphics/GraphicsContextStateSaver.h" |
23 | 24 |
24 namespace blink { | 25 namespace blink { |
25 | 26 |
26 static inline bool textShouldBePainted(LayoutSVGInlineText& textLayoutObject) | 27 static inline bool textShouldBePainted(LayoutSVGInlineText& textLayoutObject) |
27 { | 28 { |
28 // Font::pixelSize(), returns FontDescription::computedPixelSize(), which re
turns "int(x + 0.5)". | 29 // Font::pixelSize(), returns FontDescription::computedPixelSize(), which re
turns "int(x + 0.5)". |
29 // If the absolute font size on screen is below x=0.5, don't render anything
. | 30 // If the absolute font size on screen is below x=0.5, don't render anything
. |
30 return textLayoutObject.scaledFont().fontDescription().computedPixelSize(); | 31 return textLayoutObject.scaledFont().fontDescription().computedPixelSize(); |
31 } | 32 } |
32 | 33 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 if (!fragmentTransform.isIdentity()) | 442 if (!fragmentTransform.isIdentity()) |
442 context->concatCTM(fragmentTransform); | 443 context->concatCTM(fragmentTransform); |
443 context->setFillColor(color); | 444 context->setFillColor(color); |
444 context->fillRect(fragmentRect, color); | 445 context->fillRect(fragmentRect, color); |
445 } | 446 } |
446 } | 447 } |
447 } | 448 } |
448 } | 449 } |
449 | 450 |
450 } // namespace blink | 451 } // namespace blink |
OLD | NEW |