Changeset 224394 in webkit


Ignore:
Timestamp:
Nov 3, 2017 7:46:17 AM (6 years ago)
Author:
Antti Koivisto
Message:

Crash in WebCore::RenderStyle::overflowX with display:contents
https://bugs.webkit.org/show_bug.cgi?id=178857
<rdar://problem/35201120>

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-display-3/display-contents-computed-style-expected.txt:

Source/WebCore:

Crash test by Renata Hodovan.

Tests: fast/css/display-contents-all.html

fast/css/display-contents-document-element.html

  • css/StyleResolver.cpp:

(WebCore::adjustDisplayContentsStyle):

For document element 'display:contents' should adjust to 'display:block' like it does for other display types.

LayoutTests:

  • fast/css/display-contents-all-expected.html: Added.
  • fast/css/display-contents-all.html: Added.
  • fast/css/display-contents-document-element-expected.txt: Added.
  • fast/css/display-contents-document-element.html: Added.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r224393 r224394  
     12017-11-03  Antti Koivisto  <antti@apple.com>
     2
     3        Crash in WebCore::RenderStyle::overflowX with display:contents
     4        https://bugs.webkit.org/show_bug.cgi?id=178857
     5        <rdar://problem/35201120>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * fast/css/display-contents-all-expected.html: Added.
     10        * fast/css/display-contents-all.html: Added.
     11        * fast/css/display-contents-document-element-expected.txt: Added.
     12        * fast/css/display-contents-document-element.html: Added.
     13
    1142017-11-03  Ms2ger  <Ms2ger@igalia.com>
    215
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r224343 r224394  
     12017-11-03  Antti Koivisto  <antti@apple.com>
     2
     3        Crash in WebCore::RenderStyle::overflowX with display:contents
     4        https://bugs.webkit.org/show_bug.cgi?id=178857
     5        <rdar://problem/35201120>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * web-platform-tests/css/css-display-3/display-contents-computed-style-expected.txt:
     10
    1112017-11-02  Youenn Fablet  <youenn@apple.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-display-3/display-contents-computed-style-expected.txt

    r217280 r224394  
    1 
    2 CSS Display: Computed style for display:contents
    3 
    4 
    5 
    6 
    7 
    8 
    9 
    10     html, .contents { display: contents }
    11 
    12     #t2 .contents { background-color: green }
    13     #t2 span { background-color: inherit }
    14 
    15     #t3 .contents { color: green }
    16 
    17     #t4 {
    18         width: auto;
    19         height: 50%;
    20         margin-left: 25%;
    21         padding-top: 10%;
    22     }
    23 
    24 
    25 
    26    
    27        
    28    
    29 
    30 
    31    
    32        
    33    
    34 
    35 
    36 
    37     test(function(){
    38         assert_equals(getComputedStyle(document.querySelector("#t1")).display, "contents");
    39     }, "Serialization of computed style value for display:contents");
    40 
    41     test(function(){
    42         assert_equals(getComputedStyle(document.querySelector("#t2 span")).backgroundColor, "rgb(0, 128, 0)");
    43     }, "display:contents element as inherit parent - explicit inheritance");
    44 
    45     test(function(){
    46         assert_equals(getComputedStyle(document.querySelector("#t3 span")).color, "rgb(0, 128, 0)");
    47     }, "display:contents element as inherit parent - implicit inheritance");
    48 
    49     test(function(){
    50         var computed = getComputedStyle(document.querySelector("#t4"));
    51         assert_equals(computed.width, "auto");
    52         assert_equals(computed.height, "50%");
    53         assert_equals(computed.marginLeft, "25%");
    54         assert_equals(computed.paddingTop, "10%");
    55     }, "Resolved value should be computed value, not used value, for display:contents");
    56 
    57     test(function(){
    58         assert_equals(getComputedStyle(document.documentElement).display, "block");
    59     }, "display:contents is blockified for root elements");
    60 
    611
    622PASS Serialization of computed style value for display:contents
     
    644PASS display:contents element as inherit parent - implicit inheritance
    655PASS Resolved value should be computed value, not used value, for display:contents
    66 FAIL display:contents is blockified for root elements assert_equals: expected "block" but got "contents"
     6PASS display:contents is blockified for root elements
    677
  • trunk/Source/WebCore/ChangeLog

    r224390 r224394  
     12017-11-03  Antti Koivisto  <antti@apple.com>
     2
     3        Crash in WebCore::RenderStyle::overflowX with display:contents
     4        https://bugs.webkit.org/show_bug.cgi?id=178857
     5        <rdar://problem/35201120>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Crash test by Renata Hodovan.
     10
     11        Tests: fast/css/display-contents-all.html
     12               fast/css/display-contents-document-element.html
     13
     14        * css/StyleResolver.cpp:
     15        (WebCore::adjustDisplayContentsStyle):
     16
     17        For document element 'display:contents' should adjust to 'display:block' like it does for other display types.
     18
    1192017-11-03  Jiewen Tan  <jiewen_tan@apple.com>
    220
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r224320 r224394  
    802802        return;
    803803    }
     804    if (element->document().documentElement() == element) {
     805        style.setDisplay(BLOCK);
     806        return;
     807    }
    804808    if (hasEffectiveDisplayNoneForDisplayContents(*element))
    805809        style.setDisplay(NONE);
Note: See TracChangeset for help on using the changeset viewer.