File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 4444 font-size : 1em ;
4545}
4646
47- @media all and (-webkit-min-device-pixel-ratio : 0 ){/* safari only */
48- .button-push , .button-toggle {
47+ .button-push-safari , .button-toggle-safari {
4948 height : auto !important ;
5049 top : -0.9em ;
5150 margin-top : 50% ;
5251 padding : 0.25em 0 0.35em 0 ;
5352}
54- .button-arrow {
53+ .button-arrow-safari {
5554 height : auto !important ;
5655 top : -0.7em ;
5756 margin-top : 50% ;
5857 padding : 0.25em 0 0.35em 0 ;
5958}
60- }
6159
6260body : nth-of-type (1 ) .button-push-chrome ,
6361body : nth-of-type (1 ) .button-toggle-chrome ,
Original file line number Diff line number Diff line change @@ -492,6 +492,21 @@ void createHandle() {
492492 }
493493 if (OS .isChrome ) {
494494 btnHandle .className += " " + btnHandle .className + "-chrome" ;
495+ } else if (OS .isSafari ) {
496+ boolean isSafari4Plus = false ;
497+ /**
498+ * @j2sNative
499+ * var ua = navigator.userAgent;
500+ * var verIdx = ua.indexOf ("Version/");
501+ * if (verIdx != -1) {
502+ * var verStr = ua.substring (verIdx + 8);
503+ * var verNumber = parseFloat (verStr);
504+ * isSafari4Plus = verNumber >= 4.0
505+ * }
506+ */ {}
507+ if (!isSafari4Plus ) { // There is no need of CSS hack for Safari 4.0+
508+ btnHandle .className += " " + btnHandle .className + "-safari" ;
509+ }
495510 }
496511 }
497512 btnHandle .onmouseover = new RunnableCompatibility () {
You can’t perform that action at this time.
0 commit comments