[Webkit-unassigned] [Bug 32295] Typing in Wave repaints the whole screen

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 10 16:37:11 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32295





--- Comment #4 from James Robinson <jamesr at chromium.org>  2009-12-10 16:37:11 PST ---
Further reduction:

<div style="position:absolute">
  <div contenteditable="true">
    TYPE HERE
  </div>
</div>

The entire <body> is getting marked for repaint because:

RenderBlockLineLayout.cpp's RenderBlock::layoutInlineChildren() is called on
the RenderBox for the <body>.  This object's only child is the RenderBox for
the position:absolute div, which is not itself inline but since it does not
have a specified top:/left: does depend on its position in the natural flow. 
The check at line 826 is:
http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBlockLineLayout.cpp#L824:

bool fullLayout = !firstLineBox() || !firstChild() || selfNeedsLayout() ||
relayoutChildren;

Since the <body> has no non-whitespace text content, it never has any line
boxes and so the first check means that fullLayout is always true for this
RenderBox.  This means when the code hits line 888, it always repaints the
RenderBox's layer()'s repaintRect - which is the size of the body.

I believe the intent of this check is to ensure that fullLayout is set to true
whenever line boxes need to be built but have not been yet.  Removing the
!firstLineBox() clause or replacing it with !m_everHadLayout causes
fast/repaint/line-flow-with-floats-6.html to fail pixel tests as when the
innerHTML of the float:left <span> is replaced fullLayout is not set.  I think
that the fullLayout flag should only be set when !firstLineBox() is true _and_
the RenderBox will need line boxes (i.e. has some inline content).  I am not
sure how to implement this efficiently.

Does this sound correct?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list