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

Side by Side Diff: Source/platform/mac/ThemeMac.mm

Issue 1186523004: Rename adjustPaintInvalidationRect and related to addVisualOverflow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/platform/mac/ThemeMac.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010, 2011, 2012 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010, 2011, 2012 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 // This also guarantees the HTML <button> will match our rendering b y default, since we're using a consistent 624 // This also guarantees the HTML <button> will match our rendering b y default, since we're using a consistent
625 // padding. 625 // padding.
626 const int padding = 8 * zoomFactor; 626 const int padding = 8 * zoomFactor;
627 return LengthBox(2, padding, 3, padding); 627 return LengthBox(2, padding, 3, padding);
628 } 628 }
629 default: 629 default:
630 return Theme::controlPadding(part, fontDescription, zoomedBox, zoomF actor); 630 return Theme::controlPadding(part, fontDescription, zoomedBox, zoomF actor);
631 } 631 }
632 } 632 }
633 633
634 void ThemeMac::inflateControlPaintRect(ControlPart part, ControlStates states, I ntRect& zoomedRect, float zoomFactor) const 634 void ThemeMac::addVisualOverflow(ControlPart part, ControlStates states, float z oomFactor, IntRect& zoomedRect) const
635 { 635 {
636 BEGIN_BLOCK_OBJC_EXCEPTIONS 636 BEGIN_BLOCK_OBJC_EXCEPTIONS
637 switch (part) { 637 switch (part) {
638 case CheckboxPart: { 638 case CheckboxPart: {
639 // We inflate the rect as needed to account for padding included in the cell to accommodate the checkbox 639 // We inflate the rect as needed to account for padding included in the cell to accommodate the checkbox
640 // shadow" and the check. We don't consider this part of the bounds of the control in WebKit. 640 // shadow" and the check. We don't consider this part of the bounds of the control in WebKit.
641 NSCell *cell = checkbox(states, zoomedRect, zoomFactor); 641 NSCell *cell = checkbox(states, zoomedRect, zoomFactor);
642 NSControlSize controlSize = [cell controlSize]; 642 NSControlSize controlSize = [cell controlSize];
643 IntSize zoomedSize = checkboxSizes()[controlSize]; 643 IntSize zoomedSize = checkboxSizes()[controlSize];
644 zoomedSize.setHeight(zoomedSize.height() * zoomFactor); 644 zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 break; 702 break;
703 case InnerSpinButtonPart: 703 case InnerSpinButtonPart:
704 paintStepper(states, context, zoomedRect, zoomFactor, scrollableArea ); 704 paintStepper(states, context, zoomedRect, zoomFactor, scrollableArea );
705 break; 705 break;
706 default: 706 default:
707 break; 707 break;
708 } 708 }
709 } 709 }
710 710
711 } 711 }
OLDNEW
« no previous file with comments | « Source/platform/mac/ThemeMac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698