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

Side by Side Diff: third_party/WebKit/Source/platform/mac/ThemeMac.h

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 29 matching lines...) Expand all
40 virtual FontDescription controlFont(ControlPart, const FontDescription&, flo at zoomFactor) const; 40 virtual FontDescription controlFont(ControlPart, const FontDescription&, flo at zoomFactor) const;
41 41
42 virtual LengthSize controlSize(ControlPart, const FontDescription&, const Le ngthSize&, float zoomFactor) const; 42 virtual LengthSize controlSize(ControlPart, const FontDescription&, const Le ngthSize&, float zoomFactor) const;
43 virtual LengthSize minimumControlSize(ControlPart, const FontDescription&, f loat zoomFactor) const; 43 virtual LengthSize minimumControlSize(ControlPart, const FontDescription&, f loat zoomFactor) const;
44 44
45 virtual LengthBox controlPadding(ControlPart, const FontDescription&, const LengthBox& zoomedBox, float zoomFactor) const; 45 virtual LengthBox controlPadding(ControlPart, const FontDescription&, const LengthBox& zoomedBox, float zoomFactor) const;
46 virtual LengthBox controlBorder(ControlPart, const FontDescription&, const L engthBox& zoomedBox, float zoomFactor) const; 46 virtual LengthBox controlBorder(ControlPart, const FontDescription&, const L engthBox& zoomedBox, float zoomFactor) const;
47 47
48 virtual bool controlRequiresPreWhiteSpace(ControlPart part) const { return p art == PushButtonPart; } 48 virtual bool controlRequiresPreWhiteSpace(ControlPart part) const { return p art == PushButtonPart; }
49 49
50 virtual void paint(ControlPart, ControlStates, GraphicsContext*, const IntRe ct&, float zoomFactor, ScrollableArea*) const; 50 virtual void paint(ControlPart, ControlStates, GraphicsContext&, const IntRe ct&, float zoomFactor, ScrollableArea*) const;
51 virtual void addVisualOverflow(ControlPart, ControlStates, float zoomFactor, IntRect& borderBox) const; 51 virtual void addVisualOverflow(ControlPart, ControlStates, float zoomFactor, IntRect& borderBox) const;
52 52
53 // Inflate an IntRect to accout for specific padding around margins. 53 // Inflate an IntRect to accout for specific padding around margins.
54 enum { 54 enum {
55 TopMargin = 0, 55 TopMargin = 0,
56 RightMargin = 1, 56 RightMargin = 1,
57 BottomMargin = 2, 57 BottomMargin = 2,
58 LeftMargin = 3 58 LeftMargin = 3
59 }; 59 };
60 static PLATFORM_EXPORT IntRect inflateRect(const IntRect&, const IntSize&, c onst int* margins, float zoomLevel = 1.0f); 60 static PLATFORM_EXPORT IntRect inflateRect(const IntRect&, const IntSize&, c onst int* margins, float zoomLevel = 1.0f);
61 61
62 // Inflate an IntRect to account for any bleeding that would happen due to a nti-aliasing. 62 // Inflate an IntRect to account for any bleeding that would happen due to a nti-aliasing.
63 static PLATFORM_EXPORT IntRect inflateRectForAA(const IntRect&); 63 static PLATFORM_EXPORT IntRect inflateRectForAA(const IntRect&);
64 64
65 // Inflate an IntRect to account for its focus ring. This is only used when 65 // Inflate an IntRect to account for its focus ring. This is only used when
66 // drawWithFrameDrawsFocusRing() returns true (otherwise, the focus ring's 66 // drawWithFrameDrawsFocusRing() returns true (otherwise, the focus ring's
67 // bounds could be accurately computed with -[NSCell focusRingMaskBoundsForF rame:inView:]). 67 // bounds could be accurately computed with -[NSCell focusRingMaskBoundsForF rame:inView:]).
68 static PLATFORM_EXPORT IntRect inflateRectForFocusRing(const IntRect&); 68 static PLATFORM_EXPORT IntRect inflateRectForFocusRing(const IntRect&);
69 69
70 static PLATFORM_EXPORT bool drawWithFrameDrawsFocusRing(); 70 static PLATFORM_EXPORT bool drawWithFrameDrawsFocusRing();
71 }; 71 };
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 #endif // ThemeMac_h 75 #endif // ThemeMac_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698