| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 dispatchDocumentElementAvailableIfNeeded(); | 400 dispatchDocumentElementAvailableIfNeeded(); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void HTMLConstructionSite::mergeAttributesFromTokenIntoElement(AtomicHTMLToken*
token, Element* element) | 403 void HTMLConstructionSite::mergeAttributesFromTokenIntoElement(AtomicHTMLToken*
token, Element* element) |
| 404 { | 404 { |
| 405 if (token->attributes().isEmpty()) | 405 if (token->attributes().isEmpty()) |
| 406 return; | 406 return; |
| 407 | 407 |
| 408 for (unsigned i = 0; i < token->attributes().size(); ++i) { | 408 for (unsigned i = 0; i < token->attributes().size(); ++i) { |
| 409 const Attribute& tokenAttribute = token->attributes().at(i); | 409 const Attribute& tokenAttribute = token->attributes().at(i); |
| 410 if (!element->elementData() || element->attributes().findIndex(tokenAttr
ibute.name()) == kNotFound) | 410 if (element->attributesWithoutUpdate().findIndex(tokenAttribute.name())
== kNotFound) |
| 411 element->setAttribute(tokenAttribute.name(), tokenAttribute.value())
; | 411 element->setAttribute(tokenAttribute.name(), tokenAttribute.value())
; |
| 412 } | 412 } |
| 413 } | 413 } |
| 414 | 414 |
| 415 void HTMLConstructionSite::insertHTMLHtmlStartTagInBody(AtomicHTMLToken* token) | 415 void HTMLConstructionSite::insertHTMLHtmlStartTagInBody(AtomicHTMLToken* token) |
| 416 { | 416 { |
| 417 // Fragments do not have a root HTML element, so any additional HTML element
s | 417 // Fragments do not have a root HTML element, so any additional HTML element
s |
| 418 // encountered during fragment parsing should be ignored. | 418 // encountered during fragment parsing should be ignored. |
| 419 if (m_isParsingFragment) | 419 if (m_isParsingFragment) |
| 420 return; | 420 return; |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 } | 869 } |
| 870 | 870 |
| 871 void HTMLConstructionSite::PendingText::trace(Visitor* visitor) | 871 void HTMLConstructionSite::PendingText::trace(Visitor* visitor) |
| 872 { | 872 { |
| 873 visitor->trace(parent); | 873 visitor->trace(parent); |
| 874 visitor->trace(nextChild); | 874 visitor->trace(nextChild); |
| 875 } | 875 } |
| 876 | 876 |
| 877 | 877 |
| 878 } | 878 } |
| OLD | NEW |