// layoutContext.getTagName() + ":" +
// layoutContext.getPseudoElement());
// Stage 0: Initialize with the built-in defaults
// Stage 1a: Add the parent styles (but only the one marked as inheritable).
final LayoutElement parent = element.getParent();
final LayoutStyle initialStyle = getInitialStyle();
if (layoutContext.copyFrom(initialStyle) == false)
{
// ok, manual copy ..
DebugLog.log("Failed to use fast-copy");
for (int i = 0; i < keys.length; i++)
{
final StyleKey key = keys[i];
layoutContext.setValue(key, initialStyle.getValue(key));
}
}
final LayoutStyle parentStyle;
if (parent != null)
{
parentStyle = parent.getLayoutContext();
final StyleKey[] inheritedKeys = getInheritedKeys();
for (int i = 0; i < inheritedKeys.length; i++)
{
final StyleKey key = inheritedKeys[i];
layoutContext.setValue(key, parentStyle.getValue(key));