| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 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 are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 { | 56 { |
| 57 if (encodedString.isNull()) | 57 if (encodedString.isNull()) |
| 58 return String(); | 58 return String(); |
| 59 | 59 |
| 60 if (!encodedString.containsOnlyLatin1()) { | 60 if (!encodedString.containsOnlyLatin1()) { |
| 61 ec = InvalidCharacterError; | 61 ec = InvalidCharacterError; |
| 62 return String(); | 62 return String(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 Vector<char> out; | 65 Vector<char> out; |
| 66 if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacter)) { | 66 if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacter, Base64St
rictPaddingValidation)) { |
| 67 ec = InvalidCharacterError; | 67 ec = InvalidCharacterError; |
| 68 return String(); | 68 return String(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 return String(out.data(), out.size()); | 71 return String(out.data(), out.size()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace DOMWindowBase64 | 74 } // namespace DOMWindowBase64 |
| 75 | 75 |
| 76 } // namespace WebCore | 76 } // namespace WebCore |
| OLD | NEW |