WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
29552
[Qt] API: Make it possible to customize the DND behaviour of QWebView/QWebPage
https://bugs.webkit.org/show_bug.cgi?id=29552
Summary
[Qt] API: Make it possible to customize the DND behaviour of QWebView/QWebPage
Tor Arne Vestbø
Reported
2009-09-21 07:35:27 PDT
This bug report originated from Nokia internal issue QT-1259 --- Description --- QWebView by default accepts drops of URLs onto the page background. In a browser environment that is a nice feature, but when embedding webkit in an application this may not be wanted at all. We need an API that allows customizing this behaviour. --- Comments --- Note: shausman: 02/13/09 04:00:36 AM: Once this is implemented we can remove the setAcceptDrops(false) workarounds in Qt Creator and the Qt Assistant
Attachments
Patch for review
(7.11 KB, patch)
2011-03-16 10:13 PDT
,
Aparna Nandyal
benjamin
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Aparna Nandyal
Comment 1
2011-03-16 10:13:48 PDT
Created
attachment 85938
[details]
Patch for review Patch to block drop action if user does not require drop action.
Benjamin Poulain
Comment 2
2011-03-16 11:19:25 PDT
Comment on
attachment 85938
[details]
Patch for review I think this is not that easy. Your patch will prevent all drop to the page. The initial problem was about changing the current document as a result of a drag and drop. You should still be able to -handle HTML 5 drag and drop -drop thing in the page, like dropping the url to an input field or an element with contentEditable
Antonio Gomes
Comment 3
2011-03-16 11:21:11 PDT
Comment on
attachment 85938
[details]
Patch for review View in context:
https://bugs.webkit.org/attachment.cgi?id=85938&action=review
It will probably not build on mac.
> Source/WebCore/ChangeLog:8 > + Added new flag with which the user can enable/disable Drop feature.
drop = drag and drop?
> Source/WebCore/page/Settings.cpp:540 > +void Settings::setDropActionEnabled(bool dropActionEnabled) > +{ > + m_dropActionEnabled = dropActionEnabled; > +} > +
you should initialize m_dropActionEnabled in the ctor initialization list.
Benjamin Poulain
Comment 4
2011-03-16 11:22:53 PDT
Thinking about it, I am not sure we really need new API at all. For the mentioned use case, I think overriding QWebPage::acceptNavigationRequest() to reject any external scheme could be as good. Simon, what do you think? Are you aware of other use cases?
Aparna Nandyal
Comment 5
2011-03-16 12:43:36 PDT
> -drop thing in the page, like dropping the url to an input field or an element with contentEditable
Thought of this use case but was not sure if drop has to be stopped completely or only url drop has to be stopped or if both settings should be made available? Will re-implement based on decision taken.
Aparna Nandyal
Comment 6
2011-03-16 12:45:16 PDT
(In reply to
comment #3
)
> (From update of
attachment 85938
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=85938&action=review
> > It will probably not build on mac. > > > Source/WebCore/ChangeLog:8 > > + Added new flag with which the user can enable/disable Drop feature. > > drop = drag and drop? >
This stops only drop. Drag will still work. User will be able to drag content from this page out.
Jocelyn Turcotte
Comment 7
2014-02-03 03:15:46 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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug