Skip to content

Commit

Permalink
Merge branch 'embedlite' into tm_glcontext_wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Apr 15, 2014
2 parents f80416a + 7dee819 commit 30f1a81
Show file tree
Hide file tree
Showing 2,991 changed files with 72,081 additions and 38,987 deletions.
2 changes: 1 addition & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 991256 requires a clobber because it renames generated mobile/android/base/widget files.
Bug 916012 moves definition from one WEBIDL_FILE to another (Bug 979886)
6 changes: 3 additions & 3 deletions accessible/src/base/ARIAMap.cpp
Expand Up @@ -86,9 +86,9 @@ static nsRoleMapEntry sWAIRoleMaps[] =
eNoValue,
ePressAction,
eNoLiveAttr,
kGenericAccType,
kNoReqStates,
eARIAPressed
eButton,
kNoReqStates
// eARIAPressed is auto applied on any button
},
{ // checkbox
&nsGkAtoms::checkbox,
Expand Down
2 changes: 1 addition & 1 deletion accessible/src/base/ARIAStateMap.cpp
Expand Up @@ -245,7 +245,7 @@ aria::MapToState(EStateRule aRule, dom::Element* aElement, uint64_t* aState)
{
static const TokenTypeData data(
nsGkAtoms::aria_pressed, eMixedType,
states::CHECKABLE, states::PRESSED);
0, states::PRESSED);

MapTokenType(aElement, aState, data);
return true;
Expand Down
21 changes: 11 additions & 10 deletions accessible/src/base/AccTypes.h
Expand Up @@ -69,16 +69,17 @@ enum AccType {
enum AccGenericType {
eAutoComplete = 1 << 0,
eAutoCompletePopup = 1 << 1,
eCombobox = 1 << 2,
eDocument = 1 << 3,
eHyperText = 1 << 4,
eList = 1 << 5,
eListControl = 1 << 6,
eMenuButton = 1 << 7,
eSelect = 1 << 8,
eTable = 1 << 9,
eTableCell = 1 << 10,
eTableRow = 1 << 11,
eButton = 1 << 2,
eCombobox = 1 << 3,
eDocument = 1 << 4,
eHyperText = 1 << 5,
eList = 1 << 6,
eListControl = 1 << 7,
eMenuButton = 1 << 8,
eSelect = 1 << 9,
eTable = 1 << 10,
eTableCell = 1 << 11,
eTableRow = 1 << 12,

eLastAccGenericType = eTableRow
};
Expand Down
4 changes: 4 additions & 0 deletions accessible/src/generic/Accessible.cpp
Expand Up @@ -1573,6 +1573,10 @@ Accessible::ApplyARIAState(uint64_t* aState) const
}
}

// special case: A native button element whose role got transformed by ARIA to a toggle button
if (IsButton())
aria::MapToState(aria::eARIAPressed, element, aState);

if (!mRoleMapEntry)
return;

Expand Down
4 changes: 3 additions & 1 deletion accessible/src/generic/Accessible.h
Expand Up @@ -521,6 +521,8 @@ class Accessible : public nsIAccessible,
bool IsAutoCompletePopup() const
{ return HasGenericType(eAutoCompletePopup); }

bool IsButton() const { return HasGenericType(eButton); }

bool IsCombobox() const { return HasGenericType(eCombobox); }

bool IsDoc() const { return HasGenericType(eDocument); }
Expand Down Expand Up @@ -990,7 +992,7 @@ class Accessible : public nsIAccessible,
static const uint8_t kStateFlagsBits = 7;
static const uint8_t kContextFlagsBits = 1;
static const uint8_t kTypeBits = 6;
static const uint8_t kGenericTypesBits = 12;
static const uint8_t kGenericTypesBits = 13;

