mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 10:25:01 +00:00
getComputedStyle answered for background-color #ffffff instead of transparent; b=97771, r=pierre, sr=hyatt
This commit is contained in:
parent
983d7ffd94
commit
7d3af61e67
@ -961,9 +961,18 @@ nsComputedDOMStyle::GetBackgroundColor(nsIFrame *aFrame,
|
||||
GetStyleData(eStyleStruct_Background, (const nsStyleStruct*&)color, aFrame);
|
||||
|
||||
if(color) {
|
||||
nsAutoString hex;
|
||||
ColorToHex(color->mBackgroundColor, hex);
|
||||
val->SetString(hex);
|
||||
if ((color->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) &&
|
||||
!(color->mBackgroundFlags & NS_STYLE_BG_PROPAGATED_TO_PARENT)) {
|
||||
const nsCString& backgroundColor =
|
||||
nsCSSProps::SearchKeywordTable(NS_STYLE_BG_COLOR_TRANSPARENT,
|
||||
nsCSSProps::kBackgroundColorKTable);
|
||||
val->SetString(backgroundColor);
|
||||
}
|
||||
else {
|
||||
nsAutoString hex;
|
||||
ColorToHex(color->mBackgroundColor, hex);
|
||||
val->SetString(hex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
val->SetString("");
|
||||
|
@ -961,9 +961,18 @@ nsComputedDOMStyle::GetBackgroundColor(nsIFrame *aFrame,
|
||||
GetStyleData(eStyleStruct_Background, (const nsStyleStruct*&)color, aFrame);
|
||||
|
||||
if(color) {
|
||||
nsAutoString hex;
|
||||
ColorToHex(color->mBackgroundColor, hex);
|
||||
val->SetString(hex);
|
||||
if ((color->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) &&
|
||||
!(color->mBackgroundFlags & NS_STYLE_BG_PROPAGATED_TO_PARENT)) {
|
||||
const nsCString& backgroundColor =
|
||||
nsCSSProps::SearchKeywordTable(NS_STYLE_BG_COLOR_TRANSPARENT,
|
||||
nsCSSProps::kBackgroundColorKTable);
|
||||
val->SetString(backgroundColor);
|
||||
}
|
||||
else {
|
||||
nsAutoString hex;
|
||||
ColorToHex(color->mBackgroundColor, hex);
|
||||
val->SetString(hex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
val->SetString("");
|
||||
|
Loading…
Reference in New Issue
Block a user