• wangxianzhu@chromium.org's avatar
    Reattach whitespace siblings only when needed · fbdab111
    wangxianzhu@chromium.org authored
    When an element's renderer is being reattached, previously we reattach
    whitespace siblings, causing full paint invalidation of the parent.
    
    If the whitespace sibling needed renderer and still needs renderer,
    don't reattach.
    
    - Renamed Node::reattachWhitespaceSiblings() to
      Node::reattachWhitespaceSlibingsIfNeeded();
    - In the function, test if rendererIsNeeded changed before reattaching;
    - Modified Text::textRendererIsNeeded() so that it can return correct
      value when the Text has already renderer.
    
    BUG=428997
    TEST=fast/repaint/absolute-display-block-to-none.html
    TEST=fast/forms/select-listbox-focus-displaynone.html (Existing test
    covering the change in Text.cpp).
    
    Review URL: https://codereview.chromium.org/684633006
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@185421 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    fbdab111
absolute-display-block-to-none.html 433 Bytes