<Glazblog/>

Monday 15 September 2014

Molly needs you, again!

There are bad mondays. This is a bad monday. And this is a bad monday because I just discovered two messages - among others - posted by our friend Molly Holzschlag (ANC is Absolute Neutrophil Count):

First message

Second message

If you care about our friend Molly and value all what she gave to Web Standards and CSS across all these years, please consider donating again to the fund some of her friends set up a while ago to support her health and daily life expenses. There are no little donations, there are only love messages. Send Molly a love message. Please.

Thank you.

Wednesday 3 September 2014

My LinkedIn policy

  1. if I don't know you and you don't explain clearly why I should add you as a new connection, I won't do it
  2. my geeks' world is a world of trust; I will refuse the new connection if I feel you can't be trusted or remove you from my existing connections if you're not trustable any more

Wednesday 6 August 2014

Best pun August 2014

Awarded with loud applause to Bruce Lawson:

Tuesday 5 August 2014

Samsung S5 update

I love the fact my Samsung S5 is water- and dust-proof. "Was" water- and dust-proof is probably better since he tiny plastic part keeping the cover of the USB/charger sockets connected to the phone's body recently broke. Very, very surprising on a high-end cellphone of that price. It's apparently a very common issue.

Friday 1 August 2014

QOTD

If you call yourself a manager, small or large company, there is a quote I suggest you read, re-read, read again and again, learn and apply. It comes from Pixar. It's certainly one of the best management rules I have ever read:

We start from the presumption our people are talented and want to contribute. We accept that, without meaning to, our company is stifling that talent in myriad unseen ways. Finally, we try to identify those impediments and fix them.

Proud father

I'm a proud father! My son Michel, 15 years old, has published his first game on the Google Play Store! It's a bit rough around the edges but I'm so proud! :-)

Wednesday 30 July 2014

Where is Daniel

I suffered last week a major lumbago, leaving me totally blocked, under morphine and hospitalized. I am recovering slowly, stuffed with strong medicines, my back being too weak now to stand a visit to my osteopath. Since I am unable to seat too long in front of a computer (I spend most of my days in bed), don't count on me these days for anything work-related, including unfortunately W3C stuff. Don't expect fast answer to emails either. I need at least one extra week of complete rest to recover a bit. Thanks.

Friday 20 June 2014

Leaving Samsung

This is my last day at Samsung. I am open to job opportunities. I'll continue co-chairing the CSS Working Group, but under my Disruptive Innovations' wings, starting immediately.

Monday 9 June 2014

US Navy LCT 537

In my plane between Paris and Boston, a few WWII veterans were coming back from Normandy and the 70th anniversary of D-Day. In the middle of my flight, I left my seat to walk a little bit (I still have a bad left knee) and saw one of them. He was wearing a "US Navy LCT 537" hat. I stopped in front of him and asked him "Excuse me sir, you're a WWII veteran coming back from Normandy, right?". He replied a strong "yes!". So I told him "There is something I want to tell you: I am French and Jewish. So thank you very much...". He took my arms, my left arm with his right arm, my right arm with his left one, _very_ firmly looked at me and said "God bless you, God bless you.".

I am really glad I did this today.

Wednesday 28 May 2014

from iPhone 4S to Samsung S5

I switched from an iPhone 4S (and an iPhone 2G before that) to a Samsung S5 a month and a half ago and it's probably time to summarize what that change meant to me from both hardware and software points of view.

Hardware

I loved my iPhone 4S's hardware for the following reasons:

  • metal and glass, feels and is robust
  • side button to mute it or block rotation
  • excellent control of iTunes through the headphones' chord: one click to pause, two clicks to move to next song, three clicks to move to previous song
  • lots and lots of accessories
  • battery charging really fast!

