Closed
Bug 496832
Opened 15 years ago
Closed 15 years ago
Disable media entries in context menu when media source is invalid
Categories
(Firefox :: Menus, defect)
Firefox
Menus
Tracking
()
VERIFIED
FIXED
Firefox 3.6a1
Tracking | Status | |
---|---|---|
status1.9.1 | --- | .2-fixed |
People
(Reporter: pascalc, Assigned: Dolske)
References
Details
(Keywords: regression, testcase, verified1.9.1)
Attachments
(1 file, 2 obsolete files)
379.51 KB,
patch
|
beltzner
:
approval1.9.1.2+
|
Details | Diff | Splinter Review |
1/ Go to the test case attached to this bug. It contains an image with a wrong link, a video with a wrong link and a video with a correct link. 2/ right click on the second square which is the video with the wrong link, select 'copy url" Expected result: Same behaviour as for the image tag, the url is copied to the clipboard Actual result: Nothing is copied, this feature works only if the url is correct
Reporter | ||
Comment 1•15 years ago
|
||
Comment 2•15 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090607 Minefield/3.6a1pre Regression range is: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=884a5c12182a&tochange=73c3f66ec28f
Blocks: 464158
Component: General → Video/Audio
OS: Linux → All
Product: Firefox → Core
QA Contact: general → video.audio
Hardware: x86 → All
Version: 3.5 Branch → Trunk
Updated•15 years ago
|
Flags: blocking1.9.1?
Keywords: regression,
testcase
Comment 3•15 years ago
|
||
The context menu uses the element's currentSrc attribute when copying the URL. This attribute is only set after a valid media source has selected, so you can't rely on the value of it before receiving the first progress event (not sure if anything more appropriate fires when currentSrc becomes valid, a quick skim of the spec didn't reveal anything), nor when the resource selection algorithm fails to find a valid media source. Using currentSrc is the correct thing to do once it becomes valid, since the media element may have selected any one of a number of possible sources. It's not clear to me what the right behaviour is when currentSrc isn't valid. Maybe we should just disable the "Copy URL" menu item?
Comment 4•15 years ago
|
||
When the URL is pointing to a faulty resource, copying the URL becomes a diagnostic sort of thing. This doesn't block the release of Firefox 3.5. As for comment 3, if we can't actually make the menuItem do anything here, then yes, it should be disabled.
Flags: wanted1.9.1.x?
Flags: blocking1.9.2?
Flags: blocking1.9.1?
Flags: blocking1.9.1-
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → dolske
Summary: <video> tag, If url of video is not correct, the context menu "copy url" item does not copy → Disable media entries in context menu when media source is invalid
Target Milestone: --- → mozilla1.9.2a1
Assignee | ||
Comment 5•15 years ago
|
||
This disables various context menu media entries when there are problems. 1) The entries that deal with a URL (copy/send/view) are disabled when no URL is available. I also added a fallback to use .src when .currentSrc isn't set... This allows using these commands on <video src="bad.avi">. I don't *think* it's possible to have to have .src and <source> trying to load different things... The spec seems to say that the src attribute should override any <source> that might be present. I think the only time this could even matter, though, is early on in the initial load. 2) The entries that deal with controlling the media (play/mute/show-controls) are disabled when the video is in an error state. I'm a little unsure of how non-recoverable errors are (eg, should "play" restart a video that ended because it was corrupted?), but I guess we already hide the controls when an error happens, so it's consistent with that.
Attachment #383219 -
Flags: review?(gavin.sharp)
Updated•15 years ago
|
Component: Video/Audio → Menus
Flags: blocking1.9.2?
Flags: blocking1.9.1-
Product: Core → Firefox
QA Contact: video.audio → menus
Target Milestone: mozilla1.9.2a1 → ---
Comment 8•15 years ago
|
||
Comment on attachment 383219 [details] [diff] [review] Patch v.1 >diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js >+ if (onMedia) { >+ this.setItemAttr("context-media-play", "disabled", (this.target.error != null)); Use a temporary for (error != null)? >- this.mediaURL = this.target.currentSrc; >+ this.mediaURL = this.target.currentSrc || this.target.src; When is currentSrc empty but src not, out of curiosity?
Attachment #383219 -
Flags: review?(gavin.sharp) → review+
Comment 9•15 years ago
|
||
(In reply to comment #8) > When is currentSrc empty but src not, out of curiosity? Nevermind, re-read comment 5. We should be able to test this right?
Assignee | ||
Comment 10•15 years ago
|
||
Added tests and fixed nits. Pushed http://hg.mozilla.org/mozilla-central/rev/d420c721e863
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Assignee | ||
Comment 11•15 years ago
|
||
I'd like to land this in 3.5.1. Safe and understood patch, context menu has existing tests and added more for this specific change.
Attachment #382061 -
Attachment is obsolete: true
Attachment #383219 -
Attachment is obsolete: true
Attachment #387793 -
Flags: approval1.9.1.1?
Comment 12•15 years ago
|
||
Comment on attachment 387793 [details] [diff] [review] Patch v.2 (checked in) a1912=beltzner
Attachment #387793 -
Flags: approval1.9.1.1? → approval1.9.1.2+
Updated•15 years ago
|
Flags: wanted1.9.1.x?
Assignee | ||
Comment 13•15 years ago
|
||
Pushed to 191: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/584af10f1117
status1.9.1:
--- → .2-fixed
Comment 14•15 years ago
|
||
Verified fixed on trunk and 1.9.1 with builds on all platforms like: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090722 Minefield/3.6a1pre (.NET CLR 3.5.30729) ID:20090722042136 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090729 Shiretoko/3.5.2pre (.NET CLR 3.5.30729) ID:20090729045022
Status: RESOLVED → VERIFIED
Keywords: verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•