Bug 223396 - Web Inspector: Port grid overlay drawing to iOS
Summary: Web Inspector: Port grid overlay drawing to iOS
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: Patrick Angle
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-17 13:16 PDT by Patrick Angle
Modified: 2021-03-22 17:05 PDT (History)
12 users (show)

See Also:


Attachments
Patch v1.0 (48.06 KB, patch)
2021-03-19 14:54 PDT, Patrick Angle
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch v1.1 - Add FloatLine.h to Headers.cmake (48.66 KB, patch)
2021-03-19 15:37 PDT, Patrick Angle
no flags Details | Formatted Diff | Diff
Patch v1.2 - Move new encoders/decoders to InspectorOverlay.h (47.27 KB, patch)
2021-03-21 16:48 PDT, Patrick Angle
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].