Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/ViewCSSImpl.java')
-rw-r--r--bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/ViewCSSImpl.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/ViewCSSImpl.java b/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/ViewCSSImpl.java
index 8f9e2b6426b..511fdab594f 100644
--- a/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/ViewCSSImpl.java
+++ b/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/ViewCSSImpl.java
@@ -69,8 +69,7 @@ public class ViewCSSImpl implements ViewCSS {
return null;
}
- public CSSStyleDeclaration getComputedStyle(CSSStyleSheet styleSheet,
- Element elt, String pseudoElt) {
+ public CSSStyleDeclaration getComputedStyle(CSSStyleSheet styleSheet, Element elt, String pseudoElt) {
List styleDeclarations = null;
StyleWrapper firstStyleDeclaration = null;
CSSRuleList ruleList = styleSheet.getCssRules();
@@ -78,8 +77,7 @@ public class ViewCSSImpl implements ViewCSS {
int position = 0;
for (int i = 0; i < length; i++) {
CSSRule rule = ruleList.item(i);
- switch (rule.getType()) {
- case CSSRule.STYLE_RULE: {
+ if (rule.getType() == CSSRule.STYLE_RULE) {
CSSStyleRule styleRule = (CSSStyleRule) rule;
if (rule instanceof ExtendedCSSRule) {
ExtendedCSSRule r = (ExtendedCSSRule) rule;
@@ -104,8 +102,7 @@ public class ViewCSSImpl implements ViewCSS {
// match the current element
if (styleDeclarations == null) {
styleDeclarations = new ArrayList();
- styleDeclarations
- .add(firstStyleDeclaration);
+ styleDeclarations.add(firstStyleDeclaration);
}
styleDeclarations.add(wrapper);
}
@@ -120,7 +117,6 @@ public class ViewCSSImpl implements ViewCSS {
// Manage this case...
}
}
- }
}
if (styleDeclarations != null) {
// There is several Style Declarations wich match

Back to the top