centraldesktop / daisydiff

Automatically exported from code.google.com/p/daisydiff
0 stars 0 forks source link

HTML tags with different attributes order - correction for the Karol's fix #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use 2 exactly same HTML files, where one of the elements has "style" 
attribute with values containing multiple rules
(e.g. style="text-decoration: underline; font-variant: italic").
2. Reverse the order of the css rules in the second file
(e.g. style="font-variant: italic; text-decoration: underline")

Same result can be achieved with "class" attribute. E.g.:
<h1 class="pagetitle  holidaystyle"> and
<h1 class="holidaystyle  pagetitle">

In fact, you don't even have to swap places - just add an extra space in 
the middle.

What is the expected output? 
no difference
What do you see instead?
"Moved out of ... moved in..."

What version of the product are you using? 
1.0
On what operating system?
Windows XP

Please provide any additional information below.
Attached are:
 2 files with a sample of the bug
 corrected file org.outerj.daisy.diff.html.dom.helperAttributesMap.java

I also added some comments (hope it's ok).

Of course, to be absolutely correct the style rule should resolve the 
styles and compare the rules too (to see that 2 style don't use the same 
name for different set of rules). However, I think that in most cases this 
won't happen.

This situation (with the mixed styles order and mixed class names order) 
often occurs when the HTML is generated by some program as a result of 
writing out some Document model after the changes were done in some 
WYSIWYG HTML editor (like using javax.swing.text.html package).

Original issue reported on code.google.com by anastass...@businesswire.com on 14 Apr 2009 at 5:17

Attachments:

GoogleCodeExporter commented 8 years ago
oops - clicked the wrong button to attach the fix :)
sorry

Original comment by anastass...@businesswire.com on 14 Apr 2009 at 5:19

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch, looks very good. Again, shall I grant you commit access?
Also, would you like for a public mailing list to be constructed to discuss 
these
developments and review commit mails?

Original comment by guy...@gmail.com on 17 Apr 2009 at 10:22

GoogleCodeExporter commented 8 years ago
Thank you for the offer, I am gladly accepting it. 

Original comment by anastass...@businesswire.com on 17 Apr 2009 at 4:23

GoogleCodeExporter commented 8 years ago

Original comment by anastass...@businesswire.com on 25 Apr 2009 at 12:24