| Index: third_party/WebKit/Source/core/css/StyleSheetContents.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
|
| index 0e38ceab3898dbcb56d8971f303a46bbb436d259..0005ba344dceb38817460e0d08ba71be30f2cc3e 100644
|
| --- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
|
| +++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
|
| @@ -39,6 +39,16 @@
|
|
|
| namespace blink {
|
|
|
| +// static
|
| +const Document* StyleSheetContents::singleOwnerDocument(
|
| + const StyleSheetContents* styleSheetContents) {
|
| + // TODO(https://crbug.com/242125): We may want to handle stylesheets that have
|
| + // multiple owners when this is used for UseCounter.
|
| + if (styleSheetContents && styleSheetContents->hasSingleOwnerNode())
|
| + return styleSheetContents->singleOwnerDocument();
|
| + return nullptr;
|
| +}
|
| +
|
| // Rough size estimate for the memory cache.
|
| unsigned StyleSheetContents::estimatedSizeInBytes() const {
|
| // Note that this does not take into account size of the strings hanging from
|
|
|