Merge pull request #3002 from servo/rustdoc-layout

Un-blacklist the layout crate from rustdoc.
This commit is contained in:
Simon Sapin 2014-08-04 18:50:57 +01:00
commit e9e4b386cb
3 changed files with 26 additions and 19 deletions

View file

@ -2,8 +2,13 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # 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. # FIXME(#2924) These crates make rustdoc fail for undetermined reasons.
DOC_BLACKLISTED := style layout DOC_BLACKLISTED := style
define DEF_DOC_RULES define DEF_DOC_RULES
.PHONY: doc-$(1) .PHONY: doc-$(1)
@ -11,14 +16,14 @@ doc-$(1): doc/$(1)/index.html
ifeq (,$(filter $(1),$(DOC_BLACKLISTED))) ifeq (,$(filter $(1),$(DOC_BLACKLISTED)))
doc/$(1)/index.html: $$(DEPS_$(1)) doc/$(1)/index.html: $$(DEPS_$(1)) $$(RUSTDOC_DEPS)
@$$(call E, rustdoc: $$@) @$$(call E, rustdoc: $$@)
$$(Q)$$(RUSTDOC) $$(RFLAGS_$(1)) $$< $$(Q)$$(RUSTDOC) $$(RUSTDOC_FLAGS) $$(RFLAGS_$(1)) $$<
else else
.PHONY: doc/$(1)/index.html .PHONY: doc/$(1)/index.html
doc/$(1)/index.html: $$(DEPS_$(1)) doc/$(1)/index.html:
@echo SKIPPED: blacklisted rustdoc: $$@ @echo SKIPPED: blacklisted rustdoc: $$@
endif endif

View file

@ -71,7 +71,7 @@ pub struct Line {
/// <span>I <span>like truffles, <img></span> yes I do.</span> /// <span>I <span>like truffles, <img></span> yes I do.</span>
/// ~~~ /// ~~~
/// ///
/// ~~~ /// ~~~text
/// +------------+ /// +------------+
/// | I like | /// | I like |
/// | truffles, | /// | truffles, |
@ -84,11 +84,9 @@ pub struct Line {
/// ///
/// The ranges that describe these lines would be: /// The ranges that describe these lines would be:
/// ///
/// ~~~
/// | [0.0, 1.4) | [1.5, 2.0) | [2.0, 3.4) | [3.4, 4.0) | /// | [0.0, 1.4) | [1.5, 2.0) | [2.0, 3.4) | [3.4, 4.0) |
/// |------------|-------------|-------------|------------| /// |------------|-------------|-------------|------------|
/// | 'I like' | 'truffles,' | '<img> yes' | 'I do.' | /// | 'I like' | 'truffles,' | '<img> yes' | 'I do.' |
/// ~~~
pub range: Range<LineIndices>, pub range: Range<LineIndices>,
/// The bounds are the exact position and extents of the line with respect /// The bounds are the exact position and extents of the line with respect
/// to the parent box. /// to the parent box.
@ -101,7 +99,7 @@ pub struct Line {
/// ///
/// ...the bounds would be: /// ...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 /// The green zone is the greatest extent from wich a line can extend to
/// before it collides with a float. /// before it collides with a float.
/// ///
/// ~~~ /// ~~~text
/// +-----------------------+ /// +-----------------------+
/// |::::::::::::::::: | /// |::::::::::::::::: |
/// |:::::::::::::::::FFFFFF| /// |:::::::::::::::::FFFFFF|
@ -164,11 +162,9 @@ pub struct LineIndices {
/// ///
/// The fragments would be indexed as follows: /// The fragments would be indexed as follows:
/// ///
/// ~~~ /// | 0 | 1 | 2 | 3 |
/// | 0 | 1 | 2 | 3 | /// |------|------------------|---------|--------------|
/// |------|------------------|-------|--------------| /// | 'I ' | 'like truffles,' | `<img>` | ' yes I do.' |
/// | 'I ' | 'like truffles,' | <img> | ' yes I do.' |
/// ~~~
pub fragment_index: FragmentIndex, pub fragment_index: FragmentIndex,
/// The index of a character in a DOM fragment. Continuous runs of whitespace /// The index of a character in a DOM fragment. Continuous runs of whitespace
/// are treated as single characters. Non-breakable DOM fragments such as /// 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: /// The characters would be indexed as follows:
/// ///
/// ~~~
/// | 0 | 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | /// | 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 | , | | /// | I | | l | i | k | e | | t | r | u | f | f | l | e | s | , | |
/// ///
/// | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | /// | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
/// |-------|---|---|---|---|---|---|---|---|---|---| /// |---------|---|---|---|---|---|---|---|---|---|---|
/// | <img> | | y | e | s | | I | | d | o | . | /// | `<img>` | | y | e | s | | I | | d | o | . |
/// ~~~
pub char_index: CharIndex, pub char_index: CharIndex,
} }

View file

@ -0,0 +1,8 @@
<style>
.docblock table {
border-collapse: collapse;
}
.docblock table th, .docblock table td {
border: 1px solid #888;
}
</style>