[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

Natasha Lazarova

[bugs:#1883] ClassCastException and Undefined result when printing text contents of svg elements

Status: open
Group: 2.26
Labels: svg innertext classcastexception javascript
Created: Tue May 16, 2017 02:14 PM UTC by Natasha Lazarova
Last Updated: Tue May 16, 2017 02:14 PM UTC
Owner: nobody
Attachments:

  • svg.patch (2.2 kB; application/octet-stream)

Hi,

There are two different results when trying to print text contents of svg elements.

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Second case is when we access .innerText of an element that encloses the svg element. In that case, if the element is of type HtmlElement, then it tries to print all its children as HtmlElement, but SvgSvg seems it doesn't inherit from HtmlElement, hence the ClassCastException.

Attached is a patch with 2 tests


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

RBRi-2

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Looks like this is the same with all the browsers - they returning undefined here. Do i made any mistake?


[bugs:#1883] ClassCastException and Undefined result when printing text contents of svg elements

Status: open
Group: 2.26
Labels: svg innertext classcastexception javascript
Created: Tue May 16, 2017 02:14 PM UTC by Natasha Lazarova
Last Updated: Tue May 16, 2017 02:14 PM UTC
Owner: nobody
Attachments:

  • svg.patch (2.2 kB; application/octet-stream)

Hi,

There are two different results when trying to print text contents of svg elements.

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Second case is when we access .innerText of an element that encloses the svg element. In that case, if the element is of type HtmlElement, then it tries to print all its children as HtmlElement, but SvgSvg seems it doesn't inherit from HtmlElement, hence the ClassCastException.

Attached is a patch with 2 tests


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

RBRi-2
In reply to this post by Natasha Lazarova
  • status: open --> accepted
  • assigned_to: RBRi

[bugs:#1883] ClassCastException and Undefined result when printing text contents of svg elements

Status: accepted
Group: 2.26
Labels: svg innertext classcastexception javascript
Created: Tue May 16, 2017 02:14 PM UTC by Natasha Lazarova
Last Updated: Wed May 17, 2017 06:53 PM UTC
Owner: RBRi
Attachments:

  • svg.patch (2.2 kB; application/octet-stream)

Hi,

There are two different results when trying to print text contents of svg elements.

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Second case is when we access .innerText of an element that encloses the svg element. In that case, if the element is of type HtmlElement, then it tries to print all its children as HtmlElement, but SvgSvg seems it doesn't inherit from HtmlElement, hence the ClassCastException.

Attached is a patch with 2 tests


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

RBRi-2
In reply to this post by Natasha Lazarova

have done a quick fix for the CCE but i fear there is more to do....


[bugs:#1883] ClassCastException and Undefined result when printing text contents of svg elements

Status: accepted
Group: 2.26
Labels: svg innertext classcastexception javascript
Created: Tue May 16, 2017 02:14 PM UTC by Natasha Lazarova
Last Updated: Wed May 17, 2017 06:54 PM UTC
Owner: RBRi
Attachments:

  • svg.patch (2.2 kB; application/octet-stream)

Hi,

There are two different results when trying to print text contents of svg elements.

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Second case is when we access .innerText of an element that encloses the svg element. In that case, if the element is of type HtmlElement, then it tries to print all its children as HtmlElement, but SvgSvg seems it doesn't inherit from HtmlElement, hence the ClassCastException.

Attached is a patch with 2 tests


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

Natasha Lazarova
In reply to this post by Natasha Lazarova

Thanks for the quick response.

I couldn't find any other failing cases


[bugs:#1883] ClassCastException and Undefined result when printing text contents of svg elements

Status: accepted
Group: 2.26
Labels: svg innertext classcastexception javascript
Created: Tue May 16, 2017 02:14 PM UTC by Natasha Lazarova
Last Updated: Wed May 17, 2017 07:08 PM UTC
Owner: RBRi
Attachments:

  • svg.patch (2.2 kB; application/octet-stream)

Hi,

There are two different results when trying to print text contents of svg elements.

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Second case is when we access .innerText of an element that encloses the svg element. In that case, if the element is of type HtmlElement, then it tries to print all its children as HtmlElement, but SvgSvg seems it doesn't inherit from HtmlElement, hence the ClassCastException.

Attached is a patch with 2 tests


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1883 ClassCastException and Undefined result when printing text contents of svg elements

RBRi-2
In reply to this post by Natasha Lazarova
  • status: accepted --> closed

[bugs:#1883] ClassCastException and Undefined result when printing text contents of svg elements

Status: closed
Group: 2.26
Labels: svg innertext classcastexception javascript
Created: Tue May 16, 2017 02:14 PM UTC by Natasha Lazarova
Last Updated: Thu May 18, 2017 09:55 AM UTC
Owner: RBRi
Attachments:

  • svg.patch (2.2 kB; application/octet-stream)

Hi,

There are two different results when trying to print text contents of svg elements.

First case is when we access .innerText of the element itself. We get Undefined, instead of the text itself or empty string.

Second case is when we access .innerText of an element that encloses the svg element. In that case, if the element is of type HtmlElement, then it tries to print all its children as HtmlElement, but SvgSvg seems it doesn't inherit from HtmlElement, hence the ClassCastException.

Attached is a patch with 2 tests


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop