mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1107508. Disable stylesheets in <use>-cloned subtrees for now. r=heycam
--HG-- extra : rebase_source : c29f557476e71ff9cae478b204185a40be4771d6
This commit is contained in:
parent
7fa9d2a0fe
commit
b8292681d6
@ -305,6 +305,13 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument* aOldDocument,
|
||||
// All instances of nsStyleLinkElement should implement nsIContent.
|
||||
NS_ENSURE_TRUE(thisContent, NS_ERROR_FAILURE);
|
||||
|
||||
if (thisContent->IsInAnonymousSubtree() &&
|
||||
thisContent->IsAnonymousContentInSVGUseSubtree()) {
|
||||
// Stylesheets in <use>-cloned subtrees are disabled until we figure out
|
||||
// how they should behave.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Check for a ShadowRoot because link elements are inert in a
|
||||
// ShadowRoot.
|
||||
ShadowRoot* containingShadow = thisContent->GetContainingShadow();
|
||||
|
18
layout/base/crashtests/1107508-1.html
Normal file
18
layout/base/crashtests/1107508-1.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<svg id="s">
|
||||
<style>
|
||||
#b { display: none; }
|
||||
rect { fill:orange; }
|
||||
</style>
|
||||
<rect width="10" height="10" fill="lime"/>
|
||||
</svg>
|
||||
<style>
|
||||
#b { display: block; }
|
||||
rect { fill:blue; }
|
||||
</style>
|
||||
<div id="b" style="border:2px solid black">
|
||||
<svg>
|
||||
<use xlink:href="#s"/>
|
||||
</svg>
|
||||
</div>
|
@ -454,3 +454,4 @@ load 973390-1.html
|
||||
load 1001237.html
|
||||
load 1043163-1.html
|
||||
load 1061028.html
|
||||
load 1107508-1.html
|
||||
|
Loading…
Reference in New Issue
Block a user