Bug 728665 - SVGTests interface missing from foreignObject elements. r=jwatt

This commit is contained in:
Robert Longson 2012-02-20 19:34:04 +00:00
Родитель 439c84369e
Коммит d4c07c9035
3 изменённых файлов: 56 добавлений и 21 удалений

Просмотреть файл

@ -3165,6 +3165,12 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsITouchEventReceiver, \ DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsITouchEventReceiver, \
nsDOMTouchEvent::PrefEnabled()) nsDOMTouchEvent::PrefEnabled())
#define DOM_CLASSINFO_SVG_TEXT_CONTENT_ELEMENT_MAP_ENTRIES \
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement) \
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests) \
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable) \
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
#define DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES \ #define DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES \
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable) \
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransformable) \ DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransformable) \
@ -3197,12 +3203,8 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGAltGlyphElement, nsIDOMSVGAltGlyphElement) DOM_CLASSINFO_MAP_BEGIN(SVGAltGlyphElement, nsIDOMSVGAltGlyphElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) DOM_CLASSINFO_SVG_TEXT_CONTENT_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGAnimateElement, nsIDOMSVGAnimateElement) DOM_CLASSINFO_MAP_BEGIN(SVGAnimateElement, nsIDOMSVGAnimateElement)
@ -3443,6 +3445,12 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGForeignObjectElement, nsIDOMSVGForeignObjectElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGForeignObjectElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGGElement, nsIDOMSVGGElement) DOM_CLASSINFO_MAP_BEGIN(SVGGElement, nsIDOMSVGGElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
@ -3558,7 +3566,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGSVGElement, nsIDOMSVGSVGElement) DOM_CLASSINFO_MAP_BEGIN(SVGSVGElement, nsIDOMSVGSVGElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSVGElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSVGElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable)
@ -3591,12 +3598,8 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGTextPathElement, nsIDOMSVGTextPathElement) DOM_CLASSINFO_MAP_BEGIN(SVGTextPathElement, nsIDOMSVGTextPathElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) DOM_CLASSINFO_SVG_TEXT_CONTENT_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGTitleElement, nsIDOMSVGTitleElement) DOM_CLASSINFO_MAP_BEGIN(SVGTitleElement, nsIDOMSVGTitleElement)
@ -3607,11 +3610,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGTSpanElement, nsIDOMSVGTSpanElement) DOM_CLASSINFO_MAP_BEGIN(SVGTSpanElement, nsIDOMSVGTSpanElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement) DOM_CLASSINFO_SVG_TEXT_CONTENT_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTests)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(SVGUnknownElement, nsIDOMSVGElement) DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(SVGUnknownElement, nsIDOMSVGElement)
@ -3942,11 +3941,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
DOM_CLASSINFO_MAP_END DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGForeignObjectElement, nsIDOMSVGForeignObjectElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGForeignObjectElement)
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(XULCommandEvent, nsIDOMXULCommandEvent) DOM_CLASSINFO_MAP_BEGIN(XULCommandEvent, nsIDOMXULCommandEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandEvent) DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandEvent)
DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES

Просмотреть файл

@ -0,0 +1,40 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg id="svg-root" width="100%" height="100%"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" onload="runtest()">
<title>Test conditional processing DOM interface for foreignObject</title>
<defs>
<script>
function runtest() {
try {
var f1 = document.getElementById("f1");
var i0 = f1.requiredFeatures.getItem(0);
if(i0 != "this.is.a.bogus.feature.string") {
return;
}
f1.removeAttribute("requiredFeatures");
} catch(e) {
var f = document.getElementById("fail");
f.setAttribute("fill", "red");
}
}
</script>
</defs>
<rect width="100%" height="100%" fill="lime"/>
<!-- background images -->
<rect x="100" y="100" width="100" height="100" fill="red"/>
<!-- tests -->
<foreignObject id="f1" x="100" y="100" width="100" height="100" requiredFeatures="this.is.a.bogus.feature.string">
<svg>
<rect width="100%" height="100%" fill="lime"/>
</svg>
</foreignObject>
<rect id="fail" width="100%" height="100%" fill="none"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -42,6 +42,7 @@ include svg-integration/reftest.list
== conditions-04.svg pass.svg == conditions-04.svg pass.svg
== conditions-05.svg about:blank == conditions-05.svg about:blank
== conditions-06.svg pass.svg == conditions-06.svg pass.svg
== conditions-07.svg pass.svg
== currentColor-01.svg pass.svg == currentColor-01.svg pass.svg
== currentColor-02.svg pass.svg == currentColor-02.svg pass.svg
== currentColor-03.svg pass.svg == currentColor-03.svg pass.svg