Changeset 94906 in webkit
- Timestamp:
- Sep 10, 2011 6:15:49 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r94905 r94906 1 2011-09-10 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters 4 https://bugs.webkit.org/show_bug.cgi?id=34884 5 6 KURL::path() alone does not handle removing the leading slash from a windows file path. 7 Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately. 8 9 Reviewed by Andreas Kling. 10 11 * platform/qt/KURLQt.cpp: 12 (WebCore::KURL::fileSystemPath): 13 1 14 2011-09-10 Ken Buchanan <kenrb@chromium.org> 2 15 -
trunk/Source/WebCore/platform/qt/KURLQt.cpp
r60746 r94906 47 47 return String(); 48 48 49 return String(path());49 return static_cast<QUrl>(*this).toLocalFile(); 50 50 } 51 51 -
trunk/Source/WebKit/qt/ChangeLog
r94889 r94906 1 2011-09-10 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters 4 https://bugs.webkit.org/show_bug.cgi?id=34884 5 6 KURL::path() alone does not handle removing the leading slash from a windows file path. 7 Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately. 8 9 New test case that ensures a user stylesheet from the file system will load correctly 10 on all platforms. 11 12 Reviewed by Andreas Kling. 13 14 * tests/qwebpage/resources/user.css: Added. 15 (p): 16 * tests/qwebpage/tst_qwebpage.cpp: 17 (tst_QWebPage::userStyleSheetFromFile): 18 1 19 2011-09-09 Fady Samuel <fsamuel@chromium.org> 2 20 -
trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r94620 r94906 102 102 void acceptNavigationRequestWithNewWindow(); 103 103 void userStyleSheet(); 104 void userStyleSheetFromLocalFileUrl(); 104 105 void loadHtml5Video(); 105 106 void modified(); … … 466 467 TestNetworkManager* networkManager = new TestNetworkManager(m_page); 467 468 m_page->setNetworkAccessManager(networkManager); 468 networkManager->requestedUrls.clear();469 469 470 470 m_page->settings()->setUserStyleSheetUrl(QUrl("data:text/css;charset=utf-8;base64," 471 471 + QByteArray("p { background-image: url('http://does.not/exist.png');}").toBase64())); 472 m_view->setHtml("<p>hello world</p>"); 473 QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool)))); 474 475 QVERIFY(networkManager->requestedUrls.count() >= 1); 476 QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png")); 477 } 478 479 void tst_QWebPage::userStyleSheetFromLocalFileUrl() 480 { 481 TestNetworkManager* networkManager = new TestNetworkManager(m_page); 482 m_page->setNetworkAccessManager(networkManager); 483 484 QUrl styleSheetUrl = QUrl::fromLocalFile(TESTS_SOURCE_DIR + QLatin1String("qwebpage/resources/user.css")); 485 m_page->settings()->setUserStyleSheetUrl(styleSheetUrl); 472 486 m_view->setHtml("<p>hello world</p>"); 473 487 QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
Note: See TracChangeset
for help on using the changeset viewer.