mozilla

Mozilla Nederland Logo De Nederlandse Mozilla gemeenschap

Dave Townsend: Welcome to the new Toolkit peers – Paolo, Matt, Jared and Irving

Mozilla planet - di, 15/04/2014 - 22:38

Slightly belated in some cases but I’d like to formally welcome four new toolkit peers. Paolo Amadini, Matthew Noorenberghe, Jared Wein and Irving Reid have all shown themselves to be well capable of reviewing patches in any of the toolkit code. Paolo, Matt and Jared actually got added a few months ago but apparently I failed to make an announcement at the time. Irving was added just last week. Please congratulate them all and don’t go too hard on their review queues!

Also if you think there are others who should be peers of Toolkit (or current peers that are no longer relevant) then please let me know.

Categorieën: Mozilla-nl planet

Chris Cooper: If I had a million dollars

Mozilla planet - di, 15/04/2014 - 21:16

Kraft DinnerArmen has a blog post up about the cost savings Mozilla has been able to realize in its continuous integration infrastructure in Amazon over just the last 3 months. This has been a bit of a sea change for release engineering, who have historically been conservative with regards to changing core infrastructure and practices. We’re all coming to grips with the new world order, but I’m quite excited about the possibilities.

Some quick back-of-the-envelope calculations based on other recent numbers from Armen:

  • starting with a low-ball estimate of 7,000 pushes/month, if we project the rate of spending from December ($19/push) over an entire year, we end up with $1,596,000.
  • at the new rate ($6/push), a year of AWS time will cost only $504,000.
  • that’s a yearly savings of $1,092,000.

If history has taught us anything, continued growth will eat in to at least part of that savings, but think of what Mozilla could do with an extra million dollars. Depending on where we hire them, that money could easily buy 5-10 more engineers to continue driving the mission forward.

Categorieën: Mozilla-nl planet

Rick Eyre: Getting the number of lines of text in an Element

Mozilla planet - di, 15/04/2014 - 20:44

One of the biggest problems I faced when developing vtt.js is that a lot of the layout algorithm depends on being able to know the line height of the subtitle text. This boils down to being able to know the line height of the div within which the subtitle text sits. A lot of the time this is easy to get:

var lineHeight = div.style.lineHeight;

But, what if you haven't set a line height? Then you would need to get the computed value of the line height:

var lineHeight = window.getComputedStyle(null, div).getPropertyValue("lineHeight");

This works... some of the time. On some browsers if you try to get the computed value of the line height and you haven't explicitly set a line height, the computed property will return back as the value normal. That's helpful...

After much searching I found out that you if you use getClientRects on an inline element it will return you a TextRectangle box for each line of text in the inline element. At that point you can either assume that each line has the same height and get just use the height property of the first TextRectangle or to get a somewhat more accurate number you can take the height of the inline element and divide it by the number of TextRectangles you have.

var inlineElement = document.getElementById("myInlineElement"), textRectangles = inlineElement.getClientRects(), container = inlineElement.getBoundingClientRect(), lineHeight = container.height / textRectangles.length; alert("The average line height is: " + lineHeight);

This works really well for the amount of actual code you need to write. I've read about more accurate methods, but they take some serious coding. Like walking through each character in the text and tracking when overflow happens serious.

Now back to my original question which was how to get the number of lines of text in a div (block level) element. The way I did this was to wrap my div which has my content in another div, and set the inner div's display property to inline. Then you can calculate the line height/number of lines of text of the inner div since it has inline display. This way you retain your contents block level layout while being able to figure out how many lines of text it is.

This is it all put together:

<div> <div id="content" style="display:inline;"> This is all my content in here. I wonder how many lines it is? </div> </div> var inlineElement = document.getElementById("content"), textRectangles = inlineElement.getClientRects(), container = inlineElement.getBoundingClientRect(), lineHeight = container.height / textRectangles.length; alert("The average line height is: " + lineHeight);
Categorieën: Mozilla-nl planet

Seif Lotfy: Ich bin ein Xamarin(er) ♥

Mozilla planet - di, 15/04/2014 - 20:30

My new home office

As of the beginning of the April I am a Xamarin (that is what Xamarin employees call themselves).

