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

Unified Diff: Source/platform/mac/ThemeMac.h

Issue 528413002: Revert 181330 "Revert 180822 "Specify clip rects when drawing Ma..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2145/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/mac/LocalCurrentGraphicsContext.mm ('k') | Source/platform/mac/ThemeMac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/mac/ThemeMac.h
===================================================================
--- Source/platform/mac/ThemeMac.h (revision 181330)
+++ Source/platform/mac/ThemeMac.h (working copy)
@@ -54,6 +54,23 @@
virtual void paint(ControlPart, ControlStates, GraphicsContext*, const IntRect&, float zoomFactor, ScrollView*) const;
virtual void inflateControlPaintRect(ControlPart, ControlStates, IntRect&, float zoomFactor) const;
+ // Inflate an IntRect to accout for specific padding around margins.
+ enum {
+ TopMargin = 0,
+ RightMargin = 1,
+ BottomMargin = 2,
+ LeftMargin = 3
+ };
+ static PLATFORM_EXPORT IntRect inflateRect(const IntRect&, const IntSize&, const int* margins, float zoomLevel = 1.0f);
+
+ // Inflate an IntRect to account for any bleeding that would happen due to anti-aliasing.
+ static PLATFORM_EXPORT IntRect inflateRectForAA(const IntRect&);
+
+ // Inflate an IntRect to account for its focus ring. This is only used when
+ // BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING is defined (otherwise, the focus ring's
+ // bounds could be accurately computed with -[NSCell focusRingMaskBoundsForFrame:inView:]).
+ static PLATFORM_EXPORT IntRect inflateRectForFocusRing(const IntRect&);
+
// FIXME: Once RenderThemeMac is converted over to use Theme then this can be internal to ThemeMac.
static NSView* ensuredView(ScrollView*);
static void setFocusRingClipRect(const FloatRect&);
« no previous file with comments | « Source/platform/mac/LocalCurrentGraphicsContext.mm ('k') | Source/platform/mac/ThemeMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698