<?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>102404</bug_id>
          
          <creation_ts>2012-11-15 09:42:20 -0800</creation_ts>
          <short_desc>Implementing PAGE_POPUP for android</short_desc>
          <delta_ts>2013-04-08 11:11:39 -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>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Miguel Garcia">miguelg</reporter>
          <assigned_to name="Miguel Garcia">miguelg</assigned_to>
          <cc>abarth</cc>
    
    <cc>keishi</cc>
    
    <cc>peter</cc>
    
    <cc>tkent</cc>
    
    <cc>yosin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>768190</commentid>
    <comment_count>0</comment_count>
    <who name="Miguel Garcia">miguelg</who>
    <bug_when>2012-11-15 09:42:20 -0800</bug_when>
    <thetext>We are trying to figure out how to implement PAGE_POPUP for the android platform. I have done a cursory inspection on the code and it seems we need to implement the following method

http://code.google.com/searchframe#OAMlx_jo-ck/src/content/browser/renderer_host/render_widget_host_view_android.cc&amp;type=cs&amp;l=80

RenderWidgetHostViewAndroid::InitAsPopup will need to expose a surface where content can be drawn and rendered. That seems to be all really.

I&apos;ve been looking at the gtk implementation in

http://code.google.com/searchframe#OAMlx_jo-ck/src/content/browser/renderer_host/render_widget_host_view_gtk.cc&amp;exact_package=chromium&amp;q=InitAsPopup%20file:cc&amp;type=cs&amp;l=599

And found that a whole new window is created. If at all possible I&apos;d like to understand the reasoning since for Android this would be fairly expensive (we will need a new renderer process probably). Another alternative for example would be to inject an iframe for example and just render it there.

If creating a new window is the only way to go we might consider using the android WebView to render that html. The very first use case for us is implementing INPUT_TYPE_COLOR and the rendered color picker is not very complicated so any feedback on a simple solution for this would be very welcome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>768290</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-11-15 10:45:55 -0800</bug_when>
    <thetext>I don&apos;t think you&apos;ll be able to get away with using the android WebView.  We&apos;re likely to add code to page popup that needs to work with a precise version of WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>768896</commentid>
    <comment_count>2</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2012-11-15 21:05:34 -0800</bug_when>
    <thetext>I don&apos;t think PAGE_POPUP should be implemented for Android.

Desktop Chromium uses PAGE_POPUP for datalist support of input[type=color]. Android port doesn&apos;t support datalist yet, we can add datalist-related members to WebColorChooserClient, and we can implement it with native code for Android.

ColorChooserUIController.cpp should have some &quot;#if ENABLE(PAGE_POPUP)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>769075</commentid>
    <comment_count>3</comment_count>
    <who name="Miguel Garcia">miguelg</who>
    <bug_when>2012-11-16 03:34:41 -0800</bug_when>
    <thetext>Thanks for all your comments!


I like the idea of removing the dependency that INPUT_TYPE_COLOR has on PAGE_POPUP. I already removed other unecesary deps in that area (see https://bugs.webkit.org/show_bug.cgi?id=102379) and while this one is slightly less straight forward it should be doable as well.


So let&apos;s assume I do that, eventually we would like to implement datalist as well right? Once we get there we will end up having the same problem if I understand correctly so I guess the question still applies.

If using WebView is deemed problematic we can probably hook thinks up so we use the same rendering pipeline we use on a regular tab. However I still wonder why do we need to span a whole new window here and if there would be some other alternatives to implement this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>769093</commentid>
    <comment_count>4</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2012-11-16 03:53:56 -0800</bug_when>
    <thetext>Thank you for the replies! Using an Android WebView would be problematic here for various reasons, indeed.

What are the constraints causing us to be unable to re-use the HTML-based popups used by form validation? For the limited amount of options of a color picker it may make sense to do it in-page, although I&apos;m inclined to agree that for other input types with a datalist it&apos;s a much more &lt;select&gt;-like approach, which indeed is native in Android. Nit here is that suggestions aren&apos;t supported there, so we&apos;d need a custom control.

Miguel is currently looking in to implementing a color picker without data-list support, as he wrote.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>770447</commentid>
    <comment_count>5</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2012-11-19 01:02:46 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; So let&apos;s assume I do that, eventually we would like to implement datalist as well right? Once we get there we will end up having the same problem if I understand correctly so I guess the question still applies.

Right, we&apos;d like to support datalist on Android too.
I think we don&apos;t need to use PAGE_POPUP for type=color datalist UI on Android. The desktop UI implementation of type=color datalist is not so complex and I hope implementation with Android-native code is not hard.

(In reply to comment #4)
&gt; What are the constraints causing us to be unable to re-use the HTML-based popups used by form validation? For the limited amount of options of a color picker it may make sense to do it in-page, although I&apos;m inclined to agree that for other input types with a datalist it&apos;s a much more &lt;select&gt;-like approach, which indeed is native in Android. Nit here is that suggestions aren&apos;t supported there, so we&apos;d need a custom control.

The form validation message UI was build with Shadow DOM, and PAGE_POPUP is not Shadow DOM. Shadow DOM is not suitable for popup-like UI because of focus handling, document boundary, etc.

BTW, we&apos;re going to stop using Shadow DOM for the form validation message UI.  Bug 95527.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>770533</commentid>
    <comment_count>6</comment_count>
    <who name="Miguel Garcia">miguelg</who>
    <bug_when>2012-11-19 03:01:08 -0800</bug_when>
    <thetext>It&apos;s a pity that we cannot try a cross platform way of building this, I guess I&apos;ll start looking into doing it natively.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870944</commentid>
    <comment_count>7</comment_count>
    <who name="Peter Beverloo">peter</who>
    <bug_when>2013-04-08 11:11:39 -0700</bug_when>
    <thetext>Resolving as WontFix given that Chromium moved to Blink.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>