Bug 60341 - The position of validation message bubble is wrong for non text fields.
Summary: The position of validation message bubble is wrong for non text fields.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 28649
  Show dependency treegraph
 
Reported: 2011-05-05 22:52 PDT by Kent Tamura
Modified: 2011-05-11 02:12 PDT (History)
3 users (show)

See Also:


Attachments
Demo and images (94.78 KB, patch)
2011-05-05 22:55 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch (105.45 KB, patch)
2011-05-06 02:20 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-02 (4.69 MB, application/zip)
2011-05-06 09:48 PDT, WebKit Review Bot
no flags Details
Patch 2 (108.42 KB, patch)
2011-05-10 23:10 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-01 (1.18 MB, application/zip)
2011-05-10 23:28 PDT, WebKit Review Bot
no flags Details
Patch 3 (68.45 KB, patch)
2011-05-11 01:35 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-05-05 22:52:39 PDT
I'll attach images presenting how wrong they are ;-(
Comment 1 Kent Tamura 2011-05-05 22:55:50 PDT
Created attachment 92544 [details]
Demo and images
Comment 2 Kent Tamura 2011-05-06 02:20:00 PDT
Created attachment 92564 [details]
Patch
Comment 3 WebKit Review Bot 2011-05-06 09:48:07 PDT
Comment on attachment 92564 [details]
Patch

Attachment 92564 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8608022

New failing tests:
fast/forms/validation-message-appearance-textarea.html
fast/forms/validation-message-appearance-checkbox.html
fast/forms/validation-message-appearance-menulist.html
fast/forms/validation-message-appearance-radio.html
fast/forms/validation-message-appearance.html
fast/forms/validation-message-appearance-listbox.html
Comment 4 WebKit Review Bot 2011-05-06 09:48:16 PDT
Created attachment 92592 [details]
Archive of layout-test-results from ec2-cr-linux-02

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-02  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 5 Kent Tamura 2011-05-10 23:10:03 PDT
Created attachment 93076 [details]
Patch 2

Update test_expectations.txt too.
Comment 6 WebKit Review Bot 2011-05-10 23:28:02 PDT
Comment on attachment 93076 [details]
Patch 2

Attachment 93076 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8687213

New failing tests:
fast/forms/validation-message-appearance.html
Comment 7 WebKit Review Bot 2011-05-10 23:28:07 PDT
Created attachment 93077 [details]
Archive of layout-test-results from ec2-cr-linux-01

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-01  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 8 Hajime Morrita 2011-05-10 23:37:42 PDT
Comment on attachment 93076 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=93076&action=review

Just for curious: Is it reasonable to use Markup.dump() helper JS function to dump shadow DOM tree, instead of dump the render tree?
I think using pixel tests is OK, but shadow tree is essentially about DOM so we can possibly do more DOM centric approach for testing.

> Source/WebCore/html/ValidationMessage.cpp:142
>      ExceptionCode ec = 0;

It might be nice if we had separate getter function for the bubble position.
Comment 9 Kent Tamura 2011-05-11 01:35:57 PDT
Created attachment 93089 [details]
Patch 3

Converted to text dump
Comment 10 Kent Tamura 2011-05-11 01:46:06 PDT
Comment on attachment 93076 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=93076&action=review

Markup.dump() is not enough because the purpose of these tests is to check the position of validation message bubbles.
I thought dumpAsText() didn't work because we had no perfect way to obtain a validation message bubble node under ShadowRoot. The bubble node is always the last child of ShadowRoot for now, but it might be changed.
I changed the mind. Updating test code in the future is better than maintaining pixel tests.

>> Source/WebCore/html/ValidationMessage.cpp:142
>>      ExceptionCode ec = 0;
> 
> It might be nice if we had separate getter function for the bubble position.

ok, I move the code to a separated function though it's not a getter.
Comment 11 Hajime Morrita 2011-05-11 01:49:52 PDT
Comment on attachment 93089 [details]
Patch 3

Looks good.
Comment 12 Kent Tamura 2011-05-11 02:11:48 PDT
Comment on attachment 93089 [details]
Patch 3

Clearing flags on attachment: 93089

Committed r86224: <http://trac.webkit.org/changeset/86224>
Comment 13 Kent Tamura 2011-05-11 02:12:18 PDT
All reviewed patches have been landed.  Closing bug.