<?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>63927</bug_id>
          
          <creation_ts>2011-07-05 02:25:16 -0700</creation_ts>
          <short_desc>[META] REGRESSION(r72052): Multiple placeholder regressions</short_desc>
          <delta_ts>2011-07-13 19:19:17 -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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>49452</dependson>
    
    <dependson>51290</dependson>
    
    <dependson>53740</dependson>
    
    <dependson>54797</dependson>
    
    <dependson>54814</dependson>
    
    <dependson>63367</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kent Tamura">tkent</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>darin</cc>
    
    <cc>dglazkov</cc>
    
    <cc>playmobil</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>432172</commentid>
    <comment_count>0</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-07-05 02:25:16 -0700</bug_when>
    <thetext>[META] REGRESSION(r72052): Multiple placeholder regressions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>432584</commentid>
    <comment_count>1</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-07-05 20:19:02 -0700</bug_when>
    <thetext>A)
I tried to represent a placeholder text as a shadow node, and replace the inner editable node with the placeholder node.  The code change for this approach was really simple.
However I had no good idea for implementing Bug 53740 behavior.
 - How to show the text caret with the placeholder text?
 - How to handle context menu on the placeholder node?

B)
I tried to implement another approach. Representing a placeholder text as a shadow node, it has display:none if the control has non-empty value, and show the placeholder node if the placeholder should be visible.
This approach requires to add a lot of custom layout code in RenderTextControlSingleLine.cpp. I don&apos;t want to make it more complex ;-(

C)
Fixing text-align and line-height issues in the current implementation is not hard. I guess fixing the wrapping issue, Bug 51290, would be hard and boring.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>432619</commentid>
    <comment_count>2</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-07-05 22:12:12 -0700</bug_when>
    <thetext>D)
Revting r72052 won&apos;t work well for Bug 53740.
It would be hard to support editing context menu.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>432793</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2011-07-06 08:24:41 -0700</bug_when>
    <thetext>(In reply to comment #1)

I think A is the right approach.

&gt; A)
&gt; I tried to represent a placeholder text as a shadow node, and replace the inner editable node with the placeholder node.  The code change for this approach was really simple.
&gt; However I had no good idea for implementing Bug 53740 behavior.
&gt;  - How to show the text caret with the placeholder text?
&gt;  - How to handle context menu on the placeholder node?

Can we position placeholder under the text input? Would this solve the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>433941</commentid>
    <comment_count>4</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-07-08 00:57:06 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #1)
&gt; 
&gt; I think A is the right approach.
&gt; 
&gt; &gt; A)
&gt; &gt; I tried to represent a placeholder text as a shadow node, and replace the inner editable node with the placeholder node.  The code change for this approach was really simple.
&gt; &gt; However I had no good idea for implementing Bug 53740 behavior.
&gt; &gt;  - How to show the text caret with the placeholder text?
&gt; &gt;  - How to handle context menu on the placeholder node?
&gt; 
&gt; Can we position placeholder under the text input? Would this solve the issue?

In A, the inner editable text node is detached while the placeholder is visible.  So we can&apos;t do anything for editing.

I&apos;m trying B again.  If we use position:absolute for the placeholder node, it&apos;s difficult to keep the correct position when the &lt;input&gt; is moved. If we use position:relative/static, &lt;input&gt; secures the intrinsic block for the placeholder node.  I found a way to resolve this issue and minimize custom layout code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>434701</commentid>
    <comment_count>5</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-07-11 00:28:10 -0700</bug_when>
    <thetext>Ok, I confirmed B resolved all of issues and did not break existing tests.
I&apos;ll post a patch to Bug 64253.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>434986</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2011-07-11 10:33:07 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Ok, I confirmed B resolved all of issues and did not break existing tests.
&gt; I&apos;ll post a patch to Bug 64253.

Great to hear. In retrospect, it does look like the sanest approach.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>436870</commentid>
    <comment_count>7</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-07-13 19:19:17 -0700</bug_when>
    <thetext>All dependent bugs have been fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>