Cleaner$CleaningVisitor.smali
.class final Lorg/jsoup/safety/Cleaner$CleaningVisitor;
.super Ljava/lang/Object;
# interfaces
.implements Lorg/jsoup/select/NodeVisitor;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/jsoup/safety/Cleaner;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x12
name = "CleaningVisitor"
.end annotation
# instance fields
.field private a:I
.field private final b:Lorg/jsoup/nodes/Element;
.field private c:Lorg/jsoup/nodes/Element;
.field final synthetic d:Lorg/jsoup/safety/Cleaner;
# direct methods
.method private constructor <init>(Lorg/jsoup/safety/Cleaner;Lorg/jsoup/nodes/Element;Lorg/jsoup/nodes/Element;)V
.registers 4
iput-object p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->d:Lorg/jsoup/safety/Cleaner;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 p1, 0x0
iput p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
iput-object p2, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->b:Lorg/jsoup/nodes/Element;
iput-object p3, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
return-void
.end method
.method synthetic constructor <init>(Lorg/jsoup/safety/Cleaner;Lorg/jsoup/nodes/Element;Lorg/jsoup/nodes/Element;Lorg/jsoup/safety/Cleaner$1;)V
.registers 5
invoke-direct {p0, p1, p2, p3}, Lorg/jsoup/safety/Cleaner$CleaningVisitor;-><init>(Lorg/jsoup/safety/Cleaner;Lorg/jsoup/nodes/Element;Lorg/jsoup/nodes/Element;)V
return-void
.end method
.method static synthetic a(Lorg/jsoup/safety/Cleaner$CleaningVisitor;)I
.registers 1
iget p0, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
return p0
.end method
# virtual methods
.method public head(Lorg/jsoup/nodes/Node;I)V
.registers 5
instance-of p2, p1, Lorg/jsoup/nodes/Element;
if-eqz p2, :cond_39
move-object p2, p1
check-cast p2, Lorg/jsoup/nodes/Element;
iget-object v0, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->d:Lorg/jsoup/safety/Cleaner;
invoke-static {v0}, Lorg/jsoup/safety/Cleaner;->a(Lorg/jsoup/safety/Cleaner;)Lorg/jsoup/safety/Whitelist;
move-result-object v0
invoke-virtual {p2}, Lorg/jsoup/nodes/Element;->normalName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lorg/jsoup/safety/Whitelist;->c(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_2e
iget-object p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->d:Lorg/jsoup/safety/Cleaner;
invoke-static {p1, p2}, Lorg/jsoup/safety/Cleaner;->b(Lorg/jsoup/safety/Cleaner;Lorg/jsoup/nodes/Element;)Lorg/jsoup/safety/Cleaner$ElementMeta;
move-result-object p1
iget-object p2, p1, Lorg/jsoup/safety/Cleaner$ElementMeta;->a:Lorg/jsoup/nodes/Element;
iget-object v0, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
invoke-virtual {v0, p2}, Lorg/jsoup/nodes/Element;->appendChild(Lorg/jsoup/nodes/Node;)Lorg/jsoup/nodes/Element;
iget v0, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
iget p1, p1, Lorg/jsoup/safety/Cleaner$ElementMeta;->b:I
add-int/2addr v0, p1
iput v0, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
iput-object p2, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
goto :goto_7d
:cond_2e
iget-object p2, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->b:Lorg/jsoup/nodes/Element;
if-eq p1, p2, :cond_7d
iget p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
goto :goto_7d
:cond_39
instance-of p2, p1, Lorg/jsoup/nodes/TextNode;
if-eqz p2, :cond_4e
check-cast p1, Lorg/jsoup/nodes/TextNode;
new-instance p2, Lorg/jsoup/nodes/TextNode;
invoke-virtual {p1}, Lorg/jsoup/nodes/TextNode;->getWholeText()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Lorg/jsoup/nodes/TextNode;-><init>(Ljava/lang/String;)V
iget-object p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
invoke-virtual {p1, p2}, Lorg/jsoup/nodes/Element;->appendChild(Lorg/jsoup/nodes/Node;)Lorg/jsoup/nodes/Element;
goto :goto_7d
:cond_4e
instance-of p2, p1, Lorg/jsoup/nodes/DataNode;
if-eqz p2, :cond_77
iget-object p2, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->d:Lorg/jsoup/safety/Cleaner;
invoke-static {p2}, Lorg/jsoup/safety/Cleaner;->a(Lorg/jsoup/safety/Cleaner;)Lorg/jsoup/safety/Whitelist;
move-result-object p2
invoke-virtual {p1}, Lorg/jsoup/nodes/Node;->parent()Lorg/jsoup/nodes/Node;
move-result-object v0
invoke-virtual {v0}, Lorg/jsoup/nodes/Node;->nodeName()Ljava/lang/String;
move-result-object v0
invoke-virtual {p2, v0}, Lorg/jsoup/safety/Whitelist;->c(Ljava/lang/String;)Z
move-result p2
if-eqz p2, :cond_77
check-cast p1, Lorg/jsoup/nodes/DataNode;
new-instance p2, Lorg/jsoup/nodes/DataNode;
invoke-virtual {p1}, Lorg/jsoup/nodes/DataNode;->getWholeData()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Lorg/jsoup/nodes/DataNode;-><init>(Ljava/lang/String;)V
iget-object p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
invoke-virtual {p1, p2}, Lorg/jsoup/nodes/Element;->appendChild(Lorg/jsoup/nodes/Node;)Lorg/jsoup/nodes/Element;
goto :goto_7d
:cond_77
iget p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->a:I
:cond_7d
:goto_7d
return-void
.end method
.method public tail(Lorg/jsoup/nodes/Node;I)V
.registers 3
instance-of p2, p1, Lorg/jsoup/nodes/Element;
if-eqz p2, :cond_1c
iget-object p2, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->d:Lorg/jsoup/safety/Cleaner;
invoke-static {p2}, Lorg/jsoup/safety/Cleaner;->a(Lorg/jsoup/safety/Cleaner;)Lorg/jsoup/safety/Whitelist;
move-result-object p2
invoke-virtual {p1}, Lorg/jsoup/nodes/Node;->nodeName()Ljava/lang/String;
move-result-object p1
invoke-virtual {p2, p1}, Lorg/jsoup/safety/Whitelist;->c(Ljava/lang/String;)Z
move-result p1
if-eqz p1, :cond_1c
iget-object p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
invoke-virtual {p1}, Lorg/jsoup/nodes/Element;->parent()Lorg/jsoup/nodes/Element;
move-result-object p1
iput-object p1, p0, Lorg/jsoup/safety/Cleaner$CleaningVisitor;->c:Lorg/jsoup/nodes/Element;
:cond_1c
return-void
.end method