Bug 3429

Summary: Text transformed with text-transform does not copy with transform applied
Product: WebKit Reporter: Andrew Wellington <andrew>
Component: HTML EditingAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, nickshanks
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Patch to use renderer string instead of DOM string
darin: review+
Regression Test none

Description Andrew Wellington 2005-06-10 23:20:14 PDT
When copying text that has been transformed using the text-transform CSS1 property, the 
transformations are not applied to the copied text.

This can be reproduced by copying transformed text from the regression test:
layout-tests/css1/text_properties/text_transform.html

For example, what is displayed as:
This Paragraph Is Capitalized
is copied as:
This paragraph is capitalized
Comment 1 Allan Sandfeld Jensen 2005-06-13 03:46:06 PDT
This has been fixed in Konqueror  
Comment 2 Darin Adler 2005-08-14 02:03:05 PDT
*** Bug 4427 has been marked as a duplicate of this bug. ***
Comment 3 Darin Adler 2005-08-14 02:04:23 PDT
TextIterator is the thing that would need to be changed, in visible_text.h/cpp.
Comment 4 Andrew Wellington 2005-08-14 02:57:07 PDT
Created attachment 3378 [details]
Patch to use renderer string instead of DOM string

Modify visible_text.cpp to use the string from the renderer not the DOM in
handleTextNode and handleTextBox
Comment 5 Darin Adler 2005-08-14 08:48:02 PDT
Comment on attachment 3378 [details]
Patch to use renderer string instead of DOM string

This looks like the right fix. But we also need a test to check in at the same
time. I'm going to set this to review-, but it should be set to review+ once we
have a suitable test.
Comment 6 Darin Adler 2005-08-14 21:06:16 PDT
Two ways to write the test: 1) Use the "innerText" method. 2) Use execCommand("PasteAndMatchStyle") to 
make a test that will work in DumpRenderTree, although not in Safari.
Comment 7 Darin Adler 2005-08-14 21:07:24 PDT
(Because the innerText method shares the same code path with copy.)
Comment 8 Andrew Wellington 2005-08-14 21:23:15 PDT
Created attachment 3391 [details]
Regression Test

Proposed regression test