Bug 118941

Summary: Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, barraclough, commit-queue, esprehn+autocc, kangil.han, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch barraclough: review+

Benjamin Poulain
Reported 2013-07-19 23:40:56 PDT
Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
Attachments
Patch (7.79 KB, patch)
2013-07-19 23:44 PDT, Benjamin Poulain
barraclough: review+
Benjamin Poulain
Comment 1 2013-07-19 23:44:46 PDT
Gavin Barraclough
Comment 2 2013-07-21 16:15:22 PDT
Comment on attachment 207189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207189&action=review > Source/WebCore/dom/SpaceSplitString.h:91 > + return spaceSplitStringContainsValue(spaceSplitString, value, length - 1, shouldFoldCase); The -1 here wasn't obvious to me?
Benjamin Poulain
Comment 3 2013-07-21 18:57:57 PDT
(In reply to comment #2) > (From update of attachment 207189 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=207189&action=review > > > Source/WebCore/dom/SpaceSplitString.h:91 > > + return spaceSplitStringContainsValue(spaceSplitString, value, length - 1, shouldFoldCase); > > The -1 here wasn't obvious to me? It is because the length of the array for a string literal include the ending zero. "Foo" -> evaluates to 4.
Benjamin Poulain
Comment 4 2013-07-22 15:22:42 PDT
Note You need to log in before you can comment on or make changes to this bug.