Changeset 89830 in webkit
- Timestamp:
- Jun 27, 2011 10:18:24 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89828 r89830 1 2011-06-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] tst_QWebFrame::overloadedSlots() fails 6 https://bugs.webkit.org/show_bug.cgi?id=37319 7 8 This patch is based on Noam Rosenthal original patch in the same bug. 9 10 When hinted with QWebElement metatype, we qualify the conversion 11 from JSElement as a "perfect match". 12 13 The test was failing because the wrong slot was called, since the QWebElement 14 match was taken as equal to the others and not chosen when the metacall happened. 15 16 * bridge/qt/qt_runtime.cpp: 17 (JSC::Bindings::convertValueToQVariant): Identify the conversion between JSElement 18 to QWebElement as a "perfect match" (dist = 0). Add comments to explain the reason 19 why we have the implicit conversion. 20 1 21 2011-06-27 ChangSeok Oh <shivamidow@gmail.com> 2 22 -
trunk/Source/WebCore/bridge/qt/qt_runtime.cpp
r89019 r89830 779 779 ret = QtPixmapInstance::variantFromObject(object, static_cast<QMetaType::Type>(hint)); 780 780 } else if (hint == (QMetaType::Type) qMetaTypeId<QWebElement>()) { 781 if (object && object->inherits(&JSHTMLElement::s_info)) 782 ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSHTMLElement*>(object))->impl())); 783 else if (object && object->inherits(&JSDocument::s_info)) 781 if (object && object->inherits(&JSElement::s_info)) { 782 ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSElement*>(object))->impl())); 783 dist = 0; 784 // Allow other objects to reach this one. This won't cause our algorithm to 785 // loop since when we find an Element we do not recurse. 786 visitedObjects->remove(object); 787 break; 788 } 789 if (object && object->inherits(&JSDocument::s_info)) { 790 // To support LayoutTestControllerQt::nodesFromRect(), used in DRT, we do an implicit 791 // conversion from 'document' to the QWebElement representing the 'document.documentElement'. 792 // We can't simply use a QVariantMap in nodesFromRect() because it currently times out 793 // when serializing DOMMimeType and DOMPlugin, even if we limit the recursion. 784 794 ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSDocument*>(object))->impl()->documentElement())); 785 else795 } else 786 796 ret = QVariant::fromValue<QWebElement>(QWebElement()); 787 797 } else if (hint == (QMetaType::Type) qMetaTypeId<QDRTNode>()) { -
trunk/Source/WebKit/qt/ChangeLog
r89744 r89830 1 2011-06-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] tst_QWebFrame::overloadedSlots() fails 6 https://bugs.webkit.org/show_bug.cgi?id=37319 7 8 * tests/qwebframe/tst_qwebframe.cpp: 9 (tst_QWebFrame::overloadedSlots): Remove expected failure and 10 fix the comment. 11 1 12 2011-06-20 Robert Hogan <robert@webkit.org> 2 13 -
trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r89561 r89830 2005 2005 */ 2006 2006 2007 // should pick myOverloadedSlot(QRegExp)2007 // Should pick myOverloadedSlot(QWebElement). 2008 2008 m_myObject->resetQtFunctionInvoked(); 2009 2009 evalJS("myObject.myOverloadedSlot(document.body)"); 2010 QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=37319", Continue);2011 2010 QCOMPARE(m_myObject->qtFunctionInvoked(), 36); 2012 2011
Note: See TracChangeset
for help on using the changeset viewer.