Changeset 134232 in webkit


Ignore:
Timestamp:
Nov 12, 2012 7:25:46 AM (11 years ago)
Author:
jocelyn.turcotte@digia.com
Message:

[Qt] tst_QWebElement::style() fails because QWebElement::CascadedStyle doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=65244

Reviewed by Kenneth Rohde Christiansen.

StyleResolver::styleRulesForElement now takes flags as parameter instead of a bool to specify
that we want to exclude UI and user style sheets.

  • Api/qwebelement.cpp:

(QWebElement::styleProperty):

  • tests/qwebelement/tst_qwebelement.cpp:

(tst_QWebElement::style):

Location:
trunk/Source/WebKit/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/Api/qwebelement.cpp

    r134231 r134232  
    826826
    827827        Document* doc = m_element->document();
    828         if (RefPtr<CSSRuleList> rules = doc->styleResolver()->styleRulesForElement(m_element, /*authorOnly*/ true)) {
     828        if (RefPtr<CSSRuleList> rules = doc->styleResolver()->styleRulesForElement(m_element, StyleResolver::AuthorCSSRules | StyleResolver::CrossOriginCSSRules)) {
    829829            for (int i = rules->length(); i > 0; --i) {
    830830                CSSStyleRule* rule = static_cast<CSSStyleRule*>(rules->item(i - 1));
  • trunk/Source/WebKit/qt/ChangeLog

    r134231 r134232  
     12012-11-09  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
     2
     3        [Qt] tst_QWebElement::style() fails because QWebElement::CascadedStyle doesn't work as expected
     4        https://bugs.webkit.org/show_bug.cgi?id=65244
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        StyleResolver::styleRulesForElement now takes flags as parameter instead of a bool to specify
     9        that we want to exclude UI and user style sheets.
     10
     11        * Api/qwebelement.cpp:
     12        (QWebElement::styleProperty):
     13        * tests/qwebelement/tst_qwebelement.cpp:
     14        (tst_QWebElement::style):
     15
    1162012-11-09  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
    217
  • trunk/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp

    r125603 r134232  
    476476
    477477    QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("red"));
    478     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65244", Continue);
    479478    QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("yellow"));
    480479    QCOMPARE(p.styleProperty("cursor", QWebElement::InlineStyle), QLatin1String("auto"));
     
    542541
    543542    QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String(""));
    544     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65244", Continue);
    545543    QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("red"));
    546544
     
    563561    p = m_mainFrame->documentElement().findAll("p").at(0);
    564562    QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
    565     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65244", Continue);
    566563    QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black"));
    567564
     
    581578
    582579    p = m_mainFrame->documentElement().findAll("p").at(0);
    583     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65244", Continue);
    584580    QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black"));
    585581
Note: See TracChangeset for help on using the changeset viewer.