Bug 1291390 - Use the parsing mode from the stylesheet when building preferences stylesheet. r=heycam

In practice this will be the 'agent' level rather than the 'author' level, given
the SetParsingMode call immediately after creating the stylesheet. This change
aligns behavior with CSSStyleSheet::ReparseSheet.
This commit is contained in:
Bobby Holley 2016-08-02 12:28:40 -07:00
Родитель 1dfd6a8070
Коммит 9ee707ada1
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -43,6 +43,7 @@ public:
mParsingMode = aParsingMode;
}
css::SheetParsingMode ParsingMode() { return mParsingMode; }
mozilla::dom::CSSStyleSheetParsingMode ParsingModeDOM();
nsINode* GetOwnerNode() const { return mOwningNode; }

Просмотреть файл

@ -951,8 +951,7 @@ nsLayoutStylesheetCache::BuildPreferenceSheet(StyleSheetHandle::RefPtr* aSheet,
if (sheet->IsGecko()) {
sheet->AsGecko()->ReparseSheet(sheetText);
} else {
sheet->AsServo()->ParseSheet(sheetText, uri, uri, nullptr, 0,
SheetParsingMode::eAuthorSheetFeatures);
sheet->AsServo()->ParseSheet(sheetText, uri, uri, nullptr, 0, sheet->AsServo()->ParsingMode());
}
#undef NS_GET_R_G_B