I started disliking my iPhone 4S for the following reasons:

  • screen too small and I thought the iPhone 5S was a too expensive and not interesting enough upgrade
  • rather bad sound quality of the too fragile headphones
  • the buttons on the headphones' chord don't work well when it's very cold outside
  • battery is not removable
  • impossible to add a microSD card
  • rear camera too far behind state of art
  • screen quality too far behind state of art
  • loudspeaker not loud enough
  • rather poor 3G reception and no 4G
  • all covers and case add too much to phone's thickness

I love the S5's hardware for the following reasons:

  • laaaaarger and much higher quality screen
  • removable battery and better battery life than the 4S
  • microSD card slot
  • the View Cover of the S5 is very, very nice
  • the induction-charging View Cover is even nicer...
  • dust- and water-proof
  • very good rear camera
  • loudspeaker is loud
  • micro-USB
  • excellent WiFi, Bluetooth and 4G
  • IR to control my TV and set-top box
  • fingerprint reader

What I don't really like in S5's hardware:

  • plastic... When you come from the iPhone 4S, the S5 feels a bit like a toy
  • less accessories
  • it's easy to scratch the metal-like plastic border of the phone
  • no button to mute or block the rotation; I know this can be done easily with a few clicks but, unlike the 4S, I need to remove the phone from my pocket for that
  • the heartbeat sensor is not precise enough and it's rather hard to make it work properly
  • the + and - volume buttons are not separated
  • apparently, three clicks on the headphone's chord does not move to previous song; or it does not work here.
  • the wonderful temperature sensor of the S4 is gone in the S5

Software

I really appreciated my iPhone 4S for the following reasons:

  • iTunes worked well on my Mac; the UX of iTunes seems to me almost unbeatable despite of a few flaws.
  • simplicity and intuitiveness of the whole iOS UI
  • homogeneous UI/UX of almost all apps in the iOS ecosystem, making them in general very intuitive to use
  • iOS preferences are easy to deal with even if they lack a few things
  • trivial Airplay
  • I used a lot an application called "Notes de Frais" for my expense reports. Superbly done and maintained.
  • new OS releases are announced
  • I loved the keyboard and some of its features like switching back automatically to regulars chars after the insertion of an apostrophe, something important when you write in french
  • kinetic scrolling has always been superb
  • worked beautifully with my car's infotainment system.

I was increasingly fed up with the following things in my 4S:

  • my 4S was having a lot, really a lot of trouble, finding a network provider abroad in less than 15 minutes. I often had to shut it down and reboot it for that. Very annoying. Let me put that in the software section as a bug.
  • not enough options in the floating panel of the home screen.
  • no widgets on the home screen
  • too slow to add new features
  • no other browser than Safari; I should say no other rendering engine

S5 and its Android stack won me with:

  • no more roaming issues
  • widgets on home screen
  • lot of options on the home screen's floating panel
  • still lots of apps
  • Smart Booster to use WiFi and 4G together
  • Eco Mode making the battery last days and days
  • private mode
  • Smart Stay, my phone does not go to standby if it can see my eyes...
  • I can use Firefox...
  • I don't use NFC yet but I'm glad it's in

But there are things I am still not used to:

  • I need a replacement for Kies, that I don't like. Any recommendation?
  • no rotation of the home screen?
  • the home screen's floating panel can contain 10 shortcuts and only ten. WHY ONLY TEN?
  • Google, google, google everywhere
  • Contacts offer by default only one Name field. Not two FirstName and Name fields.
  • Android preferences are just a true PITA. It's a mess of epic magnitude, some prefs being completely impossible to understand or sometimes hidden in an unexpected section of the preferences. Geekiness maxima.
  • why the hell is Calendar named S Planner? Seriously?
  • no native DLNA, I add to install the Samsung Link app
  • rotation is sometimes too slow
  • keyboard is not predictive enough and has too small keys; I too often hit the wrong key
  • I still have not figured how to reproduce the apostrophe behaviour of the iOS keyboard described above. Help!
  • bloatware I never used and will almost certainly never use
  • apps UI is too heterogeneous. Not enough intuitiveness. Some apps offer a back button between screens, some rely on the back hardware button, some allow both.
  • all my attempts to find a decent equivalent to my iOS expense report app, with a very good currency management, failed
  • the weather widget takes 1/3rd of the screen! Seriously? I don't need it to show time, I only want local weather. Could be just an icon. In general, widgets eat far too much screen space.
  • works some times weirdly with my car's infotainment system. From time to time, I can't reach my contacts list from the car.
  • some issues with kinetic scrolling and zooming.

