Skip to content

Commit

Permalink
Merge commit '6dcfd648be27ba7584559f0eae889262f7acae7c' into embedlite
Browse files Browse the repository at this point in the history
Conflicts:
	dom/media/fmp4/eme/EMEH264Decoder.cpp
	dom/media/gmp/GMPVideoDecoderParent.cpp
	dom/media/gmp/GMPVideoDecoderParent.h
	dom/media/gmp/GMPVideoDecoderProxy.h
	dom/media/gmp/GMPVideoEncoderParent.cpp
	dom/media/gmp/GMPVideoEncoderParent.h
	dom/media/gmp/GMPVideoEncoderProxy.h
	dom/media/gstreamer/GStreamerReader.cpp
	media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
  • Loading branch information
tmeshkova committed Feb 22, 2015
2 parents 0fdde22 + 6dcfd64 commit 3a99b80
Show file tree
Hide file tree
Showing 10,172 changed files with 582,786 additions and 351,569 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,5 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

bug 1114669 removes nsIStreamCipher.idl, which requires a clobber according to bug 1114669
Bug 1119335 - (DOMString or sequence<DOMString> or ConstrainDOMStringParameters)
needs binding flush (Bug 1103153).
14 changes: 14 additions & 0 deletions GNUmakefile
@@ -0,0 +1,14 @@
# This Makefile is used as a shim to aid people with muscle memory
# so that they can type "make".
#
# This file and all of its targets should not be used by anything important.

all: build

build:
./mach build

clean:
./mach clobber

.PHONY: all build clean
1 change: 1 addition & 0 deletions README.txt
Expand Up @@ -26,3 +26,4 @@ testing, may be buggy. Firefox nightlies, for example, can be found at:
- or -
http://nightly.mozilla.org/


34 changes: 34 additions & 0 deletions accessible/atk/AccessibleWrap.cpp
Expand Up @@ -961,6 +961,40 @@ refRelationSetCB(AtkObject *aAtkObj)
AtkRelationSet* relation_set =
ATK_OBJECT_CLASS(parent_class)->ref_relation_set(aAtkObj);

const AtkRelationType typeMap[] = {
#define RELATIONTYPE(gecko, s, atk, m, i) atk,
#include "RelationTypeMap.h"
#undef RELATIONTYPE
};

if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
nsTArray<RelationType> types;
nsTArray<nsTArray<ProxyAccessible*>> targetSets;
proxy->Relations(&types, &targetSets);

size_t relationCount = types.Length();
for (size_t i = 0; i < relationCount; i++) {
if (typeMap[static_cast<uint32_t>(types[i])] == ATK_RELATION_NULL)
continue;

size_t targetCount = targetSets[i].Length();
nsAutoTArray<AtkObject*, 5> wrappers;
for (size_t j = 0; j < targetCount; j++)
wrappers.AppendElement(GetWrapperFor(targetSets[i][j]));

AtkRelationType atkType = typeMap[static_cast<uint32_t>(types[i])];
AtkRelation* atkRelation =
atk_relation_set_get_relation_by_type(relation_set, atkType);
if (atkRelation)
atk_relation_set_remove(relation_set, atkRelation);

atkRelation = atk_relation_new(wrappers.Elements(), wrappers.Length(),
atkType);
atk_relation_set_add(relation_set, atkRelation);
g_object_unref(atkRelation);
}
}

AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
if (!accWrap)
return relation_set;
Expand Down
21 changes: 20 additions & 1 deletion accessible/base/ARIAMap.cpp
Expand Up @@ -366,6 +366,16 @@ static nsRoleMapEntry sWAIRoleMaps[] =
kNoReqStates,
eARIACheckableBool
},
{ // none
&nsGkAtoms::none,
roles::NOTHING,
kUseMapRole,
eNoValue,
eNoAction,
eNoLiveAttr,
kGenericAccType,
kNoReqStates
},
{ // note
&nsGkAtoms::note_,
roles::NOTE,
Expand Down Expand Up @@ -711,7 +721,7 @@ static const AttrCharacteristics gWAIUnivAttrMap[] = {
{&nsGkAtoms::aria_flowto, ATTR_BYPASSOBJ | ATTR_GLOBAL },
{&nsGkAtoms::aria_grabbed, ATTR_VALTOKEN | ATTR_GLOBAL },
{&nsGkAtoms::aria_haspopup, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
{&nsGkAtoms::aria_hidden, ATTR_BYPASSOBJ_IF_FALSE | ATTR_VALTOKEN | ATTR_GLOBAL },
{&nsGkAtoms::aria_hidden, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL }, /* handled special way */
{&nsGkAtoms::aria_invalid, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
{&nsGkAtoms::aria_label, ATTR_BYPASSOBJ | ATTR_GLOBAL },
{&nsGkAtoms::aria_labelledby, ATTR_BYPASSOBJ | ATTR_GLOBAL },
Expand Down Expand Up @@ -798,6 +808,15 @@ aria::AttrCharacteristicsFor(nsIAtom* aAtom)
return 0;
}

bool
aria::HasDefinedARIAHidden(nsIContent* aContent)
{
return aContent &&
nsAccUtils::HasDefinedARIAToken(aContent, nsGkAtoms::aria_hidden) &&
!aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_hidden,
nsGkAtoms::_false, eCaseMatters);
}

////////////////////////////////////////////////////////////////////////////////
// AttrIterator class

Expand Down
5 changes: 5 additions & 0 deletions accessible/base/ARIAMap.h
Expand Up @@ -227,6 +227,11 @@ uint64_t UniversalStatesFor(mozilla::dom::Element* aElement);
*/
uint8_t AttrCharacteristicsFor(nsIAtom* aAtom);

/**
* Return true if the element has defined aria-hidden.
*/
bool HasDefinedARIAHidden(nsIContent* aContent);

/**
* Represents a simple enumerator for iterating through ARIA attributes
* exposed as object attributes on a given accessible.
Expand Down
14 changes: 7 additions & 7 deletions accessible/base/AccGroupInfo.cpp
Expand Up @@ -64,10 +64,10 @@ AccGroupInfo::Update()

// If the previous item in the group has calculated group information then
// build group information for this item based on found one.
if (sibling->mGroupInfo) {
mPosInSet += sibling->mGroupInfo->mPosInSet;
mParent = sibling->mGroupInfo->mParent;
mSetSize = sibling->mGroupInfo->mSetSize;
if (sibling->mBits.groupInfo) {
mPosInSet += sibling->mBits.groupInfo->mPosInSet;
mParent = sibling->mBits.groupInfo->mParent;
mSetSize = sibling->mBits.groupInfo->mSetSize;
return;
}

Expand Down Expand Up @@ -101,9 +101,9 @@ AccGroupInfo::Update()

// If the next item in the group has calculated group information then
// build group information for this item based on found one.
if (sibling->mGroupInfo) {
mParent = sibling->mGroupInfo->mParent;
mSetSize = sibling->mGroupInfo->mSetSize;
if (sibling->mBits.groupInfo) {
mParent = sibling->mBits.groupInfo->mParent;
mSetSize = sibling->mBits.groupInfo->mSetSize;
return;
}

Expand Down
1 change: 1 addition & 0 deletions accessible/base/AccTypes.h
Expand Up @@ -52,6 +52,7 @@ enum AccType {
eHTMLOptGroupType,
eImageMapType,
eMenuPopupType,
eProxyType,
eProgressType,
eRootType,
eXULLabelType,
Expand Down
2 changes: 0 additions & 2 deletions accessible/base/RelationType.h
Expand Up @@ -7,8 +7,6 @@
#ifndef mozilla_a11y_relationtype_h_
#define mozilla_a11y_relationtype_h_

#include "mozilla/TypedEnum.h"

namespace mozilla {
namespace a11y {

Expand Down
13 changes: 12 additions & 1 deletion accessible/base/nsAccCache.h
Expand Up @@ -20,12 +20,23 @@ static PLDHashOperator
ClearCacheEntry(const void* aKey, nsRefPtr<T>& aAccessible, void* aUserArg)
{
NS_ASSERTION(aAccessible, "Calling ClearCacheEntry with a nullptr pointer!");
if (aAccessible)
if (aAccessible && !aAccessible->IsDefunct())
aAccessible->Shutdown();

return PL_DHASH_REMOVE;
}

template <class T>
static PLDHashOperator
UnbindCacheEntryFromDocument(const void* aKey, nsRefPtr<T>& aAccessible,
void* aUserArg)
{
MOZ_ASSERT(aAccessible && !aAccessible->IsDefunct());
aAccessible->Document()->UnbindFromDocument(aAccessible);

return PL_DHASH_REMOVE;
}

/**
* Clear the cache and shutdown the accessibles.
*/
Expand Down
73 changes: 37 additions & 36 deletions accessible/base/nsAccessibilityService.cpp
Expand Up @@ -962,59 +962,60 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
// If the element is focusable or global ARIA attribute is applied to it or
// it is referenced by ARIA relationship then treat role="presentation" on
// the element as the role is not there.
if (roleMapEntry && roleMapEntry->Is(nsGkAtoms::presentation)) {
if (roleMapEntry &&
(roleMapEntry->Is(nsGkAtoms::presentation) ||
roleMapEntry->Is(nsGkAtoms::none))) {
if (!MustBeAccessible(content, document))
return nullptr;

roleMapEntry = nullptr;
}

if (!newAcc && isHTML) { // HTML accessibles
if (roleMapEntry) {
// Create pure ARIA grid/treegrid related accessibles if they weren't used
// on accessible HTML table elements.
bool isARIATableOrCell = roleMapEntry &&
(roleMapEntry->accTypes & (eTableCell | eTable));

if (!isARIATableOrCell ||
frame->AccessibleType() == eHTMLTableCellType ||
frame->AccessibleType() == eHTMLTableType) {
// Prefer to use markup (mostly tag name, perhaps attributes) to decide if
// and what kind of accessible to create,
newAcc = CreateHTMLAccessibleByMarkup(frame, content, aContext);
if (!newAcc) // try by frame accessible type.
newAcc = CreateAccessibleByFrameType(frame, content, aContext);
}

// In case of ARIA grids use grid-specific classes if it's not native table
// based.
if (isARIATableOrCell && (!newAcc || newAcc->IsGenericHyperText())) {
if ((roleMapEntry->accTypes & eTableCell)) {
if (aContext->IsTableRow() &&
(frame->AccessibleType() != eHTMLTableCellType ||
aContext->GetContent() != content->GetParent())) {
if (aContext->IsTableRow())
newAcc = new ARIAGridCellAccessibleWrap(content, document);
}

} else if ((roleMapEntry->IsOfType(eTable)) &&
frame->AccessibleType() != eHTMLTableType) {
} else if (roleMapEntry->IsOfType(eTable)) {
newAcc = new ARIAGridAccessibleWrap(content, document);
}
}

if (!newAcc) {
// Prefer to use markup (mostly tag name, perhaps attributes) to decide if
// and what kind of accessible to create.
newAcc = CreateHTMLAccessibleByMarkup(frame, content, aContext);

// Try using frame to do it.
if (!newAcc)
newAcc = CreateAccessibleByFrameType(frame, content, aContext);
// If table has strong ARIA role then all table descendants shouldn't
// expose their native roles.
if (!roleMapEntry && newAcc && aContext->HasStrongARIARole()) {
if (frame->AccessibleType() == eHTMLTableRowType) {
nsRoleMapEntry* contextRoleMap = aContext->ARIARoleMap();
if (!contextRoleMap->IsOfType(eTable))
roleMapEntry = &aria::gEmptyRoleMap;

// If table has strong ARIA role then all table descendants shouldn't
// expose their native roles.
if (!roleMapEntry && newAcc && aContext->HasStrongARIARole()) {
if (frame->AccessibleType() == eHTMLTableRowType) {
nsRoleMapEntry* contextRoleMap = aContext->ARIARoleMap();
if (!contextRoleMap->IsOfType(eTable))
roleMapEntry = &aria::gEmptyRoleMap;
} else if (frame->AccessibleType() == eHTMLTableCellType &&
aContext->ARIARoleMap() == &aria::gEmptyRoleMap) {
roleMapEntry = &aria::gEmptyRoleMap;

} else if (frame->AccessibleType() == eHTMLTableCellType &&
aContext->ARIARoleMap() == &aria::gEmptyRoleMap) {
} else if (content->Tag() == nsGkAtoms::dt ||
content->Tag() == nsGkAtoms::li ||
content->Tag() == nsGkAtoms::dd ||
frame->AccessibleType() == eHTMLLiType) {
nsRoleMapEntry* contextRoleMap = aContext->ARIARoleMap();
if (!contextRoleMap->IsOfType(eList))
roleMapEntry = &aria::gEmptyRoleMap;

} else if (content->Tag() == nsGkAtoms::dt ||
content->Tag() == nsGkAtoms::li ||
content->Tag() == nsGkAtoms::dd ||
frame->AccessibleType() == eHTMLLiType) {
nsRoleMapEntry* contextRoleMap = aContext->ARIARoleMap();
if (!contextRoleMap->IsOfType(eList))
roleMapEntry = &aria::gEmptyRoleMap;
}
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions accessible/base/nsAccessiblePivot.cpp
Expand Up @@ -892,11 +892,7 @@ RuleCache::ApplyFilter(Accessible* aAccessible, uint16_t* aResult)
return NS_OK;

if (nsIAccessibleTraversalRule::PREFILTER_ARIA_HIDDEN & mPreFilter) {
nsIContent* content = aAccessible->GetContent();
if (content &&
nsAccUtils::HasDefinedARIAToken(content, nsGkAtoms::aria_hidden) &&
!content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_hidden,
nsGkAtoms::_false, eCaseMatters)) {
if (aAccessible->IsARIAHidden()) {
*aResult |= nsIAccessibleTraversalRule::FILTER_IGNORE_SUBTREE;
return NS_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion accessible/base/nsCoreUtils.cpp
Expand Up @@ -149,7 +149,7 @@ nsCoreUtils::DispatchTouchEvent(uint32_t aEventType, int32_t aX, int32_t aY,
event.time = PR_IntervalNow();

// XXX: Touch has an identifier of -1 to hint that it is synthesized.
nsRefPtr<dom::Touch> t = new dom::Touch(-1, nsIntPoint(aX, aY),
nsRefPtr<dom::Touch> t = new dom::Touch(-1, LayoutDeviceIntPoint(aX, aY),
nsIntPoint(1, 1), 0.0f, 1.0f);
t->SetTarget(aContent);
event.touches.AppendElement(t);
Expand Down
7 changes: 7 additions & 0 deletions accessible/generic/ARIAGridAccessible.cpp
Expand Up @@ -604,5 +604,12 @@ ARIAGridCellAccessible::NativeAttributes()
stringIdx.AppendInt(rowIdx * colCount + colIdx);
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::tableCellIndex, stringIdx);

#ifdef DEBUG
nsAutoString unused;
attributes->SetStringProperty(NS_LITERAL_CSTRING("cppclass"),
NS_LITERAL_STRING("ARIAGridCellAccessible"),
unused);
#endif

return attributes.forget();
}

0 comments on commit 3a99b80

Please sign in to comment.