Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with inherits of element #69

Open
d1231 opened this issue May 18, 2017 · 0 comments
Open

Issue with inherits of element #69

d1231 opened this issue May 18, 2017 · 0 comments

Comments

@d1231
Copy link

d1231 commented May 18, 2017

Hi,

I think I found issue with style inheritance of elements.

I have the similar html structure to the following:

<ul>
<li>
<a style="font-size: 15px">
<span class="a"></span>
</a>
</li>
<li>
<a>
<span></span>
</a>
</li>
</ul>

When trying to get the style of a including inherit, I don't receive the font-size.

I think the issue is with levelTraversal in org.w3c.dom.traversal.TreeWalker.Traversal:

When going over the children of a node the current node won't update until you do over the deepest node in the branch.

This becomes a problem when using:
main.inheritFrom(result.get((Element) walker.parentNode(), null));
(Analyzer, line 155)

(Element) walker.parentNode() return the ul element
So the element styling is incorrect.

Hope you understood me and thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant