Bug 76261 - Select attribute of HTMLContentElement should be able to be changed dynamically.
: Select attribute of HTMLContentElement should be able to be changed dynamically.
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: HTML DOM
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks: 56973 75301 77584
  Show dependency treegraph
 
Reported: 2012-01-13 02:20 PST by Shinya Kawanaka
Modified: 2012-02-01 19:22 PST (History)
7 users (show)

See Also:


Attachments
Patch (12.75 KB, patch)
2012-02-01 00:59 PST, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (12.73 KB, patch)
2012-02-01 17:10 PST, Shinya Kawanaka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shinya Kawanaka 2012-01-13 02:20:58 PST
The select attribute introduced in Bug 75302 cannot be changed dynamically.
When select is changed, re-layout or something should occur.
Comment 1 Shinya Kawanaka 2012-02-01 00:59:39 PST
Created attachment 124898 [details]
Patch
Comment 2 Hajime Morrita 2012-02-01 01:29:35 PST
Comment on attachment 124898 [details]
Patch

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

> Source/WebCore/html/shadow/HTMLContentElement.cpp:128
> +            root->shadowHost()->setNeedsStyleRecalc();

Do we need both? I hope setNeedsShadowTreeStyleRecalc() sufficient.

> LayoutTests/fast/dom/shadow/content-element-select-dynamic.html:122
> +            document.getElementById('expect-container').innerHTML = "<div><span>BEFORE</span><span>LIGHT 2</span><span>AFTER</span></div>";

How about to reverse the order between above two lines to minimize side-effect of innerHTML setter?

> LayoutTests/fast/dom/shadow/content-element-select-dynamic.html:244
> +

If we already have similar test, could you consider to share the test framework?
Comment 3 Gyuyoung Kim 2012-02-01 02:28:00 PST
Comment on attachment 124898 [details]
Patch

Attachment 124898 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/11389387
Comment 4 Shinya Kawanaka 2012-02-01 17:10:10 PST
Created attachment 125048 [details]
Patch
Comment 5 Shinya Kawanaka 2012-02-01 17:11:02 PST
(In reply to comment #2)
> (From update of attachment 124898 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=124898&action=review
> 
> > Source/WebCore/html/shadow/HTMLContentElement.cpp:128
> > +            root->shadowHost()->setNeedsStyleRecalc();
> 
> Do we need both? I hope setNeedsShadowTreeStyleRecalc() sufficient.

Done.

> 
> > LayoutTests/fast/dom/shadow/content-element-select-dynamic.html:122
> > +            document.getElementById('expect-container').innerHTML = "<div><span>BEFORE</span><span>LIGHT 2</span><span>AFTER</span></div>";
> 
> How about to reverse the order between above two lines to minimize side-effect of innerHTML setter?

Done.

> 
> > LayoutTests/fast/dom/shadow/content-element-select-dynamic.html:244
> > +
> 
> If we already have similar test, could you consider to share the test framework?

I want to do this in a separate bug.
Comment 6 WebKit Review Bot 2012-02-01 19:22:38 PST
Comment on attachment 125048 [details]
Patch

Clearing flags on attachment: 125048

Committed r106527: <http://trac.webkit.org/changeset/106527>
Comment 7 WebKit Review Bot 2012-02-01 19:22:43 PST
All reviewed patches have been landed.  Closing bug.