<?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>146627</bug_id>
          
          <creation_ts>2015-07-06 01:34:29 -0700</creation_ts>
          <short_desc>[GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()</short_desc>
          <delta_ts>2015-07-08 07:49:16 -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>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zan Dobersek">zan</reporter>
          <assigned_to name="Zan Dobersek">zan</assigned_to>
          <cc>berto</cc>
    
    <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gustavo</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1107047</commentid>
    <comment_count>0</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2015-07-06 01:34:29 -0700</bug_when>
    <thetext>Should be guarded with PLATFORM(X11).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107050</commentid>
    <comment_count>1</comment_count>
      <attachid>256201</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2015-07-06 01:38:23 -0700</bug_when>
    <thetext>Created attachment 256201
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107052</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-07-06 01:39:40 -0700</bug_when>
    <thetext>Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107053</commentid>
    <comment_count>3</comment_count>
      <attachid>256201</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2015-07-06 01:40:50 -0700</bug_when>
    <thetext>Comment on attachment 256201
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256201&amp;action=review

&gt; Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1396
&gt; +#if PLATFORM(X11)

I think you can move this to the beginning of the function, the drawing area pointer is useless otherwise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107065</commentid>
    <comment_count>4</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2015-07-06 02:49:40 -0700</bug_when>
    <thetext>Committed r186333: &lt;http://trac.webkit.org/changeset/186333&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107077</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2015-07-06 05:49:21 -0700</bug_when>
    <thetext>Now that since we now support compiling with ENABLE_X11_TARGET and ENABLE_WAYLAND_TARGET at the same time, checks like these need to be done at both compile time *and* runtime. (So this patch is not wrong, but incomplete.)

One way to do that would be:

bool runningInX11 = GDK_IS_X11_DISPLAY(gdk_window_get_display(gtk_widget_get_window(GTK_WIDGET(webkitWebViewBase))));

Maybe we have a better way?

Do we need to audit our code to check for places this was missed in the past? What about around uses of USE(REDIRECTED_XCOMPOSITE_WINDOW)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107079</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2015-07-06 05:55:03 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Now that since we now support compiling with ENABLE_X11_TARGET and
&gt; ENABLE_WAYLAND_TARGET at the same time, checks like these need to be done at
&gt; both compile time *and* runtime. (So this patch is not wrong, but
&gt; incomplete.)
&gt; 
&gt; One way to do that would be:
&gt; 
&gt; bool runningInX11 =
&gt; GDK_IS_X11_DISPLAY(gdk_window_get_display(gtk_widget_get_window(GTK_WIDGET(we
&gt; bkitWebViewBase))));
&gt; 
&gt; Maybe we have a better way?

Yes, PlatformDisplay::sharedDisplay().type() == PlatformDisplay::X11

&gt; Do we need to audit our code to check for places this was missed in the
&gt; past? What about around uses of USE(REDIRECTED_XCOMPOSITE_WINDOW)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1107678</commentid>
    <comment_count>7</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2015-07-07 22:45:34 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Now that since we now support compiling with ENABLE_X11_TARGET and
&gt; &gt; ENABLE_WAYLAND_TARGET at the same time, checks like these need to be done at
&gt; &gt; both compile time *and* runtime. (So this patch is not wrong, but
&gt; &gt; incomplete.)
&gt; &gt; 
&gt; &gt; One way to do that would be:
&gt; &gt; 
&gt; &gt; bool runningInX11 =
&gt; &gt; GDK_IS_X11_DISPLAY(gdk_window_get_display(gtk_widget_get_window(GTK_WIDGET(we
&gt; &gt; bkitWebViewBase))));
&gt; &gt; 
&gt; &gt; Maybe we have a better way?
&gt; 
&gt; Yes, PlatformDisplay::sharedDisplay().type() == PlatformDisplay::X11
&gt; 

Bug #146711.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>256201</attachid>
            <date>2015-07-06 01:38:23 -0700</date>
            <delta_ts>2015-07-06 01:40:50 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>pppatch.patch</filename>
            <type>text/plain</type>
            <size>1776</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCA1NDYyMmE0Li4wMThjMzUzIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTUg
QEAKKzIwMTUtMDctMDYgIFphbiBEb2JlcnNlayAgPHpkb2JlcnNla0BpZ2FsaWEuY29tPgorCisg
ICAgICAgIFtHVEtdIEd1YXJkIFgxMS1zcGVjaWZpYyBjb2RlIGluIHdlYmtpdFdlYlZpZXdCYXNl
RGlkUmVsYXVuY2hXZWJQcm9jZXNzKCkKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcv
c2hvd19idWcuY2dpP2lkPTE0NjYyNworCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgICogVUlQcm9jZXNzL0FQSS9ndGsvV2ViS2l0V2ViVmlld0Jhc2UuY3Bw
OgorICAgICAgICAod2Via2l0V2ViVmlld0Jhc2VEaWRSZWxhdW5jaFdlYlByb2Nlc3MpOgorICAg
ICAgICBHdWFyZCBjYWxscyB0byBEcmF3aW5nQXJlYUltcGw6OnNldE5hdGl2ZVN1cmZhY2VIYW5k
bGVGb3JDb21wb3NpdGluZygpCisgICAgICAgIHRoYXQgcGFzcyBpbiBhbiBYMTEgV2luZG93IElE
IHdpdGggdGhlIFBMQVRGT1JNKFgxMSkgYnVpbGQgZ3VhcmRzLgorCiAyMDE1LTA3LTA1ICBDaHJp
cyBEdW1leiAgPGNkdW1lekBhcHBsZS5jb20+CiAKICAgICAgICAgW1dLMl0gQ3VycmVudC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Miw0ICsxNDAzLDUgQEAgdm9pZCB3
ZWJraXRXZWJWaWV3QmFzZURpZFJlbGF1bmNoV2ViUHJvY2VzcyhXZWJLaXRXZWJWaWV3QmFzZSog
d2Via2l0V2ViVmlld0Jhc2UKICAgICAgICAgcmV0dXJuOwogICAgIGRyYXdpbmdBcmVhLT5zZXRO
YXRpdmVTdXJmYWNlSGFuZGxlRm9yQ29tcG9zaXRpbmcoR0RLX1dJTkRPV19YSUQoZ3RrX3dpZGdl
dF9nZXRfd2luZG93KEdUS19XSURHRVQod2Via2l0V2ViVmlld0Jhc2UpKSkpOwogI2VuZGlmCisj
ZW5kaWYKIH0K
</data>
<flag name="review"
          id="281283"
          type_id="1"
          status="+"
          setter="cgarcia"
    />
          </attachment>
      

    </bug>

</bugzilla>