<?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>134672</bug_id>
          
          <creation_ts>2014-07-06 18:56:08 -0700</creation_ts>
          <short_desc>[Mac] No need to paint focus ring if paintRect is completely contained</short_desc>
          <delta_ts>2014-07-09 19:33:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dean Jackson">dino</reporter>
          <assigned_to name="Dean Jackson">dino</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>glenn</cc>
    
    <cc>kondapallykalyan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1020743</commentid>
    <comment_count>0</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-06 18:56:08 -0700</bug_when>
    <thetext>[Mac] No need to paint focus ring if paintRect is completely contained</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020744</commentid>
    <comment_count>1</comment_count>
      <attachid>234474</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-06 19:02:23 -0700</bug_when>
    <thetext>Created attachment 234474
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020751</commentid>
    <comment_count>2</comment_count>
      <attachid>234474</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-07-06 19:53:24 -0700</bug_when>
    <thetext>Comment on attachment 234474
Patch

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

What if a focus ring rectangle intersects, but does not contain, the painting rect? For example, consider that a small thin line might be at the top of a text field input element, in front of it, and that line could change color. This seems OK, but I think it could leave the focus ring damaged in cases like that. I think that this function should use enclosingIntRect and intersects.

&gt; Source/WebCore/rendering/RenderObject.cpp:1019
&gt; +    IntRect paintRect(paintInfo.rect);

Why truncate rather than using enclosingIntRect, enclosedIntRect, or roundedIntRect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020752</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2014-07-06 19:54:55 -0700</bug_when>
    <thetext>I think my logic might be wrong. It might be something tricker than just intersects. I think we really need to figure out if the focus ring painted region touches a paint rect, a rectangle intersection is not a sufficient test for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020787</commentid>
    <comment_count>4</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 00:03:15 -0700</bug_when>
    <thetext>Our CoreAnimation/CoreGraphics contact is suggesting they may have a fix that restores the 10.9 behaviour in this case. I&apos;ll be trying it out when I get a root tomorrow.

If so, I&apos;d much prefer to NOT land this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020871</commentid>
    <comment_count>5</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 12:11:59 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Our CoreAnimation/CoreGraphics contact is suggesting they may have a fix that restores the 10.9 behaviour in this case. I&apos;ll be trying it out when I get a root tomorrow.
&gt; 
&gt; If so, I&apos;d much prefer to NOT land this change.

It didn&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020873</commentid>
    <comment_count>6</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 12:31:26 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; I think my logic might be wrong. It might be something tricker than just intersects. I think we really need to figure out if the focus ring painted region touches a paint rect, a rectangle intersection is not a sufficient test for this.

There is some subtlety to the patch that wasn&apos;t explained. Suppose you have a text area that is X,Y,W,H. When we paint it in the focused state we apply some padding to the paint rect, so it has the value X-P, Y-P, W+2P, H+2P. But the focus ring rect is still X,Y,W,H. In that case the focus ring does not contain the paintRect, so we paint focus.

If we get a partial repaint (e.g. text entry), then our paint rect is a lot smaller and does not contain the focus padding. But the focus ring is still the same full size, and contains the paint rect, so we don&apos;t paint the focus. That should cover all cases where the content of the element changes (even if it is right against the edge of the element). But we still need to cover repaints caused by other, possibly overlapping, elements.

You&apos;re right in that we definitely need to use enclosingIntRect. 

Also, I think you&apos;re on to something about needing more logic. Suppose we have another element that underlaps the top left corner of the text area. If it causes a repaint then our paint rect will intersect the focus ring rect, but not be completely enclosed. So we would not paint the focus.

