mozilla :: #fx-team

17 Mar 2017
12:07Standard8gfritzsche: would you be able to do the review on bug 1312182 sometime? Its been outstanding a couple of months now
12:07firebothttps://bugzil.la/1312182 ASSIGNED, alessio.placitelli@gmail.com MOZ_TELEMETRY_REPORTING is "dangerous"
12:55gfritzscheStandard8: possibly next week - its been lagging behind other higher-priority reviews sadly
12:55gfritzscheStandard8: is it blocking anything?
12:56gfritzscheAFAIK it doesn't have any direct impact
13:13Standard8gfritzsche: I think it doesnt have a direct impact, its more that sometimes Im testing things and can never remember if that affects what Im testing or not ;-) Next week sometime would be fine - or maybe theres someone else you can hand off to?
13:31gfritzscheStandard8: i think that i should have a look over it... the potential for data or ui breakage seems high, thats why its hanging for a bit
13:31Standard8ok
15:54Standard8mak: so I just remembered, there was a v5 patch on bug 1087255, but that seemed to have been superseeded by bug 1076775 - However, I think neither of those do quite what youre asking for, which is chunking the sql commits?
15:54firebothttps://bugzil.la/1087255 NEW, standard8 Convert JS clients of RemovePages to History.remove
15:54firebothttps://bugzil.la/1076775 FIXED, dteller Implement History.removeVisitsByFilter
15:55makStandard8: I don't think any of those patches covered chunking
15:55Standard8mak: the 1076775 one implemented onresult_chunk_size
15:56makyeah, but that was for the notifications...
15:56Standard8yeah
15:56makbasically to avoid flooding the main thread of notifications all at once
15:57makthe same constant can be reused, fwiw
15:57Standard8yeah ok Ill get a bug filed on that
15:59makthanks
16:27manotejmekaMattn: Thank you so much for providing me with the fetch and promise documentation that helped me a lot to learn about it. I have a small problem about the idea of searching dialogue boxes through .dtd and .properties file.
16:31manotejmekamattn: When I search the .dtd file I am able to parse the file and get the words I needed which looks like " Array [ "Options", "Preferences", "&brandShortName; Preferences", "width: 42em; min-height: 37.5em;", "width: 47em; min-height: 40em;", "width: 45.5em; min-height: 40.5em;", "General", "Search Results", "Tabs", "Search", 9 more ]", but the problem
16:32manotejmekais some files contain styling elements like the width and height as well as references to "&brandShortName. For the .properties file the issue is the messages could have %S meaning they will get filled later. So any idea on how to tackle this?
16:48sfosterdao: apologies for r? noise. I pulled the trigger early on that last push, am going to delete those attachments now.
16:50sfosterok, looks like they are already maked obsolete. Can I set f? in mozreview - I've just got questions as this is WIP
17:01sfostergandalf: are there l10n apis that manotejmeka can use for this ^^
17:02sfosterhe's building a searchable index for the prefs. dialogs by requesting the strings in the background (AIUI)
17:03gandalfsfoster: wow... ok
17:04gandalfmanotejmeka: please, make sure you get an f+ from :pike, :stas or me (:gandalf)
17:05gandalfmanotejmeka: so, do you have a problem with the .dtd as well, or just .properties?
17:11manotejmekagandalf: what is an f+? I do not have a problem in opening and reading the file and getting the content I need from it. The problem I have from .dtd and .properties is that some of the content is binding during load. Meaning right now both the files has references to things like &brandShortName and also %S which gets loaded when the DOM element is created
17:11manotejmekafor them. Due to this, it is a road block in the way I can search for it
17:11gandalfok, let's tackle it separately, sorry, I need to understand better your use case
17:12gandalfso, in both cases, those things are called "placeables"
17:12gandalfin DTD you have an entity reference "brandShortName" (or any other entity)
17:12gandalfwhat do you need for that to work in your use case?
17:18Osmosebholley: I'm running into an error message about accessing "then" on a privileged object (it's a
17:18OsmosePromise in a sandbox) and I'm having trouble understanding whether the message is an error or not, because it's not throwing an exception
17:18OsmoseHere's the message: "Security wrapper denied access to property "then" on privileged Javascript object. Support for exposing privileged objects to untrusted content via __exposedProps__ is being gradually removed - use WebIDL bindings or Components.utils.cloneInto instead. Note that only the first denied property access from a given global object will be reported."
17:19OsmoseDo you have any helpful advice? :D
17:20bholleyOsmose: sounds like your code is trying to access a privileged object from an unprivileged context, which is bad :-)
17:20manotejmekagandalf: The simple idea is that I would need to parse the visible text that is displayed on screen and parse it with the phrase that is being searched for and highlight it if needed
17:21bholleyOsmose: we used to have more support for that sort of thing, but then we mostly removed it
17:21bholleyOsmose: I'd recommend trying to find a different design
17:21bholleyOsmose: the more-modern replacement for the kind of injection we used to do with __exposedProps__ is to use Cu.cloneInto
17:21gandalfmanotejmeka: ok, so you would like to resolve that placeable if I'm correct? to get "&brandShortName is closing" -> "Firefox is closing"?
17:22bholleyOsmose: (and Cu.exportFunction)
17:22manotejmekagandalf: https://mozilla.invisionapp.com/share/ZDAGPK3AF#/screens/218928267 As you can see in that link when a person searches for "co" it highlight al references to "co" I need to do that same with in a sundialogue box
17:23gandalfmanotejmeka: ok, you don't want to search DTD and properties for that
17:23manotejmekaYes I would like that text as well or an idea to solve this issue without opening the subdialogue box and reading it. Opening and closing subdialogue boxes is very costly
17:23gandalfthis will not work, and as we move to the new localization format it will not work even more
17:23gandalfyou need to actually go over the DOM and find the text nodes
17:23gandalfwith resolved strings
17:23manotejmekagandalf: So I am open to any new ideas you have to solve this problem
17:23gandalfor skip placeables
17:24gandalfyou can either skip placeables assuming they're not part of the match
17:24gandalfor you'll want to document.querySelectorAll('*') and go over the nodes to index the strings :/
17:24manotejmekaI do not to want to skip because that can cause problems if they search for that word I would need it
17:25gandalfbecause to resolve placeables you'd need to basically perform full localization - find all localization resources that create this prticular l10n context, and format them together. That's what l10n does
17:27manotejmekagandalf: So your idea is reading the DOM nodes which means I have to open and close the dialogues to read the dom nodes which is very costly and makes things slow. Do you have any other ideas where I do not have to open the dialogue boxes to figure out the visible text in them?
17:28Osmosebholley: So I'm trying to track down where that unprivileged access is, but because it's not actually throwing an error I'm having trouble finding it. What's confusing to me is that I get that message, but it looks like the code... keeps executing? Instead of throwing an error.
17:28bholleyOsmose: yes, for compat we just pretend the object isn't there
17:28bholleyOsmose: er, the prop
17:29OsmoseAh, so it's undefined
17:29bholleyOsmose: yep
17:29OsmoseGot it, thanks
17:29* Osmose gives it a think with that new factoid
17:29bholleyOsmose: in general I'd try to figure out where the privileged/unprivileged boundary in your code is, and figure out what kind of interaction is happening across it
17:29bholleyOsmose: in general a more decoupled approach is preferable
17:35gandalfmanotejmeka: in the current localization world, not much :(
17:35gandalfmanotejmeka: but honestly, I'd skip placeables
17:36gandalfplaceables are things that are either shared ("Firefox") or custom (user name) and people should not search on those
17:37manotejmekagandalf: Thank you very much for your insights and help. I talked over with mconley (mike) we came up with a small solution. I will bring that up to mconley and thing about it. Thank you.
17:37gandalfin the future we will switch to a new localization API that will allow you to look up an attribute on an element (data-l10n-id) and just resolve it against localization to get the formatted string with placeables resolved. But I'd expect it to be available next year
17:38manotejmekaOh okay
17:40gandalfmanotejmeka: what's the bug id?
17:40gandalfI'd be happy to track the work :)
17:40manotejmekagandalf: Bug 1335905 - Add Preferences search feature, preffed off by default. r?jaws, r?mconley
17:40firebothttps://bugzil.la/1335905 ASSIGNED, manotejmeka@gmail.com Add experimental search capability to about:preferences
17:41mconleygandalf: oooh, you're actually a great person to ask about this stuff. Good work tracking him down, manotejmeka. :)
17:42manotejmekamconley: Thanks
17:42manotejmekais firebot and AI?
17:42mconleymanotejmeka: fwiw, it looks like there's a programmatic way of extracting values from a dtd as well:
17:42mconleyhttp://searchfox.org/mozilla-central/source/services/sync/tps/extensions/mozmill/resource/modules/l10n.js#23-44
17:43mconleythat's as opposed to trying to do it with regex's.
17:43mconleyhm
17:44mconleywell
17:44mconleyactually, that looks not amazing... you need to supply an entity ID there.
17:44manotejmekaWhat is an entity ID?
17:44mconleymanotejmeka: the identifier used in the .xul / .xhtml file, like &someString;
17:55gandalfmanotejmeka: ok, after looking at the code, I'd still suggest cutting out placeables in DTD and .properties
17:56gandalfit removes the problem, and if later we'll want to fine tune it (search for "duckduckgo" etc.) we can extend the algorithm to resolve entities (although I'd say it's going to be pretty tricky)
18:04manotejmekagandalf: mconley wanted me to check with you if this function is the best way to read in the .dtd and .properties file and do what you have suggested. Or are there better ways to do this or has it already been done in a better way before? https://www.irccloud.com/pastebin/Ax76EBkH/
18:06gandalfmanotejmeka: looks good to me, but I'd ask :pike for feedback on the patch (f? flag)
18:06gandalf:pike is more skilled with DTD and properties than I am
18:10manotejmekagandalf: Thank you I will check with him after I implement something and test things out.
19:30madhuriHello Team
20:31madhuriHello mbrandt
20:33madhuriTeam : can anyone pls tell me about scope of accessibility testing that we are working on ?
20:33nalexandermadhuri: if you have a question, just ask.
20:34madhurior we are going to cover all scenarios regarding web accessibilty
20:34madhurinalexander : thanks, can you pls ans
20:35nalexandermadhuri: I can't answer that, sorry, and I don't know who can.
20:35madhuriok, thanks
20:35sfosterI think #accessibility is mostly concerned with the engineering efforts associated with a11y, but that might be a place to start
20:37madhuriok sfoster, I will explore the same. thanks
21:01Mossopmconley: Is the first patch in bug 1340842 ready to review now?
21:01firebothttps://bugzil.la/1340842 NEW, mconley@mozilla.com Instrument tab closing time from click to tab being gone
21:02mconleyMossop: I think I want to wait and make sure gfritzsche is okay with my change to TelemetryStopwatch first
21:02mconleyMossop: as that patch relies on that change.
21:02mconleyand if gfritzsche wants to go another way, it'll change again.
21:03MossopOk
21:03mconleyMossop: I mean, I'll happily take feedback now. :)
21:03mconleybut there's a dependency there.
21:04gfritzschemconley: is that an urgent thing? we're looking at dealing with review backlog at the start of next week
21:04mconleygfritzsche: It's high priority in the sense that it's something that Quantum Flow is interested in, so it's one of the big Q's
21:05mconleycould it wait a weekend... probably?
21:05mconleygfritzsche: So, uh, there's my assessment of the urgency. Typically murky. :)
21:06waglecrusty ancient extension, working on port: how do I figure out what to replace something that's been "obsolete since gecko 22"?
21:06waglewhat with
21:06mconleywagle: what is the thing?
21:06gfritzschemconley: thanks, sounds like monday or tuesday - we'll sort this then :)
21:06mconleylike, what are you trying to replace exactly?
21:06waglegetCellProperties for example?
21:06mconleygfritzsche: sounds good to me.
21:07mconleywagle: okay, and what tree view are you trying to get cell properties on?
21:09waglemconley: not sure yet, the thing I inherited is huge and I thought i'd try going in with a microscope and fix old errors showing up in the browser console..
21:10MattNmanotejmeka: FWIW I agree with gandalf to just skip placeables
21:10waglei'm trying to port to webextensions, but getting it to work right seems the thing to do first.. (maybe, I just started this wave)
21:11MattNmanotejmeka: In that one bug I would even just start with .dtd files since I think that covers the majroity
21:11MattN*majority of dialogs
21:11mconleywagle: fair enough. Do you mind if I ask what the add-on does?
21:12manotejmekaMattN: Yes I can start to implement that. How would you suggest I added the extra property to the button with the .dtd file path?
21:12waglemconley: does database queries on bookmark tags: https://github.com/wagle/tagspace-archive
21:12MattNI guess you can't use element.dataset since you're in a XUL document :(
21:13manotejmekamattn:^ https://www.irccloud.com/pastebin/FHu5TNYA/
21:13MattNEither one attribute with a delimiter between strings (if needed) or an attribute per string
21:13wagleI've been ill for months, a bit better now, and have the energy to port it.. hence waking up at this late hour
21:13MattNmanotejmeka: oh, for that
21:15MattNmanotejmeka: The more manual way is to hard-code the .dtd files in an attribute on the button that calls showConnections
21:15manotejmekamattn: Ya. For subdialogues the js in preferences in connected to .xul files then I need to hut down the xul files to get there .dtd and .properties manually which I am not able to easily find. Is there was to get that programatically?
21:15mconleywagle: I see. Accessing the bookmarks should be pretty straight forward. A quick glance at the code suggests that a nsITree is being constructed and visualized, and that's what getCellProperties is being used for
21:15mconleywagle: so you'll probably need a new way of visualizing
21:16MattNmanotejmeka: More involved would be to also fetch the .xul files and find the .dtds that are referenced
21:16mconleywagle: perhaps using something like: https://github.com/chenglou/react-treeview in some web content?
21:16mconleyor in an iframe in a panel
21:16MattNmanotejmeka: and just hard-code the .xul URL in an attribute
21:16wagleI figure I do the whole thing over as a webextension, but I first gotta comprehend the current source to know what to (ahem) "steal"
21:16MattNmanotejmeka: For simple cases where gSubDialog.open doesn't pass any non-primitive static arguments it may be nice have to have a declarative way in the markup to register a subdialog
21:17wagleok
21:17MattNmanotejmeka: e.g. <button subdialog-url=&quot;chrome://browser/content/preferences/connection.xul&quot;></button>
21:17manotejmekaLet me know if you want me to copy past the code again. But earlier in this chat I pasted a code for function fetchFile. Should I just use that same promise to fetch for the .dtd file in the file parse for it and then use that to fetchFile again for the .dtd files content?
21:18MattNdid you mean .xul for the first .dtd ^?
21:18manotejmeka.xul my mistake sorry
21:20waglemconley: did you mean &quot;nslTree&quot;? I gt nothing by googling
21:20wagleget
21:21MattNmanotejmeka: Yes I think you can use a similar idea if you want to have the extra steps of fetching .xul then .dtds
21:22MattNI&#39;m hoping you don&#39;t also need to use regexes for finding the .dtds but `document.doctype` doesn&#39;t seem to work for me on colors.xul
21:22MattNit returns null
21:23mconleywagle: sorry, I was being a bit imprecise. This is what the add-on is currently using: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/tree
21:23manotejmekaMattN: Should I use this &quot;document.getElementsByTagName(buttonsID).setAttribute(&quot;subdialog-url&quot;, url);&quot; to add in a new attribute to button elements.
21:23mconleywagle: this is a &quot;XUL tree&quot;, and WebExtensions don&#39;t have those (which is good, because slowly but surely we&#39;re pulling them out of the code).
21:23MattNmanotejmeka: you would want getElementById there
21:24MattNbut yeah, something like that
21:24mconleywagle: you&#39;ll likely need to use something else besides a XUL tree to display the bookmark information.
21:24wagleyeah
21:24manotejmekaMattN: Yes okay thanks you
21:25waglemconley: ok, I&#39;ll study it for a while now... thanks!
21:25mconleynp
21:26waglemconley: oh.. why is tree being removed?
21:26wagle(with no replacement? xhtml?)
21:27waglei dont know yet what my target technology is
21:27mconleywagle: how it&#39;s currently drawn is hard-coded into our graphics and layout layer, I believe. As we replace most of that stuff with Servo stuff, a lot of old-school XUL stuff is not going to come with it (because XUL is not really under active development anymore).
21:27wagleso I&#39;m a bit befuddled still
21:27mconleywagle: yes, for maximal forward compatibility, I highly recommend using HTML.
21:27mconleyin fact, as a WebExtension, I believe that&#39;s your only choice
21:28mconleyin terms of mark-up
21:28wagleyeah
21:30wagleI was thinking to get this old extension to (1) work right as is, (2) whittle it down to the bare essentials, and (3) now that I understand it, port to webextensions.. is that a reasonable plan?
21:31wagle.. or did too many things already break?
21:31wagleyour wild assed guess is beter than mine at the moment
21:34waglewow.. i ported resizing the bookmark editor extension, and this code makes much more sense now
21:34mconleywagle: honestly, a ground-up re-write as a WebExtension might be the better option, depending on what this add-on does and how it does it - though the folks in #webextensions are probably better equipped to answer the question.
21:35mconleywagle: there are office hours in #webextensions for people porting add-ons, btw
21:35mconleywagle: https://blog.mozilla.org/addons/2017/03/09/office-hours-support-transitioning-porting-webextensions/
21:35mconleythey can probably give better tips than I can.
21:35mconleyand with greater authority. :)
21:35waglemconley: fair enough.. i saw that
21:36waglemconley: you seem to know something though.. but sorry to linger on, thanks again
21:36mconley:) No problem.
21:47sfostermconley: do you know where I will find how the bookmarking animation is implemented? The blue star that bounces over to the library icon in the toolbar when you bookmark a page?
21:47mconleysfoster: yeah, let me find it. Sec...
21:49mconleysfoster: so bug 931343 is what originally added it...
21:49firebothttps://bugzil.la/931343 FIXED, dhenein@mozilla.com Australis - Implement bookmarking animation
21:49sfosterah, maybe this is it https://dxr.mozilla.org/mozilla-central/search?q=animation-bookmarkAdded&=mozilla-central
21:49sfostermconley: ah excellent
21:50mconleysfoster: here we go: http://searchfox.org/mozilla-central/search?q=BOOKMARK%20STAR%20ANIMATION&path=
21:52sfosterok, so that is pretty much what I would have guess.
22:16Mossopmconley: Are we ever going to support putting a tab in its own private process? Irccloud is dragging half my tabs down with it
22:16mconleyMossop: I think the Quantum DOM folks are trying to figure out how to best do that kind of distribution
22:57manotejmekaMattn: Hey I build a Regex in order to find the .dtd and .properties file. The expression I wrote right now is &quot;value.match(/[\S]+(?:\.dtd|\.properties?)[\S]+/gi);&quot; This expression returns me &quot; Array [ &quot;\&quot;chrome://browser/locale/preferences/connection.dtd\&quot;>&quot;, &quot;src=\&quot;chrome://browser/locale/preferences/preferences.properties\&quot;/>&quot; ]&quot;. I am not too good with
22:57manotejmekaRegex expressions. Can you tell me how I can improve me expression to start to select from the letter c and just give me &quot;chrome://browser/locale/preferences/connection.dtd&quot; with out the quotations (&quot;)
22:58manotejmekamconley:^
23:42MattNmanotejmeka: sorry, didn&#39;t see the mention
23:44manotejmekaMatta: np any clue on how I can fix that expression?
23:44MattNmanotejmeka: you might just want to look for URIs that start with chrome://browser/locale/preferences/ since other ones may contain string not related to the specific dialog
23:46MattNmanotejmeka: something like .match(/chrome:\/\/browser\/locale\/preferences\/\S+\.dtd/)
23:47MattNto also include .properties: .match(/chrome:\/\/browser\/locale\/preferences\/\S+\.(dtd|properties)/)
23:48MattN.match(/chrome:\/\/browser\/locale\/preferences\/\S+\.dtd/gi) to find more than one match case-insensitive (like you had)
18 Mar 2017
No messages
   
Last message: 69 days and 19 hours ago