2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2011-10-11 09:50:08 +04:00
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
#include "mozilla/dom/HTMLIFrameElement.h"
|
2013-02-27 19:38:32 +04:00
|
|
|
#include "mozilla/dom/HTMLIFrameElementBinding.h"
|
2004-01-26 22:22:05 +03:00
|
|
|
#include "nsMappedAttributes.h"
|
2012-09-30 20:40:24 +04:00
|
|
|
#include "nsAttrValueInlines.h"
|
2012-07-27 18:03:27 +04:00
|
|
|
#include "nsError.h"
|
2004-07-20 10:11:27 +04:00
|
|
|
#include "nsRuleData.h"
|
2007-04-28 20:01:24 +04:00
|
|
|
#include "nsStyleConsts.h"
|
2013-01-23 23:39:03 +04:00
|
|
|
#include "nsContentUtils.h"
|
2004-04-13 02:47:24 +04:00
|
|
|
|
2010-08-17 18:13:55 +04:00
|
|
|
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(IFrame)
|
2000-12-23 13:56:31 +03:00
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-06-20 06:01:40 +04:00
|
|
|
HTMLIFrameElement::HTMLIFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
|
2013-02-23 04:59:26 +04:00
|
|
|
FromParser aFromParser)
|
2010-08-17 18:13:55 +04:00
|
|
|
: nsGenericHTMLFrameElement(aNodeInfo, aFromParser)
|
1998-09-03 05:03:33 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::~HTMLIFrameElement()
|
1998-09-03 05:03:33 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-04-27 11:06:00 +04:00
|
|
|
NS_IMPL_ISUPPORTS_INHERITED(HTMLIFrameElement, nsGenericHTMLFrameElement,
|
|
|
|
nsIDOMHTMLIFrameElement)
|
2008-02-21 23:39:20 +03:00
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
NS_IMPL_ELEMENT_CLONE(HTMLIFrameElement)
|
|
|
|
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, Align, align)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, FrameBorder, frameborder)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, Height, height)
|
|
|
|
NS_IMPL_URI_ATTR(HTMLIFrameElement, LongDesc, longdesc)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, MarginHeight, marginheight)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, MarginWidth, marginwidth)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, Name, name)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, Scrolling, scrolling)
|
|
|
|
NS_IMPL_URI_ATTR(HTMLIFrameElement, Src, src)
|
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, Width, width)
|
2013-02-26 05:59:33 +04:00
|
|
|
NS_IMPL_BOOL_ATTR(HTMLIFrameElement, AllowFullscreen, allowfullscreen)
|
2013-06-29 07:13:23 +04:00
|
|
|
NS_IMPL_STRING_ATTR(HTMLIFrameElement, Srcdoc, srcdoc)
|
1998-09-03 05:03:33 +04:00
|
|
|
|
2012-06-05 03:49:57 +04:00
|
|
|
void
|
2015-02-13 04:27:39 +03:00
|
|
|
HTMLIFrameElement::GetItemValueText(DOMString& aValue)
|
2012-06-05 03:49:57 +04:00
|
|
|
{
|
|
|
|
GetSrc(aValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::SetItemValueText(const nsAString& aValue)
|
2012-06-05 03:49:57 +04:00
|
|
|
{
|
|
|
|
SetSrc(aValue);
|
|
|
|
}
|
|
|
|
|
2000-04-02 18:04:19 +04:00
|
|
|
NS_IMETHODIMP
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::GetContentDocument(nsIDOMDocument** aContentDocument)
|
2000-04-02 18:04:19 +04:00
|
|
|
{
|
2004-04-13 02:47:24 +04:00
|
|
|
return nsGenericHTMLFrameElement::GetContentDocument(aContentDocument);
|
2002-04-20 23:22:51 +04:00
|
|
|
}
|
|
|
|
|
2011-10-15 11:34:31 +04:00
|
|
|
NS_IMETHODIMP
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::GetContentWindow(nsIDOMWindow** aContentWindow)
|
2011-10-15 11:34:31 +04:00
|
|
|
{
|
|
|
|
return nsGenericHTMLFrameElement::GetContentWindow(aContentWindow);
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::ParseAttribute(int32_t aNamespaceID,
|
|
|
|
nsIAtom* aAttribute,
|
|
|
|
const nsAString& aValue,
|
|
|
|
nsAttrValue& aResult)
|
1998-09-03 05:03:33 +04:00
|
|
|
{
|
2005-11-29 19:37:15 +03:00
|
|
|
if (aNamespaceID == kNameSpaceID_None) {
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::marginwidth) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::marginheight) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::width) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::height) {
|
2011-02-04 22:46:16 +03:00
|
|
|
return aResult.ParseSpecialIntValue(aValue);
|
2005-11-29 19:37:15 +03:00
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::frameborder) {
|
2005-11-29 19:37:15 +03:00
|
|
|
return ParseFrameborderValue(aValue, aResult);
|
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::scrolling) {
|
2005-11-29 19:37:15 +03:00
|
|
|
return ParseScrollingValue(aValue, aResult);
|
|
|
|
}
|
2006-12-26 20:47:52 +03:00
|
|
|
if (aAttribute == nsGkAtoms::align) {
|
2005-11-29 19:37:15 +03:00
|
|
|
return ParseAlignValue(aValue, aResult);
|
|
|
|
}
|
2013-12-19 01:42:24 +04:00
|
|
|
if (aAttribute == nsGkAtoms::sandbox) {
|
|
|
|
aResult.ParseAtomArray(aValue);
|
|
|
|
return true;
|
|
|
|
}
|
1998-09-10 03:30:30 +04:00
|
|
|
}
|
2000-12-23 13:56:31 +03:00
|
|
|
|
2005-11-29 19:37:15 +03:00
|
|
|
return nsGenericHTMLFrameElement::ParseAttribute(aNamespaceID, aAttribute,
|
|
|
|
aValue, aResult);
|
1998-09-03 05:03:33 +04:00
|
|
|
}
|
|
|
|
|
2013-11-19 23:21:29 +04:00
|
|
|
void
|
|
|
|
HTMLIFrameElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
|
|
|
nsRuleData* aData)
|
1998-09-03 05:03:33 +04:00
|
|
|
{
|
2007-10-09 01:58:22 +04:00
|
|
|
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Border)) {
|
2000-05-17 01:56:02 +04:00
|
|
|
// frameborder: 0 | 1 (| NO | YES in quirks mode)
|
|
|
|
// If frameborder is 0 or No, set border to 0
|
|
|
|
// else leave it as the value set in html.css
|
2006-12-26 20:47:52 +03:00
|
|
|
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::frameborder);
|
2004-04-13 20:45:59 +04:00
|
|
|
if (value && value->Type() == nsAttrValue::eEnum) {
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t frameborder = value->GetEnumValue();
|
2000-05-17 01:56:02 +04:00
|
|
|
if (NS_STYLE_FRAME_0 == frameborder ||
|
|
|
|
NS_STYLE_FRAME_NO == frameborder ||
|
|
|
|
NS_STYLE_FRAME_OFF == frameborder) {
|
2015-01-17 07:16:02 +03:00
|
|
|
nsCSSValue* borderLeftWidth = aData->ValueForBorderLeftWidth();
|
2011-03-18 06:14:31 +03:00
|
|
|
if (borderLeftWidth->GetUnit() == eCSSUnit_Null)
|
|
|
|
borderLeftWidth->SetFloatValue(0.0f, eCSSUnit_Pixel);
|
2015-01-17 07:16:02 +03:00
|
|
|
nsCSSValue* borderRightWidth = aData->ValueForBorderRightWidth();
|
2011-03-18 06:14:31 +03:00
|
|
|
if (borderRightWidth->GetUnit() == eCSSUnit_Null)
|
|
|
|
borderRightWidth->SetFloatValue(0.0f, eCSSUnit_Pixel);
|
|
|
|
nsCSSValue* borderTopWidth = aData->ValueForBorderTopWidth();
|
|
|
|
if (borderTopWidth->GetUnit() == eCSSUnit_Null)
|
|
|
|
borderTopWidth->SetFloatValue(0.0f, eCSSUnit_Pixel);
|
|
|
|
nsCSSValue* borderBottomWidth = aData->ValueForBorderBottomWidth();
|
|
|
|
if (borderBottomWidth->GetUnit() == eCSSUnit_Null)
|
|
|
|
borderBottomWidth->SetFloatValue(0.0f, eCSSUnit_Pixel);
|
2000-05-17 01:56:02 +04:00
|
|
|
}
|
|
|
|
}
|
1998-09-10 03:30:30 +04:00
|
|
|
}
|
2007-10-09 01:58:22 +04:00
|
|
|
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
|
2001-06-01 02:19:43 +04:00
|
|
|
// width: value
|
2011-03-18 06:14:31 +03:00
|
|
|
nsCSSValue* width = aData->ValueForWidth();
|
|
|
|
if (width->GetUnit() == eCSSUnit_Null) {
|
2006-12-26 20:47:52 +03:00
|
|
|
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
|
2004-04-13 20:45:59 +04:00
|
|
|
if (value && value->Type() == nsAttrValue::eInteger)
|
2011-03-18 06:14:31 +03:00
|
|
|
width->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
|
2004-04-13 20:45:59 +04:00
|
|
|
else if (value && value->Type() == nsAttrValue::ePercent)
|
2011-03-18 06:14:31 +03:00
|
|
|
width->SetPercentValue(value->GetPercentValue());
|
2001-06-01 02:19:43 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
// height: value
|
2011-03-18 06:14:31 +03:00
|
|
|
nsCSSValue* height = aData->ValueForHeight();
|
|
|
|
if (height->GetUnit() == eCSSUnit_Null) {
|
2006-12-26 20:47:52 +03:00
|
|
|
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::height);
|
2004-04-13 20:45:59 +04:00
|
|
|
if (value && value->Type() == nsAttrValue::eInteger)
|
2011-03-18 06:14:31 +03:00
|
|
|
height->SetFloatValue((float)value->GetIntegerValue(), eCSSUnit_Pixel);
|
2004-04-13 20:45:59 +04:00
|
|
|
else if (value && value->Type() == nsAttrValue::ePercent)
|
2011-03-18 06:14:31 +03:00
|
|
|
height->SetPercentValue(value->GetPercentValue());
|
2001-06-01 02:19:43 +04:00
|
|
|
}
|
|
|
|
}
|
2000-12-23 13:56:31 +03:00
|
|
|
|
2003-07-12 01:16:12 +04:00
|
|
|
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
|
2001-06-01 02:19:43 +04:00
|
|
|
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
|
1998-09-05 08:00:06 +04:00
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHODIMP_(bool)
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
1999-07-07 05:24:40 +04:00
|
|
|
{
|
2004-02-26 00:04:50 +03:00
|
|
|
static const MappedAttributeEntry attributes[] = {
|
2006-12-26 20:47:52 +03:00
|
|
|
{ &nsGkAtoms::width },
|
|
|
|
{ &nsGkAtoms::height },
|
|
|
|
{ &nsGkAtoms::frameborder },
|
2012-07-30 18:20:58 +04:00
|
|
|
{ nullptr },
|
2003-04-17 00:54:20 +04:00
|
|
|
};
|
|
|
|
|
2004-02-26 00:04:50 +03:00
|
|
|
static const MappedAttributeEntry* const map[] = {
|
2003-04-17 00:54:20 +04:00
|
|
|
attributes,
|
2003-07-12 01:16:12 +04:00
|
|
|
sImageAlignAttributeMap,
|
2003-04-17 00:54:20 +04:00
|
|
|
sCommonAttributeMap,
|
|
|
|
};
|
|
|
|
|
2011-12-18 14:09:27 +04:00
|
|
|
return FindAttributeDependence(aAttribute, map);
|
1999-07-07 05:24:40 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-01-12 22:45:38 +03:00
|
|
|
nsMapRuleToAttributesFunc
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::GetAttributeMappingFunction() const
|
1998-09-05 08:00:06 +04:00
|
|
|
{
|
2005-01-12 22:45:38 +03:00
|
|
|
return &MapAttributesIntoRule;
|
1998-09-03 05:03:33 +04:00
|
|
|
}
|
|
|
|
|
2013-06-29 07:13:23 +04:00
|
|
|
nsresult
|
|
|
|
HTMLIFrameElement::SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
|
|
|
nsIAtom* aPrefix, const nsAString& aValue,
|
|
|
|
bool aNotify)
|
|
|
|
{
|
|
|
|
nsresult rv = nsGenericHTMLFrameElement::SetAttr(aNameSpaceID, aName,
|
|
|
|
aPrefix, aValue, aNotify);
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
|
|
|
|
if (aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::srcdoc) {
|
|
|
|
// Don't propagate error here. The attribute was successfully set, that's
|
|
|
|
// what we should reflect.
|
|
|
|
LoadSrc();
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2012-08-20 22:34:32 +04:00
|
|
|
nsresult
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
|
|
|
const nsAttrValue* aValue,
|
|
|
|
bool aNotify)
|
2012-08-20 22:34:32 +04:00
|
|
|
{
|
2013-12-19 01:42:24 +04:00
|
|
|
if (aName == nsGkAtoms::sandbox && aNameSpaceID == kNameSpaceID_None && mFrameLoader) {
|
|
|
|
// If we have an nsFrameLoader, apply the new sandbox flags.
|
|
|
|
// Since this is called after the setter, the sandbox flags have
|
|
|
|
// alreay been updated.
|
|
|
|
mFrameLoader->ApplySandboxFlags(GetSandboxFlags());
|
2012-08-20 22:34:32 +04:00
|
|
|
}
|
2014-01-12 08:05:49 +04:00
|
|
|
return nsGenericHTMLFrameElement::AfterSetAttr(aNameSpaceID, aName, aValue,
|
|
|
|
aNotify);
|
2013-01-23 23:39:03 +04:00
|
|
|
}
|
|
|
|
|
2013-06-29 07:13:23 +04:00
|
|
|
nsresult
|
|
|
|
HTMLIFrameElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
|
|
|
|
bool aNotify)
|
|
|
|
{
|
|
|
|
// Invoke on the superclass.
|
|
|
|
nsresult rv = nsGenericHTMLFrameElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
|
|
|
|
if (aNameSpaceID == kNameSpaceID_None &&
|
|
|
|
aAttribute == nsGkAtoms::srcdoc) {
|
|
|
|
// Fall back to the src attribute, if any
|
|
|
|
LoadSrc();
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2013-01-23 23:39:03 +04:00
|
|
|
uint32_t
|
2013-02-23 04:59:26 +04:00
|
|
|
HTMLIFrameElement::GetSandboxFlags()
|
2013-01-23 23:39:03 +04:00
|
|
|
{
|
2013-12-20 01:35:25 +04:00
|
|
|
const nsAttrValue* sandboxAttr = GetParsedAttr(nsGkAtoms::sandbox);
|
|
|
|
return nsContentUtils::ParseSandboxAttributeToFlags(sandboxAttr);
|
2012-08-20 22:34:32 +04:00
|
|
|
}
|
2013-02-23 04:59:26 +04:00
|
|
|
|
2013-02-27 19:38:32 +04:00
|
|
|
JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
HTMLIFrameElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
2013-02-27 19:38:32 +04:00
|
|
|
{
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
return HTMLIFrameElementBinding::Wrap(aCx, this, aGivenProto);
|
2013-02-27 19:38:32 +04:00
|
|
|
}
|
|
|
|
|
2013-02-23 04:59:26 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|