Intent to Deprecate: Element.offsetParent/offsetTop/offsetTop/offsetWidth/offsetHeight

648 views
Skip to first unread message

Tanay

unread,
Jul 2, 2015, 2:56:50 AM7/2/15
to blin...@chromium.org, phi...@opera.com
Summary
In CSSOM, these are only defined on HTMLElement:

In Blink they're on Element, HTMLElement and SVGElement. It's only for HTML and SVG elements that they do anything, in the Element case they will always return null/0.

Motivation
In below link, it has been discussed to deprecate these methods

Compatibility Risk
Low.Since the usage counters show low usage.  

Usage information from UseCounter


OWP launch tracking bug

Entry on the feature dashboard
none.

Tanay

Philip Jägenstedt

unread,
Jul 2, 2015, 4:32:12 AM7/2/15
to Tanay, blink-dev
LGTM

In Gecko and IE these attributes are only on HTMLElement, which makes
the risk seem very low to me. Still, there's no hurry and a
deprecation period might flush out something interesting. If the
deprecation lands in time for M45, I just doing the removal in M47, so
deprecation messages on this form:

'Element.offsetParent' is deprecated and will be removed in M47,
around November 2015. The offset* attributes are only standardized and
widely supported for HTML elements.

Philip

bmpb.n...@gmail.com

unread,
Sep 26, 2015, 4:23:47 PM9/26/15
to blink-dev, phi...@opera.com

I AM NOT IN ANY GROUP... BUT WHATEVER IS ON MY COMPUTER AND MY SAMSUNG GALAXY S5 FROM VERIZON.... IS RIDICULOUS!!   

HOW CAN SOMEONE HAVE ACCESS TO MY ACCOUNTS.. I CREATE A NEW ONE AND IT STARTS OVER... THEN ACCESS IS GRANTED FROM LESS SECURE APPS. THEN I DO NOT HAVE FULL ACCESS TO MY OWN ACCOUNT!!!!   

WHAT HAVE YOU PEOPLE CREATED!!!

WHAT IS APMetrics_v2

WHY DO THESE LOGS SHOW ON MY PHONE AND MY CHILDRENS?

I GOT A NEW PHONE, NEW SIM DID NOT SYNC IT YET THIS CRAP SHOWS BACK UP... BEFORE EVERYTHING WAS BEING SENT TO AMAZON MUSIC THROUGH VIRTUAL VOICEMAIL... PROGRAMS LIKE SANDBOX AND LIFECYCLE AND LEGECY I AM SEEING..... EVERYDAY INFORMATION.....  PRIVATE INFORMATION BEING TAKEN OFF OUR PHONES THROUGH SFINDER... GOOGLE PASSWORDS BEING RESET CONSTANTLY. DEVICE MANAGER LOCKING US OUT, BLUETOOTH TURNING ON. FREQUENCY CHANGING FROM 4G TO 1xRTT VERIZON EXECUTIVES HAVE NO IDEA.  

I LOST MY SCHOLARSHIP BECAUSE A STALKER ACCESSES MY ACCOUNTS AND DELETES MY WORK, PUTS HTML LINKS ON PRIVATE PICTURES, GOOGLE LOCATIONS....OMG....CONSTANTLY BEING LOCATED...MY PHONES BURN UP!!!  BEFORE THE GOOGLE LOCATION WAS CHANGE... ON THE BOTTOM OF THE SCREEN THERE WAS BLUE WAVES OF THE TIME AND SIGNAL... MINE.... LOOKED INSANE...MAYBE BECAUSE I HAD FILES FROM SOMEWHERE SHOW THAT SAID TOGGLE, ACROSS PROMOTE, PHASE TIME,,, 

I AM A MOM..OF 4 GIRLS, NOT ANYONE SPECIAL. I AM GOING BACK TO COLLEGE BECAUSE I GOT OUT OF THE MILITARY. MY KIDS GOT SICK AND THEIR FATHER WAS IN THE MARINES. I HAVE HAD TO FIGURE OUT SOME OF THIS NONSENSE BECAUSE SOME HOW THE HOTSPOT ON MY ACCOUNT TURNED ON. I STARTED GETTING BILLS AND DATA OVERAGE FOR 210.00 AND 90.00. ONE REPLACEMENT PHONE I ONLY HAD 4 DAYS BEFORE THE WIFI QUIT WORKING BECAUSE THE PHONE SCREEN LOOKED LIKE.... ref.  RADAR JAMMING....  NO ONE HELPS WITH THIS.. POLICE, VERIZON, SAMSUNG, GOOGLE, FBI, ATTORNEY GENERAL, HOMELAND SECURITY.. I HAD A JOINT INT BULLETIN IN MY EMAIL. THAT WASN'T MEANT FOR WHOMEVER TO REVIEW.

