<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>60372</bug_id>
          
          <creation_ts>2011-05-06 07:34:57 -0700</creation_ts>
          <short_desc>[Qt] tst_QWebElement::style() fails because QWebElement::InlineStyle now works as expected</short_desc>
          <delta_ts>2012-11-12 07:31:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>38654</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ademar Reis">ademar</reporter>
          <assigned_to name="Jocelyn Turcotte">jturcotte</assigned_to>
          <cc>abecsi</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>commit-queue</cc>
    
    <cc>jturcotte</cc>
    
    <cc>ossy</cc>
    
    <cc>rafael.lobo</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>399505</commentid>
    <comment_count>0</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2011-05-06 07:34:57 -0700</bug_when>
    <thetext>The QWebElement documentation says that about QWebElement::InlineStyle: &quot;Return the property value as it is defined in the element, without respecting style inheritance and other CSS rules&quot;.

In our QWebElement test, we do the following:

&quot;&quot;&quot;
    ...
    p.setStyleProperty(&quot;color&quot;, &quot;green !important&quot;);
    QCOMPARE(p.styleProperty(&quot;color&quot;, QWebElement::InlineStyle), QLatin1String(&quot;green&quot;));
    QCOMPARE(p.styleProperty(&quot;color&quot;, QWebElement::CascadedStyle), QLatin1String(&quot;green&quot;));

    p.setStyleProperty(&quot;color&quot;, &quot;blue&quot;);
    QCOMPARE(p.styleProperty(&quot;color&quot;, QWebElement::InlineStyle), QLatin1String(&quot;blue&quot;));
    ...
&quot;&quot;&quot;

But the test fails:

&quot;&quot;&quot;
FAIL!  : tst_QWebElement::style() Compared values are not the same
   Actual (p.styleProperty(&quot;color&quot;, QWebElement::InlineStyle)): green
   Expected (QLatin1String(&quot;blue&quot;)): blue
   Loc: [/opt/projects/webkit/webkit/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp(486)]
&quot;&quot;&quot;

When this was first implemented, the test expectation was wrong and thus the test was passing. Then there was a change in the CSS code that introduced a regression that curiously made our implementation actually work (and the test fail). The test was fixed and right after so was the regression, so now we have a broken test (as it should be).

See Bug 58032 for the whole story.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399678</commentid>
    <comment_count>1</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2011-05-06 11:43:45 -0700</bug_when>
    <thetext>From WebCore::CSSMutableStyleDeclaration::setProperty():

&quot;&quot;&quot;
// When replacing an existing property value, this moves the property to the end of the list.
&quot;&quot;&quot;
(it also says &quot;Firefox preserves the position, and MSIE moves the property to the beginning&quot;, but that&apos;s not relevant for this bug)

In the testing code, we set the property twice for the same element:

    p.setStyleProperty(&quot;color&quot;, &quot;green !important&quot;);
    ...
    p.setStyleProperty(&quot;color&quot;, &quot;blue&quot;);
    ...

So when we call styleProperty(QWebElement::InlineStyle) after the second setStyleProperty(), there are two inline styles and we get the one with high priority.

In summary, the implementation is right and the test is wrong, so it&apos;s just a matter or reverting the previous &quot;fix&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399788</commentid>
    <comment_count>2</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2011-05-06 13:52:15 -0700</bug_when>
    <thetext>Reopening, please ignore my previous round of comments. :-P

I&apos;ll make sure my patch includes better documentation to avoid more confusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>407059</commentid>
    <comment_count>3</comment_count>
      <attachid>94212</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-20 06:53:01 -0700</bug_when>
    <thetext>Created attachment 94212
mark failing test case as expected fail</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>407063</commentid>
    <comment_count>4</comment_count>
      <attachid>94212</attachid>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2011-05-20 06:56:08 -0700</bug_when>
    <thetext>Comment on attachment 94212
mark failing test case as expected fail

LGTM. Fixing this will take some more time (time that I don&apos;t have at the moment) :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>407085</commentid>
    <comment_count>5</comment_count>
      <attachid>94212</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-05-20 07:29:28 -0700</bug_when>
    <thetext>Comment on attachment 94212
mark failing test case as expected fail

Clearing flags on attachment: 94212

Committed r86953: &lt;http://trac.webkit.org/changeset/86953&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>407086</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-05-20 07:29:33 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>407087</commentid>
    <comment_count>7</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-20 07:30:34 -0700</bug_when>
    <thetext>Reopen to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>413583</commentid>
    <comment_count>8</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2011-06-01 12:32:57 -0700</bug_when>
    <thetext>Revision r86953 cherry-picked into qtwebkit-2.2 with commit b6ea329 &lt;http://gitorious.org/webkit/qtwebkit/commit/b6ea329&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>763043</commentid>
    <comment_count>9</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2012-11-09 08:32:22 -0800</bug_when>
    <thetext>Ademar was right in comment #1, a non-important inline style shouldn&apos;t be overwritten by a non-important one. So InlineStyle doesn&apos;t apply inheritance, but does consider the importance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>763044</commentid>
    <comment_count>10</comment_count>
      <attachid>173313</attachid>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2012-11-09 08:35:16 -0800</bug_when>
    <thetext>Created attachment 173313
Patch

Unmark the failure and fix the expected value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>764401</commentid>
    <comment_count>11</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2012-11-12 07:31:15 -0800</bug_when>
    <thetext>Committed r134233: &lt;http://trac.webkit.org/changeset/134233&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>94212</attachid>
            <date>2011-05-20 06:53:01 -0700</date>
            <delta_ts>2011-05-20 07:30:51 -0700</delta_ts>
            <desc>mark failing test case as expected fail</desc>
            <filename>1.patch</filename>
            <type>text/plain</type>
            <size>1459</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvcXQvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9x
dC9DaGFuZ2VMb2cKaW5kZXggYzdjZTg1Yi4uZDczOTIwMSAxMDA2NDQKLS0tIGEvU291cmNlL1dl
YktpdC9xdC9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdC9xdC9DaGFuZ2VMb2cKQEAgLTEs
NSArMSwxNSBAQAogMjAx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GVtZW50L3RzdF9xd2ViZWxlbWVudC5jcHAKQEAgLTQ4Myw2ICs0ODMsNyBAQCB2
b2lkIHRzdF9RV2ViRWxlbWVudDo6c3R5bGUoKQogICAgIFFDT01QQVJFKHAuc3R5bGVQcm9wZXJ0
eSgiY29sb3IiLCBRV2ViRWxlbWVudDo6Q2FzY2FkZWRTdHlsZSksIFFMYXRpbjFTdHJpbmcoImdy
ZWVuIikpOwogCiAgICAgcC5zZXRTdHlsZVByb3BlcnR5KCJjb2xvciIsICJibHVlIik7CisgICAg
UUVYUEVDVF9GQUlMKCIiLCAiaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTYwMzcyIiwgQ29udGludWUpOwogICAgIFFDT01QQVJFKHAuc3R5bGVQcm9wZXJ0eSgiY29sb3Ii
LCBRV2ViRWxlbWVudDo6SW5saW5lU3R5bGUpLCBRTGF0aW4xU3RyaW5nKCJibHVlIikpOwogICAg
IFFDT01QQVJFKHAuc3R5bGVQcm9wZXJ0eSgiY29sb3IiLCBRV2ViRWxlbWVudDo6Q2FzY2FkZWRT
dHlsZSksIFFMYXRpbjFTdHJpbmcoImdyZWVuIikpOwogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>173313</attachid>
            <date>2012-11-09 08:35:16 -0800</date>
            <delta_ts>2012-11-12 06:33:00 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-60372-20121109173323.patch</filename>
            <type>text/plain</type>
            <size>2050</size>
            <attacher name="Jocelyn Turcotte">jturcotte</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMzMjg1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L3F0
L0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvcXQvQ2hhbmdlTG9nCmluZGV4IDA3Y2U5YWVkZjQ5
YmUxMTlmN2Y0YTFmOGQ5M2Q1OGU1N2Z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mx1ZSIpKTsKKyAgICAvLyBBIGN1cnJlbnQgaW1wb3J0YW50IElubGluZVN0eWxlIHNob3Vs
ZG4ndCBiZSBvdmVyd3JpdHRlbiBieSBhIG5vbi1pbXBvcnRhbnQgb25lLgorICAgIFFDT01QQVJF
KHAuc3R5bGVQcm9wZXJ0eSgiY29sb3IiLCBRV2ViRWxlbWVudDo6SW5saW5lU3R5bGUpLCBRTGF0
aW4xU3RyaW5nKCJncmVlbiIpKTsKICAgICBRQ09NUEFSRShwLnN0eWxlUHJvcGVydHkoImNvbG9y
IiwgUVdlYkVsZW1lbnQ6OkNhc2NhZGVkU3R5bGUpLCBRTGF0aW4xU3RyaW5nKCJncmVlbiIpKTsK
IAogICAgIHAuc2V0U3R5bGVQcm9wZXJ0eSgiY29sb3IiLCAiYmx1ZSAhaW1wb3J0YW50Iik7Cg==
</data>
<flag name="review"
          id="187957"
          type_id="1"
          status="+"
          setter="hausmann"
    />
          </attachment>
      

    </bug>

</bugzilla>