Change 20100410-hqm-e by [email protected] on 2010-04-10 19:31:18 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: make autosizing inputtext recompute it's height properly when user 
types

New Features:

Bugs Fixed: LPP-8591 Something mysterious about scrollHeight property in DHTML

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:

+ make autosizing inputtext recompute it's height properly when user types

    

Details:

WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js:
Needed to add a 'force' arg to setHeight, to prevent it from
calling back up to the LFC with the updateSize() method.

WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as:
Add new 'force' arg to setHeight (unused in this implementation, but for 
compatibiltiy
with DHTML)

WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as:
  Add new 'force' arg to setHeight (unused in this implementation, but for 
compatibiltiy
  with DHTML)

WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js:
Added quirk for setting height to zero in order to get proper scroll height in 
IE and Safari
(see __textEvent() in dhtml/LzInputTextSprite.js)

WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
  When a multiline field is supposed to be autosize it's height, update the
  height immediately to scrollHeight, when user types into the field.

WEB-INF/lps/lfc/views/LzInputText.lzs:

  When 'onchange' event is received from kernel, multiline field
  should update it's height to the measured text height, using
  'updateHeight' instead of setHeight (so it doesn't turn it into a
  fixed height field)


WEB-INF/lps/lfc/views/LzText.lzs:
  Autosizing text fields should call updateHeight, not setHeight, when updating
  their height, so they don't turn into fixed height fields.


WEB-INF/lps/lfc/views/LaszloView.lzs:
updateHeight method should update the __set_height_memo cache var

WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java:
+ fix for an unrelated bug that was picked up by findBugs analysis

WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java:
+ need to tell the JDOM XML parser to preserve newlines in text.


test/lztest/lztest-textheight.lzx:

Removed some of the checks for particular values of inputtext height
and width, since these now vary more than one pixels in some cases
(some of these changes predate this changeset, the text sprite
getTextWidth() method in swf8 changed a while ago to become more
accurate, and adds several more pixels than swf10 and DHTML)

Tests:

Look at text and image sizing in:
demos/lzpix/app.lzx swf,swf10,dhtml
calendar demo
amazon demo
test/lztest/lztest-textheight.lzx

test/smoke/smokecheck

Files:
M       test/lztest/lztest-textheight.lzx
M       WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M       WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
M       WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
M       WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
M       WEB-INF/lps/lfc/views/LzInputText.lzs
M       WEB-INF/lps/lfc/views/LzText.lzs
M       WEB-INF/lps/lfc/views/LaszloView.lzs
M       WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
M       WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100410-hqm-e.tar

Reply via email to