Bug 109286 - Web Inspector: Avoid using offsetWidth/offsetHeight in SplitView
Summary: Web Inspector: Avoid using offsetWidth/offsetHeight in SplitView
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vladislav Kaznacheev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 04:40 PST by Vladislav Kaznacheev
Modified: 2013-02-14 04:29 PST (History)
8 users (show)

See Also:


Attachments
Patch (3.90 KB, patch)
2013-02-08 04:42 PST, Vladislav Kaznacheev
pfeldman: review-
pfeldman: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladislav Kaznacheev 2013-02-08 04:40:39 PST
Currently the SplitView code relies on offsetWidth/offsetHeight to get the dimension which is constant and set in CSS.
Comment 1 Vladislav Kaznacheev 2013-02-08 04:42:49 PST
Created attachment 187290 [details]
Patch
Comment 2 Pavel Feldman 2013-02-08 04:57:29 PST
Comment on attachment 187290 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=187290&action=review

> Source/WebCore/inspector/front-end/SplitView.js:-295
> -            var resizerWidth = this._resizerElement.offsetWidth;

Why making resize 0-width? You should simply cache the value or calculate it before you damage layout in _removeAllLayoutProperties above.
Comment 3 Pavel Feldman 2013-02-08 05:02:17 PST
Comment on attachment 187290 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=187290&action=review

>> Source/WebCore/inspector/front-end/SplitView.js:-295
>> -            var resizerWidth = this._resizerElement.offsetWidth;
> 
> Why making resize 0-width? You should simply cache the value or calculate it before you damage layout in _removeAllLayoutProperties above.

Ok, taking it back - Vsevolod explained to me that it did not change. But why duping -2.5 for 5?
Comment 4 Vsevolod Vlasov 2013-02-08 05:37:14 PST
As discussed offline with Pavel splitter should hover equally on both side of the split view by default. Let's cache offsetWidth once and keep division by 2 for now.