mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 1409277 - Ignore non-URLs for background pres attr. r=manishearth
Check background attribute values for the same types (URL, image) in Stylo mode as we do in Gecko mode. In particular, this ignores the edge case of the empty attribute, which comes through as a string value type, and leads Stylo to trigger a load of the page itself as the background image (since the empty URL is interpreted as relative to the page). MozReview-Commit-ID: CUhq5nS8kVw --HG-- extra : rebase_source : 8a04a3175cb1a873ee7e597ad881ae64720c01ef
This commit is contained in:
parent
3961574fa2
commit
8766fcbe53
@ -121,6 +121,10 @@ ServoSpecifiedValues::SetTextDecorationColorOverride()
|
||||
void
|
||||
ServoSpecifiedValues::SetBackgroundImage(nsAttrValue& aValue)
|
||||
{
|
||||
if (aValue.Type() != nsAttrValue::eURL &&
|
||||
aValue.Type() != nsAttrValue::eImage) {
|
||||
return;
|
||||
}
|
||||
nsAutoString str;
|
||||
aValue.ToString(str);
|
||||
Servo_DeclarationBlock_SetBackgroundImage(
|
||||
|
Loading…
Reference in New Issue
Block a user