[Win] fast/forms/HTMLOptionElement_label03.html failing on win7
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Dec 2015 20:46:13 +0000 (20:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Dec 2015 20:46:13 +0000 (20:46 +0000)
commitf2f750abf37a1de6a045d695e15821a5292181a3
tree29d4778e864e75069e6bd1e5657e03a322f506f6
parent853d579df86ba5732b6c7eeee5abdb2e09588ea2
[Win] fast/forms/HTMLOptionElement_label03.html failing on win7
https://bugs.webkit.org/show_bug.cgi?id=150909
rdar://problem/23539673

Patch by Keith Rollin <krollin@apple.com> on 2015-12-03
Reviewed by Darin Adler.

Source/WebCore:

When returning text to be displayed, an <option> element will return
the value of a label attribute if it exists, or the text content as a
fallback. The failing test concerned the display of a <select>
element when it contained a sole <option> element that had a label
attribute set to a single space. When displayed, various
platform-specific bits of code will strip off the leading and trailing
whitespace. However, when WebKit would use this text to measure how
wide the <select> popup menu button should be, it would not strip off
spaces, leading to the calculated width being wider than necessary.
The approach taken to fix this is to strip whitespace in the label
attribute before it is returned from the <option> element.

No new tests. fast/forms/HTMLOptionElement_label03.html had been
marked as being expected to fail in TestExpectations; that test now
succeeds.

* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::label):

LayoutTests:

Mark fast/forms/HTMLOptionElement_label03.html as being expected to
pass. Also update some text in HTMLOptionElement_label02.html and
HTMLOptionElement_label03.html so that it no longer refers to our
trying to match IE (which we are no longer doing).

* fast/forms/HTMLOptionElement_label02.html:
* fast/forms/HTMLOptionElement_label03.html:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/HTMLOptionElement_label02.html
LayoutTests/fast/forms/HTMLOptionElement_label03.html
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLOptionElement.cpp