Changeset 88793 in webkit
- Timestamp:
- Jun 14, 2011 6:22:18 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r88792 r88793 1 2011-06-14 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Kent Tamura. 4 5 <progress> should support :indeterminate pseudo-class 6 https://bugs.webkit.org/show_bug.cgi?id=62430 7 8 * fast/dom/HTMLProgressElement/indeterminate-progress-001.html: Added. 9 * fast/dom/HTMLProgressElement/indeterminate-progress-002-expected.txt: Added. 10 * fast/dom/HTMLProgressElement/indeterminate-progress-002.html: Added. 11 * platform/mac/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.png: Added. 12 * platform/mac/fast/dom/HTMLProgressElement/indeterminate-progress-001-expected.txt: Added. 13 * platform/chromium/test_expectations.txt: 14 1 15 2011-06-14 Pavel Feldman <pfeldman@google.com> 2 16 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r88789 r88793 3989 3989 BUGCR85755 : fast/js/exception-properties.html = TEXT 3990 3990 3991 BUGWK62430 : fast/dom/HTMLProgressElement/indeterminate-progress-001.html = FAIL 3992 3991 3993 // Has been flaky, probably since birth. 3992 3994 BUGWK62580 : fast/loader/inherit-charset-to-empty-frame.html = PASS TEXT -
trunk/Source/WebCore/ChangeLog
r88792 r88793 1 2011-06-14 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Kent Tamura. 4 5 <progress> should support :indeterminate pseudo-class 6 https://bugs.webkit.org/show_bug.cgi?id=62430 7 8 Add support for :indeterminate pseudo class for progress element. 9 10 Tests: fast/dom/HTMLProgressElement/indeterminate-progress-001.html 11 fast/dom/HTMLProgressElement/indeterminate-progress-002.html 12 13 * css/CSSStyleSelector.cpp: 14 (WebCore::CSSStyleSelector::canShareStyleWithControl): 15 (WebCore::CSSStyleSelector::canShareStyleWithElement): 16 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): 17 * html/HTMLProgressElement.cpp: 18 (WebCore::HTMLProgressElement::isDeterminate): 19 (WebCore::HTMLProgressElement::didElementStateChange): 20 * html/HTMLProgressElement.h: 21 1 22 2011-06-14 Pavel Feldman <pfeldman@google.com> 2 23 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r88553 r88793 66 66 #include "HTMLInputElement.h" 67 67 #include "HTMLNames.h" 68 #include "HTMLProgressElement.h" 68 69 #include "HTMLTextAreaElement.h" 69 70 #include "KeyframeList.h" … … 1020 1021 } 1021 1022 1023 bool CSSStyleSelector::canShareStyleWithControl(StyledElement* element) const 1024 { 1025 #if ENABLE(PROGRESS_TAG) 1026 if (element->hasTagName(progressTag)) { 1027 if (!m_element->hasTagName(progressTag)) 1028 return false; 1029 1030 HTMLProgressElement* thisProgressElement = static_cast<HTMLProgressElement*>(element); 1031 HTMLProgressElement* otherProgressElement = static_cast<HTMLProgressElement*>(m_element); 1032 if (thisProgressElement->isDeterminate() != otherProgressElement->isDeterminate()) 1033 return false; 1034 1035 return true; 1036 } 1037 #endif 1038 1039 HTMLInputElement* thisInputElement = element->toInputElement(); 1040 HTMLInputElement* otherInputElement = m_element->toInputElement(); 1041 1042 if (!thisInputElement || !otherInputElement) 1043 return false; 1044 1045 if (thisInputElement->isAutofilled() != otherInputElement->isAutofilled()) 1046 return false; 1047 if (thisInputElement->isChecked() != otherInputElement->isChecked()) 1048 return false; 1049 if (thisInputElement->isIndeterminate() != otherInputElement->isIndeterminate()) 1050 return false; 1051 1052 if (element->isEnabledFormControl() != m_element->isEnabledFormControl()) 1053 return false; 1054 1055 if (element->isDefaultButtonForForm() != m_element->isDefaultButtonForForm()) 1056 return false; 1057 1058 if (!m_element->document()->containsValidityStyleRules()) 1059 return false; 1060 1061 bool willValidate = element->willValidate(); 1062 1063 if (willValidate != m_element->willValidate()) 1064 return false; 1065 1066 if (willValidate && (element->isValidFormControlElement() != m_element->isValidFormControlElement())) 1067 return false; 1068 1069 if (element->isInRange() != m_element->isInRange()) 1070 return false; 1071 1072 if (element->isOutOfRange() != m_element->isOutOfRange()) 1073 return false; 1074 1075 return true; 1076 } 1077 1022 1078 bool CSSStyleSelector::canShareStyleWithElement(Node* node) const 1023 1079 { … … 1075 1131 return false; 1076 1132 1077 if (isControl) { 1078 HTMLInputElement* thisInputElement = element->toInputElement(); 1079 HTMLInputElement* otherInputElement = m_element->toInputElement(); 1080 1081 if (!thisInputElement || !otherInputElement) 1082 return false; 1083 1084 if (thisInputElement->isAutofilled() != otherInputElement->isAutofilled()) 1085 return false; 1086 if (thisInputElement->isChecked() != otherInputElement->isChecked()) 1087 return false; 1088 if (thisInputElement->isIndeterminate() != otherInputElement->isIndeterminate()) 1089 return false; 1090 1091 if (element->isEnabledFormControl() != m_element->isEnabledFormControl()) 1092 return false; 1093 1094 if (element->isDefaultButtonForForm() != m_element->isDefaultButtonForForm()) 1095 return false; 1096 1097 if (!m_element->document()->containsValidityStyleRules()) 1098 return false; 1099 1100 bool willValidate = element->willValidate(); 1101 1102 if (willValidate != m_element->willValidate()) 1103 return false; 1104 1105 if (willValidate && (element->isValidFormControlElement() != m_element->isValidFormControlElement())) 1106 return false; 1107 1108 if (element->isInRange() != m_element->isInRange()) 1109 return false; 1110 1111 if (element->isOutOfRange() != m_element->isOutOfRange()) 1112 return false; 1113 } 1133 if (isControl && !canShareStyleWithControl(element)) 1134 return false; 1114 1135 1115 1136 if (style->transitions() || style->animations()) … … 2882 2903 if (!e || !e->isFormControlElement()) 2883 2904 break; 2905 2906 #if ENABLE(PROGRESS_TAG) 2907 if (e->hasTagName(progressTag)) { 2908 HTMLProgressElement* progress = static_cast<HTMLProgressElement*>(e); 2909 if (progress && !progress->isDeterminate()) 2910 return true; 2911 break; 2912 } 2913 #endif 2914 2884 2915 HTMLInputElement* inputElement = e->toInputElement(); 2885 2916 if (inputElement && inputElement->isIndeterminate()) -
trunk/Source/WebCore/css/CSSStyleSelector.h
r87362 r88793 316 316 317 317 void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&); 318 319 bool canShareStyleWithControl(StyledElement*) const; 318 320 319 321 void applyProperty(int id, CSSValue*); -
trunk/Source/WebCore/html/HTMLProgressElement.cpp
r86526 r88793 136 136 } 137 137 138 bool HTMLProgressElement::isDeterminate() 139 { 140 double currentPosition = position(); 141 return (HTMLProgressElement::IndeterminatePosition != currentPosition && HTMLProgressElement::InvalidPosition != currentPosition); 142 } 143 138 144 void HTMLProgressElement::didElementStateChange() 139 145 { 140 146 m_value->setWidthPercentage(position()*100); 141 if (renderer()) 147 if (renderer()) { 148 RenderProgress* render = toRenderProgress(renderer()); 149 bool wasDeterminate = render->isDeterminate(); 142 150 renderer()->updateFromElement(); 151 if (wasDeterminate != isDeterminate()) 152 setNeedsStyleRecalc(); 153 } 143 154 } 144 155 -
trunk/Source/WebCore/html/HTMLProgressElement.h
r86526 r88793 44 44 double position() const; 45 45 46 bool isDeterminate(); 47 46 48 virtual bool canContainRangeEndPoint() const { return false; } 47 49
Note: See TracChangeset
for help on using the changeset viewer.