At Xummit I met the rest of the Xamarins and I had an incredible time there (dare I say magical ♥).
I met old friends like Rodrigo Moya, Jason Smith, David Siegel, Cody Russell, Neil Patel, Connor Curran, Gord Allot and others, but also made new friends:

  • Zack Gramana: The right amount of crazy and creative. He is helping me with my new pet project.
  • Seth Rosetter: SF chilled out hacker with an ear for techno and extreme positive attitude, a delight to hang out with.
  • Mike Krüger: One of the friendliest people I got to meet and know with exactly my kind of humour.
  • Victoria Grothey: Incredibly nice person with lots of energy and always smiling.
  • Marek Safar: The most passionate beer expert I know I guess. Also rumour has it that either I am stalking him or he is stalking me.
  • Václav Vančura: An awesome designer who motivated me to start drawing again. Thanks for that. And many many more.

One thing I believe in, is that interpersonal relationships between co-workers is a must for a community or a company to be productive and successful. Xamarin promoted (and still promotes) this positive habit, achieved it and even more. The upbeat attitude and enthusiasm at Xamarin is infectious. Combined with the diversity in culture as well as stuff/tasks to do brings the best out of Xamarins. I will not forget the bus ride to the venue. 8 people with 7 different nationalities, but all happy and psyched about what they are doing and what others are doing ♥.

Since I joined Xamarin I started doing more Mono in my free time too. Currently I am porting

Synapse to Mac (since I loved the interface and some of the functionalities I couldn’t find in Alfred and Quicksilver). Here is a small very early sneak peak :)

Synapse for Mac in the making

I am loving Xamarin and all its stands for and brings to the table.

P.S: Hylke Bons has a fan base here at Xamarin :)

Categorieën: Mozilla-nl planet

Jeff Walden: In which I demonstrate Supreme Court fitness in property law comparable to that of Justice Breyer

Mozilla planet - di, 15/04/2014 - 19:17

I said previously that I had two law posts to make. Here’s the non-Mozilla-related post.

Introduction

I’ve blogged about visiting the Supreme Court for oral arguments before. I had the opportunity to do so again for the extremely interesting week of January 13 earlier this year. I attended oral arguments concerning the Appointments Clause, assembly restrictions in Massachusetts, bankruptcy shenanigans, and railroad property law. A month ago, the first decision, in the property law case, Marvin M. Brandt Revocable Trust v. United States, was announced. I’m going to blog about it a little, because I think it’s cool and because of its impact on rail trails.

Before I do that, I’d like to note that the Marvin M. Brandt Revocable Trust v. United States article on Wikipedia is entirely my work (and my mistakes :-) ). (At present. Release the vandals in 3, 2, 1….) It’s the first article I’ve written start to finish. I’m more than a bit proud of that. And I’m particularly excited to have done it in such a cool area of law. :-)

Background

Back in the 1800s as the United States expanded toward the Pacific Ocean, it needed to be able to efficiently transport goods and people across that distance. At the time, the solution was railroads. So Congress passed acts incenting railroad creation by granting rights of way across federal land. After initially granting rights of way to specific, named railroads in separate bills, Congress streamlined the process in the General Railroad Right-of-Way Act of 1875. Under this act, any railroad meeting certain conditions could get a right of way, til those provisions’ repeal in 1976.

The facts

Fast-foward to (coincidentally) 1976. The United States granted a land patent (that is, a document making clear — “patent” — title to land) to Melvin Brandt for 83 acres in Wyoming, as part of a land swap. One limitation on the grant was that it was subject to a railroad right-of-way originally granted to the Laramie Hahn’s Peak & Pacific Railway Company under the 1875 Act. The grant mentioned no other limitations on the right-of-way.

LHP&P never really worked as a railroad, and it passed through several hands. In 2004 the ultimate owners legally abandoned it. What happened to the right-of-way? This is where things got complicated.

The United States wanted the right-of-way land, so it filed suit to quiet title in its favor to clear up ownership. The United States resolved claims with everyone along the way — except for Marvin Brandt, Melvin’s son.

Brandt’s position

Brandt argued that the right of way was an easement. An easement is a restriction on your ownership of land, that says some other person can enter into and (perhaps) use it for some particular purpose. So your house’s land may have an easement across it for a sidewalk, that allows people to go on the sidewalk, walk through, and briefly stop on it, and you have to accept that. You still own the land; you just don’t quite have free rein over it. (This is why you’re usually responsible for clearing snow off your sidewalk. It’s your land, your fault if someone slips and twists an ankle and it was reasonably foreseeable.) When an easement terminates, the land is unburdened by the easement. No physical property changes hands, the easement just doesn’t exist, and the land owner can again prevent entry and use of his land.