/**
* Keep in sync with ChildrenFlags, StateFlags, ContextFlags, and AccTypes.
Expand Down
11 changes: 2 additions & 9 deletions accessible/src/generic/DocAccessible.cpp
Expand Up @@ -1066,17 +1066,10 @@ DocAccessible::ARIAAttributeChanged(Accessible* aAccessible, nsIAtom* aAttribute
aAccessible);

nsIContent* elm = aAccessible->GetContent();
if (!elm->HasAttr(kNameSpaceID_None, nsGkAtoms::role)) {
// We don't care about these other ARIA attribute changes unless there is
// an ARIA role set for the element
// XXX: we should check the role map to see if the changed property is
// relevant for that particular role.
return;
}

// The following ARIA attributes only take affect when dynamic content role is present
if (aAttribute == nsGkAtoms::aria_checked ||
aAttribute == nsGkAtoms::aria_pressed) {
(aAccessible->IsButton() &&
aAttribute == nsGkAtoms::aria_pressed)) {
const uint64_t kState = (aAttribute == nsGkAtoms::aria_checked) ?
states::CHECKED : states::PRESSED;
nsRefPtr<AccEvent> event = new AccStateChangeEvent(aAccessible, kState);
Expand Down
3 changes: 1 addition & 2 deletions accessible/src/generic/HyperTextAccessible.cpp
Expand Up @@ -1037,13 +1037,12 @@ HyperTextAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset,
int32_t offset1 = startOffset - prevOffset;

while (childIdx < ChildCount()) {
nsIFrame* frame = GetChildAt(childIdx)->GetFrame();
nsIFrame* frame = GetChildAt(childIdx++)->GetFrame();
if (!frame) {
NS_NOTREACHED("No frame for a child!");
continue;
}

childIdx++;
int32_t nextOffset = GetChildOffset(childIdx);
if (nextOffset >= endOffset) {
bounds.UnionRect(bounds, GetBoundsInFrame(frame, offset1,
Expand Down
1 change: 1 addition & 0 deletions accessible/src/html/HTMLFormControlAccessible.cpp
Expand Up @@ -180,6 +180,7 @@ HTMLButtonAccessible::
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) :
HyperTextAccessibleWrap(aContent, aDoc)
{
mGenericTypes |= eButton;
}

uint8_t
Expand Down
24 changes: 11 additions & 13 deletions accessible/src/jsat/AccessFu.jsm
Expand Up @@ -31,9 +31,8 @@ this.AccessFu = {
Utils.init(aWindow);

try {
let bridgeCc = Cc['@mozilla.org/android/bridge;1'];
bridgeCc.getService(Ci.nsIAndroidBridge).handleGeckoMessage(
JSON.stringify({ type: 'Accessibility:Ready' }));
Services.androidBridge.handleGeckoMessage(
{ type: 'Accessibility:Ready' });
Services.obs.addObserver(this, 'Accessibility:Settings', false);
} catch (x) {
// Not on Android
Expand Down Expand Up @@ -83,7 +82,7 @@ this.AccessFu = {
this._enabled = true;

Cu.import('resource://gre/modules/accessibility/Utils.jsm');
Cu.import('resource://gre/modules/accessibility/TouchAdapter.jsm');
Cu.import('resource://gre/modules/accessibility/PointerAdapter.jsm');
Cu.import('resource://gre/modules/accessibility/Presentation.jsm');

Logger.info('Enabled');
Expand Down Expand Up @@ -116,7 +115,7 @@ this.AccessFu = {

this.Input.start();
Output.start();
TouchAdapter.start();
PointerAdapter.start();

Services.obs.addObserver(this, 'remote-browser-shown', false);
Services.obs.addObserver(this, 'inprocess-browser-shown', false);
Expand Down Expand Up @@ -166,7 +165,7 @@ this.AccessFu = {

this.Input.stop();
Output.stop();
TouchAdapter.stop();
PointerAdapter.stop();

Utils.win.removeEventListener('TabOpen', this);
Utils.win.removeEventListener('TabClose', this);
Expand Down Expand Up @@ -702,8 +701,7 @@ var Output = {
get androidBridge() {
delete this.androidBridge;
if (Utils.MozBuildApp === 'mobile/android') {
this.androidBridge = Cc['@mozilla.org/android/bridge;1'].getService(
Ci.nsIAndroidBridge);
this.androidBridge = Services.androidBridge;
} else {
this.androidBridge = null;
}
Expand Down Expand Up @@ -734,7 +732,7 @@ var Output = {
androidEvent.brailleOutput = this.brailleState.init(androidEvent.brailleOutput);
break;
}
this.androidBridge.handleGeckoMessage(JSON.stringify(androidEvent));
this.androidBridge.handleGeckoMessage(androidEvent);
}
},

Expand Down Expand Up @@ -789,7 +787,8 @@ var Input = {
switch (gestureName) {
case 'dwell1':
case 'explore1':
this.moveToPoint('Simple', aGesture.x, aGesture.y);
this.moveToPoint('Simple', aGesture.touches[0].x,
aGesture.touches[0].y);
break;
case 'doubletap1':
this.activateCurrent();
Expand Down Expand Up @@ -902,9 +901,8 @@ var Input = {

if (Utils.MozBuildApp == 'mobile/android')
// Return focus to native Android browser chrome.
Cc['@mozilla.org/android/bridge;1'].
getService(Ci.nsIAndroidBridge).handleGeckoMessage(
JSON.stringify({ type: 'ToggleChrome:Focus' }));
Services.androidBridge.handleGeckoMessage(
{ type: 'ToggleChrome:Focus' });
break;
case aEvent.DOM_VK_RETURN:
if (this.editState.editing)
Expand Down

0 comments on commit 30f1a81

Please sign in to comment.