<?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>242550</bug_id>
          
          <creation_ts>2022-07-08 20:47:32 -0700</creation_ts>
          <short_desc>A vertical scrollbar is shown when none is necessary</short_desc>
          <delta_ts>2023-05-04 13:43:24 -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>Layout and Rendering</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=256298</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1881856</commentid>
    <comment_count>0</comment_count>
      <attachid>460775</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-08 20:47:32 -0700</bug_when>
    <thetext>Created attachment 460775
Testcase

When the content size matches the view size (or the iframe size), then we&apos;ll create a vertical scrollbar and trigger vertical scrolling when it&apos;s not necessary (when scrollbars take space, i.e. non-overlay scrollbars).

Turn on always-on scrollbars.
Load the attached testcase
Size the window so that the gray rectangle just covers the web view.
Reload; note how a vertical scrollbar appears.
Now size the window from the bottom, making it slightly taller then shorter, back to the original size. Note how you can make the scrollbar go away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881857</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-08 20:48:27 -0700</bug_when>
    <thetext>This is about code in in `FrameView::adjustScrollbarsForLayout()` that forces on the vertical scrollbar for the first layout, but doesn&apos;t compute that it can remove it again and still fit the content.

The state is unstable; some future layout can cause the scrollbar to disappear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1884519</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-15 20:48:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/97108398&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>460775</attachid>
            <date>2022-07-08 20:47:32 -0700</date>
            <delta_ts>2022-07-08 20:47:32 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>exact-fit-scrollbars.html</filename>
            <type>text/html</type>
            <size>781</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICAgIDxtZXRhIG5hbWU9InZpZXdwb3J0IiBj
b250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MSwgc2hyaW5rLXRvLWZp
dD1ubyI+CiAgICA8c3R5bGU+CiAgICAgICAgaHRtbCB7CiAgICAgICAgICAgICBmb250LXNpemU6
IDIwcHg7CiAgICAgICAgICAgICBsaW5lLWhlaWdodDogMjBweDsKICAgICAgICAgICAgIGJhY2tn
cm91bmQtaW1hZ2U6IGxpbmVhci1ncmFkaWVudChzaWx2ZXIsIHNpbHZlcik7CiAgICAgICAgICAg
ICBiYWNrZ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