Brandt buttressed this argument by pointing to Great Northern Railway Company v. United States. In this 1942 case, the Supreme Court decided whether Great Northern could drill for oil and gas on an 1875 Act right-of-way. The United States said no, it couldn’t — the right-of-way was in the nature of an easement, only an easement had been granted, all signs (language, legislative history, early interpretation, Congress’s construction of it in subsequent acts) said it was an easement. The 1942 Court agreed. Open and shut case for Brandt, right? Yes and no.

The United States’s position

The United States argued that 1875 Act rights of way were a “limited fee made on implied condition of reverter”. Let’s unpack this gibberish. “fee” is roughly “ownership”, and “reverter” refers to what happens to the property after some condition (here, abandonment) holds. The United States thought railroad rights of way were an unusual sort of easement. Easements don’t typically let you come in and tear things up, but it’s necessary for railroads to dig, bore, build up, lay track, and so on. So these “railroad easements” were a fee in those regards. And in regard to reversion after abandonment, ownership reverted to the United States.

In light of Great Northern, this may sound ridiculous. But the United States found language in earlier cases, and to an extent in Great Northern, saying that railroad easements had “attributes of the fee”. And two cases predating Great Northern had treated 1875 Act rights of way as limited fees. The problem was, in those cases the Supreme Court had conflated 1875 Act rights-of-way with rights-of-way under acts before 1871. In 1871, Congress changed policy from basically giving railroads land, to only letting them lay tracks on it. Congress wanted to encourage settlement, not just the arbitrary enrichment of railroads (who had become incredibly huge land owners in the West). The Court conflated the two because, in at least one of the cases, neither side had filed briefs, and the Court made a legal mistake.

The United States argued that Great Northern didn’t really say 1875 Act rights of way were easements.

Oral argument

Oral argument was pretty interesting. I read half a dozen briefs and the lower court opinion in the case, so I was moderately prepared to follow argument. In some ways I was almost on par with the justices. Justice Breyer candidly admitted to fumbling with his recollections of A. James Casner‘s property law class, about which he briefly rambled (as is his wont — he’s known for rambling :-) ).

