[Webkit-unassigned] [Bug 58837] Fieldset disabled attribute does not work
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 29 12:20:01 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=58837
--- Comment #20 from Naoki Takano <takano.naoki at gmail.com> 2011-04-29 12:20:01 PST ---
Darin,
Thank you for your comment.
I have a couple of questions to make sure.
(In reply to comment #19)
> I don’t think rare data is relevant here. For the record, the cost of adding new rare data is:
>
> 1) Every nodes with rare data uses a bit more memory.
> 2) If this adds rare data to more nodes, then memory use goes up by a lot because all other rare data is allocated for each node, too.
>
> But having a pointer to the fieldset from every form element is not the right way to go about this. Instead, when a fieldset is disabled we should iterate all the form items in the fieldset and tell them its state has changed. Then the form items would only need a single bit to keep track of whether the fieldset is disabled.
I got it. I will add a single bit flag (something like "bool m_parentDisabled : 1;"?) in HTMLFormControlElement. The flag should be independent from m_disabled, because that is only for HTMLFormControlElement instance.
> Similarly we need to detect when DOM manipulations change which fieldset a form element is in.
I have a question. So do you mean to traverse the whole child nodes of fieldset whenever DOM manipulation of HTMLFormControlEmenet happens? It sounds like pretty heavy if here are many fieldsets... What do you think?
> We need to do more than just return the right value from the disabled function; there is work to do at the time the disabled state changed. We need to trigger the appropriate style recalculation. Actively toggling a flag may is probably the best way to get the code right.
>
> The code in the patch is not really close to right yet, because it doesn’t deal with the style recalculation issue at all.
Ok, I want to make sure. If I try to implement how you suggested here, I will make the new function "setParentDisabled(bool)" in HTMLFormControlElement and triggers setNeedsStyleRecalc() inside. Also when fieldset disable flag is changed, then child setParentDisabled() fucntions are called. Is this correct?
Thanks
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list