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

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

Issue 1224933002: Combine outline and focus ring code paths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix empty focus ring on Mac Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/LineBoxListPainter.cpp ('k') | Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 public: 25 public:
26 ObjectPainter(LayoutObject& layoutObject) : m_layoutObject(layoutObject) { } 26 ObjectPainter(LayoutObject& layoutObject) : m_layoutObject(layoutObject) { }
27 27
28 void paintOutline(const PaintInfo&, const LayoutRect& visualOverflowRect, co nst LayoutSize& objectSize, const LayoutPoint& paintOffset); 28 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset);
29 void paintFocusRing(const PaintInfo&, const ComputedStyle&, const Vector<Lay outRect>& focusRingRects); 29 void paintInlineChildrenOutlines(const PaintInfo&, const LayoutPoint& paintO ffset);
30 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset) ; 30 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset) ;
31 31
32 static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals e); 32 static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals e);
33 33
34 private: 34 private:
35 static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 35 static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
36 BoxSide, Color, int thickness, EBorderStyle, bool antialias); 36 BoxSide, Color, int thickness, EBorderStyle, bool antialias);
37 static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, 37 static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
38 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias); 38 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias);
39 static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x 2, int y2, 39 static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x 2, int y2,
40 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias); 40 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias);
41 static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y 2, 41 static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y 2,
42 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); 42 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias);
43 43
44 LayoutObject& m_layoutObject; 44 LayoutObject& m_layoutObject;
45 }; 45 };
46 46
47 } // namespace blink 47 } // namespace blink
48 48
49 #endif 49 #endif
OLDNEW
« no previous file with comments | « Source/core/paint/LineBoxListPainter.cpp ('k') | Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698