summaryrefslogtreecommitdiff
path: root/source/html/layout.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-04 11:13:00 +0100
committerTor Andersson <tor.andersson@artifex.com>2014-12-03 12:25:51 +0100
commit24c8a6cca270c27a4940ed7398ec01664e488e6f (patch)
tree59189681143c42a3fbd4eb8d211400d316e255d2 /source/html/layout.c
parent7159498b095238ca8c8c87cc99d83c46fc5cd19b (diff)
downloadmupdf-24c8a6cca270c27a4940ed7398ec01664e488e6f.tar.xz
html: Rename ANONYMOUS to FLOW box and fix typo.
Diffstat (limited to 'source/html/layout.c')
-rw-r--r--source/html/layout.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/html/layout.c b/source/html/layout.c
index 6b2c7d44..8079213d 100644
--- a/source/html/layout.c
+++ b/source/html/layout.c
@@ -32,8 +32,8 @@ static const char *default_css =
enum
{
- BOX_BLOCK, /* block-level: contains other block and anonymous boxes */
- BOX_ANONYMOUS, /* block-level: contains only inline boxes */
+ BOX_BLOCK, /* block-level: contains block and flow boxes */
+ BOX_FLOW, /* block-level: contains only inline boxes */
BOX_INLINE, /* inline-level: contains only inline boxes */
};
@@ -95,7 +95,7 @@ static struct box *insert_block_box(fz_context *ctx, struct box *box, struct box
{
insert_box(ctx, box, BOX_BLOCK, top);
}
- else if (top->type == BOX_ANONYMOUS)
+ else if (top->type == BOX_FLOW)
{
while (top->type != BOX_BLOCK)
top = top->up;
@@ -114,22 +114,22 @@ static void insert_inline_box(fz_context *ctx, struct box *box, struct box *top)
{
if (top->type == BOX_BLOCK)
{
- if (top->last && top->last->type == BOX_ANONYMOUS)
+ if (top->last && top->last->type == BOX_FLOW)
{
insert_box(ctx, box, BOX_INLINE, top->last);
}
else
{
- struct box *anon = new_box(ctx, NULL, &top->style);
- insert_box(ctx, anon, BOX_ANONYMOUS, top);
- insert_box(ctx, box, BOX_INLINE, anon);
+ struct box *flow = new_box(ctx, NULL, &top->style);
+ insert_box(ctx, flow, BOX_FLOW, top);
+ insert_box(ctx, box, BOX_INLINE, flow);
}
}
- else if (box->type == BOX_ANONYMOUS)
+ else if (top->type == BOX_FLOW)
{
insert_box(ctx, box, BOX_INLINE, top);
}
- else if (box->type == BOX_INLINE)
+ else if (top->type == BOX_INLINE)
{
insert_box(ctx, box, BOX_INLINE, top);
}
@@ -214,7 +214,7 @@ static void layout_inline(fz_context *ctx, struct box *box, struct box *top)
}
}
-static void layout_anonymous(fz_context *ctx, struct box *box, struct box *top)
+static void layout_flow(fz_context *ctx, struct box *box, struct box *top)
{
struct computed_style style;
struct box *child;
@@ -251,8 +251,8 @@ static void layout_block(fz_context *ctx, struct box *box, struct box *top)
{
if (child->type == BOX_BLOCK)
layout_block(ctx, child, box);
- else if (child->type == BOX_ANONYMOUS)
- layout_anonymous(ctx, child, box);
+ else if (child->type == BOX_FLOW)
+ layout_flow(ctx, child, box);
box->h += child->h;
}
@@ -273,7 +273,7 @@ static void print_box(fz_context *ctx, struct box *box, int level)
switch (box->type)
{
case BOX_BLOCK: printf("block"); break;
- case BOX_ANONYMOUS: printf("anonymous"); break;
+ case BOX_FLOW: printf("flow"); break;
case BOX_INLINE: printf("inline"); break;
}
if (box->node)