[Webkit-unassigned] [Bug 73967] Copy/paste of the same content produces elements with verbose style

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 19 13:15:19 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=73967


yi shen <yi.4.shen at nokia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yi.4.shen at nokia.com




--- Comment #4 from yi shen <yi.4.shen at nokia.com>  2012-03-19 13:15:19 PST ---
The issue is caused by the inconsistent contents of the inlineStyle and attributes in Element.

After step 4, an element got created with the inlineStyle like "border-top-style: solid; border-right-style: solid;blabla ...",  and the attributes which is "border: solid red".

In step 5, the copy operation generated a markup string by using the element's inlineStyle, however, the style information in attributes got lost. So, after the paste, the new element's inlineStyle and attributes became the same one --- ""border-top-style: solid; border-right-style: solid;blabla ...""

If the test is valid, should we detect the inconsistence and use attributes instead to generate the markup string for copy operation? Any ideas, guys?

(In reply to comment #0)
> Repro steps:
> 
> 1. Go to http://www-archive.mozilla.org/editor/midasdemo/
> 2. Switch to the View HTML Source view
> 3. Enter the following markup: <b><i style="border: solid red">hello</i></b>
> 4. Switch to the non HTML source view
> 5. Select All, then Copy and Paste
> 6. Switch back to the HTML source view
> 
> Expected:
> The markup is the same.
> 
> Actual:
> The markup is: <b><i style="border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: red; border-right-color: red; border-bottom-color: red; border-left-color: red; border-width: initial; ">hello</i></b>
> 
> The border attribute is exploded in all possible border related attributes.
> This seems to happen only for inline elements.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list