Index: third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp |
diff --git a/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp b/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp |
index cca65e7a1cc18a19e12f776f23d716ee70dfc917..f40b9864473e963a5aa6fefc651ba97b6c8bc4dd 100644 |
--- a/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp |
+++ b/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp |
@@ -38,18 +38,16 @@ ActiveSheetsChange compareActiveStyleSheets( |
} |
if (index == oldStyleSheetCount) { |
- if (index == newStyleSheetCount) { |
- return changedRuleSets.isEmpty() ? NoActiveSheetsChanged |
- : ActiveSheetsChanged; |
- } |
- |
- // Sheets added at the end. |
+ bool ruleSetsChanged = !changedRuleSets.isEmpty(); |
sashab
2017/01/25 02:45:00
Hmm, is this the same logic as before? This is way
meade_UTC10
2017/01/25 05:14:40
I don't think that'd have the same behaviour, Sash
rune
2017/01/25 08:57:34
The isEmpty check must be done before the for-loop
rune
2017/01/25 08:57:34
Those are two different tests. The test here is th
|
for (; index < newStyleSheetCount; index++) { |
if (newStyleSheets[index].second) |
changedRuleSets.add(newStyleSheets[index].second); |
} |
- return changedRuleSets.isEmpty() ? NoActiveSheetsChanged |
- : ActiveSheetsAppended; |
+ if (ruleSetsChanged) |
+ return ActiveSheetsChanged; |
+ if (changedRuleSets.isEmpty()) |
+ return NoActiveSheetsChanged; |
+ return ActiveSheetsAppended; |
} |
if (index == newStyleSheetCount) { |