Don't dispatch '(SVG)load' to ancestors of <svg:image> after doc. 'load'

When an <svg:image> is inserted after document load has been dispatched,
we don't want to dispatch 'load' again to any ancestor 'svg' roots (inner
or outer). Hence only dispatch an event to the element itself in this
condition.

Take the opportunity to clean up SVGElement::sendSVGLoadEventIfPossible
a bit, by splitting it into send-to-self and send-to-self-and-ancestors
methods (most callers call the former). Also unravel the control-flow of
the ancestors-version a bit compared to the old version.

BUG=372946

Review URL: https://codereview.chromium.org/375923002

git-svn-id: svn://svn.chromium.org/blink/trunk@177814 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed
tree: 165a1a43d2c71e9f44e9103cc9fb1db34936871b
  1. third_party/