<?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>125280</bug_id>
          
          <creation_ts>2013-12-04 23:09:49 -0800</creation_ts>
          <short_desc>Import the layout test style-sharing-type-and-readonly.html from blink</short_desc>
          <delta_ts>2015-01-27 12:50:36 -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>CSS</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>BlinkMergeCandidate, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Benjamin Poulain">benjamin</assigned_to>
          <cc>benjamin</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>956777</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-12-04 23:09:49 -0800</bug_when>
    <thetext>Merge https://chromium.googlesource.com/chromium/blink/+/b857a7d6c5813dc5d9f10c7eece0ac3d58afeafe
or come up with a better fix

RuleSet has a special case in isCommonAttributeSelectorAttribute for
allowing style sharing on elements that match &quot;type&quot; or &quot;readonly&quot;
attribute selectors as long as they have the same value. This was
added long ago in r96393 and worked based on the assumption that
there was logic in canShareStyleWithElement that actually checked
the value of the type and readonly attributes on the style sharing
candidates.

Later in r123730 the type attribute handling was regressed when it
was moved to only check the value for &lt;input&gt;. The readonly attribute
was later regressed in the same way in r134984.

This patch restores the checks those two patches moved but retains the
switch from getAttribute to fastGetAttribute for HTML which was likely
most of the performance improvement and fixes the bug where elements
would incorrectly share style even if one of them matched an attribute
selector.

Unfortunately this does mean that we need to call the slow geAttribute
in SVG documents which may be a minor regression. We can work to
improve the performance of SVG in the future once we get the
correctness back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064452</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-01-27 00:49:34 -0800</bug_when>
    <thetext>&lt;rdar://problem/19611922&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064453</commentid>
    <comment_count>2</comment_count>
      <attachid>245427</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2015-01-27 00:53:14 -0800</bug_when>
    <thetext>Created attachment 245427
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064454</commentid>
    <comment_count>3</comment_count>
      <attachid>245427</attachid>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2015-01-27 01:00:47 -0800</bug_when>
    <thetext>Comment on attachment 245427
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245427&amp;action=review

&gt; LayoutTests/fast/css/style-sharing-type-and-readonly-expected.txt:1
&gt; +Make sure special case style sharing for readonly and type attributes works

Nit: a full stop after &quot;works&quot;

&gt; LayoutTests/fast/css/style-sharing-type-and-readonly.html:19
&gt; +description(&quot;Make sure special case style sharing for readonly and type attributes works&quot;);

Ditto.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064622</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2015-01-27 12:50:36 -0800</bug_when>
    <thetext>Committed r179205: &lt;http://trac.webkit.org/changeset/179205&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>245427</attachid>
            <date>2015-01-27 00:53:14 -0800</date>
            <delta_ts>2015-01-27 01:00:47 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-125280-20150127005317.patch</filename>
            <type>text/plain</type>
            <size>2769</size>
            <attacher name="Benjamin Poulain">benjamin</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTc5MTc0CmRpZmYgLS1naXQgYS9MYXlvdXRUZXN0cy9DaGFu
Z2VMb2cgYi9MYXlvdXRUZXN0cy9DaGFuZ2VMb2cKaW5kZXggMzNhZDFlN2E3NGYzNDE4YTg5MmFj
YTE2YmM4YmE0NDIyNzE4MDI0Yy4uOWRhYmQwNDFjZTYzODViMWNmMDAxMmExNTNhMzYyM2E1Mjk0
MzFjNyAxMDA2NDQKLS0tIGEvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCisrKyBiL0xheW91dFRlc3Rz
L0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDE1LTAxLTI3ICBCZW5qYW1pbiBQb3VsYWlu
ICA8YmVuamFtaW5Ad2Via2l0Lm9yZz4KKworICAgICAgICBJbXBvcnQgdGhlIGxheW91dCB0ZXN0
IHN0eWxlLXNoYXJpbmctdHlwZS1hbmQtcmVhZG9ubHkuaHRtbCBmcm9tIGJsaW5rCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMjUyODAKKworICAgICAg
ICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBJIGZpeGVkIHRoZSBidWcg
YSB3aGlsZSBhZ28gYnV0IGhhdmluZyBvbmUgbW9yZSB0ZXN0IHNlZW1zIHZhbHVhYmxlLgorICAg
ICAgICBUaGlzIHRlc3QgaXMgZnJvbSBibGluazogaHR0c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XB0PgorCis8c3R5bGU+CisgIGRpdltyZWFkb25seT0icmVkIl0geworICAgIGNvbG9y
OiByZWQ7CisgIH0KKyAgZGl2W3R5cGU9ImJsdWUiXSB7CisgICAgY29sb3I6IGJsdWU7CisgIH0K
Kzwvc3R5bGU+CisKKzxkaXYgYmxhY2s+QmxhY2s8L2Rpdj4KKzxkaXYgcmVhZG9ubHk9InJlZCI+
UmVkPC9kaXY+Cis8ZGl2IHR5cGU9ImJsdWUiPkJsdWU8L2Rpdj4KKworPHNjcmlwdD4KK2Rlc2Ny
aXB0aW9uKCJNYWtlIHN1cmUgc3BlY2lhbCBjYXNlIHN0eWxlIHNoYXJpbmcgZm9yIHJlYWRvbmx5
IGFuZCB0eXBlIGF0dHJpYnV0ZXMgd29ya3MiKTsKKworc2hvdWxkQmUoJ2dldENvbXB1dGVkU3R5
bGUoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiW2JsYWNrXSIpKS5jb2xvcicsJyJyZ2IoMCwgMCwg
MCkiJyk7CitzaG91bGRCZSgnZ2V0Q29tcHV0ZWRTdHlsZShkb2N1bWVudC5xdWVyeVNlbGVjdG9y
KCJbcmVhZG9ubHldIikpLmNvbG9yJywnInJnYigyNTUsIDAsIDApIicpOworc2hvdWxkQmUoJ2dl
dENvbXB1dGVkU3R5bGUoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiW3R5cGVdIikpLmNvbG9yJywn
InJnYigwLCAwLCAyNTUpIicpOworPC9zY3JpcHQ+CisK
</data>
<flag name="review"
          id="270370"
          type_id="1"
          status="+"
          setter="svillar"
    />
          </attachment>
      

    </bug>

</bugzilla>