Subscribe: The Holbert Report
http://www.blogger.com/feeds/5541414252435605845/posts/default/-/mozilla
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
bug  build  builds  ccache  css  demo  firefox  flex  flexbox  line  mozilla  nightly builds  nightly  smil  support  svg 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: The Holbert Report

The Holbert Report





Updated: 2018-03-02T08:13:29.445-08:00

 



Multi-line flexbox support in Nightly and Aurora 28

2013-12-11T08:33:36.429-08:00

A few days ago, I checked in support for multi-line flex containers (also known as "multi-line flexbox") in Firefox Nightly. This functionality will be included in the Aurora 28 release that comes out later this week. If all goes well, it will be available in an official release as of Firefox 28, which ships in March.

In prior Firefox versions, we support single-line flex containers, which let authors group elements into a row or a column, which can then grow, shrink, and/or align the elements depending on the available space.

But with multi-line flexbox support, authors can use the flex-wrap CSS property (or the flex-flow shorthand) to permit a flex container's children to wrap into several lines (i.e. rows or columns), with each line able to independently flex and align its children.

This lets authors easily create flexbox-based toolbars whose buttons automatically wrap when they run out of space:
Similarly, it allows authors to create homescreen layouts with app icons and flexible widgets that wrap to fill the screen:
(Note that the flexible blue widget, labeled "wide", changes its size depending on the available space in its line.)

