[Webkit-unassigned] [Bug 25321] RLE/LRE characters are removed from any text entered into a text box (either using a keyboard or by pasting)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 2 16:29:58 PDT 2010


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





--- Comment #7 from Xiaomei Ji <xji at chromium.org>  2010-08-02 16:29:58 PST ---
As to pasting lost RLE characters: the RLE character was lost during canonicalPosition() phase. When RLE is the first character on the copied string, canonicalizing on the position of RLE character will return its downstream position (the one after the RLE character). 

Stack is at the end of the post.

I do not have idea on how to fix the problem.

Since downstream and upstream are low-level and basic operations, I do not know whether that is where we should fix. Or the fix should be in some other layer, maybe rendering layer? 

Would appreciate if mitz could shed some lights.


When pasting a string containing RLE in the middle, looks like the RLE character was not removed (verified by copying the pasted string to other editor, such as editbox in FireFox and windows notepad), but the string rendered as if the control character was removed, which is not correct either. 
For example, copy and past string "xU202By!" rendered "xy!" in above test file.


    chrome.dll!WebCore::VisiblePosition::canonicalPosition(const WebCore::Position & position={...})  Line 461    C++
     chrome.dll!WebCore::VisiblePosition::init(const WebCore::Position & position={...}, WebCore::EAffinity affinity=DOWNSTREAM)  Line 61 + 0x10 bytes    C++
     chrome.dll!WebCore::VisiblePosition::VisiblePosition(const WebCore::Position & pos={...}, WebCore::EAffinity affinity=DOWNSTREAM)  Line 49    C++
     chrome.dll!WebCore::VisibleSelection::setBaseAndExtentToDeepEquivalents()  Line 244 + 0x17 bytes    C++
     chrome.dll!WebCore::VisibleSelection::validate(WebCore::TextGranularity granularity=CharacterGranularity)  Line 407    C++
     chrome.dll!WebCore::VisibleSelection::VisibleSelection(const WebCore::Position & base={...}, const WebCore::Position & extent={...}, WebCore::EAffinity affinity=DOWNSTREAM)  Line 65    C++
     chrome.dll!WebCore::VisibleSelection::selectionFromContentsOfNode(WebCore::Node * node=0x082c49b0)  Line 93 + 0x2c bytes    C++
     chrome.dll!WebCore::ReplacementFragment::ReplacementFragment(WebCore::Document * document=0x07bdd000, WebCore::DocumentFragment * fragment=0x07b784c0, bool matchStyle=true, const WebCore::VisibleSelection & selection={...})  Line 155 + 0x1c bytes    C++
     chrome.dll!WebCore::ReplaceSelectionCommand::doApply()  Line 793    C++
     chrome.dll!WebCore::EditCommand::apply()  Line 91 + 0xf bytes    C++
     chrome.dll!WebCore::applyCommand(WTF::PassRefPtr<WebCore::EditCommand> command={...})  Line 213    C++
     chrome.dll!WebCore::Editor::replaceSelectionWithFragment(WTF::PassRefPtr<WebCore::DocumentFragment> fragment={...}, bool selectReplacement=false, bool smartReplace=false, bool matchStyle=true)  Line 323 + 0x45 bytes    C++
     chrome.dll!WebCore::Editor::replaceSelectionWithText(const WebCore::String & text={...}, bool selectReplacement=false, bool smartReplace=false)  Line 329 + 0x38 bytes    C++
     chrome.dll!WebCore::Editor::pasteAsPlainTextWithPasteboard(WebCore::Pasteboard * pasteboard=0x07c07a98)  Line 290    C++
     chrome.dll!WebCore::Editor::paste()  Line 1082    C++
        .................

-- 
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