コード例 #1
0
  protected CSSValue resolveValue(
      final DocumentContext process, final LayoutElement currentNode, final StyleKey key) {
    final LayoutStyle layoutContext = currentNode.getLayoutStyle();
    final CSSValue value = layoutContext.getValue(key);
    if (value instanceof CSSConstant == false) {
      final CSSValue fallback = getFallback();
      if (fallback != null) {
        return fallback;
      }
      return null;
    }

    final CSSConstant constant = (CSSConstant) value;
    final CSSValue resolvedValue = lookupValue(constant);
    if (resolvedValue != null) {
      //      layoutContext.setValue(key, resolvedValue);
      return resolvedValue;
    }

    final CSSValue fallback = getFallback();
    if (fallback != null) {
      //      layoutContext.setValue(key, fallback);
      return fallback;
    }

    return null;
  }
 protected CSSValue resolveValue(
     final DocumentContext process, final LayoutElement currentNode, final StyleKey key) {
   final CSSValue value = currentNode.getLayoutStyle().getValue(key);
   if (value instanceof CSSConstant) {
     return super.resolveValue(process, currentNode, key);
   }
   return value;
 }
コード例 #3
0
  public void resolve(
      final DocumentContext process, final LayoutElement currentNode, final StyleKey key) {

    final CSSValue value = resolveValue(process, currentNode, key);
    if (value != null) {
      currentNode.getLayoutStyle().setValue(key, value);
    }
  }