Moved generation of html header/footer with builtin CSS to the rewriter library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48537 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp
index 93e544f..a513bf9 100644
--- a/Driver/HTMLPrint.cpp
+++ b/Driver/HTMLPrint.cpp
@@ -50,39 +50,7 @@
   
   html::EscapeText(R, FileID);
   html::AddLineNumbers(R, FileID);
-  
-  // Generate header
-
-  {
-    std::ostringstream os;
-  
-    os << "<html>\n<head>\n"
-       << " <style type=\"text/css\">\n"    
-       << "  .codeblock { width:100% }\n"
-       << "  .codeline { font-family: \"Monaco\", fixed; font-size:11pt }\n"
-       << "  .codeline { height:1.5em; line-height:1.5em }\n"
-       << "  .nums, .lines { float:left; height:100% }\n"
-       << "  .nums { background-color: #eeeeee }\n"
-       << "  .nums { font-family: \"Andale Mono\", fixed; font-size:smaller }\n"
-       << "  .nums { width:2.5em; padding-right:2ex; text-align:right }\n"
-       << "  .lines { padding-left: 1ex; border-left: 3px solid #ccc }\n"
-       << "  .lines { white-space: pre }\n"
-       << " </style>\n"
-       << "</head>\n"
-       << "<body>";
-
-    R.InsertStrBefore(StartLoc, os.str());
-  }
-  
-  // Generate footer
-  
-  {
-    std::ostringstream os;
-    
-    os << "</body></html>\n";
-    R.InsertStrAfter(EndLoc, os.str());
-  }
-    
+  html::AddHeaderFooterInternalBuiltinCSS(R, FileID);
   
   // Emit the HTML.