Bug 113694

Summary: Web Inspector: [DataGrid] Reject resizing columns to inacceptible widths.
Product: WebKit Reporter: Eugene Klyuchnikov <eustas>
Component: Web Inspector (Deprecated)Assignee: Eugene Klyuchnikov <eustas>
Status: RESOLVED WONTFIX    
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 112666    
Attachments:
Description Flags
Patch pfeldman: review-

Eugene Klyuchnikov
Reported 2013-04-01 02:22:03 PDT
In DataGrid column width constrain misbehaves in case when user tries to drag resizer between two thin columns. That is because Number.constrain input parameters are inconsistent (maximum < minimum). Additional restriction: columns with width specified by weight should not be thinner than 1 weight point. If user doesn't want to see column he should hide it completely.
Attachments
Patch (3.58 KB, patch)
2013-04-01 02:37 PDT, Eugene Klyuchnikov
pfeldman: review-
Eugene Klyuchnikov
Comment 1 2013-04-01 02:37:55 PDT
Pavel Feldman
Comment 2 2013-04-01 05:10:37 PDT
Comment on attachment 195946 [details] Patch Could you provide a test? Implementation looks fragile.
Eugene Klyuchnikov
Comment 3 2013-04-01 23:49:56 PDT
Actually this patch consists of 3 changes that doesn't look fragile: 1) Ensure that constraint is correct. If constraint is incorrect, then we can't apply this. That way we will prevent making columns thinner (that they were before dragging) 2) Move weight-assigning block up, before styles are changed. This change itself doesn't change behavior. But it is required for change (3) 3) Split new weight calculation and assigning. Add minimal weight constraint. Because of change (2) "return" statement will leave columns consistent, as nothing has been changed up to this moment. OK, I'll try to add test for this.
Note You need to log in before you can comment on or make changes to this bug.