Changeset 115706 in webkit
- Timestamp:
- Apr 30, 2012 8:21:54 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r115704 r115706 1 2012-04-30 Ilya Sherman <isherman@chromium.org> 2 3 Unreviewed, rolling out r113511. 4 http://trac.webkit.org/changeset/113511 5 https://bugs.webkit.org/show_bug.cgi?id=66032 6 https://bugs.webkit.org/show_bug.cgi?id=85150 7 8 Regression: Many autofilled form fields lack the default 9 autofill background even when authors don’t override the 10 autofill colors 11 12 * fast/forms/input-autofilled-expected.txt: 13 * fast/forms/input-autofilled.html: 14 1 15 2012-04-30 Keishi Hattori <keishi@webkit.org> 2 16 -
trunk/LayoutTests/fast/forms/input-autofilled-expected.txt
r113511 r115706 1 1 This tests that foreground and background colors properly change for autofilled inputs. It can only be run using DumpRenderTree. 2 3 PASS computedStyleUnstyled.color == originalForegroundUnstyled is true4 PASS computedStyleUnstyled.backgroundColor == originalBackgroundUnstyled is false5 PASS computedStyleStyled.color == originalForegroundStyled is true6 PASS computedStyleStyled.backgroundColor == originalBackgroundStyled is true7 PASS computedStyleStyledWithSelector.color == originalForegroundStyledWithSelector is false8 PASS computedStyleStyledWithSelector.backgroundColor == originalBackgroundStyledWithSelector is false9 PASS computedStyleUnstyled.color == originalForegroundUnstyled is true10 PASS computedStyleUnstyled.backgroundColor == originalBackgroundUnstyled is true11 PASS computedStyleStyled.color == originalForegroundStyled is true12 PASS computedStyleStyled.backgroundColor == originalBackgroundStyled is true13 PASS computedStyleStyledWithSelector.color == originalForegroundStyledWithSelector is true14 PASS computedStyleStyledWithSelector.backgroundColor == originalBackgroundStyledWithSelector is true15 2 3 PASS 4 -
trunk/LayoutTests/fast/forms/input-autofilled.html
r113511 r115706 8 8 } 9 9 10 var unstyled = document.getElementById('unstyled'); 11 var styled = document.getElementById('styled'); 12 var styledWithSelector = document.getElementById('styledWithSelector'); 13 computedStyleUnstyled = document.defaultView.getComputedStyle(unstyled); 14 originalForegroundUnstyled = computedStyleUnstyled.color; 15 originalBackgroundUnstyled = computedStyleUnstyled.backgroundColor; 16 computedStyleStyled = document.defaultView.getComputedStyle(styled); 17 originalForegroundStyled = computedStyleStyled.color; 18 originalBackgroundStyled = computedStyleStyled.backgroundColor; 19 computedStyleStyledWithSelector = document.defaultView.getComputedStyle(styledWithSelector); 20 originalForegroundStyledWithSelector = computedStyleStyledWithSelector.color; 21 originalBackgroundStyledWithSelector = computedStyleStyledWithSelector.backgroundColor; 10 var tf = document.getElementById('tf'); 11 var computedStyle = document.defaultView.getComputedStyle(tf); 12 var originalForeground = computedStyle.color; 13 var originalBackground = computedStyle.backgroundColor; 22 14 23 15 if (window.layoutTestController) { 24 layoutTestController.setAutofilled(unstyled, true); 25 layoutTestController.setAutofilled(styled, true); 26 layoutTestController.setAutofilled(styledWithSelector, true); 16 layoutTestController.setAutofilled(tf, true); 27 17 } 28 18 29 // For the unstyled element, the background color should change. The foreground color should not change, 30 // as the default foreground color for an autofilled input is the same as for a non-autofilled input. 31 // For the styled element, the author-specified style should take precedence, so neither color should change. 32 // For the element styled with the :-webkit-autofill selector, both the foreground and the background colors 33 // should change. 34 computedStyleUnstyled = document.defaultView.getComputedStyle(unstyled); 35 computedStyleStyled = document.defaultView.getComputedStyle(styled); 36 computedStyleStyledWithSelector = document.defaultView.getComputedStyle(styledWithSelector); 37 shouldBeTrue("computedStyleUnstyled.color == originalForegroundUnstyled"); 38 shouldBeFalse("computedStyleUnstyled.backgroundColor == originalBackgroundUnstyled"); 39 shouldBeTrue("computedStyleStyled.color == originalForegroundStyled"); 40 shouldBeTrue("computedStyleStyled.backgroundColor == originalBackgroundStyled"); 41 shouldBeFalse("computedStyleStyledWithSelector.color == originalForegroundStyledWithSelector"); 42 shouldBeFalse("computedStyleStyledWithSelector.backgroundColor == originalBackgroundStyledWithSelector"); 19 // Both the foreground and background colors should change. 20 computedStyle = document.defaultView.getComputedStyle(tf); 21 var autofilledForeground = computedStyle.color; 22 var autofilledBackground = computedStyle.backgroundColor; 23 if (autofilledForeground == originalForeground) { 24 testFailed('Foreground color did not change when autofilled.'); 25 return; 26 } 27 if (autofilledBackground == originalBackground) { 28 testFailed('Background color did not change when autofilled.'); 29 return; 30 } 43 31 44 32 if (window.layoutTestController) { 45 layoutTestController.setAutofilled(unstyled, false); 46 layoutTestController.setAutofilled(styled, false); 47 layoutTestController.setAutofilled(styledWithSelector, false); 33 layoutTestController.setAutofilled(tf, false); 48 34 } 49 35 50 36 // Colors should be restored. 51 computedStyleUnstyled = document.defaultView.getComputedStyle(unstyled); 52 computedStyleStyled = document.defaultView.getComputedStyle(styled); 53 shouldBeTrue("computedStyleUnstyled.color == originalForegroundUnstyled"); 54 shouldBeTrue("computedStyleUnstyled.backgroundColor == originalBackgroundUnstyled"); 55 shouldBeTrue("computedStyleStyled.color == originalForegroundStyled"); 56 shouldBeTrue("computedStyleStyled.backgroundColor == originalBackgroundStyled"); 57 shouldBeTrue("computedStyleStyledWithSelector.color == originalForegroundStyledWithSelector"); 58 shouldBeTrue("computedStyleStyledWithSelector.backgroundColor == originalBackgroundStyledWithSelector"); 37 computedStyle = document.defaultView.getComputedStyle(tf); 38 if (computedStyle.color != originalForeground) { 39 testFailed('Foreground color did not revert when un-autofilled.'); 40 return; 41 } 42 if (computedStyle.backgroundColor != originalBackground) { 43 testFailed('Background color did not revert when un-autofilled.'); 44 return; 45 } 46 47 testPassed(''); 59 48 } 60 49 </script> 61 50 62 51 <style> 63 #styled { 64 color: #00FF00; 65 background-color: #00FF00; 66 } 67 68 #styledWithSelector:-webkit-autofill { 69 color: #00FF00; 70 background-color: #00FF00; 52 #tf { 53 color: #FFFFFF; 54 background-color: #FFFFFF; 71 55 } 72 56 </style> … … 75 59 This tests that foreground and background colors properly change for autofilled inputs. It can only be run using DumpRenderTree.<br> 76 60 <form name="fm"> 77 <input type="text" id="unstyled" value="Field value" /> 78 <input type="text" id="styled" value="Field value" /> 79 <input type="text" id="styledWithSelector" value="Field value" /> 61 <input type="text" id="tf" value="Field value" /> 80 62 </form> 81 63 <div id="console"></div> -
trunk/Source/WebCore/ChangeLog
r115705 r115706 1 2012-04-30 Ilya Sherman <isherman@chromium.org> 2 3 Unreviewed, rolling out r113511. 4 http://trac.webkit.org/changeset/113511 5 https://bugs.webkit.org/show_bug.cgi?id=66032 6 https://bugs.webkit.org/show_bug.cgi?id=85150 7 8 Regression: Many autofilled form fields lack the default 9 autofill background even when authors don’t override the 10 autofill colors 11 12 * css/html.css: 13 (input:-webkit-autofill): Restore !important modifiers 14 1 15 2012-04-30 Julien Chaffraix <jchaffraix@webkit.org> 2 16 -
trunk/Source/WebCore/css/html.css
r115052 r115706 533 533 534 534 input:-webkit-autofill { 535 background-color: #FAFFBD ;536 background-image: none;537 color: #000000 ;535 background-color: #FAFFBD !important; 536 background-image:none !important; 537 color: #000000 !important; 538 538 } 539 539
Note: See TracChangeset
for help on using the changeset viewer.