Commit Graph

270 Commits

Author SHA1 Message Date
Mike Corbin
a22319b98a Eliminate transition effects from thumbnail loader
During A/B testing we found a significant preference (increased engagement
time, reduced downloads of original PDF for local viewing) for the version that
doesn't animate loading thumbnails.

Profiling shows that the transition effects hit at a pessimal time when the
compositor is busy rendering the main PDF page view, and rendering thumbnail
previews, causing the main scroll view to stutter. With the transition removed
scrolling is perceptibly smoother in Chrome and Firefox. We also hypothesize
that the transition effects added to a perception of slowness but presumably
the aforementioned stutter is the primary issue here.
2015-05-16 15:08:10 +01:00
Jonas Jenwald
4dc52cf92c Tweak the :focus/:hover CSS rules of the .toolbarField class used in Overlay dialogs
Having recently spent some time staring at the PasswordPrompt, while fixing issue 6010, I felt that the current border style does not really give a good visual  indication that the input field actually has focus.

The current appearance was first introduced in PR 3527; but I don't know if having a different border style in Overlay dialogs was intentional, or if it just "happened".
However, given the colour palette used in the viewer UI, I think that using the same border style for all .toolbarFields makes sense.
2015-05-15 13:52:18 +02:00
Tim van der Meij
d7aa95d6b1 Merge pull request #5857 from Rob--W/print-page-size
Set page size via @page + size
2015-05-14 16:52:40 +02:00
Jonas Jenwald
601bd4a930 Preface all "fullscreen" CSS rules with a |pdfPresentationMode| class, and add it to the |viewerContainer| while Presentation Mode is active 2015-04-21 16:28:50 +02:00
Rob Wu
d34e6ddd60 Set page size via @page + size
In Blink-based browsers, there is a mismatch between document size and
paper size. Even if exactly the same values and unit are used, it is
possible that the printed results takes more pages than expected.