Oral argument generally trended against the United States. Sparks flew when the United States attorney began argument. Justice Alito bluntly told him the United States should receive a “prize for understatement” for “acknowledg[ing in its brief] that there is language in [] Great Northern and in the government’s brief in that case that lends some support to [Brandt's] argument.” Alito recited the brief’s subject headings, all forcefully arguing that the right-of-way was an easement and only an easement.

The argument didn’t go much better from there on for the United States. Various justices wanted to know how much land would be affected by a judgment that these rights-of-way were easements — permitting takings claims for just compensation, especially when the land had already been taken by the United States. No answer was forthcoming, because the records had been taken so long ago and were so geographically distributed. Breyer in particular repeatedly asked if there were any other easement-but-not-always constructs in the common law of property.

Opinions

The Court announced an opinion on March 10, just under two months after oral argument. Fast turnarounds typically indicate uncomplicated cases, and this was such a case. The justices divided 8-1 for Brandt, uncritically adopting his position. Chief Justice Roberts wrote the opinion, which began with a half-dozen pages of history of the West and particularly of LHP&P. (Definitely give it a read if you like Western history.) Roberts emphasized that the United States lost because it had won in Great Northern and faulted it for its “stark change in position”. He also asserted that 1875 Act railroad rights of way must be analyzed as common law easements — not a strange amalgam as the United States had argued.

Justice Sotomayor dissented alone. She argued that Great Northern had decided only one aspect of the property interest in railroad rights of way, and it hadn’t decided how reversion should play out. She also thought that railroad rights of way shouldn’t be analyzed under the common law, because of the extent to which they went beyond what normal easements allowed.

In the end the United States was roundly rebuked and defeated. Sometimes 8-1 decisions are a matter of some recognized, fundamental disagreement; see for example many of Justice Thomas’s solo dissents. But when a decision goes this way, in a case barely implicating deep jurisprudential disputes, you have to second-guess yourself a bit when you’re on the losing side. It’s one thing to lose with others agreeing with you. But when no one else sees it as you do, perhaps you’re the one who’s wrong.

Why did the United States pursue the case to a resounding loss? This particular case arose a bit weirdly. It was pushed by various property-rights groups, at the start. And for where it was raised, in the Tenth Circuit, existing circuit precedent said Brandt’s argument would lose, which it did. Brandt appealed to the Supreme Court, citing the circuit split: a good way to get your case heard, but no guarantee. What possibly tipped the balance was that the United States, despite winning, agreed the Court should hear the case. Why?

It looks to me like the United States got greedy. It saw an opportunity to wipe out the other circuits’ bad precedents, and it blinded itself to the weakness of its argument.

Consequences

What happens to Brandt specifically? The case returns to the Tenth Circuit to respond to the decision, but it’s unclear to me what’s supposed to happen there. I’d think they’d just quiet title in Brandt and be done, but the Rails-to-Trails Conservancy says it’ll keep working in the Tenth Circuit to “narrow the ultimate impact of the Supreme Court’s ruling”. How they can work against a predetermined quiet title action, I don’t know. (It’s possible this is just a face-saving claim on their part.). And it’s possible the United States might just acquire the right of way using eminent domain. (Why not do that and avoid suit? Money, of course. If it owns the land, no just compensation to pay. If not, that’s money out of the government’s pocket.) So Brandt’s not quite out of the woods yet, pun probably intended.

But Brandt’s particular plight isn’t the important thing here. It’s all the other places where suddenly takings claims can go forward. No one knows how many of these there are. Statutes of limitations and estoppel will preclude many claims, but not all of them. It’s still an unresolved mess.

Lessons

This touches a deeper concern. The United States acted here because it wanted to create rail trails, converting useless railroad corridors into bike trails. I like bikes. I like bike trails. But the law authorizing rail trails was enacted with flagrant disregard for the actual ownership of railroads in disuse. The CBO estimated the law wouldn’t cost a penny, but it now could cost $500 million, maybe more after this decision. We should demand a higher standard of Congress in the laws it passes.

Categorieën: Mozilla-nl planet

Jeff Walden: Iterating a number sequence for lulz and jail time

Mozilla planet - di, 15/04/2014 - 18:17

Hello, readers! Today I bring you two posts about law: one Mozilla-related, one not. This is the Mozilla-related post. Mozillians may already know this background, but I’ll review for those who don’t.

The “hack”

In 2010 Goatse Security (don’t look them up) discovered a flaw in AT&T’s website. AT&T’s site detected accesses from iPads, extracted a unique account number sent by the iPad, then replied with a private account email address. Account numbers were guessable, so if someone “spoofed” their UA to look like the iPad browser, they could harvest private email addresses using their guesses.

The lulz Andrew Auernheimer ("weev") wearing an old-school AT&T baseball cap Andrew Auernheimer, i.e. weev, CC-BY-SA

The people who figured this out were classic Internet trolls interested (to a degree) in minor mayhem (“lulz”) because they could, and they scraped 114000+ email addresses. Eventually Andrew Auernheimer (known online as “weev”) sent the list to Gawker for an exclusive.

The sky is falling!

AT&T, Apple, the people whose addresses had been scraped, and/or the government panicked and freaked out. The government argued that Auernheimer violated the Computer Fraud and Abuse Act, “exceeding authorized access” by UA-spoofing and loading pages using guessed account numbers.

This is a broad interpretation of “authorized access”. Auernheimer evaded no security measures, only accessed public, non-login-protected pages using common techniques. Anyone who could guess the address could view those pages using common browser addons. People guess at the existence of web addresses all the time. This site’s addresses appear of the form “/year/month/day/post-title/”. The monthly archive links to the side on my site have the form “/year/month/”. It’s a good guess that changing these components does what you expect: no dastardly hacking skills required, just logical guesses and experimentation. And automation’s hardly nefarious.

So what’s Mozilla’s brief with this?

Developers UA-spoof all the time for a variety of innocuous reasons. Newspapers have UA-spoofed during online price discrimination investigations. If UA spoofing is a crime, many people not out for lulz are in trouble, subject to a federal attorney’s whims.

The same is true for constructing addresses by modifying embedded numbers. I’ve provided one example. Jesse once wrote a generic implementation of the technique. Wikipedia uses these tactics internally, for example in the Supreme Court infobox template to linkify docket numbers.

Mozilla thus signed onto an amicus brief in the case. The brief laid out the reasons why the actions the government considered criminal, were “commonplace, legitimate techniques”.

The cool part of the brief

I read the brief last summer through one of Auernheimer’s attorneys at the inestimable Volokh Conspiracy. I’ve been lightly meaning to blog about this discussion of number-changing ever since:

Changing the value of X in the AT&T webpage address is trivial to do. For example, to visit this Court’s homepage, one might type the address “http://www.ca3.uscourts.gov/” into the address bar of the browser window. The browser sends an HTTP request to the Court website, which will respond with this Court’s homepage. Changing the “3” to “4” by typing in the browser window address bar returns the Court of Appeals for the Fourth Circuit’s homepage. Changing the “3” to a “12” returns an error message.

Brief of amici curiae Mozilla Foundation, computer scientists, security and privacy experts in support of Defendant-Appellant and reversal

Illustrating the number-guessing technique (and implying its limitations in the “12″ part) via the circuit courts’ own websites? Brilliant.

Back to Auernheimer

The court recently threw out Auernheimer’s conviction. Not on CFAA grounds — on more esoteric matters of filing the case in the wrong court. But the opinion contains dicta implying that breaching a password gate or code-based barrier may be necessary to achieve a conviction. The government could bring the case in the right court, but with the implied warning here, it seems risky.

Sympathy

Auernheimer isn’t necessarily a sympathetic defendant. It’s arguably impolite and discourteous to publicly disclose a site vulnerability without giving the site notice and time to fix the issue. It may be “hard to feel sorry for them being handed federal criminal charges” as Ars Technica suggested.

But that doesn’t mean he committed a crime or shouldn’t be defended for doing things web developers often do. Justice means defending people who have broken no laws, when they are threatened with prosecution. It doesn’t mean failing to defend someone just because you don’t like his (legal) actions. Prosecution here was wrong.

One final note

I heard about the AT&T issue and the brief outside Mozilla. I’m unsure what Mozilla channel I should have followed, to observe or discuss the decision to sign onto this brief. Mozilla was right to sign on here. But our input processes for that decision could be better.

Categorieën: Mozilla-nl planet

Mozilla appoints former marketing head to interim CEO - Network World

Nieuws verzameld via Google - di, 15/04/2014 - 13:53

Mozilla appoints former marketing head to interim CEO
Network World
"Mozilla finds itself in the midst of an unexpected leadership transition," wrote Mozilla Executive Chairwoman Mitchell Baker in an online statement announcing Beard's appointment to the role. Beard has also been appointed to Mozilla's board of directors.

Google Nieuws
Categorieën: Mozilla-nl planet

Mozilla appoints new CEO after gay marriage controversy - Telegraph.co.uk

Nieuws verzameld via Google - di, 15/04/2014 - 12:47

Telegraph.co.uk

Mozilla appoints new CEO after gay marriage controversy
Telegraph.co.uk
The open source advocacy group and creator of the Firefox browser, Mozilla, has appointed former marketing man Chris Beard as interim chief executive after a newly-promoted boss was forced to resign over his controversial donation to an anti-gay ...
Mozilla names insider Chris Beard as interim CEOCNET
Mozilla names interim CEO in wake of Eich controversyWashington Business Journal (blog)
Mozilla's Chief Marketing Exec Is Modeling For Apple (Updated)TechCrunch
The Guardian -CNNMoney -Register
alle 109 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Interim CEO voor Mozilla - Emerce

Nieuws verzameld via Google - di, 15/04/2014 - 12:47

Emerce

Interim CEO voor Mozilla
Emerce
Eich, de bedenker van JavaScript en al jaren CTO van Mozilla, heeft in 2008 financiële steun verleend aan een wetsvoorstel dat het homohuwelijk in de Amerikaanse staat Californië gedurende zo'n vijf jaar tegenhield. Zijn donatie werd overigens pas in ...
Mozilla benoemt Chris Beard als interim-CEOTelecompaper

alle 8 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Mozilla names marketing exec Chris Beard as interim CEO after Brendan Eich ... - Digital Trends

Nieuws verzameld via Google - di, 15/04/2014 - 12:42

Digital Trends

Mozilla names marketing exec Chris Beard as interim CEO after Brendan Eich ...
Digital Trends
Mozilla, the firm that operates Firefox, one of the world's most popular Web browsers, announced today via an official blog post that they have named Chris Beard to the post of interim CEO of Mozilla. Beard will also become a member of Mozilla's Board ...

Google Nieuws
Categorieën: Mozilla-nl planet

Mozilla zet Chris Beard in als interim-CEO - Automatisering Gids

Nieuws verzameld via Google - di, 15/04/2014 - 12:05

Mozilla zet Chris Beard in als interim-CEO
Automatisering Gids
Beard werkte jarenlang bij Mozilla, onder meer als directeur marketing en directeur innovatie. Hji speelde een belangrijke rol in de ontwikkeling van Firefox voor Android en de mobiele versie. Beard was nog maar een paar maanden weg bij Mozilla, dat ...

Categorieën: Mozilla-nl planet

Mozilla vindt tussenpaus na Eich-debacle - Webwereld

Nieuws verzameld via Google - di, 15/04/2014 - 09:08

Mozilla vindt tussenpaus na Eich-debacle
Webwereld
Chris Beard moet gaan zorgen voor rust binnen de burelen van Mozilla. De Firefox-maker meldt dat Beard de juiste man voor het juiste moment is. Zeker is dat hij Mozilla goed kent. Beard was jarenlang actief als Chief Marketing Officer (CMO) voor de ...
Mozilla benoemt voormalig marketingtopman tot ceo ad interimtweakers.net
Mozilla benoemt Chris Beard als interim-CEOTelecompaper

alle 4 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Daniel Glazman: Welcome cbeard

Mozilla planet - di, 15/04/2014 - 09:02

Among Mozillians, there is a small (not too small, in fact..) group of people who were already here before 15-jul-2003. After that date, we saw old-time contributors rejoin Mozilla one by one, and new hires too, something we had forgotten about since the 2002 Netscape layoffs. Chris Beard was one of them, at the end of 2004 IIRC (time flies, holy cow, time flies...). If old-time Mozillians saw a necessary little shift in the local culture because of these new hires, it was clearly not the case with cbeard, who adapted so well to Mozilla we immediately used his IRC nick to mention him. Having a vision, dealing very well with the community, always open to discussion, leading new projects, highly respected, I'm glad he was appointed interim CEO. Welcome Chris!

Categorieën: Mozilla-nl planet

Rodrigo Silveira: Contributing to FirefoxOS Cordova initiative

Mozilla planet - di, 15/04/2014 - 09:00

After the project I was working on got cancelled, I started contributing to Firefox OS Cordova project. Cordova is an open source framework for writing multi-platform native mobile applications using web technology. Cordova provides you with javascript APIs and the plumbing necessary to access the device's internals, such as battery status, GPS and camera. Neat stuff. Each mobile operating system has its own platform implementation for doing the communication between cordova's javascript API and the native OS code.

This post will focus on how to get started writing the Firefox OS platform and plugins. To get a better understanding on how to use cordova to write a Firefox OS app, I highly recommend the mozilla hacks post on the subject.

Cordova is written in node.js, you just need to understand javascript to work on it. It took me much code digging and asking around to get started, but you won't have to!

The repositories

Cordova code is organized into multiple repositories. The main ones you need to be aware of for Firefox OS development are cordova-cli, cordova-firefoxos and cordova-plugin-*. Here is a brief description of them:

  • cordova-cli - is where the code for the command line tools is located. There is some platform specific code under src/metadata which are config parsers. Firefox OS uses it to get the initial version of the manifest with the correct app name and other values.
  • cordova-firefoxos - is the repository for the Firefox OS platform tools. The code here is responsible for handling Firefox OS cordova commands and for the initial skeletal app.
  • cordova-plugin-* - are repositories for plugins. A plugin repository contains code for each supported platform too.
Running it locally

To work on the platform, you need to run on the latest code from the repositories. It's super helpful to run cordova entirely from local files so that you can edit code and see the effects. With the multiple repository organization used by cordova, this can be tricky. Make sure you have git and node.js installed. A github account will be handy if you plan to send us your changes. The prompt samples below are using bash.

First lets get cordova-cli from mozilla-cordova github account and install the dependencies. From the directory you'd like to keep cordova code run:

$ git clone https://github.com/mozilla-cordova/cordova-cli.git $ cd cordova-cli $ npm install $ cd ..

The cordova binary is located at cordova-cli/bin/cordova. From now on this is the binary we'll use for all our cordova command line needs. You can add it to your PATH if you want, I'll use the relative path for clarity. Next let's clone Firefox OS platform bits from cordova-firefoxos repository:

$ git clone https://github.com/mozilla-cordova/cordova-firefoxos.git

No need to install dependencies for cordova-firefoxos, they're already part of the repository. Before creating an app, there's a little trick to tell cordova to use the local platform code we just downloaded. Create a file named firefoxos.json with the following contents:

{ "lib": { "firefoxos": { "uri": "/<FULL PATH TO>/cordova-firefoxos", "version": "dev", "id": "cordova-firefoxos-dev" } } }

Make sure to set the full path to cordova-firefoxos folder under uri. We can now create a new cordova app by running create. Let's create the app in myapp folder and give it the even more original project name of io.myapp and name it myapp. The fourth parameter to create is the json config file we just create as a string. To create the app run:

$ cordova-cli/bin/cordova create myapp io.myapp myapp "$(cat firefoxos.json)" $ cd myapp

Alternatively, to use a local copy of cordova-firefoxos platform code on a cordova app that already exists, you can create a json file with the same content as above under yourapp/.cordova/config.json. In fact, that fourth parameter created that file for you. Go check.

To add the platform, all you need to run is:

$ ../cordova-cli/bin/cordova platform add firefoxos

That's it. If you make any changes to cordova-firefoxos, remove and add the platform again to make sure you have the latest.

Adding a plugin

Working with local plugins is much simpler. Lets download the contacts plugin as an exemple:

$ cd .. $ git clone https://github.com/mozilla-cordova/cordova-plugin-contacts.git

Adding a local version is pretty simple, just add the path as parameter to plugin add command:

$ cd myapp $ ../cordova-cli/bin/cordova plugin add ../cordova-plugin-contacts

NOTE: if at this point you hit a ReferenceError: xml_helpers is not defined error, don't despair. It's a bug in cordova-plugman code, which is responsible for plugin management. We can fix it by getting the latest version of cordova-plugman, and making sure cordova-cli uses it too. Here's how:

$ cd .. $ git clone https://github.com/apache/cordova-plugman.git $ cd cordova-cli $ npm install ../cordova-plugman $ cd ../myapp $ ../cordova-cli/bin/cordova plugin add ../cordova-plugin-contacts

To see changes you made to plugin code you have to remove then add the plugin again. To remove the plugin you need to use the plugin name, not the path. Running ../cordova-cli/bin/cordova plugin ls will show you the names of installed plugins. For example, to remove the contacts plugin run ../cordova-cli/bin/cordova plugin remove org.apache.cordova.contacts.

That's it, you are now running the latest and greatest versions of it all!

Firefox OS plugin development: from javascript to javascript

Cordova provides you with a javascript API. They try to follow standards when possible. Firefox OS is built on web standards too. Sometimes they use the same API. How can a plugin developer access Firefox OS API when they clash?

Cordova provides us with a modulemapper library to access the original values of overwritten properties. Let's take a look at how the battery-status plugin uses modulemapper:

var mozBattery = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.battery');

The variable mozBattery now points to the original navigator.battery. The first parameter to getOriginalSymbol is the context, pretty much always window. The second is the value you want to get. To find out what value to use on the second parameter, check the <js-module> element in the plugin's plugin.xml configuration file. For the battery-status plugin it is:

<js-module src="www/battery.js" name="battery"> <clobbers target="navigator.battery" /> </js-module>

The <clobbers> element's target attribute has the value that was overwritten.

Contributing

If you got this far, you're ready to get started! Open up your favorite editor and hack on. If you want to help with Firefox OS support, check out our status site and the project's wiki.

While writing this post I got news that I'm joining the team. Super excited to improve cordova support for Firefox OS! If you want to chat with us, we hang out on #cordova channel on mozilla's irc server.

Categorieën: Mozilla-nl planet

Mozilla benoemt Chris Beard als interim-CEO - Telecompaper

Nieuws verzameld via Google - di, 15/04/2014 - 08:42

Mozilla benoemt Chris Beard als interim-CEO
Telecompaper
Browser-leverancier Mozilla heeft Chris Beard als interim-CEO aangesteld om de onlangs opgestapte Brendan Eich te vervangen. Dat schrijft medeoprichtster en bestuursvoorzitter Mitchell Baker van Mozilla op de website van het bedrijf. Het bestuur van ...

Categorieën: Mozilla-nl planet

Mozilla benoemt Christ Beard als interim-CEO - Telecompaper

Nieuws verzameld via Google - di, 15/04/2014 - 08:33

Mozilla benoemt Christ Beard als interim-CEO
Telecompaper
Browser-leverancier Mozilla heeft Chris Beard als interim-CEO aangesteld om de onlangs opgestapte Brendan Eich te vervangen. Dat schrijft medeoprichtster en bestuursvoorzitter Mitchell Baker van Mozilla op de website van het bedrijf. Het bestuur van ...

Categorieën: Mozilla-nl planet

Mozilla benoemt voormalig marketingtopman tot ceo ad interim - tweakers.net

Nieuws verzameld via Google - di, 15/04/2014 - 07:44

Mozilla benoemt voormalig marketingtopman tot ceo ad interim
tweakers.net
Mozilla heeft Chris Beard, de voormalige chief marketing officer, tot ceo ad interim benoemd. Beard is een oudgediende die betrokken was bij vele projecten en Mozilla zegt dat hij de juiste man is om op dit moment de organisatie te leiden. Chris Beard ...

Categorieën: Mozilla-nl planet

Brian King: Chris Beard Stories

Mozilla planet - di, 15/04/2014 - 07:23

You may have heard that Chris Beard came back (he never really left) to Mozilla as interim CEO. I have many Chris Beard stories, but here are just a couple of personal ones.

The first was back in 2006 when I first contracted for Mozilla writing an add-on. Chris was product managing the add-on and we were on an early call with others trying to wrap up and get a first version out the door. I forget the details, but the general tone of the conversation changed for me when Chris said something to the effect of “let’s ship something we are proud of and that users will love”. Up until that time I had volunteered for many years for Mozilla with a carefree attitude. This was Chris’ way of saying that what we are doing is important, and we have to do it well. After that I contracted on other projects but also put in a lot of volunteer time. It never lost the fun aspect, but I knew what we were doing was serious and making an impact.

Fast forward to 2010, to the Mozilla Balkans Meeting in Ljubljana. We gathered in the center of the city at a typical Slovenian ‘gostilna’ (restaurant) and were told a special guest was coming. Everyone was expecting a famous Balkans singer. Instead our brand new CEO at that time Gary Kovacs walked in, accompanied by Chris and a few others. After all the excitement, we settled down to eat and I was sitting beside Chris. We talked about many things, but throughout he was passionate and sharing his big ideas both for what I was working on and the opportunities that Mozilla had moving forward. Every encounter with Chris was a piece of advice, inspiration, a big idea or all wrapped up in one.

Balkans Mozillians

Chris in Ljubljana with the team. Picture by Tristan Nitot on Flickr.

Somehow I feel the best Chris Beard stories are to come.

Enhanced by Zemanta
Categorieën: Mozilla-nl planet

Matthew Noorenberghe: An easy way to test the New Firefox Beta look and feel before it's released

Mozilla planet - di, 15/04/2014 - 03:14
Screenshot of the new Firefox UI on Windows 7 with the menu panel openThe new Firefox Beta is faster, simplified and easier to customize and we need your help to test it out before it gets released in a few weeks time. There is now an easy way to review Firefox user interface changes without even installing the new version. "How is that possible?" you might ask. We have a collection of hundreds of screenshots of the new Firefox in various different configurations (affecting features such as tabs, toolbars, themes, customization mode, and the new menu) that are ready for you to review. It's fast and easy to do in three simple steps:
  1. Open up the screenshot review tool and enter a nickname to log in (there may be a small reward for the most valuable contributions so keep that in mind when choosing)
  2. A random screenshot will be displayed where you can simply identify any visual issues related to the new user interface that you may see. Simply drag to select the region of the image and add a comment (and optionally a bug number). See an example.
  3. When you're done reviewing that image, simply click the button to get another and go to step 2. Endless fun ensues!
Of course, installing Firefox Beta, testing the functionality and filing bugs is still really valuable and encouraged. Areas to focus on include the new customization mode, menu panel, tabs, and Firefox Account Sync. So, what are you waiting for? Start reviewing now.
Categorieën: Mozilla-nl planet

Mozilla selects former marketing chief Chris Beard as interim CEO - Financial Post

Nieuws verzameld via Google - ma, 14/04/2014 - 23:37

Financial Post

Mozilla selects former marketing chief Chris Beard as interim CEO
Financial Post
Mozilla Corp. named Chris Beard as interim chief executive officer to replace Brendan Eich, who stepped down after being criticized for donating money to an anti-gay marriage group. Beard is an executive in residence at venture-firm Greylock Partners ...

Google Nieuws
Categorieën: Mozilla-nl planet

Pagina's