| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> |
| 3 * Copyright (C) 2006, 2009 Apple Inc. | 3 * Copyright (C) 2006, 2009 Apple Inc. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 if (startPos == length) | 343 if (startPos == length) |
| 344 break; | 344 break; |
| 345 | 345 |
| 346 size_t endPos = startPos; | 346 size_t endPos = startPos; |
| 347 while (endPos < length && !isWhitespace(idList[endPos])) | 347 while (endPos < length && !isWhitespace(idList[endPos])) |
| 348 ++endPos; | 348 ++endPos; |
| 349 | 349 |
| 350 // If there are several nodes with the same id, id() should return the f
irst one. | 350 // If there are several nodes with the same id, id() should return the f
irst one. |
| 351 // In WebKit, getElementById behaves so, too, although its behavior in t
his case is formally undefined. | 351 // In WebKit, getElementById behaves so, too, although its behavior in t
his case is formally undefined. |
| 352 Node* node = contextScope.getElementById(idList.substring(startPos, endP
os - startPos)); | 352 Node* node = contextScope.getElementById(AtomicString(idList.substring(s
tartPos, endPos - startPos))); |
| 353 if (node && resultSet.add(node).isNewEntry) | 353 if (node && resultSet.add(node).isNewEntry) |
| 354 result.append(node); | 354 result.append(node); |
| 355 | 355 |
| 356 startPos = endPos; | 356 startPos = endPos; |
| 357 } | 357 } |
| 358 | 358 |
| 359 result.markSorted(false); | 359 result.markSorted(false); |
| 360 | 360 |
| 361 return Value(result, Value::adopt); | 361 return Value(result, Value::adopt); |
| 362 } | 362 } |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 return 0; | 731 return 0; |
| 732 | 732 |
| 733 Function* function = functionRec->factoryFn(); | 733 Function* function = functionRec->factoryFn(); |
| 734 function->setArguments(args); | 734 function->setArguments(args); |
| 735 function->setName(name); | 735 function->setName(name); |
| 736 return function; | 736 return function; |
| 737 } | 737 } |
| 738 | 738 |
| 739 } | 739 } |
| 740 } | 740 } |
| OLD | NEW |