WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 113639
[Qt] assignToHTMLImageElement no longer exists in Qt5
https://bugs.webkit.org/show_bug.cgi?id=113639
Summary
[Qt] assignToHTMLImageElement no longer exists in Qt5
Kristof Provost
Reported
2013-03-30 04:58:58 PDT
assignToHTMLImageElement no longer exists in Qt5
Attachments
Patch
(1.33 KB, patch)
2013-03-30 04:59 PDT
,
Kristof Provost
no flags
Details
Formatted Diff
Diff
Patch
(1.43 KB, patch)
2013-04-02 10:09 PDT
,
Kristof Provost
no flags
Details
Formatted Diff
Diff
Patch
(1.48 KB, patch)
2013-04-02 11:54 PDT
,
Kristof Provost
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kristof Provost
Comment 1
2013-03-30 04:59:39 PDT
Created
attachment 195855
[details]
Patch
Kristof Provost
Comment 2
2013-03-30 05:00:21 PDT
QWebKit allows developers to export QImage objects to Javascript and use Javascript to assign the QImage to an <img/> element. This is documented in
http://qt-project.org/doc/qt-5.0/qtwebkit/qtwebkit-bridge.html
The problem is that the documentation no longer matches reality. The (Javascript) function was indeed called assignToHTMLImageElement in Qt 4.8, but in Qt5 it's simply 'assignTo'. The responsible code can be found in qtwebkit/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp (QtPixmapRuntime::getClassRef()). I feel very strongly that there was no good reason to change the function name so rather than updating the documentation to reflect the code the code should simply be changed back to expose the old name, or to allow both. It should be trivial to allow both assignTo and assignToHTMLImageElement to be used. See also
https://bugreports.qt-project.org/browse/QTBUG-30208
Jocelyn Turcotte
Comment 3
2013-04-02 06:09:41 PDT
Comment on
attachment 195855
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=195855&action=review
> Source/WebCore/ChangeLog:3 > + assignToHTMLImageElement no longer exists in Qt5
We usually add a [Qt] prefix before the titles and ChangeLog headlines of Qt-specific WebKit bugs.
> Source/WebCore/bridge/qt/qt_pixmapruntime.cpp:257 > + { "assignToHTMLImageElement", assignToHTMLImageElement, 0 }, > { "assignTo", assignToHTMLImageElement, 0 },
This was a mistake so I think that we can just replace the "assignTo" entry instead of having two names for the function.
Kristof Provost
Comment 4
2013-04-02 10:05:37 PDT
I chose to keep the old name so things wouldn't break for anyone using qt-5.0.1 with javascript code using 'assignTo'. I'll submit a new patch to fix both remarks.
Kristof Provost
Comment 5
2013-04-02 10:09:40 PDT
Created
attachment 196172
[details]
Patch
Jocelyn Turcotte
Comment 6
2013-04-02 10:45:23 PDT
Comment on
attachment 196172
[details]
Patch Great :)
Jocelyn Turcotte
Comment 7
2013-04-02 10:48:13 PDT
(In reply to
comment #4
)
> I chose to keep the old name so things wouldn't break for anyone using qt-5.0.1 with javascript code using 'assignTo'.
That also makes sense. Since the documentation wasn't matching normallly they should be as skeptical as you were (that is if they bothered digging in the code) and they shouldn't be surprised that it gets changed back. I'll pick this change into 5.1.
WebKit Review Bot
Comment 8
2013-04-02 10:55:53 PDT
Comment on
attachment 196172
[details]
Patch Rejecting
attachment 196172
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 196172, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue Last 500 characters of output: t/git/webkit-commit-queue/Source/WebKit/chromium/v8 --revision 14075 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' 55>At revision 14075. ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output:
http://webkit-commit-queue.appspot.com/results/17334471
Jocelyn Turcotte
Comment 9
2013-04-02 11:17:00 PDT
Comment on
attachment 196172
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=196172&action=review
> Source/WebCore/ChangeLog:8 > + No new tests (OOPS!).
Please state that this bug is already covered by the tst_hybridPixmap API test (which doesn't seem to be run by the bot for some reason). The OOPS in the "Reviewed by" line will be replaced by the commit queue.
Kristof Provost
Comment 10
2013-04-02 11:54:31 PDT
Created
attachment 196202
[details]
Patch
WebKit Review Bot
Comment 11
2013-04-03 04:13:48 PDT
Comment on
attachment 196202
[details]
Patch Clearing flags on attachment: 196202 Committed
r147539
: <
http://trac.webkit.org/changeset/147539
>
WebKit Review Bot
Comment 12
2013-04-03 04:13:51 PDT
All reviewed patches have been landed. Closing bug.
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