Bug 129780 - [CSSRegions] offsetParent is wrong for an element in a flow without regions
Summary: [CSSRegions] offsetParent is wrong for an element in a flow without regions
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Radu Stavila
URL:
Keywords:
Depends on:
Blocks: 128165
  Show dependency treegraph
 
Reported: 2014-03-05 22:19 PST by Mihnea Ovidenie
Modified: 2022-07-12 17:21 PDT (History)
7 users (show)

See Also:


Attachments
Patch (14.26 KB, patch)
2014-04-24 04:02 PDT, Radu Stavila
no flags Details | Formatted Diff | Diff
Expanded test (15.97 KB, patch)
2014-04-24 06:14 PDT, Radu Stavila
abucur: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.