[Webkit-unassigned] [Bug 160331] Setter on style element's textContent or cssText doesn't trigger style recalc
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 26 10:05:37 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160331
Daniel Bates <dbates at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #289818|review+ |review?
Flags| |
--- Comment #12 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 289818
--> https://bugs.webkit.org/attachment.cgi?id=289818
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=289818&action=review
> Source/WebCore/dom/AuthorStyleSheets.cpp:343
> - if (m_shadowRoot)
> - m_shadowRoot->setNeedsStyleRecalc();
> - else
> + if (m_shadowRoot) {
> + for (auto& shadowChild : childrenOfType<Element>(*m_shadowRoot))
> + shadowChild.setNeedsStyleRecalc();
> + } else
It seems easy to make this kind of mistake and call setNeedsStyleRecalc() on a ShadowRoot. Would it make sense to either override ShadowRoot::setNeedsStyleRecalc() and have it call Element::setNeedsStyleRecalc() on its children or mark ShadowRoot::setNeedsStyleRecalc() as "delete"d to cause a compile-time error when ShadowRoot::setNeedsStyleRecalc() is called.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160926/d35307bb/attachment.html>
More information about the webkit-unassigned
mailing list