Cleanup JavaScript Colors util

Moving utility methods from the Colors object into a surrounding
function scope helps to save almost 400 bytes in the compressed JS.
Probably this is because the compressor treats the names of
underscore-prefixed methods as API and does not minify them.

Remove CSS2 system colors (such as "buttonface"). These names are not
used in our code and marked as deprecated by the CSS spec anyway. Also
remove non-standard color keywords.

Change-Id: I7fc04d27364ac732f819469e48cd5d61b1a0d695
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Cleanup JavaScript Strings util

Remove unused methods, add test

Change-Id: I7e11c72a956f27cd3e3c751ab690d9c9c795509a
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Extend DropDown(-Item) and (C)Combo-List(-Item) themeing

Add:
- DropDown, (C)Combo-List -> border-radius
- DropDown-Item, (C)Combo-List-Item -> color, background-color,
background-image (gradient), text-decoration, text-shadow and padding
- DropDown-Item, (C)Combo-List-Item states -> selected, hover

Update business/fancy themes.

Change-Id: I84caf0f832886063ba909c186c8666135366c5a5
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>
Cleanup JavaScript Arrays util

Turn into a plain object, cleanup, add test

Change-Id: I445dc679a64cc1251301ad876ec03c49ade20fc2
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Cleanup JavaScript Objects util

Turn rwt.util.Objects into a plain object. Remove unused methods: hasMinLength, getLength, getKeysAsString, carefullyMergeWith, merge,
invert, getKeyFromValue, select.

- merge: only one occurrence that can be replaced with mergeWith
- select: using this method wastes compressed size by introducing
  needless strings (replacing 6 occurences saves > 300 bytes)
- getKeys: use propertyIsEnumerable() to detect IE bug - cannot use
  Variants at this point in a plain object

Change-Id: Ib7048287bcf41b313bb026083fb1045169ce035d
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Add common top-level files to Git repository

Move the module specification from the parent pom.xml in
releng/org.eclipse.rap.build to a new pom.xml in the root directory of
the Git repository.

Add a CONTRIBUTING.md that describes the basics of contributing to an
Eclipse project, and add a README.md with a more detailed description on
how the projects are layed out in the Git repository, how to build the
project, the license, and how to interact with the project.

Bug 424687: Add common top-level files to git repositories
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424687

Change-Id: I303aa9b5fd8a3fe98fe207e36c44e5876d35f1c4
Signed-off-by: Markus Knauer <mknauer@eclipsesource.com>
Update the Software User Agreement by using the central CBI one

All Eclipse projects need to update their included SUA to the new
version that has been released 2014.

Update the copyright dates to include 2014; adjust repository version
strings in features; remove outdated generate.plugin sections from
build.properties.

Bug 431255 - Need to update the SUA (Software User Agreement)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=431255

Change-Id: I0f91acdeb5beae5a763db5929ad7995ad359c6e5
Signed-off-by: Markus Knauer <mknauer@eclipsesource.com>
Eliminate qx bootstrapper

rwt.runtime.Bootstrap was used to create an rwt.qx.Class dummy in order
to define qx classes before the real qx.Class is loaded. Now that all
dependecies of qx.Class are plain objects, the bootstrapper is not
needed anymore.

Turn rwt.qx.Class into a plain object.

Create a file rwt.js that defines the object rwt and the namespace
function.

Move rwt utils to the top.

Change-Id: I943307d332c97abf86e13a11cfc49bc0049f59b6
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Remove Validation.js

Move rwt.util.Validation.isValidNumber to rwt.util.Number.isNumber.
rwt.util.Validation.isValidString is not used and doesn't appear to be
very useful (checks for non-empty string).

Change-Id: I162a6830980879d90d24d357020626be2a6b4e4d
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Eliminate PhaseListenerRegistry

We had two very similar storage classes for PhaseListeners, named
PhaseListenerManager and PhaseListenerRegistry. PhaseListeners added in
an ApplicationConfiguration were kept in the PhaseListenerRegistry and
later copied into PhaseListenerManager in LifeCycleFactoy.activate().

- Remove the lifecycle field from PhaseListenerManager. The lifecycle
  is only used as event source and can be passed in the notify methods.
- Move PhaseListenerManager into the ApplicationContext to replace
  PhaseListenerRegistry.
- Pull up LifeCycle methods addPhaseListener and removePhaseListener to
  abstract base class LifeCycle.

Change-Id: I88f7d3f231781ed982d4ad8100d90ead721c41c2
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Remove lazy message reading from ProtocolUtil

