Bug 204097 - Web Inspector: Sources: create/update local override drop zone shown in image collection view
Summary: Web Inspector: Sources: create/update local override drop zone shown in image...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-11 17:11 PST by Devin Rousso
Modified: 2019-11-12 16:24 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.30 KB, patch)
2019-11-11 17:13 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews215 for win-future (14.58 MB, application/zip)
2019-11-11 23:18 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-11-11 17:11:33 PST
# STEPS TO REPRODUCE:
1. inspect any page with lots of images (e.g. <https://apple.com>)
2. select the Images folder in the Sources Tab
3. drag an image over the collection view
 => "Create Local Override" drop zone shown
Comment 1 Devin Rousso 2019-11-11 17:13:22 PST
Created attachment 383321 [details]
Patch
Comment 2 Joseph Pecoraro 2019-11-11 17:28:12 PST
Comment on attachment 383321 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/ResourceCollectionContentView.js:107
> +    get contentViewConstructorOptions()
> +    {
> +        let contentViewConstructorOptions = super.contentViewConstructorOptions;
> +        if (this.representedObject.resourceType === WI.Resource.Type.Image)
> +            contentViewConstructorOptions.disableDropZone = true;
> +        return contentViewConstructorOptions;
> +    }

Why not make collection content views always have `disableDropZone = true`. This only does it for a resource type of Image?
Comment 3 EWS Watchlist 2019-11-11 23:18:43 PST Comment hidden (obsolete)
Comment 4 EWS Watchlist 2019-11-11 23:18:45 PST Comment hidden (obsolete)
Comment 5 Devin Rousso 2019-11-12 11:03:09 PST
Comment on attachment 383321 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/ResourceCollectionContentView.js:107
>> +    }
> 
> Why not make collection content views always have `disableDropZone = true`. This only does it for a resource type of Image?

I'd rather not pass it to constructors that aren't expecting it.
Comment 6 WebKit Commit Bot 2019-11-12 16:23:30 PST
Comment on attachment 383321 [details]
Patch

Clearing flags on attachment: 383321

Committed r252378: <https://trac.webkit.org/changeset/252378>
Comment 7 WebKit Commit Bot 2019-11-12 16:23:32 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-11-12 16:24:22 PST
<rdar://problem/57135784>