<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>26804</bug_id>
          
          <creation_ts>2009-06-29 10:25:34 -0700</creation_ts>
          <short_desc>Line Feed in input value attribute moves text out of button</short_desc>
          <delta_ts>2023-03-29 10:13:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>238803</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=173872</see_also>
          <bug_file_loc>http://pt.wikipedia.org/w/index.php? title=Unaí&amp;action=history</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jasneet">jasneet</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>akeerthi</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>jasneet</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>vitor.roriz</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>128830</commentid>
    <comment_count>0</comment_count>
    <who name="jasneet">jasneet</who>
    <bug_when>2009-06-29 10:25:34 -0700</bug_when>
    <thetext>I Steps:
Go to  http://pt.wikipedia.org/w/index.php?
title=Unaí&amp;action=history

II Issue:
Should appear this text: (Compare as versões selecionadas) on the bottom.

III Conclusion : 
Issue is due to input.historysubmit { height: 1.7em !important;	}

IV Other Browsers:
IE7: not ok
FF3: ok

V Nightly tested: 45330

Bug in Chromium : http://code.google.com/p/chromium/issues/detail?id=5680</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128831</commentid>
    <comment_count>1</comment_count>
      <attachid>32011</attachid>
    <who name="jasneet">jasneet</who>
    <bug_when>2009-06-29 10:25:59 -0700</bug_when>
    <thetext>Created attachment 32011
reduced testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894653</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-29 15:05:09 -0700</bug_when>
    <thetext>All browsers (STP 152, Chrome Canary 107 and Firefox Nightly 106) behave same and don&apos;t show any text in input field or any where not the webpage. In case of Chrome, I do get &quot;Google Translate&quot; but I don&apos;t know where it is detecting text. But visually all browsers are same.


Although by following Chrome bug link, I noticed that they fixed it in following commit:

https://chromium.googlesource.com/chromium/src.git/+/8dc8d77d8fa1645f44c306062070e5d40af2ba2c

and using the test case form the commit:

Link - https://jsfiddle.net/bfydqomw/show

I am able to reproduce this bug:

&gt;&gt;&gt; STP 152 show &quot;abc&quot; in the button

While both other browsers (Chrome Canary 107 and Firefox Nightly 106) show - abc in first line and defghi in second line within button.

I am going to change this as &quot;New&quot;. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896486</commentid>
    <comment_count>3</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2022-09-06 06:12:54 -0700</bug_when>
    <thetext>&gt;&gt; Although by following Chrome bug link, I noticed that they fixed it in following commit:

&gt;&gt; https://chromium.googlesource.com/chromium/src.git/+/8dc8d77d8fa1645f44c306062070e5d40af2ba2c

Blink actually reverted this here https://chromium.googlesource.com/chromium/src.git/+/0c8d03bcf68d9c0e31d84369df15dec742682c73

