Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
7dddac08
Commit
7dddac08
authored
Feb 04, 2017
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format
parent
588dd332
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/HtmlParser.cc
src/HtmlParser.cc
+4
-4
No files found.
src/HtmlParser.cc
View file @
7dddac08
...
...
@@ -55,9 +55,9 @@ StringRef get_attr(const xmlChar **attrs, const StringRef &name) {
}
}
// namespace
namespace
{
ResourceType
get_resource_type_for_preload_as
(
const
StringRef
&
attribute_value
)
{
ResourceType
get_resource_type_for_preload_as
(
const
StringRef
&
attribute_value
)
{
if
(
util
::
strieq_l
(
"image"
,
attribute_value
))
{
return
REQ_IMG
;
}
else
if
(
util
::
strieq_l
(
"style"
,
attribute_value
))
{
...
...
@@ -70,7 +70,6 @@ ResourceType get_resource_type_for_preload_as(const StringRef &attribute_value)
}
}
// namespace
namespace
{
void
add_link
(
ParserData
*
parser_data
,
const
StringRef
&
uri
,
ResourceType
res_type
)
{
...
...
@@ -109,7 +108,8 @@ void start_element_func(void *user_data, const xmlChar *src_name,
if
(
as_attr
.
empty
())
{
return
;
}
add_link
(
parser_data
,
href_attr
,
get_resource_type_for_preload_as
(
as_attr
));
add_link
(
parser_data
,
href_attr
,
get_resource_type_for_preload_as
(
as_attr
));
}
}
else
if
(
util
::
strieq_l
(
"img"
,
name
))
{
auto
src_attr
=
get_attr
(
attrs
,
StringRef
::
from_lit
(
"src"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment