Bug 223396

Summary: Web Inspector: Port grid overlay drawing to iOS
Product: WebKit Reporter: Patrick Angle <pangle>
Component: Web InspectorAssignee: Patrick Angle <pangle>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, bburg, ews-watchlist, gyuyoung.kim, hi, inspector-bugzilla-changes, joepeck, pangle, ryuan.choi, sam, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1.0
ews-feeder: commit-queue-
Patch v1.1 - Add FloatLine.h to Headers.cmake
none
Patch v1.2 - Move new encoders/decoders to InspectorOverlay.h none

Description Patrick Angle 2021-03-17 13:16:04 PDT
<rdar://75333290>
Comment 1 Patrick Angle 2021-03-19 14:54:01 PDT
Created attachment 423782 [details]
Patch v1.0
Comment 2 Patrick Angle 2021-03-19 15:37:36 PDT
Created attachment 423788 [details]
Patch v1.1 - Add FloatLine.h to Headers.cmake
Comment 3 Sam Weinig 2021-03-21 10:37:44 PDT
Comment on attachment 423788 [details]
Patch v1.1 - Add FloatLine.h to Headers.cmake

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

> Source/WebKit/Shared/WebCoreArgumentCoders.h:500
> +template<> struct ArgumentCoder<WebCore::InspectorOverlay::Highlight::GridHighlightOverlay> {
> +    static void encode(Encoder&, const WebCore::InspectorOverlay::Highlight::GridHighlightOverlay&);
> +    static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::InspectorOverlay::Highlight::GridHighlightOverlay&);
> +};
> +
> +template<> struct ArgumentCoder<WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label> {
> +    static void encode(Encoder&, const WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label&);
> +    static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label&);
> +};
> +
> +template<> struct ArgumentCoder<WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Area> {
> +    static void encode(Encoder&, const WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Area&);
> +    static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Area&);
> +};

Rather than adding new coders here (which we are tying to avoid), please instead add the coders to the files these types are defined in using the generic coding (e.g. template<class Encoder>/template<class Decoder>) pattern.
Comment 4 Patrick Angle 2021-03-21 15:17:54 PDT
Comment on attachment 423788 [details]
Patch v1.1 - Add FloatLine.h to Headers.cmake

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

>> Source/WebKit/Shared/WebCoreArgumentCoders.h:500
>> +};
> 
> Rather than adding new coders here (which we are tying to avoid), please instead add the coders to the files these types are defined in using the generic coding (e.g. template<class Encoder>/template<class Decoder>) pattern.

👍🏻
Comment 5 Patrick Angle 2021-03-21 16:48:57 PDT
Created attachment 423842 [details]
Patch v1.2 - Move new encoders/decoders to InspectorOverlay.h
Comment 6 BJ Burg 2021-03-22 12:31:23 PDT
Comment on attachment 423842 [details]
Patch v1.2 - Move new encoders/decoders to InspectorOverlay.h

r=me

It's now possible to test the intermediate results of the grid overlay algorithm (HighlightConfig). If you can think of an area of this code that is likely to break, we can write a test for it. This would require helpers to dump the highlight data from WebCore Internals.
Comment 7 EWS 2021-03-22 17:05:49 PDT
Committed r274822: <https://commits.webkit.org/r274822>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423842 [details].