[Pkg-mozext-commits] [itsalltext] 226/459: * Fixed bug with styles not using priority 'important', allowing stylish or other stylings to override the style. * Fixed the matching test page.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:24 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit 89981e0370967c7988b7d0f7aafa5e53dc8f6f1f
Author: docwhat at gerf.org <docwhat at gerf.org>
Date: Mon Jun 4 10:37:51 2007 -0400
* Fixed bug with styles not using priority 'important', allowing
stylish or other stylings to override the style.
* Fixed the matching test page.
---
src/chrome/content/cacheobj.js | 29 +++++++++++++++--------------
tests/style.html | 7 +------
2 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/src/chrome/content/cacheobj.js b/src/chrome/content/cacheobj.js
index c2f4923..d6ba0f9 100644
--- a/src/chrome/content/cacheobj.js
+++ b/src/chrome/content/cacheobj.js
@@ -72,7 +72,7 @@ function CacheObj(node) {
that.mouseover = function(event) {
var style = that.button?that.button.style:null;
if (style) {
- style.opacity = '0.7';
+ style.setProperty('opacity', '0.7', 'important');
ItsAllText.refreshTextarea(that.node);
}
};
@@ -85,7 +85,7 @@ function CacheObj(node) {
that.mouseout = function(event) {
var style = that.button?that.button.style:null;
if (style) {
- style.opacity = '0.1';
+ style.setProperty('opacity', '0.1', 'important');
}
};
}
@@ -439,15 +439,16 @@ CacheObj.prototype.addGumDrop = function() {
cache_object.button = gumdrop; // Store it for easy finding in the future.
// Image Attributes
- gumdrop.style.cursor = 'pointer';
- gumdrop.style.display = 'block';
- gumdrop.style.position = 'absolute';
- gumdrop.style.padding = '0';
- gumdrop.style.border = 'none';
- gumdrop.style.zIndex = 1; // we want it just above normal items.
+ gumdrop.style.setProperty('cursor', 'pointer', 'important');
+ gumdrop.style.setProperty('display', 'block', 'important');
+ gumdrop.style.setProperty('position', 'absolute', 'important');
+ gumdrop.style.setProperty('padding', '0', 'important');
+ gumdrop.style.setProperty('margin', '0', 'important');
+ gumdrop.style.setProperty('border', 'none', 'important');
+ gumdrop.style.setProperty('zIndex', '1', 'important'); // we want it just above normal items.
- gumdrop.style.width = this.gumdrop_width+'px';
- gumdrop.style.height = this.gumdrop_height+'px';
+ gumdrop.style.setProperty('width', this.gumdrop_width+'px', 'important');
+ gumdrop.style.setProperty('height', this.gumdrop_height+'px', 'important');
gumdrop.setAttribute(ItsAllText.MYSTRING+'_UID', cache_object.uid);
@@ -500,7 +501,7 @@ CacheObj.prototype.adjust = function() {
if (ItsAllText.getDisableGumdrops()) {
if(gumdrop && gumdrop.style.display != 'none') {
- gumdrop.style.display = 'none';
+ gumdrop.style.setProperty('display', 'none', 'important');
}
return;
}
@@ -517,7 +518,7 @@ CacheObj.prototype.adjust = function() {
display = 'none';
}
if (style.display != display) {
- style.display = display;
+ style.setProperty('display', display, 'important');
}
/* Reposition the gumdrops incase the dom changed. */
@@ -535,8 +536,8 @@ CacheObj.prototype.adjust = function() {
if(left && top) {
left = [left,'px'].join('');
top = [top,'px'].join('');
- if(style.left != left) { style.left = left; }
- if(style.top != top) { style.top = top; }
+ if(style.left != left) { style.setProperty('left', left, 'important');}
+ if(style.top != top) { style.setProperty('top', top, 'important');}
}
};
diff --git a/tests/style.html b/tests/style.html
index 931e457..46be0c7 100644
--- a/tests/style.html
+++ b/tests/style.html
@@ -6,12 +6,7 @@
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
textarea { margin: 1ex 2em; }
- [class*="textarea"],
- [id*="textarea"],
- [class*="textarea"] > *,
- [id*="textarea"] > * {
- width: 50% ! important;
- }
+ [class*="textarea"] > * { width: 50% !important; }
</style>
</head>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list