| Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| index 0634c6ef6687e915f7a688860400b3aca78550f3..f17d6d79966c5440359b8c9b4767ed96013f016c 100644
|
| --- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| @@ -560,8 +560,11 @@ CSSStyleSheet* StyleEngine::CreateSheet(Element& element,
|
|
|
| DCHECK(style_sheet);
|
| if (!element.IsInShadowTree()) {
|
| - style_sheet->SetTitle(element.title());
|
| - SetPreferredStylesheetSetNameIfNotSet(element.title());
|
| + String title = element.title();
|
| + if (!title.IsEmpty()) {
|
| + style_sheet->SetTitle(title);
|
| + SetPreferredStylesheetSetNameIfNotSet(title);
|
| + }
|
| }
|
| return style_sheet;
|
| }
|
| @@ -924,6 +927,7 @@ void StyleEngine::SetStatsEnabled(bool enabled) {
|
| }
|
|
|
| void StyleEngine::SetPreferredStylesheetSetNameIfNotSet(const String& name) {
|
| + DCHECK(!name.IsEmpty());
|
| if (!preferred_stylesheet_set_name_.IsEmpty())
|
| return;
|
| preferred_stylesheet_set_name_ = name;
|
| @@ -946,7 +950,8 @@ void StyleEngine::SetSelectedStylesheetSetName(const String& name) {
|
| }
|
|
|
| void StyleEngine::SetHttpDefaultStyle(const String& content) {
|
| - SetPreferredStylesheetSetNameIfNotSet(content);
|
| + if (!content.IsEmpty())
|
| + SetPreferredStylesheetSetNameIfNotSet(content);
|
| }
|
|
|
| void StyleEngine::EnsureUAStyleForFullscreen() {
|
|
|