Changeset 215874 in webkit


Ignore:
Timestamp:
Apr 27, 2017 9:51:11 AM (7 years ago)
Author:
Antti Koivisto
Message:

Repeated layouts in Mail due to viewport units being used with auto-sizing
https://bugs.webkit.org/show_bug.cgi?id=171371
<rdar://problem/28780084>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/viewport-percentage-lengths/vh-auto-size.html

Auto-sizing code would adjust the size of the view in the beginning of layout(). This would
end up invalidating style for elements that use vh units and we would perform main layout
with unclean style. This would result in endless layout loops and hit assert on debug.

  • page/FrameView.cpp:

(WebCore::FrameView::availableContentSizeChanged):

Ensure we heve clean style after resize if we are in pre-layout.

LayoutTests:

  • css3/viewport-percentage-lengths/vh-auto-size-expected.html: Added.
  • css3/viewport-percentage-lengths/vh-auto-size.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r215873 r215874  
     12017-04-27  Antti Koivisto  <antti@apple.com>
     2
     3        Repeated layouts in Mail due to viewport units being used with auto-sizing
     4        https://bugs.webkit.org/show_bug.cgi?id=171371
     5        <rdar://problem/28780084>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * css3/viewport-percentage-lengths/vh-auto-size-expected.html: Added.
     10        * css3/viewport-percentage-lengths/vh-auto-size.html: Added.
     11
    1122017-04-27  Joanmarie Diggs  <jdiggs@igalia.com>
    213
  • trunk/LayoutTests/platform/ios/TestExpectations

    r215756 r215874  
    29452945
    29462946webkit.org/b/171272 fast/text/kaithi.html [ ImageOnlyFailure ]
     2947
     2948# auto-sizing produces inconsistent image results
     2949css3/viewport-percentage-lengths/vh-auto-size.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r215833 r215874  
    360360webkit.org/b/170935 imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-004.html [ ImageOnlyFailure ]
    361361webkit.org/b/170935 imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-005.html [ ImageOnlyFailure ]
     362
     363# auto-sizing produces inconsistent image results
     364css3/viewport-percentage-lengths/vh-auto-size.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r215872 r215874  
     12017-04-27  Antti Koivisto  <antti@apple.com>
     2
     3        Repeated layouts in Mail due to viewport units being used with auto-sizing
     4        https://bugs.webkit.org/show_bug.cgi?id=171371
     5        <rdar://problem/28780084>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Test: css3/viewport-percentage-lengths/vh-auto-size.html
     10
     11        Auto-sizing code would adjust the size of the view in the beginning of layout(). This would
     12        end up invalidating style for elements that use vh units and we would perform main layout
     13        with unclean style. This would result in endless layout loops and hit assert on debug.
     14
     15        * page/FrameView.cpp:
     16        (WebCore::FrameView::availableContentSizeChanged):
     17
     18            Ensure we heve clean style after resize if we are in pre-layout.
     19
    1202017-04-27  Alex Christensen  <achristensen@webkit.org>
    221
  • trunk/Source/WebCore/page/FrameView.cpp

    r215425 r215874  
    37583758    }
    37593759
     3760    // All the resizing above may have invalidated style (for example if viewport units are being used).
     3761    document->updateStyleIfNeeded();
     3762
    37603763    m_autoSizeContentSize = contentsSize();
    37613764
Note: See TracChangeset for help on using the changeset viewer.