[webkit-dev] CSS Logical Properties and Values
obrufau at igalia.com
Fri Nov 2 15:48:36 PDT 2018
I tried adding a compile flag set to ENABLE_EXPERIMENTAL_FEATURES,
but not all platforms run tests with this set to true.
So I had to skip the tests in some platforms, which was bad.
Additionally, my patch for logical shorthands is not the only affected,
for example the tests that need ENABLE_CSS3_TEXT are skipped.
So it became clear that a proper way to disable CSS properties
behind runtime flags is needed. I have added such a feature in
my patch for https://bugs.webkit.org/show_bug.cgi?id=188697
It will suffice to specify a "runtime-flag" in the "codegen-properties"
of the property in Source/WebCore/css/CSSProperties.json.
The value should be the name of a flag in RuntimeEnabledFeatures.
If the flag is disabled, the property won't be exposed, i.e
property in element.style; // false
element.style[property]; // undefined
element.style.getPropertyValue(property); // ""
element.style.setProperty(property, value); // no effect
element.style.all = "inherit"; // won't set `property`
element.style.cssText; // won't include `property`
I have also added some tests about webexposed properties.
Does this approach look good? Please review my patch (only the
parts related with runtime flags, Simon Fraser already approved
the logical shorthands).
El 22/8/18 a les 02:56, Oriol Brufau ha escrit:
> I have written a patch for adding logical shorthand properties. However,
> I'm not much sure about how I can implement them behind a flag.
> I tried hiding them behind a run-time flag. But unlike Blink, it seems I
> can't do this easily in CSSProperties.json.
> Instead, I wrapped the code added in CSSPropertyParser.cpp and
> CSSComputedStyleDeclaration.cpp inside conditionals with
> This disables the effects of the properties, but doesn't prevent them
> from being exposed via `prop in element.style`.
> So I will try a compile flag instead. But there are some Web Platform
> Tests for the new properties, and I would like them to pass.
> Is there a way to tell the testbot to compile with this flag?
> I would appreciate some guidance on the preferred way of doing this.
More information about the webkit-dev