Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Gtk] Regression: text-inserted events lack text inserted and current…
… line https://bugs.webkit.org/show_bug.cgi?id=72830 Reviewed by Chris Fleizach. Source/WebCore: Replace the emission of the old (and now deprecated) AtkObject's 'text-changed:insert' and 'text-changed:remove' signals with the new 'text-insert' and 'text-remove' ones, which are better and less fragile since they emit the modified text too, along with the typical 'offset' and 'count' values associated to the change. Also, change the signature of the nodeTextChangeNotification() and nodeTextChangePlatformNotification() to allow specifying the text being modified from the place we better know about it, that is, the text editing commands. * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::emitTextChanged): Emit 'text-insert' and 'text-remove', instead of the old and now deprecated 'text-changed' signal. (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Update this function to receive a String with the text being modified, instead of just the number of characters. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::nodeTextChangeNotification): Update this function to receive a String with the text being modified. * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::nodeTextChangeNotification): Ditto. (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Ditto. Adapt the text editing commants to pass the whole text string being modified, instead of just its number of characters. * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): Adapt to the new signature of nodeTextChangeNotification(), so pass the whole text. * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): Ditto. (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto. * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): Ditto. (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto. * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): Ditto. (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto. Update mac, win and chromium's specific parts of AXObjectCache to match the new signature for nodeTextChangePlatformNotification(), which won't affect their behaviour as they were not implementing that method anyway. * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::nodeTextChangePlatformNotification): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::nodeTextChangePlatformNotification): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Source/WebKit/gtk: Updated unit test to handle the new 'text-insert' and 'text-remove' signals, instead of the 'text-changed' one. * tests/testatk.c: (textChangedCb): Update a global variable with the result of the text change, so we can check its value later. (testWebkitAtkTextChangedNotifications): Connect to the 'text-insert' and 'text-remove' signals and check, in a way more carefully way than it was done before, that the signals are being properly emitted, and that the information attached to them is the right one for each case (insert/remove, offset, count and text). Canonical link: https://commits.webkit.org/89830@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
133 additions
and 46 deletions.
- +60 −0 Source/WebCore/ChangeLog
- +2 −2 Source/WebCore/accessibility/AXObjectCache.cpp
- +4 −4 Source/WebCore/accessibility/AXObjectCache.h
- +1 −1 Source/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
- +7 −8 Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp
- +1 −1 Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
- +1 −1 Source/WebCore/accessibility/win/AXObjectCacheWin.cpp
- +1 −2 Source/WebCore/editing/AppendNodeCommand.cpp
- +2 −2 Source/WebCore/editing/DeleteFromTextNodeCommand.cpp
- +2 −2 Source/WebCore/editing/InsertIntoTextNodeCommand.cpp
- +2 −2 Source/WebCore/editing/InsertNodeBeforeCommand.cpp
- +19 −0 Source/WebKit/gtk/ChangeLog
- +31 −21 Source/WebKit/gtk/tests/testatk.c
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters