diff mbox

[wwwdocs] gcc-6/changes.html: diagnostics, Levenshtein, -Wmisleading-indentation, jit (v2)

Message ID alpine.LSU.2.20.1601192343170.8075@anthias
State New
Headers show

Commit Message

Gerald Pfeifer Jan. 19, 2016, 10:49 p.m. UTC
On Tue, 19 Jan 2016, Jakub Jelinek wrote:
> Perhaps we need to use something other than <b style='color:magenta'>...</b>
> and similar, the question is what.  It certainly worked well back almost 3
> years ago when I've added those into gcc-4.9/changes.html.

And interestingly it still does when I download the page and view
it locally (Firefox 43 or Google Chrome).

Instead of hardcoding <b style='color:red'>text</b> it makes sense
to use <span class="boldred">text</span> which is easier (and easier
to tweak, and I just applied the patch below.

Interestingly enough, same result:  Looks just fine when viewed
locally; https://gcc.gnu.org/gcc-6/changes.html in the browser
does not show the color, though it validates. :-(

Hmm.

Gerald

Comments

Jakub Jelinek Jan. 19, 2016, 10:57 p.m. UTC | #1
On Tue, Jan 19, 2016 at 11:49:27PM +0100, Gerald Pfeifer wrote:
> On Tue, 19 Jan 2016, Jakub Jelinek wrote:
> > Perhaps we need to use something other than <b style='color:magenta'>...</b>
> > and similar, the question is what.  It certainly worked well back almost 3
> > years ago when I've added those into gcc-4.9/changes.html.
> 
> And interestingly it still does when I download the page and view
> it locally (Firefox 43 or Google Chrome).
> 
> Instead of hardcoding <b style='color:red'>text</b> it makes sense
> to use <span class="boldred">text</span> which is easier (and easier
> to tweak, and I just applied the patch below.

Note, we want to tweak gcc-{4.9,5}/changes.html too, and there are more
colors than just red in there.
Also, seems the colors disappeared also from e.g.
https://gcc.gnu.org/projects/cxx1z.html
which has
  <style type="text/css">
      /* <![CDATA[*/
        tr.separator { background: #ffffcc}
        .supported { color: green }
        .unsupported { color: red }
      /* ]]> */
    </style>

	Jakub
Gerald Pfeifer Jan. 19, 2016, 11:17 p.m. UTC | #2
On Tue, 19 Jan 2016, Jakub Jelinek wrote:
> Note, we want to tweak gcc-{4.9,5}/changes.html too, and 
> there are more colors than just red in there.

Yes, I just got tired and need to log off now.

> Also, seems the colors disappeared also from e.g.
> https://gcc.gnu.org/projects/cxx1z.html

Lovely.

It seems gcc.gnu.org enforces a strict Content Security Policy
(cf. http://www.html5rocks.com/en/tutorials/security/content-security-policy/
for example) which does not allow for inline CSS styles.

  Content-Security-Policy: default-src 'self' http: https:

So either we get the configuration of the web server changed, or
indeed we need to touch all those existing pages.

Gerald
Jakub Jelinek Jan. 19, 2016, 11:40 p.m. UTC | #3
On Wed, Jan 20, 2016 at 12:17:36AM +0100, Gerald Pfeifer wrote:
> On Tue, 19 Jan 2016, Jakub Jelinek wrote:
> > Note, we want to tweak gcc-{4.9,5}/changes.html too, and 
> > there are more colors than just red in there.
> 
> Yes, I just got tired and need to log off now.
> 
> > Also, seems the colors disappeared also from e.g.
> > https://gcc.gnu.org/projects/cxx1z.html
> 
> Lovely.
> 
> It seems gcc.gnu.org enforces a strict Content Security Policy
> (cf. http://www.html5rocks.com/en/tutorials/security/content-security-policy/
> for example) which does not allow for inline CSS styles.
> 
>   Content-Security-Policy: default-src 'self' http: https:
> 
> So either we get the configuration of the web server changed, or
> indeed we need to touch all those existing pages.

At least the warning/error/note styles are something that multiple pages are
using and going to use in the future, so if that could be defined in the
main gcc.css, it would be enough.

	Jakub
Jakub Jelinek Jan. 19, 2016, 11:56 p.m. UTC | #4
On Wed, Jan 20, 2016 at 12:40:08AM +0100, Jakub Jelinek wrote:
> On Wed, Jan 20, 2016 at 12:17:36AM +0100, Gerald Pfeifer wrote:
> > On Tue, 19 Jan 2016, Jakub Jelinek wrote:
> > > Note, we want to tweak gcc-{4.9,5}/changes.html too, and 
> > > there are more colors than just red in there.
> > 
> > Yes, I just got tired and need to log off now.
> > 
> > > Also, seems the colors disappeared also from e.g.
> > > https://gcc.gnu.org/projects/cxx1z.html
> > 
> > Lovely.
> > 
> > It seems gcc.gnu.org enforces a strict Content Security Policy
> > (cf. http://www.html5rocks.com/en/tutorials/security/content-security-policy/
> > for example) which does not allow for inline CSS styles.
> > 
> >   Content-Security-Policy: default-src 'self' http: https:

BTW, is that also the reason why very recently the gcc.gnu.org homepage
changed layout (the News column is much wider than the Release Series and Status
column), at least with Firefox 43.0?  The page has:
<td style="width: 50%; padding-right: 8px;" valign="top">
etc.

	Jakub
Gerald Pfeifer Feb. 25, 2017, 1:25 p.m. UTC | #5
On Wed, 20 Jan 2016, Jakub Jelinek wrote:
>>> It seems gcc.gnu.org enforces a strict Content Security Policy
>>> (cf. http://www.html5rocks.com/en/tutorials/security/content-security-policy/
>>> for example) which does not allow for inline CSS styles.
>>> 
>>>   Content-Security-Policy: default-src 'self' http: https:
> BTW, is that also the reason why very recently the gcc.gnu.org homepage
> changed layout (the News column is much wider than the Release Series and Status
> column), at least with Firefox 43.0?  The page has:
> <td style="width: 50%; padding-right: 8px;" valign="top">

Yes, exactly!

I had addressed most of that back then last year, and now finally
completed the last missing pieces.

(There are only two bits of local "style=" left on our web site, 
in projects/gupc.html.)

Gerald
diff mbox

Patch

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v
retrieving revision 1.48
diff -u -r1.48 changes.html
--- changes.html	19 Jan 2016 17:48:53 -0000	1.48
+++ changes.html	19 Jan 2016 22:41:22 -0000
@@ -2,6 +2,10 @@ 
 
 <head>
 <title>GCC 6 Release Series &mdash; Changes, New Features, and Fixes</title>
+
+<style type="text/css">
+  .boldred { font-weight:bold; color:red; }
+</style>
 </head>
 
 <!-- GCC maintainers, please do not hesitate to update/contribute entries
@@ -69,9 +73,9 @@ 
   For example:
 <blockquote><pre>
 <b>test.cc:</b> In function <b>'int test(int, int, foo, int, int)'</b>:
-<b>test.cc:5:16:</b> <b style='color:red'>error:</b> no match for <b>'operator*'</b> (operand types are <b>'int'</b> and <b>'foo'</b>)
-   return p + <b style='color:red'>q * r</b> * s + t;
-              <b style='color:red'>~~^~~</b>
+<b>test.cc:5:16:</b> <span class="boldred">error:</span> no match for <b>'operator*'</b> (operand types are <b>'int'</b> and <b>'foo'</b>)
+   return p + <span class="boldred">q * r</span> * s + t;
+              <span class="boldred">~~^~~</span>
 </pre></blockquote>
 In addition, there is now initial support for precise diagnostic locations
 within strings:
@@ -85,16 +89,16 @@ 
       <!-- this is currently the only example in the tree; various others are pending  -->
 <blockquote><pre>
 <b>fixits.c:</b> In function <b>'bad_deref'</b>:
-<b>fixits.c:11:13:</b> <b style='color:red'>error:</b> <b>'ptr'</b> is a pointer; did you mean to use <b>'->'</b>?
-   return ptr<b style='color:red'>.</b>x;
-             <b style='color:red'>^</b>
-             <b style='color:red'>-></b>
+<b>fixits.c:11:13:</b> <span class="boldred">error:</span> <b>'ptr'</b> is a pointer; did you mean to use <b>'->'</b>?
+   return ptr<span class="boldred">.</span>x;
+             <span class="boldred">^</span>
+             <span class="boldred">-&gt;</span>
 </pre></blockquote></li>
     <li>The C and C++ compilers now offer suggestions for misspelled field names:
 <blockquote><pre>
-<b>spellcheck-fields.cc:52:13:</b> <b style='color:red'>error:</b> <b>'struct s'</b> has no member named <b>'colour'</b>; did you mean <b>'color'</b>?
-   return ptr-&gt;<b style='color:red'>colour</b>;
-               <b style='color:red'>^~~~~~</b>
+<b>spellcheck-fields.cc:52:13:</b> <span class="boldred">error:</span> <b>'struct s'</b> has no member named <b>'colour'</b>; did you mean <b>'color'</b>?
+   return ptr-&gt;<span class="boldred">colour</span>;
+               <span class="boldred">^~~~~~</span>
 </pre></blockquote></li>
     <!-- also, pending patch to add fix-it hints to the above -->
     <li>New command-line options have been added for the C and C++ compilers:
@@ -135,9 +139,9 @@ 
     <li>The C and C++ compilers now emit saner error messages if
       merge-conflict markers are present in a source file.
 <blockquote><pre>
-<b>test.c:3:1:</b> <b style='color:red'>error:</b> version control conflict marker in file
- <b style='color:red'>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</b> HEAD
- <b style='color:red'>^~~~~~~</b>
+<b>test.c:3:1:</b> <span class="boldred">error:</span> version control conflict marker in file
+ <span class="boldred">&lt;&lt;&lt;&lt;&lt;&lt;&lt;</span> HEAD
+ <span class="boldred">^~~~~~~</span>
 </pre></blockquote></li>
   </ul>
 
@@ -454,7 +458,7 @@ 
       provide suggestions for misspelled command line options.
 <blockquote><pre>
 $ gcc -static-libfortran test.f95
-gcc: <b style='color:red'>error:</b> unrecognized command line option <b>'-static-libfortran'</b>; did you mean <b>'-static-libgfortran'</b>?
+gcc: <span class="boldred">error:</span> unrecognized command line option <b>'-static-libfortran'</b>; did you mean <b>'-static-libgfortran'</b>?
 </pre></blockquote></li>
     <li>The <code>--enable-default-pie</code> configure option enables
 	generation of PIE by default.</li>