mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
don't blindly insert doctype; check if it's present first (bug #102182); remove stale code
This commit is contained in:
parent
26c96c4fe7
commit
4f15127ab7
@ -1771,9 +1771,9 @@ function EditorSetDefaultPrefsAndDoctype()
|
||||
|
||||
var newDoc = window.editorShell.editorDocument.location == "about:blank";
|
||||
|
||||
// Insert a doctype element for a new doc or
|
||||
// Insert a doctype element
|
||||
// if it is missing from existing doc
|
||||
var needDoctype = newDoc ? true : !domdoc.doctype;
|
||||
var needDoctype = !domdoc.doctype;
|
||||
if ( needDoctype )
|
||||
{
|
||||
var newdoctype = domdoc.implementation.createDocumentType("html", "-//W3C//DTD HTML 4.01 Transitional//EN","");
|
||||
@ -2047,22 +2047,6 @@ function onStyleChange(theStyle)
|
||||
}
|
||||
}
|
||||
|
||||
/* onDirtyChange() is not called */
|
||||
function onDirtyChange()
|
||||
{
|
||||
// this should happen through style, but that doesn't seem to work.
|
||||
var theButton = document.getElementById("saveButton");
|
||||
if (theButton)
|
||||
{
|
||||
var isDirty = theButton.getAttribute("dirty");
|
||||
if (isDirty == "true") {
|
||||
theButton.setAttribute("src", "chrome://editor/skin/images/savemod.gif");
|
||||
} else {
|
||||
theButton.setAttribute("src", "chrome://editor/skin/images/savefile.gif");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getColorAndSetColorWell(ColorPickerID, ColorWellID)
|
||||
{
|
||||
var colorWell;
|
||||
|
Loading…
Reference in New Issue
Block a user