<?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>81209</bug_id>
          
          <creation_ts>2012-03-15 04:47:52 -0700</creation_ts>
          <short_desc>Consistent resize events in mobile browsers</short_desc>
          <delta_ts>2020-07-29 10:58:51 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>81208</dependson>
    
    <dependson>111532</dependson>
    
    <dependson>80242</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Allan Sandfeld Jensen">allan.jensen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>afbarstow</cc>
    
    <cc>anssi.kostiainen</cc>
    
    <cc>efidler</cc>
    
    <cc>kenneth</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>skyostil</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>vestbo</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>579283</commentid>
    <comment_count>0</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2012-03-15 04:47:52 -0700</bug_when>
    <thetext>As seen on http://www.quirksmode.org/dom/events/resize_mobile.html all the mobile browsers treat resize-events slightly different, even between webkit browsers.

The problem is probably that the event is originally designed for the desktop-case and there has been no obvious interpretation of what it should mean on a mobile browser.

Some discussion of these issues can also be found in bug 80242.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>579309</commentid>
    <comment_count>1</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-03-15 06:17:21 -0700</bug_when>
    <thetext>It would be great with a method for getting the scroll bar sizes. It would be useful for this and it will be useful for innerWidth etc as well.

This should be easy on most platform (using webkit for drawing scrollbars), but might be a bit more complicated on Mac and GTK, though looking at the documentation it seems doable.

Passing some pseudo code here for inspiration and because something might know of better ways of doing this.

Mac:

double horizontalScrollbarWidth()
{
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    CGFloat width = 0;

    NSScrollView* view = NSScrollView&lt;WebCoreFrameScrollView&gt; *&gt;(platformWidget());
    if (view-&gt;hasHorizontalScroller())
        width = view-&gt;horizontalScroller()-&gt;scrollerWidth();
    END_BLOCK_OBJC_EXCEPTIONS;
}

And GTK+:

double horizontalScrollbarWidth()
{
   if (!shouldCreateMainFrameScrollbar(this)
      fallback to webcore scrollbars

   GtkWidget* measuredWidget = hostWindow()-&gt;platformPageClient();
   GtkWidget* parentWidget = gtk_widget_get_parent(measuredWidget)

   if (!parentWidget)
       return 0;

   GtkWidget* sb = gtk_scrolled_window_get_hscrollbar(GTK_SCROLLED_WINDOW(parentWidget));
   if (!sb)
      return 0;

   GtkAllocation allocation;
   gtk_widget_get_allocation(sb, &amp;allocation);

   return allocation.width;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1675506</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-07-27 20:23:06 -0700</bug_when>
    <thetext>&lt;rdar://problem/66196856&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>