To solve the issue, the page size is set via @page size, and the canvas
and ancestor nodes are assigned a width+height of 100% (=relative to the
page). This change resolves bugs such as blank pages and split pages.
2015-03-23 11:19:48 +01:00
Jonas Jenwald
f0d538d7cf Revert PR 5510, except in WebKit browsers, for breaking print preview in Firefox
See https://bugzilla.mozilla.org/show_bug.cgi?id=1138993.
2015-03-07 00:16:55 +01:00
Tim van der Meij
997c2b9d94 Merge pull request #5596 from fkaelberer/fixBordersAroundThumbnails
Fix border sizes around thumbnails
2015-01-23 21:29:49 +01:00
Jonas Jenwald
c149d4d75e Fix thumbnail rendering regression, when using |draw|, for PDF files with blend modes (issue 5637) 2015-01-19 21:55:59 +01:00
Brendan Dahl
e93cf5ca97 Merge pull request #5552 from yurydelendik/pdfpageview
Creates/refactors PDFPageView class
2015-01-05 11:26:36 -08:00
fkaelberer
1d31018c7d Make thumbnail CSS size independent of data-loaded tag 2014-12-30 15:07:20 +01:00
Jonas Jenwald
86edb8687d Fix the placement of arrows in the zoom box
Now that [bug 649849](https://bugzilla.mozilla.org/show_bug.cgi?id=649849) has been fixed, adding support for `-moz-appearance: none`, the arrow is now too close to the text in the zoom box. This is currently only an issue in Nightly, but assuming the patch doesn't get backed out, this will soon affect all versions of Firefox.

The only simple solution I could find seems to be removing `*-appearance: none` rules from the CSS. I haven't been able to find any easier solutions that still looks the same with/without bug 649849.
2014-12-30 11:37:21 +01:00
Yury Delendik
513a3d8c91 Replaces text selection example 2014-12-20 23:41:34 -06:00
dustyrockpyle
7a0e764ffd Added page break hints in viewer css. 2014-11-26 11:56:00 -05:00
Tim van der Meij
dc5961d969 Merge pull request #5465 from Snuffleupagus/findbar-notFound-color
[GENERIC viewer] Fix the background color of the findInput when the search term is not found
2014-11-18 20:07:31 +01:00
Jonas Jenwald
86309faf3c Prevent text selection in Presentation Mode (bug 1018882) 2014-11-07 12:02:48 +01:00
Jonas Jenwald
fbca0e1ab0 [GENERIC viewer] Fix the background color of the findInput when the search term is not found
When a search term isn't found, the background color of the findInput is supposed to change (to red). This is currently not working as intended, because the CSS rule is not being applied correctly. (It seems that this broke in PR 2208.)

This patch also changes the background color to match the one used in the native Firefox findbar, since the old color seemed a bit too pink.
2014-11-01 20:26:44 +01:00
Yury Delendik
29eb147d42 Merge pull request #4150 from Snuffleupagus/issue-3990
Add a page loading indicator to the page number input
2014-09-30 18:06:39 -05:00
Yury Delendik
193b55dba0 Fixes printing regression a10fde1 2014-09-30 18:01:30 -05:00
Jonas Jenwald
902b72ba50 Add updated loading-small.png (and corresponding Retina) asset 2014-10-01 00:13:45 +02:00
Jonas Jenwald
b9ef80e167 Add a page loading indicator to the page number input 2014-10-01 00:13:44 +02:00
Yury Delendik
70a0935737 Move text_layer_builder and pdf_viewer styles out 2014-09-30 10:48:29 -05:00
Jonas Jenwald
9c3ea3c40b Fix text highlighting in the Font Inspector in the debugger
After PR #5282, the text highlighting in the Font Inspector is very hard to see against a white background. That seems to be an oversight from the mentioned PR, hence this patch fixes that.
2014-09-24 00:18:35 +02:00
Fabian Lange
931b444e00 TextLayer selection coloring improvement for overlap.
As a consequence of merging #5221 it is more likely to have multiple
overlapping selection divs inside the text layer. Because each individual
element gets the selection style applied, the 30%opacity stacks, making a
60% bar visible where the overlap happens.

As proposed by @rocallahan, this can be fixed by making the selection
style solid and setting opacity for the overall layer.

I assume also that this should make the work for the renderer easier, but
was unable to bench it.
2014-09-09 15:21:50 +02:00
Jonas Jenwald
5c84dd319f Fix the placement of the findInput loading indicator in RTL locales
Currently in RTL locales, the loading indicator is placed such that it is in the way when entring a search term. Hence this patch moves it to the other side of the input field to fix this.
2014-08-25 22:58:44 +02:00
Fabian Lange
1da38ec91e no need to set textlayer properties which are overwritten in individual styles. 2014-08-19 22:47:39 +02:00
Fabian Lange
6a0aa2cf49 Set transformOrigin for text layer in css.
transformOrigin is set to 0% 0% in all cases. This adds extra memory
impact into the dom tree. It also involves the CustomStyles workaround
to determine the correct css rule for the browser.
By setting all vendor and standard variants in css, the rule is applied
without the dom memory overhead and without the minor computation
overhead to set the value.
2014-08-19 22:46:09 +02:00
Adolfo Jayme Barrientos
ba426f479e Reduce load progress bar’s height to 4 pixels 2014-08-11 23:09:38 -05:00
Samuel Chantaraud
221d00a11f Removed non-base64 bytes before the last 3 characters 2014-06-11 09:12:26 -04:00
Mohammed Abu-alsaad
2b595e6d32 Fixed IE links bug by adding a base64 transparent gif for anchor tags for
IE only.
2014-06-03 11:06:43 +12:00
Yury Delendik
09b24d5231 Merge pull request #4808 from fkaelberer/fixAndroidButtons
Fix strange looking buttons in mobile Firefox
2014-05-19 11:56:57 -05:00
fkaelberer
2d4c35cda7 fix buttons under android 2014-05-18 17:32:26 +02:00
Jonas Jenwald
73a9d50fd1 Refactor the CSS rules for the overlayContainer 2014-05-13 10:43:38 +02:00
Tim van der Meij
9d6ffbb3bf Converts attachment items to buttons instead of links 2014-04-25 23:15:25 +02:00
Samuel Chantaraud
25ee0e8572 Preliminary attachments support
Added a partial Filespec support
Added getAttachments in API
Added a new attachments view in UI (with a new icon by @shorlander)
2014-04-18 12:11:00 -04:00
Brendan Dahl
5bd8a83c9b Build the text layer geometry on the worker. 2014-04-09 16:44:07 -07:00
Yury Delendik
4be65a9477 Merge pull request #4516 from dferer/ios-scrolling
Added CSS rules to improve scrolling on iOS devices
2014-04-03 09:34:20 -05:00
Samuel Chantaraud
50aa49bb06 Added CSS rules to allow smooth (momentum) scrolling on iOS devices 2014-03-31 11:09:18 -04:00
fkaelberer
db84851e27 Use full screen width in presentation mode 2014-03-28 08:58:18 +01:00
Yury Delendik
e4d0af2687 Fixes HiDPI icons of the secondary toolbar for Chrome 2014-03-17 11:25:50 -05:00
Samuel Chantaraud
076b3433b4 Improved annotations' display/behavior.
Added an "InteractiveAnnotation" class to homogenize the annotations' structure (highlighting) and user interactions (for now, used for text and link annotations).

Text annotations:
The appearance (AP) has priority over the icon (Name).
The popup extends horizontally (up to a limit) as well as vertically.
Reduced the title's font size.
The annotation's color (C) is used to color the popup's background.
On top of the mouseover show/hide behavior, a click on the icon will lock the annotation open (for mobile purposes). It can be closed with another click on either the icon or the popup.

An annotation printing is conditioned by its "print" bit
Unsupported annotations are not displayed at all.
2014-03-07 10:48:42 -04:00
Yury Delendik
15847ef94f Fixes CSS for webkit 2014-03-05 08:50:31 -06:00
Tim van der Meij
f281669151 Implement Retina assets 2014-02-26 22:22:38 +01:00
Jonas Jenwald
2337e974f7 Move print icons now that all icons are the same size 2014-02-20 22:49:16 +01:00
Rob Wu
65701f941d Get rid of weird scrollbar on mouse down 2014-01-30 15:06:04 +01:00
Rob Wu
45c633b072 Update Grab to pan to fix performance issue
Reported at http://stackoverflow.com/questions/21392844/pdf-js-recalculating-problme
See also e0f893753a

Changes versus grab-to-pan.js: Moved inline style to viewer.css,
lowered z-index from 2e9 to 50000 (note to future maintainers:
make sure that all other z-index values stay below 50000!).
2014-01-30 00:16:25 +01:00
Tim van der Meij
fa603af391 Removes button outline as visible in Chrome 2014-01-27 11:57:33 +01:00
Tim van der Meij
c952b6fb85 Miscellaneous improvements for the document properties dialog 2014-01-23 00:30:48 +01:00
Tim van der Meij
5f7ded4ff6 Document properties 2014-01-22 00:07:07 +01:00
Tim van der Meij
d25b0a74d0 RTL CSS improvements 2014-01-21 22:56:19 +01:00
Jonas Jenwald
80f5ae518f Remove old CSS rules 2014-01-17 16:31:51 +01:00