[webkit-reviews] review granted: [Bug 74448] Broaden support for mutation observation of attributes : [Attachment 119085] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 14 01:36:35 PST 2011


Ryosuke Niwa <rniwa at webkit.org> has granted Adam Klein <adamk at chromium.org>'s
request for review:
Bug 74448: Broaden support for mutation observation of attributes
https://bugs.webkit.org/show_bug.cgi?id=74448

Attachment 119085: Patch
https://bugs.webkit.org/attachment.cgi?id=119085&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=119085&action=review


> Source/WebCore/ChangeLog:25
> +	   (WebCore::Attr::setValue): Enqueue a mutation record when Attr.value
is set from JS.
> +	   (WebCore::Attr::childrenChanged): Enqueue a mutation record when an
Attr's value changes to due additions/removals of Text children.
> +	   * dom/Element.cpp:
> +	   (WebCore::Element::enqueueAttributesMutationRecordIfRequested):
Previously a static, expose as part of Element's interface to allow it to be
re-used by NamedNodeMap and Attr.
> +	   (WebCore::Element::removeAttribute): Remove enqueue call now handled
by NamedNodeMap.
> +	   (WebCore::Element::setAttributeInternal): Fixup call of
enqueueAttributesMutationRecordIfRequested.
> +	   * dom/Element.h:
> +	   * dom/NamedNodeMap.cpp:
> +	   (WebCore::NamedNodeMap::setNamedItem): Enqueue a mutation record
when an attribute is changed via Element.attributes.setNamedItem from JS.
> +	   (WebCore::NamedNodeMap::removeNamedItem): Enqueue a mutation record
when an attribute is removed, either via Element.attributes.removeNamedItem or
Element.removeAttribute.

Please line-break as needed. These lines are extremely long. Doesn't even fit
on my high-resolution 15" screen :(

> LayoutTests/fast/mutation/observe-attributes.html:-9
> -<html>
> -<head>
> -<meta charset="utf-8">
>  <script src="../js/resources/js-test-pre.js"></script>
> -</head>
> -<body>
> -<p id=description></p>
> -<div id="console"></div>

Why are we removing these nodes?


More information about the webkit-reviews mailing list