Closed
Bug 529062
Opened 15 years ago
Closed 15 years ago
[Mac] Bookmarks menu entries don't update correctly due to lazy-attached bindings
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
VERIFIED
FIXED
Firefox 3.7a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | .2-fixed |
People
(Reporter: marcia, Assigned: asaf)
References
Details
(Keywords: regression, verified1.9.2, Whiteboard: [3.6Br3])
Attachments
(3 files, 2 obsolete files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
mak
:
review+
beltzner
:
approval1.9.2.2+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
Seen while running Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2b4pre) Gecko/20091116 Namoroka/3.6b4pre. This bug was identified by Lukas Blakk during an IRC conversation this AM.
STR:
1. Using a clean profile, open several tabs.
2. Bookmarks | Bookmarks All Tabs
3. Give the folder a name
4. Expand the Bookmarks menu
Expected: The name would show in the dropdown list.
Actual: The menu shows [Folder Name]. However in Organize Bookmarks the name shows correctly.
I tested using 10.4 and see this bug there, but not using windows 7.
Reporter | ||
Updated•15 years ago
|
Flags: blocking-firefox3.6?
Keywords: regression
Reporter | ||
Updated•15 years ago
|
Whiteboard: [3.6Br3]
Comment 1•15 years ago
|
||
This works correctly if the folder is created on the Bookmarks Toolbar. However, the default selection for Bookmark All Tabs is for the Bookmarks Menu.
Comment 2•15 years ago
|
||
This worked for me using the same build as Maria, using an old profile.
Updated•15 years ago
|
Keywords: regressionwindow-wanted
Comment 3•15 years ago
|
||
I was able to reproduce on 10.4 PPC. However, after a restart the [New Folder] is now "foo Folder" as I named it. Weird.
Can't reproduce on Linux.
Comment 4•15 years ago
|
||
this is most likely a view update problem.
i cannot reproduce on Win Vista, but i can reproduce on Snow Leopard.
Updated•15 years ago
|
Summary: [Mac] Bookmarking all tabs from the Bookmarks menu does not show the file name → [Mac] Bookmarking all tabs from the Bookmarks menu does not show the new folder name
Comment 5•15 years ago
|
||
"view update problem" means the change has been actually executed by backend, but frontend code (the view) did not update (thus explaining why you see it correctly on restart)
Comment 6•15 years ago
|
||
yeah, that makes sense. The Bookmark menu item for the folder is correct even in a "new window" while as original window menu remains wrong.
I can also reproduce on 10.6 on a nightly build from 20091110.
Comment 7•15 years ago
|
||
nodeTitleChanged is correctly called, with correct param.
We set nodeElt.label = new_title but looks like that does not work on mac native menu. Also reading nodeElt.label does not return anything while it should return "[New Folder]"
Comment 8•15 years ago
|
||
nodeElt is the correct element, using getAttribute("label") and setAttribute("label") works correctly, using the .label property does not.
funny.
Comment 9•15 years ago
|
||
looks like on mac native menus the dom elements are not QI like on other platforms, Mano, can this create us issues related to bug 498130?
Attachment #412695 -
Flags: review?(mano)
Updated•15 years ago
|
Blocks: 498130
Keywords: regressionwindow-wanted
Updated•15 years ago
|
Assignee: nobody → mak77
Comment 11•15 years ago
|
||
Mano is investigating a better "workaround" for the xbl bug behind this.
Comment 12•15 years ago
|
||
Not blocking, but would take a patch now or in a security and stability release.
Flags: wanted-firefox3.6+
Flags: blocking-firefox3.6?
Flags: blocking-firefox3.6-
Assignee | ||
Updated•15 years ago
|
Attachment #412695 -
Flags: review?(mano) → review-
Comment 14•15 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
Assignee | ||
Comment 15•15 years ago
|
||
Attachment #412695 -
Attachment is obsolete: true
Attachment #415133 -
Flags: review?(mak77)
Comment 16•15 years ago
|
||
Comment on attachment 415133 [details] [diff] [review]
patch
>diff --git a/browser/components/places/content/menu.xml b/browser/components/places/content/menu.xml
>+#ifdef XP_MACOSX
>+ function applyBinding(elm) {
>+ let elmURI = /^url\("(.+)"\)$/.exec(
>+ window.getComputedStyle(element, "")
>+ .getPropertyValue("-moz-binding"));
>+ if (elmURI.length == 2)
>+ document.addBinding(elm, elmURI[1]);
>+ }
a couple questions:
https://developer.mozilla.org/en/XBL/XBL_1.0_Reference/DOM_Interfaces tells that addBinding is not implemented, but clearly it is, so i don't believe that doc a lot. But it's interesting that it's saying "The binding may not be attached yet when the call completes.", i suppose in our case this won't be a big deal since the user can't be lightning fast.
afaik, addBinding can add multiple bindings to an element, is there a risk that our element ends up having the same mxnu.xml binding attached twice (once forced and once lazily through the css definition)? Or are we sure the css binding is ignored forever?
I also suppose there is no way for an extension to add a different (or multiple) -moz-binding through css, that would cause our regexp to fail? i guess if we should make the regexp more "specialistic" making it look explicitely for a "url(.*menu\.xml.*)", just to be sure to match the right thing.
Comment 17•15 years ago
|
||
> "The binding may not be attached yet when the call completes."
chrome: bindings will be loaded synchronously. Others won't be.
As far as that goes, the getPropertyValue call there is not quite right in general but probably ok here given the restricted range of URIs you're likely to be dealing with. Though the last paragraph of comment 16 makes me wonder whether the range is as restricted as you might think....
Assignee | ||
Comment 18•15 years ago
|
||
> afaik, addBinding can add multiple bindings to an element, is there a risk that
> our element ends up having the same mxnu.xml binding attached twice (once
> forced and once lazily through the css definition)? Or are we sure the css
> binding is ignored forever?
Given our last talks, I cannot think of a case in which the binding is applied through css... actually the chevron uses it. Is there any way to check which bindings are applied to a node?
> I also suppose there is no way for an extension to add a different (or
> multiple) -moz-binding through css, that would cause our regexp to fail? i
> guess if we should make the regexp more "specialistic" making it look
> explicitely for a "url(.*menu\.xml.*)", just to be sure to match the right
> thing.
Will do.
Assignee | ||
Comment 19•15 years ago
|
||
Attachment #415133 -
Attachment is obsolete: true
Attachment #415616 -
Flags: review?(mak77)
Attachment #415133 -
Flags: review?(mak77)
Assignee | ||
Comment 20•15 years ago
|
||
Oh, and I cannot think of reason to opt-out extension's bindings.
Comment 21•15 years ago
|
||
Comment on attachment 415616 [details] [diff] [review]
patch
>diff --git a/browser/components/places/content/menu.xml b/browser/components/places/content/menu.xml
>+#ifdef XP_MACOSX
>+ // Bug 529062:
i'd prefer us pointing to the xbl bug that should be fixed in future (assumed we have one), the blame can already show when this was added
>+ function applyBinding(elm) {
>+ // getPropertyCSSValue is semi-deprecared, but there's no
>+ // alternative for parsing css_uri values reliably.
>+ let elmBindingURI = window.getComputedStyle(element, "")
>+ .getPropertyCSSValue("-moz-binding");
>+ if (elmBindingURI.primitiveType == CSSPrimitiveValue.CSS_URI)
>+ document.addBinding(elm, elmBindingURI.getStringValue());
>+ }
>+
>+ applyBinding(element)
missing semicolon
Attachment #415616 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 22•15 years ago
|
||
IIRC, according to Boris, there's no xbl bug on that, except "implement xbl2".
Comment 23•15 years ago
|
||
"the xbl bug" would be "completely change how binding attachment works in an incompatible way". So yes, "implement the binding attachment mechanism from xbl2".
Comment 24•15 years ago
|
||
so let's implement XBL2 :)
thanks for clarification, this is fine then.
Comment 25•15 years ago
|
||
Comment on attachment 415616 [details] [diff] [review]
patch
I think this matters for final release, so i'm asking pre-approval for 1.9.2, i know it's a bit late but due to this bug bookmarks names changes would not be reflected in Mac menu, and possibily other subtle bugs.
Attachment #415616 -
Flags: approval1.9.2?
Updated•15 years ago
|
Summary: [Mac] Bookmarking all tabs from the Bookmarks menu does not show the new folder name → [Mac] Bookmarks menu entries don't update correctly due to lazy-attached bindings
Comment 26•15 years ago
|
||
fixed semicolon
http://hg.mozilla.org/mozilla-central/rev/cc4e262d3c5a
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Updated•15 years ago
|
Attachment #415616 -
Flags: approval1.9.2? → approval1.9.2.2?
Comment 32•15 years ago
|
||
Comment on attachment 415616 [details] [diff] [review]
patch
a1922=beltzner, where are my tests, Marco?
Attachment #415616 -
Flags: approval1.9.2.2? → approval1.9.2.2+
Comment 33•15 years ago
|
||
i'm not sure what kind of test we could do on native mac menus. will try asking Mano if he has any idea to check the binding.
Comment 35•15 years ago
|
||
looks like we can sorta test this, indeed we have a test that was disabled on mac due to native menubar, but looks like i workarounded the problem with Neil's help.
Flags: in-testsuite?
Comment 36•15 years ago
|
||
This re-enables the views update test that was disabled on Mac due to native menubar.
I added a title change check to ensure it is reflected in the views.
Attachment #430377 -
Flags: review?(mano)
Assignee | ||
Comment 37•15 years ago
|
||
Comment on attachment 430377 [details] [diff] [review]
test update
r=mano
Attachment #430377 -
Flags: review?(mano) → review+
Comment 38•15 years ago
|
||
test updated on trunk: http://hg.mozilla.org/mozilla-central/rev/d70ef56fdca6
Flags: in-testsuite? → in-testsuite+
Comment 39•15 years ago
|
||
patch: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/03edf3418e14
test: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/dd2df3a6e001
status1.9.2:
--- → .2-fixed
Comment 41•15 years ago
|
||
Verifed fix on 1.9.2 branch: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
Also verified on trunk: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a4pre) Gecko/20100321 Minefield/3.7a4pre
Status: RESOLVED → VERIFIED
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•