image/imgINotificationObserver.idl
author Morten Stenshorne <mstensho@chromium.org>
Tue, 09 Oct 2018 04:14:13 +0000
changeset 495959 13844f50ee32e17f513b7c1013c2348200e21b8c
parent 272516 ef516c84ef5496c3a8576e85c3e6ecb7b0776104
permissions -rw-r--r--
Bug 1496274 [wpt PR 13345] - [LayoutNG] Correct clip-path reference box calculation., a=testonly Automatic update from web-platform-tests[LayoutNG] Correct clip-path reference box calculation. We used coordinates relatively to the line box, while we were expected by the caller to be relative to the containing block. Flipping for writing mode was bogus for NG (but needed by legacy), since NG uses truly physical coordinates. Hardened tests to contain a leading line and padding, and leading content on the first line of the clipped child. Bug: 641907 Change-Id: I2b1b9ff4ea92a6405fcdffcf139842458b46442f Cq-Include-Trybots: luci.chromium.try​:linux_layout_tests_layout_ng Reviewed-on: https://chromium-review.googlesource.com/c/1257913 Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#596554} -- wpt-commits: e9a0828c85819340f721f121aac19ab8eefa3439 wpt-pr: 13345

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface imgIRequest;

%{C++
#include "nsRect.h"
%}

[ptr] native nsIntRect(nsIntRect);

[scriptable, builtinclass, uuid(03da5641-a333-454a-a859-036d0bb683b7)]
interface imgINotificationObserver : nsISupports
{
  // GetWidth() and GetHeight() can now be used to retrieve the size of the
  // image.
  const long SIZE_AVAILABLE = 1;

  // A region of the image (indicated by the |aRect| argument to |notify|) has
  // changed, and needs to be redrawn. This is triggered both for incremental
  // rendering as the image gets decoded and for changes due to animation.
  const long FRAME_UPDATE = 2;

  // The first frame of the image is now decoded and ready to draw.
  const long FRAME_COMPLETE = 3;

  // The entire image has been loaded. That doesn't mean that it has been
  // decoded, but it does mean that imgIContainer::Draw is guaranteed to succeed
  // (modulo decode errors, at least) if you specify FLAG_SYNC_DECODE.
  const long LOAD_COMPLETE = 4;

  // The entire image has been decoded.
  const long DECODE_COMPLETE = 5;

  // The decoded version of the image has been discarded. Content should never
  // change as a result of this notification - discarding is an implementation
  // detail. This notification should normally only be observed by tests.
  const long DISCARD = 6;

  // The image was drawn without being locked. This notification is part of the
  // image locking mechanism that prevents visible images from being discarded;
  // generally only image locking code needs to observe it.
  const long UNLOCKED_DRAW = 7;

  // The image is animated.
  const long IS_ANIMATED = 8;

  // The image is transparent.
  const long HAS_TRANSPARENCY = 9;

  [noscript] void notify(in imgIRequest aProxy, in long aType,
                         [const] in nsIntRect aRect);
};