Revert "Filter out empty ID in attribute changed callback"
This reverts commit 103ac117. It appears that we were overly optimistic. There can be intermediate states where Element::GetIdAttribute() is called from Element::UpdateId(), which violates the DCHECK() put into place in the reverted commit. Original change's description: > Filter out empty ID in attribute changed callback > > Per spec [1], empty ID attributes must be treated identically as > nonexistent. This CL implements these steps faithfully, and results in > DocumentFragment::getElementById() always returning nullptr when the > empty string is given, thus fixing bug 1068580. > > Additionally, previously Document::getElementById() explicitly returned > nullptr when the empty string or the null string is given. The empty > string handling is no longer necessary after this CL, and thus removed. > (The null string handling is still necessary for internal C++ code that > relies on the short-circuiting behavior). > > [1]: https://dom.spec.whatwg.org/#concept-id > > Change-Id: Ia65024efef9e5ef54d9db233590a17b372282ed1 > Fixed: 1068580 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2140054 > Reviewed-by: Kent Tamura <tkent@chromium.org> > Commit-Queue: Timothy Gu <timothygu@chromium.org> > Cr-Commit-Position: refs/heads/master@{#757310} Fixed: 1069728 Change-Id: I70b2fd8d14456ec0b063cb18e5982384bd1285bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146924Reviewed-by:Kent Tamura <tkent@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#758436}
Showing
Please register or sign in to comment