Changeset 95548 in webkit
- Timestamp:
- Sep 20, 2011 9:41:59 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95546 r95548 1 2011-09-20 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] Permit qrc resources to load in QWebSettings::setUserStyleSheetUrl() 4 https://bugs.webkit.org/show_bug.cgi?id=51159 5 6 Permit any URL with a local scheme to set a user style sheet. Allow qrc 7 resource URLs as arguments to QWebSettings::setUserStyleSheetUrl(). 8 9 New platform layout test since user style sheet is testable from DRT. 10 11 Reviewed by Kenneth Rohde Christiansen. 12 13 * platform/qt/fast/loader/user-stylesheet-qrc-path-expected.txt: Added. 14 * platform/qt/fast/loader/user-stylesheet-qrc-path.html: Added. 15 1 16 2011-09-20 Dmitry Lomov <dslomov@google.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r95542 r95548 1 2011-09-20 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] Permit qrc resources to load in QWebSettings::setUserStyleSheetUrl() 4 https://bugs.webkit.org/show_bug.cgi?id=51159 5 6 Permit any URL with a local scheme to set a user style sheet. Allow qrc 7 resource URLs as arguments to QWebSettings::setUserStyleSheetUrl(). 8 9 Reviewed by Kenneth Rohde Christiansen. 10 11 * page/Page.cpp: 12 (WebCore::Page::userStyleSheetLocationChanged): 13 * platform/qt/KURLQt.cpp: 14 (WebCore::KURL::fileSystemPath): 15 1 16 2011-09-20 Csaba Osztrogonác <ossy@webkit.org> 2 17 -
trunk/Source/WebCore/page/Page.cpp
r95244 r95548 64 64 #include "RenderWidget.h" 65 65 #include "RuntimeEnabledFeatures.h" 66 #include "SchemeRegistry.h" 66 67 #include "Settings.h" 67 68 #include "SharedBuffer.h" … … 687 688 // text instead of loading the URL ourselves. 688 689 KURL url = m_settings->userStyleSheetLocation(); 689 if (url.isLocalFile()) 690 691 // Allow any local file URL scheme to be loaded. 692 if (SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol())) 690 693 m_userStyleSheetPath = url.fileSystemPath(); 691 694 else -
trunk/Source/WebCore/platform/qt/KURLQt.cpp
r94906 r95548 44 44 String KURL::fileSystemPath() const 45 45 { 46 if (!isValid() || !protocolIs("file"))46 if (!isValid()) 47 47 return String(); 48 48 49 return static_cast<QUrl>(*this).toLocalFile(); 49 if (isLocalFile()) 50 return static_cast<QUrl>(*this).toLocalFile(); 51 52 // A valid qrc resource path begins with a colon. 53 if (protocolIs("qrc")) 54 return ":" + path(); 55 56 return String(); 50 57 } 51 58 -
trunk/Source/WebKit/qt/ChangeLog
r95525 r95548 1 2011-09-20 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] Permit qrc resources to load in QWebSettings::setUserStyleSheetUrl() 4 https://bugs.webkit.org/show_bug.cgi?id=51159 5 6 Permit any URL with a local scheme to set a user style sheet. Allow qrc 7 resource URLs as arguments to QWebSettings::setUserStyleSheetUrl(). 8 9 New test case makes sure a qrc URL will properly load a user stylesheet. 10 11 Reviewed by Kenneth Rohde Christiansen. 12 13 (tst_QWebPage::userStyleSheetFromQrcUrl): 14 * tests/qwebpage/tst_qwebpage.qrc: 15 1 16 2011-09-20 Adenilson Cavalcanti <adenilson.silva@openbossa.org> 2 17 -
trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
r95055 r95548 104 104 void userStyleSheet(); 105 105 void userStyleSheetFromLocalFileUrl(); 106 void userStyleSheetFromQrcUrl(); 106 107 void loadHtml5Video(); 107 108 void modified(); … … 505 506 } 506 507 508 void tst_QWebPage::userStyleSheetFromQrcUrl() 509 { 510 TestNetworkManager* networkManager = new TestNetworkManager(m_page); 511 m_page->setNetworkAccessManager(networkManager); 512 513 m_page->settings()->setUserStyleSheetUrl(QUrl("qrc:///resources/user.css")); 514 m_view->setHtml("<p>hello world</p>"); 515 QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool)))); 516 517 QVERIFY(networkManager->requestedUrls.count() >= 1); 518 QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png")); 519 } 520 507 521 void tst_QWebPage::loadHtml5Video() 508 522 { -
trunk/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
r95055 r95548 10 10 <file>resources/content.html</file> 11 11 <file>resources/script.html</file> 12 <file>resources/user.css</file> 12 13 </qresource> 13 14 </RCC> -
trunk/Tools/ChangeLog
r95547 r95548 1 2011-09-20 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] Permit qrc resources to load in QWebSettings::setUserStyleSheetUrl() 4 https://bugs.webkit.org/show_bug.cgi?id=51159 5 6 Permit any URL with a local scheme to set a user style sheet. Allow qrc 7 resource URLs as arguments to QWebSettings::setUserStyleSheetUrl(). 8 9 Add DRT/WKTR qrc resource to test loading user style sheets from a qrc URL. 10 11 Reviewed by Kenneth Rohde Christiansen. 12 13 * DumpRenderTree/qt/DumpRenderTree.pro: 14 * DumpRenderTree/qt/DumpRenderTree.qrc: Added. 15 * DumpRenderTree/qt/resources/user.css: Added. 16 (body): 17 * WebKitTestRunner/qt/WebKitTestRunner.pro: 18 * WebKitTestRunner/qt/WebKitTestRunner.qrc: Added. 19 * WebKitTestRunner/qt/resources/user.css: Added. 20 (body): 21 1 22 2011-09-20 Leandro Pereira <leandro@profusion.mobi> 2 23 -
trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro
r83626 r95548 54 54 DEFINES += USE_SYSTEM_MALLOC=1 55 55 DEFINES -= QT_ASCII_CAST_WARNINGS 56 57 RESOURCES = DumpRenderTree.qrc -
trunk/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
r91863 r95548 66 66 include(../../../Source/JavaScriptCore/JavaScriptCore.pri) 67 67 prependJavaScriptCoreLib(../../JavaScriptCore) 68 69 RESOURCES = WebKitTestRunner.qrc
Note: See TracChangeset
for help on using the changeset viewer.