Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341884 - [Theming] Refactor ThemeStore.js to resolve values lazily
Summary: [Theming] Refactor ThemeStore.js to resolve values lazily
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 338647
  Show dependency tree
 
Reported: 2011-04-05 06:29 EDT by Tim Buschtoens CLA
Modified: 2011-04-05 10:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2011-04-05 06:29:41 EDT
The ThemeStore parses all Fonts, Gradients and Borders in defineValues. Depending on the client-system, this can take a few hundred milliseconds, so we should do it lazily instead. This will also be a good opportunity to make some other adjustments, specifically to move as much code as possible from ThemeValues to ThemeStore, and to optimize resolving rounded borders. 

I would also like to rename some internals, as "getCssValue" returns the final value in some cases (e.g. boolean), and keys in others (e.g. Borders). However, this would require some discussion, so i will skip it for now.
Comment 1 Tim Buschtoens CLA 2011-04-05 10:36:14 EDT
Fixed in CVS HEAD.

The responsibility of ThemeValues now clearly is only to hold the states object and ThemeStore reference, nothing more. Everything else is done in ThemeStore, including resolving the Borders/Gradients/Fonts lazily. 

The RoundedBorders created by ThemeStore are currently (as before) not reused like the other borders. I opend a new bug for this issue: Bug 341924.