This means it is not possible to use functions like webkit_dom_css_style_declaration_get_property_value to tell if a property has no value (or is just set to the empty string).
I think it could be fixed with...
gchar* convertToUTF8String(WTF::String const& s)
+ if (!s) return 0;
I agree, and it's consistent with the rest of the API that uses NULL instead of "". My only concern is that it might break existing applications relying on DOM functions returning always valid pointers. We have just broken the API/ABI so maybe it's a good momento for a change like this one, though.
I guess if we really want to do this and it's not too late already, then it's now or never.
I had forgotten this, we should have changed it before the 2.6 release, but people are still migrating, s we can probably change it now.
Created attachment 242899 [details]
Created attachment 242928 [details]
I added a test
Comment on attachment 242928 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=242928&action=review
> + return 0;
> return g_strdup(s.utf8().data());
We could probably do something like return s.isNull() ? nullptr : g_strdup(s.utf8().data());
We should merge this in the stable branch too.
Committed r177019: <http://trac.webkit.org/changeset/177019>