Maybe the logic should be: paint focus if either the focus rect does not completely contain the paint rect, or if the focus rect intersects with the paint rect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020879</commentid>
    <comment_count>7</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 13:05:21 -0700</bug_when>
    <thetext>(In reply to comment #6)

&gt; Maybe the logic should be: paint focus if either the focus rect does not completely contain the paint rect, or if the focus rect intersects with the paint rect.

That doesn&apos;t quite work either. When we get an update paint, our paintRect does not have the focus ring padding applied, which means it is much more likely to intersect with the focus rect.

You&apos;d think that I&apos;d be able to simply clip the drawing to hide any focus ring updates, but unfortunately they explicitly paint outside the clip bounds!! This is the cause of the problem - even a restricted update paint is still updating outside that region when drawing the focus ring. This is why I&apos;m trying to come up with logic to stop the focus ring from attempting to render at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020904</commentid>
    <comment_count>8</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 14:21:04 -0700</bug_when>
    <thetext>And I just tested with elements that have partial overlap causing repaints. The focus ring does not render correctly if I just consider containment, so I will need some form of intersection (but it sounds like it has to be absolute intersection, not just touching - or at least some part of the paint rect needs to be outside the focusring rect).

I&apos;m quite disturbed by the logic here :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020924</commentid>
    <comment_count>9</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 15:16:36 -0700</bug_when>
    <thetext>After a bit of experimentation I have something that mostly works, but might be the best we can do at the moment:

- Only paint the focus ring if has at least one corner inside the painting rectangle (completely inside).

This still causes some repaint cruft if we have a partial over/underlap, but much better than we have at the moment. Since we extend painting rectangles by outline (focus ring radius) we will hit the rectangles even if they are adjacent rather than overlapping. 

There is still an edge case that doesn&apos;t work, which is if the repaint rectangle is adjacent to the expanded focus ring. But I&apos;m not sure we can fix that without getting the cruft from partial line updates.

(Note: I still need a fix in WKSI to manage this, which is just setting the focus ring clip to the paint rect)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020925</commentid>
    <comment_count>10</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 15:17:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/17188871&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020926</commentid>
    <comment_count>11</comment_count>
      <attachid>234518</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 15:20:04 -0700</bug_when>
    <thetext>Created attachment 234518
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020943</commentid>
    <comment_count>12</comment_count>
      <attachid>234518</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-07 15:44:31 -0700</bug_when>
    <thetext>Comment on attachment 234518
Patch

Discussion with Simon on IRC concluded with us thinking this doesn&apos;t actually address the problem. We&apos;re going to ask CG for a fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1021532</commentid>
    <comment_count>13</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-09 19:33:10 -0700</bug_when>
    <thetext>There is no need to apply such a fix. I can configure the internal focus ring code such that the clip is correct.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>234474</attachid>
            <date>2014-07-06 19:02:23 -0700</date>
            <delta_ts>2014-07-06 19:53:24 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-134672-20140707120204.patch</filename>
            <type>text/plain</type>
            <size>3123</size>
            <attacher name="Dean Jackson">dino</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTcwODI3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNGIxYTI1YTA3YjNiOTNh
MGJkYmFjNDNhMzNiMzBiZDE4OWU2NzhiNS4uNWRkMzc4ZDY0MjZmZmY1ZmZiNWU4NTgzZTI3NGIz
MDFiYmVlMDdiNSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI4IEBACisyMDE0LTA3LTA2ICBEZWFu
IEphY2tzb24gIDxkaW5vQGFwcGxlLmNvbT4KKworICAgICAgICBbTWFjXSBObyBuZWVkIHRvIHBh
aW50IGZvY3VzIHJpbmcgaWYgcGFpbnRSZWN0IGlzIGNvbXBsZXRlbHkgY29udGFpbmVkCisgICAg
ICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMzQ2NzIKKyAgICAg
ICAgPHJkYXI6Ly9wcm9ibGVtLzE3MTg4ODcxPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9E
WSAoT09QUyEpLgorCisgICAg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AgICBw
YWludEluZm8uY29udGV4dC0+ZHJhd0ZvY3VzUmluZyhmb2N1c1JpbmdSZWN0cywgc3R5bGUtPm91
dGxpbmVXaWR0aCgpLCBzdHlsZS0+b3V0bGluZU9mZnNldCgpLCBzdHlsZS0+dmlzaXRlZERlcGVu
ZGVudENvbG9yKENTU1Byb3BlcnR5T3V0bGluZUNvbG9yKSk7CiAjZW5kaWYK
</data>
<flag name="review"
          id="259004"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>234518</attachid>
            <date>2014-07-07 15:20:04 -0700</date>
            <delta_ts>2014-07-07 15:44:30 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-134672-20140708081945.patch</filename>
            <type>text/plain</type>
            <size>3741</size>
            <attacher name="Dean Jackson">dino</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTcwODI3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNGIxYTI1YTA3YjNiOTNh
MGJkYmFjNDNhMzNiMzBiZDE4OWU2NzhiNS4uMGJmMDMyYjU5NzI5NGM5YTFlYzY1NWEwNjRjZTk3
ZGFlNzIyNjczNiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI4IEBACisyMDE0LTA3LTA3ICBEZWFu
IEphY2tzb24gIDxkaW5vQGFwcGxlLmNvbT4KKworICAgICAgICBbTWFjXSBObyBuZWVkIHRvIHBh
aW50IGZvY3VzIHJpbmcgaWYgcGFpbnRSZWN0IGlzIGNvbXBsZXRlbHkgY29udGFpbmVkCisgICAg
ICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfY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ZS0+b3V0bGluZU9mZnNldCgpLCBzdHlsZS0+dmlzaXRlZERlcGVuZGVudENvbG9y
KENTU1Byb3BlcnR5T3V0bGluZUNvbG9yKSk7CiAjZW5kaWYK
</data>
<flag name="review"
          id="259052"
          type_id="1"
          status="-"
          setter="dino"
    />
          </attachment>
      

    </bug>

</bugzilla>