41
edits
No edit summary |
(→Status) |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
My attempts at adding '''[http://en.wikipedia.org/wiki/Text_Services_Framework Text Services Framework]''' support to the Mozilla platform as part of '''[[Community:SummerOfCode08|Google Summer of Code 08]]'''. (wish me luck!) | My attempts at adding '''[http://en.wikipedia.org/wiki/Text_Services_Framework Text Services Framework]''' support to the Mozilla platform as part of '''[[Community:SummerOfCode08|Google Summer of Code 08]]'''. (wish me luck!) | ||
== | ==Status== | ||
Wow only 1 more week to go before the suggested pencils-down date. The implementation's been pretty solid through my testings and right now I'm concentrating on writing an automatic test for it. The test is a C++ unit test and is basically capable of testing every aspect of the TSF implementation from widget down to content. As of now most of the test is done and hopefully I can finish it by the start of next week. --[[User:Darchons|Darchons]] 20:57, 1 August 2008 (UTC) | |||
Implemented methods from what used to be nsIKBStateControl. Now TSF support will not get turned off because an IME function was called in one of these methods. Also added support for text decorations. Not full-fledged display attributes support, but works just like the existing IME code. --[[User:Darchons|Darchons]] 21:20, 15 July 2008 (PDT) | |||
This week is GSoC midterm and I'm pretty much on track to finish this project by the end of GSoC. The majority of things are working and the second half of GSoC will be focused on more extensive testing and implementation of several advanced features on top of the basic TSF implementation right now. | |||
Several Good Things(tm) that are planned for the 2nd half: | |||
* Display attributes | |||
** Display attributes are mostly used for IME's. Examples include underlines that make using IME easier. In Mozilla's IME implementation they are called text decorations. | |||
** Currently Mozilla's IME implementation uses a custom set of styles to use for text decorations. However, TSF is more advanced in that it lets the IME decide which text decorations are best to use. | |||
* Input scopes | |||
** The input scope of a textbox is basically the "purpose" of the textbox. For example, for the Location Bar in Firefox, its input scope would be "URL", because the textbox is used to contain URL's. If a textbox is numbers-only, its input scope would be "Numbers" because it's used for numbers. For an HTML file input, the input scope would be "File pathname", and so on. | |||
** Input scopes are used by some IME's and text services, most notably the Tablet Input Panel for more accurate response. If the current input scope is numbers, a circle written by the user would be interpreted as zero rather than the letter O. | |||
** If we have this in Mozilla, it will be very useful for a lot of tablet and speech recognition users. | |||
Speaking of speech recognition, I have been <strike>goofing around with</strike> testing Windows Speech Recognition and it's working pretty well. It used to be that you cannot use WSR to dictate into textboxes in Firefox but with TSF support it's a breeze. I wrote a letter in Gmail by talking only and it was fun :) --[[User:Darchons|Darchons]] 10:29, 8 July 2008 (PDT) | |||
Now that the foundation work is there, new cool stuff will start to pop up :) | |||
The Tablet Input Panel is working now and the icon is showing up: | |||
:[[Image:Firefox_tsf_tip.jpg]] | |||
This shows that TSF is activated and also Mozilla textboxes (the address bar in this case) are successfully exposed to the system (i.e. the system has access to the contents of these textboxes). --[[User:Darchons|Darchons]] 14:24, 1 July 2008 (PDT) | |||
The end of week 5, and a majority of the text store (the essential part of a TSF implementation and therefore the project) is implemented, and for the unimplemented methods I have a pretty good idea of how to implement them. | |||
* Mozilla is TSF-aware | |||
* Traditional IME's work (but no visual composition indicator, i.e. underline) | |||
I think I'm ready for my first patch and in terms of completeness my implementation is on par with that of the last patch submitted for the bug a few years ago. In terms of actual functionality my implementation is a lot better because my implementation exposes the actual text boxes in Gecko to TSF while the old patch which did not. --[[User:Darchons|Darchons]] 08:17, 28 June 2008 (PDT) | |||
This is the end of week 4, (end of "full-time" week 1 for me since I had school and exams the first three weeks :/), and I have made stubs for the implementation, implemented several easy-to-implement methods, and made a basic outline of my design. --[[User:Darchons|Darchons]] 10:48, 20 June 2008 (PDT) | This is the end of week 4, (end of "full-time" week 1 for me since I had school and exams the first three weeks :/), and I have made stubs for the implementation, implemented several easy-to-implement methods, and made a basic outline of my design. --[[User:Darchons|Darchons]] 10:48, 20 June 2008 (PDT) | ||
==Outline/Progress== | ==Outline/Progress== | ||
===Development=== | ===Development=== | ||
* Startup code | * <strike>Startup code</strike> | ||
** nsWindow::nsWindow | ** <strike>nsWindow::nsWindow</strike> | ||
* Shutdown code | |||
** nsWindow::~nsWindow | * <strike>Shutdown code</strike> | ||
* Focus code | ** <strike>nsWindow::~nsWindow</strike> | ||
* | |||
* ITextStoreACP implementation ( | * <strike>Focus/blur code</strike> | ||
** <strike>ITextStateObserver::OnFocusChange</strike> | |||
* ITextStoreACP implementation (24 out of 26 implemented) | |||
** <strike>AdviseSink</strike> | ** <strike>AdviseSink</strike> | ||
** <strike>UnadviseSink</strike> | ** <strike>UnadviseSink</strike> | ||
Line 21: | Line 60: | ||
** <strike>GetSelection</strike> | ** <strike>GetSelection</strike> | ||
*** <strike>add NS_QUERY_SELECTED_RANGE_TEXT event</strike> | *** <strike>add NS_QUERY_SELECTED_RANGE_TEXT event</strike> | ||
** SetSelection | ** <strike>SetSelection</strike> | ||
*** add | *** <strike>add NS_SELECTION_SET event</strike> | ||
*** add | *** <strike>add NS_SELECTION_ADD event</strike> | ||
** <strike>GetText</strike> | ** <strike>GetText</strike> | ||
*** <strike>(use NS_QUERY_TEXT_CONTENT event)</strike> | *** <strike>(use NS_QUERY_TEXT_CONTENT event)</strike> | ||
Line 34: | Line 73: | ||
** <strike>QueryInsertEmbedded</strike> | ** <strike>QueryInsertEmbedded</strike> | ||
** <strike>InsertEmbedded</strike> | ** <strike>InsertEmbedded</strike> | ||
** RequestSupportedAttrs | ** <strike>RequestSupportedAttrs</strike> | ||
** RequestAttrsAtPosition | ** <strike>RequestAttrsAtPosition</strike> | ||
** RequestAttrsTransitioningAtPosition | ** <strike>RequestAttrsTransitioningAtPosition</strike> | ||
** FindNextAttrTransition | ** <strike>FindNextAttrTransition</strike> | ||
** RetrieveRequestedAttrs | ** <strike>RetrieveRequestedAttrs</strike> | ||
** <strike>GetEndACP</strike> | ** <strike>GetEndACP</strike> | ||
** <strike>GetActiveView</strike> | ** <strike>GetActiveView</strike> | ||
** GetACPFromPoint | ** GetACPFromPoint | ||
*** add hit test event | *** add hit test event | ||
** GetTextExt | ** <strike>GetTextExt</strike> | ||
*** | *** <strike>NS_QUERY_TEXT_RECT</strike> | ||
** GetScreenExt | ** <strike>GetScreenExt</strike> | ||
*** | *** <strike>NS_QUERY_FRAME_RECT</strike> | ||
** <strike>GetWnd</strike> | ** <strike>GetWnd</strike> | ||
** InsertTextAtSelection | ** <strike>InsertTextAtSelection</strike> | ||
*** NS_TEXT_TEXT | *** <strike>NS_TEXT_TEXT</strike> | ||
** <strike>InsertEmbeddedAtSelection</strike> | ** <strike>InsertEmbeddedAtSelection</strike> | ||
* Notification code ( | |||
** | * <strike>Notification code (7 of 7 implemented)</strike> | ||
** | ** <strike>OnAttrsChange (not supported)</strike> | ||
** | ** <strike>OnStartEditTransaction (not supported)</strike> | ||
** | ** <strike>OnEndEditTransaction (not supported)</strike> | ||
** | ** <strike>OnLayoutChange (not used)</strike> | ||
** | ** <strike>OnSelectionChange</strike> | ||
** | *** <strike>nsIWidget::OnIMESelectionChange</strike> | ||
** <strike>OnStatusChange (not supported)</strike> | |||
** <strike>OnTextChange</strike> | |||
*** <strike>nsIWidget::OnIMETextChange</strike> | |||
* <strike>Display attributes support</strike> | |||
* Input scope support | |||
** -moz-input-scope property | |||
===Testing/Debugging=== | ===Testing/Debugging=== | ||
Line 98: | Line 145: | ||
==Quirks== | ==Quirks== | ||
Firefox 3 is crashing on me constantly, <strike>and most of them aren't even getting caught by the crash report thingy<strike> and they are getting caught be the crash report thingy now (thx Neatnate) but FF3 is still crashing a lot :( | Firefox 3 is crashing on me constantly, <strike>and most of them aren't even getting caught by the crash report thingy</strike> and they are getting caught be the crash report thingy now (thx Neatnate) but FF3 is still crashing a lot :( | ||
:Well turns out this is what's bugging me the whole time (no pun intended) {{bug|432467}} (thanks Ted!) | |||
:Installing FF3.0.1 build 1 seems to have fixed the problem :) | |||
==Praises== | ==Praises== | ||
I'm using my laptop, which has a 12.1" screen, for this project, and it definitely makes it a lot easier to code when I hook it up to the main desktop's 22" LCD. | I'm using my laptop, which has a 12.1" screen, for this project, and it definitely makes it a lot easier to code when I hook it up to the main desktop's 22" LCD. |
edits