Very High Activity
I Use This!


Analyzed 5 days ago. based on code collected 5 days ago.
Posted 1 day ago by mkohler
With “RepsNext” we increased alignment between the Reps program and the Participation team. The main outcome is setting quarterly Objectives and Key Results together. This enables all Reps to see which contributions have a direct link to the ... [More] Participation team . Of course, Reps are welcome to keep doing amazing work in other areas. Objective 1 Reps are fired up about the Activate campaign and lead their local community to success through supporting that campaign with the help of the Review Team KR1 80+ core mozillians coached by new mentors contribute to at least one focus activity. KR2 75+ Reps get involved in the Activity Campaign, participating in at least one activity and/or mobilizing others. KR3 The Review Team is working effectively by decreasing the budget review time by 30%   Objective 2 New Reps coaches and regional coaches bring leadership within the Reps program to a new level and increase the trust of local communities towards the Reps program KR1 40 mentors and new mentors took coaching training and start at least 2 coaching relationships. KR2 40% of the communities we act on report better shape/effectiveness thanks to the regional coaches KR3 At least 25% of the communities Regional Coaches work with report feeling represented by the Reps program Which of the above objectives are you most interested in? What key result would you like to hear more about? What do you find intriguing? Which thoughts cross your mind upon reading this? Let’s keep the conversation going! Please provide your comments in Discourse. [Less]
Posted 2 days ago by (ClassicHasClass)
TenFourFox 45.3 beta 2 is now available (downloads, hashes, release notes). The issue with video frame skipping gone awry seems to be due to Mozilla's MediaSource implementation, which is (charitably) somewhat incomplete on 45 and not well-tested on ... [More] systems of our, uh, vintage. Because audio is easier to decode than video the audio decoder thread will already have a speed advantage, but in addition the video decoder thread appears to only adjust itself for the time spent in decoding, not the time spent pushing the frames to the compositor or blitting them to the screen (which are also fairly costly in our software-rendered world). A frame that's simple to decode but requires a lot of painting will cause the video thread to get further and further behind queueing frames that the compositor can't keep up with. Even if you keep skipping keyframes, you'll end up more than one keyframe behind and you'll never catch up, and when this occurs the threads irrevocably go out of sync. The point at which this happens for many videos is almost deterministic and correlates well with time spent in compositing and drawing; you can invariably trigger it by putting the video into full screen mode which dramatically increases the effort required to paint frames. In a few cases the system would just give up and refuse to play further (hitting an assertion in debug mode). After a few days of screaming and angry hacking (backporting some future bug fixes, new code for dumping frames that can never be rendered, throwing out the entire queue if we get so far behind we'll never reasonably catch up) I finally got the G5 to be able to hold its own in Reduced Performance but it's just too far beyond the G4 systems to do so. That's a shame since when it does work it appears to work pretty well. Nevertheless, for release I've decided to turn MediaSource off entirely and it now renders mostly using the same pipeline as 38 (fortunately, the other improvements to pixel pushing do make this quicker than 38 was; my iBook G4/1.33 now maintains a decent frame rate for most standard definition videos in Automatic Performance mode). If the feature becomes necessary in the future I'm afraid it will only be a reasonable option for G5 machines in its current state, but at least right now disabling MediaSource is functional and sufficient for the time being to get video support back to where it was. The issue with the Amazon Music player is not related to or fixed by this change, however. I'm thinking that I'll have to redo our minimp3 support as a platform MP3 decoder so that we use more of Mozilla's internal media machinery; that refactoring is not likely to occur by release, so we'll ship with the old decoder that works most other places and deal with it in a future update. I don't consider this a showstopper unless it's affecting other sites. Other changes in 45.3 beta 2 are some additional performance improvements. Most of these are trivial (including some minor changes to branching and proper use of single-precision math in the JIT), but two are of note, one backport that reduces the amount of allocation with scrolling and improves overall scrolling performance as a result, and another one I backported that reduces the amount of scanning required for garbage collection (by making garbage collection only run in the "dirty" zones after cycle collection instead of effectively globally). You'll notice that RAM use is a bit higher at any given moment, but it does go back down, and the browser has many fewer random pauses now because much less work needs to be done. Additionally in this beta unsigned extensions should work again and the update source is now set to the XML for 45. One final issue I want to repair before launch is largely server-side, hooking up the TenFourFox help button redirector to use Mozilla's knowledge base articles where appropriate instead of simply redirecting to our admittedly very sparse set of help documents on Tenderapp. This work item won't need a browser update; it will "just work" when I finish the code on Floodgap's server. At this point barring some other major crisis I consider the browser shippable as 45.4 on time on 13 September, with Amazon Music being the highest priority issue to fix, and then we can start talking about what features we will add while we remain on feature parity. There will also be a subsequent point release of TenFourFoxBox to update foxboxes for new features in 45; stay tuned for that. Meanwhile, we could sure use your help on a couple other things: Right now, our localized languages for the 45 launch are German, Spanish, French and Japanese, with an Italian translation in progress. We can launch with that, but we're losing a few languages there we had with 38. You can help. Even minor releases of the browser get a small bump in support tickets on Tenderapp; a major release (such as 31 to 38, and now 38 to 45) generally brings lots of things out of the woodwork that we've never seen during the beta cycle. Most of these reports are spurious, but sometimes serious bugs have been uncovered even though they looked obviously bogus at first glance, and all of them need to be triaged regardless. If you're a reasonably adept user and you've got a decent understanding of how the browser works, help us help your fellow users by being a volunteer on Tenderapp. There's no minimum time commitment required; any help you can offer is appreciated, even if just temporary. Right now it's just Chris Trusch and me trying to field these reports, which is unsatisfactory to cover all of them (Theo used to but we haven't seen him in awhile). If you'd like to help, post in the comments and we'll make you a "blue name" on Tenderapp too. That's it for now. See what you think. [Less]
Posted 2 days ago by Air Mozilla
Outreachy program participants from the summer 2016 cohort present their contributions and learnings. Mozilla has hosted 15 Outreachy participants this summer, working on technical projects...
Posted 2 days ago by Chris Heilmann
A few days ago I got an email about an old project of mine that uses YQL to turn a CSV into a “web services” interface. The person asking me for help was a Karaoke DJ who wanted to turn his available songs into a search interface. Maintenance of the ... [More] dataset happens in Excel, so all that was needed was a way to display it on a laptop. The person had a need and wanted a simple solution. He was OK with doing some HTML and CSS, but felt pretty lost at anything database related or server side. Yes, the best solution for that would be a relational DB, as it would also speed up searches a lot. As I don’t know for how much longer YQL is reliably usable, I thought I use this opportunity to turn this into an offline app using ServiceWorker and do the whole work in client side JavaScript. Enter SongSearch – with source available on GitHub. Here’s how I built it: The first step was to parse a CSV into an array in JavaScript. This has been discussed many a time and I found this solution on StackOverflow to be adequate to my uses. I started by loading the file in and covering the interface with a loading message. This is not pretty, and had I had my own way and more time I’d probably look into streams instead. I load the CSV with AJAX and parse it. From there on it is memory for me to play with. One thing that was fun to find out was how to get the currently selected radio button in a group. This used to be a loop. Nowadays it is totally fine to use document.querySelector(‘input[type=”radio”][name=”what”]:checked’).value where the name is the name of your radio group :) One thing I found is that searching can be slow – especially when you enter just one character and the whole dataset gets returned. Therefore I wanted to show a searching message. This is not possible when you do it in the main thread as it is blocked during computation. The solution was to use a WebWorker. You show the searching message before starting the worker, and hide it once it messaged back. One interesting bit I did was to include the WebWorker code also as a resource in the page, to avoid me having to repeat the songsearch method. The final part was to add a ServiceWorker to make it work offline and cache all the resources. The latter could even be done using AppCache, but this may soon be deprecated. As you can see the first load gets the whole batch, but subsequent reloads of the app are almost immediate as all the data is cached by the ServiceWorker. It’s not rocket science, it is not pretty, but it does the job and I made someone very happy. Take a look, maybe there is something in there that inspires you, too. I’m especially “proud” of the logo, which wasn’t at all done in Keynote :) [Less]
Posted 2 days ago by Christoph Kerschbaumer
Scanning the content of a file allows web browsers to detect the format of a file regardless of the specified Content-Type by the web server. For example, if Firefox requests script from a web server and that web server sends that script using a ... [More] Content-Type of “image/jpg” Firefox will successfully detect the actual format and will execute the script. This technique, colloquially known as “MIME sniffing”, compensates for incorrect, or even complete absence of metadata browsers need to interpret the contents of a page resource. Firefox uses contextual clues (the HTML element that triggered the fetch) or also inspects the initial bytes of media type loads to determine the correct content type. While MIME sniffing increases the web experience for the majority of users, it also opens up an attack vector known as MIME confusion attack. Consider a web application which allows users to upload image files but does not verify that the user actually uploaded a valid image, e.g., the web application just checks for a valid file extension. This lack of verification allows an attacker to craft and upload an image which contains scripting content. The browser then renders the content as HTML opening the possibility for a Cross-Site Scripting attack (XSS). Even worse, some files can even be polyglots, which means their content satisfies two content types. E.g., a GIF can be crafted in a way to be valid image and also valid JavaScript and the correct interpretation of the file solely depends on the context. Starting with Firefox 50, Firefox will reject stylesheets, images or scripts if their MIME type does not match the context in which the file is loaded if the server sends the response header “X-Content-Type-Options: nosniff” (view specification). More precisely, if the Content-Type of a file does not match the context (see detailed list of accepted Content-Types for each format underneath) Firefox will block the file, hence prevent such MIME confusion attacks and will display the following message in the console: Valid Content-Types for Stylesheets: – “text/css” Valid Content-Types for images: – have to start with “image/” Valid Content-Types for Scripts: – “application/javascript” – “application/x-javascript” – “application/ecmascript” – “application/json” – “text/ecmascript” – “text/javascript” – “text/json” [Less]
Posted 3 days ago by (K Lars Lohn)
0039 Firefox V2 - this is a remake of a maze that I originally drew on a flight from Oregon to the Mozilla All Hands meeting in Orlando, Florida in 2015.  I wanted to redo it as the original was numbered 0003 and my skills had advanced so far that I ... [More] felt I needed to revisit this subject.  Because it is a corporate logo, this maze is not for sale in the same manner as my other mazes.  I've not worked out a plan on how to distribute this maze with the company.  The complete image posted here is only 1/4 of the full resolution of the original from which I make prints.  In full resolution it prints spectacularly well at 24" x 24". [Less]
Posted 3 days ago by Michał
Hello, SUMO Nation! Another hot week behind us, and you kept us going – thank you for that! Here is a portion of the latest and greatest news from the world of SUMO – your world :-) Welcome, new contributors! saurabh sharma NcK985 Arif Fahmi Fisal ... [More] If you just joined us, don’t hesitate – come over and say “hi” in the forums! Contributors of the week The forum supporters who tirelessly helped users out for the last week. The writers of all languages who worked tirelessly on the KB for the last week. All the Social Superheroes – thank you! We salute you! Don’t forget that if you are new to SUMO and someone helped you get started in a nice way you can nominate them for the Buddy of the Month! Most recent SUMO Community meeting You can read the notes here and see the video at AirMozilla. The next SUMO Community meeting… …is happening on the 31st of August! If you want to add a discussion topic to the upcoming meeting agenda: Start a thread in the Community Forums, so that everyone in the community can see what will be discussed and voice their opinion here before Wednesday (this will make it easier to have an efficient meeting). Please do so as soon as you can before the meeting, so that people have time to read, think, and reply (and also add it to the agenda). If you can, please attend the meeting in person (or via IRC), so we can follow up on your discussion topic during the meeting with your feedback. Community PLATFORM REMINDER! The Platform Meetings are BACK! If you missed the previous ones, here is the etherpad, with links to the recordings on AirMo. (here’s the channel you can subscribe to). We are working on making sure we recognize your “legacy” contributions after the migration – please take a look here. MIGRATION REMINDER: Please take a look at this migration document and use this migration thread to put questions/comments about it for everyone to share and discuss. As much as possible, please try to keep the migration discussion and questions limited to those two places – we don’t want to chase ten different threads in eight different places ;-). Thanks to Lan and John99 for their questions – we have answered them during the last meeting (check the etherpad for notes and the meeting video for the whole thing) The Release Report for Firefox 48 will be shared during the upcoming Monday Project Meeting. Ongoing reminder #1: if you think you can benefit from getting a second-hand device to help you with contributing to SUMO, you know where to find us. Ongoing reminder #2: we are looking for more contributors to our blog. Do you write on the web about open source, communities, SUMO, Mozilla… and more? Do let us know! Ongoing reminder #3: want to know what’s going on with the Admins? Check this thread in the forum. Social Please vote for the social panel at the SXSW conference & festival – you can do so here until the 1st of September. Come and sign up for Sprinklr (send an email to We need your help! Use the step-by-step guide here. Take a look at some useful videos: Getting started & replying to users Replying to users (continued) Support Forum All quiet, keep up the awesome work, people :-) Knowledge Base & L10n We are 3 weeks before next release / 3 weeks after current release. What does that mean? Joni finishes working on next release content by end of this week; no work for localizers for the next release yet.  All existing content is open for editing and localization as usual; please focus on localizing the most recent / popular content. Reminder: we are following the process/schedule outlined here IMPORTANT! Pontoon / user interface update: please do not work on UI strings in Pontoon as we are moving to Lithium – work on localizing articles instead. 400 KB articles are live and updated for Polish! Huge thanks to TyDraniu for hitting that milestone – dziękujemy! Need to know what your milestone is? Check the spreadsheet! We’re working on refreshing the community guidelines for the migration, and Localization is no different… Take a look here and let Michał know if you have any comments. Reminder: Joni has put forward a proposal to update categories for Firefox – read it and tell her what you think! Do not forget about the High Priority List for KB articles to be localized! Firefox for Android Version 49 will offer offline caching for some web pages. Take a bit of the net with you outside of the network’s range! for Desktop Version 48.0.2 (for Windows only) includes a second attempt to fix startup crashes caused by Websense Version 49 will offer the option to have pages in your Reading List read aloud to you by your computer – what a time to be alive :-) for iOS Nothing new to report about iOS for now… Stay tuned for news in the future! … and we’re done! We hope you have a great week(end) and that you come back soon to keep rocking the helpful web with us! P.S. Just in case you missed it, here’s a great read about the way we want you to make Mozilla look better in the future. [Less]
Posted 3 days ago by Matěj Cepl
I am trying to write a tool in Python (using Python 3.4 to be able to use the latest Python standard library on Windows without using any external libraries on Windows) for some manipulation with the source code for the Bible texts. Let me first ... [More] explain what is the milestoned XML, because many normal Python programmers dealing with normal XML documents may not be familiar with it. There is a problem with using XML markup for documents with complicated structure. One rather complete article on this topic is DeRose (2016). Briefly [1] , the problem in many areas (especially in documents processing) is with multiple possible hierarchies overlapping each other (e.g., in Bibles there are divisions of text which are going across verse and chapters boundaries and sometimes terminating in the middle of verse, many especially English Bibles marks Jesus’ sayings with a special element, and of course this can go over several verses etc.). One of the ways how to overcome obvious problem that XML doesn't allow overlapping elements is to use milestones. So for example the book of Bible could be divided not like text ... ... but just putting milestones in the text, i.e.: n="1" /> sID="ID1.1" />text of verse 1.1 eID="ID1.1" /> .... So, in my case the part of the document may look like text text textB textB textC textC textD textD And I would like to get from some kind of iterator this series of outputs: [(1, 1, "text text", ['text text']), (1, 2, "textB textB textC textC", ['', 'textB textB', '', 'textC textC']), (1, 3, "textD textD", ['', 'textD textD', ''])] (the first two numbers should be number of the chapter and verse respectively). My first attempt was in its core this iterator: def __iter__(self) -> Tuple[int, int, str]: """ iterate through the first level elements NOTE: this iterator assumes only all milestoned elements on the first level of depth. If this assumption fails, it might be necessary to rewrite this function (or perhaps ``text`` method) to be recursive. """ collected = None for child in self.root: if child.tag in ['titulek']: continue if child.tag in ['kap', 'vers']: if collected and collected.strip(): yield self.cur_chapter, self.cur_verse, \ self._list_to_clean_text(collected) if child.tag == 'kap': self.cur_chapter = int(child.get('n')) elif child.tag == 'vers': self.cur_verse = int(child.get('n')) collected = child.tail or '' else: if collected is not None: if child.text is not None: collected += child.text for sub_child in child: collected += self._recursive_get_text(sub_child) if child.tail is not None: collected += child.tail (self.root is a product of ElementTree.parse(file_name).getroot()). The problem of this code lies in the note. When the element is inside of one, it is ignored. So, obviously we have to make our iterator recursive. My first idea was to make this script parsing and regenerating XML: #!/usr/bin/env python3 from xml.etree import ElementTree as ET from typing import List def start_element(elem: ET.Element) -> str: outx = ['.format(elem.tag)] for attr, attval in elem.items(): outx.append('{}={} '.format(attr, attval)) outx.append('>') return ''.join(outx) def recursive_parse(elem: ET.Element) -> List[str]: col_xml = [] col_txt = '' cur_chapter = chap if elem.text is None: col_xml.append(ET.tostring(elem)) if elem.tail is not None: col_txt += elem.tail else: col_xml.extend([start_element(elem), elem.text]) col_txt += elem.text for subch in elem: subch_xml, subch_text = recursive_parse(subch) col_xml.extend(subch_xml) col_txt += subch_text col_xml.append('{}>'.format(elem.tag)) if elem.tail is not None: col_xml.append(elem.tail) col_txt += elem.tail return col_xml, col_txt if __name__ == '__main__': # write result XML to CRLF-delimited file with # ET.tostring(ET.fromstringlist(result), encoding='utf8') # or encoding='unicode'? Better for testing? xml_file = ET.parse('tests/data/Mat-old.xml') collected_XML, collected_TEXT = recursive_parse(xml_file.getroot()) with open('test.xml', 'w', encoding='utf8', newline='\r\n') as outf: print(ET.tostring(ET.fromstringlist(collected_XML), encoding='unicode'), file=outf) with open('test.txt', 'w', encoding='utf8', newline='\r\n') as outf: print(collected_TEXT, file=outf) This works correctly in sense that the generated file test.xml is identical to the original XML file (after reformatting both files with tidy -i -xml -utf8). However, it is not iterator, so I would like to somehow combine the virtues of both snippets of code into one. Obviously, the problem is that return in my ideal code should serve two purposes. Once it should actually yield nicely formatted result from the iterator, second time it should just provide content of the inner elements (or not, if the inner element contains element). If my ideal world I would like to get recursive_parse() to function as an iterator capable of something like this: if __name__ == '__main__': xml_file = ET.parse('tests/data/Mat-old.xml') parser = ET.XMLParser(target=ET.TreeBuilder()) with open('test.txt', 'w', newline='\r\n') as out_txt, \ open('test.xml', 'w', newline='\r\n') as out_xml: for ch, v, verse_txt, verse_xml in recursive_parse(xml_file): print(verse_txt, file=out_txt) # or directly parser.feed(verse_xml) # if verse_xml is not a list parser.feed(''.join(verse_xml)) print(ET.tostring(parser.close(), encoding='unicode'), file=out_xml) So, my first attempt to rewrite the iterator (so far without the XML part I have): def __iter__(self) -> Tuple[CollectedInfo, str]: """ iterate through the first level elements """ cur_chapter = 0 cur_verse = 0 collected_txt = '' # collected XML is NOT directly convertable into Element objects, # it should be treated more like a list of SAX-like events. # # xml.etree.ElementTree.fromstringlist(sequence, parser=None) # Parses an XML document from a sequence of string fragments. # sequence is a list or other sequence containing XML data fragments. # parser is an optional parser instance. If not given, the standard # XMLParser parser is used. Returns an Element instance. # # sequence = ["", "text"] # element = ET.fromstringlist(sequence) # self.assertEqual(ET.tostring(element), # b'text') # FIXME přidej i sběr XML útržků # collected_xml = None for child in self.root.iter(): if child.tag in ['titulek']: collected_txt += '\n{}\n'.format(child.text) collected_txt += child.tail or '' if child.tag in ['kap', 'vers']: if collected_txt and collected_txt.strip(): yield CollectedInfo(cur_chapter, cur_verse, re.sub(r'[\s\n]+', ' ', collected_txt, flags=re.DOTALL).strip()), \ child.tail or '' if child.tag == 'kap': cur_chapter = int(child.get('n')) elif child.tag == 'vers': cur_verse = int(child.get('n')) else: collected_txt += child.text or '' for sub_child in child: for sub_info, sub_tail in MilestonedElement(sub_child): if sub_info.verse == 0 or sub_info.chap == 0: collected_txt += sub_info.text + sub_tail else: # FIXME what happens if sub_element contains # multiple elements? yield CollectedInfo( sub_info.chap, sub_info.verse, collected_txt + sub_info.text), '' collected_txt = sub_tail collected_txt += child.tail or '' yield CollectedInfo(0, 0, collected_txt), '' Am I going the right way, or did I still not get it? [1] From the discussion of the topic on the XSL list. DeRose, Steven. 2016. “Proceedings of Extreme Markup Languages®.” Accessed August 25. [Less]
Posted 3 days ago by Air Mozilla
Weekly project updates from the Mozilla Connected Devices team.
Posted 3 days ago by Andy McKay
Firefox 50 landed in Developer Edition this week, so we have another update on WebExtensions for you!Please use the WebExtensions API for any new add-on development, and consider porting your existing add-ons as soon as possible. It’s also a great ... [More] time to port because WebExtensions is compatible with multiprocess Firefox, which began rolling out in Firefox 48 to people without add-ons installed. When Firefox 49 reaches the release channel in September, we will begin testing multiprocess Firefox with add-ons. The goal is to turn it on for everyone in January 2017 with the release of Firefox 51. If you need help porting to WebExtensions, please start with the compatibility checker, and check out these resources. Since the last release, more than 79 bugs were closed on WebExtensions alone. API Changes In Firefox 50, a few more history APIs landed: the getVisits function, and two events–onVisited and onVisitRemoved. Content scripts in WebExtensions now gain access to a few export helpers that existed in SDK add-ons: cloneInto, createObjectIn and exportFunction. The webNavigation API has gained event filtering. This allows users of the webNavigation API to filter events based on some criteria. Details on the URL Filtering option are available here. There’s been a change to debugging WebExtensions. If you go to about:debugging and click on debug you now get all the Firefox Developer Tools features that are available to you on a regular webpage. Why is this significant? Besides providing more developer features, this will work across add-on reloads and allows the debugging of more parts of WebExtensions. More importantly, it means that we are now using the same debugger that the rest of the Firefox Dev Tools team is using. Reducing duplicated code is a good thing. As mentioned in an earlier blog post, native messaging is now available. This allows you to communicate with other processes on the host’s operating system. It’s a commonly used API for password managers and security software, which need to communicate with external processes. Documentation The documentation for WebExtensions has been updated with some amazing resources over the last few months. This has included the addition of a few new areas: How-to pages describing how to intercept HTTP requests, modify a web page, and so on. Detailed instructions on porting, including porting a Chrome extension and porting a legacy Firefox add-on. There are also some detailed pages comparing WebExtensions to SDK or legacy add-ons. An excellent comparison of what browser implements which APIs, which includes data for Microsoft Edge, Google Chrome as well as Firefox and Firefox for Android. The documentation is hosted on MDN and updates or improvements to the documentation are always welcome. There are now 17 example WebExtensions on github. Recently added are history-deleter and cookie-bg-picker. What’s coming We are currently working on the proxy API. The intent is to ship a slightly different API than the one Chrome provides because we have access to better APIs in Firefox. The ability to write WebExtensions APIs in an add-on has now landed in Firefox 51 through the implementation of WebExtensions Experiments. This means that you don’t need to build and compile all of Firefox in order to add in new APIs and get involved in WebExtensions. The policy for this functionality is currently under discussion and we’ll have more details soon. There are also lots of other ways to get involved with WebExtensions, so please check them out! [Less]