Closed
Bug 881083
Opened 12 years ago
Closed 12 years ago
[Multizilla] Add a "Validate this page" entry to the Web Development submenu.
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(seamonkey2.22 fixed)
RESOLVED
FIXED
seamonkey2.22
Tracking | Status | |
---|---|---|
seamonkey2.22 | --- | fixed |
People
(Reporter: philip.chee, Assigned: philip.chee)
References
(Blocks 1 open bug)
Details
(Whiteboard: parity-multizilla)
Attachments
(1 file, 1 obsolete file)
9.91 KB,
patch
|
iannbugzilla
:
review+
neil
:
feedback-
|
Details | Diff | Splinter Review |
Multizilla had an option to validate the current content page with the w3c html validator. I think this is useful enough to add to SeaMonkey. Patch to follow.
Assignee | ||
Comment 1•12 years ago
|
||
> +++ b/suite/common/contentAreaClick.js
....
> - openNewWindowWith(href, doc);
> + if (window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
> + .getInterface(Components.interfaces.nsIWebNavigation)
> + .QueryInterface(Components.interfaces.nsILoadContext)
> + .usePrivateBrowsing)
> + openNewPrivateWith(href, doc);
> + else
> + openNewWindowWith(href, doc);
PB leak!
> +++ b/suite/browser/webDeveloperOverlay.js
> + var checkURL = "http://validator.w3.org/check?" +
> + "charset=%28detect+automatically%29&doctype=Inline&uri=" +
> + encodeURIComponent(uri.spec);
TODO move checkURL to a localized string pref.
> + if (!openNewTabOrWindow(aEvent, checkURL, getBrowser().contentDocument))
How to get openNewTabOrWindow() to open the tab/window in the foreground?
> + getBrowser().addTab(checkURL, { referrerURI: uri, focusNewTab: true });
Fallback.
> + initOverlay: function initOverlay(aEvent) {
> + window.removeEventListener("load", gWebDeveloper.initOverlay, false);
I should remove the event listener from safeBrowsingOverlay.js as well shouldn't I?
> + <menupopup id="toolsPopup">
> + <menuitem id="validatePage"
Should I put this under the Web Development menu or directly on the main Tools menu?
TODO add the CSS checker and link checker from Bug 102952.
While filing this bug, Bugzilla's duplicate checker helpfully pointed me to Bug 102952 ([RFE] Validate HTML should be available in the browser) which was WONTFIXed.
Attachment #760215 -
Flags: feedback?(neil)
Attachment #760215 -
Flags: feedback?(iann_bugzilla)
Comment 2•12 years ago
|
||
(In reply to Philip Chee from comment #1)
> > + if (window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
> > + .getInterface(Components.interfaces.nsIWebNavigation)
> > + .QueryInterface(Components.interfaces.nsILoadContext)
> > + .usePrivateBrowsing)
> > + openNewPrivateWith(href, doc);
> > + else
> > + openNewWindowWith(href, doc);
>
> PB leak!
[It's safe to use if (gPrivate) here.]
> > + if (!openNewTabOrWindow(aEvent, checkURL, getBrowser().contentDocument))
> How to get openNewTabOrWindow() to open the tab/window in the foreground?
Windows always open in the foreground, tabs depend on the shift key.
Assignee | ||
Comment 3•12 years ago
|
||
Changes since the last patch:
1. use gPrivate in openNewTabOrWindow().
2. Moved checkURL to a localized string pref.
Attachment #760215 -
Attachment is obsolete: true
Attachment #760215 -
Flags: feedback?(neil)
Attachment #760215 -
Flags: feedback?(iann_bugzilla)
Attachment #761029 -
Flags: review?(neil)
Attachment #761029 -
Flags: feedback?(iann_bugzilla)
Attachment #761029 -
Flags: feedback?(iann_bugzilla) → review+
Assignee | ||
Updated•12 years ago
|
Attachment #761029 -
Flags: review?(neil) → feedback?(neil)
Assignee | ||
Comment 4•12 years ago
|
||
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/df887839a810
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
status-seamonkey2.22:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.22
Comment 5•12 years ago
|
||
Comment on attachment 761029 [details] [diff] [review]
Patch v1.1 address feedback.
>+ if (!openNewTabOrWindow(aEvent, checkURL, getBrowser().contentDocument))
>+ getBrowser().addTab(checkURL, { referrerURI: uri, focusNewTab: true });
openUILink is a better fit.
>+ initMenuItem: function initMenuItem() {
>+ var menuitem = document.getElementById("validatePage");
>+ var uri = getBrowser().currentURI;
It looks as if your overlay doesn't apply to the Mac hidden window, which (if true) is good.
>+ initOverlay: function initOverlay(aEvent) {
[This of course gets called as a global method, which is why you have to use gWebDeveloper rather than this... it's fortunate that you only need to refer to it twice.]
>+ if (gPrivate)
>+ openNewPrivateWith(href, doc);
>+ else
>+ openNewWindowWith(href, doc);
I guess this really ought to land on branches...
Attachment #761029 -
Flags: feedback?(neil) → feedback-
Assignee | ||
Updated•12 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Updated•12 years ago
|
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•