Skip to content

Commit eb7a6c7

Browse files
author
Daniel Herzog
committed
Fix for too much margin for responsebody on images and empty response bodies; Style fixes
1 parent ecbc385 commit eb7a6c7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/network/network_details_templates.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ templates._make_header_template_func = function(is_request_headers)
149149
{
150150
// add data-spec attributes on certain firstline tokens, depending on if it's request_headers.
151151
// todo: while this has firstline_tokens, it can't be reused.
152+
// todo: not looking too good.
152153
var firstline_tokens = 0;
153154
var add_data_spec;
154155
if (is_request_headers)
@@ -392,7 +393,7 @@ templates._request_body = function(req, do_raw)
392393

393394
templates._response_body = function(resp, do_raw, is_last_response)
394395
{
395-
var ret = [this._wrap_pre("\n")]; // todo: no, then it's (really) empty there shouldn't be a separator either. For images it looks a bit wrong too, since the img elem makes its own space too.
396+
var ret = [];
396397

397398
var classname = "";
398399
if ((resp.saw_responsefinished && resp.no_used_mimetype) ||
@@ -439,6 +440,9 @@ templates._response_body = function(resp, do_raw, is_last_response)
439440
}
440441
}
441442
}
443+
if (ret.length)
444+
ret.unshift(this._wrap_pre("\n"));
445+
442446
if (do_raw)
443447
return ret;
444448
else

src/network/network_style.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
overflow: auto;
268268
height: 100%;
269269
box-sizing: border-box;
270-
padding: 27px 20px 37px 0;
270+
padding: 27px 20px 27px 0;
271271
background-color: #fff;
272272
/* using border-left instead of padding-left to keep the
273273
space for the close button when scrolling horizontally */
@@ -310,11 +310,6 @@
310310
margin: 0;
311311
}
312312

313-
.network-details-container img.network-body
314-
{
315-
margin-top: 2em;
316-
}
317-
318313
.network-details-container table
319314
{
320315
border-collapse: collapse;

0 commit comments

Comments
 (0)