Fabian Lange [Sat, 12 Jul 2014 19:44:09 +0000 (21:44 +0200)]
Optimizes initial sizes of frequently used Collections. (#14223)
There are a few places in frequently used core classes which could
initialize collection classes with the correct (or slightly oversized)
length.
Maps are initialized with 2x the size due to its load factor.
Fabian Lange [Sat, 12 Jul 2014 19:09:32 +0000 (21:09 +0200)]
Optimize CurrentInstance.set(UI) and .set(VaadinSession). (#14220)
This change reduces the amount of intermediate steps taken to initialize
the thread locals for a given ui or vaadin session.
It mainly takes advantage of reusing the old values from the map in set()
instead of creating new ones to put into the "old" map which is returned.
Fabian Lange [Fri, 11 Jul 2014 21:43:03 +0000 (23:43 +0200)]
removes extra VaadinSession.setCurrent() from PushHandler. (#14222)
The setCurrent call on VaadinSession is not needed. the one extra call
can be saved because service.findVaadinSession will already set it.
Added a comment like it is done for UI (service.findUI will also set the
UI).
Fabian Lange [Wed, 9 Jul 2014 14:23:43 +0000 (16:23 +0200)]
Fix overwrite mechanism for web.xml atmosphere init params (#14196).
Non obvious problem before. "config" is a property of AtmosphereFramework
which also has getInitParameter(String) method. So it compiles but does
not do what is intended: to check against the user defined web.xml
servlet init-prams.
(the variableName servletConfig has the same problem :-))
Box and unbox long values in state fields (#14176)
We actually want to pass around the primitive long values emulated by
GWT even though JavaScript code can't do anything with the values.
Skipping the unboxing caused long fields to always be 0 since that's how
JavaScript converts an object into a number.
This patch also makes the test assert that the expected state values are
received and updates those values to actually make sense in some
situations.
Return a value on __gwtStatsEvent in Profiler (#11709)
Calling GWT RPC throw an exception when __gwtStatsEvent doesn't return
a boolean. This was in the Profiler.ensureNoLogger where the function
assigned was empty.
Fabian Lange [Thu, 3 Jul 2014 21:52:05 +0000 (23:52 +0200)]
Avoid object creation in getAllChildrenIterable in most cases. (#14142)
API change from:
public static Iterable<ClientConnector> getAllChildrenIterable(final ClientConnector connector)
to
public static Iterable<? extends ClientConnector> getAllChildrenIterable(final ClientConnector connector)
avoids creating wrappers in case the component has either no subcomponents
or no extensions. This covers the vast majority of components.
Sauli Tähkäpää [Fri, 27 Jun 2014 06:39:04 +0000 (09:39 +0300)]
Change DateFieldReadOnlyTest to use a initial reference instead of reusing readonly reference.
Reusing the readonly reference causes weird test results when the first
comparison fails and the second one succeeds: the build will fail but errors
shots have been deleted because the second comparison succeeded.
Jouni Koivuviita [Thu, 26 Jun 2014 09:34:12 +0000 (12:34 +0300)]
box-shadow should have -webkit prefix (#14093)
Mass find-and-replace, tested to work as before in Chrome, and that the
output now includes box -webkit-box-shadow as well as box-shadow.
Bourbon needed to be imported before the css3 utils, so that the
box-shadow mixin can be overridden (Bourbon prints a warning as it has
already deprecated box-shadow prefixes).
License Checker for vaadin cval products (#13696 #13474)
- This patch includes four elements:
1.- A class able to validate a licensed product against Vaadin
license server. It can be used in any vaadin product (thought
for non addons like TB) just adding vaadin dependency, or
copying the class.
2.- A class able to inspect all addons in the classpath and figure
out, based on the MANIFEST.MF info, whether we have to check
developer license.
3.- A modification to Vaadin connector generator to use the classes
above and to stop compilation in case.
4.- A modification to ConnectorBundleLoader, so as when a new connector
is instatiated, we check whether it is using an evaluation
license and show a notice. We only show the notice once.
- In addition to validating developer licenses, the checker caches the
server response for using it when there are connection problems.
- This stuff is in Vaadin core, so as we dont maintain license code in
each addon. For checking an addon license we just add the license type
to the manifest when packaging the artefact.
- It checks expiration time, product name and major version.
Jouni Koivuviita [Wed, 25 Jun 2014 13:25:40 +0000 (16:25 +0300)]
Various fixes to Valo and ValoThemeTest
Improve textfied, datefield and combobox mixins so that they can be
used with null parameter values. This makes them output less styles and
allows combining multiple styles together (e.g. small + borderless).
Let valo-button-style mixin support padding as a list instead of just a
single number.
Change default calendar event colors to hex values (Vaadin Sass
compiler doesn’t support all color keywords just yet).
Error styles for date field and combo box
Small fix to table to support all border sizes (Java code has a
hard-coded 1px border width). Remove a few unnecessary selectors.
Make tab sheet tab alignment mixin more generic (now allows both right
and center alignment).
Fix framed tab sheet style border (bottom border caused left and right
borders to have a “cropped” angle at the bottom end).
Fix selection overlay item active style color (i.e. white would produce
a pink color). Now a completely desaturated color won’t be saturated.
Jouni Koivuviita [Tue, 24 Jun 2014 13:37:51 +0000 (16:37 +0300)]
Various fixes to Valo
Add a small API for checkbox, radio button and option group.
Fix border radius for ComboBox (no-text-input + small/large style).
Add better support for form layout section captions (now supports h2,
h3 and h4 labels instead of just h4).
Add “align-right” and “align-center” utility style names for label.
Fix black line artifacts in iOS for panel, window and tabsheet (visible
at certain zoom levels).
Refactor tab sheet styles to be more modular (so you can combine framed
with icons-on-top for instance).
Fix tab sheet loading indicator reserving unnecessary space in parent
layout.
Readonly style for richtextarea.
Fix slider handle focus border color.
Fix #14058: Valo causes Table headers to be overly long
- Table now reserves as little space as necessary
- TreeTable works slightly differently, causing it to reserve more
space in some situations
Rename table mixins to follow naming convention (mixins that do not
output top-level selectors should be suffixed with “-style”, others
not).
Fix TreeTable treespacer style so that it works correctly with row
captions/icons.
Jouni Koivuviita [Tue, 24 Jun 2014 12:25:59 +0000 (15:25 +0300)]
Added a new valo-menu style 'large-icons'
Valo-menu now support multiple levels of menus side-by-side, and the
new ‘large-icons’ style creates a different style which emphasizes the
icons more than the captions of the menu items.
Menu items can now have “notification badges” as well.
Markus Koivisto [Wed, 4 Jun 2014 09:49:43 +0000 (12:49 +0300)]
Fixed regression with changing widths when stylenames have changed (#13444, #8801):
Changing the name of a style should not cause the width of the textbox
to change. If there is a width set for the wrapper, the width for the
wrapper should not change if the styles changes.
To reconcile these two demands, we have removed the width for the
wrapper and only manipulate the width of the textbox itself. This
solves both issues neatly.
Fabian Lange [Mon, 23 Jun 2014 13:15:47 +0000 (15:15 +0200)]
Reading properties of components should not set state to dirty (#14060).
Added Automatic Testcase. The testcase needs a default constructor,
which has been added.
The test also found an edge case in Form.java which has been corrected,
as well as one missing getState(false) in AbstractMedia.
Fabian Lange [Fri, 20 Jun 2014 08:49:50 +0000 (10:49 +0200)]
Reading properties of components should not set state to dirty (#14060).
Many core vaadin components did incorrectly mark the state as dirty when
reading from them. This patch fixes the problem, which should reduce the
amount of server->client state updates significantly.
Teemu Pöntelin [Thu, 22 May 2014 18:22:09 +0000 (21:22 +0300)]
Fixed an NPE while changing a DateField from 24 to 12h clock (#13722)
A client-side NullPointerException was fixed by not reusing
the existing VTime panel and always recreating it instead.
Otherwise the ListBox for switching between AM/PM might have
been null.