diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-13 16:23:34 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-14 10:37:21 +0000 |
commit | 38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch) | |
tree | c4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc | |
parent | e684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff) | |
download | qtwebengine-chromium-38a9a29f4f9436cace7f0e7abf9c586057df8a4e.tar.gz |
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc b/chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc index 8a8867ac811..f8b4cb0acfc 100644 --- a/chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc +++ b/chromium/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc @@ -65,17 +65,12 @@ void ShadowTreeStyleSheetCollection::CollectStyleSheets( if (!GetTreeScope().HasAdoptedStyleSheets()) return; - StyleSheetList& adopted_style_sheets = GetTreeScope().AdoptedStyleSheets(); - unsigned length = adopted_style_sheets.length(); - for (unsigned index = 0; index < length; ++index) { - StyleSheet* sheet = adopted_style_sheets.item(index); - if (!sheet) - continue; - CSSStyleSheet* css_sheet = ToCSSStyleSheet(sheet); - if (!css_sheet || !css_sheet->CanBeActivated(g_null_atom)) + for (CSSStyleSheet* sheet : GetTreeScope().AdoptedStyleSheets()) { + if (!sheet || !sheet->CanBeActivated(g_null_atom)) continue; + DCHECK_EQ(GetTreeScope().GetDocument(), sheet->AssociatedDocument()); collection.AppendActiveStyleSheet( - std::make_pair(css_sheet, master_engine.RuleSetForSheet(*css_sheet))); + std::make_pair(sheet, master_engine.RuleSetForSheet(*sheet))); } } |