The message should be read from the request at a well defined point.
So far, this has been done lazily by the first call of
ProtocolUtil.getClientMessage().

Move reading code from ProtocolUtil to LifeCycleServiceHandler, where
it belongs. After reading, the message is stored in the service store
using ProtocolUtil.setClientMessage().

Change ProtocolUtil.isClientMessageProcessed() to return true only if getClientMessage() has been called, regardless of setClientMessage().

Remove unused method ProtocolUtil.wasCallReceived().

Change-Id: Ie8301e7482daf1e9c5529663cafe6630e1757d77
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Translate "undefined" textColor to "inherit" in List.appearance.js

When color property is defined in CSS as "inherit", PropertyResolver
translate it as "transparent" and render it as "undefined" string. (see
ThemePropertyAdapterRegistry#ColorPropertyAdapter).
On the client, the "undefined" color property isn't recognized and need
translation again - for backgroundColor to "transparent", for textColor
to "inherit".

Remove unneeded background-color CSS List-Item definitions from default
theme.

394083: [List] Programmatically set foreground is lost on mouse out
https://bugs.eclipse.org/bugs/show_bug.cgi?id=394083

Change-Id: I77d7cb73dbcc491301216e4d62d06e13a17e2f4a
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>
Merge List and BasicList JavaScript code

BasicList is no longer used in Combo. There is no other reason to keep
the List implementation spit in two files.

Change-Id: I3c01d48162c09f38119e5beb99469326a6413850
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>
Translate "undefined" textColor to "inherit" in ToolBar.appearance.js

When color property is defined in CSS as "inherit", PropertyResolver
translate it as "transparent" and render it as "undefined" string. (see
bug 324833).

302459: [Toolbar] Textcolor inheritance does not work
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302459

Change-Id: I12d7ec51be8cbb5a2a22c82423f7643ab5c23533
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>
Don't reset user color when control is disabled

In order to render the disabled control foreground color (from
themeing), the user color (set by code) had to be reset to null as user
color always have priority over themeing color.

Rework client-side text color rendering to avoid this limitation.
Extract common text color rendering code in Terminator.js.
Eliminate rwt.widgets.base.HtmlEmbed.
Remove internal _link subwidget from Link.js and make Link to extend
rwt.widgets.base.Terminator.

Cleanup and format related JavaScript classes.

426596: [iOS]: Disabled buttons have wrong foreground color
https://bugs.eclipse.org/bugs/show_bug.cgi?id=426596

Change-Id: I1046c165dad09a153c814171bdb3af98597d3756
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>
Replace dubios catch clause

Dangerous and needless catch Throwable clause, probably a leftover.

Change-Id: I8eb07082466e05d8018addf1cbe74faa9161a05b
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Add @noimplement annotation to Connection interface

Change-Id: I5eb9389210c44c0361ee66234ba84ce2f0292244
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Render JsonValue.NULL as browser function result in case of exception

This regression has been introduced with change 21451.
The result from a browser function that throws an exception is null. We
should render JsonValue.NULL in this case.

433688: [BrowserFunction] Uncaught exceptions cause server error on the
client
https://bugs.eclipse.org/bugs/show_bug.cgi?id=433688

Change-Id: I211f05a209dfaf31780dd9b8ec31dfadd9a60cc1
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>
Extract RWTMessageHandler from LifeCycleServiceHandler

The ServiceHandler only handles the request and delegates messages
from valid requests to the MessageHandler, wihch processes the message,
i.e. it executes the RWT lifecycle.

With this change, both service handler and message handler can be
tested independently without setting up EntryPoints etc. It's also a
preparation for supporting custom MessageHandlers.

Remove LCSH_Test.testRequestCounterAfterSessionRestart, which is
obsoleted by the introduction of cids.

Change-Id: Ief841794d91bd7921a79f1663ae4c33ca97a5187
Signed-off-by: Ralf Sternberg <rsternberg@eclipsesource.com>
Fix two failing JavaScript tests in IE8

- reset _renderHtmlIds at the end of the test in ComboTest.js
- reset cached _textColor before recreate password input field in
Text.js

There are still some broken tests in GridTest:
- testSendSelectionEventForClickableRowTemplateCell
- testSendSelectionEventForNonClickableRowTemplateCell
- testSendSelectionEventForClickableRowTemplateCell_withoutName
which fail on flush with "Invalid argument."

Change-Id: I68a22bc17b9d588cffe2c7ba5b579dbcc303fdca
Signed-off-by: Ivan Furnadjiev <ivan@eclipsesource.com>