Repository: flex-asjs Updated Branches: refs/heads/spark 24dc2663c -> 941b9764d
turn off border in most places. Probably need to turn off border on html tag as well Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/941b9764 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/941b9764 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/941b9764 Branch: refs/heads/spark Commit: 941b9764d1bd2d50195cef91dc15fd805654badc Parents: 24dc266 Author: Alex Harui <aha...@apache.org> Authored: Wed Sep 21 22:51:34 2016 -0700 Committer: Alex Harui <aha...@apache.org> Committed: Wed Sep 21 22:51:34 2016 -0700 ---------------------------------------------------------------------- .../MX/src/main/flex/flex/display/Sprite.as | 22 +++++++++++++++----- .../MX/src/main/flex/flex/text/TextField.as | 11 ++++++++-- .../MX/src/main/flex/mx/core/Application.as | 4 ++++ .../MX/src/main/flex/mx/core/Container.as | 5 +++++ .../MX/src/main/flex/mx/core/UITextFormat.as | 10 +++++++++ .../src/main/flex/mx/managers/SystemManager.as | 13 +++++++----- 6 files changed, 53 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/941b9764/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as index b68a871..369aca4 100644 --- a/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as +++ b/frameworks/projects/MX/src/main/flex/flex/display/Sprite.as @@ -19,11 +19,14 @@ package flex.display { + import mx.managers.SystemManagerGlobals; + import org.apache.flex.core.UIBase; - import org.apache.flex.svg.CompoundGraphic; - import org.apache.flex.geom.Point; - import org.apache.flex.utils.PointUtils; - import mx.managers.SystemManagerGlobals; + import org.apache.flex.core.WrappedHTMLElement; + import org.apache.flex.geom.Point; + import org.apache.flex.svg.CompoundGraphic; + import org.apache.flex.utils.PointUtils; + COMPILE::SWF { import flash.events.IEventDispatcher; @@ -35,6 +38,15 @@ package flex.display public class Sprite extends UIBase implements DisplayObjectContainer, IEventDispatcher { + + COMPILE::JS + override protected function createElement():WrappedHTMLElement + { + var e:WrappedHTMLElement = super.createElement(); + e.style.border = "none"; + return e; + } + COMPILE::JS private var _name:String; COMPILE::JS @@ -114,7 +126,7 @@ package flex.display COMPILE::JS public function removeChildAt(index:int):DisplayObject { - var child:DisplayObject = super.getChildAt(index); + var child:DisplayObject = super.getElementAt(index) as DisplayObject; super.removeElement(child); return child; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/941b9764/frameworks/projects/MX/src/main/flex/flex/text/TextField.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MX/src/main/flex/flex/text/TextField.as b/frameworks/projects/MX/src/main/flex/flex/text/TextField.as index 2036aff..4eb036f 100644 --- a/frameworks/projects/MX/src/main/flex/flex/text/TextField.as +++ b/frameworks/projects/MX/src/main/flex/flex/text/TextField.as @@ -16,7 +16,8 @@ COMPILE::JS import flex.display.DisplayObjectContainer; import flex.display.Sprite; import flex.display.TopOfDisplayList; - + + import org.apache.flex.core.WrappedHTMLElement; import org.apache.flex.geom.Rectangle; import org.apache.flex.html.Label; } @@ -31,8 +32,14 @@ public class TextField extends flash.text.TextField } COMPILE::JS -public class TextField extends Label +public class TextField extends Label implements DisplayObject { + override protected function createElement():WrappedHTMLElement + { + var e:WrappedHTMLElement = super.createElement(); + e.style.border = "none"; + return e; + } private var _alwaysShowSelection:Boolean; public function get alwaysShowSelection():Boolean http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/941b9764/frameworks/projects/MX/src/main/flex/mx/core/Application.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MX/src/main/flex/mx/core/Application.as b/frameworks/projects/MX/src/main/flex/mx/core/Application.as index de72b11..b29364f 100644 --- a/frameworks/projects/MX/src/main/flex/mx/core/Application.as +++ b/frameworks/projects/MX/src/main/flex/mx/core/Application.as @@ -354,6 +354,10 @@ public class Application extends LayoutContainer */ public function Application() { + COMPILE::SWF + { + start(); + } } /** http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/941b9764/frameworks/projects/MX/src/main/flex/mx/core/Container.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MX/src/main/flex/mx/core/Container.as b/frameworks/projects/MX/src/main/flex/mx/core/Container.as index ec23148..0805cc2 100644 --- a/frameworks/projects/MX/src/main/flex/mx/core/Container.as +++ b/frameworks/projects/MX/src/main/flex/mx/core/Container.as @@ -4931,6 +4931,11 @@ public class Container extends UIComponent border.move(0, 0); border.setActualSize(unscaledWidth, unscaledHeight); } + COMPILE::JS + { + if (!border) + element.style.border = "none"; + } } /** http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/941b9764/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as b/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as index 320718c..cf6b236 100644 --- a/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as +++ b/frameworks/projects/MX/src/main/flex/mx/core/UITextFormat.as @@ -22,11 +22,13 @@ package mx.core COMPILE::SWF { + import flash.display.DisplayObject; import flash.text.TextFormat; import flash.text.TextLineMetrics; } COMPILE::JS { + import flex.display.DisplayObject; import flex.text.TextFormat; import flex.text.TextLineMetrics; } @@ -570,6 +572,10 @@ public class UITextFormat extends TextFormat useFTE ? textFieldFactory.createFTETextField(fontModuleFactory) : textFieldFactory.createTextField(fontModuleFactory); + COMPILE::JS + { + systemManager.addChildAt(measurementTextField as DisplayObject, 0); + } // Clear any old text from the TextField. // Otherwise, new text will get the old TextFormat. @@ -623,6 +629,10 @@ public class UITextFormat extends TextFormat lineMetrics.height = Math.ceil(lineMetrics.height); } + COMPILE::JS + { + systemManager.removeChildAt(0); + } return lineMetrics; } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/941b9764/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as index 9f09d53..7c4e96e 100644 --- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as +++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as @@ -3072,7 +3072,7 @@ public class SystemManager extends MovieClip element = window.document.getElementsByTagName('body')[0]; element.flexjs_wrapper = this; element.className = 'SystemManager'; - + element.style.border = "none"; positioner = element; return element; @@ -3172,14 +3172,17 @@ public class SystemManager extends MovieClip var token:int = perfUtil.markStart(); } - COMPILE::LATER + COMPILE::SWF { // trace("initializing mixin " + mixinList[i]); var c:Class = getDefinitionByName(mixinList[i]) as Class; } - // in FlexJS, mixins are classes, not class names. Class names - // are better for two-frame SWFs so this may change later - var c:Class = mixinList[i] as Class; + COMPILE::JS + { + // in FlexJS, mixins are classes, not class names. Class names + // are better for two-frame SWFs so this may change later + var c:Class = mixinList[i] as Class; + } c["init"](this); CONFIG::performanceInstrumentation