diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-04-13 17:12:25 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-04-16 17:20:15 -0400 |
commit | d04efe6037d275b606093941017adf22584d6fef (patch) | |
tree | 99bbe5af3d481b4ad75f03f715afed73c588ef71 /src | |
parent | b174a6439bffe849d368b6709b143b9225894026 (diff) | |
download | servo-d04efe6037d275b606093941017adf22584d6fef.tar.gz servo-d04efe6037d275b606093941017adf22584d6fef.zip |
Fix some private type in public signature warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/components/gfx/buffer_map.rs | 2 | ||||
-rw-r--r-- | src/components/gfx/platform/linux/font.rs | 2 | ||||
-rw-r--r-- | src/components/gfx/platform/linux/font_list.rs | 2 | ||||
-rw-r--r-- | src/components/gfx/render_task.rs | 4 | ||||
-rw-r--r-- | src/components/gfx/text/glyph.rs | 6 | ||||
-rw-r--r-- | src/components/gfx/text/util.rs | 2 | ||||
-rw-r--r-- | src/components/net/resource_task.rs | 6 | ||||
-rw-r--r-- | src/components/style/media_queries.rs | 4 | ||||
-rw-r--r-- | src/components/style/properties.rs.mako | 4 | ||||
-rw-r--r-- | src/components/style/style.rs | 10 | ||||
-rw-r--r-- | src/components/util/debug.rs | 4 | ||||
-rw-r--r-- | src/components/util/range.rs | 2 | ||||
-rw-r--r-- | src/components/util/time.rs | 2 | ||||
-rw-r--r-- | src/test/harness/contenttest/contenttest.rs | 2 |
14 files changed, 27 insertions, 25 deletions
diff --git a/src/components/gfx/buffer_map.rs b/src/components/gfx/buffer_map.rs index 7980e16c421..b968a14aa6b 100644 --- a/src/components/gfx/buffer_map.rs +++ b/src/components/gfx/buffer_map.rs @@ -15,7 +15,7 @@ use std::mem; /// needs it. pub struct BufferMap<T> { /// A HashMap that stores the Buffers. - map: HashMap<BufferKey, BufferValue<T>>, + priv map: HashMap<BufferKey, BufferValue<T>>, /// The current amount of memory stored by the BufferMap's buffers. mem: uint, /// The maximum allowed memory. Unused buffers will be deleted diff --git a/src/components/gfx/platform/linux/font.rs b/src/components/gfx/platform/linux/font.rs index ad6228c7533..2e49c9cbf81 100644 --- a/src/components/gfx/platform/linux/font.rs +++ b/src/components/gfx/platform/linux/font.rs @@ -46,7 +46,7 @@ impl FontTableMethods for FontTable { } } -enum FontSource { +pub enum FontSource { FontSourceMem(~[u8]), FontSourceFile(~str) } diff --git a/src/components/gfx/platform/linux/font_list.rs b/src/components/gfx/platform/linux/font_list.rs index 016c61069b6..0b71549185d 100644 --- a/src/components/gfx/platform/linux/font_list.rs +++ b/src/components/gfx/platform/linux/font_list.rs @@ -2,6 +2,8 @@ * 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/. */ +#[allow(uppercase_variables)]; + extern crate freetype; extern crate fontconfig; diff --git a/src/components/gfx/render_task.rs b/src/components/gfx/render_task.rs index c5cb216c1db..c0cd0f0865f 100644 --- a/src/components/gfx/render_task.rs +++ b/src/components/gfx/render_task.rs @@ -106,7 +106,7 @@ impl RenderChan { /// If we're using GPU rendering, this provides the metadata needed to create a GL context that /// is compatible with that of the main thread. -enum GraphicsContext { +pub enum GraphicsContext { CpuGraphicsContext, GpuGraphicsContext, } @@ -138,7 +138,7 @@ pub struct RenderTask<C> { epoch: Epoch, /// A data structure to store unused LayerBuffers - buffer_map: BufferMap<~LayerBuffer>, + priv buffer_map: BufferMap<~LayerBuffer>, } // If we implement this as a function, we get borrowck errors from borrowing diff --git a/src/components/gfx/text/glyph.rs b/src/components/gfx/text/glyph.rs index da3a58f6b05..45792e5ad6d 100644 --- a/src/components/gfx/text/glyph.rs +++ b/src/components/gfx/text/glyph.rs @@ -460,7 +460,7 @@ impl GlyphData { // through glyphs (either for a particular TextRun offset, or all glyphs). // Rather than eagerly assembling and copying glyph data, it only retrieves // values as they are needed from the GlyphStore, using provided offsets. -enum GlyphInfo<'a> { +pub enum GlyphInfo<'a> { SimpleGlyphInfo(&'a GlyphStore, uint), DetailGlyphInfo(&'a GlyphStore, uint, u16) } @@ -500,9 +500,9 @@ impl<'a> GlyphInfo<'a> { pub struct GlyphStore { // TODO(pcwalton): Allocation of this buffer is expensive. Consider a small-vector // optimization. - entry_buffer: ~[GlyphEntry], + priv entry_buffer: ~[GlyphEntry], - detail_store: DetailedGlyphStore, + priv detail_store: DetailedGlyphStore, is_whitespace: bool, } diff --git a/src/components/gfx/text/util.rs b/src/components/gfx/text/util.rs index 76a1d669f20..2d7b14fa206 100644 --- a/src/components/gfx/text/util.rs +++ b/src/components/gfx/text/util.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #[deriving(Eq)] -enum CompressionMode { +pub enum CompressionMode { CompressNone, CompressWhitespace, CompressWhitespaceNewline, diff --git a/src/components/net/resource_task.rs b/src/components/net/resource_task.rs index 27b05ac901b..db0318f1b0d 100644 --- a/src/components/net/resource_task.rs +++ b/src/components/net/resource_task.rs @@ -145,15 +145,15 @@ fn create_resource_task_with_loaders(loaders: ~[(~str, LoaderTaskFactory)]) -> R setup_port.recv() } -pub struct ResourceManager { +struct ResourceManager { from_client: Receiver<ControlMsg>, /// Per-scheme resource loaders loaders: ~[(~str, LoaderTaskFactory)], } -pub fn ResourceManager(from_client: Receiver<ControlMsg>, - loaders: ~[(~str, LoaderTaskFactory)]) -> ResourceManager { +fn ResourceManager(from_client: Receiver<ControlMsg>, + loaders: ~[(~str, LoaderTaskFactory)]) -> ResourceManager { ResourceManager { from_client : from_client, loaders : loaders, diff --git a/src/components/style/media_queries.rs b/src/components/style/media_queries.rs index ebc19b0c80d..91968ae1756 100644 --- a/src/components/style/media_queries.rs +++ b/src/components/style/media_queries.rs @@ -25,13 +25,13 @@ pub struct MediaQueryList { } // For now, this is a "Level 2 MQ", ie. a media type. -struct MediaQuery { +pub struct MediaQuery { media_type: MediaQueryType, // TODO: Level 3 MQ expressions } -enum MediaQueryType { +pub enum MediaQueryType { All, // Always true MediaType(MediaType), } diff --git a/src/components/style/properties.rs.mako b/src/components/style/properties.rs.mako index 37e302027bc..f137f8a48b8 100644 --- a/src/components/style/properties.rs.mako +++ b/src/components/style/properties.rs.mako @@ -4,7 +4,7 @@ // This file is a Mako template: http://www.makotemplates.org/ -#[allow(non_camel_case_types)]; +#[allow(non_camel_case_types, uppercase_variables)]; pub use servo_util::url::parse_url; use sync::Arc; @@ -1332,7 +1332,7 @@ pub enum PropertyDeclaration { } -enum PropertyDeclarationParseResult { +pub enum PropertyDeclarationParseResult { UnknownProperty, InvalidValue, ValidDeclaration, diff --git a/src/components/style/style.rs b/src/components/style/style.rs index b296b34c035..fc1c5453777 100644 --- a/src/components/style/style.rs +++ b/src/components/style/style.rs @@ -26,15 +26,19 @@ extern crate url; // Public API -pub use stylesheets::Stylesheet; +pub use stylesheets::{Stylesheet, CSSRule, StyleRule}; pub use selector_matching::{Stylist, StylesheetOrigin, UserAgentOrigin, AuthorOrigin, UserOrigin}; pub use selector_matching::{MatchedProperty}; -pub use properties::{cascade, PropertyDeclaration, ComputedValues, computed_values}; +pub use properties::{cascade, PropertyDeclaration, ComputedValues, computed_values, style_structs}; pub use properties::{PropertyDeclarationBlock, parse_style_attribute}; // Style attributes -pub use properties::{initial_values}; +pub use properties::{initial_values, CSSFloat, DeclaredValue, PropertyDeclarationParseResult}; +pub use properties::longhands; pub use errors::with_errors_silenced; pub use node::{TElement, TNode}; pub use selectors::{PseudoElement, Before, After, AttrSelector, SpecificNamespace, AnyNamespace}; +pub use selectors::{NamespaceConstraint, Selector, CompoundSelector, SimpleSelector, Combinator}; +pub use namespaces::NamespaceMap; +pub use media_queries::{MediaRule, MediaQueryList, MediaQuery, Device, MediaType, MediaQueryType}; mod stylesheets; mod errors; diff --git a/src/components/util/debug.rs b/src/components/util/debug.rs index 92b81891916..6bd32517138 100644 --- a/src/components/util/debug.rs +++ b/src/components/util/debug.rs @@ -2,10 +2,6 @@ * 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/. */ -#[feature(phase)]; -#[phase(syntax, link)] -extern crate log; - use std::io; use std::io::Writer; use std::cast::transmute; diff --git a/src/components/util/range.rs b/src/components/util/range.rs index 94c3e783df1..8940b6a952a 100644 --- a/src/components/util/range.rs +++ b/src/components/util/range.rs @@ -6,7 +6,7 @@ use std::cmp::{max, min}; use std::iter; use std::fmt; -enum RangeRelation { +pub enum RangeRelation { OverlapsBegin(/* overlap */ uint), OverlapsEnd(/* overlap */ uint), ContainedBy, diff --git a/src/components/util/time.rs b/src/components/util/time.rs index 0f5802c4d8b..a7536e6434b 100644 --- a/src/components/util/time.rs +++ b/src/components/util/time.rs @@ -105,7 +105,7 @@ type ProfilerBuckets = TreeMap<ProfilerCategory, ~[f64]>; // back end of the profiler that handles data aggregation and performance metrics pub struct Profiler { port: Receiver<ProfilerMsg>, - buckets: ProfilerBuckets, + priv buckets: ProfilerBuckets, last_msg: Option<ProfilerMsg>, } diff --git a/src/test/harness/contenttest/contenttest.rs b/src/test/harness/contenttest/contenttest.rs index 5a99b1cc236..49087c937b6 100644 --- a/src/test/harness/contenttest/contenttest.rs +++ b/src/test/harness/contenttest/contenttest.rs @@ -69,7 +69,7 @@ fn test_options(config: Config) -> TestOpts { } fn find_tests(config: Config) -> Vec<TestDescAndFn> { - let mut files_res = fs::readdir(&Path::new(config.source_dir)); + let files_res = fs::readdir(&Path::new(config.source_dir)); let mut files = match files_res { Ok(files) => files, _ => fail!("Error reading directory."), |