diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 28c3903eb769bd530a36f269f484d1e3532dbe72..55bb60c6d37bb729dbc67bbfbfab38df949b9906 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,13 @@ +2012-10-17 Shinya Kawanaka + + Dynamically added elements do not get re-projected. + https://bugs.webkit.org/show_bug.cgi?id=99227 + + Reviewed by Dimitri Glazkov. + + * fast/dom/shadow/content-reprojection-dynamic-expected.html: Added. + * fast/dom/shadow/content-reprojection-dynamic.html: Added. + 2012-10-17 Dana Jansens Layout Test http/tests/workers/text-encoding.html is flaky crashing on debug bots diff --git a/LayoutTests/fast/dom/shadow/content-reprojection-dynamic-expected.html b/LayoutTests/fast/dom/shadow/content-reprojection-dynamic-expected.html new file mode 100644 index 0000000000000000000000000000000000000000..fed14080d7d60901e24053c3044b49752270b1bb --- /dev/null +++ b/LayoutTests/fast/dom/shadow/content-reprojection-dynamic-expected.html @@ -0,0 +1,7 @@ + + + + +
dynamically added div
+ + diff --git a/LayoutTests/fast/dom/shadow/content-reprojection-dynamic.html b/LayoutTests/fast/dom/shadow/content-reprojection-dynamic.html new file mode 100644 index 0000000000000000000000000000000000000000..e0d2170962535990a3372c4c27ea91b52f55cfeb --- /dev/null +++ b/LayoutTests/fast/dom/shadow/content-reprojection-dynamic.html @@ -0,0 +1,32 @@ + + + + +
+ + + + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 83dee6769d0c420827e96a32b6c5201c59229ca2..29de0ae9fcda857a878c0abaa220fe0e2ae8b91e 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2012-10-17 Shinya Kawanaka + + Dynamically added elements do not get re-projected. + https://bugs.webkit.org/show_bug.cgi?id=99227 + + Reviewed by Dimitri Glazkov. + + When distribution happens, we have to invalidate its host shadow's distribution, since the children of the host + is changed. + + Test: fast/dom/shadow/content-reprojection-dynamic.html + + * html/shadow/ContentDistributor.cpp: + (WebCore::ContentDistributor::distribute): + 2012-10-17 Yury Semikhatsky Web Inspector: no "delete watch expression" context menu item when clicking on the expression value diff --git a/Source/WebCore/html/shadow/ContentDistributor.cpp b/Source/WebCore/html/shadow/ContentDistributor.cpp index 40059c609c11f19aebb925d99625dbf835af8cdb..ec367ef2ca84de0d85a17416a7cb4474f60cd681 100644 --- a/Source/WebCore/html/shadow/ContentDistributor.cpp +++ b/Source/WebCore/html/shadow/ContentDistributor.cpp @@ -89,6 +89,9 @@ void ContentDistributor::distribute(Element* host) distributeNodeChildrenTo(point, older); older->setAssignedTo(point); } + + if (ElementShadow* shadow = node->parentNode()->isElementNode() ? toElement(node->parentNode())->shadow() : 0) + shadow->invalidateDistribution(); } } }