Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp |
| diff --git a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp |
| index b4e489dc1471e02136c322e3a566e99535d8a68a..8f367134a4d77c34d9abcdd6f1c0697d2712d165 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp |
| +++ b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp |
| @@ -298,6 +298,20 @@ void ScopedStyleResolver::addTreeBoundaryCrossingRules( |
| RuleSubSet::create(parentStyleSheet, sheetIndex, ruleSetForScope)); |
| } |
| +bool ScopedStyleResolver::haveSameStyles(const ScopedStyleResolver* first, |
| + const ScopedStyleResolver* second) { |
| + size_t firstCount = first ? first->m_authorStyleSheets.size() : 0; |
| + size_t secondCount = second ? second->m_authorStyleSheets.size() : 0; |
| + if (firstCount != secondCount) |
| + return false; |
| + while (firstCount--) { |
| + if (first->m_authorStyleSheets[firstCount]->contents() != |
|
sashab
2017/01/03 22:35:19
I know this is what the old code did, but is there
rune
2017/01/03 23:35:42
I don't think we can compare these vectors with op
sashab
2017/01/04 00:39:33
Eh, that's not much nicer. Ok, I'm happy with you
|
| + second->m_authorStyleSheets[firstCount]->contents()) |
| + return false; |
| + } |
| + return true; |
| +} |
| + |
| DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) { |
| visitor->trace(m_parentStyleSheet); |
| visitor->trace(m_ruleSet); |