Changeset 147850 in webkit


Ignore:
Timestamp:
Apr 6, 2013 12:48:51 PM (11 years ago)
Author:
robert@webkit.org
Message:

REGRESSION(r142152): Text wraps in menu
https://bugs.webkit.org/show_bug.cgi?id=113706

Reviewed by David Hyatt.

Source/WebCore:

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::inlineLogicalWidth): Empty inline elements add their inline border/padding/margin to the width of the
line when we iterate through them in nextLineBreak(), so no need to add them again here when climbing back up
from their first child looking for border/padding/margin to add. (An empty inline element can have floating children.)

LayoutTests:

  • fast/inline/inline-with-empty-inline-children-expected.txt:
  • fast/inline/inline-with-empty-inline-children.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147831 r147850  
     12013-04-06  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION(r142152): Text wraps in menu
     4        https://bugs.webkit.org/show_bug.cgi?id=113706
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/inline/inline-with-empty-inline-children-expected.txt:
     9        * fast/inline/inline-with-empty-inline-children.html:
     10
    1112013-04-05  Hans Muller  <hmuller@adobe.com>
    212
  • trunk/LayoutTests/fast/inline/inline-with-empty-inline-children-expected.txt

    r147667 r147850  
    1 https://bugs.webkit.org/show_bug.cgi?id=95772: There should be six green bars below with a PASS in each.
     1https://bugs.webkit.org/show_bug.cgi?id=95772: There should be seven green bars below with a PASS in each.
    22
    33 PASS
     
    77 PASS
    88 PASS
     9Words
     10PASS
    911
  • trunk/LayoutTests/fast/inline/inline-with-empty-inline-children.html

    r147667 r147850  
    55    .block { display: block; background: green; }
    66    .inline { display: inline; margin-left: 40px; font: 30px/1 Ahem;}
    7     span { width: 50%; background: white; }
     7    .white-span { width: 50%; background: white; }
    88    .absolute { position: absolute; }
    99    .float { float: left; }
     10    .inline-span { display: inline-block; }
    1011  </style>
    1112  <script src="../../resources/check-layout.js"></script>
    1213 </head>
    1314 <body>
    14   <p> https://bugs.webkit.org/show_bug.cgi?id=95772: There should be six green bars below with a PASS in each. </p>
     15  <p> https://bugs.webkit.org/show_bug.cgi?id=95772: There should be seven green bars below with a PASS in each. </p>
    1516  <div class="block">
    16    <div class="inline" data-expected-height="30"> <span class="absolute"></span> <span class="absolute"></span> </div>
     17   <div class="inline" data-expected-height="30"> <span class="absolute white-span"></span> <span class="absolute white-span"></span> </div>
    1718  </div>
    1819  <div class="block">
    19    <div class="inline" data-expected-height="30"><span class="absolute"></span><span class="absolute"></span></div>
     20   <div class="inline" data-expected-height="30"><span class="absolute white-span"></span><span class="absolute"></span></div>
    2021  </div>
    2122  <div class="block">
    22    <div class="inline" data-expected-height="30"><span class="float"></span><span class="float"></span></div>
     23   <div class="inline" data-expected-height="30"><span class="float white-span"></span><span class="float white-span"></span></div>
    2324  </div>
    2425  <div class="block">
    25    <div class="inline" data-expected-height="30"> <span class="float"></span> <span class="float"></span></div>
     26   <div class="inline" data-expected-height="30"> <span class="float white-span"></span> <span class="float white-span"></span></div>
    2627  </div>
    2728  <div class="block">
    28    <div class="inline" data-expected-height="30"><span></span><span></span></div>
     29   <div class="inline" data-expected-height="30"><span class="white-span"></span><span class="white-span"></span></div>
    2930  </div>
    3031  <div class="block">
    31    <div class="inline" data-expected-height="30"> <span></span> <span></span></div>
     32   <div class="inline" data-expected-height="30"> <span class="white-span"></span> <span class="white-span"></span></div>
     33  </div>
     34  <div class="block">
     35     <span class="inline-span" data-expected-height="30"><div class="inline"> <div class="float"> Words </div></div></span>
    3236  </div>
    3337  <script>
    3438   checkLayout('body > div > div')
     39   checkLayout('body > div > span')
    3540  </script>
    3641 </body>
  • trunk/Source/WebCore/ChangeLog

    r147846 r147850  
     12013-04-06  Robert Hogan  <robert@webkit.org>
     2
     3        REGRESSION(r142152): Text wraps in menu
     4        https://bugs.webkit.org/show_bug.cgi?id=113706
     5
     6        Reviewed by David Hyatt.
     7
     8        * rendering/RenderBlockLineLayout.cpp:
     9        (WebCore::inlineLogicalWidth): Empty inline elements add their inline border/padding/margin to the width of the
     10        line when we iterate through them in nextLineBreak(), so no need to add them again here when climbing back up
     11        from their first child looking for border/padding/margin to add. (An empty inline element can have floating children.)
     12
    1132013-04-06  Geoffrey Garen  <ggaren@apple.com>
    214
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r147758 r147850  
    333333    LayoutUnit extraWidth = 0;
    334334    RenderObject* parent = child->parent();
    335     while (parent->isRenderInline() && lineDepth++ < cMaxLineDepth) {
     335    // Empty inline parents have added their inline border, padding and margin to the line already.
     336    while (parent->isRenderInline() && !isEmptyInline(parent) && lineDepth++ < cMaxLineDepth) {
    336337        RenderInline* parentAsRenderInline = toRenderInline(parent);
    337338        if (!isEmptyInline(parentAsRenderInline)) {
Note: See TracChangeset for help on using the changeset viewer.