Change ptw-20101031-MxX by [email protected] on 2010-10-31 18:20:08 EDT
    in /Users/ptw/OpenLaszlo/trunk-3
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Revise CSS inherit behavior to match standard

Bugs Fixed:
    LPP-9493 box-model incorrectly inherits style from parent node
    LPP-9495 Need a way to say if a custom CSS property inherits or not
    LPP-9496 Implement CSS 'inherit' keyword

Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected] (pending)
Doc Reviewer: [email protected] (pending)

Release Notes:

    Summary

    CSS properties no longer inherit (from parent) by default.  Only
    the standard properties that are defined to inherit do so.  Custom
    properties must explicitly state that they inherit using the new
    `style` and `inherit` properties of <attribute>.

    Details

    a) Standard properties will only inherit if they are defined to do
    so by the W3 standard:  http://www.w3.org/TR/CSS21/propidx.html

    b) Custom CSS properties default to not inheriting.

    c) The CSS `inherit` keyword can be used in a stylesheet to make
    any CSS property have the inheriting behavior (where the CSS rule
    is applicable).

    d) There is a new property of <attribute>, when you specify
    `style="property"`, you can also specify `inherit="true"`, to make
    that CSS property inherit (or false to disable standard
    inheritance).

    e) For backwards compatibility, when there is no local applicable
    CSS style property, but there is an inheritable property, the
    inheritable property will be used.  In debug mode, you will get a
    warning, in case this is not the intended behavior.  The warning
    will give instructions on how to change your code to silence the
    warning (i.e., to make the inherit behavior explicit).

Details:

    classes, neighborhoodclasses, subclassing, constraint-test,
    simplerdescendent-test: Add `inherit="true"` to styled attributes
    expecting to inherit to silence warnings.

    speedtest: Specify `inherit` in CSS for subsubclass to silence
    warnings.

    designerview: Give a default value to miscdata, to silence
    warnings.

    LzSprite.js: Actually set the padding on the sprite div.

    LzCSSStyle: Add table of standard attributes that inherit.
    Completely rewrite property cache computation to compute both a
    local and inherited cache, to inherit (according to rules
    described in release notes), to listen for changes in inherited
    properties, and to send an event only when the inherited
    properties change.

    LzDebug: Improve explainStyleBindings to omit redundant
    information.

    LzNode, NodeModel:  accumulate properties that are specified to
    inherit and install them early on.  Add back-compatibility to find
    inheritable properties if they exist and print a helpful warning
    explaining "the new way".

    CSSHandler, ViewSchema:  Handle the `inherit` keyword.

Tests:

    {smokecheck, metasuite, test from bug} x {swf8, swf10, dhtml}

Files:
M       test/style/classes/classes.lzx
M       test/style/neighborhood/neighborhoodclasses.lzx
M       test/style/constraints/subclassing.lzx
M       test/style/constraints/speedtest.lzx
M       test/style/constraints/constraint-test.lzx
M       test/style/designerview.lzx
M       test/style/descendantselector/simplerdescendant-test.lzx
M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M       WEB-INF/lps/lfc/services/LzCSSStyle.lzs
M       WEB-INF/lps/lfc/debugger/LzDebug.lzs
M       WEB-INF/lps/lfc/core/LzNode.lzs
M       WEB-INF/lps/server/src/org/openlaszlo/css/CSSHandler.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20101031-MxX.tar

Reply via email to