I HAVE LEARNED THAT GOOGLE WEB DEV, BOOLEAN, SANDBOX, NEW RELEC, STACK OVERFLOW, I KNEW THE CONCEPT OF ANALYTICS WHEN I HELP WITH E COMMERCE AND VERY BASIC HTML....  AND I KNOW THIS IS ALL IN CAPITAL LETTERS....I AM SO PISSED OFF BECAUSE THIS MESS THAT I CAN NOT EVEN REALLY DISCRIBE PROPERLY IS RUINING MY LIFE, MY MENTAL AND PHYSICAL WELL BEING. 

I AM NOT A IGNORANT OR CRAZY. I JUST WANT SOMEONE TO EXPLAIN WHY THIS IS HAPPENING AND WHAT TO DO

WHY CAN I NOT JUST GO TO WWW.GOOGLE.COM   WHY DOES IT HAVE AN _?GSS OR SOMETHING... REDIRECTS..  WHY WOULD ANYONE BE STUCK ON A GOOGLE PROXY????
I HAVE TIME WARNER CABLE. BASIC INTERNET, WITH A CISCO WIFI. NOT COMPLICATED... WHY A GOOGLE PROXY?? WHY WOULD MY IP ADDRESS RUN ACROSS THE WHITE HOUSE LAWN???

I HAVE USED THE SAME EMAIL SINCE THE SUMMER OF 2011 AND NOW I DO NOT EVEN HAVE FULL ACCESS. I TRIED TO FIGURE OUT WEB DEV BUT IT IS MORE THAN I UNDERSTAND. I AM GOING TO SCHOOL FOR LAW. NOT COMPUTERS, CODING,MCSE.C++, NETWORKING OR CYBERSECURITY... HOWEVER THIS..NOT BEING ABLE TO UNDERSTAND AND NOT FINDING AND TRUE RESOURCE TO HELP ME WITH THIS... I REALLY AM CONSIDERING SWITCHING MY EDUCATION PATH.

CLIENT SERVER??

PARENT?.... ALL MY SMS ARE EXPORTED


WHAT IS THIS....  

<script src="chrome://resources/js/cr.js"></script>
<script src="chrome://resources/js/cr/ui/focus_manager.js"></script>
<script src="chrome://resources/js/load_time_data.js"></script>
<script src="chrome://resources/js/util.js"></script>

<script src="chrome://chrome/uber.js"></script>
<script src="chrome://chrome/uber_utils.js"></script>
</head>

<body>

<div id="navigation"><iframe src="chrome://uber-frame/" name="chrome" role="presentation"></iframe></div>

<div class="iframe-container"
i18n-values="id:historyHost; data-url:historyFrameURL;"
data-favicon="IDR_HISTORY_FAVICON"></div>
<div class="iframe-container"
i18n-values="id:extensionsHost; data-url:extensionsFrameURL;"
data-favicon="IDR_EXTENSIONS_FAVICON"></div>
<div class="iframe-container"
i18n-values="id:settingsHost; data-url:settingsFrameURL;"
data-favicon="IDR_SETTINGS_FAVICON"></div>
<div class="iframe-container"
i18n-values="id:helpHost; data-url:helpFrameURL;"
data-favicon="IDR_PRODUCT_LOGO_16"></div>

<script src="chrome://chrome/strings.js"></script>
<script src="chrome://resources/js/i18n_template.js"></script>




Origin:https://1.client-channel.google.com/
Size on disk:265 B
Last modified:Saturday, September 26, 2015 at 8:49:19 AM

Name:__utmz
Content:73091649.1443288280.7.5.utmcsr=chrome-app-launcher|utmccn=(not%20set)|utmcmd=(not%20set)
Domain:.chrome.google.com
Path:/
Send for:Any kind of connection
Accessible to script:Yes
Created:Saturday, September 26, 2015 at 2:55:12 PM
Expires:
Name:__utma
Content:245730968.1818782410.1442970287.1442970287.1442970287.1
Domain:.myaccount.google.com
Path:/
Send for:Any kind of connection
Accessible to script:Yes
Created:Tuesday, September 22, 2015 at 9:04:53 PM
Expires:Thursday, September 21, 2017 at 9:04:53 PM
Sunday, March 27, 2016 at 2:55:12 AM

Origin:https://clients5.google.com/
Size on disk:4.0 KB
Last modified:Saturday, September 26, 2015 at 2:57:21 PM

Origin:https://clients6.google.com/
Size on disk:4.0 KB
Last modified:Friday, September 25, 2015 at 9:38:57 PM

