Changeset 170908 in webkit
- Timestamp:
- Jul 8, 2014, 9:53:03 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r170906 r170908 1 2014-07-08 Eric Carlson <eric.carlson@apple.com> 2 3 [iOS] user caption preferences not applied 4 https://bugs.webkit.org/show_bug.cgi?id=134599 5 6 Reviewed by Sam Weinig. 7 8 * page/CaptionUserPreferences.cpp: 9 (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): All Pages in a PageGroup 10 do not necessarily use the same PageUserContentController, so apply and remove caption user 11 the style sheet directly to each page rather than to the page group. 12 1 13 2014-07-08 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebCore/page/CaptionUserPreferences.cpp
r165607 r170908 34 34 #include "Settings.h" 35 35 #include "TextTrackList.h" 36 #include "UserContentController.h" 36 37 #include "UserStyleSheetTypes.h" 37 38 … … 240 241 DEPRECATED_DEFINE_STATIC_LOCAL(URL, captionsStyleSheetURL, (ParsedURLString, "user-captions-override:01F6AF12-C3B0-4F70-AF5E-A3E00234DC23")); 241 242 242 m_pageGroup.removeUserStyleSheetFromWorld(mainThreadNormalWorld(), captionsStyleSheetURL); 243 auto& pages = m_pageGroup.pages(); 244 for (auto& page : pages) { 245 if (auto* pageUserContentController = page->userContentController()) 246 pageUserContentController->removeUserStyleSheet(mainThreadNormalWorld(), captionsStyleSheetURL); 247 } 243 248 244 249 String captionsOverrideStyleSheet = captionsStyleSheetOverride(); … … 246 251 return; 247 252 248 m_pageGroup.addUserStyleSheetToWorld(mainThreadNormalWorld(), captionsOverrideStyleSheet, captionsStyleSheetURL, Vector<String>(), 249 Vector<String>(), InjectInAllFrames, UserStyleAuthorLevel, InjectInExistingDocuments); 253 for (auto& page : pages) { 254 if (auto* pageUserContentController = page->userContentController()) { 255 auto userStyleSheet = std::make_unique<UserStyleSheet>(captionsOverrideStyleSheet, captionsStyleSheetURL, Vector<String>(), Vector<String>(), InjectInAllFrames, UserStyleAuthorLevel); 256 pageUserContentController->addUserStyleSheet(mainThreadNormalWorld(), std::move(userStyleSheet), InjectInExistingDocuments); 257 } 258 } 250 259 } 251 260
Note:
See TracChangeset
for help on using the changeset viewer.