Don't require a valid reference scope for a <use> shadow tree update
When determining if a URL-string was pointing to an internal or external
resource, the null-string was considered external because it does not
start w/ '#' and Document::completeURL will explicitly return a null KURL
in that case. The latter means that the comparison against the document
URL will fail - i.e. the "URL" will be considered to be external.
Due to this, no attempt to rebuild the shadow-tree will be made, leaving
it in an inconsistent state.
Fix by dropping the check for a valid referenceScope in
scheduleShadowTreeRecreation
(in favor of the check in buildPendingResource).
This also fixes the case where a local reference is replaced by an
invalid remote reference (like one lacking a fragment identifier). This
would previously fail to update because it too had a null "reference"
scope.
Also convert callers of SVGURIReference::isExternalURIReference to call
isStructurallyExternal instead. This lends a bit of consistency to the
definition of "local" used in SVGUseElement. It also means that the null
'href' case is considered to be a local reference (which has no practical
consequence, but makes the handling of null be similar to the handling of
the empty string - with the exception of base URL handling.)
BUG=516051
Review URL: https://codereview.chromium.org/1287243003
git-svn-id: svn://svn.chromium.org/blink/trunk@200537 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed