| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 addStringToDigestor(digestor.get(), childInfo->m_sha1); | 415 addStringToDigestor(digestor.get(), childInfo->m_sha1); |
| 416 child = child->nextSibling(); | 416 child = child->nextSibling(); |
| 417 digest->m_children.append(childInfo.release()); | 417 digest->m_children.append(childInfo.release()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 AttributeCollection attributes = element.attributesWithoutUpdate(); | 420 AttributeCollection attributes = element.attributesWithoutUpdate(); |
| 421 if (!attributes.isEmpty()) { | 421 if (!attributes.isEmpty()) { |
| 422 OwnPtr<WebCryptoDigestor> attrsDigestor = createDigestor(HashAlgorit
hmSha1); | 422 OwnPtr<WebCryptoDigestor> attrsDigestor = createDigestor(HashAlgorit
hmSha1); |
| 423 for (auto& attribute : attributes) { | 423 for (auto& attribute : attributes) { |
| 424 addStringToDigestor(attrsDigestor.get(), attribute.name().toStri
ng()); | 424 addStringToDigestor(attrsDigestor.get(), attribute.name().toStri
ng()); |
| 425 addStringToDigestor(attrsDigestor.get(), attribute.value().strin
g()); | 425 addStringToDigestor(attrsDigestor.get(), attribute.value().getSt
ring()); |
| 426 } | 426 } |
| 427 finishDigestor(attrsDigestor.get(), digestResult); | 427 finishDigestor(attrsDigestor.get(), digestResult); |
| 428 digest->m_attrsSHA1 = base64Encode(reinterpret_cast<const char*>(dig
estResult.data()), 10); | 428 digest->m_attrsSHA1 = base64Encode(reinterpret_cast<const char*>(dig
estResult.data()), 10); |
| 429 addStringToDigestor(digestor.get(), digest->m_attrsSHA1); | 429 addStringToDigestor(digestor.get(), digest->m_attrsSHA1); |
| 430 digestResult.clear(); | 430 digestResult.clear(); |
| 431 } | 431 } |
| 432 } | 432 } |
| 433 finishDigestor(digestor.get(), digestResult); | 433 finishDigestor(digestor.get(), digestResult); |
| 434 digest->m_sha1 = base64Encode(reinterpret_cast<const char*>(digestResult.dat
a()), 10); | 434 digest->m_sha1 = base64Encode(reinterpret_cast<const char*>(digestResult.dat
a()), 10); |
| 435 | 435 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 #endif | 503 #endif |
| 504 | 504 |
| 505 DEFINE_TRACE(DOMPatchSupport::Digest) | 505 DEFINE_TRACE(DOMPatchSupport::Digest) |
| 506 { | 506 { |
| 507 visitor->trace(m_node); | 507 visitor->trace(m_node); |
| 508 visitor->trace(m_children); | 508 visitor->trace(m_children); |
| 509 } | 509 } |
| 510 | 510 |
| 511 } // namespace blink | 511 } // namespace blink |
| 512 | 512 |
| OLD | NEW |