Changeset 112114 in webkit


Ignore:
Timestamp:
Mar 26, 2012 9:52:01 AM (12 years ago)
Author:
jchaffraix@webkit.org
Message:

REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
https://bugs.webkit.org/show_bug.cgi?id=81802

Reviewed by Dan Bernstein.

Source/WebCore:

Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.

Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.

This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):
For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.

LayoutTests:

  • platform/mac/Skipped: Unskip the test on Mac. The other platforms are either

skipping it for other reasons or did not have a specific entry for the flakiness.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112113 r112114  
     12012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=81802
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * platform/mac/Skipped: Unskip the test on Mac. The other platforms are either
     9        skipping it for other reasons or did not have a specific entry for the flakiness.
     10
    1112012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
    212
  • trunk/LayoutTests/platform/mac/Skipped

    r112113 r112114  
    605605fast/inline/continuation-outlines-with-layers.html
    606606
    607 # https://bugs.webkit.org/show_bug.cgi?id=81802 rdar://problem/11091412
    608 # fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
    609 fast/forms/placeholder-set-attribute.html
    610 
    611607# Not possible to set UA string for media requests with all Mac media engines.
    612608http/tests/media/video-useragent.html
  • trunk/Source/WebCore/ChangeLog

    r112113 r112114  
     12012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=81802
     5
     6        Reviewed by Dan Bernstein.
     7
     8        Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
     9
     10        Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
     11
     12        This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
     13        the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
     14
     15        * rendering/RenderTextControlSingleLine.cpp:
     16        (WebCore::RenderTextControlSingleLine::layout):
     17        For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
     18        on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
     19
    1202012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
    221
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r112113 r112114  
    280280        placeholderBox->style()->setWidth(Length(innerTextRenderer->width() - placeholderBox->borderAndPaddingWidth(), Fixed));
    281281        placeholderBox->style()->setHeight(Length(innerTextRenderer->height() - placeholderBox->borderAndPaddingHeight(), Fixed));
     282        bool placeholderBoxHadLayout = placeholderBox->everHadLayout();
    282283        placeholderBox->layoutIfNeeded();
    283284        LayoutPoint textOffset = innerTextRenderer->location();
     
    287288            textOffset += toLayoutSize(containerRenderer->location());
    288289        placeholderBox->setLocation(textOffset);
     290
     291        if (!placeholderBoxHadLayout && placeholderBox->checkForRepaintDuringLayout()) {
     292            // This assumes a shadow tree without floats. If floats are added, the
     293            // logic should be shared with RenderBlock::layoutBlockChild.
     294            placeholderBox->repaint();
     295        }
    289296    }
    290297}
Note: See TracChangeset for help on using the changeset viewer.