All in all, I am a happy S5/Android user. I am pretty sure the UI issues of Android will fade away with new releases. It feels like I'm back in 2014 again.

Update: comments closed, thanks to trolls.

Tuesday 15 April 2014

Welcome cbeard

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!

Friday 4 April 2014

Sad day

It's a very sad day. I just landed in San Francisco and learned about Brendan's resignation and I am totally shocked. I have very mixed feelings today about the "Mozilla Community" and I am not sure I like what it became.

Mitchell wrote the following:

We welcome contributions from everyone regardless of age, culture, ethnicity, gender, gender-identity, language, race, sexual orientation, geographical location and religious views. Mozilla supports equality for all.

Yes, we do. But I think we also value democracy, and what happened during the last days seems to be a negation of democracy. One should be able to express legal opinions without having to face a witch-hunt-like repression.

Today, Mozilla is weaker because of this witch hunt. Mozilla, who is standing for the better of everyone on the Web, is weaker because some people thought it would be stronger without Brendan. This is ridiculous, this is a shame, this is a scandal. A small step for a few, a giant leap back for the Web.

Who said "Mozilla Community"? Who said Openness? Pfffff. I've been a Mozillian for fourteen years and I'm not even sure I still recognize myself in today's Mozilla Community. Well done guys, well done. What's the next step? 100% political correctness? Is it still possible to have a legally valid personal opinion while being at Mozilla and express it in public?

Personal message to Brendan : Paris in April and May can be such a wonderful city. Come over here for a break, I have a few good restaurants, bars and unknown superb monuments to show you... With all my thoughts and support.

"I may disagree with what you have to say, but I shall defend, to the death, your right to say it"

(comments disallowed, I still have in mind the hate messages left on this blog last week)

Update: I perfectly understood the fact Brendan resigned because of the external pressure. But that external pressure would probably not have existed at all without the original internal pressure. Reminding Brendan's position was, I already said it, pointing an index at him. Being an employee and explicitly saying in public "I don't support Brendan as CEO because of his prop8 support" triggered the rest. That's where I don't understand the Mozilla Community any more.

Wednesday 2 April 2014

Mac and rtl

After years of wait, Apple Keynote was just updated to v6.2 and includes a far better support for rtl scripts. For the first time, the cursor and the caret movements are reliable and it becomes possible to edit a rtl slideshow. Pages is still in v5.2 though.

On the Microsoft Word front though, still no rtl at all...

Thursday 27 March 2014

A moron...

The kind of things I have received because I have expressed support to Brendan Eich. The moron who sent me that does not know - of course - and does not care about - of course - I have always been in favor of same-sex marriage, most french readers of this blog can probably testify on it.

insult received by email

I am here writing directly to the neuronless imbecile (IP address 83.84.19.171)  who sent me the above. You and the exact words you are using, the methods you are using, these are exactly the reasons why I did send my support to Brendan. In a democracy, fighting for a cause cannot - I repeat it cannot - mean launching ad hominem attacks. Ad hominem attacks can be tolerated if and only if the attacked people are using illegal means to promote their opinions or if their opinion is illegal. For instance when fighting against extreme-right because extreme-right uses the weaknesses of democracy to kill democracy.

Intimidation, insults, ad hominem attacks always decrease the legitimity of a cause. Imbeciles do it too, but they won't understand it. Let's call that an excuse.

Tuesday 25 March 2014

Mood of the day

Throwing up. The Web is so full of stinking shit this morning.

Welcome Brendan!

