New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 643044 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

getClientRects() not implemented for SVG elements (method always return an empty list)

Reported by m...@mail.ru, Sep 1 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

Steps to reproduce the problem:
1. visit http://s.codepen.io/djFD/debug/ALAZzk
2. check console log (also it is shown on the screen)

What is the expected behavior?
it is expected to return something, the group is visible, has elements inside it, so we have to get a few rectangles. E.g. firefox 48.0 returns 1 such client rectangle.

What went wrong?
currently we are getting 
ClientRectList of length 0

Did this work before? N/A 

Chrome version: 51.0.2704.79 (Developer Build) Ubuntu 16.04 (64-bit)  Channel: stable
OS Version: ubuntu 16.04 LTS
Flash Version: Shockwave Flash 11.2 r202
 

Comment 1 by m...@mail.ru, Sep 1 2016

There is another codepen link, with access to sources http://codepen.io/djFD/pen/ALAZzk

Comment 2 by f...@opera.com, Sep 2 2016

Components: -Blink Blink>SVG
Labels: -OS-Linux
Status: Available (was: Unconfirmed)
Summary: getClientRects() not implemented for SVG elements (method always return an empty list) (was: SVG's <g> getClientRects() method returns empty set)
This function has not been implemented for SVG elements (yet). Current CSSOM View drafts specify the Gecko behavior:

https://drafts.csswg.org/cssom-view/#dom-element-getclientrects

 "If the element has an associated SVG layout box return a sequence containing a single DOMRect object that describes the bounding box of the element as defined by the SVG specification..."
Owner: shanmug...@samsung.com
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f5b0ce2c5f861ddc285bf79fec1a4281a1d3db15

commit f5b0ce2c5f861ddc285bf79fec1a4281a1d3db15
Author: shanmuga.m <shanmuga.m@samsung.com>
Date: Thu Sep 29 16:55:53 2016

Added support of getClientRects() for SVG Elements.

As per spec, if the element has an associated SVG layout box return
a sequence containing a single DOMRect object that describes
the bounding box of the element as defined by the SVG specification,
applying the transforms that apply to the element and its ancestors.

Spec:
https://drafts.csswg.org/cssom-view/#dom-element-getclientrects

BUG= 643044 

Review-Url: https://codereview.chromium.org/2349653002
Cr-Commit-Position: refs/heads/master@{#421850}

[add] https://crrev.com/f5b0ce2c5f861ddc285bf79fec1a4281a1d3db15/third_party/WebKit/LayoutTests/svg/custom/getClientRects.html
[modify] https://crrev.com/f5b0ce2c5f861ddc285bf79fec1a4281a1d3db15/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/f5b0ce2c5f861ddc285bf79fec1a4281a1d3db15/third_party/WebKit/Source/core/dom/Element.h

Status: Fixed (was: Started)

Comment 7 by m...@mail.ru, Sep 30 2016

Out of curiosity, is there any way to check this before the new regular build will be delivered by updates routines? some nightly builds or something like this

Comment 8 by f...@opera.com, Sep 30 2016

The fix ought to show up in the next Chrome Canary first.

Comment 9 by m...@mail.ru, Sep 30 2016

omg, chinese sounds simpler than that you told... ok, I will look what is that 'chrome canary'

Sign in to add a comment