Projects/Acid3: Difference between revisions

From KDE TechBase
m (Text replace - "<code diff>" to "<syntaxhighlight lang="diff">")
 
(40 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Acid3 Test Failures of KHTML ==
== Acid3 Test Failures of KHTML ==


This is an overview of the remaing [https://bugs.kde.org/show_bug.cgi?id=156947 failures] of KHTML on the [http://acid3.acidtests.org/ Acid3] test.
This is an overview of the remaing [https://bugs.kde.org/show_bug.cgi?id=156947 failures] of KHTML on the [http://acid3.acidtests.org/ Acid3] test. FF3.1 beta2pre scores 92/100, with 4 of the 6 colored boxes filled in correctly.


{| border="1"
{| border="1"
Line 9: Line 9:
! Diagnosis
! Diagnosis
! Comment
! Comment
! passes in FF3b5
! passes in FF3
! passes in FF3.1
|-
|-
| 04 || HTML Parser || Parser bug: iframe missing text kid || discard_until = ID_IFRAME+ID_CLOSE_TAG --- added in http://lists.kde.org/?l=kde-commits&m=99906936412933&w=2. || No
| 13 || DOM Range || Unhandled mutation (will port wc patch. Sp.)|| || Yes || Yes
|-
|-
| 13 || DOM Range || Unhandled mutation || || Yes
| 26/27 || JS + DOM Memory management || Cycle breaking cleaning up too much || || Yes, but slow || Yes, but slow
|-
|-
| 18 || ???? || ???? || || Yes
| 29 || HTML Parser || Parser bug: table missing whitespace kid || || Yes || Yes
|-
|-
| Red image(16) || Part loading || || Not doing fall-back content in the general delayed mimetype-resolution processObjectRequest path. The fallback in RenderImage would be sufficient, but fails because INF_ERROR_PAGE isn't re-sent with the mimetype when resuming a held job || Yes
| 48 (red linktest failed) || CSS || :visited doesn't match URL of part || Bug in konqueror's history manager. Works in testkhtml || Yes || Yes
|-
|-
| 26/27 || JS + DOM Memory management || Cycle breaking cleaning up too much || || Yes, but slow
| 51 || DOM2 Table || Stray row || Buggy test. Raised with Ian Hickson. || Yes || Yes
|-
|-
| 29 || HTML Parser || Parser bug: table missing whitespace kid || || Yes
| 53 || DOM2 Forms || Not managing form's element collection when not in document. || || Yes || Yes
|-
|-
| 35 || CSS || getComputedStyle() on <head> (no renderer) || || Yes
| 70 || XML Parser || " UTF-8 encoded XML document with invalid character did not have a well-formedness error" || || No || Yes
|-
|-
| 38 || CSS || Lack of restyle || "adding text to a text node didn't make the element non-:empty" || No
| 74 || DOM || "getSVGDocument missing on <iframe> element." || || Yes || Yes
|-
|-
| 41 || CSS || getComputedStyle() on something else rendererless || || Yes
| 75 || SVG+SMIL DOM || "SVG DOM interface SVGRectElement not supported." || || No || No
|-
|-
| 43 ||  || || Checkboxes, value, attributes || Yes
| 76 || SVG+SMIL DOM ||  ?? || || No || No
|-
|-
| 44 || ????|| ???? || || Yes
| 77,78,79 || SVG Fonts || ?? || || No || No
|-
|}
| 48 (red linktest failed) || CSS || :visited doesn't match relative URL right || Performance critical, hot on things like Qt docs, and already slow || Yes
|-
| 51 || DOM2 Table || Stray row || Buggy test. Raised with Ian Hickson. || Yes
|-
| 53 || DOM2 Forms || Not managing form's element collection when not in document. || || Yes
|-
| 65/69 || Part loading || onload events not emitted for many objects ||  || Yes, after several attempts
|-
| 70-80 || || Can't run due to 65/69 || SVG, SMIL + XHTML || No
|-
| 89 || JS RegExp || Lacking syntax check || Perl-centric PCRE behavior. Author promised JS-mode. || Yes
|-
| 90 || JS RegExp || References || Perl-centric PCRE behavior. Author promised JS-mode.
(was it ever considered to use Boost.Regex engine instead ? it claims to be using strict ECMA syntax as per http://boost.org/doc/libs/1_35_0/libs/regex/doc/html/boost_regex/ref/syntax_option_type/syntax_option_type_perl.html


Update: I tried to build a test application with Boost.Regex 1.33 and it had the same issues than PCRE: /a[])]/ compiled and /(\3)(\1)(a)/ went back as "Invalid Back Reference". -gg
Note: An upgrade to PCRE 7.7 is required to make tests 89 and 90 pass.
 
== Acid3 Error report ==
Seems that despite the name, it's not really ES compatible --- if the docs are right, it doesn't support \u.
Error obtained with Konqueror 4.2.1, using Qt4.5RC. 20-march-2009.
  || Yes
<pre>
|-
Failed 15 tests.
| 98 || XHTML || createDocument() || Missing view. See proposed [https://bugs.kde.org/attachment.cgi?id=24212&action=view patch] || No
Test 04 failed: expected 'null' but got '[object HTMLIFrameElement]' - expectation 21 failed
|}
Test 08 passed, but took 86ms (less than 30fps)
Test 09 passed, but took 59ms (less than 30fps)
Test 13 failed: collapsed is wrong after deletion
Test 26 failed: e1 - parent element doesn't exist after looping
Test 27 failed: e1 - parent element doesn't exist after waiting
Test 29 failed: expected '2' but got '1' - cloned table had wrong number of children
Test 33 passed, but took 61ms (less than 30fps)
Test 40 passed, but took 46ms (less than 30fps)
Test 44 failed: expected '0' but got '1' - misparsed selectors
Test 46 passed, but took 57ms (less than 30fps)
Test 47 passed, but took 52ms (less than 30fps)
Test 51 failed: expected '6' but got '5' - wrong number of rows
Test 53 failed: expected '1' but got '0' - form's elements array has wrong size
Test 69 passed, but took 213 attempts (less than perfect).
Test 70 failed: UTF-8 encoded XML document with invalid character did not have a well-formedness error
Test 74 failed: getSVGDocument missing on <iframe> element.
Test 75 failed: SVG DOM interface SVGRectElement not supported.
Test 76 failed: Undefined value
Test 77 failed: SVGTextContentElement.getNumberOfChars() not supported.
Test 78 failed: Attempt to use a non-function object or a value as a function.
Test 79 failed: Attempt to use a non-function object or a value as a function.
Test 98 passed, but took 63ms (less than 30fps)
Total elapsed time: 17.30s
</pre>


== Random patch storage ==  
== Random patch storage ==  
Line 62: Line 72:
=== #16, red cat. ===
=== #16, red cat. ===
Ugly, but roughly correct.
Ugly, but roughly correct.
<pre>
<syntaxhighlight lang="diff">
Index: kio/slavebase.cpp
Index: kio/slavebase.cpp
===================================================================
===================================================================
Line 87: Line 97:
     send( INF_MIME_TYPE, data );
     send( INF_MIME_TYPE, data );
     while(true)
     while(true)
</pre>
</syntaxhighlight>


=== #4, iframe kids. ===
=== #48, red linktest failed ===
This one may be committable, actually
It's a bug inside KonqHistoryManager --- it ignores some inserts, which makes the link not :visited.
<pre>
--- a/html/htmlparser.cpp
+++ b/html/htmlparser.cpp
@@ -874,7 +874,7 @@ NodeImpl *KHTMLParser::getElement(Token* t)
        // a bit a special case, since the frame is inlined...
    case ID_IFRAME:
        n = new HTMLIFrameElementImpl(document);
-        if (!t->flat) discard_until = ID_IFRAME+ID_CLOSE_TAG;
+        //if (!t->flat) discard_until = ID_IFRAME+ID_CLOSE_TAG;
        break;
 
// form elements
</pre>
 
=== #35/#41 ===
This one just shows that the analysis is correct. It's incorrect
(no inheritance), and inefficient.
 
<pre>
--- a/css/css_renderstyledeclarationimpl.cpp
+++ b/css/css_renderstyledeclarationimpl.cpp
@@ -26,6 +26,7 @@
 
#include "cssproperties.h"
#include "cssvalues.h"
+#include "cssstyleselector.h"
 
#include <dom/dom_exception.h>
 
@@ -376,14 +377,20 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
    }
 
    RenderObject *renderer = m_node->renderer();
+    SharedPtr<RenderStyle> onDemandStyle;
    if (!renderer) {
        // Handle display:none at the very least.  By definition if we don't have a renderer
        // we are considered to have no display.
        if (propertyID == CSS_PROP_DISPLAY)
            return new CSSPrimitiveValueImpl(CSS_VAL_NONE);
-        return 0;
+
+      // Brutal brute force path. Wrong due to inheritance. hmm.
+      if (node->isElementNode())
+          onDemandStyle = node->getDocument()->styleSelector()->styleForElement(static_cast<ElementImpl*>(node));
+      else
+          return 0;
    }
-    RenderStyle *style = renderer->style();
+    RenderStyle *style = renderer ? renderer->style() : onDemandStyle.get();
    if (!style)
        return 0;
</pre>

Latest revision as of 21:14, 29 June 2011

Acid3 Test Failures of KHTML

This is an overview of the remaing failures of KHTML on the Acid3 test. FF3.1 beta2pre scores 92/100, with 4 of the 6 colored boxes filled in correctly.

Test No Area Diagnosis Comment passes in FF3 passes in FF3.1
13 DOM Range Unhandled mutation (will port wc patch. Sp.) Yes Yes
26/27 JS + DOM Memory management Cycle breaking cleaning up too much Yes, but slow Yes, but slow
29 HTML Parser Parser bug: table missing whitespace kid Yes Yes
48 (red linktest failed) CSS :visited doesn't match URL of part Bug in konqueror's history manager. Works in testkhtml Yes Yes
51 DOM2 Table Stray row Buggy test. Raised with Ian Hickson. Yes Yes
53 DOM2 Forms Not managing form's element collection when not in document. Yes Yes
70 XML Parser " UTF-8 encoded XML document with invalid character did not have a well-formedness error" No Yes
74 DOM "getSVGDocument missing on <iframe> element." Yes Yes
75 SVG+SMIL DOM "SVG DOM interface SVGRectElement not supported." No No
76 SVG+SMIL DOM ?? No No
77,78,79 SVG Fonts ?? No No

Note: An upgrade to PCRE 7.7 is required to make tests 89 and 90 pass.

Acid3 Error report

Error obtained with Konqueror 4.2.1, using Qt4.5RC. 20-march-2009.

Failed 15 tests.
Test 04 failed: expected 'null' but got '[object HTMLIFrameElement]' - expectation 21 failed
Test 08 passed, but took 86ms (less than 30fps)
Test 09 passed, but took 59ms (less than 30fps)
Test 13 failed: collapsed is wrong after deletion
Test 26 failed: e1 - parent element doesn't exist after looping
Test 27 failed: e1 - parent element doesn't exist after waiting
Test 29 failed: expected '2' but got '1' - cloned table had wrong number of children
Test 33 passed, but took 61ms (less than 30fps)
Test 40 passed, but took 46ms (less than 30fps)
Test 44 failed: expected '0' but got '1' - misparsed selectors
Test 46 passed, but took 57ms (less than 30fps)
Test 47 passed, but took 52ms (less than 30fps)
Test 51 failed: expected '6' but got '5' - wrong number of rows
Test 53 failed: expected '1' but got '0' - form's elements array has wrong size
Test 69 passed, but took 213 attempts (less than perfect).
Test 70 failed: UTF-8 encoded XML document with invalid character did not have a well-formedness error
Test 74 failed: getSVGDocument missing on <iframe> element.
Test 75 failed: SVG DOM interface SVGRectElement not supported.
Test 76 failed: Undefined value
Test 77 failed: SVGTextContentElement.getNumberOfChars() not supported.
Test 78 failed: Attempt to use a non-function object or a value as a function.
Test 79 failed: Attempt to use a non-function object or a value as a function.
Test 98 passed, but took 63ms (less than 30fps)
Total elapsed time: 17.30s

Random patch storage

These are not meant for commit, but more as a proof of analysis, and starting point for proper fix:

#16, red cat.

Ugly, but roughly correct.

Index: kio/slavebase.cpp
===================================================================
--- kio/slavebase.cpp	(revision 793314)
+++ kio/slavebase.cpp	(working copy)
@@ -527,6 +527,7 @@
 void SlaveBase::errorPage()
 {
     send( INF_ERROR_PAGE );
+    mOutgoingMetaData["__kio_error_page"] = "1";
 }
 
 static bool isSubCommand(int cmd)
@@ -554,6 +555,11 @@
       KIO_DATA << mOutgoingMetaData;
       send( INF_META_DATA, data );
     }
+
+    // re-send the error-page flag as well.
+    if (mOutgoingMetaData.contains("__kio_error_page"))
+	send( INF_ERROR_PAGE );
+    
     KIO_DATA << _type;
     send( INF_MIME_TYPE, data );
     while(true)

#48, red linktest failed

It's a bug inside KonqHistoryManager --- it ignores some inserts, which makes the link not :visited.