htmlunit-2.7

ute("onblur");
  }
  
  public final String getTargetAttribute()
  {
    return getAttribute("target");
  }
  
  boolean containsPoint(int x, int y)
  {
    String shape = StringUtils.defaultIfEmpty(getShapeAttribute(), "rect").toLowerCase();
    if (("default".equals(shape)) && (getCoordsAttribute() != null)) {
      return true;
    }
    if (("rect".equals(shape)) && (getCoordsAttribute() != null))
    {
      String[] coords = getCoordsAttribute().split(",");
      double leftX = Double.parseDouble(coords[0].trim());
      double topY = Double.parseDouble(coords[1].trim());
      double rightX = Double.parseDouble(coords[2].trim());
      double bottomY = Double.parseDouble(coords[3].trim());
      Rectangle2D rectangle = new Rectangle2D.Double(leftX, topY, rightX - leftX + 1.0D, bottomY - topY + 1.0D);
      if (rectangle.contains(x, y)) {
        return true;
      }
    }
    else if (("circle".equals(shape)) && (getCoordsAttribute() != null))
    {
      String[] coords = getCoordsAttribute().split(",");
      double centerX = Double.parseDouble(coords[0].trim());
      double centerY = Double.parseDouble(coords[1].trim());
      String radiusString = coords[2].trim();
      int radius;
      try
      {
        radius = Integer.parseInt(radiusString);
      }
      catch (NumberFormatException nfe)
      {
        throw new NumberFormatException("Circle radius of " + radiusString + " is not yet implemented.");
      }
      Ellipse2D ellipse = new Ellipse2D.Double(centerX - radius / 2, centerY - radius / 2, radius, radius);
      if (ellipse.contains(x, y)) {
        return true;
      }
    }
    else if (("poly".equals(shape)) && (getCoordsAttribute() != null))
    {
      String[] coords = getCoordsAttribute().split(",");
      GeneralPath path = new GeneralPath();
      for (int i = 0; i + 1 < coords.length; i += 2) {
        if (i == 0) {
          path.moveTo(Float.parseFloat(coords[i]), Float.parseFloat(coords[(i + 1)]));
        } else {
          path.lineTo(Float.parseFloat(coords[i]), Float.parseFloat(coords[(i + 1)]));
        }
      }
      path.closePath();
      if (path.contains(x, y)) {
        return true;
      }
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlArea
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlInlineFrame
  extends BaseFrame
{
  private static final long serialVersionUID = -5915482404176705506L;
  public static final String TAG_NAME = "iframe";
  
  HtmlInlineFrame(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  protected boolean isEmptyXmlTagExpanded()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlInlineFrame
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlMap
  extends HtmlElement
{
  private static final long serialVersionUID = 1685609494412043774L;
  public static final String TAG_NAME = "map";
  
  HtmlMap(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getNameAttribute()
  {
    return getAttribute("name");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlMap
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlCode
  extends HtmlElement
{
  private static final long serialVersionUID = 5225211590369172069L;
  public static final String TAG_NAME = "code";
  
  HtmlCode(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlCode
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlMarquee
  extends HtmlElement
{
  private static final long serialVersionUID = -8889956363167966069L;
  public static final String TAG_NAME = "marquee";
  
  HtmlMarquee(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlMarquee
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlUnderlined
  extends HtmlElement
{
  private static final long serialVersionUID = 4959353391566177951L;
  public static final String TAG_NAME = "u";
  
  HtmlUnderlined(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlUnderlined
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlDefinitionTerm
  extends HtmlElement
{
  private static final long serialVersionUID = -8270021459399871862L;
  public static final String TAG_NAME = "dt";
  
  HtmlDefinitionTerm(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlDefinitionTerm
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlDeletedText
  extends HtmlElement
{
  private static final long serialVersionUID = 6790105329776696420L;
  public static final String TAG_NAME = "del";
  
  HtmlDeletedText(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getCiteAttribute()
  {
    return getAttribute("cite");
  }
  
  public final String getDateTimeAttribute()
  {
    return getAttribute("datetime");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlDeletedText
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlHorizontalRule
  extends HtmlElement
{
  private static final long serialVersionUID = 8279554478346712943L;
  public static final String TAG_NAME = "hr";
  
  HtmlHorizontalRule(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getAlignAttribute()
  {
    return getAttribute("align");
  }
  
  public final String getNoShadeAttribute()
  {
    return getAttribute("noshade");
  }
  
  public final String getSizeAttribute()
  {
    return getAttribute("size");
  }
  
  public final String getWidthAttribute()
  {
    return getAttribute("width");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlHorizontalRule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

final class Util$1
  extends NodeIterator
{
  Util$1(DomNode x0)
  {
    super(x0);
  }
  
  protected DomNode getFirstNode(DomNode node)
  {
    return getNextNode(node);
  }
  
  protected DomNode getNextNode(DomNode node)
  {
    return node.getNextSibling();
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.Util.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

final class Util$2
  extends NodeIterator
{
  Util$2(DomNode x0)
  {
    super(x0);
  }
  
  protected DomNode getFirstNode(DomNode node)
  {
    return getNextNode(node);
  }
  
  protected DomNode getNextNode(DomNode node)
  {
    return node.getPreviousSibling();
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.Util.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

final class Util$3
  extends NodeIterator
{
  Util$3(DomNode x0)
  {
    super(x0);
  }
  
  protected DomNode getFirstNode(DomNode node)
  {
    if (node == null) {
      return null;
    }
    DomNode sibling = node.getNextSibling();
    if (sibling == null) {
      return getFirstNode(node.getParentNode());
    }
    return sibling;
  }
  
  protected DomNode getNextNode(DomNode node)
  {
    if (node == null) {
      return null;
    }
    DomNode n = node.getFirstChild();
    if (n == null) {
      n = node.getNextSibling();
    }
    if (n == null) {
      return getFirstNode(node.getParentNode());
    }
    return n;
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.Util.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

final class Util$4
  extends NodeIterator
{
  Util$4(DomNode x0)
  {
    super(x0);
  }
  
  protected DomNode getFirstNode(DomNode node)
  {
    if (node == null) {
      return null;
    }
    DomNode sibling = node.getPreviousSibling();
    if (sibling == null) {
      return getFirstNode(node.getParentNode());
    }
    return sibling;
  }
  
  protected DomNode getNextNode(DomNode node)
  {
    if (node == null) {
      return null;
    }
    DomNode n = node.getLastChild();
    if (n == null) {
      n = node.getPreviousSibling();
    }
    if (n == null) {
      return getFirstNode(node.getParentNode());
    }
    return n;
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.Util.4
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import java.util.Iterator;

public final class Util
{
  public static Iterator<DomNode> getFollowingSiblingAxisIterator(DomNode contextNode)
  {
    new NodeIterator(contextNode)
    {
      protected DomNode getFirstNode(DomNode node)
      {
        return getNextNode(node);
      }
      
      protected DomNode getNextNode(DomNode node)
      {
        return node.getNextSibling();
      }
    };
  }
  
  public static Iterator<DomNode> getPrecedingSiblingAxisIterator(DomNode contextNode)
  {
    new NodeIterator(contextNode)
    {
      protected DomNode getFirstNode(DomNode node)
      {
        return getNextNode(node);
      }
      
      protected DomNode getNextNode(DomNode node)
      {
        return node.getPreviousSibling();
      }
    };
  }
  
  public static Iterator<DomNode> getFollowingAxisIterator(DomNode contextNode)
  {
    new NodeIterator(contextNode)
    {
      protected DomNode getFirstNode(DomNode node)
      {
        if (node == null) {
          return null;
        }
        DomNode sibling = node.getNextSibling();
        if (sibling == null) {
          return getFirstNode(node.getParentNode());
        }
        return sibling;
      }
      
      protected DomNode getNextNode(DomNode node)
      {
        if (node == null) {
          return null;
        }
        DomNode n = node.getFirstChild();
        if (n == null) {
          n = node.getNextSibling();
        }
        if (n == null) {
          return getFirstNode(node.getParentNode());
        }
        return n;
      }
    };
  }
  
  public static Iterator<DomNode> getPrecedingAxisIterator(DomNode contextNode)
  {
    new NodeIterator(contextNode)
    {
      protected DomNode getFirstNode(DomNode node)
      {
        if (node == null) {
          return null;
        }
        DomNode sibling = node.getPreviousSibling();
        if (sibling == null) {
          return getFirstNode(node.getParentNode());
        }
        return sibling;
      }
      
      protected DomNode getNextNode(DomNode node)
      {
        if (node == null) {
          return null;
        }
        DomNode n = node.getLastChild();
        if (n == null) {
          n = node.getPreviousSibling();
        }
        if (n == null) {
          return getFirstNode(node.getParentNode());
        }
        return n;
      }
    };
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.Util
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlBaseFont
  extends HtmlElement
{
  private static final long serialVersionUID = 695717819506918636L;
  public static final String TAG_NAME = "basefont";
  
  HtmlBaseFont(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getIdAttribute()
  {
    return getAttribute("id");
  }
  
  public final String getSizeAttribute()
  {
    return getAttribute("size");
  }
  
  public final String getColorAttribute()
  {
    return getAttribute("color");
  }
  
  public final String getFaceAttribute()
  {
    return getAttribute("face");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlBaseFont
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlInlineQuotation
  extends HtmlElement
{
  private static final long serialVersionUID = -2903178909392285151L;
  public static final String TAG_NAME = "q";
  
  HtmlInlineQuotation(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getCiteAttribute()
  {
    return getAttribute("cite");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlInlineQuotation
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.io.IOException;
import java.util.Map;

public class HtmlResetInput
  extends HtmlInput
{
  private static final long serialVersionUID = 1055766612574450754L;
  
  HtmlResetInput(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  protected void doClickAction()
    throws IOException
  {
    HtmlForm form = getEnclosingForm();
    if (form != null) {
      form.reset();
    }
  }
  
  public void reset() {}
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlResetInput
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlBreak
  extends HtmlElement
{
  private static final long serialVersionUID = 5691487253016411482L;
  public static final String TAG_NAME = "br";
  
  HtmlBreak(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getClearAttribute()
  {
    return getAttribute("clear");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlBreak
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlSmall
  extends HtmlElement
{
  private static final long serialVersionUID = -5728741276806938867L;
  public static final String TAG_NAME = "small";
  
  HtmlSmall(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlSmall
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlFrameSet
  extends HtmlElement
{
  private static final long serialVersionUID = 4559070965860885794L;
  public static final String TAG_NAME = "frameset";
  
  HtmlFrameSet(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
    
    getScriptObject();
  }
  
  public final String getRowsAttribute()
  {
    return getAttribute("rows");
  }
  
  public final String getColsAttribute()
  {
    return getAttribute("cols");
  }
  
  public final String getOnLoadAttribute()
  {
    return getAttribute("onload");
  }
  
  public final String getOnUnloadAttribute()
  {
    return getAttribute("onunload");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlFrameSet
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlCanvas
  extends HtmlElement
{
  private static final long serialVersionUID = 7109786069688698579L;
  public static final String TAG_NAME = "canvas";
  
  HtmlCanvas(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlCanvas
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlTableHeaderCell
  extends HtmlTableCell
{
  private static final long serialVersionUID = -8210579268968959585L;
  public static final String TAG_NAME = "th";
  
  HtmlTableHeaderCell(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getAbbrAttribute()
  {
    return getAttribute("abbr");
  }
  
  public final String getAxisAttribute()
  {
    return getAttribute("axis");
  }
  
  public final String getHeadersAttribute()
  {
    return getAttribute("headers");
  }
  
  public final String getScopeAttribute()
  {
    return getAttribute("scope");
  }
  
  public final String getRowSpanAttribute()
  {
    return getAttribute("rowspan");
  }
  
  public final String getColumnSpanAttribute()
  {
    return getAttribute("colspan");
  }
  
  public final String getAlignAttribute()
  {
    return getAttribute("align");
  }
  
  public final String getCharAttribute()
  {
    return getAttribute("char");
  }
  
  public final String getCharoffAttribute()
  {
    return getAttribute("charoff");
  }
  
  public final String getValignAttribute()
  {
    return getAttribute("valign");
  }
  
  public final String getNoWrapAttribute()
  {
    return getAttribute("nowrap");
  }
  
  public final String getBgcolorAttribute()
  {
    return getAttribute("bgcolor");
  }
  
  public final String getWidthAttribute()
  {
    return getAttribute("width");
  }
  
  public final String getHeightAttribute()
  {
    return getAttribute("height");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlTableHeaderCell
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlBackgroundSound
  extends HtmlElement
{
  private static final long serialVersionUID = -9017928879980808204L;
  public static final String TAG_NAME = "bgsound";
  
  HtmlBackgroundSound(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlBackgroundSound
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlDefinitionDescription
  extends HtmlElement
{
  private static final long serialVersionUID = 7626321540532274196L;
  public static final String TAG_NAME = "dd";
  
  HtmlDefinitionDescription(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlDefinitionDescription
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlWordBreak
  extends HtmlElement
{
  private static final long serialVersionUID = 2739312641527017852L;
  public static final String TAG_NAME = "wbr";
  
  HtmlWordBreak(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlWordBreak
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlStrike
  extends HtmlElement
{
  private static final long serialVersionUID = 3065283467995414494L;
  public static final String TAG_NAME = "strike";
  
  HtmlStrike(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlStrike
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlInsertedText
  extends HtmlElement
{
  private static final long serialVersionUID = -1385486713192118686L;
  public static final String TAG_NAME = "ins";
  
  HtmlInsertedText(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
  
  public final String getCiteAttribute()
  {
    return getAttribute("cite");
  }
  
  public final String getDateTimeAttribute()
  {
    return getAttribute("datetime");
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlInsertedText
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.html;

import com.gargoylesoftware.htmlunit.SgmlPage;
import java.util.Map;

public class HtmlEmbed
  extends HtmlElement
{
  private static final long serialVersionUID = -3145507421763037622L;
  public static final String TAG_NAME = "embed";
  
  HtmlEmbed(String namespaceURI, String qualifiedName, SgmlPage page, Map<String, DomAttr> attributes)
  {
    super(namespaceURI, qualifiedName, page, attributes);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.html.HtmlEmbed
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit;

import com.gargoylesoftware.htmlunit.html.DomAttr;
import com.gargoylesoftware.htmlunit.html.DomDocumentFragment;
import com.gargoylesoftware.htmlunit.html.DomDocumentType;
import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.DomNode;
import java.io.IOException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;

public abstract class SgmlPage
  extends DomNode
  implements Page, Document
{
  private static final long serialVersionUID = -8803248938782701094L;
  private DomDocumentType documentType_;
  private final WebResponse webResponse_;
  private WebWindow enclosingWindow_;
  private final WebClient webClient_;
  
  public SgmlPage(WebResponse webResponse, WebWindow webWindow)
  {
    super(null);
    webResponse_ = webResponse;
    enclosingWindow_ = webWindow;
    webClient_ = webWindow.getWebClient();
  }
  
  public void cleanUp()
    throws IOException
  {}
  
  public WebResponse getWebResponse()
  {
    return webResponse_;
  }
  
  public void initialize()
    throws IOException
  {}
  
  public String getNodeName()
  {
    return "#document";
  }
  
  public short getNodeType()
  {
    return 9;
  }
  
  public WebWindow getEnclosingWindow()
  {
    return enclosingWindow_;
  }
  
  public void setEnclosingWindow(WebWindow window)
  {
    enclosingWindow_ = window;
  }
  
  public WebClient getWebClient()
  {
    return webClient_;
  }
  
  public DomDocumentFragment createDomDocumentFragment()
  {
    return new DomDocumentFragment(this);
  }
  
  public final DocumentType getDoctype()
  {
    return documentType_;
  }
  
  protected void setDocumentType(DomDocumentType type)
  {
    documentType_ = type;
  }
  
  public SgmlPage getPage()
  {
    return this;
  }
  
  public abstract Element createElement(String paramString);
  
  public abstract Element createElementNS(String paramString1, String paramString2);
  
  public abstract String getPageEncoding();
  
  public DomElement getDocumentElement()
  {
    DomNode childNode = getFirstChild();
    while ((childNode != null) && (!(childNode instanceof DomElement))) {
      childNode = childNode.getNextSibling();
    }
    return (DomElement)childNode;
  }
  
  protected SgmlPage clone()
  {
    try
    {
      return (SgmlPage)super.clone();
    }
    catch (CloneNotSupportedException e)
    {
      throw new IllegalStateException("Clone not supported");
    }
  }
  
  public String asXml()
  {
    return getDocumentElement().asXml();
  }
  
  public abstract boolean hasCaseSensitiveTagNames();
  
  public void normalizeDocument()
  {
    getDocumentElement().normalize();
  }
  
  public String getCanonicalXPath()
  {
    return "/";
  }
  
  public DomAttr createAttribute(String name)
  {
    return new DomAttr(getPage(), null, name, "", false);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.SgmlPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit;

import java.io.IOException;
import java.io.Serializable;

public abstract interface Page
  extends Serializable
{
  public abstract void initialize()
    throws IOException;
  
  public abstract void cleanUp()
    throws IOException;
  
  public abstract WebResponse getWebResponse();
  
  public abstract WebWindow getEnclosingWindow();
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.Page
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.javascript;

import com.gargoylesoftware.htmlunit.TextUtil;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

public class JavaScriptURLConnection
  extends URLConnection
{
  public static final String JAVASCRIPT_PREFIX = "javascript:";
  private final String content_;
  
  public JavaScriptURLConnection(URL newUrl)
  {
    super(newUrl);
    content_ = newUrl.toExternalForm().substring("javascript:".length());
  }
  
  public void connect() {}
  
  public InputStream getInputStream()
  {
    return TextUtil.toInputStream(content_);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.javascript.JavaScriptURLConnection
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.javascript;

import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public class Handler
  extends URLStreamHandler
{
  protected URLConnection openConnection(URL url)
  {
    return new JavaScriptURLConnection(url);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.javascript.Handler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.data;

import java.io.UnsupportedEncodingException;
import java.net.URL;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.net.URLCodec;
import org.apache.commons.lang.StringUtils;

public class DataUrlDecoder
{
  private static final String DEFAULT_CHARSET = "US-ASCII";
  private static final String DEFAULT_MEDIA_TYPE = "text/plain";
  private final String mediaType_;
  private final String charset_;
  private byte[] content_;
  
  protected DataUrlDecoder(byte[] data, String mediaType, String charset)
  {
    content_ = data;
    mediaType_ = mediaType;
    charset_ = charset;
  }
  
  public static DataUrlDecoder decode(URL url)
    throws UnsupportedEncodingException, DecoderException
  {
    return decodeDataURL(url.toExternalForm());
  }
  
  public static DataUrlDecoder decodeDataURL(String url)
    throws UnsupportedEncodingException, DecoderException
  {
    if (!url.startsWith("data")) {
      throw new IllegalArgumentException("Not a data url: " + url);
    }
    int comma = url.indexOf(',');
    String beforeData = url.substring("data:".length(), comma);
    String mediaType = extractMediaType(beforeData);
    String charset = extractCharset(beforeData);
    
    boolean base64 = beforeData.endsWith(";base64");
    byte[] data = url.substring(comma + 1).getBytes(charset);
    if (base64) {
      data = Base64.decodeBase64(URLCodec.decodeUrl(data));
    } else {
      data = URLCodec.decodeUrl(data);
    }
    return new DataUrlDecoder(data, mediaType, charset);
  }
  
  private static String extractCharset(String beforeData)
  {
    return "US-ASCII";
  }
  
  private static String extractMediaType(String beforeData)
  {
    if (beforeData.contains("/"))
    {
      if (beforeData.contains(";")) {
        return StringUtils.substringBefore(beforeData, ";");
      }
      return beforeData;
    }
    return "text/plain";
  }
  
  public String getMediaType()
  {
    return mediaType_;
  }
  
  public String getCharset()
  {
    return charset_;
  }
  
  public byte[] getBytes()
  {
    return content_;
  }
  
  public String getDataAsString()
    throws UnsupportedEncodingException
  {
    return new String(content_, charset_);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.data.DataUrlDecoder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.data;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class DataURLConnection
  extends URLConnection
{
  private static final Log LOG = LogFactory.getLog(DataURLConnection.class);
  public static final String DATA_PREFIX = "data:";
  private final byte[] content_;
  
  public DataURLConnection(URL url)
  {
    super(url);
    
    byte[] data = null;
    try
    {
      data = DataUrlDecoder.decode(url).getBytes();
    }
    catch (UnsupportedEncodingException e)
    {
      LOG.error("Exception decoding " + url, e);
    }
    catch (DecoderException e)
    {
      LOG.error("Exception decoding " + url, e);
    }
    content_ = data;
  }
  
  public void connect() {}
  
  public InputStream getInputStream()
  {
    return new ByteArrayInputStream(content_);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.data.DataURLConnection
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.data;

import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public class Handler
  extends URLStreamHandler
{
  protected URLConnection openConnection(URL url)
  {
    return new DataURLConnection(url);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.data.Handler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.about;

import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public class Handler
  extends URLStreamHandler
{
  protected URLConnection openConnection(URL url)
  {
    return new AboutURLConnection(url);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.about.Handler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.protocol.about;

import java.net.URL;
import java.net.URLConnection;

public class AboutURLConnection
  extends URLConnection
{
  public AboutURLConnection(URL newUrl)
  {
    super(newUrl);
  }
  
  public void connect() {}
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.protocol.about.AboutURLConnection
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit;

public class ElementNotFoundException
  extends RuntimeException
{
  private static final long serialVersionUID = 22133747152805455L;
  private final String elementName_;
  private final String attributeName_;
  private final String attributeValue_;
  
  public ElementNotFoundException(String elementName, String attributeName, String attributeValue)
  {
    super("elementName=[" + elementName + "] attributeName=[" + attributeName + "] attributeValue=[" + attributeValue + "]");
    
    elementName_ = elementName;
    attributeName_ = attributeName;
    attributeValue_ = attributeValue;
  }
  
  public String getElementName()
  {
    return elementName_;
  }
  
  public String getAttributeName()
  {
    return attributeName_;
  }
  
  public String getAttributeValue()
  {
    return attributeValue_;
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.ElementNotFoundException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit;

import net.sourceforge.htmlunit.corejs.javascript.Undefined;

public final class ScriptResult
{
  private final Object javaScriptResult_;
  private final Page newPage_;
  
  public ScriptResult(Object javaScriptResult, Page newPage)
  {
    javaScriptResult_ = javaScriptResult;
    newPage_ = newPage;
  }
  
  public Object getJavaScriptResult()
  {
    return javaScriptResult_;
  }
  
  public Page getNewPage()
  {
    return newPage_;
  }
  
  public String toString()
  {
    return "ScriptResult[result=" + javaScriptResult_ + " page=" + newPage_ + "]";
  }
  
  public static boolean isFalse(ScriptResult scriptResult)
  {
    return (scriptResult != null) && (Boolean.FALSE.equals(scriptResult.getJavaScriptResult()));
  }
  
  public static boolean isUndefined(ScriptResult scriptResult)
  {
    return (scriptResult != null) && ((scriptResult.getJavaScriptResult() instanceof Undefined));
  }
  
  public static ScriptResult combine(ScriptResult newResult, ScriptResult originalResult, boolean ie)
  {
    Object jsResult;
    Object jsResult;
    if (ie)
    {
      Object jsResult;
      if ((newResult != null) && (!isUndefined(newResult)))
      {
        jsResult = newResult.getJavaScriptResult();
      }
      else
      {
        Object jsResult;
        if (originalResult != null) {
          jsResult = originalResult.getJavaScriptResult();
        } else {
          jsResult = null;
        }
      }
    }
    else
    {
      Object jsResult;
      if (isFalse(newResult))
      {
        jsResult = newResult.getJavaScriptResult();
      }
      else
      {
        Object jsResult;
        if (originalResult != null) {
          jsResult = originalResult.getJavaScriptResult();
        } else {
          jsResult = null;
        }
      }
    }
    Page page;
    Page page;
    if (newResult != null)
    {
      page = newResult.getNewPage();
    }
    else
    {
      Page page;
      if (originalResult != null) {
        page = originalResult.getNewPage();
      } else {
        page = null;
      }
    }
    if ((jsResult == null) && (page == null)) {
      return null;
    }
    return new ScriptResult(jsResult, page);
  }
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.ScriptResult
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit;

import com.gargoylesoftware.htmlunit.util.NameValuePair;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.net.URL;
import java.util.List;

public abstract interface WebResponse
  extends Serializable
{
  public abstract WebRequestSettings getRequestSettings();
  
  @Deprecated
  public abstract HttpMethod getRequestMethod();
  
  @Deprecated
  public abstract URL getRequestUrl();
  
  public abstract List<NameValuePair> getResponseHeaders();
  
  public abstract String getResponseHeaderValue(String paramString);
  
  public abstract int getStatusCode();
  
  public abstract String getStatusMessage();
  
  public abstract String getContentType();
  
  @Deprecated
  public abstract String getContentCharSet();
  
  public abstract String getContentCharsetOrNull();
  
  public abstract String getContentCharset();
  
  public abstract String getContentAsString();
  
  public abstract String getContentAsString(String paramString);
  
  public abstract InputStream getContentAsStream()
    throws IOException;
  
  public abstract byte[] getContentAsBytes();
  
  public abstract long getLoadTime();
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.WebResponse
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit;

import com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManager;
import java.io.Serializable;

public abstract interface WebWindow
  extends Serializable
{
  public abstract String getName();
  
  public abstract void setName(String paramString);
  
  public abstract Page getEnclosedPage();
  
  public abstract void setEnclosedPage(Page paramPage);
  
  public abstract WebWindow getParentWindow();
  
  public abstract WebWindow getTopWindow();
  
  public abstract WebClient getWebClient();
  
  public abstract History getHistory();
  
  public abstract void setScriptObject(Object paramObject);
  
  public abstract Object getScriptObject();
  
  public abstract JavaScriptJobManager getJobManager();
  
  public abstract boolean isClosed();
}

/* Location:
 * Qualified Name:     com.gargoylesoftware.htmlunit.WebWindow
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.gargoylesoftware.htmlunit.attachment;

import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.WebResponse;

public class Attachment
{
  private final Page page_;
  
  public Attachment(Page page)
  {
    page_ = page;
  }
  
  public Page getPage()
  {
    return 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd