Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b02e61c4
Commit
b02e61c4
authored
Dec 25, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix identical ranges merging.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3c16587e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
layout.c
dlls/dwrite/layout.c
+2
-2
layout.c
dlls/dwrite/tests/layout.c
+3
-3
No files found.
dlls/dwrite/layout.c
View file @
b02e61c4
...
...
@@ -2136,7 +2136,7 @@ static HRESULT set_layout_range_attr(struct dwrite_textlayout *layout, enum layo
/* for all existing ranges covered by new one update value */
while
(
cur
&&
is_in_layout_range
(
&
value
->
range
,
&
cur
->
range
))
{
changed
=
set_layout_range_attrval
(
cur
,
attr
,
value
);
changed
|
=
set_layout_range_attrval
(
cur
,
attr
,
value
);
cur
=
LIST_ENTRY
(
list_next
(
ranges
,
&
cur
->
entry
),
struct
layout_range_header
,
entry
);
}
...
...
@@ -2145,7 +2145,7 @@ static HRESULT set_layout_range_attr(struct dwrite_textlayout *layout, enum layo
r
.
startPosition
=
cur
->
range
.
startPosition
;
r
.
length
=
value
->
range
.
startPosition
+
value
->
range
.
length
-
cur
->
range
.
startPosition
;
left
=
alloc_layout_range_from
(
cur
,
&
r
);
changed
=
set_layout_range_attrval
(
left
,
attr
,
value
);
changed
|
=
set_layout_range_attrval
(
left
,
attr
,
value
);
cur
->
range
.
startPosition
+=
left
->
range
.
length
;
cur
->
range
.
length
-=
left
->
range
.
length
;
list_add_before
(
&
cur
->
entry
,
&
left
->
entry
);
...
...
dlls/dwrite/tests/layout.c
View file @
b02e61c4
...
...
@@ -2056,17 +2056,17 @@ if (0) /* crashes on native */
range
.
length
=
0
;
hr
=
IDWriteTextLayout_GetLocaleName
(
layout
,
0
,
buffW
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
),
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
{
todo_wine
ok
(
!
lstrcmpW
(
buffW
,
enusW
),
"got %s
\n
"
,
wine_dbgstr_w
(
buffW
));
ok
(
range
.
startPosition
==
0
&&
range
.
length
==
~
0u
,
"got %u,%u
\n
"
,
range
.
startPosition
,
range
.
length
);
}
/* check what's returned for positions after the text */
buffW
[
0
]
=
0
;
range
.
length
=
0
;
hr
=
IDWriteTextLayout_GetLocaleName
(
layout
,
100
,
buffW
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
),
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
buffW
,
enusW
),
"got %s
\n
"
,
wine_dbgstr_w
(
buffW
));
todo_wine
ok
(
!
lstrcmpW
(
buffW
,
enusW
),
"got %s
\n
"
,
wine_dbgstr_w
(
buffW
));
ok
(
range
.
startPosition
==
0
&&
range
.
length
==
~
0u
,
"got %u,%u
\n
"
,
range
.
startPosition
,
range
.
length
);
IDWriteTextLayout_Release
(
layout
);
...
...
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