mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
2ddfe368e1
- bug 1215748 - use llvm-dsymutil for mac builds. r=mshal (a217006d89) - warnings (31ea43d0d8) - Bug 1175154 - Unit tests for IAC on 3.0. r=ferjm (12c424bab3) - Bug 1219543 - Part 1: isRunningOnCompositor flag is now a member of AnimationProperty. r=bbirtles (85bc668501) - Bug 1219543 - Part 2: Avoid the period that mIsRunningOnCompositor is false between restyling and building display list. r=bbirtles (597e46d479) - Bug 1219543 - Part 3: MutationObserver should disconnect when the test is finished. r=bbirtles (70c26a266e) - Bug 1214148 - patch 1 - propagation from the nested iframe back to the toplevel iframe, r=alwu (b42002f43a) - Bug 1214148 - patch 2 - from toplevel iframe to the nested iframe, r=alwu (7b07fe5399) - Bug 1214148 - patch 3 - correct window for nested iframes, r=alwu (27ee08caf1) - Bug 1166910 - put referrer attribute behind pref in webidl, r=bz (93e421fa1b) - Bug 1187357 - rename referrer attribute to referrerpolicy. r=hsivonen (70c67f5def) - Bug 1187357 - Generated code for renaming referrer to referrerpolicy in html parser. r=hsivonen (738de3f278) - Bug 1221341. Snap box shadow clip rect to device pixels. r=mstange (b63b783714) - Bug 1228634 - Implement Element.getAttributeNames, r=peterv (4594d9c14c) - Bug 1216193. Implement webkitMatchesSelector. r=khuey (39742b7e0b) - Bug 1134648, handle dynamic changes to rel=dns-prefetch, r=bz (e27638080e) - Bug 1229962 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in parser/html/; r=hsivonen (75de6314f1) - Bug 1226437 - Speculative CSP should set speculative referrer policy instead of actual referrer policy. r=sicking (f7dfd3fd18) - Bug 1227554 - Default to NullPrincipal if doc is not available within expatdriver. r=bz (336a562965) - Bug 1215781 - Use MOZ_UTF16 to generate sTagUnicodeTable. r=mrbkap (eca371a36b) - Bug 1082598 - Part 5: Fix NPAPI for Skia update. r=jrmuizel (25c4d080ab) - Bug 1183828 - Remove 'nsWindow::GetNativeData not implemented for this type' warning. r=roc (0a60404b57) - Bug 1224445 - Add NS_NATIVE_OPENGL_CONTEXT handling to nsWindow::GetNativeData() r=mwu (ee35844be4) - Bug 1179632 part.1 native IME context should not be stored in InputContext but should be able to retrieve with nsIWidget::GetNativeData() r=smaug (5f1804bb72) - Bug 1179632 part.2 WidgetCompositionEvent should store NativeIMEContext which caused the event and PuppetWidget should store it for GetNativeIMEContext() r=smaug, sr=smaug (e00ca78e3f) - Bug 1179632 part.3 TabParent::RecvEndIMEComposition() shouldn't return true with aNoCompositionEvent when there is no widget r=smaug (ee065ed491) - Bug 1179632 part.4 Clean up the code to request IME to commit composition across process boundary r=smaug (9567c4dc57) - Bug 1179632 part.5 WidgetCompositionEvent::mNativeIMEContext should be used at looking for a TextComposition instance for a WidgetCompositionEvent r=smaug (f4e27ec28c) - Bug 1179632 part.6 KeyboardEvent.isComposing shouldn't expose IME state on different document r=smaug (ca8b8a6a02) - Bug 1227544 - Scaling on 720p devices is broken. r=timdream (cb89af839f)
149 lines
5.2 KiB
C++
149 lines
5.2 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
|
|
#ifndef nsBrowserElement_h
|
|
#define nsBrowserElement_h
|
|
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
|
#include "mozilla/dom/BrowserElementAudioChannel.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
#include "nsIBrowserElementAPI.h"
|
|
|
|
class nsFrameLoader;
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
struct BrowserElementDownloadOptions;
|
|
struct BrowserElementExecuteScriptOptions;
|
|
class BrowserElementNextPaintEventCallback;
|
|
class DOMRequest;
|
|
enum class BrowserFindCaseSensitivity: uint32_t;
|
|
enum class BrowserFindDirection: uint32_t;
|
|
} // namespace dom
|
|
|
|
class ErrorResult;
|
|
|
|
/**
|
|
* A helper class for browser-element frames
|
|
*/
|
|
class nsBrowserElement
|
|
{
|
|
public:
|
|
nsBrowserElement() : mOwnerIsWidget(false) {}
|
|
virtual ~nsBrowserElement() {}
|
|
|
|
void SetVisible(bool aVisible, ErrorResult& aRv);
|
|
already_AddRefed<dom::DOMRequest> GetVisible(ErrorResult& aRv);
|
|
void SetActive(bool aActive, ErrorResult& aRv);
|
|
bool GetActive(ErrorResult& aRv);
|
|
|
|
void SendMouseEvent(const nsAString& aType,
|
|
uint32_t aX,
|
|
uint32_t aY,
|
|
uint32_t aButton,
|
|
uint32_t aClickCount,
|
|
uint32_t aModifiers,
|
|
ErrorResult& aRv);
|
|
void SendTouchEvent(const nsAString& aType,
|
|
const dom::Sequence<uint32_t>& aIdentifiers,
|
|
const dom::Sequence<int32_t>& aX,
|
|
const dom::Sequence<int32_t>& aY,
|
|
const dom::Sequence<uint32_t>& aRx,
|
|
const dom::Sequence<uint32_t>& aRy,
|
|
const dom::Sequence<float>& aRotationAngles,
|
|
const dom::Sequence<float>& aForces,
|
|
uint32_t aCount,
|
|
uint32_t aModifiers,
|
|
ErrorResult& aRv);
|
|
void GoBack(ErrorResult& aRv);
|
|
void GoForward(ErrorResult& aRv);
|
|
void Reload(bool aHardReload, ErrorResult& aRv);
|
|
void Stop(ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest>
|
|
Download(const nsAString& aUrl,
|
|
const dom::BrowserElementDownloadOptions& options,
|
|
ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest> PurgeHistory(ErrorResult& aRv);
|
|
|
|
void GetAllowedAudioChannels(
|
|
nsTArray<RefPtr<dom::BrowserElementAudioChannel>>& aAudioChannels,
|
|
ErrorResult& aRv);
|
|
|
|
void Mute(ErrorResult& aRv);
|
|
void Unmute(ErrorResult& aRv);
|
|
already_AddRefed<dom::DOMRequest> GetMuted(ErrorResult& aRv);
|
|
|
|
void SetVolume(float aVolume , ErrorResult& aRv);
|
|
already_AddRefed<dom::DOMRequest> GetVolume(ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest>
|
|
GetScreenshot(uint32_t aWidth,
|
|
uint32_t aHeight,
|
|
const nsAString& aMimeType,
|
|
ErrorResult& aRv);
|
|
|
|
void Zoom(float aZoom, ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest> GetCanGoBack(ErrorResult& aRv);
|
|
already_AddRefed<dom::DOMRequest> GetCanGoForward(ErrorResult& aRv);
|
|
already_AddRefed<dom::DOMRequest> GetContentDimensions(ErrorResult& aRv);
|
|
|
|
void FindAll(const nsAString& aSearchString, dom::BrowserFindCaseSensitivity aCaseSensitivity,
|
|
ErrorResult& aRv);
|
|
void FindNext(dom::BrowserFindDirection aDirection, ErrorResult& aRv);
|
|
void ClearMatch(ErrorResult& aRv);
|
|
|
|
void AddNextPaintListener(dom::BrowserElementNextPaintEventCallback& listener,
|
|
ErrorResult& aRv);
|
|
void RemoveNextPaintListener(dom::BrowserElementNextPaintEventCallback& listener,
|
|
ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest> SetInputMethodActive(bool isActive,
|
|
ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest> ExecuteScript(const nsAString& aScript,
|
|
const dom::BrowserElementExecuteScriptOptions& aOptions,
|
|
ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest> GetStructuredData(ErrorResult& aRv);
|
|
|
|
already_AddRefed<dom::DOMRequest> GetWebManifest(ErrorResult& aRv);
|
|
|
|
void SetNFCFocus(bool isFocus,
|
|
ErrorResult& aRv);
|
|
|
|
// Helper
|
|
static void GenerateAllowedAudioChannels(
|
|
nsPIDOMWindow* aWindow,
|
|
nsIFrameLoader* aFrameLoader,
|
|
nsIBrowserElementAPI* aAPI,
|
|
const nsAString& aManifestURL,
|
|
mozIApplication* aParentApp,
|
|
nsTArray<RefPtr<dom::BrowserElementAudioChannel>>& aAudioChannels,
|
|
ErrorResult& aRv);
|
|
|
|
protected:
|
|
NS_IMETHOD_(already_AddRefed<nsFrameLoader>) GetFrameLoader() = 0;
|
|
NS_IMETHOD GetParentApplication(mozIApplication** aApplication) = 0;
|
|
|
|
void InitBrowserElementAPI();
|
|
nsCOMPtr<nsIBrowserElementAPI> mBrowserElementAPI;
|
|
nsTArray<RefPtr<dom::BrowserElementAudioChannel>> mBrowserElementAudioChannels;
|
|
|
|
private:
|
|
bool IsBrowserElementOrThrow(ErrorResult& aRv);
|
|
bool IsNotWidgetOrThrow(ErrorResult& aRv);
|
|
bool mOwnerIsWidget;
|
|
};
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // nsBrowserElement_h
|