Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3584 sourcerer 1
/*
2
 * This file is part of LibCSS
3
 * Licensed under the MIT License,
4
 *		  http://www.opensource.org/licenses/mit-license.php
5
 * Copyright 2009 John-Mark Bell 
6
 */
7
 
8
#include "bytecode/bytecode.h"
9
#include "bytecode/opcodes.h"
10
#include "select/propset.h"
11
#include "select/propget.h"
12
#include "utils/utils.h"
13
 
14
#include "select/properties/properties.h"
15
#include "select/properties/helpers.h"
16
 
17
css_error css__cascade_page_break_inside(uint32_t opv, css_style *style,
18
		css_select_state *state)
19
{
20
	return css__cascade_page_break_after_before_inside(opv, style, state,
21
			set_page_break_inside);
22
}
23
 
24
css_error css__set_page_break_inside_from_hint(const css_hint *hint,
25
		css_computed_style *style)
26
{
27
	return set_page_break_inside(style, hint->status);
28
}
29
 
30
css_error css__initial_page_break_inside(css_select_state *state)
31
{
32
	return set_page_break_inside(state->computed,
33
			CSS_PAGE_BREAK_INSIDE_AUTO);
34
}
35
 
36
css_error css__compose_page_break_inside(const css_computed_style *parent,
37
		const css_computed_style *child,
38
		css_computed_style *result)
39
{
40
	uint8_t type = get_page_break_inside(child);
41
 
42
	if (type == CSS_PAGE_BREAK_INSIDE_INHERIT) {
43
		type = get_page_break_inside(parent);
44
	}
45
 
46
	return set_page_break_inside(result, type);
47
}
48