Changeset 213542 in webkit
- Timestamp:
- Mar 7, 2017 2:24:19 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r213537 r213542 1 2017-03-07 Chris Dumez <cdumez@apple.com> 2 3 Label of an <option> element should not be displayed in quirks mode 4 https://bugs.webkit.org/show_bug.cgi?id=169296 5 <rdar://problem/30900751> 6 7 Reviewed by Simon Fraser. 8 9 Add layout test coverage. 10 11 * fast/dom/HTMLOptionElement/option-label-quirksmode-expected.html: Added. 12 * fast/dom/HTMLOptionElement/option-label-quirksmode.html: Added. 13 * fast/dom/HTMLOptionElement/option-label-quirksmode2-expected.html: Added. 14 * fast/dom/HTMLOptionElement/option-label-quirksmode2.html: Added. 15 * fast/dom/HTMLOptionElement/option-label-strictmode-expected.html: Added. 16 * fast/dom/HTMLOptionElement/option-label-strictmode.html: Added. 17 1 18 2017-03-07 Ryan Haddad <ryanhaddad@apple.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r213541 r213542 1 2017-03-07 Chris Dumez <cdumez@apple.com> 2 3 Label of an <option> element should not be displayed in quirks mode 4 https://bugs.webkit.org/show_bug.cgi?id=169296 5 <rdar://problem/30900751> 6 7 Reviewed by Simon Fraser. 8 9 Label of an <option> element should not be displayed in quirks mode, to 10 match Chrome and Firefox. However, we should still display the label in 11 strict mode, as per the HTML specification: 12 - https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2 13 14 Chrome renders the label in strict mode, same as us. Firefox does not: 15 - https://bugzilla.mozilla.org/show_bug.cgi?id=1345242 16 17 Tests: fast/dom/HTMLOptionElement/option-label-quirksmode.html 18 fast/dom/HTMLOptionElement/option-label-quirksmode2.html 19 fast/dom/HTMLOptionElement/option-label-strictmode.html 20 21 * html/HTMLOptionElement.cpp: 22 (WebCore::HTMLOptionElement::displayLabel): 23 (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel): 24 * html/HTMLOptionElement.h: 25 1 26 2017-03-07 Dean Jackson <dino@apple.com> 2 27 -
trunk/Source/WebCore/html/HTMLOptionElement.cpp
r210319 r213542 277 277 } 278 278 279 // Same as label() but ignores the label content attribute in quirks mode for compatibility with other browsers. 280 String HTMLOptionElement::displayLabel() const 281 { 282 if (document().inQuirksMode()) 283 return collectOptionInnerText().stripWhiteSpace(isHTMLSpace).simplifyWhiteSpace(isHTMLSpace); 284 return label(); 285 } 286 279 287 void HTMLOptionElement::setLabel(const String& label) 280 288 { … … 296 304 ContainerNode* parent = parentNode(); 297 305 if (is<HTMLOptGroupElement>(parent)) 298 return " " + label();299 return label();306 return " " + displayLabel(); 307 return displayLabel(); 300 308 } 301 309 -
trunk/Source/WebCore/html/HTMLOptionElement.h
r208096 r213542 55 55 56 56 WEBCORE_EXPORT String label() const; 57 String displayLabel() const; 57 58 WEBCORE_EXPORT void setLabel(const String&); 58 59
Note: See TracChangeset
for help on using the changeset viewer.