Bug 28448

Summary: convert FormatBlock candidate tag list from if chain to hash lookup
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: HTML EditingAssignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch v1
none
patch v2 oliver: review+

Maciej Stachowiak
Reported 2009-08-18 23:33:44 PDT
the validBlockTag() function does a long nested chain of if comparisons to C strings, which is lame. A hash lookup would be better.
Attachments
patch v1 (3.05 KB, patch)
2009-08-18 23:34 PDT, Maciej Stachowiak
no flags
patch v2 (3.10 KB, patch)
2009-08-19 00:00 PDT, Maciej Stachowiak
oliver: review+
Maciej Stachowiak
Comment 1 2009-08-18 23:34:51 PDT
Created attachment 35103 [details] patch v1
Darin Adler
Comment 2 2009-08-18 23:36:00 PDT
Comment on attachment 35103 [details] patch v1 What about empty string and null string? Does the contains function do the right thing for those?
Dave Hyatt
Comment 3 2009-08-18 23:36:51 PDT
Comment on attachment 35103 [details] patch v1 r=me
Maciej Stachowiak
Comment 4 2009-08-19 00:00:36 PDT
Created attachment 35104 [details] patch v2 Last version had a bug, as pointed out by Darin.
Oliver Hunt
Comment 5 2009-08-19 01:01:39 PDT
Comment on attachment 35104 [details] patch v2 r=me
Maciej Stachowiak
Comment 6 2009-08-19 01:11:21 PDT
Note You need to log in before you can comment on or make changes to this bug.