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/paint/InlinePainter.h" | 12 #include "core/paint/InlinePainter.h" |
13 #include "core/paint/InlineTextBoxPainter.h" | 13 #include "core/paint/InlineTextBoxPainter.h" |
14 #include "core/rendering/PaintInfo.h" | 14 #include "core/rendering/PaintInfo.h" |
15 #include "core/rendering/RenderInline.h" | 15 #include "core/rendering/RenderInline.h" |
16 #include "core/rendering/RenderTheme.h" | 16 #include "core/rendering/RenderTheme.h" |
17 #include "core/rendering/style/ShadowList.h" | 17 #include "core/rendering/style/ShadowList.h" |
18 #include "core/rendering/svg/RenderSVGInlineText.h" | 18 #include "core/rendering/svg/RenderSVGInlineText.h" |
19 #include "core/rendering/svg/RenderSVGResource.h" | |
20 #include "core/rendering/svg/SVGInlineTextBox.h" | 19 #include "core/rendering/svg/SVGInlineTextBox.h" |
21 #include "core/rendering/svg/SVGRenderSupport.h" | 20 #include "core/rendering/svg/SVGRenderSupport.h" |
22 #include "core/rendering/svg/SVGResourcesCache.h" | 21 #include "core/rendering/svg/SVGResourcesCache.h" |
23 | 22 |
24 namespace blink { | 23 namespace blink { |
25 | 24 |
26 static inline bool textShouldBePainted(RenderSVGInlineText& textRenderer) | 25 static inline bool textShouldBePainted(RenderSVGInlineText& textRenderer) |
27 { | 26 { |
28 // Font::pixelSize(), returns FontDescription::computedPixelSize(), which re
turns "int(x + 0.5)". | 27 // 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
. | 28 // If the absolute font size on screen is below x=0.5, don't render anything
. |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 438 |
440 fragmentRect = fragmentTransform.mapRect(fragmentRect); | 439 fragmentRect = fragmentTransform.mapRect(fragmentRect); |
441 markerRect.unite(fragmentRect); | 440 markerRect.unite(fragmentRect); |
442 } | 441 } |
443 } | 442 } |
444 | 443 |
445 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer.localToAbsolu
teQuad(markerRect).enclosingBoundingBox()); | 444 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer.localToAbsolu
teQuad(markerRect).enclosingBoundingBox()); |
446 } | 445 } |
447 | 446 |
448 } // namespace blink | 447 } // namespace blink |
OLD | NEW |