Changeset 232001 in webkit
- Timestamp:
- May 19, 2018 4:07:38 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r231997 r232001 1 2018-05-19 Eric Carlson <eric.carlson@apple.com> 2 3 Improve NowPlaying "title" 4 https://bugs.webkit.org/show_bug.cgi?id=185680 5 <rdar://problem/40296700> 6 7 Reviewed by Dean Jackson. 8 9 * html/HTMLMediaElement.cpp: 10 (WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and 11 topPrivatelyControlledDomain when possible to make the host name more readable. 12 13 * platform/PublicSuffix.h: 14 * platform/mac/PublicSuffixMac.mm: 15 (WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions. 16 1 17 2018-05-19 Commit Queue <commit-queue@webkit.org> 2 18 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r231997 r232001 73 73 #include "PlatformMediaSessionManager.h" 74 74 #include "ProgressTracker.h" 75 #include "PublicSuffix.h" 75 76 #include "RenderLayerCompositor.h" 76 77 #include "RenderTheme.h" … … 7453 7454 return emptyString(); 7454 7455 7455 if (hasAttributeWithoutSynchronization(titleAttr)) { 7456 auto title = attributeWithoutSynchronization(titleAttr); 7457 if (!title.isEmpty()) 7458 return title; 7459 } 7460 7461 auto title = document().title(); 7456 auto title = String(attributeWithoutSynchronization(titleAttr)).stripWhiteSpace().simplifyWhiteSpace(); 7462 7457 if (!title.isEmpty()) 7463 7458 return title; 7464 7459 7465 return m_currentSrc.host(); 7460 title = document().title().stripWhiteSpace().simplifyWhiteSpace(); 7461 if (!title.isEmpty()) 7462 return title; 7463 7464 title = m_currentSrc.host(); 7465 #if PLATFORM(MAC) || PLATFORM(IOS) 7466 if (!title.isEmpty()) 7467 title = decodeHostName(title); 7468 #endif 7469 #if ENABLE(PUBLIC_SUFFIX_LIST) 7470 if (!title.isEmpty()) { 7471 auto domain = topPrivatelyControlledDomain(title); 7472 if (!domain.isEmpty()) 7473 title = domain; 7474 } 7475 #endif 7476 7477 return title; 7466 7478 } 7467 7479 -
trunk/Source/WebCore/platform/PublicSuffix.h
r231997 r232001 35 35 WEBCORE_EXPORT bool isPublicSuffix(const String& domain); 36 36 WEBCORE_EXPORT String topPrivatelyControlledDomain(const String& domain); 37 String decodeHostName(const String& domain); 37 38 38 39 } // namespace WebCore -
trunk/Source/WebCore/platform/mac/PublicSuffixMac.mm
r231997 r232001 61 61 } 62 62 63 String decodeHostName(const String& domain) 64 { 65 return decodeHostName(static_cast<NSString*>(domain)); 66 } 67 63 68 } 64 69
Note: See TracChangeset
for help on using the changeset viewer.