I could not be happier to see Brendan Eich become the new CEO of Mozilla :-)

Brendan has a vision, a unique vision that made Mozilla what it is today, and he is a great leader, respected all over the world, all over our geek's world. Reliable, hyper-smart, friendly and knowing perfectly - of course - the organization he co-founded.

But there is one thing I would like to come back to, because I read something too disruptive to me on planet.mozilla.org: yes, Brendan donated to the anti-marriage equality Prop. 8 campaign in California. I don't like, I don't like at all seeing that pop up again in public space because that's pointing an index at someone for his/her beliefs, that's something that should not happen in a community like ours. When Brendan was under attack, two years ago, I sent him my support. Not a support to his opinion, but a support to his freedom of opinion and freedom of expression of that opinion through all legal means. Including a donation.

Seen from Europe with a European point of view, I do not understand how one can complain about it. Mozilla promotes openness and freedom of choice, that's its Manifesto, that's our core values, why most of us contribute to Mozilla. I want that openness and freedom of choice to be a deep, anchored value of the whole Mozilla community. With that in mind, I entirely respect Brendan's personal choice, that was exposed only because of the Californian law and was attached to the name of Mozilla only because that law makes it mandatory to mention the affiliation of the donator above a given level of donation IIRC. I trust - we all trust - Brendan to be able to deal with the whole community - employees or contributors - equally, whatever their own beliefs or personal choices. I met Brendan 14 years ago and have never seen him behave in a different way.

The Mozilla community at large represents quite well the diversity of thoughts on the globe. We have people who love fire weapons; I don't like it but that's legal in their countries. We have people supporting death penalty; I hate it but that's legal in their countries. We have people from all political sides, including extremes; I don't understand it but I accept it. We have people based in countries one could easily qualify as antidemocratic and who support their regime; yes, diversity is a marker of the human kind. And we have people who have diverging opinions about major societal issues, within the limits of the law, absolutely. We even have true nerds, barely social, who can't understand what's a private and family life. So what? Again, seen from Europe and with a European point of view, not a problem at all.

Pointing an index at someone of our community for his/her beliefs can only have one side-effect: people will stop expressing their opinions because they will be afraid of the kickback, people will be blamed in public for legal behaviours and that's totally unacceptable to me as a European. That's not the world I want to live in, that's not my concept of democracy and freedom of opinion/speech. That's not the Mozilla I want. Brendan, I value your opinion, and that does not say anything about my agreement or disagreement with your opinion itself.

We, as a community, cannot promote openness and freedom of choice without a deep respect for individual beliefs. A reminder of Brendan's personal choices years ago is unfair and violates too much for me the core values of the Mozilla community. I am writing this article because I want it to be the very last time we read about it in public space. FWIW, and given the long chats we had about it in Europe two years ago, I think the above is a quite widely shared opinion in the European Mozilla community.

Welcome Brendan, and long life to Moz.

Update: following a private message, I want to say that, yes, I carefully read the message that triggered my response above. My take is that even in a positive message about Brendan, reminding the Prop8 story is putting, again, an index at him. And I feel it is just totally wrong because his opinion is not less respectable than others.

Update again: I did not intend to let the comments open here, my bad. What I feared did happen: hate messages. Closing comments then. My blog, my prerogative, and the French law makes me accountable for all comments on this blog. Period. Sorry for the people who left polite messages, agreeing or disagreeing; I hope you understand.

Thursday 20 March 2014

Samsung Web Tech Talk on JavaScript trends

SRA-SV LogoSamsung Research America will host a meetup about JavaScript trends in its San Jose R&D center on the 7th of april. This is a free event and anyone can attend.

Date: 07-apr-2014
Time: 5pm - 8pm
Location: 95 Plumeria Drive, San Jose, CA

