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

Side by Side Diff: third_party/WebKit/Source/core/paint/ObjectPainter.h

Issue 2386033002: Scale focus outline thickness with zoom level. (Closed)
Patch Set: return if outline width is 0 Created 4 years, 2 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 #ifndef ObjectPainter_h 5 #ifndef ObjectPainter_h
6 #define ObjectPainter_h 6 #define ObjectPainter_h
7 7
8 #include "core/style/ComputedStyleConstants.h" 8 #include "core/style/ComputedStyleConstants.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 #include "wtf/Vector.h" 10 #include "wtf/Vector.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class Color; 14 class Color;
15 class GraphicsContext; 15 class GraphicsContext;
16 class LayoutPoint; 16 class LayoutPoint;
17 class LayoutRect; 17 class LayoutRect;
18 class LayoutSize; 18 class LayoutSize;
19 struct PaintInfo; 19 struct PaintInfo;
20 class LayoutObject; 20 class LayoutObject;
21 class ComputedStyle; 21 class ComputedStyle;
22 22
23 class ObjectPainter { 23 class ObjectPainter {
24 STACK_ALLOCATED(); 24 STACK_ALLOCATED();
25 25
26 public: 26 public:
27 ObjectPainter(const LayoutObject& layoutObject) 27 ObjectPainter(const LayoutObject& layoutObject)
28 : m_layoutObject(layoutObject) {} 28 : m_layoutObject(layoutObject) {}
29 29
30 static float getOutlineStrokeWidth(const ComputedStyle&);
31
30 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset); 32 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset);
31 void paintInlineChildrenOutlines(const PaintInfo&, 33 void paintInlineChildrenOutlines(const PaintInfo&,
32 const LayoutPoint& paintOffset); 34 const LayoutPoint& paintOffset);
33 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset); 35 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset);
34 36
35 static void drawLineForBoxSide(GraphicsContext&, 37 static void drawLineForBoxSide(GraphicsContext&,
36 int x1, 38 int x1,
37 int y1, 39 int y1,
38 int x2, 40 int x2,
39 int y2, 41 int y2,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 int adjacentWidth1, 108 int adjacentWidth1,
107 int adjacentWidth2, 109 int adjacentWidth2,
108 bool antialias); 110 bool antialias);
109 111
110 const LayoutObject& m_layoutObject; 112 const LayoutObject& m_layoutObject;
111 }; 113 };
112 114
113 } // namespace blink 115 } // namespace blink
114 116
115 #endif 117 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698