
On Wed, 2007-01-24 at 17:42 -0400, bulia byak wrote:
You cannot make [sp_style_merge_from_dying_parent] much simpler than it is, because there is in fact a lot of variants of doing merging depending on whether a property is inherited, whether it accumulates (as opacity), whether it allows relative specification, whether it's numeric, etc. etc.
I disagree; it's not as bad as it could be, but with refactoring of the surrounding code it could be written significantly more concisely.
Most of the variants can be accounted for by composition of simpler rules, and most of the information about which rules apply (inherited? numeric?) should be shared rather than hard-coded into the bodies of the various functions which must consider them (of which sp_style_merge_from_dying_parent is only one).
So, per above, I propose that we stop talking about "replacing style.cpp" and remove that phrase from the roadmap. "Refactoring/streamlining style.cpp" sounds much closer to what we really need and, unlike "replacing", will not have the chilling effect on developers who might want to hack on that file.
That makes sense.
-mental