Nam _ga
Content:GA1.3.997545432.1443188457
Domain:.history.google.com
Path:/
Send for:Any kind of connection
Accessible to script:Yes
Created:Friday, September 25, 2015 at 9:41:29 AM
Expires:Sunday, September 24, 2017 at 9:41:29 AM




 





I HAVE NO IDEA WHAT THAT STUFF IS OR IF IT HAS TO DO WITH WHAT IS GOING ON. I DO NOT KNOW IF YOU CAN HELP ME. IF YOU CAN NOT, CAN YOU PLEASE FIND SOMEONE WHO CAN?


THANK YOU

BRIDGET BROCK

13.jpg
12.jpg
9.jpg
7.jpg

Levi Weintraub

unread,
Sep 26, 2015, 9:21:12 PM9/26/15
to bmpb.n...@gmail.com, blink-dev, Philip Jägenstedt
Filed in: best-of blink-dev.

Bridget Brock

unread,
Sep 27, 2015, 5:10:07 PM9/27/15
to Levi Weintraub, blink-dev, Philip Jägenstedt

What is this?

I don't understand what your reply was... I just want my privacy... 

What is best of blink development

20150927_131305.jpg
Screenshot_2015-09-26-22-14-55.png
20150927_133718-1.jpg

ariher...@gmail.com

unread,
Oct 16, 2015, 6:30:26 PM10/16/15
to blink-dev, phi...@opera.com
We are developing applications to edit and manipulate XML documents in the browser (for clients including the House of Representatives, which works with bills in XML). We are using Element.offsetTop to bring various elements of the document into view.  In my experience in Chrome, .offsetTop returns a nonzero value for XML elements.

I am not sure what the motivation is to deprecate Element.offsetTop, but it will complicate our efforts to allow XML document navigation-- I'm not sure what we would use to replace it.

Ari Hershowitz
Xcential Corp.

ariher...@gmail.com

unread,
Oct 16, 2015, 6:31:30 PM10/16/15
to blink-dev, phi...@opera.com, ariher...@gmail.com
One more note... usage statistics will necessarily miss enterprise applications such as ours, which is where this method is particularly useful.

PhistucK

unread,
Oct 17, 2015, 3:11:05 AM10/17/15
to ariher...@gmail.com, blink-dev, Philip Jägenstedt
What do you do with Internet Explorer (or Edge) and Firefox users?


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Oct 19, 2015, 8:49:43 AM10/19/15
to ariher...@gmail.com, blink-dev
Thanks for reporting this, Ari,

The removal of Element.offsetParent/offsetTop/offsetBottom/offsetWidth/offsetHeight was in https://codereview.chromium.org/1323073005 and will be in M47 if not reverted.

Can you provide some more details on what it is you're doing, and whether or not this is in Chrome-specific code? It's possible that you could fix it by using getBoundingClientRect() instead.

Depending on the circumstances, reverting and pushing the removal to M48 or M49 is an option.

Philip

Ari Hershowitz

unread,
Oct 26, 2015, 4:25:21 PM10/26/15
to Philip Jägenstedt, blink-dev
Hi Philip,
We have reviewed our use of Element.offsetParent/offsetTop/offsetBottom
and it does seem that we can replace it with getBoundingClientRect().  I will write with more details of our use if this turns out not to be an adequate replacement. Thank you again for your quick response to our concern and openness to accommodating our use of these methods.

Best,
Ari

Philip Jägenstedt

unread,
Oct 27, 2015, 7:19:22 AM10/27/15
to Ari Hershowitz, blink-dev
Thanks Ari, I'm happy to hear this issue under control. Just let us know if there are any further issues.

Rick Byers

unread,
Oct 27, 2015, 4:07:48 PM10/27/15
to Philip Jägenstedt, Ari Hershowitz, blink-dev
This thread suggests a flaw in our reasoning about the compatibility of this change.  The original intent said: "In Blink they're on Element, HTMLElement and SVGElement. It's only for HTML and SVG elements that they do anything, in the Element case they will always return null/0."

It sounds like that's not actually true - there's some XML element scenario where they can be non-zero.  Can anyone elaborate on those scenarios / provide a repro?  I'd like to better understand when a render-tree object can have size/position, be exposed via DOM APIs as an Element yet not be an HTMLElement or SVGElement.  Eg. are these special Elements also eligible for hit-testing (since they're in the render tree)?  From a quick scan of the code, it's not obvious to me how we get in such a state (eg. PseudoElements are one such special case, but they're never exposed directly to DOM AFAICT).

Thanks,
   Rick

Elliott Sprehn

unread,
Oct 27, 2015, 4:46:40 PM10/27/15
to Rick Byers, Ari Hershowitz, blink-dev, Philip Jägenstedt

