diff options
-rw-r--r-- | common/content/bindings.xml | 5 | ||||
-rw-r--r-- | common/content/hints.js | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/common/content/bindings.xml b/common/content/bindings.xml index 3f9d2c11..8b95165b 100644 --- a/common/content/bindings.xml +++ b/common/content/bindings.xml @@ -14,11 +14,6 @@ </binding> <binding id="hints" inheritstyle="false"> - <implementation> - <field name="hints"> - document.getAnonymousElementByAttribute(this, "anonid", "hints"); - </field> - </implementation> <content> <html:div anonid="hints"/> </content> diff --git a/common/content/hints.js b/common/content/hints.js index 8d098728..6e56acfa 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -291,6 +291,8 @@ const Hints = Module("hints", { if (body) { let fragment = util.xmlToDom(<div highlight="hints"/>, doc); 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); @@ -326,7 +328,7 @@ const Hints = Module("hints", { hint.span.style.left = leftPos + "px"; hint.span.style.top = topPos + "px"; - fragment.wrappedJSObject.hints.appendChild(hint.span); + container.appendChild(hint.span); this._pageHints.push(hint); } @@ -421,7 +423,7 @@ const Hints = Module("hints", { if (!rect) 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.top = (rect.top + offsetY) + "px"; hint.imgSpan.style.width = (rect.right - rect.left) + "px"; |