Bug 80564 - Do not refer to resutlsButtonElement and cancelButtonElement to compute paddings of search popups
Summary: Do not refer to resutlsButtonElement and cancelButtonElement to compute paddi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 80479
  Show dependency treegraph
 
Reported: 2012-03-07 20:19 PST by Kent Tamura
Modified: 2012-03-08 08:41 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.96 KB, patch)
2012-03-07 20:27 PST, Kent Tamura
morrita: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-03-07 20:19:59 PST
Do not refer to resutlsButtonElement and cancelButtonElement to compute paddings of search popups
Comment 1 Kent Tamura 2012-03-07 20:27:14 PST
Created attachment 130757 [details]
Patch
Comment 2 Kentaro Hara 2012-03-07 20:33:01 PST
Comment on attachment 130757 [details]
Patch

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

The change looks OK, but I'll delegate the review to another reviewer since I am not familiar with the rendering text.

> Source/WebCore/ChangeLog:11
> +        No behavior change.

Isn't there any existing test that _can_ be affected by this change, if the change were wrong? I wanted to see "Test: xxx.html (No change behavior)", to confirm that the change is correct.
Comment 3 Kent Tamura 2012-03-07 20:36:02 PST
Comment on attachment 130757 [details]
Patch

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

>> Source/WebCore/ChangeLog:11
>> +        No behavior change.
> 
> Isn't there any existing test that _can_ be affected by this change, if the change were wrong? I wanted to see "Test: xxx.html (No change behavior)", to confirm that the change is correct.

Unfortunately, none.  We can't check the appearance of search popup menus because DRT can't capture them.
Comment 4 Hajime Morrita 2012-03-07 20:41:43 PST
Comment on attachment 130757 [details]
Patch

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

>>> Source/WebCore/ChangeLog:11
>>> +        No behavior change.
>> 
>> Isn't there any existing test that _can_ be affected by this change, if the change were wrong? I wanted to see "Test: xxx.html (No change behavior)", to confirm that the change is correct.
> 
> Unfortunately, none.  We can't check the appearance of search popup menus because DRT can't capture them.

We could grab the shadow tree using internals.shadowRoot() and dump its RenderTree using internals.elementRenderTreeAsText()
You can make a reference DOM tree and compare the render-tree of the shadow tree and the referende DOM.
Comment 5 Kent Tamura 2012-03-07 20:47:07 PST
Comment on attachment 130757 [details]
Patch

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

>>>> Source/WebCore/ChangeLog:11
>>>> +        No behavior change.
>>> 
>>> Isn't there any existing test that _can_ be affected by this change, if the change were wrong? I wanted to see "Test: xxx.html (No change behavior)", to confirm that the change is correct.
>> 
>> Unfortunately, none.  We can't check the appearance of search popup menus because DRT can't capture them.
> 
> We could grab the shadow tree using internals.shadowRoot() and dump its RenderTree using internals.elementRenderTreeAsText()
> You can make a reference DOM tree and compare the render-tree of the shadow tree and the referende DOM.

It is not related to this patch.
This patch doesn't change any renderer metrics or any DOM values.  RenderTextControlSingleLine::clientInsetRight() and clientInsetLeft() are passed to platform-specific popup-menu implementation via ChromeClient::createSearchPopupMenu(). DRT doesn't have a way to get these values.
Comment 6 Hajime Morrita 2012-03-07 21:22:58 PST
Comment on attachment 130757 [details]
Patch

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

>>>>> Source/WebCore/ChangeLog:11
>>>>> +        No behavior change.
>>>> 
>>>> Isn't there any existing test that _can_ be affected by this change, if the change were wrong? I wanted to see "Test: xxx.html (No change behavior)", to confirm that the change is correct.
>>> 
>>> Unfortunately, none.  We can't check the appearance of search popup menus because DRT can't capture them.
>> 
>> We could grab the shadow tree using internals.shadowRoot() and dump its RenderTree using internals.elementRenderTreeAsText()
>> You can make a reference DOM tree and compare the render-tree of the shadow tree and the referende DOM.
> 
> It is not related to this patch.
> This patch doesn't change any renderer metrics or any DOM values.  RenderTextControlSingleLine::clientInsetRight() and clientInsetLeft() are passed to platform-specific popup-menu implementation via ChromeClient::createSearchPopupMenu(). DRT doesn't have a way to get these values.

Ah, got it. It would be nice if we have a mock for ChromeClient. But it's a different story...
Comment 7 Kent Tamura 2012-03-07 21:31:46 PST
Committed r110145: <http://trac.webkit.org/changeset/110145>
Comment 8 Dimitri Glazkov (Google) 2012-03-08 08:41:47 PST
This is cool.