mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
@@ -110,7 +110,7 @@ typedef uint32_t lxb_css_selector_specificity_t;
|
||||
((sp) & ~((((uint32_t) 1 << 9) - 1) << (n)))
|
||||
|
||||
#define LXB_CSS_SELECTOR_SPECIFICITY_MASK \
|
||||
((((uint32_t) 1 << 31) - 1) << (9))
|
||||
((((uint32_t) 1 << (32 - 9)) - 1) << (9))
|
||||
|
||||
#define lxb_css_selector_sp_i(sp) ((sp) >> 28)
|
||||
|
||||
|
||||
@@ -651,12 +651,10 @@ lxb_dom_element_qualified_name(lxb_dom_element_t *element, size_t *len)
|
||||
const lxb_tag_data_t *data;
|
||||
|
||||
if (element->qualified_name != 0) {
|
||||
data = lxb_tag_data_by_id(element->node.owner_document->tags,
|
||||
element->qualified_name);
|
||||
data = lxb_tag_data_by_id(element->qualified_name);
|
||||
}
|
||||
else {
|
||||
data = lxb_tag_data_by_id(element->node.owner_document->tags,
|
||||
element->node.local_name);
|
||||
data = lxb_tag_data_by_id(element->node.local_name);
|
||||
}
|
||||
|
||||
if (len != NULL) {
|
||||
@@ -723,8 +721,7 @@ lxb_dom_element_local_name(lxb_dom_element_t *element, size_t *len)
|
||||
{
|
||||
const lxb_tag_data_t *data;
|
||||
|
||||
data = lxb_tag_data_by_id(element->node.owner_document->tags,
|
||||
element->node.local_name);
|
||||
data = lxb_tag_data_by_id(element->node.local_name);
|
||||
if (data == NULL) {
|
||||
if (len != NULL) {
|
||||
*len = 0;
|
||||
|
||||
@@ -184,7 +184,7 @@ lxb_dom_node_interface_copy(lxb_dom_node_t *dst,
|
||||
dst->local_name = src->local_name;
|
||||
}
|
||||
else {
|
||||
tag = lxb_tag_data_by_id(from->tags, src->local_name);
|
||||
tag = lxb_tag_data_by_id(src->local_name);
|
||||
if (tag == NULL) {
|
||||
return LXB_STATUS_ERROR_NOT_EXISTS;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ lxb_html_parse_fragment_chunk_begin(lxb_html_parser_t *parser,
|
||||
}
|
||||
|
||||
lxb_html_tokenizer_set_state_by_tag(parser->tkz, doc->scripting, tag_id, ns);
|
||||
lxb_html_tokenizer_tmp_tag_id_set(parser->tkz, LXB_TAG__UNDEF);
|
||||
lxb_html_tokenizer_tmp_tag_id_set(parser->tkz, LXB_TAG__UNDEF);
|
||||
|
||||
parser->root = lxb_html_interface_create(new_doc, LXB_TAG_HTML, LXB_NS_HTML);
|
||||
if (parser->root == NULL) {
|
||||
|
||||
@@ -60,7 +60,7 @@ lxb_tag_append_lower(lexbor_hash_t *hash, const lxb_char_t *name, size_t length)
|
||||
}
|
||||
|
||||
const lxb_tag_data_t *
|
||||
lxb_tag_data_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id)
|
||||
lxb_tag_data_by_id(lxb_tag_id_t tag_id)
|
||||
{
|
||||
if (tag_id >= LXB_TAG__LAST_ENTRY) {
|
||||
if (tag_id == LXB_TAG__LAST_ENTRY) {
|
||||
@@ -121,16 +121,15 @@ lxb_tag_data_by_name_upper(lexbor_hash_t *hash,
|
||||
* No inline functions for ABI.
|
||||
*/
|
||||
const lxb_char_t *
|
||||
lxb_tag_name_by_id_noi(lexbor_hash_t *hash, lxb_tag_id_t tag_id, size_t *len)
|
||||
lxb_tag_name_by_id_noi(lxb_tag_id_t tag_id, size_t *len)
|
||||
{
|
||||
return lxb_tag_name_by_id(hash, tag_id, len);
|
||||
return lxb_tag_name_by_id(tag_id, len);
|
||||
}
|
||||
|
||||
const lxb_char_t *
|
||||
lxb_tag_name_upper_by_id_noi(lexbor_hash_t *hash,
|
||||
lxb_tag_id_t tag_id, size_t *len)
|
||||
lxb_tag_name_upper_by_id_noi(lxb_tag_id_t tag_id, size_t *len)
|
||||
{
|
||||
return lxb_tag_name_upper_by_id(hash, tag_id, len);
|
||||
return lxb_tag_name_upper_by_id(tag_id, len);
|
||||
}
|
||||
|
||||
lxb_tag_id_t
|
||||
|
||||
@@ -29,7 +29,7 @@ lxb_tag_data_t;
|
||||
|
||||
|
||||
LXB_API const lxb_tag_data_t *
|
||||
lxb_tag_data_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id);
|
||||
lxb_tag_data_by_id(lxb_tag_id_t tag_id);
|
||||
|
||||
LXB_API const lxb_tag_data_t *
|
||||
lxb_tag_data_by_name(lexbor_hash_t *hash, const lxb_char_t *name, size_t len);
|
||||
@@ -42,9 +42,9 @@ lxb_tag_data_by_name_upper(lexbor_hash_t *hash,
|
||||
* Inline functions
|
||||
*/
|
||||
lxb_inline const lxb_char_t *
|
||||
lxb_tag_name_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id, size_t *len)
|
||||
lxb_tag_name_by_id(lxb_tag_id_t tag_id, size_t *len)
|
||||
{
|
||||
const lxb_tag_data_t *data = lxb_tag_data_by_id(hash, tag_id);
|
||||
const lxb_tag_data_t *data = lxb_tag_data_by_id(tag_id);
|
||||
if (data == NULL) {
|
||||
if (len != NULL) {
|
||||
*len = 0;
|
||||
@@ -61,9 +61,9 @@ lxb_tag_name_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id, size_t *len)
|
||||
}
|
||||
|
||||
lxb_inline const lxb_char_t *
|
||||
lxb_tag_name_upper_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id, size_t *len)
|
||||
lxb_tag_name_upper_by_id(lxb_tag_id_t tag_id, size_t *len)
|
||||
{
|
||||
const lxb_tag_data_t *data = lxb_tag_data_by_id(hash, tag_id);
|
||||
const lxb_tag_data_t *data = lxb_tag_data_by_id(tag_id);
|
||||
if (data == NULL) {
|
||||
if (len != NULL) {
|
||||
*len = 0;
|
||||
@@ -101,12 +101,10 @@ lxb_tag_mraw(lexbor_hash_t *hash)
|
||||
* No inline functions for ABI.
|
||||
*/
|
||||
LXB_API const lxb_char_t *
|
||||
lxb_tag_name_by_id_noi(lexbor_hash_t *hash, lxb_tag_id_t tag_id,
|
||||
size_t *len);
|
||||
lxb_tag_name_by_id_noi(lxb_tag_id_t tag_id, size_t *len);
|
||||
|
||||
LXB_API const lxb_char_t *
|
||||
lxb_tag_name_upper_by_id_noi(lexbor_hash_t *hash,
|
||||
lxb_tag_id_t tag_id, size_t *len);
|
||||
lxb_tag_name_upper_by_id_noi(lxb_tag_id_t tag_id, size_t *len);
|
||||
|
||||
LXB_API lxb_tag_id_t
|
||||
lxb_tag_id_by_name_noi(lexbor_hash_t *hash,
|
||||
|
||||
Reference in New Issue
Block a user