Bug 91189

Summary: ASSERT in tspan's localCoordinateSpaceTransform via getCTM()
Product: WebKit Reporter: Philip Rogers <pdr>
Component: SVGAssignee: Philip Rogers <pdr>
Status: RESOLVED FIXED    
Severity: Normal CC: fmalita, schenney, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Testcase
none
Proposed patch
zimmermann: review+, webkit.review.bot: commit-queue-
Remove oops in the changelog. none

Description Philip Rogers 2012-07-12 21:28:24 PDT
Created attachment 152151 [details]
Testcase

Consider the following:
<tspan id="tspan">
  <g id="g"></g>
</tspan>

This is not allowed per the SVG content model but we allow the DOM tree to exist (we just don't build the associated render tree). Asking for getCTM() on the <g> will walk the ancestors and assert in SVGStyledElement::localCoordinateSpaceTransform because the tspan does not have a transform. Firefox and Opera appear to just return the identity matrix in this case.

I think we should remove the ASSERT in this case, returning the identity matrix and treating the tspan as having no transform.
Comment 1 Philip Rogers 2012-07-12 22:46:06 PDT
Created attachment 152156 [details]
Proposed patch
Comment 2 Nikolas Zimmermann 2012-07-12 23:02:39 PDT
Comment on attachment 152156 [details]
Proposed patch

Seems reasonable, r=me.
Comment 3 Philip Rogers 2012-07-12 23:09:40 PDT
(In reply to comment #2)
> (From update of attachment 152156 [details])
> Seems reasonable, r=me.

Thanks for the quick review.

This patch makes debugging https://bugs.webkit.org/show_bug.cgi?id=91141 with ASAN builds much easier :)
Comment 4 WebKit Review Bot 2012-07-12 23:57:03 PDT
Comment on attachment 152156 [details]
Proposed patch

Rejecting attachment 152156 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
commit-queue/Source/WebKit/chromium/third_party/v8-i18n --revision 105 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
46>At revision 105.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/13208997
Comment 5 Philip Rogers 2012-07-13 10:53:12 PDT
Created attachment 152302 [details]
Remove oops in the changelog.
Comment 6 WebKit Review Bot 2012-07-13 12:08:47 PDT
Comment on attachment 152302 [details]
Remove oops in the changelog.

Clearing flags on attachment: 152302

Committed r122616: <http://trac.webkit.org/changeset/122616>
Comment 7 WebKit Review Bot 2012-07-13 12:08:51 PDT
All reviewed patches have been landed.  Closing bug.