diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 05:11:45 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 05:11:45 +0000 |
commit | 86240434eb153c149dbc3d77f4fedf9cffcbfc53 (patch) | |
tree | eb5eccc07097c5fcf940967f33ab84a7d47c96fe /libgo/go/html/const.go | |
parent | 9599f526f8b241e01ca4d54b5bff9c2e6f6dd75a (diff) | |
download | ppe42-gcc-86240434eb153c149dbc3d77f4fedf9cffcbfc53.tar.gz ppe42-gcc-86240434eb153c149dbc3d77f4fedf9cffcbfc53.zip |
libgo: Update to weekly.2011-12-22.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/html/const.go')
-rw-r--r-- | libgo/go/html/const.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libgo/go/html/const.go b/libgo/go/html/const.go index 832e9dbc096..d7cc8bb9a99 100644 --- a/libgo/go/html/const.go +++ b/libgo/go/html/const.go @@ -7,7 +7,7 @@ package html // Section 12.2.3.2 of the HTML5 specification says "The following elements // have varying levels of special parsing rules". // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#the-stack-of-open-elements -var isSpecialElement = map[string]bool{ +var isSpecialElementMap = map[string]bool{ "address": true, "applet": true, "area": true, @@ -88,3 +88,13 @@ var isSpecialElement = map[string]bool{ "wbr": true, "xmp": true, } + +func isSpecialElement(element *Node) bool { + switch element.Namespace { + case "", "html": + return isSpecialElementMap[element.Data] + case "svg": + return element.Data == "foreignObject" + } + return false +} |