summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2019-02-22Fix non-clickable urlsGuillaume Gomez-4/+0
2019-02-22Fix invalid background colorGuillaume Gomez-8/+0
2019-02-17Fixes text becoming invisible when element targettedGuillaume Gomez-14/+2
2019-01-15Rollup merge of #57614 - GuillaumeGomez:fix-crate-filtering, r=QuietMisdreavusMazdak Farrokhzad-1/+1
[rustdoc] Fix crates filtering box not being filled Currently, the filter crate box (at the left of the search input) is always empty. To get the number of keys of dictionary in JS, you need to call `Object.keys()` on it. r? @QuietMisdreavus
2019-01-15Fix crates filtering box not being filledGuillaume Gomez-1/+1
2019-01-13Rollup merge of #56874 - JohnHeitmann:docs-spacing, r=GuillaumeGomezMazdak Farrokhzad-66/+68
Simplify foreign type rendering. Simplified foreign type rendering by switching from tables to flexbox. Also, removed some seemingly extraneous elements like “ghost” spans. Reduces element count on the `std::iter::Iterator` page by 30%. On my laptop it drops Iterator page load time from ~15s to ~10s. Frame times during scrolling are a hair lower too. Known visual changes (happy to tweak based on feedback): * The main `impl ...` headers are now getting the default, larger, h3 font size. This was an accident, but I liked how it turned out so I didn't fix it. * There's a hair less vertical spacing between the end of a where block and the start of the next fn. Now, all spacing is consistent. I think this looks a bit worse. I may tweak vertical spacing more here or in a follow-up that cleans up vertical spacing more broadly. * "[src]" links are all sized at 17px. A few were 19px in the original. I haven't yet done heavy cross-browser or cross-crate testing. I was hoping to get a quick thumbs up or thumbs down here at this first draft, then if this is on the right track I'll spend some time on that testing. TODO: - [x] Test on Chrome - [x] Test on Firefox - [ ] ~~Test on UC Android~~ - [x] Test on Edge - [x] Test on iOS safari - [x] Test on desktop safari - [x] Update automated tests - [x] Increase vertical margin - [x] Fix "Important traits for" hover overlap - [x] Wait for #55798 to land & merge it
2019-01-07Update static files code for updated Source Serif Pro fontTrevor Spiteri-19/+12
2019-01-07Replace Heuristica with Source Serif Pro italic in rustdoc.cssTrevor Spiteri-5/+4
2019-01-07Source Serif Pro regular and bold 2.007, and italic 1.007Trevor Spiteri-117/+2
Use fonts from the Roman 2.007 and Italic 1.007 version at: https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro%2F1.007R-it The following files are used from the distribution: * WOFF/TTF/SourceSerifPro-Regular.ttf.woff * WOFF/TTF/SourceSerifPro-Bold.ttf.woff * WOFF/TTF/SourceSerifPro-It.ttf.woff These replace the older Source Serif Pro regular and bold fonts, and the Heuristica italic font.
2018-12-29Rollup merge of #57163 - JohnHeitmann:chevron-fix, r=estebankkennytm-1/+1
Give the crate select chevron room to breathe. Before: ![screen shot 2018-12-27 at 10 26 10 pm](https://user-images.githubusercontent.com/4282480/50505100-9ff24300-0a26-11e9-9b74-37bdee6faf83.png) After: ![screen shot 2018-12-27 at 10 25 57 pm](https://user-images.githubusercontent.com/4282480/50505110-a54f8d80-0a26-11e9-9fa2-7fed21773207.png)
2018-12-29Auto merge of #57006 - GuillaumeGomez:no-crate-filter, r=QuietMisdreavusbors-19/+52
Add no-crate filter option on rustdoc @onur asked me about it so here it is! r? @QuietMisdreavus
2018-12-27Give the crate select chevron room to breathe.John Heitmann-1/+1
2018-12-27Simplify foreign type rendering.John Heitmann-66/+68
Simplified foreign type rendering by switching from tables to flexbox. Also, removed some seemingly extraneous elements like “ghost” spans. Reduces element count on std::iter::Iterator by 30%.
2018-12-25Remove licensesMark Rousskov-199/+1
2018-12-25Auto merge of #56962 - nivkner:fixme_fixup4, r=pnkfelixbors-7/+5
address some FIXME whose associated issues were marked as closed part of #44366
2018-12-24Add no-crate filter option on rustdocGuillaume Gomez-19/+52
2018-12-23Rollup merge of #57011 - QuietMisdreavus:static-root-path, r=GuillaumeGomezkennytm-22/+55
rustdoc: add new CLI flag to load static files from a different location This PR adds a new CLI flag to rustdoc, `--static-root-path`, which controls how rustdoc links pages to the CSS/JS/font static files bundled with the output. By default, these files are linked with a series of `../` which is calculated per-page to link it to the documentation root - i.e. a relative link to the directory given by `-o`. This is causing problems for docs.rs, because even though docs.rs has saved one copy of these files and is dispatching them dynamically, browsers have no way of knowing that these are the same files and can cache them. This can allow it to link these files as, for example, `/rustdoc.css` instead of `../../rustdoc.css`, creating a single location that the files are loaded from. I made sure to only change links for the *static* files, those that don't change between crates. Files like the search index, aliases, the source files listing, etc, are still linked with relative links. r? @GuillaumeGomez cc @onur
2018-12-23Rollup merge of #56967 - GuillaumeGomez:regen-search-index, r=QuietMisdreavuskennytm-2/+2
Replace current crate's searchIndex when regenerating Fixes #56921. r? @QuietMisdreavus
2018-12-22Auto merge of #56824 - euclio:internal-apis, r=QuietMisdreavusbors-96/+116
rustdoc: display rustc_private APIs as "Internal" This PR updates the display of `rustc_private` APIs to be "Internal" instead of "Experimental", and changes the colors appropriately. It also updates the copy of the `rustc_private` feature to sound more informative and less like a compiler suggestion. The PR additionally contains a significant refactor of the `short_stability` function to remove duplication and fix a few rendering bugs due to extra or missing spaces. Before: ![screen shot 2018-12-14 at 11 45 28 am](https://user-images.githubusercontent.com/1372438/50015926-c9768d80-ff95-11e8-9649-5df29df6909b.png) After: ![screen shot 2018-12-14 at 11 45 11 am](https://user-images.githubusercontent.com/1372438/50015934-cf6c6e80-ff95-11e8-912b-74b893f55425.png)
2018-12-21Auto merge of #55798 - GuillaumeGomez:version-display-associated-const, ↵bors-31/+51
r=QuietMisdreavus Add version display for associated consts Fixes #54030. <img width="1440" alt="screenshot 2018-11-08 at 23 57 29" src="https://user-images.githubusercontent.com/3050060/48232648-99decf00-e3b2-11e8-9f41-6bd12a161c7d.png"> r? @QuietMisdreavus
2018-12-20display rustc_private APIs as "Internal"Andy Russell-8/+42
2018-12-20split extra_scripts to handle root_path shenanigansQuietMisdreavus-10/+23
2018-12-20new --static-root-path flag for controlling static file locationsQuietMisdreavus-14/+34
2018-12-19FIXME(9639) remove fixme and accept non-utf8 paths in librustdocNiv Kaminer-7/+5
2018-12-19Replace current crate's searchIndex when regeneratingGuillaume Gomez-2/+2
2018-12-18Fix mobile menu rendering collision with tooltip.John Heitmann-1/+1
Bring the mobile-mode menu in front of the ⓘ icon.
2018-12-18Fix DOM errorsGuillaume Gomez-30/+26
2018-12-16Auto merge of #56875 - Centril:rollup, r=Centrilbors-1/+1
Rollup of 20 pull requests Successful merges: - #53506 (Documentation for impl From for AtomicBool and other Atomic types) - #56343 (Remove not used mod) - #56439 (Clearer error message for dead assign) - #56640 (Add FreeBSD unsigned char platforms to std::os::raw) - #56648 (Fix BTreeMap UB) - #56672 (Document time of back operations of a Linked List) - #56706 (Make `const unsafe fn` bodies `unsafe`) - #56742 (infer: remove Box from a returned Iterator) - #56761 (Suggest using `.display()` when trying to print a `Path`) - #56781 (Update LLVM submodule) - #56789 (rustc: Add an unstable `simd_select_bitmask` intrinsic) - #56790 (Make RValue::Discriminant a normal Shallow read) - #56793 (rustdoc: look for comments when scraping attributes/crates from doctests) - #56826 (rustc: Add the `cmpxchg16b` target feature on x86/x86_64) - #56832 (std: Use `rustc_demangle` from crates.io) - #56844 (Improve CSS rule) - #56850 (Fixed issue with using `Self` ctor in typedefs) - #56855 (Remove u8 cttz hack) - #56857 (Fix a small mistake regarding NaNs in a deprecation message) - #56858 (Fix doc of `std::fs::canonicalize`) Failed merges: - #56741 (treat ref-to-raw cast like a reborrow: do a special kind of retag) r? @ghost
2018-12-16Add version display for associated constsGuillaume Gomez-8/+32
2018-12-16Fix invalid JS file generationGuillaume Gomez-4/+4
2018-12-16Fix js errorsGuillaume Gomez-2/+2
2018-12-15Improve CSS ruleGuillaume Gomez-1/+1
2018-12-15Auto merge of #56005 - GuillaumeGomez:speedup-doc-render, r=QuietMisdreavusbors-612/+688
Greatly improve rustdoc rendering speed issues Fixes #55900. So a few improvements here: * we're switching to `DOMTokenList` API when available providing a replacement if it isn't (should only happen on safari and IE I think...) * hide doc sections by default to allow the whole HTML generation to happen in the background to avoid triggering DOM redraw all the times (which killed the performances) r? @QuietMisdreavus
2018-12-14simplify deprecation and stability renderingAndy Russell-98/+84
2018-12-14Rollup merge of #56709 - GuillaumeGomez:reduce-search-index, r=QuietMisdreavuskennytm-6/+30
Remove unneeded extra chars to reduce search-index size Before: ``` 2013782 Dec 11 10:16 build/x86_64-unknown-linux-gnu/doc/search-index.js ``` After: ``` 1736597 Dec 11 10:50 build/x86_64-unknown-linux-gnu/doc/search-index.js ``` No changes in the output of the search. r? @QuietMisdreavus
2018-12-14Rollup merge of #56637 - ollie27:rustdoc_proc_macro_local_reexport, ↵kennytm-1/+2
r=QuietMisdreavus rustdoc: Fix local reexports of proc macros Filter out `ProcMacroStub`s to avoid an ICE during cleaning. Also add proc macros to `cache().paths` so it can generate links. r? @QuietMisdreavus
2018-12-13Split on words insteadGuillaume Gomez-7/+27
2018-12-11Remove unneeded extra chars to reduce search-index sizeGuillaume Gomez-1/+5
2018-12-10Rollup merge of #56633 - GuillaumeGomez:fix-right-arrow-display, ↵Guillaume Gomez-1/+1
r=QuietMisdreavus Fix right arrow size for crate filter This bug only appears when a crate has a long name: <img width="1440" alt="screenshot 2018-12-08 at 16 36 21" src="https://user-images.githubusercontent.com/3050060/49687728-7de06180-fb07-11e8-8554-d32597351fac.png"> With this fix, it goes back to normal, whatever the size: <img width="1440" alt="screenshot 2018-12-08 at 16 36 05" src="https://user-images.githubusercontent.com/3050060/49687730-8769c980-fb07-11e8-91b7-b5e1961211a2.png"> r? @QuietMisdreavus
2018-12-08rustdoc: Fix local reexports of proc macrosOliver Middleton-1/+2
Filter out `ProcMacroStub`s to avoid an ICE during cleaning. Also add proc macros to `cache().paths` so it can generate links.
2018-12-08Fix right arrow size for crate filterGuillaume Gomez-1/+1
2018-12-08Auto merge of #56578 - alexreg:cosmetic-1, r=alexregbors-10/+10
Various minor/cosmetic improvements to code r? @Centril 😄
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-10/+10
2018-12-07use top level `fs` functions where appropriateAndy Russell-12/+4
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-12-07Rollup merge of #56516 - frewsxcv:frewsxcv-eq, r=Mark-Simulacrumkennytm-1/+1
Replace usages of `..i + 1` ranges with `..=i`. Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.
2018-12-06Show 'loading content' when loading contentGuillaume Gomez-58/+51
2018-12-06Show everything when noscript is onGuillaume Gomez-0/+26
2018-12-06cleanupGuillaume Gomez-65/+46
2018-12-06Prevent lazy iterations over DOMGuillaume Gomez-105/+99
2018-12-06Greatly improve rustdoc rendering speed issuesGuillaume Gomez-529/+611