document.implementation.createDocument("", "").createElement("div") is an Element that you can appendChild and will render but is not an HTMLDivElement, it won't respect the class attribute since that's an HTML concept, but will respect tag names, ids, pseudos and other things. getBoundingClientRect() will work fine on it, but offsetTop won't exist since this intent removed it. You can also get into this situation by appending an XHR's responseXML to the page.

Looking at the original intent its claim that they're always null/0 is wrong, they return values for plain Element just like they would for an HTMLElement. This is also true in Safari.

What does Edge do?

Rick Byers

unread,
Oct 27, 2015, 5:21:59 PM10/27/15
to Elliott Sprehn, Ari Hershowitz, blink-dev, Philip Jägenstedt
On Tue, Oct 27, 2015 at 4:46 PM, Elliott Sprehn <esp...@chromium.org> wrote:

document.implementation.createDocument("", "").createElement("div") is an Element that you can appendChild and will render but is not an HTMLDivElement, it won't respect the class attribute since that's an HTML concept, but will respect tag names, ids, pseudos and other things. getBoundingClientRect() will work fine on it, but offsetTop won't exist since this intent removed it. You can also get into this situation by appending an XHR's responseXML to the page.

Fascinating, thanks! 

Looking at the original intent its claim that they're always null/0 is wrong, they return values for plain Element just like they would for an HTMLElement. This is also true in Safari.

What does Edge do?

From a simple test it looks like Edge and Gecko both behave as Chrome now does (offsetTop is undefined on Element).

Philip Jägenstedt

unread,
Oct 28, 2015, 6:59:21 AM10/28/15
to Rick Byers, Elliott Sprehn, Ari Hershowitz, blink-dev
On Tue, Oct 27, 2015 at 10:21 PM, Rick Byers <rby...@chromium.org> wrote:

On Tue, Oct 27, 2015 at 4:46 PM, Elliott Sprehn <esp...@chromium.org> wrote:

document.implementation.createDocument("", "").createElement("div") is an Element that you can appendChild and will render but is not an HTMLDivElement, it won't respect the class attribute since that's an HTML concept, but will respect tag names, ids, pseudos and other things. getBoundingClientRect() will work fine on it, but offsetTop won't exist since this intent removed it. You can also get into this situation by appending an XHR's responseXML to the page.

Fascinating, thanks! 

Looking at the original intent its claim that they're always null/0 is wrong, they return values for plain Element just like they would for an HTMLElement. This is also true in Safari.

What does Edge do?

From a simple test it looks like Edge and Gecko both behave as Chrome now does (offsetTop is undefined on Element).

I'm afraid that the "in the Element case they will always return null/0" confusion started with me. I had misunderstood Node::isStyledElement(), which is only true for HTML and HTML elements, to mean that only these elements could have any style at all, which I extrapolated to only these having any layout objects.

M47 should be released quite soon, but perhaps there is time to revert. However, given the status of other browsers and that the usage has fallen to 0.004% (in response to the deprecation, maybe?) I think we should unleash it on stable and hope for the best.

Philip 

Rick Byers

unread,
Oct 28, 2015, 10:02:24 AM10/28/15
to Philip Jägenstedt, Elliott Sprehn, Ari Hershowitz, blink-dev
Given the low usage, alignment with Gecko and Edge, and existing spec - I still support shipping this to stable.

The alternative would be to try to convince the CSSWG to move their definition to Element.  It doesn't seem like we have a very strong case (having identified a single internal app, which has probably already switched to getBoundingClientRect).  But if more users surface, that could change the equation.


Philip 

PhistucK

unread,
Oct 28, 2015, 11:18:08 AM10/28/15
to Rick Byers, Philip Jägenstedt, Elliott Sprehn, Ari Hershowitz, blink-dev
Just noting that this is only an intent to deprecate, not an intent to ship.


PhistucK

Philip Jägenstedt

unread,
Oct 28, 2015, 11:31:05 AM10/28/15
to PhistucK, Rick Byers, Elliott Sprehn, Ari Hershowitz, blink-dev

PhistucK

unread,
Oct 28, 2015, 12:33:50 PM10/28/15
to Philip Jägenstedt, Rick Byers, Elliott Sprehn, Ari Hershowitz, blink-dev
Oh, so why does the discussion continue here? This is confusing.


PhistucK

PhistucK

unread,
Oct 29, 2015, 4:30:29 AM10/29/15
to Elliott Sprehn, Rick Byers, Ari Hershowitz, blink-dev, Philip Jägenstedt
By the way - is class really an HTML concept?
className is defined on Element and reflects the class content attribute -


PhistucK

Reply all
Reply to author
Forward
0 new messages