<?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>50417</bug_id>
          
          <creation_ts>2010-12-02 15:54:51 -0800</creation_ts>
          <short_desc>Avoid repainting compositing layers unnecessarily when layout changes</short_desc>
          <delta_ts>2017-08-17 13:12:07 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>74370</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>dino</cc>
    
    <cc>ed_dvd</cc>
    
    <cc>igor.oliveira</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>316479</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-12-02 15:54:51 -0800</bug_when>
    <thetext>RenderBoxModelObject::styleWillChange() has this code:

        if (diff == StyleDifferenceLayout) {
            // When a layout hint happens, we go ahead and do a repaint of the layer, since the layer could
            // end up being destroyed.
            if (hasLayer()) {
                if (style()-&gt;position() != newStyle-&gt;position() ||
                    style()-&gt;zIndex() != newStyle-&gt;zIndex() ||
                    style()-&gt;hasAutoZIndex() != newStyle-&gt;hasAutoZIndex() ||
                    !(style()-&gt;clip() == newStyle-&gt;clip()) ||
                    style()-&gt;hasClip() != newStyle-&gt;hasClip() ||
                    style()-&gt;opacity() != newStyle-&gt;opacity() ||
                    style()-&gt;transform() != newStyle-&gt;transform())
                layer()-&gt;repaintIncludingDescendants();

This can cause extra repainting of compositing layers when they don&apos;t need to be repainted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>334070</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-01-13 18:15:33 -0800</bug_when>
    <thetext>&lt;rdar://problem/8863549&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>335990</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-01-18 12:21:54 -0800</bug_when>
    <thetext>There&apos;s also this:


inline void RenderObject::setNeedsLayout(bool b, bool markParents)
{
    bool alreadyNeededLayout = m_needsLayout;
    m_needsLayout = b;
    if (b) {
        ASSERT(!isSetNeedsLayoutForbidden());
        if (!alreadyNeededLayout) {
...
            if (hasLayer())
                setLayerNeedsFullRepaint();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1339710</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-08-17 13:11:54 -0700</bug_when>
    <thetext>One specific example we should optimize is to avoid repaints when doing a &quot;positioned movement only&quot; layout.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>