Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp

Issue 2880263002: Clear document scope dirtiness in import StyleEngine. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp b/third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp
index 386c25f15166edde940020af016bb7b5c2353fa8..b870d15cd0ef30ca98956f486914c6e57ca6c2b6 100644
--- a/third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp
+++ b/third_party/WebKit/Source/web/tests/HTMLImportSheetsTest.cpp
@@ -24,6 +24,15 @@ TEST_F(HTMLImportSheetsTest, NeedsActiveStyleUpdate) {
import_resource.Complete("<style>div{}</style>");
EXPECT_TRUE(GetDocument().GetStyleEngine().NeedsActiveStyleUpdate());
+ Document* import_doc =
+ toHTMLLinkElement(GetDocument().getElementById("link"))->import();
+ ASSERT_TRUE(import_doc);
+ EXPECT_TRUE(import_doc->GetStyleEngine().NeedsActiveStyleUpdate());
+
+ GetDocument().GetStyleEngine().UpdateActiveStyle();
+
+ EXPECT_FALSE(GetDocument().GetStyleEngine().NeedsActiveStyleUpdate());
+ EXPECT_FALSE(import_doc->GetStyleEngine().NeedsActiveStyleUpdate());
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698