History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5309
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Michael Kroll
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Window Resize with Safari

Created: 21/Dec/07 07:01 AM   Updated: 29/Jan/08 01:42 PM
Component/s: Components - base
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

File Attachments: 1. File canvas_resize.lzx (0.4 kb)

Image Attachments:

1. dhtml.png
(61 kb)

2. swf7.png
(61 kb)
Environment: WindowsXP SP2, MacOS 10.5.1, Firefox 2.0.0.11 (Win/Mac), Safari 3.0.4 (Mac)

Severity: Major
Fixed in Change#: 7,722
Runtime: N/A
Fix in hand: False


 Description  « Hide
just created a small testcase where the following issues can be shown:
The tests I made are against the dhtml runtime of RingDing build 7562.

On FireFox2 on Win and MacOS it runs fine. IE7 also working good. With Firefox on MacOS it runs as expected
since it works on Win as well. So the problem ist Safari. While maximizing the window the centered text in the middle of the window
and the box in the lower right corner are moved. But if you minimize the window nothing happens. In my big application downscaling the
window size of the browser results in an upscaling of the canvas :-( Maybe there is a contraint issue, too.

If the canvas_resize test is not run is solo mode you can see, that the debug window overlaps the canvas (here the red box in the lower right corner) in safari.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Michael Kroll - 21/Dec/07 07:02 AM
The testcase in order to reproduce the issue.

Michael Kroll - 21/Dec/07 07:05 AM
Screehshot illustrating the issue in dhtml runtime

Michael Kroll - 21/Dec/07 07:05 AM
screenshot illustrating how it should look like :-) Works in swf runtime.

Max Carlson - 03/Jan/08 06:41 PM
Author: max
Date: 2008-01-03 18:35:13 -0800 (Thu, 03 Jan 2008)
New Revision: 7722

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzScreenKernel.js
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20080101-maxcarlson-f by maxcarlson@Roboto.lan on 2008-01-01 23:31:02 PST
    in /Users/maxcarlson/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: UPDATED: Fix resizing in Safari

New Features:

Bugs Fixed: LPP-5309 - Window Resize with Safari

Technical Reviewer: ptw
QA Reviewer: promanik
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: LzSprite.js - Add document_size_use_offsetheight and set to true in
Safari and Opera.

LzScreenKernel.js - Use offsetWidth/Height if document_size_use_offsetheight is
true. Clean up tests to use sc.

Tests: See LPP-5309. Tested in Firefox, Opera and Safari 3 on OS X and Safari, IE 6 and 7 in windoze.



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzScreenKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzScreenKernel.js 2008-01-04 02:32:28 UTC (rev 7721)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzScreenKernel.js 2008-01-04 02:35:13 UTC (rev 7722)
@@ -1,7 +1,7 @@
 /**
   * LzScreenKernel.js
   *
- * @copyright Copyright 2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2007-2008 Laszlo Systems, Inc. All Rights Reserved.
   * Use is subject to license terms.
   *
   * @topic Kernel
@@ -16,21 +16,25 @@
     ,__resizeEvent: function() {
         // thanks quirksmode! http://www.quirksmode.org/viewport/compatibility.html
 
- if (window.top.innerHeight) {
+ var sc = window.top.document.body;
+ if (LzSprite.prototype.quirks.document_size_use_offsetheight) {
+ sc = window.document.body;
+ LzScreenKernel.width = sc.offsetWidth;
+ LzScreenKernel.height = sc.offsetHeight;
+ } else if (window.top.innerHeight) {
             // all except Explorer
- var sc = window.top.document.body;
- LzScreenKernel.width = sc.scrollWidth;
- LzScreenKernel.height = sc.scrollHeight;
+ sc = window;
+ LzScreenKernel.width = sc.innerWidth;
+ LzScreenKernel.height = sc.innerHeight;
         } else if (window.top.document.documentElement && window.top.document.documentElement.clientHeight) {
             // Explorer 6 Strict Mode
- var sc = window.top.document.documentElement;
+ sc = window.top.document.documentElement;
             LzScreenKernel.width = sc.clientWidth;
             LzScreenKernel.height = sc.clientHeight;
- } else if (window.top.document.body) {
+ } else if (sc) {
             // other Explorers
- var sc = window.top.document.body;
- LzScreenKernel.width = window.top.document.body.clientWidth;
- LzScreenKernel.height = window.top.document.body.clientHeight;
+ LzScreenKernel.width = sc.clientWidth;
+ LzScreenKernel.height = sc.clientHeight;
         }
 
         /*
@@ -51,7 +55,7 @@
         //Debug.write('LzScreenKernel event', {width: LzScreenKernel.width, height: LzScreenKernel.height});
     }
     ,__init: function() {
- Lz.attachEventHandler(window, 'resize', LzScreenKernel, '__resizeEvent');
+ Lz.attachEventHandler(window.top, 'resize', LzScreenKernel, '__resizeEvent');
     }
     ,__callback: null
     ,__scope: null

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-01-04 02:32:28 UTC (rev 7721)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-01-04 02:35:13 UTC (rev 7722)
@@ -1,7 +1,7 @@
 /**
   * LzSprite.js
   *
- * @copyright Copyright 2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2007-2008 Laszlo Systems, Inc. All Rights Reserved.
   * Use is subject to license terms.
   *
   * @topic Kernel
@@ -226,6 +226,7 @@
     ,ie_opacity: false
     ,text_measurement_use_insertadjacenthtml: false
     ,text_selection_use_range: false
+ ,document_size_use_offsetheight: false
 }
 
 LzSprite.prototype.capabilities = {
@@ -306,6 +307,7 @@
             quirks['safari_visibility_instead_of_display'] = true;
             quirks['absolute_position_accounts_for_offset'] = true;
             quirks['canvas_div_cannot_be_clipped'] = true;
+ quirks['document_size_use_offsetheight'] = true;
             if (Lz.__BrowserDetect.version > 523.10) {
                 this.capabilities['rotation'] = true;
             }
@@ -315,6 +317,7 @@
             quirks['no_cursor_colresize'] = true;
             quirks['absolute_position_accounts_for_offset'] = true;
             quirks['canvas_div_cannot_be_clipped'] = true;
+ quirks['document_size_use_offsetheight'] = true;
         } else if (Lz.__BrowserDetect.isFirefox && Lz.__BrowserDetect.version < 2) {
                 // see http://groups.google.ca/group/netscape.public.mozilla.dom/browse_thread/thread/821271ca11a1bdbf/46c87b49c026246f?lnk=st&q=+focus+nsIAutoCompletePopup+selectedIndex&rnum=1
                 quirks['firefox_autocomplete_bug'] = true;


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Mamye Kratt - 29/Jan/08 01:42 PM
(trunk 4 local build r7915)
Example in bug works in Safari now. Checked FF too.