It seems that back in the time IE solution was to strip out new-line characters from the input&apos;s value. Now, Firefox and Chrome render the value respecting the new line. Although we are passing the WPT tests for it (https://wpt.fyi/results/html/rendering/widgets/button-layout?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=input-type-button-new) it seems that the second line is overflowing and being clipped out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896746</commentid>
    <comment_count>4</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2022-09-07 04:42:17 -0700</bug_when>
    <thetext>BaseButtonInputType::createRenderer instantiates a RenderButton.
RenderButton is a RenderFlexibleBox that holds a RenderTextFRagment (which is a RenderText) to represent the test set as &apos;value&apos; in the input.

For a case where we have a &apos;value&apos; with 2 lines, RenderFlexibleBox::layoutAndPlaceChildren is calculating the correct height for the multiple lines. Actually, the children (lines) are painted correctly.

However, the height of the input (RenderFlexibleBox) itself is not updated accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896768</commentid>
    <comment_count>5</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2022-09-07 05:39:50 -0700</bug_when>
    <thetext>More specifically:

RenderFlexibleBox::layoutFlexItems calls layoutAndPlaceChildren which updates RenderFlexibleBox height with:

&gt; setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwareBorderAfter() + flowAwarePaddingAfter() +


However, in the end layoutFlexItems updates logicalHeight for RenderFlexibleBox again with updateLogicalHeight(RenderFlexibleBox.cpp:1216).

updateLogicalHeight calls RenderBox::computeLogicalHeight which sets logical height to a cached value, which does not account for the multiple lines. The following comment is relevant:

&gt; RenderBox.cpp:3221:
&gt; // The parent box is flexing us, so it has increased or decreased our height.  We have to
&gt; // grab our cached flexible height.

This happens exactly at RenderBox.cpp:3259 where we calculate hightResult = constrainLogicalHeightByMinMax(heightResult, intrinsicHeight). Being intrinsicHeight the height taking in consideration the children and highResult the cached height.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925174</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-01-12 15:39:40 -0800</bug_when>
    <thetext>It is still reproducible using test case from Comment 02 so it is not an overflow issue, which was fixed by Bug 173872.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1932615</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-10 04:20:22 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #2)
&gt; All browsers (STP 152, Chrome Canary 107 and Firefox Nightly 106) behave
&gt; same and don&apos;t show any text in input field or any where not the webpage. In
&gt; case of Chrome, I do get &quot;Google Translate&quot; but I don&apos;t know where it is
&gt; detecting text. But visually all browsers are same.
&gt; 
&gt; 
&gt; Although by following Chrome bug link, I noticed that they fixed it in
&gt; following commit:
&gt; 
&gt; https://chromium.googlesource.com/chromium/src.git/+/
&gt; 8dc8d77d8fa1645f44c306062070e5d40af2ba2c
&gt; 
&gt; and using the test case form the commit:
&gt; 
&gt; Link - https://jsfiddle.net/bfydqomw/show
&gt; 
&gt; I am able to reproduce this bug:
&gt; 
&gt; &gt;&gt;&gt; STP 152 show &quot;abc&quot; in the button
&gt; 
&gt; While both other browsers (Chrome Canary 107 and Firefox Nightly 106) show -
&gt; abc in first line and defghi in second line within button.
&gt; 
&gt; I am going to change this as &quot;New&quot;. Thanks!

This seems to work on Safari Technology Preview 163. It could be this commit - https://github.com/WebKit/WebKit/commit/1a0105921defca0770820813cdec1e805036c441

--&gt; Although, using the attached &apos;reduced&apos; test, we get artefacts, where the text is showing up small bits from bottom while it is not the case in Chrome Canary 112.

Should we raise new bug and close this one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945035</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-29 10:13:11 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 238803 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>32011</attachid>
            <date>2009-06-29 10:25:59 -0700</date>
            <delta_ts>2009-06-29 10:25:59 -0700</delta_ts>
            <desc>reduced testcase</desc>
            <filename>testcase.html</filename>
            <type>text/html</type>
            <size>687</size>
            <attacher name="jasneet">jasneet</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
bC5kdGQiPg0KPGh0bWwgZGlyPSJsdHIiIHhtbDpsYW5nPSJwdCIgeG1sbnM9Imh0dHA6Ly93d3cu
dzMub3JnLzE5OTkveGh0bWwiIGxhbmc9InB0Ij4NCjxoZWFkPg0KPG1ldGEgaHR0cC1lcXVpdj0i
Q29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgiPg0KPHRpdGxl
PnRlc3Q8L3RpdGxlPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCmJvZHkgew0KCWZvbnQ6IHgt
c21hbGwgc2Fucy1zZXJpZjsNCn0NCg0KaW5wdXQuaGlzdG9yeXN1Ym1pdCB7DQoJDQoJZm9udC1z
aXplOiA5NCU7DQoJaGVpZ2h0OiAxLjdlbSAhaW1wb3J0YW50Ow0KCQ0KfQ0KPC9zdHlsZT4NCg0K
PC9oZWFkPg0KPGJvZHk+DQo8aW5wdXQgdmFsdWU9Ig0KQ29tcGFyYXIgYXMgdmVyc8O1ZXMgc2Vs
ZWNpb25hZGFzIiBjbGFzcz0iaGlzdG9yeXN1Ym1pdCIgYWNjZXNza2V5PSJ2IiB0aXRsZT0iVmVy
IGFzIGRpZmVyZW7Dp2FzIGVudHJlIGFzIGR1YXMgdmVyc8O1ZXMgc2VsZWNpb25hZGFzIGRlc3Rh
IHDDoWdpbmEuIFthbHQtc2hpZnQtdl0iIHR5cGU9InN1Ym1pdCI+IA0KPC9ib2R5Pg0KPC9odG1s
Pg0K
</data>

          </attachment>
      

    </bug>

</bugzilla>