Agenda:

  • 4:30pm - 5:00pm Welcome
  • 5:00pm - 5:30pm "Web Technologies on Mobile - Opportunities and Challenges", Andreas Gal, VP Mobile at Mozilla
  • 5:35pm - 6:00pm "Supersonic JavaScript", Ariya Hidayat, Shape Security
  • 6:20pm - 6:45pm "JavaScript in the Small", Satish Chandra, Samsung
  • 6:45pm - 8:00pm Open Discussion
  • 8:00pm - 9:00pm Networking

Feel free to attend using the link at the top of this article!

Wednesday 19 March 2014

A better CSS OM for parsed values

A large part of the current CSS Object Model sucks. More specifically, the CSSValue, CSSPrimitiveValue, CSSValueList, RGBColor, Rect and Counter interfaces are so poorly designed they're not implemented. I just tried to implement them for a project of mine and I must say the model is so weak and incoherent it cannot be implemented as is.

I have then tried to refine what's in the 2000-nov-13 spec of DOM Level 2 Style to reach something workable. I am NOT saying this has to be done or implemented. Call it a mental exercise I did just for fun, w/o caring about performance.

Let's first look at what's wrong:

Interface CSSValue

      interface CSSValue {
      
        // UnitTypes
        const unsigned short      CSS_INHERIT                    = 0;
        const unsigned short      CSS_PRIMITIVE_VALUE            = 1;
        const unsigned short      CSS_VALUE_LIST                 = 2;
        const unsigned short      CSS_CUSTOM                     = 3;
      
                 attribute DOMString        cssText;
                                              // raises(DOMException) on setting
      
        readonly attribute unsigned short   cssValueType;
      };

"inherit" is here considered as a special identifier despite of the fact a CSSPrimitiveValue can be a CSS_IDENT. There is no UnitType for "initial". A CSS_CUSTOM is, according to the spec, a "custom value"; but a custom value still has to be valid per CSS syntax so it should be representable with CSS_VALUE_LISTs and CSS_VALUEs.

Interface CSSValueList

interface CSSValueList : CSSValue {
  readonly attribute unsigned long    length;
  CSSValue           item(in unsigned long index);
};

All in all, this one is simple and should be quite ok. But one thing is missing: a property can accept a comma-separated list of whitespace-separated values. The current CSSValueList cannot express if the serialization of a CSSValueList should be whitespace- or comma-separated.

Interface CSSPrimitiveValue

interface CSSPrimitiveValue : CSSValue {

  // UnitTypes
  const unsigned short      CSS_UNKNOWN                    = 0;
  const unsigned short      CSS_NUMBER                     = 1;
  const unsigned short      CSS_PERCENTAGE                 = 2;
  const unsigned short      CSS_EMS                        = 3;
  const unsigned short      CSS_EXS                        = 4;
  const unsigned short      CSS_PX                         = 5;
  const unsigned short      CSS_CM                         = 6;
  const unsigned short      CSS_MM                         = 7;
  const unsigned short      CSS_IN                         = 8;
  const unsigned short      CSS_PT                         = 9;
  const unsigned short      CSS_PC                         = 10;
  const unsigned short      CSS_DEG                        = 11;
  const unsigned short      CSS_RAD                        = 12;
  const unsigned short      CSS_GRAD                       = 13;
  const unsigned short      CSS_MS                         = 14;
  const unsigned short      CSS_S                          = 15;
  const unsigned short      CSS_HZ                         = 16;
  const unsigned short      CSS_KHZ                        = 17;
  const unsigned short      CSS_DIMENSION                  = 18;
  const unsigned short      CSS_STRING                     = 19;
  const unsigned short      CSS_URI                        = 20;
  const unsigned short      CSS_IDENT                      = 21;
  const unsigned short      CSS_ATTR                       = 22;
  const unsigned short      CSS_COUNTER                    = 23;
  const unsigned short      CSS_RECT                       = 24;
  const unsigned short      CSS_RGBCOLOR                   = 25;

