RESOLVED FIXED Bug 50660
Convert <progress> shadow DOM to a DOM-based shadow.
https://bugs.webkit.org/show_bug.cgi?id=50660
Summary Convert <progress> shadow DOM to a DOM-based shadow.
Hajime Morrita
Reported 2010-12-07 18:21:11 PST
<progress> is holding its shadows as a member variables of RenderProgress. We could move them to HTMLMeterElement.
Attachments
Patch (12.27 KB, patch)
2011-01-28 00:56 PST, Hajime Morrita
no flags
Patch (12.83 KB, patch)
2011-01-31 03:26 PST, Hajime Morrita
dglazkov: review+
Hajime Morrita
Comment 1 2010-12-07 18:22:53 PST
(In reply to comment #0) > <progress> is holding its shadows as a member variables of RenderProgress. > We could move them to HTMLMeterElement. No, to HTMLProgressElement.
Hajime Morrita
Comment 2 2011-01-28 00:56:58 PST
Hajime Morrita
Comment 3 2011-01-28 00:58:36 PST
Hi Dimitri, could you take a look? I know this is just the first step of the shadow refresh and I'll eliminate more renderer-to-dom dependency in following changes.
Dimitri Glazkov (Google)
Comment 4 2011-01-28 08:43:26 PST
Comment on attachment 80424 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80424&action=review Ok. You probably should've put this patch into a separate bug, since it doesn't technically fix the bug yet -- and use this bug as a meta-bug :) > Source/WebCore/html/HTMLProgressElement.cpp:40 > +class ProgressBarValueElement : public ShadowBlockElement { Does it need to be ShadowBlockElement anymore? But I guess that's what the next patch is about.
Hajime Morrita
Comment 5 2011-01-30 20:39:39 PST
Hajime Morrita
Comment 6 2011-01-30 20:46:37 PST
HI Dimitri, Thank you for reviewing! (In reply to comment #4) > (From update of attachment 80424 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=80424&action=review > > Ok. You probably should've put this patch into a separate bug, since it doesn't technically fix the bug yet -- and use this bug as a meta-bug :) Sure. I'll do so ... or introduce another bug as a tracking bug. > > > Source/WebCore/html/HTMLProgressElement.cpp:40 > > +class ProgressBarValueElement : public ShadowBlockElement { > > Does it need to be ShadowBlockElement anymore? But I guess that's what the next patch is about. I'll do this when attacking <meter>. But I have a few item on <progress> side yet.
Simon Fraser (smfr)
Comment 7 2011-01-30 22:11:06 PST
Simon Fraser (smfr)
Comment 8 2011-01-30 22:18:53 PST
Patch was backed out via bug 53412.
Hajime Morrita
Comment 9 2011-01-31 03:26:50 PST
Hajime Morrita
Comment 10 2011-01-31 03:29:44 PST
Simon, thank you for save the tree. I'm sorry for the breakage. Dimitri, could you take a look again? The difference from the last patch is ProgressBarValueElement::detach(). The last patch missed to unlink from host -> shadow reference, which caused the inconsistency. (shadow -> host reference is unlinked by ShadowElement::detach()). Thanks in advance.
Dimitri Glazkov (Google)
Comment 11 2011-01-31 08:50:01 PST
Comment on attachment 80629 [details] Patch Please make sure to run tests before landing.
Hajime Morrita
Comment 12 2011-01-31 17:12:36 PST
> Please make sure to run tests before landing. Yes, I will. I'm really sorry for that. The test was done only under dom/HTMLProgressElement/ at the last patch and I was wrong.
Hajime Morrita
Comment 13 2011-01-31 20:06:10 PST
Erik Arvidsson
Comment 14 2011-02-01 10:54:10 PST
Comment on attachment 80629 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80629&action=review > Source/WebCore/rendering/RenderProgress.cpp:105 > + if (!(valuePart()->renderer() && valuePart()->renderer()->style()->hasAppearance())) Why does this need appearance? What happens if I do? ::-webkit-progress-bar-value { -webkit-appearance: none; background-color: red; }
Hajime Morrita
Comment 15 2011-02-01 20:24:42 PST
(In reply to comment #14) > (From update of attachment 80629 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=80629&action=review > > > Source/WebCore/rendering/RenderProgress.cpp:105 > > + if (!(valuePart()->renderer() && valuePart()->renderer()->style()->hasAppearance())) > > Why does this need appearance? What happens if I do? > > ::-webkit-progress-bar-value { > -webkit-appearance: none; > background-color: red; > } Shadow rendered even if "none" is given if host's appearance is set to "none". But yes, it's confusing.... I'll revise the logic in coming patch(es).
Note You need to log in before you can comment on or make changes to this bug.