| Index: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
|
| index 43b2518f34f4bb3ebcbb8840e27f3616d2765e96..e29035dc3be460bdb1f41826b77722664ae310a0 100644
|
| --- a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
|
| @@ -27,6 +27,7 @@
|
| #include "core/dom/shadow/ElementShadow.h"
|
|
|
| #include "core/css/StyleSheetList.h"
|
| +#include "core/css/resolver/ScopedStyleResolver.h"
|
| #include "core/dom/StyleChangeReason.h"
|
| #include "core/dom/shadow/ElementShadowV0.h"
|
| #include "core/frame/Deprecation.h"
|
| @@ -139,17 +140,11 @@ bool ElementShadow::hasSameStyles(const ElementShadow& other) const {
|
| if (!root || !otherRoot)
|
| return false;
|
|
|
| - StyleSheetList& list = root->styleSheets();
|
| - StyleSheetList& otherList = otherRoot->styleSheets();
|
| -
|
| - if (list.length() != otherList.length())
|
| + if (!ScopedStyleResolver::haveSameStyles(
|
| + root->scopedStyleResolver(), otherRoot->scopedStyleResolver())) {
|
| return false;
|
| -
|
| - for (size_t i = 0; i < list.length(); i++) {
|
| - if (toCSSStyleSheet(list.item(i))->contents() !=
|
| - toCSSStyleSheet(otherList.item(i))->contents())
|
| - return false;
|
| }
|
| +
|
| root = root->olderShadowRoot();
|
| otherRoot = otherRoot->olderShadowRoot();
|
| }
|
|
|