mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Merge pull request #3002 from servo/rustdoc-layout
Un-blacklist the layout crate from rustdoc.
This commit is contained in:
commit
e9e4b386cb
3 changed files with 26 additions and 19 deletions
13
mk/doc.mk
13
mk/doc.mk
|
@ -2,8 +2,13 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
RUSTDOC_HTML_IN_HEADER = $(S)/src/etc/rustdoc-style.html
|
||||
RUSTDOC_FLAGS = --html-in-header $(RUSTDOC_HTML_IN_HEADER)
|
||||
RUSTDOC_DEPS = $(RUSTDOC_HTML_IN_HEADER)
|
||||
|
||||
# FIXME(#2924) These crates make rustdoc fail for undetermined reasons.
|
||||
DOC_BLACKLISTED := style layout
|
||||
DOC_BLACKLISTED := style
|
||||
|
||||
define DEF_DOC_RULES
|
||||
.PHONY: doc-$(1)
|
||||
|
@ -11,14 +16,14 @@ doc-$(1): doc/$(1)/index.html
|
|||
|
||||
ifeq (,$(filter $(1),$(DOC_BLACKLISTED)))
|
||||
|
||||
doc/$(1)/index.html: $$(DEPS_$(1))
|
||||
doc/$(1)/index.html: $$(DEPS_$(1)) $$(RUSTDOC_DEPS)
|
||||
@$$(call E, rustdoc: $$@)
|
||||
$$(Q)$$(RUSTDOC) $$(RFLAGS_$(1)) $$<
|
||||
$$(Q)$$(RUSTDOC) $$(RUSTDOC_FLAGS) $$(RFLAGS_$(1)) $$<
|
||||
|
||||
else
|
||||
|
||||
.PHONY: doc/$(1)/index.html
|
||||
doc/$(1)/index.html: $$(DEPS_$(1))
|
||||
doc/$(1)/index.html:
|
||||
@echo SKIPPED: blacklisted rustdoc: $$@
|
||||
|
||||
endif
|
||||
|
|
|
@ -71,7 +71,7 @@ pub struct Line {
|
|||
/// <span>I <span>like truffles, <img></span> yes I do.</span>
|
||||
/// ~~~
|
||||
///
|
||||
/// ~~~
|
||||
/// ~~~text
|
||||
/// +------------+
|
||||
/// | I like |
|
||||
/// | truffles, |
|
||||
|
@ -84,11 +84,9 @@ pub struct Line {
|
|||
///
|
||||
/// The ranges that describe these lines would be:
|
||||
///
|
||||
/// ~~~
|
||||
/// | [0.0, 1.4) | [1.5, 2.0) | [2.0, 3.4) | [3.4, 4.0) |
|
||||
/// |------------|-------------|-------------|------------|
|
||||
/// | 'I like' | 'truffles,' | '<img> yes' | 'I do.' |
|
||||
/// ~~~
|
||||
pub range: Range<LineIndices>,
|
||||
/// The bounds are the exact position and extents of the line with respect
|
||||
/// to the parent box.
|
||||
|
@ -101,7 +99,7 @@ pub struct Line {
|
|||
///
|
||||
/// ...the bounds would be:
|
||||
///
|
||||
/// ~~~
|
||||
/// ~~~text
|
||||
/// +-----------------------------------------------------------+
|
||||
/// | ^ |
|
||||
/// | | |
|
||||
|
@ -123,7 +121,7 @@ pub struct Line {
|
|||
/// The green zone is the greatest extent from wich a line can extend to
|
||||
/// before it collides with a float.
|
||||
///
|
||||
/// ~~~
|
||||
/// ~~~text
|
||||
/// +-----------------------+
|
||||
/// |::::::::::::::::: |
|
||||
/// |:::::::::::::::::FFFFFF|
|
||||
|
@ -164,11 +162,9 @@ pub struct LineIndices {
|
|||
///
|
||||
/// The fragments would be indexed as follows:
|
||||
///
|
||||
/// ~~~
|
||||
/// | 0 | 1 | 2 | 3 |
|
||||
/// |------|------------------|-------|--------------|
|
||||
/// | 'I ' | 'like truffles,' | <img> | ' yes I do.' |
|
||||
/// ~~~
|
||||
/// | 0 | 1 | 2 | 3 |
|
||||
/// |------|------------------|---------|--------------|
|
||||
/// | 'I ' | 'like truffles,' | `<img>` | ' yes I do.' |
|
||||
pub fragment_index: FragmentIndex,
|
||||
/// The index of a character in a DOM fragment. Continuous runs of whitespace
|
||||
/// are treated as single characters. Non-breakable DOM fragments such as
|
||||
|
@ -182,15 +178,13 @@ pub struct LineIndices {
|
|||
///
|
||||
/// The characters would be indexed as follows:
|
||||
///
|
||||
/// ~~~
|
||||
/// | 0 | 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
|
||||
/// |---|---|---|---|---|---|---|---|---|---|---|---|----|----|----|----|----|
|
||||
/// | I | | l | i | k | e | | t | r | u | f | f | l | e | s | , | |
|
||||
///
|
||||
/// | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|
||||
/// |-------|---|---|---|---|---|---|---|---|---|---|
|
||||
/// | <img> | | y | e | s | | I | | d | o | . |
|
||||
/// ~~~
|
||||
/// | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|
||||
/// |---------|---|---|---|---|---|---|---|---|---|---|
|
||||
/// | `<img>` | | y | e | s | | I | | d | o | . |
|
||||
pub char_index: CharIndex,
|
||||
}
|
||||
|
||||
|
|
8
src/etc/rustdoc-style.html
Normal file
8
src/etc/rustdoc-style.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<style>
|
||||
.docblock table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.docblock table th, .docblock table td {
|
||||
border: 1px solid #888;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue