Changeset 202159 in webkit
- Timestamp:
- Jun 16, 2016 10:19:29 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202158 r202159 1 2016-06-16 Benjamin Poulain <bpoulain@apple.com> 2 3 :in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs 4 https://bugs.webkit.org/show_bug.cgi?id=156530 5 6 Reviewed by Simon Fraser. 7 8 * fast/css/pseudo-in-range-on-disabled-input-basics-expected.html: Added. 9 * fast/css/pseudo-in-range-on-disabled-input-basics.html: Added. 10 * fast/css/pseudo-in-range-on-readonly-input-basics-expected.html: Added. 11 * fast/css/pseudo-in-range-on-readonly-input-basics.html: Added. 12 * fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial-expected.html: Added. 13 * fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial.html: Added. 14 * fast/css/pseudo-out-of-range-on-disabled-input-basics-expected.html: Added. 15 * fast/css/pseudo-out-of-range-on-disabled-input-basics.html: Added. 16 * fast/css/pseudo-out-of-range-on-readonly-input-basics-expected.html: Added. 17 * fast/css/pseudo-out-of-range-on-readonly-input-basics.html: Added. 18 * fast/selectors/in-range-out-of-range-style-update-expected.txt: Added. 19 * fast/selectors/in-range-out-of-range-style-update.html: Added. 20 1 21 2016-06-16 Gyuyoung Kim <gyuyoung.kim@webkit.org> 2 22 -
trunk/LayoutTests/imported/w3c/ChangeLog
r202143 r202159 1 2016-06-16 Benjamin Poulain <bpoulain@apple.com> 2 3 :in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs 4 https://bugs.webkit.org/show_bug.cgi?id=156530 5 6 Reviewed by Simon Fraser. 7 8 * web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt: 9 1 10 2016-06-16 Benjamin Poulain <bpoulain@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt
r202143 r202159 1 1 2 2 3 FAIL ':in-range' matches all elements that are candidates for constraint validation, have range limitations, and that are neither suffering from an underflow nor suffering from an overflow assert_array_equals: lengths differ, expected 10 got 73 FAIL ':in-range' matches all elements that are candidates for constraint validation, have range limitations, and that are neither suffering from an underflow nor suffering from an overflow assert_array_equals: lengths differ, expected 10 got 5 4 4 FAIL ':out-of-range' matches all elements that are candidates for constraint validation, have range limitations, and that are either suffering from an underflow or suffering from an overflow assert_array_equals: lengths differ, expected 12 got 2 5 FAIL ':in-range' update number1's value < min assert_array_equals: lengths differ, expected 9 got 65 FAIL ':in-range' update number1's value < min assert_array_equals: lengths differ, expected 9 got 4 6 6 FAIL ':out-of-range' update number1's value < min assert_array_equals: lengths differ, expected 13 got 3 7 FAIL ':in-range' update number3's min < value assert_array_equals: lengths differ, expected 10 got 77 FAIL ':in-range' update number3's min < value assert_array_equals: lengths differ, expected 10 got 5 8 8 FAIL ':out-of-range' update number3's min < value assert_array_equals: lengths differ, expected 12 got 2 9 9 -
trunk/Source/WebCore/ChangeLog
r202156 r202159 1 2016-06-16 Benjamin Poulain <bpoulain@apple.com> 2 3 :in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs 4 https://bugs.webkit.org/show_bug.cgi?id=156530 5 6 Reviewed by Simon Fraser. 7 8 Elements should only match :in-range and :out-of-range 9 when they are candidate for constraint validation. 10 11 Tests: fast/css/pseudo-in-range-on-disabled-input-basics.html 12 fast/css/pseudo-in-range-on-readonly-input-basics.html 13 fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial.html 14 fast/css/pseudo-out-of-range-on-disabled-input-basics.html 15 fast/css/pseudo-out-of-range-on-readonly-input-basics.html 16 fast/selectors/in-range-out-of-range-style-update.html 17 18 * html/BaseDateAndTimeInputType.cpp: 19 (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged): 20 * html/NumberInputType.cpp: 21 (WebCore::NumberInputType::minOrMaxAttributeChanged): 22 I forgot to handle style update in r202143. 23 This is covered by the new style invalidation test. 24 25 * html/BaseDateAndTimeInputType.h: 26 * html/HTMLInputElement.cpp: 27 (WebCore::HTMLInputElement::isInRange): 28 (WebCore::HTMLInputElement::isOutOfRange): 29 1 30 2016-06-16 Frederic Wang <fwang@igalia.com> 2 31 -
trunk/Source/WebCore/html/BaseDateAndTimeInputType.cpp
r165897 r202159 1 1 /* 2 2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 91 92 { 92 93 return true; 94 } 95 96 void BaseDateAndTimeInputType::minOrMaxAttributeChanged() 97 { 98 element().setNeedsStyleRecalc(); 93 99 } 94 100 -
trunk/Source/WebCore/html/BaseDateAndTimeInputType.h
r197563 r202159 1 1 /* 2 2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 67 68 bool valueMissing(const String&) const override; 68 69 Decimal defaultValueForStepUp() const override; 70 void minOrMaxAttributeChanged() override; 69 71 bool isSteppable() const override; 70 72 virtual String serializeWithMilliseconds(double) const; -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r201942 r202159 3 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 4 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014 Apple Inc. All rights reserved.5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2016 Apple Inc. All rights reserved. 6 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) … … 1371 1371 bool HTMLInputElement::isInRange() const 1372 1372 { 1373 return m_inputType->isInRange(value());1373 return willValidate() && m_inputType->isInRange(value()); 1374 1374 } 1375 1375 1376 1376 bool HTMLInputElement::isOutOfRange() const 1377 1377 { 1378 return m_inputType->isOutOfRange(value());1378 return willValidate() && m_inputType->isOutOfRange(value()); 1379 1379 } 1380 1380 -
trunk/Source/WebCore/html/NumberInputType.cpp
r202143 r202159 1 1 /* 2 2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.3 * Copyright (C) 2011, 2016 Apple Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 300 300 { 301 301 InputType::minOrMaxAttributeChanged(); 302 HTMLInputElement& element = this->element(); 303 element.setNeedsStyleRecalc(); 304 if (RenderObject* renderer = element.renderer()) 305 renderer->setNeedsLayoutAndPrefWidthsRecalc(); 306 } 307 308 void NumberInputType::stepAttributeChanged() 309 { 310 InputType::stepAttributeChanged(); 302 311 303 312 if (element().renderer()) … … 305 314 } 306 315 307 void NumberInputType::stepAttributeChanged()308 {309 InputType::stepAttributeChanged();310 311 if (element().renderer())312 element().renderer()->setNeedsLayoutAndPrefWidthsRecalc();313 }314 315 316 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.