&AElig doesn't get rendered as U+00C6
authorpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 May 2012 10:23:41 +0000 (10:23 +0000)
committerpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 May 2012 10:23:41 +0000 (10:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87465

Reviewed by Adam Barth.

Source/WebCore:

The if-statement to check whether the first entry of a certain letter
already exists in the index used .get(). The very first alphabetical
entry is in position "0", which evaluates to false, causing the first
entry to be ignored. Instead, use a "x not in y" check here.

Also update WebCore.gyp to list the create-html-entity-table script as
an input for the action, to make sure the table will be recreated.

Test: html5lib/resources/entities02.dat

* WebCore.gyp/WebCore.gyp:
* html/parser/create-html-entity-table:

LayoutTests:

Test that the (current) first alphabetical entity in the named entity
table (&AElig, without a semi-colon) renders as expected.

* html5lib/resources/entities02.dat:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@118672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/html5lib/resources/entities02.dat
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/html/parser/create-html-entity-table

index b0e0424..4981607 100644 (file)
@@ -1,3 +1,15 @@
+2012-05-28  Peter Beverloo  <peter@chromium.org>
+
+        &AElig doesn't get rendered as U+00C6
+        https://bugs.webkit.org/show_bug.cgi?id=87465
+
+        Reviewed by Adam Barth.
+
+        Test that the (current) first alphabetical entity in the named entity
+        table (&AElig, without a semi-colon) renders as expected.
+
+        * html5lib/resources/entities02.dat:
+
 2012-05-28  Christophe Dumez  <christophe.dumez@intel.com>
 
         [EFL] fast/dom/beforeload/image-object-before-load* need to be skipped after r118618
index e2fb42a..b484687 100644 (file)
 |   <body>
 |     <div>
 |       "ZZ&prod=23"
+
+#data
+<div>ZZ&AElig=</div>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <div>
+|       "ZZÆ="
index d87e183..4cd7bc8 100644 (file)
@@ -1,3 +1,23 @@
+2012-05-28  Peter Beverloo  <peter@chromium.org>
+
+        &AElig doesn't get rendered as U+00C6
+        https://bugs.webkit.org/show_bug.cgi?id=87465
+
+        Reviewed by Adam Barth.
+
+        The if-statement to check whether the first entry of a certain letter
+        already exists in the index used .get(). The very first alphabetical
+        entry is in position "0", which evaluates to false, causing the first
+        entry to be ignored. Instead, use a "x not in y" check here.
+
+        Also update WebCore.gyp to list the create-html-entity-table script as
+        an input for the action, to make sure the table will be recreated.
+
+        Test: html5lib/resources/entities02.dat
+
+        * WebCore.gyp/WebCore.gyp:
+        * html/parser/create-html-entity-table:
+
 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
 
         Web Inspector: dom counters graphs vanish on switching between timeline views
index 309e335..aafd471 100644 (file)
         {
           'action_name': 'HTMLEntityTable',
           'inputs': [
+            '../html/parser/create-html-entity-table',
             '../html/parser/HTMLEntityNames.in',
           ],
           'outputs': [
index a99a35b..28a880e 100755 (executable)
@@ -124,7 +124,7 @@ index = {}
 offset = 0
 for entry in entries:
     letter = entry[ENTITY][0]
-    if not index.get(letter):
+    if letter not in index:
         index[letter] = offset
     values = entry[VALUE].split(' ')
     assert len(values) <= 2, values