зеркало из https://github.com/mozilla/pjs.git
Merge again for good measure
This commit is contained in:
Коммит
1511580931
|
@ -219,15 +219,6 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
|
|||
eNoLiveAttr,
|
||||
kNoReqStates
|
||||
},
|
||||
{
|
||||
"label",
|
||||
roles::LABEL,
|
||||
kUseMapRole,
|
||||
eNoValue,
|
||||
eNoAction,
|
||||
eNoLiveAttr,
|
||||
kNoReqStates
|
||||
},
|
||||
{
|
||||
"link",
|
||||
roles::LINK,
|
||||
|
|
|
@ -131,7 +131,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=529289
|
|||
<tr><td>hi<td></tr></table>
|
||||
|
||||
<!-- test gEmptyRoleMap -->
|
||||
<table role="label">
|
||||
<table role="button">
|
||||
<tr>
|
||||
<td id="cell">cell</td>
|
||||
</tr>
|
||||
|
|
|
@ -37,15 +37,15 @@
|
|||
testChildAtPoint(txt, -10000, 10000, false, null);
|
||||
testChildAtPoint(txt, -10000, 10000, true, null);
|
||||
|
||||
// Not specific case, point is inside of label accessible.
|
||||
var label = getAccessible("label");
|
||||
var labelText = label.firstChild;
|
||||
testChildAtPoint(label, 1, 1, false, labelText);
|
||||
testChildAtPoint(label, 1, 1, true, labelText);
|
||||
// Not specific case, point is inside of btn accessible.
|
||||
var btn = getAccessible("btn");
|
||||
var btnText = btn.firstChild;
|
||||
testChildAtPoint(btn, 1, 1, false, btnText);
|
||||
testChildAtPoint(btn, 1, 1, true, btnText);
|
||||
|
||||
// Not specific case, point is outside of label accessible.
|
||||
testChildAtPoint(label, -1, 1, false, null);
|
||||
testChildAtPoint(label, -1, 1, true, null);
|
||||
// Not specific case, point is outside of btn accessible.
|
||||
testChildAtPoint(btn, -1, 1, false, null);
|
||||
testChildAtPoint(btn, -1, 1, true, null);
|
||||
|
||||
// Out of flow accessible testing, do not return out of flow accessible
|
||||
// because it's not a child of the accessible even visually it is.
|
||||
|
@ -78,7 +78,7 @@
|
|||
<div role="listitem" id="listitem"><span role="image" id="image">img</span>item</div>
|
||||
</div>
|
||||
|
||||
<span role="label">label1</span><span role="label" id="label">label2</span>
|
||||
<span role="button">button1</span><span role="button" id="btn">button2</span>
|
||||
|
||||
<span role="textbox">textbox1</span><span role="textbox" id="txt">textbox2</span>
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ pref("content.image.allow_locking", false);
|
|||
pref("image.mem.min_discard_timeout_ms", 10000);
|
||||
|
||||
// enable touch events interfaces
|
||||
pref("dom.w3c_touch_events.enabled", false);
|
||||
pref("dom.w3c_touch_events.enabled", true);
|
||||
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
// Safe browsing does nothing unless this pref is set
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
|
||||
package org.mozilla.gecko.gfx;
|
||||
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoEventListener;
|
||||
import org.mozilla.gecko.gfx.FloatSize;
|
||||
import org.mozilla.gecko.gfx.InputConnectionHandler;
|
||||
import org.mozilla.gecko.gfx.LayerController;
|
||||
|
@ -55,18 +52,13 @@ import android.util.Log;
|
|||
import java.nio.IntBuffer;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
* A view rendered by the layer compositor.
|
||||
*
|
||||
* This view delegates to LayerRenderer to actually do the drawing. Its role is largely that of a
|
||||
* mediator between the LayerRenderer and the LayerController.
|
||||
*/
|
||||
public class LayerView extends GLSurfaceView
|
||||
implements GeckoEventListener {
|
||||
public class LayerView extends GLSurfaceView {
|
||||
private Context mContext;
|
||||
private LayerController mController;
|
||||
private InputConnectionHandler mInputConnectionHandler;
|
||||
|
@ -78,8 +70,7 @@ public class LayerView extends GLSurfaceView
|
|||
private static String LOGTAG = "GeckoLayerView";
|
||||
/* List of events to be processed if the page does not prevent them. Should only be touched on the main thread */
|
||||
private LinkedList<MotionEvent> mEventQueue = new LinkedList<MotionEvent>();
|
||||
private boolean touchEventsEnabled = false;
|
||||
private String touchEventsPrefName = "dom.w3c_touch_events.enabled";
|
||||
|
||||
|
||||
public LayerView(Context context, LayerController controller) {
|
||||
super(context);
|
||||
|
@ -97,30 +88,6 @@ public class LayerView extends GLSurfaceView
|
|||
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
|
||||
GeckoAppShell.registerGeckoEventListener("Preferences:Data", this);
|
||||
JSONArray jsonPrefs = new JSONArray();
|
||||
jsonPrefs.put(touchEventsPrefName);
|
||||
GeckoEvent event = new GeckoEvent("Preferences:Get", jsonPrefs.toString());
|
||||
GeckoAppShell.sendEventToGecko(event);
|
||||
}
|
||||
|
||||
public void handleMessage(String event, JSONObject message) {
|
||||
if (event.equals("Preferences:Data")) {
|
||||
try {
|
||||
JSONArray jsonPrefs = message.getJSONArray("preferences");
|
||||
for (int i = 0; i < jsonPrefs.length(); i++) {
|
||||
JSONObject jPref = jsonPrefs.getJSONObject(i);
|
||||
final String prefName = jPref.getString("name");
|
||||
if (prefName.equals(touchEventsPrefName)) {
|
||||
touchEventsEnabled = jPref.getBoolean("value");
|
||||
GeckoAppShell.unregisterGeckoEventListener("Preferences:Data", this);
|
||||
}
|
||||
}
|
||||
} catch(JSONException ex) {
|
||||
Log.e(LOGTAG, "Error decoding JSON", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addToEventQueue(MotionEvent event) {
|
||||
|
@ -142,7 +109,7 @@ public class LayerView extends GLSurfaceView
|
|||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (touchEventsEnabled && mController.onTouchEvent(event)) {
|
||||
if (mController.onTouchEvent(event)) {
|
||||
addToEventQueue(event);
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче