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..47f411dfc765e73a47c729ff23522845a727781e 100644 |
--- a/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp |
+++ b/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp |
@@ -38,18 +38,15 @@ ActiveSheetsChange compareActiveStyleSheets( |
} |
if (index == oldStyleSheetCount) { |
- if (index == newStyleSheetCount) { |
- return changedRuleSets.isEmpty() ? NoActiveSheetsChanged |
- : ActiveSheetsChanged; |
- } |
- |
- // Sheets added at the end. |
+ ActiveSheetsChange change = |
+ changedRuleSets.isEmpty() ? NoActiveSheetsChanged : ActiveSheetsChanged; |
for (; index < newStyleSheetCount; index++) { |
if (newStyleSheets[index].second) |
changedRuleSets.add(newStyleSheets[index].second); |
} |
- return changedRuleSets.isEmpty() ? NoActiveSheetsChanged |
- : ActiveSheetsAppended; |
+ if (change == NoActiveSheetsChanged && !changedRuleSets.isEmpty()) |
+ change = ActiveSheetsAppended; |
+ return change; |
sashab
2017/01/23 22:06:33
I'm having trouble comparing these two logic. So t
rune
2017/01/24 01:08:10
Tried with a bool approach now.
|
} |
if (index == newStyleSheetCount) { |