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

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

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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/SVGInlineTextBoxPainter.h" 5 #include "core/paint/SVGInlineTextBoxPainter.h"
6 6
7 #include <memory>
7 #include "core/editing/Editor.h" 8 #include "core/editing/Editor.h"
8 #include "core/editing/markers/DocumentMarkerController.h" 9 #include "core/editing/markers/DocumentMarkerController.h"
9 #include "core/editing/markers/RenderedDocumentMarker.h" 10 #include "core/editing/markers/RenderedDocumentMarker.h"
10 #include "core/frame/LocalFrame.h" 11 #include "core/frame/LocalFrame.h"
11 #include "core/layout/LayoutTheme.h" 12 #include "core/layout/LayoutTheme.h"
12 #include "core/layout/api/LineLayoutAPIShim.h" 13 #include "core/layout/api/LineLayoutAPIShim.h"
13 #include "core/layout/api/SelectionState.h" 14 #include "core/layout/api/SelectionState.h"
14 #include "core/layout/line/InlineFlowBox.h" 15 #include "core/layout/line/InlineFlowBox.h"
15 #include "core/layout/svg/LayoutSVGInlineText.h" 16 #include "core/layout/svg/LayoutSVGInlineText.h"
16 #include "core/layout/svg/SVGLayoutSupport.h" 17 #include "core/layout/svg/SVGLayoutSupport.h"
17 #include "core/layout/svg/SVGResourcesCache.h" 18 #include "core/layout/svg/SVGResourcesCache.h"
18 #include "core/layout/svg/line/SVGInlineTextBox.h" 19 #include "core/layout/svg/line/SVGInlineTextBox.h"
19 #include "core/paint/InlineTextBoxPainter.h" 20 #include "core/paint/InlineTextBoxPainter.h"
20 #include "core/paint/LayoutObjectDrawingRecorder.h" 21 #include "core/paint/LayoutObjectDrawingRecorder.h"
21 #include "core/paint/PaintInfo.h" 22 #include "core/paint/PaintInfo.h"
22 #include "core/paint/SVGPaintContext.h" 23 #include "core/paint/SVGPaintContext.h"
23 #include "core/style/AppliedTextDecoration.h" 24 #include "core/style/AppliedTextDecoration.h"
24 #include "core/style/ShadowList.h" 25 #include "core/style/ShadowList.h"
25 #include "platform/graphics/GraphicsContextStateSaver.h" 26 #include "platform/graphics/GraphicsContextStateSaver.h"
26 #include <memory>
27 27
28 namespace blink { 28 namespace blink {
29 29
30 static inline bool textShouldBePainted( 30 static inline bool textShouldBePainted(
31 const LayoutSVGInlineText& textLayoutObject) { 31 const LayoutSVGInlineText& textLayoutObject) {
32 // Font::pixelSize(), returns FontDescription::computedPixelSize(), which 32 // Font::pixelSize(), returns FontDescription::computedPixelSize(), which
33 // returns "int(x + 0.5)". If the absolute font size on screen is below 33 // returns "int(x + 0.5)". If the absolute font size on screen is below
34 // x=0.5, don't render anything. 34 // x=0.5, don't render anything.
35 return textLayoutObject.scaledFont().getFontDescription().computedPixelSize(); 35 return textLayoutObject.scaledFont().getFontDescription().computedPixelSize();
36 } 36 }
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 653 }
654 FloatRect fragmentRect = m_svgInlineTextBox.selectionRectForTextFragment( 654 FloatRect fragmentRect = m_svgInlineTextBox.selectionRectForTextFragment(
655 fragment, textMatchInfo.startPosition, textMatchInfo.endPosition, 655 fragment, textMatchInfo.startPosition, textMatchInfo.endPosition,
656 style); 656 style);
657 paintInfo.context.setFillColor(color); 657 paintInfo.context.setFillColor(color);
658 paintInfo.context.fillRect(fragmentRect); 658 paintInfo.context.fillRect(fragmentRect);
659 } 659 }
660 } 660 }
661 661
662 } // namespace blink 662 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h ('k') | third_party/WebKit/Source/core/paint/SVGPaintContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698