Merge lp:~ado-papas/inkscape/bug_732797 into lp:~inkscape.dev/inkscape/trunk

Proposed by Adonis Papaderos
Status: Work in progress
Proposed branch: lp:~ado-papas/inkscape/bug_732797
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 14 lines (+3/-1)
1 file modified
src/style.cpp (+3/-1)
To merge this branch: bzr merge lp:~ado-papas/inkscape/bug_732797
Reviewer Review Type Date Requested Status
Martin Owens functional review Needs Fixing
Review via email: mp+53003@code.launchpad.net

Description of the change

According to my understating of http://www.w3.org/TR/SVG/text.html#BaselineShiftProperty, the baseline-shift should not be inherited by default.

This patch sets the value of baseline-shift to 0 if it is unset.

To post a comment you must log in.
Revision history for this message
jazzynico (jazzynico) wrote :

Maybe it's unrelated, but using this patch lead to another issue: when you follow the steps in the description of Bug #732797, the "1" is no longer shifted as expected, but if you then select the whole text, unset subscript and set it again, "1" is shifted again.

Revision history for this message
Martin Owens (doctormo) wrote :

I can confirm the patch does what it says, but JazzyNico's testing shows that there is further work here to fix this error. The application of the shift for a second time may be the culprit as seen in the comments in the code.

review: Needs Fixing (functional review)

Unmerged revisions

10090. By Adonis Papaderos

make baseline-shift not inherited

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/style.cpp'
2--- src/style.cpp 2011-02-21 07:59:34 +0000
3+++ src/style.cpp 2011-03-11 11:48:43 +0000
4@@ -1365,7 +1365,9 @@
5 SPIFontSize const &pfont_size)
6 {
7 /* 'baseline-shift' */
8- if (!child.set || child.inherit) {
9+ if (!child.set) {
10+ child.computed = 0; //no inheritance
11+ } else if (child.inherit) {
12 /* Inherit the computed value. Reference: http://www.w3.org/TR/SVG11/styling.html#Inheritance */
13 child.computed = parent.computed; // Does this make sense (applying a shift a second time)?
14 } else if (child.type == SP_BASELINE_SHIFT_LITERAL) {