Bug 71945 - Eliminate the notion of a window coordinate system from WebCore
Summary: Eliminate the notion of a window coordinate system from WebCore
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 71954 71947 71955 72338 72397 72408 73352
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-09 13:00 PST by Anders Carlsson
Modified: 2011-11-29 13:16 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-11-09 13:00:42 PST
WebCore shouldn't need to know anything about window coordinates - especially not in Chromium and WebKit2 where the WebCore widget hierarchy is in a completely different process from the actual window!

We should try to eliminate calls to convertToContainingWindow/convertFromContainingWindow etc and replace them with convertToRootView/convertFromRootView.

The only case where window coordinates are important is in Mac WebKit1 due to the way it works with AppKit, but we should try to keep that code in the WebKit1 code.
Comment 1 Simon Fraser (smfr) 2011-11-09 13:07:05 PST
Awesome plan!
Comment 2 Darin Adler 2011-11-09 16:11:28 PST
Don’t window coordinates matter for things like window.screen, window.screenLeft, window.screenTop, window.innerHeight, window.outerHeight?
Comment 3 Anders Carlsson 2011-11-29 13:16:03 PST
(In reply to comment #2)
> Don’t window coordinates matter for things like window.screen, window.screenLeft, window.screenTop, window.innerHeight, window.outerHeight?

Nope. for window.outerHeight/window.innerHeight we have a ChromeClient function to get the window rect (in screen coordinates). Nowhere in WebCore itself do we need to use window coordinates.