 Chromium Code Reviews
 Chromium Code Reviews Issue 1867513002:
  Don't apply style elements or PIs with loading imports.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1867513002:
  Don't apply style elements or PIs with loading imports.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp | 
| diff --git a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp | 
| index f4e5551a159119b7d40a74ff49c61b26e91885e7..d49bb546efb065256e41893994528ef26184fbef 100644 | 
| --- a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp | 
| +++ b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp | 
| @@ -79,7 +79,11 @@ bool StyleSheetCandidate::isEnabledViaScript() const | 
| bool StyleSheetCandidate::isEnabledAndLoading() const | 
| { | 
| - return isHTMLLink() && !toHTMLLinkElement(node()).isDisabled() && toHTMLLinkElement(node()).styleSheetIsLoading(); | 
| + if (isHTMLLink()) | 
| + return !toHTMLLinkElement(node()).isDisabled() && toHTMLLinkElement(node()).styleSheetIsLoading(); | 
| + | 
| + StyleSheet* sheet = this->sheet(); | 
| 
esprehn
2016/04/06 21:03:17
hmm, can we not make this->sheet() and sheet->disa
 
rune
2016/04/06 22:01:46
Sheet is null while top-level css is loading for <
 | 
| + return sheet && !sheet->disabled() && sheet->isLoading(); | 
| } | 
| bool StyleSheetCandidate::hasPreferrableName() const |