author Masayuki Nakano <>
Fri, 19 May 2017 17:49:41 +0900
changeset 407399 b75c111837a802ceb953dba50a3c5a193d53ca22
parent 350469 da7e463365483b733b6fec2eca8cacd12e98ecc9
child 448005 57a108d1c90a9979e2b79dbf138e055ee07ed97b
permissions -rw-r--r--
Bug 1339543 part 4 Change nsIWidget::ExecuteNativeKeyBinding() to nsIWidget::GetEditCommands() which just retrieves edit commands for the type r=smaug Now, nsIWidget::ExecuteNativeKeyBinding() isn't used by anybody for executing edit commands. Instead, they need array of edit commands for the key combination. So, the method should be renamed to GetEditCommands() and just return edit commands as an array. MozReview-Commit-ID: 4G0B1lJ8Lbe

/* -*- 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 */

#ifndef nsDOMStringMap_h
#define nsDOMStringMap_h

#include "nsCycleCollectionParticipant.h"
#include "nsTArray.h"
#include "nsString.h"
#include "nsWrapperCache.h"
#include "mozilla/dom/Element.h"
#include "jsfriendapi.h" // For js::ExpandoAndGeneration

namespace mozilla {
class ErrorResult;
} // namespace mozilla

class nsDOMStringMap : public nsStubMutationObserver,
                       public nsWrapperCache


  nsINode* GetParentObject()
    return mElement;

  explicit nsDOMStringMap(mozilla::dom::Element* aElement);

  // WebIDL API
  virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
  void NamedGetter(const nsAString& aProp, bool& found,
                   mozilla::dom::DOMString& aResult) const;
  void NamedSetter(const nsAString& aProp, const nsAString& aValue,
                   mozilla::ErrorResult& rv);
  void NamedDeleter(const nsAString& aProp, bool &found);
  void GetSupportedNames(nsTArray<nsString>& aNames);

  js::ExpandoAndGeneration mExpandoAndGeneration;

  virtual ~nsDOMStringMap();

  RefPtr<mozilla::dom::Element> mElement;
  // Flag to guard against infinite recursion.
  bool mRemovingProp;
  static bool DataPropToAttr(const nsAString& aProp, nsAutoString& aResult);
  static bool AttrToDataProp(const nsAString& aAttr, nsAutoString& aResult);