You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/08/24 10:35:49 UTC
[01/24] incubator-weex git commit: * [ios] support voice-over module
Repository: incubator-weex
Updated Branches:
refs/heads/0.16-dev aa5bb7b58 -> 1584c8816
* [ios] support voice-over module
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d0e65c3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d0e65c3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d0e65c3a
Branch: refs/heads/0.16-dev
Commit: d0e65c3ae8d1c386d2d1382c033a79f91e7461a4
Parents: 5951404
Author: acton393 <zh...@gmail.com>
Authored: Mon Jul 31 17:56:24 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Jul 31 17:56:24 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 12 +++++
.../WeexSDK/Sources/Module/WXVoiceOverModule.h | 25 +++++++++++
.../WeexSDK/Sources/Module/WXVoiceOverModule.m | 47 ++++++++++++++++++++
3 files changed, 84 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0e65c3a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 5785c45..65e908e 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -275,6 +275,10 @@
D3FC0DF81C508B2A002B9E31 /* WXTimerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = D3FC0DF61C508B2A002B9E31 /* WXTimerModule.m */; };
DC03ADB91D508719003F76E7 /* WXTextAreaComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = DC03ADB71D508719003F76E7 /* WXTextAreaComponent.m */; };
DC03ADBA1D508719003F76E7 /* WXTextAreaComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = DC03ADB81D508719003F76E7 /* WXTextAreaComponent.h */; };
+ DC0D2DD21F2EE3C100017E00 /* WXVoiceOverModule.h in Headers */ = {isa = PBXBuildFile; fileRef = DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */; };
+ DC0D2DD31F2EE3C100017E00 /* WXVoiceOverModule.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */; };
+ DC0D2DD41F2EE3F800017E00 /* WXVoiceOverModule.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */; };
+ DC0D2DD51F2EE3FC00017E00 /* WXVoiceOverModule.h in Headers */ = {isa = PBXBuildFile; fileRef = DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */; };
DC6836E61EBB12B200AD2D84 /* WXConfigCenterProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC9867441D826D1E000AF388 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC9867431D826D1E000AF388 /* GLKit.framework */; };
DC9F46831D61AC8800A88239 /* WXStreamModuleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9F46821D61AC8800A88239 /* WXStreamModuleTests.m */; };
@@ -840,6 +844,8 @@
DAB176F008F516E4F9391C61 /* libPods-WeexSDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WeexSDK.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DC03ADB71D508719003F76E7 /* WXTextAreaComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXTextAreaComponent.m; sourceTree = "<group>"; };
DC03ADB81D508719003F76E7 /* WXTextAreaComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXTextAreaComponent.h; sourceTree = "<group>"; };
+ DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXVoiceOverModule.h; sourceTree = "<group>"; };
+ DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXVoiceOverModule.m; sourceTree = "<group>"; };
DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXConfigCenterProtocol.h; sourceTree = "<group>"; };
DC9867431D826D1E000AF388 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
DC9F46821D61AC8800A88239 /* WXStreamModuleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXStreamModuleTests.m; sourceTree = "<group>"; };
@@ -1323,6 +1329,8 @@
77E659D71C07F585008B8775 /* Module */ = {
isa = PBXGroup;
children = (
+ DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */,
+ DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */,
C43C03E41EC8ACA40044C7FF /* WXPrerenderManager.h */,
C43C03E51EC8ACA40044C7FF /* WXPrerenderManager.m */,
C4F012801E1502E9003378D0 /* WXWebSocketModule.h */,
@@ -1510,6 +1518,7 @@
2AE5B7561CABA04E0082FDDB /* WXEventModuleProtocol.h in Headers */,
C4C30DE91E1B833D00786B6C /* WXComponent+PseudoClassManagement.h in Headers */,
591DD3321D23AD5800BE8709 /* WXErrorView.h in Headers */,
+ DC0D2DD21F2EE3C100017E00 /* WXVoiceOverModule.h in Headers */,
D362F94F1C83EDA20003F546 /* WXWebViewModule.h in Headers */,
C4F012861E150307003378D0 /* WXWebSocketLoader.h in Headers */,
C4E97D331F1EF46D00ABC314 /* WXTracingManager.h in Headers */,
@@ -1710,6 +1719,7 @@
DCA445E51EFA59E100D0CFA8 /* WXDivComponent.h in Headers */,
DCA446211EFA5ABA00D0CFA8 /* WXSDKInstance_private.h in Headers */,
DCA4461D1EFA5AAA00D0CFA8 /* WXHandlerFactory.h in Headers */,
+ DC0D2DD51F2EE3FC00017E00 /* WXVoiceOverModule.h in Headers */,
DCA445EE1EFA5A1500D0CFA8 /* WXWebComponent.h in Headers */,
DCA4460D1EFA5A7900D0CFA8 /* WXThreadSafeMutableArray.h in Headers */,
DCA445DA1EFA59A600D0CFA8 /* WXMultiColumnLayout.h in Headers */,
@@ -2004,6 +2014,7 @@
744D61111E49979000B624B3 /* WXFooterComponent.m in Sources */,
745B2D6F1E5A8E1E0092D38A /* WXRecyclerUpdateController.m in Sources */,
745B2D6B1E5A8E1E0092D38A /* WXRecyclerComponent.m in Sources */,
+ DC0D2DD31F2EE3C100017E00 /* WXVoiceOverModule.m in Sources */,
2A837AB71CD9DE9200AEDF03 /* WXRefreshComponent.m in Sources */,
74A4BA9B1CB3BAA100195969 /* WXThreadSafeMutableDictionary.m in Sources */,
77E65A1A1C155F25008B8775 /* WXScrollerComponent.m in Sources */,
@@ -2151,6 +2162,7 @@
DCA445501EFA55B300D0CFA8 /* WXScrollerComponent.m in Sources */,
DCA445511EFA55B300D0CFA8 /* WXCycleSliderComponent.m in Sources */,
DCA445521EFA55B300D0CFA8 /* WXSliderComponent.m in Sources */,
+ DC0D2DD41F2EE3F800017E00 /* WXVoiceOverModule.m in Sources */,
DCA445531EFA55B300D0CFA8 /* WXCellComponent.m in Sources */,
DCA445541EFA55B300D0CFA8 /* WXListComponent.m in Sources */,
DCA445551EFA55B300D0CFA8 /* WXIndicatorComponent.m in Sources */,
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0e65c3a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.h b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.h
new file mode 100644
index 0000000..274c310
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.h
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "WXModuleProtocol.h"
+
+@interface WXVoiceOverModule : NSObject<WXModuleProtocol>
+
+@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0e65c3a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
new file mode 100644
index 0000000..cba2060
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import "WXVoiceOverModule.h"
+#import "WXUtility.h"
+#import "WXComponent_internal.h"
+#import "WXComponentManager.h"
+
+@implementation WXVoiceOverModule
+@synthesize weexInstance;
+WX_EXPORT_METHOD(@selector(read:))
+WX_EXPORT_METHOD(@selector(focusToElement:))
+- (void)read:(NSString *)string
+{
+ if ([string isKindOfClass:[NSString class]]) {
+ dispatch_after(3.0, dispatch_get_main_queue(), ^{
+ UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, string);
+ });
+ }
+}
+- (void)focusToElement:(NSString *)ref {
+ WXPerformBlockOnComponentThread(^{
+ WXComponent * compoent = [weexInstance componentForRef:ref];
+ if (compoent) {
+ WXPerformBlockOnMainThread(^{
+ UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, compoent.view);
+ });
+ }
+ });
+}
+@end
[17/24] incubator-weex git commit: * [ios] make voice over module
public
Posted by ac...@apache.org.
* [ios] make voice over module public
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ad3b0006
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ad3b0006
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ad3b0006
Branch: refs/heads/0.16-dev
Commit: ad3b000618fcc45a4e95be65ec9e9f42961774d7
Parents: 55f4aad
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 15:52:59 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 15:52:59 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ad3b0006/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 73b29e1..d43ec0e 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -544,6 +544,10 @@
DCC77C131D770AE300CE7288 /* WXSliderNeighborComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = DCC77C111D770AE300CE7288 /* WXSliderNeighborComponent.m */; };
DCC77C141D770AE300CE7288 /* WXSliderNeighborComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = DCC77C121D770AE300CE7288 /* WXSliderNeighborComponent.h */; };
DCDFED011E68238F00C228D7 /* WXJSExceptionProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = DCDFED001E68238F00C228D7 /* WXJSExceptionProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DCE2CF9A1F46D4220021BDC4 /* WXVoiceOverModule.m in Sources */ = {isa = PBXBuildFile; fileRef = DCE2CF981F46D4220021BDC4 /* WXVoiceOverModule.m */; };
+ DCE2CF9B1F46D4220021BDC4 /* WXVoiceOverModule.h in Headers */ = {isa = PBXBuildFile; fileRef = DCE2CF991F46D4220021BDC4 /* WXVoiceOverModule.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DCE2CF9C1F46D4310021BDC4 /* WXVoiceOverModule.h in Headers */ = {isa = PBXBuildFile; fileRef = DCE2CF991F46D4220021BDC4 /* WXVoiceOverModule.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DCE2CF9D1F46D4370021BDC4 /* WXVoiceOverModule.m in Sources */ = {isa = PBXBuildFile; fileRef = DCE2CF981F46D4220021BDC4 /* WXVoiceOverModule.m */; };
DCEA54621F2B7DB4000ECB23 /* WXTracingManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C4E97D311F1EF46D00ABC314 /* WXTracingManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
DCEA54631F2B7DBA000ECB23 /* WXTracingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C4E97D321F1EF46D00ABC314 /* WXTracingManager.m */; };
DCF087611DCAE161005CD6EB /* WXInvocationConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = DCF0875F1DCAE161005CD6EB /* WXInvocationConfig.h */; };
@@ -874,6 +878,8 @@
DCC77C111D770AE300CE7288 /* WXSliderNeighborComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXSliderNeighborComponent.m; sourceTree = "<group>"; };
DCC77C121D770AE300CE7288 /* WXSliderNeighborComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXSliderNeighborComponent.h; sourceTree = "<group>"; };
DCDFED001E68238F00C228D7 /* WXJSExceptionProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXJSExceptionProtocol.h; sourceTree = "<group>"; };
+ DCE2CF981F46D4220021BDC4 /* WXVoiceOverModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXVoiceOverModule.m; sourceTree = "<group>"; };
+ DCE2CF991F46D4220021BDC4 /* WXVoiceOverModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXVoiceOverModule.h; sourceTree = "<group>"; };
DCF0875F1DCAE161005CD6EB /* WXInvocationConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXInvocationConfig.h; sourceTree = "<group>"; };
DCF087601DCAE161005CD6EB /* WXInvocationConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXInvocationConfig.m; sourceTree = "<group>"; };
DCF0CD9D1EAF3A6B0062CA8F /* native-bundle-main.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = "native-bundle-main.js"; path = "../../../../pre-build/native-bundle-main.js"; sourceTree = "<group>"; };
@@ -1349,6 +1355,8 @@
77E659D71C07F585008B8775 /* Module */ = {
isa = PBXGroup;
children = (
+ DCE2CF981F46D4220021BDC4 /* WXVoiceOverModule.m */,
+ DCE2CF991F46D4220021BDC4 /* WXVoiceOverModule.h */,
333D9A251F41507A007CED39 /* WXTransition.h */,
333D9A261F41507A007CED39 /* WXTransition.m */,
C43C03E41EC8ACA40044C7FF /* WXPrerenderManager.h */,
@@ -1547,6 +1555,7 @@
37B51EE41E97804D0040A743 /* WXCycleSliderComponent.h in Headers */,
77D161281C02DE1A0010B15B /* WXSDKManager.h in Headers */,
59CE27E81CC387DB000BE37A /* WXEmbedComponent.h in Headers */,
+ DCE2CF9B1F46D4220021BDC4 /* WXVoiceOverModule.h in Headers */,
74BB5FB91DFEE81A004FC3DF /* WXMetaModule.h in Headers */,
DCA0EF641D6EED6F00CB18B9 /* WXGlobalEventModule.h in Headers */,
2A837AB21CD9DE9200AEDF03 /* WXLoadingComponent.h in Headers */,
@@ -1766,6 +1775,7 @@
DCA446061EFA5A5B00D0CFA8 /* NSTimer+Weex.h in Headers */,
DCA445D61EFA598600D0CFA8 /* WXView.h in Headers */,
DCA445FF1EFA5A4600D0CFA8 /* WXInstanceWrap.h in Headers */,
+ DCE2CF9C1F46D4310021BDC4 /* WXVoiceOverModule.h in Headers */,
C42E8FAB1F3C7C09001EBE9D /* WXExtendCallNativeProtocol.h in Headers */,
DCA445F31EFA5A2500D0CFA8 /* WXFooterComponent.h in Headers */,
DCA446151EFA5A9000D0CFA8 /* WXBridgeContext.h in Headers */,
@@ -2105,6 +2115,7 @@
741081241CED6756001BC6E5 /* WXComponentFactory.m in Sources */,
D362F9501C83EDA20003F546 /* WXWebViewModule.m in Sources */,
745B2D711E5A8E1E0092D38A /* WXSectionDataController.m in Sources */,
+ DCE2CF9A1F46D4220021BDC4 /* WXVoiceOverModule.m in Sources */,
2A1F57B81C75C6A600B58017 /* WXTextInputComponent.m in Sources */,
74CC7A1D1C2BC5F800829368 /* WXCellComponent.m in Sources */,
74862F821E03A24500B7A041 /* WXComponentMethod.m in Sources */,
@@ -2188,6 +2199,7 @@
DCA4454F1EFA55B300D0CFA8 /* WXTextComponent.m in Sources */,
DCA445501EFA55B300D0CFA8 /* WXScrollerComponent.m in Sources */,
DCA445511EFA55B300D0CFA8 /* WXCycleSliderComponent.m in Sources */,
+ DCE2CF9D1F46D4370021BDC4 /* WXVoiceOverModule.m in Sources */,
DCA445521EFA55B300D0CFA8 /* WXSliderComponent.m in Sources */,
DCA445531EFA55B300D0CFA8 /* WXCellComponent.m in Sources */,
DCA445541EFA55B300D0CFA8 /* WXListComponent.m in Sources */,
[21/24] incubator-weex git commit: * [ios] fix picker module
accessibility
Posted by ac...@apache.org.
* [ios] fix picker module accessibility
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/07411f31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/07411f31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/07411f31
Branch: refs/heads/0.16-dev
Commit: 07411f31f57e1e2278315c0780840ded897b6018
Parents: b367a05
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 22 16:42:17 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 22 16:42:17 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m | 44 ++++++++++++++++++++
1 file changed, 44 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/07411f31/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m b/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
index 62e6100..85c917f 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
@@ -20,6 +20,7 @@
#import "WXPickerModule.h"
#import "WXConvert.h"
#import "WXUtility.h"
+#import "WXComponentManager.h"
#import <UIKit/UIPickerView.h>
#import <UIKit/UIDatePicker.h>
#import <UIKit/UIKit.h>
@@ -29,6 +30,9 @@
@interface WXPickerModule()
+@property (nonatomic, strong)NSString * pickerType;
+// when resign the picker ,then the focus will be.
+@property (nonatomic, strong)UIView * focusToView;
//picker
@property(nonatomic,strong)UIPickerView *picker;
@property(nonatomic,strong)UIView *backgroundView;
@@ -80,8 +84,14 @@ WX_EXPORT_METHOD(@selector(pickTime:callback:))
-(void)pick:(NSDictionary *)options callback:(WXModuleCallback)callback
{
+ if (UIAccessibilityIsVoiceOverRunning()) {
+ [self handleA11yFocusback:options];
+ }
+
+ _pickerType = @"picker";
NSArray *items = @[];
NSInteger index = 0 ;
+
if (options[@"items"]) {
items = options[@"items"];
}
@@ -129,6 +139,19 @@ WX_EXPORT_METHOD(@selector(pickTime:callback:))
}
}
+- (void)handleA11yFocusback:(NSDictionary*)options
+{
+ __weak typeof(self) weakSelf = self;
+ if (options[@"sourceRef"] && [options[@"sourceRef"] isKindOfClass:[NSString class]]) {
+ WXPerformBlockOnComponentThread(^{
+ WXComponent * focusBackComponent = [weakSelf.weexInstance componentForRef:options[@"sourceRef"]];
+ WXPerformBlockOnMainThread(^{
+ weakSelf.focusToView = focusBackComponent.view;
+ });
+ });
+ }
+}
+
-(void)SetColorDelay:(NSNumber *)number
{
if(self.selectionColor) {
@@ -164,11 +187,20 @@ WX_EXPORT_METHOD(@selector(pickTime:callback:))
}
self.isAnimating = YES;
self.backgroundView.hidden = NO;
+ UIView * focusView = self.picker;
+ if([_pickerType isEqualToString:@"picker"]) {
+ focusView = self.picker;
+ } else {
+ focusView = self.datePicker;
+ }
+ UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, focusView);
[UIView animateWithDuration:0.35f animations:^{
self.pickerView.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height - WXPickerHeight, [UIScreen mainScreen].bounds.size.width, WXPickerHeight);
self.backgroundView.alpha = 1;
+
} completion:^(BOOL finished) {
self.isAnimating = NO;
+
}];
}
@@ -184,6 +216,10 @@ WX_EXPORT_METHOD(@selector(pickTime:callback:))
} completion:^(BOOL finished) {
self.backgroundView.hidden = YES;
self.isAnimating = NO;
+ if (!_focusToView) {
+ _focusToView = self.backgroundView.superview;
+ }
+ UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, _focusToView);
[self.backgroundView removeFromSuperview];
}];
}
@@ -357,12 +393,20 @@ WX_EXPORT_METHOD(@selector(pickTime:callback:))
#pragma Date & Time Picker
-(void)pickDate:(NSDictionary *)options callback:(WXModuleCallback)callback
{
+ if (UIAccessibilityIsVoiceOverRunning()) {
+ [self handleA11yFocusback:options];
+ }
+ _pickerType = @"pickDate";
self.datePickerMode = UIDatePickerModeDate;
[self datepick:options callback:callback];
}
-(void)pickTime:(NSDictionary *)options callback:(WXModuleCallback)callback
{
+ if (UIAccessibilityIsVoiceOverRunning()) {
+ [self handleA11yFocusback:options];
+ }
+ _pickerType = @"pickTime";
self.datePickerMode = UIDatePickerModeTime;
[self datepick:options callback:callback];
}
[10/24] incubator-weex git commit: * [ios] filter voiceOver status
changed notification
Posted by ac...@apache.org.
* [ios] filter voiceOver status changed notification
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b3ef1a72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b3ef1a72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b3ef1a72
Branch: refs/heads/0.16-dev
Commit: b3ef1a72ae02962ab647fed415cb4a0cc8021f03
Parents: fbbc23e
Author: acton393 <zh...@gmail.com>
Authored: Thu Aug 17 11:25:51 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Aug 17 11:25:51 2017 +0800
----------------------------------------------------------------------
.../WeexSDK/Sources/Module/WXVoiceOverModule.m | 24 ++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b3ef1a72/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
index cb8fab1..c329b55 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -23,14 +23,20 @@
#import "WXComponentManager.h"
@implementation WXVoiceOverModule
+{
+ BOOL _voiceOverStatus;
+}
@synthesize weexInstance;
WX_EXPORT_METHOD(@selector(read:param:))
WX_EXPORT_METHOD(@selector(focusToElement:))
WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
-- (instancetype)init {
+WX_EXPORT_METHOD(@selector(focusToNavigationBack))
+- (instancetype)init
+{
if ([super init]) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(voiceOverStatusListener) name:UIAccessibilityVoiceOverStatusChanged object:nil];
+ _voiceOverStatus = UIAccessibilityIsVoiceOverRunning();
}
return self;
}
@@ -64,13 +70,23 @@ WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
- (void)voiceOverStatusListener
{
- if ([weexInstance checkModuleEventRegistered:@"WXVoiceOverStatusChanged" moduleClassName:NSStringFromClass([self class])]) {
- [weexInstance fireModuleEvent:[self class] eventName:@"WXVoiceOverStatusChanged" params:nil];
+ if (_voiceOverStatus != [self isVoiceOverOn]) {
+ _voiceOverStatus = [self isVoiceOverOn];
+ if ([weexInstance checkModuleEventRegistered:@"WXVoiceOverStatusChanged" moduleClassName:NSStringFromClass([self class])]) {
+
+ [weexInstance fireModuleEvent:[self class] eventName:@"WXVoiceOverStatusChanged" params:@{@"status":[self isVoiceOverOn]?@"on":@"off"}];
+ }
}
}
+// just for test case
+- (void)focusToNavigationBack
+{
+ UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, self.weexInstance.viewController.navigationController.navigationItem.backBarButtonItem);
+}
+
- (void)dealloc {
- [[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityVoiceOverStatusChanged object:self];
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityVoiceOverStatusChanged object:nil];
}
@end
[24/24] incubator-weex git commit: Merge branch
'ios-feature-accessibility' of https://github.com/acton393/incubator-weex
into wip-us-0.16-dev
Posted by ac...@apache.org.
Merge branch 'ios-feature-accessibility' of https://github.com/acton393/incubator-weex into wip-us-0.16-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1584c881
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1584c881
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1584c881
Branch: refs/heads/0.16-dev
Commit: 1584c8816d2eca8a03e184122aed7dc4e719a29e
Parents: aa5bb7b a1855a0
Author: acton393 <zh...@gmail.com>
Authored: Thu Aug 24 18:36:34 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Aug 24 18:36:34 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 20 ++-
.../WeexSDK/Sources/Component/WXAComponent.m | 1 +
.../Sources/Component/WXComponent_internal.h | 1 +
.../Sources/Component/WXCycleSliderComponent.m | 56 +++++++
.../Sources/Component/WXImageComponent.m | 1 +
.../Sources/Component/WXSliderComponent.m | 53 +++++++
.../Component/WXSliderNeighborComponent.m | 14 ++
.../Sources/Component/WXSwitchComponent.m | 1 +
.../Sources/Component/WXTextAreaComponent.m | 3 +
.../WeexSDK/Sources/Component/WXTextComponent.m | 18 ++-
ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 1 +
.../Sources/Manager/WXDatePickerManager.m | 8 +
.../WeexSDK/Sources/Manager/WXTracingManager.m | 2 +-
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 23 ++-
ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m | 44 ++++++
.../WeexSDK/Sources/Module/WXVoiceOverModule.h | 25 ++++
.../WeexSDK/Sources/Module/WXVoiceOverModule.m | 148 +++++++++++++++++++
ios/sdk/WeexSDK/Sources/WeexSDK.h | 2 +
18 files changed, 407 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1584c881/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1584c881/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
diff --cc ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index d5535c6,835faf6..17c2786
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@@ -273,8 -280,10 +281,10 @@@ do {
useCoreText = [(WXTextComponent*)self.view.wx_component useCoreText];
}
if (!useCoreText) {
- ((WXText *)self.view).textStorage = _textStorage;
+ ((WXTextView *)self.view).textStorage = _textStorage;
}
+ self.view.isAccessibilityElement = YES;
+
[self setNeedsDisplay];
}
[05/24] incubator-weex git commit: * [ios] diff hidden property
Posted by ac...@apache.org.
* [ios] diff hidden property
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5959413d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5959413d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5959413d
Branch: refs/heads/0.16-dev
Commit: 5959413d9fb33074e2c1d2ecbeecec4eb730ee85
Parents: 05d1a4a
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 1 18:15:05 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 1 18:15:05 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5959413d/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
index c40ccb7..c82d5f9 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -267,8 +267,9 @@
if (_view.isAccessibilityElement != _accessible) {
[_view setIsAccessibilityElement:_accessible];
}
-
- _view.accessibilityElementsHidden = _ariaHidden;
+ if (self.view.accessibilityElementsHidden != _ariaHidden) {
+ _view.accessibilityElementsHidden = _ariaHidden;
+ }
[self _initEvents:self.events];
[self _initPseudoEvents:_isListenPseudoTouch];
@@ -556,7 +557,9 @@
}
if (attributes[@"ariaHidden"]) {
_ariaHidden = [WXConvert BOOL:attributes[@"ariaHidden"]];
- self.view.accessibilityElementsHidden = _ariaHidden;
+ if (self.view.accessibilityElementsHidden != _ariaHidden) {
+ self.view.accessibilityElementsHidden = _ariaHidden;
+ }
}
if (attributes[@"accessible"]) {
_accessible = [WXConvert BOOL:attributes[@"accessible"]];
[07/24] incubator-weex git commit: * [ios] make it default accessible
Posted by ac...@apache.org.
* [ios] make it default accessible
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f7b1106c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f7b1106c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f7b1106c
Branch: refs/heads/0.16-dev
Commit: f7b1106c05df411f0193d4336772576201cacb1b
Parents: 43855a8
Author: acton393 <zh...@gmail.com>
Authored: Wed Aug 9 15:51:09 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Aug 9 15:51:09 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXAComponent.m | 1 +
ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m | 1 +
ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.m | 1 +
ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m | 3 +++
ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 4 +---
5 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f7b1106c/ios/sdk/WeexSDK/Sources/Component/WXAComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXAComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXAComponent.m
index b3092ea..9cf6c34 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXAComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXAComponent.m
@@ -57,6 +57,7 @@
- (void)viewDidLoad
{
[self.view addGestureRecognizer:_tap];
+ self.view.isAccessibilityElement = YES;
}
- (void)openURL
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f7b1106c/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
index 849620b..967aed5 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
@@ -248,6 +248,7 @@ WX_EXPORT_METHOD(@selector(save:))
imageView.userInteractionEnabled = YES;
imageView.clipsToBounds = YES;
imageView.exclusiveTouch = YES;
+ imageView.isAccessibilityElement = YES;
[self _clipsToBounds];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f7b1106c/ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.m
index 6ab6ef4..47c1a27 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXSwitchComponent.m
@@ -59,6 +59,7 @@
- (void)viewDidLoad
{
_switchView = (WXSwitchView *)self.view;
+ _switchView.isAccessibilityElement = YES;
[_switchView setOn:_checked animated:YES];
[_switchView setEnabled:!_disabled];
[_switchView addTarget:self action:@selector(checkChanged) forControlEvents:UIControlEventValueChanged];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f7b1106c/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
index d46da82..3b08417 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextAreaComponent.m
@@ -46,6 +46,9 @@ typedef UITextView WXTextAreaView;
self.placeHolderLabel.numberOfLines = 0;
[_textView addSubview:self.placeHolderLabel];
}
+ // default placeholder hide from voice over
+ self.placeHolderLabel.isAccessibilityElement = NO;
+ _textView.isAccessibilityElement = YES;
_textView.delegate = self;
[_textView setNeedsDisplay];
[_textView setClipsToBounds:YES];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f7b1106c/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index 094f557..d1fe2a3 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -279,9 +279,7 @@ do {\
if (!useCoreText) {
((WXText *)self.view).textStorage = _textStorage;
}
- if (_ariaLabel && !self.view.isAccessibilityElement) {
- self.view.isAccessibilityElement = YES;
- }
+ self.view.isAccessibilityElement = YES;
[self setNeedsDisplay];
}
[15/24] incubator-weex git commit: * [ios] update playground settings
Posted by ac...@apache.org.
* [ios] update playground settings
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d5ed5907
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d5ed5907
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d5ed5907
Branch: refs/heads/0.16-dev
Commit: d5ed590734170c30a243ffa94f2e3f6a0c213d44
Parents: 1bc2e58
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 15:00:40 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 15:00:40 2017 +0800
----------------------------------------------------------------------
ios/playground/WeexDemo.xcodeproj/project.pbxproj | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d5ed5907/ios/playground/WeexDemo.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
index 5c56412..32f2b10 100644
--- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj
+++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
@@ -35,8 +35,8 @@
847CAF311F39E3F100551725 /* WXExtModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 847CAF301F39E3F100551725 /* WXExtModule.m */; };
84D7CAC71CE3266C00D48D46 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7475ACA01CD8444A0044E96C /* libsqlite3.0.tbd */; };
8A0B5EFFF75BF82EA481983D /* libPods-WeexUITestDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E48C20F443AA337D1FE97622 /* libPods-WeexUITestDemo.a */; };
- C47B78D21F299E27001D3B0C /* WXExtendCallNativeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */; };
C43CDA031F1C6E01005A6B03 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = C43CDA021F1C6E01005A6B03 /* libz.tbd */; };
+ C47B78D21F299E27001D3B0C /* WXExtendCallNativeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */; };
DC20B8E61ECADA2500845F39 /* WXConfigCenterDefaultImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = DC20B8E51ECADA2500845F39 /* WXConfigCenterDefaultImpl.m */; };
DC5B53691E8CED9400E02125 /* WXScannerHistoryVC.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5B53681E8CED9400E02125 /* WXScannerHistoryVC.m */; };
DC5E503E1D0D97130059F0EB /* weex.png in Resources */ = {isa = PBXBuildFile; fileRef = DC5E503C1D0D97130059F0EB /* weex.png */; };
@@ -97,9 +97,9 @@
847CAF2F1F39E3F100551725 /* WXExtModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXExtModule.h; sourceTree = "<group>"; };
847CAF301F39E3F100551725 /* WXExtModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExtModule.m; sourceTree = "<group>"; };
9420131417A731ED089B0814 /* Pods-WeexDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WeexDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-WeexDemo/Pods-WeexDemo.release.xcconfig"; sourceTree = "<group>"; };
+ C43CDA021F1C6E01005A6B03 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
C47B78D01F299E27001D3B0C /* WXExtendCallNativeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXExtendCallNativeTest.h; sourceTree = "<group>"; };
C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExtendCallNativeTest.m; sourceTree = "<group>"; };
- C43CDA021F1C6E01005A6B03 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
DC20B8E41ECADA2500845F39 /* WXConfigCenterDefaultImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXConfigCenterDefaultImpl.h; sourceTree = "<group>"; };
DC20B8E51ECADA2500845F39 /* WXConfigCenterDefaultImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXConfigCenterDefaultImpl.m; sourceTree = "<group>"; };
DC5B53671E8CED9400E02125 /* WXScannerHistoryVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WXScannerHistoryVC.h; path = Scanner/WXScannerHistoryVC.h; sourceTree = "<group>"; };
@@ -766,6 +766,8 @@
"$(PROJECT_DIR)/WeexDemo",
"$(PROJECT_DIR)",
);
+ GCC_GENERATE_TEST_COVERAGE_FILES = YES;
+ GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = WeexDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
[08/24] incubator-weex git commit: Merge branch '0.16-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into
ios-feature-accessibility
Posted by ac...@apache.org.
Merge branch '0.16-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-feature-accessibility
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d9c40daa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d9c40daa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d9c40daa
Branch: refs/heads/0.16-dev
Commit: d9c40daa834c994a205b84ccfc8fd80f88879cc1
Parents: f7b1106 ffe4951
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 11 11:56:03 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 11 11:56:03 2017 +0800
----------------------------------------------------------------------
.gitignore | 2 +-
.travis.yml | 8 +-
android/build.gradle | 8 +-
android/sdk/libs/armeabi/libweexjsc.so | Bin 7570504 -> 7570392 bytes
android/sdk/libs/x86/libweexjsc.so | Bin 12121924 -> 7570392 bytes
.../java/com/taobao/weex/bridge/WXBridge.java | 8 +-
.../com/taobao/weex/bridge/WXBridgeManager.java | 36 +-
.../taobao/weex/bridge/WXValidateProcessor.java | 7 +-
.../java/com/taobao/weex/common/Constants.java | 1 +
.../java/com/taobao/weex/dom/WXDomObject.java | 17 +-
.../com/taobao/weex/dom/WXTextDomObject.java | 91 +-
.../dom/action/AbstractAddElementAction.java | 2 +-
.../taobao/weex/dom/action/AnimationAction.java | 1 +
.../ui/animation/CameraDistanceProperty.java | 54 +
.../weex/ui/animation/WXAnimationBean.java | 86 +-
.../taobao/weex/ui/component/WXComponent.java | 16 -
.../java/com/taobao/weex/utils/WXViewUtils.java | 4 +-
build/build.js | 1 +
build/config.js | 17 +-
examples/vue/modules/websocket.vue | 22 +-
html5/frameworks/legacy/core/array.js | 4 +
html5/frameworks/legacy/core/object.js | 6 +
html5/frameworks/legacy/static/create.js | 7 +-
html5/frameworks/legacy/vm/directive.js | 6 +
html5/frameworks/vanilla/index.js | 35 +-
html5/render/vue/README.md | 15 +
html5/render/vue/components/image.js | 58 +-
html5/render/vue/config.js | 10 +-
html5/render/vue/core/node.js | 27 +-
html5/render/vue/lib/gesture.js | 6 +
html5/render/vue/modules/modal/toast.js | 23 +-
html5/runtime/callback-manager.js | 12 +-
html5/runtime/config.js | 5 +-
html5/runtime/normalize.js | 107 +
html5/runtime/task-center.js | 59 +-
html5/runtime/vdom/document.js | 2 +
html5/runtime/vdom/element.js | 15 +-
html5/test/render/vue/core/node.js | 2 +
ios/.gitignore | 1 +
.../WeexDemo.xcodeproj/project.pbxproj | 30 +-
ios/playground/WeexDemo/AppDelegate.m | 8 +-
ios/playground/WeexDemo/WXDemoViewController.m | 2 -
ios/playground/WeexDemo/WXExtModule.h | 26 +
ios/playground/WeexDemo/WXExtModule.m | 43 +
.../WeexDemo/WXExtendCallNativeTest.h | 25 +
.../WeexDemo/WXExtendCallNativeTest.m | 47 +
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 40 +
.../WeexSDK/Sources/Bridge/WXBridgeContext.m | 35 +-
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 23 +-
.../Component/Recycler/WXRecyclerComponent.m | 58 +-
.../Recycler/WXRecyclerDragController.h | 52 +
.../Recycler/WXRecyclerDragController.m | 208 +
.../Sources/Component/WXImageComponent.m | 150 +-
.../Sources/Component/WXScrollerComponent.m | 3 +-
.../WeexSDK/Sources/Component/WXTextComponent.m | 5 +-
ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h | 4 +
ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m | 10 +
ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.h | 10 +
ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 6 +
.../WeexSDK/Sources/Loader/WXResourceLoader.m | 2 +-
.../WeexSDK/Sources/Loader/WXWebSocketLoader.h | 2 +-
.../WeexSDK/Sources/Loader/WXWebSocketLoader.m | 2 +-
.../WeexSDK/Sources/Manager/WXBridgeManager.m | 4 +
.../Sources/Manager/WXComponentFactory.h | 1 +
.../Sources/Manager/WXComponentFactory.m | 23 +
.../Sources/Manager/WXComponentManager.m | 18 +-
.../Sources/Manager/WXExtendCallNativeManager.h | 26 +
.../Sources/Manager/WXExtendCallNativeManager.m | 80 +
.../WeexSDK/Sources/Manager/WXModuleFactory.h | 6 +
.../WeexSDK/Sources/Manager/WXModuleFactory.m | 24 +
.../WeexSDK/Sources/Manager/WXTracingManager.h | 33 +-
.../WeexSDK/Sources/Manager/WXTracingManager.m | 169 +-
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 1 -
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 +-
ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m | 13 +
.../WeexSDK/Sources/Module/WXWebSocketModule.m | 16 +-
ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m | 9 +
.../Sources/Protocol/WXAppMonitorProtocol.h | 2 +
.../Protocol/WXExtendCallNativeProtocol.h | 47 +
.../Sources/Protocol/WXTracingProtocol.h | 29 +
ios/sdk/WeexSDK/Sources/Utility/WXUtility.h | 12 +
ios/sdk/WeexSDK/Sources/Utility/WXUtility.m | 22 +
.../Sources/View/WXComponent+ViewManagement.m | 1 -
.../Sources/WebSocket/WXWebSocketDefaultImpl.m | 2 +-
ios/sdk/WeexSDK/Sources/WeexSDK.h | 3 +
package.json | 17 +-
packages/weex-js-framework/.npmignore | 4 +
packages/weex-js-framework/index.js | 26001 +++++++++++++++++
packages/weex-js-framework/index.min.js | 1 +
packages/weex-js-framework/package.json | 22 +
packages/weex-js-runtime/.npmignore | 4 +
packages/weex-js-runtime/index.js | 4088 +++
packages/weex-js-runtime/index.min.js | 1 +
packages/weex-js-runtime/index.min.js.gz | Bin 0 -> 13215 bytes
packages/weex-js-runtime/package.json | 22 +
packages/weex-legacy-framework/.npmignore | 4 +
packages/weex-legacy-framework/index.js | 5770 ++++
packages/weex-legacy-framework/index.min.js | 1 +
packages/weex-legacy-framework/package.json | 22 +
packages/weex-vue-render/README.md | 15 +
packages/weex-vue-render/package.json | 2 +-
pre-build/native-bundle-main.js | 16 +-
scripts/commit-msg.sh | 2 +-
test/pages/components/iconfont.vue | 71 +
test/pages/components/input-event.vue | 65 +
test/pages/components/refresh-loading.vue | 115 +
test/pages/components/switch-event.vue | 60 +
test/pages/components/web-event.vue | 56 +
test/pages/include/button.vue | 162 +
test/pages/include/h1.vue | 13 +
test/pages/include/h2.vue | 13 +
test/pages/include/h3.vue | 13 +
test/pages/include/hn.vue | 47 +
test/pages/include/panel.vue | 141 +
test/pages/include/wxc-desc.vue | 66 +
test/pages/modules/animation-translate.vue | 129 +
test/pages/modules/clipboard-event.vue | 57 +
test/pages/modules/cover-generate.vue | 53 +
test/pages/modules/downgrade-event.vue | 74 +
test/pages/modules/gesture-longpress.vue | 75 +
test/pages/modules/modal-event.vue | 61 +
test/pages/modules/picker-event.vue | 63 +
test/pages/modules/storage-event.vue | 59 +
test/pages/modules/stream-result.vue | 85 +
test/run.sh | 30 +-
test/screenshot/border-android.png | Bin 156247 -> 158634 bytes
test/scripts/components/iconfont.test.js | 34 +
test/scripts/components/input-event.test.js | 36 +
test/scripts/components/refresh-loading.test.js | 38 +
test/scripts/components/switch-event.test.js | 38 +
test/scripts/components/web-event.test.js | 30 +
.../scripts/modules/animation-translate.test.js | 40 +
test/scripts/modules/clipboard-event.test.js | 35 +
test/scripts/modules/downgrade-event.test.js | 30 +
test/scripts/modules/gesture-longpress.test.js | 37 +
test/scripts/modules/modal-event.test.js | 35 +
test/scripts/modules/picker-event.test.js | 41 +
test/scripts/modules/storage-event.test.js | 36 +
test/scripts/modules/stream-result.test.js | 34 +
test/scripts/util.js | 41 +
test/scripts/zcover-generate.js | 32 +
test/serve.sh | 2 +-
142 files changed, 39768 insertions(+), 390 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d9c40daa/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --cc ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 732f8bb,809c2a6..ffc154a
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@@ -275,11 -285,11 +285,15 @@@
D3FC0DF81C508B2A002B9E31 /* WXTimerModule.m in Sources */ = {isa = PBXBuildFile; fileRef = D3FC0DF61C508B2A002B9E31 /* WXTimerModule.m */; };
DC03ADB91D508719003F76E7 /* WXTextAreaComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = DC03ADB71D508719003F76E7 /* WXTextAreaComponent.m */; };
DC03ADBA1D508719003F76E7 /* WXTextAreaComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = DC03ADB81D508719003F76E7 /* WXTextAreaComponent.h */; };
+ DC0D2DD21F2EE3C100017E00 /* WXVoiceOverModule.h in Headers */ = {isa = PBXBuildFile; fileRef = DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */; };
+ DC0D2DD31F2EE3C100017E00 /* WXVoiceOverModule.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */; };
+ DC0D2DD41F2EE3F800017E00 /* WXVoiceOverModule.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */; };
+ DC0D2DD51F2EE3FC00017E00 /* WXVoiceOverModule.h in Headers */ = {isa = PBXBuildFile; fileRef = DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */; };
DC6836E61EBB12B200AD2D84 /* WXConfigCenterProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DC7764931F3C2CA300B5727E /* WXRecyclerDragController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC7764911F3C2CA300B5727E /* WXRecyclerDragController.m */; };
+ DC7764941F3C2CA300B5727E /* WXRecyclerDragController.h in Headers */ = {isa = PBXBuildFile; fileRef = DC7764921F3C2CA300B5727E /* WXRecyclerDragController.h */; };
+ DC7764951F3C685200B5727E /* WXRecyclerDragController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC7764911F3C2CA300B5727E /* WXRecyclerDragController.m */; };
+ DC7764961F3C685600B5727E /* WXRecyclerDragController.h in Headers */ = {isa = PBXBuildFile; fileRef = DC7764921F3C2CA300B5727E /* WXRecyclerDragController.h */; };
DC9867441D826D1E000AF388 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC9867431D826D1E000AF388 /* GLKit.framework */; };
DC9F46831D61AC8800A88239 /* WXStreamModuleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9F46821D61AC8800A88239 /* WXStreamModuleTests.m */; };
DC9F46871D61BA8C00A88239 /* wx_load_error@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 59AC02501D2A7E6E00355112 /* wx_load_error@3x.png */; };
@@@ -844,9 -858,9 +862,11 @@@
DAB176F008F516E4F9391C61 /* libPods-WeexSDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WeexSDK.a"; sourceTree = BUILT_PRODUCTS_DIR; };
DC03ADB71D508719003F76E7 /* WXTextAreaComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXTextAreaComponent.m; sourceTree = "<group>"; };
DC03ADB81D508719003F76E7 /* WXTextAreaComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXTextAreaComponent.h; sourceTree = "<group>"; };
+ DC0D2DD01F2EE3C100017E00 /* WXVoiceOverModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXVoiceOverModule.h; sourceTree = "<group>"; };
+ DC0D2DD11F2EE3C100017E00 /* WXVoiceOverModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXVoiceOverModule.m; sourceTree = "<group>"; };
DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXConfigCenterProtocol.h; sourceTree = "<group>"; };
+ DC7764911F3C2CA300B5727E /* WXRecyclerDragController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WXRecyclerDragController.m; path = WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.m; sourceTree = SOURCE_ROOT; };
+ DC7764921F3C2CA300B5727E /* WXRecyclerDragController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WXRecyclerDragController.h; path = WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.h; sourceTree = SOURCE_ROOT; };
DC9867431D826D1E000AF388 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
DC9F46821D61AC8800A88239 /* WXStreamModuleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXStreamModuleTests.m; sourceTree = "<group>"; };
DCA0EF621D6EED6F00CB18B9 /* WXGlobalEventModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXGlobalEventModule.h; sourceTree = "<group>"; };
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d9c40daa/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d9c40daa/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d9c40daa/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d9c40daa/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
[19/24] incubator-weex git commit: * [ios] fix compiler complains
Posted by ac...@apache.org.
* [ios] fix compiler complains
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b3c9adf2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b3c9adf2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b3c9adf2
Branch: refs/heads/0.16-dev
Commit: b3c9adf2ab3103c2d4266251edc78c6d21594034
Parents: e7ca9c5
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 15:55:43 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 15:55:43 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b3c9adf2/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
index 6da8dd4..e546bfc 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
@@ -294,7 +294,7 @@
// if([t.threadName isEqualToString:WXTJSBridgeThread]&& [self compareRef:tracing.ref withTracing:t] && ([t.name isEqualToString:tracing.name] || [t.name isEqualToString:WXTJSCall])){
if([t.threadName isEqualToString:WXTJSBridgeThread]&& [self compareRef:tracing.ref withTracing:t]){
if([t.fName isEqualToString:tracing.fName]){
- return t.traceId;
+ return (NSInteger)t.traceId;
}
}
}
[12/24] incubator-weex git commit: * [ios] public WXView header
Posted by ac...@apache.org.
* [ios] public WXView header
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/da5b5183
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/da5b5183
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/da5b5183
Branch: refs/heads/0.16-dev
Commit: da5b518392246357a0bb32aaa92edefd2a2aa8ba
Parents: efc55dd
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 10:25:49 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 10:25:49 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 8 ++++----
ios/sdk/WeexSDK/Sources/WeexSDK.h | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/da5b5183/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 4f9d6fd..73b29e1 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -136,7 +136,7 @@
745B2D6F1E5A8E1E0092D38A /* WXRecyclerUpdateController.m in Sources */ = {isa = PBXBuildFile; fileRef = 745B2D651E5A8E1E0092D38A /* WXRecyclerUpdateController.m */; };
745B2D701E5A8E1E0092D38A /* WXSectionDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = 745B2D661E5A8E1E0092D38A /* WXSectionDataController.h */; };
745B2D711E5A8E1E0092D38A /* WXSectionDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = 745B2D671E5A8E1E0092D38A /* WXSectionDataController.m */; };
- 745ED2DA1C5F2C7E002DB5A8 /* WXView.h in Headers */ = {isa = PBXBuildFile; fileRef = 745ED2D61C5F2C7E002DB5A8 /* WXView.h */; };
+ 745ED2DA1C5F2C7E002DB5A8 /* WXView.h in Headers */ = {isa = PBXBuildFile; fileRef = 745ED2D61C5F2C7E002DB5A8 /* WXView.h */; settings = {ATTRIBUTES = (Public, ); }; };
745ED2DB1C5F2C7E002DB5A8 /* WXView.m in Sources */ = {isa = PBXBuildFile; fileRef = 745ED2D71C5F2C7E002DB5A8 /* WXView.m */; };
7461F8901CFB373100F62D44 /* WXDisplayQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7461F88C1CFB373100F62D44 /* WXDisplayQueue.h */; };
7461F8911CFB373100F62D44 /* WXDisplayQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7461F88D1CFB373100F62D44 /* WXDisplayQueue.m */; };
@@ -238,13 +238,13 @@
C401945E1E344E8300D19C31 /* WXFloatCompareTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */; };
C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */; };
C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */; };
+ C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ C42E8FAA1F3C7AA1001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
C42E8FAB1F3C7C09001EBE9D /* WXExtendCallNativeProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C4424E591F24DA3D009F52E2 /* WXExtendCallNativeProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
C42E8FAC1F3C7C3B001EBE9D /* WXExtendCallNativeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C47B78CD1F2998EE001D3B0C /* WXExtendCallNativeManager.m */; };
C42E8FAD1F3C7C3F001EBE9D /* WXExtendCallNativeManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C47B78CC1F2998EE001D3B0C /* WXExtendCallNativeManager.h */; };
C42E8FAE1F3C7C49001EBE9D /* WXRecyclerDragController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC7764911F3C2CA300B5727E /* WXRecyclerDragController.m */; };
C42E8FAF1F3C7C4B001EBE9D /* WXRecyclerDragController.h in Headers */ = {isa = PBXBuildFile; fileRef = DC7764921F3C2CA300B5727E /* WXRecyclerDragController.h */; };
- C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
- C42E8FAA1F3C7AA1001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
C43C03E81EC8ACA40044C7FF /* WXPrerenderManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C43C03E41EC8ACA40044C7FF /* WXPrerenderManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
C43C03E91EC8ACA40044C7FF /* WXPrerenderManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C43C03E51EC8ACA40044C7FF /* WXPrerenderManager.m */; };
C4424E5B1F24DA3D009F52E2 /* WXExtendCallNativeProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C4424E591F24DA3D009F52E2 /* WXExtendCallNativeProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -461,7 +461,7 @@
DCA445D31EFA594A00D0CFA8 /* WXRoundedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 741DFE001DDD7D18009B020F /* WXRoundedRect.h */; };
DCA445D41EFA594E00D0CFA8 /* UIBezierPath+Weex.h in Headers */ = {isa = PBXBuildFile; fileRef = 741DFE041DDD9B2F009B020F /* UIBezierPath+Weex.h */; };
DCA445D51EFA598200D0CFA8 /* WXComponent+PseudoClassManagement.h in Headers */ = {isa = PBXBuildFile; fileRef = C4C30DE71E1B833D00786B6C /* WXComponent+PseudoClassManagement.h */; };
- DCA445D61EFA598600D0CFA8 /* WXView.h in Headers */ = {isa = PBXBuildFile; fileRef = 745ED2D61C5F2C7E002DB5A8 /* WXView.h */; };
+ DCA445D61EFA598600D0CFA8 /* WXView.h in Headers */ = {isa = PBXBuildFile; fileRef = 745ED2D61C5F2C7E002DB5A8 /* WXView.h */; settings = {ATTRIBUTES = (Public, ); }; };
DCA445D71EFA598D00D0CFA8 /* WXComponent+ViewManagement.h in Headers */ = {isa = PBXBuildFile; fileRef = 747A787A1D1BAAC900DED9D0 /* WXComponent+ViewManagement.h */; };
DCA445D81EFA599400D0CFA8 /* WXRootView.h in Headers */ = {isa = PBXBuildFile; fileRef = 74B8BEFC1DC47B72004A6027 /* WXRootView.h */; };
DCA445D91EFA59A100D0CFA8 /* WXEditComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = C4B3D6D21E6954300013F38D /* WXEditComponent.h */; };
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/da5b5183/ios/sdk/WeexSDK/Sources/WeexSDK.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/WeexSDK.h b/ios/sdk/WeexSDK/Sources/WeexSDK.h
index f14dd54..e125a7a 100644
--- a/ios/sdk/WeexSDK/Sources/WeexSDK.h
+++ b/ios/sdk/WeexSDK/Sources/WeexSDK.h
@@ -19,6 +19,7 @@
#ifdef __OBJC__
+#import "WXView.h"
#import "WXValidateProtocol.h"
#import "WXUtility.h"
#import "WXURLRewriteProtocol.h"
[04/24] incubator-weex git commit: * [ios] add moduleEvent support
and voiceOver status query
Posted by ac...@apache.org.
* [ios] add moduleEvent support and voiceOver status query
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/05d1a4a3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/05d1a4a3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/05d1a4a3
Branch: refs/heads/0.16-dev
Commit: 05d1a4a3c8c9c0f14d22862437581cf123bf53bc
Parents: 7e0e6b6
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 1 16:22:43 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 1 16:22:43 2017 +0800
----------------------------------------------------------------------
.../WeexSDK/Sources/Module/WXVoiceOverModule.m | 35 +++++++++++++++++---
1 file changed, 31 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/05d1a4a3/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
index f543aae..cb8fab1 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -25,13 +25,23 @@
@implementation WXVoiceOverModule
@synthesize weexInstance;
-WX_EXPORT_METHOD(@selector(read:))
+WX_EXPORT_METHOD(@selector(read:param:))
WX_EXPORT_METHOD(@selector(focusToElement:))
-
-- (void)read:(NSString *)string
+WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
+- (instancetype)init {
+ if ([super init]) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(voiceOverStatusListener) name:UIAccessibilityVoiceOverStatusChanged object:nil];
+ }
+ return self;
+}
+- (void)read:(NSString *)string param:(NSDictionary*)param
{
+ float delay = 0.5;
+ if (param[@"delay"]) {
+ delay = [param[@"delay"] floatValue];
+ }
if ([string isKindOfClass:[NSString class]]) {
- dispatch_after(3.0, dispatch_get_main_queue(), ^{
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delay * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, string);
});
}
@@ -46,4 +56,21 @@ WX_EXPORT_METHOD(@selector(focusToElement:))
}
});
}
+
+- (BOOL)isVoiceOverOn
+{
+ return UIAccessibilityIsVoiceOverRunning();
+}
+
+- (void)voiceOverStatusListener
+{
+ if ([weexInstance checkModuleEventRegistered:@"WXVoiceOverStatusChanged" moduleClassName:NSStringFromClass([self class])]) {
+ [weexInstance fireModuleEvent:[self class] eventName:@"WXVoiceOverStatusChanged" params:nil];
+ }
+}
+
+- (void)dealloc {
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityVoiceOverStatusChanged object:self];
+}
+
@end
[20/24] incubator-weex git commit: * [ios] remove test case method
Posted by ac...@apache.org.
* [ios] remove test case method
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b367a053
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b367a053
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b367a053
Branch: refs/heads/0.16-dev
Commit: b367a05352a62edc78445dcbd7ea52cc34a4eec2
Parents: b3c9adf
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 22 16:40:47 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 22 16:40:47 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m | 7 -------
1 file changed, 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b367a053/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
index c329b55..1becd0e 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -31,7 +31,6 @@
WX_EXPORT_METHOD(@selector(read:param:))
WX_EXPORT_METHOD(@selector(focusToElement:))
WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
-WX_EXPORT_METHOD(@selector(focusToNavigationBack))
- (instancetype)init
{
if ([super init]) {
@@ -79,12 +78,6 @@ WX_EXPORT_METHOD(@selector(focusToNavigationBack))
}
}
-// just for test case
-- (void)focusToNavigationBack
-{
- UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, self.weexInstance.viewController.navigationController.navigationItem.backBarButtonItem);
-}
-
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityVoiceOverStatusChanged object:nil];
}
[06/24] incubator-weex git commit: Merge branch '0.16-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into
ios-feature-accessibility
Posted by ac...@apache.org.
Merge branch '0.16-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-feature-accessibility
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/43855a8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/43855a8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/43855a8b
Branch: refs/heads/0.16-dev
Commit: 43855a8bbbd08d94a62ea49c8a44570ad0f51f2f
Parents: 5959413 cf40471
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 8 11:14:55 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 8 11:14:55 2017 +0800
----------------------------------------------------------------------
.../java/com/alibaba/weex/IndexActivity.java | 14 ++
.../main/java/com/taobao/weex/WXSDKManager.java | 10 ++
.../taobao/weex/common/WXWorkThreadManager.java | 48 ++++++
.../com/taobao/weex/ui/component/WXImage.java | 68 +++++++++
.../taobao/weex/utils/WXViewToImageUtil.java | 151 +++++++++++++++++++
build/karma.vue.conf.js | 2 +-
examples/vue/components/scroller.vue | 9 +-
examples/vue/modules/picker.vue | 149 +++++++-----------
.../vue/components/scrollable/scroller.js | 8 +-
.../render/vue/components/scrollable/style.css | 5 +
html5/render/vue/modules/dom.js | 97 ++++++------
html5/test/render/vue/modules/dom.js | 17 ++-
ios/playground/Podfile | 2 +-
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 4 +-
.../WeexSDK/Sources/Component/WXAComponent.m | 1 +
.../WeexSDK/Sources/Component/WXEditComponent.m | 11 +-
.../Sources/Component/WXImageComponent.m | 30 ++--
.../Sources/Component/WXTextAreaComponent.m | 2 +-
ios/sdk/WeexSDK/Sources/Component/WXTransform.h | 1 +
ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 33 ++--
.../Sources/Component/WXVideoComponent.m | 1 +
.../WeexSDK/Sources/Component/WXWebComponent.m | 1 +
ios/sdk/WeexSDK/Sources/Manager/WXRuleManager.m | 1 +
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 1 +
.../WeexSDK/Sources/Module/WXAnimationModule.m | 5 +
ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m | 1 +
.../Sources/Network/WXResourceResponse.h | 2 +-
.../Sources/Protocol/WXURLRewriteProtocol.h | 2 +-
ios/sdk/WeexSDK/Sources/Utility/WXDefine.h | 2 +
package.json | 1 +
test/pages/components/hyperlink_target.vue | 1 +
vue.html | 3 +
32 files changed, 506 insertions(+), 177 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43855a8b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
[11/24] incubator-weex git commit: Merge branch '0.16-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into
ios-feature-accessibility
Posted by ac...@apache.org.
Merge branch '0.16-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-feature-accessibility
# Conflicts:
# ios/sdk/WeexSDK.xcodeproj/project.pbxproj
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/efc55ddf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/efc55ddf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/efc55ddf
Branch: refs/heads/0.16-dev
Commit: efc55ddf0a1704dd792ea91bfa21b484034d0704
Parents: b3ef1a7 4fd66f1
Author: acton393 <zh...@gmail.com>
Authored: Thu Aug 17 15:58:25 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Aug 17 15:58:25 2017 +0800
----------------------------------------------------------------------
HOW-TO-BUILD.md | 17 +-
SCRIPTS.md | 4 +-
android/sdk/libs/x86/libweexjsc.so | Bin 7570392 -> 12121924 bytes
.../java/com/taobao/weex/WXEnvironment.java | 2 +-
.../java/com/taobao/weex/WXSDKInstance.java | 37 +-
.../main/java/com/taobao/weex/WXSDKManager.java | 36 +-
.../taobao/weex/adapter/ITracingAdapter.java | 31 +
.../com/taobao/weex/bridge/WXBridgeManager.java | 66 +-
.../java/com/taobao/weex/common/Constants.java | 3 +
.../taobao/weex/dom/DOMActionContextImpl.java | 15 +-
.../com/taobao/weex/dom/RenderActionTask.java | 26 +-
.../java/com/taobao/weex/dom/WXDomHandler.java | 8 +-
.../java/com/taobao/weex/dom/WXDomManager.java | 16 +-
.../java/com/taobao/weex/dom/WXDomModule.java | 39 +-
.../java/com/taobao/weex/dom/WXDomObject.java | 24 +-
.../java/com/taobao/weex/dom/WXDomTask.java | 1 +
.../taobao/weex/dom/WXRecyclerDomObject.java | 9 +
.../dom/action/AbstractAddElementAction.java | 26 +-
.../dom/action/AbstractLayoutFinishAction.java | 3 +-
.../weex/dom/action/AddElementAction.java | 26 +
.../taobao/weex/dom/action/AddEventAction.java | 24 +-
.../weex/dom/action/CreateBodyAction.java | 19 +
.../weex/dom/action/CreateFinishAction.java | 6 +
.../weex/dom/action/RefreshFinishAction.java | 4 +
.../taobao/weex/dom/action/TraceableAction.java | 82 +
.../weex/dom/action/UpdateAttributeAction.java | 2 +-
.../weex/dom/action/UpdateStyleAction.java | 2 +-
.../java/com/taobao/weex/tracing/Stopwatch.java | 132 +
.../java/com/taobao/weex/tracing/WXTracing.java | 129 +
.../com/taobao/weex/ui/WXRenderManager.java | 26 +-
.../ui/component/AbstractEditComponent.java | 2 +-
.../taobao/weex/ui/component/WXComponent.java | 65 +-
.../com/taobao/weex/ui/component/WXSlider.java | 8 +-
.../taobao/weex/ui/component/WXVContainer.java | 18 +
.../ui/component/list/BasicListComponent.java | 1 +
.../weex/ui/view/WXBaseCircleIndicator.java | 3 +-
.../taobao/weex/ui/view/WXCircleViewPager.java | 57 +-
.../ui/view/refresh/core/WXSwipeLayout.java | 15 +-
.../ui/view/refresh/wrapper/BaseBounceView.java | 2 +-
.../java/com/taobao/weex/utils/WXLogUtils.java | 45 +-
.../com/taobao/weex/utils/WXLogUtilsTest.java | 1 -
build/build.js | 1 +
build/config.js | 21 +-
dangerfile.js | 5 +-
doc/source/_posts/arkit.md | 112 +
doc/source/_posts/cn/hello.md | 6 -
doc/source/_posts/hello_world.md | 7 -
doc/source/_posts/test.md | 14 -
doc/source/cn/blog/index.md | 4 -
.../cn/references/advanced/extend-to-ios.md | 4 +-
.../advanced/integrate-devtool-to-android.md | 86 +-
doc/source/cn/references/common-style.md | 2 +
doc/source/cn/references/components/text.md | 4 +-
doc/source/cn/references/modules/animation.md | 2 +-
doc/source/references/advanced/extend-to-ios.md | 5 +-
doc/source/references/common-style.md | 2 +
doc/source/references/components/text.md | 4 +-
doc/source/references/modules/animation.md | 2 +-
doc/themes/weex/layout/_partial/header.ejs | 1 +
.../weex/layout/_partial/post/summary.ejs | 1 +
doc/themes/weex/source/css/blog.scss | 3 +
doc/themes/weex/source/css/media-queries.scss | 1 +
doc/themes/weex/source/css/partial/header.scss | 6 +-
examples/vanilla/index.js | 4 +-
examples/vue/index.vue | 2 +
examples/vue/market/gcanvas.vue | 10 +-
html5/frameworks/vanilla/index.js | 32 +-
html5/render/native/setup.js | 2 +-
html5/runtime/api/config.js | 37 +
html5/runtime/api/init.js | 227 +
html5/runtime/api/service.js | 77 +
html5/runtime/bridge/CallbackManager.js | 58 +
html5/runtime/bridge/Handler.js | 91 +
html5/runtime/bridge/Listener.js | 220 +
html5/runtime/bridge/TaskCenter.js | 130 +
html5/runtime/bridge/normalize.js | 91 +
html5/runtime/callback-manager.js | 58 -
html5/runtime/config.js | 36 -
html5/runtime/handler.js | 91 -
html5/runtime/index.js | 11 +-
html5/runtime/init.js | 215 -
html5/runtime/listener.js | 227 -
html5/runtime/normalize.js | 107 -
html5/runtime/service.js | 77 -
html5/runtime/task-center.js | 130 -
html5/runtime/utils.js | 54 +
html5/runtime/vdom/Comment.js | 43 +
html5/runtime/vdom/Document.js | 188 +
html5/runtime/vdom/Element.js | 454 +
html5/runtime/vdom/Node.js | 47 +
html5/runtime/vdom/WeexElement.js | 84 +
html5/runtime/vdom/comment.js | 47 -
html5/runtime/vdom/directive.js | 69 +
html5/runtime/vdom/document.js | 194 -
html5/runtime/vdom/element-types.js | 83 -
html5/runtime/vdom/element.js | 459 -
html5/runtime/vdom/index.js | 16 +-
html5/runtime/vdom/node.js | 49 -
html5/runtime/vdom/operation.js | 8 -
html5/test/case/prepare.js | 4 +-
html5/test/unit/default/app/bundle.js | 98 +-
html5/test/unit/default/helper/document.js | 145 -
html5/test/unit/default/runtime.js | 485 -
html5/test/unit/default/vm/compiler.js | 614 -
html5/test/unit/default/vm/directive.js | 279 -
html5/test/unit/default/vm/dom-helper.js | 2 +-
html5/test/unit/default/vm/vm.js | 2 +-
html5/test/unit/runtime/legacy-framework.js | 353 +
html5/test/unit/runtime/runner/helper.js | 73 +
html5/test/unit/runtime/runner/vanilla.js | 59 +
html5/test/unit/runtime/runner/vue.js | 67 +
html5/test/unit/runtime/vdom/directive.js | 101 +
html5/test/unit/runtime/vdom/index.js | 639 +
html5/test/unit/runtime/vdom/listener.js | 381 +
html5/test/unit/runtime/vdom/node.js | 39 +
html5/test/unit/shared/BroadcastChannel.js | 7 -
html5/test/unit/shared/arrayFrom.js | 5 -
html5/test/unit/shared/index.js | 20 +-
html5/test/unit/vanilla/index.js | 13 -
html5/test/unit/vdom/index.js | 659 -
html5/test/unit/vdom/listener.js | 423 -
html5/test/unit/vdom/node.js | 39 -
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 36 +-
.../Sources/Component/WXComponent_internal.h | 14 +
.../WeexSDK/Sources/Component/WXListComponent.m | 4 +-
.../Sources/Display/WXComponent+Display.m | 16 +-
.../WeexSDK/Sources/Layout/WXComponent+Layout.m | 3 +-
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 71 +-
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 9 +-
.../WeexSDK/Sources/Module/WXAnimationLayout.h | 49 -
.../WeexSDK/Sources/Module/WXAnimationLayout.m | 115 -
.../WeexSDK/Sources/Module/WXAnimationModule.h | 2 +
.../WeexSDK/Sources/Module/WXAnimationModule.m | 89 +-
ios/sdk/WeexSDK/Sources/Module/WXTransition.h | 43 +
ios/sdk/WeexSDK/Sources/Module/WXTransition.m | 311 +
.../Sources/Protocol/WXJSExceptionProtocol.h | 10 +
ios/sdk/WeexSDK/Sources/Utility/WXConvert.m | 3 +-
.../Sources/View/WXComponent+ViewManagement.m | 10 +
package.json | 17 +-
packages/weex-html5/index.js | 38779 +++++++++++++++++
packages/weex-html5/index.min.js | 1 +
packages/weex-js-framework/index.js | 1088 +-
packages/weex-js-framework/index.min.js | 2 +-
packages/weex-js-runtime/index.js | 937 +-
packages/weex-js-runtime/index.min.js | 4 +
packages/weex-legacy-framework/index.js | 23 +-
packages/weex-legacy-framework/index.min.js | 2 +-
packages/weex-legacy-framework/package.json | 2 +-
packages/weex-vanilla-framework/.npmignore | 4 +
packages/weex-vanilla-framework/index.js | 136 +
packages/weex-vanilla-framework/index.min.js | 1 +
packages/weex-vanilla-framework/package.json | 21 +
pre-build/native-bundle-main.js | 10 +-
scripts/build_from_source.sh | 10 +-
test/run.sh | 18 +-
155 files changed, 45421 insertions(+), 5979 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/efc55ddf/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/efc55ddf/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
[23/24] incubator-weex git commit: * [ios] protect data type crash
Posted by ac...@apache.org.
* [ios] protect data type crash
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a1855a08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a1855a08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a1855a08
Branch: refs/heads/0.16-dev
Commit: a1855a08402d22f09c8b4d52aafe6e8fbc72530c
Parents: abd1499
Author: acton393 <zh...@gmail.com>
Authored: Thu Aug 24 16:41:26 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Aug 24 16:41:26 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1855a08/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
index 14c4f9c..84db244 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -45,6 +45,10 @@ WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
}
- (void)read:(NSDictionary*)param callback:(WXCallback)callback
{
+ if (![param isKindOfClass:[NSDictionary class]]) {
+ WXLogError(@"first param must be json type");
+ return;
+ }
NSString * string = nil;
if (param[@"value"]) {
string = [WXConvert NSString:param[@"value"]];
[02/24] incubator-weex git commit: * [ios] add accessible property
Posted by ac...@apache.org.
* [ios] add accessible property
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a1108f96
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a1108f96
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a1108f96
Branch: refs/heads/0.16-dev
Commit: a1108f96cbcf229d16aceef16a8902a5182e83b0
Parents: d0e65c3
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 1 14:15:07 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 1 14:15:07 2017 +0800
----------------------------------------------------------------------
.../WeexSDK/Sources/Component/WXComponent_internal.h | 1 +
ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 4 ++++
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 14 ++++++++++++--
3 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1108f96/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
index 7226ced..be7254c 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
+++ b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h
@@ -61,6 +61,7 @@
UIAccessibilityTraits _role; //accessibility
NSString * _ariaLabel; //accessibilityLabel
BOOL _ariaHidden; // accessibilityElementsHidden
+ BOOL _accessible; // accessible
NSString * _testId;// just for auto-test
/**
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1108f96/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index 066b143..d5b78e5 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -271,6 +271,10 @@ do {\
if (!useCoreText) {
((WXText *)self.view).textStorage = _textStorage;
}
+ if (_ariaLabel && !self.view.isAccessibilityElement) {
+ self.view.isAccessibilityElement = YES;
+ }
+
[self setNeedsDisplay];
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1108f96/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
index bd5549b..c40ccb7 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -115,6 +115,9 @@
if (attributes[@"ariaLabel"]) {
_ariaLabel = [WXConvert NSString:attributes[@"ariaLabel"]];
}
+ if (attributes[@"accessible"]) {
+ _accessible = [WXConvert BOOL:attributes[@"accessible"]];
+ }
if (attributes[@"testId"]) {
_testId = [WXConvert NSString:attributes[@"testId"]];
@@ -224,10 +227,8 @@
_layer = _view.layer;
_view.frame = _calculatedFrame;
-
_view.hidden = _visibility == WXVisibilityShow ? NO : YES;
_view.clipsToBounds = _clipToBounds;
-
if (![self _needsDrawBorder]) {
_layer.borderColor = _borderTopColor.CGColor;
_layer.borderWidth = _borderTopWidth;
@@ -263,6 +264,9 @@
if (_ariaLabel) {
_view.accessibilityLabel = _ariaLabel;
}
+ if (_view.isAccessibilityElement != _accessible) {
+ [_view setIsAccessibilityElement:_accessible];
+ }
_view.accessibilityElementsHidden = _ariaHidden;
@@ -554,6 +558,12 @@
_ariaHidden = [WXConvert BOOL:attributes[@"ariaHidden"]];
self.view.accessibilityElementsHidden = _ariaHidden;
}
+ if (attributes[@"accessible"]) {
+ _accessible = [WXConvert BOOL:attributes[@"accessible"]];
+ if (self.view.isAccessibilityElement != _accessible) {
+ [self.view setIsAccessibilityElement:_accessible];
+ }
+ }
if (attributes[@"ariaLabel"]) {
_ariaLabel = [WXConvert NSString:attributes[@"ariaLabel"]];
self.view.accessibilityValue = _ariaLabel;
[18/24] incubator-weex git commit: * [ios] add public headers
Posted by ac...@apache.org.
* [ios] add public headers
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e7ca9c56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e7ca9c56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e7ca9c56
Branch: refs/heads/0.16-dev
Commit: e7ca9c569244a2af211dd9c3eb1a910342f63b2d
Parents: ad3b000
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 15:53:46 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 15:53:46 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/WeexSDK.h | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e7ca9c56/ios/sdk/WeexSDK/Sources/WeexSDK.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/WeexSDK.h b/ios/sdk/WeexSDK/Sources/WeexSDK.h
index e125a7a..1127a3b 100644
--- a/ios/sdk/WeexSDK/Sources/WeexSDK.h
+++ b/ios/sdk/WeexSDK/Sources/WeexSDK.h
@@ -19,6 +19,7 @@
#ifdef __OBJC__
+#import "WXVoiceOverModule.h"
#import "WXView.h"
#import "WXValidateProtocol.h"
#import "WXUtility.h"
[14/24] incubator-weex git commit: * [ios] make slider accessible
Posted by ac...@apache.org.
* [ios] make slider accessible
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1bc2e58c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1bc2e58c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1bc2e58c
Branch: refs/heads/0.16-dev
Commit: 1bc2e58c0414687063943de4f1bc371dcd8073d9
Parents: a1b7c50
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 14:35:32 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 14:35:32 2017 +0800
----------------------------------------------------------------------
.../Sources/Component/WXCycleSliderComponent.m | 33 ++++++++++--
.../Sources/Component/WXSliderComponent.m | 53 ++++++++++++++++++++
2 files changed, 83 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1bc2e58c/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
index a3aaccb..48eda1a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
@@ -95,14 +95,32 @@ typedef NS_ENUM(NSInteger, Direction) {
- (void)accessibilityDecrement
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ [self.wx_component performSelector:NSSelectorFromString(@"resumeAutoPlay:") withObject:@(false)];
+#pragma clang diagnostic pop
+
[self nextPage];
}
- (void)accessibilityIncrement
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ [self.wx_component performSelector:NSSelectorFromString(@"resumeAutoPlay:") withObject:@(false)];
+#pragma clang diagnostic pop
+
[self lastPage];
}
+- (void)accessibilityElementDidLoseFocus
+{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ [self.wx_component performSelector:NSSelectorFromString(@"resumeAutoPlay:") withObject:@(true)];
+#pragma clang diagnostic pop
+}
+
#pragma mark Private Methods
- (CGFloat)height {
return self.frame.size.height;
@@ -426,13 +444,11 @@ typedef NS_ENUM(NSInteger, Direction) {
UIAccessibilityTraits traits = UIAccessibilityTraitAdjustable;
if (_autoPlay) {
traits |= UIAccessibilityTraitUpdatesFrequently;
- }
- _recycleSliderView.accessibilityTraits = traits;
- if (_autoPlay) {
[self _startAutoPlayTimer];
} else {
[self _stopAutoPlayTimer];
}
+ _recycleSliderView.accessibilityTraits = traits;
}
- (void)layoutDidFinish
@@ -580,6 +596,17 @@ typedef NS_ENUM(NSInteger, Direction) {
[_recycleSliderView setIndicator:indicatorView];
}
+- (void)resumeAutoPlay:(id)resume
+{
+ if (_autoPlay) {
+ if ([resume boolValue]) {
+ [self _startAutoPlayTimer];
+ } else {
+ [self _stopAutoPlayTimer];
+ }
+ }
+}
+
#pragma mark Private Methods
- (void)_startAutoPlayTimer
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1bc2e58c/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
index f6451cd..854ef7f 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
@@ -87,6 +87,45 @@
//[NSObject cancelPreviousPerformRequestsWithTarget:self];
}
+- (void)accessibilityIncrement
+{
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ [self.wx_component performSelector:NSSelectorFromString(@"resumeAutoPlay:") withObject:@(false)];
+#pragma clang diagnostic pop
+
+ NSInteger lastIndex = _currentIndex;
+ lastIndex --;
+ if (lastIndex < 0) {
+ lastIndex = 0;
+ }
+ [self setCurrentIndex:lastIndex];
+}
+
+- (void)accessibilityDecrement
+{
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ [self.wx_component performSelector:NSSelectorFromString(@"resumeAutoPlay:") withObject:@(NO)];
+#pragma clang diagnostic pop
+ NSInteger nextIndex = _currentIndex;
+ nextIndex ++;
+ if (nextIndex >= [_itemViews count]) {
+ nextIndex = [_itemViews count]-1;
+ }
+ [self setCurrentIndex:nextIndex];
+}
+
+- (void)accessibilityElementDidLoseFocus
+{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ [self.wx_component performSelector:NSSelectorFromString(@"resumeAutoPlay:") withObject:@(YES)];
+#pragma clang diagnostic pop
+}
+
- (void)setIndicator:(WXIndicatorView *)indicator
{
_indicator = indicator;
@@ -405,12 +444,15 @@
_sliderView.scrollView.pagingEnabled = YES;
_sliderView.exclusiveTouch = YES;
_sliderView.scrollView.scrollEnabled = _scrollable;
+ UIAccessibilityTraits traits = UIAccessibilityTraitAdjustable;
if (_autoPlay) {
+ traits |= UIAccessibilityTraitUpdatesFrequently;
[self _startAutoPlayTimer];
} else {
[self _stopAutoPlayTimer];
}
+ _sliderView.accessibilityTraits = traits;
}
- (void)layoutDidFinish
@@ -553,6 +595,17 @@
[_sliderView setIndicator:indicatorView];
}
+- (void)resumeAutoPlay:(id)resume
+{
+ if (_autoPlay) {
+ if ([resume boolValue]) {
+ [self _startAutoPlayTimer];
+ } else {
+ [self _stopAutoPlayTimer];
+ }
+ }
+}
+
#pragma mark Private Methods
- (void)_startAutoPlayTimer
[03/24] incubator-weex git commit: * [ios] register voice-over module
in default
Posted by ac...@apache.org.
* [ios] register voice-over module in default
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7e0e6b65
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7e0e6b65
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7e0e6b65
Branch: refs/heads/0.16-dev
Commit: 7e0e6b658291ead10a871b9990e030e4610d5a8e
Parents: a1108f9
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 1 14:59:05 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 1 14:59:05 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 16 ++++++++++++----
ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 1 +
ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m | 2 ++
3 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7e0e6b65/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index d5b78e5..094f557 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -74,10 +74,8 @@
- (NSString *)accessibilityValue
{
- if (self.wx_component) {
- if (self.wx_component->_ariaLabel) {
- return self.wx_component->_ariaLabel;
- }
+ if (self.wx_component && self.wx_component->_ariaLabel) {
+ return [super accessibilityValue];
}
if (![(WXTextComponent*)self.wx_component useCoreText]) {
return _textStorage.string;
@@ -85,6 +83,16 @@
return [(WXTextComponent*)self.wx_component valueForKey:@"_text"];
}
+- (NSString *)accessibilityLabel
+{
+ if (self.wx_component) {
+ if (self.wx_component->_ariaLabel) {
+ return self.wx_component->_ariaLabel;
+ }
+ }
+ return [super accessibilityLabel];
+}
+
@end
static BOOL textRenderUsingCoreText = YES;
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7e0e6b65/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
index b95ad9d..703c13e 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
@@ -60,6 +60,7 @@
[self registerModule:@"picker" withClass:NSClassFromString(@"WXPickerModule")];
[self registerModule:@"meta" withClass:NSClassFromString(@"WXMetaModule")];
[self registerModule:@"webSocket" withClass:NSClassFromString(@"WXWebSocketModule")];
+ [self registerModule:@"voice-over" withClass:NSClassFromString(@"WXVoiceOverModule")];
}
+ (void)registerModule:(NSString *)name withClass:(Class)clazz
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7e0e6b65/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
index cba2060..f543aae 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -24,8 +24,10 @@
@implementation WXVoiceOverModule
@synthesize weexInstance;
+
WX_EXPORT_METHOD(@selector(read:))
WX_EXPORT_METHOD(@selector(focusToElement:))
+
- (void)read:(NSString *)string
{
if ([string isKindOfClass:[NSString class]]) {
[09/24] incubator-weex git commit: * [ios] fix picker manager
accessibility
Posted by ac...@apache.org.
* [ios] fix picker manager accessibility
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fbbc23e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fbbc23e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fbbc23e2
Branch: refs/heads/0.16-dev
Commit: fbbc23e25c9d36bbbf7e151405b3ba194faf8862
Parents: d9c40da
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 15 11:08:05 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 15 11:08:05 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fbbc23e2/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m
index 73c5d3c..d671634 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m
@@ -150,6 +150,7 @@
{
UIWindow *window = [UIApplication sharedApplication].keyWindow;
[window addSubview:self.backgroudView];
+ UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.datePicker);
if(self.isAnimating)
{
return;
@@ -178,6 +179,13 @@
self.backgroudView.hidden = YES;
self.isAnimating = NO;
[self.backgroudView removeFromSuperview];
+
+ // move focus to original view;
+ if ([self.delegate isKindOfClass:[WXComponent class]]) {
+ UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, ((WXComponent*)self.delegate).view);
+ }else if ([self.delegate isKindOfClass:[UIView class]]) {
+ UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, (UIView*)self.delegate);
+ }
}];
}
[16/24] incubator-weex git commit: Revert "* [ios] update playground
settings"
Posted by ac...@apache.org.
Revert "* [ios] update playground settings"
This reverts commit d5ed590734170c30a243ffa94f2e3f6a0c213d44.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/55f4aadf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/55f4aadf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/55f4aadf
Branch: refs/heads/0.16-dev
Commit: 55f4aadfef15f636d3aafe663ad5f70ef5439d65
Parents: d5ed590
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 15:03:19 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 15:03:19 2017 +0800
----------------------------------------------------------------------
ios/playground/WeexDemo.xcodeproj/project.pbxproj | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/55f4aadf/ios/playground/WeexDemo.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
index 32f2b10..5c56412 100644
--- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj
+++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
@@ -35,8 +35,8 @@
847CAF311F39E3F100551725 /* WXExtModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 847CAF301F39E3F100551725 /* WXExtModule.m */; };
84D7CAC71CE3266C00D48D46 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7475ACA01CD8444A0044E96C /* libsqlite3.0.tbd */; };
8A0B5EFFF75BF82EA481983D /* libPods-WeexUITestDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E48C20F443AA337D1FE97622 /* libPods-WeexUITestDemo.a */; };
- C43CDA031F1C6E01005A6B03 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = C43CDA021F1C6E01005A6B03 /* libz.tbd */; };
C47B78D21F299E27001D3B0C /* WXExtendCallNativeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */; };
+ C43CDA031F1C6E01005A6B03 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = C43CDA021F1C6E01005A6B03 /* libz.tbd */; };
DC20B8E61ECADA2500845F39 /* WXConfigCenterDefaultImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = DC20B8E51ECADA2500845F39 /* WXConfigCenterDefaultImpl.m */; };
DC5B53691E8CED9400E02125 /* WXScannerHistoryVC.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5B53681E8CED9400E02125 /* WXScannerHistoryVC.m */; };
DC5E503E1D0D97130059F0EB /* weex.png in Resources */ = {isa = PBXBuildFile; fileRef = DC5E503C1D0D97130059F0EB /* weex.png */; };
@@ -97,9 +97,9 @@
847CAF2F1F39E3F100551725 /* WXExtModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXExtModule.h; sourceTree = "<group>"; };
847CAF301F39E3F100551725 /* WXExtModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExtModule.m; sourceTree = "<group>"; };
9420131417A731ED089B0814 /* Pods-WeexDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WeexDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-WeexDemo/Pods-WeexDemo.release.xcconfig"; sourceTree = "<group>"; };
- C43CDA021F1C6E01005A6B03 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
C47B78D01F299E27001D3B0C /* WXExtendCallNativeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXExtendCallNativeTest.h; sourceTree = "<group>"; };
C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExtendCallNativeTest.m; sourceTree = "<group>"; };
+ C43CDA021F1C6E01005A6B03 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
DC20B8E41ECADA2500845F39 /* WXConfigCenterDefaultImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXConfigCenterDefaultImpl.h; sourceTree = "<group>"; };
DC20B8E51ECADA2500845F39 /* WXConfigCenterDefaultImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXConfigCenterDefaultImpl.m; sourceTree = "<group>"; };
DC5B53671E8CED9400E02125 /* WXScannerHistoryVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WXScannerHistoryVC.h; path = Scanner/WXScannerHistoryVC.h; sourceTree = "<group>"; };
@@ -766,8 +766,6 @@
"$(PROJECT_DIR)/WeexDemo",
"$(PROJECT_DIR)",
);
- GCC_GENERATE_TEST_COVERAGE_FILES = YES;
- GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = WeexDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
[13/24] incubator-weex git commit: * [ios] fix slider component
Posted by ac...@apache.org.
* [ios] fix slider component
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a1b7c50d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a1b7c50d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a1b7c50d
Branch: refs/heads/0.16-dev
Commit: a1b7c50d0d0c5c9791fcae7e91db1c59abbd0cc9
Parents: da5b518
Author: acton393 <zh...@gmail.com>
Authored: Fri Aug 18 10:26:40 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Aug 18 10:26:40 2017 +0800
----------------------------------------------------------------------
.../Sources/Component/WXCycleSliderComponent.m | 29 ++++++++++++++++++++
.../Component/WXSliderNeighborComponent.m | 14 ++++++++++
2 files changed, 43 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1b7c50d/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
index 7a7dc9d..a3aaccb 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
@@ -93,6 +93,16 @@ typedef NS_ENUM(NSInteger, Direction) {
[self resetAllViewsFrame];
}
+- (void)accessibilityDecrement
+{
+ [self nextPage];
+}
+
+- (void)accessibilityIncrement
+{
+ [self lastPage];
+}
+
#pragma mark Private Methods
- (CGFloat)height {
return self.frame.size.height;
@@ -225,6 +235,20 @@ typedef NS_ENUM(NSInteger, Direction) {
}
}
+- (void)lastPage
+{
+
+ NSInteger lastIndex = [self currentIndex]-1;
+ if (_itemViews.count > 1) {
+ if (_infinite) {
+ if (lastIndex < 0) {
+ lastIndex = [_itemViews count]-1;
+ }
+ }
+ [self setCurrentIndex:lastIndex];
+ }
+}
+
- (void)resetScrollView
{
if (WXFloatEqual(self.scrollView.contentOffset.x / self.width , 1.0))
@@ -399,6 +423,11 @@ typedef NS_ENUM(NSInteger, Direction) {
_recycleSliderView.exclusiveTouch = YES;
_recycleSliderView.scrollView.scrollEnabled = _scrollable;
_recycleSliderView.infinite = _infinite;
+ UIAccessibilityTraits traits = UIAccessibilityTraitAdjustable;
+ if (_autoPlay) {
+ traits |= UIAccessibilityTraitUpdatesFrequently;
+ }
+ _recycleSliderView.accessibilityTraits = traits;
if (_autoPlay) {
[self _startAutoPlayTimer];
} else {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1b7c50d/ios/sdk/WeexSDK/Sources/Component/WXSliderNeighborComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXSliderNeighborComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXSliderNeighborComponent.m
index 809facd..5bfee0a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXSliderNeighborComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXSliderNeighborComponent.m
@@ -138,6 +138,16 @@
[self stopAnimation];
}
+- (void)accessibilityIncrement
+{
+ [self setCurrentItemIndex: [self lastItemIndex]];
+}
+
+- (void)accessibilityDecrement
+{
+ [self setCurrentItemIndex:[self nextItemIndex]];
+}
+
- (void)setDataSource:(id<WXSliderNeighborDataSource>)dataSource
{
if (_dataSource != dataSource) {
@@ -1474,11 +1484,15 @@ NSComparisonResult sliderNeighorCompareViewDepth(UIView *view1, UIView *view2, W
_sliderView.dataSource = self;
_sliderView.contentView.clipsToBounds = YES;
_sliderView.scrollEnabled = _scrollable;
+ UIAccessibilityTraits traits = UIAccessibilityTraitAdjustable;
+
if (_autoPlay) {
+ traits |= UIAccessibilityTraitUpdatesFrequently;
[self _startAutoPlayTimer];
} else {
[self _stopAutoPlayTimer];
}
+ _sliderView.accessibilityTraits = traits;
}
- (void)layoutDidFinish {
[22/24] incubator-weex git commit: * [ios] add voice over read
callback
Posted by ac...@apache.org.
* [ios] add voice over read callback
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/abd14997
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/abd14997
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/abd14997
Branch: refs/heads/0.16-dev
Commit: abd149976259e6006bcaac79fa6532faea7f0226
Parents: 07411f3
Author: acton393 <zh...@gmail.com>
Authored: Tue Aug 22 17:36:33 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Aug 22 17:36:33 2017 +0800
----------------------------------------------------------------------
.../WeexSDK/Sources/Module/WXVoiceOverModule.m | 63 +++++++++++++++++++-
1 file changed, 61 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/abd14997/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
index 1becd0e..14c4f9c 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXVoiceOverModule.m
@@ -21,36 +21,94 @@
#import "WXUtility.h"
#import "WXComponent_internal.h"
#import "WXComponentManager.h"
+#import "WXThreadSafeMutableDictionary.h"
@implementation WXVoiceOverModule
{
BOOL _voiceOverStatus;
+ WXThreadSafeMutableDictionary * _announcementCallback;
}
@synthesize weexInstance;
-WX_EXPORT_METHOD(@selector(read:param:))
+WX_EXPORT_METHOD(@selector(read:callback:))
WX_EXPORT_METHOD(@selector(focusToElement:))
WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
- (instancetype)init
{
if ([super init]) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(voiceOverStatusListener) name:UIAccessibilityVoiceOverStatusChanged object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(voiceOverAnnounceFinish:) name:UIAccessibilityAnnouncementDidFinishNotification object:nil];
_voiceOverStatus = UIAccessibilityIsVoiceOverRunning();
+ _announcementCallback = [WXThreadSafeMutableDictionary new];
}
return self;
}
-- (void)read:(NSString *)string param:(NSDictionary*)param
+- (void)read:(NSDictionary*)param callback:(WXCallback)callback
{
+ NSString * string = nil;
+ if (param[@"value"]) {
+ string = [WXConvert NSString:param[@"value"]];
+ }
+
+ if (!string ) {
+ NSString * errorDesc = @"you didn't specify any value to read";
+ WXLogError(@"%@", errorDesc);
+ if (callback) {
+ callback(@{@"success":@false,@"errorDesc": errorDesc});
+ }
+ return;
+ }
+
+ if (![self isVoiceOverOn]) {
+ NSString * errorDesc = @"please check the voice status";
+ WXLogInfo(@"%@",errorDesc);
+ if (callback) {
+ callback(@{@"success":@false, @"errorDesc":errorDesc});
+ }
+ return;
+ }
+
float delay = 0.5;
if (param[@"delay"]) {
delay = [param[@"delay"] floatValue];
}
+ if (callback) {
+ NSMutableArray * callbacks = (NSMutableArray*)_announcementCallback[string];
+ if (callbacks) {
+ [callbacks addObject:callback];
+ } else {
+ callbacks = [NSMutableArray arrayWithObject:callback];
+ }
+ [_announcementCallback setObject:callbacks forKey:string];
+ }
+
if ([string isKindOfClass:[NSString class]]) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delay * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, string);
});
}
}
+
+- (void)voiceOverAnnounceFinish:(NSNotification*)notification
+{
+ NSString * string = notification.userInfo[UIAccessibilityAnnouncementKeyStringValue];
+ if (!_announcementCallback[string]) {
+ return;
+ }
+ BOOL announcementResult = [notification.userInfo[UIAccessibilityAnnouncementKeyWasSuccessful] boolValue];
+
+
+ NSMutableArray * callbacks = (NSMutableArray*)_announcementCallback[string];
+ if(![callbacks count]) {
+ return;
+ }
+
+ for (WXCallback callback in callbacks) {
+ callback(@{@"success":@(announcementResult),
+ @"value":string});
+ }
+}
+
- (void)focusToElement:(NSString *)ref {
WXPerformBlockOnComponentThread(^{
WXComponent * compoent = [weexInstance componentForRef:ref];
@@ -80,6 +138,7 @@ WX_EXPORT_METHOD_SYNC(@selector(isVoiceOverOn))
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityVoiceOverStatusChanged object:nil];
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIAccessibilityAnnouncementDidFinishNotification object:nil];
}
@end