[Webkit-unassigned] [Bug 21820] Unable to enter the Tamil UNICODE Characters via Thamizha Phonetic IME

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 24 10:19:56 PDT 2008


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





------- Comment #4 from jshin at chromium.org  2008-10-24 10:19 PDT -------
(From update of attachment 24637)
> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog	(revision 37842)
> +++ WebCore/ChangeLog	(working copy)
> @@ -1,3 +1,14 @@
> +2008-10-24  Hironori Bono  <hbono at chromium.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Test: editing/deleting/delete-ligature.html
> +
> +        * editing/Editor.cpp:
> +        (WebCore::Editor::deleteWithDirection):
> +        * editing/EditorCommand.cpp:
> +        (WebCore::CommandEntry::):
> +
>  2008-10-24  David Kilzer  <ddkilzer at apple.com>
>  
>          Rolled out r37840 and r37841.
> Index: WebCore/editing/Editor.cpp
> ===================================================================
> --- WebCore/editing/Editor.cpp	(revision 37801)
> +++ WebCore/editing/Editor.cpp	(working copy)
> @@ -259,8 +259,14 @@ bool Editor::deleteWithDirection(Selecti
>                  break;
>              case SelectionController::BACKWARD:
>              case SelectionController::LEFT:
> -                if (m_frame->document())
> +                if (m_frame->document()) {
> +                    String stringToDelete = plainText(range.get());
>                      TypingCommand::deleteKeyPressed(m_frame->document(), false, granularity);
> +                    if (stringToDelete.length() > 1) {
> +                        stringToDelete.truncate(stringToDelete.length() - 1);
> +                        TypingCommand::insertText(m_frame->document(), stringToDelete, false, false);

What if 'granularity' is not a "character"?  I think the above change needs to
be done only when 'granularity' is 'character'? 

I also wonder if this meets everybody's expectation of 'delete backward'. For
instance, without your change, Latin base letter + combining accent will be
deleted
as a unit. With this change, only the combining accent will be deleted, right?
Given that widely used Latin letters with accents are represented in a composed
form, it's 
not very critical. However, some Latin letters with accents (used in African
languages, for instance) do not have a composed form representation. So, at
least, you may want to
add a TODO comment about that. 

Perhaps, in the long run, a new granularity of 'Codepoint' needs to be
introduced. IIRC, 'character' granularity is actually 'grapheme (cluster)'
granularity at the moment. 




> +                    }
> +                }
>                  break;
>          }
>          revealSelectionAfterEditingOperation();
> Index: WebCore/editing/EditorCommand.cpp
> ===================================================================
> --- WebCore/editing/EditorCommand.cpp	(revision 37801)
> +++ WebCore/editing/EditorCommand.cpp	(working copy)
> @@ -1164,7 +1164,7 @@ static const CommandMap& createCommandMa
>          { "CreateLink", { executeCreateLink, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
>          { "Cut", { executeCut, supported, enabledCut, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
>          { "Delete", { executeDelete, supported, enabledDelete, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
> -        { "DeleteBackward", { executeDeleteBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
> +        { "DeleteBackward", { executeDeleteBackward, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
>          { "DeleteBackwardByDecomposingPreviousCharacter", { executeDeleteBackwardByDecomposingPreviousCharacter, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
>          { "DeleteForward", { executeDeleteForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
>          { "DeleteToBeginningOfLine", { executeDeleteToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
> Index: LayoutTests/ChangeLog
> ===================================================================
> --- LayoutTests/ChangeLog	(revision 37842)
> +++ LayoutTests/ChangeLog	(working copy)
> @@ -1,3 +1,9 @@
> +2008-10-24  Hironori Bono  <hbono at chromium.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        * editing/deleting/delete-ligature.html: Added.
> +
>  2008-10-24  David Kilzer  <ddkilzer at apple.com>
>  
>          Rolled out r37840.
> Index: LayoutTests/editing/deleting/delete-ligature.html
> ===================================================================
> --- LayoutTests/editing/deleting/delete-ligature.html	(revision 0)
> +++ LayoutTests/editing/deleting/delete-ligature.html	(revision 0)
> @@ -0,0 +1,44 @@
> +<html xmlns="http://www.w3.org/1999/xhtml">
> +    <head>
> +        <script src="../editing.js" language="javascript" type="text/javascript" ></script>
> +        <script language="javascript" type="text/javascript">
> +        function execBackwardDeleteCommand() {
> +            document.execCommand("DeleteBackward");
> +        }
> +        function backwardDeleteCommand() {
> +            if (commandDelay > 0) {
> +                window.setTimeout(execBackwardDeleteCommand, commandCount * commandDelay);
> +                commandCount++;
> +            } else {
> +                execBackwardDeleteCommand();
> +            }
> +        }
> +        function log(str) {
> +            var li = document.createElement("li");
> +            li.appendChild(document.createTextNode(str));
> +            var console = document.getElementById("console");
> +            console.appendChild(li);
> +        }
> +        function editingTest() {
> +            var textarea = document.getElementById("test");
> +            textarea.setSelectionRange(2, 2);
> +            backwardDeleteCommand();
> +            if (textarea.value == String.fromCharCode(0x0E27)) {
> +                log("Succeeded.");
> +            } else {
> +                log("Failed. Actual: \"" + textarea.value + "\", Expected: \"" + String.fromCharCode(0x0E27) + "\"");
> +            }
> +        }
> +        </script>
> +    <title>Editing Test (Deleting a ligature)</title> 
> +</head> 
> +    <body>
> +        <p>This test tests if a ligature "&#x0E27;&#x0E31;" is decomposed while deleting it with a back-space key.</p>
> +        <p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string "succeeded" below.</p>
> +        <textarea id="test" rows="1" cols="40">&#x0E27;&#x0E31;</textarea>
> +        <ul id="console"></ul>
> +        <script language="javascript" type="text/javascript">
> +        runEditingTest();
> +        </script>
> +    </body>
> +</html>
> 
> Property changes on: LayoutTests/editing/deleting/delete-ligature.html
> ___________________________________________________________________
> Added: svn:executable
>    + *
> 


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



More information about the webkit-unassigned mailing list