<?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>28085</bug_id>
          
          <creation_ts>2009-08-07 14:14:20 -0700</creation_ts>
          <short_desc>Unnecessary &apos;goto&apos; confuses flow of control in WebHTMLView</short_desc>
          <delta_ts>2023-10-20 11:47:34 -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>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jens Alfke">jens</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>138139</commentid>
    <comment_count>0</comment_count>
    <who name="Jens Alfke">jens</who>
    <bug_when>2009-08-07 14:14:20 -0700</bug_when>
    <thetext>I was just looking through WebHTMLView and found this strange code in the -namesOfPromisedFilesDroppedAtDestination: method:

- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
{
    NSFileWrapper *wrapper = nil;
    NSURL *draggingImageURL = nil;
    
    if (WebCore::CachedImage* tiffResource = [self promisedDragTIFFDataSource]) {
        
        SharedBuffer *buffer = static_cast&lt;CachedResource*&gt;(tiffResource)-&gt;data();
        if (!buffer)
            goto noPromisedData;
        
        ...
    }
noPromisedData:
    
There&apos;s no reason to use a goto there; maybe there was once some complex code in between the goto and the label, but not currently. It can easily be simplified to:

        if (buffer) {
            ...
        }
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986411</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-20 07:27:02 -0700</bug_when>
    <thetext>I am unable to find &apos;goto&apos; as of today:

https://searchfox.org/wubkat/source/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm#4343

I think this might have changed over the years and this can be marked as &apos;RESOLVED CONFIGURATION CHANGED&apos;?

@Alexey - no idea, who would be right person to conclude on this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>