[SCM] qt5webkit packaging branch, master, updated. debian/5.3.2+dfsg-3-2-g3ccc587

Dmitry Shachnev mitya57 at moszumanska.debian.org
Wed Apr 1 09:39:21 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qt5webkit.git;a=commitdiff;h=3ccc587

The following commit has been merged in the master branch:
commit 3ccc5876e2f431618911428dd29e308db50bf155
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Wed Apr 1 12:37:49 2015 +0300

    Backport upstream fix that adds missing checks for HTMLUnknownElement.
---
 debian/changelog                                |  3 +
 debian/patches/check_html_unknown_elements.diff | 81 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 3 files changed, 85 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 25265d2..333b0ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 qtwebkit-opensource-src (5.3.2+dfsg-4) UNRELEASED; urgency=medium
 
+  [ Dmitry Shachnev ]
+  * Backport upstream fix that adds missing checks for HTMLUnknownElement.
+    Closes: #781194.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Wed, 01 Apr 2015 11:51:03 +0300
 
diff --git a/debian/patches/check_html_unknown_elements.diff b/debian/patches/check_html_unknown_elements.diff
new file mode 100644
index 0000000..6aa8d04
--- /dev/null
+++ b/debian/patches/check_html_unknown_elements.diff
@@ -0,0 +1,81 @@
+Description: need to check if some HTML child elements are HTMLUnknownElement
+ Based on upstream fix http://trac.webkit.org/changeset/156953
+ .
+ The check for whether an element is an HTMLAudioElement or not was
+ incomplete. An element can have the 'audio' tag-name but still be
+ another element if media elements have been disabled. In this
+ case it will be an HTMLUnknownElement.
+Origin: upstream, http://code.qt.io/cgit/qt/qtwebkit.git/commit/?id=d84668b5124b2dd9
+Bug-Debian: https://bugs.debian.org/781194
+Last-Update: 2015-04-01
+
+--- a/Source/WebCore/dom/make_names.pl
++++ b/Source/WebCore/dom/make_names.pl
+@@ -390,6 +390,10 @@
+     my ($F, $tagName, $interfaceName, $constructorTagName) = @_;
+ 
+     # Handle media elements.
++    # Note that wrapperOnlyIfMediaIsAvailable is a misnomer, because media availability
++    # does not just control the wrapper; it controls the element object that is created.
++    # FIXME: Could we instead do this entirely in the wrapper, and use custom wrappers
++    # instead of having all the support for this here in this script?
+     if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) {
+         print F <<END
+     Settings* settings = document->settings();
+@@ -1042,14 +1046,11 @@
+             print F "#if ${conditionalString}

";
+         }
+ 
+-        # Hack for the media tags
+-        # FIXME: This should have been done via a CustomWrapper attribute and a separate *Custom file.
+         if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) {
+             print F <<END
+ static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
+ {
+-    Settings* settings = element->document()->settings();
+-    if (!MediaPlayer::isAvailable() || (settings && !settings->mediaEnabled()))
++    if (element->isHTMLUnknownElement())
+         return CREATE_DOM_WRAPPER(exec, globalObject, $parameters{namespace}Element, element.get());
+     return CREATE_DOM_WRAPPER(exec, globalObject, ${JSInterfaceName}, element.get());
+ }
+--- a/Source/WebCore/html/HTMLAudioElement.h
++++ b/Source/WebCore/html/HTMLAudioElement.h
+@@ -43,14 +43,19 @@
+     HTMLAudioElement(const QualifiedName&, Document*, bool);
+ };
+ 
+-inline bool isHTMLAudioElement(Node* node)
++inline bool isHTMLAudioElement(HTMLElement* element)
+ {
+-    return node->hasTagName(HTMLNames::audioTag);
++    return !element->isHTMLUnknownElement() && element->hasTagName(HTMLNames::audioTag);
+ }
+ 
+ inline bool isHTMLAudioElement(Element* element)
+ {
+-    return element->hasTagName(HTMLNames::audioTag);
++    return element->isHTMLElement() && isHTMLAudioElement(toHTMLElement(element));
++}
++
++inline bool isHTMLAudioElement(Node* node)
++{
++    return node->isHTMLElement() && isHTMLAudioElement(toHTMLElement(node));
+ }
+ 
+ inline HTMLAudioElement* toHTMLAudioElement(Node* node)
+--- a/Source/WebCore/html/HTMLMediaElement.cpp
++++ b/Source/WebCore/html/HTMLMediaElement.cpp
+@@ -2379,6 +2379,13 @@
+ 
+ bool HTMLMediaElement::paused() const
+ {
++    // As of this writing, JavaScript garbage collection calls this function directly. In the past
++    // we had problems where this was called on an object after a bad cast. The assertion below
++    // made our regression test detect the problem, so we should keep it because of that. But note
++    // that the value of the assertion relies on the compiler not being smart enough to know that
++    // isHTMLUnknownElement is guaranteed to return false for an HTMLMediaElement.
++    ASSERT(!isHTMLUnknownElement());
++
+     return m_paused;
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 86c8cd0..63288fb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ no_gc_sections.diff
 hurd.diff
 webkit_qt_hide_symbols.diff
 fix_nonlinux_glibc_linkage.diff
+check_html_unknown_elements.diff

-- 
qt5webkit packaging



More information about the pkg-kde-commits mailing list