[Laszlo-checkins] r13143 - in openlaszlo/branches/4.2: . WEB-INF/lps/lfc/kernel/dhtml WEB-INF/lps/lfc/kernel/swf WEB-INF/lps/lfc/kernel/swf9 WEB-INF/lps/lfc/views laszlo-explorer/constraints laszlo-explorer/scripting test/lztest
ptw@openlaszlo.org
ptw at openlaszlo.org
Tue Mar 3 13:26:11 PST 2009
Author: ptw
Date: 2009-03-03 13:25:59 -0800 (Tue, 03 Mar 2009)
New Revision: 13143
Modified:
openlaszlo/branches/4.2/
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
openlaszlo/branches/4.2/WEB-INF/lps/lfc/views/LzText.lzs
openlaszlo/branches/4.2/laszlo-explorer/constraints/css.lzx
openlaszlo/branches/4.2/laszlo-explorer/scripting/events.lzx
openlaszlo/branches/4.2/test/lztest/lztest-textheight.lzx
Log:
Merged revisions 12340-12344,12346-12348,12352,12354-12358,12361,12363,12365-12367,12369-12371,12375-12378,12380-12389,12391,12394-12396,12399-12400,12402,12406-12416,12419,12421-12422,12425-12428,12431-12433,12435,12437-12441,12443,12445,12447,12449-12451,12453-12454,12458-12460,12464,12466-12472,12474-12475,12478-12480,12482-12490,12494-12495,12499-12502,12507,12509-12510,12512,12514-12520,12522,12525-12531,12534-12540,12542,12545,12548-12554,12557-12561,12564,12566-12568,12571,12574-12576,12578,12580,12583-12584,12586-12587,12589,12592-12593,12595,12598-12600,12602,12604-12609,12611-12615,12617,12619-12621,12623,12625,12629-12631,12633-12635,12637,12639,12642,12644,12647-12653,12656,12658,12660,12662-12663,12665-12666,12668,12670-12674,12676,12678-12694,12696,12698-12704,12708-12710,12712-12718,12720-12721,12723-12729,12731-12736,12738-12742,12745-12751,12754-12756,12758-12770,12772-12780,12782-12784,12786,12788-12791,12793-12798,12800,12803,12806-12808,12810-12812,12814,12816-12817,12819-12820,12825-12826,12829-12833,12837,12839-12841,12847,12849-12850,12852-12859,12863-12866,12868-12870,12872-12874,12876-12878,12880-12883,12885-12888,12890-12892,12894-12895,12899-12906,12908-12915,12918-12919,12921-12922,12924-12934,12937-12940,12943-12944,12947,12950-12952,12955-12962,12964,12967-12969,12971,12973-12974,12976-12977,12979-12989,12991-12993,12997-12999,13001-13002,13006-13007,13012-13015,13017-13020,13022-13024,13026-13031,13033,13035-13037,13039-13040,13043,13046-13052,13055-13060,13062-13069,13071-13072,13074,13076-13084,13088-13093,13095-13101,13103-13104,13106,13108-13110,13112,13114-13120,13122,13125-13126,13129,13132-13136,13139-13140,13142 via svnmerge from
http://svn.openlaszlo.org/openlaszlo/trunk
.......
r12340 | bargull | 2009-01-07 13:28:41 -0500 (Wed, 07 Jan 2009) | 26 lines
Change 20090107-bargull-GQP by bargull at dell--p4--2-53 on 2009-01-07 19:19:39
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: two small Laszlo in 10 Minutes fixes
New Features:
Bugs Fixed: LPP-7506, LPP-7579
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Fix color by using "lz.colors" and remove copyright from css-example.
skip-pre-commit-checks
Tests:
.......
r13142 | ptw | 2009-03-03 15:22:54 -0500 (Tue, 03 Mar 2009) | 30 lines
Change 20090227-ptw-e by ptw at dueling-banjos.home on 2009-02-27 14:50:27 EST
in /Users/ptw/OpenLaszlo/trunk-3
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Correct implementation of LzText/getTextSize
Bugs Fixed: LPP-7569 Text in scrolledittext flips after 13 characters.
Technical Reviewer: a.bargull at intensis.de, max (Message-ID: <49A935D0.40208 at udo.edu>, Message-ID: <49A8ACA3.4000300 at openlaszlo.org>)
QA Reviewer: aalappat at laszlosystems.com (pending)
Details:
*: Note LPP-7832
LzInputTextSprite.as: Remove incorrect override of
getTextfieldHeight
LzText: call correct kernel API
lztest-textheight: Update test to match expected values per API
documentation. There is still one regression:
ERROR @lztest/lztestmanager.lzx#194: In suite Text Size Test Suite, test 1, failed assertion: multiline6 text height within 43?\194?\1770 got 56
which is due to LPP-7841.
Tests:
Test case from bug report, smokecheck, sample apps
.......
Property changes on: openlaszlo/branches/4.2
___________________________________________________________________
Name: svnmerge-integrated
- /openlaszlo/branches/4.1:1-10153 /openlaszlo/branches/devildog:1-8432 /openlaszlo/branches/pagan-deities:1-7955,8825,10756-10920,10922-10928,10930-10935,11151,11207,11554 /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-12154,12172-12175,12177-12185,12187-12194,12196,12201,12208,12229,12251-12252,12254-12255,12257-12258,12260,12262-12266,12268-12269,12271-12275,12278-12285,12303,12318-12323,12345,12360,12403,12420,12424,12429,12457,12473,12477,12493-12495,12499-12502,12507-12510,12512,12514-12520,12522,12525-12531,12534-12540,12542,12545,12548-12554,12557-12561,12564,12566-12568,12571,12574-12576,12578,12580,12583-12584,12586-12587,12589,12592-12596,12598-12600,12602-12609,12611-12615,12617,12619-12621,12623,12625,12629-12631,12633-12635,12637,12639,12642,12644,12647-12653,12656,12658,12660,12662-12666,12668-12694,12696,12698-12704,12708-12710,12712-12721,12723-12729,12731-12742,12745-12752,12754-12784,12786-12791,12793-12798,12800-12801,12803,12805-12808,12810-12812,12814,12816-12821,12825-12833,12835-12837,12839-12841,12847,12849-12850,12852-12859,12863-12883,12885-12895,12897-12906,12908-12915,12917-12922,12924-12934,12937-12940,12943-12944,12946-12947,12950-12952,12955-12964,12966-12969,12971,12973-12977,12979-12993,12997-12999,13001-13003,13006-13007,13010-13011,13085,13087
+ /openlaszlo/branches/4.1:1-10153 /openlaszlo/branches/devildog:1-8432 /openlaszlo/branches/pagan-deities:1-7955,8825,10756-10920,10922-10928,10930-10935,11151,11207,11554 /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-12154,12172-12175,12177-12185,12187-12194,12196,12201,12208,12229,12251-12252,12254-12255,12257-12258,12260,12262-12266,12268-12269,12271-12275,12278-12285,12303,12318-12323,12340-12348,12352,12354-12358,12360-12361,12363,12365-12367,12369-12371,12375-12378,12380-12389,12391,12394-12396,12399-12400,12402-12403,12406-12416,12419-12422,12424-12429,12431-12433,12435,12437-12441,12443,12445,12447,12449-12451,12453-12454,12457-12460,12464,12466-12475,12477-12480,12482-12490,12493-12495,12499-12502,12507-12510,12512,12514-12520,12522,12525-12531,12534-12540,12542,12545,12548-12554,12557-12561,12564,12566-12568,12571,12574-12576,12578,12580,12583-12584,12586-12587,12589,12592-12596,12598-12600,12602-12609,12611-12615,12617,12619-12621,12623,12625,12629-12631,12633-12635,12637,12639,12642,12644,12647-12653,12656,12658,12660,12662-12666,12668-12694,12696,12698-12704,12708-12710,12712-12721,12723-12729,12731-12742,12745-12752,12754-12784,12786-12791,12793-12798,12800-12801,12803,12805-12808,12810-12812,12814,12816-12821,12825-12833,12835-12837,12839-12841,12847,12849-12850,12852-12859,12863-12883,12885-12895,12897-12906,12908-12915,12917-12922,12924-12934,12937-12940,12943-12944,12946-12947,12950-12952,12955-12964,12966-12969,12971,12973-12977,12979-12993,12997-12999,13001-13003,13006-13007,13010-13015,13017-13020,13022-13024,13026-13031,13033,13035-13037,13039-13040,13043,13046-13052,13055-13060,13062-13069,13071-13072,13074,13076-13085,13087-13093,13095-13101,13103-13104,13106,13108-13110,13112,13114-13120,13122,13125-13126,13129,13132-13136,13139-13140,13142
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js 2009-03-03 21:25:59 UTC (rev 13143)
@@ -184,6 +184,7 @@
return this.getTextSize(this.text, this.resize).width;
}
+// TODO [2009-02-27 ptw] (LPP-7832) Rename to get LineHeight
LzTextSprite.prototype.getTextHeight = function () {
var h = this.getTextSize(null, true).height;
if (h > 0 && this.quirks.emulate_flash_font_metrics) {
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2009-03-03 21:25:59 UTC (rev 13143)
@@ -1,7 +1,7 @@
/**
* LzInputTextSprite.as
*
- * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2009 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -276,10 +276,6 @@
this.__LZtextclip.html = htmlp;
}
-LzInputTextSprite.prototype.getTextfieldHeight = function ( ){
- return this.__LZtextclip._height
-}
-
// This is the text without any formatting
LzInputTextSprite.prototype.getText = function ( ){
// We normalize swf's \r to \n
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2009-03-03 21:25:59 UTC (rev 13143)
@@ -314,6 +314,8 @@
* a.bargull at intensis.de for finding this illustration, which shows
* the relationship of textHeight and textfieldHeight:
* http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/images/text-metrics.jpg
+ *
+ * TODO [2009-02-27 ptw] (LPP-7832) Rename to get LineHeight
*/
LzTextSprite.prototype.getTextHeight = function ( ){
if (! this.multiline) {
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as 2009-03-03 21:25:59 UTC (rev 13143)
@@ -166,10 +166,6 @@
}
}
- override public function getTextfieldHeight () {
- return this.textfield.height;
- }
-
/**
* If a mouse event occurs in an input text field, find the focused view
*/
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as 2009-03-03 21:25:59 UTC (rev 13143)
@@ -450,6 +450,7 @@
return twidth;
}
+ // TODO [2009-02-27 ptw] (LPP-7832) Rename to get LineHeight
public function getTextHeight ( ):Number {
return this.textfield.textHeight;
}
Modified: openlaszlo/branches/4.2/WEB-INF/lps/lfc/views/LzText.lzs
===================================================================
--- openlaszlo/branches/4.2/WEB-INF/lps/lfc/views/LzText.lzs 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/WEB-INF/lps/lfc/views/LzText.lzs 2009-03-03 21:25:59 UTC (rev 13143)
@@ -692,8 +692,7 @@
*/
function getTextHeight ( ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
- return tsprite.getTextHeight();
- //return this.__LZtextclip.textHeight;
+ return tsprite.getTextfieldHeight();
}
/** @access private */
function $lzc$getTextHeight_dependencies ( who , self){
Modified: openlaszlo/branches/4.2/laszlo-explorer/constraints/css.lzx
===================================================================
--- openlaszlo/branches/4.2/laszlo-explorer/constraints/css.lzx 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/laszlo-explorer/constraints/css.lzx 2009-03-03 21:25:59 UTC (rev 13143)
@@ -9,10 +9,6 @@
<class name="stylableclass" bgcolor="$style{'backgroundColor'}">
<text fontsize="24" fgcolor="$style{'textColor'}">stylableclass</text>
</class>
-
+
<stylableclass/>
</canvas>
-<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
-* Use is subject to license terms. *
-* X_LZ_COPYRIGHT_END ****************************************************** -->
\ No newline at end of file
Modified: openlaszlo/branches/4.2/laszlo-explorer/scripting/events.lzx
===================================================================
--- openlaszlo/branches/4.2/laszlo-explorer/scripting/events.lzx 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/laszlo-explorer/scripting/events.lzx 2009-03-03 21:25:59 UTC (rev 13143)
@@ -1,12 +1,12 @@
<canvas>
<button onclick="vw.setAttribute('width', 200)">Expand Width</button>
<button x="120" onclick="vw.setAttribute('width', 100)">Reset</button>
-
+
<view id="vw" y="30" width="100" height="100" >
-
- <!-- onwidth is sent anytime width is changed -->
- <handler name="onwidth" >
- this.setAttribute('bgcolor', (this.width > 100 ? red : blue));
+
+ <!-- onwidth is sent anytime width is changed -->
+ <handler name="onwidth" >
+ this.setAttribute('bgcolor', (this.width > 100 ? lz.colors.red : lz.colors.blue));
</handler>
</view>
</canvas>
Modified: openlaszlo/branches/4.2/test/lztest/lztest-textheight.lzx
===================================================================
--- openlaszlo/branches/4.2/test/lztest/lztest-textheight.lzx 2009-03-03 20:22:54 UTC (rev 13142)
+++ openlaszlo/branches/4.2/test/lztest/lztest-textheight.lzx 2009-03-03 21:25:59 UTC (rev 13143)
@@ -127,17 +127,21 @@
LzTestManager.assertEquals(56, t11.height, "multiline11 text height");
LzTestManager.assertEquals(225, t12.height, "EXPECTED: see LPP-6545. text12 height");
- LzTestManager.assertEquals(40, a.sprite.getTextfieldHeight(), "EXPECTED: see LPP-6543. text a getTextfieldHeight()");
- LzTestManager.assertEquals(40, a.height, "text a getTextfieldHeight()");
- LzTestManager.assertEquals(13, a.sprite.getTextHeight(), "text a getTextHeight()");
- LzTestManager.assertEquals(82, b.sprite.getTextfieldHeight(), "text b getTextfieldHeight()");
- LzTestManager.assertEquals(13, b.sprite.getTextHeight(), "text b getTextHeight()");
+ // multiline/fixed: height is the size, the other measures reflect the size of the content (which wraps)
+ LzTestManager.assertEquals(82, a.sprite.getTextfieldHeight(), "text a sprite.getTextfieldHeight()");
+ LzTestManager.assertEquals(40, a.height, "text a height");
+ LzTestManager.assertEquals(82, a.getTextHeight(), "text a getTextHeight()");
+ // multiline/resize: all values should reflect the size of the content (which wraps)
+ LzTestManager.assertEquals(82, b.sprite.getTextfieldHeight(), "text b sprite.getTextfieldHeight()");
+ LzTestManager.assertEquals(82, b.getTextHeight(), "text b getTextHeight()");
LzTestManager.assertEquals(82, b.height, "text b getTextfieldHeight()");
- LzTestManager.assertEquals(40, e.sprite.getTextfieldHeight(), "EXPECTED: see LPP-6543. text e getTextfieldHeight()");
- LzTestManager.assertEquals(13, e.sprite.getTextHeight(), "text e getTextHeight()");
+ // single line/fixed: content should be 1 line high, because it does not wrap
+ LzTestManager.assertEquals(17, e.sprite.getTextfieldHeight(), "text e sprite.getTextfieldHeight()");
+ LzTestManager.assertEquals(17, e.getTextHeight(), "text e getTextHeight()");
LzTestManager.assertEquals(40, e.height, "text e getTextfieldHeight()");
+ // single line/resize: all values should reflect the size of the content (a single line)
LzTestManager.assertEquals(17, f.sprite.getTextfieldHeight(), "text f getTextfieldHeight()");
- LzTestManager.assertEquals(13, f.sprite.getTextHeight(), "text f getTextHeight()");
+ LzTestManager.assertEquals(17, f.getTextHeight(), "text f getTextHeight()");
LzTestManager.assertEquals(17, f.height, "text f getTextfieldHeight()");
LzTestManager.assertEquals(28, t13.height, "text13 height");
@@ -167,17 +171,21 @@
LzTestManager.assertEquals(17, tempty.height, "tempty.height");
LzTestManager.assertEquals(30, thepost.height, "thepost height");
- LzTestManager.assertEquals(40, c.sprite.getTextfieldHeight(), "EXPECTED: see LPP-6543. inputtext c getTextfieldHeight()");
- LzTestManager.assertEquals(13, c.sprite.getTextHeight(), "inputtext c getTextHeight()");
+ // multiline/fixed: height is the size, the other measures reflect the size of the content (which wraps)
+ LzTestManager.assertEquals(82, c.sprite.getTextfieldHeight(), "inputtext c sprite.getTextfieldHeight()");
+ LzTestManager.assertEquals(82, c.getTextHeight(), "inputtext c getTextHeight()");
LzTestManager.assertEquals(40, c.height, "inputtext c height");
+ // multiline/resize: all values should reflect the size of the content (which wraps)
LzTestManager.assertEquals(82, d.sprite.getTextfieldHeight(), "inputtext d getTextfieldHeight()");
- LzTestManager.assertEquals(13, d.sprite.getTextHeight(), "inputtext d getTextHeight()");
+ LzTestManager.assertEquals(82, d.getTextHeight(), "inputtext d getTextHeight()");
LzTestManager.assertEquals(82, d.height, "inputtext d height");
- LzTestManager.assertEquals(40, g.sprite.getTextfieldHeight(), "EXPECTED: see LPP-6543. inputtext g getTextfieldHeight()");
- LzTestManager.assertEquals(13, g.sprite.getTextHeight(), "inputtext g getTextHeight()");
+ // single line/fixed: content should be 1 line high, because it does not wrap
+ LzTestManager.assertEquals(17, g.sprite.getTextfieldHeight(), "inputtext g sprite.getTextfieldHeight()");
+ LzTestManager.assertEquals(17, g.getTextHeight(), "inputtext g getTextHeight()");
LzTestManager.assertEquals(40, g.height, "inputtext g height");
- LzTestManager.assertEquals(17, h.sprite.getTextfieldHeight(), "inputtext h getTextfieldHeight()");
- LzTestManager.assertEquals(13, h.sprite.getTextHeight(), "inputtext h getTextHeight()");
+ // single line/resize: all values should reflect the size of the content (a single line)
+ LzTestManager.assertEquals(17, h.sprite.getTextfieldHeight(), "inputtext h sprite.getTextfieldHeight()");
+ LzTestManager.assertEquals(17, h.getTextHeight(), "inputtext h getTextHeight()");
LzTestManager.assertEquals(17, h.height, "inputtext h height");
}
More information about the Laszlo-checkins
mailing list