Closed Bug 1036694 Opened 11 years ago Closed 11 years ago

merge nsIMarkupDocumentViewer into nsIContentViewer

Categories

(Core :: DOM: Navigation, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: tbsaunde, Assigned: tbsaunde)

References

Details

(Keywords: addon-compat)

Attachments

(2 files)

No description provided.
Comment on attachment 8453433 [details] [diff] [review] merge nsIMarkupDocumentViewer into nsIContentViewer > [scriptable, builtinclass, uuid(0cb321bd-5b38-4586-8fcd-d43b366886fb)] > interface nsIContentViewer : nsISupports update uuid >@@ -190,9 +192,86 @@ interface nsIContentViewer : nsISupports > * case, if mParentWidget is null then this document should not even > * be displayed. > */ > [noscript,notxpcom,nostdcall] nsViewPtr findContainerView(); > /** > * Set collector for navigation timing data (load, unload events). > */ > [noscript,notxpcom,nostdcall] void setNavigationTiming(in nsDOMNavigationTimingPtr aTiming); >+ /* >+ Scrolls to a given DOM content node. >+ */ >+ void scrollToNode(in nsIDOMNode node); >+ >+ /** The amount by which to scale all text. Default is 1.0. */ >+ attribute float textZoom; >+ >+ /** The amount by which to scale all lengths. Default is 1.0. */ >+ attribute float fullZoom; >+ >+ /** Disable entire author style level (including HTML presentation hints) */ >+ attribute boolean authorStyleDisabled; >+ >+ /** >+ * XXX comm-central only: bug 829543. Not the Character Encoding menu in >+ * browser! >+ */ >+ attribute ACString forceCharacterSet; >+ >+ /** >+ * XXX comm-central only: bug 829543. >+ */ >+ attribute ACString hintCharacterSet; >+ >+ /** >+ * XXX comm-central only: bug 829543. >+ */ >+ attribute int32_t hintCharacterSetSource; You have tabs here. Uses spaces, and make sure indentation is right above
Attachment #8453433 - Flags: review?(bugs) → review+
Attachment #8454091 - Flags: review?(bugs)
Comment on attachment 8454091 [details] [diff] [review] fixup js users of nsIMarkupDocument > function getCurrentZoom() { > var contViewer = toolbox.frame.docShell.contentViewer; >- var docViewer = contViewer.QueryInterface(Ci.nsIMarkupDocumentViewer); >+ var docViewer = contViewer; > return docViewer.fullZoom; Just drop docViewer and do return contViewer.fullZoom; > setZoom: function(zoomValue) { > // cap zoom value > zoomValue = Math.max(zoomValue, MIN_ZOOM); > zoomValue = Math.min(zoomValue, MAX_ZOOM); > > let contViewer = this.frame.docShell.contentViewer; >- let docViewer = contViewer.QueryInterface(Ci.nsIMarkupDocumentViewer); >+ let docViewer = contViewer; > > docViewer.fullZoom = zoomValue; similar here.
Attachment #8454091 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Blocks: 1043040
A quick MXR search shows at least 20 AMO add-ons that use this interface. A deprecation path would have been nice.
Keywords: addon-compat
Trevor, could you perhaps add a dummy nsIMarkupDocumentViewer interface, which just inherits nsIContentViewer.
What about fixing the online documentation (such as https://developer.mozilla.org/en/Full_page_zoom)?
MDN is a wiki, feel free to fix incorrect information there. (But yes, should probably check always if patches change something documented in MDN.)
Depends on: 1225943
Pushed by frgrahl@gmx.net: https://hg.mozilla.org/comm-central/rev/6520f949f61c merge nsIMarkupDocumentViewer into nsIContentViewer r=smaug
Blocks: 232583
Blocks: 769825
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: