Bug 210042

Summary: Make ScrollableArea TextStream-loggable
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ScrollingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, mifenton, pdr, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Simon Fraser (smfr) 2020-04-05 21:36:05 PDT
Make ScrollableArea TextStream-loggable
Comment 1 Simon Fraser (smfr) 2020-04-05 21:37:41 PDT
Created attachment 395543 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-04-06 09:34:04 PDT
Created attachment 395572 [details]
Patch
Comment 3 Simon Fraser (smfr) 2020-04-06 09:58:18 PDT
Created attachment 395578 [details]
Patch
Comment 4 Simon Fraser (smfr) 2020-04-06 12:22:21 PDT
Created attachment 395600 [details]
Patch
Comment 5 Darin Adler 2020-04-06 12:24:02 PDT
Comment on attachment 395578 [details]
Patch

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

> Source/WebCore/page/FrameView.cpp:1437
> +    StringBuilder builder;
> +    builder.append("FrameView 0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase));
> +    builder.append(' ');
> +    builder.append(frame().debugDescription());
> +    return builder.toString();

Could use makeString here and a single line.

> Source/WebCore/platform/ScrollView.cpp:1540
> +    StringBuilder builder;
> +    builder.append("ScrollView 0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase));
> +    return builder.toString();

Could use makeString here.

> Source/WebCore/platform/win/PopupMenuWin.cpp:1091
> +    StringBuilder builder;
> +    builder.append("PopupMenuWin 0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase));
> +    return builder.toString();

makeString

> Source/WebCore/rendering/RenderLayer.cpp:3633
> +    builder.append("RenderLayer 0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase));
> +    builder.append(size().width(), 'x', size().height());

This can be one line.

> Source/WebCore/rendering/RenderListBox.cpp:916
> +String RenderListBox::debugDescription() const
> +{
> +    return RenderObject::debugDescription();
> +}

What is this for?

> Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp:1043
> +    StringBuilder builder;
> +    builder.append("WebPopupMenuProxyWin 0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase));
> +    return builder.toString();

makeString

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1291
> +    StringBuilder builder;
> +    builder.append("PDFPlugin 0x"_s, hex(reinterpret_cast<uintptr_t>(this), Lowercase));
> +    return builder.toString();

makeString
Comment 6 Darin Adler 2020-04-06 12:24:15 PDT
Oops, reviewed the wrong one!
Comment 7 Darin Adler 2020-04-06 12:25:08 PDT
Comment on attachment 395600 [details]
Patch

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

> Source/WebCore/rendering/RenderListBox.cpp:916
> +String RenderListBox::debugDescription() const
> +{
> +    return RenderObject::debugDescription();
> +}

What is this about? Why not just omit this override entirely?
Comment 8 Simon Fraser (smfr) 2020-04-06 12:28:15 PDT
(In reply to Darin Adler from comment #7)
> Comment on attachment 395600 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=395600&action=review
> 
> > Source/WebCore/rendering/RenderListBox.cpp:916
> > +String RenderListBox::debugDescription() const
> > +{
> > +    return RenderObject::debugDescription();
> > +}
> 
> What is this about? Why not just omit this override entirely?

debugDescription() is in two base classes (RenderObject and ScrollableArea) and we need this to override the pure virtual one from ScrollableArea.
Comment 9 EWS 2020-04-06 14:59:42 PDT
Committed r259597: <https://trac.webkit.org/changeset/259597>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395600 [details].
Comment 10 Radar WebKit Bug Importer 2020-04-06 15:01:07 PDT
<rdar://problem/61360874>