cssManager top is not used, so drop it

pull/667/head
Matthias Bartelmeß 2012-04-21 13:47:11 +02:00
parent 9d9b7b7b47
commit a557f2414e
2 changed files with 4 additions and 15 deletions

View File

@ -166,12 +166,10 @@ function Ace2Inner(){
}
var dynamicCSS = null;
var dynamicCSSTop = null;
function initDynamicCSS()
{
dynamicCSS = makeCSSManager("dynamicsyntax");
dynamicCSSTop = makeCSSManager("dynamicsyntax", true);
}
var changesetTracker = makeChangesetTracker(scheduler, rep.apool, {
@ -214,7 +212,6 @@ function Ace2Inner(){
if (dynamicCSS)
{
dynamicCSS.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author)));
dynamicCSSTop.removeSelectorStyle(getAuthorColorClassSelector(getAuthorClassName(author)));
}
}
else
@ -232,23 +229,18 @@ function Ace2Inner(){
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
getAuthorClassName(author)));
var authorStyleTop = dynamicCSSTop.selectorStyle(getAuthorColorClassSelector(
getAuthorClassName(author)));
var anchorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
getAuthorClassName(author))+' > a')
// author color
authorStyle.backgroundColor = bgcolor;
authorStyleTop.backgroundColor = bgcolor;
// text contrast
if(colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5)
{
authorStyle.color = '#ffffff';
authorStyleTop.color = '#ffffff';
}else{
authorStyle.color = null;
authorStyleTop.color = null;
}
// anchor text contrast

View File

@ -20,15 +20,12 @@
* limitations under the License.
*/
function makeCSSManager(emptyStylesheetTitle, top)
function makeCSSManager(emptyStylesheetTitle)
{
function getSheetByTitle(title, top)
function getSheetByTitle(title)
{
if(top)
var allSheets = window.parent.parent.document.styleSheets;
else
var allSheets = document.styleSheets;
var allSheets = document.styleSheets;
for (var i = 0; i < allSheets.length; i++)
{
@ -41,7 +38,7 @@ function makeCSSManager(emptyStylesheetTitle, top)
return null;
}
var browserSheet = getSheetByTitle(emptyStylesheetTitle, top);
var browserSheet = getSheetByTitle(emptyStylesheetTitle);
function browserRules()
{