Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #2015 #49

Merged
merged 2 commits into from
May 16, 2016
Merged

fix #2015 #49

merged 2 commits into from
May 16, 2016

Conversation

frankyifei
Copy link
Contributor

@frankyifei frankyifei commented May 14, 2016

add margins in elementFromPoint() and some changes about page-break-after

@frankyifei frankyifei closed this May 14, 2016
@frankyifei frankyifei reopened this May 16, 2016
@houqp
Copy link
Member

houqp commented May 16, 2016

Thanks for fix :) Just curious, will this fix koreader/koreader#2021 too?

@frankyifei
Copy link
Contributor Author

frankyifei commented May 16, 2016

no. I'm working on #2021 but still not very clear. I found that the position of the highlighted area need to consider left and top paddings(and borders). But I still dont know why it will appear on other pages.
I am reading the code in cre.cpp, getWordBoxesFromPositions() called ldomXRange.getRect(). maybe i can change this function?
Another finding: only the highlight on first page will be shown on the following pages. but maybe this depends on the ebook

@houqp houqp merged commit e51b988 into koreader:master May 16, 2016
@houqp
Copy link
Member

houqp commented May 16, 2016

I am not very sure why this is happening either. I was looking at this, but then got distracted by segfaults in kobo screenshot and suspension. @Hzj-jie put out a minimal reproducible same txt file in koreader/koreader#1944 (see the screenshot). Using this test sample should help us find the bug easier than debugging on a real epub. I will also help take a look at this after I figure out what's causing the segfaults in kobo.

@frankyifei
Copy link
Contributor Author

I think these code are not so mature as the coolreader itself does not use them. its own bookmark is implemented in another way.

@houqp
Copy link
Member

houqp commented May 16, 2016

You mean the hightlight code path?

@frankyifei
Copy link
Contributor Author

frankyifei commented May 16, 2016

I searched the whole project for ldomXRange.getRect and it was not called once. Maybe I searched wrong name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants