diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-17 19:57:27 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-17 19:57:27 +0000 |
commit | 07339a63b46e38c954fcccbef721c609d0c2040e (patch) | |
tree | e5614ff36bc198ae9a396f2e931c3b2b47a0f945 /lib | |
parent | 9e8829be9292c4674653d0c54428cdb3f073929f (diff) |
Add support in HTML macro expansion for hovering over a macro and automatically
expanding its definition. This is a pure CSS solution.
Tested on IE7, Firefox 3b4, and Safari 3.1.
Patch by Cedric Venet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Rewrite/HTMLRewrite.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp index 43f13d2ab6..1041d612dd 100644 --- a/lib/Rewrite/HTMLRewrite.cpp +++ b/lib/Rewrite/HTMLRewrite.cpp @@ -251,7 +251,9 @@ void html::AddHeaderFooterInternalBuiltinCSS(Rewriter& R, unsigned FileID) { // Generate header R.InsertCStrBefore(StartLoc, - "<html>\n<head>\n" + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" " + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" + "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n" "<style type=\"text/css\">\n" " body { color:#000000; background-color:#ffffff }\n" " body { font-family:Helvetica, sans-serif; font-size:10pt }\n" @@ -263,8 +265,9 @@ void html::AddHeaderFooterInternalBuiltinCSS(Rewriter& R, unsigned FileID) { " .keyword { color: #FF00FF }\n" " .directive { color: #00A000 }\n" // Macro expansions. - " .expansion { display: block; border: 2px solid #FF0000; padding: 2px;" - "background-color:#FFF0F0;" + " .expansion { display: none; }\n" + " .macro:hover .expansion { display: block; border: 2px solid #FF0000; " + "padding: 2px; background-color:#FFF0F0;" " -webkit-border-radius:5px; -webkit-box-shadow:1px 1px 7px #000; " "position: absolute; top: -1em; left:10em } \n" " .macro { color: #FF0000; background-color:#FFC0C0;" |