Bug 36584 - Frameset body "rows" and "cols" attribute does not reflect current frame size
Summary: Frameset body "rows" and "cols" attribute does not reflect current frame size
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 00:49 PDT by Marc Bonnier
Modified: 2023-05-30 09:50 PDT (History)
6 users (show)

See Also:


Attachments
Test case (679 bytes, text/html)
2010-03-25 00:51 PDT, Marc Bonnier
no flags Details
Demonstrates the bug with retrieving and setting frameset cols attribute with JS (44 bytes, text/plain)
2010-07-08 07:46 PDT, Tim Green
no flags Details
Test Case (41 bytes, text/plain)
2010-07-08 07:59 PDT, Tim Green
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Bonnier 2010-03-25 00:49:34 PDT
When a frameset's frame is resized by the user, the value of the "rows" or "cols" attribute are not set with the new current value but, rather stays at the original static document value. This is not critical since these values can be deduced using frame size.

Yet, if a user resize a frame and we want to reset it to the original value using JavaScript then, this won't work since the attribute value being still at the original value, setting it to the same 'original' value will not trigger a DOM update.

The ideal fix would be to always reflect the current size in "rows" and "cols" attributes. A workaround would be to force a DOM update even if we set the attribute with the same value.
Comment 1 Marc Bonnier 2010-03-25 00:51:23 PDT
Created attachment 51603 [details]
Test case
Comment 2 Tim Green 2010-07-08 07:46:58 PDT
Created attachment 60877 [details]
Demonstrates the bug with retrieving and setting frameset cols attribute with JS

Demonstrates that the bug effects both retrieving and setting frameset attributes, and that it makes it impossible to set frameset dimensions correctly with JS.
Comment 3 Tim Green 2010-07-08 07:50:19 PDT
See my attached demo case. Current versions of Safari and Chrome on both Mac OS X and Windows are all affected. This bug is actually critical as it makes it impossible to set frameset dimensions with JS. In addition to failing to retrieve the dimensions after the frame border has been moved by the user, Webkit browsers also set the cols and rows dimensions incorrectly if the frame border has been moved. The amount of the move by the user is added as a positive or negative offset, producing broken results. 

There appears to be no workaround for this because the browsers are both reporting the current values incorrectly and applying an offset to any values set with JS.
Comment 4 Tim Green 2010-07-08 07:59:57 PDT
Created attachment 60880 [details]
Test Case

Direct link to test case demonstrating and explaining the bug and showing its negative consequences.
Comment 5 Eugene 2011-09-07 23:30:13 PDT
Chrome version 13.0.782.220 m Windows
Safari version 5.1 (6534.50) Mac

This bug is very critical and reproduced on both browsers.

Steps to reproduced:
    1) Please open this page: http://www.w3schools.com/jsref/tryit.asp?   
        filename=tryjsref_frameset_rows  
    2) Resize frame 
    3) Click on buttons "Restore" (set value to rows '50%, 50%') or "Change" (set  
        value to rows '30%, 70%')

Actual Behavior:
   When setting values to rows after resizing, frames must match the exact size specified in frameset rows
Expected Behavior:
   When setting values to rows after resizing, frames must match the exact size specified in frameset rows
Comment 6 Eugene 2011-09-07 23:31:52 PDT
Mistake in Actual Behavior:
    When setting values to rows after resizing, frames no match the exact size 
     specified in frameset rows
Comment 8 Igor 2014-12-29 02:38:38 PST
Several years past and this bug haven't been fixed yet. Still works in chrome 39.0.2171.95 m. Can be tested on page http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_frameset_rows
Comment 9 Ahmad Saleem 2023-05-30 09:49:57 PDT
Taking: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_frameset_rows

*** Chrome Canary 116 & Safari 16.5 ***

1) Resize 'Frame A' to bottom
2) Click 'Change row size' and then restore.

Result: user resize remains and 'restore' to user resize

*** Firefox Nightly 115 ***

Disregard user resize

_________________

Just wanted to share my testing result, if I did incorrect testing, please share updated (would be good for learning).