[Webkit-unassigned] [Bug 136903] changing SVG <defs> does not update SVG element.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 14 11:42:26 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=136903

--- Comment #4 from Sylvain Galineau <galineau at adobe.com> ---
Created attachment 241604
  --> https://bugs.webkit.org/attachment.cgi?id=241604&action=review
[WIP] fix.patch

The issue is that innerHTML (and outerHTML) are HTMLElement methods in WebKit. Per DOM Parsing [1], Chrome moved them to Element.

Source/WebCore/bindings/objc/PublicDOMInterfaces.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Element.idl
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLElement.h
Source/WebCore/html/HTMLElement.idl

The changes to the files above move innerHTML and outerHTML up the tree (which also fixes bug 135698). They fix the issue in a stand-alone SVG doc (see defs-innerHTML.svg). Nothing special about these changes except:
- I left innerText and outerText on HTMLElement; I believe these only exist for IE compat
- Both innerText/outerText and innerHTML/outerHTML use the mergeWithNextTextNode() helper. I made this a protected static on Element. 

Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.h

These changes are needed to fix the original issue (see defs-innerHTML.html for a stand-alone non-JSfiddle version); they bring over the adjusted current node logic from Chrome, as defined by HTML [3]. Note that I tried to bring over all the HTMLTreeBuilder changes related to current node adjustment i.e. not just what I needed to fix this specific issue. This part definitely needs careful review.

[1] https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#innerhtml
[2] https://bugs.webkit.org/show_bug.cgi?id=135698
[3] // http://www.whatwg.org/specs/web-apps/current-work/#adjusted-current-node

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141114/f054f302/attachment-0002.html>


More information about the webkit-unassigned mailing list