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

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

Issue 394433002: Add :indeterminate pseudo class support for radio button input (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 radioCell = [[NSButtonCell alloc] init]; 342 radioCell = [[NSButtonCell alloc] init];
343 [radioCell setButtonType:NSRadioButton]; 343 [radioCell setButtonType:NSRadioButton];
344 [radioCell setTitle:nil]; 344 [radioCell setTitle:nil];
345 [radioCell setFocusRingType:NSFocusRingTypeExterior]; 345 [radioCell setFocusRingType:NSFocusRingTypeExterior];
346 } 346 }
347 347
348 // Set the control size based off the rectangle we're painting into. 348 // Set the control size based off the rectangle we're painting into.
349 setControlSize(radioCell, radioSizes(), zoomedRect.size(), zoomFactor); 349 setControlSize(radioCell, radioSizes(), zoomedRect.size(), zoomFactor);
350 350
351 // Update the various states we respond to. 351 // Update the various states we respond to.
352 // Cocoa draws NSMixedState NSRadioButton as NSOnState so we don't want that .
353 states &= ~IndeterminateControlState;
tkent 2014/07/15 01:31:50 Do we have a pixel test for indeterminate radio bu
keishi 2014/07/15 03:05:30 All elements in radio-appearance-basic.html are no
352 updateStates(radioCell, states); 354 updateStates(radioCell, states);
353 355
354 return radioCell; 356 return radioCell;
355 } 357 }
356 358
357 static void paintRadio(ControlStates states, GraphicsContext* context, const Int Rect& zoomedRect, float zoomFactor, ScrollView* scrollView) 359 static void paintRadio(ControlStates states, GraphicsContext* context, const Int Rect& zoomedRect, float zoomFactor, ScrollView* scrollView)
358 { 360 {
359 // Determine the width and height needed for the control and prepare the cel l for painting. 361 // Determine the width and height needed for the control and prepare the cel l for painting.
360 NSButtonCell *radioCell = radio(states, zoomedRect, zoomFactor); 362 NSButtonCell *radioCell = radio(states, zoomedRect, zoomFactor);
361 GraphicsContextStateSaver stateSaver(*context); 363 GraphicsContextStateSaver stateSaver(*context);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 break; 721 break;
720 case InnerSpinButtonPart: 722 case InnerSpinButtonPart:
721 paintStepper(states, context, zoomedRect, zoomFactor, scrollView); 723 paintStepper(states, context, zoomedRect, zoomFactor, scrollView);
722 break; 724 break;
723 default: 725 default:
724 break; 726 break;
725 } 727 }
726 } 728 }
727 729
728 } 730 }
OLDNEW
« Source/core/html/forms/RadioInputType.h ('K') | « Source/core/html/forms/RadioInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698