Bug 1428339: Make attribute mapping work without a pres context. r=heycam
MozReview-Commit-ID: FisYWoArX0N
This commit is contained in:
@@ -952,8 +952,7 @@ HTMLTableElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
// which *element* it's matching (style rules should not stop matching
|
||||
// when the display type is changed).
|
||||
|
||||
nsPresContext* presContext = aData->PresContext();
|
||||
nsCompatibility mode = presContext->CompatibilityMode();
|
||||
nsCompatibility mode = aData->Document()->GetCompatibilityMode();
|
||||
|
||||
if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(TableBorder))) {
|
||||
// cellspacing
|
||||
@@ -999,8 +998,7 @@ HTMLTableElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
// bordercolor
|
||||
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::bordercolor);
|
||||
nscolor color;
|
||||
if (value && presContext->UseDocumentColors() &&
|
||||
value->GetColorValue(color)) {
|
||||
if (value && !aData->ShouldIgnoreColors() && value->GetColorValue(color)) {
|
||||
aData->SetColorValueIfUnset(eCSSProperty_border_top_color, color);
|
||||
aData->SetColorValueIfUnset(eCSSProperty_border_left_color, color);
|
||||
aData->SetColorValueIfUnset(eCSSProperty_border_bottom_color, color);
|
||||
|
||||
Reference in New Issue
Block a user