OLD | NEW |
---|---|
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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
551 backgroundBounds.origin.x = bounds.origin.x + (bounds.size.width - backgroun dBounds.size.width) / 2; | 551 backgroundBounds.origin.x = bounds.origin.x + (bounds.size.width - backgroun dBounds.size.width) / 2; |
552 if (backgroundBounds.size.height < bounds.size.height) { | 552 if (backgroundBounds.size.height < bounds.size.height) { |
553 int heightDiff = clampToInteger(bounds.size.height - backgroundBounds.si ze.height); | 553 int heightDiff = clampToInteger(bounds.size.height - backgroundBounds.si ze.height); |
554 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; | 554 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; |
555 } | 555 } |
556 | 556 |
557 LocalCurrentGraphicsContext localContext(context, rect); | 557 LocalCurrentGraphicsContext localContext(context, rect); |
558 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), kH IThemeOrientationNormal, 0); | 558 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), kH IThemeOrientationNormal, 0); |
559 } | 559 } |
560 | 560 |
561 // This will ensure that we always return a valid NSView, even if ScrollView doe sn't have an associated document NSView. | 561 // This will ensure that we always return a valid NSView, even if FrameView does n't have an associated document NSView. |
562 // If the ScrollView doesn't have an NSView, we will return a fake NSView whose sole purpose is to tell AppKit that it's flipped. | 562 // If the FrameView doesn't have an NSView, we will return a fake NSView whose s ole purpose is to tell AppKit that it's flipped. |
563 NSView *ThemeMac::ensuredView(ScrollableArea* scrollView) | 563 NSView *ThemeMac::ensuredView(ScrollableArea* scrollView) |
Ian Vollick
2014/10/11 03:05:32
Should the parameter be renamed frameView?
skobes
2014/10/11 04:05:19
Done (here and in a few other places).
| |
564 { | 564 { |
565 | 565 |
566 // Use a fake flipped view. | 566 // Use a fake flipped view. |
567 static NSView *flippedView = [[WebCoreFlippedView alloc] init]; | 567 static NSView *flippedView = [[WebCoreFlippedView alloc] init]; |
568 [flippedView setFrameSize:NSSizeFromCGSize(scrollView->contentsSize())]; | 568 [flippedView setFrameSize:NSSizeFromCGSize(scrollView->contentsSize())]; |
569 | 569 |
570 return flippedView; | 570 return flippedView; |
571 } | 571 } |
572 | 572 |
573 void ThemeMac::setFocusRingClipRect(const FloatRect& rect) | 573 void ThemeMac::setFocusRingClipRect(const FloatRect& rect) |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
737 break; | 737 break; |
738 case InnerSpinButtonPart: | 738 case InnerSpinButtonPart: |
739 paintStepper(states, context, zoomedRect, zoomFactor, scrollView); | 739 paintStepper(states, context, zoomedRect, zoomFactor, scrollView); |
740 break; | 740 break; |
741 default: | 741 default: |
742 break; | 742 break; |
743 } | 743 } |
744 } | 744 } |
745 | 745 |
746 } | 746 } |
OLD | NEW |