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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 } | 484 } |
485 } | 485 } |
486 | 486 |
487 LocalCurrentGraphicsContext localContext(context); | 487 LocalCurrentGraphicsContext localContext(context); |
488 NSView *view = ThemeMac::ensuredView(scrollView); | 488 NSView *view = ThemeMac::ensuredView(scrollView); |
489 NSWindow *window = [view window]; | 489 NSWindow *window = [view window]; |
490 NSButtonCell *previousDefaultButtonCell = [window defaultButtonCell]; | 490 NSButtonCell *previousDefaultButtonCell = [window defaultButtonCell]; |
491 | 491 |
492 if (states & DefaultState) { | 492 if (states & DefaultState) { |
493 [window setDefaultButtonCell:buttonCell]; | 493 [window setDefaultButtonCell:buttonCell]; |
494 wkAdvanceDefaultButtonPulseAnimation(buttonCell); | 494 WKAdvanceDefaultButtonPulseAnimation(buttonCell); |
495 } else if ([previousDefaultButtonCell isEqual:buttonCell]) | 495 } else if ([previousDefaultButtonCell isEqual:buttonCell]) |
496 [window setDefaultButtonCell:nil]; | 496 [window setDefaultButtonCell:nil]; |
497 | 497 |
498 [buttonCell drawWithFrame:NSRect(inflatedRect) inView:view]; | 498 [buttonCell drawWithFrame:NSRect(inflatedRect) inView:view]; |
499 #if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING | 499 #if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING |
500 if (states & FocusState) | 500 if (states & FocusState) |
501 [buttonCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view
]; | 501 [buttonCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view
]; |
502 #endif | 502 #endif |
503 [buttonCell setControlView:nil]; | 503 [buttonCell setControlView:nil]; |
504 | 504 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 break; | 751 break; |
752 case InnerSpinButtonPart: | 752 case InnerSpinButtonPart: |
753 paintStepper(states, context, zoomedRect, zoomFactor, scrollView); | 753 paintStepper(states, context, zoomedRect, zoomFactor, scrollView); |
754 break; | 754 break; |
755 default: | 755 default: |
756 break; | 756 break; |
757 } | 757 } |
758 } | 758 } |
759 | 759 |
760 } | 760 } |
OLD | NEW |