Commit 52b9b637 authored by hyatt's avatar hyatt
Browse files

Make a line gutter backdrop so that tiny view source docs don't look

        bad.

        Reviewed by aroben

        * css/view-source.css:
        * html/HTMLViewSourceDocument.cpp:
        (WebCore::HTMLViewSourceDocument::createContainingTable):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 339df964
2007-05-21 David Hyatt <hyatt@apple.com>
Make a line gutter backdrop so that tiny view source docs don't look
bad.
Reviewed by aroben
* css/view-source.css:
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::createContainingTable):
2007-05-21 David Hyatt <hyatt@apple.com>
 
Make sure to distinguish between links to internal resources and
......@@ -40,12 +40,23 @@ td {
vertical-align: baseline
}
.webkit-line-number {
.webkit-line-gutter-backdrop, .webkit-line-number {
padding: 0 2px;
min-width: 21px;
background-color: rgb(240, 240, 240);
border-right: 1px solid rgb(128, 128, 128) !important;
-webkit-user-select: none;
}
.webkit-line-gutter-backdrop {
position: absolute;
z-index: -1;
left: 0;
top: 0;
height: 100%
}
.webkit-line-number {
text-align: right;
color: rgb(128, 128, 128);
word-break: normal;
......
......@@ -29,6 +29,7 @@
#include "HTMLHtmlElement.h"
#include "HTMLAnchorElement.h"
#include "HTMLBodyElement.h"
#include "HTMLDivElement.h"
#include "HTMLTableElement.h"
#include "HTMLTableCellElement.h"
#include "HTMLTableRowElement.h"
......@@ -66,6 +67,17 @@ void HTMLViewSourceDocument::createContainingTable()
Element* body = new HTMLBodyElement(this);
html->addChild(body);
body->attach();
// Create a line gutter div that can be used to make sure the gutter extends down the height of the whole
// document.
Element* div = new HTMLDivElement(this);
Attribute* a = new MappedAttribute(classAttr, "webkit-line-gutter-backdrop");
NamedMappedAttrMap* attrs = new NamedMappedAttrMap(0);
attrs->insertAttribute(a, true);
div->setAttributeMap(attrs);
body->addChild(div);
div->attach();
Element* table = new HTMLTableElement(this);
body->addChild(table);
table->attach();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment