Repository: google/pprof
Pull request #587 (2020-12-08 08:36:53)

fix source page header logo looks.
When use pprof web ui, the source page header logo looks differ from other pages, but vertical centered.
fix other pages header logo looks.
other pages logo:
<img width="654" alt="20201208-163150@2x" src="https://user-images.githubusercontent.com/679757/101459445-38173780-3973-11eb-85d6-243c7712c6e4.png">
source page logo:
<img width="653" alt="20201208-163525@2x" src="https://user-images.githubusercontent.com/679757/101459611-6b59c680-3973-11eb-9b64-0b4ae6cc352d.png">
fixed other pages logo (vertical centered):
<img width="654" alt="20201209-142719@2x" src="https://user-images.githubusercontent.com/679757/101593312-b1be2c80-3a2a-11eb-8729-705081564480.png">



aalexand: Hmm, the "wrong" logo actually looks better IMO - it's centered vertically.
zzjin: > Hmm, the "wrong" logo actually looks better IMO - it's centered vertically.

Cant't agree more. Updated commit.
kalyanac: Thanks for the PR. All tests failed, I am restarting them.
nolanmar511: Our Linux tests haven't generally been flaky. It looks like a test (` TestParse/weblist=line[13],addresses,flat:cpu`) needs to be updated to pass with this change:

Here is the failure:
```
=== RUN   TestParse/weblist=line[13],addresses,flat:cpu
    driver_test.go:211: diff testdata/pprof.cpu.flat.addresses.weblist cpu
    driver_test.go:216: testdata/pprof.cpu.flat.addresses.weblist
        --- /tmp/proto_test033268844	2020-12-08 16:27:17.750650027 +0000
        +++ /tmp/proto_test031650523	2020-12-08 16:27:17.750650027 +0000
        @@ -5,12 +5,11 @@
         <meta charset="UTF-8">
         <title>Pprof listing</title>
         <style type="text/css">
        -body {
        +body #content{
         font-family: sans-serif;
         }
         h1 {
           font-size: 1.5em;
        -  margin-bottom: 4px;
         }
         .legend {
           font-size: 1.25em;
```

This is the file which would need to be updated is [internal/driver/testdata/pprof.cpu.flat.addresses.weblist](https://github.com/google/pprof/blob/20978b51388db0648809a2c5cc88b494c7945ec1/internal/driver/testdata/pprof.cpu.flat.addresses.weblist#L1).

Otherwise, this change LGTM.
aalexand: @zzjin perhaps the screenshots and the text in the PR description need to be updated?

Patch:
diff --git a/internal/driver/webhtml.go b/internal/driver/webhtml.go
index 4f7610c..b8e8b50 100644
--- a/internal/driver/webhtml.go
+++ b/internal/driver/webhtml.go
@@ -62,6 +62,7 @@ a {
 .header .title h1 {
   font-size: 1.75em;
   margin-right: 1rem;
+  margin-bottom: 4px;
 }
 .header .title a {
   color: #212121;
diff --git a/internal/report/source_html.go b/internal/report/source_html.go
index 02a6d77..26e8bdb 100644
--- a/internal/report/source_html.go
+++ b/internal/report/source_html.go
@@ -25,12 +25,11 @@ func AddSourceTemplates(t *template.Template) {
 }
 
 const weblistPageCSS = `<style type="text/css">
-body {
+body #content{
 font-family: sans-serif;
 }
 h1 {
   font-size: 1.5em;
-  margin-bottom: 4px;
 }
 .legend {
   font-size: 1.25em;


Test patch:
diff --git a/internal/driver/testdata/pprof.cpu.flat.addresses.weblist b/internal/driver/testdata/pprof.cpu.flat.addresses.weblist
index 0284292..743b68e 100644
--- a/internal/driver/testdata/pprof.cpu.flat.addresses.weblist
+++ b/internal/driver/testdata/pprof.cpu.flat.addresses.weblist
@@ -5,12 +5,11 @@
 <meta charset="UTF-8">
 <title>Pprof listing</title>
 <style type="text/css">
-body {
+body #content{
 font-family: sans-serif;
 }
 h1 {
   font-size: 1.5em;
-  margin-bottom: 4px;
 }
 .legend {
   font-size: 1.25em;