| Index: sky/engine/core/dom/shadow/ElementShadow.cpp
|
| diff --git a/sky/engine/core/dom/shadow/ElementShadow.cpp b/sky/engine/core/dom/shadow/ElementShadow.cpp
|
| index 00b8079b99dd570f306e652d7906ae02bd1c9062..c2f60f6379b16b0ff3a0a996bc9f05eb8bcfb8b6 100644
|
| --- a/sky/engine/core/dom/shadow/ElementShadow.cpp
|
| +++ b/sky/engine/core/dom/shadow/ElementShadow.cpp
|
| @@ -208,23 +208,11 @@ bool ElementShadow::hasSameStyles(const ElementShadow* other) const
|
| {
|
| ShadowRoot* root = m_shadowRoot;
|
| ShadowRoot* otherRoot = other->shadowRoot();
|
| - if (root || otherRoot) {
|
| - if (!root || !otherRoot)
|
| - return false;
|
| -
|
| - StyleSheetList* list = root->styleSheets();
|
| - StyleSheetList* otherList = otherRoot->styleSheets();
|
| -
|
| - if (list->length() != otherList->length())
|
| - return false;
|
| -
|
| - for (size_t i = 0; i < list->length(); i++) {
|
| - if (list->item(i)->contents() != otherList->item(i)->contents())
|
| - return false;
|
| - }
|
| - }
|
| -
|
| - return true;
|
| + if (!root && !otherRoot)
|
| + return true;
|
| + if (root && otherRoot)
|
| + return root->hasSameStyles(*otherRoot);
|
| + return false;
|
| }
|
|
|
| const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Node* key) const
|
|
|