зеркало из https://github.com/mozilla/gecko-dev.git
Make sure to apply our styles to our anonymous content no matter what the
page's style language is. Bug 234761, r=sicking, sr=jst
This commit is contained in:
Родитель
43c1afc189
Коммит
14c6b02ec5
|
@ -2618,11 +2618,14 @@ nsGenericHTMLElement::ParseStyleAttribute(nsIContent* aContent,
|
|||
if (doc) {
|
||||
PRBool isCSS = PR_TRUE; // assume CSS until proven otherwise
|
||||
|
||||
nsAutoString styleType;
|
||||
doc->GetHeaderData(nsHTMLAtoms::headerContentStyleType, styleType);
|
||||
if (!styleType.IsEmpty()) {
|
||||
static const char textCssStr[] = "text/css";
|
||||
isCSS = (styleType.EqualsIgnoreCase(textCssStr, sizeof(textCssStr) - 1));
|
||||
if (!aContent->IsNativeAnonymous()) { // native anonymous content
|
||||
// always assumes CSS
|
||||
nsAutoString styleType;
|
||||
doc->GetHeaderData(nsHTMLAtoms::headerContentStyleType, styleType);
|
||||
if (!styleType.IsEmpty()) {
|
||||
static const char textCssStr[] = "text/css";
|
||||
isCSS = (styleType.EqualsIgnoreCase(textCssStr, sizeof(textCssStr) - 1));
|
||||
}
|
||||
}
|
||||
|
||||
if (isCSS) {
|
||||
|
|
|
@ -1675,6 +1675,9 @@ nsTextControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
|
|||
if (!divContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Set the div native anonymous, so CSS will be its style language
|
||||
// no matter what.
|
||||
divContent->SetNativeAnonymous(PR_TRUE);
|
||||
|
||||
// Set the neccessary style attributes on the text control.
|
||||
|
||||
|
|
|
@ -1675,6 +1675,9 @@ nsTextControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
|
|||
if (!divContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Set the div native anonymous, so CSS will be its style language
|
||||
// no matter what.
|
||||
divContent->SetNativeAnonymous(PR_TRUE);
|
||||
|
||||
// Set the neccessary style attributes on the text control.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче