Changeset 58427 in webkit
- Timestamp:
- Apr 28, 2010 1:50:23 PM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebelement.cpp
r56825 r58427 822 822 int propID = cssPropertyID(name); 823 823 824 RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element );824 RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element, true); 825 825 if (!propID || !style) 826 826 return QString(); -
trunk/WebKit/qt/ChangeLog
r58405 r58427 1 2010-04-28 Antonio Gomes <tonikitoo@webkit.org>, Yi Shen <yi.4.shen@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt] tst_QWebHistoryInterface::visitedLinks() fails 6 https://bugs.webkit.org/show_bug.cgi?id=37323 7 8 Patch fixes styleProperty method of QWebElement to make use of 9 CSSComputedStyleDeclaration::computedStyle 'allowVisitedStyle' parameter 10 and the corresponding failing QWebHistoryInterface::visitedLinks method. 11 12 * Api/qwebelement.cpp: 13 (QWebElement::styleProperty): 14 * tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp: 15 (tst_QWebHistoryInterface::visitedLinks): 16 1 17 2010-04-28 Luiz Agostini <luiz.agostini@openbossa.org> 2 18 -
trunk/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
r43052 r58427 24 24 #include <qwebview.h> 25 25 #include <qwebframe.h> 26 #include <qwebelement.h> 26 27 #include <qwebhistoryinterface.h> 27 28 #include <QDebug> … … 86 87 { 87 88 QWebHistoryInterface::setDefaultInterface(new FakeHistoryImplementation); 88 m_view->setHtml("<html><body><a href='http://www.trolltech.com'>Trolltech</a></body></html>"); 89 QCOMPARE(m_page->mainFrame()->evaluateJavaScript("document.querySelectorAll(':visited').length;").toString(), 90 QString::fromLatin1("1")); 89 m_view->setHtml("<html><style>:link{color:green}:visited{color:red}</style><body><a href='http://www.trolltech.com' id='vlink'>Trolltech</a></body></html>"); 90 QWebElement anchor = m_view->page()->mainFrame()->findFirstElement("a[id=vlink]"); 91 QString linkColor = anchor.styleProperty("color", QWebElement::ComputedStyle); 92 QCOMPARE(linkColor, QString::fromLatin1("rgb(255, 0, 0)")); 91 93 } 92 94
Note: See TracChangeset
for help on using the changeset viewer.