/**
 * Copyright (c) 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */
package com.facebook.csslayout;

import java.util.Arrays;

/**
 * Where the output of {@link LayoutEngine#layoutNode(CSSNode, float)} will go in the CSSNode.
 */
public class CSSLayout {
  static final int POSITION_LEFT = 0;
  static final int POSITION_TOP = 1;
  static final int POSITION_RIGHT = 2;
  static final int POSITION_BOTTOM = 3;

  static final int DIMENSION_WIDTH = 0;
  static final int DIMENSION_HEIGHT = 1;

  float[] position = new float[4];
  float[] dimensions = new float[2];
  CSSDirection direction = CSSDirection.LTR;

  /**
   * This should always get called before calling {@link LayoutEngine#layoutNode(CSSNode, float)}
   */
  public void resetResult() {
    Arrays.fill(position, 0);
    Arrays.fill(dimensions, CSSConstants.UNDEFINED);
    direction = CSSDirection.LTR;
  }

  public void copy(CSSLayout layout) {
    position[POSITION_LEFT] = layout.position[POSITION_LEFT];
    position[POSITION_TOP] = layout.position[POSITION_TOP];
    position[POSITION_RIGHT] = layout.position[POSITION_RIGHT];
    position[POSITION_BOTTOM] = layout.position[POSITION_BOTTOM];
    dimensions[DIMENSION_WIDTH] = layout.dimensions[DIMENSION_WIDTH];
    dimensions[DIMENSION_HEIGHT] = layout.dimensions[DIMENSION_HEIGHT];
    direction = layout.direction;
  }

  @Override
  public String toString() {
    return "layout: {" +
        "left: " + position[POSITION_LEFT] + ", " +
        "top: " + position[POSITION_TOP] + ", " +
        "width: " + dimensions[DIMENSION_WIDTH] + ", " +
        "height: " + dimensions[DIMENSION_HEIGHT] + ", " +
        "direction: " + direction +
        "}";
  }
}

@@ -483,16 +483,23 @@
 out %7B%0A  
+public 
 static f
@@ -520,32 +520,39 @@
 ION_LEFT = 0;%0A  
+public 
 static final int
@@ -568,24 +568,31 @@
 _TOP = 1;%0A  
+public 
 static final
@@ -614,24 +614,31 @@
 IGHT = 2;%0A  
+public 
 static final
@@ -666,16 +666,23 @@
 = 3;%0A%0A  
+public 
 static f
@@ -713,16 +713,23 @@
  = 0;%0A  
+public 
 static f
@@ -762,16 +762,23 @@
 = 1;%0A%0A  
+public 
 float%5B%5D 
@@ -804,16 +804,23 @@
 t%5B4%5D;%0A  
+public 
 float%5B%5D 
@@ -848,16 +848,23 @@
 t%5B2%5D;%0A  
+public 
 CSSDirec

Make CSSLayout constants public