Bug 204874 - [WinCairo] Improve Inspectable Target Page to adapt a long title and URL
Summary: [WinCairo] Improve Inspectable Target Page to adapt a long title and URL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-04 23:08 PST by Yousuke Kimoto
Modified: 2019-12-08 19:09 PST (History)
4 users (show)

See Also:


Attachments
patch (2.36 KB, patch)
2019-12-04 23:35 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff
patch (2.38 KB, patch)
2019-12-05 01:13 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff
patch (2.36 KB, patch)
2019-12-05 03:23 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuke Kimoto 2019-12-04 23:08:03 PST
When a target content which has long URL or long title and those lengths exceed the width of the list of inspectable webviews, an "inspect" button is placed outside of the web inspector's visible area. It make users irritate since they need to scroll to seek "Inspect" button at the most right of the page.
Comment 1 Yousuke Kimoto 2019-12-04 23:35:12 PST
Created attachment 384881 [details]
patch
Comment 2 Fujii Hironori 2019-12-05 00:10:28 PST
Comment on attachment 384881 [details]
patch

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

> Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp:160
> +        "  table, td { border: 1px solid #d3d7cf; border-left: none; border-right: none; table-layout: fixed;}"

I think 'table-layout' should apply only to table element. Why do you want to apply it to td element?

> Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp:165
> +        "  .targeturl { width: auto; color: #babdb6; overflow: hidden; background: #eee; word-wrap: break-word; overflow-wrap: break-word; }"

Why 'width: auto' is needed? Its initial value is 'auto'.
Why 'overflow: hidden' is needed? You are using ellipsis and break-word. Can it overflow?
Comment 3 Yousuke Kimoto 2019-12-05 01:09:30 PST
(In reply to Fujii Hironori from comment #2)
> > Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp:160
> > +        "  table, td { border: 1px solid #d3d7cf; border-left: none; border-right: none; table-layout: fixed;}"
> 
> I think 'table-layout' should apply only to table element. Why do you want
> to apply it to td element?

Thanks, the attribute should be applied in table element..
 
> > Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp:165
> > +        "  .targeturl { width: auto; color: #babdb6; overflow: hidden; background: #eee; word-wrap: break-word; overflow-wrap: break-word; }"
> 
> Why 'width: auto' is needed? Its initial value is 'auto'.
> Why 'overflow: hidden' is needed? You are using ellipsis and break-word. Can
> it overflow?

'width: auto' is unnecessary. I'll delete them.
Comment 4 Yousuke Kimoto 2019-12-05 01:13:13 PST
Created attachment 384886 [details]
patch
Comment 5 Fujii Hironori 2019-12-05 02:31:26 PST
Why 'overflow: hidden' is needed? You are using ellipsis and break-word. Can it overflow?
Comment 6 Yousuke Kimoto 2019-12-05 03:22:48 PST
(In reply to Fujii Hironori from comment #5)
> Why 'overflow: hidden' is needed? You are using ellipsis and break-word. Can
> it overflow?

Sorry, I missed your comment. It's also unnecessary.
Comment 7 Yousuke Kimoto 2019-12-05 03:23:51 PST
Created attachment 384894 [details]
patch
Comment 8 Fujii Hironori 2019-12-05 03:38:22 PST
Comment on attachment 384894 [details]
patch

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

> Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp:164
> +        "  .targetname { font-weight: bold; overflow: hidden; white-space:nowrap; text-overflow: ellipsis; }"

Do you need this 'overflow: hidden'? Can it overflow? Even though ellipsis is used.
Comment 9 Fujii Hironori 2019-12-05 03:58:48 PST
Comment on attachment 384894 [details]
patch

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

>> Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp:164
>> +        "  .targetname { font-weight: bold; overflow: hidden; white-space:nowrap; text-overflow: ellipsis; }"
> 
> Do you need this 'overflow: hidden'? Can it overflow? Even though ellipsis is used.

Ah, I misunderstood. It is needed.
Comment 10 Fujii Hironori 2019-12-05 04:01:23 PST
Comment on attachment 384894 [details]
patch

LGTM
Comment 11 Yousuke Kimoto 2019-12-05 17:24:59 PST
Thank you for your review.
Comment 12 WebKit Commit Bot 2019-12-05 18:14:18 PST
Comment on attachment 384894 [details]
patch

Clearing flags on attachment: 384894

Committed r253199: <https://trac.webkit.org/changeset/253199>
Comment 13 WebKit Commit Bot 2019-12-05 18:14:20 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2019-12-05 18:15:20 PST
<rdar://problem/57685185>
Comment 15 Yousuke Kimoto 2019-12-08 19:09:55 PST
Memo:
>>> +        "  .targetname { font-weight: bold; overflow: hidden; white-space:nowrap; text-overflow: ellipsis; }"
>> 
>> Do you need this 'overflow: hidden'? Can it overflow? Even though ellipsis is used.
> 
>Ah, I misunderstood. It is needed.
I should have explained the latter case. The following page explains why 'overflow: hidden' is required.

https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow
>The text-overflow property doesn't force an overflow to occur. To make text overflow its container you have to set other CSS properties: overflow and white-space.