mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 731287 - don't use GetComputedStyle for background-color in HTML table layout guess, r=tbsaunde
This commit is contained in:
parent
ff961d36b5
commit
52a06e3ac6
@ -1497,21 +1497,16 @@ nsHTMLTableAccessible::IsProbablyForLayout(bool *aIsProbablyForLayout)
|
||||
// Check for styled background color across rows (alternating background
|
||||
// color is a common feature for data tables).
|
||||
PRUint32 childCount = GetChildCount();
|
||||
nsAutoString rowColor, prevRowColor;
|
||||
nscolor rowColor, prevRowColor;
|
||||
for (PRUint32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
nsAccessible* child = GetChildAt(childIdx);
|
||||
if (child->Role() == roles::ROW) {
|
||||
nsCOMPtr<nsIDOMCSSStyleDeclaration> styleDecl =
|
||||
nsCoreUtils::GetComputedStyleDeclaration(EmptyString(),
|
||||
child->GetContent());
|
||||
if (styleDecl) {
|
||||
prevRowColor = rowColor;
|
||||
styleDecl->GetPropertyValue(NS_LITERAL_STRING("background-color"),
|
||||
rowColor);
|
||||
if (childIdx > 0 && !prevRowColor.Equals(rowColor)) {
|
||||
RETURN_LAYOUT_ANSWER(false, "2 styles of row background color, non-bordered");
|
||||
}
|
||||
}
|
||||
prevRowColor = rowColor;
|
||||
nsIFrame* rowFrame = child->GetFrame();
|
||||
rowColor = rowFrame->GetStyleBackground()->mBackgroundColor;
|
||||
|
||||
if (childIdx > 0 && prevRowColor != rowColor)
|
||||
RETURN_LAYOUT_ANSWER(false, "2 styles of row background color, non-bordered");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user