Bug 40757 - [Qt] Unfinite auto-typing in Flash
Summary: [Qt] Unfinite auto-typing in Flash
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: PC Linux
: P4 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-06-16 20:40 PDT by Vladimir Baldetski
Modified: 2014-02-03 03:13 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Baldetski 2010-06-16 20:40:07 PDT
When using WebKit component If some page contains a flash object which contains text input fields there is some wrong behavour.
Set focus to some text field of flash object, press any key, letter 'g' for example and this letter will be will be repeated indefinitely.
When type some other key, for example 'h', then char 'h' r will be will be repeated indefinitely and so on.
This makes flash text fields useless and they can't be used in normal way

I'm using QT 4.6.2 on Ubuntu 9.10
Comment 1 Jake 2010-11-14 06:38:51 PST
We are seeing this same issue on some Linux platforms. Is there any update on this issue?
Comment 2 Vladimir Baldetski 2010-11-14 19:26:59 PST
You're right. This happens on Linux platforms. I didn't find any update to fix this, so I had to fix it by myself. I suppose this problem is because of XWindow api functions, some code cheating helped me, but I didn't determine real reasons of this bug.
Comment 3 Jake 2010-11-14 19:33:04 PST
Could you please explain how you fixed it? 

Thanks jake
Comment 4 Vladimir Baldetski 2010-11-14 20:09:36 PST
Ok, I've changed some files in qt installation ( qtsdk-2010.04) as I've used webkit in qt, but not standalone. 

So, what I've done.
I've changed files PluginContainerQt.h and PluginContainerQt.cpp in qt/src/3rdparty/webkit/WebCode/plugins/qt directory

- I've added  QTime m_profiler member to class PluginContainerQt
- In method bool PluginContainerQt::x11Event(XEvent* event) at the beginning of it I've added 

  if (event->type == 3)
	return true;

  
   if ( event->type == 2)
  {
         if ( m_profiler.elapsed() < 30)
		return true;

	 char mask[32];
	 char zero[32];
	memset(mask,0, 32);
	memset(zero,0, 32);
            
      Display *d = XOpenDisplay(0);
      XQueryKeymap(d,mask );
      XAutoRepeatOff(d);
      XCloseDisplay(d);

        if (!memcmp(mask,zero, 32))
	{
            // No keys are really pressed
           return true;               
      }
       m_profiler.restart();
   }
Comment 5 Vladimir Baldetski 2010-11-14 21:08:44 PST
I've fogot, also I've added 

m_profiler.start(); 

to constructor of PluginContainerQt class
Comment 6 Benjamin Poulain 2011-01-30 04:35:13 PST
Please follow http://trac.webkit.org/wiki/QtWebKitBugs when reporing bug here.

Which Flash version do you use? Could you give an URL to test the issue?

If you want to make a patch upstream, here is some info on how to do it: http://trac.webkit.org/wiki/QtWebKitContrib
Comment 7 Jocelyn Turcotte 2014-02-03 03:13:31 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.