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.
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.
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.
Leif Åstrand [Tue, 17 Jun 2014 08:30:34 +0000 (11:30 +0300)]
Speed up dev server startup
- Don't have Atmosphere scan the entire classpath for annotations
- Don't use load-on-startup = -1 since Jetty still inits the servlets
- Avoid initing the integration test servlet for serving /VAADIN/*
Leif Åstrand [Fri, 13 Jun 2014 06:44:54 +0000 (09:44 +0300)]
Use more exact paths for ivysettings.xml and build.properties (#13616)
Defining the paths to be relative to the workspace is needed for
compatibility with older versions of IvyDE / Eclipse. All other
dependencies are already defined in this way, it's only this new gwt
dependency that isn't consistent with the others.
Teemu Pöntelin [Tue, 3 Jun 2014 18:00:48 +0000 (21:00 +0300)]
Fix for handling selectors with both width and height ranges (#13587)
This fix splits the used regular expressions into a more manageable
parts while fixing the handling of a case where both width-range and
height-range are defined. Also refactored some duplicate code into
a helper function.
Henri Sara [Mon, 24 Mar 2014 14:32:20 +0000 (16:32 +0200)]
Fix tooltip test problems caused by #12458
Tooltips are no longer removed but moved outside the viewport,
which broke several tests.
Rewrite related tests using TB4 to be stable across all
browsers. There are differences between browsers (e.g.
position -999 or -1000, gwt-uid-* varied between browsers
etc.) so TB2 tests kept failing on some or all browsers.
Some tests have been renamed to better indicate what they
do.
Fabian Lange [Thu, 22 May 2014 22:36:56 +0000 (00:36 +0200)]
Allow inlining of JsonCodec#encode (#13814)
JsonCodec#encode() is a frequently called (hot) method. However in its
current form it is too long to be inlined.
This review reduces the length of the method from 454 bytes instructions
to 311 and optimises flow of common calls.
It however has a behaviour change for esoteric edge cases where the
order would matter. Like a custom collection which extends JSONArray and
implements collection. Previously it would have been handled by the
collection case, now its the JSONArray case. However it can be assumed
that the result: serialized to valid JSON is the same.
Tomi Virtanen [Fri, 16 May 2014 08:25:01 +0000 (11:25 +0300)]
Fix for 'Aborting layout after 100 passess' (#13359)
'Aborting layout after 100 passes.' is caused by LayoutManager falling
into a loop on rounding fractional layout slot sizes up and down while
trying to fit layout's content in the space available. LayoutManager
round always up, that causes this issue with IE9+ and Chrome. This
change helps LayoutManager to round fractional sizes down for browsers
that causes problems if rounded up.
Browsers may fall into the loop especially with a zoom level other than
100%. Not with any zoom level though. Problematic zoom level varies by
browser. OrderedLayoutExpandTest uses zoom levels other than 100%. Test
for Chrome is the only one that really is able to reproduce error
without the fix. IE9/10 would too, but the zoom level could not be set
exactly to the required 95% for IE. Test works best as a regression test
for other browsers.
The UI.pushConnection field is transient no longer; instead PushConnection
implementations must take care of serialization internally. When a session
is serialized, the client should notice that push was disconnected and
try to reconnect. A deserialized PushConnection should be in a "disconnected"
state so the eventual client reconnection works correctly.
cleanConnectorMap is a hot method.
This change improves multiple code paths:
1) The global resource handler is no longer get()ed from the session for
each connector (was in two loops).
2) The ConnectorTracker is no longer get()ed from the UI for each
connector (was in one loop).
3) values() iterator for ClientConnectors replaces
keySet() iterator + get(key) call
4) use getUI() from ClientConnector instead manual method.
5) moved removeUnregisteredConnectors to ease inlining and readability.
getAllChildrenIterable() is invoked frequently, its used by
attach/detach and markAsDirty.
Because of the implementation detail in CombinedIterator, on every call
all iterators are checked. This means that on every component which has
multiple childs, each next() call will first check the extension
iterator, before advancing in the child iterator.
By having the childs first, this overhead is reduced. If no extensions
are existing (which is quite common) the iterator is not added at all.
(creating an iterator on an empty UnmodifiableCollection is waste of
time and memory)
Leif Åstrand [Fri, 16 May 2014 08:31:14 +0000 (11:31 +0300)]
Replace use of deprecated DOM.setStyleAttribute method (#13781)
This change is only a brain dead replacement of one specific method. In
some cases, there were some oddities in the surrounding code as well,
but these were left unresolved on purpose.
It should also be noted that DOM.setStyleAttribute just delegates to
element.getStyle().setProperty(), so any null references would have
caused problems already in the existing code.
Manolo Carrasco [Wed, 14 May 2014 10:55:47 +0000 (12:55 +0200)]
Make Hearbeat available to other modules (#13250)
- When a mobile app goes online/offline we need to change
Heartbeat interval and restart the schedule.
- We also need to be notified about response status in
order to show the appropriate offline UI, etc.
Related with Issue #13250 and review https://dev.vaadin.com/review/#/c/3376/