mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1016145 - Load the non-SVG user-agent style sheets for non-SVG documents served as image/svg+xml. r=bz
--HG-- extra : rebase_source : e48c0a6041a38fd1d056ad510268c5df23bf225e
This commit is contained in:
parent
326e3bfa88
commit
75a5163270
@ -3951,17 +3951,6 @@ nsDocument::InsertChildAt(nsIContent* aKid, uint32_t aIndex,
|
||||
return doInsertChildAt(aKid, aIndex, aNotify, mChildren);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocument::AppendChildTo(nsIContent* aKid, bool aNotify)
|
||||
{
|
||||
// Make sure to _not_ call the subclass InsertChildAt here. If
|
||||
// subclasses wanted to hook into this stuff, they would have
|
||||
// overridden AppendChildTo.
|
||||
// XXXbz maybe this should just be a non-virtual method on nsINode?
|
||||
// Feels that way to me...
|
||||
return nsDocument::InsertChildAt(aKid, GetChildCount(), aNotify);
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::RemoveChildAt(uint32_t aIndex, bool aNotify)
|
||||
{
|
||||
|
@ -889,7 +889,6 @@ public:
|
||||
virtual uint32_t GetChildCount() const MOZ_OVERRIDE;
|
||||
virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
|
||||
bool aNotify) MOZ_OVERRIDE;
|
||||
virtual nsresult AppendChildTo(nsIContent* aKid, bool aNotify);
|
||||
virtual void RemoveChildAt(uint32_t aIndex, bool aNotify) MOZ_OVERRIDE;
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
|
@ -65,6 +65,21 @@ SVGDocument::GetRootElement(ErrorResult& aRv)
|
||||
return static_cast<nsSVGElement*>(root);
|
||||
}
|
||||
|
||||
nsresult
|
||||
SVGDocument::InsertChildAt(nsIContent* aKid, uint32_t aIndex, bool aNotify)
|
||||
{
|
||||
nsresult rv = XMLDocument::InsertChildAt(aKid, aIndex, aNotify);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && aKid->IsElement() && !aKid->IsSVG()) {
|
||||
// We can get here when well formed XML with a non-SVG root element is
|
||||
// served with the SVG MIME type, for example. In that case we need to load
|
||||
// the non-SVG UA sheets or else we can get bugs like bug 1016145.
|
||||
EnsureNonSVGUserAgentStyleSheetsLoaded();
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
SVGDocument::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
|
||||
{
|
||||
|
@ -28,6 +28,8 @@ public:
|
||||
mType = eSVG;
|
||||
}
|
||||
|
||||
virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
|
||||
bool aNotify) MOZ_OVERRIDE;
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
|
||||
// WebIDL API
|
||||
|
5
layout/svg/crashtests/1016145.svg
Normal file
5
layout/svg/crashtests/1016145.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<!-- svg mime type but html root -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body style="display: table-column-group;" />
|
||||
</html>
|
||||
|
@ -184,4 +184,5 @@ load 974746-1.svg
|
||||
load 979407-1.svg
|
||||
load 979407-2.svg
|
||||
load 993443.svg
|
||||
load 1016145.svg
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user