You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by so...@apache.org on 2012/07/19 17:26:23 UTC
svn commit: r1363384 - in /myfaces/trinidad/branches/trinidad-2.0.x:
trinidad-api/
trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/
trinidad-impl/src/main/resources/META-INF/agent/
Author: sobryan
Date: Thu Jul 19 15:26:23 2012
New Revision: 1363384
URL: http://svn.apache.org/viewvc?rev=1363384&view=rev
Log:
TRINIDAD-2172 - pseudo classes missing from CSSGenerationUtils
* Applied patch TRINIDAD-2172 - thanks Anand
* Also updated clirr runner tests to check API compat against 2.0.1 rather then 1.2
Modified:
myfaces/trinidad/branches/trinidad-2.0.x/trinidad-api/pom.xml
myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/android.xml
myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/ios.xml
Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-api/pom.xml?rev=1363384&r1=1363383&r2=1363384&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-api/pom.xml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-api/pom.xml Thu Jul 19 15:26:23 2012
@@ -131,7 +131,7 @@
<comparisonArtifact>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-api</artifactId>
- <version>1.2.15</version>
+ <version>2.0.1</version>
</comparisonArtifact>
</comparisonArtifacts>
</configuration>
Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java?rev=1363384&r1=1363383&r2=1363384&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java Thu Jul 19 15:26:23 2012
@@ -1336,20 +1336,40 @@ public class CSSGenerationUtils
new PropertyNodeComparator();
}
+ /**
+ * Converts the pseudo class into a "p_AF" prefixed styleclass.
+ * This is because certain pseudo-classes are internal and are not recognized by any browsers.
+ * The renderers are responsible for rendering out the same styleclass format.
+ * Some examples are:
+ * :screen-reader becomes .p_AFScreenReader
+ * :disabled becomes .p_AFDisabled
+ *
+ * Exception is CSS built in pseudo classes, which are recognized by browsers. These are rendered as is.
+ *
+ * @param pseudoClass
+ * @param afNamespacedSelector true if the pseudoClass is part of AF namespaced selector
+ * @return
+ */
static private String _convertPseudoClass(String pseudoClass, boolean afNamespacedSelector)
{
// The design time needs the browser-supported pseudo-classes to be converted so they
// can show a preview of the skinned component.
String builtInPseudoClass = pseudoClass;
- int parenthesesStartIndex = pseudoClass.indexOf("(");
- if (parenthesesStartIndex != -1)
- builtInPseudoClass = pseudoClass.substring(0, parenthesesStartIndex);
+ int parenthesesIndex = pseudoClass.indexOf("(");
+
+ // if there are no open parentheses check for closing parentheses
+ if (parenthesesIndex == -1)
+ parenthesesIndex = pseudoClass.indexOf(")");
+
+ // if at least one parentheses exists strip the pseudoClass off it
+ if (parenthesesIndex != -1)
+ builtInPseudoClass = pseudoClass.substring(0, parenthesesIndex);
if (_BUILT_IN_PSEUDO_CLASSES.contains(builtInPseudoClass) && !Beans.isDesignTime())
return pseudoClass;
// _BACKWARD_COMPATIBLE_CSS3_PSEUDO_CLASSES is treated differently
- // for namespaced selectors we render it mangled
+ // for namespaced selectors we render it prefixed with "p_AF"
// for non-namespaced selectors we render it directly
if (!afNamespacedSelector && _BACKWARD_COMPATIBLE_CSS3_PSEUDO_CLASSES.contains(builtInPseudoClass))
return pseudoClass;
Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/android.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/android.xml?rev=1363384&r1=1363383&r2=1363384&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/android.xml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/android.xml Thu Jul 19 15:26:23 2012
@@ -21,3 +21,26 @@
<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
<capability name="touchScreen" value="single"/>
</capabilityData>
+<?xml version="1.0"?>
+<!--
+ 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.
+
+-->
+<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
+ <capability name="touchScreen" value="single"/>
+</capabilityData>
Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/ios.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/ios.xml?rev=1363384&r1=1363383&r2=1363384&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/ios.xml (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/resources/META-INF/agent/ios.xml Thu Jul 19 15:26:23 2012
@@ -23,3 +23,28 @@
<capability name="-adfinternal-supportsDisabledOptions" value="false"/>
</capabilityData>
+<?xml version="1.0"?>
+<!--
+ 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.
+
+-->
+<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
+ <capability name="touchScreen" value="multiple"/>
+<capability name="-adfinternal-supportsDisabledOptions" value="false"/>
+</capabilityData>
+