Bug 1398479 - Always return correct value for ServoSpecifiedValues::PropertyIsSet. r?Manishearth
MozReview-Commit-ID: 8VMpLqcOhNz
--- a/layout/style/ServoSpecifiedValues.cpp
+++ b/layout/style/ServoSpecifiedValues.cpp
@@ -23,27 +23,17 @@ ServoSpecifiedValues::ServoSpecifiedValu
: GenericSpecifiedValues(StyleBackendType::Servo, aContext, ALL_SIDS)
, mDecl(aDecl)
{}
bool
ServoSpecifiedValues::PropertyIsSet(nsCSSPropertyID aId)
{
- // We always create fresh ServoSpecifiedValues for each property
- // mapping, so unlike Gecko there aren't existing properties from
- // the cascade that we wish to avoid overwriting.
- //
- // If a property is being overwritten, that's a bug. Check for it
- // in debug mode (this is O(n^2) behavior since Servo will traverse
- // the array each time you add a new property)
- MOZ_ASSERT(!Servo_DeclarationBlock_PropertyIsSet(mDecl, aId),
- "Presentation attribute mappers should never attempt to set the "
- "same property twice");
- return false;
+ return Servo_DeclarationBlock_PropertyIsSet(mDecl, aId);
}
void
ServoSpecifiedValues::SetIdentStringValue(nsCSSPropertyID aId,
const nsString& aValue)
{
nsCOMPtr<nsIAtom> atom = NS_Atomize(aValue);
SetIdentAtomValue(aId, atom);
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1398479.html
@@ -0,0 +1,1 @@
+<table align="center" hspace="1">
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -211,9 +211,10 @@ load 1390726.html
load 1393791.html
load 1384232.html
load 1395725.html
load 1396041.html
load 1397363-1.html
load 1397439-1.html
load 1395719.html
load 1397091.html
+load 1398479.html
load 1398581.html