Bug 141942

Summary: Web Inspector: REGRESSION: Unexpected empty space above large expanded object with source location
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[TEST] Test Page
none
.object-tree {display: block} none

Description Joseph Pecoraro 2015-02-23 17:38:42 PST
Created attachment 247175 [details]
[TEST] Test Page

* SUMMARY
REGRESSION: Unexpected empty space above large expanded object with source location.

* TEST
<script>
console.log(window.navigator);
</script>

* STEPS TO REPRODUCE
1. Inspect test page
2. Expand Navigator object in console
  => unexpected space above "Navigator"
Comment 1 Radar WebKit Bug Importer 2015-02-23 17:38:56 PST
<rdar://problem/19931917>
Comment 2 Timothy Hatcher 2015-04-16 17:12:22 PDT
Does this still happen?
Comment 3 Joseph Pecoraro 2015-04-16 17:58:07 PDT
Yes, and it is very ugly!
Comment 4 Nikita Vasilyev 2015-05-01 15:42:03 PDT
Created attachment 252179 [details]
.object-tree {display: block}

Changing .object-tree{display: inline-block} to .object-tree{display: block} fixes the issues.

However, it backfires in a few other places.

On the attached screenshot .object-tree has a purple outline for debugging purposes. When .object-tree is inside of "display: inline" elements, as on the screenshot, it doesn’t look nice.
Comment 5 Nikita Vasilyev 2015-05-01 15:43:51 PDT
My plan is to find all the cases when .object-tree is inside of "display: inline" elements and convert them to "display: inline-block".
Comment 6 Joseph Pecoraro 2015-05-01 15:49:41 PDT
(In reply to comment #5)
> My plan is to find all the cases when .object-tree is inside of "display:
> inline" elements and convert them to "display: inline-block".

Can we assume the outer is block, and any inner is inline-block?

  .object-tree { display: block; }
  .object-tree .object-tree { display: inline-block; }

I have a feeling object-tree is inline-block for a reason, but I don't completely remember. Maybe that was a hold-out from when console.log("msg", obj1, obj2) displayed multiple objects on one line. Now that we no longer do that, or only show the preview on the same line as the message, we may be able to get away with ObjectTreeView being display:block.
Comment 7 Nikita Vasilyev 2015-05-01 15:59:20 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > My plan is to find all the cases when .object-tree is inside of "display:
> > inline" elements and convert them to "display: inline-block".
> 
> Can we assume the outer is block, and any inner is inline-block?
> 
>   .object-tree { display: block; }
>   .object-tree .object-tree { display: inline-block; }

It doesn’t solve the problem and also messes things up even more :)
https://cldup.com/sYON7eoFTz-3000x3000.png

> 
> I have a feeling object-tree is inline-block for a reason, but I don't
> completely remember. Maybe that was a hold-out from when console.log("msg",
> obj1, obj2) displayed multiple objects on one line. Now that we no longer do
> that, or only show the preview on the same line as the message, we may be
> able to get away with ObjectTreeView being display:block.

Yes, I think that was the only reason.
Comment 8 Joseph Pecoraro 2015-05-01 16:05:06 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > My plan is to find all the cases when .object-tree is inside of "display:
> > > inline" elements and convert them to "display: inline-block".
> > 
> > Can we assume the outer is block, and any inner is inline-block?
> > 
> >   .object-tree { display: block; }
> >   .object-tree .object-tree { display: inline-block; }
> 
> It doesn’t solve the problem and also messes things up even more :)
> https://cldup.com/sYON7eoFTz-3000x3000.png

You should give a different border to the block vs inline-block groups. It looks to me like the inner ones are not displaying inline-block, otherwise I would expect them to be on the same line as the numbers. But I don't know for certain what is happening here.
Comment 9 Timothy Hatcher 2015-05-20 13:10:09 PDT
We have had similar issues with running into the source code location in the past.
Comment 10 Nikita Vasilyev 2016-12-11 20:26:49 PST
This has been fixed a while ago.