Delegate calls to decorated frame object
502094
function reset()
    {
        $this->_frame->reset();

        $this->_counters = array();

        $this->_cached_parent = null; //clear get_parent() cache

        // Reset all children
        foreach ($this->get_children() as $child) {
            $child->reset();
        }
    }
1111197
private void writeToDelegate(byte[] data) {

        if (m_delegateStream != null) {
            try {
                m_delegateStream.write(data);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
162565
@Override
    public void onFrameAvailable(SurfaceTexture surfaceTexture) {
        // Pass SurfaceTexture to Encoding thread via Handler
        // Then Encode and display frame
        mHandler.sendMessage(mHandler.obtainMessage(MSG_FRAME_AVAILABLE, surfaceTexture));
    }
692939
private void visitFrameAfterOnMethodEntry() {
        if (!visitFramesAfterCallbacks)
            return;

        // The frame that is required after the trace guard must be
        // fully specified as 'this' is no longer an 'uninitialized this'
        if (isConstructor()) {
            List<Object> stackLocals = new ArrayList<Object>(argTypes.length + 1);
            stackLocals.add(classAdapter.getClassType().getInternalName());
            for (Type type : argTypes) {
                switch (type.getSort()) {
                    case Type.ARRAY:
                    case Type.OBJECT:
                        stackLocals.add(type.getInternalName());
                        break;
                    case Type.BOOLEAN:
                    case Type.CHAR:
                    case Type.BYTE:
                    case Type.SHORT:
                    case Type.INT:
                        stackLocals.add(INTEGER);
                        break;
                    case Type.LONG:
                        stackLocals.add(LONG);
                        break;
                    case Type.FLOAT:
                        stackLocals.add(FLOAT);
                        break;
                    case Type.DOUBLE:
                        stackLocals.add(DOUBLE);
                        break;
                }
            }
            visitFrame(F_FULL, stackLocals.size(), stackLocals.toArray(), 0, new Object[] {});
            visitInsn(NOP);
        } else {
            visitFrame(F_SAME, 0, null, 0, null);
            visitInsn(NOP);
        }
    }
434775
private void putFrame() {
    final int nLocal = currentFrame[1];
    final int nStack = currentFrame[2];
    if (symbolTable.getMajorVersion() < Opcodes.V1_6) {
      // Generate a StackMap attribute entry, which are always uncompressed.
      stackMapTableEntries.putShort(currentFrame[0]).putShort(nLocal);
      putAbstractTypes(3, 3 + nLocal);
      stackMapTableEntries.putShort(nStack);
      putAbstractTypes(3 + nLocal, 3 + nLocal + nStack);
      return;
    }
    final int offsetDelta =
        stackMapTableNumberOfEntries == 0
            ? currentFrame[0]
            : currentFrame[0] - previousFrame[0] - 1;
    final int previousNlocal = previousFrame[1];
    final int nLocalDelta = nLocal - previousNlocal;
    int type = Frame.FULL_FRAME;
    if (nStack == 0) {
      switch (nLocalDelta) {
        case -3:
        case -2:
        case -1:
          type = Frame.CHOP_FRAME;
          break;
        case 0:
          type = offsetDelta < 64 ? Frame.SAME_FRAME : Frame.SAME_FRAME_EXTENDED;
          break;
        case 1:
        case 2:
        case 3:
          type = Frame.APPEND_FRAME;
          break;
        default:
          // Keep the FULL_FRAME type.
          break;
      }
    } else if (nLocalDelta == 0 && nStack == 1) {
      type =
          offsetDelta < 63
              ? Frame.SAME_LOCALS_1_STACK_ITEM_FRAME
              : Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED;
    }
    if (type != Frame.FULL_FRAME) {
      // Verify if locals are the same as in the previous frame.
      int frameIndex = 3;
      for (int i = 0; i < previousNlocal && i < nLocal; i++) {
        if (currentFrame[frameIndex] != previousFrame[frameIndex]) {
          type = Frame.FULL_FRAME;
          break;
        }
        frameIndex++;
      }
    }
    switch (type) {
      case Frame.SAME_FRAME:
        stackMapTableEntries.putByte(offsetDelta);
        break;
      case Frame.SAME_LOCALS_1_STACK_ITEM_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_LOCALS_1_STACK_ITEM_FRAME + offsetDelta);
        putAbstractTypes(3 + nLocal, 4 + nLocal);
        break;
      case Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED:
        stackMapTableEntries
            .putByte(Frame.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
            .putShort(offsetDelta);
        putAbstractTypes(3 + nLocal, 4 + nLocal);
        break;
      case Frame.SAME_FRAME_EXTENDED:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED).putShort(offsetDelta);
        break;
      case Frame.CHOP_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED + nLocalDelta).putShort(offsetDelta);
        break;
      case Frame.APPEND_FRAME:
        stackMapTableEntries.putByte(Frame.SAME_FRAME_EXTENDED + nLocalDelta).putShort(offsetDelta);
        putAbstractTypes(3 + previousNlocal, 3 + nLocal);
        break;
      case Frame.FULL_FRAME:
      default:
        stackMapTableEntries.putByte(Frame.FULL_FRAME).putShort(offsetDelta).putShort(nLocal);
        putAbstractTypes(3, 3 + nLocal);
        stackMapTableEntries.putShort(nStack);
        putAbstractTypes(3 + nLocal, 3 + nLocal + nStack);
    }
  }
758110
function _onFrameNavigated(event, res) {
        // res = {frame}
        if (!res.frame.parentId) {
            exports.url = _cleanURL(res.frame.url);
        }
    }
449344
private void init(int ignoreFrames, boolean partial)
    {
        // Extract stack components, after we look for the Frame constructor
 	    // itself and pull that off the stack!
        int check=_stack.length;
        if (check>3) check=3;
        for (int i=0;i<check;i++)
        {
            if (__className.equals(_stack[i].getClassName()) &&
                "<init>".equalsIgnoreCase(_stack[i].getMethodName()))
            {
                _top=i+1;
                break;
            }
        }
        _top+=ignoreFrames;
        _where=_stack[_top].toString();
        if (!partial) complete();
    }
681259
function _runInActiveDataframes (viewportExpressions, renderLayer) {
    const dataframes = renderLayer.getActiveDataframes();
    const inViewportFeaturesIDs = _runInDataframes(viewportExpressions, renderLayer, dataframes);

    _runImprovedForPartialFeatures(viewportExpressions, renderLayer, inViewportFeaturesIDs);
}
893795
function delegate(callback, el) {
        var currentElement = el;

        do {
            if (!isClickTarget(currentElement)) continue;
            callback(currentElement);
            return;
        } while(currentElement.nodeName.toUpperCase() !== 'BODY' && (currentElement = currentElement.parentNode));
    }
759021
static function decorate_frame(Frame $frame, DOMPDF $dompdf) {
    if ( is_null($dompdf) )
      throw new Exception("foo");
      
    $style = $frame->get_style();
    
    switch ($style->display) {
      
    case "block":
      $positioner = "Block";        
      $decorator = "Block";
      $reflower = "Block";
      break;
    
    case "inline-block":
      $positioner = "Inline";
      $decorator = "Block";
      $reflower = "Block";
      break;

    case "inline":
      $positioner = "Inline";
      if ( $frame->is_text_node() ) {
        $decorator = "Text";
        $reflower = "Text";
      } 
      else {
        if ( DOMPDF_ENABLE_CSS_FLOAT && $style->float !== "none" ) {
          $decorator = "Block";
          $reflower = "Block";
        }
        else {
          $decorator = "Inline";
          $reflower = "Inline";
        }
      }
      break;   

    case "table":
      $positioner = "Block";
      $decorator = "Table";
      $reflower = "Table";
      break;
      
    case "inline-table":
      $positioner = "Inline";
      $decorator = "Table";
      $reflower = "Table";
      break;

    case "table-row-group":
    case "table-header-group":
    case "table-footer-group":
      $positioner = "Null";
      $decorator = "Table_Row_Group";
      $reflower = "Table_Row_Group";
      break;
      
    case "table-row":
      $positioner = "Null";
      $decorator = "Table_Row";
      $reflower = "Table_Row";
      break;

    case "table-cell":
      $positioner = "Table_Cell";
      $decorator = "Table_Cell";
      $reflower = "Table_Cell";
      break;
        
    case "list-item":
      $positioner = "Block";
      $decorator  = "Block";
      $reflower   = "Block";
      break;

    case "-dompdf-list-bullet":
      if ( $style->list_style_position === "inside" )
        $positioner = "Inline";
      else        
        $positioner = "List_Bullet";

      if ( $style->list_style_image !== "none" )
        $decorator = "List_Bullet_Image";
      else
        $decorator = "List_Bullet";
      
      $reflower = "List_Bullet";
      break;

    case "-dompdf-image":
      $positioner = "Inline";
      $decorator = "Image";
      $reflower = "Image";
      break;
      
    case "-dompdf-br":
      $positioner = "Inline";
      $decorator = "Inline";
      $reflower = "Inline";
      break;

    default:
      // FIXME: should throw some sort of warning or something?
    case "none":
      $positioner = "Null";
      $decorator = "Null";
      $reflower = "Null";
      break;
    }

    // Handle CSS position
    $position = $style->position;
    
    if ( $position === "absolute" )
      $positioner = "Absolute";

    else if ( $position === "fixed" )
      $positioner = "Fixed";
      
    // Handle nodeName
    $node_name = $frame->get_node()->nodeName;
    
    if ( $node_name === "img" ) {
      $style->display = "-dompdf-image";
      $decorator = "Image";
      $reflower = "Image";
    }
  
    $positioner .= "_Positioner";
    $decorator .= "_Frame_Decorator";
    $reflower .= "_Frame_Reflower";

    $deco = new $decorator($frame, $dompdf);
    $deco->set_positioner( new $positioner($deco) );
    $reflow = new $reflower($deco);
    
    $deco->set_reflower( $reflow );
    
    return $deco;
  }
36630
function (options) {
        this._map = null;
        this._canvas = null;
        this._frame = null;
        this._delegate = null;
        L.setOptions(this, options);
    }
1259965
private void followDecoratedComponent(JLayeredPane layeredPane) {
        Point relativeLocationToOwner = anchorLink.getRelativeSlaveLocation(decoratedComponent.getWidth(),
                decoratedComponent.getHeight(), getWidth(), getHeight());

        updateDecorationPainterUnclippedBounds(layeredPane, relativeLocationToOwner);
        updateDecorationPainterClippedBounds(layeredPane, relativeLocationToOwner);

        // Repaint decoration
        if (layeredPane != null) {
            decorationPainter.revalidate();
            decorationPainter.repaint();
        }
    }
600244
function Delegate(root) {

  /**
   * Maintain a map of listener
   * lists, keyed by event name.
   *
   * @type Object
   */
  this.listenerMap = [{}, {}];
  if (root) {
    this.root(root);
  }

  /** @type function() */
  this.handle = Delegate.prototype.handle.bind(this);
}
940495
function frame(frameTime) {
		// Steal the current execution queue, and switch it with
		// a new one so that calls from handlers will be queued.
		var handlers = nextBatch; nextBatch = {};
		// Calculate time since last frame.
		var elapsed = frameTime - lastFrameTime;
		// We are taking care of this frame, so allow another
		// frame to be requested from inside the handlers.
		pendingFrame = false;
		// Replay each call with its own context and arguments.
		for (var k in handlers) {
			handlers[k](elapsed);
		}
		// Keep track of updated frame time.
		lastFrameTime = frameTime;
	}
1098631
def _delegate(from_owner, to_owner, method):
  
  dgate = lambda self, *args, **kwargs: getattr(getattr(self, to_owner), method)(*args, **kwargs)
  dgate.__name__ = method
  dgate.__doc__ = "Delegates to {0}.{1}: {2}".format(to_owner, method, method.__doc__)
  setattr(from_owner, method, dgate)
803843
function decorateInjector(tData) {
            var oldinvoke = $injector.invoke;
            var oldinstantiate = $injector.instantiate;
            $injector.invoke = function (fn, self, locals) {
              return oldinvoke(fn, self, angular.extend({$transition$: tData}, locals));
            };
            $injector.instantiate = function (fn, locals) {
              return oldinstantiate(fn, angular.extend({$transition$: tData}, locals));
            };

            return function restoreItems() {
              $injector.invoke = oldinvoke;
              $injector.instantiate = oldinstantiate;
            };
          }
797545
function (node, parent, scope, file) {
      var hasRenderMethod = node.body.body.filter(isRenderMethod).length > 0;
      if (!hasRenderMethod) {
        return;
      }

      var makeHot = file.addImport(makeHotPath, makeHotName);
      var React   = file.addImport(reactPath,   reactName);
      var mount   = file.addImport(mountPath,   mountName);

      node.decorators = node.decorators || [];
      node.decorators.push(
        t.decorator(
          t.callExpression(
            makeHot,
            [
              React,
              mount,
              t.literal(file.opts._address || file.opts.filename),
              t.literal(node.id.name)
            ]
          )
        )
      );
    }