Menu

#1506 getBBox is still not supported in SVG text element

2.12
closed
None
1
2016-04-08
2013-04-26
LionelWang
No

I see HTMLUnit v2.12 has supported SVG elements. It's a great enhancement since SVG is quite popular in current web application.
However when I use HTMLUnit to execute the javascript code (such as highcharts) to generate SVG graphics, the text is always not drawing correct, because getBBox method is not found in SVG text element, so any text computation will fail. However this method is working in browser correctly.

Html Unit is so great tool to execute html page and javascript code in java application.
Is getBBox method in SVG supposed to be supported in future release?

Thank you

Discussion

  • Marc Guillemot

    Marc Guillemot - 2013-07-19

    If browsers support getBBox on SVG text elements, then HtmlUnit has to do it too.

    Do you rely on precise BBox computation or do you only need the method to be present? In the latter case, it is quite easy to fix it.

     
  • Ahmed Ashour

    Ahmed Ashour - 2013-10-06
    • status: open --> pending
     
  • Jan Eibl

    Jan Eibl - 2016-04-08

    We are facing the same problem. Unfortunately highcharts relies on precise computation.

     
  • Ahmed Ashour

    Ahmed Ashour - 2016-04-08
    • status: pending --> closed
    • assigned_to: Ahmed Ashour
     
  • Ahmed Ashour

    Ahmed Ashour - 2016-04-08

    Primitive support was added.

    However, HtmlUnit scope is not to render elements, but feel free to post patches for specific case you encounter.

     

Log in to post a comment.