Furthermore, authors can use the align-content property to control how extra space is distributed around the lines. (I don't have a compelling demo for that, but the flexbox spec has a good diagram of how that looks at the bottom of its align-content section.)

The above screenshots are taken from a simple interactive demo page that I whipped up. Follow the link if you want to try it out.

The work here was primarily done in bug 702508, bug 939896, bug 939901, and bug 939905. Thanks to David Baron, Cameron McCormack, and Mats Palmgren for reviewing the patches.



CSS3 Flexbox enabled in nightlies & ready for testing!

2012-12-07T16:42:53.428-08:00

This morning, I checked in a patch to enable CSS3 Flexbox support in Mozilla's bleeding-edge nightly builds! So, in a day or two (when that change is merged to mozilla-central), our Nightly builds will support CSS3 Flexbox.

This is the new CSS Flexbox model -- using "display: flex", as opposed to the older "display: -moz-box" model. Also, in the spirit of avoiding vendor prefixes for experimental features, we'll be shipping this new flexbox implementation without a vendor prefix in development builds -- hence, "flex" instead of "-moz-flex".  It'll be guarded by a hidden preference ("layout.css.flexbox.enabled") which we can toggle to make it available in release builds, too, once it's been sufficiently tested and had its kinks worked out.

Today's patch simply toggled that hidden preference to "on" in Nightly builds, and that change will be merged to Aurora (Firefox alpha) builds around January 6th, the next merge day.  With some luck, this may continue to "ride the release trains" and be released as part of Firefox 20, but we'll evaluate its readiness when Firefox 20 is merged to the Beta channel and may toggle it off at that point (though anyone wishing to test flexbox would still be able to toggle the pref on for themselves).

So: please go forth and test the new flexbox support in nightlies, and file bugs for any issues you encounter! Eiji Kitamura's "CSS Flexbox Please" demo page is a fun place to start.

A few known issues:
  • When printed, flex containers currently get truncated at page-boundaries (though I'm actively working on fixing that).
  • The "order" property doesn't yet affect paint-order/layering (though it does control positioning) -- I've got a patch in hand that fixes this -- it's just awaiting review, and it'll hopefully land soon.
  • The line-wrapping "multi-line" version of flexbox is not yet implemented. (That's the "flex-wrap" property and the shorthand "flex-flow" properties.) I'll hopefully get to this in the near term, but it's somewhat separate from the core flexbox functionality, so we opted to implement it separately.



Using SVG to make a lightweight Firefox 4 theme

2011-03-22T09:30:02.336-07:00

To celebrate the release of Firefox 4, I've made available a demo persona using SVG images!

As far as I know, the official GetPersonas website doesn't yet accept SVG-backed personas, but thanks to dolske's recent blog post, I learned how to host an installable SVG-backed persona on my own web space.

So if you're running Firefox 4 (you are, right?), then go ahead and give my SVG-backed persona a try! Make sure to enable the Add-on bar ('View' menu | Toolbars | Add-on Bar) to get the full effect. I don't recommend leaving this persona applied for very long, though, lest its continuous animations feast on your CPU and battery. :)

I look forward to seeing even prettier SVG-backed personas from others whose design skills are far superior to mine!



SVG as an image

2010-10-20T11:19:23.126-07:00

As of about a month ago, SVG files can now be used as images in Firefox 4.0 nightly builds! This will be included in the next Firefox 4.0 beta iteration (beta 7), when that's released.

This feature is exciting for many reasons:
  • Better-scaling web graphics -- unlike raster images (e.g. JPEG/GIF/PNG), SVG images can be scaled up or down without pixellation. This makes SVG ideal for web developers who want their content to look crisp on giant projector-screens as well as tiny phone screens.
  • SMIL animation in images -- SVG allows for very complex & expressive animations (see Brian Birtles' recent post for a number of great examples).
  • Reduced web-developer frustration -- from an author's perspective, SVG is an image format, and it should Just Work in contexts that expect an image.
  • Broader use of SVG!

For your viewing pleasure, here are some demos of SVG-as-an-image in a variety of situations:
  • In the tag:
  • (image)
  • As a CSS background:
  • This is a div with a tiled SVG image as its background.
  • In the HTML5 canvas element, with a rotation applied via the 2D canvas API:
  • <---- And here, as a CSS list-style-image! (That's the SVG version of the W3C's SVG logo.)

As one last example, I hacked together a Firefox Persona using SMIL-animated SVG images as backgrounds for Firefox's toolbar & addon bar. I wasn't able to publish it to the GetPersonas site, because the uploader page there doesn't accept SVG images yet -- so instead, I've included a small screencast:

Click here to view full-size video

The SVG files used for backgrounds in this Persona are available here. The header SVG file makes use of a locally-saved copy of Marek Raida's excellent hourglass demo.

There are some bugs with this feature that I'm still working out -- for example, you may get pixellation at certain unlucky zoom-levels -- but that will be fixed for the final release. If you run into other issues, please file bugs! :)



Mozilla gets !

2010-04-29T18:01:17.191-07:00

Yesterday afternoon, I checked in support for the SVG element, so that feature is supported in this morning's nightly build!

The element allows for much more flexibility in SVG animations. Mozilla's nightly builds have supported animation of most SVG attributes and properties for a while now, but gives authors the added ability to effortlessly animate an element to move along any arbitrary path.

I've written a simple Rocket Demo to give an example of the types of things you can do with this. This demo depicts the sad cartoony story of a rocket that gets hit by an asteroid, loses power to its boosters, and slowly falls into the sun. The demo uses no Javascript at all, and it uses to define the motion-paths of all of the moving elements. I've tested the demo in Opera, Firefox-nightly, and Chromium nightly -- a few things don't work in Chromium, but it works great in the other two browsers. (Thanks to clker.com for some public-domain SVG clip art that I use in the demo.)

Marek Raida (a wizard of SVG demos, and the author of the "Cavern Fighter" game that I linked to a few posts back) has come up with two excellent demos as well: "Drawing Animals" and "Catch the Mouse." Both are linked off of hist latest blog post. (Note: He's also got a fancier version of the "Catch the Mouse" demo where the mouse's footprints slowly disappear, but Firefox nightly builds are currently a bit choppy on that version, due to some code we should probably optimize for SMIL animation of CSS properties.)



SVG/SMIL "Dock" Demo

2009-12-09T23:53:21.845-08:00

Today, I decided to see what what it'd be like to make an MacOS-style "dock" in SVG, using SMIL elements to achieve the zooming hover effects.

Once I got that working, I felt like I really should make the icons do something useful when you click them. So, I hooked them up to control an embedded iframe.

Here's the result: SMIL Dock

Screenshot:
(image)

Screencast:


(Note that the demo will only do anything useful in a mozilla-central nightly build -- that is, Firefox 3.7 / Gecko 1.9.3 -- since earlier versions don't have support for SMIL.)



SVG Animation in Action: Marek Raida's "SVG Cavern Fighter" Game

2009-12-08T10:43:27.711-08:00

(image) Marek Raida has come up with another beautiful demo that shows off the power of SVG. This one's called SVG Cavern Fighter, and it's a classic side-scrolling shoot-em-up type game, with enemies and items that pulse and wiggle. The game logic is written in Javascript, and the enemy/item animations are all done with SMIL.

It looks really great (and it's quite fun to play) in mozilla-central nightly builds! (In earlier Firefox versions, with no SMIL support, the game logic still mostly works, but the enemies and items won't animate.)

Marek's been iterating on this game pretty rapidly, adding new features and fixing bugs every few days. His latest version will always be linked from his blog. Give it a try, and send him any feedback that you might have!



SMIL enabled by default on nightly builds!

2009-10-26T18:53:50.074-07:00

Good news: SVG Animation (SMIL) support is now enabled by default in mozilla-central nightly builds!

SMIL support has actually been built into our nightlies for some time now, but until last week, it was turned off by default, using an about:config preference. But we're confident that it will be ready to ship in Firefox 3.7 and that it's stable enough for our nightly testers to give it a spin, so we've flipped the switch!

Brian Birtles has a nice status page, documenting what currently works and what's not yet supported.

In particular, SMIL animation now works for most SVG-recognized CSS properties. Colors, numeric values like opacities & lengths, and enumerated values should all work, and I'm working on remaining types (see below). With support for CSS properties, we can make much prettier animations now, with flashing colors and fade-in using opacity -- for example, this simple demo.

Marek Raida has some fun demos on his blog, too -- I especially like the 'good spirit' animation and the 'digging' animation (which requires scripting for handling mouse events).

Here's what's on the immediate roadmap for people working on SMIL:

  • dholbert: Finish off support for CSS properties (bug 520239, bug 520487, bug 520488)

  • jwatt: Support more SVG properties (e.g. bug 522267)

  • birtles: Support syncbase timing - that is, animations whose start/end times are dependent on other animations. (bug 474743)


So, play away! I'm looking forward to feedback from nightly testers.



SVG Animation (SMIL) support has landed!

2009-01-16T16:31:58.687-08:00

Great news: support for SVG Animation (using SMIL) has now landed in mozilla-central! Zbigniew Braniecki has posted a nice summary of the history of this feature's development at Mozilla.

Great thanks to Brian Birtles for his excellent work on this patch (both in its early days and also during his Mozilla internship thus far), to Robert O'Callahan for his very thorough code-reviews, to Tim Rowley for keeping the patch up-to-date for so long, to Chris Double for his work on fixing crashes & adding features, and to Jeff Schiller for his moral support and patch-testing!

Now that SMIL has landed...
  • We can do really sweet animations directly in the browser, without any Javascript or Flash required. :)
  • We have improved support for the SVG specification
  • We win two more points on the Acid3 Test (in smil-enabled builds) for a total score of 95.
A few caveats:
  • This is mostly an initial framework for us to build upon, so it's still missing a number of key features (which will enable yet-more-awesome animations).
  • By default, the SMIL code is disabled via a build-time flag (see Bug 473705), so it's not included in nightly builds yet. (That will hopefully change as soon as we've got an about:config flag set up.)
For anyone interested in trying this out, give the tryserver build a spin! Or, if you compile your own builds, you can enable SMIL by adding "ac_add_options --enable-smil" to your .mozconfig file.

On my list of things to fix soon:
  • Bug 473904: Add an about:config toggle SMIL support
  • Bug 474049: Add support for animating CSS properties



ccache = much speedier Firefox builds

2009-10-14T16:36:08.414-07:00

I just discovered the awesome tool "ccache". I wish I'd known about it long ago -- it drastically speeds up Firefox rebuilds. From its man page, ccache "speeds up re-compilation of C/C++ code by caching previous compiles and detecting when the same compile is being done again."

I figured I'd share my ccache setup under Ubuntu Linux, in case anyone else wants to use it. (This is based on Darin Fisher's setup, from his ccache post back in 2004.)

Install ccache:
sudo apt-get install ccache

Add these to ~/.bashrc:
export CCACHE_DIR=/scratch/work/builds/.ccache
export CCACHE_HARDLINK=1
export CC="ccache gcc"
export CXX="ccache g++"

(Note that "/scratch/work/builds/.ccache" is just an empty directory on the partition where I intend to build Firefox. You'll probably want to replace that with something else -- or you can remove that line to get the default location, $HOME/.ccache)

Then, source that file (to make sure $CCACHE_DIR is defined) and initialize your cache with a largish maximum size (2 gigs):
source ~/.bashrc
ccache -M 2G
And you're done! The next time you do a "make -f client.mk build", you should see "ccache g++" in place of "g++" in the output, and your .ccache folder should start to grow in size.

I tested ccache's performance by doing an initial build of Firefox trunk (to populate the cache), deleting that build, and then doing a second full build (to make use of the cache). I timed the second build, to see how much the caching helped.

On my work machine, ccache reduced build time from 22 to 11 minutes. And on my home machine, ccache reduced build time from 12 to 4 minutes! (Compare that to multi-hour build times on Windows. :) )