  readonly attribute unsigned short   primitiveType;
  void               setFloatValue(in unsigned short unitType, 
                                   in float floatValue)
                                        raises(DOMException);
  float              getFloatValue(in unsigned short unitType)
                                        raises(DOMException);
  void               setStringValue(in unsigned short stringType, 
                                    in DOMString stringValue)
                                        raises(DOMException);
  DOMString          getStringValue()
                                        raises(DOMException);
  Counter            getCounterValue()
                                        raises(DOMException);
  Rect               getRectValue()
                                        raises(DOMException);
  RGBColor           getRGBColorValue()
                                        raises(DOMException);
};

This is so completely crazy I don't know where to start...

  • CSS_UNKNOWN is supposed to represent a "value that is not a recognized CSS2 value". Then it should be thrown away by the parser as invalid and never reach the OM, right?
  • the list of units is long and not easily extensible
  • attr(), counter(), counters(), rect() and the more recent gradients or var() calls are all functions; adding a new setter and a new getter for each new type is overkill
  • attr() was extended by recent specs and can now take more than one argument. The above does not allow to individually modify those arguments.
  • "initial" and "inherit" are, as I already said above, covered by both CSSValue and CSS_IDENT here
  • let's suppose we have a CSSValue that is a CSSPrimitiveValue. Setting its cssText to "10px 10px" will then trigger an exception since a CSSPrimitiveValue cannot transmute magically into a CSSValueList...
  • I love how the spec prose says setStringValue() has "No Parameters"...

Interface Rect

interface Rect {
  readonly attribute CSSPrimitiveValue  top;
  readonly attribute CSSPrimitiveValue  right;
  readonly attribute CSSPrimitiveValue  bottom;
  readonly attribute CSSPrimitiveValue  left;
};

This looks and smells like a CSSValueList far too much.

Interface RGBColor

interface RGBColor {
  readonly attribute CSSPrimitiveValue  red;
  readonly attribute CSSPrimitiveValue  green;
  readonly attribute CSSPrimitiveValue  blue;
};

This cannot represent rgba(), hsl() and hsla() colors. We also have to use three CSSPrimitiveValue for the three color components because they can be a percentage or an integer...

Interface Counter

interface Counter {
  readonly attribute DOMString        identifier;
  readonly attribute DOMString        listStyle;
  readonly attribute DOMString        separator;
};

Again, something is missing here: nothing says if it's supposed to be a counter() or a counters() value. And no, the separator could not do the trick since it can be the empty string.

Requirements

To have a better OM for Values, i.e. an extensible OM that allows an application to deal with parsed values of all kinds, we need to change of perspective. First, the list of reserved idents, the list of units and the list of functions are not extensible. Secondly, we have cast issues between PrimitiveValues and ValueLists and we need a single interface. We can deal with all the issues with a single CSSValue interface:

New interface CSSValue

interface CSSValue {

  // ValueTypes
  const unsigned short      CSS_SYMBOL                     = 0;
  const unsigned short      CSS_NUMBER                     = 1;
  const unsigned short      CSS_UNIT                       = 2;
  const unsigned short      CSS_STRING                     = 3;
  const unsigned short      CSS_URI                        = 4;
  const unsigned short      CSS_IDENT                      = 5;
const unsigned short CSS_VALUE_LIST = 6; readonly attribute unsigned short type; attribute boolean commaSeparated;
readonly attribute unsigned long length;
CSSValue item(in unsigned long index);
raises(DOMException);

void setFloatValue(in float floatValue) raises(DOMException); float getFloatValue() raises(DOMException);
void setStringValue(in DOMString stringValue) raises(DOMException); DOMString getStringValue() raises(DOMException); };

Definition group ValueTypes

An integer indicating the type of the Value

