-
ch.dumez@sisa.samsung.com authored
https://bugs.webkit.org/show_bug.cgi?id=118898 Reviewed by Darin Adler. Source/WebCore: According to the latest specification, window.atob() should throw an InvalidCharacterError on excess padding characters: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob This behavior is consistent with both Firefox, IE10 and recently Blink. No new tests, already covered by: fast/dom/Window/atob-btoa.html * page/DOMWindow.cpp: (WebCore::DOMWindow::atob): Source/WTF: Add a Base64FailOnInvalidCharacterOrExcessPadding value to the Base64DecodePolicy enumeration so that the caller can request strict padding validation in addition to strict character validation. This is needed so that we can use WTF::base64Decode() for window.atob(). * wtf/text/Base64.cpp: (WTF::base64DecodeInternal): * wtf/text/Base64.h: LayoutTests: Update and rebaseline fast/dom/Window/atob-btoa.html now that window.atob()'s behavior has changed and now that we throw an InvalidCharacterError on excess pad characters. * fast/dom/Window/atob-btoa-expected.txt: * fast/dom/Window/atob-btoa.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
843e421d