Change 20081003-ptw-E by [EMAIL PROTECTED] on 2008-10-03 22:31:43 EDT
    in /Users/ptw/OpenLaszlo/honey-dew
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Debugger describes style bindings

New Features: Debug.explainStyleBindings

Bugs Fixed:
LPP-7090  Debugger feature for CSS

Technical Reviewer: volunteers? (pending)
QA Reviewer: antun (pending)

Release Notes:
    A new Debug command is available, Debug.explainStyleBindings,
    which takes as an argument an lz.node and displays the CSS rules
    that were used to compute any $style bindings on the nodes
    attributes. Ex.:

lzx> Debug.explainStyleBindings(gEverest)
/* @attrselector/attrs.lzx#2 (specificity 10, order 9) */
[group=everest] {
  innercolor: 2447660;
}
/* @elementselector/elementselector-test.lzx#0 (specificity 1, order 56) */
designerview {
  innercolor: 1985909;
  miscdata: 'uc berkeley';
  width: 279;
}
/* @compiler/stylesheetelement-test.lzx#0 (specificity 1, order 11) */
designerview {
  innercolor: 16711680;
  miscdata: 'uc berkeley';
  width: 279;
}
/* @designerview.lzx#0 (specificity 1, order 1) */
designerview {
  bordercolor: 6631189;
  borderwidth: 10;
  height: 50;
  innercolor: 11839631;
  labelcolor: 0;
  textinset: 2;
  width: 50;
}
«<designerview>#21| #gEverest»
lzx>

Details:
    LzCSSStyle: Added _dbg_filename and _dbg_lineno properties to
    LzCSSStyleRule in debug mode.  Pass properties to constructor,
    rather than smashing them in.  Make a rules _dbg_name be simply
    its selector.

    LzDebug: Add explainStyleBindings

    LzNode: In debug mode, record the styles that were applied.

    StyleSheetCompiler: Simplify and optimize the construction of
    style rules.  In debug mode, record the source file and line.

Tests:
smokecheck, test/style/metasuite.lzx and call Debug.explainStyleBindings(gEverest)

Files:
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/compiler/ StyleSheetCompiler.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081003-ptw-E.tar

Reply via email to