CSS_SYMBOL
The value is a single character than cannot be interpreted otherwise. For instance the / character in the font shorthand property. The value can be obtained by the getStringValue() and set by the setStringValue() method.
CSS_NUMBER
The value is a simple number. The value can be obtained by using the getFloatValue() method and set through by setFloatValue() method.
CSS_UNIT
The value is a number followed by a unit. The number part of the value can be obtained by using the getFloatValue() method and set through by setFloatValue() method. The unit part of the value can be obtained by using the getUnit() method and set through by setUnit() method
CSS_STRING
The value is a string. The value can be obtained by the getStringValue() and set by the setStringValue() method.
CSS_URI
The value is a URI. The parameter of the url() function can be obtained by the getStringValue() and set by the setStringValue() method.
CSS_IDENT
The value is a CSS identifier. The value can be obtained by the getStringValue() and set by the setStringValue() method.
CSS_VALUE_LIST
The value is a list of values or a function. It is a function if the getStringValue() method does not reply the empty string. The list of values is whitespace-separated if the commaSeparated attribute is false and comma-separated otherwise.

Attributes

type of type unsigned short, readonly
The type of the value as defined by the constants specified above.
commaSeparated of type boolean
The separation type of the list of values. Meaningful only if the type attribute is CSS_VALUE_LIST. The list is whitespace-separated if the attribute is false and comma-separated otherwise.
length of type unsigned long, readonly
The number of CSSValue in the list. The range of valid values of the indices is 0 to length-1 inclusive.
Exceptions
INVALID_ACCESS_ERR: Raised if the CSS value is a not a CSS_VALUE_LIST.

Methods

getFloatValue
Retrieves the value of a CSS_NUMBER or the number part of the value of a CSS_UNIT. If this CSS value is not a CSS_NUMBER or a CSS_UNIT, a DOMException is raised.
Return Value
float The float value of this CSS_NUMBER or CSS_UNIT
Exceptions
INVALID_ACCESS_ERR: Raised if the CSS value isn't a CSS_NUMBER nor a CSS_UNIT.
getStringValue
For a CSS_SYMBOL, retrieves the single character used as a symbol.
For a CSS_STRING, retrieves the string. Enclosing quotes or double-quotes are NOT included.
For a CSS_UNIT, retrieves the unit of the value.
For a CSS_URI, retrieves the argument of the url(...) notation. Enclosing quotes or double-quotes are NOT includedt.
For a CSS_IDENT, retrieves the identifier.
For a CSS_VALUE_LIST and if that list of values is passed as the parameters of a function, retrieves the function name. Retrieves the empty string otherwise.
For a CSS_NUMBER and CSS_UNIT, a DOMException is raised.
No Parameters
Return Value
DOMString The float value of this CSS_NUMBER or CSS_UNIT
Exceptions
INVALID_ACCESS_ERR: Raised if the CSS value is a CSS_NUMBER or a CSS_UNIT.
item
For a CSS_VALUE_LIST, Used to retrieve a CSSValue by ordinal index. The order in this collection represents the order of thevalues in the CSS style property. If index is greater than or equal to the number of values in the list, this returnsnull.
For all other value types, a DOMException is raised.
Parameter
index of type unsigned long: index into the collection.
Return value
CSSValue The CSSValue at the index position in the CSSValueList, or null if that is not a valid index.
Exceptions
INVALID_ACCESS_ERR: Raised if the CSS value is a not a CSS_VALUE_LIST.
setFloatValue
Sets the value of a CSS_NUMBER or the number part of the value of a CSS_UNIT. If this CSS value is not a CSS_NUMBER or a CSS_UNIT, a DOMException is raised.
Parameter
floatValue of type float;
No Return Value
Exceptions
INVALID_ACCESS_ERR: Raised if the CSS value isn't a CSS_NUMBER nor a CSS_UNIT or if the attached property doesn't support the float value or the unit type.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.
setStringValue
For a CSS_SYMBOL, sets the single character used as a symbol.
For a CSS_STRING, sets the string.
For a CSS_UNIT, sets the unit of the value.
For a CSS_URI, sets the argument of the url(...) notation.
For a CSS_IDENT, sets the identifier.
For a CSS_VALUE_LIST and if the parameter is not the empty string, make the list of values become a function and sets the function name. Make the list become a plain list of values if the parameter is the empty string.
For a CSS_NUMBER and CSS_UNIT, a DOMException is raised.
Parameter
stringValue of type DOMString
No Return Value
Exceptions
INVALID_ACCESS_ERR: Raised if the CSS value is a CSS_NUMBER or a CSS_UNIT, if the type of the value is CSS_SYMBOL and the string can be parsed as an other type of value, if the type of the value is CSS_UNIT and the string is not a valid CSS unit, if the type of the value is CSS_URI and the string is not a valid URI, if the type of the value is CSS_IDENT and the string is not a valid CSS identifier, if the type of the value is CSS_VALUE_LIST and the string is not a valid CSS identifier or the empty string.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Conclusion

