mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 09:08:10 +01:00
Fix hints with content scripting disabled.
This commit is contained in:
@@ -14,11 +14,6 @@
|
|||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
<binding id="hints" inheritstyle="false">
|
<binding id="hints" inheritstyle="false">
|
||||||
<implementation>
|
|
||||||
<field name="hints">
|
|
||||||
document.getAnonymousElementByAttribute(this, "anonid", "hints");
|
|
||||||
</field>
|
|
||||||
</implementation>
|
|
||||||
<content>
|
<content>
|
||||||
<html:div anonid="hints"/>
|
<html:div anonid="hints"/>
|
||||||
</content>
|
</content>
|
||||||
|
|||||||
@@ -291,6 +291,8 @@ const Hints = Module("hints", {
|
|||||||
if (body) {
|
if (body) {
|
||||||
let fragment = util.xmlToDom(<div highlight="hints"/>, doc);
|
let fragment = util.xmlToDom(<div highlight="hints"/>, doc);
|
||||||
body.appendChild(fragment);
|
body.appendChild(fragment);
|
||||||
|
util.computedStyle(fragment).height; // Force application of binding.
|
||||||
|
let container = doc.getAnonymousElementByAttribute(fragment, "anonid", "hints");
|
||||||
|
|
||||||
let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, doc);
|
let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, doc);
|
||||||
|
|
||||||
@@ -326,7 +328,7 @@ const Hints = Module("hints", {
|
|||||||
|
|
||||||
hint.span.style.left = leftPos + "px";
|
hint.span.style.left = leftPos + "px";
|
||||||
hint.span.style.top = topPos + "px";
|
hint.span.style.top = topPos + "px";
|
||||||
fragment.wrappedJSObject.hints.appendChild(hint.span);
|
container.appendChild(hint.span);
|
||||||
|
|
||||||
this._pageHints.push(hint);
|
this._pageHints.push(hint);
|
||||||
}
|
}
|
||||||
@@ -421,7 +423,7 @@ const Hints = Module("hints", {
|
|||||||
if (!rect)
|
if (!rect)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
hint.imgSpan = util.xmlToDom(<span highlight="Hint" dactyl:hl="HintImage"/>, doc);
|
hint.imgSpan = util.xmlToDom(<span highlight="Hint" dactyl:hl="HintImage" xmlns:dactyl={NS}/>, doc);
|
||||||
hint.imgSpan.style.left = (rect.left + offsetX) + "px";
|
hint.imgSpan.style.left = (rect.left + offsetX) + "px";
|
||||||
hint.imgSpan.style.top = (rect.top + offsetY) + "px";
|
hint.imgSpan.style.top = (rect.top + offsetY) + "px";
|
||||||
hint.imgSpan.style.width = (rect.right - rect.left) + "px";
|
hint.imgSpan.style.width = (rect.right - rect.left) + "px";
|
||||||
|
|||||||
Reference in New Issue
Block a user