diff options
192 files changed, 9175 insertions, 8837 deletions
diff --git a/WebContent/META-INF/MANIFEST.MF b/WebContent/META-INF/MANIFEST.MF index 58630c02ef..59499bce4a 100644 --- a/WebContent/META-INF/MANIFEST.MF +++ b/WebContent/META-INF/MANIFEST.MF @@ -1,2 +1,2 @@ -Manifest-Version: 1.0
-
+Manifest-Version: 1.0 + diff --git a/WebContent/VAADIN/themes/base/absolutelayout/absolutelayout.scss b/WebContent/VAADIN/themes/base/absolutelayout/absolutelayout.scss index ddb030c00f..c8bb57365f 100644 --- a/WebContent/VAADIN/themes/base/absolutelayout/absolutelayout.scss +++ b/WebContent/VAADIN/themes/base/absolutelayout/absolutelayout.scss @@ -1,18 +1,18 @@ -@mixin base-absolutelayout { +@mixin base-absolutelayout($name : v-absolutelayout) { -.v-absolutelayout-wrapper { +.#{$name}-wrapper { position: absolute; overflow: hidden; } -.v-absolutelayout-margin, .v-absolutelayout-canvas { +.#{$name}-margin, .#{$name}-canvas { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.v-absolutelayout.v-has-height > div, .v-absolutelayout.v-has-height > div > div { +.#{$name}.v-has-height > div, .#{$name}.v-has-height > div > div { height: 100%; } -.v-absolutelayout.v-has-width > div, .v-absolutelayout.v-has-width > div > div { +.#{$name}.v-has-width > div, .#{$name}.v-has-width > div > div { width: 100%; } diff --git a/WebContent/VAADIN/themes/base/base.scss b/WebContent/VAADIN/themes/base/base.scss index dae1d0eef3..8a126476bc 100644 --- a/WebContent/VAADIN/themes/base/base.scss +++ b/WebContent/VAADIN/themes/base/base.scss @@ -1,6 +1,8 @@ @import "absolutelayout/absolutelayout.scss"; @import "accordion/accordion.scss"; @import "button/button.scss"; +@import "button/nativebutton.scss"; +@import "button/checkbox.scss"; @import "layout/layout.scss"; @import "caption/caption.scss"; @import "common/common.scss"; @@ -33,3 +35,55 @@ @import "upload/upload.scss"; @import "widget/widget.scss"; @import "window/window.scss"; + + +@mixin base { + // @include base-app; + + // everything included from base theme + // other themes should enclose corresponding definitions in theme selectors + + @include base-widget; + + @include base-absolutelayout; + @include base-accordion; + @include base-button; + @include base-nativebutton; + @include base-checkbox; + @include base-caption; + + // here for now to preserve old semantics + @include base-common; + + @include base-layout; + @include base-csslayout; + @include base-customcomponent; + @include base-customlayout; + @include base-datefield; + @include base-dragwrapper; + @include base-embedded; + @include base-formlayout; + @include base-gridlayout; + @include base-label; + @include base-link; + @include base-loginform; + @include base-menubar; + @include base-notification; + @include base-orderedlayout; + @include base-panel; + @include base-popupview; + @include base-progressindicator; + @include base-select; + @include base-shadow; + @include base-slider; + @include base-splitpanel; + @include base-table; + @include base-tabsheet; + @include base-textfield; + @include base-richtextarea; + @include base-tree; + @include base-treetable; + @include base-upload; + @include base-window; +} + diff --git a/WebContent/VAADIN/themes/base/button/button.scss b/WebContent/VAADIN/themes/base/button/button.scss index ad4dce4978..37a5973437 100644 --- a/WebContent/VAADIN/themes/base/button/button.scss +++ b/WebContent/VAADIN/themes/base/button/button.scss @@ -1,9 +1,9 @@ -@mixin base-button { +@mixin base-button($name : v-button) { /* * Default button (more customizable) * -------------------------------------- */ -.v-button { +.#{$name} { display: inline-block; zoom: 1; text-align: center !important; @@ -26,12 +26,12 @@ box-sizing: border-box; } -.v-button.v-disabled { +.#{$name}.v-disabled { cursor: default; } -.v-button-wrap, -.v-button-caption { +.#{$name}-wrap, +.#{$name}-caption { vertical-align: baseline; white-space: nowrap; font: inherit; @@ -39,15 +39,13 @@ line-height: normal; } -.v-button .v-icon, -.v-nativebutton .v-icon { +.#{$name} .v-icon { vertical-align: middle; margin-right: 3px; border: none; } -.v-button .v-errorindicator, -.v-nativebutton .v-errorindicator { +.#{$name} .v-errorindicator { display: inline-block; zoom: 1; vertical-align: middle; @@ -55,8 +53,7 @@ } /* Link style (we really should deprecate this) */ -.v-button-link, -.v-nativebutton-link { +.#{$name}-link { border: none; text-align: left !important; background: transparent; @@ -69,94 +66,14 @@ } /* Inset Safari focus outline a bit */ -.v-sa .v-button-link:focus{ +.v-sa .#{$name}-link:focus{ outline-offset: -3px; } -.v-button-link .v-button-caption, -.v-nativebutton-link .v-nativebutton-caption { +.#{$name}-link .#{$name}-caption { text-decoration: underline; color: inherit; text-align: left; } - -/* - * NativeButton styles (html button element) - * -------------------------------------- */ -.v-nativebutton { - text-align: center !important; - cursor: pointer; - white-space: nowrap; - margin: 0; - color: inherit; - font: inherit; - line-height: normal; - } -.v-nativebutton .v-nativebutton-caption { - vertical-align: middle; - white-space: nowrap; - font: inherit; - color: inherit; - } - -.v-nativebutton .v-icon { - vertical-align: middle; - margin-right: 3px; - } - -.v-nativebutton .v-errorindicator { - display: inline-block; - zoom: 1; - float: none; -} -/* Fixes stretched buttons in IE7*/ -.v-ie .v-nativebutton { - overflow: visible; - padding-left: 1em; - padding-right: 1em; -} - -.v-ie .v-nativebutton-link { - padding: 0; -} - -/* - * Checkbox styles - * -------------------------------------- */ - - .v-checkbox { - display: block; - } - -.v-checkbox, -.v-checkbox label, -.v-checkbox input, -.v-checkbox .v-icon { - vertical-align: middle; - white-space: nowrap; -} - -.v-checkbox .v-icon { - margin: 0 2px; -} -.v-checkbox .v-errorindicator { - float: none; - display: inline; - display: inline-block; - zoom: 1; -} - - -/* Disabled by default -.v-checkbox-error { - background: #ffe0e0; -} -*/ -/* Disabled by default -.v-checkbox-required { - background: #ffe0e0; -} -*/ - -} +}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/button/checkbox.scss b/WebContent/VAADIN/themes/base/button/checkbox.scss new file mode 100644 index 0000000000..9222e76975 --- /dev/null +++ b/WebContent/VAADIN/themes/base/button/checkbox.scss @@ -0,0 +1,37 @@ +@mixin base-checkbox($name : v-checkbox) { + + .#{$name} { + display: block; + } + +.#{$name}, +.#{$name} label, +.#{$name} input, +.#{$name} .v-icon { + vertical-align: middle; + white-space: nowrap; +} + +.#{$name} .v-icon { + margin: 0 2px; +} +.#{$name} .v-errorindicator { + float: none; + display: inline; + display: inline-block; + zoom: 1; +} + + +/* Disabled by default +.#{$name}-error { + background: #ffe0e0; +} +*/ +/* Disabled by default +.#{$name}-required { + background: #ffe0e0; +} +*/ + +} diff --git a/WebContent/VAADIN/themes/base/button/nativebutton.scss b/WebContent/VAADIN/themes/base/button/nativebutton.scss new file mode 100644 index 0000000000..cccc51ff7b --- /dev/null +++ b/WebContent/VAADIN/themes/base/button/nativebutton.scss @@ -0,0 +1,73 @@ +@mixin base-nativebutton($name : v-nativebutton) { + + +.#{$name} .v-icon { + vertical-align: middle; + margin-right: 3px; + border: none; + } + +.#{$name} .v-errorindicator { + display: inline-block; + zoom: 1; + vertical-align: middle; + float: none; +} + +/* Link style (we really should deprecate this) */ +.#{$name}-link { + border: none; + text-align: left !important; + background: transparent; + padding: 0; + color: inherit; + -khtml-user-select: text; + -moz-user-select: text; + -ie-user-select: text; + user-select: text; +} + +.#{$name}-link .#{$name}-caption { + text-decoration: underline; + color: inherit; + text-align: left; + } + +.#{$name} { + text-align: center !important; + cursor: pointer; + white-space: nowrap; + margin: 0; + color: inherit; + font: inherit; + line-height: normal; + } +.#{$name} .#{$name}-caption { + vertical-align: middle; + white-space: nowrap; + font: inherit; + color: inherit; + } + +.#{$name} .v-icon { + vertical-align: middle; + margin-right: 3px; + } + +.#{$name} .v-errorindicator { + display: inline-block; + zoom: 1; + float: none; +} +/* Fixes stretched buttons in IE7*/ +.v-ie .#{$name} { + overflow: visible; + padding-left: 1em; + padding-right: 1em; +} + +.v-ie .#{$name}-link { + padding: 0; +} + +} diff --git a/WebContent/VAADIN/themes/base/caption/caption.scss b/WebContent/VAADIN/themes/base/caption/caption.scss index c6fd124ad6..d08f682adb 100644 --- a/WebContent/VAADIN/themes/base/caption/caption.scss +++ b/WebContent/VAADIN/themes/base/caption/caption.scss @@ -1,26 +1,26 @@ -@mixin base-caption { +@mixin base-caption($name : v-caption) { -.v-captionwrapper { +.#{$name}wrapper { text-align: left; /* Force default alignment */ } -.v-caption { +.#{$name} { overflow: hidden; white-space: nowrap; } .v-errorindicator { display: inline-block; } -.v-caption .v-icon { +.#{$name} .v-icon { display: inline-block; padding-right: 2px; vertical-align: middle; } -.v-caption .v-captiontext { +.#{$name} .#{$name}text { display: inline-block; overflow: hidden; vertical-align: middle; } -.v-caption .v-required-field-indicator { +.#{$name} .v-required-field-indicator { display: inline-block; } diff --git a/WebContent/VAADIN/themes/base/csslayout/csslayout.scss b/WebContent/VAADIN/themes/base/csslayout/csslayout.scss index c2c1b698ad..2356a1689d 100644 --- a/WebContent/VAADIN/themes/base/csslayout/csslayout.scss +++ b/WebContent/VAADIN/themes/base/csslayout/csslayout.scss @@ -1,35 +1,35 @@ -@mixin base-csslayout { +@mixin base-csslayout($name : v-csslayout) { -.v-csslayout { +.#{$name} { overflow: hidden; } /* More specific selector to override 'v-connector' */ -div.v-csslayout { +div.#{$name} { display: block; } -.v-csslayout-margin, .v-csslayout-container { +.#{$name}-margin, .#{$name}-container { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.v-has-width > .v-csslayout-margin, -.v-has-width > .v-csslayout-margin > .v-csslayout-container { +.v-has-width > .#{$name}-margin, +.v-has-width > .#{$name}-margin > .#{$name}-container { width: 100%; } -.v-has-height > .v-csslayout-margin, -.v-has-height > .v-csslayout-margin > .v-csslayout-container { +.v-has-height > .#{$name}-margin, +.v-has-height > .#{$name}-margin > .#{$name}-container { height: 100%; } -.v-csslayout-margin-top { +.#{$name}-margin-top { padding-top: 12px; } -.v-csslayout-margin-bottom { +.#{$name}-margin-bottom { padding-bottom: 12px; } -.v-csslayout-margin-left { +.#{$name}-margin-left { padding-left: 12px; } -.v-csslayout-margin-right { +.#{$name}-margin-right { padding-right: 12px; } diff --git a/WebContent/VAADIN/themes/base/customcomponent/customcomponent.scss b/WebContent/VAADIN/themes/base/customcomponent/customcomponent.scss index aaf3e75251..984c31e255 100644 --- a/WebContent/VAADIN/themes/base/customcomponent/customcomponent.scss +++ b/WebContent/VAADIN/themes/base/customcomponent/customcomponent.scss @@ -1,6 +1,6 @@ -@mixin base-customcomponent { +@mixin base-customcomponent($name : v-customcomponent) { -.v-customcomponent { +.#{$name} { overflow: hidden; } diff --git a/WebContent/VAADIN/themes/base/customlayout/customlayout.scss b/WebContent/VAADIN/themes/base/customlayout/customlayout.scss index 26e1538d29..0f5f1230c4 100644 --- a/WebContent/VAADIN/themes/base/customlayout/customlayout.scss +++ b/WebContent/VAADIN/themes/base/customlayout/customlayout.scss @@ -1,6 +1,6 @@ -@mixin base-customlayout { +@mixin base-customlayout($name : v-customlayout) { -.v-customlayout { +.#{$name} { overflow: hidden; } diff --git a/WebContent/VAADIN/themes/base/datefield/datefield.scss b/WebContent/VAADIN/themes/base/datefield/datefield.scss index 8877c986a0..f7d71a576b 100644 --- a/WebContent/VAADIN/themes/base/datefield/datefield.scss +++ b/WebContent/VAADIN/themes/base/datefield/datefield.scss @@ -1,91 +1,91 @@ -@mixin base-datefield { +@mixin base-datefield($name : v-datefield) { -.v-datefield { +.#{$name} { white-space: nowrap; display: inline-block; /* Force minimum width */ line-height:0; /* Force minimum height */ } -.v-datefield-textfield { +.#{$name}-textfield { vertical-align: top; } -.v-datefield-button { +.#{$name}-button { cursor: pointer; } -.v-datefield-prompt .v-datefield-textfield { +.#{$name}-prompt .#{$name}-textfield { color: #999; font-style: italic; } -.v-datefield .v-datefield-button-readonly { +.#{$name} .#{$name}-button-readonly { display: none; } -.v-datefield-calendarpanel table { +.#{$name}-calendarpanel table { width: 100%; } -.v-datefield-calendarpanel td { +.#{$name}-calendarpanel td { padding: 0; margin: 0; } -.v-datefield-calendarpanel:focus { +.#{$name}-calendarpanel:focus { outline:none; } -.v-datefield-calendarpanel-header td { +.#{$name}-calendarpanel-header td { text-align: center; } -.v-datefield-calendarpanel-month { +.#{$name}-calendarpanel-month { text-align: center; white-space: nowrap; } -.v-datefield-calendarpanel-weeknumber { +.#{$name}-calendarpanel-weeknumber { color: #999; border-right: 1px solid #ddd; font-size: 0.9em; } -.v-datefield-calendarpanel-day, -.v-datefield-calendarpanel-day-today { +.#{$name}-calendarpanel-day, +.#{$name}-calendarpanel-day-today { cursor: pointer; } -.v-datefield-calendarpanel-day-today { +.#{$name}-calendarpanel-day-today { border: 1px solid #ddd; } -.v-disabled .v-datefield-calendarpanel-day, -.v-disabled .v-datefield-calendarpanel-day-today { +.v-disabled .#{$name}-calendarpanel-day, +.v-disabled .#{$name}-calendarpanel-day-today { cursor: default; } -.v-datefield-calendarpanel-day-disabled { +.#{$name}-calendarpanel-day-disabled { cursor: default; opacity: .5; } -.v-datefield-calendarpanel-day-selected { +.#{$name}-calendarpanel-day-selected { cursor: default; background: #333; color: #fff; } -.v-datefield-calendarpanel-day-focused { +.#{$name}-calendarpanel-day-focused { outline: 1px dotted black; } -.v-datefield-calendarpanel-day-offmonth { +.#{$name}-calendarpanel-day-offmonth { color: #666; } -.v-datefield-time { +.#{$name}-time { white-space: nowrap; } -.v-datefield-time .v-label { +.#{$name}-time .v-label { display: inline; } -.v-datefield-popup { +.#{$name}-popup { background: #fff; } /* Disabled by default -.v-datefield-error .v-textfield, -.v-datefield-error .v-datefield-calendarpanel { +.#{$name}-error .v-textfield, +.#{$name}-error .#{$name}-calendarpanel { background: #ffe0e0; } */ /* Disabled by default -.v-datefield-required .v-textfield, -.v-datefield-required .v-datefield-calendarpanel { +.#{$name}-required .v-textfield, +.#{$name}-required .#{$name}-calendarpanel { background:transparent; background-color: #ffe0e0; } diff --git a/WebContent/VAADIN/themes/base/dragwrapper/dragwrapper.scss b/WebContent/VAADIN/themes/base/dragwrapper/dragwrapper.scss index 9d60bf0618..dae4320131 100644 --- a/WebContent/VAADIN/themes/base/dragwrapper/dragwrapper.scss +++ b/WebContent/VAADIN/themes/base/dragwrapper/dragwrapper.scss @@ -1,6 +1,6 @@ -@mixin base-dragwrapper { +@mixin base-dragwrapper($name : v-ddwrapper) { -.v-ddwrapper { +.#{$name} { padding: 2px; -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -13,7 +13,7 @@ -khtml-user-select: none; -webkit-user-select: none; } -.v-ie .v-ddwrapper a.drag-start { +.v-ie .#{$name} a.drag-start { display: block; position: absolute; top: 0; @@ -27,22 +27,22 @@ background-color:cyan; filter: alpha(opacity=0); } -.v-ddwrapper-over { +.#{$name}-over { border: 2px solid #1d9dff; background-color: #bcdcff; padding: 0; } -.v-ddwrapper-over { +.#{$name}-over { background-color: rgba(169,209,255,.6); } -.no-box-drag-hints .v-ddwrapper-over { +.no-box-drag-hints .#{$name}-over { border: none; background-color: transparent; padding: 2px; } -.v-app .v-ddwrapper-over-top, -.v-window .v-ddwrapper-over-top, -.v-popupview-popup .v-ddwrapper-over-top { +.v-app .#{$name}-over-top, +.v-window .#{$name}-over-top, +.v-popupview-popup .#{$name}-over-top { border: none; border-top: 2px solid #1d9dff; background-color: transparent; @@ -52,9 +52,9 @@ -webkit-border-radius: 0; border-radius: 0; } -.v-app .v-ddwrapper-over-bottom, -.v-window .v-ddwrapper-over-bottom, -.v-popupview-popup .v-ddwrapper-over-bottom { +.v-app .#{$name}-over-bottom, +.v-window .#{$name}-over-bottom, +.v-popupview-popup .#{$name}-over-bottom { border: none; border-bottom: 2px solid #1d9dff; background-color: transparent; @@ -64,9 +64,9 @@ -webkit-border-radius: 0; border-radius: 0; } -.v-app .v-ddwrapper-over-left, -.v-window .v-ddwrapper-over-left, -.v-popupview-popup .v-ddwrapper-over-left { +.v-app .#{$name}-over-left, +.v-window .#{$name}-over-left, +.v-popupview-popup .#{$name}-over-left { border: none; border-left: 2px solid #1d9dff; background-color: transparent; @@ -76,9 +76,9 @@ -webkit-border-radius: 0; border-radius: 0; } -.v-app .v-ddwrapper-over-right, -.v-window .v-ddwrapper-over-right, -.v-popupview-popup .v-ddwrapper-over-right { +.v-app .#{$name}-over-right, +.v-window .#{$name}-over-right, +.v-popupview-popup .#{$name}-over-right { border: none; border-right: 2px solid #1d9dff; background-color: transparent; @@ -88,27 +88,27 @@ -webkit-border-radius: 0; border-radius: 0; } -.v-ddwrapper, -.v-ddwrapper-over, -.v-app .v-ddwrapper-over-top, -.v-window .v-ddwrapper-over-top, -.v-popupview-popup .v-ddwrapper-over-top, -.v-app .v-ddwrapper-over-bottom, -.v-window .v-ddwrapper-over-bottom, -.v-popupview-popup .v-ddwrapper-over-bottom, -.v-app .v-ddwrapper-over-left, -.v-window .v-ddwrapper-over-left, -.v-popupview-popup .v-ddwrapper-over-left, -.v-app .v-ddwrapper-over-right, -.v-window .v-ddwrapper-over-right, -.v-popupview-popup .v-ddwrapper-over-right { +.#{$name}, +.#{$name}-over, +.v-app .#{$name}-over-top, +.v-window .#{$name}-over-top, +.v-popupview-popup .#{$name}-over-top, +.v-app .#{$name}-over-bottom, +.v-window .#{$name}-over-bottom, +.v-popupview-popup .#{$name}-over-bottom, +.v-app .#{$name}-over-left, +.v-window .#{$name}-over-left, +.v-popupview-popup .#{$name}-over-left, +.v-app .#{$name}-over-right, +.v-window .#{$name}-over-right, +.v-popupview-popup .#{$name}-over-right { border-color: rgba(0,109,232,.6); } -.v-ddwrapper-over-top:before, -.v-ddwrapper-over-bottom:after, -.v-ddwrapper-over-left:before, -.v-ddwrapper-over-right:before { +.#{$name}-over-top:before, +.#{$name}-over-bottom:after, +.#{$name}-over-left:before, +.#{$name}-over-right:before { display: block; position: absolute; @@ -118,16 +118,16 @@ margin-left: -2px; background: transparent url(../common/img/drag-slot-dot.png) no-repeat; } -.v-ddwrapper-over-bottom:after { +.#{$name}-over-bottom:after { margin-top: -2px; } -.v-ddwrapper-over-left:before, -.v-ddwrapper-over-right:before { +.#{$name}-over-left:before, +.#{$name}-over-right:before { background-position: 0 -6px; margin-top: -2px; margin-left: -4px; } -.v-ddwrapper-over-right:before { +.#{$name}-over-right:before { position: relative; margin-bottom: -4px; margin-right: -4px; @@ -136,26 +136,26 @@ background-position: 100% -6px; } -.no-horizontal-drag-hints .v-ddwrapper-over-left { +.no-horizontal-drag-hints .#{$name}-over-left { padding-left: 2px; border-left: none; } -.no-horizontal-drag-hints .v-ddwrapper-over-right { +.no-horizontal-drag-hints .#{$name}-over-right { padding-right: 2px; border-right: none; } -.no-vertical-drag-hints .v-ddwrapper-over-top { +.no-vertical-drag-hints .#{$name}-over-top { padding-top: 2px; border-top: none; } -.no-vertical-drag-hints .v-ddwrapper-over-bottom { +.no-vertical-drag-hints .#{$name}-over-bottom { padding-bottom: 2px; border-bottom: none; } -.no-horizontal-drag-hints .v-ddwrapper-over-left:before, -.no-horizontal-drag-hints .v-ddwrapper-over-right:before, -.no-vertical-drag-hints .v-ddwrapper-over-top:before, -.no-vertical-drag-hints .v-ddwrapper-over-bottom:after { +.no-horizontal-drag-hints .#{$name}-over-left:before, +.no-horizontal-drag-hints .#{$name}-over-right:before, +.no-vertical-drag-hints .#{$name}-over-top:before, +.no-vertical-drag-hints .#{$name}-over-bottom:after { display: none; } diff --git a/WebContent/VAADIN/themes/base/embedded/embedded.scss b/WebContent/VAADIN/themes/base/embedded/embedded.scss index 53faaef2e8..bd7403bda2 100644 --- a/WebContent/VAADIN/themes/base/embedded/embedded.scss +++ b/WebContent/VAADIN/themes/base/embedded/embedded.scss @@ -1,6 +1,6 @@ -@mixin base-embedded { +@mixin base-embedded($name : v-embedded) { -.v-table .v-embedded-image { +.v-table .#{$name}-image { /* make embeddeds be centered in centered table cells. */ display: inline-block; } diff --git a/WebContent/VAADIN/themes/base/formlayout/formlayout.scss b/WebContent/VAADIN/themes/base/formlayout/formlayout.scss index 258a8e3f15..6bfe112254 100644 --- a/WebContent/VAADIN/themes/base/formlayout/formlayout.scss +++ b/WebContent/VAADIN/themes/base/formlayout/formlayout.scss @@ -1,55 +1,55 @@ -@mixin base-formlayout { +@mixin base-formlayout($name : v-formlayout) { -.v-formlayout.v-has-width > table { +.#{$name}.v-has-width > table { width: 100%; } -.v-formlayout.v-has-height > table { +.#{$name}.v-has-height > table { height: 100%; } -.v-formlayout-cell .v-errorindicator { +.#{$name}-cell .v-errorindicator { display: block; } -.v-formlayout-error-indicator { +.#{$name}-error-indicator { /* fix width so layout is not jumpy when error disappears */ width: 12px; } -.v-formlayout-captioncell { +.#{$name}-captioncell { text-align:right; white-space: nowrap; } -.v-formlayout-errorcell, .v-formlayout-captioncell { +.#{$name}-errorcell, .#{$name}-captioncell { width: 1px; /* Don't use any extra space */ } -.v-formlayout-captioncell .v-caption { +.#{$name}-captioncell .v-caption { overflow: visible; } -.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-captioncell, -.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-contentcell, -.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-errorcell { +.#{$name}-spacing > tbody > .#{$name}-row > .#{$name}-captioncell, +.#{$name}-spacing > tbody > .#{$name}-row > .#{$name}-contentcell, +.#{$name}-spacing > tbody > .#{$name}-row > .#{$name}-errorcell { padding-top: 6px; } -.v-formlayout-spacing > tbody > .v-formlayout-firstrow > .v-formlayout-captioncell, -.v-formlayout-spacing > tbody > .v-formlayout-firstrow > .v-formlayout-contentcell, -.v-formlayout-spacing > tbody > .v-formlayout-firstrow > .v-formlayout-errorcell { +.#{$name}-spacing > tbody > .#{$name}-firstrow > .#{$name}-captioncell, +.#{$name}-spacing > tbody > .#{$name}-firstrow > .#{$name}-contentcell, +.#{$name}-spacing > tbody > .#{$name}-firstrow > .#{$name}-errorcell { padding-top: 0; } -.v-formlayout-margin-top > tbody > .v-formlayout-firstrow > .v-formlayout-captioncell, -.v-formlayout-margin-top > tbody > .v-formlayout-firstrow > .v-formlayout-contentcell, -.v-formlayout-margin-top > tbody > .v-formlayout-firstrow > .v-formlayout-errorcell { +.#{$name}-margin-top > tbody > .#{$name}-firstrow > .#{$name}-captioncell, +.#{$name}-margin-top > tbody > .#{$name}-firstrow > .#{$name}-contentcell, +.#{$name}-margin-top > tbody > .#{$name}-firstrow > .#{$name}-errorcell { padding-top: 12px; } -.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow > .v-formlayout-captioncell, -.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow > .v-formlayout-contentcell, -.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow > .v-formlayout-errorcell { +.#{$name}-margin-bottom > tbody > .#{$name}-lastrow > .#{$name}-captioncell, +.#{$name}-margin-bottom > tbody > .#{$name}-lastrow > .#{$name}-contentcell, +.#{$name}-margin-bottom > tbody > .#{$name}-lastrow > .#{$name}-errorcell { padding-bottom: 12px; } -.v-formlayout-margin-left > tbody > .v-formlayout-row > .v-formlayout-captioncell { +.#{$name}-margin-left > tbody > .#{$name}-row > .#{$name}-captioncell { padding-left: 12px; } -.v-formlayout-margin-right > tbody > .v-formlayout-row > .v-formlayout-contentcell { +.#{$name}-margin-right > tbody > .#{$name}-row > .#{$name}-contentcell { padding-right: 12px; } -.v-formlayout-captioncell .v-caption .v-required-field-indicator { +.#{$name}-captioncell .v-caption .v-required-field-indicator { float: none; } diff --git a/WebContent/VAADIN/themes/base/gridlayout/gridlayout.scss b/WebContent/VAADIN/themes/base/gridlayout/gridlayout.scss index 72f7437e6e..45b02316ae 100644 --- a/WebContent/VAADIN/themes/base/gridlayout/gridlayout.scss +++ b/WebContent/VAADIN/themes/base/gridlayout/gridlayout.scss @@ -1,34 +1,34 @@ -@mixin base-gridlayout { +@mixin base-gridlayout($name : v-gridlayout) { -.v-gridlayout { +.#{$name} { position: relative; } -.v-gridlayout-slot { +.#{$name}-slot { position: absolute; } -.v-gridlayout-margin-top { +.#{$name}-margin-top { padding-top: 12px; } -.v-gridlayout-margin-bottom { +.#{$name}-margin-bottom { padding-bottom: 12px; } -.v-gridlayout-margin-left { +.#{$name}-margin-left { padding-left: 12px; } -.v-gridlayout-margin-right { +.#{$name}-margin-right { padding-right: 12px; } -.v-gridlayout-spacing-on { +.#{$name}-spacing-on { padding-left: 6px; padding-top: 6px; overflow: hidden; } -.v-gridlayout-spacing, -.v-gridlayout-spacing-off { +.#{$name}-spacing, +.#{$name}-spacing-off { padding-left: 0; padding-top: 0; } -.v-gridlayout-spacing-off { +.#{$name}-spacing-off { overflow: hidden; } diff --git a/WebContent/VAADIN/themes/base/label/label.scss b/WebContent/VAADIN/themes/base/label/label.scss index ae1539acc9..6ccd0f3d27 100644 --- a/WebContent/VAADIN/themes/base/label/label.scss +++ b/WebContent/VAADIN/themes/base/label/label.scss @@ -1,10 +1,10 @@ -@mixin base-label { +@mixin base-label($name : v-label) { -.v-label { +.#{$name} { overflow: hidden; } -.v-label.v-has-width { +.#{$name}.v-has-width { white-space: normal; } diff --git a/WebContent/VAADIN/themes/base/link/link.scss b/WebContent/VAADIN/themes/base/link/link.scss index 710f95d832..455ab2cfd0 100644 --- a/WebContent/VAADIN/themes/base/link/link.scss +++ b/WebContent/VAADIN/themes/base/link/link.scss @@ -1,20 +1,20 @@ -@mixin base-link { +@mixin base-link($name : v-link) { -.v-link { +.#{$name} { white-space: nowrap; } -.v-link a { +.#{$name} a { vertical-align: middle; text-decoration: none; } -.v-link span { +.#{$name} span { text-decoration: underline; vertical-align: middle; } .v-disabled a { cursor: default; } -.v-link img { +.#{$name} img { vertical-align: middle; border:none; } diff --git a/WebContent/VAADIN/themes/base/loginform/loginform.scss b/WebContent/VAADIN/themes/base/loginform/loginform.scss index d2784fad47..d31af3b9e2 100644 --- a/WebContent/VAADIN/themes/base/loginform/loginform.scss +++ b/WebContent/VAADIN/themes/base/loginform/loginform.scss @@ -1,6 +1,6 @@ -@mixin base-loginform { +@mixin base-loginform($name : v-loginform) { -.v-loginform { +.#{$name} { height: 140px; width: 200px; } diff --git a/WebContent/VAADIN/themes/base/menubar/menubar.scss b/WebContent/VAADIN/themes/base/menubar/menubar.scss index 512a8ee1d5..f896e967b5 100644 --- a/WebContent/VAADIN/themes/base/menubar/menubar.scss +++ b/WebContent/VAADIN/themes/base/menubar/menubar.scss @@ -1,11 +1,11 @@ -@mixin base-menubar { +@mixin base-menubar($name : v-menubar) { -.v-menubar { +.#{$name} { display: inline-block; white-space: nowrap; overflow: hidden; } -.v-menubar .v-menubar-menuitem { +.#{$name} .#{$name}-menuitem { cursor: default; vertical-align: middle; white-space: nowrap; @@ -13,36 +13,36 @@ display: inline-block; zoom: 1; } -.v-menubar .v-menubar-menuitem-caption .v-icon { +.#{$name} .#{$name}-menuitem-caption .v-icon { vertical-align: middle; white-space: nowrap; } -.v-menubar-submenu { +.#{$name}-submenu { background: #fff; } -.v-menubar-menuitem-selected { +.#{$name}-menuitem-selected { background: #333; color: #fff; } -.v-menubar-submenu .v-menubar-menuitem { +.#{$name}-submenu .#{$name}-menuitem { cursor: default; display: block; position: relative; padding-right: 1.5em; } -.v-menubar-submenu .v-menubar-menuitem-caption { +.#{$name}-submenu .#{$name}-menuitem-caption { display: block; } -.v-menubar-submenu .v-menubar-menuitem *, -.v-menubar-submenu .v-menubar-menuitem-caption * { +.#{$name}-submenu .#{$name}-menuitem *, +.#{$name}-submenu .#{$name}-menuitem-caption * { white-space: nowrap; } -.v-menubar-submenu-indicator { +.#{$name}-submenu-indicator { display: none; /* Arial has the most coverage for geometric entity characters */ font-family: arial, helvetica, sans-serif; } -.v-menubar-submenu .v-menubar-submenu-indicator { +.#{$name}-submenu .#{$name}-submenu-indicator { display: block; position: absolute; right: 0; @@ -50,20 +50,20 @@ height: 1em; font-size: 0.9em; } -.v-menubar-menuitem-disabled, -.v-menubar span.v-menubar-menuitem-disabled:hover, -.v-menubar span.v-menubar-menuitem-disabled:focus, -.v-menubar span.v-menubar-menuitem-disabled:active { +.#{$name}-menuitem-disabled, +.#{$name} span.#{$name}-menuitem-disabled:hover, +.#{$name} span.#{$name}-menuitem-disabled:focus, +.#{$name} span.#{$name}-menuitem-disabled:active { color: #999; } -.v-menubar-more-menuitem { +.#{$name}-more-menuitem { /* Arial has the most coverage for geometric entity characters */ font-family: arial, helvetica, sans-serif; } -.v-menubar-separator { +.#{$name}-separator { overflow: hidden; } -.v-menubar-separator span { +.#{$name}-separator span { display: block; text-indent: -9999px; font-size: 1px; @@ -72,26 +72,26 @@ margin: 3px 0 2px; overflow: hidden; } -.v-menubar .v-icon, -.v-menubar-submenu .v-icon { +.#{$name} .v-icon, +.#{$name}-submenu .v-icon { margin-right: 3px; } -.v-menubar:focus, -.v-menubar-popup:focus, -.v-menubar-popup .popupContent:focus, -.v-menubar-popup .popupContent .v-menubar-submenu:focus{ +.#{$name}:focus, +.#{$name}-popup:focus, +.#{$name}-popup .popupContent:focus, +.#{$name}-popup .popupContent .#{$name}-submenu:focus{ outline: none; } /* Checkboxes for checkable/checked menu items */ /* Checked/unchecked requires combined style selected-(un)checked for IE6 */ -.v-menubar-submenu-check-column .v-menubar-menuitem { +.#{$name}-submenu-check-column .#{$name}-menuitem { padding-left: 6px; } -.v-menubar-submenu-check-column .v-menubar-menuitem-caption { +.#{$name}-submenu-check-column .#{$name}-menuitem-caption { padding-left: 18px; } -.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption { +.#{$name}-submenu .#{$name}-menuitem-checked .#{$name}-menuitem-caption { background: transparent url(img/check.gif) no-repeat left; } diff --git a/WebContent/VAADIN/themes/base/notification/notification.scss b/WebContent/VAADIN/themes/base/notification/notification.scss index e67ac14050..350db1a75f 100644 --- a/WebContent/VAADIN/themes/base/notification/notification.scss +++ b/WebContent/VAADIN/themes/base/notification/notification.scss @@ -1,6 +1,6 @@ -@mixin base-notification { +@mixin base-notification($name : v-Notification) { -.v-Notification { +.#{$name} { background: #999; color: #fff; cursor: pointer; @@ -9,33 +9,33 @@ max-width:85%; } -.v-Notification h1, -.v-Notification p, -.v-Notification-error h1, -.v-Notification-error p, -.v-Notification-warning h1, -.v-Notification-warning p { +.#{$name} h1, +.#{$name} p, +.#{$name}-error h1, +.#{$name}-error p, +.#{$name}-warning h1, +.#{$name}-warning p { display: inline; margin: 0 0.5em 0 0; } -.v-Notification-warning { +.#{$name}-warning { background: orange; } -.v-Notification-error { +.#{$name}-error { background: red; } -.v-Notification-tray h1 { +.#{$name}-tray h1 { display: block; } -.v-Notification-tray p { +.#{$name}-tray p { display: block; } -.v-Notification-system { +.#{$name}-system { background-color: red; opacity: .7; filter: alpha(opacity=70); } -.v-Notification-system h1 { +.#{$name}-system h1 { display: block; margin: 0; } diff --git a/WebContent/VAADIN/themes/base/panel/panel.scss b/WebContent/VAADIN/themes/base/panel/panel.scss index 202e75c226..46571f8bd5 100644 --- a/WebContent/VAADIN/themes/base/panel/panel.scss +++ b/WebContent/VAADIN/themes/base/panel/panel.scss @@ -1,48 +1,48 @@ -@mixin base-panel { +@mixin base-panel($name : v-panel) { -.v-panel, -.v-panel-caption, -.v-panel-content, -.v-panel-deco, -.v-panel-light, -.v-panel-caption-light, -.v-panel-content-light, -.v-panel-deco-light { +.#{$name}, +.#{$name}-caption, +.#{$name}-content, +.#{$name}-deco, +.#{$name}-light, +.#{$name}-caption-light, +.#{$name}-content-light, +.#{$name}-deco-light { outline: none; /* Prevent selection outline which might break layouts or cause scrollbars */ text-align: left; /* Force default alignment */ } -.v-panel-caption .v-errorindicator { +.#{$name}-caption .v-errorindicator { float: none; display: inline; } -.v-panel-caption .v-icon { +.#{$name}-caption .v-icon { display: inline; vertical-align: middle; } -.v-panel-caption span { +.#{$name}-caption span { vertical-align: middle; display: table-row; } -.v-panel-caption { +.#{$name}-caption { white-space: nowrap; overflow:hidden; font-weight: bold; } -.v-panel-nocaption { +.#{$name}-nocaption { overflow: hidden; } -.v-panel-content { +.#{$name}-content { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.v-panel.v-has-width > .v-panel-content { +.#{$name}.v-has-width > .#{$name}-content { width: 100%; } -.v-panel.v-has-height > .v-panel-content { +.#{$name}.v-has-height > .#{$name}-content { height: 100%; } -.v-panel-deco { +.#{$name}-deco { } }
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/popupview/popupview.scss b/WebContent/VAADIN/themes/base/popupview/popupview.scss index e192d0d147..b52f79db76 100644 --- a/WebContent/VAADIN/themes/base/popupview/popupview.scss +++ b/WebContent/VAADIN/themes/base/popupview/popupview.scss @@ -1,14 +1,14 @@ -@mixin base-popupview { +@mixin base-popupview($name : v-popupview) { -.v-popupview { +.#{$name} { cursor: pointer; text-decoration: underline; white-space: nowrap; } -.v-popupview-popup { +.#{$name}-popup { overflow: auto; } -.v-popupview-loading { +.#{$name}-loading { width: 30px; height: 30px; background: transparent url(../common/img/ajax-loader-medium.gif) no-repeat 50%; diff --git a/WebContent/VAADIN/themes/base/progressindicator/progressindicator.scss b/WebContent/VAADIN/themes/base/progressindicator/progressindicator.scss index 4c1483886b..7af1ba1f0e 100644 --- a/WebContent/VAADIN/themes/base/progressindicator/progressindicator.scss +++ b/WebContent/VAADIN/themes/base/progressindicator/progressindicator.scss @@ -1,17 +1,17 @@ -@mixin base-progressindicator { +@mixin base-progressindicator($name : v-progressindicator) { -.v-progressindicator { +.#{$name} { width: 150px; } -.v-progressindicator-wrapper { +.#{$name}-wrapper { height: 7px; border: 1px solid #ddd; } -.v-progressindicator-indicator { +.#{$name}-indicator { height: 7px; background: #ddd; } -div.v-progressindicator-indeterminate { +div.#{$name}-indeterminate { height: 20px; width: 20px; background: #fff url(../common/img/ajax-loader-medium.gif) no-repeat 50%; @@ -20,13 +20,13 @@ div.v-progressindicator-indeterminate { -moz-border-radius: 4px; } /* Hide obsolete elements in indeterminate mode */ -.v-progressindicator-indeterminate .v-progressindicator-wrapper, -.v-progressindicator-indeterminate .v-progressindicator-indicator, -.v-progressindicator-indeterminate-disabled .v-progressindicator-wrapper, -.v-progressindicator-indeterminate-disabled .v-progressindicator-indicator { +.#{$name}-indeterminate .#{$name}-wrapper, +.#{$name}-indeterminate .#{$name}-indicator, +.#{$name}-indeterminate-disabled .#{$name}-wrapper, +.#{$name}-indeterminate-disabled .#{$name}-indicator { display: none; } -div.v-progressindicator-indeterminate-disabled { +div.#{$name}-indeterminate-disabled { height: 20px; width: 20px; background: transparent; diff --git a/WebContent/VAADIN/themes/base/select/select.scss b/WebContent/VAADIN/themes/base/select/select.scss index d2d9e8a663..483f0e16b6 100644 --- a/WebContent/VAADIN/themes/base/select/select.scss +++ b/WebContent/VAADIN/themes/base/select/select.scss @@ -1,58 +1,58 @@ -@mixin base-select { +@mixin base-select($name : v-select) { -.v-select { +.#{$name} { text-align: left; } -.v-select-optiongroup .v-select-option { +.#{$name}-optiongroup .#{$name}-option { display: block; white-space: nowrap; } -.v-select-optiongroup .v-icon { +.#{$name}-optiongroup .v-icon { vertical-align: middle; white-space: nowrap; margin: 0 2px; } -.v-ie .v-select-optiongroup .v-select-option { +.v-ie .#{$name}-optiongroup .#{$name}-option { zoom: 1; } -.v-select-select { +.#{$name}-select { display: block; } -.v-select-twincol { +.#{$name}-twincol { white-space: nowrap; } -.v-select-twincol-options { +.#{$name}-twincol-options { float: left; } -.v-select-twincol-caption-left { +.#{$name}-twincol-caption-left { float: left; overflow: hidden; text-overflow: ellipsis; } -.v-select-twincol-selections { +.#{$name}-twincol-selections { font-weight: bold; } -.v-select-twincol-caption-right { +.#{$name}-twincol-caption-right { float: right; overflow: hidden; text-overflow: ellipsis; } -.v-select-twincol-buttons { +.#{$name}-twincol-buttons { float: left; text-align: center; } -.v-select-twincol-buttons .v-select-twincol-deco { +.#{$name}-twincol-buttons .#{$name}-twincol-deco { clear: both; } -.v-select-twincol .v-textfield { +.#{$name}-twincol .v-textfield { display: block; float: left; clear: left; } -.v-select-twincol .v-button { +.#{$name}-twincol .v-button { float: left; } -.v-select-twincol-buttons .v-button { +.#{$name}-twincol-buttons .v-button { float: none; } .v-filterselect { @@ -150,10 +150,10 @@ /* Error styles (disabled by default) .v-filterselect-error .v-filterselect-input, -.v-select-error .v-select-option, -.v-select-error .v-select-select, -.v-select-error .v-select-twincol-selections, -.v-select-error .v-select-twincol-options { +.#{$name}-error .#{$name}-option, +.#{$name}-error .#{$name}-select, +.#{$name}-error .#{$name}-twincol-selections, +.#{$name}-error .#{$name}-twincol-options { background: #ffaaaa; } */ @@ -161,10 +161,10 @@ /* Required field styles (disabled by default) .v-filterselect-error .v-filterselect-input, -.v-select-required .v-select-option, -.v-select-required .v-select-select, -.v-select-required .v-select-twincol-selections, -.v-select-required .v-select-twincol-options { +.#{$name}-required .#{$name}-option, +.#{$name}-required .#{$name}-select, +.#{$name}-required .#{$name}-twincol-selections, +.#{$name}-required .#{$name}-twincol-options { background: #ffaaaa; } */ diff --git a/WebContent/VAADIN/themes/base/shadow/shadow.scss b/WebContent/VAADIN/themes/base/shadow/shadow.scss index 4e1085aa5a..c0c94e7680 100644 --- a/WebContent/VAADIN/themes/base/shadow/shadow.scss +++ b/WebContent/VAADIN/themes/base/shadow/shadow.scss @@ -1,31 +1,31 @@ -@mixin base-shadow { +@mixin base-shadow($name : v-shadow) { -.v-shadow { +.#{$name} { position: absolute; } -.v-shadow .top-left { +.#{$name} .top-left { position: absolute; overflow: hidden; top: -3px; left: -5px; width: 10px; height: 10px; background: transparent url(img/top-left.png); } -.v-shadow .top { +.#{$name} .top { position: absolute; overflow: hidden; top: -3px; left: 5px; height: 10px; right: 5px; background: transparent url(img/top.png); } -.v-shadow .top-right { +.#{$name} .top-right { position: absolute; overflow: hidden; top: -3px; right: -5px; width: 10px; height: 10px; background: transparent url(img/top-right.png); } -.v-shadow .left { +.#{$name} .left { position: absolute; overflow: hidden; top: 7px; left: -5px; width: 10px; @@ -33,14 +33,14 @@ background: transparent url(img/left.png); } -.v-shadow .center { +.#{$name} .center { position: absolute; overflow: hidden; top: 7px; left: 5px; bottom: 3px; right: 5px; background: transparent url(img/center.png); } -.v-shadow .right { +.#{$name} .right { position: absolute; overflow: hidden; top: 7px; right: -5px; width: 10px; @@ -48,21 +48,21 @@ background: transparent url(img/right.png); } -.v-shadow .bottom-left { +.#{$name} .bottom-left { position: absolute; overflow: hidden; bottom: -7px; left: -5px; width: 10px; height: 10px; background: transparent url(img/bottom-left.png); } -.v-shadow .bottom { +.#{$name} .bottom { position: absolute; overflow: hidden; bottom: -7px; left: 5px; right: 5px; height: 10px; background: transparent url(img/bottom.png); } -.v-shadow .bottom-right { +.#{$name} .bottom-right { position: absolute; overflow: hidden; bottom: -7px; right: -5px; width: 10px; height: 10px; diff --git a/WebContent/VAADIN/themes/base/slider/slider.scss b/WebContent/VAADIN/themes/base/slider/slider.scss index 0c65bf1e73..bfb4c3b950 100644 --- a/WebContent/VAADIN/themes/base/slider/slider.scss +++ b/WebContent/VAADIN/themes/base/slider/slider.scss @@ -1,9 +1,9 @@ -@mixin base-slider { +@mixin base-slider($name : v-slider) { -.v-slider { +.#{$name} { margin: 5px 0; } -.v-slider-base { +.#{$name}-base { /* changing the borders will require adjustments to ISlider.java */ height: 2px; border-top: 1px solid #ddd; @@ -12,7 +12,7 @@ border-right: 1px solid #eee; } -.v-slider-handle { +.#{$name}-handle { background: #aaa; width: 12px; height: 12px; @@ -20,7 +20,7 @@ font-size: 0; } -.v-slider-vertical { +.#{$name}-vertical { width: 2px; height: auto; margin: 0 5px; @@ -28,19 +28,19 @@ border-left: 1px solid #cccfd0; border-right: 1px solid #cccfd0; } -.v-slider-vertical .v-slider-base { +.#{$name}-vertical .#{$name}-base { width: 2px; border-bottom: 1px solid #eee; border-right: none; } -.v-slider-vertical .v-slider-handle { +.#{$name}-vertical .#{$name}-handle { width: 12px; height: 12px; font-size: 0; margin-left: -5px; } -.v-slider-feedback { +.#{$name}-feedback { padding: 2px 5px; background: #444; color: #fff; @@ -56,12 +56,12 @@ } /* Disabled by default -.v-slider-error .v-slider-base { +.#{$name}-error .#{$name}-base { background: #FFE0E0; } */ /* Disabled by default -.v-slider-required .v-slider-base { +.#{$name}-required .#{$name}-base { background: #FFE0E0; } */ diff --git a/WebContent/VAADIN/themes/base/splitpanel/splitpanel.scss b/WebContent/VAADIN/themes/base/splitpanel/splitpanel.scss index b22ebe2569..11b4da48d8 100644 --- a/WebContent/VAADIN/themes/base/splitpanel/splitpanel.scss +++ b/WebContent/VAADIN/themes/base/splitpanel/splitpanel.scss @@ -1,13 +1,13 @@ -@mixin base-splitpanel { +@mixin base-splitpanel($name : v-splitpanel) { -.v-splitpanel-horizontal, -.v-splitpanel-vertical { +.#{$name}-horizontal, +.#{$name}-vertical { overflow: hidden; } -.v-splitpanel-hsplitter { +.#{$name}-hsplitter { width: 6px; } -.v-splitpanel-hsplitter div { +.#{$name}-hsplitter div { width: 6px; position: absolute; top: 0; @@ -16,19 +16,19 @@ cursor: e-resize; cursor: col-resize; } -.v-disabled .v-splitpanel-hsplitter div { +.v-disabled .#{$name}-hsplitter div { cursor: default; } -.v-splitpanel-vsplitter { +.#{$name}-vsplitter { height: 6px; } -.v-splitpanel-vsplitter div { +.#{$name}-vsplitter div { height: 6px; background: #ddd; cursor: s-resize; cursor: row-resize; } -.v-disabled .v-splitpanel-vsplitter div { +.v-disabled .#{$name}-vsplitter div { cursor: default; } diff --git a/WebContent/VAADIN/themes/base/styles.scss b/WebContent/VAADIN/themes/base/styles.scss index 7ca27280bc..40990f2c31 100644 --- a/WebContent/VAADIN/themes/base/styles.scss +++ b/WebContent/VAADIN/themes/base/styles.scss @@ -1,47 +1,2 @@ @import "base.scss"; - -// @include base-app; - -// everything included from base theme -// other themes should enclose corresponding definitions in theme selectors - -@include base-widget; - -@include base-absolutelayout; -@include base-accordion; -@include base-button; -@include base-caption; - -// here for now to preserve old semantics -@include base-common; - -@include base-layout; -@include base-csslayout; -@include base-customcomponent; -@include base-customlayout; -@include base-datefield; -@include base-dragwrapper; -@include base-embedded; -@include base-formlayout; -@include base-gridlayout; -@include base-label; -@include base-link; -@include base-loginform; -@include base-menubar; -@include base-notification; -@include base-orderedlayout; -@include base-panel; -@include base-popupview; -@include base-progressindicator; -@include base-select; -@include base-shadow; -@include base-slider; -@include base-splitpanel; -@include base-table; -@include base-tabsheet; -@include base-textfield; -@include base-richtextarea; -@include base-tree; -@include base-treetable; -@include base-upload; -@include base-window; +@include base; diff --git a/WebContent/VAADIN/themes/base/table/table.scss b/WebContent/VAADIN/themes/base/table/table.scss index fd3c0af0e1..552628bb61 100644 --- a/WebContent/VAADIN/themes/base/table/table.scss +++ b/WebContent/VAADIN/themes/base/table/table.scss @@ -1,4 +1,4 @@ -@mixin base-table { +@mixin base-table($name : v-table) { /* Table theme building instructions * @@ -8,82 +8,82 @@ * these instructions. * * Borders in table header and in table body need to be same width - * - specify vertical borders on .v-table-header-wrap and .v-table-body + * - specify vertical borders on .#{$name}-header-wrap and .#{$name}-body * * Table cells in body: - * - padding/border for cells is to be defined for td elements (class name: .v-table-cell-content) + * - padding/border for cells is to be defined for td elements (class name: .#{$name}-cell-content) * - in default theme there are no borders, but they should work. Just set border-right or border-bottom - * - no padding or border is allowed for div inside cells (class name: .v-table-cell-wrapper) element + * - no padding or border is allowed for div inside cells (class name: .#{$name}-cell-wrapper) element * - background is allowed for both elements * * Table headers: - * - table cells in header contain .v-table-resizer and - * .v-table-caption-container div elements, which are both floated to right - * - to align header caption to body content resizer width + .v-table-caption-container + * - table cells in header contain .#{$name}-resizer and + * .#{$name}-caption-container div elements, which are both floated to right + * - to align header caption to body content resizer width + .#{$name}-caption-container * padding right should be equal to content cells padding-right and border-right. * - Possible cell border in header must be themed into column resizer. * */ -.v-table { +.#{$name} { overflow: hidden; text-align: left; /* Force default alignment */ } -.v-table-header-wrap { +.#{$name}-header-wrap { overflow: hidden; border: 1px solid #aaa; border-bottom: none; background: #efefef; } -.v-table-header table, -.v-table-table { +.#{$name}-header table, +.#{$name}-table { border-spacing: 0; border-collapse: separate; margin: 0; padding: 0; border: 0; } -.v-table-header td { +.#{$name}-header td { padding: 0; } -.v-table-header-cell, -.v-table-header-cell-asc, -.v-table-header-cell-desc { +.#{$name}-header-cell, +.#{$name}-header-cell-asc, +.#{$name}-header-cell-desc { cursor: pointer; } -.v-table.v-disabled .v-table-header-cell, -.v-table.v-disabled .v-table-header-cell-asc, -.v-table.v-disabled .v-table-header-cell-desc { +.#{$name}.v-disabled .#{$name}-header-cell, +.#{$name}.v-disabled .#{$name}-header-cell-asc, +.#{$name}.v-disabled .#{$name}-header-cell-desc { cursor: default; } -.v-table-footer-wrap { +.#{$name}-footer-wrap { overflow: hidden; border: 1px solid #aaa; border-top: none; background: #efefef; } -.v-table-footer table { +.#{$name}-footer table { border-spacing: 0; border-collapse: collapse; margin: 0; padding: 0; border: 0; } -.v-table-footer td { +.#{$name}-footer td { padding: 0; border-right: 1px solid #aaa; } -.v-table-footer-cell { +.#{$name}-footer-cell { cursor: pointer; } -.v-table-footer-container { +.#{$name}-footer-container { float:right; padding-right:6px; overflow:hidden; white-space:nowrap; } -.v-table-resizer { +.#{$name}-resizer { display: block; height: 1.2em; float: right; @@ -93,53 +93,53 @@ width: 1px; overflow: hidden; } -.v-table.v-disabled .v-table-resizer { +.#{$name}.v-disabled .#{$name}-resizer { cursor: default; } -.v-table-caption-container { +.#{$name}-caption-container { overflow: hidden; white-space: nowrap; margin-left: 6px; } -.v-table-caption-container-align-right { +.#{$name}-caption-container-align-right { float: right; } -.v-table-sort-indicator { +.#{$name}-sort-indicator { width: 0px; height: 1.2em; float: right; } -.v-table-header-cell-asc .v-table-sort-indicator, -.v-table-header-cell-desc .v-table-sort-indicator { +.#{$name}-header-cell-asc .#{$name}-sort-indicator, +.#{$name}-header-cell-desc .#{$name}-sort-indicator { width: 16px; height: 1.2em; float: right; } -.v-table-header-cell-asc .v-table-sort-indicator { +.#{$name}-header-cell-asc .#{$name}-sort-indicator { background: transparent url(../common/img/sprites.png) no-repeat right 6px; } -.v-table-header-cell-desc .v-table-sort-indicator { +.#{$name}-header-cell-desc .#{$name}-sort-indicator { background: transparent url(../common/img/sprites.png) no-repeat right -10px; } -.v-table-caption-container-align-center { +.#{$name}-caption-container-align-center { text-align: center; } -.v-table-caption-container-align-right { +.#{$name}-caption-container-align-right { text-align: right; } -.v-table-caption-container .v-icon, -.v-table-header-drag .v-icon { +.#{$name}-caption-container .v-icon, +.#{$name}-header-drag .v-icon { vertical-align: middle; } -.v-table-body { +.#{$name}-body { border: 1px solid #aaa; } -.v-table-row-spacer { +.#{$name}-row-spacer { height: 10px; overflow: hidden; /* IE hack to allow < one line height divs */ } -.v-table-row, -.v-table-row-odd { +.#{$name}-row, +.#{$name}-row-odd { background: #fff; border: 0; margin: 0; @@ -147,36 +147,36 @@ cursor: pointer; } -.v-table-generated-row { +.#{$name}-generated-row { background: #efefef; } -.v-table-body-noselection .v-table-row, -.v-table-body-noselection .v-table-row-odd { +.#{$name}-body-noselection .#{$name}-row, +.#{$name}-body-noselection .#{$name}-row-odd { cursor: default; } -.v-table .v-selected { +.#{$name} .v-selected { background: #999; color: #fff; } -.v-table-cell-content { +.#{$name}-cell-content { white-space: nowrap; overflow: hidden; padding: 0 6px; border-right: 1px solid #aaa; } -.v-table-cell-wrapper { +.#{$name}-cell-wrapper { /* Do not specify any margins, paddings or borders here */ white-space: nowrap; overflow: hidden; } -.v-table-cell-wrapper-align-center { +.#{$name}-cell-wrapper-align-center { text-align: center; } -.v-table-cell-wrapper-align-right { +.#{$name}-cell-wrapper-align-right { text-align: right; } -.v-table-column-selector { +.#{$name}-column-selector { float: right; background: transparent url(../common/img/sprites.png) no-repeat 4px -37px; margin: -1.2em 0 0 0; @@ -185,10 +185,10 @@ position: relative; /* hide this from IE, it works without it */ cursor: pointer; } -.v-table.v-disabled .v-table-column-selector { +.#{$name}.v-disabled .#{$name}-column-selector { cursor: default; } -.v-table-focus-slot-left { +.#{$name}-focus-slot-left { border-left: 2px solid #999; float: none; margin-bottom: -1.2em; @@ -196,11 +196,11 @@ background: transparent; border-right: 1px solid #aaa; } -.v-table-focus-slot-right { +.#{$name}-focus-slot-right { border-right: 2px solid #999; margin-left: -2px; } -.v-table-header-drag { +.#{$name}-header-drag { position: absolute; background: #efefef; border: 1px solid #eee; @@ -209,30 +209,30 @@ margin-top: 20px; z-index: 30000; } -.v-table-header-drag .v-icon { +.#{$name}-header-drag .v-icon { vertical-align: middle; } -.v-table-scrollposition { +.#{$name}-scrollposition { width: 160px; background: #eee; border: 1px solid #aaa; } -.v-table-scrollposition span { +.#{$name}-scrollposition span { display: block; text-align: center; } -.v-table-body:focus, -.v-table-body-wrapper:focus { +.#{$name}-body:focus, +.#{$name}-body-wrapper:focus { outline: none; } -.v-table-body.focused { +.#{$name}-body.focused { border-color: #388ddd; } -.v-table-focus .v-table-cell-content { +.#{$name}-focus .#{$name}-cell-content { border-top: 1px dotted #0066bd; border-bottom: 1px dotted #0066bd; } -.v-table-focus .v-table-cell-wrapper { +.#{$name}-focus .#{$name}-cell-wrapper { margin-top: -1px; margin-bottom: -1px; } @@ -246,26 +246,26 @@ /************************************* * Drag'n'drop styles *************************************/ -.v-table-drag .v-table-body { +.#{$name}-drag .#{$name}-body { border-color: #1d9dff; } -.v-table-row-drag-middle .v-table-cell-content { +.#{$name}-row-drag-middle .#{$name}-cell-content { background-color: #bcdcff; } -.v-table-row-drag-top .v-table-cell-content { +.#{$name}-row-drag-top .#{$name}-cell-content { border-top: 2px solid #1d9dff; } -.v-table-row-drag-top .v-table-cell-wrapper { +.#{$name}-row-drag-top .#{$name}-cell-wrapper { margin-top: -2px; /* compensate the space consumed by border hint */ } -.v-table-row-drag-bottom .v-table-cell-content { +.#{$name}-row-drag-bottom .#{$name}-cell-content { border-bottom: 2px solid #1d9dff; } -.v-table-row-drag-bottom .v-table-cell-wrapper { +.#{$name}-row-drag-bottom .#{$name}-cell-wrapper { margin-bottom: -2px; /* compensate the space consumed by border hint */ } -.v-table-row-drag-top .v-table-cell-content:first-child:before, -.v-table-row-drag-bottom .v-table-cell-content:first-child:after { +.#{$name}-row-drag-top .#{$name}-cell-content:first-child:before, +.#{$name}-row-drag-bottom .#{$name}-cell-content:first-child:after { display: block; position: absolute; @@ -275,8 +275,8 @@ margin-left: -6px; background: transparent url(../common/img/drag-slot-dot.png); } -.v-ff .v-table-row-drag-bottom .v-table-cell-content:first-child:after, -.v-ie .v-table-row-drag-bottom .v-table-cell-content:first-child:after { +.v-ff .#{$name}-row-drag-bottom .#{$name}-cell-content:first-child:after, +.v-ie .#{$name}-row-drag-bottom .#{$name}-cell-content:first-child:after { margin-top: -2px; } diff --git a/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss b/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss index e8cd536024..a001605f27 100644 --- a/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss +++ b/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss @@ -1,12 +1,12 @@ -@mixin base-tabsheet { +@mixin base-tabsheet($name : v-tabsheet) { -.v-tabsheet, -.v-tabsheet-content, -.v-tabsheet-deco { +.#{$name}, +.#{$name}-content, +.#{$name}-deco { outline: none; /* Prevent selection outline which might break layouts or cause scrollbars */ text-align: left; /* Force default alignment */ } -.v-tabsheet-tabs { +.#{$name}-tabs { empty-cells: hide; border-collapse: collapse; margin: 0; @@ -15,55 +15,55 @@ width: 100%; overflow:hidden; } -.v-tabsheet-tabitemcell:focus { +.#{$name}-tabitemcell:focus { outline: none; } -.v-tabsheet-tabitemcell, -.v-tabsheet-spacertd { +.#{$name}-tabitemcell, +.#{$name}-spacertd { margin: 0; padding: 0; vertical-align: bottom; } -.v-tabsheet-spacertd { +.#{$name}-spacertd { width: 100%; } -.v-tabsheet-spacertd div { +.#{$name}-spacertd div { border-left: 1px solid #aaa; border-bottom: 1px solid #aaa; height: 1em; padding: 0.2em 0; } -.v-tabsheet-hidetabs > .v-tabsheet-tabcontainer { +.#{$name}-hidetabs > .#{$name}-tabcontainer { display: none; } -.v-tabsheet-scroller { +.#{$name}-scroller { white-space: nowrap; text-align: right; margin-top: -1em; } -.v-disabled .v-tabsheet-scroller { +.v-disabled .#{$name}-scroller { display: none; } -.v-tabsheet-scrollerPrev, -.v-tabsheet-scrollerNext, -.v-tabsheet-scrollerPrev-disabled, -.v-tabsheet-scrollerNext-disabled { +.#{$name}-scrollerPrev, +.#{$name}-scrollerNext, +.#{$name}-scrollerPrev-disabled, +.#{$name}-scrollerNext-disabled { border: 1px solid #aaa; background: #fff; width: 12px; height: 1em; cursor: pointer; } -.v-tabsheet-scrollerPrev-disabled, -.v-tabsheet-scrollerNext-disabled { +.#{$name}-scrollerPrev-disabled, +.#{$name}-scrollerNext-disabled { opacity: 0.5; cursor: default; } -.v-tabsheet-tabs .v-caption, -.v-tabsheet-tabs .v-caption span { +.#{$name}-tabs .v-caption, +.#{$name}-tabs .v-caption span { white-space: nowrap; } -.v-tabsheet-caption-close { +.#{$name}-caption-close { display: inline; display: inline-block; zoom: 1; @@ -79,49 +79,49 @@ -moz-user-select: none; -webkit-user-select: none; } -.v-tabsheet .v-disabled .v-tabsheet-caption-close { +.#{$name} .v-disabled .#{$name}-caption-close { cursor: default; visibility: hidden; } -.v-tabsheet-tabitem:hover .v-tabsheet-caption-close { +.#{$name}-tabitem:hover .#{$name}-caption-close { visibility: visible; } -.v-tabsheet-tabitem { +.#{$name}-tabitem { border: 1px solid #aaa; border-right: none; cursor: pointer; padding: 0.2em 0.5em; } -.v-tabsheet-tabitem .v-caption { +.#{$name}-tabitem .v-caption { cursor: inherit; } -.v-tabsheet.v-disabled .v-tabsheet-tabitem, -.v-tabsheet-tabitemcell-disabled .v-tabsheet-tabitem { +.#{$name}.v-disabled .#{$name}-tabitem, +.#{$name}-tabitemcell-disabled .#{$name}-tabitem { cursor: default; } -.v-tabsheet-tabitem-selected { +.#{$name}-tabitem-selected { cursor: default; border-bottom-color: #fff; } -.v-tabsheet-tabitem-selected .v-caption { +.#{$name}-tabitem-selected .v-caption { cursor: default; } -.v-tabsheet-content { +.#{$name}-content { border: 1px solid #aaa; /* Vertical borders are not supported, use v-tabsheet-tabcontainer and v-tabsheet-deco to present these borders */ border-top: none; border-bottom: none; position: relative; } -.v-tabsheet-deco { +.#{$name}-deco { height: 1px; background: #aaa; overflow: hidden; } -.v-tabsheet-hidetabs .v-tabsheet-content { +.#{$name}-hidetabs .#{$name}-content { border: none; } -.v-tabsheet-hidetabs .v-tabsheet-deco { +.#{$name}-hidetabs .#{$name}-deco { height: 0; } diff --git a/WebContent/VAADIN/themes/base/textfield/textfield.scss b/WebContent/VAADIN/themes/base/textfield/textfield.scss index dc6a4d9aa3..bb6765a60d 100644 --- a/WebContent/VAADIN/themes/base/textfield/textfield.scss +++ b/WebContent/VAADIN/themes/base/textfield/textfield.scss @@ -1,23 +1,23 @@ // textfield-normal.css -@mixin base-textfield { +@mixin base-textfield($name : v-textfield) { -.v-textfield { +.#{$name} { text-align: left; /* Force default alignment */ } .v-textarea { resize: none; white-space: pre-wrap; } -.v-textfield-focus, +.#{$name}-focus, .v-textarea-focus { } -input.v-textfield-prompt, +input.#{$name}-prompt, textarea.v-textarea-prompt { color: #999; font-style: italic; } -input.v-textfield-readonly, +input.#{$name}-readonly, textarea.v-textarea-readonly { background: transparent; border: none; @@ -27,20 +27,20 @@ input.v-disabled, textarea.v-disabled { resize: none; } -input.v-textfield-readonly:focus, +input.#{$name}-readonly:focus, textarea.v-textarea-readonly:focus { outline: none; } /* Disabled by default .v-textarea-error, -.v-textfield-error, +.#{$name}-error, .v-richtextarea-error iframe.gwt-RichTextArea { background: #FFE0E0; } */ /* Disabled by default .v-textarea-required, -.v-textfield-required, +.#{$name}-required, .v-richtextarea-required iframe.gwt-RichTextArea { background: #FFE0E0; } diff --git a/WebContent/VAADIN/themes/base/tree/tree.scss b/WebContent/VAADIN/themes/base/tree/tree.scss index 2e34053ad5..2eb2c5908b 100644 --- a/WebContent/VAADIN/themes/base/tree/tree.scss +++ b/WebContent/VAADIN/themes/base/tree/tree.scss @@ -1,62 +1,62 @@ -@mixin base-tree { +@mixin base-tree($name : v-tree) { // tree-default.css -.v-tree { +.#{$name} { text-align: left; /* Force default alignment */ overflow: hidden; padding: 1px 0; outline: none; } -.v-tree-node { +.#{$name}-node { background: transparent url(../common/img/sprites.png) no-repeat 5px -37px; padding: 1px 0; } -.v-tree-node-caption:focus { +.#{$name}-node-caption:focus { outline: none; } -div.v-tree-node-leaf { +div.#{$name}-node-leaf { background: transparent; } -.v-tree-node-expanded { +.#{$name}-node-expanded { background: transparent url(../common/img/sprites.png) no-repeat -5px -10px; } -.v-tree-node-caption { +.#{$name}-node-caption { margin-left: 1em; } -.v-tree-node span { +.#{$name}-node span { cursor: pointer; } -.v-tree-node-caption div { +.#{$name}-node-caption div { white-space: nowrap; } -.v-tree-node-caption span, -.v-tree-node-caption .v-icon { +.#{$name}-node-caption span, +.#{$name}-node-caption .v-icon { vertical-align: middle; } -.v-tree-node-selected span { +.#{$name}-node-selected span { background: #999; color: #fff; } -.v-tree-node-children { +.#{$name}-node-children { padding-left: 1em; } // Drag'n'drop styles -.v-tree .v-tree-node-drag-top { +.#{$name} .#{$name}-node-drag-top { border-top: 2px solid #1d9dff; margin-top: -1px; padding-top: 0; } -.v-tree .v-tree-node-drag-bottom { +.#{$name} .#{$name}-node-drag-bottom { border-bottom: 2px solid #1d9dff; margin-bottom: -1px; padding-bottom: 0; } -.v-tree .v-tree-node-drag-top:before, -.v-tree .v-tree-node-drag-bottom:after, -.v-tree .v-tree-node-caption-drag-center:after { +.#{$name} .#{$name}-node-drag-top:before, +.#{$name} .#{$name}-node-drag-bottom:after, +.#{$name} .#{$name}-node-caption-drag-center:after { display: block; position: absolute; @@ -65,23 +65,23 @@ div.v-tree-node-leaf { margin-top: -4px; background: transparent url(../common/img/drag-slot-dot.png); } -.v-tree .v-tree-node-drag-bottom:after { +.#{$name} .#{$name}-node-drag-bottom:after { margin-top: -2px; } -.v-tree .v-tree-node-caption-drag-center:after { +.#{$name} .#{$name}-node-caption-drag-center:after { margin-left: 14px; } -.v-ff .v-tree .v-tree-node-caption-drag-center:after, -.v-ie .v-tree .v-tree-node-caption-drag-center:after { +.v-ff .#{$name} .#{$name}-node-caption-drag-center:after, +.v-ie .#{$name} .#{$name}-node-caption-drag-center:after { margin-top: -2px; } -.v-tree .v-tree-node-drag-top { +.#{$name} .#{$name}-node-drag-top { background-position: 5px -38px; } -.v-tree .v-tree-node-drag-top.v-tree-node-expanded { +.#{$name} .#{$name}-node-drag-top.#{$name}-node-expanded { background-position: -5px -11px; } -.v-tree .v-tree-node-caption-drag-center div { +.#{$name} .#{$name}-node-caption-drag-center div { border: 2px solid #1d9dff; -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -89,51 +89,51 @@ div.v-tree-node-leaf { margin: -2px 2px -2px -2px; background-color: #bcdcff; } -.v-tree .v-tree-node-caption-drag-center div { +.#{$name} .#{$name}-node-caption-drag-center div { background-color: rgba(169,209,255,.6); } -.v-tree .v-tree-node-caption-drag-center div, -.v-tree .v-tree-node-drag-top, -.v-tree .v-tree-node-drag-bottom { +.#{$name} .#{$name}-node-caption-drag-center div, +.#{$name} .#{$name}-node-drag-top, +.#{$name} .#{$name}-node-drag-bottom { border-color: rgba(0,109,232,.6); } // tree-connectors.css -.v-tree-connectors { +.#{$name}-connectors { // Make item caption height an even number (so that the connector dots overlap nicely) - .v-tree-node-caption { + .#{$name}-node-caption { padding-top: 1px; } - .v-tree-node { + .#{$name}-node { background: transparent url(img/connector-expand.png) no-repeat 2px -52px; } - .v-tree-node-expanded { + .#{$name}-node-expanded { background: transparent url(img/connector-collapse.png) no-repeat 2px -52px; } - .v-tree-node-last { + .#{$name}-node-last { background: transparent url(img/connector-expand-last.png) no-repeat 2px -52px; } - .v-tree-node-expanded.v-tree-node-last { + .#{$name}-node-expanded.#{$name}-node-last { background: transparent url(img/connector-collapse-last.png) no-repeat 2px -52px; } - .v-tree-node-leaf { + .#{$name}-node-leaf { background: transparent url(img/connector-leaf.png) repeat-y 2px 50%; } - .v-tree-node-leaf-last { + .#{$name}-node-leaf-last { background: transparent url(img/connector-leaf-last.png) repeat-y 2px 50%; } - .v-tree-node-children { + .#{$name}-node-children { background: transparent url(img/connector.png) repeat-y 2px 0; } - .v-tree-node-children-last { + .#{$name}-node-children-last { background: transparent; } - .v-tree-node-drag-top, - .v-tree-node-expanded.v-tree-node-drag-top { + .#{$name}-node-drag-top, + .#{$name}-node-expanded.#{$name}-node-drag-top { background-position: 2px -53px; } - .v-tree-node-drag-top.v-tree-node-leaf { + .#{$name}-node-drag-top.#{$name}-node-leaf { background-position: 2px 50%; } } diff --git a/WebContent/VAADIN/themes/base/treetable/treetable.scss b/WebContent/VAADIN/themes/base/treetable/treetable.scss index 30e6b9ccbd..dfb4628794 100644 --- a/WebContent/VAADIN/themes/base/treetable/treetable.scss +++ b/WebContent/VAADIN/themes/base/treetable/treetable.scss @@ -1,6 +1,6 @@ -@mixin base-treetable { +@mixin base-treetable($name : v-treetable) { -.v-treetable-treespacer { +.#{$name}-treespacer { display: inline-block; background: transparent; height: 10px; @@ -11,58 +11,58 @@ top: 5px; } -.v-treetable-node-closed { +.#{$name}-node-closed { background: url(../treetable/img/arrow-right.png) right top no-repeat; } -.v-treetable-node-open { +.#{$name}-node-open { background: url(../treetable/img/arrow-down.png) right top no-repeat; } -.v-treetable .v-checkbox { +.#{$name} .v-checkbox { display: inline-block; padding-bottom: 4px; } -.v-treetable .v-table-row .v-table-cell-content, -.v-treetable .v-table-row-odd .v-table-cell-content { +.#{$name} .v-table-row .v-table-cell-content, +.#{$name} .v-table-row-odd .v-table-cell-content { position: relative; z-index: 10; } -.v-treetable .v-table-cell-wrapper { +.#{$name} .v-table-cell-wrapper { position: relative; } -.v-treetable .v-table-body .v-table-table .v-table-row-animating { +.#{$name} .v-table-body .v-table-table .v-table-row-animating { zoom:1; z-index:1; } -.v-treetable .v-table-body .v-table-table .v-table-row-animating, -.v-treetable .v-table-body .v-table-table .v-table-row-animating .v-table-cell-content { +.#{$name} .v-table-body .v-table-table .v-table-row-animating, +.#{$name} .v-table-body .v-table-table .v-table-row-animating .v-table-cell-content { background:transparent; } -.v-treetable-animation-clone { +.#{$name}-animation-clone { border-spacing: 0; zoom:1; } -div.v-treetable-animation-clone-wrapper { +div.#{$name}-animation-clone-wrapper { position: absolute; z-index: 2; background-color:#fff; } -div.v-treetable-animation-clone-wrapper table.v-treetable-animation-clone { +div.#{$name}-animation-clone-wrapper table.#{$name}-animation-clone { background-color:#fff; } -div table.v-treetable-animation-clone tr.v-table-row, -div table.v-treetable-animation-clone tr.v-table-row-odd, -div table.v-treetable-animation-clone tr.v-table-row td.v-table-cell-content, -div table.v-treetable-animation-clone tr.v-table-row-odd td.v-table-cell-content { +div table.#{$name}-animation-clone tr.v-table-row, +div table.#{$name}-animation-clone tr.v-table-row-odd, +div table.#{$name}-animation-clone tr.v-table-row td.v-table-cell-content, +div table.#{$name}-animation-clone tr.v-table-row-odd td.v-table-cell-content { visibility: visible; } diff --git a/WebContent/VAADIN/themes/base/upload/upload.scss b/WebContent/VAADIN/themes/base/upload/upload.scss index e5d94ce678..a992f95f06 100644 --- a/WebContent/VAADIN/themes/base/upload/upload.scss +++ b/WebContent/VAADIN/themes/base/upload/upload.scss @@ -1,22 +1,22 @@ -@mixin base-upload { +@mixin base-upload($name : v-upload) { -.v-upload { +.#{$name} { white-space: nowrap; } -.v-upload-immediate { +.#{$name}-immediate { position: relative; margin: 0; overflow: hidden; } -.v-ff .v-upload-immediate, -.v-op .v-upload-immediate { +.v-ff .#{$name}-immediate, +.v-op .#{$name}-immediate { display: inline-block; } -.v-upload-immediate input { +.#{$name}-immediate input { opacity: 0; filter: alpha(opacity=0); z-index: 2; @@ -28,7 +28,7 @@ background: transparent; } -.v-upload-immediate button { +.#{$name}-immediate button { position: relative; left: 0; top: 0; diff --git a/WebContent/VAADIN/themes/base/widget/widget.scss b/WebContent/VAADIN/themes/base/widget/widget.scss index 215c276142..a632e20d09 100644 --- a/WebContent/VAADIN/themes/base/widget/widget.scss +++ b/WebContent/VAADIN/themes/base/widget/widget.scss @@ -1,6 +1,6 @@ -@mixin base-widget { +@mixin base-widget($name : v-widget) { -.v-widget { +.#{$name} { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; diff --git a/WebContent/VAADIN/themes/base/window/window.scss b/WebContent/VAADIN/themes/base/window/window.scss index 33e54b046f..486906ea6d 100644 --- a/WebContent/VAADIN/themes/base/window/window.scss +++ b/WebContent/VAADIN/themes/base/window/window.scss @@ -1,29 +1,29 @@ -@mixin base-window { +@mixin base-window($name : v-window) { -.v-window { +.#{$name} { background: #fff; } -.v-window-contents { +.#{$name}-contents { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.v-window.v-has-width > div.popupContent, -.v-window.v-has-width .v-window-wrap, -.v-window.v-has-width .v-window-contents, -.v-window.v-has-width .v-window-contents > div { +.#{$name}.v-has-width > div.popupContent, +.#{$name}.v-has-width .#{$name}-wrap, +.#{$name}.v-has-width .#{$name}-contents, +.#{$name}.v-has-width .#{$name}-contents > div { width: 100%; } -.v-window.v-has-height > div.popupContent, -.v-window.v-has-height .v-window-wrap, -.v-window.v-has-height .v-window-contents, -.v-window.v-has-height .v-window-contents > div { +.#{$name}.v-has-height > div.popupContent, +.#{$name}.v-has-height .#{$name}-wrap, +.#{$name}.v-has-height .#{$name}-contents, +.#{$name}.v-has-height .#{$name}-contents > div { height: 100%; } -.v-window-outerheader { +.#{$name}-outerheader { padding: 0.3em 1em; height: 1.6em; position: relative; @@ -32,35 +32,35 @@ box-sizing: border-box; } -.v-window-outerheader, -.v-window-draggingCurtain { +.#{$name}-outerheader, +.#{$name}-draggingCurtain { cursor: move; } -.v-window-header { +.#{$name}-header { font-weight: bold; } /* A more specific selector to make sure padding isn't so easily overridden */ -div.v-window-header { +div.#{$name}-header { white-space: nowrap; text-overflow: ellipsis; -ms-text-overflow: ellipsis; overflow: hidden; padding: 0; } -.v-window-header .v-icon { +.#{$name}-header .v-icon { vertical-align: middle; /* This has to be 'middle', not 'bottom', to allow larger icons than 16px */ } -.v-window-contents > div { +.#{$name}-contents > div { outline: none; } -.v-window-footer { +.#{$name}-footer { overflow: hidden; zoom: 1; height: 10px; position: relative; cursor: move; } -.v-window-resizebox { +.#{$name}-resizebox { width: 10px; height: 10px; background: #ddd; @@ -69,19 +69,19 @@ div.v-window-header { right: 0; } -.v-window-resizebox, -.v-window-resizingCurtain { +.#{$name}-resizebox, +.#{$name}-resizingCurtain { cursor: se-resize; } -.v-window div.v-window-footer-noresize { +.#{$name} div.#{$name}-footer-noresize { height: 0; } -.v-window-resizebox-disabled { +.#{$name}-resizebox-disabled { cursor: default; display: none; } -.v-window-closebox { +.#{$name}-closebox { position: absolute; top: 0; right: 0; @@ -91,7 +91,7 @@ div.v-window-header { cursor: pointer; overflow: hidden; } -.v-window-modalitycurtain { +.#{$name}-modalitycurtain { top: 0; left: 0; background: #999; diff --git a/WebContent/VAADIN/themes/chameleon/chameleon.scss b/WebContent/VAADIN/themes/chameleon/chameleon.scss index 16f95bbbb4..8a24a73cbf 100644 --- a/WebContent/VAADIN/themes/chameleon/chameleon.scss +++ b/WebContent/VAADIN/themes/chameleon/chameleon.scss @@ -1,10 +1,14 @@ -// this file just defines all chameleon mixins by importing them - -// common (mostly application or page level) parts of the theme - +@import "../base/base.scss"; @import "common/common.scss"; - -// components - can override or replace in user themes - @import "components/components.scss"; @import "compound/compound.scss"; + +@mixin chameleon { + // TODO move this? + @include base; + // TODO each + @include chameleon-app; + @include chameleon-common; + @include chameleon-components; + @include chameleon-compound; +} diff --git a/WebContent/VAADIN/themes/chameleon/styles.scss b/WebContent/VAADIN/themes/chameleon/styles.scss index ee905c17e9..de7e306e20 100644 --- a/WebContent/VAADIN/themes/chameleon/styles.scss +++ b/WebContent/VAADIN/themes/chameleon/styles.scss @@ -1,10 +1,3 @@ -@import "../base/styles.scss"; @import "chameleon.scss"; -@include chameleon-app; - -// .v-theme-chameleon { -@include chameleon-common; -@include chameleon-components; -@include chameleon-compound; -// } +@include chameleon; diff --git a/WebContent/VAADIN/themes/liferay/liferay.scss b/WebContent/VAADIN/themes/liferay/liferay.scss index 68e9efbfe2..7ec561ffc9 100644 --- a/WebContent/VAADIN/themes/liferay/liferay.scss +++ b/WebContent/VAADIN/themes/liferay/liferay.scss @@ -1,6 +1,4 @@ -// this file just defines all reindeer mixins by importing them - -// common between others for now for backwards compatibility +@import "../base/base.scss"; @import "accordion/accordion.scss"; @import "button/button.scss"; @@ -23,3 +21,29 @@ @import "textfield/textfield.scss"; @import "tree/tree.scss"; @import "window/window.scss"; + +@mixin liferay { + // TODO move? + @include base; + // TODO @each + @include liferay-accordion; + @include liferay-button; + + @include liferay-common; + @include liferay-contextmenu; + @include liferay-datefield; + @include liferay-formlayout; + @include liferay-menubar; + @include liferay-notification; + @include liferay-panel; + @include liferay-popupview; + @include liferay-progressindicator; + @include liferay-select; + @include liferay-slider; + @include liferay-splitpanel; + @include liferay-table; + @include liferay-tabsheet; + @include liferay-textfield; + @include liferay-tree; + @include liferay-window; +} diff --git a/WebContent/VAADIN/themes/liferay/styles.scss b/WebContent/VAADIN/themes/liferay/styles.scss index 78fbd62c25..030602a8b6 100644 --- a/WebContent/VAADIN/themes/liferay/styles.scss +++ b/WebContent/VAADIN/themes/liferay/styles.scss @@ -1,28 +1,3 @@ -// this file actually attaches all liferay mixins to a parent style - -@import "../base/styles.scss"; @import "liferay.scss"; -// .v-theme-liferay { - @include liferay-accordion; - @include liferay-button; - - @include liferay-common; - - @include liferay-contextmenu; - @include liferay-datefield; - @include liferay-formlayout; - @include liferay-menubar; - @include liferay-notification; - @include liferay-panel; - @include liferay-popupview; - @include liferay-progressindicator; - @include liferay-select; - @include liferay-slider; - @include liferay-splitpanel; - @include liferay-table; - @include liferay-tabsheet; - @include liferay-textfield; - @include liferay-tree; - @include liferay-window; -// } +@include liferay; diff --git a/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss b/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss index c0778e68dc..5d9b4a660f 100644 --- a/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss +++ b/WebContent/VAADIN/themes/reindeer/accordion/accordion.scss @@ -1,16 +1,16 @@ -@mixin reindeer-accordion { +@mixin reindeer-accordion($name : v-accordion) { -.v-accordion { +.#{$name} { border: 1px solid #bebebe; border-radius: 2px; -webkit-border-radius: 2px; -moz-border-radius: 2px; overflow: hidden; } -.v-accordion-item { +.#{$name}-item { background-color: #fff; } -.v-accordion-item-caption { +.#{$name}-item-caption { height: 19px; background: #e4e4e4 repeat-x; background-image: url(../tabsheet/img/tabbar-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ @@ -20,31 +20,31 @@ text-shadow: #fff 0 1px 0; } -.v-accordion-item-caption .v-captiontext{ +.#{$name}-item-caption .v-captiontext{ vertical-align:baseline; } -.v-accordion-item-first .v-accordion-item-caption { +.#{$name}-item-first .#{$name}-item-caption { border-top: none; } -.v-accordion-item-caption .v-caption { +.#{$name}-item-caption .v-caption { padding: 3px 0 5px 10px; } -.v-ie .v-accordion-item-caption .v-caption { +.v-ie .#{$name}-item-caption .v-caption { padding: 2px 0 6px 10px; } -.v-accordion-item-open .v-accordion-item-caption { +.#{$name}-item-open .#{$name}-item-caption { background-image: url(../tabsheet/img/tabbar-bg-sel.png); /** sprite-ref: verticals; sprite-alignment: repeat */ border-bottom: 1px solid #bbb; } -.v-accordion-item-caption .v-icon { +.#{$name}-item-caption .v-icon { margin-top: -1px; } -.v-ie .v-accordion-item-caption .v-icon { +.v-ie .#{$name}-item-caption .v-icon { vertical-align: top; } /* Borderless style */ -.v-accordion-borderless { +.#{$name}-borderless { border: none; border-radius: 0; -webkit-border-radius: 0; diff --git a/WebContent/VAADIN/themes/reindeer/button/button-ie.scss b/WebContent/VAADIN/themes/reindeer/button/button-ie.scss index 5bf38c4442..db39bf5677 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button-ie.scss +++ b/WebContent/VAADIN/themes/reindeer/button/button-ie.scss @@ -1,6 +1,6 @@ -@mixin reindeer-button-ie { +@mixin reindeer-button-ie($name : v-nativebutton) { -.v-ie8 .v-nativebutton-link { +.v-ie8 .#{$name}-link { padding: 0; text-align: left; } diff --git a/WebContent/VAADIN/themes/reindeer/button/button-link-style.scss b/WebContent/VAADIN/themes/reindeer/button/button-link-style.scss index aebda24cd4..0d2060ddc6 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button-link-style.scss +++ b/WebContent/VAADIN/themes/reindeer/button/button-link-style.scss @@ -1,15 +1,15 @@ -@mixin reindeer-button-link-style { +@mixin reindeer-button-link-style($name : v-button) { -.v-button.v-button-link, -.v-button.v-button-link:focus, -.v-button.v-button-link:active, -.v-button-link.v-pressed, -.v-disabled.v-button.v-button-link, -.v-button.v-button-link .v-button-wrap, -.v-button.v-button-link:focus .v-button-wrap, -.v-button.v-button-link:active .v-button-wrap, -.v-button-link.v-pressed .v-button-wrap, -.v-disabled.v-button.v-button-link .v-button-wrap { +.#{$name}.#{$name}-link, +.#{$name}.#{$name}-link:focus, +.#{$name}.#{$name}-link:active, +.#{$name}-link.v-pressed, +.v-disabled.#{$name}.#{$name}-link, +.#{$name}.#{$name}-link .#{$name}-wrap, +.#{$name}.#{$name}-link:focus .#{$name}-wrap, +.#{$name}.#{$name}-link:active .#{$name}-wrap, +.#{$name}-link.v-pressed .#{$name}-wrap, +.v-disabled.#{$name}.#{$name}-link .#{$name}-wrap { background: transparent; height: auto; padding: 0; @@ -17,13 +17,12 @@ line-height: inherit; } -.v-button.v-button-link.v-disabled, -.v-button.v-button-link.v-disabled .v-button-wrap { +.#{$name}.#{$name}-link.v-disabled, +.#{$name}.#{$name}-link.v-disabled .#{$name}-wrap { cursor: default; } -.v-button-link .v-button-caption, -.v-nativebutton-link .v-nativebutton-caption { +.#{$name}-link .#{$name}-caption { line-height: inherit; font-weight: normal; color: #1b699f; @@ -31,8 +30,7 @@ text-shadow: none; } -.v-button-link:focus .v-button-caption, -.v-nativebutton-link:focus .v-nativebutton-caption { +.#{$name}-link:focus .#{$name}-caption { outline: 1px dotted #1b699f; } diff --git a/WebContent/VAADIN/themes/reindeer/button/button-primary-style.scss b/WebContent/VAADIN/themes/reindeer/button/button-primary-style.scss index ffb4d250d3..f4cd726412 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button-primary-style.scss +++ b/WebContent/VAADIN/themes/reindeer/button/button-primary-style.scss @@ -1,30 +1,30 @@ -@mixin reindeer-button-primary-style { +@mixin reindeer-button-primary-style($name : v-button) { -.v-button-primary:focus { +.#{$name}-primary:focus { background-image: url(img/primary-left-focus.png); /** sprite-ref: buttons */ } -.v-button-primary:focus .v-button-wrap { +.#{$name}-primary:focus .#{$name}-wrap { background-image: url(img/primary-right-focus.png); /** sprite-ref: buttons; sprite-alignment: right */ } -.v-button-primary:active, -.v-button-primary.v-pressed { +.#{$name}-primary:active, +.#{$name}-primary.v-pressed { background-image: url(img/primary-left-pressed.png); /** sprite-ref: buttons */ } -.v-button-primary:active .v-button-wrap, -.v-button-primary.v-pressed .v-button-wrap { +.#{$name}-primary:active .#{$name}-wrap, +.#{$name}-primary.v-pressed .#{$name}-wrap { background-image: url(img/primary-right-pressed.png); /** sprite-ref: buttons; sprite-alignment: right */ } -.v-button-primary, -.v-disabled.v-button-primary { +.#{$name}-primary, +.v-disabled.#{$name}-primary { background-image: url(img/primary-left.png); /** sprite-ref: buttons */ } -.v-button-primary .v-button-wrap, -.v-disabled.v-button-primary .v-button-wrap { +.#{$name}-primary .#{$name}-wrap, +.v-disabled.#{$name}-primary .#{$name}-wrap { background-image: url(img/primary-right.png); /** sprite-ref: buttons; sprite-alignment: right */ } @@ -34,32 +34,32 @@ /* Black style */ -.black .v-button-primary:focus { +.black .#{$name}-primary:focus { background-image: url(img/black/primary-left-focus.png); /** sprite-ref: black-buttons */ } -.black .v-button-primary:focus .v-button-wrap { +.black .#{$name}-primary:focus .#{$name}-wrap { background-image: url(img/black/primary-right-focus.png); /** sprite-ref: black-buttons; sprite-alignment: right */ color: #eaf4fb; } -.black .v-button-primary:active, -.black .v-button-primary.v-pressed { +.black .#{$name}-primary:active, +.black .#{$name}-primary.v-pressed { background-image: url(img/black/primary-left-pressed.png); /** sprite-ref: black-buttons */ } -.black .v-button-primary:active .v-button-wrap, -.black .v-button-primary.v-pressed .v-button-wrap { +.black .#{$name}-primary:active .#{$name}-wrap, +.black .#{$name}-primary.v-pressed .#{$name}-wrap { background-image: url(img/black/primary-right-pressed.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } -.black .v-button-primary, -.black .v-disabled.v-button-primary { +.black .#{$name}-primary, +.black .v-disabled.#{$name}-primary { background-image: url(img/black/primary-left.png); /** sprite-ref: black-buttons */ } -.black .v-button-primary .v-button-wrap, -.black .v-disabled.v-button-primary .v-button-wrap { +.black .#{$name}-primary .#{$name}-wrap, +.black .v-disabled.#{$name}-primary .#{$name}-wrap { background-image: url(img/black/primary-right.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } diff --git a/WebContent/VAADIN/themes/reindeer/button/button-small-style.scss b/WebContent/VAADIN/themes/reindeer/button/button-small-style.scss index 0ec33e330c..b141156ac8 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button-small-style.scss +++ b/WebContent/VAADIN/themes/reindeer/button/button-small-style.scss @@ -1,37 +1,37 @@ -@mixin reindeer-button-small-style { +@mixin reindeer-button-small-style($name : v-button) { -.v-button-small:focus { +.#{$name}-small:focus { background-image: url(img/small-left-focus.png); /** sprite-ref: buttons */ } -.v-button-small:focus .v-button-wrap { +.#{$name}-small:focus .#{$name}-wrap { background-image: url(img/small-right-focus.png); /** sprite-ref: buttons; sprite-alignment: right */ } -.v-button-small:active, -.v-button-small.v-pressed { +.#{$name}-small:active, +.#{$name}-small.v-pressed { background-image: url(img/small-left-pressed.png); /** sprite-ref: buttons */ } -.v-button-small:active .v-button-wrap, -.v-button-small.v-pressed .v-button-wrap { +.#{$name}-small:active .#{$name}-wrap, +.#{$name}-small.v-pressed .#{$name}-wrap { background-image: url(img/small-right-pressed.png); /** sprite-ref: buttons; sprite-alignment: right */ } -.v-button-small, -.v-disabled.v-button-small { +.#{$name}-small, +.v-disabled.#{$name}-small { background-image: url(img/small-left.png); /** sprite-ref: buttons */ height: 20px; } -.v-button-small .v-button-wrap, -.v-disabled.v-button-small .v-button-wrap { +.#{$name}-small .#{$name}-wrap, +.v-disabled.#{$name}-small .#{$name}-wrap { background-image: url(img/small-right.png); /** sprite-ref: buttons; sprite-alignment: right */ height: 19px; padding: 1px 14px 0 8px; } -.v-button-small .v-button-caption { +.#{$name}-small .#{$name}-caption { font-weight: normal; } @@ -40,31 +40,31 @@ /* Black style */ -.black .v-button-small:focus { +.black .#{$name}-small:focus { background-image: url(img/black/small-left-focus.png); /** sprite-ref: black-buttons */ } -.black .v-button-small:focus .v-button-wrap { +.black .#{$name}-small:focus .#{$name}-wrap { background-image: url(img/black/small-right-focus.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } -.black .v-button-small:active, -.black .v-button-small.v-pressed { +.black .#{$name}-small:active, +.black .#{$name}-small.v-pressed { background-image: url(img/black/small-left-pressed.png); /** sprite-ref: black-buttons */ } -.black .v-button-small:active .v-button-wrap, -.black .v-button-small.v-pressed .v-button-wrap { +.black .#{$name}-small:active .#{$name}-wrap, +.black .#{$name}-small.v-pressed .#{$name}-wrap { background-image: url(img/black/small-right-pressed.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } -.black .v-button-small, -.black .v-disabled.v-button-small { +.black .#{$name}-small, +.black .v-disabled.#{$name}-small { background-image: url(img/black/small-left.png); /** sprite-ref: black-buttons */ } -.black .v-button-small .v-button-wrap, -.black .v-disabled.v-button-small .v-button-wrap { +.black .#{$name}-small .#{$name}-wrap, +.black .v-disabled.#{$name}-small .#{$name}-wrap { background-image: url(img/black/small-right.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } diff --git a/WebContent/VAADIN/themes/reindeer/button/button-standard.scss b/WebContent/VAADIN/themes/reindeer/button/button-standard.scss index 4df09bc1bd..f950060d4a 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button-standard.scss +++ b/WebContent/VAADIN/themes/reindeer/button/button-standard.scss @@ -1,29 +1,29 @@ -@mixin reindeer-button-standard { +@mixin reindeer-button-standard($name : v-button) { -.v-button:focus { +.#{$name}:focus { background-image: url(img/left-focus.png); /** sprite-ref: buttons */ outline: none; } -.v-button:focus .v-button-wrap { +.#{$name}:focus .#{$name}-wrap { background-image: url(img/right-focus.png); /** sprite-ref: buttons; sprite-alignment: right */ outline: none; } -.v-button:active, -.v-button.v-pressed { +.#{$name}:active, +.#{$name}.v-pressed { background-image: url(img/left-pressed.png); /** sprite-ref: buttons */ outline: none; } -.v-button:active .v-button-wrap, -.v-button.v-pressed .v-button-wrap { +.#{$name}:active .#{$name}-wrap, +.#{$name}.v-pressed .#{$name}-wrap { background-image: url(img/right-pressed.png); /** sprite-ref: buttons; sprite-alignment: right */ outline: none; } -.v-button, -.v-disabled.v-button { +.#{$name}, +.v-disabled.#{$name} { height: 26px; padding: 0 0 0 6px; background-color: transparent; @@ -33,8 +33,8 @@ cursor: default; } -.v-button-wrap, -.v-disabled.v-button .v-button-wrap { +.#{$name}-wrap, +.v-disabled.#{$name} .#{$name}-wrap { display: block; height: 22px; padding: 4px 15px 0 9px; @@ -44,7 +44,7 @@ background-image: url(img/right.png); /** sprite-ref: buttons; sprite-alignment: right */ } -.v-button-caption { +.#{$name}-caption { color: #222; text-shadow: #fff 0 1px 0; font-weight: bold; @@ -58,35 +58,35 @@ /************************** * Black style **************************/ -.black .v-button:focus { +.black .#{$name}:focus { background-image: url(img/black/left-focus.png); /** sprite-ref: black-buttons */ } -.black .v-button:focus .v-button-wrap { +.black .#{$name}:focus .#{$name}-wrap { background-image: url(img/black/right-focus.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } -.black .v-button:active, -.black .v-button.v-pressed { +.black .#{$name}:active, +.black .#{$name}.v-pressed { background-image: url(img/black/left-pressed.png); /** sprite-ref: black-buttons */ } -.black .v-button:active .v-button-wrap, -.black .v-button.v-pressed .v-button-wrap { +.black .#{$name}:active .#{$name}-wrap, +.black .#{$name}.v-pressed .#{$name}-wrap { background-image: url(img/black/right-pressed.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } -.black .v-button, -.black .v-disabled.v-button { +.black .#{$name}, +.black .v-disabled.#{$name} { background-image: url(img/black/left.png); /** sprite-ref: black-buttons */ } -.black .v-button-wrap, -.black .v-disabled.v-button .v-button-wrap { +.black .#{$name}-wrap, +.black .v-disabled.#{$name} .#{$name}-wrap { background-image: url(img/black/right.png); /** sprite-ref: black-buttons; sprite-alignment: right */ } -.black .v-button-caption { +.black .#{$name}-caption { color: #c9ccce; text-shadow: #121314 0 -1px 0; } diff --git a/WebContent/VAADIN/themes/reindeer/button/button.scss b/WebContent/VAADIN/themes/reindeer/button/button.scss index 34a4efda04..7b61d1b213 100644 --- a/WebContent/VAADIN/themes/reindeer/button/button.scss +++ b/WebContent/VAADIN/themes/reindeer/button/button.scss @@ -6,17 +6,10 @@ @import "button-small-style.scss"; @import "button-link-style.scss"; -/* Browser-specific corrections to the standard implementation */ -@import "button-ie.scss"; - -@mixin reindeer-button { - +@mixin reindeer-button($name : v-button) { + // TODO use $exclude @include reindeer-button-standard; @include reindeer-button-primary-style; @include reindeer-button-small-style; @include reindeer-button-link-style; - - /* Browser-specific corrections to the standard implementation */ - @include reindeer-button-ie; - } diff --git a/WebContent/VAADIN/themes/reindeer/button/nativebutton.scss b/WebContent/VAADIN/themes/reindeer/button/nativebutton.scss new file mode 100644 index 0000000000..bd6ca35627 --- /dev/null +++ b/WebContent/VAADIN/themes/reindeer/button/nativebutton.scss @@ -0,0 +1,25 @@ +/* Browser-specific corrections to the standard implementation */ +@import "button-ie.scss"; + +@mixin reindeer-nativebutton-link($name : v-nativebutton) { + +.#{$name}-link .#{$name}-caption { + line-height: inherit; + font-weight: normal; + color: #1b699f; + font-size: 12px; + text-shadow: none; + } + +.#{$name}-link:focus .#{$name}-caption { + outline: 1px dotted #1b699f; + } + +} + +@mixin reindeer-nativebutton($name : v-nativebutton) { + @include reindeer-nativebutton-link($name); + + /* Browser-specific corrections to the standard implementation */ + @include reindeer-button-ie($name); +}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/reindeer/datefield/datefield.scss b/WebContent/VAADIN/themes/reindeer/datefield/datefield.scss index 17b9d42cdb..c890f259ad 100644 --- a/WebContent/VAADIN/themes/reindeer/datefield/datefield.scss +++ b/WebContent/VAADIN/themes/reindeer/datefield/datefield.scss @@ -1,30 +1,30 @@ -@mixin reindeer-datefield { +@mixin reindeer-datefield($name : v-datefield) { -.v-datefield { +.#{$name} { overflow: hidden; } input.v-textfield-readonly:focus{ background-color: transparent; } -.v-datefield-calendarpanel { +.#{$name}-calendarpanel { border-collapse: collapse; margin: 0; padding: 0; height: auto !important; } -.v-datefield-year .v-datefield-calendarpanel-prevmonth, -.v-datefield-year .v-datefield-calendarpanel-nextmonth { +.#{$name}-year .#{$name}-calendarpanel-prevmonth, +.#{$name}-year .#{$name}-calendarpanel-nextmonth { display: none; } -.v-datefield-calendarpanel td { +.#{$name}-calendarpanel td { vertical-align: top; } -td.v-datefield-calendarpanel-month { +td.#{$name}-calendarpanel-month { height: 23px; background-repeat: repeat-x; background-image: url(img/header-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -span.v-datefield-calendarpanel-month { +span.#{$name}-calendarpanel-month { display: block; text-align: center; height: 16px; @@ -35,36 +35,36 @@ span.v-datefield-calendarpanel-month { overflow: hidden; margin-top: 1px; } -.v-datefield-year .v-datefield-calendarpanel-month { +.#{$name}-year .#{$name}-calendarpanel-month { width: 35px; } -.v-datefield-month .v-datefield-calendarpanel-month, -.v-datefield-day .v-datefield-calendarpanel-month, -.v-datefield-full .v-datefield-calendarpanel-month { +.#{$name}-month .#{$name}-calendarpanel-month, +.#{$name}-day .#{$name}-calendarpanel-month, +.#{$name}-full .#{$name}-calendarpanel-month { width: 124px; } -.v-datefield-month, -.v-datefield-day, -.v-datefield-full { +.#{$name}-month, +.#{$name}-day, +.#{$name}-full { min-width: 240px; } -.v-datefield-popupcalendar { +.#{$name}-popupcalendar { min-width: 0; padding-right: 24px; } -.v-datefield-year .v-datefield-calendarpanel { +.#{$name}-year .#{$name}-calendarpanel { width: 100px; } -td.v-datefield-calendarpanel-prevyear { +td.#{$name}-calendarpanel-prevyear { text-align: right; } -td.v-datefield-calendarpanel-nextyear { +td.#{$name}-calendarpanel-nextyear { text-align: left; } -.v-datefield-calendarpanel-prevyear button, -.v-datefield-calendarpanel-nextyear button, -.v-datefield-calendarpanel-prevmonth button, -.v-datefield-calendarpanel-nextmonth button { +.#{$name}-calendarpanel-prevyear button, +.#{$name}-calendarpanel-nextyear button, +.#{$name}-calendarpanel-prevmonth button, +.#{$name}-calendarpanel-nextmonth button { width: 24px; height: 23px; border: none; @@ -79,33 +79,33 @@ td.v-datefield-calendarpanel-nextyear { -moz-border-radius: 0; border-radius: 0; } -.v-ie .v-datefield-calendarpanel-prevyear button, -.v-ie .v-datefield-calendarpanel-nextyear button, -.v-ie .v-datefield-calendarpanel-prevmonth button, -.v-ie .v-datefield-calendarpanel-nextmonth button { +.v-ie .#{$name}-calendarpanel-prevyear button, +.v-ie .#{$name}-calendarpanel-nextyear button, +.v-ie .#{$name}-calendarpanel-prevmonth button, +.v-ie .#{$name}-calendarpanel-nextmonth button { text-indent: 0; font-size: 1px; } -.v-datefield-calendarpanel-nextyear button { +.#{$name}-calendarpanel-nextyear button { background-position: left top; background-image: url(img/year-next.png); /** sprite-ref: verticals */ } -.v-datefield-calendarpanel-prevyear button:active, -.v-ie .v-datefield-calendarpanel-prevyear button.v-pressed { +.#{$name}-calendarpanel-prevyear button:active, +.v-ie .#{$name}-calendarpanel-prevyear button.v-pressed { background-image: url(img/year-prev-pressed.png); /** sprite-ref: verticals */ } -.v-datefield-calendarpanel-nextyear button:active, -.v-ie .v-datefield-calendarpanel-nextyear button.v-pressed { +.#{$name}-calendarpanel-nextyear button:active, +.v-ie .#{$name}-calendarpanel-nextyear button.v-pressed { background-image: url(img/year-next-pressed.png); /** sprite-ref: verticals */ } -.v-datefield-calendarpanel-prevmonth, -.v-datefield-calendarpanel-nextmonth { +.#{$name}-calendarpanel-prevmonth, +.#{$name}-calendarpanel-nextmonth { width: 24px; background-repeat: repeat-x; background-image: url(img/header-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-datefield-calendarpanel-prevmonth button, -.v-datefield-calendarpanel-nextmonth button { +.#{$name}-calendarpanel-prevmonth button, +.#{$name}-calendarpanel-nextmonth button { width: 100%; height: 21px; border-left: 1px solid #efefef; @@ -116,36 +116,36 @@ td.v-datefield-calendarpanel-nextyear { min-width: 24px; margin-top: 1px; } -.v-ie .v-datefield-calendarpanel-prevmonth button, -.v-ie .v-datefield-calendarpanel-nextmonth button { +.v-ie .#{$name}-calendarpanel-prevmonth button, +.v-ie .#{$name}-calendarpanel-nextmonth button { border: none; } -.v-datefield-calendarpanel-nextmonth button { +.#{$name}-calendarpanel-nextmonth button { background-image: url(img/month-next.png); /** sprite-ref: verticals; sprite-alignment: center */ } -.v-datefield-calendarpanel-prevmonth button:active, -.v-ie .v-datefield-calendarpanel-prevmonth button.v-pressed { +.#{$name}-calendarpanel-prevmonth button:active, +.v-ie .#{$name}-calendarpanel-prevmonth button.v-pressed { background-position: center top; background-image: url(img/month-prev-pressed.png); /** sprite-ref: verticals; sprite-alignment: center */ } -.v-datefield-calendarpanel-nextmonth button:active, -.v-ie .v-datefield-calendarpanel-nextmonth button.v-pressed { +.#{$name}-calendarpanel-nextmonth button:active, +.v-ie .#{$name}-calendarpanel-nextmonth button.v-pressed { background-position: center top; background-image: url(img/month-next-pressed.png); /** sprite-ref: verticals; sprite-alignment: center */ } -.v-datefield-calendarpanel-body, -.v-datefield-calendarpanel-time { +.#{$name}-calendarpanel-body, +.#{$name}-calendarpanel-time { text-align: center; vertical-align: top; } -.v-datefield-calendarpanel-body table { +.#{$name}-calendarpanel-body table { border-collapse: collapse; margin: 0; padding: 0; width: 220px; margin: 0 auto; } -.v-datefield-calendarpanel-weekdays td { +.#{$name}-calendarpanel-weekdays td { width: 14.2%; overflow: hidden; background-repeat: repeat-x; @@ -157,57 +157,57 @@ td.v-datefield-calendarpanel-nextyear { text-shadow: #3b4651 0 -1px 0; vertical-align: top; } -.v-datefield-calendarpanel-weeknumbers td { +.#{$name}-calendarpanel-weeknumbers td { width: 12.4%; } -.v-datefield-calendarpanel-weekdays strong { +.#{$name}-calendarpanel-weekdays strong { display: block; text-align: right; padding: 1px 5px 0 0; height: 14px; border-top: 1px solid #596775; } -.v-datefield-calendarpanel-weekdays .v-first { +.#{$name}-calendarpanel-weekdays .v-first { background-repeat: no-repeat; background-image: url(img/weekday-first.png); /** sprite-ref: verticals; sprite-margin-bottom: 3px */ } -.v-datefield-calendarpanel-weekdays .v-last { +.#{$name}-calendarpanel-weekdays .v-last { background-repeat: no-repeat; background-position: right top; background-image: url(img/weekday-last.png); /** sprite-ref: verticals; sprite-alignment: right; sprite-margin-bottom: 3px */ } /* IE fails to position backgrounds inside table element */ -.v-ie .v-datefield-calendarpanel-weekdays td { +.v-ie .#{$name}-calendarpanel-weekdays td { background: url(img/weekday-bg.png) repeat-x; background-position: left top; } -.v-ie .v-datefield-calendarpanel .v-first { +.v-ie .#{$name}-calendarpanel .v-first { background: url(img/weekday-first.png) no-repeat; } -.v-ie .v-datefield-calendarpanel .v-last { +.v-ie .#{$name}-calendarpanel .v-last { background: url(img/weekday-last.png) no-repeat right top; } -.v-datefield-calendarpanel-body td { +.#{$name}-calendarpanel-body td { text-align: right; height: 19px; } -.v-datefield-calendarpanel-day, -.v-datefield-calendarpanel-weeknumber, -.v-datefield-calendarpanel-day-today { +.#{$name}-calendarpanel-day, +.#{$name}-calendarpanel-weeknumber, +.#{$name}-calendarpanel-day-today { padding: 2px 5px 2px 0; display: block; margin: 1px 0 0 5px; } -.v-datefield-calendarpanel-weeknumber { +.#{$name}-calendarpanel-weeknumber { margin: 0; padding-top: 4px; padding-bottom: 3px; } -.v-datefield-calendarpanel-day-today { +.#{$name}-calendarpanel-day-today { color: #4095d1; border: none; } -.v-datefield-calendarpanel-day-selected { +.#{$name}-calendarpanel-day-selected { background: #507ba3; color: #fff; text-shadow: #3b5b79 0 1px 0; @@ -215,37 +215,37 @@ td.v-datefield-calendarpanel-nextyear { -webkit-border-radius: 2px; -moz-border-radius: 2px; } -.v-datefield-calendarpanel-time select { +.#{$name}-calendarpanel-time select { padding: 0; font-size: 11px; } -.v-datefield-popup { +.#{$name}-popup { background: #f8f8f9; padding: 8px 4px; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; } -.v-sa .v-datefield-popup, -.v-op .v-datefield-popup { +.v-sa .#{$name}-popup, +.v-op .#{$name}-popup { background: rgba(255,255,255,.95); } -.v-has-width > input.v-datefield-textfield { +.v-has-width > input.#{$name}-textfield { width: 100%; } -.v-datefield-year > .v-datefield-textfield { +.#{$name}-year > .#{$name}-textfield { width: 4.5em; } -.v-datefield-month > .v-datefield-textfield { +.#{$name}-month > .#{$name}-textfield { width: 5.5em; } -.v-datefield-day > .v-datefield-textfield { +.#{$name}-day > .#{$name}-textfield { width: 6em; } -.v-datefield-full >.v-datefield-textfield { +.#{$name}-full >.#{$name}-textfield { width: 12.5em; } -.v-datefield-popupcalendar input.v-datefield-textfield { +.#{$name}-popupcalendar input.#{$name}-textfield { border-right-width: 0; -moz-border-radius-topright: 0; -moz-border-radius-bottomright: 0; @@ -256,17 +256,17 @@ td.v-datefield-calendarpanel-nextyear { -moz-box-sizing: border-box; box-sizing: border-box; } -.v-datefield.v-readonly input.v-datefield-textfield { +.#{$name}.v-readonly input.#{$name}-textfield { border-right-width: 1px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } -.v-datefield-prompt .v-datefield-textfield { +.#{$name}-prompt .#{$name}-textfield { color: #999; font-style: normal; } -.v-datefield-popupcalendar .v-datefield-button { +.#{$name}-popupcalendar .#{$name}-button { width: 24px; margin-right: -24px; height: 23px; @@ -279,15 +279,15 @@ td.v-datefield-calendarpanel-nextyear { -moz-border-radius: 0; border-radius: 0; } -.v-datefield-popupcalendar .v-datefield-button:active { +.#{$name}-popupcalendar .#{$name}-button:active { background-image: url(img/popup-btn-pressed.png); /** sprite-ref: verticals */ } /* over black background */ -.black .v-datefield-popupcalendar .v-datefield-button { +.black .#{$name}-popupcalendar .#{$name}-button { background-image: url(img/popup-btn-black.png); /** sprite-ref: black-verticals */ } -.black .v-datefield-popupcalendar .v-datefield-button:active { +.black .#{$name}-popupcalendar .#{$name}-button:active { background-image: url(img/popup-btn-black-pressed.png); /** sprite-ref: black-verticals */ } @@ -296,11 +296,11 @@ td.v-datefield-calendarpanel-nextyear { * on black background */ -.black td.v-datefield-calendarpanel-month { +.black td.#{$name}-calendarpanel-month { background-image: url(img/header-bg-black.png); /** sprite-ref: black-verticals; sprite-alignment: repeat */ height: 21px; } -.black span.v-datefield-calendarpanel-month { +.black span.#{$name}-calendarpanel-month { border-left: 1px solid #333638; border-right: 1px solid #232527; color: #c9ccce; @@ -308,65 +308,65 @@ td.v-datefield-calendarpanel-nextyear { padding: 4px 10px 1px 10px; margin-top: 0; } -.black .v-datefield-calendarpanel-prevyear button, -.black .v-datefield-calendarpanel-nextyear button, -.black .v-datefield-calendarpanel-prevmonth button, -.black .v-datefield-calendarpanel-nextmonth button { +.black .#{$name}-calendarpanel-prevyear button, +.black .#{$name}-calendarpanel-nextyear button, +.black .#{$name}-calendarpanel-prevmonth button, +.black .#{$name}-calendarpanel-nextmonth button { background-image: url(img/year-prev-black.png); /** sprite-ref: black-verticals */ height: 21px; } -.black .v-datefield-calendarpanel-nextyear button { +.black .#{$name}-calendarpanel-nextyear button { background-image: url(img/year-next-black.png); /** sprite-ref: black-verticals */ } -.black .v-datefield-calendarpanel-prevyear button:active, -.v-ie .black .v-datefield-calendarpanel-prevyear button.v-pressed { +.black .#{$name}-calendarpanel-prevyear button:active, +.v-ie .black .#{$name}-calendarpanel-prevyear button.v-pressed { background-image: url(img/year-prev-black-pressed.png); /** sprite-ref: black-verticals */ } -.black .v-datefield-calendarpanel-nextyear button:active, -.v-ie .black .v-datefield-calendarpanel-nextyear button.v-pressed { +.black .#{$name}-calendarpanel-nextyear button:active, +.v-ie .black .#{$name}-calendarpanel-nextyear button.v-pressed { background-image: url(img/year-next-black-pressed.png); /** sprite-ref: black-verticals */ } -.black .v-datefield-calendarpanel-prevmonth, -.black .v-datefield-calendarpanel-nextmonth { +.black .#{$name}-calendarpanel-prevmonth, +.black .#{$name}-calendarpanel-nextmonth { background-image: url(img/header-bg-black.png); /** sprite-ref: black-verticals; sprite-alignment: repeat */ } -.black .v-datefield-calendarpanel-prevmonth button, -.black .v-datefield-calendarpanel-nextmonth button { +.black .#{$name}-calendarpanel-prevmonth button, +.black .#{$name}-calendarpanel-nextmonth button { border-left: 1px solid #333638; border-right: 1px solid #232527; background-image: url(img/month-prev-black.png); /** sprite-ref: black-verticals; sprite-alignment: center */ margin-top: 0; } -.black .v-datefield-calendarpanel-nextmonth button { +.black .#{$name}-calendarpanel-nextmonth button { background-image: url(img/month-next-black.png); /** sprite-ref: black-verticals; sprite-alignment: center */ } -.black .v-datefield-calendarpanel-prevmonth button:active, -.v-ie .black .v-datefield-calendarpanel-prevmonth button.v-pressed { +.black .#{$name}-calendarpanel-prevmonth button:active, +.v-ie .black .#{$name}-calendarpanel-prevmonth button.v-pressed { background-image: url(img/month-prev-black-pressed.png); /** sprite-ref: black-verticals; sprite-alignment: center */ } -.black .v-datefield-calendarpanel-nextmonth button:active, -.v-ie .black .v-datefield-calendarpanel-nextmonth button.v-pressed { +.black .#{$name}-calendarpanel-nextmonth button:active, +.v-ie .black .#{$name}-calendarpanel-nextmonth button.v-pressed { background-image: url(img/month-next-black-pressed.png); /** sprite-ref: black-verticals; sprite-alignment: center */ } -.v-ie .black .v-datefield-calendarpanel-prevmonth button, -.v-ie .black .v-datefield-calendarpanel-nextmonth button { +.v-ie .black .#{$name}-calendarpanel-prevmonth button, +.v-ie .black .#{$name}-calendarpanel-nextmonth button { border: none; } -.black .v-datefield-calendarpanel-weekdays td { +.black .#{$name}-calendarpanel-weekdays td { background-image: url(img/weekday-bg-black.png); /** sprite-ref: black-verticals; sprite-alignment: repeat; sprite-margin-bottom: 3px */ color: #0a0b0b; text-shadow: #5a5c5e 0 1px 0; } -.black .v-datefield-calendarpanel-weekdays strong { +.black .#{$name}-calendarpanel-weekdays strong { border-top-color: #1b1c1d; } -.black .v-datefield-calendarpanel .v-first { +.black .#{$name}-calendarpanel .v-first { background-image: url(img/weekday-first-black.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 3px */ } -.black .v-datefield-calendarpanel .v-last { +.black .#{$name}-calendarpanel .v-last { background-image: url(img/weekday-last-black.png); /** sprite-ref: black-verticals; sprite-alignment: right */ } -.black .v-datefield-prompt .v-datefield-textfield { +.black .#{$name}-prompt .#{$name}-textfield { color: #5f6366; } diff --git a/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.scss b/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.scss index e73340fd3b..cecc439b09 100644 --- a/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.scss +++ b/WebContent/VAADIN/themes/reindeer/formlayout/formlayout.scss @@ -1,36 +1,36 @@ -@mixin reindeer-formlayout { +@mixin reindeer-formlayout($name : v-formlayout) { -.v-formlayout-errorcell { +.#{$name}-errorcell { width: 13px; } -.v-formlayout-cell .v-errorindicator { +.#{$name}-cell .v-errorindicator { width: 13px; height: 16px; background: transparent url(../common/icons/error.png) no-repeat 50%; } -.v-formlayout-captioncell { +.#{$name}-captioncell { text-align: right; white-space: nowrap; } -.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-captioncell, -.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-contentcell, -.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-errorcell { +.#{$name}-spacing > tbody > .#{$name}-row > .#{$name}-captioncell, +.#{$name}-spacing > tbody > .#{$name}-row > .#{$name}-contentcell, +.#{$name}-spacing > tbody > .#{$name}-row > .#{$name}-errorcell { padding-top: 8px; } -.v-formlayout-margin-top > tbody > .v-formlayout-firstrow > .v-formlayout-captioncell, -.v-formlayout-margin-top > tbody > .v-formlayout-firstrow > .v-formlayout-contentcell, -.v-formlayout-margin-top > tbody > .v-formlayout-firstrow > .v-formlayout-errorcell { +.#{$name}-margin-top > tbody > .#{$name}-firstrow > .#{$name}-captioncell, +.#{$name}-margin-top > tbody > .#{$name}-firstrow > .#{$name}-contentcell, +.#{$name}-margin-top > tbody > .#{$name}-firstrow > .#{$name}-errorcell { padding-top: 15px; } -.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow > .v-formlayout-captioncell, -.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow > .v-formlayout-contentcell, -.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow > .v-formlayout-errorcell { +.#{$name}-margin-bottom > tbody > .#{$name}-lastrow > .#{$name}-captioncell, +.#{$name}-margin-bottom > tbody > .#{$name}-lastrow > .#{$name}-contentcell, +.#{$name}-margin-bottom > tbody > .#{$name}-lastrow > .#{$name}-errorcell { padding-bottom: 15px; } -.v-formlayout-margin-left > tbody > .v-formlayout-row > .v-formlayout-captioncell { +.#{$name}-margin-left > tbody > .#{$name}-row > .#{$name}-captioncell { padding-left: 18px; } -.v-formlayout-margin-right > tbody > .v-formlayout-row > .v-formlayout-contentcell { +.#{$name}-margin-right > tbody > .#{$name}-row > .#{$name}-contentcell { padding-right: 18px; } /* form */ diff --git a/WebContent/VAADIN/themes/reindeer/label/label.scss b/WebContent/VAADIN/themes/reindeer/label/label.scss index a8418718e0..24337e2ff5 100644 --- a/WebContent/VAADIN/themes/reindeer/label/label.scss +++ b/WebContent/VAADIN/themes/reindeer/label/label.scss @@ -1,6 +1,6 @@ -@mixin reindeer-label { +@mixin reindeer-label($name : v-label) { -.v-label { +.#{$name} { line-height: 18px; } @@ -12,27 +12,27 @@ color: #C9CCCE; text-shadow: 0 0 1px #000; } -.black .v-label-h1, -.black .v-label-h2, +.black .#{$name}-h1, +.black .#{$name}-h2, .black .v-caption-h1, .black .v-caption-h2, -.white .black .v-label-h1, -.white .black .v-label-h2, +.white .black .#{$name}-h1, +.white .black .#{$name}-h2, .white .black .v-caption-h1, .white .black .v-caption-h2, -.blue .black .v-label-h1, -.blue .black .v-label-h2, +.blue .black .#{$name}-h1, +.blue .black .#{$name}-h2, .blue .black .v-caption-h1, .blue .black .v-caption-h2 { color: #fff; text-shadow: rgba(0,0,0,.8) 0 2px 2px; } -.black .v-label-light, -.white .black .v-label-light { +.black .#{$name}-light, +.white .black .#{$name}-light { color: #72787c; } -.black .v-label hr, -.white .black .v-label hr { +.black .#{$name} hr, +.white .black .#{$name} hr { background: #0c0d0e; color: #0c0d0e; border-bottom-color: #292b2e; @@ -48,23 +48,23 @@ color: #222; text-shadow: none; } -.blue .v-label-h1, -.blue .v-label-h2, +.blue .#{$name}-h1, +.blue .#{$name}-h2, .blue .v-caption-h1, .blue .v-caption-h2, -.white .blue .v-label-h1, -.white .blue .v-label-h2, +.white .blue .#{$name}-h1, +.white .blue .#{$name}-h2, .white .blue .v-caption-h1, .white .blue .v-caption-h2 { color: #fff; text-shadow: rgba(0,0,0,.3) 0 1px 1px; } -.blue .v-label-light, -.white .blue .v-label-light { +.blue .#{$name}-light, +.white .blue .#{$name}-light { color: #6e7c83; } -.blue .v-label hr, -.white .blue .v-label hr { +.blue .#{$name} hr, +.white .blue .#{$name} hr { background: #a3bcc9; color: #a3bcc9; border-bottom-color: #cfe2eb; @@ -73,12 +73,12 @@ /********************** * Default & white styles **********************/ -.v-label-h1, -.v-label-h2, +.#{$name}-h1, +.#{$name}-h2, .v-caption-h1, .v-caption-h2, -.white .v-label-h1, -.white .v-label-h2, +.white .#{$name}-h1, +.white .#{$name}-h2, .white .v-caption-h1, .white .v-caption-h2 { font-family: Helvetica, Arial, "Lucida Grande", Geneva, Tahoma, Verdana, sans-serif; @@ -89,22 +89,22 @@ letter-spacing: -0.02em; text-shadow: #fff 0 -1px 1px; } -.v-label-h2, +.#{$name}-h2, .v-caption-h2, -.white .v-label-h2, +.white .#{$name}-h2, .white .v-caption-h2 { font-size: 16px; line-height: 22px; } -.v-label-light, -.white .v-label-light { +.#{$name}-light, +.white .#{$name}-light { font-size: 11px; line-height: 13px; color: #707070; } -.v-label hr, -.white .v-label hr { +.#{$name} hr, +.white .#{$name} hr { height: 2px; overflow: hidden; background: #dcdcdc; @@ -113,13 +113,13 @@ border-bottom: 1px solid #fff; } -.v-sa .v-label hr, -.v-ie8 .v-label hr { +.v-sa .#{$name} hr, +.v-ie8 .#{$name} hr { height: 1px; } /* Labels inside Table don't need a line-height */ -.v-table .v-label { +.v-table .#{$name} { line-height: normal; } diff --git a/WebContent/VAADIN/themes/reindeer/link/link.scss b/WebContent/VAADIN/themes/reindeer/link/link.scss index 291479b2d1..99233dfe39 100644 --- a/WebContent/VAADIN/themes/reindeer/link/link.scss +++ b/WebContent/VAADIN/themes/reindeer/link/link.scss @@ -1,12 +1,12 @@ -@mixin reindeer-link { +@mixin reindeer-link($name : v-link) { -.v-link a:link span { +.#{$name} a:link span { color: #1b699f; } -.v-link a:visited span { +.#{$name} a:visited span { color: #5c7485; } -.v-link a:hover span { +.#{$name} a:hover span { color: #2483c4; } diff --git a/WebContent/VAADIN/themes/reindeer/menubar/menubar.scss b/WebContent/VAADIN/themes/reindeer/menubar/menubar.scss index 78f4a9fa45..8d81a12a5b 100644 --- a/WebContent/VAADIN/themes/reindeer/menubar/menubar.scss +++ b/WebContent/VAADIN/themes/reindeer/menubar/menubar.scss @@ -1,6 +1,6 @@ -@mixin reindeer-menubar { +@mixin reindeer-menubar($name : v-menubar) { -.v-menubar { +.#{$name} { height: 23px; background: #323336 repeat-x; background-image: url(img/bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ @@ -8,15 +8,15 @@ text-shadow: rgba(0,0,0,.9) 0 1px 0; padding: 0 8px; } -.v-menubar .v-menubar-menuitem { +.#{$name} .#{$name}-menuitem { padding: 3px 8px; height: 17px; line-height: 16px; } -.v-menubar .v-menubar-menuitem:hover { +.#{$name} .#{$name}-menuitem:hover { color: #fff; } -.v-menubar-submenu { +.#{$name}-submenu { background: #f8f8f9; border: none; border-radius: 3px; @@ -26,50 +26,50 @@ overflow: hidden; padding: 4px 0; } -.v-menubar-submenu .v-menubar-menuitem { +.#{$name}-submenu .#{$name}-menuitem { padding: 1px 26px 1px 10px; line-height: 16px; } -.v-menubar-submenu .v-menubar-menuitem-caption .v-icon { +.#{$name}-submenu .#{$name}-menuitem-caption .v-icon { vertical-align: middle; } -.v-menubar .v-menubar-menuitem-selected, -.v-menubar-submenu .v-menubar-menuitem-selected { +.#{$name} .#{$name}-menuitem-selected, +.#{$name}-submenu .#{$name}-menuitem-selected { background: #4d749f repeat-x; background-image: url(../common/img/sel-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ color: #fff; text-shadow: 0 1px 0 #3b5a7a; } -.v-menubar .v-menubar-menuitem-selected { +.#{$name} .#{$name}-menuitem-selected { background-image: url(img/menu-sel-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat; sprite-margin-bottom: 1px */ } -.v-menubar-submenu .v-menubar-submenu-indicator { +.#{$name}-submenu .#{$name}-submenu-indicator { background: transparent url(img/submenu-icon.png) no-repeat right 70%; width: 26px; height: 16px; text-indent: -9999px; } -.v-menubar-submenu .v-menubar-menuitem-selected .v-menubar-submenu-indicator { +.#{$name}-submenu .#{$name}-menuitem-selected .#{$name}-submenu-indicator { background-image: url(img/submenu-icon-hover.png); } /* Checkboxes for checkable/checked menu items */ -.v-menubar-submenu-check-column .v-menubar-menuitem { +.#{$name}-submenu-check-column .#{$name}-menuitem { padding-left: 6px; } -.v-menubar-submenu-check-column .v-menubar-menuitem-caption { +.#{$name}-submenu-check-column .#{$name}-menuitem-caption { padding-left: 18px; } -.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption { +.#{$name}-submenu .#{$name}-menuitem-checked .#{$name}-menuitem-caption { background: transparent url(img/checked.png) no-repeat left; } -.v-menubar-submenu .v-menubar-menuitem-unchecked .v-menubar-menuitem-caption { +.#{$name}-submenu .#{$name}-menuitem-unchecked .#{$name}-menuitem-caption { background: transparent url(img/unchecked.png) no-repeat left; } -.v-menubar-submenu .v-menubar-menuitem-selected-checked .v-menubar-menuitem-caption { +.#{$name}-submenu .#{$name}-menuitem-selected-checked .#{$name}-menuitem-caption { background: transparent url(img/checked-selected.png) no-repeat left; } -.v-menubar-submenu .v-menubar-menuitem-selected-unchecked .v-menubar-menuitem-caption { +.#{$name}-submenu .#{$name}-menuitem-selected-unchecked .#{$name}-menuitem-caption { background: transparent url(img/unchecked-selected.png) no-repeat left; } diff --git a/WebContent/VAADIN/themes/reindeer/notification/notification.scss b/WebContent/VAADIN/themes/reindeer/notification/notification.scss index d9ddd4da27..464faa8aab 100644 --- a/WebContent/VAADIN/themes/reindeer/notification/notification.scss +++ b/WebContent/VAADIN/themes/reindeer/notification/notification.scss @@ -1,6 +1,6 @@ -@mixin reindeer-notification { +@mixin reindeer-notification($name : v-Notification) { -.v-Notification { +.#{$name} { color: #fff; border-radius: 4px; -moz-border-radius: 4px; @@ -10,38 +10,38 @@ font-weight: bold; } -.v-ie9 .v-Notification H1 { +.v-ie9 .#{$name} H1 { /* Fix for #6793 */ font-weight: bold; } -.v-Notification p { +.#{$name} p { line-height: 1.3; } -.v-Notification-warning { +.#{$name}-warning { background: #fdf3b5; color: #ca9a61; border: 3px solid #fee3af; } -.v-Notification-error { +.#{$name}-error { background: #b40000 url(img/error-close.png) no-repeat right top; border: 3px solid #ca3030; } -.v-Notification-tray { +.#{$name}-tray { margin: 0 5px 5px 0; background: #3b3c3e; border: 2px solid #585b5c; padding: 0.8em 0.9em; } -.v-Notification-tray h1 { +.#{$name}-tray h1 { font-size: 14px; line-height: 18px; } -.v-Notification-tray p { +.#{$name}-tray p { font-size: 12px; font-weight: normal; } -.v-Notification-system { +.#{$name}-system { background-color: #b40000; } diff --git a/WebContent/VAADIN/themes/reindeer/panel/panel.scss b/WebContent/VAADIN/themes/reindeer/panel/panel.scss index 00483c5546..e692ba90a9 100644 --- a/WebContent/VAADIN/themes/reindeer/panel/panel.scss +++ b/WebContent/VAADIN/themes/reindeer/panel/panel.scss @@ -1,58 +1,58 @@ -@mixin reindeer-panel { +@mixin reindeer-panel($name : v-panel) { -.blue .v-panel-caption, -.blue .v-panel-nocaption, -.blue .v-panel-content { +.blue .#{$name}-caption, +.blue .#{$name}-nocaption, +.blue .#{$name}-content { border-color: #a8bcc5; } -.v-panel-caption, -.v-panel-nocaption, -.white .v-panel-caption, -.white .v-panel-nocaption { +.#{$name}-caption, +.#{$name}-nocaption, +.white .#{$name}-caption, +.white .#{$name}-nocaption { border-bottom: 1px solid #e5e5e5; line-height: 16px; /* accommodate minimum icon size */ } -.v-webkit .v-panel-caption, -.v-webkit .v-panel-nocaption, -.v-gecko .v-panel-caption, -.v-gecko .v-panel-nocaption, -.v-ie9 .v-panel-caption, -.v-ie9 .v-panel-nocaption { +.v-webkit .#{$name}-caption, +.v-webkit .#{$name}-nocaption, +.v-gecko .#{$name}-caption, +.v-gecko .#{$name}-nocaption, +.v-ie9 .#{$name}-caption, +.v-ie9 .#{$name}-nocaption { border-bottom-color: rgba(0,0,0,.08); } -.v-panel-caption { +.#{$name}-caption { padding-bottom: 2px; } -.v-panel-content, -.white .v-panel-content { +.#{$name}-content, +.white .#{$name}-content { background: #fff; border: 1px solid #dcdcdc; border-bottom: none; border-top: none; } -.v-webkit .v-panel-content, -.v-gecko .v-panel-content, -.v-ie9 .v-panel-content { +.v-webkit .#{$name}-content, +.v-gecko .#{$name}-content, +.v-ie9 .#{$name}-content { border-top-color: rgba(0,0,0,.07); } -.blue .v-panel-deco { +.blue .#{$name}-deco { border-color: #92a3ac; background: #adc2cd; } -.v-panel-deco, -.white .v-panel-deco { +.#{$name}-deco, +.white .#{$name}-deco { height: 1px; border-top: 1px solid #bebebe; background: #e2e2e2; overflow: hidden; } -.v-webkit .v-panel-deco, -.v-gecko .v-panel-deco, -.v-ie9 .v-panel-deco { +.v-webkit .#{$name}-deco, +.v-gecko .#{$name}-deco, +.v-ie9 .#{$name}-deco { border-top-color: rgba(0,0,0,.1); background: rgba(0,0,0,.08); } -.v-panel-caption .v-errorindicator { +.#{$name}-caption .v-errorindicator { height: 16px; width: 13px; background: url(../common/icons/error.png) no-repeat 50%; @@ -62,15 +62,15 @@ } /* Light style */ -.v-panel-light .v-panel-caption-light, -.v-panel-light .v-panel-nocaption-light { +.#{$name}-light .#{$name}-caption-light, +.#{$name}-light .#{$name}-nocaption-light { border: none; } -.v-panel-light .v-panel-content-light { +.#{$name}-light .#{$name}-content-light { border: none; background: transparent; } -.v-panel-light .v-panel-deco-light { +.#{$name}-light .#{$name}-deco-light { height: 0; border: none; } diff --git a/WebContent/VAADIN/themes/reindeer/popupview/popupview.scss b/WebContent/VAADIN/themes/reindeer/popupview/popupview.scss index 7e7f55fda5..f30f059bef 100644 --- a/WebContent/VAADIN/themes/reindeer/popupview/popupview.scss +++ b/WebContent/VAADIN/themes/reindeer/popupview/popupview.scss @@ -1,12 +1,12 @@ -@mixin reindeer-popupview { +@mixin reindeer-popupview($name : v-popupview) { -.v-popupview { +.#{$name} { color: #1b699f; } -.v-popupview:hover { +.#{$name}:hover { color: #2483c4; } -.v-popupview-popup { +.#{$name}-popup { background: #fff; padding: 3px; } diff --git a/WebContent/VAADIN/themes/reindeer/progressindicator/progressindicator.scss b/WebContent/VAADIN/themes/reindeer/progressindicator/progressindicator.scss index f3f3a59afb..62be029670 100644 --- a/WebContent/VAADIN/themes/reindeer/progressindicator/progressindicator.scss +++ b/WebContent/VAADIN/themes/reindeer/progressindicator/progressindicator.scss @@ -1,13 +1,13 @@ -@mixin reindeer-progressindicator { +@mixin reindeer-progressindicator($name : v-progressindicator) { -.v-progressindicator-wrapper { +.#{$name}-wrapper { background: #dfe2e4 url(img/base.gif) repeat-x; border: 1px solid #bfbfbf; } -.v-disabled .v-progressindicator-wrapper { +.v-disabled .#{$name}-wrapper { background-image: url(img/disabled.gif); } -.v-progressindicator-indicator { +.#{$name}-indicator { background: #f7f9f9 url(img/progress.png); } diff --git a/WebContent/VAADIN/themes/reindeer/reindeer.scss b/WebContent/VAADIN/themes/reindeer/reindeer.scss index 0cd01f7885..e102e99bc5 100644 --- a/WebContent/VAADIN/themes/reindeer/reindeer.scss +++ b/WebContent/VAADIN/themes/reindeer/reindeer.scss @@ -1,10 +1,10 @@ -// this file just defines all reindeer mixins by importing them +@import "../base/base.scss"; // common between others for now for backwards compatibility - @import "accordion/accordion.scss"; @import "a-sprite-definitions/a-sprite-definitions.scss"; @import "button/button.scss"; +@import "button/nativebutton.scss"; @import "common/common.scss"; @@ -26,3 +26,36 @@ @import "textfield/textfield.scss"; @import "tree/tree.scss"; @import "window/window.scss"; + +@mixin reindeer { + // should this be here? + @include base; + + // TODO @each + + @include reindeer-accordion; + // TODO @include a-sprite-definitions; + @include reindeer-button; + @include reindeer-nativebutton; + @include reindeer-common; + @include reindeer-datefield; + @include reindeer-formlayout; + @include reindeer-label; + @include reindeer-layouts; + @include reindeer-link; + @include reindeer-menubar; + @include reindeer-notification; + @include reindeer-panel; + @include reindeer-popupview; + @include reindeer-progressindicator; + @include reindeer-select; + @include reindeer-slider; + @include reindeer-splitpanel; + @include reindeer-table; + @include reindeer-tabsheet; + @include reindeer-textfield; + @include reindeer-tree; + @include reindeer-window; +} + + diff --git a/WebContent/VAADIN/themes/reindeer/select/select.scss b/WebContent/VAADIN/themes/reindeer/select/select.scss index 240f88aebb..1510896fb9 100644 --- a/WebContent/VAADIN/themes/reindeer/select/select.scss +++ b/WebContent/VAADIN/themes/reindeer/select/select.scss @@ -1,42 +1,42 @@ -@mixin reindeer-select { +@mixin reindeer-select($name : v-filterselect) { -.v-filterselect { +.#{$name} { height: 24px; background-repeat: no-repeat; background-image: url(img/left.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ padding-left: 2px; padding-right: 25px; /* Space for the button */ } -.v-app .v-filterselect-input, -.v-window .v-filterselect-input, -.v-popupview-popup .v-filterselect-input { +.v-app .#{$name}-input, +.v-window .#{$name}-input, +.v-popupview-popup .#{$name}-input { background: transparent repeat-x; background-image: url(img/center.png); /** sprite-ref: verticals; sprite-alignment: repeat; sprite-margin-bottom: 1px */ border: none; height: 24px; } /* More specific selector to override padding */ -.v-app input.v-filterselect-input, -.v-window input.v-filterselect-input, -.v-popupview-popup input.v-filterselect-input { +.v-app input.#{$name}-input, +.v-window input.#{$name}-input, +.v-popupview-popup input.#{$name}-input { padding: 4px 0 4px 2px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.v-filterselect-prompt .v-filterselect-input { +.#{$name}-prompt .#{$name}-input { font-style: normal; } -.v-filterselect-input:focus { +.#{$name}-input:focus { outline: none; } -.v-filterselect-focus { +.#{$name}-focus { background-image: url(img/left-focus.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ } -.v-filterselect-focus .v-filterselect-input { +.#{$name}-focus .#{$name}-input { background-image: url(img/center-focus.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-filterselect-button { +.#{$name}-button { overflow: hidden; width: 25px; height: 24px; @@ -45,26 +45,26 @@ cursor: default; margin-right: -25px; } -.v-filterselect-button:hover { +.#{$name}-button:hover { background-image: url(img/right-hover.png); /** sprite-ref: verticals */ } -.v-filterselect-button:active { +.#{$name}-button:active { background-image: url(img/right-pressed.png); /** sprite-ref: verticals */ } -.v-filterselect-focus .v-filterselect-button { +.#{$name}-focus .#{$name}-button { background-image: url(img/right-focus.png); /** sprite-ref: verticals */ } -.v-filterselect-focus .v-filterselect-button:hover { +.#{$name}-focus .#{$name}-button:hover { background-image: url(img/right-focus-hover.png); /** sprite-ref: verticals */ } -.v-filterselect-focus .v-filterselect-button:active { +.#{$name}-focus .#{$name}-button:active { background-image: url(img/right-focus-pressed.png); /** sprite-ref: verticals */ } -.v-disabled .v-filterselect-button:hover, -.v-readonly .v-filterselect-button:hover { +.v-disabled .#{$name}-button:hover, +.v-readonly .#{$name}-button:hover { background-image: url(img/right.png); /** sprite-ref: verticals */ } -.v-filterselect-suggestpopup { +.#{$name}-suggestpopup { background: #f8f8f9; border: none; border-radius: 3px; @@ -73,10 +73,10 @@ -o-border-radius: 3px; overflow: hidden; } -.v-filterselect-suggestmenu { +.#{$name}-suggestmenu { margin: 4px 0; } -.v-filterselect-suggestmenu .gwt-MenuItem { +.#{$name}-suggestmenu .gwt-MenuItem { padding: 1px 8px; height: 16px; user-select: none; @@ -84,53 +84,53 @@ -webkit-user-select: none; cursor: default; } -.v-ff .v-filterselect-suggestmenu .gwt-MenuItem { +.v-ff .#{$name}-suggestmenu .gwt-MenuItem { height: 18px; } -.v-filterselect-suggestmenu .gwt-MenuItem .v-icon { +.#{$name}-suggestmenu .gwt-MenuItem .v-icon { margin-right: 3px; } -.v-filterselect-suggestmenu .gwt-MenuItem-selected { +.#{$name}-suggestmenu .gwt-MenuItem-selected { background: transparent repeat-x; background-image: url(../common/img/sel-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ color: #fff; text-shadow: #3b5a7a 0 1px 0; } -.v-filterselect-nextpage, -.v-filterselect-nextpage-off, -.v-filterselect-prevpage-off, -.v-filterselect-prevpage { +.#{$name}-nextpage, +.#{$name}-nextpage-off, +.#{$name}-prevpage-off, +.#{$name}-prevpage { height: 11px; width: 100%; background: transparent; margin-bottom: -4px; } -.v-filterselect-nextpage, -.v-filterselect-nextpage-off { +.#{$name}-nextpage, +.#{$name}-nextpage-off { margin: -4px 0 0; } -.v-filterselect-nextpage:hover { +.#{$name}-nextpage:hover { background-repeat: repeat-x; background-image: url(img/page-down-hover.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-filterselect-prevpage:hover { +.#{$name}-prevpage:hover { background-repeat: repeat-x; background-image: url(img/page-up-hover.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-filterselect-nextpage:active { +.#{$name}-nextpage:active { background-repeat: repeat-x; background-image: url(img/page-down-pressed.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-filterselect-prevpage:active { +.#{$name}-prevpage:active { background-repeat: repeat-x; background-image: url(img/page-up-pressed.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-filterselect-nextpage-off span, -.v-filterselect-prevpage-off span { +.#{$name}-nextpage-off span, +.#{$name}-prevpage-off span { display: none; } -.v-filterselect-nextpage span, -.v-filterselect-prevpage span { +.#{$name}-nextpage span, +.#{$name}-prevpage span { display: block; height: 11px; width: 100%; @@ -142,16 +142,16 @@ -moz-user-select: none; -webkit-user-select: none; } -.v-filterselect-prevpage span { +.#{$name}-prevpage span { background-image: url(img/arrow-up.png); /** sprite-ref: verticals; sprite-margin-top: 3px; sprite-margin-bottom: 3px; sprite-alignment: center */ } -.v-filterselect-nextpage:hover span { +.#{$name}-nextpage:hover span { background-image: url(img/arrow-down-hover.png); /** sprite-ref: verticals; sprite-margin-top: 3px; sprite-margin-bottom: 3px; sprite-alignment: center */ } -.v-filterselect-prevpage:hover span { +.#{$name}-prevpage:hover span { background-image: url(img/arrow-up-hover.png); /** sprite-ref: verticals; sprite-margin-top: 3px; sprite-margin-bottom: 3px; sprite-alignment: center */ } -.v-filterselect-status { +.#{$name}-status { text-shadow: #e9eaeb 0 1px 0; font-size: 11px; line-height: normal; @@ -170,36 +170,36 @@ -webkit-user-select: none; } /* IE fails to position background images properly inside table elements */ -.v-ie .v-filterselect-suggestmenu .gwt-MenuItem-selected { +.v-ie .#{$name}-suggestmenu .gwt-MenuItem-selected { background: transparent url(../common/img/sel-bg.png) repeat-x; } -.v-ie .v-filterselect-nextpage:hover { +.v-ie .#{$name}-nextpage:hover { background: transparent url(img/page-down-hover.png) repeat-x; } -.v-ie .v-filterselect-prevpage:hover { +.v-ie .#{$name}-prevpage:hover { background: transparent url(img/page-up-hover.png) repeat-x; } -.v-ie .v-filterselect-prevpage span { +.v-ie .#{$name}-prevpage span { background: transparent url(img/arrow-up.png) no-repeat center 3px; } -.v-ie .v-filterselect-nextpage span { +.v-ie .#{$name}-nextpage span { background: transparent url(img/arrow-down.png) no-repeat center 3px; } -.v-ie .v-filterselect-prevpage:hover span { +.v-ie .#{$name}-prevpage:hover span { background: transparent url(img/arrow-up-hover.png) no-repeat center 3px; } -.v-ie .v-filterselect-nextpage:hover span { +.v-ie .#{$name}-nextpage:hover span { background: transparent url(img/arrow-down-hover.png) no-repeat center 3px; } -.v-ie .v-filterselect-status { +.v-ie .#{$name}-status { background: transparent url(img/status-bg.png) repeat-x; } /* Filterselect with icon needs a similar fix than in buttons */ -.v-filterselect .v-icon { +.#{$name} .v-icon { width: 16px; position: relative; } -.v-filterselect .v-icon + .v-filterselect-input { +.#{$name} .v-icon + .#{$name}-input { margin-left: -16px; padding-left: 18px; } @@ -208,45 +208,45 @@ /* Combobox on black background */ -.black .v-filterselect { +.black .#{$name} { background-image: url(img/black/left-black.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.v-app .black .v-filterselect-input, -.v-window .black .v-filterselect-input, -.v-window-black .v-filterselect-input, -.v-popupview-popup .black .v-filterselect-input { +.v-app .black .#{$name}-input, +.v-window .black .#{$name}-input, +.v-window-black .#{$name}-input, +.v-popupview-popup .black .#{$name}-input { color: #c9ccce; background-image: url(img/black/center-black.png); /** sprite-ref: black-verticals; sprite-alignment: repeat; sprite-margin-bottom: 1px */ } -.black .v-filterselect-focus { +.black .#{$name}-focus { background-image: url(img/black/left-black-focus.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-focus .v-filterselect-input { +.black .#{$name}-focus .#{$name}-input { background-image: url(img/black/center-black-focus.png); /** sprite-ref: black-verticals; sprite-alignment: repeat; sprite-margin-bottom: 1px */ } -.black .v-filterselect-button { +.black .#{$name}-button { background-image: url(img/black/right-black.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-button:hover { +.black .#{$name}-button:hover { background-image: url(img/black/right-black-hover.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-button:active { +.black .#{$name}-button:active { background-image: url(img/black/right-black-pressed.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-focus .v-filterselect-button { +.black .#{$name}-focus .#{$name}-button { background-image: url(img/black/right-black-focus.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-focus .v-filterselect-button:hover { +.black .#{$name}-focus .#{$name}-button:hover { background-image: url(img/black/right-black-focus-hover.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-focus .v-filterselect-button:active { +.black .#{$name}-focus .#{$name}-button:active { background-image: url(img/black/right-black-focus-pressed.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-disabled .v-filterselect-button:hover, -.black .v-readonly .v-filterselect-button:hover { +.black .v-disabled .#{$name}-button:hover, +.black .v-readonly .#{$name}-button:hover { background-image: url(img/black/right-black.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 1px */ } -.black .v-filterselect-prompt .v-filterselect-input { +.black .#{$name}-prompt .#{$name}-input { color: #5f6366; } diff --git a/WebContent/VAADIN/themes/reindeer/slider/slider.scss b/WebContent/VAADIN/themes/reindeer/slider/slider.scss index 047237d262..725f717543 100644 --- a/WebContent/VAADIN/themes/reindeer/slider/slider.scss +++ b/WebContent/VAADIN/themes/reindeer/slider/slider.scss @@ -1,42 +1,42 @@ -@mixin reindeer-slider { +@mixin reindeer-slider($name : v-slider) { -.v-slider { +.#{$name} { border-top: 1px solid #9a9c9e; border-bottom: 1px solid #bdbfc1; margin: 4px 0; } -.v-slider-base { +.#{$name}-base { height: 1px; background: #e0e2e2; border-top: 1px solid #adb0b1; border-left: 1px solid #a0a3a6; border-right: 1px solid #a0a3a6; } -.v-slider-handle { +.#{$name}-handle { background: transparent; background-image: url(img/knob.png); /** sprite-ref: verticals */ width: 10px; height: 10px; margin-top: -5px; } -.v-slider-handle-active { +.#{$name}-handle-active { background-image: url(img/knob-pressed.png); /** sprite-ref: verticals */ } -.v-slider-vertical { +.#{$name}-vertical { width: 2px; margin: 0 5px; border: none; border-left: 1px solid #9a9c9e; border-right: 1px solid #bdbfc1; } -.v-slider-vertical .v-slider-base { +.#{$name}-vertical .#{$name}-base { width: 2px; border-left: 1px solid #adb0b1; border-right: none; border-top: 1px solid #adb0b1; border-bottom: 1px solid #adb0b1; } -.v-slider-vertical .v-slider-handle { +.#{$name}-vertical .#{$name}-handle { width: 10px; height: 10px; margin-left: -5px; diff --git a/WebContent/VAADIN/themes/reindeer/splitpanel/splitpanel.scss b/WebContent/VAADIN/themes/reindeer/splitpanel/splitpanel.scss index 07a38891f5..c837688387 100644 --- a/WebContent/VAADIN/themes/reindeer/splitpanel/splitpanel.scss +++ b/WebContent/VAADIN/themes/reindeer/splitpanel/splitpanel.scss @@ -1,12 +1,12 @@ -@mixin reindeer-splitpanel { +@mixin reindeer-splitpanel($name : v-splitpanel) { -.v-splitpanel-hsplitter, -.v-splitpanel-hsplitter-locked { +.#{$name}-hsplitter, +.#{$name}-hsplitter-locked { width: 7px; background-repeat: repeat-y; background-image: url(img/hor-bg.png); /** sprite-ref: horizontals; sprite-alignment: repeat */ } -.v-splitpanel-hsplitter div { +.#{$name}-hsplitter div { width: 7px; height: 100%; /* for Opera */ background: transparent; @@ -14,13 +14,13 @@ background-position: 50%; background-image: url(img/hor-handle.png); /** sprite-ref: horizontals; sprite-alignment: center */ } -.v-splitpanel-vsplitter, -.v-splitpanel-vsplitter-locked { +.#{$name}-vsplitter, +.#{$name}-vsplitter-locked { height: 7px; background-repeat: repeat-x; background-image: url(img/ver-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-splitpanel-vsplitter div { +.#{$name}-vsplitter div { height: 7px; background: transparent; background-repeat: no-repeat; @@ -30,38 +30,38 @@ /* Splitpanels on blue background */ -.blue .v-splitpanel-hsplitter-small, -.blue .v-splitpanel-hsplitter-small-locked { +.blue .#{$name}-hsplitter-small, +.blue .#{$name}-hsplitter-small-locked { background: #7c8a91; } /* Splitpanels on black background */ -.black .v-splitpanel-hsplitter-small, -.black .v-splitpanel-hsplitter-small-locked { +.black .#{$name}-hsplitter-small, +.black .#{$name}-hsplitter-small-locked { background: #4e5253; } /* Small style */ -.v-splitpanel-hsplitter-small, -.v-splitpanel-hsplitter-small-locked, -.white .v-splitpanel-hsplitter-small, -.white .v-splitpanel-hsplitter-small-locked { +.#{$name}-hsplitter-small, +.#{$name}-hsplitter-small-locked, +.white .#{$name}-hsplitter-small, +.white .#{$name}-hsplitter-small-locked { width: 1px; background: #949698; } -.v-splitpanel-vsplitter-small, -.v-splitpanel-vsplitter-small-locked, -.white .v-splitpanel-vsplitter-small, -.white .v-splitpanel-vsplitter-small-locked { +.#{$name}-vsplitter-small, +.#{$name}-vsplitter-small-locked, +.white .#{$name}-vsplitter-small, +.white .#{$name}-vsplitter-small-locked { height: 1px; background: #949698; } -.v-splitpanel-hsplitter-small div { +.#{$name}-hsplitter-small div { width: 5px; margin-left: -2px; background: transparent; } -.v-splitpanel-vsplitter-small div { +.#{$name}-vsplitter-small div { height: 5px; margin-top: -2px; background: transparent; diff --git a/WebContent/VAADIN/themes/reindeer/styles.scss b/WebContent/VAADIN/themes/reindeer/styles.scss index 51daace9d3..7ae66252de 100644 --- a/WebContent/VAADIN/themes/reindeer/styles.scss +++ b/WebContent/VAADIN/themes/reindeer/styles.scss @@ -1,32 +1,3 @@ -// this file actually attaches all reindeer mixins to a parent style - -@import "../base/styles.scss"; @import "reindeer.scss"; -// .v-theme-reindeer { - @include reindeer-accordion; - // TODO this is problematic: comments get stripped out - // @include a-sprite-definitions; - @include reindeer-button; - - @include reindeer-common; - - @include reindeer-datefield; - @include reindeer-formlayout; - @include reindeer-label; - @include reindeer-layouts; - @include reindeer-link; - @include reindeer-menubar; - @include reindeer-notification; - @include reindeer-panel; - @include reindeer-popupview; - @include reindeer-progressindicator; - @include reindeer-select; - @include reindeer-slider; - @include reindeer-splitpanel; - @include reindeer-table; - @include reindeer-tabsheet; - @include reindeer-textfield; - @include reindeer-tree; - @include reindeer-window; -// } +@include reindeer; diff --git a/WebContent/VAADIN/themes/reindeer/table/table.scss b/WebContent/VAADIN/themes/reindeer/table/table.scss index cb190e1f30..a26b4f616b 100644 --- a/WebContent/VAADIN/themes/reindeer/table/table.scss +++ b/WebContent/VAADIN/themes/reindeer/table/table.scss @@ -1,20 +1,20 @@ -@mixin reindeer-table { +@mixin reindeer-table($name : v-table) { /* Table on blue background */ -.blue .v-table-header-wrap { +.blue .#{$name}-header-wrap { border-color: #92a2aa; } -.blue .v-table-body { +.blue .#{$name}-body { border-color: #92a2aa; border-top-color: #c2c3c4; } /* Default & white style */ -.v-table-header-wrap, -.white .v-table-header-wrap, -.v-table-footer-wrap, -.white .v-table-footer-wrap, -.v-table-header-drag { +.#{$name}-header-wrap, +.white .#{$name}-header-wrap, +.#{$name}-footer-wrap, +.white .#{$name}-footer-wrap, +.#{$name}-header-drag { border-color: #c2c3c4; background: transparent repeat-x; background-image: url(img/header-bg-light.png); /** sprite-ref: verticals; sprite-alignment: repeat */ @@ -27,85 +27,85 @@ line-height: normal; } -.v-table-footer-wrap, -.white .v-table-footer-wrap { +.#{$name}-footer-wrap, +.white .#{$name}-footer-wrap { text-transform: none; font-size: 12px; font-weight: normal; } -.v-table-footer td, -.white .v-table-footer td { +.#{$name}-footer td, +.white .#{$name}-footer td { border-color: #c2c3c4; } -.v-table-footer-container { +.#{$name}-footer-container { padding-right: 7px; } -.v-table-header, -.v-table-footer, -.v-table-footer table { +.#{$name}-header, +.#{$name}-footer, +.#{$name}-footer table { height: 20px; } -.v-table-caption-container, -.v-table-header-drag { +.#{$name}-caption-container, +.#{$name}-header-drag { padding-top: 4px; padding-right: 4px; } -.v-table-caption-container .v-icon, -.v-table-header-drag .v-icon { +.#{$name}-caption-container .v-icon, +.#{$name}-header-drag .v-icon { height: 16px; margin: -4px 3px 0 0; vertical-align: middle; } -.v-ie .v-table-caption-container .v-icon, -.v-ie .v-table-header-drag .v-icon { +.v-ie .#{$name}-caption-container .v-icon, +.v-ie .#{$name}-header-drag .v-icon { margin-top: -3px; } -.v-table-resizer { +.#{$name}-resizer { height: 20px; width: 2px; background: transparent; border-right: 1px solid #c2c3c4; } -.v-table-sort-indicator { +.#{$name}-sort-indicator { background: transparent; width: 0px; height: 20px; } -.v-table-header-cell-asc .v-table-sort-indicator { +.#{$name}-header-cell-asc .#{$name}-sort-indicator { background: transparent no-repeat right 7px; background-image: url(img/asc-light.png); /** sprite-ref: verticals; sprite-alignment: right; sprite-margin-top: 7px; sprite-margin-bottom: 6px; sprite-margin-right: 6px; */ width: 16px; } -.v-table-header-cell-desc .v-table-sort-indicator { +.#{$name}-header-cell-desc .#{$name}-sort-indicator { background: transparent no-repeat right 7px; background-image: url(img/desc-light.png); /** sprite-ref: verticals; sprite-alignment: right; sprite-margin-top: 7px; sprite-margin-bottom: 6px; sprite-margin-right: 6px; */ width: 16px; } -.v-table-body, -.white .v-table-body { +.#{$name}-body, +.white .#{$name}-body { border-color: #c2c3c4; background: #fff; } -.v-table-cell-content { +.#{$name}-cell-content { padding-top: 0; border-right-color: #d3d4d5; vertical-align: top; } -.v-table-cell-wrapper { +.#{$name}-cell-wrapper { padding-top: 3px; padding-bottom: 3px; } -.v-table-row-odd { +.#{$name}-row-odd { background: #eff0f1; } -.v-table-generated-row { +.#{$name}-generated-row { background: #dcdee0; text-transform: uppercase; font-size: 10px; @@ -114,55 +114,55 @@ text-shadow: #f3f5f8 0 1px 0; line-height: normal; } -.v-table-generated-row .v-table-cell-wrapper { +.#{$name}-generated-row .#{$name}-cell-wrapper { padding-top: 4px; padding-bottom: 5px; } -.v-table-cell-content:last-child { +.#{$name}-cell-content:last-child { border-right-color: transparent; } -.v-table .v-selected, -.black .v-table .v-selected { +.#{$name} .v-selected, +.black .#{$name} .v-selected { background: #4d749f url(../common/img/sel-bg.png) repeat-x; /* We can't include this in the sprite, since we don't know the row height */ color: #fff; text-shadow: #3b5a7a 0 1px 0; } -.v-table .v-selected .v-table-cell-content { +.#{$name} .v-selected .#{$name}-cell-content { border-right-color: #466c90; } -.v-table-column-selector { +.#{$name}-column-selector { width: 16px; height: 20px; margin-top: -20px; background: transparent no-repeat; background-image: url(img/col-sel-light.png); /** sprite-ref: verticals */ } -.v-table-column-selector:active { +.#{$name}-column-selector:active { background-image: url(img/col-sel-light-pressed.png); /** sprite-ref: verticals */ } -.v-table-focus-slot-left { +.#{$name}-focus-slot-left { border-left: 1px solid #222; margin-bottom: -20px; width: auto; } -.v-table-focus-slot-right { +.#{$name}-focus-slot-right { border-right-color: #222; margin-right: 0; } -.v-table-header-drag { +.#{$name}-header-drag { padding-left: 6px; height: 16px; } -.v-table-header-drag img { +.#{$name}-header-drag img { height: 16px; margin: -3px 3px 0 0; } -.v-table-scrollposition { +.#{$name}-scrollposition { width: auto; background: transparent; border: none; } -.v-table-scrollposition span { +.#{$name}-scrollposition span { background: transparent repeat-x; background-image: url(img/scroll-indic-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ border: 1px solid #939494; @@ -183,7 +183,7 @@ -webkit-box-shadow: rgba(0,0,0,.5) 0 1px 2px; -moz-box-shadow: rgba(0,0,0,.5) 0 1px 2px; } -.v-table-borderless .v-table-scrollposition span { +.#{$name}-borderless .#{$name}-scrollposition span { top: 0; } /* row in column selector */ @@ -206,87 +206,87 @@ /* Strong style */ -.v-table-strong .v-table-header-wrap, -.v-table-strong .v-table-header-drag { +.#{$name}-strong .#{$name}-header-wrap, +.#{$name}-strong .#{$name}-header-drag { border-color: #2b3033; border-top-color: #2b3033; background-image: url(img/header-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ color: #e7e9ea; text-shadow: #000 0 -1px 0; } -.v-table-strong .v-table-body { +.#{$name}-strong .#{$name}-body { border-top-color: #2b3033; } -.v-table-strong .v-table-resizer { +.#{$name}-strong .#{$name}-resizer { border-right-color: #1c1f21; } -.v-table-strong .v-table-header-cell-asc .v-table-sort-indicator { +.#{$name}-strong .#{$name}-header-cell-asc .#{$name}-sort-indicator { background-image: url(img/asc.png); /** sprite-ref: verticals; sprite-alignment: right; sprite-margin-top: 7px; sprite-margin-bottom: 6px; sprite-margin-right: 6px; */ } -.v-table-strong .v-table-header-cell-desc .v-table-sort-indicator { +.#{$name}-strong .#{$name}-header-cell-desc .#{$name}-sort-indicator { background-image: url(img/desc.png); /** sprite-ref: verticals; sprite-alignment: right; sprite-margin-top: 7px; sprite-margin-bottom: 6px; sprite-margin-right: 6px; */ } -.v-table-strong .v-table-column-selector { +.#{$name}-strong .#{$name}-column-selector { background-image: url(img/col-sel.png); /** sprite-ref: verticals */ } -.v-table-strong .v-table-column-selector:active { +.#{$name}-strong .#{$name}-column-selector:active { background-image: url(img/col-sel-pressed.png); /** sprite-ref: verticals */ } -.v-table-strong .v-table-focus-slot-left, -.v-table-strong .v-table-focus-slot-right { +.#{$name}-strong .#{$name}-focus-slot-left, +.#{$name}-strong .#{$name}-focus-slot-right { border-color: #9ca1a5; } /* Table on black background (normal style) */ -.black .v-table-header-wrap, -.black .v-table-header-drag { +.black .#{$name}-header-wrap, +.black .#{$name}-header-drag { border-color: #252729; background-image: url(img/header-bg-black.png); /** sprite-ref: black-verticals; sprite-alignment: repeat */ color: #e7eaee; text-shadow: #000 0 -1px 0; } -.black .v-table-resizer { +.black .#{$name}-resizer { border-right-color: #252729; } -.black .v-table-header-cell-asc .v-table-sort-indicator { +.black .#{$name}-header-cell-asc .#{$name}-sort-indicator { background-image: url(img/asc.png); /** sprite-ref: black-verticals; sprite-alignment: right; sprite-margin-top: 7px; sprite-margin-bottom: 6px; sprite-margin-right: 6px; */ } -.black .v-table-header-cell-desc .v-table-sort-indicator { +.black .#{$name}-header-cell-desc .#{$name}-sort-indicator { background-image: url(img/desc.png); /** sprite-ref: black-verticals; sprite-alignment: right; sprite-margin-top: 7px; sprite-margin-bottom: 6px; sprite-margin-right: 6px; */ } -.black .v-table-column-selector { +.black .#{$name}-column-selector { background-image: url(img/col-sel-black.png); /** sprite-ref: black-verticals */ } -.black .v-table-column-selector:active { +.black .#{$name}-column-selector:active { background-image: url(img/col-sel-black-pressed.png); /** sprite-ref: black-verticals */ } -.black .v-table-focus-slot-left, -.black .v-table-focus-slot-right { +.black .#{$name}-focus-slot-left, +.black .#{$name}-focus-slot-right { border-color: #9ca1a5; } -.black .v-table-body { +.black .#{$name}-body { border-color: #252729; background: transparent; } -.black .v-table-cell-content { +.black .#{$name}-cell-content { border-right-color: #252729; border-bottom: 1px solid #252729; } -.black .v-table-cell-wrapper { +.black .#{$name}-cell-wrapper { padding-bottom: 2px; } -.black .v-table-row-odd { +.black .#{$name}-row-odd { background: transparent; } /* Selection background-color combined with the default (white) style selector, so we don't have to duplicate the sprite image in the final sprite collection */ -.black .v-table .v-selected .v-table-cell-content { +.black .#{$name} .v-selected .#{$name}-cell-content { border-bottom: 1px solid #4d749f; } /* Borderless style */ -.v-table-borderless .v-table-header-wrap, -.v-table-borderless .v-table-body { +.#{$name}-borderless .#{$name}-header-wrap, +.#{$name}-borderless .#{$name}-body { border: none; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-borderless-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-borderless-style.scss index 1efdab68af..40c6713bcd 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-borderless-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-borderless-style.scss @@ -1,22 +1,22 @@ -@mixin reindeer-tabsheet-borderless-style { +@mixin reindeer-tabsheet-borderless-style($name : v-tabsheet-borderless) { -.v-tabsheet-borderless .v-tabsheet-tabitemcell-first { +.#{$name} .v-tabsheet-tabitemcell-first { padding-left: 7px; background: url(img/framed/tab-first-left.png) no-repeat -3px 0; } -.v-tabsheet-borderless .v-tabsheet-tabitemcell-selected-first { +.#{$name} .v-tabsheet-tabitemcell-selected-first { background: url(img/framed/tab-first-left-sel.png) no-repeat -3px 0; } -.v-tabsheet-borderless .v-tabsheet-spacertd div { +.#{$name} .v-tabsheet-spacertd div { margin-right: 0; } -.v-tabsheet-borderless .v-tabsheet-spacertd { +.#{$name} .v-tabsheet-spacertd { background: transparent; } -.v-tabsheet-borderless .v-tabsheet-content { +.#{$name} .v-tabsheet-content { border: none; } -.v-tabsheet-borderless .v-tabsheet-deco { +.#{$name} .v-tabsheet-deco { height: 0; border-top: none; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-hover-closable-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-hover-closable-style.scss index dda381b1b0..f8e1a16335 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-hover-closable-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-hover-closable-style.scss @@ -1,9 +1,9 @@ -@mixin reindeer-tabsheet-hover-closable-style { +@mixin reindeer-tabsheet-hover-closable-style($name : v-tabsheet) { -.v-tabsheet-tabs-hover-closable .v-tabsheet-caption-close { +.#{$name}-tabs-hover-closable .#{$name}-caption-close { visibility: hidden; } -.v-tabsheet-tabs-hover-closable .v-tabsheet-tabitem:hover .v-tabsheet-caption-close { +.#{$name}-tabs-hover-closable .#{$name}-tabitem:hover .#{$name}-caption-close { visibility: visible; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss index 608aae55cb..7d21b3b2a8 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss @@ -1,41 +1,41 @@ -@mixin reindeer-tabsheet-minimal-style { +@mixin reindeer-tabsheet-minimal-style($name : v-tabsheet) { /** * Tabsheet "minimal" style -------------- */ /* Minimal tabsheet on blue background */ -.blue .v-tabsheet-tabs-minimal .v-tabsheet-spacertd div, -.blue .v-tabsheet-tabs-minimal .v-tabsheet-tabitem, -.blue .v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected { +.blue .#{$name}-tabs-minimal .#{$name}-spacertd div, +.blue .#{$name}-tabs-minimal .#{$name}-tabitem, +.blue .#{$name}-tabs-minimal .#{$name}-tabitem-selected { border-color: #7c8a91; } -.blue .v-tabsheet-tabs-minimal .v-tabsheet-caption-close { +.blue .#{$name}-tabs-minimal .#{$name}-caption-close { color: #7c8a91; } -.blue .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:hover { +.blue .#{$name}-tabs-minimal .#{$name}-caption-close:hover { color: #BCD3DE; background: #778d98; } -.blue .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:active { +.blue .#{$name}-tabs-minimal .#{$name}-caption-close:active { background: #4f6874; } /* Default & white styles */ -.v-tabsheet-tabs-minimal .v-tabsheet-spacertd div, -.white .v-tabsheet-tabs-minimal .v-tabsheet-spacertd div { +.#{$name}-tabs-minimal .#{$name}-spacertd div, +.white .#{$name}-tabs-minimal .#{$name}-spacertd div { border-bottom: 1px solid #bfbfbf; height: auto; background: transparent; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitemcell, -.v-tabsheet-tabs-minimal .v-tabsheet-spacertd { +.#{$name}-tabs-minimal .#{$name}-tabitemcell, +.#{$name}-tabs-minimal .#{$name}-spacertd { height: auto; background: transparent; padding-left: 0; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitem, -.white .v-tabsheet-tabs-minimal .v-tabsheet-tabitem { +.#{$name}-tabs-minimal .#{$name}-tabitem, +.white .#{$name}-tabs-minimal .#{$name}-tabitem { border: none; border-bottom: 1px solid #bfbfbf; color: #4d748f; @@ -44,54 +44,54 @@ background: transparent; text-shadow: none; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitem .v-caption { +.#{$name}-tabs-minimal .#{$name}-tabitem .v-caption { padding: 5px 16px; height: auto; background: transparent; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitemcell-selected { +.#{$name}-tabs-minimal .#{$name}-tabitemcell-selected { background: transparent; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected, -.white .v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected { +.#{$name}-tabs-minimal .#{$name}-tabitem-selected, +.white .#{$name}-tabs-minimal .#{$name}-tabitem-selected { background: transparent; border: 1px solid #bfbfbf; border-bottom: none; color: #222; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected .v-caption { +.#{$name}-tabs-minimal .#{$name}-tabitem-selected .v-caption { background: transparent; padding: 4px 15px 6px 15px; } -.v-tabsheet-tabs-minimal .v-tabsheet-tabitem .v-caption-closable, -.v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected .v-caption-closable { +.#{$name}-tabs-minimal .#{$name}-tabitem .v-caption-closable, +.#{$name}-tabs-minimal .#{$name}-tabitem-selected .v-caption-closable { padding-right: 6px; } -.v-tabsheet-content-minimal, -.white .v-tabsheet-content-minimal { +.#{$name}-content-minimal, +.white .#{$name}-content-minimal { border: none; } -.v-tabsheet-content-minimal .v-tabsheet-tabsheetpanel { +.#{$name}-content-minimal .#{$name}-tabsheetpanel { background: transparent; } -.v-tabsheet-deco-minimal, -.white .v-tabsheet-deco-minimal { +.#{$name}-deco-minimal, +.white .#{$name}-deco-minimal { height: 0; border: none; } -.v-tabsheet-tabcontainer-minimal .v-tabsheet-scroller { +.#{$name}-tabcontainer-minimal .#{$name}-scroller { margin-top: -20px; height: 17px; padding: 0; border: none; background: transparent; } -.v-tabsheet-tabcontainer-minimal .v-tabsheet-scroller button { +.#{$name}-tabcontainer-minimal .#{$name}-scroller button { margin-top: 0; } -.v-tabsheet-tabs-minimal .v-tabsheet-caption-close, -.v-tabsheet-tabs-minimal .v-tabsheet-caption-close:hover, -.v-tabsheet-tabs-minimal .v-tabsheet-caption-close:active { +.#{$name}-tabs-minimal .#{$name}-caption-close, +.#{$name}-tabs-minimal .#{$name}-caption-close:hover, +.#{$name}-tabs-minimal .#{$name}-caption-close:active { text-indent: 0; background: transparent; margin-left: 3px; @@ -104,45 +104,45 @@ -webkit-border-radius: 7px; -moz-border-radius: 7px; } -.v-tabsheet-tabs-minimal .v-tabsheet-caption-close { +.#{$name}-tabs-minimal .#{$name}-caption-close { margin-top: 1px; } -.v-ff .v-tabsheet-tabs-minimal .v-tabsheet-caption-close { +.v-ff .#{$name}-tabs-minimal .#{$name}-caption-close { margin-top: -15px; } -.v-tabsheet-tabs-minimal .v-tabsheet-caption-close:hover, -.white .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:hover { +.#{$name}-tabs-minimal .#{$name}-caption-close:hover, +.white .#{$name}-tabs-minimal .#{$name}-caption-close:hover { color: #fff; background: #aaa; } -.v-tabsheet-tabs-minimal .v-tabsheet-caption-close:active, -.white .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:active { +.#{$name}-tabs-minimal .#{$name}-caption-close:active, +.white .#{$name}-tabs-minimal .#{$name}-caption-close:active { background: #777; } /* Minimal tabsheet on black background */ -.black .v-tabsheet-tabs-minimal .v-tabsheet-spacertd div, -.black .v-tabsheet-tabs-minimal .v-tabsheet-tabitem, -.black .v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected { +.black .#{$name}-tabs-minimal .#{$name}-spacertd div, +.black .#{$name}-tabs-minimal .#{$name}-tabitem, +.black .#{$name}-tabs-minimal .#{$name}-tabitem-selected { border-color: #3e4044; color: #6a7f89; } -.black .v-tabsheet-tabs-minimal .v-tabsheet-tabitem-selected { +.black .#{$name}-tabs-minimal .#{$name}-tabitem-selected { color: #c9ccce; } -.black .v-tabsheet-content-minimal, -.black .v-tabsheet-content-bar { +.black .#{$name}-content-minimal, +.black .#{$name}-content-bar { color: #c9ccce; text-shadow: #000 0 0 1px; } -.black .v-tabsheet-tabs-minimal .v-tabsheet-caption-close { +.black .#{$name}-tabs-minimal .#{$name}-caption-close { color: #72787c; } -.black .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:hover { +.black .#{$name}-tabs-minimal .#{$name}-caption-close:hover { color: #1d2021; background: #4d5154; } -.black .v-tabsheet-tabs-minimal .v-tabsheet-caption-close:active { +.black .#{$name}-tabs-minimal .#{$name}-caption-close:active { background: #626669; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.scss index 176d35eea8..5147f608ab 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.scss @@ -1,22 +1,22 @@ -@mixin reindeer-tabsheet-normal-style { +@mixin reindeer-tabsheet-normal-style($name : v-tabsheet) { /* Default Tabsheet styles */ -.v-tabsheet-tabitemcell, -.v-tabsheet-spacertd { +.#{$name}-tabitemcell, +.#{$name}-spacertd { height: 32px; } -.v-tabsheet-tabitemcell { +.#{$name}-tabitemcell { background: no-repeat; background-image: url(img/framed/tab-left.png); /** sprite-ref: verticals */ padding-left: 3px; } -.v-tabsheet-tabitemcell-first { +.#{$name}-tabitemcell-first { padding-left: 10px; background-image: url(img/framed/tab-first-left.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitem, -.v-tabsheet-spacertd div { +.#{$name}-tabitem, +.#{$name}-spacertd div { border: none; height: 32px; background: transparent repeat-x; @@ -25,23 +25,23 @@ color: #222; text-shadow: #fff 0 1px 0; } -.v-tabsheet-tabitem .v-caption { +.#{$name}-tabitem .v-caption { border: none; height: 23px; background: no-repeat right top; background-image: url(img/framed/tab-right.png); /** sprite-ref: verticals; sprite-alignment: right */ padding: 9px 8px 0 6px; } -.v-tabsheet-tabitem .v-caption-closable { +.#{$name}-tabitem .v-caption-closable { padding-right: 0; padding-left: 17px; } -.v-tabsheet-tabitem .v-captiontext { +.#{$name}-tabitem .v-captiontext { height: 16px; line-height: 16px; vertical-align:baseline; } -.v-tabsheet-caption-close { +.#{$name}-caption-close { float: right; width: 19px; height: 18px; @@ -55,70 +55,70 @@ font-size: 14px; font-weight: normal; } -.v-tabsheet-caption-close:hover { +.#{$name}-caption-close:hover { background-image: url(img/close-btn-hover.png); /** sprite-ref: verticals */ } -.v-tabsheet-caption-close:active { +.#{$name}-caption-close:active { background-image: url(img/close-btn-pressed.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitem-selected .v-tabsheet-caption-close { +.#{$name}-tabitem-selected .#{$name}-caption-close { background-image: url(img/close-btn-sel.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitem-selected .v-tabsheet-caption-close:hover { +.#{$name}-tabitem-selected .#{$name}-caption-close:hover { background-image: url(img/close-btn-sel-hover.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitem-selected .v-tabsheet-caption-close:active { +.#{$name}-tabitem-selected .#{$name}-caption-close:active { background-image: url(img/close-btn-sel-pressed.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitemcell-selected { +.#{$name}-tabitemcell-selected { background-image: url(img/framed/tab-left-sel.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitemcell-selected-first { +.#{$name}-tabitemcell-selected-first { background-image: url(img/framed/tab-first-left-sel.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabitem-selected { +.#{$name}-tabitem-selected { background-image: url(img/framed/tab-bg-sel.png); /** sprite-ref: verticals; sprite-alignment: repeat */ color: #232930; } -.v-tabsheet-tabitem-selected .v-caption { +.#{$name}-tabitem-selected .v-caption { background-image: url(img/framed/tab-right-sel.png); /** sprite-ref: verticals; sprite-alignment: right */ } -.v-tabsheet-spacertd div { +.#{$name}-spacertd div { margin-right: 4px; } -.v-tabsheet-spacertd { +.#{$name}-spacertd { background: transparent no-repeat right top; background-image: url(img/framed/tab-spacer-right.png); /** sprite-ref: verticals; sprite-alignment: right */ } -.blue .v-tabsheet-content { +.blue .#{$name}-content { border-color: #a8bcc5; } -.v-tabsheet-content, -.white .v-tabsheet-content { +.#{$name}-content, +.white .#{$name}-content { border: 1px solid #dcdcdc; border-bottom: none; border-top: none; color: #222; text-shadow: none; } -.v-tabsheet-tabsheetpanel { +.#{$name}-tabsheetpanel { background: #fff; } -.v-sa .v-tabsheet-content { +.v-sa .#{$name}-content { border-color: rgba(0,0,0,.1); } -.blue .v-tabsheet-deco { +.blue .#{$name}-deco { border-color: #92a3ac; background: #adc2cd; } -.v-tabsheet-deco, -.white .v-tabsheet-deco { +.#{$name}-deco, +.white .#{$name}-deco { height: 1px; border-top: 1px solid #bebebe; background: #e2e2e2; overflow: hidden; } -.v-sa .v-tabsheet-deco { +.v-sa .#{$name}-deco { border-top-color: rgba(0,0,0,.1); background: rgba(0,0,0,.08); } @@ -126,31 +126,31 @@ /* Icons & error indicators */ -.v-tabsheet-tabs .v-icon, -.v-tabsheet-tabs .v-captiontext, -.v-tabsheet-tabs .v-errorindicator { +.#{$name}-tabs .v-icon, +.#{$name}-tabs .v-captiontext, +.#{$name}-tabs .v-errorindicator { display: inline; float: none; } -.v-sa .v-tabsheet-tabs .v-captiontext { +.v-sa .#{$name}-tabs .v-captiontext { display: inline-block; } -.v-tabsheet-tabs .v-icon { +.#{$name}-tabs .v-icon { width: 16px !important; height: 16px !important; } -.v-tabsheet-tabs .v-errorindicator { +.#{$name}-tabs .v-errorindicator { display: inline-block; width: 13px; height: 16px; background: transparent url(../common/icons/error.png) no-repeat 50%; } -.v-ie .v-tabsheet-tabs .v-errorindicator { +.v-ie .#{$name}-tabs .v-errorindicator { zoom: 1; display: inline; } -.v-ie8 .v-tabsheet-tabs .v-errorindicator, -.v-ie9 .v-tabsheet-tabs .v-errorindicator { +.v-ie8 .#{$name}-tabs .v-errorindicator, +.v-ie9 .#{$name}-tabs .v-errorindicator { display: inline-block; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-scroller.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-scroller.scss index 8f176e2150..b3f98098ef 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-scroller.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-scroller.scss @@ -1,8 +1,8 @@ -@mixin reindeer-tabsheet-scroller { +@mixin reindeer-tabsheet-scroller($name : v-tabsheet) { /* Tabsheet scroller styles */ -.v-tabsheet-scroller { +.#{$name}-scroller { height: 31px; margin-top: -31px; padding: 0 3px 0 4px; @@ -13,13 +13,13 @@ background: transparent url(img/framed/tab-bg.png) repeat-x left -1px; width: 36px; } -.v-tabsheet-scroller button { +.#{$name}-scroller button { margin-top: 7px; } -.v-tabsheet-scrollerPrev, -.v-tabsheet-scrollerNext, -.v-tabsheet-scrollerPrev-disabled, -.v-tabsheet-scrollerNext-disabled { +.#{$name}-scrollerPrev, +.#{$name}-scrollerNext, +.#{$name}-scrollerPrev-disabled, +.#{$name}-scrollerNext-disabled { border: none; background: transparent; background-image: url(img/tab-prev.png); /** sprite-ref: verticals */ @@ -27,26 +27,26 @@ height: 17px; overflow: hidden; } -.v-tabsheet-scroller button::-moz-focus-inner { +.#{$name}-scroller button::-moz-focus-inner { border: none; } -.v-tabsheet-scrollerNext { +.#{$name}-scrollerNext { background-image: url(img/tab-next.png); /** sprite-ref: verticals */ } -.v-tabsheet-scrollerPrev:active { +.#{$name}-scrollerPrev:active { background-image: url(img/tab-prev-pressed.png); /** sprite-ref: verticals */ } -.v-tabsheet-scrollerNext:active { +.#{$name}-scrollerNext:active { background-image: url(img/tab-next-pressed.png); /** sprite-ref: verticals */ } -.v-tabsheet-scrollerPrev-disabled, -.v-tabsheet-scrollerPrev-disabled:active { +.#{$name}-scrollerPrev-disabled, +.#{$name}-scrollerPrev-disabled:active { background-image: url(img/tab-prev-disabled.png); /** sprite-ref: verticals */ opacity: 1; filter: none; } -.v-tabsheet-scrollerNext-disabled, -.v-tabsheet-scrollerNext-disabled:active { +.#{$name}-scrollerNext-disabled, +.#{$name}-scrollerNext-disabled:active { background-image: url(img/tab-next-disabled.png); /** sprite-ref: verticals; sprite-margin-bottom: 1px */ opacity: 1; filter: none; diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-selected-closable-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-selected-closable-style.scss index d26a569c25..75ac111ec7 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-selected-closable-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-selected-closable-style.scss @@ -1,11 +1,11 @@ -@mixin reindeer-tabsheet-selected-closable-style { +@mixin reindeer-tabsheet-selected-closable-style($name : v-tabsheet) { -.v-tabsheet-tabs-selected-closable .v-tabsheet-tabitem .v-tabsheet-caption-close, -.v-tabsheet-tabs-selected-closable .v-tabsheet-tabitem:hover .v-tabsheet-caption-close { +.#{$name}-tabs-selected-closable .#{$name}-tabitem .#{$name}-caption-close, +.#{$name}-tabs-selected-closable .#{$name}-tabitem:hover .#{$name}-caption-close { visibility: hidden; } -.v-tabsheet-tabs-selected-closable .v-tabsheet-tabitem-selected .v-tabsheet-caption-close, -.v-tabsheet-tabs-selected-closable .v-tabsheet-tabitem-selected:hover .v-tabsheet-caption-close { +.#{$name}-tabs-selected-closable .#{$name}-tabitem-selected .#{$name}-caption-close, +.#{$name}-tabs-selected-closable .#{$name}-tabitem-selected:hover .#{$name}-caption-close { visibility: visible; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.scss index e4f098046c..61358b3723 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-small-style.scss @@ -1,42 +1,42 @@ -@mixin reindeer-tabsheet-small-style { +@mixin reindeer-tabsheet-small-style($name : v-tabsheet) { /** * Tabsheet bar style --------------- */ -.v-tabsheet-tabs-bar .v-tabsheet-tabitemcell, -.v-tabsheet-tabs-bar .v-tabsheet-spacertd { +.#{$name}-tabs-bar .#{$name}-tabitemcell, +.#{$name}-tabs-bar .#{$name}-spacertd { height: 20px; } -.v-tabsheet-tabs-bar .v-tabsheet-spacertd { +.#{$name}-tabs-bar .#{$name}-spacertd { background: transparent; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitemcell { +.#{$name}-tabs-bar .#{$name}-tabitemcell { background-image: url(img/bar/tab-left.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabs-bar .v-tabsheet-tabitemcell-first { +.#{$name}-tabs-bar .#{$name}-tabitemcell-first { padding-left: 6px; background-image: url(img/bar/tab-first-left.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem, -.v-tabsheet-tabs-bar .v-tabsheet-spacertd div { +.#{$name}-tabs-bar .#{$name}-tabitem, +.#{$name}-tabs-bar .#{$name}-spacertd div { height: 20px; background-image: url(img/bar/tab-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ font-size: 11px; margin: 0; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem .v-caption { +.#{$name}-tabs-bar .#{$name}-tabitem .v-caption { height: 18px; background-image: url(img/bar/tab-right.png); /** sprite-ref: verticals; sprite-alignment: right */ padding: 2px 12px 0 10px; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem .v-caption-closable, -.v-tabsheet-tabs-bar .v-tabsheet-tabitem-selected .v-caption-closable { +.#{$name}-tabs-bar .#{$name}-tabitem .v-caption-closable, +.#{$name}-tabs-bar .#{$name}-tabitem-selected .v-caption-closable { padding-right: 8px; padding-left: 14px; } -.v-tabsheet-tabs-bar .v-tabsheet-caption-close, -.v-tabsheet-tabs-bar .v-tabsheet-caption-close:hover, -.v-tabsheet-tabs-bar .v-tabsheet-caption-close:active { +.#{$name}-tabs-bar .#{$name}-caption-close, +.#{$name}-tabs-bar .#{$name}-caption-close:hover, +.#{$name}-tabs-bar .#{$name}-caption-close:active { text-indent: 0; background: transparent; margin-left: 3px; @@ -49,62 +49,62 @@ -webkit-border-radius: 7px; -moz-border-radius: 7px; } -.v-tabsheet-tabs-bar .v-tabsheet-caption-close { +.#{$name}-tabs-bar .#{$name}-caption-close { margin-top: 1px; } -.v-ff .v-tabsheet-tabs-bar .v-tabsheet-caption-close { +.v-ff .#{$name}-tabs-bar .#{$name}-caption-close { margin-top: -14px; } -.v-tabsheet-tabs-bar .v-tabsheet-caption-close:hover { +.#{$name}-tabs-bar .#{$name}-caption-close:hover { background: #bfbfbf; -webkit-box-shadow: 0 1px 0 #fff; } -.v-tabsheet-tabs-bar .v-tabsheet-caption-close:active { +.#{$name}-tabs-bar .#{$name}-caption-close:active { background: #a9a9a9; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem-selected .v-tabsheet-caption-close { +.#{$name}-tabs-bar .#{$name}-tabitem-selected .#{$name}-caption-close { color: #404142; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem-selected .v-tabsheet-caption-close:hover { +.#{$name}-tabs-bar .#{$name}-tabitem-selected .#{$name}-caption-close:hover { background: #5e666e; color: #fff; text-shadow: 0 -1px 0 #222; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem-selected .v-tabsheet-caption-close:active { +.#{$name}-tabs-bar .#{$name}-tabitem-selected .#{$name}-caption-close:active { background: #404142; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitemcell-selected { +.#{$name}-tabs-bar .#{$name}-tabitemcell-selected { background-image: url(img/bar/tab-left-sel.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabs-bar .v-tabsheet-tabitemcell-selected-first { +.#{$name}-tabs-bar .#{$name}-tabitemcell-selected-first { background-image: url(img/bar/tab-first-left-sel.png); /** sprite-ref: verticals */ } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem-selected { +.#{$name}-tabs-bar .#{$name}-tabitem-selected { background-image: url(img/bar/tab-bg-sel.png); /** sprite-ref: verticals; sprite-alignment: repeat */ color: #232930; } -.v-tabsheet-tabs-bar .v-tabsheet-tabitem-selected .v-caption { +.#{$name}-tabs-bar .#{$name}-tabitem-selected .v-caption { background-image: url(img/bar/tab-right-sel.png); /** sprite-ref: verticals; sprite-alignment: right */ } -.v-tabsheet-tabcontainer-bar .v-tabsheet-scroller { +.#{$name}-tabcontainer-bar .#{$name}-scroller { margin-top: -20px; height: 19px; border-right: none; background-image: url(img/bar/tab-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-tabsheet-tabcontainer-bar .v-tabsheet-scroller button { +.#{$name}-tabcontainer-bar .#{$name}-scroller button { margin-top: 1px; } -.v-tabsheet-content-bar, -.white .v-tabsheet-content-bar { +.#{$name}-content-bar, +.white .#{$name}-content-bar { border: none; } -.v-tabsheet-content-bar .v-tabsheet-tabsheetpanel { +.#{$name}-content-bar .#{$name}-tabsheetpanel { background: transparent; } -.v-tabsheet-deco-bar, -.white .v-tabsheet-deco-bar { +.#{$name}-deco-bar, +.white .#{$name}-deco-bar { height: 0; border: none; } diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet.scss index 8b9252cf68..35001daf4d 100644 --- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet.scss +++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet.scss @@ -8,7 +8,7 @@ @import "tabsheet-hover-closable-style.scss"; @mixin reindeer-tabsheet { - + // TODO use $exclude @include reindeer-tabsheet-normal-style; @include reindeer-tabsheet-scroller; @include reindeer-tabsheet-borderless-style; diff --git a/WebContent/VAADIN/themes/reindeer/textfield/textfield.scss b/WebContent/VAADIN/themes/reindeer/textfield/textfield.scss index 7350f699f9..7cd8166aa6 100644 --- a/WebContent/VAADIN/themes/reindeer/textfield/textfield.scss +++ b/WebContent/VAADIN/themes/reindeer/textfield/textfield.scss @@ -1,16 +1,16 @@ -@mixin reindeer-textfield { +@mixin reindeer-textfield($name : v-textfield) { /* Textfield on blue background */ -.blue .v-textfield, +.blue .#{$name}, .blue .v-textarea { border-color: #92a2aa; border-top-color: #7c8a90; border-bottom-color: #a1b3bc; } /* Default & white background */ -.v-textfield, +.#{$name}, .v-textarea, -.white .v-textfield, +.white .#{$name}, .white .v-textarea { border: 1px solid #bcbdbe; border-top-color: #a2a3a4; @@ -31,19 +31,19 @@ height: auto; } /* Need more specific selector because of #2384 fixes in base/common/common.css */ -.v-app input.v-textfield, -.v-window input.v-textfield, +.v-app input.#{$name}, +.v-window input.#{$name}, .v-app textarea.v-textarea, .v-window textarea.v-textarea { padding: 3px 3px 4px; } -.v-app input.v-textfield.v-widget, -.v-window input.v-textfield.v-widget { +.v-app input.#{$name}.v-widget, +.v-window input.#{$name}.v-widget { height: 24px; } -.v-app .v-textfield-focus, -.v-window .v-textfield-focus, -.v-popupview-popup .v-textfield-focus, +.v-app .#{$name}-focus, +.v-window .#{$name}-focus, +.v-popupview-popup .#{$name}-focus, .v-app .v-textarea-focus, .v-window .v-textarea-focus, .v-popupview-popup .v-textarea-focus { @@ -53,13 +53,13 @@ outline: none; background-color: #fff; } -input.v-textfield-prompt, +input.#{$name}-prompt, textarea.v-textarea-prompt { font-style: normal; color: #999; } /* Small style textfield */ -.v-app input.v-textfield-small { +.v-app input.#{$name}-small { font-size: 11px; line-height: normal; height: auto; @@ -68,18 +68,18 @@ textarea.v-textarea-prompt { .v-app textarea.v-textarea-small { font-size: 11px; } -.v-app .v-table input.v-textfield.v-widget, -.v-window .v-table input.v-textfield.v-widget { +.v-app .v-table input.#{$name}.v-widget, +.v-window .v-table input.#{$name}.v-widget { padding: 1px 2px; height: auto; line-height: normal; } -.v-table-cell-wrapper > input.v-textfield { +.v-table-cell-wrapper > input.#{$name} { margin-top: -2px; margin-bottom: -2px; } /* Textfield on black background */ -.black .v-textfield, +.black .#{$name}, .black .v-textarea { border-color: #38393a; border-top-color: #2c2d2e; @@ -92,10 +92,10 @@ textarea.v-textarea-prompt { .black .v-textarea { background-image: none; } -.v-app .black .v-textfield-focus, -.v-window-black .v-textfield-focus, -.v-window .black .v-textfield-focus, -.v-popupview-popup .black .v-textfield-focus, +.v-app .black .#{$name}-focus, +.v-window-black .#{$name}-focus, +.v-window .black .#{$name}-focus, +.v-popupview-popup .black .#{$name}-focus, .v-app .black .v-textarea-focus, .v-window-black .v-textarea-focus, .v-window .black .v-textarea-focus, @@ -105,12 +105,12 @@ textarea.v-textarea-prompt { border-bottom-color: #507596; background-color: #151717; } -.black input.v-textfield-prompt { +.black input.#{$name}-prompt { color: #5f6366; } /* Readonly */ -input.v-textfield-readonly, -.black input.v-textfield-readonly, +input.#{$name}-readonly, +.black input.#{$name}-readonly, textarea.v-textarea-readonly, .black textarea.v-textarea-readonly { border: none; diff --git a/WebContent/VAADIN/themes/reindeer/tree/tree.scss b/WebContent/VAADIN/themes/reindeer/tree/tree.scss index 3a1ad35c81..da3b46dc65 100644 --- a/WebContent/VAADIN/themes/reindeer/tree/tree.scss +++ b/WebContent/VAADIN/themes/reindeer/tree/tree.scss @@ -1,20 +1,20 @@ -@mixin reindeer-tree { +@mixin reindeer-tree($name : v-tree) { -.v-tree-node { +.#{$name}-node { background: transparent url(img/arrows.png) no-repeat 6px -10px; } -.v-tree-node-expanded { +.#{$name}-node-expanded { background-position: -7px 5px; } -.v-tree-node-caption { +.#{$name}-node-caption { margin-left: 16px; padding-bottom: 1px; } -.v-tree-node span { +.#{$name}-node span { padding: 1px 2px; display: inline-block; } -.v-tree-node-selected span { +.#{$name}-node-selected span { background: #4d749f repeat-x; background-image: url(../common/img/sel-bg.png); /* sprite-ref: verticals; sprite-alignment: repeat */ color: #fff; @@ -24,31 +24,31 @@ text-shadow: #2b425a 0 1px 0; display: inline-block; } -.v-tree-node-children { +.#{$name}-node-children { padding-left: 16px; } -.v-tree-node-caption.v-tree-node-focused span{ +.#{$name}-node-caption.#{$name}-node-focused span{ padding-left: 1px; padding-top: 0px; padding-bottom: 0px; } -.v-tree-node-focused span{ +.#{$name}-node-focused span{ border: 1px dotted black; } /*************************************** * Drag'n'drop styles ***************************************/ -.v-tree .v-tree-node-drag-top { +.#{$name} .#{$name}-node-drag-top { background-position: 6px -11px; } -.v-tree .v-tree-node-drag-top.v-tree-node-expanded { +.#{$name} .#{$name}-node-drag-top.#{$name}-node-expanded { background-position: -7px 4px; } -.v-tree-connectors .v-tree-node-drag-top, -.v-tree-connectors .v-tree-node-expanded.v-tree-node-drag-top { +.#{$name}-connectors .#{$name}-node-drag-top, +.#{$name}-connectors .#{$name}-node-expanded.#{$name}-node-drag-top { background-position: 2px -53px; } -.v-tree-connectors .v-tree-node-drag-top.v-tree-node-leaf { +.#{$name}-connectors .#{$name}-node-drag-top.#{$name}-node-leaf { background-position: 2px 50%; } diff --git a/WebContent/VAADIN/themes/reindeer/window/window.scss b/WebContent/VAADIN/themes/reindeer/window/window.scss index ac8fa9c2c9..c3ad0fc9be 100644 --- a/WebContent/VAADIN/themes/reindeer/window/window.scss +++ b/WebContent/VAADIN/themes/reindeer/window/window.scss @@ -1,25 +1,25 @@ -@mixin reindeer-window { +@mixin reindeer-window($name : v-window) { -.v-window { +.#{$name} { background: transparent; } -.v-window-wrap { +.#{$name}-wrap { border: 1px solid #808386; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } -.v-sa .v-window-wrap, -.v-op .v-window-wrap { +.v-sa .#{$name}-wrap, +.v-op .#{$name}-wrap { border-color: rgba(0,0,0,.2); } -.v-window-outerheader { +.#{$name}-outerheader { padding: 12px 32px 0 14px; height: 37px; background: black repeat-x; background-image: url(img/header-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } -.v-window-header { +.#{$name}-header { font-weight: bold; font-size: 12px; line-height: normal; @@ -30,24 +30,24 @@ text-overflow: ellipsis; -ms-text-overflow: ellipsis; } -.v-window-error .v-window-header { +.#{$name}-error .#{$name}-header { padding-left: 13px; background: transparent url(../common/icons/error.png) no-repeat 0 50%; } -.v-window-resizebox { +.#{$name}-resizebox { width: 15px; height: 15px; cursor: se-resize; background: transparent; background-image: url(img/resize.png); /** sprite-ref: verticals */ } -.v-window-footer { +.#{$name}-footer { background-color:white; background-repeat: repeat-x; background-image: url(img/footer-bg.png); /** sprite-ref: verticals; sprite-alignment: repeat */ height: 15px; } -.v-window-closebox { +.#{$name}-closebox { top: 12px; right: 10px; width: 15px; @@ -55,16 +55,16 @@ background: transparent; background-image: url(img/close.png); /** sprite-ref: verticals */ } -.v-window-closebox:hover { +.#{$name}-closebox:hover { background-image: url(img/close-hover.png); /** sprite-ref: verticals */ } -.v-window-closebox:active { +.#{$name}-closebox:active { background-image: url(img/close-pressed.png); /** sprite-ref: verticals */ } -.v-window-contents { +.#{$name}-contents { background: #fff; } -.v-window-modalitycurtain { +.#{$name}-modalitycurtain { background: #56595b; } @@ -77,43 +77,43 @@ Light style window ----------------------------- **/ -.v-window-light .v-window-outerheader { +.#{$name}-light .#{$name}-outerheader { background: transparent; padding: 15px 32px 0 18px; height: 23px; } -.v-window-light .v-window-header { +.#{$name}-light .#{$name}-header { font-size: 16px; color: #292e34; text-shadow: none; } -.v-window-light .v-window-resizebox { +.#{$name}-light .#{$name}-resizebox { width: 12px; height: 12px; background-image: url(img/resize-light.png); /** sprite-ref: verticals */ } -.v-window-light .v-window-footer { +.#{$name}-light .#{$name}-footer { background: transparent; height: 12px; } -.v-window-light .v-window-closebox { +.#{$name}-light .#{$name}-closebox { right: 1px; top: 17px; width: 19px; height: 15px; background-image: url(img/close-light.png); /** sprite-ref: verticals */ } -.v-window-light .v-window-closebox:hover { +.#{$name}-light .#{$name}-closebox:hover { background-image: url(img/close-light-hover.png); /** sprite-ref: verticals */ } -.v-window-light .v-window-closebox:active { +.#{$name}-light .#{$name}-closebox:active { background-image: url(img/close-light-pressed.png); /** sprite-ref: verticals */ } -.v-window-light .v-window-contents { +.#{$name}-light .#{$name}-contents { background: transparent; } /* This must be the last sprite added to the verticals-sprite image */ -.v-window-light .v-window-wrap2 { +.#{$name}-light .#{$name}-wrap2 { background: #f7f7f8 repeat-x; background-image: url(img/content-bg-light.png); /** sprite-ref: verticals; sprite-alignment: repeat */ } @@ -123,27 +123,27 @@ Black style window ----------------------------- **/ -.v-window-black .v-window-wrap { +.#{$name}-black .#{$name}-wrap { border-color: #2e3030; border-radius: 8px; -webkit-border-radius: 8px; -moz-border-radius: 8px; overflow: hidden; } -.v-sa .v-window-black .v-window-wrap, -.v-op .v-window-black .v-window-wrap { +.v-sa .#{$name}-black .#{$name}-wrap, +.v-op .#{$name}-black .#{$name}-wrap { border-color: rgba(0,0,0,.8); } -.v-window-black .v-window-wrap2 { +.#{$name}-black .#{$name}-wrap2 { background-color: #1d2021; -moz-border-radius: 7px; -webkit-border-radius: 7px; } -.v-sa .v-window-black .v-window-wrap2, -.v-op .v-window-black .v-window-wrap2 { +.v-sa .#{$name}-black .#{$name}-wrap2, +.v-op .#{$name}-black .#{$name}-wrap2 { background-color: rgba(29,32,33,.9); } -.v-window-black .v-window-outerheader { +.#{$name}-black .#{$name}-outerheader { height: auto; padding: 7px 14px; height: 15px; @@ -157,27 +157,27 @@ overflow: hidden; border: none; } -.v-window-black .v-window-header { +.#{$name}-black .#{$name}-header { font-size: 12px; font-weight: normal; color: #dddfe1; } -.v-window-black .v-window-closebox { +.#{$name}-black .#{$name}-closebox { top: 8px; } -.v-window-black .v-window-footer { +.#{$name}-black .#{$name}-footer { background: transparent; border: none; height: 14px; } -.v-window-black .v-window-resizebox { +.#{$name}-black .#{$name}-resizebox { background: transparent no-repeat; background-image: url(img/black/resize.png); /** sprite-ref: black-verticals; sprite-margin-bottom: 4px */ width: 14px; height: 14px; } /* Must be last to make this image last in the sprites */ -.v-window-black .v-window-contents { +.#{$name}-black .#{$name}-contents { border: none; background: transparent repeat-x; background-image: url(img/black/content-bg.png); /** sprite-ref: black-verticals; sprite-alignment: repeat */ diff --git a/WebContent/VAADIN/themes/runo/runo.scss b/WebContent/VAADIN/themes/runo/runo.scss index 9ef3ed118a..6db7c335cb 100644 --- a/WebContent/VAADIN/themes/runo/runo.scss +++ b/WebContent/VAADIN/themes/runo/runo.scss @@ -1,4 +1,4 @@ -// this file just defines all runo mixins by importing them +@import "../base/base.scss"; @import "absolutelayout/absolutelayout.scss"; @import "accordion/accordion.scss"; @@ -25,3 +25,36 @@ @import "textfield/textfield.scss"; @import "tree/tree.scss"; @import "window/window.scss"; + +@mixin runo { + // TODO move? + @include base; + // TODO each + @include runo-absolutelayout; + @include runo-accordion; + @include runo-button; + @include runo-caption; + + @include runo-common; + + @include runo-datefield; + @include runo-formlayout; + @include runo-gridlayout; + @include runo-label; + @include runo-link; + @include runo-menubar; + @include runo-notification; + @include runo-orderedlayout; + @include runo-panel; + @include runo-popupview; + @include runo-progressindicator; + @include runo-select; + @include runo-shadow; + @include runo-slider; + @include runo-splitpanel; + @include runo-table; + @include runo-tabsheet; + @include runo-textfield; + @include runo-tree; + @include runo-window; +}
\ No newline at end of file diff --git a/WebContent/VAADIN/themes/runo/styles.scss b/WebContent/VAADIN/themes/runo/styles.scss index 1bbe531b23..987b1425b6 100644 --- a/WebContent/VAADIN/themes/runo/styles.scss +++ b/WebContent/VAADIN/themes/runo/styles.scss @@ -1,32 +1,2 @@ -@import "../base/styles.scss"; @import "runo.scss"; - -// .v-theme-runo { -@include runo-absolutelayout; -@include runo-accordion; -@include runo-button; -@include runo-caption; - -@include runo-common; - -@include runo-datefield; -@include runo-formlayout; -@include runo-gridlayout; -@include runo-label; -@include runo-link; -@include runo-menubar; -@include runo-notification; -@include runo-orderedlayout; -@include runo-panel; -@include runo-popupview; -@include runo-progressindicator; -@include runo-select; -@include runo-shadow; -@include runo-slider; -@include runo-splitpanel; -@include runo-table; -@include runo-tabsheet; -@include runo-textfield; -@include runo-tree; -@include runo-window; -// } +@include runo;
\ No newline at end of file diff --git a/client-compiler/ivy.xml b/client-compiler/ivy.xml index e84657c3bf..1340ab2c5b 100644 --- a/client-compiler/ivy.xml +++ b/client-compiler/ivy.xml @@ -25,26 +25,31 @@ rev="${vaadin.version}" conf="build" /> <dependency org="com.vaadin" name="vaadin-client" rev="${vaadin.version}" conf="build" /> + <dependency org="commons-collections" name="commons-collections" rev="3.1" conf="build,ide -> default" /> <dependency org="ant" name="ant" rev="1.6.5" conf="build,ide -> default" /> <dependency org="net.sourceforge.cssparser" name="cssparser" - rev="0.9.5" /> - <dependency org="ant" name="ant" rev="1.6.5" /> - <dependency org="ant" name="ant-launcher" rev="1.6.5" /> - <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.11" /> + rev="0.9.5" conf="build,ide -> default" /> + <dependency org="ant" name="ant" rev="1.6.5" + conf="build,ide -> default" /> + <dependency org="ant" name="ant-launcher" rev="1.6.5" + conf="build,ide -> default" /> + <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.11" + conf="build,ide -> default" /> <dependency org="org.mortbay.jetty" name="jetty-util" - rev="6.1.11" /> + rev="6.1.11" conf="build,ide -> default" /> <dependency org="org.jdesktop" name="swing-worker" - rev="1.1" /> + rev="1.1" conf="build,ide -> default" /> <dependency org="commons-codec" name="commons-codec" - rev="1.3" /> - <dependency org="commons-io" name="commons-io" rev="1.4" /> + rev="1.3" conf="build,ide -> default" /> + <dependency org="commons-io" name="commons-io" rev="1.4" + conf="build,ide -> default" /> <dependency org="commons-lang" name="commons-lang" - rev="2.6" /> + rev="2.6" conf="build,ide -> default" /> <dependency org="org.apache.james" name="apache-mime4j" - rev="0.6" /> + rev="0.6" conf="build,ide -> default" /> </dependencies> </ivy-module> diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java index b1d31370b3..6ff51b3766 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java @@ -72,8 +72,6 @@ public abstract class AbstractComponentConnector extends AbstractConnector getConnection().getVTooltip().connectHandlersToWidget(getWidget()); - // Set the core 'v' style name for the widget - getWidget().setStyleName(StyleConstants.UI_WIDGET, true); } /** @@ -272,6 +270,16 @@ public abstract class AbstractComponentConnector extends AbstractConnector ComponentState state = getState(); String primaryStyleName = getWidget().getStylePrimaryName(); + if (state.primaryStyleName != null) { + /* + * We overwrite the widgets primary stylename if state defines a + * primary stylename. Clears all previous stylenames. + */ + getWidget().setStylePrimaryName(state.primaryStyleName); + } + + // Set the core 'v' style name for the widget + setWidgetStyleName(StyleConstants.UI_WIDGET, true); // should be in AbstractFieldConnector ? // add / remove read-only style name diff --git a/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java index 229ef7b676..1f5b58bef3 100644 --- a/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java +++ b/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java @@ -45,8 +45,8 @@ public class VAbsoluteLayout extends ComplexPanel { public VAbsoluteLayout() { setElement(Document.get().createDivElement()); - setStyleName(StyleConstants.UI_LAYOUT); - addStyleName(CLASSNAME); + setStyleName(CLASSNAME); + addStyleName(StyleConstants.UI_LAYOUT); marginElement = Document.get().createDivElement(); canvas.getStyle().setProperty("position", "relative"); canvas.getStyle().setProperty("overflow", "hidden"); diff --git a/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java b/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java index da2c981a8d..aac8151d96 100644 --- a/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java +++ b/client/src/com/vaadin/client/ui/browserframe/VBrowserFrame.java @@ -11,11 +11,13 @@ public class VBrowserFrame extends Widget { protected Element altElement; protected String altText; + public static final String CLASSNAME = "v-browserframe"; + public VBrowserFrame() { Element root = Document.get().createDivElement(); setElement(root); - setStylePrimaryName("v-browserframe"); + setStyleName(CLASSNAME); createAltTextElement(); } diff --git a/client/src/com/vaadin/client/ui/button/VButton.java b/client/src/com/vaadin/client/ui/button/VButton.java index d4cd40e2e9..52987b01c1 100644 --- a/client/src/com/vaadin/client/ui/button/VButton.java +++ b/client/src/com/vaadin/client/ui/button/VButton.java @@ -97,19 +97,31 @@ public class VButton extends FocusWidget implements ClickHandler { sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.FOCUSEVENTS | Event.KEYEVENTS); - setStyleName(CLASSNAME); - // Add a11y role "button" Accessibility.setRole(getElement(), Accessibility.ROLE_BUTTON); - wrapper.setClassName(getStylePrimaryName() + "-wrap"); getElement().appendChild(wrapper); - captionElement.setClassName(getStylePrimaryName() + "-caption"); wrapper.appendChild(captionElement); + setStyleName(CLASSNAME); + addClickHandler(this); } + @Override + public void setStyleName(String style) { + super.setStyleName(style); + wrapper.setClassName(getStylePrimaryName() + "-wrap"); + captionElement.setClassName(getStylePrimaryName() + "-caption"); + } + + @Override + public void setStylePrimaryName(String style) { + super.setStylePrimaryName(style); + wrapper.setClassName(getStylePrimaryName() + "-wrap"); + captionElement.setClassName(getStylePrimaryName() + "-caption"); + } + public void setText(String text) { captionElement.setInnerText(text); } diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java index bcab8e71fc..697ade43e7 100644 --- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.ui.combobox.VFilterSelect.FilterSelectSuggestion; import com.vaadin.client.ui.menubar.MenuItem; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.combobox.ComboBoxConstants; +import com.vaadin.shared.ui.combobox.ComboBoxState; import com.vaadin.shared.ui.combobox.FilteringMode; import com.vaadin.ui.ComboBox; @@ -246,6 +247,11 @@ public class ComboBoxConnector extends AbstractFieldConnector implements } @Override + public ComboBoxState getState() { + return (ComboBoxState) super.getState(); + } + + @Override public void layout() { VFilterSelect widget = getWidget(); if (widget.initDone) { diff --git a/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java b/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java index 203f982180..3e8cf396d7 100644 --- a/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/combobox/VFilterSelect.java @@ -835,7 +835,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, @Deprecated public static final FilteringMode FILTERINGMODE_CONTAINS = FilteringMode.CONTAINS; - private static final String CLASSNAME = "v-filterselect"; + public static final String CLASSNAME = "v-filterselect"; private static final String STYLE_NO_INPUT = "no-input"; protected int pageLength = 10; diff --git a/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java b/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java index 17666cce13..212a6307be 100644 --- a/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java +++ b/client/src/com/vaadin/client/ui/csslayout/VCssLayout.java @@ -33,8 +33,8 @@ public class VCssLayout extends FlowPanel { */ public VCssLayout() { super(); - setStyleName(StyleConstants.UI_LAYOUT); - addStyleName(CLASSNAME); + setStyleName(CLASSNAME); + addStyleName(StyleConstants.UI_LAYOUT); } /** diff --git a/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java index 2f2dd380d6..1800125402 100644 --- a/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.UIDL; import com.vaadin.client.ui.datefield.VCalendarPanel.FocusChangeListener; import com.vaadin.client.ui.datefield.VCalendarPanel.TimeChangeListener; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.datefield.InlineDateFieldState; import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.ui.InlineDateField; @@ -111,4 +112,9 @@ public class InlineDateFieldConnector extends AbstractDateFieldConnector { public VDateFieldCalendar getWidget() { return (VDateFieldCalendar) super.getWidget(); } + + @Override + public InlineDateFieldState getState() { + return (InlineDateFieldState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java index f5be276575..fbc7bcc88c 100644 --- a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java @@ -24,6 +24,7 @@ import com.vaadin.client.UIDL; import com.vaadin.client.ui.datefield.VCalendarPanel.FocusChangeListener; import com.vaadin.client.ui.datefield.VCalendarPanel.TimeChangeListener; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.datefield.PopupDateFieldState; import com.vaadin.shared.ui.datefield.Resolution; import com.vaadin.ui.DateField; @@ -123,6 +124,11 @@ public class PopupDateFieldConnector extends TextualDateConnector { } @Override + public PopupDateFieldState getState() { + return (PopupDateFieldState) super.getState(); + } + + @Override protected void setWidgetStyleName(String styleName, boolean add) { super.setWidgetStyleName(styleName, add); diff --git a/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java b/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java index ef4b53f9f4..ececdb6775 100644 --- a/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java @@ -19,6 +19,7 @@ package com.vaadin.client.ui.datefield; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.UIDL; import com.vaadin.shared.ui.datefield.Resolution; +import com.vaadin.shared.ui.datefield.TextualDateFieldState; public class TextualDateConnector extends AbstractDateFieldConnector { @@ -59,4 +60,9 @@ public class TextualDateConnector extends AbstractDateFieldConnector { public VTextualDate getWidget() { return (VTextualDate) super.getWidget(); } + + @Override + public TextualDateFieldState getState() { + return (TextualDateFieldState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java index 2a1b4dcc44..1b56a56fe8 100644 --- a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java +++ b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java @@ -39,6 +39,7 @@ import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.embedded.EmbeddedConstants; import com.vaadin.shared.ui.embedded.EmbeddedServerRpc; +import com.vaadin.shared.ui.embedded.EmbeddedState; import com.vaadin.ui.Embedded; @Connect(Embedded.class) @@ -221,6 +222,11 @@ public class EmbeddedConnector extends AbstractComponentConnector implements return (VEmbedded) super.getWidget(); } + @Override + public EmbeddedState getState() { + return (EmbeddedState) super.getState(); + } + protected final ClickEventHandler clickEventHandler = new ClickEventHandler( this) { diff --git a/client/src/com/vaadin/client/ui/flash/VFlash.java b/client/src/com/vaadin/client/ui/flash/VFlash.java index 1f94f21056..0f91ff88e7 100644 --- a/client/src/com/vaadin/client/ui/flash/VFlash.java +++ b/client/src/com/vaadin/client/ui/flash/VFlash.java @@ -8,6 +8,8 @@ import com.vaadin.client.Util; public class VFlash extends HTML { + public static final String CLASSNAME = "v-flash"; + protected String source; protected String altText; protected String classId; @@ -21,7 +23,7 @@ public class VFlash extends HTML { protected String height; public VFlash() { - setStylePrimaryName("v-flash"); + setStyleName(CLASSNAME); } public void setSource(String source) { diff --git a/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java b/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java index 1664a6568f..770499e9b5 100644 --- a/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java +++ b/client/src/com/vaadin/client/ui/gridlayout/VGridLayout.java @@ -71,8 +71,8 @@ public class VGridLayout extends ComplexPanel { spacingStyle.setPosition(Position.ABSOLUTE); getElement().appendChild(spacingMeasureElement); - setStyleName(StyleConstants.UI_LAYOUT); - addStyleName(CLASSNAME); + setStyleName(CLASSNAME); + addStyleName(StyleConstants.UI_LAYOUT); } private GridLayoutConnector getConnector() { diff --git a/client/src/com/vaadin/client/ui/image/VImage.java b/client/src/com/vaadin/client/ui/image/VImage.java index 51603a2e5f..b05357b547 100644 --- a/client/src/com/vaadin/client/ui/image/VImage.java +++ b/client/src/com/vaadin/client/ui/image/VImage.java @@ -4,7 +4,9 @@ import com.google.gwt.user.client.ui.Image; public class VImage extends Image { + public static final String CLASSNAME = "v-image"; + public VImage() { - setStylePrimaryName("v-image"); + setStylePrimaryName(CLASSNAME); } } diff --git a/client/src/com/vaadin/client/ui/link/LinkConnector.java b/client/src/com/vaadin/client/ui/link/LinkConnector.java index d7e5f0b25f..f970855769 100644 --- a/client/src/com/vaadin/client/ui/link/LinkConnector.java +++ b/client/src/com/vaadin/client/ui/link/LinkConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.ui.Icon; import com.vaadin.shared.ui.BorderStyle; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.link.LinkConstants; +import com.vaadin.shared.ui.link.LinkState; import com.vaadin.ui.Link; @Connect(Link.class) @@ -49,6 +50,11 @@ public class LinkConnector extends AbstractComponentConnector implements } @Override + public LinkState getState() { + return (LinkState) super.getState(); + } + + @Override public boolean delegateCaptionHandling() { return false; } diff --git a/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java b/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java index fcd1a3bdac..29030fbd7d 100644 --- a/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java +++ b/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java @@ -33,6 +33,7 @@ import com.vaadin.shared.ui.ComponentStateUtil; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; import com.vaadin.shared.ui.menubar.MenuBarConstants; +import com.vaadin.shared.ui.menubar.MenuBarState; @Connect(value = com.vaadin.ui.MenuBar.class, loadStyle = LoadStyle.LAZY) public class MenuBarConnector extends AbstractComponentConnector implements @@ -178,6 +179,11 @@ public class MenuBarConnector extends AbstractComponentConnector implements } @Override + public MenuBarState getState() { + return (MenuBarState) super.getState(); + } + + @Override public void layout() { getWidget().iLayout(); } diff --git a/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java b/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java index 75a4d3f893..6bcb2c8cbf 100644 --- a/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java +++ b/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java @@ -29,7 +29,7 @@ import com.vaadin.client.ui.Icon; import com.vaadin.shared.communication.FieldRpc.FocusAndBlurServerRpc; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.button.ButtonServerRpc; -import com.vaadin.shared.ui.button.ButtonState; +import com.vaadin.shared.ui.button.NativeButtonState; import com.vaadin.ui.NativeButton; @Connect(NativeButton.class) @@ -115,8 +115,8 @@ public class NativeButtonConnector extends AbstractComponentConnector implements } @Override - public ButtonState getState() { - return (ButtonState) super.getState(); + public NativeButtonState getState() { + return (NativeButtonState) super.getState(); } @Override diff --git a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java index b6581a8c02..0c3c06a270 100644 --- a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java +++ b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java @@ -26,6 +26,7 @@ import com.vaadin.client.UIDL; import com.vaadin.shared.EventId; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.optiongroup.OptionGroupConstants; +import com.vaadin.shared.ui.optiongroup.OptionGroupState; import com.vaadin.ui.OptionGroup; @Connect(OptionGroup.class) @@ -77,4 +78,9 @@ public class OptionGroupConnector extends OptionGroupBaseConnector { public VOptionGroup getWidget() { return (VOptionGroup) super.getWidget(); } + + @Override + public OptionGroupState getState() { + return (OptionGroupState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java index aa33e99f45..e6829563f9 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.orderedlayout; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.orderedlayout.HorizontalLayoutState; import com.vaadin.ui.HorizontalLayout; /** @@ -38,4 +39,9 @@ public class HorizontalLayoutConnector extends AbstractOrderedLayoutConnector { return (VHorizontalLayout) super.getWidget(); } + @Override + public HorizontalLayoutState getState() { + return (HorizontalLayoutState) super.getState(); + } + } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java index f80db5113f..b1ebebe1a9 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VHorizontalLayout.java @@ -15,18 +15,27 @@ */ package com.vaadin.client.ui.orderedlayout; +import com.vaadin.client.StyleConstants; + /** * Represents a layout where the children is ordered vertically */ public class VHorizontalLayout extends VOrderedLayout { - private static final String CLASSNAME = "v-horizontallayout"; + public static final String CLASSNAME = "v-horizontallayout"; /** * Default constructor */ public VHorizontalLayout() { - setVertical(false); - addStyleName(CLASSNAME); + super(false); + setStyleName(CLASSNAME); + } + + @Override + public void setStyleName(String style) { + super.setStyleName(style); + addStyleName(StyleConstants.UI_LAYOUT); + addStyleName("v-horizontal"); } } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java index a9397b39c2..e9cdc42b86 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java @@ -56,31 +56,9 @@ public class VOrderedLayout extends FlowPanel { private LayoutManager layoutManager; - /** - * Constructor - */ - public VOrderedLayout() { - setStyleName(StyleConstants.UI_LAYOUT); - setVertical(true); - } - /** - * Does the layout order its children horizontally or vertically - * - * @param vertical - * true to order the childer vertically, false to order them - * horizontally - * - */ - protected void setVertical(boolean vertical) { + public VOrderedLayout(boolean vertical) { this.vertical = vertical; - if (vertical) { - addStyleName("v-vertical"); - removeStyleName("v-horizontal"); - } else { - addStyleName("v-horizontal"); - removeStyleName("v-vertical"); - } } /** diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java index 17de447b9a..bea85f7cee 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VVerticalLayout.java @@ -15,18 +15,27 @@ */ package com.vaadin.client.ui.orderedlayout; +import com.vaadin.client.StyleConstants; + /** * Represents a layout where the children is ordered vertically */ public class VVerticalLayout extends VOrderedLayout { - private static final String CLASSNAME = "v-verticallayout"; + public static final String CLASSNAME = "v-verticallayout"; /** * Default constructor */ public VVerticalLayout() { - setVertical(true); - addStyleName(CLASSNAME); + super(true); + setStyleName(CLASSNAME); + } + + @Override + public void setStyleName(String style) { + super.setStyleName(style); + addStyleName(StyleConstants.UI_LAYOUT); + addStyleName("v-vertical"); } } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java index 13e9b3ecf7..d073e78c9c 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.orderedlayout; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.orderedlayout.VerticalLayoutState; import com.vaadin.ui.VerticalLayout; /** @@ -38,4 +39,8 @@ public class VerticalLayoutConnector extends AbstractOrderedLayoutConnector { return (VVerticalLayout) super.getWidget(); } + @Override + public VerticalLayoutState getState() { + return (VerticalLayoutState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java index c07bb59289..848e9068fe 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.splitpanel; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.splitpanel.HorizontalSplitPanelState; import com.vaadin.ui.HorizontalSplitPanel; @Connect(value = HorizontalSplitPanel.class, loadStyle = LoadStyle.EAGER) @@ -27,4 +28,9 @@ public class HorizontalSplitPanelConnector extends AbstractSplitPanelConnector { return (VSplitPanelHorizontal) super.getWidget(); } + @Override + public HorizontalSplitPanelState getState() { + return (HorizontalSplitPanelState) super.getState(); + } + } diff --git a/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java index 7a4c4cbb93..2a57be7523 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java @@ -17,6 +17,7 @@ package com.vaadin.client.ui.splitpanel; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.splitpanel.VerticalSplitPanelState; import com.vaadin.ui.VerticalSplitPanel; @Connect(value = VerticalSplitPanel.class, loadStyle = LoadStyle.EAGER) @@ -27,4 +28,9 @@ public class VerticalSplitPanelConnector extends AbstractSplitPanelConnector { return (VSplitPanelVertical) super.getWidget(); } + @Override + public VerticalSplitPanelState getState() { + return (VerticalSplitPanelState) super.getState(); + } + } diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java index a84a321653..e5e8cbb9ad 100644 --- a/client/src/com/vaadin/client/ui/table/TableConnector.java +++ b/client/src/com/vaadin/client/ui/table/TableConnector.java @@ -36,9 +36,9 @@ import com.vaadin.client.ui.AbstractComponentContainerConnector; import com.vaadin.client.ui.PostLayoutListener; import com.vaadin.client.ui.table.VScrollTable.ContextMenuDetails; import com.vaadin.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow; -import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.table.TableConstants; +import com.vaadin.shared.ui.table.TableState; @Connect(com.vaadin.ui.Table.class) public class TableConnector extends AbstractComponentContainerConnector @@ -212,10 +212,12 @@ public class TableConnector extends AbstractComponentContainerConnector showSavedContextMenu(contextMenuBeforeUpdate); if (!getWidget().isSelectable()) { - getWidget().scrollBody.addStyleName(VScrollTable.CLASSNAME + getWidget().scrollBody.addStyleName(getWidget() + .getStylePrimaryName() + "-body-noselection"); } else { - getWidget().scrollBody.removeStyleName(VScrollTable.CLASSNAME + getWidget().scrollBody.removeStyleName(getWidget() + .getStylePrimaryName() + "-body-noselection"); } @@ -338,8 +340,8 @@ public class TableConnector extends AbstractComponentContainerConnector } @Override - public AbstractFieldState getState() { - return (AbstractFieldState) super.getState(); + public TableState getState() { + return (TableState) super.getState(); } /** diff --git a/client/src/com/vaadin/client/ui/table/VScrollTable.java b/client/src/com/vaadin/client/ui/table/VScrollTable.java index 633f60be23..6a171c5b30 100644 --- a/client/src/com/vaadin/client/ui/table/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/table/VScrollTable.java @@ -35,6 +35,7 @@ import com.google.gwt.dom.client.Node; import com.google.gwt.dom.client.NodeList; import com.google.gwt.dom.client.Style; import com.google.gwt.dom.client.Style.Display; +import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.dom.client.Style.Position; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.dom.client.Style.Visibility; @@ -131,6 +132,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, ScrollHandler, VHasDropHandler, FocusHandler, BlurHandler, Focusable, ActionOwner { + public static final String STYLENAME = "v-table"; + public enum SelectMode { NONE(0), SINGLE(1), MULTI(2); private int id; @@ -146,9 +149,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private static final String ROW_HEADER_COLUMN_KEY = "0"; - public static final String CLASSNAME = "v-table"; - public static final String CLASSNAME_SELECTION_FOCUS = CLASSNAME + "-focus"; - private static final double CACHE_RATE_DEFAULT = 2; /** @@ -516,12 +516,10 @@ public class VScrollTable extends FlowPanel implements HasWidgets, public VScrollTable() { setMultiSelectMode(MULTISELECT_MODE_DEFAULT); - scrollBodyPanel.addStyleName(CLASSNAME + "-body-wrapper"); scrollBodyPanel.addFocusHandler(this); scrollBodyPanel.addBlurHandler(this); scrollBodyPanel.addScrollHandler(this); - scrollBodyPanel.addStyleName(CLASSNAME + "-body"); /* * Firefox auto-repeat works correctly only if we use a key press @@ -546,7 +544,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } }, ContextMenuEvent.getType()); - setStyleName(CLASSNAME); + setStyleName(STYLENAME); add(tHead); add(scrollBodyPanel); @@ -555,6 +553,43 @@ public class VScrollTable extends FlowPanel implements HasWidgets, rowRequestHandler = new RowRequestHandler(); } + @Override + public void setStyleName(String style) { + updateStyleNames(style, false); + } + + @Override + public void setStylePrimaryName(String style) { + updateStyleNames(style, true); + } + + private void updateStyleNames(String newStyle, boolean isPrimary) { + scrollBodyPanel + .removeStyleName(getStylePrimaryName() + "-body-wrapper"); + scrollBodyPanel.removeStyleName(getStylePrimaryName() + "-body"); + + if (scrollBody != null) { + scrollBody.removeStyleName(getStylePrimaryName() + + "-body-noselection"); + } + + if (isPrimary) { + super.setStylePrimaryName(newStyle); + } else { + super.setStyleName(newStyle); + } + + scrollBodyPanel.addStyleName(getStylePrimaryName() + "-body-wrapper"); + scrollBodyPanel.addStyleName(getStylePrimaryName() + "-body"); + + tHead.updateStyleNames(getStylePrimaryName()); + tFoot.updateStyleNames(getStylePrimaryName()); + + if (scrollBody != null) { + scrollBody.updateStyleNames(getStylePrimaryName()); + } + } + public void init(ApplicationConnection client) { this.client = client; // Add a handler to clear saved context menu details when the menu @@ -1941,7 +1976,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private void announceScrollPosition() { if (scrollPositionElement == null) { scrollPositionElement = DOM.createDiv(); - scrollPositionElement.setClassName(CLASSNAME + "-scrollposition"); + scrollPositionElement.setClassName(getStylePrimaryName() + + "-scrollposition"); scrollPositionElement.getStyle().setPosition(Position.ABSOLUTE); scrollPositionElement.getStyle().setDisplay(Display.NONE); getElement().appendChild(scrollPositionElement); @@ -2180,24 +2216,15 @@ public class VScrollTable extends FlowPanel implements HasWidgets, public HeaderCell(String colId, String headerText) { cid = colId; - DOM.setElementProperty(colResizeWidget, "className", CLASSNAME - + "-resizer"); - setText(headerText); - DOM.appendChild(td, colResizeWidget); - - DOM.setElementProperty(sortIndicator, "className", CLASSNAME - + "-sort-indicator"); - DOM.appendChild(td, sortIndicator); - - DOM.setElementProperty(captionContainer, "className", CLASSNAME - + "-caption-container"); + td.appendChild(colResizeWidget); // ensure no clipping initially (problem on column additions) - DOM.setStyleAttribute(captionContainer, "overflow", "visible"); + captionContainer.getStyle().setOverflow(Overflow.VISIBLE); - DOM.appendChild(td, captionContainer); + td.appendChild(sortIndicator); + td.appendChild(captionContainer); DOM.sinkEvents(td, Event.MOUSEEVENTS | Event.ONDBLCLICK | Event.ONCONTEXTMENU | Event.TOUCHEVENTS); @@ -2207,6 +2234,38 @@ public class VScrollTable extends FlowPanel implements HasWidgets, setAlign(ALIGN_LEFT); } + protected void updateStyleNames(String primaryStyleName) { + colResizeWidget.setClassName(primaryStyleName + "-resizer"); + sortIndicator.setClassName(primaryStyleName + "-sort-indicator"); + captionContainer.setClassName(primaryStyleName + + "-caption-container"); + if (sorted) { + if (sortAscending) { + setStyleName(primaryStyleName + "-header-cell-asc"); + } else { + setStyleName(primaryStyleName + "-header-cell-desc"); + } + } else { + setStyleName(primaryStyleName + "-header-cell"); + } + + final String ALIGN_PREFIX = primaryStyleName + + "-caption-container-align-"; + + switch (align) { + case ALIGN_CENTER: + captionContainer.addClassName(ALIGN_PREFIX + "center"); + break; + case ALIGN_RIGHT: + captionContainer.addClassName(ALIGN_PREFIX + "right"); + break; + default: + captionContainer.addClassName(ALIGN_PREFIX + "left"); + break; + } + + } + public void disableAutoWidthCalculation() { definedWidth = true; expandRatio = 0; @@ -2280,15 +2339,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private void setSorted(boolean sorted) { this.sorted = sorted; - if (sorted) { - if (sortAscending) { - this.setStyleName(CLASSNAME + "-header-cell-asc"); - } else { - this.setStyleName(CLASSNAME + "-header-cell-desc"); - } - } else { - this.setStyleName(CLASSNAME + "-header-cell"); - } + updateStyleNames(VScrollTable.this.getStylePrimaryName()); } /** @@ -2342,7 +2393,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, floatingCopyOfHeaderCell = DOM .getChild(floatingCopyOfHeaderCell, 2); DOM.setElementProperty(floatingCopyOfHeaderCell, "className", - CLASSNAME + "-header-drag"); + VScrollTable.this.getStylePrimaryName() + "-header-drag"); // otherwise might wrap or be cut if narrow column DOM.setStyleAttribute(floatingCopyOfHeaderCell, "width", "auto"); updateFloatingCopysPosition(DOM.getAbsoluteLeft(td), @@ -2590,24 +2641,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } public void setAlign(char c) { - final String ALIGN_PREFIX = CLASSNAME + "-caption-container-align-"; - if (align != c) { - captionContainer.removeClassName(ALIGN_PREFIX + "center"); - captionContainer.removeClassName(ALIGN_PREFIX + "right"); - captionContainer.removeClassName(ALIGN_PREFIX + "left"); - switch (c) { - case ALIGN_CENTER: - captionContainer.addClassName(ALIGN_PREFIX + "center"); - break; - case ALIGN_RIGHT: - captionContainer.addClassName(ALIGN_PREFIX + "right"); - break; - default: - captionContainer.addClassName(ALIGN_PREFIX + "left"); - break; - } - } align = c; + updateStyleNames(VScrollTable.this.getStylePrimaryName()); } public char getAlign() { @@ -2679,7 +2714,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets, RowHeadersHeaderCell() { super(ROW_HEADER_COLUMN_KEY, ""); - this.setStyleName(CLASSNAME + "-header-cell-rowheader"); + updateStyleNames(VScrollTable.this.getStylePrimaryName()); + } + + @Override + protected void updateStyleNames(String primaryStyleName) { + super.updateStyleNames(primaryStyleName); + setStyleName(primaryStyleName + "-header-cell-rowheader"); } @Override @@ -2714,12 +2755,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } DOM.setStyleAttribute(hTableWrapper, "overflow", "hidden"); - DOM.setElementProperty(hTableWrapper, "className", CLASSNAME - + "-header"); - - // TODO move styles to CSS - DOM.setElementProperty(columnSelector, "className", CLASSNAME - + "-column-selector"); DOM.setStyleAttribute(columnSelector, "display", "none"); DOM.appendChild(table, headerTableBody); @@ -2730,14 +2765,21 @@ public class VScrollTable extends FlowPanel implements HasWidgets, DOM.appendChild(div, columnSelector); setElement(div); - setStyleName(CLASSNAME + "-header-wrap"); - DOM.sinkEvents(columnSelector, Event.ONCLICK); availableCells.put(ROW_HEADER_COLUMN_KEY, new RowHeadersHeaderCell()); } + protected void updateStyleNames(String primaryStyleName) { + hTableWrapper.setClassName(primaryStyleName + "-header"); + columnSelector.setClassName(primaryStyleName + "-column-selector"); + setStyleName(primaryStyleName + "-header-wrap"); + for (HeaderCell c : availableCells.values()) { + c.updateStyleNames(primaryStyleName); + } + } + public void resizeCaptionContainer(HeaderCell cell) { HeaderCell lastcell = getHeaderCell(visibleCells.size() - 1); @@ -3004,15 +3046,17 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private void focusSlot(int index) { removeSlotFocus(); if (index > 0) { - DOM.setElementProperty( - DOM.getFirstChild(DOM.getChild(tr, index - 1)), - "className", CLASSNAME + "-resizer " + CLASSNAME - + "-focus-slot-right"); + Element child = tr.getChild(index - 1).getFirstChild().cast(); + child.setClassName(VScrollTable.this.getStylePrimaryName() + + "-resizer"); + child.addClassName(VScrollTable.this.getStylePrimaryName() + + "-focus-slot-right"); } else { - DOM.setElementProperty( - DOM.getFirstChild(DOM.getChild(tr, index)), - "className", CLASSNAME + "-resizer " + CLASSNAME - + "-focus-slot-left"); + Element child = tr.getChild(index).getFirstChild().cast(); + child.setClassName(VScrollTable.this.getStylePrimaryName() + + "-resizer"); + child.addClassName(VScrollTable.this.getStylePrimaryName() + + "-focus-slot-left"); } focusedSlot = index; } @@ -3022,13 +3066,14 @@ public class VScrollTable extends FlowPanel implements HasWidgets, return; } if (focusedSlot == 0) { - DOM.setElementProperty( - DOM.getFirstChild(DOM.getChild(tr, focusedSlot)), - "className", CLASSNAME + "-resizer"); + Element child = tr.getChild(focusedSlot).getFirstChild().cast(); + child.setClassName(VScrollTable.this.getStylePrimaryName() + + "-resizer"); } else if (focusedSlot > 0) { - DOM.setElementProperty( - DOM.getFirstChild(DOM.getChild(tr, focusedSlot - 1)), - "className", CLASSNAME + "-resizer"); + Element child = tr.getChild(focusedSlot - 1).getFirstChild() + .cast(); + child.setClassName(VScrollTable.this.getStylePrimaryName() + + "-resizer"); } focusedSlot = -1; } @@ -3228,9 +3273,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, setText(headerText); - DOM.setElementProperty(captionContainer, "className", CLASSNAME - + "-footer-container"); - // ensure no clipping initially (problem on column additions) DOM.setStyleAttribute(captionContainer, "overflow", "visible"); @@ -3242,6 +3284,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets, | Event.ONCONTEXTMENU); setElement(td); + + updateStyleNames(VScrollTable.this.getStylePrimaryName()); + } + + protected void updateStyleNames(String primaryStyleName) { + captionContainer.setClassName(primaryStyleName + + "-footer-container"); } /** @@ -3555,8 +3604,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, public TableFooter() { DOM.setStyleAttribute(hTableWrapper, "overflow", "hidden"); - DOM.setElementProperty(hTableWrapper, "className", CLASSNAME - + "-footer"); DOM.appendChild(table, headerTableBody); DOM.appendChild(headerTableBody, tr); @@ -3565,10 +3612,18 @@ public class VScrollTable extends FlowPanel implements HasWidgets, DOM.appendChild(div, hTableWrapper); setElement(div); - setStyleName(CLASSNAME + "-footer-wrap"); - availableCells.put(ROW_HEADER_COLUMN_KEY, new RowHeadersFooterCell()); + + updateStyleNames(VScrollTable.this.getStylePrimaryName()); + } + + protected void updateStyleNames(String primaryStyleName) { + hTableWrapper.setClassName(primaryStyleName + "-footer"); + setStyleName(primaryStyleName + "-footer-wrap"); + for (FooterCell c : availableCells.values()) { + c.updateStyleNames(primaryStyleName); + } } @Override @@ -3872,14 +3927,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } private void constructDOM() { - DOM.setElementProperty(table, "className", CLASSNAME + "-table"); if (BrowserInfo.get().isIE()) { table.setPropertyInt("cellSpacing", 0); } - DOM.setElementProperty(preSpacer, "className", CLASSNAME - + "-row-spacer"); - DOM.setElementProperty(postSpacer, "className", CLASSNAME - + "-row-spacer"); table.appendChild(tBodyElement); DOM.appendChild(container, preSpacer); @@ -3893,7 +3943,17 @@ public class VScrollTable extends FlowPanel implements HasWidgets, "translate3d(0,0,0)"); } } + updateStyleNames(VScrollTable.this.getStylePrimaryName()); + } + protected void updateStyleNames(String primaryStyleName) { + table.setClassName(primaryStyleName + "-table"); + preSpacer.setClassName(primaryStyleName + "-row-spacer"); + postSpacer.setClassName(primaryStyleName + "-row-spacer"); + for (Widget w : renderedRows) { + VScrollTableRow row = (VScrollTableRow) w; + row.updateStyleNames(primaryStyleName); + } } public int getAvailableWidth() { @@ -4367,6 +4427,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, if (rows.getLength() == 0) { /* need to temporary add empty row and detect */ VScrollTableRow scrollTableRow = new VScrollTableRow(); + scrollTableRow.updateStyleNames(VScrollTable.this + .getStylePrimaryName()); tBodyElement.appendChild(scrollTableRow.getElement()); detectExtrawidth(); tBodyElement.removeChild(scrollTableRow.getElement()); @@ -4450,9 +4512,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private final TableRowElement rowElement; private int index; private Event touchStart; - private static final String ROW_CLASSNAME_EVEN = CLASSNAME + "-row"; - private static final String ROW_CLASSNAME_ODD = CLASSNAME - + "-row-odd"; + private static final int TOUCH_CONTEXT_MENU_TIMEOUT = 500; private Timer contextTouchTimeout; private Timer dragTouchTimeout; @@ -4461,6 +4521,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private TooltipInfo tooltipInfo = null; private Map<TableCellElement, TooltipInfo> cellToolTips = new HashMap<TableCellElement, TooltipInfo>(); private boolean isDragging = false; + private String rowStyle = null; private VScrollTableRow(int rowKey) { this.rowKey = rowKey; @@ -4480,10 +4541,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, */ getElement().getStyle().setProperty("visibility", "hidden"); - String rowStyle = uidl.getStringAttribute("rowstyle"); - if (rowStyle != null) { - addStyleName(CLASSNAME + "-row-" + rowStyle); - } + rowStyle = uidl.getStringAttribute("rowstyle"); + updateStyleNames(VScrollTable.this.getStylePrimaryName()); String rowDescription = uidl.getStringAttribute("rowdescr"); if (rowDescription != null && !rowDescription.equals("")) { @@ -4515,6 +4574,25 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } } + protected void updateStyleNames(String primaryStyleName) { + + if (getStylePrimaryName().contains("odd")) { + setStyleName(primaryStyleName + "-row-odd"); + } else { + setStyleName(primaryStyleName + "-row"); + } + + if (rowStyle != null) { + addStyleName(primaryStyleName + "-row-" + rowStyle); + } + + for (int i = 0; i < rowElement.getChildCount(); i++) { + TableCellElement cell = (TableCellElement) rowElement + .getChild(i); + updateCellStyleNames(cell, primaryStyleName); + } + } + public TooltipInfo getTooltipInfo() { return tooltipInfo; } @@ -4524,7 +4602,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets, */ public VScrollTableRow() { this(0); - addStyleName(CLASSNAME + "-row"); addCell(null, "_", 'b', "", true, false); } @@ -4635,12 +4712,16 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // // First remove any old styles so that both styles aren't // applied when indexes are updated. - removeStyleName(ROW_CLASSNAME_ODD); - removeStyleName(ROW_CLASSNAME_EVEN); + String primaryStyleName = getStylePrimaryName(); + if (primaryStyleName != null && !primaryStyleName.equals("")) { + removeStyleName(getStylePrimaryName()); + } if (!isOdd) { - addStyleName(ROW_CLASSNAME_ODD); + addStyleName(VScrollTable.this.getStylePrimaryName() + + "-row-odd"); } else { - addStyleName(ROW_CLASSNAME_EVEN); + addStyleName(VScrollTable.this.getStylePrimaryName() + + "-row"); } } @@ -4676,15 +4757,22 @@ public class VScrollTable extends FlowPanel implements HasWidgets, String style, boolean textIsHTML, boolean sorted, String description, final TableCellElement td) { final Element container = DOM.createDiv(); - String className = CLASSNAME + "-cell-content"; + container.setClassName(VScrollTable.this.getStylePrimaryName() + + "-cell-wrapper"); + + td.setClassName(VScrollTable.this.getStylePrimaryName() + + "-cell-content"); + if (style != null && !style.equals("")) { - className += " " + CLASSNAME + "-cell-content-" + style; + td.addClassName(VScrollTable.this.getStylePrimaryName() + + "-cell-content-" + style); } + if (sorted) { - className += " " + CLASSNAME + "-cell-content-sorted"; + td.addClassName(VScrollTable.this.getStylePrimaryName() + + "-cell-content-sorted"); } - td.setClassName(className); - container.setClassName(CLASSNAME + "-cell-wrapper"); + if (textIsHTML) { container.setInnerHTML(text); } else { @@ -4713,6 +4801,20 @@ public class VScrollTable extends FlowPanel implements HasWidgets, getElement().appendChild(td); } + protected void updateCellStyleNames(TableCellElement td, + String primaryStyleName) { + Element container = td.getFirstChild().cast(); + container.setClassName(primaryStyleName + "-cell-wrapper"); + + /* + * Replace old primary style name with new one + */ + String className = td.getClassName(); + String oldPrimaryName = className.split("-cell-content")[0]; + td.setClassName(className.replaceAll(oldPrimaryName, + primaryStyleName)); + } + public void addCell(UIDL rowUidl, Widget w, char align, String style, boolean sorted) { final TableCellElement td = DOM.createTD().cast(); @@ -4722,15 +4824,19 @@ public class VScrollTable extends FlowPanel implements HasWidgets, protected void initCellWithWidget(Widget w, char align, String style, boolean sorted, final TableCellElement td) { final Element container = DOM.createDiv(); - String className = CLASSNAME + "-cell-content"; + String className = VScrollTable.this.getStylePrimaryName() + + "-cell-content"; if (style != null && !style.equals("")) { - className += " " + CLASSNAME + "-cell-content-" + style; + className += " " + VScrollTable.this.getStylePrimaryName() + + "-cell-content-" + style; } if (sorted) { - className += " " + CLASSNAME + "-cell-content-sorted"; + className += " " + VScrollTable.this.getStylePrimaryName() + + "-cell-content-sorted"; } td.setClassName(className); - container.setClassName(CLASSNAME + "-cell-wrapper"); + container.setClassName(VScrollTable.this.getStylePrimaryName() + + "-cell-wrapper"); // TODO most components work with this, but not all (e.g. // Select) // Old comment: make widget cells respect align. @@ -6319,7 +6425,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } private void deEmphasis() { - UIObject.setStyleName(getElement(), CLASSNAME + "-drag", false); + UIObject.setStyleName(getElement(), + VScrollTable.this.getStylePrimaryName() + "-drag", false); if (lastEmphasized == null) { return; } @@ -6344,7 +6451,8 @@ public class VScrollTable extends FlowPanel implements HasWidgets, */ private void emphasis(TableDDDetails details) { deEmphasis(); - UIObject.setStyleName(getElement(), CLASSNAME + "-drag", true); + UIObject.setStyleName(getElement(), + VScrollTable.this.getStylePrimaryName() + "-drag", true); // iterate old and new emphasized row for (Widget w : scrollBody.renderedRows) { VScrollTableRow row = (VScrollTableRow) w; @@ -6395,13 +6503,13 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // Remove previous selection if (focusedRow != null && focusedRow != row) { - focusedRow.removeStyleName(CLASSNAME_SELECTION_FOCUS); + focusedRow.removeStyleName(getStylePrimaryName()); } if (row != null) { // Apply focus style to new selection - row.addStyleName(CLASSNAME_SELECTION_FOCUS); + row.addStyleName(getStylePrimaryName() + "-focus"); /* * Trying to set focus on already focused row diff --git a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java index 9c30d1037d..aff5af2a95 100644 --- a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java +++ b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java @@ -25,6 +25,7 @@ import com.vaadin.client.Util; import com.vaadin.client.ui.SimpleManagedLayout; import com.vaadin.client.ui.layout.MayScrollChildren; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.tabsheet.TabsheetState; import com.vaadin.ui.TabSheet; @Connect(TabSheet.class) @@ -82,6 +83,11 @@ public class TabsheetConnector extends TabsheetBaseConnector implements } @Override + public TabsheetState getState() { + return (TabsheetState) super.getState(); + } + + @Override public void updateCaption(ComponentConnector component) { /* Tabsheet does not render its children's captions */ } diff --git a/client/src/com/vaadin/client/ui/tree/TreeConnector.java b/client/src/com/vaadin/client/ui/tree/TreeConnector.java index 10a3c0fb95..b7491f8d92 100644 --- a/client/src/com/vaadin/client/ui/tree/TreeConnector.java +++ b/client/src/com/vaadin/client/ui/tree/TreeConnector.java @@ -28,10 +28,10 @@ import com.vaadin.client.UIDL; import com.vaadin.client.Util; import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.client.ui.tree.VTree.TreeNode; -import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.MultiSelectMode; import com.vaadin.shared.ui.tree.TreeConstants; +import com.vaadin.shared.ui.tree.TreeState; import com.vaadin.ui.Tree; @Connect(Tree.class) @@ -262,8 +262,8 @@ public class TreeConnector extends AbstractComponentConnector implements } @Override - public AbstractFieldState getState() { - return (AbstractFieldState) super.getState(); + public TreeState getState() { + return (TreeState) super.getState(); } @Override diff --git a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java index 5bf1beaf16..4539fbd12a 100644 --- a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java +++ b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java @@ -23,6 +23,7 @@ import com.vaadin.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow; import com.vaadin.client.ui.treetable.VTreeTable.PendingNavigationEvent; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.treetable.TreeTableConstants; +import com.vaadin.shared.ui.treetable.TreeTableState; import com.vaadin.ui.TreeTable; @Connect(TreeTable.class) @@ -105,4 +106,9 @@ public class TreeTableConnector extends TableConnector { public VTreeTable getWidget() { return (VTreeTable) super.getWidget(); } + + @Override + public TreeTableState getState() { + return (TreeTableState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java b/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java index 745de9fe6c..f9767bb727 100644 --- a/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java +++ b/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java @@ -21,6 +21,7 @@ import com.vaadin.client.DirectionalManagedLayout; import com.vaadin.client.UIDL; import com.vaadin.client.ui.optiongroup.OptionGroupBaseConnector; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.twincolselect.TwinColSelectState; import com.vaadin.ui.TwinColSelect; @Connect(TwinColSelect.class) @@ -58,6 +59,11 @@ public class TwinColSelectConnector extends OptionGroupBaseConnector implements } @Override + public TwinColSelectState getState() { + return (TwinColSelectState) super.getState(); + } + + @Override public void layoutVertically() { if (isUndefinedHeight()) { getWidget().clearInternalHeights(); diff --git a/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java b/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java index cd985876df..494db81e40 100644 --- a/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java +++ b/client/src/com/vaadin/client/ui/twincolselect/VTwinColSelect.java @@ -48,7 +48,7 @@ import com.vaadin.shared.ui.twincolselect.TwinColSelectConstants; public class VTwinColSelect extends VOptionGroupBase implements KeyDownHandler, MouseDownHandler, DoubleClickHandler, SubPartAware { - private static final String CLASSNAME = "v-select-twincol"; + public static final String CLASSNAME = "v-select-twincol"; private static final int VISIBLE_COUNT = 10; diff --git a/client/src/com/vaadin/client/ui/video/VVideo.java b/client/src/com/vaadin/client/ui/video/VVideo.java index c1f5f1b353..2f9fbe44be 100644 --- a/client/src/com/vaadin/client/ui/video/VVideo.java +++ b/client/src/com/vaadin/client/ui/video/VVideo.java @@ -25,7 +25,7 @@ import com.vaadin.client.ui.VMediaBase; public class VVideo extends VMediaBase { - private static String CLASSNAME = "v-video"; + public static String CLASSNAME = "v-video"; private VideoElement video; diff --git a/server/src/com/vaadin/server/AbstractCommunicationManager.java b/server/src/com/vaadin/server/AbstractCommunicationManager.java index 0a3b18b86b..5852ff2a93 100644 --- a/server/src/com/vaadin/server/AbstractCommunicationManager.java +++ b/server/src/com/vaadin/server/AbstractCommunicationManager.java @@ -68,7 +68,6 @@ import com.vaadin.server.StreamVariable.StreamingEndEvent; import com.vaadin.server.StreamVariable.StreamingErrorEvent; import com.vaadin.server.Terminal.ErrorEvent; import com.vaadin.server.Terminal.ErrorListener; -import com.vaadin.server.VaadinRequest.BrowserDetails; import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.Connector; import com.vaadin.shared.JavaScriptConnectorState; @@ -86,7 +85,6 @@ import com.vaadin.ui.HasComponents; import com.vaadin.ui.UI; import com.vaadin.ui.UI.LegacyWindow; import com.vaadin.ui.Window; -import com.vaadin.util.CurrentInstance; /** * This is a common base class for the server-side implementations of the @@ -2430,16 +2428,13 @@ public abstract class AbstractCommunicationManager implements Serializable { try { assert UI.getCurrent() == null; - CombinedRequest combinedRequest = new CombinedRequest(request); - CurrentInstance.set(VaadinRequest.class, combinedRequest); - response.setContentType("application/json; charset=UTF-8"); - UI uI = getBrowserDetailsUI(combinedRequest); + UI uI = getBrowserDetailsUI(request); JSONObject params = new JSONObject(); params.put(UIConstants.UI_ID_PARAMETER, uI.getUIId()); - String initialUIDL = getInitialUIDL(combinedRequest, uI); + String initialUIDL = getInitialUIDL(request, uI); params.put("uidl", initialUIDL); // NOTE! GateIn requires, for some weird reason, getOutputStream @@ -2498,17 +2493,15 @@ public abstract class AbstractCommunicationManager implements Serializable { } // Check for an existing UI based on window.name - BrowserDetails browserDetails = request.getBrowserDetails(); - boolean hasBrowserDetails = browserDetails != null - && browserDetails.getLocation() != null; + + // Special parameter sent by vaadinBootstrap.js + String windowName = request.getParameter("wn"); Map<String, Integer> retainOnRefreshUIs = session .getPreserveOnRefreshUIs(); - if (hasBrowserDetails && !retainOnRefreshUIs.isEmpty()) { + if (windowName != null && !retainOnRefreshUIs.isEmpty()) { // Check for a known UI - @SuppressWarnings("null") - String windowName = browserDetails.getWindowName(); Integer retainedUIId = retainOnRefreshUIs.get(windowName); if (retainedUIId != null) { @@ -2550,7 +2543,6 @@ public abstract class AbstractCommunicationManager implements Serializable { // Remember if it should be remembered if (vaadinService.preserveUIOnRefresh(provider, event)) { // Remember this UI - String windowName = request.getBrowserDetails().getWindowName(); if (windowName == null) { getLogger().warning( "There is no window.name available for UI " + uiClass diff --git a/server/src/com/vaadin/server/CombinedRequest.java b/server/src/com/vaadin/server/CombinedRequest.java deleted file mode 100644 index 5cb5b674b6..0000000000 --- a/server/src/com/vaadin/server/CombinedRequest.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright 2011 Vaadin Ltd. - * - * Licensed 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. - */ - -package com.vaadin.server; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Locale; -import java.util.Map; - -import org.json.JSONException; - -/** - * A {@link VaadinRequest} with path and parameters from one request and - * {@link VaadinRequest.BrowserDetails} extracted from another request. - * - * This class is intended to be used for a two request initialization where the - * first request fetches the actual application page and the second request - * contains information extracted from the browser using javascript. - * - */ -public class CombinedRequest implements VaadinRequest { - - private final VaadinRequest secondRequest; - - /** - * Creates a new combined request based on the second request and some - * details from the first request. - * - * @param secondRequest - * the second request which will be used as the foundation of the - * combined request - * @throws JSONException - * if the initialParams parameter can not be decoded - */ - public CombinedRequest(VaadinRequest secondRequest) throws JSONException { - this.secondRequest = secondRequest; - } - - @Override - public String getParameter(String parameter) { - return secondRequest.getParameter(parameter); - } - - @Override - public Map<String, String[]> getParameterMap() { - return secondRequest.getParameterMap(); - } - - @Override - public int getContentLength() { - return secondRequest.getContentLength(); - } - - @Override - public InputStream getInputStream() throws IOException { - return secondRequest.getInputStream(); - } - - @Override - public Object getAttribute(String name) { - return secondRequest.getAttribute(name); - } - - @Override - public void setAttribute(String name, Object value) { - secondRequest.setAttribute(name, value); - } - - @Override - public String getRequestPathInfo() { - return secondRequest.getRequestPathInfo(); - } - - @Override - public WrappedSession getWrappedSession() { - return getWrappedSession(true); - } - - @Override - public WrappedSession getWrappedSession(boolean allowSessionCreation) { - return secondRequest.getWrappedSession(allowSessionCreation); - } - - @Override - public String getContentType() { - return secondRequest.getContentType(); - } - - @Override - public BrowserDetails getBrowserDetails() { - return new BrowserDetails() { - @Override - public URI getLocation() { - String location = secondRequest.getParameter("loc"); - if (location == null) { - return null; - } else { - try { - return new URI(location); - } catch (URISyntaxException e) { - throw new RuntimeException( - "Invalid location URI received from client", e); - } - } - } - - @Override - public String getWindowName() { - return secondRequest.getParameter("wn"); - } - - @Override - public WebBrowser getWebBrowser() { - return VaadinServiceSession.getCurrent().getBrowser(); - } - }; - } - - /** - * Gets the original second request. This can be used e.g. if a request - * parameter from the second request is required. - * - * @return the original second Vaadin request - */ - public VaadinRequest getSecondRequest() { - return secondRequest; - } - - @Override - public Locale getLocale() { - return secondRequest.getLocale(); - } - - @Override - public String getRemoteAddr() { - return secondRequest.getRemoteAddr(); - } - - @Override - public boolean isSecure() { - return secondRequest.isSecure(); - } - - @Override - public String getHeader(String name) { - return secondRequest.getHeader(name); - } - - @Override - public VaadinService getService() { - return secondRequest.getService(); - } - - @Override - public String getContextPath() { - return secondRequest.getContextPath(); - } -} diff --git a/server/src/com/vaadin/server/LegacyVaadinPortlet.java b/server/src/com/vaadin/server/LegacyVaadinPortlet.java index 0c6f7afd93..f186971f7c 100644 --- a/server/src/com/vaadin/server/LegacyVaadinPortlet.java +++ b/server/src/com/vaadin/server/LegacyVaadinPortlet.java @@ -54,7 +54,7 @@ public class LegacyVaadinPortlet extends VaadinPortlet { throws ServiceException { try { onVaadinSessionStarted( - VaadinPortletRequest.cast(event.getRequest()), + (VaadinPortletRequest) event.getRequest(), (VaadinPortletSession) event.getSession()); } catch (PortletException e) { throw new ServiceException(e); diff --git a/server/src/com/vaadin/server/Page.java b/server/src/com/vaadin/server/Page.java index ff0980d5fb..510bb4734b 100644 --- a/server/src/com/vaadin/server/Page.java +++ b/server/src/com/vaadin/server/Page.java @@ -26,7 +26,6 @@ import java.util.LinkedList; import java.util.List; import com.vaadin.event.EventRouter; -import com.vaadin.server.VaadinRequest.BrowserDetails; import com.vaadin.shared.ui.BorderStyle; import com.vaadin.shared.ui.ui.PageClientRpc; import com.vaadin.shared.ui.ui.UIConstants; @@ -433,9 +432,15 @@ public class Page implements Serializable { } public void init(VaadinRequest request) { - BrowserDetails browserDetails = request.getBrowserDetails(); - if (browserDetails != null) { - location = browserDetails.getLocation(); + // Extract special parameter sent by vaadinBootstrap.js + String loc = request.getParameter("loc"); + if (loc != null) { + try { + location = new URI(loc); + } catch (URISyntaxException e) { + throw new RuntimeException( + "Invalid location URI received from client", e); + } } } diff --git a/server/src/com/vaadin/server/PortletCommunicationManager.java b/server/src/com/vaadin/server/PortletCommunicationManager.java index 635202a074..8b1b14e568 100644 --- a/server/src/com/vaadin/server/PortletCommunicationManager.java +++ b/server/src/com/vaadin/server/PortletCommunicationManager.java @@ -55,8 +55,8 @@ public class PortletCommunicationManager extends AbstractCommunicationManager { public boolean handleRequest(VaadinServiceSession session, VaadinRequest request, VaadinResponse response) throws IOException { - PortletRequest portletRequest = VaadinPortletRequest.cast( - request).getPortletRequest(); + PortletRequest portletRequest = ((VaadinPortletRequest) request) + .getPortletRequest(); if (portletRequest instanceof RenderRequest) { return super.handleRequest(session, request, response); } else { @@ -86,9 +86,9 @@ public class PortletCommunicationManager extends AbstractCommunicationManager { throws JSONException, IOException { // fixed base theme to use - all portal pages with Vaadin // applications will load this exactly once - String portalTheme = VaadinPortletRequest.cast( - context.getRequest()).getPortalProperty( - VaadinPortlet.PORTAL_PARAMETER_VAADIN_THEME); + String portalTheme = ((VaadinPortletRequest) context + .getRequest()) + .getPortalProperty(VaadinPortlet.PORTAL_PARAMETER_VAADIN_THEME); if (portalTheme != null && !portalTheme.equals(context.getThemeName())) { String portalThemeUri = getThemeUri(context, portalTheme); diff --git a/server/src/com/vaadin/server/UnsupportedBrowserHandler.java b/server/src/com/vaadin/server/UnsupportedBrowserHandler.java index e9c081387a..cd3498fd57 100644 --- a/server/src/com/vaadin/server/UnsupportedBrowserHandler.java +++ b/server/src/com/vaadin/server/UnsupportedBrowserHandler.java @@ -37,17 +37,15 @@ public class UnsupportedBrowserHandler implements RequestHandler { public boolean handleRequest(VaadinServiceSession session, VaadinRequest request, VaadinResponse response) throws IOException { - if (request.getBrowserDetails() != null) { - // Check if the browser is supported - // If Chrome Frame is available we'll assume it's ok - WebBrowser b = request.getBrowserDetails().getWebBrowser(); - if (b.isTooOldToFunctionProperly() && !b.isChromeFrameCapable()) { - // bypass if cookie set - String c = request.getHeader("Cookie"); - if (c == null || !c.contains(FORCE_LOAD_COOKIE)) { - writeBrowserTooOldPage(request, response); - return true; // request handled - } + // Check if the browser is supported + // If Chrome Frame is available we'll assume it's ok + WebBrowser b = session.getBrowser(); + if (b.isTooOldToFunctionProperly() && !b.isChromeFrameCapable()) { + // bypass if cookie set + String c = request.getHeader("Cookie"); + if (c == null || !c.contains(FORCE_LOAD_COOKIE)) { + writeBrowserTooOldPage(request, response); + return true; // request handled } } @@ -64,7 +62,7 @@ public class UnsupportedBrowserHandler implements RequestHandler { protected void writeBrowserTooOldPage(VaadinRequest request, VaadinResponse response) throws IOException { Writer page = response.getWriter(); - WebBrowser b = request.getBrowserDetails().getWebBrowser(); + WebBrowser b = VaadinServiceSession.getCurrent().getBrowser(); page.write("<html><body><h1>I'm sorry, but your browser is not supported</h1>" + "<p>The version (" diff --git a/server/src/com/vaadin/server/VaadinPortlet.java b/server/src/com/vaadin/server/VaadinPortlet.java index 95178ade17..db1425ba12 100644 --- a/server/src/com/vaadin/server/VaadinPortlet.java +++ b/server/src/com/vaadin/server/VaadinPortlet.java @@ -184,7 +184,7 @@ public class VaadinPortlet extends GenericPortlet implements Constants { public void criticalNotification(VaadinRequest request, VaadinResponse response, String cap, String msg, String details, String outOfSyncURL) throws IOException { - portlet.criticalNotification(VaadinPortletRequest.cast(request), + portlet.criticalNotification((VaadinPortletRequest) request, (VaadinPortletResponse) response, cap, msg, details, outOfSyncURL); } diff --git a/server/src/com/vaadin/server/VaadinPortletRequest.java b/server/src/com/vaadin/server/VaadinPortletRequest.java index 08e809eed2..f4ad040321 100644 --- a/server/src/com/vaadin/server/VaadinPortletRequest.java +++ b/server/src/com/vaadin/server/VaadinPortletRequest.java @@ -18,7 +18,6 @@ package com.vaadin.server; import java.io.IOException; import java.io.InputStream; -import java.net.URI; import java.util.Locale; import java.util.Map; @@ -149,28 +148,6 @@ public class VaadinPortletRequest implements VaadinRequest { } @Override - public BrowserDetails getBrowserDetails() { - return new BrowserDetails() { - @Override - public URI getLocation() { - return null; - } - - @Override - public String getWindowName() { - return null; - } - - @Override - public WebBrowser getWebBrowser() { - VaadinPortletSession context = (VaadinPortletSession) VaadinServiceSession - .getCurrent(); - return context.getBrowser(); - } - }; - } - - @Override public Locale getLocale() { return request.getLocale(); } @@ -207,25 +184,6 @@ public class VaadinPortletRequest implements VaadinRequest { return vaadinService; } - /** - * Helper method to get a {@link VaadinPortletRequest} from a - * {@link VaadinRequest}. Aside from casting, this method also takes care of - * situations where there's another level of wrapping. - * - * @param request - * a Vaadin request - * @return a Vaadin portlet request - * @throws ClassCastException - * if the Vaadin request doesn't wrap a portlet request - */ - public static VaadinPortletRequest cast(VaadinRequest request) { - if (request instanceof CombinedRequest) { - CombinedRequest combinedRequest = (CombinedRequest) request; - request = combinedRequest.getSecondRequest(); - } - return (VaadinPortletRequest) request; - } - @Override public String getContextPath() { return request.getContextPath(); diff --git a/server/src/com/vaadin/server/VaadinPortletService.java b/server/src/com/vaadin/server/VaadinPortletService.java index 12bf45f43a..bc51fdd2a5 100644 --- a/server/src/com/vaadin/server/VaadinPortletService.java +++ b/server/src/com/vaadin/server/VaadinPortletService.java @@ -40,6 +40,12 @@ public class VaadinPortletService extends VaadinService { return portlet; } + private static String getPortalProperty(VaadinRequest request, + String portalParameterVaadinWidgetset) { + return ((VaadinPortletRequest) request) + .getPortalProperty(portalParameterVaadinWidgetset); + } + @Override public String getConfiguredWidgetset(VaadinRequest request) { @@ -50,7 +56,7 @@ public class VaadinPortletService extends VaadinService { if (widgetset == null) { // If no widgetset defined for the application, check the // portal property - widgetset = VaadinPortletRequest.cast(request).getPortalProperty( + widgetset = getPortalProperty(request, VaadinPortlet.PORTAL_PARAMETER_VAADIN_WIDGETSET); if ("com.vaadin.portal.gwt.PortalDefaultWidgetSet" .equals(widgetset)) { @@ -73,8 +79,8 @@ public class VaadinPortletService extends VaadinService { public String getConfiguredTheme(VaadinRequest request) { // is the default theme defined by the portal? - String themeName = VaadinPortletRequest.cast(request) - .getPortalProperty(Constants.PORTAL_PARAMETER_VAADIN_THEME); + String themeName = getPortalProperty(request, + Constants.PORTAL_PARAMETER_VAADIN_THEME); if (themeName == null) { // no, using the default theme defined by Vaadin @@ -91,9 +97,8 @@ public class VaadinPortletService extends VaadinService { @Override public String getStaticFileLocation(VaadinRequest request) { - String staticFileLocation = VaadinPortletRequest.cast(request) - .getPortalProperty( - Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH); + String staticFileLocation = getPortalProperty(request, + Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH); if (staticFileLocation != null) { // remove trailing slash if any while (staticFileLocation.endsWith(".")) { @@ -169,8 +174,7 @@ public class VaadinPortletService extends VaadinService { RequestType type = (RequestType) request.getAttribute(RequestType.class .getName()); if (type == null) { - type = getPortlet().getRequestType( - VaadinPortletRequest.cast(request)); + type = getPortlet().getRequestType((VaadinPortletRequest) request); request.setAttribute(RequestType.class.getName(), type); } return type; @@ -184,15 +188,9 @@ public class VaadinPortletService extends VaadinService { public static PortletRequest getCurrentPortletRequest() { VaadinRequest currentRequest = VaadinService.getCurrentRequest(); - try { - VaadinPortletRequest request = VaadinPortletRequest - .cast(currentRequest); - if (request != null) { - return request.getPortletRequest(); - } else { - return null; - } - } catch (ClassCastException e) { + if (currentRequest instanceof VaadinPortletRequest) { + return ((VaadinPortletRequest) currentRequest).getPortletRequest(); + } else { return null; } } @@ -223,7 +221,7 @@ public class VaadinPortletService extends VaadinService { @Override public String getMainDivId(VaadinServiceSession session, VaadinRequest request, Class<? extends UI> uiClass) { - PortletRequest portletRequest = VaadinPortletRequest.cast(request) + PortletRequest portletRequest = ((VaadinPortletRequest) request) .getPortletRequest(); /* * We need to generate a unique ID because some portals already create a diff --git a/server/src/com/vaadin/server/VaadinRequest.java b/server/src/com/vaadin/server/VaadinRequest.java index 650b5ad82b..f5786c9b80 100644 --- a/server/src/com/vaadin/server/VaadinRequest.java +++ b/server/src/com/vaadin/server/VaadinRequest.java @@ -19,7 +19,6 @@ package com.vaadin.server; import java.io.IOException; import java.io.InputStream; import java.io.Serializable; -import java.net.URI; import java.util.Locale; import java.util.Map; @@ -27,8 +26,6 @@ import javax.portlet.PortletRequest; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; -import com.vaadin.ui.UI; - /** * A generic request to the server, wrapping a more specific request type, e.g. * HttpServletReqest or PortletRequest. @@ -37,40 +34,6 @@ import com.vaadin.ui.UI; * @since 7.0.0 */ public interface VaadinRequest extends Serializable { - - /** - * Detailed information extracted from the browser. - * - * @see VaadinRequest#getBrowserDetails() - * @deprecated might be refactored or removed before 7.0.0 - */ - @Deprecated - public interface BrowserDetails extends Serializable { - /** - * Gets the URI in the browser address bar, including the fragment - * (Javascript window.location) - * - * @return the browser location URI - */ - public URI getLocation(); - - /** - * Gets the value of window.name from the browser. This can be used to - * keep track of the specific window between browser reloads. - * - * @return the string value of window.name in the browser - */ - public String getWindowName(); - - /** - * Gets a reference to the {@link WebBrowser} object containing - * additional information, e.g. screen size and the time zone offset. - * - * @return the web browser object - */ - public WebBrowser getWebBrowser(); - } - /** * Gets the named request parameter This is typically a HTTP GET or POST * parameter, though other request types might have other ways of @@ -216,24 +179,6 @@ public interface VaadinRequest extends Serializable { public String getContentType(); /** - * Gets detailed information about the browser from which the request - * originated. This consists of information that is not available from - * normal HTTP requests, but requires additional information to be extracted - * for instance using javascript in the browser. - * - * This information is only guaranteed to be available in some special - * cases, for instance in {@link UI#init(VaadinRequest)}. - * - * @return the browser details, or <code>null</code> if details are not - * available - * - * @see BrowserDetails - * @deprecated might be refactored or removed before 7.0.0 - */ - @Deprecated - public BrowserDetails getBrowserDetails(); - - /** * Gets locale information from the query, e.g. using the Accept-Language * header. * diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java index 68fca7b463..c4483b5f79 100644 --- a/server/src/com/vaadin/server/VaadinServlet.java +++ b/server/src/com/vaadin/server/VaadinServlet.java @@ -63,7 +63,7 @@ public class VaadinServlet extends HttpServlet implements Constants { public void criticalNotification(VaadinRequest request, VaadinResponse response, String cap, String msg, String details, String outOfSyncURL) throws IOException { - servlet.criticalNotification(VaadinServletRequest.cast(request), + servlet.criticalNotification((VaadinServletRequest) request, ((VaadinServletResponse) response), cap, msg, details, outOfSyncURL); } diff --git a/server/src/com/vaadin/server/VaadinServletRequest.java b/server/src/com/vaadin/server/VaadinServletRequest.java index 5a7e96763b..5b4b876244 100644 --- a/server/src/com/vaadin/server/VaadinServletRequest.java +++ b/server/src/com/vaadin/server/VaadinServletRequest.java @@ -16,8 +16,6 @@ package com.vaadin.server; -import java.net.URI; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpSession; @@ -83,44 +81,4 @@ public class VaadinServletRequest extends HttpServletRequestWrapper implements public VaadinServletService getService() { return vaadinService; } - - @Override - public BrowserDetails getBrowserDetails() { - return new BrowserDetails() { - @Override - public URI getLocation() { - return null; - } - - @Override - public String getWindowName() { - return null; - } - - @Override - public WebBrowser getWebBrowser() { - return VaadinServiceSession.getCurrent().getBrowser(); - } - }; - } - - /** - * Helper method to get a {@link VaadinServletRequest} from a - * {@link VaadinRequest}. Aside from casting, this method also takes care of - * situations where there's another level of wrapping. - * - * @param request - * a Vaadin request - * @return a Vaadin http servlet request - * @throws ClassCastException - * if the Vaadin request doesn't wrap a http servlet request - */ - public static VaadinServletRequest cast(VaadinRequest request) { - if (request instanceof CombinedRequest) { - CombinedRequest combinedRequest = (CombinedRequest) request; - request = combinedRequest.getSecondRequest(); - } - return (VaadinServletRequest) request; - } - }
\ No newline at end of file diff --git a/server/src/com/vaadin/server/VaadinServletService.java b/server/src/com/vaadin/server/VaadinServletService.java index 9992b3698d..faec287166 100644 --- a/server/src/com/vaadin/server/VaadinServletService.java +++ b/server/src/com/vaadin/server/VaadinServletService.java @@ -40,7 +40,7 @@ public class VaadinServletService extends VaadinService { @Override public String getStaticFileLocation(VaadinRequest request) { - HttpServletRequest servletRequest = VaadinServletRequest.cast(request); + VaadinServletRequest servletRequest = (VaadinServletRequest) request; String staticFileLocation; // if property is defined in configurations, use that staticFileLocation = getDeploymentConfiguration() @@ -146,8 +146,7 @@ public class VaadinServletService extends VaadinService { RequestType type = (RequestType) request.getAttribute(RequestType.class .getName()); if (type == null) { - type = getServlet().getRequestType( - VaadinServletRequest.cast(request)); + type = getServlet().getRequestType((VaadinServletRequest) request); request.setAttribute(RequestType.class.getName(), type); } return type; @@ -156,8 +155,7 @@ public class VaadinServletService extends VaadinService { @Override protected URL getApplicationUrl(VaadinRequest request) throws MalformedURLException { - return getServlet().getApplicationUrl( - VaadinServletRequest.cast(request)); + return getServlet().getApplicationUrl((VaadinServletRequest) request); } @Override @@ -168,15 +166,9 @@ public class VaadinServletService extends VaadinService { public static HttpServletRequest getCurrentServletRequest() { VaadinRequest currentRequest = VaadinService.getCurrentRequest(); - try { - VaadinServletRequest request = VaadinServletRequest - .cast(currentRequest); - if (request != null) { - return request.getHttpServletRequest(); - } else { - return null; - } - } catch (ClassCastException e) { + if (currentRequest instanceof VaadinServletRequest) { + return (VaadinServletRequest) currentRequest; + } else { return null; } } @@ -196,7 +188,7 @@ public class VaadinServletService extends VaadinService { String appId = null; try { URL appUrl = getServlet().getApplicationUrl( - VaadinServletRequest.cast(request)); + (VaadinServletRequest) request); appId = appUrl.getPath(); } catch (MalformedURLException e) { // Just ignore problem here diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index 57416e3a06..4a3aba3cf4 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -197,6 +197,16 @@ public abstract class AbstractComponent extends AbstractClientConnector } @Override + public void setPrimaryStyleName(String style) { + getState().primaryStyleName = style; + } + + @Override + public String getPrimaryStyleName() { + return getState().primaryStyleName; + } + + @Override public void addStyleName(String style) { if (style == null || "".equals(style)) { return; diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java index 320a9dc97c..186aaa0219 100644 --- a/server/src/com/vaadin/ui/Component.java +++ b/server/src/com/vaadin/ui/Component.java @@ -198,6 +198,35 @@ public interface Component extends ClientConnector, Sizeable, Serializable { public void removeStyleName(String style); /** + * Gets the primary style name of the component. See + * {@link Component#setPrimaryStyleName(String)} for a better description of + * the primary stylename. + */ + public String getPrimaryStyleName(); + + /** + * Changes the primary style name of the component. + * + * <p> + * The primary style name identifies the component when applying the CSS + * theme to the Component. By changing the style name all CSS rules targeted + * for that style name will no longer apply, and might result in the + * component not working as intended. + * </p> + * + * <p> + * To preserve the original style of the component when changing to a new + * primary style you should make your new primary style inherit the old + * primary style using the SASS @include directive. See more in the SASS + * tutorials. + * </p> + * + * @param style + * The new primary style name + */ + public void setPrimaryStyleName(String style); + + /** * Tests whether the component is enabled or not. A user can not interact * with disabled components. Disabled components are rendered in a style * that indicates the status, usually in gray color. Children of a disabled diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 0954bbec13..1ac4a6cba0 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -43,7 +43,6 @@ import com.vaadin.server.PaintTarget; import com.vaadin.server.Resource; import com.vaadin.server.UIProvider; import com.vaadin.server.VaadinRequest; -import com.vaadin.server.VaadinRequest.BrowserDetails; import com.vaadin.server.VaadinService; import com.vaadin.server.VaadinServiceSession; import com.vaadin.server.VaadinServlet; @@ -1003,8 +1002,7 @@ public abstract class UI extends AbstractComponentContainer implements * state of the UI is not properly set up when the constructor is invoked. * <p> * The {@link VaadinRequest} can be used to get information about the - * request that caused this UI to be created. {@link BrowserDetails} will be - * available in the request. + * request that caused this UI to be created. * </p> * * @param request diff --git a/shared/src/com/vaadin/shared/ComponentState.java b/shared/src/com/vaadin/shared/ComponentState.java index 7d286f39a0..2ecf09b422 100644 --- a/shared/src/com/vaadin/shared/ComponentState.java +++ b/shared/src/com/vaadin/shared/ComponentState.java @@ -39,6 +39,7 @@ public class ComponentState extends SharedState { public String caption = null; public List<String> styles = null; public String id = null; + public String primaryStyleName = null; /** * A set of event identifiers with registered listeners. */ diff --git a/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java b/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java index 283e827e6e..9a112dc763 100644 --- a/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/absolutelayout/AbsoluteLayoutState.java @@ -21,6 +21,10 @@ import java.util.Map; import com.vaadin.shared.ui.AbstractLayoutState; public class AbsoluteLayoutState extends AbstractLayoutState { + { + primaryStyleName = "v-absolutelayout"; + } + // Maps each component to a position public Map<String, String> connectorToCssPosition = new HashMap<String, String>(); }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java b/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java index 1c36420372..6f098e863e 100644 --- a/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java +++ b/shared/src/com/vaadin/shared/ui/browserframe/BrowserFrameState.java @@ -3,5 +3,7 @@ package com.vaadin.shared.ui.browserframe; import com.vaadin.shared.ui.AbstractEmbeddedState; public class BrowserFrameState extends AbstractEmbeddedState { - + { + primaryStyleName = "v-browserframe"; + } } diff --git a/shared/src/com/vaadin/shared/ui/button/ButtonState.java b/shared/src/com/vaadin/shared/ui/button/ButtonState.java index c144a8124f..e7272379bb 100644 --- a/shared/src/com/vaadin/shared/ui/button/ButtonState.java +++ b/shared/src/com/vaadin/shared/ui/button/ButtonState.java @@ -28,6 +28,9 @@ import com.vaadin.shared.ui.TabIndexState; * @since 7.0 */ public class ButtonState extends TabIndexState { + { + primaryStyleName = "v-button"; + } public boolean disableOnClick = false; public int clickShortcutKeyCode = 0; /** diff --git a/shared/src/com/vaadin/shared/ui/button/NativeButtonState.java b/shared/src/com/vaadin/shared/ui/button/NativeButtonState.java new file mode 100644 index 0000000000..bb7b535c02 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/button/NativeButtonState.java @@ -0,0 +1,7 @@ +package com.vaadin.shared.ui.button; + +public class NativeButtonState extends ButtonState { + { + primaryStyleName = "v-nativebutton"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java b/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java index b89270bee2..9f7388e21c 100644 --- a/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java +++ b/shared/src/com/vaadin/shared/ui/checkbox/CheckBoxState.java @@ -18,6 +18,9 @@ package com.vaadin.shared.ui.checkbox; import com.vaadin.shared.AbstractFieldState; public class CheckBoxState extends AbstractFieldState { - public boolean checked = false; + { + primaryStyleName = "v-checkbox"; + } + public boolean checked = false; }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java new file mode 100644 index 0000000000..a3c0c8e765 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/combobox/ComboBoxState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.combobox; + +import com.vaadin.shared.AbstractFieldState; + +public class ComboBoxState extends AbstractFieldState { + { + primaryStyleName = "v-filterselect"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java b/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java index 2fbc42ca0f..fa25f2840b 100644 --- a/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/csslayout/CssLayoutState.java @@ -22,5 +22,8 @@ import com.vaadin.shared.Connector; import com.vaadin.shared.ui.AbstractLayoutState; public class CssLayoutState extends AbstractLayoutState { + { + primaryStyleName = "v-csslayout"; + } public Map<Connector, String> childCss = new HashMap<Connector, String>(); }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java b/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java index e77ea5c068..07f69b691e 100644 --- a/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/customlayout/CustomLayoutState.java @@ -22,6 +22,9 @@ import com.vaadin.shared.Connector; import com.vaadin.shared.ui.AbstractLayoutState; public class CustomLayoutState extends AbstractLayoutState { + { + primaryStyleName = "v-customlayout"; + } public Map<Connector, String> childLocations = new HashMap<Connector, String>(); public String templateContents; public String templateName; diff --git a/shared/src/com/vaadin/shared/ui/datefield/InlineDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/InlineDateFieldState.java new file mode 100644 index 0000000000..879670effa --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/datefield/InlineDateFieldState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.datefield; + +import com.vaadin.shared.AbstractFieldState; + +public class InlineDateFieldState extends AbstractFieldState { + { + primaryStyleName = "v-datefield"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java new file mode 100644 index 0000000000..c0d3b20c28 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java @@ -0,0 +1,7 @@ +package com.vaadin.shared.ui.datefield; + +public class PopupDateFieldState extends TextualDateFieldState { + { + primaryStyleName = "v-datefield"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/datefield/TextualDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/TextualDateFieldState.java new file mode 100644 index 0000000000..d7c98fa457 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/datefield/TextualDateFieldState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.datefield; + +import com.vaadin.shared.AbstractFieldState; + +public class TextualDateFieldState extends AbstractFieldState { + { + primaryStyleName = "v-datefield"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/embedded/EmbeddedState.java b/shared/src/com/vaadin/shared/ui/embedded/EmbeddedState.java new file mode 100644 index 0000000000..2a85197d0a --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/embedded/EmbeddedState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.embedded; + +import com.vaadin.shared.ui.AbstractEmbeddedState; + +public class EmbeddedState extends AbstractEmbeddedState { + { + primaryStyleName = "v-embedded"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/flash/FlashState.java b/shared/src/com/vaadin/shared/ui/flash/FlashState.java index 50f0d63733..0c94850da7 100644 --- a/shared/src/com/vaadin/shared/ui/flash/FlashState.java +++ b/shared/src/com/vaadin/shared/ui/flash/FlashState.java @@ -5,6 +5,9 @@ import java.util.Map; import com.vaadin.shared.ui.AbstractEmbeddedState; public class FlashState extends AbstractEmbeddedState { + { + primaryStyleName = "v-flash"; + } public String classId; diff --git a/shared/src/com/vaadin/shared/ui/form/FormState.java b/shared/src/com/vaadin/shared/ui/form/FormState.java index f0e79ad38f..c48b68dd4a 100644 --- a/shared/src/com/vaadin/shared/ui/form/FormState.java +++ b/shared/src/com/vaadin/shared/ui/form/FormState.java @@ -19,6 +19,9 @@ import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.Connector; public class FormState extends AbstractFieldState { + { + primaryStyleName = "v-form"; + } public Connector layout; public Connector footer; }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java index ae54dc3765..e8a90adcd5 100644 --- a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java @@ -18,6 +18,9 @@ package com.vaadin.shared.ui.gridlayout; import com.vaadin.shared.ui.AbstractLayoutState; public class GridLayoutState extends AbstractLayoutState { + { + primaryStyleName = "v-gridlayout"; + } public boolean spacing = false; public int rows = 0; public int columns = 0; diff --git a/shared/src/com/vaadin/shared/ui/image/ImageState.java b/shared/src/com/vaadin/shared/ui/image/ImageState.java index 4296c76847..4e9fcf1d5e 100644 --- a/shared/src/com/vaadin/shared/ui/image/ImageState.java +++ b/shared/src/com/vaadin/shared/ui/image/ImageState.java @@ -3,5 +3,7 @@ package com.vaadin.shared.ui.image; import com.vaadin.shared.ui.AbstractEmbeddedState; public class ImageState extends AbstractEmbeddedState { - + { + primaryStyleName = "v-image"; + } } diff --git a/shared/src/com/vaadin/shared/ui/label/LabelState.java b/shared/src/com/vaadin/shared/ui/label/LabelState.java index a91aeb0aa1..2cccc310aa 100644 --- a/shared/src/com/vaadin/shared/ui/label/LabelState.java +++ b/shared/src/com/vaadin/shared/ui/label/LabelState.java @@ -18,6 +18,9 @@ package com.vaadin.shared.ui.label; import com.vaadin.shared.ComponentState; public class LabelState extends ComponentState { + { + primaryStyleName = "v-label"; + } public ContentMode contentMode = ContentMode.TEXT; public String text = ""; } diff --git a/shared/src/com/vaadin/shared/ui/link/LinkState.java b/shared/src/com/vaadin/shared/ui/link/LinkState.java new file mode 100644 index 0000000000..96b4600000 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/link/LinkState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.link; + +import com.vaadin.shared.ComponentState; + +public class LinkState extends ComponentState { + { + primaryStyleName = "v-link"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java b/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java new file mode 100644 index 0000000000..cf1ef99c06 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.menubar; + +import com.vaadin.shared.ComponentState; + +public class MenuBarState extends ComponentState { + { + primaryStyleName = "v-menubar"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java new file mode 100644 index 0000000000..855a0a3c08 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/optiongroup/OptionGroupState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.optiongroup; + +import com.vaadin.shared.AbstractFieldState; + +public class OptionGroupState extends AbstractFieldState { + { + primaryStyleName = "v-select-optiongroup"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java b/shared/src/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java new file mode 100644 index 0000000000..6af6f1c040 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/orderedlayout/HorizontalLayoutState.java @@ -0,0 +1,8 @@ +package com.vaadin.shared.ui.orderedlayout; + + +public class HorizontalLayoutState extends AbstractOrderedLayoutState { + { + primaryStyleName = "v-horizontallayout"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java b/shared/src/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java new file mode 100644 index 0000000000..a7054f683f --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/orderedlayout/VerticalLayoutState.java @@ -0,0 +1,7 @@ +package com.vaadin.shared.ui.orderedlayout; + +public class VerticalLayoutState extends AbstractOrderedLayoutState { + { + primaryStyleName = "v-verticallayout"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/panel/PanelState.java b/shared/src/com/vaadin/shared/ui/panel/PanelState.java index 878b921d55..9d502df8fe 100644 --- a/shared/src/com/vaadin/shared/ui/panel/PanelState.java +++ b/shared/src/com/vaadin/shared/ui/panel/PanelState.java @@ -18,6 +18,9 @@ package com.vaadin.shared.ui.panel; import com.vaadin.shared.ComponentState; public class PanelState extends ComponentState { + { + primaryStyleName = "v-panel"; + } public int tabIndex; public int scrollLeft, scrollTop; }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/slider/SliderState.java b/shared/src/com/vaadin/shared/ui/slider/SliderState.java index ca18f72b7a..481ee58855 100644 --- a/shared/src/com/vaadin/shared/ui/slider/SliderState.java +++ b/shared/src/com/vaadin/shared/ui/slider/SliderState.java @@ -3,6 +3,9 @@ package com.vaadin.shared.ui.slider; import com.vaadin.shared.AbstractFieldState; public class SliderState extends AbstractFieldState { + { + primaryStyleName = "v-slider"; + } public double value; diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java index 733f032726..8bddffdfd6 100644 --- a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java +++ b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java @@ -21,7 +21,6 @@ import com.vaadin.shared.ComponentState; import com.vaadin.shared.Connector; public class AbstractSplitPanelState extends ComponentState { - public Connector firstChild = null; public Connector secondChild = null; public SplitterState splitterState = new SplitterState(); diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java new file mode 100644 index 0000000000..4824f63838 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/splitpanel/HorizontalSplitPanelState.java @@ -0,0 +1,8 @@ +package com.vaadin.shared.ui.splitpanel; + + +public class HorizontalSplitPanelState extends AbstractSplitPanelState { + { + primaryStyleName = "v-splitpanel-horizontal"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java new file mode 100644 index 0000000000..901914cdea --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/splitpanel/VerticalSplitPanelState.java @@ -0,0 +1,7 @@ +package com.vaadin.shared.ui.splitpanel; + +public class VerticalSplitPanelState extends AbstractSplitPanelState { + { + primaryStyleName = "v-splitpanel-vertical"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/table/TableState.java b/shared/src/com/vaadin/shared/ui/table/TableState.java new file mode 100644 index 0000000000..8e772b7c92 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/table/TableState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.table; + +import com.vaadin.shared.AbstractFieldState; + +public class TableState extends AbstractFieldState { + { + primaryStyleName = "v-table"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java new file mode 100644 index 0000000000..a36acca9dc --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.tabsheet; + +import com.vaadin.shared.ComponentState; + +public class TabsheetState extends ComponentState { + { + primaryStyleName = "v-tabsheet"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java b/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java index a562c607b0..0b87f5293c 100644 --- a/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java +++ b/shared/src/com/vaadin/shared/ui/textarea/TextAreaState.java @@ -19,6 +19,9 @@ import com.vaadin.shared.annotations.DelegateToWidget; import com.vaadin.shared.ui.textfield.AbstractTextFieldState; public class TextAreaState extends AbstractTextFieldState { + { + primaryStyleName = "v-textarea"; + } /** * Number of visible rows in the text area. The default is 5. diff --git a/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java b/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java index 39265c516f..9ea8ded0a7 100644 --- a/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java +++ b/shared/src/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java @@ -18,6 +18,10 @@ package com.vaadin.shared.ui.textfield; import com.vaadin.shared.AbstractFieldState; public class AbstractTextFieldState extends AbstractFieldState { + { + primaryStyleName = "v-textfield"; + } + /** * Maximum character count in text field. */ diff --git a/shared/src/com/vaadin/shared/ui/tree/TreeState.java b/shared/src/com/vaadin/shared/ui/tree/TreeState.java new file mode 100644 index 0000000000..d2d09d41a3 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/tree/TreeState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.tree; + +import com.vaadin.shared.AbstractFieldState; + +public class TreeState extends AbstractFieldState { + { + primaryStyleName = "v-tree"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/treetable/TreeTableState.java b/shared/src/com/vaadin/shared/ui/treetable/TreeTableState.java new file mode 100644 index 0000000000..c8ab3371d3 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/treetable/TreeTableState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.treetable; + +import com.vaadin.shared.ui.table.TableState; + +public class TreeTableState extends TableState { + { + primaryStyleName = "v-table"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java new file mode 100644 index 0000000000..933c1812a0 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/twincolselect/TwinColSelectState.java @@ -0,0 +1,9 @@ +package com.vaadin.shared.ui.twincolselect; + +import com.vaadin.shared.AbstractFieldState; + +public class TwinColSelectState extends AbstractFieldState { + { + primaryStyleName = "v-select-twincol"; + } +} diff --git a/shared/src/com/vaadin/shared/ui/video/VideoState.java b/shared/src/com/vaadin/shared/ui/video/VideoState.java index 2e6e24a743..8d0bc7d8dd 100644 --- a/shared/src/com/vaadin/shared/ui/video/VideoState.java +++ b/shared/src/com/vaadin/shared/ui/video/VideoState.java @@ -18,5 +18,7 @@ package com.vaadin.shared.ui.video; import com.vaadin.shared.ui.AbstractMediaState; public class VideoState extends AbstractMediaState { - + { + primaryStyleName = "v-video"; + } } diff --git a/shared/src/com/vaadin/shared/ui/window/WindowState.java b/shared/src/com/vaadin/shared/ui/window/WindowState.java index c86b6cb187..7cac98584c 100644 --- a/shared/src/com/vaadin/shared/ui/window/WindowState.java +++ b/shared/src/com/vaadin/shared/ui/window/WindowState.java @@ -18,6 +18,9 @@ package com.vaadin.shared.ui.window; import com.vaadin.shared.ui.panel.PanelState; public class WindowState extends PanelState { + { + primaryStyleName = "v-window"; + } public boolean modal = false; public boolean resizable = true; public boolean resizeLazy = false; diff --git a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandler.java b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandler.java index c23afa7acc..d3e53c5cd4 100644 --- a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandler.java +++ b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandler.java @@ -26,7 +26,6 @@ import org.w3c.css.sac.SACMediaList; import com.vaadin.sass.ScssStylesheet; import com.vaadin.sass.parser.LexicalUnitImpl; import com.vaadin.sass.tree.ForNode; -import com.vaadin.sass.tree.MixinDefNode; import com.vaadin.sass.tree.VariableNode; import com.vaadin.sass.tree.WhileNode; import com.vaadin.sass.tree.controldirective.EachDefNode; @@ -40,8 +39,6 @@ public interface SCSSDocumentHandler extends DocumentHandler { void endMixinDirective(String name, Collection<VariableNode> args); - MixinDefNode mixinDirective(String name, String args, String body); - void debugDirective(); ForNode forDirective(String var, String from, String to, boolean exclusive, @@ -82,7 +79,7 @@ public interface SCSSDocumentHandler extends DocumentHandler { EachDefNode startEachDirective(String var, String listVariable); - void removeDirective(ArrayList<String> list, ArrayList<String> remove, + void removeDirective(String variable, String list, String remove, String separator); } diff --git a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java index c10d29aad9..4acbc8d4d6 100644 --- a/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java +++ b/theme-compiler/src/com/vaadin/sass/handler/SCSSDocumentHandlerImpl.java @@ -31,6 +31,7 @@ import com.vaadin.sass.parser.LexicalUnitImpl; import com.vaadin.sass.tree.BlockNode; import com.vaadin.sass.tree.CommentNode; import com.vaadin.sass.tree.ExtendNode; +import com.vaadin.sass.tree.FontFaceNode; import com.vaadin.sass.tree.ForNode; import com.vaadin.sass.tree.ImportNode; import com.vaadin.sass.tree.ListRemoveNode; @@ -171,12 +172,14 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler { @Override public void startFontFace() throws CSSException { - System.out.println("startFontFace()"); + FontFaceNode node = new FontFaceNode(); + nodeStack.peek().appendChild(node); + nodeStack.push(node); } @Override public void endFontFace() throws CSSException { - System.out.println("endFontFace()"); + nodeStack.pop(); } @Override @@ -211,12 +214,6 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler { } @Override - public MixinDefNode mixinDirective(String name, String args, String body) { - MixinDefNode node = new MixinDefNode(name, args, body); - return node; - } - - @Override public void startNestedProperties(String name) { NestPropertiesNode node = new NestPropertiesNode(name); nodeStack.peek().appendChild(node); @@ -307,9 +304,10 @@ public class SCSSDocumentHandlerImpl implements SCSSDocumentHandler { } @Override - public void removeDirective(ArrayList<String> list, - ArrayList<String> remove, String separator) { - ListRemoveNode node = new ListRemoveNode(list, remove, separator); + public void removeDirective(String variable, String list, String remove, + String separator) { + ListRemoveNode node = new ListRemoveNode(variable, list, remove, + separator); nodeStack.peek().appendChild(node); } } diff --git a/theme-compiler/src/com/vaadin/sass/parser/Parser.java b/theme-compiler/src/com/vaadin/sass/parser/Parser.java index e274195484..f5a2e4e432 100644 --- a/theme-compiler/src/com/vaadin/sass/parser/Parser.java +++ b/theme-compiler/src/com/vaadin/sass/parser/Parser.java @@ -1,37 +1,38 @@ /* Generated By:JavaCC: Do not edit this line. Parser.java */ package com.vaadin.sass.parser; -import java.io.BufferedInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.net.URL; +import java.io.*; +import java.net.*; import java.util.ArrayList; import java.util.Locale; +import java.util.Map; -import org.w3c.css.sac.CSSException; -import org.w3c.css.sac.CSSParseException; import org.w3c.css.sac.ConditionFactory; +import org.w3c.css.sac.Condition; +import org.w3c.css.sac.SelectorFactory; +import org.w3c.css.sac.SelectorList; +import org.w3c.css.sac.Selector; +import org.w3c.css.sac.SimpleSelector; import org.w3c.css.sac.DocumentHandler; -import org.w3c.css.sac.ErrorHandler; import org.w3c.css.sac.InputSource; -import org.w3c.css.sac.LexicalUnit; +import org.w3c.css.sac.ErrorHandler; +import org.w3c.css.sac.CSSException; +import org.w3c.css.sac.CSSParseException; import org.w3c.css.sac.Locator; -import org.w3c.css.sac.SelectorFactory; -import org.w3c.css.sac.SelectorList; -import org.w3c.flute.parser.selectors.ConditionFactoryImpl; +import org.w3c.css.sac.LexicalUnit; + import org.w3c.flute.parser.selectors.SelectorFactoryImpl; +import org.w3c.flute.parser.selectors.ConditionFactoryImpl; + import org.w3c.flute.util.Encoding; -import com.vaadin.sass.handler.SCSSDocumentHandlerImpl; -import com.vaadin.sass.tree.Node; -import com.vaadin.sass.tree.VariableNode; +import com.vaadin.sass.handler.*; + +import com.vaadin.sass.tree.*; /** * A CSS2 parser - * + * * @author Philippe Le H�garet * @version $Revision: 1.15 $ */ @@ -62,8 +63,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * @@TODO - * @exception CSSException - * Not yet implemented + * @exception CSSException Not yet implemented */ public void setLocale(Locale locale) throws CSSException { throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR); @@ -93,16 +93,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * Main parse methods - * - * @param source - * the source of the style sheet. - * @exception IOException - * the source can't be parsed. - * @exception CSSException - * the source is not CSS valid. + * + * @param source the source of the style sheet. + * @exception IOException the source can't be parsed. + * @exception CSSException the source is not CSS valid. */ - public void parseStyleSheet(InputSource source) throws CSSException, - IOException { + public void parseStyleSheet(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); if (selectorFactory == null) { @@ -117,31 +114,25 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * Convenient method for URIs. - * - * @param systemId - * the fully resolved URI of the style sheet. - * @exception IOException - * the source can't be parsed. - * @exception CSSException - * the source is not CSS valid. + * + * @param systemId the fully resolved URI of the style sheet. + * @exception IOException the source can't be parsed. + * @exception CSSException the source is not CSS valid. */ - public void parseStyleSheet(String systemId) throws CSSException, - IOException { + public void parseStyleSheet(String systemId) + throws CSSException, IOException { parseStyleSheet(new InputSource(systemId)); } /** - * This method parses only one rule (style rule or at-rule, except - * @charset). - * - * @param source - * the source of the rule. - * @exception IOException - * the source can't be parsed. - * @exception CSSException - * the source is not CSS valid. + * This method parses only one rule (style rule or at-rule, except @charset). + * + * @param source the source of the rule. + * @exception IOException the source can't be parsed. + * @exception CSSException the source is not CSS valid. */ - public void parseRule(InputSource source) throws CSSException, IOException { + public void parseRule(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); @@ -157,16 +148,13 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * This method parses a style declaration (including the surrounding curly * braces). - * - * @param source - * the source of the style declaration. - * @exception IOException - * the source can't be parsed. - * @exception CSSException - * the source is not CSS valid. + * + * @param source the source of the style declaration. + * @exception IOException the source can't be parsed. + * @exception CSSException the source is not CSS valid. */ - public void parseStyleDeclaration(InputSource source) throws CSSException, - IOException { + public void parseStyleDeclaration(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); @@ -181,7 +169,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * This methods returns "http://www.w3.org/TR/REC-CSS2". - * * @return the string "http://www.w3.org/TR/REC-CSS2". */ public String getParserVersion() { @@ -191,8 +178,8 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { /** * Parse methods used by DOM Level 2 implementation. */ - public void parseImportRule(InputSource source) throws CSSException, - IOException { + public void parseImportRule(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); @@ -205,8 +192,8 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { _parseImportRule(); } - public void parseMediaRule(InputSource source) throws CSSException, - IOException { + public void parseMediaRule(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); @@ -219,8 +206,8 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { _parseMediaRule(); } - public SelectorList parseSelectors(InputSource source) throws CSSException, - IOException { + public SelectorList parseSelectors(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); @@ -235,8 +222,8 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return expr(); } - public boolean parsePriority(InputSource source) throws CSSException, - IOException { + public boolean parsePriority(InputSource source) + throws CSSException, IOException { this.source = source; ReInit(getCharStreamWithLurk(source)); @@ -244,8 +231,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } /** - * Convert the source into a Reader. Used only by DOM Level 2 parser - * methods. + * Convert the source into a Reader. Used only by DOM Level 2 parser methods. */ private Reader getReader(InputSource source) throws IOException { if (source.getCharacterStream() != null) { @@ -257,7 +243,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { return new InputStreamReader(source.getByteStream(), "ASCII"); } else { return new InputStreamReader(source.getByteStream(), - source.getEncoding()); + source.getEncoding()); } } else { // systemId @@ -267,10 +253,11 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } /** - * Convert the source into a CharStream with encoding informations. The - * encoding can be found in the InputSource or in the CSS document. Since - * this method marks the reader and make a reset after looking for the - * charset declaration, you'll find the charset declaration into the stream. + * Convert the source into a CharStream with encoding informations. + * The encoding can be found in the InputSource or in the CSS document. + * Since this method marks the reader and make a reset after looking for + * the charset declaration, you'll find the charset declaration into the + * stream. */ private CharStream getCharStreamWithLurk(InputSource source) throws CSSException, IOException { @@ -303,7 +290,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { if (c == '@') { // hum, is it a charset ? - int size = 100; + int size = 100; byte[] buf = new byte[size]; input.read(buf, 0, 7); String keyword = new String(buf, 0, 7); @@ -337,13 +324,12 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { if (c != ';') { // no semi colon at the end ? throw new CSSException("invalid charset declaration: " - + "missing semi colon"); + + "missing semi colon"); } encoding = new String(buf, 0, i); if (source.getEncoding() != null) { // compare the two encoding informations. - // For example, I don't accept to have ASCII and after - // UTF-8. + // For example, I don't accept to have ASCII and after UTF-8. // Is it really good ? That is the question. if (!encoding.equals(source.getEncoding())) { throw new CSSException("invalid encoding information."); @@ -355,7 +341,7 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { source.setEncoding(encoding); // set the real reader of this source. source.setCharacterStream(new InputStreamReader(source.getByteStream(), - Encoding.getJavaEncoding(encoding))); + Encoding.getJavaEncoding(encoding))); // reset the stream (leave the charset declaration in the stream). input.reset(); @@ -363,7 +349,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } private LocatorImpl currentLocator; - private Locator getLocator() { if (currentLocator == null) { currentLocator = new LocatorImpl(this); @@ -371,7 +356,6 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } return currentLocator.reInit(this); } - private LocatorImpl getLocator(Token save) { if (currentLocator == null) { currentLocator = new LocatorImpl(this, save); @@ -388,8 +372,8 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { if (pe.specialConstructor) { StringBuffer errorM = new StringBuffer(); if (pe.currentToken != null) { - errorM.append("encountered \u005c"").append( - pe.currentToken.next); + errorM.append("encountered \u005c"") + .append(pe.currentToken.next); } errorM.append('"'); if (pe.expectedTokenSequences.length != 0) { @@ -405,10 +389,10 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } } errorHandler.error(new CSSParseException(errorM.toString(), - l, e)); + l, e)); } else { - errorHandler.error(new CSSParseException(e.getMessage(), l, - e)); + errorHandler.error(new CSSParseException(e.getMessage(), + l, e)); } } else if (e == null) { errorHandler.error(new CSSParseException("error", l, null)); @@ -419,3733 +403,2943 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { } private void reportWarningSkipText(Locator l, String text) { - if (errorHandler != null && text != null) { + if (errorHandler != null && text != null) { errorHandler.warning(new CSSParseException("Skipping: " + text, l)); } } - /* - * The grammar of CSS2 - */ - - /** - * The main entry for the parser. - * - * @exception ParseException - * exception during the parse - */ - final public void parserUnit() throws ParseException { - try { - documentHandler.startDocument(source); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case CHARSET_SYM: - charset(); - break; - default: - jj_la1[0] = jj_gen; - ; - } - label_1: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - case CDO: - case CDC: - case ATKEYWORD: - ; - break; - default: - jj_la1[1] = jj_gen; - break label_1; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - jj_consume_token(S); - comments(); - break; - case CDO: - case CDC: - case ATKEYWORD: - ignoreStatement(); - break; - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - label_2: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IMPORT_SYM: - ; - break; - default: - jj_la1[3] = jj_gen; - break label_2; - } - importDeclaration(); - label_3: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case CDO: - case CDC: - case ATKEYWORD: - ; - break; - default: - jj_la1[4] = jj_gen; - break label_3; - } - ignoreStatement(); - label_4: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[5] = jj_gen; - break label_4; - } - jj_consume_token(S); - } - } - } - afterImportDeclaration(); - jj_consume_token(0); - } finally { - documentHandler.endDocument(source); - } - } - - final public void charset() throws ParseException { - Token n; - try { - jj_consume_token(CHARSET_SYM); - label_5: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[6] = jj_gen; - break label_5; - } - jj_consume_token(S); - } - n = jj_consume_token(STRING); - label_6: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[7] = jj_gen; - break label_6; - } - jj_consume_token(S); - } - jj_consume_token(SEMICOLON); - } catch (ParseException e) { - reportError(getLocator(e.currentToken.next), e); - skipStatement(); - // reportWarningSkipText(getLocator(), skipStatement()); - - } catch (Exception e) { - reportError(getLocator(), e); - skipStatement(); - // reportWarningSkipText(getLocator(), skipStatement()); - - } - } - - final public void afterImportDeclaration() throws ParseException { - String ret; - Locator l; - label_7: while (true) { - ; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case VARIABLE: - variable(); - break; - case REMOVE: - removeDirective(); - break; - case MIXIN_SYM: - mixinDirective(); - break; - case EACH_SYM: - eachDirective(); - break; - case INCLUDE_SYM: - includeDirective(); - break; - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - case MEDIA_SYM: - media(); - break; - case PAGE_SYM: - page(); - break; - case FONT_FACE_SYM: - fontFace(); - break; - default: - jj_la1[8] = jj_gen; - l = getLocator(); - ret = skipStatement(); - if ((ret == null) || (ret.length() == 0)) { - { - if (true) - return; - } - } - reportWarningSkipText(l, ret); - if (ret.charAt(0) == '@') { - documentHandler.ignorableAtRule(ret); - } - } - label_8: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case CDO: - case CDC: - case ATKEYWORD: - ; - break; - default: - jj_la1[9] = jj_gen; - break label_8; - } - ignoreStatement(); - label_9: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[10] = jj_gen; - break label_9; - } - jj_consume_token(S); - } - } - } - } +/* + * The grammar of CSS2 + */ - final public void ignoreStatement() throws ParseException { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { +/** + * The main entry for the parser. + * + * @exception ParseException exception during the parse + */ + final public void parserUnit() throws ParseException { + try { + documentHandler.startDocument(source); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case CHARSET_SYM: + charset(); + break; + default: + jj_la1[0] = jj_gen; + ; + } + label_1: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: case CDO: - jj_consume_token(CDO); - break; case CDC: - jj_consume_token(CDC); - break; case ATKEYWORD: - atRuleDeclaration(); - break; + ; + break; default: - jj_la1[11] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - /** - * The import statement - * - * @exception ParseException - * exception during the parse - */ - final public void importDeclaration() throws ParseException { - Token n; - String uri; - MediaListImpl ml = new MediaListImpl(); - boolean isURL = false; - try { - jj_consume_token(IMPORT_SYM); - label_10: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[12] = jj_gen; - break label_10; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case STRING: - n = jj_consume_token(STRING); - uri = convertStringIndex(n.image, 1, n.image.length() - 1); - break; - case URL: - n = jj_consume_token(URL); - isURL = true; - uri = n.image.substring(4, n.image.length() - 1).trim(); - if ((uri.charAt(0) == '"') || (uri.charAt(0) == '\u005c'')) { - uri = uri.substring(1, uri.length() - 1); - } - break; - default: - jj_la1[13] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_11: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[14] = jj_gen; - break label_11; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - mediaStatement(ml); - break; - default: - jj_la1[15] = jj_gen; - ; - } - jj_consume_token(SEMICOLON); - label_12: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[16] = jj_gen; - break label_12; - } - jj_consume_token(S); - } - if (ml.getLength() == 0) { - // see section 6.3 of the CSS2 recommandation. - ml.addItem("all"); - } - documentHandler.importStyle(uri, ml, isURL); - } catch (ParseException e) { - reportError(getLocator(), e); - skipStatement(); - // reportWarningSkipText(getLocator(), skipStatement()); - + jj_la1[1] = jj_gen; + break label_1; } - } - - /** - * @exception ParseException - * exception during the parse - */ - final public void media() throws ParseException { - boolean start = false; - String ret; - MediaListImpl ml = new MediaListImpl(); - try { - jj_consume_token(MEDIA_SYM); - label_13: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[17] = jj_gen; - break label_13; - } - jj_consume_token(S); - } - mediaStatement(ml); - start = true; - documentHandler.startMedia(ml); - jj_consume_token(LBRACE); - label_14: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[18] = jj_gen; - break label_14; - } - jj_consume_token(S); - } - label_15: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case CDO: - case LBRACE: - case DASHMATCH: - case INCLUDES: - case PLUS: - case MINUS: - case COMMA: - case SEMICOLON: - case PRECEDES: - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case NONASCII: - case STRING: - case IDENT: - case NUMBER: - case URL: - case PERCENTAGE: - case HASH: - case IMPORT_SYM: - case MEDIA_SYM: - case CHARSET_SYM: - case PAGE_SYM: - case FONT_FACE_SYM: - case ATKEYWORD: - case IMPORTANT_SYM: - case UNICODERANGE: - case FUNCTION: - case UNKNOWN: - ; - break; - default: - jj_la1[19] = jj_gen; - break label_15; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - case CDO: - case LBRACE: - case DASHMATCH: - case INCLUDES: - case PLUS: - case MINUS: - case COMMA: - case SEMICOLON: - case PRECEDES: - case NONASCII: - case STRING: - case NUMBER: - case URL: - case PERCENTAGE: - case IMPORT_SYM: - case MEDIA_SYM: - case CHARSET_SYM: - case PAGE_SYM: - case FONT_FACE_SYM: - case ATKEYWORD: - case IMPORTANT_SYM: - case UNICODERANGE: - case FUNCTION: - case UNKNOWN: - skipUnknownRule(); - break; - default: - jj_la1[20] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(RBRACE); - label_16: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[21] = jj_gen; - break label_16; - } - jj_consume_token(S); - } - } catch (ParseException e) { - reportError(getLocator(), e); - skipStatement(); - // reportWarningSkipText(getLocator(), skipStatement()); - - } finally { - if (start) { - documentHandler.endMedia(ml); - } - } - } - - final public void mediaStatement(MediaListImpl ml) throws ParseException { - String m; - m = medium(); - label_17: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[22] = jj_gen; - break label_17; - } - jj_consume_token(COMMA); - label_18: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[23] = jj_gen; - break label_18; - } - jj_consume_token(S); - } - ml.addItem(m); - m = medium(); - } - ml.addItem(m); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public String medium() throws ParseException { - Token n; - n = jj_consume_token(IDENT); - label_19: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[24] = jj_gen; - break label_19; - } - jj_consume_token(S); - } - { - if (true) - return convertIdent(n.image); - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public void page() throws ParseException { - boolean start = false; - Token n = null; - String page = null; - String pseudo = null; - try { - jj_consume_token(PAGE_SYM); - label_20: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[25] = jj_gen; - break label_20; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - n = jj_consume_token(IDENT); - label_21: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[26] = jj_gen; - break label_21; - } - jj_consume_token(S); - } - break; - default: - jj_la1[27] = jj_gen; - ; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COLON: - pseudo = pseudo_page(); - break; - default: - jj_la1[28] = jj_gen; - ; - } - if (n != null) { - page = convertIdent(n.image); - } - jj_consume_token(LBRACE); - label_22: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[29] = jj_gen; - break label_22; - } - jj_consume_token(S); - } - start = true; - documentHandler.startPage(page, pseudo); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[30] = jj_gen; - ; - } - label_23: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[31] = jj_gen; - break label_23; - } - jj_consume_token(SEMICOLON); - label_24: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[32] = jj_gen; - break label_24; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[33] = jj_gen; - ; - } - } - jj_consume_token(RBRACE); - label_25: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[34] = jj_gen; - break label_25; - } - jj_consume_token(S); - } - } catch (ParseException e) { - if (errorHandler != null) { - LocatorImpl li = new LocatorImpl(this, - e.currentToken.next.beginLine, - e.currentToken.next.beginColumn - 1); - reportError(li, e); - skipStatement(); - // reportWarningSkipText(li, skipStatement()); - } else { - skipStatement(); - } - } finally { - if (start) { - documentHandler.endPage(page, pseudo); - } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + jj_consume_token(S); + comments(); + break; + case CDO: + case CDC: + case ATKEYWORD: + ignoreStatement(); + break; + default: + jj_la1[2] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + label_2: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IMPORT_SYM: + ; + break; + default: + jj_la1[3] = jj_gen; + break label_2; } - } - - final public String pseudo_page() throws ParseException { - Token n; - jj_consume_token(COLON); - n = jj_consume_token(IDENT); - label_26: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + importDeclaration(); + label_3: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case CDO: + case CDC: + case ATKEYWORD: + ; + break; + default: + jj_la1[4] = jj_gen; + break label_3; + } + ignoreStatement(); + label_4: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case S: - ; - break; + ; + break; default: - jj_la1[35] = jj_gen; - break label_26; + jj_la1[5] = jj_gen; + break label_4; } jj_consume_token(S); + } + } + } + afterImportDeclaration(); + jj_consume_token(0); + } finally { + documentHandler.endDocument(source); + } + } + + final public void charset() throws ParseException { + Token n; + try { + jj_consume_token(CHARSET_SYM); + label_5: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[6] = jj_gen; + break label_5; + } + jj_consume_token(S); + } + n = jj_consume_token(STRING); + label_6: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[7] = jj_gen; + break label_6; + } + jj_consume_token(S); + } + jj_consume_token(SEMICOLON); + } catch (ParseException e) { + reportError(getLocator(e.currentToken.next), e); + skipStatement(); + // reportWarningSkipText(getLocator(), skipStatement()); + + } catch (Exception e) { + reportError(getLocator(), e); + skipStatement(); + // reportWarningSkipText(getLocator(), skipStatement()); + + } + } + + final public void afterImportDeclaration() throws ParseException { + String ret; + Locator l; + label_7: + while (true) { + ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VARIABLE: + if (jj_2_1(5)) { + removeDirective(); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VARIABLE: + variable(); + break; + default: + jj_la1[8] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + break; + case MIXIN_SYM: + mixinDirective(); + break; + case EACH_SYM: + eachDirective(); + break; + case INCLUDE_SYM: + includeDirective(); + break; + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); + break; + case MEDIA_SYM: + media(); + break; + case PAGE_SYM: + page(); + break; + case FONT_FACE_SYM: + fontFace(); + break; + default: + jj_la1[9] = jj_gen; + l = getLocator(); + ret = skipStatement(); + if ((ret == null) || (ret.length() == 0)) { + {if (true) return;} + } + reportWarningSkipText(l, ret); + if (ret.charAt(0) == '@') { + documentHandler.ignorableAtRule(ret); + } + } + label_8: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case CDO: + case CDC: + case ATKEYWORD: + ; + break; + default: + jj_la1[10] = jj_gen; + break label_8; } - { - if (true) - return convertIdent(n.image); - } - throw new Error("Missing return statement in function"); - } + ignoreStatement(); + label_9: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[11] = jj_gen; + break label_9; + } + jj_consume_token(S); + } + } + } + } + + final public void ignoreStatement() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case CDO: + jj_consume_token(CDO); + break; + case CDC: + jj_consume_token(CDC); + break; + case ATKEYWORD: + atRuleDeclaration(); + break; + default: + jj_la1[12] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } - final public void fontFace() throws ParseException { - boolean start = false; - try { - jj_consume_token(FONT_FACE_SYM); - label_27: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[36] = jj_gen; - break label_27; - } - jj_consume_token(S); - } - jj_consume_token(LBRACE); - label_28: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[37] = jj_gen; - break label_28; - } - jj_consume_token(S); - } - start = true; - documentHandler.startFontFace(); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[38] = jj_gen; - ; - } - label_29: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[39] = jj_gen; - break label_29; - } - jj_consume_token(SEMICOLON); - label_30: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[40] = jj_gen; - break label_30; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[41] = jj_gen; - ; - } - } - jj_consume_token(RBRACE); - label_31: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[42] = jj_gen; - break label_31; - } - jj_consume_token(S); - } - } catch (ParseException e) { - reportError(getLocator(), e); - skipStatement(); - // reportWarningSkipText(getLocator(), skipStatement()); - - } finally { - if (start) { - documentHandler.endFontFace(); - } +/** + * The import statement + * + * @exception ParseException exception during the parse + */ + final public void importDeclaration() throws ParseException { + Token n; + String uri; + MediaListImpl ml = new MediaListImpl(); + boolean isURL = false; + try { + jj_consume_token(IMPORT_SYM); + label_10: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[13] = jj_gen; + break label_10; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING: + n = jj_consume_token(STRING); + uri = convertStringIndex(n.image, 1, + n.image.length() -1); + break; + case URL: + n = jj_consume_token(URL); + isURL=true; + uri = n.image.substring(4, n.image.length()-1).trim(); + if ((uri.charAt(0) == '"') + || (uri.charAt(0) == '\u005c'')) { + uri = uri.substring(1, uri.length()-1); + } + break; + default: + jj_la1[14] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + label_11: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[15] = jj_gen; + break label_11; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + mediaStatement(ml); + break; + default: + jj_la1[16] = jj_gen; + ; + } + jj_consume_token(SEMICOLON); + label_12: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[17] = jj_gen; + break label_12; } - } + jj_consume_token(S); + } + if (ml.getLength() == 0) { + // see section 6.3 of the CSS2 recommandation. + ml.addItem("all"); + } + documentHandler.importStyle(uri, ml, isURL); + } catch (ParseException e) { + reportError(getLocator(), e); + skipStatement(); + // reportWarningSkipText(getLocator(), skipStatement()); - /** - * @exception ParseException - * exception during the parse - */ - final public void atRuleDeclaration() throws ParseException { - Token n; - String ret; - n = jj_consume_token(ATKEYWORD); - ret = skipStatement(); - reportWarningSkipText(getLocator(), ret); - if ((ret != null) && (ret.charAt(0) == '@')) { - documentHandler.ignorableAtRule(ret); - } } + } - final public void skipUnknownRule() throws ParseException { - Token n; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case ATKEYWORD: - n = jj_consume_token(ATKEYWORD); - break; +/** + * @exception ParseException exception during the parse + */ + final public void media() throws ParseException { + boolean start = false; + String ret; + MediaListImpl ml = new MediaListImpl(); + try { + jj_consume_token(MEDIA_SYM); + label_13: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[18] = jj_gen; + break label_13; + } + jj_consume_token(S); + } + mediaStatement(ml); + start = true; documentHandler.startMedia(ml); + jj_consume_token(LBRACE); + label_14: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[19] = jj_gen; + break label_14; + } + jj_consume_token(S); + } + label_15: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CDO: - n = jj_consume_token(CDO); - break; - case CHARSET_SYM: - n = jj_consume_token(CHARSET_SYM); - break; - case COMMA: - n = jj_consume_token(COMMA); - break; + case LBRACE: case DASHMATCH: - n = jj_consume_token(DASHMATCH); - break; - case FONT_FACE_SYM: - n = jj_consume_token(FONT_FACE_SYM); - break; - case FUNCTION: - n = jj_consume_token(FUNCTION); - break; - case IMPORTANT_SYM: - n = jj_consume_token(IMPORTANT_SYM); - break; - case IMPORT_SYM: - n = jj_consume_token(IMPORT_SYM); - break; case INCLUDES: - n = jj_consume_token(INCLUDES); - break; - case LBRACE: - n = jj_consume_token(LBRACE); - break; - case MEDIA_SYM: - n = jj_consume_token(MEDIA_SYM); - break; + case PLUS: + case MINUS: + case COMMA: + case SEMICOLON: + case PRECEDES: + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: case NONASCII: - n = jj_consume_token(NONASCII); - break; + case STRING: + case IDENT: case NUMBER: - n = jj_consume_token(NUMBER); - break; - case PAGE_SYM: - n = jj_consume_token(PAGE_SYM); - break; + case URL: case PERCENTAGE: - n = jj_consume_token(PERCENTAGE); - break; - case STRING: - n = jj_consume_token(STRING); - break; + case HASH: + case IMPORT_SYM: + case MEDIA_SYM: + case CHARSET_SYM: + case PAGE_SYM: + case FONT_FACE_SYM: + case ATKEYWORD: + case IMPORTANT_SYM: case UNICODERANGE: - n = jj_consume_token(UNICODERANGE); - break; - case URL: - n = jj_consume_token(URL); - break; - case SEMICOLON: - n = jj_consume_token(SEMICOLON); - break; - case PLUS: - n = jj_consume_token(PLUS); - break; - case PRECEDES: - n = jj_consume_token(PRECEDES); - break; - case MINUS: - n = jj_consume_token(MINUS); - break; + case FUNCTION: case UNKNOWN: - n = jj_consume_token(UNKNOWN); - break; + ; + break; default: - jj_la1[43] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - String ret; - Locator loc = getLocator(); - ret = skipStatement(); - reportWarningSkipText(loc, ret); - if ((ret != null) && (n.image.charAt(0) == '@')) { - documentHandler.ignorableAtRule(ret); + jj_la1[20] = jj_gen; + break label_15; } - } - - /** - * @exception ParseException - * exception during the parse - */ - final public char combinator() throws ParseException { - char connector = ' '; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); + break; + case CDO: + case LBRACE: + case DASHMATCH: + case INCLUDES: case PLUS: - jj_consume_token(PLUS); - label_32: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[44] = jj_gen; - break label_32; - } - jj_consume_token(S); - } - { - if (true) - return '+'; - } - break; + case MINUS: + case COMMA: + case SEMICOLON: case PRECEDES: - jj_consume_token(PRECEDES); - label_33: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[45] = jj_gen; - break label_33; - } - jj_consume_token(S); - } - { - if (true) - return '>'; - } - break; + case NONASCII: + case STRING: + case NUMBER: + case URL: + case PERCENTAGE: + case IMPORT_SYM: + case MEDIA_SYM: + case CHARSET_SYM: + case PAGE_SYM: + case FONT_FACE_SYM: + case ATKEYWORD: + case IMPORTANT_SYM: + case UNICODERANGE: + case FUNCTION: + case UNKNOWN: + skipUnknownRule(); + break; + default: + jj_la1[21] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + jj_consume_token(RBRACE); + label_16: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case S: - jj_consume_token(S); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case PRECEDES: - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - jj_consume_token(PLUS); - connector = '+'; - break; - case PRECEDES: - jj_consume_token(PRECEDES); - connector = '>'; - break; - default: - jj_la1[46] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_34: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[47] = jj_gen; - break label_34; - } - jj_consume_token(S); - } - break; - default: - jj_la1[48] = jj_gen; - ; - } - { - if (true) - return connector; - } - break; + ; + break; default: - jj_la1[49] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); + jj_la1[22] = jj_gen; + break label_16; + } + jj_consume_token(S); + } + } catch (ParseException e) { + reportError(getLocator(), e); + skipStatement(); + // reportWarningSkipText(getLocator(), skipStatement()); + + } finally { + if (start) { + documentHandler.endMedia(ml); + } + } + } + + final public void mediaStatement(MediaListImpl ml) throws ParseException { + String m; + m = medium(); + label_17: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[23] = jj_gen; + break label_17; + } + jj_consume_token(COMMA); + label_18: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[24] = jj_gen; + break label_18; } - throw new Error("Missing return statement in function"); + jj_consume_token(S); + } + ml.addItem(m); + m = medium(); } + ml.addItem(m); + } - final public void microsoftExtension() throws ParseException { - Token n; - String name = ""; - String value = ""; - n = jj_consume_token(MICROSOFT_RULE); - label_35: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[50] = jj_gen; - break label_35; - } - jj_consume_token(S); +/** + * @exception ParseException exception during the parse + */ + final public String medium() throws ParseException { + Token n; + n = jj_consume_token(IDENT); + label_19: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[25] = jj_gen; + break label_19; + } + jj_consume_token(S); + } + {if (true) return convertIdent(n.image);} + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public void page() throws ParseException { + boolean start = false; + Token n = null; + String page = null; + String pseudo = null; + try { + jj_consume_token(PAGE_SYM); + label_20: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[26] = jj_gen; + break label_20; } - name = n.image; - jj_consume_token(COLON); - label_36: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - n = jj_consume_token(IDENT); - value += n.image; - break; - case NUMBER: - n = jj_consume_token(NUMBER); - value += n.image; - break; - case EACH_VAR: - n = jj_consume_token(EACH_VAR); - value += n.image; - break; - case COLON: - n = jj_consume_token(COLON); - value += n.image; - break; - case FUNCTION: - n = jj_consume_token(FUNCTION); - value += n.image; - break; - case RPARAN: - n = jj_consume_token(RPARAN); - value += n.image; - break; - case EQ: - n = jj_consume_token(EQ); - value += n.image; - break; - case DOT: - n = jj_consume_token(DOT); - value += n.image; - break; - case S: - n = jj_consume_token(S); - if (value.lastIndexOf(' ') != value.length() - 1) { - value += n.image; - } - break; - default: - jj_la1[51] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - case EQ: - case DOT: - case RPARAN: - case COLON: - case EACH_VAR: - case IDENT: - case NUMBER: - case FUNCTION: - ; - break; - default: - jj_la1[52] = jj_gen; - break label_36; - } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + n = jj_consume_token(IDENT); + label_21: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[27] = jj_gen; + break label_21; + } + jj_consume_token(S); + } + break; + default: + jj_la1[28] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: + pseudo = pseudo_page(); + break; + default: + jj_la1[29] = jj_gen; + ; + } + if (n != null) { + page = convertIdent(n.image); + } + jj_consume_token(LBRACE); + label_22: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[30] = jj_gen; + break label_22; + } + jj_consume_token(S); + } + start = true; + documentHandler.startPage(page, pseudo); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[31] = jj_gen; + ; + } + label_23: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[32] = jj_gen; + break label_23; } jj_consume_token(SEMICOLON); - label_37: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[53] = jj_gen; - break label_37; - } - jj_consume_token(S); - } - documentHandler.microsoftDirective(name, value); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public String property() throws ParseException { - Token n; - n = jj_consume_token(IDENT); - label_38: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[54] = jj_gen; - break label_38; - } - jj_consume_token(S); + label_24: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[33] = jj_gen; + break label_24; + } + jj_consume_token(S); } - { - if (true) - return convertIdent(n.image); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[34] = jj_gen; + ; + } + } + jj_consume_token(RBRACE); + label_25: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[35] = jj_gen; + break label_25; + } + jj_consume_token(S); + } + } catch (ParseException e) { + if (errorHandler != null) { + LocatorImpl li = new LocatorImpl(this, + e.currentToken.next.beginLine, + e.currentToken.next.beginColumn-1); + reportError(li, e); + skipStatement(); + // reportWarningSkipText(li, skipStatement()); + } else { + skipStatement(); + } + } finally { + if (start) { + documentHandler.endPage(page, pseudo); + } + } + } + + final public String pseudo_page() throws ParseException { + Token n; + jj_consume_token(COLON); + n = jj_consume_token(IDENT); + label_26: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[36] = jj_gen; + break label_26; + } + jj_consume_token(S); + } + {if (true) return convertIdent(n.image);} + throw new Error("Missing return statement in function"); + } + + final public void fontFace() throws ParseException { + boolean start = false; + try { + jj_consume_token(FONT_FACE_SYM); + label_27: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[37] = jj_gen; + break label_27; + } + jj_consume_token(S); + } + jj_consume_token(LBRACE); + label_28: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[38] = jj_gen; + break label_28; + } + jj_consume_token(S); + } + start = true; documentHandler.startFontFace(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[39] = jj_gen; + ; + } + label_29: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[40] = jj_gen; + break label_29; } - throw new Error("Missing return statement in function"); - } - - final public String variableName() throws ParseException { - Token n; - n = jj_consume_token(VARIABLE); - label_39: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[55] = jj_gen; - break label_39; - } - jj_consume_token(S); + jj_consume_token(SEMICOLON); + label_30: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[41] = jj_gen; + break label_30; + } + jj_consume_token(S); } - { - if (true) - return convertIdent(n.image.substring(1)); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[42] = jj_gen; + ; + } + } + jj_consume_token(RBRACE); + label_31: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[43] = jj_gen; + break label_31; } - throw new Error("Missing return statement in function"); + jj_consume_token(S); + } + } catch (ParseException e) { + reportError(getLocator(), e); + skipStatement(); + // reportWarningSkipText(getLocator(), skipStatement()); + + } finally { + if (start) { + documentHandler.endFontFace(); + } } + } - final public String functionName() throws ParseException { - Token n; - n = jj_consume_token(FUNCTION); - label_40: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[56] = jj_gen; - break label_40; - } - jj_consume_token(S); +/** + * @exception ParseException exception during the parse + */ + final public void atRuleDeclaration() throws ParseException { + Token n; + String ret; + n = jj_consume_token(ATKEYWORD); + ret=skipStatement(); + reportWarningSkipText(getLocator(), ret); + if ((ret != null) && (ret.charAt(0) == '@')) { + documentHandler.ignorableAtRule(ret); } - { - if (true) - return convertIdent(n.image.substring(0, n.image.length() - 1)); + } + + final public void skipUnknownRule() throws ParseException { + Token n; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ATKEYWORD: + n = jj_consume_token(ATKEYWORD); + break; + case CDO: + n = jj_consume_token(CDO); + break; + case CHARSET_SYM: + n = jj_consume_token(CHARSET_SYM); + break; + case COMMA: + n = jj_consume_token(COMMA); + break; + case DASHMATCH: + n = jj_consume_token(DASHMATCH); + break; + case FONT_FACE_SYM: + n = jj_consume_token(FONT_FACE_SYM); + break; + case FUNCTION: + n = jj_consume_token(FUNCTION); + break; + case IMPORTANT_SYM: + n = jj_consume_token(IMPORTANT_SYM); + break; + case IMPORT_SYM: + n = jj_consume_token(IMPORT_SYM); + break; + case INCLUDES: + n = jj_consume_token(INCLUDES); + break; + case LBRACE: + n = jj_consume_token(LBRACE); + break; + case MEDIA_SYM: + n = jj_consume_token(MEDIA_SYM); + break; + case NONASCII: + n = jj_consume_token(NONASCII); + break; + case NUMBER: + n = jj_consume_token(NUMBER); + break; + case PAGE_SYM: + n = jj_consume_token(PAGE_SYM); + break; + case PERCENTAGE: + n = jj_consume_token(PERCENTAGE); + break; + case STRING: + n = jj_consume_token(STRING); + break; + case UNICODERANGE: + n = jj_consume_token(UNICODERANGE); + break; + case URL: + n = jj_consume_token(URL); + break; + case SEMICOLON: + n = jj_consume_token(SEMICOLON); + break; + case PLUS: + n = jj_consume_token(PLUS); + break; + case PRECEDES: + n = jj_consume_token(PRECEDES); + break; + case MINUS: + n = jj_consume_token(MINUS); + break; + case UNKNOWN: + n = jj_consume_token(UNKNOWN); + break; + default: + jj_la1[44] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + String ret; + Locator loc = getLocator(); + ret=skipStatement(); + reportWarningSkipText(loc, ret); + if ((ret != null) && (n.image.charAt(0) == '@')) { + documentHandler.ignorableAtRule(ret); + } + } + +/** + * @exception ParseException exception during the parse + */ + final public char combinator() throws ParseException { +char connector = ' '; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + jj_consume_token(PLUS); + label_32: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[45] = jj_gen; + break label_32; + } + jj_consume_token(S); + } + {if (true) return '+';} + break; + case PRECEDES: + jj_consume_token(PRECEDES); + label_33: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[46] = jj_gen; + break label_33; + } + jj_consume_token(S); + } + {if (true) return '>';} + break; + case S: + jj_consume_token(S); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case PRECEDES: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + jj_consume_token(PLUS); + connector = '+'; + break; + case PRECEDES: + jj_consume_token(PRECEDES); + connector = '>'; + break; + default: + jj_la1[47] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - throw new Error("Missing return statement in function"); - } + label_34: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[48] = jj_gen; + break label_34; + } + jj_consume_token(S); + } + break; + default: + jj_la1[49] = jj_gen; + ; + } + {if (true) return connector;} + break; + default: + jj_la1[50] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public void microsoftExtension() throws ParseException { + Token n; + String name = ""; + String value = ""; + n = jj_consume_token(MICROSOFT_RULE); + label_35: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[51] = jj_gen; + break label_35; + } + jj_consume_token(S); + } + name = n.image; + jj_consume_token(COLON); + label_36: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + n = jj_consume_token(IDENT); + value += n.image; + break; + case NUMBER: + n = jj_consume_token(NUMBER); + value += n.image; + break; + case INTERPOLATION: + n = jj_consume_token(INTERPOLATION); + value += n.image; + break; + case COLON: + n = jj_consume_token(COLON); + value += n.image; + break; + case FUNCTION: + n = jj_consume_token(FUNCTION); + value += n.image; + break; + case RPARAN: + n = jj_consume_token(RPARAN); + value += n.image; + break; + case EQ: + n = jj_consume_token(EQ); + value += n.image; + break; + case DOT: + n = jj_consume_token(DOT); + value += n.image; + break; + case S: + n = jj_consume_token(S); + if(value.lastIndexOf(' ') != value.length()-1) + { value += n.image; } + break; + default: + jj_la1[52] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + case EQ: + case DOT: + case RPARAN: + case COLON: + case INTERPOLATION: + case IDENT: + case NUMBER: + case FUNCTION: + ; + break; + default: + jj_la1[53] = jj_gen; + break label_36; + } + } + jj_consume_token(SEMICOLON); + label_37: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[54] = jj_gen; + break label_37; + } + jj_consume_token(S); + } + documentHandler.microsoftDirective(name, value); + } - /** - * @exception ParseException - * exception during the parse - */ - final public void styleRule() throws ParseException { - boolean start = false; - ArrayList<String> l = null; - Token save; - Locator loc; - try { - l = selectorList(); - save = token; - jj_consume_token(LBRACE); - label_41: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; +/** + * @exception ParseException exception during the parse + */ + final public String property() throws ParseException { + Token n; + n = jj_consume_token(IDENT); + label_38: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[55] = jj_gen; + break label_38; + } + jj_consume_token(S); + } + {if (true) return convertIdent(n.image);} + throw new Error("Missing return statement in function"); + } + + final public String variableName() throws ParseException { + Token n; + n = jj_consume_token(VARIABLE); + label_39: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[56] = jj_gen; + break label_39; + } + jj_consume_token(S); + } + {if (true) return convertIdent(n.image.substring(1));} + throw new Error("Missing return statement in function"); + } + + final public String functionName() throws ParseException { + Token n; + n = jj_consume_token(FUNCTION); + label_40: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[57] = jj_gen; + break label_40; + } + jj_consume_token(S); + } + {if (true) return convertIdent(n.image.substring(0, n.image.length()-1));} + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public void styleRule() throws ParseException { + boolean start = false; + ArrayList<String> l = null; + Token save; + Locator loc; + try { + l = selectorList(); + save = token; + jj_consume_token(LBRACE); + label_41: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[58] = jj_gen; + break label_41; + } + jj_consume_token(S); + } + start = true; + documentHandler.startSelector(l); + label_42: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case EACH_SYM: + case IF_SYM: + case EXTEND_SYM: + case MICROSOFT_RULE: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + ; + break; + default: + jj_la1[59] = jj_gen; + break label_42; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IF_SYM: + ifDirective(); + break; + default: + jj_la1[61] = jj_gen; + if (jj_2_2(5)) { + removeDirective(); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INCLUDE_SYM: + includeDirective(); + break; + case MEDIA_SYM: + media(); + break; + case EXTEND_SYM: + extendDirective(); + break; + case EACH_SYM: + eachDirective(); + break; + case VARIABLE: + variable(); + break; + default: + jj_la1[62] = jj_gen; + if (jj_2_3(3)) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MICROSOFT_RULE: + microsoftExtension(); + break; + case IDENT: + declarationOrNestedProperties(); + break; default: - jj_la1[57] = jj_gen; - break label_41; + jj_la1[60] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - jj_consume_token(S); - } - start = true; - documentHandler.startSelector(l); - label_42: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: case ANY: case PARENT: case DOT: case COLON: - case EACH_VAR: - case INCLUDE_SYM: - case EACH_SYM: - case IF_SYM: - case EXTEND_SYM: - case MICROSOFT_RULE: + case INTERPOLATION: case IDENT: - case VARIABLE: case HASH: - case MEDIA_SYM: - case REMOVE: - ; - break; + styleRule(); + break; default: - jj_la1[58] = jj_gen; - break label_42; + jj_la1[63] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IF_SYM: - ifDirective(); - break; - case REMOVE: - removeDirective(); - break; - case INCLUDE_SYM: - includeDirective(); - break; - case MEDIA_SYM: - media(); - break; - case EXTEND_SYM: - extendDirective(); - break; - case EACH_SYM: - eachDirective(); - break; - case VARIABLE: - variable(); - break; - default: - jj_la1[60] = jj_gen; - if (jj_2_1(3)) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case MICROSOFT_RULE: - microsoftExtension(); - break; - case IDENT: - declarationOrNestedProperties(); - break; - default: - jj_la1[59] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } else { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - default: - jj_la1[61] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - jj_consume_token(RBRACE); - label_43: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[62] = jj_gen; - break label_43; - } - jj_consume_token(S); + } } - } catch (ThrowedParseException e) { - if (errorHandler != null) { - LocatorImpl li = new LocatorImpl(this, - e.e.currentToken.next.beginLine, - e.e.currentToken.next.beginColumn - 1); - reportError(li, e.e); - } - } catch (ParseException e) { - reportError(getLocator(), e); - skipStatement(); - // reportWarningSkipText(getLocator(), skipStatement()); - - } catch (TokenMgrError e) { - reportWarningSkipText(getLocator(), skipStatement()); - } finally { - if (start) { - documentHandler.endSelector(); - } - } - } - - final public ArrayList<String> selectorList() throws ParseException { - ArrayList<String> selectors = new ArrayList<String>(); - String selector; - selector = selector(); - label_44: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[63] = jj_gen; - break label_44; - } - jj_consume_token(COMMA); - label_45: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[64] = jj_gen; - break label_45; - } - jj_consume_token(S); - } - selectors.add(selector); - selector = selector(); + } } - selectors.add(selector); - { - if (true) - return selectors; + } + jj_consume_token(RBRACE); + label_43: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[64] = jj_gen; + break label_43; + } + jj_consume_token(S); + } + } catch (ThrowedParseException e) { + if (errorHandler != null) { + LocatorImpl li = new LocatorImpl(this, + e.e.currentToken.next.beginLine, + e.e.currentToken.next.beginColumn-1); + reportError(li, e.e); + } + } catch (ParseException e) { + reportError(getLocator(), e); + skipStatement(); + // reportWarningSkipText(getLocator(), skipStatement()); + + } catch (TokenMgrError e) { + reportWarningSkipText(getLocator(), skipStatement()); + } finally { + if (start) { + documentHandler.endSelector(); + } + } + } + + final public ArrayList<String> selectorList() throws ParseException { + ArrayList<String> selectors = new ArrayList<String>(); + String selector; + selector = selector(); + label_44: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[65] = jj_gen; + break label_44; + } + jj_consume_token(COMMA); + label_45: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[66] = jj_gen; + break label_45; } - throw new Error("Missing return statement in function"); + jj_consume_token(S); + } + selectors.add(selector); + selector = selector(); } + selectors.add(selector); + {if (true) return selectors;} + throw new Error("Missing return statement in function"); + } - /** - * @exception ParseException - * exception during the parse +/** + * @exception ParseException exception during the parse + */ + final public String selector() throws ParseException { + String selector; + char comb; + try { + selector = simple_selector(null, ' '); + label_46: + while (true) { + if (jj_2_4(2)) { + ; + } else { + break label_46; + } + comb = combinator(); + selector = simple_selector(selector, comb); + } + label_47: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[67] = jj_gen; + break label_47; + } + jj_consume_token(S); + } + {if (true) return selector;} + } catch (ParseException e) { + /* + Token t = getToken(1); + StringBuffer s = new StringBuffer(); + s.append(getToken(0).image); + while ((t.kind != COMMA) && (t.kind != SEMICOLON) + && (t.kind != LBRACE) && (t.kind != EOF)) { + s.append(t.image); + getNextToken(); + t = getToken(1); + } + reportWarningSkipText(getLocator(), s.toString()); */ - final public String selector() throws ParseException { - String selector; - char comb; - try { - selector = simple_selector(null, ' '); - label_46: while (true) { - if (jj_2_2(2)) { - ; - } else { - break label_46; - } - comb = combinator(); - selector = simple_selector(selector, comb); - } - label_47: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[65] = jj_gen; - break label_47; - } - jj_consume_token(S); - } - { - if (true) - return selector; - } - } catch (ParseException e) { - /* - * Token t = getToken(1); StringBuffer s = new StringBuffer(); - * s.append(getToken(0).image); while ((t.kind != COMMA) && (t.kind - * != SEMICOLON) && (t.kind != LBRACE) && (t.kind != EOF)) { - * s.append(t.image); getNextToken(); t = getToken(1); } - * reportWarningSkipText(getLocator(), s.toString()); - */ - Token t = getToken(1); - while ((t.kind != COMMA) && (t.kind != SEMICOLON) - && (t.kind != LBRACE) && (t.kind != EOF)) { - getNextToken(); - t = getToken(1); - } + Token t = getToken(1); + while ((t.kind != COMMA) && (t.kind != SEMICOLON) + && (t.kind != LBRACE) && (t.kind != EOF)) { + getNextToken(); + t = getToken(1); + } - { - if (true) - throw new ThrowedParseException(e); - } - } - throw new Error("Missing return statement in function"); + {if (true) throw new ThrowedParseException(e);} } + throw new Error("Missing return statement in function"); + } - /** - * @exception ParseException - * exception during the parse - */ - final public String simple_selector(String selector, char comb) - throws ParseException { - String simple_current = null; - String cond = null; - - pseudoElt = null; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case ANY: - case PARENT: - case EACH_VAR: - case IDENT: - simple_current = element_name(); - label_48: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case DOT: - case COLON: - case HASH: - ; - break; - default: - jj_la1[66] = jj_gen; - break label_48; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case HASH: - cond = hash(cond); - break; - case DOT: - cond = _class(cond); - break; - case LBRACKET: - cond = attrib(cond); - break; - case COLON: - cond = pseudo(cond); - break; - default: - jj_la1[67] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; +/** + * @exception ParseException exception during the parse + */ + final public String simple_selector(String selector, char comb) throws ParseException { + String simple_current = null; + String cond = null; + + pseudoElt = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ANY: + case PARENT: + case INTERPOLATION: + case IDENT: + simple_current = element_name(); + label_48: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case DOT: + case COLON: case HASH: - cond = hash(cond); - label_49: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case DOT: - case COLON: - ; - break; - default: - jj_la1[68] = jj_gen; - break label_49; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case DOT: - cond = _class(cond); - break; - case LBRACKET: - cond = attrib(cond); - break; - case COLON: - cond = pseudo(cond); - break; - default: - jj_la1[69] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; + ; + break; + default: + jj_la1[68] = jj_gen; + break label_48; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case HASH: + cond = hash(cond); + break; case DOT: - cond = _class(cond); - label_50: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case DOT: - case COLON: - case HASH: - ; - break; - default: - jj_la1[70] = jj_gen; - break label_50; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case HASH: - cond = hash(cond); - break; - case DOT: - cond = _class(cond); - break; - case LBRACKET: - cond = attrib(cond); - break; - case COLON: - cond = pseudo(cond); - break; - default: - jj_la1[71] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; + cond = _class(cond); + break; + case LBRACKET: + cond = attrib(cond); + break; case COLON: - cond = pseudo(cond); - label_51: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case DOT: - case COLON: - case HASH: - ; - break; - default: - jj_la1[72] = jj_gen; - break label_51; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case HASH: - cond = hash(cond); - break; - case DOT: - cond = _class(cond); - break; - case LBRACKET: - cond = attrib(cond); - break; - case COLON: - cond = pseudo(cond); - break; - default: - jj_la1[73] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; + cond = pseudo(cond); + break; + default: + jj_la1[69] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + break; + case HASH: + cond = hash(cond); + label_49: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: - cond = attrib(cond); - label_52: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case DOT: - case COLON: - case HASH: - ; - break; - default: - jj_la1[74] = jj_gen; - break label_52; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case HASH: - cond = hash(cond); - break; - case DOT: - cond = _class(cond); - break; - case LBRACKET: - cond = attrib(cond); - break; - case COLON: - cond = pseudo(cond); - break; - default: - jj_la1[75] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - break; + case DOT: + case COLON: + ; + break; default: - jj_la1[76] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - if (simple_current == null) { - simple_current = ""; + jj_la1[70] = jj_gen; + break label_49; } - if (cond != null) { - simple_current = simple_current + cond; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: + cond = _class(cond); + break; + case LBRACKET: + cond = attrib(cond); + break; + case COLON: + cond = pseudo(cond); + break; + default: + jj_la1[71] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + break; + case DOT: + cond = _class(cond); + label_50: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case DOT: + case COLON: + case HASH: + ; + break; + default: + jj_la1[72] = jj_gen; + break label_50; } - if (selector != null) { - switch (comb) { - case ' ': - selector = selector + comb + simple_current; - break; - case '+': - selector = selector + " " + comb + " " + simple_current; - break; - case '>': - selector = selector + " " + comb + " " + simple_current; - break; - default: { - if (true) - throw new ParseException("invalid state. send a bug report"); - } - } - } else { - selector = simple_current; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case HASH: + cond = hash(cond); + break; + case DOT: + cond = _class(cond); + break; + case LBRACKET: + cond = attrib(cond); + break; + case COLON: + cond = pseudo(cond); + break; + default: + jj_la1[73] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + break; + case COLON: + cond = pseudo(cond); + label_51: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case DOT: + case COLON: + case HASH: + ; + break; + default: + jj_la1[74] = jj_gen; + break label_51; } - if (pseudoElt != null) { - selector = selector + pseudoElt; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case HASH: + cond = hash(cond); + break; + case DOT: + cond = _class(cond); + break; + case LBRACKET: + cond = attrib(cond); + break; + case COLON: + cond = pseudo(cond); + break; + default: + jj_la1[75] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + break; + case LBRACKET: + cond = attrib(cond); + label_52: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case DOT: + case COLON: + case HASH: + ; + break; + default: + jj_la1[76] = jj_gen; + break label_52; } - { - if (true) - return selector; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case HASH: + cond = hash(cond); + break; + case DOT: + cond = _class(cond); + break; + case LBRACKET: + cond = attrib(cond); + break; + case COLON: + cond = pseudo(cond); + break; + default: + jj_la1[77] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - throw new Error("Missing return statement in function"); + } + break; + default: + jj_la1[78] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - - /** - * @exception ParseException - * exception during the parse - */ - final public String _class(String pred) throws ParseException { - Token t; - String s = "."; - jj_consume_token(DOT); - label_53: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - t = jj_consume_token(IDENT); - s += t.image; - break; - case EACH_VAR: - t = jj_consume_token(EACH_VAR); - s += t.image; - break; - default: - jj_la1[77] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case EACH_VAR: - case IDENT: - ; - break; - default: - jj_la1[78] = jj_gen; - break label_53; + if (simple_current == null) { + simple_current = ""; } - } - if (pred == null) { - { - if (true) - return s; + if (cond != null) { + simple_current = simple_current + cond; } - } else { - { - if (true) - return pred + s; - } - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public String element_name() throws ParseException { - Token t; - String s = ""; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case EACH_VAR: - case IDENT: - label_54: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - t = jj_consume_token(IDENT); - s += t.image; + if (selector != null) { + switch (comb) { + case ' ': + selector = selector + comb + simple_current; break; - case EACH_VAR: - t = jj_consume_token(EACH_VAR); - s += t.image; + case '+': + selector = selector + " " + comb + " " + simple_current; break; - default: - jj_la1[79] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case EACH_VAR: - case IDENT: - ; + case '>': + selector = selector + " " + comb + " " + simple_current; break; default: - jj_la1[80] = jj_gen; - break label_54; + {if (true) throw new ParseException("invalid state. send a bug report");} } + } else { + selector= simple_current; } - { - if (true) - return s; - } - break; - case ANY: - jj_consume_token(ANY); - { - if (true) - return "*"; - } - break; - case PARENT: - jj_consume_token(PARENT); - { - if (true) - return "&"; + if (pseudoElt != null) { + selector = selector + pseudoElt; } - break; - default: - jj_la1[81] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } + {if (true) return selector;} + throw new Error("Missing return statement in function"); + } - /** - * @exception ParseException - * exception during the parse - */ - final public String attrib(String pred) throws ParseException { - int cases = 0; - Token att = null; - Token val = null; - String attValue = null; - jj_consume_token(LBRACKET); - label_55: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[82] = jj_gen; - break label_55; - } - jj_consume_token(S); - } - att = jj_consume_token(IDENT); - label_56: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[83] = jj_gen; - break label_56; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case DASHMATCH: - case INCLUDES: - case EQ: - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case EQ: - jj_consume_token(EQ); - cases = 1; - break; - case INCLUDES: - jj_consume_token(INCLUDES); - cases = 2; - break; - case DASHMATCH: - jj_consume_token(DASHMATCH); - cases = 3; - break; - default: - jj_la1[84] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_57: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[85] = jj_gen; - break label_57; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - val = jj_consume_token(IDENT); - attValue = val.image; - break; - case STRING: - val = jj_consume_token(STRING); - attValue = val.image; - break; - default: - jj_la1[86] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_58: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[87] = jj_gen; - break label_58; - } - jj_consume_token(S); - } - break; +/** + * @exception ParseException exception during the parse + */ + final public String _class(String pred) throws ParseException { + Token t; +String s = "."; + jj_consume_token(DOT); + label_53: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + t = jj_consume_token(IDENT); + s += t.image; + break; + case INTERPOLATION: + t = jj_consume_token(INTERPOLATION); + s += t.image; + break; + default: + jj_la1[79] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTERPOLATION: + case IDENT: + ; + break; + default: + jj_la1[80] = jj_gen; + break label_53; + } + } + if (pred == null) { + {if (true) return s;} + } else { + {if (true) return pred + s;} + } + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public String element_name() throws ParseException { + Token t; String s = ""; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTERPOLATION: + case IDENT: + label_54: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + t = jj_consume_token(IDENT); + s += t.image; + break; + case INTERPOLATION: + t = jj_consume_token(INTERPOLATION); + s += t.image; + break; default: - jj_la1[88] = jj_gen; - ; + jj_la1[81] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - jj_consume_token(RBRACKET); - String name = convertIdent(att.image); - String c; - switch (cases) { - case 0: - c = name; - break; - case 1: - c = name + "=" + attValue; - break; - case 2: - c = name + "~=" + attValue; - break; - case 3: - c = name + "|=" + attValue; - break; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTERPOLATION: + case IDENT: + ; + break; default: - // never reached. - c = null; - } - c = "[" + c + "]"; - if (pred == null) { - { - if (true) - return c; - } - } else { - { - if (true) - return pred + c; - } - } - throw new Error("Missing return statement in function"); - } + jj_la1[82] = jj_gen; + break label_54; + } + } + {if (true) return s;} + break; + case ANY: + jj_consume_token(ANY); + {if (true) return "*";} + break; + case PARENT: + jj_consume_token(PARENT); + {if (true) return "&";} + break; + default: + jj_la1[83] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } - /** - * @exception ParseException - * exception during the parse - */ - final public String pseudo(String pred) throws ParseException { - Token n; - Token language; - boolean isPseudoElement = false; - jj_consume_token(COLON); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COLON: - jj_consume_token(COLON); - isPseudoElement = true; - break; +/** + * @exception ParseException exception during the parse + */ + final public String attrib(String pred) throws ParseException { + int cases = 0; + Token att = null; + Token val = null; + String attValue = null; + jj_consume_token(LBRACKET); + label_55: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[84] = jj_gen; + break label_55; + } + jj_consume_token(S); + } + att = jj_consume_token(IDENT); + label_56: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[85] = jj_gen; + break label_56; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DASHMATCH: + case CARETMATCH: + case DOLLARMATCH: + case STARMATCH: + case INCLUDES: + case EQ: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case EQ: + jj_consume_token(EQ); + cases = 1; + break; + case INCLUDES: + jj_consume_token(INCLUDES); + cases = 2; + break; + case DASHMATCH: + jj_consume_token(DASHMATCH); + cases = 3; + break; + case CARETMATCH: + jj_consume_token(CARETMATCH); + cases = 4; + break; + case DOLLARMATCH: + jj_consume_token(DOLLARMATCH); + cases = 5; + break; + case STARMATCH: + jj_consume_token(STARMATCH); + cases = 6; + break; + default: + jj_la1[86] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + label_57: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; default: - jj_la1[89] = jj_gen; - ; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - n = jj_consume_token(IDENT); + jj_la1[87] = jj_gen; + break label_57; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + val = jj_consume_token(IDENT); + attValue = val.image; + break; + case STRING: + val = jj_consume_token(STRING); + attValue = val.image; + break; + default: + jj_la1[88] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + label_58: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[89] = jj_gen; + break label_58; + } + jj_consume_token(S); + } + break; + default: + jj_la1[90] = jj_gen; + ; + } + jj_consume_token(RBRACKET); + String name = convertIdent(att.image); + String c; + switch (cases) { + case 0: + c = name; + break; + case 1: + c = name + "=" + attValue; + break; + case 2: + c = name + "~=" + attValue; + break; + case 3: + c = name + "|=" +attValue; + break; + case 4: + c = name + "^=" +attValue; + break; + case 5: + c = name + "$=" +attValue; + break; + case 6: + c = name + "*=" +attValue; + break; + default: + // never reached. + c = null; + } + c = "[" + c + "]"; + if (pred == null) { + {if (true) return c;} + } else { + {if (true) return pred + c;} + } + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public String pseudo(String pred) throws ParseException { + Token n; +Token language; +boolean isPseudoElement = false; + jj_consume_token(COLON); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: + jj_consume_token(COLON); + isPseudoElement=true; + break; + default: + jj_la1[91] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + n = jj_consume_token(IDENT); String s = ":" + convertIdent(n.image); if (isPseudoElement) { if (pseudoElt != null) { - { - if (true) - throw new CSSParseException( - "duplicate pseudo element definition " + s, - getLocator()); - } + {if (true) throw new CSSParseException("duplicate pseudo element definition " + + s, getLocator());} } else { - pseudoElt = ":" + s; - { - if (true) - return pred; - } + pseudoElt = ":"+s; + {if (true) return pred;} } } else { String c = s; if (pred == null) { - { - if (true) - return c; - } - } else { - { - if (true) - return pred + c; - } - } - } - break; - case FUNCTION: - n = jj_consume_token(FUNCTION); - label_59: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[90] = jj_gen; - break label_59; - } - jj_consume_token(S); - } - language = jj_consume_token(IDENT); - label_60: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[91] = jj_gen; - break label_60; - } - jj_consume_token(S); - } - jj_consume_token(RPARAN); - String f = convertIdent(n.image); - if (f.equals("lang(")) { - String d = convertIdent(language.image); - if (pred == null) { - { - if (true) - return d; - } + {if (true) return c;} } else { - { - if (true) - return pred + d; - } - } - } else { - { - if (true) - throw new CSSParseException( - "invalid pseudo function name " + f, - getLocator()); + {if (true) return pred + c;} } } - break; + break; + case FUNCTION: + n = jj_consume_token(FUNCTION); + label_59: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; default: - jj_la1[92] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public String hash(String pred) throws ParseException { - Token n; - n = jj_consume_token(HASH); - String d = n.image; - if (pred == null) { - { - if (true) - return d; - } - } else { - { - if (true) - return pred + d; - } - } - throw new Error("Missing return statement in function"); - } + jj_la1[92] = jj_gen; + break label_59; + } + jj_consume_token(S); + } + language = jj_consume_token(IDENT); + label_60: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[93] = jj_gen; + break label_60; + } + jj_consume_token(S); + } + jj_consume_token(RPARAN); + String f = convertIdent(n.image); + if (f.equals("lang(")) { + String d = convertIdent(language.image); + if (pred == null) { + {if (true) return d;} + } else { + {if (true) return pred + d;} + } + } else { + {if (true) throw new CSSParseException("invalid pseudo function name " + + f, getLocator());} + } + break; + default: + jj_la1[94] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } - final public void variable() throws ParseException { +/** + * @exception ParseException exception during the parse + */ + final public String hash(String pred) throws ParseException { + Token n; + n = jj_consume_token(HASH); + String d = n.image; + if (pred == null) { + {if (true) return d;} + } else { + {if (true) return pred + d;} + } + throw new Error("Missing return statement in function"); + } + + final public void variable() throws ParseException { String name; LexicalUnitImpl exp = null; boolean guarded = false; String raw; - try { - name = variableName(); - jj_consume_token(COLON); - label_61: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[93] = jj_gen; - break label_61; - } - jj_consume_token(S); - } - exp = expr(); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case GUARDED_SYM: - guarded = guarded(); - break; - default: - jj_la1[94] = jj_gen; - ; - } - label_62: while (true) { - jj_consume_token(SEMICOLON); - label_63: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[95] = jj_gen; - break label_63; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[96] = jj_gen; - break label_62; - } - } - documentHandler.variable(name, exp, guarded); - } catch (JumpException e) { + try { + name = variableName(); + jj_consume_token(COLON); + label_61: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[95] = jj_gen; + break label_61; + } + jj_consume_token(S); + } + exp = expr(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case GUARDED_SYM: + guarded = guarded(); + break; + default: + jj_la1[96] = jj_gen; + ; + } + label_62: + while (true) { + jj_consume_token(SEMICOLON); + label_63: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[97] = jj_gen; + break label_63; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[98] = jj_gen; + break label_62; + } + } + documentHandler.variable(name, exp, guarded); + } catch (JumpException e) { skipAfterExpression(); - } catch (NumberFormatException e) { + } catch (NumberFormatException e) { if (errorHandler != null) { errorHandler.error(new CSSParseException("Invalid number " - + e.getMessage(), getLocator(), e)); + + e.getMessage(), + getLocator(), + e)); } reportWarningSkipText(getLocator(), skipAfterExpression()); - } catch (ParseException e) { + } catch (ParseException e) { if (errorHandler != null) { if (e.currentToken != null) { - LocatorImpl li = new LocatorImpl(this, - e.currentToken.next.beginLine, - e.currentToken.next.beginColumn - 1); - reportError(li, e); + LocatorImpl li = new LocatorImpl(this, + e.currentToken.next.beginLine, + e.currentToken.next.beginColumn-1); + reportError(li, e); } else { - reportError(getLocator(), e); - } + reportError(getLocator(), e); + } skipAfterExpression(); } else { skipAfterExpression(); } - } } - - final public void ifDirective() throws ParseException { - Token n = null; - String evaluator = ""; - jj_consume_token(IF_SYM); - label_64: while (true) { - n = booleanExpressionToken(); - evaluator += n.image; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - case EQ: - case PLUS: - case MINUS: - case PRECEDES: - case SUCCEEDS: - case DIV: - case ANY: - case LPARAN: - case RPARAN: - case COMPARE: - case OR: - case AND: - case NOT_EQ: - case IDENT: - case NUMBER: - case VARIABLE: - ; - break; - default: - jj_la1[97] = jj_gen; - break label_64; - } - } - jj_consume_token(LBRACE); - label_65: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[98] = jj_gen; - break label_65; - } - jj_consume_token(S); - } - documentHandler.startIfElseDirective(); - documentHandler.ifDirective(evaluator); - label_66: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case INCLUDE_SYM: - case EXTEND_SYM: - case IDENT: - case VARIABLE: - case HASH: - case MEDIA_SYM: - ; - break; - default: - jj_la1[99] = jj_gen; - break label_66; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case INCLUDE_SYM: - includeDirective(); - break; - case MEDIA_SYM: - media(); - break; - case EXTEND_SYM: - extendDirective(); - break; - case VARIABLE: - variable(); - break; - default: - jj_la1[100] = jj_gen; - if (jj_2_3(3)) { - declarationOrNestedProperties(); - } else { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - default: - jj_la1[101] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - jj_consume_token(RBRACE); - label_67: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[102] = jj_gen; - break label_67; - } - jj_consume_token(S); - } - label_68: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case ELSE_SYM: - ; - break; - default: - jj_la1[103] = jj_gen; - break label_68; - } - elseDirective(); - } - documentHandler.endIfElseDirective(); - } - - final public void elseDirective() throws ParseException { - String evaluator = ""; - Token n = null; - jj_consume_token(ELSE_SYM); - label_69: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[104] = jj_gen; - break label_69; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IF: - jj_consume_token(IF); - label_70: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - case EQ: - case PLUS: - case MINUS: - case PRECEDES: - case SUCCEEDS: - case DIV: - case ANY: - case LPARAN: - case RPARAN: - case COMPARE: - case OR: - case AND: - case NOT_EQ: - case IDENT: - case NUMBER: - case VARIABLE: - ; - break; - default: - jj_la1[105] = jj_gen; - break label_70; - } - n = booleanExpressionToken(); - if (n != null) - evaluator += n.image; - } - break; - default: - jj_la1[106] = jj_gen; - ; - } - jj_consume_token(LBRACE); - label_71: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[107] = jj_gen; - break label_71; - } - jj_consume_token(S); - } - if (!evaluator.trim().equals("")) { - documentHandler.ifDirective(evaluator); + } + + final public void ifDirective() throws ParseException { + Token n = null; + String evaluator = ""; + jj_consume_token(IF_SYM); + label_64: + while (true) { + n = booleanExpressionToken(); + evaluator += n.image; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + case EQ: + case PLUS: + case MINUS: + case PRECEDES: + case SUCCEEDS: + case DIV: + case ANY: + case LPARAN: + case RPARAN: + case COMPARE: + case OR: + case AND: + case NOT_EQ: + case IDENT: + case NUMBER: + case VARIABLE: + ; + break; + default: + jj_la1[99] = jj_gen; + break label_64; + } + } + jj_consume_token(LBRACE); + label_65: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[100] = jj_gen; + break label_65; + } + jj_consume_token(S); + } + documentHandler.startIfElseDirective(); + documentHandler.ifDirective(evaluator); + label_66: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case EXTEND_SYM: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + ; + break; + default: + jj_la1[101] = jj_gen; + break label_66; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INCLUDE_SYM: + includeDirective(); + break; + case MEDIA_SYM: + media(); + break; + case EXTEND_SYM: + extendDirective(); + break; + case VARIABLE: + variable(); + break; + default: + jj_la1[102] = jj_gen; + if (jj_2_5(3)) { + declarationOrNestedProperties(); } else { - documentHandler.elseDirective(); - } - label_72: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case INCLUDE_SYM: - case EXTEND_SYM: - case IDENT: - case VARIABLE: - case HASH: - case MEDIA_SYM: - ; - break; - default: - jj_la1[108] = jj_gen; - break label_72; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case INCLUDE_SYM: - includeDirective(); - break; - case MEDIA_SYM: - media(); - break; - case EXTEND_SYM: - extendDirective(); - break; - case VARIABLE: - variable(); - break; - default: - jj_la1[109] = jj_gen; - if (jj_2_4(3)) { - declarationOrNestedProperties(); - } else { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - default: - jj_la1[110] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - jj_consume_token(RBRACE); - label_73: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[111] = jj_gen; - break label_73; - } - jj_consume_token(S); - } - } - - final public Token booleanExpressionToken() throws ParseException { - Token n = null; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case VARIABLE: - n = jj_consume_token(VARIABLE); - break; - case IDENT: - n = jj_consume_token(IDENT); - break; - case NUMBER: - n = jj_consume_token(NUMBER); - break; - case LPARAN: - n = jj_consume_token(LPARAN); - break; - case RPARAN: - n = jj_consume_token(RPARAN); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); break; + default: + jj_la1[103] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + } + } + jj_consume_token(RBRACE); + label_67: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[104] = jj_gen; + break label_67; + } + jj_consume_token(S); + } + label_68: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ELSE_SYM: + ; + break; + default: + jj_la1[105] = jj_gen; + break label_68; + } + elseDirective(); + } + documentHandler.endIfElseDirective(); + } + + final public void elseDirective() throws ParseException { + String evaluator = ""; + Token n = null; + jj_consume_token(ELSE_SYM); + label_69: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[106] = jj_gen; + break label_69; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IF: + jj_consume_token(IF); + label_70: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + case EQ: case PLUS: - n = jj_consume_token(PLUS); - break; case MINUS: - n = jj_consume_token(MINUS); - break; + case PRECEDES: + case SUCCEEDS: case DIV: - n = jj_consume_token(DIV); - break; case ANY: - n = jj_consume_token(ANY); - break; + case LPARAN: + case RPARAN: case COMPARE: - n = jj_consume_token(COMPARE); - break; - case EQ: - n = jj_consume_token(EQ); - break; - case PRECEDES: - n = jj_consume_token(PRECEDES); - break; - case SUCCEEDS: - n = jj_consume_token(SUCCEEDS); - break; case OR: - n = jj_consume_token(OR); - break; case AND: - n = jj_consume_token(AND); - break; - case S: - n = jj_consume_token(S); - break; case NOT_EQ: - n = jj_consume_token(NOT_EQ); - break; + case IDENT: + case NUMBER: + case VARIABLE: + ; + break; default: + jj_la1[107] = jj_gen; + break label_70; + } + n = booleanExpressionToken(); + if(n != null) evaluator += n.image; + } + break; + default: + jj_la1[108] = jj_gen; + ; + } + jj_consume_token(LBRACE); + label_71: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[109] = jj_gen; + break label_71; + } + jj_consume_token(S); + } + if(!evaluator.trim().equals("")){ documentHandler.ifDirective(evaluator); } + else{ documentHandler.elseDirective(); } + label_72: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case EXTEND_SYM: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + ; + break; + default: + jj_la1[110] = jj_gen; + break label_72; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INCLUDE_SYM: + includeDirective(); + break; + case MEDIA_SYM: + media(); + break; + case EXTEND_SYM: + extendDirective(); + break; + case VARIABLE: + variable(); + break; + default: + jj_la1[111] = jj_gen; + if (jj_2_6(3)) { + declarationOrNestedProperties(); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); + break; + default: jj_la1[112] = jj_gen; jj_consume_token(-1); throw new ParseException(); - } - { - if (true) - return n; - } - throw new Error("Missing return statement in function"); - } - - final public void eachDirective() throws ParseException { - Token var; - ArrayList<String> list = null; - String listVariable = null; - jj_consume_token(EACH_SYM); - label_74: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[113] = jj_gen; - break label_74; - } - jj_consume_token(S); - } - var = jj_consume_token(VARIABLE); - label_75: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[114] = jj_gen; - break label_75; - } - jj_consume_token(S); - } - jj_consume_token(EACH_IN); - label_76: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[115] = jj_gen; - break label_76; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - list = stringList(); - documentHandler.startEachDirective(var.image, list); + } + } + } + } + jj_consume_token(RBRACE); + label_73: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[113] = jj_gen; + break label_73; + } + jj_consume_token(S); + } + } + + final public Token booleanExpressionToken() throws ParseException { + Token n = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VARIABLE: + n = jj_consume_token(VARIABLE); + break; + case IDENT: + n = jj_consume_token(IDENT); + break; + case NUMBER: + n = jj_consume_token(NUMBER); + break; + case LPARAN: + n = jj_consume_token(LPARAN); + break; + case RPARAN: + n = jj_consume_token(RPARAN); + break; + case PLUS: + n = jj_consume_token(PLUS); + break; + case MINUS: + n = jj_consume_token(MINUS); + break; + case DIV: + n = jj_consume_token(DIV); + break; + case ANY: + n = jj_consume_token(ANY); + break; + case COMPARE: + n = jj_consume_token(COMPARE); + break; + case EQ: + n = jj_consume_token(EQ); + break; + case PRECEDES: + n = jj_consume_token(PRECEDES); + break; + case SUCCEEDS: + n = jj_consume_token(SUCCEEDS); + break; + case OR: + n = jj_consume_token(OR); + break; + case AND: + n = jj_consume_token(AND); + break; + case S: + n = jj_consume_token(S); + break; + case NOT_EQ: + n = jj_consume_token(NOT_EQ); + break; + default: + jj_la1[114] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + {if (true) return n;} + throw new Error("Missing return statement in function"); + } + + final public void eachDirective() throws ParseException { + Token var; + ArrayList<String> list = null; + String listVariable = null; + jj_consume_token(EACH_SYM); + label_74: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[115] = jj_gen; + break label_74; + } + jj_consume_token(S); + } + var = jj_consume_token(VARIABLE); + label_75: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[116] = jj_gen; + break label_75; + } + jj_consume_token(S); + } + jj_consume_token(EACH_IN); + label_76: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[117] = jj_gen; + break label_76; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + list = stringList(); + documentHandler.startEachDirective(var.image, list); + break; + case VARIABLE: + listVariable = variableName(); + documentHandler.startEachDirective(var.image, listVariable); + break; + default: + jj_la1[118] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(LBRACE); + label_77: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[119] = jj_gen; + break label_77; + } + jj_consume_token(S); + } + label_78: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case EXTEND_SYM: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + ; + break; + default: + jj_la1[120] = jj_gen; + break label_78; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INCLUDE_SYM: + includeDirective(); + break; + default: + jj_la1[121] = jj_gen; + if (jj_2_7(5)) { + removeDirective(); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MEDIA_SYM: + media(); break; - case REMOVE: - documentHandler.startEachDirective(var.image, list); - removeDirective(); + case EXTEND_SYM: + extendDirective(); break; - case VARIABLE: - listVariable = variableName(); - documentHandler.startEachDirective(var.image, listVariable); + case VARIABLE: + variable(); break; - default: - jj_la1[116] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(LBRACE); - label_77: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[117] = jj_gen; - break label_77; - } - jj_consume_token(S); - } - label_78: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case INCLUDE_SYM: - case EXTEND_SYM: - case IDENT: - case VARIABLE: - case HASH: - case MEDIA_SYM: - case REMOVE: - ; - break; - default: - jj_la1[118] = jj_gen; - break label_78; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case INCLUDE_SYM: - includeDirective(); - break; - case REMOVE: - removeDirective(); - break; - case MEDIA_SYM: - media(); - break; - case EXTEND_SYM: - extendDirective(); - break; - case VARIABLE: - variable(); - break; - default: - jj_la1[119] = jj_gen; - if (jj_2_5(3)) { - declarationOrNestedProperties(); - } else { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - default: - jj_la1[120] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - jj_consume_token(RBRACE); - label_79: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[121] = jj_gen; - break label_79; - } - jj_consume_token(S); - } - documentHandler.endEachDirective(); - } - - final public ArrayList<String> stringList() throws ParseException { - ArrayList<String> strings = new ArrayList<String>(); - Token input; - input = jj_consume_token(IDENT); - label_80: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[122] = jj_gen; - break label_80; - } - jj_consume_token(S); - } - strings.add(input.image); - label_81: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - ; + default: + jj_la1[122] = jj_gen; + if (jj_2_8(3)) { + declarationOrNestedProperties(); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); break; - default: + default: jj_la1[123] = jj_gen; - break label_81; - } - jj_consume_token(COMMA); - label_82: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[124] = jj_gen; - break label_82; - } - jj_consume_token(S); - } - input = jj_consume_token(IDENT); - strings.add(input.image); - label_83: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[125] = jj_gen; - break label_83; - } - jj_consume_token(S); - } - } - { - if (true) - return strings; - } - throw new Error("Missing return statement in function"); - } - - final public void mixinDirective() throws ParseException { - String name; - ArrayList<VariableNode> args = null; - String body; - jj_consume_token(MIXIN_SYM); - label_84: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[126] = jj_gen; - break label_84; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - name = property(); - break; - case FUNCTION: - name = functionName(); - args = arglist(); - jj_consume_token(RPARAN); - label_85: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[127] = jj_gen; - break label_85; - } - jj_consume_token(S); - } - break; + jj_consume_token(-1); + throw new ParseException(); + } + } + } + } + } + } + jj_consume_token(RBRACE); + label_79: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[124] = jj_gen; + break label_79; + } + jj_consume_token(S); + } + documentHandler.endEachDirective(); + } + + final public ArrayList<String > stringList() throws ParseException { + ArrayList<String > strings = new ArrayList<String >(); + Token input; + input = jj_consume_token(IDENT); + label_80: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[125] = jj_gen; + break label_80; + } + jj_consume_token(S); + } + strings.add(input.image); + label_81: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[126] = jj_gen; + break label_81; + } + jj_consume_token(COMMA); + label_82: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[127] = jj_gen; + break label_82; + } + jj_consume_token(S); + } + input = jj_consume_token(IDENT); + strings.add(input.image); + label_83: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; default: - jj_la1[128] = jj_gen; + jj_la1[128] = jj_gen; + break label_83; + } + jj_consume_token(S); + } + } + {if (true) return strings;} + throw new Error("Missing return statement in function"); + } + + final public void mixinDirective() throws ParseException { + String name; + ArrayList<VariableNode> args = null; + String body; + jj_consume_token(MIXIN_SYM); + label_84: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[129] = jj_gen; + break label_84; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + name = property(); + break; + case FUNCTION: + name = functionName(); + args = arglist(); + jj_consume_token(RPARAN); + label_85: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[130] = jj_gen; + break label_85; + } + jj_consume_token(S); + } + break; + default: + jj_la1[131] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(LBRACE); + label_86: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[132] = jj_gen; + break label_86; + } + jj_consume_token(S); + } + documentHandler.startMixinDirective(name, args); + label_87: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case INCLUDE_SYM: + case EACH_SYM: + case EXTEND_SYM: + case IDENT: + case VARIABLE: + case HASH: + case MEDIA_SYM: + ; + break; + default: + jj_la1[133] = jj_gen; + break label_87; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INCLUDE_SYM: + includeDirective(); + break; + case MEDIA_SYM: + media(); + break; + case EACH_SYM: + eachDirective(); + break; + case EXTEND_SYM: + extendDirective(); + break; + case VARIABLE: + variable(); + break; + default: + jj_la1[134] = jj_gen; + if (jj_2_9(3)) { + declarationOrNestedProperties(); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); + break; + default: + jj_la1[135] = jj_gen; jj_consume_token(-1); throw new ParseException(); + } + } + } + } + jj_consume_token(RBRACE); + label_88: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[136] = jj_gen; + break label_88; + } + jj_consume_token(S); + } + documentHandler.endMixinDirective(name, args); + } + + final public ArrayList<VariableNode> arglist() throws ParseException { + ArrayList<VariableNode> args = new ArrayList<VariableNode>(); + VariableNode arg; + boolean hasNonOptionalArgument = false; + arg = mixinArg(); + label_89: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[137] = jj_gen; + break label_89; + } + jj_consume_token(COMMA); + label_90: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[138] = jj_gen; + break label_90; } - jj_consume_token(LBRACE); - label_86: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[129] = jj_gen; - break label_86; - } - jj_consume_token(S); - } - documentHandler.startMixinDirective(name, args); - label_87: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case INCLUDE_SYM: - case EACH_SYM: - case EXTEND_SYM: - case IDENT: - case VARIABLE: - case HASH: - case MEDIA_SYM: - ; - break; - default: - jj_la1[130] = jj_gen; - break label_87; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case INCLUDE_SYM: - includeDirective(); - break; - case MEDIA_SYM: - media(); - break; - case EACH_SYM: - eachDirective(); - break; - case EXTEND_SYM: - extendDirective(); - break; - case VARIABLE: - variable(); - break; - default: - jj_la1[131] = jj_gen; - if (jj_2_6(3)) { - declarationOrNestedProperties(); - } else { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - default: - jj_la1[132] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - jj_consume_token(RBRACE); - label_88: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[133] = jj_gen; - break label_88; - } - jj_consume_token(S); - } - documentHandler.endMixinDirective(name, args); + jj_consume_token(S); + } + hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); + arg = mixinArg(); } + hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); + {if (true) return args;} + throw new Error("Missing return statement in function"); + } - final public ArrayList<VariableNode> arglist() throws ParseException { - ArrayList<VariableNode> args = new ArrayList<VariableNode>(); - VariableNode arg; - arg = mixinArg(); - label_89: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[134] = jj_gen; - break label_89; - } - jj_consume_token(COMMA); - label_90: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[135] = jj_gen; - break label_90; - } - jj_consume_token(S); - } - args.add(arg); - arg = mixinArg(); - } - args.add(arg); - { - if (true) - return args; - } - throw new Error("Missing return statement in function"); - } + boolean checkMixinForNonOptionalArguments(VariableNode arg, boolean hasNonOptionalArguments) throws ParseException { + boolean currentArgHasArguments = arg.getExpr() != null && arg.getExpr().getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE && arg.getExpr().getNextLexicalUnit() != null; - final public VariableNode mixinArg() throws ParseException { - String name; - LexicalUnitImpl first = null; - LexicalUnitImpl next = null; - LexicalUnitImpl prev = null; - name = variableName(); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COLON: - jj_consume_token(COLON); - label_91: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[136] = jj_gen; - break label_91; - } - jj_consume_token(S); - } - first = term(null); - prev = first; - label_92: while (true) { - if (jj_2_7(2)) { - ; - } else { - break label_92; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - jj_consume_token(COMMA); - label_93: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[137] = jj_gen; - break label_93; - } - jj_consume_token(S); - } - break; - default: - jj_la1[138] = jj_gen; - ; + if(currentArgHasArguments) + { + if(hasNonOptionalArguments) + { + throw new ParseException("Sass Error: Required argument $"+ arg.getName() +" must come before any optional arguments."); } - next = term(prev); - prev.setNextLexicalUnit(next); - prev = next; - } + return hasNonOptionalArguments; + }else + { + return true; + } + } + + final public VariableNode mixinArg() throws ParseException { + String name; + Token variable = null; + LexicalUnitImpl first = null; + LexicalUnitImpl prev = null; + LexicalUnitImpl next = null; + name = variableName(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: + case VARIABLE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: + jj_consume_token(COLON); + label_91: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; break; - default: + default: jj_la1[139] = jj_gen; - ; - } - VariableNode arg = new VariableNode(name, first, false); - { - if (true) - return arg; + break label_91; + } + jj_consume_token(S); } - throw new Error("Missing return statement in function"); - } - - final public ArrayList<LexicalUnitImpl> argValuelist() - throws ParseException { - ArrayList<LexicalUnitImpl> args = new ArrayList<LexicalUnitImpl>(); - LexicalUnitImpl first = null; - LexicalUnitImpl next = null; - LexicalUnitImpl prev = null; - first = term(null); - args.add(first); + first = nonVariableTerm(null); prev = first; - label_94: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case MINUS: - case STRING: - case IDENT: - case NUMBER: - case URL: - case VARIABLE: - case PERCENTAGE: - case PT: - case MM: - case CM: - case PC: - case IN: - case PX: - case EMS: - case EXS: - case DEG: - case RAD: - case GRAD: - case MS: - case SECOND: - case HZ: - case KHZ: - case DIMEN: - case HASH: - case UNICODERANGE: - case FUNCTION: - ; - break; - default: - jj_la1[140] = jj_gen; - break label_94; - } - next = term(prev); - prev.setNextLexicalUnit(next); - prev = next; - } - label_95: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[141] = jj_gen; - break label_95; - } + label_92: + while (true) { + if (jj_2_10(3)) { + ; + } else { + break label_92; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); - label_96: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[142] = jj_gen; - break label_96; - } - jj_consume_token(S); - } - first = term(null); - args.add(first); - prev = first; - label_97: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case MINUS: - case STRING: - case IDENT: - case NUMBER: - case URL: - case VARIABLE: - case PERCENTAGE: - case PT: - case MM: - case CM: - case PC: - case IN: - case PX: - case EMS: - case EXS: - case DEG: - case RAD: - case GRAD: - case MS: - case SECOND: - case HZ: - case KHZ: - case DIMEN: - case HASH: - case UNICODERANGE: - case FUNCTION: - ; - break; - default: - jj_la1[143] = jj_gen; - break label_97; - } - next = term(prev); - prev.setNextLexicalUnit(next); - prev = next; - } - } - { - if (true) - return args; - } - throw new Error("Missing return statement in function"); - } - - final public void includeDirective() throws ParseException { - String name; - ArrayList<LexicalUnitImpl> args = null; - jj_consume_token(INCLUDE_SYM); - label_98: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[144] = jj_gen; - break label_98; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - name = property(); - break; - case FUNCTION: - name = functionName(); - args = argValuelist(); - jj_consume_token(RPARAN); - break; - default: - jj_la1[145] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_99: while (true) { - jj_consume_token(SEMICOLON); - label_100: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[146] = jj_gen; - break label_100; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[147] = jj_gen; - break label_99; - } - } - documentHandler.includeDirective(name, args); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public void removeDirective() throws ParseException { - ArrayList<String> list = null; - ArrayList<String> remove = null; - String separator = null; - Token n = null; - jj_consume_token(REMOVE); - label_101: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[148] = jj_gen; - break label_101; - } - jj_consume_token(S); - } - list = removeDirectiveArgs(0); - jj_consume_token(COMMA); - label_102: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: + label_93: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: ; break; - default: - jj_la1[149] = jj_gen; - break label_102; - } - jj_consume_token(S); - } - remove = removeDirectiveArgs(1); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - jj_consume_token(COMMA); - label_103: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[150] = jj_gen; - break label_103; - } - jj_consume_token(S); - } - n = jj_consume_token(IDENT); - separator = n.image; - label_104: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[151] = jj_gen; - break label_104; - } - jj_consume_token(S); + default: + jj_la1[140] = jj_gen; + break label_93; + } + jj_consume_token(S); } break; - default: - jj_la1[152] = jj_gen; + default: + jj_la1[141] = jj_gen; ; - } - jj_consume_token(RPARAN); - label_105: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[153] = jj_gen; - break label_105; - } - jj_consume_token(S); - } - jj_consume_token(SEMICOLON); - label_106: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[154] = jj_gen; - break label_106; - } - jj_consume_token(S); - } - documentHandler.removeDirective(list, remove, separator); + } + prev = nonVariableTerm(prev); + } + break; + case VARIABLE: + variable = jj_consume_token(VARIABLE); + first = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, variable.image); + break; + default: + jj_la1[142] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + default: + jj_la1[143] = jj_gen; + ; } - - ArrayList<String> removeDirectiveArgs(int nest) throws ParseException { - ArrayList<String> list = new ArrayList<String>(); - // Start at one due to "remove(" containing one. - int nesting = nest; - Token t = null; - - while (true) { - t = getToken(1); - if (t.kind == VARIABLE) { - list.add(t.image); - } else if (t.kind == STRING) { - list.add(t.image.substring(1, t.image.length()).substring(0, - t.image.length() - 2)); - - } else if (t.kind == LPARAN) { - nesting++; - if (nesting > nest + 1) { - throw new CSSParseException( - "Only one ( ) pair per parameter allowed", - getLocator()); - } - } else if (t.kind == RPARAN) { - nesting--; - if (nesting == 0) { - getNextToken(); - return list; - } - } else if (t.kind == COMMA) { - if (nesting == nest) { - return list; - } - } - - getNextToken(); - } - } - - final public Node returnDirective() throws ParseException { - String raw; - raw = skipStatement(); - { - if (true) - return null; - } - throw new Error("Missing return statement in function"); - } - - void debugDirective() throws ParseException { - } - - void warnDirective() throws ParseException { - } - - final public Node forDirective() throws ParseException { - String var; - String from; - String to; - boolean exclusive; - String body; - Token tok; - var = variableName(); - int[] toThrough = { TO, THROUGH }; - from = skipStatementUntil(toThrough); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case TO: - tok = jj_consume_token(TO); - exclusive = true; - break; - case THROUGH: - tok = jj_consume_token(THROUGH); - exclusive = false; - break; - default: - jj_la1[155] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - to = skipStatementUntilLeftBrace(); - label_107: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[156] = jj_gen; - break label_107; - } - jj_consume_token(S); - } - body = skipStatement(); - { - if (true) - return documentHandler.forDirective(var, from, to, exclusive, - body); - } - throw new Error("Missing return statement in function"); - } - - final public Node whileDirective() throws ParseException { - String condition; - String body; - condition = skipStatementUntilLeftBrace(); - body = skipStatement(); - { - if (true) - return documentHandler.whileDirective(condition, body); - } - throw new Error("Missing return statement in function"); - } - - final public void extendDirective() throws ParseException { - ArrayList<String> list; - jj_consume_token(EXTEND_SYM); - label_108: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[157] = jj_gen; - break label_108; - } - jj_consume_token(S); - } - list = selectorList(); - label_109: while (true) { - jj_consume_token(SEMICOLON); - label_110: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[158] = jj_gen; - break label_110; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[159] = jj_gen; - break label_109; - } - } - documentHandler.extendDirective(list); - } - - Node importDirective() throws ParseException { - return null; - } - - Node charsetDirective() throws ParseException { - return null; - } - - Node mozDocumentDirective() throws ParseException { - return null; - } - - Node supportsDirective() throws ParseException { - return null; - } - - final public void nestedProperties() throws ParseException { - String name; - LexicalUnit exp; - name = property(); + VariableNode arg = new VariableNode(name, first, false); + {if (true) return arg;} + throw new Error("Missing return statement in function"); + } + + final public ArrayList<LexicalUnitImpl> argValuelist() throws ParseException { + ArrayList<LexicalUnitImpl> args = new ArrayList<LexicalUnitImpl>(); + LexicalUnitImpl first = null; + LexicalUnitImpl next = null; + LexicalUnitImpl prev = null; + first = term(null); + args.add(first); prev = first; + label_94: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + case COLON: + case STRING: + case IDENT: + case NUMBER: + case URL: + case VARIABLE: + case PERCENTAGE: + case PT: + case MM: + case CM: + case PC: + case IN: + case PX: + case EMS: + case EXS: + case DEG: + case RAD: + case GRAD: + case MS: + case SECOND: + case HZ: + case KHZ: + case DIMEN: + case HASH: + case UNICODERANGE: + case FUNCTION: + ; + break; + default: + jj_la1[144] = jj_gen; + break label_94; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: jj_consume_token(COLON); - label_111: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[160] = jj_gen; - break label_111; - } - jj_consume_token(S); - } - jj_consume_token(LBRACE); - label_112: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[161] = jj_gen; - break label_112; - } - jj_consume_token(S); - } - documentHandler.startNestedProperties(name); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[162] = jj_gen; + label_95: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: ; - } - label_113: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[163] = jj_gen; - break label_113; - } - jj_consume_token(SEMICOLON); - label_114: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[164] = jj_gen; - break label_114; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[165] = jj_gen; - ; - } - } - jj_consume_token(RBRACE); - documentHandler.endNestedProperties(name); - label_115: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[166] = jj_gen; - break label_115; - } - jj_consume_token(S); - } - } - - /** - * @exception ParseException - * exception during the parse - */ - final public void declarationOrNestedProperties() throws ParseException { - boolean important = false; - String name; - LexicalUnitImpl exp; - Token save; - String comment = null; - try { - name = property(); - save = token; - jj_consume_token(COLON); - label_116: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[167] = jj_gen; - break label_116; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case MINUS: - case STRING: - case IDENT: - case NUMBER: - case URL: - case VARIABLE: - case PERCENTAGE: - case PT: - case MM: - case CM: - case PC: - case IN: - case PX: - case EMS: - case EXS: - case DEG: - case RAD: - case GRAD: - case MS: - case SECOND: - case HZ: - case KHZ: - case DIMEN: - case HASH: - case UNICODERANGE: - case FUNCTION: - exp = expr(); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IMPORTANT_SYM: - important = prio(); - break; - default: - jj_la1[168] = jj_gen; - ; - } - Token next = getToken(1); - if (next.kind == SEMICOLON || next.kind == RBRACE) { - while (next.kind == SEMICOLON) { - skipStatement(); - next = getToken(1); - } - if (token.specialToken != null) { - documentHandler.property(name, exp, important, - token.specialToken.image); - } else { - documentHandler.property(name, exp, important, null); - } - } - break; - case LBRACE: - jj_consume_token(LBRACE); - label_117: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[169] = jj_gen; - break label_117; - } - jj_consume_token(S); - } - documentHandler.startNestedProperties(name); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[170] = jj_gen; - ; - } - label_118: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[171] = jj_gen; - break label_118; - } - jj_consume_token(SEMICOLON); - label_119: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[172] = jj_gen; - break label_119; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[173] = jj_gen; - ; - } - } - jj_consume_token(RBRACE); - label_120: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[174] = jj_gen; - break label_120; - } - jj_consume_token(S); - } - documentHandler.endNestedProperties(name); - break; - default: - jj_la1[175] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (JumpException e) { - skipAfterExpression(); - // reportWarningSkipText(getLocator(), skipAfterExpression()); - - } catch (NumberFormatException e) { - if (errorHandler != null) { - errorHandler.error(new CSSParseException("Invalid number " - + e.getMessage(), getLocator(), e)); - } - reportWarningSkipText(getLocator(), skipAfterExpression()); - } catch (ParseException e) { - if (errorHandler != null) { - if (e.currentToken != null) { - LocatorImpl li = new LocatorImpl(this, - e.currentToken.next.beginLine, - e.currentToken.next.beginColumn - 1); - reportError(li, e); - } else { - reportError(getLocator(), e); - } - skipAfterExpression(); - /* - * LocatorImpl loc = (LocatorImpl) getLocator(); loc.column--; - * reportWarningSkipText(loc, skipAfterExpression()); - */ - } else { - skipAfterExpression(); - } - } - } - - /** - * @exception ParseException - * exception during the parse - */ - final public void declaration() throws ParseException { - boolean important = false; - String name; - LexicalUnit exp; - Token save; - try { - name = property(); - save = token; - jj_consume_token(COLON); - label_121: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[176] = jj_gen; - break label_121; - } - jj_consume_token(S); - } - exp = expr(); - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IMPORTANT_SYM: - important = prio(); - break; - default: - jj_la1[177] = jj_gen; - ; - } - documentHandler.property(name, exp, important); - } catch (JumpException e) { - skipAfterExpression(); - // reportWarningSkipText(getLocator(), skipAfterExpression()); - - } catch (NumberFormatException e) { - if (errorHandler != null) { - errorHandler.error(new CSSParseException("Invalid number " - + e.getMessage(), getLocator(), e)); - } - reportWarningSkipText(getLocator(), skipAfterExpression()); - } catch (ParseException e) { - if (errorHandler != null) { - if (e.currentToken != null) { - LocatorImpl li = new LocatorImpl(this, - e.currentToken.next.beginLine, - e.currentToken.next.beginColumn - 1); - reportError(li, e); - } else { - reportError(getLocator(), e); - } - skipAfterExpression(); - /* - * LocatorImpl loc = (LocatorImpl) getLocator(); loc.column--; - * reportWarningSkipText(loc, skipAfterExpression()); - */ - } else { - skipAfterExpression(); - } - } - } - - /** - * @exception ParseException - * exception during the parse - */ - final public boolean prio() throws ParseException { - jj_consume_token(IMPORTANT_SYM); - label_122: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[178] = jj_gen; - break label_122; - } - jj_consume_token(S); - } - { - if (true) - return true; - } - throw new Error("Missing return statement in function"); - } - - final public boolean guarded() throws ParseException { - jj_consume_token(GUARDED_SYM); - label_123: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[179] = jj_gen; - break label_123; - } - jj_consume_token(S); - } - { - if (true) - return true; - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public LexicalUnitImpl operator(LexicalUnitImpl prev) - throws ParseException { - Token n; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case DIV: - n = jj_consume_token(DIV); - label_124: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[180] = jj_gen; - break label_124; - } - jj_consume_token(S); - } - { - if (true) - return LexicalUnitImpl.createSlash(n.beginLine, - n.beginColumn, prev); - } - break; - case COMMA: - n = jj_consume_token(COMMA); - label_125: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[181] = jj_gen; - break label_125; - } - jj_consume_token(S); - } - { - if (true) - return LexicalUnitImpl.createComma(n.beginLine, - n.beginColumn, prev); - } - break; - default: - jj_la1[182] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public LexicalUnitImpl expr() throws ParseException { - LexicalUnitImpl first, res; - char op; - first = term(null); - res = first; - label_126: while (true) { - if (jj_2_8(2)) { - ; - } else { - break label_126; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case COMMA: - case DIV: - res = operator(res); - break; - default: - jj_la1[183] = jj_gen; - ; - } - res = term(res); - } - { - if (true) - return first; - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public char unaryOperator() throws ParseException { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case MINUS: - jj_consume_token(MINUS); - { - if (true) - return '-'; - } - break; - case PLUS: - jj_consume_token(PLUS); - { - if (true) - return '+'; - } break; + default: + jj_la1[145] = jj_gen; + break label_95; + } + jj_consume_token(S); + } + break; + default: + jj_la1[146] = jj_gen; + ; + } + next = term(prev); + prev.setNextLexicalUnit(next); prev = next; + } + label_96: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[147] = jj_gen; + break label_96; + } + jj_consume_token(COMMA); + label_97: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; default: - jj_la1[184] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public LexicalUnitImpl term(LexicalUnitImpl prev) - throws ParseException { - LexicalUnitImpl result = null; - Token n = null; - char op = ' '; - String varName; - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + jj_la1[148] = jj_gen; + break label_97; + } + jj_consume_token(S); + } + first = term(null); + args.add(first); prev = first; + label_98: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: + case COLON: case STRING: case IDENT: case NUMBER: case URL: + case VARIABLE: case PERCENTAGE: case PT: case MM: @@ -4166,308 +3360,1254 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { case HASH: case UNICODERANGE: case FUNCTION: - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case MINUS: - case NUMBER: - case PERCENTAGE: - case PT: - case MM: - case CM: - case PC: - case IN: - case PX: - case EMS: - case EXS: - case DEG: - case RAD: - case GRAD: - case MS: - case SECOND: - case HZ: - case KHZ: - case DIMEN: - case FUNCTION: - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case MINUS: - op = unaryOperator(); - break; - default: - jj_la1[185] = jj_gen; - ; - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case NUMBER: - n = jj_consume_token(NUMBER); - result = LexicalUnitImpl.createNumber(n.beginLine, - n.beginColumn, prev, number(op, n, 0)); - break; - case PERCENTAGE: - n = jj_consume_token(PERCENTAGE); - result = LexicalUnitImpl.createPercentage(n.beginLine, - n.beginColumn, prev, number(op, n, 1)); - break; - case PT: - n = jj_consume_token(PT); - result = LexicalUnitImpl.createPT(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case CM: - n = jj_consume_token(CM); - result = LexicalUnitImpl.createCM(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case MM: - n = jj_consume_token(MM); - result = LexicalUnitImpl.createMM(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case PC: - n = jj_consume_token(PC); - result = LexicalUnitImpl.createPC(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case IN: - n = jj_consume_token(IN); - result = LexicalUnitImpl.createIN(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case PX: - n = jj_consume_token(PX); - result = LexicalUnitImpl.createPX(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case EMS: - n = jj_consume_token(EMS); - result = LexicalUnitImpl.createEMS(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case EXS: - n = jj_consume_token(EXS); - result = LexicalUnitImpl.createEXS(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case DEG: - n = jj_consume_token(DEG); - result = LexicalUnitImpl.createDEG(n.beginLine, - n.beginColumn, prev, number(op, n, 3)); - break; - case RAD: - n = jj_consume_token(RAD); - result = LexicalUnitImpl.createRAD(n.beginLine, - n.beginColumn, prev, number(op, n, 3)); - break; - case GRAD: - n = jj_consume_token(GRAD); - result = LexicalUnitImpl.createGRAD(n.beginLine, - n.beginColumn, prev, number(op, n, 3)); - break; - case SECOND: - n = jj_consume_token(SECOND); - result = LexicalUnitImpl.createS(n.beginLine, - n.beginColumn, prev, number(op, n, 1)); - break; - case MS: - n = jj_consume_token(MS); - result = LexicalUnitImpl.createMS(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case HZ: - n = jj_consume_token(HZ); - result = LexicalUnitImpl.createHZ(n.beginLine, - n.beginColumn, prev, number(op, n, 2)); - break; - case KHZ: - n = jj_consume_token(KHZ); - result = LexicalUnitImpl.createKHZ(n.beginLine, - n.beginColumn, prev, number(op, n, 3)); - break; - case DIMEN: - n = jj_consume_token(DIMEN); - String s = n.image; - int i = 0; - while (i < s.length() - && (Character.isDigit(s.charAt(i)) || (s.charAt(i) == '.'))) { - i++; - } - result = LexicalUnitImpl.createDimen(n.beginLine, - n.beginColumn, prev, - Float.valueOf(s.substring(0, i)).floatValue(), - s.substring(i)); - break; - case FUNCTION: - result = function(op, prev); - break; - default: - jj_la1[186] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - case STRING: - case IDENT: - case URL: - case HASH: - case UNICODERANGE: - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case STRING: - n = jj_consume_token(STRING); - result = LexicalUnitImpl - .createString( - n.beginLine, - n.beginColumn, - prev, - convertStringIndex(n.image, 1, - n.image.length() - 1)); - break; - case IDENT: - n = jj_consume_token(IDENT); - String s = convertIdent(n.image); - if ("inherit".equals(s)) { - result = LexicalUnitImpl.createInherit(n.beginLine, - n.beginColumn, prev); - } else { - result = LexicalUnitImpl.createIdent(n.beginLine, - n.beginColumn, prev, convertIdent(n.image)); - } + ; + break; + default: + jj_la1[149] = jj_gen; + break label_98; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COLON: + jj_consume_token(COLON); + label_99: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[150] = jj_gen; + break label_99; + } + jj_consume_token(S); + } + break; + default: + jj_la1[151] = jj_gen; + ; + } + next = term(prev); + prev.setNextLexicalUnit(next); prev = next; + } + } + {if (true) return args;} + throw new Error("Missing return statement in function"); + } + + final public void includeDirective() throws ParseException { + String name; + ArrayList<LexicalUnitImpl> args=null; + jj_consume_token(INCLUDE_SYM); + label_100: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[152] = jj_gen; + break label_100; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + name = property(); + break; + case FUNCTION: + name = functionName(); + args = argValuelist(); + jj_consume_token(RPARAN); + break; + default: + jj_la1[153] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + label_101: + while (true) { + jj_consume_token(SEMICOLON); + label_102: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[154] = jj_gen; + break label_102; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[155] = jj_gen; + break label_101; + } + } + documentHandler.includeDirective(name, args); + } + +/** + * @exception ParseException exception during the parse + */ + final public void removeDirective() throws ParseException { + String list = null; + String remove = null; + String separator = null; + String variable = null; + Token n = null; + n = jj_consume_token(VARIABLE); + variable = n.image; + label_103: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[156] = jj_gen; + break label_103; + } + jj_consume_token(S); + } + jj_consume_token(COLON); + label_104: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[157] = jj_gen; + break label_104; + } + jj_consume_token(S); + } + jj_consume_token(REMOVE); + label_105: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[158] = jj_gen; + break label_105; + } + jj_consume_token(S); + } + list = removeDirectiveArgs(0); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case RPARAN: + jj_consume_token(RPARAN); + break; + default: + jj_la1[159] = jj_gen; + ; + } + jj_consume_token(COMMA); + label_106: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[160] = jj_gen; + break label_106; + } + jj_consume_token(S); + } + remove = removeDirectiveArgs(1); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + jj_consume_token(COMMA); + label_107: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[161] = jj_gen; + break label_107; + } + jj_consume_token(S); + } + n = jj_consume_token(IDENT); + separator = n.image; + label_108: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[162] = jj_gen; + break label_108; + } + jj_consume_token(S); + } + break; + default: + jj_la1[163] = jj_gen; + ; + } + jj_consume_token(RPARAN); + label_109: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[164] = jj_gen; + break label_109; + } + jj_consume_token(S); + } + jj_consume_token(SEMICOLON); + label_110: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[165] = jj_gen; + break label_110; + } + jj_consume_token(S); + } + documentHandler.removeDirective(variable,list,remove,separator); + } + + String removeDirectiveArgs(int nest) throws ParseException { + String list = ""; + int nesting = nest; + Token t = null; - /* - * / Auto correction code used in the CSS Validator but must - * not be used by a conformant CSS2 parser. Common error : - * H1 { color : black background : white } - * - * Token t = getToken(1); Token semicolon = new Token(); - * semicolon.kind = SEMICOLON; semicolon.image = ";"; if - * (t.kind == COLON) { // @@SEEME. (generate a warning?) // - * @@SEEME if expression is a single ident, generate an - * error ? rejectToken(semicolon); - * - * result = prev; } / - */ + while(true) + { + t = getToken(1); + String s = t.image; + if(t.kind == VARIABLE||t.kind == IDENT) + { + list += s; + }else if(s.toLowerCase().equals("auto")||s.toLowerCase().equals("space")||s.toLowerCase().equals("comma")) + { + int i = 2; + Token temp = getToken(i); + boolean isLast = true; + while(temp.kind != SEMICOLON) + { + if(temp.kind != RPARAN || temp.kind != S) + { + isLast = false; + } + i++; + temp = getToken(i); + } - break; - case HASH: - result = hexcolor(prev); - break; - case URL: - result = url(prev); - break; - case UNICODERANGE: - result = unicode(prev); - break; - default: - jj_la1[187] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); + if(isLast) + { + return list; + } } - break; - default: - jj_la1[188] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_127: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[189] = jj_gen; - break label_127; + else if(t.kind == STRING) + { + list += s.substring(1,s.length()).substring(0,s.length()-2); + + }else if(t.kind == LPARAN) + { + nesting++; + if(nesting > nest+1) + { + throw new CSSParseException("Only one ( ) pair per parameter allowed", getLocator()); + } + }else if(t.kind == RPARAN) + { + nesting--; + if(nesting == 0) + { + return list; + } + } else if(t.kind == COMMA) + { + if(nesting == nest) + { + return list; + }else + { + list += ","; + } + + }else if(t.kind == S) + { + list += " "; + } else if(t.kind == LBRACE) + { + throw new CSSParseException("Invalid token,'{' found", getLocator()); } - jj_consume_token(S); - } - break; - case VARIABLE: - varName = variableName(); - result = LexicalUnitImpl.createVariable(token.beginLine, - token.beginColumn, prev, varName); + + getNextToken(); + } + } + + final public Node returnDirective() throws ParseException { + String raw; + raw = skipStatement(); + {if (true) return null;} + throw new Error("Missing return statement in function"); + } + + void debugDirective() throws ParseException { + } + + void warnDirective() throws ParseException { + } + + final public Node forDirective() throws ParseException { + String var; + String from; + String to; + boolean exclusive; + String body; + Token tok; + var = variableName(); + int[] toThrough = {TO, THROUGH}; + from = skipStatementUntil(toThrough); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TO: + tok = jj_consume_token(TO); + exclusive = true; + break; + case THROUGH: + tok = jj_consume_token(THROUGH); + exclusive = false; + break; + default: + jj_la1[166] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + to = skipStatementUntilLeftBrace(); + label_111: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[167] = jj_gen; + break label_111; + } + jj_consume_token(S); + } + body = skipStatement(); + {if (true) return documentHandler.forDirective(var, from, to, exclusive, body);} + throw new Error("Missing return statement in function"); + } + + final public Node whileDirective() throws ParseException { + String condition; + String body; + condition = skipStatementUntilLeftBrace(); + body = skipStatement(); + {if (true) return documentHandler.whileDirective(condition, body);} + throw new Error("Missing return statement in function"); + } + + final public void extendDirective() throws ParseException { + ArrayList<String> list; + jj_consume_token(EXTEND_SYM); + label_112: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[168] = jj_gen; + break label_112; + } + jj_consume_token(S); + } + list = selectorList(); + label_113: + while (true) { + jj_consume_token(SEMICOLON); + label_114: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[169] = jj_gen; + break label_114; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[170] = jj_gen; + break label_113; + } + } + documentHandler.extendDirective(list); + } + + Node importDirective() throws ParseException { + return null; + } + + Node charsetDirective() throws ParseException { + return null; + } + + Node mozDocumentDirective() throws ParseException { + return null; + } + + Node supportsDirective() throws ParseException { + return null; + } + + final public void nestedProperties() throws ParseException { + String name; +LexicalUnit exp; + name = property(); + jj_consume_token(COLON); + label_115: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[171] = jj_gen; + break label_115; + } + jj_consume_token(S); + } + jj_consume_token(LBRACE); + label_116: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[172] = jj_gen; + break label_116; + } + jj_consume_token(S); + } + documentHandler.startNestedProperties(name); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[173] = jj_gen; + ; + } + label_117: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[174] = jj_gen; + break label_117; + } + jj_consume_token(SEMICOLON); + label_118: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[175] = jj_gen; + break label_118; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[176] = jj_gen; + ; + } + } + jj_consume_token(RBRACE); + documentHandler.endNestedProperties(name); + label_119: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[177] = jj_gen; + break label_119; + } + jj_consume_token(S); + } + } + +/** + * @exception ParseException exception during the parse + */ + final public void declarationOrNestedProperties() throws ParseException { + boolean important = false; + String name; + LexicalUnitImpl exp; + Token save; + String comment = null; + try { + name = property(); + save = token; + jj_consume_token(COLON); + label_120: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[178] = jj_gen; + break label_120; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + case STRING: + case IDENT: + case NUMBER: + case URL: + case VARIABLE: + case PERCENTAGE: + case PT: + case MM: + case CM: + case PC: + case IN: + case PX: + case EMS: + case EXS: + case DEG: + case RAD: + case GRAD: + case MS: + case SECOND: + case HZ: + case KHZ: + case DIMEN: + case HASH: + case UNICODERANGE: + case FUNCTION: + exp = expr(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IMPORTANT_SYM: + important = prio(); + break; + default: + jj_la1[179] = jj_gen; + ; + } + Token next = getToken(1); + if(next.kind == SEMICOLON || next.kind == RBRACE){ + while(next.kind == SEMICOLON){ + skipStatement(); + next = getToken(1); + } + if(token.specialToken!=null){ + documentHandler.property(name, exp, important, token.specialToken.image); + }else{ + documentHandler.property(name, exp, important, null); + } + } + break; + case LBRACE: + jj_consume_token(LBRACE); + label_121: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; break; + default: + jj_la1[180] = jj_gen; + break label_121; + } + jj_consume_token(S); + } + documentHandler.startNestedProperties(name); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; default: - jj_la1[190] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - { - if (true) - return result; + jj_la1[181] = jj_gen; + ; } - throw new Error("Missing return statement in function"); - } - - /** - * Handle all CSS2 functions. - * - * @exception ParseException - * exception during the parse - */ - final public LexicalUnitImpl function(char operator, LexicalUnitImpl prev) - throws ParseException { - Token n; - LexicalUnit params = null; - n = jj_consume_token(FUNCTION); - label_128: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { + label_122: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[182] = jj_gen; + break label_122; + } + jj_consume_token(SEMICOLON); + label_123: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case S: - ; - break; + ; + break; default: - jj_la1[191] = jj_gen; - break label_128; + jj_la1[183] = jj_gen; + break label_123; } jj_consume_token(S); - } - String fname = convertIdent(n.image); - if ("alpha(".equals(fname)) { - String body = skipStatementUntilSemiColon(); - { - if (true) - return LexicalUnitImpl.createIdent(n.beginLine, - n.beginColumn, null, "alpha(" + body); - } - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case PLUS: - case MINUS: - case STRING: - case IDENT: - case NUMBER: - case URL: - case VARIABLE: - case PERCENTAGE: - case PT: - case MM: - case CM: - case PC: - case IN: - case PX: - case EMS: - case EXS: - case DEG: - case RAD: - case GRAD: - case MS: - case SECOND: - case HZ: - case KHZ: - case DIMEN: - case HASH: - case UNICODERANGE: - case FUNCTION: - params = expr(); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); break; - default: - jj_la1[192] = jj_gen; + default: + jj_la1[184] = jj_gen; ; + } } - jj_consume_token(RPARAN); - if (operator != ' ') { - { - if (true) - throw new CSSParseException( - "invalid operator before a function.", getLocator()); + jj_consume_token(RBRACE); + label_124: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[185] = jj_gen; + break label_124; + } + jj_consume_token(S); + } + documentHandler.endNestedProperties(name); + break; + default: + jj_la1[186] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } catch (JumpException e) { + skipAfterExpression(); + // reportWarningSkipText(getLocator(), skipAfterExpression()); + + } catch (NumberFormatException e) { + if (errorHandler != null) { + errorHandler.error(new CSSParseException("Invalid number " + + e.getMessage(), + getLocator(), + e)); + } + reportWarningSkipText(getLocator(), skipAfterExpression()); + } catch (ParseException e) { + if (errorHandler != null) { + if (e.currentToken != null) { + LocatorImpl li = new LocatorImpl(this, + e.currentToken.next.beginLine, + e.currentToken.next.beginColumn-1); + reportError(li, e); + } else { + reportError(getLocator(), e); + } + skipAfterExpression(); + /* + LocatorImpl loc = (LocatorImpl) getLocator(); + loc.column--; + reportWarningSkipText(loc, skipAfterExpression()); + */ + } else { + skipAfterExpression(); + } + } + } + +/** + * @exception ParseException exception during the parse + */ + final public void declaration() throws ParseException { + boolean important = false; + String name; + LexicalUnit exp; + Token save; + try { + name = property(); + save = token; + jj_consume_token(COLON); + label_125: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[187] = jj_gen; + break label_125; + } + jj_consume_token(S); + } + exp = expr(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IMPORTANT_SYM: + important = prio(); + break; + default: + jj_la1[188] = jj_gen; + ; + } + documentHandler.property(name, exp, important); + } catch (JumpException e) { + skipAfterExpression(); + // reportWarningSkipText(getLocator(), skipAfterExpression()); + + } catch (NumberFormatException e) { + if (errorHandler != null) { + errorHandler.error(new CSSParseException("Invalid number " + + e.getMessage(), + getLocator(), + e)); + } + reportWarningSkipText(getLocator(), skipAfterExpression()); + } catch (ParseException e) { + if (errorHandler != null) { + if (e.currentToken != null) { + LocatorImpl li = new LocatorImpl(this, + e.currentToken.next.beginLine, + e.currentToken.next.beginColumn-1); + reportError(li, e); + } else { + reportError(getLocator(), e); + } + skipAfterExpression(); + /* + LocatorImpl loc = (LocatorImpl) getLocator(); + loc.column--; + reportWarningSkipText(loc, skipAfterExpression()); + */ + } else { + skipAfterExpression(); + } + } + } + +/** + * @exception ParseException exception during the parse + */ + final public boolean prio() throws ParseException { + jj_consume_token(IMPORTANT_SYM); + label_126: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[189] = jj_gen; + break label_126; + } + jj_consume_token(S); + } + {if (true) return true;} + throw new Error("Missing return statement in function"); + } + + final public boolean guarded() throws ParseException { + jj_consume_token(GUARDED_SYM); + label_127: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[190] = jj_gen; + break label_127; + } + jj_consume_token(S); + } + {if (true) return true;} + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public LexicalUnitImpl operator(LexicalUnitImpl prev) throws ParseException { + Token n; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DIV: + n = jj_consume_token(DIV); + label_128: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[191] = jj_gen; + break label_128; + } + jj_consume_token(S); + } + {if (true) return LexicalUnitImpl.createSlash(n.beginLine, + n.beginColumn, + prev);} + break; + case COMMA: + n = jj_consume_token(COMMA); + label_129: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[192] = jj_gen; + break label_129; + } + jj_consume_token(S); + } + {if (true) return LexicalUnitImpl.createComma(n.beginLine, + n.beginColumn, + prev);} + break; + default: + jj_la1[193] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public LexicalUnitImpl expr() throws ParseException { + LexicalUnitImpl first, res; + char op; + first = term(null); + res = first; + label_130: + while (true) { + if (jj_2_11(2)) { + ; + } else { + break label_130; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + case DIV: + res = operator(res); + break; + default: + jj_la1[194] = jj_gen; + ; + } + res = term(res); + } + {if (true) return first;} + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public char unaryOperator() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MINUS: + jj_consume_token(MINUS); + {if (true) return '-';} + break; + case PLUS: + jj_consume_token(PLUS); + {if (true) return '+';} + break; + default: + jj_la1[195] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + +/** + * @exception ParseException exception during the parse + */ + final public LexicalUnitImpl term(LexicalUnitImpl prev) throws ParseException { + LexicalUnitImpl result = null; + Token n = null; + char op = ' '; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + case STRING: + case IDENT: + case NUMBER: + case URL: + case PERCENTAGE: + case PT: + case MM: + case CM: + case PC: + case IN: + case PX: + case EMS: + case EXS: + case DEG: + case RAD: + case GRAD: + case MS: + case SECOND: + case HZ: + case KHZ: + case DIMEN: + case HASH: + case UNICODERANGE: + case FUNCTION: + result = nonVariableTerm(prev); + break; + case VARIABLE: + result = variableTerm(prev); + break; + default: + jj_la1[196] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + {if (true) return result;} + throw new Error("Missing return statement in function"); + } + + final public LexicalUnitImpl variableTerm(LexicalUnitImpl prev) throws ParseException { + LexicalUnitImpl result = null; + String varName = ""; + varName = variableName(); + result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, varName); {if (true) return result;} + throw new Error("Missing return statement in function"); + } + + final public LexicalUnitImpl nonVariableTerm(LexicalUnitImpl prev) throws ParseException { +LexicalUnitImpl result = null; + Token n = null; + char op = ' '; + String varName; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + case NUMBER: + case PERCENTAGE: + case PT: + case MM: + case CM: + case PC: + case IN: + case PX: + case EMS: + case EXS: + case DEG: + case RAD: + case GRAD: + case MS: + case SECOND: + case HZ: + case KHZ: + case DIMEN: + case FUNCTION: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + op = unaryOperator(); + break; + default: + jj_la1[197] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case NUMBER: + n = jj_consume_token(NUMBER); + result = LexicalUnitImpl.createNumber(n.beginLine, n.beginColumn, + prev, number(op, n, 0)); + break; + case PERCENTAGE: + n = jj_consume_token(PERCENTAGE); + result = LexicalUnitImpl.createPercentage(n.beginLine, n.beginColumn, + prev, number(op, n, 1)); + break; + case PT: + n = jj_consume_token(PT); + result = LexicalUnitImpl.createPT(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case CM: + n = jj_consume_token(CM); + result = LexicalUnitImpl.createCM(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case MM: + n = jj_consume_token(MM); + result = LexicalUnitImpl.createMM(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case PC: + n = jj_consume_token(PC); + result = LexicalUnitImpl.createPC(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case IN: + n = jj_consume_token(IN); + result = LexicalUnitImpl.createIN(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case PX: + n = jj_consume_token(PX); + result = LexicalUnitImpl.createPX(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case EMS: + n = jj_consume_token(EMS); + result = LexicalUnitImpl.createEMS(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case EXS: + n = jj_consume_token(EXS); + result = LexicalUnitImpl.createEXS(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case DEG: + n = jj_consume_token(DEG); + result = LexicalUnitImpl.createDEG(n.beginLine, n.beginColumn, + prev, number(op, n, 3)); + break; + case RAD: + n = jj_consume_token(RAD); + result = LexicalUnitImpl.createRAD(n.beginLine, n.beginColumn, + prev, number(op, n, 3)); + break; + case GRAD: + n = jj_consume_token(GRAD); + result = LexicalUnitImpl.createGRAD(n.beginLine, n.beginColumn, + prev, number(op, n, 3)); + break; + case SECOND: + n = jj_consume_token(SECOND); + result = LexicalUnitImpl.createS(n.beginLine, n.beginColumn, + prev, number(op, n, 1)); + break; + case MS: + n = jj_consume_token(MS); + result = LexicalUnitImpl.createMS(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case HZ: + n = jj_consume_token(HZ); + result = LexicalUnitImpl.createHZ(n.beginLine, n.beginColumn, + prev, number(op, n, 2)); + break; + case KHZ: + n = jj_consume_token(KHZ); + result = LexicalUnitImpl.createKHZ(n.beginLine, n.beginColumn, + prev, number(op, n, 3)); + break; + case DIMEN: + n = jj_consume_token(DIMEN); + String s = n.image; + int i = 0; + while (i < s.length() + && (Character.isDigit(s.charAt(i)) || (s.charAt(i) == '.'))) { + i++; } + result = LexicalUnitImpl.createDimen(n.beginLine, n.beginColumn, prev, + Float.valueOf(s.substring(0, i)).floatValue(), + s.substring(i)); + break; + case FUNCTION: + result = function(op, prev); + break; + default: + jj_la1[198] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + case STRING: + case IDENT: + case URL: + case HASH: + case UNICODERANGE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING: + n = jj_consume_token(STRING); + result = + LexicalUnitImpl.createString(n.beginLine, n.beginColumn, prev, + convertStringIndex(n.image, 1, + n.image.length() -1)); + break; + case IDENT: + n = jj_consume_token(IDENT); + String s = convertIdent(n.image); + if ("inherit".equals(s)) { + result = LexicalUnitImpl.createInherit(n.beginLine, n.beginColumn, + prev); + } else { + result = LexicalUnitImpl.createIdent(n.beginLine, n.beginColumn, + prev, convertIdent(n.image)); + } + + /* / + Auto correction code used in the CSS Validator but must not + be used by a conformant CSS2 parser. + * Common error : + * H1 { + * color : black + * background : white + * } + * + Token t = getToken(1); + Token semicolon = new Token(); + semicolon.kind = SEMICOLON; + semicolon.image = ";"; + if (t.kind == COLON) { + // @@SEEME. (generate a warning?) + // @@SEEME if expression is a single ident, + generate an error ? + rejectToken(semicolon); + + result = prev; + } + / */ + + break; + case HASH: + result = hexcolor(prev); + break; + case URL: + result = url(prev); + break; + case UNICODERANGE: + result = unicode(prev); + break; + default: + jj_la1[199] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + default: + jj_la1[200] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + label_131: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[201] = jj_gen; + break label_131; + } + jj_consume_token(S); + } + {if (true) return result;} + throw new Error("Missing return statement in function"); + } + +/** + * Handle all CSS2 functions. + * @exception ParseException exception during the parse + */ + final public LexicalUnitImpl function(char operator, LexicalUnitImpl prev) throws ParseException { + Token n; + LexicalUnit params = null; + n = jj_consume_token(FUNCTION); + label_132: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[202] = jj_gen; + break label_132; + } + jj_consume_token(S); + } + String fname = convertIdent(n.image); + if("alpha(".equals(fname)){ + String body = skipStatementUntilSemiColon(); + {if (true) return LexicalUnitImpl.createIdent(n.beginLine, n.beginColumn, + null, "alpha("+body);} + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: + case MINUS: + case STRING: + case IDENT: + case NUMBER: + case URL: + case VARIABLE: + case PERCENTAGE: + case PT: + case MM: + case CM: + case PC: + case IN: + case PX: + case EMS: + case EXS: + case DEG: + case RAD: + case GRAD: + case MS: + case SECOND: + case HZ: + case KHZ: + case DIMEN: + case HASH: + case UNICODERANGE: + case FUNCTION: + params = expr(); + break; + default: + jj_la1[203] = jj_gen; + ; + } + jj_consume_token(RPARAN); + if (operator != ' ') { + {if (true) throw new CSSParseException("invalid operator before a function.", + getLocator());} } String f = convertIdent(n.image); LexicalUnitImpl l = (LexicalUnitImpl) params; @@ -4477,36 +4617,32 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { int i = 0; while (loop && l != null && i < 5) { switch (i) { - case 0: - case 2: - case 4: - if ((l.getLexicalUnitType() != LexicalUnit.SAC_INTEGER) + case 0: + case 2: + case 4: + if ((l.getLexicalUnitType() != LexicalUnit.SAC_INTEGER) && (l.getLexicalUnitType() != LexicalUnit.SAC_PERCENTAGE)) { - loop = false; - } - break; - case 1: - case 3: - if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { - loop = false; - } - break; - default: { - if (true) - throw new ParseException("implementation error"); - } + loop = false; + } + break; + case 1: + case 3: + if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { + loop = false; + } + break; + default: + {if (true) throw new ParseException("implementation error");} } if (loop) { l = (LexicalUnitImpl) l.getNextLexicalUnit(); - i++; + i ++; } } if ((i == 5) && loop && (l == null)) { - { - if (true) - return LexicalUnitImpl.createRGBColor(n.beginLine, - n.beginColumn, prev, params); - } + {if (true) return LexicalUnitImpl.createRGBColor(n.beginLine, + n.beginColumn, + prev, params);} } else { if (errorHandler != null) { String errorText; @@ -4514,60 +4650,54 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { if (i < 5) { if (params == null) { loc = new LocatorImpl(this, n.beginLine, - n.beginColumn - 1); + n.beginColumn-1); errorText = "not enough parameters."; } else if (l == null) { loc = new LocatorImpl(this, n.beginLine, - n.beginColumn - 1); + n.beginColumn-1); errorText = "not enough parameters: " - + params.toString(); + + params.toString(); } else { loc = new LocatorImpl(this, l.getLineNumber(), - l.getColumnNumber()); - errorText = "invalid parameter: " + l.toString(); + l.getColumnNumber()); + errorText = "invalid parameter: " + + l.toString(); } } else { loc = new LocatorImpl(this, l.getLineNumber(), - l.getColumnNumber()); - errorText = "too many parameters: " + l.toString(); + l.getColumnNumber()); + errorText = "too many parameters: " + + l.toString(); } errorHandler.error(new CSSParseException(errorText, loc)); } - { - if (true) - throw new JumpException(); - } + {if (true) throw new JumpException();} } } else if ("counter".equals(f)) { int i = 0; while (loop && l != null && i < 3) { switch (i) { - case 0: - case 2: - if (l.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { - loop = false; - } - break; - case 1: - if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { - loop = false; - } - break; - default: { - if (true) - throw new ParseException("implementation error"); - } + case 0: + case 2: + if (l.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { + loop = false; + } + break; + case 1: + if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { + loop = false; + } + break; + default: + {if (true) throw new ParseException("implementation error");} } l = (LexicalUnitImpl) l.getNextLexicalUnit(); - i++; + i ++; } if (((i == 1) || (i == 3)) && loop && (l == null)) { - { - if (true) - return LexicalUnitImpl.createCounter(n.beginLine, - n.beginColumn, prev, params); - } + {if (true) return LexicalUnitImpl.createCounter(n.beginLine, n.beginColumn, + prev, params);} } } else if ("counters(".equals(f)) { @@ -4575,1955 +4705,1654 @@ public class Parser implements org.w3c.css.sac.Parser, ParserConstants { int i = 0; while (loop && l != null && i < 5) { switch (i) { - case 0: - case 4: - if (l.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { - loop = false; - } - break; - case 2: - if (l.getLexicalUnitType() != LexicalUnit.SAC_STRING_VALUE) { - loop = false; - } - break; - case 1: - case 3: - if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { - loop = false; - } - break; - default: { - if (true) - throw new ParseException("implementation error"); - } + case 0: + case 4: + if (l.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { + loop = false; + } + break; + case 2: + if (l.getLexicalUnitType() != LexicalUnit.SAC_STRING_VALUE) { + loop = false; + } + break; + case 1: + case 3: + if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { + loop = false; + } + break; + default: + {if (true) throw new ParseException("implementation error");} } l = (LexicalUnitImpl) l.getNextLexicalUnit(); - i++; + i ++; } if (((i == 3) || (i == 5)) && loop && (l == null)) { - { - if (true) - return LexicalUnitImpl.createCounters(n.beginLine, - n.beginColumn, prev, params); - } + {if (true) return LexicalUnitImpl.createCounters(n.beginLine, n.beginColumn, + prev, params);} } } else if ("attr(".equals(f)) { - if ((l != null) && (l.getNextLexicalUnit() == null) - && (l.getLexicalUnitType() == LexicalUnit.SAC_IDENT)) { - { - if (true) - return LexicalUnitImpl.createAttr(l.getLineNumber(), - l.getColumnNumber(), prev, l.getStringValue()); - } + if ((l != null) + && (l.getNextLexicalUnit() == null) + && (l.getLexicalUnitType() == LexicalUnit.SAC_IDENT)) { + {if (true) return LexicalUnitImpl.createAttr(l.getLineNumber(), + l.getColumnNumber(), + prev, l.getStringValue());} } } else if ("rect(".equals(f)) { int i = 0; while (loop && l != null && i < 7) { switch (i) { - case 0: - case 2: - case 4: - case 6: - switch (l.getLexicalUnitType()) { - case LexicalUnit.SAC_INTEGER: - if (l.getIntegerValue() != 0) { + case 0: + case 2: + case 4: + case 6: + switch (l.getLexicalUnitType()) { + case LexicalUnit.SAC_INTEGER: + if (l.getIntegerValue() != 0) { + loop = false; + } + break; + case LexicalUnit.SAC_IDENT: + if (!l.getStringValue().equals("auto")) { + loop = false; + } + break; + case LexicalUnit.SAC_EM: + case LexicalUnit.SAC_EX: + case LexicalUnit.SAC_PIXEL: + case LexicalUnit.SAC_CENTIMETER: + case LexicalUnit.SAC_MILLIMETER: + case LexicalUnit.SAC_INCH: + case LexicalUnit.SAC_POINT: + case LexicalUnit.SAC_PICA: + // nothing + break; + default: loop = false; } break; - case LexicalUnit.SAC_IDENT: - if (!l.getStringValue().equals("auto")) { + case 1: + case 3: + case 5: + if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { loop = false; } break; - case LexicalUnit.SAC_EM: - case LexicalUnit.SAC_EX: - case LexicalUnit.SAC_PIXEL: - case LexicalUnit.SAC_CENTIMETER: - case LexicalUnit.SAC_MILLIMETER: - case LexicalUnit.SAC_INCH: - case LexicalUnit.SAC_POINT: - case LexicalUnit.SAC_PICA: - // nothing - break; default: - loop = false; - } - break; - case 1: - case 3: - case 5: - if (l.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { - loop = false; - } - break; - default: { - if (true) - throw new ParseException("implementation error"); - } + {if (true) throw new ParseException("implementation error");} } l = (LexicalUnitImpl) l.getNextLexicalUnit(); - i++; + i ++; } if ((i == 7) && loop && (l == null)) { - { - if (true) - return LexicalUnitImpl.createRect(n.beginLine, - n.beginColumn, prev, params); - } - } - } - { - if (true) - return LexicalUnitImpl.createFunction(n.beginLine, - n.beginColumn, prev, f.substring(0, f.length() - 1), - params); - } - throw new Error("Missing return statement in function"); - } - - final public LexicalUnitImpl unicode(LexicalUnitImpl prev) - throws ParseException { - Token n; - n = jj_consume_token(UNICODERANGE); - LexicalUnitImpl params = null; - String s = n.image.substring(2); - int index = s.indexOf('-'); - if (index == -1) { - params = LexicalUnitImpl.createInteger(n.beginLine, n.beginColumn, - params, Integer.parseInt(s, 16)); - } else { - String s1 = s.substring(0, index); - String s2 = s.substring(index); - - params = LexicalUnitImpl.createInteger(n.beginLine, n.beginColumn, - params, Integer.parseInt(s1, 16)); - params = LexicalUnitImpl.createInteger(n.beginLine, n.beginColumn, - params, Integer.parseInt(s2, 16)); - } + {if (true) return LexicalUnitImpl.createRect(n.beginLine, n.beginColumn, + prev, params);} + } + } + {if (true) return LexicalUnitImpl.createFunction(n.beginLine, n.beginColumn, prev, + f.substring(0, + f.length() -1), + params);} + throw new Error("Missing return statement in function"); + } + + final public LexicalUnitImpl unicode(LexicalUnitImpl prev) throws ParseException { + Token n; + n = jj_consume_token(UNICODERANGE); + LexicalUnitImpl params = null; + String s = n.image.substring(2); + int index = s.indexOf('-'); + if (index == -1) { + params = LexicalUnitImpl.createInteger(n.beginLine, n.beginColumn, + params, Integer.parseInt(s, 16)); + } else { + String s1 = s.substring(0, index); + String s2 = s.substring(index); + + params = LexicalUnitImpl.createInteger(n.beginLine, n.beginColumn, + params, Integer.parseInt(s1, 16)); + params = LexicalUnitImpl.createInteger(n.beginLine, n.beginColumn, + params, Integer.parseInt(s2, 16)); + } + + {if (true) return LexicalUnitImpl.createUnicodeRange(n.beginLine, n.beginColumn, + prev, params);} + throw new Error("Missing return statement in function"); + } + + final public LexicalUnitImpl url(LexicalUnitImpl prev) throws ParseException { + Token n; + n = jj_consume_token(URL); + String urlname = n.image.substring(4, n.image.length()-1).trim(); + {if (true) return LexicalUnitImpl.createURL(n.beginLine, n.beginColumn, prev, urlname);} + throw new Error("Missing return statement in function"); + } - { - if (true) - return LexicalUnitImpl.createUnicodeRange(n.beginLine, - n.beginColumn, prev, params); - } - throw new Error("Missing return statement in function"); - } - - final public LexicalUnitImpl url(LexicalUnitImpl prev) - throws ParseException { - Token n; - n = jj_consume_token(URL); - String urlname = n.image.substring(4, n.image.length() - 1).trim(); - { - if (true) - return LexicalUnitImpl.createURL(n.beginLine, n.beginColumn, - prev, urlname); - } - throw new Error("Missing return statement in function"); - } - - /** - * @exception ParseException - * exception during the parse - */ - final public LexicalUnitImpl hexcolor(LexicalUnitImpl prev) - throws ParseException { - Token n; - n = jj_consume_token(HASH); - int r; - LexicalUnitImpl first, params = null; - String s = n.image.substring(1); - - if (s.length() != 3 && s.length() != 6) { - first = null; - { - if (true) - throw new CSSParseException( - "invalid hexadecimal notation for RGB: " + s, - getLocator()); - } - } - { - if (true) - return LexicalUnitImpl.createIdent(n.beginLine, n.beginColumn, - prev, n.image); - } - throw new Error("Missing return statement in function"); - } - - float number(char operator, Token n, int lengthUnit) throws ParseException { - String image = n.image; - float f = 0; - - if (lengthUnit != 0) { - image = image.substring(0, image.length() - lengthUnit); - } - f = Float.valueOf(image).floatValue(); - return (operator == '-') ? -f : f; - } - - String skipStatementUntilSemiColon() throws ParseException { - int[] semicolon = { SEMICOLON }; - return skipStatementUntil(semicolon); - } - - String skipStatementUntilLeftBrace() throws ParseException { - int[] lBrace = { LBRACE }; - return skipStatementUntil(lBrace); - } - - String skipStatementUntilRightParan() throws ParseException { - int[] rParan = { RPARAN }; - return skipStatementUntil(rParan); - } - - String skipStatementUntil(int[] symbols) throws ParseException { - StringBuffer s = new StringBuffer(); - boolean stop = false; - Token tok; - while (!stop) { - tok = getToken(1); - if (tok.kind == EOF) { - return null; - } - for (int sym : symbols) { - if (tok.kind == sym) { - stop = true; - break; - } - } - if (!stop) { - if (tok.image != null) { - s.append(tok.image); - } - getNextToken(); - } - } - return s.toString().trim(); - } - - String skipStatement() throws ParseException { - StringBuffer s = new StringBuffer(); - Token tok = getToken(0); - if (tok.image != null) { - s.append(tok.image); - } - while (true) { - tok = getToken(1); - if (tok.kind == EOF) { - return null; - } - s.append(tok.image); - if (tok.kind == LBRACE) { - getNextToken(); - s.append(skip_to_matching_brace()); - getNextToken(); - tok = getToken(1); - break; - } else if (tok.kind == RBRACE) { - getNextToken(); - tok = getToken(1); - break; - } else if (tok.kind == SEMICOLON) { - getNextToken(); - tok = getToken(1); - break; +/** + * @exception ParseException exception during the parse + */ + final public LexicalUnitImpl hexcolor(LexicalUnitImpl prev) throws ParseException { + Token n; + n = jj_consume_token(HASH); + int r; + LexicalUnitImpl first, params = null; + String s = n.image.substring(1); + + if(s.length()!=3 && s.length()!=6) { + first = null; + {if (true) throw new CSSParseException("invalid hexadecimal notation for RGB: " + s, + getLocator());} + } + {if (true) return LexicalUnitImpl.createIdent(n.beginLine, n.beginColumn, + prev, n.image);} + throw new Error("Missing return statement in function"); + } + + float number(char operator, Token n, int lengthUnit) throws ParseException { + String image = n.image; + float f = 0; + + if (lengthUnit != 0) { + image = image.substring(0, image.length() - lengthUnit); + } + f = Float.valueOf(image).floatValue(); + return (operator == '-')? -f: f; + } + + String skipStatementUntilSemiColon() throws ParseException { + int[] semicolon = {SEMICOLON}; + return skipStatementUntil(semicolon); + } + + String skipStatementUntilLeftBrace() throws ParseException { + int[] lBrace = {LBRACE}; + return skipStatementUntil(lBrace); + } + + String skipStatementUntilRightParan() throws ParseException { + int[] rParan = {RPARAN}; + return skipStatementUntil(rParan); + } + + String skipStatementUntil(int[] symbols) throws ParseException { + StringBuffer s = new StringBuffer(); + boolean stop = false; + Token tok; + while(!stop){ + tok = getToken(1); + if(tok.kind == EOF) { + return null; + } + for(int sym : symbols){ + if(tok.kind == sym){ + stop = true; + break; + } + } + if(!stop){ + if (tok.image != null) { + s.append(tok.image); } getNextToken(); } - - // skip white space - while (true) { - if (tok.kind != S) { - break; - } - tok = getNextToken(); - tok = getToken(1); - } - - return s.toString().trim(); } + return s.toString().trim(); + } - String skip_to_matching_brace() throws ParseException { - StringBuffer s = new StringBuffer(); - Token tok; - int nesting = 1; - while (true) { - tok = getToken(1); - if (tok.kind == EOF) { - break; - } - s.append(tok.image); - if (tok.kind == LBRACE) { - nesting++; - } else if (tok.kind == RBRACE) { - nesting--; - if (nesting == 0) { - break; - } - } - getNextToken(); - } - return s.toString(); - } - - String convertStringIndex(String s, int start, int len) - throws ParseException { - StringBuffer buf = new StringBuffer(len); - int index = start; - - while (index < len) { - char c = s.charAt(index); - if (c == '\u005c\u005c') { - if (++index < len) { - c = s.charAt(index); - switch (c) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - int numValue = Character.digit(c, 16); - int count = 0; - int p = 16; - - while (index + 1 < len && count < 6) { - c = s.charAt(index + 1); - - if (Character.digit(c, 16) != -1) { - numValue = (numValue * 16) - + Character.digit(c, 16); - p *= 16; - index++; - } else { - if (c == ' ') { - // skip the latest white space - index++; - } - break; - } - } - buf.append((char) numValue); - break; - case '\u005cn': - case '\u005cf': - break; - case '\u005cr': - if (index + 1 < len) { - if (s.charAt(index + 1) == '\u005cn') { - index++; - } - } - break; - default: - buf.append(c); - } - } else { - throw new CSSParseException("invalid string " + s, - getLocator()); - } - } else { - buf.append(c); - } - index++; - } - - return buf.toString(); + String skipStatement() throws ParseException { + StringBuffer s = new StringBuffer(); + Token tok = getToken(0); + if (tok.image != null) { + s.append(tok.image); } - - String convertIdent(String s) throws ParseException { - return convertStringIndex(s, 0, s.length()); - } - - String convertString(String s) throws ParseException { - return convertStringIndex(s, 0, s.length()); - } - - void comments() throws ParseException { - if (token.specialToken != null) { - Token tmp_t = token.specialToken; - while (tmp_t.specialToken != null) - tmp_t = tmp_t.specialToken; - while (tmp_t != null) { - documentHandler.comment(tmp_t.image); - tmp_t = tmp_t.next; - } + while (true) { + tok = getToken(1); + if (tok.kind == EOF) { + return null; } - } - - void rejectToken(Token t) throws ParseException { - Token fakeToken = new Token(); - t.next = token; - fakeToken.next = t; - token = fakeToken; - } - - String skipAfterExpression() throws ParseException { - Token t = getToken(1); - StringBuffer s = new StringBuffer(); - s.append(getToken(0).image); - - while ((t.kind != RBRACE) && (t.kind != SEMICOLON) && (t.kind != EOF)) { - s.append(t.image); + s.append(tok.image); + if (tok.kind == LBRACE) { getNextToken(); - t = getToken(1); - } - - return s.toString(); - } - - /** - * The following functions are useful for a DOM CSS implementation only and - * are not part of the general CSS2 parser. - */ - final public void _parseRule() throws ParseException { - String ret = null; - label_129: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[193] = jj_gen; - break label_129; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IMPORT_SYM: - importDeclaration(); - break; - case LBRACKET: - case ANY: - case PARENT: - case DOT: - case COLON: - case EACH_VAR: - case IDENT: - case HASH: - styleRule(); - break; - case MEDIA_SYM: - media(); + s.append(skip_to_matching_brace()); + getNextToken(); + tok = getToken(1); break; - case PAGE_SYM: - page(); + } else if (tok.kind == RBRACE) { + getNextToken(); + tok = getToken(1); break; - case FONT_FACE_SYM: - fontFace(); + } else if (tok.kind == SEMICOLON) { + getNextToken(); + tok = getToken(1); break; - default: - jj_la1[194] = jj_gen; - ret = skipStatement(); - if ((ret == null) || (ret.length() == 0)) { - { - if (true) - return; - } - } - if (ret.charAt(0) == '@') { - documentHandler.ignorableAtRule(ret); - } else { - { - if (true) - throw new CSSParseException("unrecognize rule: " + ret, - getLocator()); - } - } } + getNextToken(); } - final public void _parseImportRule() throws ParseException { - label_130: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[195] = jj_gen; - break label_130; - } - jj_consume_token(S); - } - importDeclaration(); - } - - final public void _parseMediaRule() throws ParseException { - label_131: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[196] = jj_gen; - break label_131; - } - jj_consume_token(S); - } - media(); - } - - final public void _parseDeclarationBlock() throws ParseException { - label_132: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[197] = jj_gen; - break label_132; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); + // skip white space + while (true) { + if (tok.kind != S) { break; - default: - jj_la1[198] = jj_gen; - ; - } - label_133: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case SEMICOLON: - ; - break; - default: - jj_la1[199] = jj_gen; - break label_133; - } - jj_consume_token(SEMICOLON); - label_134: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[200] = jj_gen; - break label_134; - } - jj_consume_token(S); - } - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case IDENT: - declaration(); - break; - default: - jj_la1[201] = jj_gen; - ; - } } + tok = getNextToken(); + tok = getToken(1); } - final public ArrayList<String> _parseSelectors() throws ParseException { - ArrayList<String> p = null; - try { - label_135: while (true) { - switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { - case S: - ; - break; - default: - jj_la1[202] = jj_gen; - break label_135; - } - jj_consume_token(S); - } - p = selectorList(); - { - if (true) - return p; - } - } catch (ThrowedParseException e) { - { - if (true) - throw (ParseException) e.e.fillInStackTrace(); - } - } - throw new Error("Missing return statement in function"); - } + return s.toString().trim(); + } - private boolean jj_2_1(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_1(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(0, xla); - } - } - - private boolean jj_2_2(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_2(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(1, xla); - } - } - - private boolean jj_2_3(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_3(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(2, xla); - } - } - - private boolean jj_2_4(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_4(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(3, xla); - } - } - - private boolean jj_2_5(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_5(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(4, xla); - } - } - - private boolean jj_2_6(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_6(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(5, xla); - } - } - - private boolean jj_2_7(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_7(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(6, xla); - } - } - - private boolean jj_2_8(int xla) { - jj_la = xla; - jj_lastpos = jj_scanpos = token; - try { - return !jj_3_8(); - } catch (LookaheadSuccess ls) { - return true; - } finally { - jj_save(7, xla); - } - } - - private boolean jj_3R_139() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_148()) { - jj_scanpos = xsp; - if (jj_3R_149()) { - jj_scanpos = xsp; - if (jj_3R_150()) { - jj_scanpos = xsp; - if (jj_3R_151()) { - jj_scanpos = xsp; - if (jj_3R_152()) - return true; - } - } - } + String skip_to_matching_brace() throws ParseException { + StringBuffer s = new StringBuffer(); + Token tok; + int nesting = 1; + while (true) { + tok = getToken(1); + if (tok.kind == EOF) { + break; } - return false; - } - - private boolean jj_3R_167() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_186()) - jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_187()) { - jj_scanpos = xsp; - if (jj_3R_188()) { - jj_scanpos = xsp; - if (jj_3R_189()) { - jj_scanpos = xsp; - if (jj_3R_190()) { - jj_scanpos = xsp; - if (jj_3R_191()) { - jj_scanpos = xsp; - if (jj_3R_192()) { - jj_scanpos = xsp; - if (jj_3R_193()) { - jj_scanpos = xsp; - if (jj_3R_194()) { - jj_scanpos = xsp; - if (jj_3R_195()) { - jj_scanpos = xsp; - if (jj_3R_196()) { - jj_scanpos = xsp; - if (jj_3R_197()) { - jj_scanpos = xsp; - if (jj_3R_198()) { - jj_scanpos = xsp; - if (jj_3R_199()) { - jj_scanpos = xsp; - if (jj_3R_200()) { - jj_scanpos = xsp; - if (jj_3R_201()) { - jj_scanpos = xsp; - if (jj_3R_202()) { - jj_scanpos = xsp; - if (jj_3R_203()) { - jj_scanpos = xsp; - if (jj_3R_204()) { - jj_scanpos = xsp; - if (jj_3R_205()) - return true; - } - } - } - } - } - } - } - } - } - } - } - } + s.append(tok.image); + if (tok.kind == LBRACE) { + nesting++; + } else if (tok.kind == RBRACE) { + nesting--; + if (nesting == 0) { + break; + } + } + getNextToken(); + } + return s.toString(); + } + + String convertStringIndex(String s, int start, int len) throws ParseException { + StringBuffer buf = new StringBuffer(len); + int index = start; + + while (index < len) { + char c = s.charAt(index); + if (c == '\u005c\u005c') { + if (++index < len) { + c = s.charAt(index); + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + int numValue = Character.digit(c, 16); + int count = 0; + int p = 16; + + while (index + 1 < len && count < 6) { + c = s.charAt(index+1); + + if (Character.digit(c, 16) != -1) { + numValue = (numValue * 16) + Character.digit(c, 16); + p *= 16; + index++; + } else { + if (c == ' ') { + // skip the latest white space + index++; } + break; } } - } - } - } - return false; - } - - private boolean jj_3R_156() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_167()) { - jj_scanpos = xsp; - if (jj_3R_168()) - return true; - } - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_142() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_156()) { - jj_scanpos = xsp; - if (jj_3R_157()) - return true; - } - return false; - } - - private boolean jj_3R_143() { - if (jj_3R_158()) - return true; - return false; - } - - private boolean jj_3R_162() { - if (jj_scan_token(HASH)) - return true; - return false; - } - - private boolean jj_3R_214() { - if (jj_scan_token(HASH)) - return true; - return false; - } - - private boolean jj_3R_220() { - if (jj_scan_token(PLUS)) - return true; - return false; - } - - private boolean jj_3R_219() { - if (jj_scan_token(MINUS)) - return true; - return false; - } - - private boolean jj_3R_212() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_219()) { - jj_scanpos = xsp; - if (jj_3R_220()) - return true; - } - return false; - } - - private boolean jj_3_8() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_143()) - jj_scanpos = xsp; - if (jj_3R_142()) - return true; - return false; - } - - private boolean jj_3R_215() { - if (jj_scan_token(URL)) - return true; - return false; - } - - private boolean jj_3R_166() { - if (jj_3R_142()) - return true; - return false; - } - - private boolean jj_3_2() { - if (jj_3R_138()) - return true; - if (jj_3R_139()) - return true; - return false; - } - - private boolean jj_3R_171() { - if (jj_scan_token(COMMA)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_158() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_170()) { - jj_scanpos = xsp; - if (jj_3R_171()) - return true; - } - return false; - } - - private boolean jj_3R_170() { - if (jj_scan_token(DIV)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_216() { - if (jj_scan_token(UNICODERANGE)) - return true; - return false; - } - - private boolean jj_3R_164() { - if (jj_scan_token(COLON)) - return true; - return false; - } - - private boolean jj_3_4() { - if (jj_3R_140()) - return true; - return false; - } - - private boolean jj_3R_221() { - if (jj_3R_166()) - return true; - return false; - } - - private boolean jj_3R_213() { - if (jj_scan_token(FUNCTION)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - xsp = jj_scanpos; - if (jj_3R_221()) - jj_scanpos = xsp; - if (jj_scan_token(RPARAN)) - return true; - return false; - } - - private boolean jj_3_3() { - if (jj_3R_140()) - return true; - return false; - } - - private boolean jj_3R_157() { - if (jj_3R_169()) - return true; - return false; - } - - private boolean jj_3R_210() { - if (jj_3R_216()) - return true; - return false; - } - - private boolean jj_3R_209() { - if (jj_3R_215()) - return true; - return false; - } - - private boolean jj_3R_208() { - if (jj_3R_214()) - return true; - return false; - } - - private boolean jj_3R_218() { - if (jj_scan_token(EACH_VAR)) - return true; - return false; - } - - private boolean jj_3R_165() { - if (jj_scan_token(LBRACKET)) - return true; - return false; - } - - private boolean jj_3R_153() { - if (jj_scan_token(IDENT)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_169() { - if (jj_scan_token(VARIABLE)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_185() { - if (jj_scan_token(PARENT)) - return true; - return false; - } - - private boolean jj_3R_184() { - if (jj_scan_token(ANY)) - return true; - return false; - } - - private boolean jj_3R_207() { - if (jj_scan_token(IDENT)) - return true; - return false; - } - - private boolean jj_3R_141() { - if (jj_scan_token(COMMA)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_217() { - if (jj_scan_token(IDENT)) - return true; - return false; - } - - private boolean jj_3R_211() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_217()) { - jj_scanpos = xsp; - if (jj_3R_218()) - return true; - } - return false; - } - - private boolean jj_3R_137() { - if (jj_3R_140()) - return true; - return false; - } - - private boolean jj_3R_161() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_183()) { - jj_scanpos = xsp; - if (jj_3R_184()) { - jj_scanpos = xsp; - if (jj_3R_185()) - return true; - } - } - return false; - } - - private boolean jj_3R_183() { - Token xsp; - if (jj_3R_211()) - return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_211()) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_206() { - if (jj_scan_token(STRING)) - return true; - return false; - } - - private boolean jj_3R_205() { - if (jj_3R_213()) - return true; - return false; - } - - private boolean jj_3R_180() { - if (jj_scan_token(S)) - return true; - return false; - } - - private boolean jj_3R_179() { - if (jj_scan_token(DOT)) - return true; - return false; - } - - private boolean jj_3R_168() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_206()) { - jj_scanpos = xsp; - if (jj_3R_207()) { - jj_scanpos = xsp; - if (jj_3R_208()) { - jj_scanpos = xsp; - if (jj_3R_209()) { - jj_scanpos = xsp; - if (jj_3R_210()) - return true; - } - } - } - } - return false; - } - - private boolean jj_3R_178() { - if (jj_scan_token(EQ)) - return true; - return false; - } - - private boolean jj_3R_177() { - if (jj_scan_token(RPARAN)) - return true; - return false; - } - - private boolean jj_3R_176() { - if (jj_scan_token(FUNCTION)) - return true; - return false; - } - - private boolean jj_3R_175() { - if (jj_scan_token(COLON)) - return true; - return false; - } - - private boolean jj_3R_174() { - if (jj_scan_token(EACH_VAR)) - return true; - return false; - } - - private boolean jj_3R_173() { - if (jj_scan_token(NUMBER)) - return true; - return false; - } - - private boolean jj_3_7() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_141()) - jj_scanpos = xsp; - if (jj_3R_142()) - return true; - return false; - } - - private boolean jj_3R_159() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_172()) { - jj_scanpos = xsp; - if (jj_3R_173()) { - jj_scanpos = xsp; - if (jj_3R_174()) { - jj_scanpos = xsp; - if (jj_3R_175()) { - jj_scanpos = xsp; - if (jj_3R_176()) { - jj_scanpos = xsp; - if (jj_3R_177()) { - jj_scanpos = xsp; - if (jj_3R_178()) { - jj_scanpos = xsp; - if (jj_3R_179()) { - jj_scanpos = xsp; - if (jj_3R_180()) - return true; - } - } - } + buf.append((char) numValue); + break; + case '\u005cn': + case '\u005cf': + break; + case '\u005cr': + if (index + 1 < len) { + if (s.charAt(index + 1) == '\u005cn') { + index ++; } } + break; + default: + buf.append(c); } + } else { + throw new CSSParseException("invalid string " + s, getLocator()); } + } else { + buf.append(c); } - return false; - } - - private boolean jj_3R_172() { - if (jj_scan_token(IDENT)) - return true; - return false; - } - - private boolean jj_3R_204() { - if (jj_scan_token(DIMEN)) - return true; - return false; - } - - private boolean jj_3R_203() { - if (jj_scan_token(KHZ)) - return true; - return false; - } - - private boolean jj_3R_163() { - if (jj_scan_token(DOT)) - return true; - return false; - } - - private boolean jj_3R_136() { - if (jj_3R_144()) - return true; - return false; - } - - private boolean jj_3R_202() { - if (jj_scan_token(HZ)) - return true; - return false; - } - - private boolean jj_3R_144() { - if (jj_scan_token(MICROSOFT_RULE)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - if (jj_scan_token(COLON)) - return true; - if (jj_3R_159()) - return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_159()) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_182() { - if (jj_scan_token(PRECEDES)) - return true; - return false; - } - - private boolean jj_3_6() { - if (jj_3R_140()) - return true; - return false; - } - - private boolean jj_3R_201() { - if (jj_scan_token(MS)) - return true; - return false; - } - - private boolean jj_3R_181() { - if (jj_scan_token(PLUS)) - return true; - return false; - } - - private boolean jj_3R_200() { - if (jj_scan_token(SECOND)) - return true; - return false; - } - - private boolean jj_3R_160() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_181()) { - jj_scanpos = xsp; - if (jj_3R_182()) - return true; - } - return false; - } - - private boolean jj_3R_199() { - if (jj_scan_token(GRAD)) - return true; - return false; - } - - private boolean jj_3R_146() { - if (jj_scan_token(PRECEDES)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_198() { - if (jj_scan_token(RAD)) - return true; - return false; + index++; } - private boolean jj_3R_147() { - if (jj_scan_token(S)) - return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_160()) - jj_scanpos = xsp; - return false; - } + return buf.toString(); + } - private boolean jj_3R_145() { - if (jj_scan_token(PLUS)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - return false; - } + String convertIdent(String s) throws ParseException { + return convertStringIndex(s, 0, s.length()); + } - private boolean jj_3R_138() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_145()) { - jj_scanpos = xsp; - if (jj_3R_146()) { - jj_scanpos = xsp; - if (jj_3R_147()) - return true; - } - } - return false; - } + String convertString(String s) throws ParseException { + return convertStringIndex(s, 0, s.length()); + } - private boolean jj_3_1() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_136()) { - jj_scanpos = xsp; - if (jj_3R_137()) - return true; + void comments() throws ParseException { + if (token.specialToken != null){ + Token tmp_t = token.specialToken; + while (tmp_t.specialToken != null) tmp_t = tmp_t.specialToken; + while (tmp_t != null) { + documentHandler.comment(tmp_t.image); + tmp_t = tmp_t.next; } - return false; - } - - private boolean jj_3R_155() { - if (jj_scan_token(LBRACE)) - return true; - return false; } + } - private boolean jj_3R_197() { - if (jj_scan_token(DEG)) - return true; - return false; - } + void rejectToken(Token t) throws ParseException { + Token fakeToken = new Token(); + t.next = token; + fakeToken.next = t; + token = fakeToken; + } - private boolean jj_3R_196() { - if (jj_scan_token(EXS)) - return true; - return false; - } + String skipAfterExpression() throws ParseException { + Token t = getToken(1); + StringBuffer s = new StringBuffer(); + s.append(getToken(0).image); - private boolean jj_3R_195() { - if (jj_scan_token(EMS)) - return true; - return false; + while ((t.kind != RBRACE) && (t.kind != SEMICOLON) && (t.kind != EOF)) { + s.append(t.image); + getNextToken(); + t = getToken(1); } - private boolean jj_3R_194() { - if (jj_scan_token(PX)) - return true; - return false; - } + return s.toString(); + } - private boolean jj_3R_193() { - if (jj_scan_token(IN)) - return true; - return false; - } - - private boolean jj_3R_154() { - if (jj_3R_166()) - return true; - return false; - } - - private boolean jj_3R_192() { - if (jj_scan_token(PC)) - return true; - return false; - } - - private boolean jj_3_5() { - if (jj_3R_140()) - return true; - return false; - } - - private boolean jj_3R_191() { - if (jj_scan_token(MM)) - return true; - return false; - } - - private boolean jj_3R_152() { - if (jj_3R_165()) - return true; - return false; - } - - private boolean jj_3R_151() { - if (jj_3R_164()) - return true; - return false; - } - - private boolean jj_3R_190() { - if (jj_scan_token(CM)) - return true; - return false; - } - - private boolean jj_3R_140() { - if (jj_3R_153()) - return true; - if (jj_scan_token(COLON)) - return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_scan_token(1)) { - jj_scanpos = xsp; - break; - } - } - xsp = jj_scanpos; - if (jj_3R_154()) { - jj_scanpos = xsp; - if (jj_3R_155()) - return true; - } - return false; - } - - private boolean jj_3R_150() { - if (jj_3R_163()) - return true; - return false; - } - - private boolean jj_3R_189() { - if (jj_scan_token(PT)) - return true; - return false; - } - - private boolean jj_3R_149() { - if (jj_3R_162()) - return true; - return false; - } - - private boolean jj_3R_188() { - if (jj_scan_token(PERCENTAGE)) - return true; - return false; - } - - private boolean jj_3R_186() { - if (jj_3R_212()) - return true; - return false; - } - - private boolean jj_3R_148() { - if (jj_3R_161()) - return true; - return false; - } - - private boolean jj_3R_187() { - if (jj_scan_token(NUMBER)) - return true; - return false; - } - - /** Generated Token Manager. */ - public ParserTokenManager token_source; - /** Current token. */ - public Token token; - /** Next token. */ - public Token jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - private int jj_gen; - final private int[] jj_la1 = new int[203]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static private int[] jj_la1_2; - static private int[] jj_la1_3; - static { - jj_la1_init_0(); - jj_la1_init_1(); - jj_la1_init_2(); - jj_la1_init_3(); - } - - private static void jj_la1_init_0() { - jj_la1_0 = new int[] { 0x0, 0xc02, 0xc02, 0x0, 0xc00, 0x2, 0x2, 0x2, - 0x1d000000, 0xc00, 0x2, 0xc00, 0x2, 0x0, 0x2, 0x0, 0x2, 0x2, - 0x2, 0x1d3ed400, 0x1d3ed400, 0x2, 0x80000, 0x2, 0x2, 0x2, 0x2, - 0x0, 0x0, 0x2, 0x0, 0x100000, 0x2, 0x0, 0x2, 0x2, 0x2, 0x2, - 0x0, 0x100000, 0x2, 0x0, 0x2, 0x3ed400, 0x2, 0x2, 0x220000, - 0x2, 0x220000, 0x220002, 0x2, 0x50010002, 0x50010002, 0x2, 0x2, - 0x2, 0x2, 0x2, 0x1d000000, 0x0, 0x0, 0x1d000000, 0x2, 0x80000, - 0x2, 0x2, 0x11000000, 0x11000000, 0x11000000, 0x11000000, - 0x11000000, 0x11000000, 0x11000000, 0x11000000, 0x11000000, - 0x11000000, 0x1d000000, 0x0, 0x0, 0x0, 0x0, 0xc000000, 0x2, - 0x2, 0x1c000, 0x2, 0x0, 0x2, 0x1c000, 0x0, 0x2, 0x2, 0x0, 0x2, - 0x0, 0x2, 0x100000, 0xe4e70002, 0x2, 0x1d000000, 0x0, - 0x1d000000, 0x2, 0x0, 0x2, 0xe4e70002, 0x0, 0x2, 0x1d000000, - 0x0, 0x1d000000, 0x2, 0xe4e70002, 0x2, 0x2, 0x2, 0x0, 0x2, - 0x1d000000, 0x0, 0x1d000000, 0x2, 0x2, 0x80000, 0x2, 0x2, 0x2, - 0x2, 0x0, 0x2, 0x1d000000, 0x0, 0x1d000000, 0x2, 0x80000, 0x2, - 0x2, 0x2, 0x80000, 0x0, 0x60000, 0x80000, 0x2, 0x60000, 0x2, - 0x0, 0x2, 0x100000, 0x2, 0x2, 0x2, 0x2, 0x80000, 0x2, 0x2, 0x0, - 0x2, 0x2, 0x2, 0x100000, 0x2, 0x2, 0x0, 0x100000, 0x2, 0x0, - 0x2, 0x2, 0x0, 0x2, 0x0, 0x100000, 0x2, 0x0, 0x2, 0x61000, 0x2, - 0x0, 0x2, 0x2, 0x2, 0x2, 0x880000, 0x880000, 0x60000, 0x60000, - 0x0, 0x0, 0x60000, 0x2, 0x60000, 0x2, 0x60000, 0x2, 0x1d000000, - 0x2, 0x2, 0x2, 0x0, 0x100000, 0x2, 0x0, 0x2, }; - } - - private static void jj_la1_init_1() { - jj_la1_1 = new int[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x1060018, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x38, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x95040018, 0x80000000, 0x15040000, 0x18, 0x0, - 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, - 0x8, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, - 0x0, 0x10040018, 0x10040000, 0x18, 0x0, 0x8000000, 0x0, 0x7, - 0x0, 0x0, 0x10040018, 0x10040000, 0x18, 0x0, 0x7, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x10040018, 0x10040000, 0x18, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x11040018, 0x11040000, 0x18, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }; - } - - private static void jj_la1_init_2() { - jj_la1_2 = new int[] { 0x10000000, 0x80000000, 0x80000000, 0x4000000, - 0x80000000, 0x0, 0x0, 0x0, 0x6a000088, 0x80000000, 0x0, - 0x80000000, 0x0, 0x44, 0x0, 0x8, 0x0, 0x0, 0x0, 0xfe00015c, - 0xfe00015c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, - 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, - 0xfc000154, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xa000088, 0x8, 0x8000080, 0x2000008, 0x0, - 0x0, 0x0, 0x0, 0x2000000, 0x2000000, 0x0, 0x0, 0x2000000, - 0x2000000, 0x2000000, 0x2000000, 0x2000000, 0x2000000, - 0x2000008, 0x8, 0x8, 0x8, 0x8, 0x8, 0x0, 0x0, 0x0, 0x0, 0xc, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x2, 0x0, 0x0, 0x98, 0x0, - 0xa000088, 0x8000080, 0x2000008, 0x0, 0x0, 0x0, 0x98, 0x1, 0x0, - 0xa000088, 0x8000080, 0x2000008, 0x0, 0x98, 0x0, 0x0, 0x0, - 0x88, 0x0, 0xa000088, 0x8000080, 0x2000008, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x8, 0x0, 0xa000088, 0x8000080, 0x2000008, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3ffffdc, 0x0, 0x0, 0x3ffffdc, - 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x0, - 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, 0x3ffffdc, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1ffff10, 0x200004c, - 0x3ffff5c, 0x0, 0x3ffffdc, 0x0, 0x3ffffdc, 0x0, 0x6e000008, - 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x8, 0x0, }; - } - - private static void jj_la1_init_3() { - jj_la1_3 = new int[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x800, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3401, - 0x3401, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3401, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000, 0x1000, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x800, 0x0, 0x800, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x1000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x800, 0x0, 0x800, 0x800, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x1000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x1400, 0x0, 0x0, 0x1400, 0x0, 0x1000, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x1400, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x1000, 0x400, 0x1400, 0x0, 0x1400, 0x0, 0x1400, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }; - } - - final private JJCalls[] jj_2_rtns = new JJCalls[8]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - /** Constructor with user supplied CharStream. */ - public Parser(CharStream stream) { - token_source = new ParserTokenManager(stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 203; i++) - jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) - jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(CharStream stream) { - token_source.ReInit(stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 203; i++) - jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) - jj_2_rtns[i] = new JJCalls(); - } - - /** Constructor with generated Token Manager. */ - public Parser(ParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 203; i++) - jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) - jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(ParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 203; i++) - jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) - jj_2_rtns[i] = new JJCalls(); - } - - private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) - token = token.next; - else - token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) - c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { - } - - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - - private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source - .getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; - Token tok = token; - while (tok != null && tok != jj_scanpos) { - i++; - tok = tok.next; - } - if (tok != null) - jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) - return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) - throw jj_ls; - return false; - } - - /** Get the next Token. */ - final public Token getNextToken() { - if (token.next != null) - token = token.next; - else - token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - /** Get the specific Token. */ - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) - t = t.next; - else - t = t.next = token_source.getNextToken(); - } - return t; - } - - private int jj_ntk() { - if ((jj_nt = token.next) == null) - return (jj_ntk = (token.next = token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) - return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries - .iterator(); it.hasNext();) { - int[] oldentry = (int[]) (it.next()); - if (oldentry.length == jj_expentry.length) { - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - continue jj_entries_loop; - } - } - jj_expentries.add(jj_expentry); - break jj_entries_loop; - } - } - if (pos != 0) - jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - /** Generate ParseException. */ - public ParseException generateParseException() { - jj_expentries.clear(); - boolean[] la1tokens = new boolean[110]; - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 203; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1 << j)) != 0) { - la1tokens[j] = true; - } - if ((jj_la1_1[i] & (1 << j)) != 0) { - la1tokens[32 + j] = true; - } - if ((jj_la1_2[i] & (1 << j)) != 0) { - la1tokens[64 + j] = true; +/** + * The following functions are useful for a DOM CSS implementation only and are + * not part of the general CSS2 parser. + */ + final public void _parseRule() throws ParseException { + String ret = null; + label_133: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[204] = jj_gen; + break label_133; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IMPORT_SYM: + importDeclaration(); + break; + case LBRACKET: + case ANY: + case PARENT: + case DOT: + case COLON: + case INTERPOLATION: + case IDENT: + case HASH: + styleRule(); + break; + case MEDIA_SYM: + media(); + break; + case PAGE_SYM: + page(); + break; + case FONT_FACE_SYM: + fontFace(); + break; + default: + jj_la1[205] = jj_gen; + ret = skipStatement(); + if ((ret == null) || (ret.length() == 0)) { + {if (true) return;} } - if ((jj_la1_3[i] & (1 << j)) != 0) { - la1tokens[96 + j] = true; + if (ret.charAt(0) == '@') { + documentHandler.ignorableAtRule(ret); + } else { + {if (true) throw new CSSParseException("unrecognize rule: " + ret, + getLocator());} } - } - } - } - for (int i = 0; i < 110; i++) { - if (la1tokens[i]) { - jj_expentry = new int[1]; - jj_expentry[0] = i; - jj_expentries.add(jj_expentry); - } - } - jj_endpos = 0; - jj_rescan_token(); - jj_add_error_token(0, 0); - int[][] exptokseq = new int[jj_expentries.size()][]; - for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = jj_expentries.get(i); - } - return new ParseException(token, exptokseq, tokenImage); - } - - /** Enable tracing. */ - final public void enable_tracing() { } + } + + final public void _parseImportRule() throws ParseException { + label_134: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[206] = jj_gen; + break label_134; + } + jj_consume_token(S); + } + importDeclaration(); + } + + final public void _parseMediaRule() throws ParseException { + label_135: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[207] = jj_gen; + break label_135; + } + jj_consume_token(S); + } + media(); + } + + final public void _parseDeclarationBlock() throws ParseException { + label_136: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[208] = jj_gen; + break label_136; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[209] = jj_gen; + ; + } + label_137: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + ; + break; + default: + jj_la1[210] = jj_gen; + break label_137; + } + jj_consume_token(SEMICOLON); + label_138: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[211] = jj_gen; + break label_138; + } + jj_consume_token(S); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IDENT: + declaration(); + break; + default: + jj_la1[212] = jj_gen; + ; + } + } + } + + final public ArrayList<String> _parseSelectors() throws ParseException { + ArrayList<String> p = null; + try { + label_139: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case S: + ; + break; + default: + jj_la1[213] = jj_gen; + break label_139; + } + jj_consume_token(S); + } + p = selectorList(); + {if (true) return p;} + } catch (ThrowedParseException e) { + {if (true) throw (ParseException) e.e.fillInStackTrace();} + } + throw new Error("Missing return statement in function"); + } + + private boolean jj_2_1(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_1(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(0, xla); } + } + + private boolean jj_2_2(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_2(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(1, xla); } + } + + private boolean jj_2_3(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_3(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(2, xla); } + } + + private boolean jj_2_4(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_4(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(3, xla); } + } + + private boolean jj_2_5(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_5(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(4, xla); } + } + + private boolean jj_2_6(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_6(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(5, xla); } + } + + private boolean jj_2_7(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_7(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(6, xla); } + } + + private boolean jj_2_8(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_8(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(7, xla); } + } + + private boolean jj_2_9(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_9(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(8, xla); } + } + + private boolean jj_2_10(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_10(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(9, xla); } + } + + private boolean jj_2_11(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_11(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(10, xla); } + } + + private boolean jj_3_1() { + if (jj_3R_140()) return true; + return false; + } + + private boolean jj_3R_196() { + if (jj_scan_token(IDENT)) return true; + return false; + } + + private boolean jj_3R_195() { + if (jj_scan_token(STRING)) return true; + return false; + } + + private boolean jj_3R_194() { + if (jj_3R_218()) return true; + return false; + } + + private boolean jj_3R_163() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_195()) { + jj_scanpos = xsp; + if (jj_3R_196()) { + jj_scanpos = xsp; + if (jj_3R_197()) { + jj_scanpos = xsp; + if (jj_3R_198()) { + jj_scanpos = xsp; + if (jj_3R_199()) return true; + } + } + } + } + return false; + } + + private boolean jj_3_4() { + if (jj_3R_143()) return true; + if (jj_3R_144()) return true; + return false; + } + + private boolean jj_3_7() { + if (jj_3R_140()) return true; + return false; + } + + private boolean jj_3R_193() { + if (jj_scan_token(DIMEN)) return true; + return false; + } + + private boolean jj_3R_172() { + if (jj_scan_token(COLON)) return true; + return false; + } + + private boolean jj_3_6() { + if (jj_3R_145()) return true; + return false; + } + + private boolean jj_3R_192() { + if (jj_scan_token(KHZ)) return true; + return false; + } + + private boolean jj_3R_191() { + if (jj_scan_token(HZ)) return true; + return false; + } + + private boolean jj_3R_190() { + if (jj_scan_token(MS)) return true; + return false; + } + + private boolean jj_3R_189() { + if (jj_scan_token(SECOND)) return true; + return false; + } + + private boolean jj_3R_188() { + if (jj_scan_token(GRAD)) return true; + return false; + } + + private boolean jj_3R_187() { + if (jj_scan_token(RAD)) return true; + return false; + } + + private boolean jj_3_5() { + if (jj_3R_145()) return true; + return false; + } + + private boolean jj_3R_186() { + if (jj_scan_token(DEG)) return true; + return false; + } + + private boolean jj_3R_185() { + if (jj_scan_token(EXS)) return true; + return false; + } + + private boolean jj_3_2() { + if (jj_3R_140()) return true; + return false; + } + + private boolean jj_3R_184() { + if (jj_scan_token(EMS)) return true; + return false; + } + + private boolean jj_3R_183() { + if (jj_scan_token(PX)) return true; + return false; + } + + private boolean jj_3R_182() { + if (jj_scan_token(IN)) return true; + return false; + } + + private boolean jj_3R_181() { + if (jj_scan_token(PC)) return true; + return false; + } + + private boolean jj_3R_180() { + if (jj_scan_token(MM)) return true; + return false; + } + + private boolean jj_3R_179() { + if (jj_scan_token(CM)) return true; + return false; + } + + private boolean jj_3R_161() { + if (jj_scan_token(LBRACE)) return true; + return false; + } + + private boolean jj_3R_178() { + if (jj_scan_token(PT)) return true; + return false; + } + + private boolean jj_3R_177() { + if (jj_scan_token(PERCENTAGE)) return true; + return false; + } + + private boolean jj_3R_166() { + if (jj_3R_202()) return true; + return false; + } + + private boolean jj_3R_176() { + if (jj_scan_token(NUMBER)) return true; + return false; + } + + private boolean jj_3R_228() { + if (jj_scan_token(INTERPOLATION)) return true; + return false; + } + + private boolean jj_3R_175() { + if (jj_3R_217()) return true; + return false; + } + + private boolean jj_3R_162() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_175()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_176()) { + jj_scanpos = xsp; + if (jj_3R_177()) { + jj_scanpos = xsp; + if (jj_3R_178()) { + jj_scanpos = xsp; + if (jj_3R_179()) { + jj_scanpos = xsp; + if (jj_3R_180()) { + jj_scanpos = xsp; + if (jj_3R_181()) { + jj_scanpos = xsp; + if (jj_3R_182()) { + jj_scanpos = xsp; + if (jj_3R_183()) { + jj_scanpos = xsp; + if (jj_3R_184()) { + jj_scanpos = xsp; + if (jj_3R_185()) { + jj_scanpos = xsp; + if (jj_3R_186()) { + jj_scanpos = xsp; + if (jj_3R_187()) { + jj_scanpos = xsp; + if (jj_3R_188()) { + jj_scanpos = xsp; + if (jj_3R_189()) { + jj_scanpos = xsp; + if (jj_3R_190()) { + jj_scanpos = xsp; + if (jj_3R_191()) { + jj_scanpos = xsp; + if (jj_3R_192()) { + jj_scanpos = xsp; + if (jj_3R_193()) { + jj_scanpos = xsp; + if (jj_3R_194()) return true; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return false; + } + + private boolean jj_3R_160() { + if (jj_3R_174()) return true; + return false; + } + + private boolean jj_3R_147() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_162()) { + jj_scanpos = xsp; + if (jj_3R_163()) return true; + } + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_173() { + if (jj_scan_token(LBRACKET)) return true; + return false; + } + + private boolean jj_3R_159() { + if (jj_scan_token(IDENT)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_145() { + if (jj_3R_159()) return true; + if (jj_scan_token(COLON)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3R_160()) { + jj_scanpos = xsp; + if (jj_3R_161()) return true; + } + return false; + } + + private boolean jj_3R_142() { + if (jj_3R_145()) return true; + return false; + } - /** Disable tracing. */ - final public void disable_tracing() { + private boolean jj_3R_222() { + if (jj_scan_token(VARIABLE)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } } + return false; + } - private void jj_rescan_token() { - jj_rescan = true; - for (int i = 0; i < 8; i++) { - try { - JJCalls p = jj_2_rtns[i]; - do { - if (p.gen > jj_gen) { - jj_la = p.arg; - jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: - jj_3_1(); - break; - case 1: - jj_3_2(); - break; - case 2: - jj_3_3(); - break; - case 3: - jj_3_4(); - break; - case 4: - jj_3_5(); - break; - case 5: - jj_3_6(); - break; - case 6: - jj_3_7(); - break; - case 7: - jj_3_8(); - break; - } - } - p = p.next; - } while (p != null); - } catch (LookaheadSuccess ls) { - } - } - jj_rescan = false; - } + private boolean jj_3R_219() { + if (jj_scan_token(HASH)) return true; + return false; + } - private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { - p = p.next = new JJCalls(); - break; - } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; - p.first = token; - p.arg = xla; - } + private boolean jj_3R_202() { + if (jj_3R_222()) return true; + return false; + } - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; + private boolean jj_3R_140() { + if (jj_scan_token(VARIABLE)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } } + if (jj_scan_token(COLON)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(REMOVE)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + if (true) { jj_la = 0; jj_scanpos = jj_lastpos; return false;} + return false; + } + + private boolean jj_3R_216() { + if (jj_scan_token(PARENT)) return true; + return false; + } + + private boolean jj_3R_215() { + if (jj_scan_token(ANY)) return true; + return false; + } + + private boolean jj_3R_227() { + if (jj_scan_token(IDENT)) return true; + return false; + } + + private boolean jj_3R_223() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_227()) { + jj_scanpos = xsp; + if (jj_3R_228()) return true; + } + return false; + } + + private boolean jj_3R_214() { + Token xsp; + if (jj_3R_223()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_223()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_169() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_214()) { + jj_scanpos = xsp; + if (jj_3R_215()) { + jj_scanpos = xsp; + if (jj_3R_216()) return true; + } + } + return false; + } + + private boolean jj_3R_165() { + if (jj_3R_147()) return true; + return false; + } + + private boolean jj_3R_220() { + if (jj_scan_token(URL)) return true; + return false; + } + + private boolean jj_3R_149() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_165()) { + jj_scanpos = xsp; + if (jj_3R_166()) return true; + } + return false; + } + + private boolean jj_3R_211() { + if (jj_scan_token(S)) return true; + return false; + } + + private boolean jj_3R_210() { + if (jj_scan_token(DOT)) return true; + return false; + } + + private boolean jj_3R_209() { + if (jj_scan_token(EQ)) return true; + return false; + } + + private boolean jj_3R_148() { + if (jj_3R_164()) return true; + return false; + } + + private boolean jj_3R_208() { + if (jj_scan_token(RPARAN)) return true; + return false; + } + + private boolean jj_3R_207() { + if (jj_scan_token(FUNCTION)) return true; + return false; + } + + private boolean jj_3R_206() { + if (jj_scan_token(COLON)) return true; + return false; + } + + private boolean jj_3R_141() { + if (jj_3R_150()) return true; + return false; + } + + private boolean jj_3R_205() { + if (jj_scan_token(INTERPOLATION)) return true; + return false; + } + + private boolean jj_3R_204() { + if (jj_scan_token(NUMBER)) return true; + return false; + } + + private boolean jj_3_9() { + if (jj_3R_145()) return true; + return false; + } + + private boolean jj_3R_203() { + if (jj_scan_token(IDENT)) return true; + return false; + } + + private boolean jj_3R_167() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_203()) { + jj_scanpos = xsp; + if (jj_3R_204()) { + jj_scanpos = xsp; + if (jj_3R_205()) { + jj_scanpos = xsp; + if (jj_3R_206()) { + jj_scanpos = xsp; + if (jj_3R_207()) { + jj_scanpos = xsp; + if (jj_3R_208()) { + jj_scanpos = xsp; + if (jj_3R_209()) { + jj_scanpos = xsp; + if (jj_3R_210()) { + jj_scanpos = xsp; + if (jj_3R_211()) return true; + } + } + } + } + } + } + } + } + return false; + } + + private boolean jj_3R_225() { + if (jj_scan_token(PLUS)) return true; + return false; + } + + private boolean jj_3R_224() { + if (jj_scan_token(MINUS)) return true; + return false; + } + + private boolean jj_3R_217() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_224()) { + jj_scanpos = xsp; + if (jj_3R_225()) return true; + } + return false; + } + + private boolean jj_3R_171() { + if (jj_scan_token(DOT)) return true; + return false; + } + + private boolean jj_3_11() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_148()) jj_scanpos = xsp; + if (jj_3R_149()) return true; + return false; + } + + private boolean jj_3R_150() { + if (jj_scan_token(MICROSOFT_RULE)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + if (jj_scan_token(COLON)) return true; + if (jj_3R_167()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_167()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_146() { + if (jj_scan_token(COMMA)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_213() { + if (jj_scan_token(PRECEDES)) return true; + return false; + } + + private boolean jj_3_3() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_141()) { + jj_scanpos = xsp; + if (jj_3R_142()) return true; + } + return false; + } + + private boolean jj_3R_174() { + if (jj_3R_149()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3_11()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_212() { + if (jj_scan_token(PLUS)) return true; + return false; + } + + private boolean jj_3R_168() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_212()) { + jj_scanpos = xsp; + if (jj_3R_213()) return true; + } + return false; + } + + private boolean jj_3R_221() { + if (jj_scan_token(UNICODERANGE)) return true; + return false; + } + + private boolean jj_3R_152() { + if (jj_scan_token(PRECEDES)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3_8() { + if (jj_3R_145()) return true; + return false; + } + + private boolean jj_3R_226() { + if (jj_3R_174()) return true; + return false; + } + + private boolean jj_3R_153() { + if (jj_scan_token(S)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_168()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_151() { + if (jj_scan_token(PLUS)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_143() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_151()) { + jj_scanpos = xsp; + if (jj_3R_152()) { + jj_scanpos = xsp; + if (jj_3R_153()) return true; + } + } + return false; + } + + private boolean jj_3_10() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_146()) jj_scanpos = xsp; + if (jj_3R_147()) return true; + return false; + } + + private boolean jj_3R_201() { + if (jj_scan_token(COMMA)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_218() { + if (jj_scan_token(FUNCTION)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3R_226()) jj_scanpos = xsp; + if (jj_scan_token(RPARAN)) return true; + return false; + } + + private boolean jj_3R_200() { + if (jj_scan_token(DIV)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(1)) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_164() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_200()) { + jj_scanpos = xsp; + if (jj_3R_201()) return true; + } + return false; + } + + private boolean jj_3R_199() { + if (jj_3R_221()) return true; + return false; + } + + private boolean jj_3R_198() { + if (jj_3R_220()) return true; + return false; + } + + private boolean jj_3R_158() { + if (jj_3R_173()) return true; + return false; + } + + private boolean jj_3R_197() { + if (jj_3R_219()) return true; + return false; + } + + private boolean jj_3R_157() { + if (jj_3R_172()) return true; + return false; + } + + private boolean jj_3R_156() { + if (jj_3R_171()) return true; + return false; + } + + private boolean jj_3R_155() { + if (jj_3R_170()) return true; + return false; + } + + private boolean jj_3R_154() { + if (jj_3R_169()) return true; + return false; + } + + private boolean jj_3R_144() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_154()) { + jj_scanpos = xsp; + if (jj_3R_155()) { + jj_scanpos = xsp; + if (jj_3R_156()) { + jj_scanpos = xsp; + if (jj_3R_157()) { + jj_scanpos = xsp; + if (jj_3R_158()) return true; + } + } + } + } + return false; + } + + private boolean jj_3R_170() { + if (jj_scan_token(HASH)) return true; + return false; + } + + /** Generated Token Manager. */ + public ParserTokenManager token_source; + /** Current token. */ + public Token token; + /** Next token. */ + public Token jj_nt; + private int jj_ntk; + private Token jj_scanpos, jj_lastpos; + private int jj_la; + private int jj_gen; + final private int[] jj_la1 = new int[214]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static private int[] jj_la1_2; + static private int[] jj_la1_3; + static { + jj_la1_init_0(); + jj_la1_init_1(); + jj_la1_init_2(); + jj_la1_init_3(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0x0,0xc02,0xc02,0x0,0xc00,0x2,0x2,0x2,0x0,0xe8000000,0xc00,0x2,0xc00,0x2,0x0,0x2,0x0,0x2,0x2,0x2,0xe9f45400,0xe9f45400,0x2,0x400000,0x2,0x2,0x2,0x2,0x0,0x0,0x2,0x0,0x800000,0x2,0x0,0x2,0x2,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,0x1f45400,0x2,0x2,0x1100000,0x2,0x1100000,0x1100002,0x2,0x80080002,0x80080002,0x2,0x2,0x2,0x2,0x2,0xe8000000,0x0,0x0,0x0,0xe8000000,0x2,0x400000,0x2,0x2,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0x88000000,0xe8000000,0x0,0x0,0x0,0x0,0x60000000,0x2,0x2,0xfc000,0x2,0x0,0x2,0xfc000,0x0,0x2,0x2,0x0,0x2,0x0,0x2,0x800000,0x27380002,0x2,0xe8000000,0x0,0xe8000000,0x2,0x0,0x2,0x27380002,0x0,0x2,0xe8000000,0x0,0xe8000000,0x2,0x27380002,0x2,0x2,0x2,0x0,0x2,0xe8000000,0x0,0x0,0xe8000000,0x2,0x2,0x400000,0x2,0x2,0x2,0x2,0x0,0x2,0xe8000000,0x0,0xe8000000,0x2,0x400000,0x2,0x2,0x2,0x400000,0x0,0x0,0x300000,0x2,0x0,0x400000,0x2,0x300000,0x2,0x0,0x2,0x0,0x2,0x800000,0x2,0x2,0x2,0x0,0x2,0x2,0x2,0x400000,0x2,0x2,0x0,0x2,0x2,0x2,0x800000,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,0x2,0x0,0x2,0x0,0x800000,0x2,0x0,0x2,0x301000,0x2,0x0,0x2,0x2,0x2,0x2,0x4400000,0x4400000,0x300000,0x300000,0x300000,0x0,0x0,0x300000,0x2,0x2,0x300000,0x2,0xe8000000,0x2,0x2,0x2,0x0,0x800000,0x2,0x0,0x2,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x83000c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc2,0xc2,0x0,0x0,0x0,0x0,0x0,0xa82000c0,0x0,0x20000000,0x88200000,0xc0,0x0,0x0,0x0,0x0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xc0,0x80,0x80,0x80,0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0x0,0x802000c0,0x80200000,0xc0,0x0,0x40000000,0x0,0x3f,0x0,0x0,0x802000c0,0x80200000,0xc0,0x0,0x3f,0x0,0x0,0x0,0x0,0x0,0x802000c0,0x200000,0x80000000,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x882000c0,0x88200000,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x40,0x40,0x0,0x40,0x0,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_2() { + jj_la1_2 = new int[] {0x80000000,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x400,0x50000440,0x0,0x0,0x0,0x0,0x220,0x0,0x40,0x0,0x0,0x0,0xf0000ae0,0xf0000ae0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0xe0000aa0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc0,0xc0,0x0,0x0,0x0,0x0,0x0,0x50000444,0x44,0x0,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x10000000,0x10000000,0x0,0x0,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000040,0x40,0x40,0x40,0x40,0x40,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x10,0x0,0x0,0x4c0,0x0,0x50000440,0x40000400,0x10000040,0x0,0x0,0x0,0x4c0,0x8,0x0,0x50000440,0x40000400,0x10000040,0x0,0x4c0,0x0,0x0,0x0,0x440,0x0,0x50000440,0x0,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x50000440,0x40000400,0x10000040,0x0,0x0,0x0,0x0,0x0,0x0,0x400,0x400,0x1ffffee0,0x0,0x0,0x0,0x0,0x1ffffee0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,0x1ffffee0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ffffee0,0x0,0xffff880,0x10000260,0x1ffffae0,0x0,0x0,0x1ffffee0,0x0,0x70000040,0x0,0x0,0x0,0x40,0x0,0x0,0x40,0x0,}; + } + private static void jj_la1_init_3() { + jj_la1_3 = new int[] {0x0,0x4,0x4,0x0,0x4,0x0,0x0,0x0,0x0,0x3,0x4,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a00f,0x1a00f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1a00f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x0,0x0,0x0,0xa000,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa000,0x0,0x8000,0x2000,0xa000,0x0,0x0,0xa000,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + final private JJCalls[] jj_2_rtns = new JJCalls[11]; + private boolean jj_rescan = false; + private int jj_gc = 0; + + /** Constructor with user supplied CharStream. */ + public Parser(CharStream stream) { + token_source = new ParserTokenManager(stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(CharStream stream) { + token_source.ReInit(stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Constructor with generated Token Manager. */ + public Parser(ParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(ParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 214; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + private Token jj_consume_token(int kind) throws ParseException { + Token oldToken; + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + if (token.kind == kind) { + jj_gen++; + if (++jj_gc > 100) { + jj_gc = 0; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; + while (c != null) { + if (c.gen < jj_gen) c.first = null; + c = c.next; + } + } + } + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); + private boolean jj_scan_token(int kind) { + if (jj_scanpos == jj_lastpos) { + jj_la--; + if (jj_scanpos.next == null) { + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); + } else { + jj_lastpos = jj_scanpos = jj_scanpos.next; + } + } else { + jj_scanpos = jj_scanpos.next; + } + if (jj_rescan) { + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); + } + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; + } + + +/** Get the next Token. */ + final public Token getNextToken() { + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; + } + +/** Get the specific Token. */ + final public Token getToken(int index) { + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; + } + + private int jj_ntk() { + if ((jj_nt=token.next) == null) + return (jj_ntk = (token.next=token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); + } + + private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); + private int[] jj_expentry; + private int jj_kind = -1; + private int[] jj_lasttokens = new int[100]; + private int jj_endpos; + + private void jj_add_error_token(int kind, int pos) { + if (pos >= 100) return; + if (pos == jj_endpos + 1) { + jj_lasttokens[jj_endpos++] = kind; + } else if (jj_endpos != 0) { + jj_expentry = new int[jj_endpos]; + for (int i = 0; i < jj_endpos; i++) { + jj_expentry[i] = jj_lasttokens[i]; + } + jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) { + int[] oldentry = (int[])(it.next()); + if (oldentry.length == jj_expentry.length) { + for (int i = 0; i < jj_expentry.length; i++) { + if (oldentry[i] != jj_expentry[i]) { + continue jj_entries_loop; + } + } + jj_expentries.add(jj_expentry); + break jj_entries_loop; + } + } + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + } + } + + /** Generate ParseException. */ + public ParseException generateParseException() { + jj_expentries.clear(); + boolean[] la1tokens = new boolean[113]; + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 214; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1<<j)) != 0) { + la1tokens[j] = true; + } + if ((jj_la1_1[i] & (1<<j)) != 0) { + la1tokens[32+j] = true; + } + if ((jj_la1_2[i] & (1<<j)) != 0) { + la1tokens[64+j] = true; + } + if ((jj_la1_3[i] & (1<<j)) != 0) { + la1tokens[96+j] = true; + } + } + } + } + for (int i = 0; i < 113; i++) { + if (la1tokens[i]) { + jj_expentry = new int[1]; + jj_expentry[0] = i; + jj_expentries.add(jj_expentry); + } + } + jj_endpos = 0; + jj_rescan_token(); + jj_add_error_token(0, 0); + int[][] exptokseq = new int[jj_expentries.size()][]; + for (int i = 0; i < jj_expentries.size(); i++) { + exptokseq[i] = jj_expentries.get(i); + } + return new ParseException(token, exptokseq, tokenImage); + } + + /** Enable tracing. */ + final public void enable_tracing() { + } + + /** Disable tracing. */ + final public void disable_tracing() { + } + + private void jj_rescan_token() { + jj_rescan = true; + for (int i = 0; i < 11; i++) { + try { + JJCalls p = jj_2_rtns[i]; + do { + if (p.gen > jj_gen) { + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; + switch (i) { + case 0: jj_3_1(); break; + case 1: jj_3_2(); break; + case 2: jj_3_3(); break; + case 3: jj_3_4(); break; + case 4: jj_3_5(); break; + case 5: jj_3_6(); break; + case 6: jj_3_7(); break; + case 7: jj_3_8(); break; + case 8: jj_3_9(); break; + case 9: jj_3_10(); break; + case 10: jj_3_11(); break; + } + } + p = p.next; + } while (p != null); + } catch(LookaheadSuccess ls) { } + } + jj_rescan = false; + } + + private void jj_save(int index, int xla) { + JJCalls p = jj_2_rtns[index]; + while (p.gen > jj_gen) { + if (p.next == null) { p = p.next = new JJCalls(); break; } + p = p.next; + } + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; + } + + static final class JJCalls { + int gen; + Token first; + int arg; + JJCalls next; + } } diff --git a/theme-compiler/src/com/vaadin/sass/parser/Parser.jj b/theme-compiler/src/com/vaadin/sass/parser/Parser.jj index 52f9535213..ac022413e2 100644 --- a/theme-compiler/src/com/vaadin/sass/parser/Parser.jj +++ b/theme-compiler/src/com/vaadin/sass/parser/Parser.jj @@ -491,6 +491,9 @@ TOKEN : | < LBRACE : "{" > | < RBRACE : "}"> | < DASHMATCH : "|=" > + | < CARETMATCH : "^=" > + | < DOLLARMATCH : "$=" > + | < STARMATCH : "*=" > | < INCLUDES : "~=" > | < EQ : "=" > | < PLUS : "+" > @@ -522,7 +525,7 @@ TOKEN : < DEFAULT > TOKEN : { - < EACH_VAR : "#{"< VARIABLE > "}"> + < INTERPOLATION : "#{"< VARIABLE > "}"> } <DEFAULT> @@ -737,7 +740,7 @@ void afterImportDeclaration() : } { ( - ( variable() | removeDirective() | mixinDirective()|eachDirective() | includeDirective() | styleRule() | media()| page() | fontFace() + ( (LOOKAHEAD(5)removeDirective()|variable()) | mixinDirective()| eachDirective() | includeDirective() | styleRule() | media()| page() | fontFace() | { l = getLocator(); } ret=skipStatement() { if ((ret == null) || (ret.length() == 0)) { @@ -999,7 +1002,7 @@ void microsoftExtension() : < COLON > ((n = < IDENT > { value += n.image; }) | (n = < NUMBER > { value += n.image; }) - | (n = < EACH_VAR > { value += n.image; }) + | (n = < INTERPOLATION > { value += n.image; }) | (n = < COLON > { value += n.image; }) | (n = < FUNCTION > { value += n.image; }) | (n = < RPARAN > { value += n.image; }) @@ -1051,7 +1054,7 @@ void styleRule() : start = true; documentHandler.startSelector(l); } - ( ifDirective() | removeDirective() | includeDirective() | media() | extendDirective()| eachDirective() | variable() | LOOKAHEAD(3) (microsoftExtension()|declarationOrNestedProperties()) | styleRule())* + ( ifDirective() | LOOKAHEAD(5)removeDirective() | includeDirective() | media() | extendDirective()| eachDirective() | variable() | LOOKAHEAD(3) (microsoftExtension()|declarationOrNestedProperties()) | styleRule())* <RBRACE> (<S>)* } catch (ThrowedParseException e) { if (errorHandler != null) { @@ -1188,7 +1191,7 @@ String _class(String pred) : String s = "."; } { - "." (t = <IDENT>{s += t.image; }|t = < EACH_VAR >{ s += t.image; })+ + "." (t = <IDENT>{s += t.image; }|t = < INTERPOLATION >{ s += t.image; })+ { if (pred == null) { @@ -1205,7 +1208,7 @@ String s = "."; String element_name() : {Token t; String s = "";} { - (t = <IDENT>{s += t.image; }|t = < EACH_VAR >{ s += t.image; })+ + (t = <IDENT>{s += t.image; }|t = < INTERPOLATION >{ s += t.image; })+ { return s; } @@ -1229,7 +1232,10 @@ String attrib(String pred) : "[" ( <S> )* att=<IDENT> ( <S> )* ( ( "=" { cases = 1; } | <INCLUDES> { cases = 2; } - | <DASHMATCH> { cases = 3; } ) ( <S> )* + | <DASHMATCH> { cases = 3; } + | <CARETMATCH> { cases = 4; } + | <DOLLARMATCH> { cases = 5; } + | <STARMATCH> { cases = 6; } ) ( <S> )* ( val=<IDENT> { attValue = val.image; } | val=<STRING> { attValue = val.image; } ) @@ -1251,6 +1257,15 @@ String attrib(String pred) : case 3: c = name + "|=" +attValue; break; + case 4: + c = name + "^=" +attValue; + break; + case 5: + c = name + "$=" +attValue; + break; + case 6: + c = name + "*=" +attValue; + break; default: // never reached. c = null; @@ -1445,12 +1460,11 @@ void eachDirective() : var = < VARIABLE > (< S >)* < EACH_IN > (< S >)* (list = stringList() {documentHandler.startEachDirective(var.image, list);} - |{documentHandler.startEachDirective(var.image, list);}removeDirective() |listVariable = variableName() {documentHandler.startEachDirective(var.image, listVariable);} ) < LBRACE >(< S >)* - ( includeDirective() | removeDirective() | media() | extendDirective()| variable() | LOOKAHEAD(3) declarationOrNestedProperties() | styleRule())* + ( includeDirective() | LOOKAHEAD(5)removeDirective() | media() | extendDirective()| variable() | LOOKAHEAD(3) declarationOrNestedProperties() | styleRule())* < RBRACE >(< S >)* { documentHandler.endEachDirective();} } @@ -1483,7 +1497,6 @@ void mixinDirective() : args = arglist()) <RPARAN> (<S>)*) <LBRACE> (<S>)* {documentHandler.startMixinDirective(name, args);} ( includeDirective() | media() | eachDirective() | extendDirective()| variable() | LOOKAHEAD(3) declarationOrNestedProperties() | styleRule())* - //(includeDirective() | media() | LOOKAHEAD(declaration()) declaration()";"(<S>)* | styleRule())* <RBRACE>(<S>)* {documentHandler.endMixinDirective(name, args);} } @@ -1492,24 +1505,46 @@ ArrayList<VariableNode> arglist() : { ArrayList<VariableNode> args = new ArrayList<VariableNode>(); VariableNode arg; + boolean hasNonOptionalArgument = false; } { - arg=mixinArg() ( <COMMA> (<S>)* { args.add(arg); } + arg=mixinArg() ( <COMMA> (<S>)* { hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); } arg=mixinArg() )* - { args.add(arg); + { hasNonOptionalArgument = checkMixinForNonOptionalArguments(arg, hasNonOptionalArgument); args.add(arg); return args; } } +JAVACODE +boolean checkMixinForNonOptionalArguments(VariableNode arg, boolean hasNonOptionalArguments)
{ + boolean currentArgHasArguments = arg.getExpr() != null && arg.getExpr().getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE && arg.getExpr().getNextLexicalUnit() != null; +
if(currentArgHasArguments)
{ + if(hasNonOptionalArguments)
{
throw new ParseException("Sass Error: Required argument $"+ arg.getName() +" must come before any optional arguments."); + } + return hasNonOptionalArguments; + }else
{
return true; + } +} + VariableNode mixinArg() : { String name; + Token variable = null; LexicalUnitImpl first = null; - LexicalUnitImpl next = null; LexicalUnitImpl prev = null; + LexicalUnitImpl next = null; } { - name=variableName() (":" (<S>)* first=term(null){ prev = first; } (LOOKAHEAD(2)(< COMMA >(< S >)*)?next=term(prev){prev.setNextLexicalUnit(next); prev = next;})* )? + name=variableName() (< COLON > (< S >)* + + (
first = nonVariableTerm(null)
{ + prev = first;
} + (LOOKAHEAD(3)(< COMMA >(< S >)*)? prev = nonVariableTerm(prev))*
) + | (variable = < VARIABLE >{ first = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, variable.image);} + + ) + )? { VariableNode arg = new VariableNode(name, first, false); return arg; @@ -1524,9 +1559,9 @@ ArrayList<LexicalUnitImpl> argValuelist() : LexicalUnitImpl prev = null; } { - first = term(null) { args.add(first); prev = first;}(next=term(prev){prev.setNextLexicalUnit(next); prev = next;})* + first = term(null) { args.add(first); prev = first;}((< COLON > (< S >)*)?next=term(prev){prev.setNextLexicalUnit(next); prev = next;})* ( <COMMA> (<S>)* - first = term(null) { args.add(first); prev = first;}(next=term(prev){prev.setNextLexicalUnit(next); prev = next;})* + first = term(null) { args.add(first); prev = first;}((< COLON > (< S >)*)?next=term(prev){prev.setNextLexicalUnit(next); prev = next;})* )* {return args;} } @@ -1548,44 +1583,63 @@ void includeDirective() : /** * @exception ParseException exception during the parse */ -void removeDirective() :
{
ArrayList<String> list = null; - ArrayList<String> remove = null; +void removeDirective() :
{
String list = null; + String remove = null; String separator = null; + String variable = null; Token n = null; } { + n = < VARIABLE >{ variable = n.image; }(< S >)* ":" (< S >)* < REMOVE >(< S >)* (list = removeDirectiveArgs(0)) - < COMMA >(< S >)*
(remove = removeDirectiveArgs(1)) + (< RPARAN >)? < COMMA >(< S >)* + (remove = removeDirectiveArgs(1)) ( < COMMA >(< S >)* n = < IDENT >{ separator = n.image; } (< S >)*)? < RPARAN >(< S >)* < SEMICOLON >(< S >)* - { documentHandler.removeDirective(list,remove,separator); }
} + { documentHandler.removeDirective(variable,list,remove,separator); } +} JAVACODE -ArrayList<String > removeDirectiveArgs(int nest)
{ - ArrayList<String> list = new ArrayList<String>(); - // Start at one due to "remove(" containing one. +String removeDirectiveArgs(int nest)
{ + String list = ""; int nesting = nest; Token t = null; while(true)
{
t = getToken(1); - if(t.kind == VARIABLE)
{ - list.add(t.image); - }else if(t.kind == STRING)
{ - list.add(t.image.substring(1,t.image.length()).substring(0,t.image.length()-2)); + String s = t.image; + if(t.kind == VARIABLE||t.kind == IDENT)
{ + list += s; + }else if(s.toLowerCase().equals("auto")||s.toLowerCase().equals("space")||s.toLowerCase().equals("comma"))
{ + int i = 2; + Token temp = getToken(i); + boolean isLast = true; + while(temp.kind != SEMICOLON) + {
if(temp.kind != RPARAN || temp.kind != S) + {
isLast = false;
} + i++; + temp = getToken(i); + } + + if(isLast)
{
return list; + } + }
else if(t.kind == STRING)
{
list += s.substring(1,s.length()).substring(0,s.length()-2); }else if(t.kind == LPARAN)
{
nesting++; if(nesting > nest+1)
{
throw new CSSParseException("Only one ( ) pair per parameter allowed", getLocator()); } }else if(t.kind == RPARAN)
{
nesting--; if(nesting == 0)
{ - getNextToken();
return list; + return list; } } else if(t.kind == COMMA)
{ if(nesting == nest)
{ - return list;
} - } else if(t.kind == LBRACE)
{ + return list;
}else
{ + list += ",";
} + + }else if(t.kind == S)
{ + list += " ";
} else if(t.kind == LBRACE)
{ throw new CSSParseException("Invalid token,'{' found", getLocator());
}
getNextToken(); } @@ -1874,10 +1928,28 @@ LexicalUnitImpl term(LexicalUnitImpl prev) : { LexicalUnitImpl result = null; Token n = null; char op = ' '; +} +{ + (result = nonVariableTerm(prev)| result = variableTerm(prev)) + { + return result; + } +} + +LexicalUnitImpl variableTerm(LexicalUnitImpl prev) :
{ + LexicalUnitImpl result = null; + String varName = "";
}
{ + varName = variableName() + {result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, + prev, varName); return result;}
} + +LexicalUnitImpl nonVariableTerm(LexicalUnitImpl prev) :
{
LexicalUnitImpl result = null; + Token n = null; + char op = ' '; String varName; } { - (( ( ( op=unaryOperator() )? +( ( ( op=unaryOperator() )? ( n=<NUMBER> { result = LexicalUnitImpl.createNumber(n.beginLine, n.beginColumn, @@ -1985,13 +2057,8 @@ LexicalUnitImpl term(LexicalUnitImpl prev) : | result=url(prev) | result=unicode(prev) ) ) ( <S> )* - | varName = variableName() - {result = LexicalUnitImpl.createVariable(token.beginLine, token.beginColumn, - prev, varName);}) - { - return result; - } -} + { + return result;
}
} /** * Handle all CSS2 functions. diff --git a/theme-compiler/src/com/vaadin/sass/parser/ParserConstants.java b/theme-compiler/src/com/vaadin/sass/parser/ParserConstants.java index c7d6042d03..62b7bb490c 100644 --- a/theme-compiler/src/com/vaadin/sass/parser/ParserConstants.java +++ b/theme-compiler/src/com/vaadin/sass/parser/ParserConstants.java @@ -27,195 +27,201 @@ public interface ParserConstants { /** RegularExpression Id. */ int DASHMATCH = 14; /** RegularExpression Id. */ - int INCLUDES = 15; + int CARETMATCH = 15; /** RegularExpression Id. */ - int EQ = 16; + int DOLLARMATCH = 16; /** RegularExpression Id. */ - int PLUS = 17; + int STARMATCH = 17; /** RegularExpression Id. */ - int MINUS = 18; + int INCLUDES = 18; /** RegularExpression Id. */ - int COMMA = 19; + int EQ = 19; /** RegularExpression Id. */ - int SEMICOLON = 20; + int PLUS = 20; /** RegularExpression Id. */ - int PRECEDES = 21; + int MINUS = 21; /** RegularExpression Id. */ - int SUCCEEDS = 22; + int COMMA = 22; /** RegularExpression Id. */ - int DIV = 23; + int SEMICOLON = 23; /** RegularExpression Id. */ - int LBRACKET = 24; + int PRECEDES = 24; /** RegularExpression Id. */ - int RBRACKET = 25; + int SUCCEEDS = 25; /** RegularExpression Id. */ - int ANY = 26; + int DIV = 26; /** RegularExpression Id. */ - int PARENT = 27; + int LBRACKET = 27; /** RegularExpression Id. */ - int DOT = 28; + int RBRACKET = 28; /** RegularExpression Id. */ - int LPARAN = 29; + int ANY = 29; /** RegularExpression Id. */ - int RPARAN = 30; + int PARENT = 30; /** RegularExpression Id. */ - int COMPARE = 31; + int DOT = 31; /** RegularExpression Id. */ - int OR = 32; + int LPARAN = 32; /** RegularExpression Id. */ - int AND = 33; + int RPARAN = 33; /** RegularExpression Id. */ - int NOT_EQ = 34; + int COMPARE = 34; /** RegularExpression Id. */ - int COLON = 35; + int OR = 35; /** RegularExpression Id. */ - int EACH_VAR = 36; + int AND = 36; /** RegularExpression Id. */ - int NONASCII = 37; + int NOT_EQ = 37; /** RegularExpression Id. */ - int H = 38; + int COLON = 38; /** RegularExpression Id. */ - int UNICODE = 39; + int INTERPOLATION = 39; /** RegularExpression Id. */ - int ESCAPE = 40; + int NONASCII = 40; /** RegularExpression Id. */ - int NMSTART = 41; + int H = 41; /** RegularExpression Id. */ - int NMCHAR = 42; + int UNICODE = 42; /** RegularExpression Id. */ - int STRINGCHAR = 43; + int ESCAPE = 43; /** RegularExpression Id. */ - int D = 44; + int NMSTART = 44; /** RegularExpression Id. */ - int NAME = 45; + int NMCHAR = 45; /** RegularExpression Id. */ - int TO = 46; + int STRINGCHAR = 46; /** RegularExpression Id. */ - int THROUGH = 47; + int D = 47; /** RegularExpression Id. */ - int EACH_IN = 48; + int NAME = 48; /** RegularExpression Id. */ - int MIXIN_SYM = 49; + int TO = 49; /** RegularExpression Id. */ - int INCLUDE_SYM = 50; + int THROUGH = 50; /** RegularExpression Id. */ - int FUNCTION_SYM = 51; + int EACH_IN = 51; /** RegularExpression Id. */ - int RETURN_SYM = 52; + int MIXIN_SYM = 52; /** RegularExpression Id. */ - int DEBUG_SYM = 53; + int INCLUDE_SYM = 53; /** RegularExpression Id. */ - int WARN_SYM = 54; + int FUNCTION_SYM = 54; /** RegularExpression Id. */ - int FOR_SYM = 55; + int RETURN_SYM = 55; /** RegularExpression Id. */ - int EACH_SYM = 56; + int DEBUG_SYM = 56; /** RegularExpression Id. */ - int WHILE_SYM = 57; + int WARN_SYM = 57; /** RegularExpression Id. */ - int IF_SYM = 58; + int FOR_SYM = 58; /** RegularExpression Id. */ - int ELSE_SYM = 59; + int EACH_SYM = 59; /** RegularExpression Id. */ - int EXTEND_SYM = 60; + int WHILE_SYM = 60; /** RegularExpression Id. */ - int MOZ_DOCUMENT_SYM = 61; + int IF_SYM = 61; /** RegularExpression Id. */ - int SUPPORTS_SYM = 62; + int ELSE_SYM = 62; /** RegularExpression Id. */ - int MICROSOFT_RULE = 63; + int EXTEND_SYM = 63; /** RegularExpression Id. */ - int IF = 64; + int MOZ_DOCUMENT_SYM = 64; /** RegularExpression Id. */ - int GUARDED_SYM = 65; + int SUPPORTS_SYM = 65; /** RegularExpression Id. */ - int STRING = 66; + int MICROSOFT_RULE = 66; /** RegularExpression Id. */ - int IDENT = 67; + int IF = 67; /** RegularExpression Id. */ - int NUMBER = 68; + int GUARDED_SYM = 68; /** RegularExpression Id. */ - int _URL = 69; + int STRING = 69; /** RegularExpression Id. */ - int URL = 70; + int IDENT = 70; /** RegularExpression Id. */ - int VARIABLE = 71; + int NUMBER = 71; /** RegularExpression Id. */ - int PERCENTAGE = 72; + int _URL = 72; /** RegularExpression Id. */ - int PT = 73; + int URL = 73; /** RegularExpression Id. */ - int MM = 74; + int VARIABLE = 74; /** RegularExpression Id. */ - int CM = 75; + int PERCENTAGE = 75; /** RegularExpression Id. */ - int PC = 76; + int PT = 76; /** RegularExpression Id. */ - int IN = 77; + int MM = 77; /** RegularExpression Id. */ - int PX = 78; + int CM = 78; /** RegularExpression Id. */ - int EMS = 79; + int PC = 79; /** RegularExpression Id. */ - int EXS = 80; + int IN = 80; /** RegularExpression Id. */ - int DEG = 81; + int PX = 81; /** RegularExpression Id. */ - int RAD = 82; + int EMS = 82; /** RegularExpression Id. */ - int GRAD = 83; + int EXS = 83; /** RegularExpression Id. */ - int MS = 84; + int DEG = 84; /** RegularExpression Id. */ - int SECOND = 85; + int RAD = 85; /** RegularExpression Id. */ - int HZ = 86; + int GRAD = 86; /** RegularExpression Id. */ - int KHZ = 87; + int MS = 87; /** RegularExpression Id. */ - int DIMEN = 88; + int SECOND = 88; /** RegularExpression Id. */ - int HASH = 89; + int HZ = 89; /** RegularExpression Id. */ - int IMPORT_SYM = 90; + int KHZ = 90; /** RegularExpression Id. */ - int MEDIA_SYM = 91; + int DIMEN = 91; /** RegularExpression Id. */ - int CHARSET_SYM = 92; + int HASH = 92; /** RegularExpression Id. */ - int PAGE_SYM = 93; + int IMPORT_SYM = 93; /** RegularExpression Id. */ - int FONT_FACE_SYM = 94; + int MEDIA_SYM = 94; /** RegularExpression Id. */ - int ATKEYWORD = 95; + int CHARSET_SYM = 95; /** RegularExpression Id. */ - int IMPORTANT_SYM = 96; + int PAGE_SYM = 96; /** RegularExpression Id. */ - int RANGE0 = 97; + int FONT_FACE_SYM = 97; /** RegularExpression Id. */ - int RANGE1 = 98; + int ATKEYWORD = 98; /** RegularExpression Id. */ - int RANGE2 = 99; + int IMPORTANT_SYM = 99; /** RegularExpression Id. */ - int RANGE3 = 100; + int RANGE0 = 100; /** RegularExpression Id. */ - int RANGE4 = 101; + int RANGE1 = 101; /** RegularExpression Id. */ - int RANGE5 = 102; + int RANGE2 = 102; /** RegularExpression Id. */ - int RANGE6 = 103; + int RANGE3 = 103; /** RegularExpression Id. */ - int RANGE = 104; + int RANGE4 = 104; /** RegularExpression Id. */ - int UNI = 105; + int RANGE5 = 105; /** RegularExpression Id. */ - int UNICODERANGE = 106; + int RANGE6 = 106; /** RegularExpression Id. */ - int REMOVE = 107; + int RANGE = 107; /** RegularExpression Id. */ - int FUNCTION = 108; + int UNI = 108; /** RegularExpression Id. */ - int UNKNOWN = 109; + int UNICODERANGE = 109; + /** RegularExpression Id. */ + int REMOVE = 110; + /** RegularExpression Id. */ + int FUNCTION = 111; + /** RegularExpression Id. */ + int UNKNOWN = 112; /** Lexical state. */ int DEFAULT = 0; @@ -243,6 +249,9 @@ public interface ParserConstants { "\"{\"", "\"}\"", "\"|=\"", + "\"^=\"", + "\"$=\"", + "\"*=\"", "\"~=\"", "\"=\"", "\"+\"", @@ -264,7 +273,7 @@ public interface ParserConstants { "\"&&\"", "\"!=\"", "\":\"", - "<EACH_VAR>", + "<INTERPOLATION>", "<NONASCII>", "<H>", "<UNICODE>", diff --git a/theme-compiler/src/com/vaadin/sass/parser/ParserTokenManager.java b/theme-compiler/src/com/vaadin/sass/parser/ParserTokenManager.java index 025bcaae8f..e3029206a6 100644 --- a/theme-compiler/src/com/vaadin/sass/parser/ParserTokenManager.java +++ b/theme-compiler/src/com/vaadin/sass/parser/ParserTokenManager.java @@ -37,168 +37,170 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) switch (pos) { case 0: - if ((active0 & 0x7ffe000000000000L) != 0L || (active1 & 0x7c000000L) != 0L) + if ((active0 & 0xfff0000000000000L) != 0L || (active1 & 0x3e0000003L) != 0L) return 111; - if ((active0 & 0x400000000L) != 0L) + if ((active0 & 0x2000000000L) != 0L) return 423; - if ((active0 & 0x40800L) != 0L) + if ((active0 & 0x200800L) != 0L) return 42; - if ((active0 & 0x10000000L) != 0L) + if ((active0 & 0x10000L) != 0L) + return 79; + if ((active0 & 0x80000000L) != 0L) return 424; - if ((active0 & 0x1c00000000000L) != 0L || (active1 & 0x1L) != 0L) + if ((active0 & 0x4000044L) != 0L) + return 3; + if ((active0 & 0xe000000000000L) != 0L || (active1 & 0x8L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 70; return 425; } - if ((active0 & 0x800044L) != 0L) - return 3; return -1; case 1: - if ((active0 & 0x2000000000000000L) != 0L) - return 112; - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 70; jjmatchedPos = 1; return 425; } - if ((active0 & 0x1400000000000L) != 0L || (active1 & 0x1L) != 0L) + if ((active1 & 0x1L) != 0L) + return 112; + if ((active0 & 0xa000000000000L) != 0L || (active1 & 0x8L) != 0L) return 425; - if ((active0 & 0x40L) != 0L) - return 1; - if ((active0 & 0x5ffe000000000000L) != 0L || (active1 & 0x7c000000L) != 0L) + if ((active0 & 0xfff0000000000000L) != 0L || (active1 & 0x3e0000002L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 1; return 426; } + if ((active0 & 0x40L) != 0L) + return 1; return -1; case 2: - if ((active0 & 0x400000000000000L) != 0L) - return 426; - if ((active0 & 0x7bfe000000000000L) != 0L || (active1 & 0x7c000000L) != 0L) + if ((active0 & 0xdff0000000000000L) != 0L || (active1 & 0x3e0000003L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 2; return 426; } - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0x2000000000000000L) != 0L) + return 426; + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 70; jjmatchedPos = 2; return 425; } return -1; case 3: - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0xdbf0000000000000L) != 0L || (active1 & 0x3e0000003L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 98; jjmatchedPos = 3; - return 425; + return 426; } - if ((active0 & 0x7b7e000000000000L) != 0L || (active1 & 0x7c000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 70; jjmatchedPos = 3; - return 426; + return 425; } - if ((active0 & 0x80000000000000L) != 0L) + if ((active0 & 0x400000000000000L) != 0L) return 426; return -1; case 4: - if ((active0 & 0x723e000000000000L) != 0L || (active1 & 0x5c000000L) != 0L) + if ((active0 & 0x91f0000000000000L) != 0L || (active1 & 0x2e0000003L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 4; return 426; } - if ((active0 & 0x940000000000000L) != 0L || (active1 & 0x20000000L) != 0L) + if ((active0 & 0x4a00000000000000L) != 0L || (active1 & 0x100000000L) != 0L) return 426; - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 70; jjmatchedPos = 4; return 425; } return -1; case 5: - if ((active0 & 0x701c000000000000L) != 0L || (active1 & 0x54000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 70; jjmatchedPos = 5; - return 426; + return 425; } - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0x1110000000000000L) != 0L || (active1 & 0x40000000L) != 0L) + return 426; + if ((active0 & 0x80e0000000000000L) != 0L || (active1 & 0x2a0000003L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 98; jjmatchedPos = 5; - return 425; - } - if ((active0 & 0x222000000000000L) != 0L || (active1 & 0x8000000L) != 0L) return 426; + } return -1; case 6: - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) return 425; - if ((active0 & 0x1010000000000000L) != 0L || (active1 & 0x4000000L) != 0L) + if ((active0 & 0x8080000000000000L) != 0L || (active1 & 0x20000000L) != 0L) return 426; - if ((active0 & 0x600c000000000000L) != 0L || (active1 & 0x50000000L) != 0L) + if ((active0 & 0x60000000000000L) != 0L || (active1 & 0x280000003L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 6; return 426; } return -1; case 7: - if ((active0 & 0x4000000000000L) != 0L || (active1 & 0x10000000L) != 0L) + if ((active0 & 0x20000000000000L) != 0L || (active1 & 0x80000000L) != 0L) return 426; - if ((active0 & 0x6008000000000000L) != 0L || (active1 & 0x40000000L) != 0L) + if ((active0 & 0x40000000000000L) != 0L || (active1 & 0x200000003L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 7; return 426; } return -1; case 8: - if ((active0 & 0x4008000000000000L) != 0L) - return 426; - if ((active0 & 0x2000000000000000L) != 0L || (active1 & 0x40000000L) != 0L) + if ((active1 & 0x200000001L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 8; return 426; } + if ((active0 & 0x40000000000000L) != 0L || (active1 & 0x2L) != 0L) + return 426; return -1; case 9: - if ((active1 & 0x40000000L) != 0L) - return 426; - if ((active0 & 0x2000000000000000L) != 0L) + if ((active1 & 0x1L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 9; return 426; } + if ((active1 & 0x200000000L) != 0L) + return 426; return -1; case 10: - if ((active0 & 0x2000000000000000L) != 0L) + if ((active1 & 0x1L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 10; return 426; } return -1; case 11: - if ((active0 & 0x2000000000000000L) != 0L) + if ((active1 & 0x1L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 11; return 426; } return -1; case 12: - if ((active0 & 0x2000000000000000L) != 0L) + if ((active1 & 0x1L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 98; jjmatchedPos = 12; return 426; } @@ -222,60 +224,65 @@ private int jjMoveStringLiteralDfa0_0() switch(curChar) { case 33: - return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x2000000000L, 0x0L); + case 36: + return jjMoveStringLiteralDfa1_0(0x10000L, 0x0L); case 38: - jjmatchedKind = 27; - return jjMoveStringLiteralDfa1_0(0x200000000L, 0x0L); + jjmatchedKind = 30; + return jjMoveStringLiteralDfa1_0(0x1000000000L, 0x0L); case 40: - return jjStopAtPos(0, 29); + return jjStopAtPos(0, 32); case 41: - return jjStopAtPos(0, 30); + return jjStopAtPos(0, 33); case 42: - return jjStopAtPos(0, 26); + jjmatchedKind = 29; + return jjMoveStringLiteralDfa1_0(0x20000L, 0x0L); case 43: - return jjStopAtPos(0, 17); + return jjStopAtPos(0, 20); case 44: - return jjStopAtPos(0, 19); + return jjStopAtPos(0, 22); case 45: - jjmatchedKind = 18; + jjmatchedKind = 21; return jjMoveStringLiteralDfa1_0(0x800L, 0x0L); case 46: - return jjStartNfaWithStates_0(0, 28, 424); + return jjStartNfaWithStates_0(0, 31, 424); case 47: - jjmatchedKind = 23; + jjmatchedKind = 26; return jjMoveStringLiteralDfa1_0(0x44L, 0x0L); case 58: - return jjStopAtPos(0, 35); + return jjStopAtPos(0, 38); case 59: - return jjStopAtPos(0, 20); + return jjStopAtPos(0, 23); case 60: - jjmatchedKind = 22; + jjmatchedKind = 25; return jjMoveStringLiteralDfa1_0(0x400L, 0x0L); case 61: - jjmatchedKind = 16; - return jjMoveStringLiteralDfa1_0(0x80000000L, 0x0L); + jjmatchedKind = 19; + return jjMoveStringLiteralDfa1_0(0x400000000L, 0x0L); case 62: - return jjStopAtPos(0, 21); + return jjStopAtPos(0, 24); case 64: - return jjMoveStringLiteralDfa1_0(0x7ffe000000000000L, 0x7c000000L); + return jjMoveStringLiteralDfa1_0(0xfff0000000000000L, 0x3e0000003L); case 91: - return jjStopAtPos(0, 24); + return jjStopAtPos(0, 27); case 93: - return jjStopAtPos(0, 25); + return jjStopAtPos(0, 28); + case 94: + return jjMoveStringLiteralDfa1_0(0x8000L, 0x0L); case 73: case 105: - return jjMoveStringLiteralDfa1_0(0x1000000000000L, 0x1L); + return jjMoveStringLiteralDfa1_0(0x8000000000000L, 0x8L); case 84: case 116: - return jjMoveStringLiteralDfa1_0(0xc00000000000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x6000000000000L, 0x0L); case 123: return jjStopAtPos(0, 12); case 124: - return jjMoveStringLiteralDfa1_0(0x100004000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x800004000L, 0x0L); case 125: return jjStopAtPos(0, 13); case 126: - return jjMoveStringLiteralDfa1_0(0x8000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x40000L, 0x0L); default : return jjMoveNfa_0(4, 0); } @@ -292,15 +299,15 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1) case 33: return jjMoveStringLiteralDfa2_0(active0, 0x400L, active1, 0L); case 38: - if ((active0 & 0x200000000L) != 0L) - return jjStopAtPos(1, 33); + if ((active0 & 0x1000000000L) != 0L) + return jjStopAtPos(1, 36); break; case 42: if ((active0 & 0x40L) != 0L) return jjStartNfaWithStates_0(1, 6, 1); break; case 45: - return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000800L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x800L, active1, 0x1L); case 47: if ((active0 & 0x4L) != 0L) return jjStopAtPos(1, 2); @@ -310,59 +317,65 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1) return jjStopAtPos(1, 14); else if ((active0 & 0x8000L) != 0L) return jjStopAtPos(1, 15); - else if ((active0 & 0x80000000L) != 0L) - return jjStopAtPos(1, 31); + else if ((active0 & 0x10000L) != 0L) + return jjStopAtPos(1, 16); + else if ((active0 & 0x20000L) != 0L) + return jjStopAtPos(1, 17); + else if ((active0 & 0x40000L) != 0L) + return jjStopAtPos(1, 18); else if ((active0 & 0x400000000L) != 0L) return jjStopAtPos(1, 34); + else if ((active0 & 0x2000000000L) != 0L) + return jjStopAtPos(1, 37); break; case 67: case 99: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x10000000L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000L); case 68: case 100: - return jjMoveStringLiteralDfa2_0(active0, 0x20000000000000L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x100000000000000L, active1, 0L); case 69: case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x1900000000000000L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0xc800000000000000L, active1, 0L); case 70: case 102: - if ((active1 & 0x1L) != 0L) - return jjStartNfaWithStates_0(1, 64, 425); - return jjMoveStringLiteralDfa2_0(active0, 0x88000000000000L, active1, 0x40000000L); + if ((active1 & 0x8L) != 0L) + return jjStartNfaWithStates_0(1, 67, 425); + return jjMoveStringLiteralDfa2_0(active0, 0x440000000000000L, active1, 0x200000000L); case 72: case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x800000000000L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x4000000000000L, active1, 0L); case 73: case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x404000000000000L, active1, 0x4000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x2020000000000000L, active1, 0x20000000L); case 77: case 109: - return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L, active1, 0x8000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x10000000000000L, active1, 0x40000000L); case 78: case 110: - if ((active0 & 0x1000000000000L) != 0L) - return jjStartNfaWithStates_0(1, 48, 425); + if ((active0 & 0x8000000000000L) != 0L) + return jjStartNfaWithStates_0(1, 51, 425); break; case 79: case 111: - if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(1, 46, 425); + if ((active0 & 0x2000000000000L) != 0L) + return jjStartNfaWithStates_0(1, 49, 425); break; case 80: case 112: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x20000000L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x100000000L); case 82: case 114: - return jjMoveStringLiteralDfa2_0(active0, 0x10000000000000L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x80000000000000L, active1, 0L); case 83: case 115: - return jjMoveStringLiteralDfa2_0(active0, 0x4000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2L); case 87: case 119: - return jjMoveStringLiteralDfa2_0(active0, 0x240000000000000L, active1, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x1200000000000000L, active1, 0L); case 124: - if ((active0 & 0x100000000L) != 0L) - return jjStopAtPos(1, 32); + if ((active0 & 0x800000000L) != 0L) + return jjStopAtPos(1, 35); break; default : break; @@ -388,42 +401,42 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a break; case 65: case 97: - return jjMoveStringLiteralDfa3_0(active0, 0x140000000000000L, active1, 0x20000000L); + return jjMoveStringLiteralDfa3_0(active0, 0xa00000000000000L, active1, 0x100000000L); case 69: case 101: - return jjMoveStringLiteralDfa3_0(active0, 0x30000000000000L, active1, 0x8000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x180000000000000L, active1, 0x40000000L); case 70: case 102: - if ((active0 & 0x400000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 58, 426); + if ((active0 & 0x2000000000000000L) != 0L) + return jjStartNfaWithStates_0(2, 61, 426); break; case 72: case 104: - return jjMoveStringLiteralDfa3_0(active0, 0x200000000000000L, active1, 0x10000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000000L, active1, 0x80000000L); case 73: case 105: - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000L, active1, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L, active1, 0L); case 76: case 108: - return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000000L, active1, 0L); case 77: case 109: - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000000L, active1, 0x4000000L); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x20000001L); case 78: case 110: - return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L, active1, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x20000000000000L, active1, 0L); case 79: case 111: - return jjMoveStringLiteralDfa3_0(active0, 0x80000000000000L, active1, 0x40000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x400000000000000L, active1, 0x200000000L); case 82: case 114: - return jjMoveStringLiteralDfa3_0(active0, 0x800000000000L, active1, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L, active1, 0L); case 85: case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x4008000000000000L, active1, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L, active1, 0x2L); case 88: case 120: - return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000000L, active1, 0L); default : break; } @@ -446,45 +459,45 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a break; case 65: case 97: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x10000000L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x80000000L); case 66: case 98: - return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x100000000000000L, active1, 0L); case 67: case 99: - return jjMoveStringLiteralDfa4_0(active0, 0x104000000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x820000000000000L, active1, 0L); case 68: case 100: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x8000000L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x40000000L); case 71: case 103: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x20000000L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x100000000L); case 73: case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x200000000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L, active1, 0L); case 78: case 110: - return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L, active1, 0x40000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x40000000000000L, active1, 0x200000000L); case 79: case 111: - return jjMoveStringLiteralDfa4_0(active0, 0x2000800000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L, active1, 0x1L); case 80: case 112: - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0x4000000L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x20000002L); case 82: case 114: - if ((active0 & 0x80000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 55, 426); - return jjMoveStringLiteralDfa4_0(active0, 0x40000000000000L, active1, 0L); + if ((active0 & 0x400000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 58, 426); + return jjMoveStringLiteralDfa4_0(active0, 0x200000000000000L, active1, 0L); case 83: case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0L); case 84: case 116: - return jjMoveStringLiteralDfa4_0(active0, 0x1010000000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x8080000000000000L, active1, 0L); case 88: case 120: - return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L, active1, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L, active1, 0L); default : break; } @@ -503,48 +516,48 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long a { case 67: case 99: - return jjMoveStringLiteralDfa5_0(active0, 0x8000000000000L, active1, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x40000000000000L, active1, 0L); case 69: case 101: - if ((active0 & 0x800000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 59, 426); - else if ((active1 & 0x20000000L) != 0L) - return jjStartNfaWithStates_0(4, 93, 426); - return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000000L, active1, 0L); + if ((active0 & 0x4000000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 62, 426); + else if ((active1 & 0x100000000L) != 0L) + return jjStartNfaWithStates_0(4, 96, 426); + return jjMoveStringLiteralDfa5_0(active0, 0x8000000000000000L, active1, 0L); case 72: case 104: - if ((active0 & 0x100000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 56, 426); + if ((active0 & 0x800000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 59, 426); break; case 73: case 105: - return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L, active1, 0x8000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x10000000000000L, active1, 0x40000000L); case 76: case 108: - return jjMoveStringLiteralDfa5_0(active0, 0x204000000000000L, active1, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x1020000000000000L, active1, 0L); case 78: case 110: - if ((active0 & 0x40000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 54, 426); + if ((active0 & 0x200000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 57, 426); break; case 79: case 111: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x4000000L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x20000000L); case 80: case 112: - return jjMoveStringLiteralDfa5_0(active0, 0x4000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x2L); case 82: case 114: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x10000000L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x80000000L); case 84: case 116: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x40000000L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x200000000L); case 85: case 117: - return jjMoveStringLiteralDfa5_0(active0, 0x30800000000000L, active1, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x184000000000000L, active1, 0L); case 90: case 122: - return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1L); default : break; } @@ -562,42 +575,42 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a switch(curChar) { case 45: - return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000000L, active1, 0x40000000L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x200000001L); case 65: case 97: - if ((active1 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(5, 91, 426); + if ((active1 & 0x40000000L) != 0L) + return jjStartNfaWithStates_0(5, 94, 426); break; case 69: case 101: - if ((active0 & 0x200000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 57, 426); + if ((active0 & 0x1000000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 60, 426); break; case 71: case 103: - if ((active0 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 53, 426); - return jjMoveStringLiteralDfa6_0(active0, 0x800000000000L, active1, 0L); + if ((active0 & 0x100000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 56, 426); + return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000L, active1, 0L); case 78: case 110: - if ((active0 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 49, 426); - return jjMoveStringLiteralDfa6_0(active0, 0x1000000000000000L, active1, 0L); + if ((active0 & 0x10000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 52, 426); + return jjMoveStringLiteralDfa6_0(active0, 0x8000000000000000L, active1, 0L); case 79: case 111: - return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x2L); case 82: case 114: - return jjMoveStringLiteralDfa6_0(active0, 0x10000000000000L, active1, 0x4000000L); + return jjMoveStringLiteralDfa6_0(active0, 0x80000000000000L, active1, 0x20000000L); case 83: case 115: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x10000000L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x80000000L); case 84: case 116: - return jjMoveStringLiteralDfa6_0(active0, 0x8000000000000L, active1, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x40000000000000L, active1, 0L); case 85: case 117: - return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000L, active1, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x20000000000000L, active1, 0L); default : break; } @@ -616,35 +629,35 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a { case 68: case 100: - if ((active0 & 0x1000000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 60, 426); - return jjMoveStringLiteralDfa7_0(active0, 0x2004000000000000L, active1, 0L); + if ((active0 & 0x8000000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 63, 426); + return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L, active1, 0x1L); case 69: case 101: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x10000000L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x80000000L); case 70: case 102: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x40000000L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x200000000L); case 72: case 104: - if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(6, 47, 425); + if ((active0 & 0x4000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 50, 425); break; case 73: case 105: - return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000L, active1, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x40000000000000L, active1, 0L); case 78: case 110: - if ((active0 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 52, 426); + if ((active0 & 0x80000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 55, 426); break; case 82: case 114: - return jjMoveStringLiteralDfa7_0(active0, 0x4000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x2L); case 84: case 116: - if ((active1 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(6, 90, 426); + if ((active1 & 0x20000000L) != 0L) + return jjStartNfaWithStates_0(6, 93, 426); break; default : break; @@ -664,20 +677,20 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long a { case 65: case 97: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x40000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x200000000L); case 69: case 101: - if ((active0 & 0x4000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 50, 426); + if ((active0 & 0x20000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 53, 426); break; case 79: case 111: - return jjMoveStringLiteralDfa8_0(active0, 0x2008000000000000L, active1, 0L); + return jjMoveStringLiteralDfa8_0(active0, 0x40000000000000L, active1, 0x1L); case 84: case 116: - if ((active1 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(7, 92, 426); - return jjMoveStringLiteralDfa8_0(active0, 0x4000000000000000L, active1, 0L); + if ((active1 & 0x80000000L) != 0L) + return jjStartNfaWithStates_0(7, 95, 426); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x2L); default : break; } @@ -696,16 +709,16 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long a { case 67: case 99: - return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000000L, active1, 0x40000000L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x200000001L); case 78: case 110: - if ((active0 & 0x8000000000000L) != 0L) - return jjStartNfaWithStates_0(8, 51, 426); + if ((active0 & 0x40000000000000L) != 0L) + return jjStartNfaWithStates_0(8, 54, 426); break; case 83: case 115: - if ((active0 & 0x4000000000000000L) != 0L) - return jjStartNfaWithStates_0(8, 62, 426); + if ((active1 & 0x2L) != 0L) + return jjStartNfaWithStates_0(8, 65, 426); break; default : break; @@ -718,101 +731,101 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long a return jjStartNfa_0(7, old0, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(8, active0, active1); + jjStopStringLiteralDfa_0(8, 0L, active1); return 9; } switch(curChar) { case 69: case 101: - if ((active1 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(9, 94, 426); + if ((active1 & 0x200000000L) != 0L) + return jjStartNfaWithStates_0(9, 97, 426); break; case 85: case 117: - return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000000L, active1, 0L); + return jjMoveStringLiteralDfa10_0(active1, 0x1L); default : break; } - return jjStartNfa_0(8, active0, active1); + return jjStartNfa_0(8, 0L, active1); } -private int jjMoveStringLiteralDfa10_0(long old0, long active0, long old1, long active1) +private int jjMoveStringLiteralDfa10_0(long old1, long active1) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(8, old0, old1); + if (((active1 &= old1)) == 0L) + return jjStartNfa_0(8, 0L, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(9, active0, 0L); + jjStopStringLiteralDfa_0(9, 0L, active1); return 10; } switch(curChar) { case 77: case 109: - return jjMoveStringLiteralDfa11_0(active0, 0x2000000000000000L); + return jjMoveStringLiteralDfa11_0(active1, 0x1L); default : break; } - return jjStartNfa_0(9, active0, 0L); + return jjStartNfa_0(9, 0L, active1); } -private int jjMoveStringLiteralDfa11_0(long old0, long active0) +private int jjMoveStringLiteralDfa11_0(long old1, long active1) { - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(9, old0, 0L); + if (((active1 &= old1)) == 0L) + return jjStartNfa_0(9, 0L, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(10, active0, 0L); + jjStopStringLiteralDfa_0(10, 0L, active1); return 11; } switch(curChar) { case 69: case 101: - return jjMoveStringLiteralDfa12_0(active0, 0x2000000000000000L); + return jjMoveStringLiteralDfa12_0(active1, 0x1L); default : break; } - return jjStartNfa_0(10, active0, 0L); + return jjStartNfa_0(10, 0L, active1); } -private int jjMoveStringLiteralDfa12_0(long old0, long active0) +private int jjMoveStringLiteralDfa12_0(long old1, long active1) { - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(10, old0, 0L); + if (((active1 &= old1)) == 0L) + return jjStartNfa_0(10, 0L, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(11, active0, 0L); + jjStopStringLiteralDfa_0(11, 0L, active1); return 12; } switch(curChar) { case 78: case 110: - return jjMoveStringLiteralDfa13_0(active0, 0x2000000000000000L); + return jjMoveStringLiteralDfa13_0(active1, 0x1L); default : break; } - return jjStartNfa_0(11, active0, 0L); + return jjStartNfa_0(11, 0L, active1); } -private int jjMoveStringLiteralDfa13_0(long old0, long active0) +private int jjMoveStringLiteralDfa13_0(long old1, long active1) { - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(11, old0, 0L); + if (((active1 &= old1)) == 0L) + return jjStartNfa_0(11, 0L, old1); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(12, active0, 0L); + jjStopStringLiteralDfa_0(12, 0L, active1); return 13; } switch(curChar) { case 84: case 116: - if ((active0 & 0x2000000000000000L) != 0L) - return jjStartNfaWithStates_0(13, 61, 426); + if ((active1 & 0x1L) != 0L) + return jjStartNfaWithStates_0(13, 64, 426); break; default : break; } - return jjStartNfa_0(12, active0, 0L); + return jjStartNfa_0(12, 0L, active1); } private int jjStartNfaWithStates_0(int pos, int kind, int state) { @@ -846,8 +859,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 4: if ((0x3ff000000000000L & l) != 0L) { - if (kind > 68) - kind = 68; + if (kind > 71) + kind = 71; jjCheckNAddStates(0, 73); } else if ((0x100003600L & l) != 0L) @@ -877,6 +890,10 @@ private int jjMoveNfa_0(int startState, int curPos) else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 5; break; + case 79: + if (curChar == 45) + jjCheckNAdd(80); + break; case 424: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(110, 114); @@ -914,8 +931,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddTwoStates(187, 188); if ((0x3ff000000000000L & l) != 0L) { - if (kind > 68) - kind = 68; + if (kind > 71) + kind = 71; jjCheckNAdd(186); } break; @@ -923,8 +940,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 113: if ((0x3ff200000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 425: @@ -934,13 +951,13 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddTwoStates(151, 152); else if (curChar == 40) { - if (kind > 108) - kind = 108; + if (kind > 111) + kind = 111; } if ((0x3ff200000000000L & l) != 0L) { - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); } break; @@ -1062,8 +1079,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddStates(106, 109); break; case 46: - if (curChar == 34 && kind > 66) - kind = 66; + if (curChar == 34 && kind > 69) + kind = 69; break; case 48: if (curChar == 12) @@ -1122,8 +1139,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddStates(102, 105); break; case 63: - if (curChar == 39 && kind > 66) - kind = 66; + if (curChar == 39 && kind > 69) + kind = 69; break; case 65: if (curChar == 12) @@ -1177,113 +1194,109 @@ private int jjMoveNfa_0(int startState, int curPos) if (curChar == 36) jjCheckNAddStates(98, 101); break; - case 79: - if (curChar == 45) - jjCheckNAdd(80); - break; case 81: if ((0x3ff200000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddTwoStates(81, 82); break; case 83: if ((0xffffffff00000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddTwoStates(81, 82); break; case 84: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(278, 281); break; case 85: if ((0x100003600L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddTwoStates(81, 82); break; case 86: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(282, 288); break; case 87: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(289, 291); break; case 88: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(292, 295); break; case 89: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(296, 300); break; case 90: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(301, 306); break; case 93: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(307, 310); break; case 94: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(311, 317); break; case 95: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(318, 320); break; case 96: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(321, 324); break; case 97: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(325, 329); break; case 98: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(330, 335); break; case 99: @@ -1293,162 +1306,162 @@ private int jjMoveNfa_0(int startState, int curPos) case 100: if ((0x3ff200000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddTwoStates(100, 101); break; case 102: if ((0xffffffff00000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddTwoStates(100, 101); break; case 103: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(336, 339); break; case 104: if ((0x100003600L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddTwoStates(100, 101); break; case 105: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(340, 346); break; case 106: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(347, 349); break; case 107: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(350, 353); break; case 108: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(354, 358); break; case 109: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(359, 364); break; case 115: if ((0xffffffff00000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 116: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(365, 368); break; case 117: if ((0x100003600L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 118: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(369, 375); break; case 119: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(376, 378); break; case 120: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(379, 382); break; case 121: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(383, 387); break; case 122: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(388, 393); break; case 125: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(394, 397); break; case 126: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(398, 404); break; case 127: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(405, 407); break; case 128: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(408, 411); break; case 129: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(412, 416); break; case 130: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(417, 422); break; case 132: @@ -1456,70 +1469,70 @@ private int jjMoveNfa_0(int startState, int curPos) jjAddStates(423, 424); break; case 133: - if (curChar == 40 && kind > 107) - kind = 107; + if (curChar == 40 && kind > 110) + kind = 110; break; case 140: if ((0x3ff200000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 142: if ((0xffffffff00000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 143: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(425, 428); break; case 144: if ((0x100003600L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 145: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(429, 435); break; case 146: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(436, 438); break; case 147: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(439, 442); break; case 148: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(443, 447); break; case 149: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(448, 453); break; case 150: @@ -1531,8 +1544,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddTwoStates(151, 152); break; case 152: - if (curChar == 40 && kind > 108) - kind = 108; + if (curChar == 40 && kind > 111) + kind = 111; break; case 154: if ((0xffffffff00000000L & l) != 0L) @@ -1590,8 +1603,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 186: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 68) - kind = 68; + if (kind > 71) + kind = 71; jjCheckNAdd(186); break; case 187: @@ -1599,8 +1612,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddTwoStates(187, 188); break; case 188: - if (curChar == 37 && kind > 72) - kind = 72; + if (curChar == 37 && kind > 75) + kind = 75; break; case 189: if ((0x3ff000000000000L & l) != 0L) @@ -1673,106 +1686,106 @@ private int jjMoveNfa_0(int startState, int curPos) case 241: if ((0x3ff200000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 243: if ((0xffffffff00000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 244: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(489, 492); break; case 245: if ((0x100003600L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 246: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(493, 499); break; case 247: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(500, 502); break; case 248: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(503, 506); break; case 249: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(507, 511); break; case 250: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(512, 517); break; case 253: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(518, 521); break; case 254: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(522, 528); break; case 255: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(529, 531); break; case 256: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(532, 535); break; case 257: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(536, 540); break; case 258: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(541, 546); break; case 260: @@ -1788,8 +1801,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddTwoStates(262, 263); break; case 263: - if (curChar == 41 && kind > 70) - kind = 70; + if (curChar == 41 && kind > 73) + kind = 73; break; case 265: if ((0xffffffff00000000L & l) != 0L) @@ -1954,20 +1967,20 @@ private int jjMoveNfa_0(int startState, int curPos) case 311: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 312; break; case 312: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(691, 694); break; case 313: - if (curChar == 63 && kind > 106) - kind = 106; + if (curChar == 63 && kind > 109) + kind = 109; break; case 314: case 329: @@ -1976,29 +1989,29 @@ private int jjMoveNfa_0(int startState, int curPos) case 339: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAdd(313); break; case 315: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddTwoStates(313, 314); break; case 316: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(695, 697); break; case 317: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjAddStates(698, 703); break; case 318: @@ -2014,8 +2027,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAdd(321); break; case 321: - if ((0x3ff000000000000L & l) != 0L && kind > 106) - kind = 106; + if ((0x3ff000000000000L & l) != 0L && kind > 109) + kind = 109; break; case 322: if ((0x3ff000000000000L & l) != 0L) @@ -2032,8 +2045,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 325: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAdd(313); break; case 326: @@ -2047,8 +2060,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 328: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 329; break; case 330: @@ -2058,57 +2071,57 @@ private int jjMoveNfa_0(int startState, int curPos) case 331: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 332; break; case 332: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddTwoStates(313, 333); break; case 334: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 335; break; case 335: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(704, 706); break; case 337: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddTwoStates(313, 336); break; case 338: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(707, 710); break; case 340: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddTwoStates(313, 339); break; case 341: if (curChar != 63) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(711, 713); break; case 342: @@ -2126,36 +2139,36 @@ private int jjMoveNfa_0(int startState, int curPos) case 345: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 346; break; case 346: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(714, 717); break; case 347: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAdd(321); break; case 348: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddTwoStates(321, 347); break; case 349: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(718, 720); break; case 350: @@ -2181,43 +2194,43 @@ private int jjMoveNfa_0(int startState, int curPos) case 356: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(733, 736); break; case 357: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(737, 743); break; case 358: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(744, 746); break; case 359: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(747, 750); break; case 360: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(751, 755); break; case 361: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(756, 761); break; case 362: @@ -2243,15 +2256,15 @@ private int jjMoveNfa_0(int startState, int curPos) case 368: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 68) - kind = 68; + if (kind > 71) + kind = 71; jjCheckNAddStates(0, 73); break; case 369: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 68) - kind = 68; + if (kind > 71) + kind = 71; jjCheckNAdd(369); break; case 370: @@ -2480,8 +2493,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 4: if ((0x7fffffe07fffffeL & l) != 0L) { - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(798, 803); } else if (curChar == 92) @@ -2495,13 +2508,23 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x4000000040L & l) != 0L) jjstateSet[jjnewStateCnt++] = 33; break; + case 79: + if ((0x7fffffe07fffffeL & l) != 0L) + { + if (kind > 74) + kind = 74; + jjCheckNAddTwoStates(81, 82); + } + else if (curChar == 92) + jjCheckNAddTwoStates(83, 93); + break; case 42: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddStates(115, 118); if ((0x7fffffe07fffffeL & l) != 0L) { - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); } if ((0x200000002000L & l) != 0L) @@ -2510,8 +2533,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 426: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); } else if (curChar == 92) @@ -2524,8 +2547,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddTwoStates(142, 143); if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); } else if (curChar == 92) @@ -2540,8 +2563,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 111: if ((0x7fffffe07fffffeL & l) != 0L) { - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); } else if (curChar == 92) @@ -2564,8 +2587,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddStates(123, 125); break; case 10: - if (curChar == 125 && kind > 36) - kind = 36; + if (curChar == 125 && kind > 39) + kind = 39; break; case 11: if (curChar == 92) @@ -2628,8 +2651,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddStates(189, 195); break; case 29: - if ((0x4000000040000L & l) != 0L && kind > 63) - kind = 63; + if ((0x4000000040000L & l) != 0L && kind > 66) + kind = 66; break; case 30: case 35: @@ -2749,15 +2772,15 @@ private int jjMoveNfa_0(int startState, int curPos) case 80: if ((0x7fffffe07fffffeL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddTwoStates(81, 82); break; case 81: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddTwoStates(81, 82); break; case 82: @@ -2767,50 +2790,50 @@ private int jjMoveNfa_0(int startState, int curPos) case 83: if ((0x7fffffffffffffffL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddTwoStates(81, 82); break; case 84: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(278, 281); break; case 86: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(282, 288); break; case 87: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(289, 291); break; case 88: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(292, 295); break; case 89: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(296, 300); break; case 90: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(301, 306); break; case 92: @@ -2820,50 +2843,50 @@ private int jjMoveNfa_0(int startState, int curPos) case 93: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(307, 310); break; case 94: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(311, 317); break; case 95: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(318, 320); break; case 96: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(321, 324); break; case 97: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(325, 329); break; case 98: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 71) - kind = 71; + if (kind > 74) + kind = 74; jjCheckNAddStates(330, 335); break; case 100: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddTwoStates(100, 101); break; case 101: @@ -2873,50 +2896,50 @@ private int jjMoveNfa_0(int startState, int curPos) case 102: if ((0x7fffffffffffffffL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddTwoStates(100, 101); break; case 103: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(336, 339); break; case 105: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(340, 346); break; case 106: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(347, 349); break; case 107: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(350, 353); break; case 108: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(354, 358); break; case 109: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddStates(359, 364); break; case 110: @@ -2926,15 +2949,15 @@ private int jjMoveNfa_0(int startState, int curPos) case 112: if ((0x7fffffe07fffffeL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 113: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 114: @@ -2944,50 +2967,50 @@ private int jjMoveNfa_0(int startState, int curPos) case 115: if ((0x7fffffffffffffffL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 116: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(365, 368); break; case 118: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(369, 375); break; case 119: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(376, 378); break; case 120: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(379, 382); break; case 121: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(383, 387); break; case 122: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(388, 393); break; case 124: @@ -2997,43 +3020,43 @@ private int jjMoveNfa_0(int startState, int curPos) case 125: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(394, 397); break; case 126: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(398, 404); break; case 127: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(405, 407); break; case 128: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(408, 411); break; case 129: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(412, 416); break; case 130: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddStates(417, 422); break; case 131: @@ -3063,8 +3086,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 140: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 141: @@ -3074,50 +3097,50 @@ private int jjMoveNfa_0(int startState, int curPos) case 142: if ((0x7fffffffffffffffL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 143: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(425, 428); break; case 145: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(429, 435); break; case 146: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(436, 438); break; case 147: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(439, 442); break; case 148: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(443, 447); break; case 149: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(448, 453); break; case 150: @@ -3158,8 +3181,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAddStates(482, 488); break; case 164: - if ((0x10000000100000L & l) != 0L && kind > 65) - kind = 65; + if ((0x10000000100000L & l) != 0L && kind > 68) + kind = 68; break; case 165: if ((0x100000001000L & l) != 0L) @@ -3186,8 +3209,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 169; break; case 172: - if ((0x10000000100000L & l) != 0L && kind > 96) - kind = 96; + if ((0x10000000100000L & l) != 0L && kind > 99) + kind = 99; break; case 173: if ((0x400000004000L & l) != 0L) @@ -3224,8 +3247,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 182: if ((0x7fffffe07fffffeL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 183: @@ -3235,77 +3258,77 @@ private int jjMoveNfa_0(int startState, int curPos) case 184: if ((0x7fffffe07fffffeL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(798, 803); break; case 190: - if ((0x10000000100000L & l) != 0L && kind > 73) - kind = 73; + if ((0x10000000100000L & l) != 0L && kind > 76) + kind = 76; break; case 191: if ((0x1000000010000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 190; break; case 193: - if ((0x200000002000L & l) != 0L && kind > 74) - kind = 74; + if ((0x200000002000L & l) != 0L && kind > 77) + kind = 77; break; case 194: if ((0x200000002000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 193; break; case 196: - if ((0x200000002000L & l) != 0L && kind > 75) - kind = 75; + if ((0x200000002000L & l) != 0L && kind > 78) + kind = 78; break; case 197: if ((0x800000008L & l) != 0L) jjstateSet[jjnewStateCnt++] = 196; break; case 199: - if ((0x800000008L & l) != 0L && kind > 76) - kind = 76; + if ((0x800000008L & l) != 0L && kind > 79) + kind = 79; break; case 200: if ((0x1000000010000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 199; break; case 202: - if ((0x400000004000L & l) != 0L && kind > 77) - kind = 77; + if ((0x400000004000L & l) != 0L && kind > 80) + kind = 80; break; case 203: if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 202; break; case 205: - if ((0x100000001000000L & l) != 0L && kind > 78) - kind = 78; + if ((0x100000001000000L & l) != 0L && kind > 81) + kind = 81; break; case 206: if ((0x1000000010000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 205; break; case 208: - if ((0x200000002000L & l) != 0L && kind > 79) - kind = 79; + if ((0x200000002000L & l) != 0L && kind > 82) + kind = 82; break; case 209: if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 208; break; case 211: - if ((0x100000001000000L & l) != 0L && kind > 80) - kind = 80; + if ((0x100000001000000L & l) != 0L && kind > 83) + kind = 83; break; case 212: if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 211; break; case 214: - if ((0x8000000080L & l) != 0L && kind > 81) - kind = 81; + if ((0x8000000080L & l) != 0L && kind > 84) + kind = 84; break; case 215: if ((0x2000000020L & l) != 0L) @@ -3316,8 +3339,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 215; break; case 218: - if ((0x1000000010L & l) != 0L && kind > 82) - kind = 82; + if ((0x1000000010L & l) != 0L && kind > 85) + kind = 85; break; case 219: if ((0x200000002L & l) != 0L) @@ -3328,8 +3351,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 219; break; case 222: - if ((0x1000000010L & l) != 0L && kind > 83) - kind = 83; + if ((0x1000000010L & l) != 0L && kind > 86) + kind = 86; break; case 223: if ((0x200000002L & l) != 0L) @@ -3344,28 +3367,28 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 224; break; case 227: - if ((0x8000000080000L & l) != 0L && kind > 84) - kind = 84; + if ((0x8000000080000L & l) != 0L && kind > 87) + kind = 87; break; case 228: if ((0x200000002000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 227; break; case 230: - if ((0x8000000080000L & l) != 0L && kind > 85) - kind = 85; + if ((0x8000000080000L & l) != 0L && kind > 88) + kind = 88; break; case 232: - if ((0x400000004000000L & l) != 0L && kind > 86) - kind = 86; + if ((0x400000004000000L & l) != 0L && kind > 89) + kind = 89; break; case 233: if ((0x10000000100L & l) != 0L) jjstateSet[jjnewStateCnt++] = 232; break; case 235: - if ((0x400000004000000L & l) != 0L && kind > 87) - kind = 87; + if ((0x400000004000000L & l) != 0L && kind > 90) + kind = 90; break; case 236: if ((0x10000000100L & l) != 0L) @@ -3378,15 +3401,15 @@ private int jjMoveNfa_0(int startState, int curPos) case 240: if ((0x7fffffe07fffffeL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 241: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 242: @@ -3396,50 +3419,50 @@ private int jjMoveNfa_0(int startState, int curPos) case 243: if ((0x7fffffffffffffffL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 244: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(489, 492); break; case 246: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(493, 499); break; case 247: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(500, 502); break; case 248: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(503, 506); break; case 249: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(507, 511); break; case 250: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(512, 517); break; case 252: @@ -3449,43 +3472,43 @@ private int jjMoveNfa_0(int startState, int curPos) case 253: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(518, 521); break; case 254: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(522, 528); break; case 255: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(529, 531); break; case 256: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(532, 535); break; case 257: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(536, 540); break; case 258: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddStates(541, 546); break; case 259: @@ -3610,8 +3633,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 317: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjAddStates(698, 703); break; case 318: @@ -3627,8 +3650,8 @@ private int jjMoveNfa_0(int startState, int curPos) jjCheckNAdd(321); break; case 321: - if ((0x7e0000007eL & l) != 0L && kind > 106) - kind = 106; + if ((0x7e0000007eL & l) != 0L && kind > 109) + kind = 109; break; case 322: if ((0x7e0000007eL & l) != 0L) @@ -3645,8 +3668,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 325: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 313; break; case 326: @@ -3660,8 +3683,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 328: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 329; break; case 330: @@ -3671,15 +3694,15 @@ private int jjMoveNfa_0(int startState, int curPos) case 331: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 332; break; case 334: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 335; break; case 343: @@ -3689,36 +3712,36 @@ private int jjMoveNfa_0(int startState, int curPos) case 345: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjstateSet[jjnewStateCnt++] = 346; break; case 346: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(714, 717); break; case 347: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAdd(321); break; case 348: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddTwoStates(321, 347); break; case 349: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 106) - kind = 106; + if (kind > 109) + kind = 109; jjCheckNAddStates(718, 720); break; case 350: @@ -3748,43 +3771,43 @@ private int jjMoveNfa_0(int startState, int curPos) case 356: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(733, 736); break; case 357: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(737, 743); break; case 358: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(744, 746); break; case 359: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(747, 750); break; case 360: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(751, 755); break; case 361: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddStates(756, 761); break; case 362: @@ -3822,24 +3845,33 @@ private int jjMoveNfa_0(int startState, int curPos) case 4: if ((jjbitVec0[i2] & l2) == 0L) break; - if (kind > 37) - kind = 37; + if (kind > 40) + kind = 40; jjCheckNAddStates(798, 803); break; + case 79: + case 81: + case 83: + if ((jjbitVec0[i2] & l2) == 0L) + break; + if (kind > 74) + kind = 74; + jjCheckNAddTwoStates(81, 82); + break; case 426: case 113: case 115: if ((jjbitVec0[i2] & l2) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 425: if ((jjbitVec0[i2] & l2) != 0L) { - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); } if ((jjbitVec0[i2] & l2) != 0L) @@ -3848,8 +3880,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 111: if ((jjbitVec0[i2] & l2) == 0L) break; - if (kind > 95) - kind = 95; + if (kind > 98) + kind = 98; jjCheckNAddTwoStates(113, 114); break; case 2: @@ -3872,29 +3904,20 @@ private int jjMoveNfa_0(int startState, int curPos) if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(102, 105); break; - case 81: - case 83: - case 91: - if ((jjbitVec0[i2] & l2) == 0L) - break; - if (kind > 71) - kind = 71; - jjCheckNAddTwoStates(81, 82); - break; case 100: case 102: if ((jjbitVec0[i2] & l2) == 0L) break; - if (kind > 89) - kind = 89; + if (kind > 92) + kind = 92; jjCheckNAddTwoStates(100, 101); break; case 140: case 142: if ((jjbitVec0[i2] & l2) == 0L) break; - if (kind > 67) - kind = 67; + if (kind > 70) + kind = 70; jjCheckNAddTwoStates(140, 141); break; case 150: @@ -3907,8 +3930,8 @@ private int jjMoveNfa_0(int startState, int curPos) case 251: if ((jjbitVec0[i2] & l2) == 0L) break; - if (kind > 88) - kind = 88; + if (kind > 91) + kind = 91; jjCheckNAddTwoStates(241, 242); break; case 261: @@ -4151,14 +4174,14 @@ static final int[] jjnextStates = { /** Token literal values. */ public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, "\74\41\55\55", -"\55\55\76", "\173", "\175", "\174\75", "\176\75", "\75", "\53", "\55", "\54", "\73", -"\76", "\74", "\57", "\133", "\135", "\52", "\46", "\56", "\50", "\51", "\75\75", -"\174\174", "\46\46", "\41\75", "\72", null, null, null, null, null, null, null, null, +"\55\55\76", "\173", "\175", "\174\75", "\136\75", "\44\75", "\52\75", "\176\75", "\75", +"\53", "\55", "\54", "\73", "\76", "\74", "\57", "\133", "\135", "\52", "\46", "\56", +"\50", "\51", "\75\75", "\174\174", "\46\46", "\41\75", "\72", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, }; +null, null, null, null, null, null, null, null, null, null, null, null, null, null, }; /** Lexer state names. */ public static final String[] lexStateNames = { @@ -4174,10 +4197,10 @@ public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { - 0xffffc03ffffffc03L, 0x3c01ffffffdfL, + 0xfffe01fffffffc03L, 0x1e00ffffffeffL, }; static final long[] jjtoSkip = { 0x190L, 0x0L, @@ -4303,9 +4326,9 @@ public Token getNextToken() jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); - if (jjmatchedPos == 0 && jjmatchedKind > 109) + if (jjmatchedPos == 0 && jjmatchedKind > 112) { - jjmatchedKind = 109; + jjmatchedKind = 112; } break; case 1: diff --git a/theme-compiler/src/com/vaadin/sass/tree/BlockNode.java b/theme-compiler/src/com/vaadin/sass/tree/BlockNode.java index bd240324ba..3c87d3db82 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/BlockNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/BlockNode.java @@ -18,7 +18,7 @@ package com.vaadin.sass.tree; import java.util.ArrayList; -public class BlockNode extends Node implements IVariableNode { +public class BlockNode extends Node implements IVariableNode, InterpolationNode { private static final long serialVersionUID = 5742962631468325048L; @@ -66,6 +66,21 @@ public class BlockNode extends Node implements IVariableNode { @Override public void replaceVariables(ArrayList<VariableNode> variables) { + if (selectorList == null || selectorList.isEmpty()) { + return; + } + + for (final VariableNode var : variables) { + for (final String selector : new ArrayList<String>(selectorList)) { + String interpolation = "#{$" + var.getName() + "}"; + if (selector.contains(interpolation)) { + String replace = selector.replace(interpolation, var + .getExpr().toString()); + selectorList.add(selectorList.indexOf(selector), replace); + selectorList.remove(selector); + } + } + } } public String getSelectors() { @@ -77,4 +92,25 @@ public class BlockNode extends Node implements IVariableNode { return b.toString(); } + @Override + public void replaceInterpolation(String variableName, String variable) { + if (selectorList == null || selectorList.isEmpty()) { + return; + } + + for (final String selector : new ArrayList<String>(selectorList)) { + String interpolation = "#{" + variableName + "}"; + if (selector.contains(interpolation)) { + String replace = selector.replace(interpolation, variable); + selectorList.add(selectorList.indexOf(selector), replace); + selectorList.remove(selector); + } + } + } + + @Override + public boolean containsInterpolationVariable(String variable) { + return getSelectors().contains(variable); + } + } diff --git a/theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java b/theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java new file mode 100644 index 0000000000..3dab4df773 --- /dev/null +++ b/theme-compiler/src/com/vaadin/sass/tree/FontFaceNode.java @@ -0,0 +1,18 @@ +package com.vaadin.sass.tree; + +public class FontFaceNode extends Node { + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("@font-face {\n"); + + for (final Node child : children) { + builder.append("\t" + child.toString() + "\n"); + } + + builder.append("}"); + return builder.toString(); + } + +} diff --git a/theme-compiler/src/com/vaadin/sass/tree/InterpolationNode.java b/theme-compiler/src/com/vaadin/sass/tree/InterpolationNode.java new file mode 100644 index 0000000000..c998b60b52 --- /dev/null +++ b/theme-compiler/src/com/vaadin/sass/tree/InterpolationNode.java @@ -0,0 +1,7 @@ +package com.vaadin.sass.tree; + +public interface InterpolationNode { + public void replaceInterpolation(String variableName, String variable); + + public boolean containsInterpolationVariable(String variable); +} diff --git a/theme-compiler/src/com/vaadin/sass/tree/ListModifyNode.java b/theme-compiler/src/com/vaadin/sass/tree/ListModifyNode.java index 71c32a5c06..0e9f727c53 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/ListModifyNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/ListModifyNode.java @@ -2,9 +2,9 @@ package com.vaadin.sass.tree; public interface ListModifyNode { - public boolean isModifyingVariable(); + public String getNewVariable(); - public String getVariable(); + public String getModifyingList(); public VariableNode getModifiedList(VariableNode variableNode); diff --git a/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java b/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java index 114e095a9c..9c61c9f636 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/ListRemoveNode.java @@ -1,6 +1,7 @@ package com.vaadin.sass.tree; import java.util.ArrayList; +import java.util.Arrays; import com.vaadin.sass.parser.LexicalUnitImpl; import com.vaadin.sass.util.DeepCopy; @@ -10,62 +11,95 @@ public class ListRemoveNode extends Node implements ListModifyNode, private ArrayList<String> list; private ArrayList<String> remove; - private String separator; + private String separator = " "; + private String variable; - public ListRemoveNode(ArrayList<String> list, ArrayList<String> remove, + public ListRemoveNode(String variable, String list, String remove, String separator) { - this.list = list; - this.remove = remove; - this.separator = separator; + this.variable = variable; + checkSeparator(separator, list); + + populateList(list, remove); + } - @Override - public boolean isModifyingVariable() { - if (list != null) { - return list.size() == 1 && list.get(0).startsWith("$"); + private void checkSeparator(String separator, String list) { + String lowerCase = ""; + if (separator == null + || (lowerCase = separator.toLowerCase()).equals("auto")) { + if (list.contains(",")) { + this.separator = ","; + } + } else if (lowerCase.equals("comma")) { + this.separator = ","; + } else if (lowerCase.equals("space")) { + this.separator = " "; } - return false; + } + + private void populateList(String list, String remove) { + this.list = new ArrayList<String>(Arrays.asList(list.split(separator))); + this.remove = new ArrayList<String>(Arrays.asList(remove + .split(separator))); } @Override - public String getVariable() { - if (list != null && list.size() == 1) { - String string = list.get(0); - return string.substring(1, string.length()); - } - return null; + public String getNewVariable() { + return variable; } @Override public VariableNode getModifiedList(VariableNode variableNode) { - VariableNode clone = (VariableNode) DeepCopy.copy(variableNode); + if (variableNode != null) { + VariableNode clone = (VariableNode) DeepCopy.copy(variableNode); - LexicalUnitImpl first = null; - LexicalUnitImpl current = clone.getExpr(); - LexicalUnitImpl lastAccepted = null; - while (current != null) { + LexicalUnitImpl first = null; + LexicalUnitImpl current = (LexicalUnitImpl) clone.getExpr(); + LexicalUnitImpl lastAccepted = null; + while (current != null) { - if (shouldInclude(current, lastAccepted)) { - LexicalUnitImpl temp = current.clone(); - temp.setNextLexicalUnit(null); + if (shouldInclude(current, lastAccepted)) { + LexicalUnitImpl temp = current.clone(); + temp.setNextLexicalUnit(null); - if (lastAccepted != null) { - lastAccepted.setNextLexicalUnit(temp); - } + if (lastAccepted != null) { + lastAccepted.setNextLexicalUnit(temp); + } - lastAccepted = temp; + lastAccepted = temp; - if (first == null) { - first = lastAccepted; + if (first == null) { + first = lastAccepted; + } } + current = (LexicalUnitImpl) current.getNextLexicalUnit(); } - current = current.getNextLexicalUnit(); - } - clone.setExpr(first); + clone.setExpr(first); + + return clone; + } else { - return clone; + final ArrayList<String> newList = new ArrayList<String>(list); + newList.removeAll(remove); + + LexicalUnitImpl unit = null; + if (newList.size() > 0) { + unit = LexicalUnitImpl.createString(newList.get(0)); + LexicalUnitImpl last = unit; + for (int i = 1; i < newList.size(); i++) { + LexicalUnitImpl current = LexicalUnitImpl + .createString(newList.get(i)); + last.setNextLexicalUnit(current); + last = current; + } + + } + VariableNode node = new VariableNode(variable, unit, false); + return node; + + } } private boolean shouldInclude(LexicalUnitImpl current, @@ -111,4 +145,14 @@ public class ListRemoveNode extends Node implements ListModifyNode, } } + + @Override + public String getModifyingList() { + String firstListEntry = list.get(0); + if (list.size() == 1 && firstListEntry.startsWith("$")) { + return firstListEntry.substring(1, firstListEntry.length()); + } + + return null; + } } diff --git a/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java b/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java index 6e8f689ed1..0cffbc3203 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java @@ -26,7 +26,6 @@ public class MixinDefNode extends Node implements IVariableNode { private String name; private ArrayList<VariableNode> arglist; - private String args; private String body; public MixinDefNode(String name, Collection<VariableNode> args) { @@ -38,16 +37,10 @@ public class MixinDefNode extends Node implements IVariableNode { } } - public MixinDefNode(String name, String args, String body) { - this.name = name; - this.args = args; - this.body = body; - } - @Override public String toString() { - return "Mixin Definition Node: {name: " + name + ", args: " + args - + ", body: " + body + "}"; + return "Mixin Definition Node: {name: " + name + ", args: " + + arglist.size() + ", body: " + body + "}"; } public String getName() { diff --git a/theme-compiler/src/com/vaadin/sass/tree/RuleNode.java b/theme-compiler/src/com/vaadin/sass/tree/RuleNode.java index ee8d8145f1..aad4509616 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/RuleNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/RuleNode.java @@ -17,10 +17,11 @@ package com.vaadin.sass.tree; import java.util.ArrayList; +import java.util.regex.Pattern; import com.vaadin.sass.parser.LexicalUnitImpl; -public class RuleNode extends Node implements IVariableNode { +public class RuleNode extends Node implements IVariableNode, InterpolationNode { private static final long serialVersionUID = 6653493127869037022L; String variable; @@ -83,10 +84,11 @@ public class RuleNode extends Node implements IVariableNode { public void replaceVariables(ArrayList<VariableNode> variables) { for (final VariableNode node : variables) { if (value.getLexicalUnitType() == LexicalUnitImpl.SAC_FUNCTION) { - if (value.getParameters().toString().contains(node.getName())) { + if (value.getParameters().toString() + .contains("$" + node.getName())) { if (value.getParameters() != null) { if (value.getParameters().toString() - .contains("$" + node.getName())) { + .contains(node.getName())) { LexicalUnitImpl param = value.getParameters(); while (param != null) { @@ -125,4 +127,34 @@ public class RuleNode extends Node implements IVariableNode { } } } + + @Override + public void replaceInterpolation(String variableName, String variable) { + if (this.variable.contains(variableName)) { + this.variable = this.variable.replaceAll(variableName, variable); + } + + if (value.toString().contains(variableName)) { + + LexicalUnitImpl current = value; + while (current != null) { + if (current.getValue().toString().contains(variableName)) { + current.setStringValue(current + .getValue() + .toString() + .replaceAll( + Pattern.quote("#{" + variableName + "}"), + variable)); + } + + current = value.getNextLexicalUnit(); + } + } + } + + @Override + public boolean containsInterpolationVariable(String variable) { + return value.toString().contains(variable) + || this.variable.contains(variable); + } } diff --git a/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java b/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java index 6f97fd6f2c..8c360c4a56 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/VariableNode.java @@ -35,7 +35,6 @@ public class VariableNode extends Node implements IVariableNode { this.name = name; this.expr = expr; this.guarded = guarded; - checkSeparators(); } public LexicalUnitImpl getExpr() { @@ -44,15 +43,10 @@ public class VariableNode extends Node implements IVariableNode { public void setExpr(LexicalUnitImpl expr) { this.expr = expr; - checkSeparators(); } - private void checkSeparators() { - if (expr != null) { - if (expr.toString().contains(",")) { - - } - } + public void setName(String name) { + this.name = name; } public String getName() { diff --git a/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java b/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java index e2da712b6a..be5e14a543 100644 --- a/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java +++ b/theme-compiler/src/com/vaadin/sass/visitor/EachVisitor.java @@ -1,54 +1,70 @@ package com.vaadin.sass.visitor; -import java.util.HashSet; -import java.util.regex.Pattern; +import java.util.HashMap; +import java.util.Map.Entry; import com.vaadin.sass.tree.BlockNode; import com.vaadin.sass.tree.Node; -import com.vaadin.sass.tree.SimpleNode; +import com.vaadin.sass.tree.RuleNode; import com.vaadin.sass.tree.controldirective.EachDefNode; +import com.vaadin.sass.util.DeepCopy; public class EachVisitor implements Visitor { - HashSet<EachDefNode> controlDefs = new HashSet<EachDefNode>(); + HashMap<EachDefNode, Node> controlDefs = new HashMap<EachDefNode, Node>(); private Node rootNode; @Override public void traverse(Node node) throws Exception { - rootNode = node; - for (Node child : node.getChildren()) { - if (child instanceof EachDefNode) { - controlDefs.add((EachDefNode) child); - } - } + this.rootNode = node; + + findDefNodes(null, node); replaceControlNodes(); } - private void replaceControlNodes() { - for (final EachDefNode defNode : controlDefs) { - replaceEachDefNode(defNode); + private void findDefNodes(Node parent, Node node) { + for (Node child : node.getChildren()) { + findDefNodes(node, child); + } + if (node instanceof EachDefNode) { + controlDefs.put((EachDefNode) node, parent); + } + } + private void replaceControlNodes() { + for (final Entry<EachDefNode, Node> entry : controlDefs.entrySet()) { + replaceEachDefNode(entry.getKey(), entry.getValue()); } } - private void replaceEachDefNode(EachDefNode defNode) { + private void replaceEachDefNode(EachDefNode defNode, Node parent) { + Node last = defNode; for (final Node child : defNode.getChildren()) { if (child instanceof BlockNode) { - Node lastNode = defNode; - for (final String variable : defNode.getVariables()) { + BlockNode iNode = (BlockNode) child; + String interpolation = "#{" + defNode.getVariableName() + "}"; + if (iNode.containsInterpolationVariable(interpolation)) { + for (final String variable : defNode.getVariables()) { + BlockNode copy = (BlockNode) DeepCopy.copy(child); + copy.replaceInterpolation(defNode.getVariableName(), + variable); - String output = child.toString(); - output = output.replaceAll( - Pattern.quote("#{" + defNode.getVariableName() - + "}"), variable); - SimpleNode simple = new SimpleNode(output); + for (final Node blockChild : copy.getChildren()) { + if (blockChild instanceof RuleNode) { + ((RuleNode) blockChild).replaceInterpolation( + defNode.getVariableName(), variable); + } + } - rootNode.appendChild(simple, lastNode); - lastNode = simple; + parent.appendChild(copy, last); + last = copy; + } } } + + last = child; } rootNode.removeChild(defNode); } diff --git a/theme-compiler/src/com/vaadin/sass/visitor/MixinVisitor.java b/theme-compiler/src/com/vaadin/sass/visitor/MixinVisitor.java index bf1fb65ae3..fecc717437 100644 --- a/theme-compiler/src/com/vaadin/sass/visitor/MixinVisitor.java +++ b/theme-compiler/src/com/vaadin/sass/visitor/MixinVisitor.java @@ -25,6 +25,7 @@ import com.vaadin.sass.tree.IVariableNode; import com.vaadin.sass.tree.MixinDefNode; import com.vaadin.sass.tree.MixinNode; import com.vaadin.sass.tree.Node; +import com.vaadin.sass.tree.VariableNode; import com.vaadin.sass.util.DeepCopy; public class MixinVisitor implements Visitor { @@ -78,12 +79,7 @@ public class MixinVisitor implements Visitor { MixinDefNode defClone = (MixinDefNode) DeepCopy.copy(mixinDef); - int i = 0; - for (final LexicalUnitImpl unit : mixinNode.getArglist()) { - defClone.getArglist().get(i) - .setExpr((LexicalUnitImpl) DeepCopy.copy(unit)); - i++; - } + replacePossibleArguments(mixinNode, defClone); Node previous = mixinNode; for (final Node child : defClone.getChildren()) { @@ -102,6 +98,48 @@ public class MixinVisitor implements Visitor { current.removeChild(mixinNode); } + /** + * We have to replace all the mixin parameters. This is done in two phases. + * First phase replaces all the named parameters while the second replaces + * in order of remaining unmodified parameters. + * + * @param mixinNode + * @param def + */ + private void replacePossibleArguments(MixinNode mixinNode, MixinDefNode def) { + + if (mixinNode.getArglist().size() > 0) { + ArrayList<VariableNode> remainingNodes = new ArrayList<VariableNode>( + def.getArglist()); + ArrayList<LexicalUnitImpl> remainingUnits = new ArrayList<LexicalUnitImpl>( + mixinNode.getArglist()); + + for (final LexicalUnitImpl unit : mixinNode.getArglist()) { + if (unit.getLexicalUnitType() == LexicalUnitImpl.SCSS_VARIABLE + && unit.getNextLexicalUnit() != null) { + for (final VariableNode node : def.getArglist()) { + if (node.getName().equals(unit.getValue().toString())) { + node.setExpr((LexicalUnitImpl) DeepCopy.copy(unit + .getNextLexicalUnit())); + remainingNodes.remove(node); + remainingUnits.remove(unit); + break; + } + } + } + } + + int i = 0; + for (final LexicalUnitImpl unit : remainingUnits) { + remainingNodes.get(i).setExpr( + (LexicalUnitImpl) DeepCopy.copy(unit)); + i++; + } + + } + + } + private void replaceChildVariables(MixinDefNode mixinDef, Node node) { for (final Node child : node.getChildren()) { replaceChildVariables(mixinDef, child); diff --git a/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java b/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java index d20914b32d..fc31ffa7b9 100644 --- a/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java +++ b/theme-compiler/src/com/vaadin/sass/visitor/VariableVisitor.java @@ -19,7 +19,6 @@ package com.vaadin.sass.visitor; import java.util.ArrayList; import java.util.HashMap; -import com.vaadin.sass.parser.ParseException; import com.vaadin.sass.tree.IVariableNode; import com.vaadin.sass.tree.ListModifyNode; import com.vaadin.sass.tree.Node; @@ -71,18 +70,14 @@ public class VariableVisitor implements Visitor { ListModifyNode modify = (ListModifyNode) node; - if (modify.isModifyingVariable()) { - String variable = modify.getVariable(); + String variable = modify.getNewVariable().substring(1, + modify.getNewVariable().length()); - if (!this.variables.containsKey(variable)) { - throw new ParseException("No variable with name $" - + variable + " found."); - } - - VariableNode modifiedList = modify - .getModifiedList(this.variables.get(variable)); - this.variables.put(variable, modifiedList); - } + VariableNode modifiedList = modify + .getModifiedList(this.variables.get(modify + .getModifyingList())); + modifiedList.setName(variable); + this.variables.put(variable, modifiedList); } else if (node instanceof IVariableNode) { ((IVariableNode) node) diff --git a/theme-compiler/tests/resources/basic/reindeer.css b/theme-compiler/tests/resources/basic/reindeer.css index 4f1cd47193..22ca405982 100644 --- a/theme-compiler/tests/resources/basic/reindeer.css +++ b/theme-compiler/tests/resources/basic/reindeer.css @@ -830,10 +830,6 @@ div.v-app-loading { width: 200px; } -.v-app-loginpage .v-button, .v-app-loginpage .v-button { - float: left; -} - .v-menubar { float: left; white-space: nowrap; @@ -2406,7 +2402,6 @@ div.v-window-header { .v-ie6 .v-window-modalitycurtain { position: absolute; - top: expression(document.documentElement.scrollTop + "px"); } .v-ie6 .v-window { @@ -2528,7 +2523,7 @@ div.v-window-header { background: #e4e4e4 repeat-x; background-image: url(common/img/vertical-sprites.png); -background-image: url(common/img/vertical-sprites-ie6.png); - background-position: left -0px; + background-position: left 0px; font-size: 11px; line-height: normal; border-top: 1px solid #bebebe; @@ -2572,7 +2567,7 @@ div.v-window-header { .v-button:focus { background-image: url(button/img/button-sprites.png); -background-image: url(button/img/button-sprites-ie6.png); - background-position: left -0px; + background-position: left 0px; outline: none; } @@ -2632,7 +2627,7 @@ div.v-window-header { .black .v-button:focus { background-image: url(button/img/black-button-sprites.png); -background-image: url(button/img/black-button-sprites-ie6.png); - background-position: left -0px; + background-position: left 0px; } .black .v-button:focus .v-button-wrap { @@ -3378,7 +3373,7 @@ td.v-datefield-calendarpanel-nextyear { .black .v-datefield-popupcalendar .v-datefield-button { background-image: url(common/img/black-vertical-sprites.png); -background-image: url(common/img/black-vertical-sprites-ie6.png); - background-position: left -0px; + background-position: left 0px; } .black .v-datefield-popupcalendar .v-datefield-button:active { @@ -4424,7 +4419,7 @@ td.v-datefield-calendarpanel-nextyear { width: 7px; background-repeat: repeat-y; background-image: url(common/img/horizontal-sprites.png); - background-position: -0px top; + background-position: 0px top; } .v-splitpanel-hsplitter div { diff --git a/theme-compiler/tests/resources/basic/selectors.css b/theme-compiler/tests/resources/basic/selectors.css index 50c5fb7cc5..40302ce6d3 100644 --- a/theme-compiler/tests/resources/basic/selectors.css +++ b/theme-compiler/tests/resources/basic/selectors.css @@ -100,4 +100,8 @@ p::abc { p:first { color: red; +} + +.foo a[class^=icon-] { + color: red; }
\ No newline at end of file diff --git a/theme-compiler/tests/resources/css/mixins.css b/theme-compiler/tests/resources/css/mixins.css index aefa20ac01..d0cf0b3d1d 100644 --- a/theme-compiler/tests/resources/css/mixins.css +++ b/theme-compiler/tests/resources/css/mixins.css @@ -22,6 +22,11 @@ .banner { border: 1px solid black; + font-color: red; +} + +.interpolation-test { + font-size: 14px; } .header { @@ -47,4 +52,12 @@ font-family: arial; font-size: 16px; -font-weight: bold;
\ No newline at end of file +font-weight: bold; + +.default .default-inner { + color: green; +} + +.custom .custom-inner { + color: green; +}
\ No newline at end of file diff --git a/theme-compiler/tests/resources/css/remove-directive.css b/theme-compiler/tests/resources/css/remove-directive.css index b7fd2c7e6c..1e6d41c128 100644 --- a/theme-compiler/tests/resources/css/remove-directive.css +++ b/theme-compiler/tests/resources/css/remove-directive.css @@ -28,4 +28,12 @@ .exotic-animals .llama-icon { background-image: url('/images/llama.png'); +} + +.ball { + font-size: 12px; +} + +.cube { + font-size: 12px; }
\ No newline at end of file diff --git a/theme-compiler/tests/resources/scss/mixins.scss b/theme-compiler/tests/resources/scss/mixins.scss index 1f9cdf03de..e1fa80f357 100644 --- a/theme-compiler/tests/resources/scss/mixins.scss +++ b/theme-compiler/tests/resources/scss/mixins.scss @@ -55,11 +55,34 @@ $mixinVar : 1px; } .banner { - @include fontType(1px solid black); + @include fontType(1px solid black, $color : red); } -@mixin fontType($border){ +@mixin fontType($border : 2px solid red, $color : black){ border : $border; + font-color: $color; } -@include layout;
\ No newline at end of file +@include interpolation(interpolation); + +@mixin interpolation($interpolation){ + .#{$interpolation}-test { + font-size: 14px; + } +} + +@include layout; + +@mixin parent($color : green, $name : default) { + .#{$name}-inner { + color: $color; + } +} + +.default { + @include parent; +} + +.custom { + @include parent($name : custom); +}
\ No newline at end of file diff --git a/theme-compiler/tests/resources/scss/remove-directive.scss b/theme-compiler/tests/resources/scss/remove-directive.scss index cbfca9dcda..ca9a19522f 100644 --- a/theme-compiler/tests/resources/scss/remove-directive.scss +++ b/theme-compiler/tests/resources/scss/remove-directive.scss @@ -7,10 +7,18 @@ $remove : duck; } } -remove($animals, $remove, space); +$exotic : remove($animals, $remove, space); -@each $animal in $animals{ +@each $animal in $exotic{ .exotic-animals .#{$animal}-icon { background-image: url('/images/#{$animal}.png'); } } + +$things : remove((ball,cube,duck), duck); + +@each $thing in $things{ + .#{$thing}{ + font-size: 12px; + } +}
\ No newline at end of file diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Mixins.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Mixins.java index ac3ad20e15..cce67f89c8 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Mixins.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Mixins.java @@ -19,8 +19,7 @@ package com.vaadin.sass.testcases.scss; import java.io.IOException; import java.net.URISyntaxException; -import junit.framework.Assert; - +import org.junit.Assert; import org.junit.Test; import org.w3c.css.sac.CSSException; import org.w3c.css.sac.LexicalUnit; @@ -64,7 +63,7 @@ public class Mixins extends AbstractTestBase { Assert.assertEquals(LexicalUnit.SAC_PIXEL, mixinDefNode1.getArglist() .get(1).getExpr().getLexicalUnitType()); Assert.assertEquals(3f, mixinDefNode1.getArglist().get(1).getExpr() - .getFloatValue()); + .getFloatValue(), 0f); Assert.assertEquals(4, mixinDefNode1.getChildren().size()); diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index 0c2a1f965a..37f74471d2 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -162,8 +162,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { throw new ServiceException( new InstantiationException( "Failed to load application class: " - + getApplicationRunnerApplicationClassName(VaadinServletRequest - .cast(request)))); + + getApplicationRunnerApplicationClassName((VaadinServletRequest) request))); } } diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java index 5e406a5c98..c99e384f81 100644 --- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java @@ -10,8 +10,8 @@ public class RefreshStatePreserve extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { - addComponent(new Label("window.name: " - + request.getBrowserDetails().getWindowName())); + // Internal parameter sent by vaadinBootstrap.js, + addComponent(new Label("window.name: " + request.getParameter("wn"))); addComponent(new Label("UI id: " + getUIId())); } diff --git a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java index e1fae91a3c..1064f2e766 100644 --- a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java +++ b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java @@ -1,6 +1,7 @@ package com.vaadin.tests.components.ui; import com.vaadin.server.ExternalResource; +import com.vaadin.server.Page; import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.UICreateEvent; import com.vaadin.server.UIProviderEvent; @@ -76,7 +77,7 @@ public class LazyInitUIs extends AbstractTestUIProvider { info += "<br />pathInfo: " + request.getRequestPathInfo(); info += "<br />parameters: " + request.getParameterMap().keySet(); info += "<br />uri fragment: " - + request.getBrowserDetails().getLocation().getFragment(); + + Page.getCurrent().getLocation().getFragment(); return new Label(info, ContentMode.HTML); } diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java index ad3a30d4ca..737de10894 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java @@ -67,7 +67,7 @@ class DefaultRoot extends UI { class TouchRoot extends UI { @Override protected void init(VaadinRequest request) { - WebBrowser webBrowser = request.getBrowserDetails().getWebBrowser(); + WebBrowser webBrowser = getSession().getBrowser(); String screenSize = "" + webBrowser.getScreenWidth() + "x" + webBrowser.getScreenHeight(); getContent().addComponent( diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java index db8b261628..6d9890a21c 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java @@ -36,7 +36,7 @@ public class UsingUriFragments extends UI { @Override protected void init(VaadinRequest request) { Label label = new Label("Hello, your fragment is " - + request.getBrowserDetails().getLocation().getFragment()); + + getPage().getLocation().getFragment()); getContent().addComponent(label); // React to fragment changes @@ -48,7 +48,7 @@ public class UsingUriFragments extends UI { }); // Handle the fragment received in the initial request - handleFragment(request.getBrowserDetails().getLocation().getFragment()); + handleFragment(getPage().getLocation().getFragment()); addComponent(new Button("Show and set fragment", new Button.ClickListener() { |