The above should be enough to describe any CSS value, specified or computed. The model will become a bit complex for complex values but it ensures any web application can have access to parsed values, deal with their types and modify them. Let's take an example:

background-image: linear-gradient(to bottom, yellow 0%, blue 100%), url(foo.png);

This will result in the following OM (click on the image to enlarge it):

OM example

Again, I'm not saying the above is the thing to do or implement. It can certainly be improved, for instance for colors. A totally different perspective is also perfectly possible. I am only saying that making a better CSS OM allowing a full representation of parsed values in stylesheets and computed values is feasible. I hope the CSS OM will offer such power in the future.

UPDATE: the new CSSValue interface above lacks one thing, the ubiquitous cssText for parsing and serialization. Sorry for that.

Wednesday 26 February 2014

Haxe

I have just discovered Haxe and haxecpp and I am totally blown away. This is what I was dreaming of and I did not know about it. I am going to use it immediately for my personal projects. Wow, just wow.

Thursday 6 February 2014

Next Game Frontier, The conference dedicated to Web Gaming

Last October, I was attending the famous Paris Web conference in Paris, France. In the main lobby of the venue, two Microsoftees (David Catuhe and David Rousset) were demo'ing a game based on their own framework Open Source babylon.js. Yes, Microsoftee and an Open Source JS framework over WebGL... I was looking at their booth, the people queuing to try the game and started explaining them there are conferences about Gaming, there are conferences about Web technologies in general and html5 in particular but there are no conference dedicated to Gaming based on Web technologies...

To my surprise, the two Davids reacted very positively to my proposal and we started immediately discussing a plan for such a conference.

Next Game Frontier LogoPeople, I am immensely happy to announce the First Edition of the Next Game Frontier conference, the conference dedicated to Web Gaming, co-organized this year by Microsoft and Samsung Electronics.

Web site: Next Game Frontier

Location: Microsoft France campus, Issy-les-moulineaux, France

Date: 13th of March 2014

Next Game Frontier on Lanyrd

Free registration but number of seats limited so register ASAP!

Schedule:

9:00 - 9:30 Breakfast

9:30 - 9:45 Opening Keynote (D. Glazman, D. Catuhe & D. Rousset)
9:45 - 10:45 Microsoft session - Create a 3D game with WebGL and Babylon.js (D. Catuhe & D. Rousset)

10:45 - 11:00 Break

11:00 - 12:00 Mozilla session - Le Web en tant que plateforme pour les jeux, de WebGL à AsmJS (T. Nitot)

12:00 - 13:15 Lunch

13:15 - 14:15 Create 3D assets for the mobile world & the Web, the point of view of a 3D designer (M. Rousseau)
14:15 - 15:15 Samsung session - Enhancing HTML5 gaming using WebCL (Samsung) & Turbulenz (Partner)

15:15 - 15:30 Break

15:30 - 16:30 Three.js (J. Etienne from http://learningthreejs.com)
16:30 - 17:30 Minko.io (Jean-Marc Le Roux from http://aerys.in)

17:30 - 18:30 Roundtable - Open discussions about Web Gaming - Microsoft, Mozilla, Samsung, Ubisoft moderated by a journalist

Save the date, and register now but please, don't register if you don't plan to come. Thanks!

- page 1 of 119