Chromium Code Reviews| 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..ff289ed16b0cb378ed89c0c3f5a6698cf51746b6 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) { |
| + // FIXME(https://crbug.com/242125): We may want to handle stylesheets that |
|
haraken
2017/02/09 02:01:42
TODO
Bret
2017/02/09 02:08:18
Done.
|
| + // 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 |