Bug 129780

Summary: [CSSRegions] offsetParent is wrong for an element in a flow without regions
Product: WebKit Reporter: Mihnea Ovidenie <mihnea>
Component: CSSAssignee: Radu Stavila <stavila>
Status: RESOLVED WONTFIX    
Severity: Normal CC: bfulgham, commit-queue, esprehn+autocc, glenn, kondapallykalyan, stearns, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 128165    
Attachments:
Description Flags
Patch
none
Expanded test abucur: review-

Description Mihnea Ovidenie 2014-03-05 22:19:48 PST
Assume you have an element in a flow that does not have a region chain. Because of that, the element is not visually formatted which means that offsetParent should return null, while currently it returns a different value.

I believe this is the case for other API's like offsetLeft, offsetTop, offsetHeight, offsetWidth, getClientRect, getBoundingClientRect etc.
Comment 1 Alan Stearns 2014-03-06 08:18:15 PST
Also, the x and y attributes on an image should return 0 if the image is in a named flow with no region chain.
Comment 2 Radu Stavila 2014-04-24 04:02:57 PDT
Created attachment 230069 [details]
Patch
Comment 3 Radu Stavila 2014-04-24 06:14:28 PDT
Created attachment 230072 [details]
Expanded test
Comment 4 Andrei Bucur 2014-04-24 22:39:42 PDT
Comment on attachment 230072 [details]
Expanded test

I think this creates a new spectrum of invasiveness and complexity we should try to avoid. If we go on this path, we'll have to patch all the offset* properties and this increases the maintenance burden for all the project. Maybe we can find a more localised solution.
Comment 5 Brent Fulgham 2022-07-12 17:21:10 PDT
CSS Regions were removed in Bug 174978.