зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #4171 - Fix spelling mistakes in comments (from jbcrail:fix-spelling); r=jdm
I only updated comments, not strings. Source-Repo: https://github.com/servo/servo Source-Revision: f451005f4fe075c849de2f3766f5bf84510b8465
This commit is contained in:
Родитель
3507757306
Коммит
928a39ceb6
|
@ -773,7 +773,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
|||
}
|
||||
}
|
||||
// Being here means either there are no pending frames, or none of the pending
|
||||
// changes would be overriden by changing the subframe associated with source_id.
|
||||
// changes would be overridden by changing the subframe associated with source_id.
|
||||
|
||||
let parent = source_frame.parent.clone();
|
||||
let subpage_id = source_frame.pipeline.subpage_id;
|
||||
|
|
|
@ -30,7 +30,7 @@ impl FontFamily {
|
|||
}
|
||||
}
|
||||
|
||||
/// Find a font in this family that matches a given desriptor.
|
||||
/// Find a font in this family that matches a given descriptor.
|
||||
fn find_font_for_style<'a>(&'a mut self, desc: &FontTemplateDescriptor, fctx: &FontContextHandle)
|
||||
-> Option<Arc<FontTemplateData>> {
|
||||
// TODO(Issue #189): optimize lookup for
|
||||
|
|
|
@ -213,11 +213,11 @@ impl FontHandleMethods for FontHandle {
|
|||
let max_advance = self.font_units_to_au(face.max_advance_width as f64);
|
||||
|
||||
// 'leading' is supposed to be the vertical distance between two baselines,
|
||||
// reflected by the height attibute in freetype. On OS X (w/ CTFont),
|
||||
// reflected by the height attribute in freetype. On OS X (w/ CTFont),
|
||||
// leading represents the distance between the bottom of a line descent to
|
||||
// the top of the next line's ascent or: (line_height - ascent - descent),
|
||||
// see http://stackoverflow.com/a/5635981 for CTFont implementation.
|
||||
// Convert using a formular similar to what CTFont returns for consistency.
|
||||
// Convert using a formula similar to what CTFont returns for consistency.
|
||||
let height = self.font_units_to_au(face.height as f64);
|
||||
let leading = height - (ascent + descent);
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ impl<'a> DetailedGlyphStore {
|
|||
return;
|
||||
}
|
||||
|
||||
// Sorting a unique vector is surprisingly hard. The follwing
|
||||
// Sorting a unique vector is surprisingly hard. The following
|
||||
// code is a good argument for using DVecs, but they require
|
||||
// immutable locations thus don't play well with freezing.
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ impl Drop for Shaper {
|
|||
impl Shaper {
|
||||
pub fn new(font: &mut Font) -> Shaper {
|
||||
unsafe {
|
||||
// Indirection for Rust Issue #6248, dynamic freeze scope artifically extended
|
||||
// Indirection for Rust Issue #6248, dynamic freeze scope artificially extended
|
||||
let font_ptr = font as *mut Font;
|
||||
let hb_face: *mut hb_face_t = hb_face_create_for_tables(get_font_table_func,
|
||||
font_ptr as *mut c_void,
|
||||
|
@ -282,7 +282,7 @@ impl Shaper {
|
|||
let mut y_pos = Au(0);
|
||||
|
||||
// main loop over each glyph. each iteration usually processes 1 glyph and 1+ chars.
|
||||
// in cases with complex glyph-character assocations, 2+ glyphs and 1+ chars can be
|
||||
// in cases with complex glyph-character associations, 2+ glyphs and 1+ chars can be
|
||||
// processed.
|
||||
while glyph_span.begin() < glyph_count {
|
||||
// start by looking at just one glyph.
|
||||
|
|
|
@ -237,7 +237,7 @@ impl Floats {
|
|||
|
||||
// FIXME(eatkinson): This assertion is too strong and fails in some cases. It is OK to
|
||||
// return negative inline-sizes since we check against that inline-end away, but we should
|
||||
// still undersrtand why they occur and add a stronger assertion here.
|
||||
// still understand why they occur and add a stronger assertion here.
|
||||
// assert!(max_inline-start < min_inline-end);
|
||||
|
||||
assert!(block_start <= block_end, "Float position error");
|
||||
|
|
|
@ -128,7 +128,7 @@ pub struct Line {
|
|||
/// ~~~
|
||||
pub bounds: LogicalRect<Au>,
|
||||
|
||||
/// The green zone is the greatest extent from wich a line can extend to
|
||||
/// The green zone is the greatest extent from which a line can extend to
|
||||
/// before it collides with a float.
|
||||
///
|
||||
/// ~~~text
|
||||
|
@ -307,7 +307,7 @@ impl LineBreaker {
|
|||
let splittable = first_fragment.can_split();
|
||||
debug!("LineBreaker: fragment size: {}, splittable: {}", first_fragment_size, splittable);
|
||||
|
||||
// Initally, pretend a splittable fragment has zero inline-size. We will move it later if
|
||||
// Initially, pretend a splittable fragment has zero inline-size. We will move it later if
|
||||
// it has nonzero inline-size and that causes problems.
|
||||
let placement_inline_size = if splittable {
|
||||
Au(0)
|
||||
|
|
|
@ -250,7 +250,7 @@ fn bounding_box_for_run_metrics(metrics: &RunMetrics, writing_mode: WritingMode)
|
|||
None => {}
|
||||
}
|
||||
|
||||
// In vertical sideways or horizontal upgright text,
|
||||
// In vertical sideways or horizontal upright text,
|
||||
// the "width" of text metrics is always inline
|
||||
// This will need to be updated when other text orientations are supported.
|
||||
LogicalSize::new(
|
||||
|
|
|
@ -138,7 +138,7 @@ struct ImageCache {
|
|||
port: Receiver<Msg>,
|
||||
/// A copy of the shared chan to give to child tasks
|
||||
chan: Sender<Msg>,
|
||||
/// The state of processsing an image for a URL
|
||||
/// The state of processing an image for a URL
|
||||
state_map: HashMap<Url, ImageState>,
|
||||
/// List of clients waiting on a WaitForImage response
|
||||
wait_map: HashMap<Url, Arc<Mutex<Vec<Sender<ImageResponseMsg>>>>>,
|
||||
|
|
|
@ -124,7 +124,7 @@ impl<NodeAddress: Send> LocalImageCache<NodeAddress> {
|
|||
// Need to reflow when the image is available
|
||||
// FIXME: Instead we should be just passing a Future
|
||||
// to the caller, then to the display list. Finally,
|
||||
// the compositor should be resonsible for waiting
|
||||
// the compositor should be responsible for waiting
|
||||
// on the image to load and triggering layout
|
||||
let image_cache_task = self.image_cache_task.clone();
|
||||
assert!(self.on_image_available.is_some());
|
||||
|
|
|
@ -56,7 +56,7 @@ impl CORSRequest {
|
|||
return Ok(None); // Not cross-origin, proceed with a normal fetch
|
||||
}
|
||||
match destination.scheme.as_slice() {
|
||||
// Todo: If the request's same origin data url flag is set (which isn't the case for XHR)
|
||||
// TODO: If the request's same origin data url flag is set (which isn't the case for XHR)
|
||||
// we can fetch a data URL normally. about:blank can also be fetched by XHR
|
||||
"http" | "https" => {
|
||||
let mut req = CORSRequest::new(referer, destination, mode, method, headers);
|
||||
|
|
|
@ -105,7 +105,7 @@ interface TestInterface {
|
|||
TestInterface? receiveNullableSelf();
|
||||
TestInterface receiveWeakSelf();
|
||||
TestInterface? receiveWeakNullableSelf();
|
||||
// A verstion to test for casting to TestInterface&
|
||||
// A version to test for casting to TestInterface&
|
||||
void passSelf(TestInterface arg);
|
||||
// A version we can use to test for the exact type passed in
|
||||
void passSelf2(TestInterface arg);
|
||||
|
@ -136,7 +136,7 @@ interface TestInterface {
|
|||
TestNonCastableInterface? receiveNullableOther();
|
||||
TestNonCastableInterface receiveWeakOther();
|
||||
TestNonCastableInterface? receiveWeakNullableOther();
|
||||
// A verstion to test for casting to TestNonCastableInterface&
|
||||
// A version to test for casting to TestNonCastableInterface&
|
||||
void passOther(TestNonCastableInterface arg);
|
||||
// A version we can use to test for the exact type passed in
|
||||
void passOther2(TestNonCastableInterface arg);
|
||||
|
@ -153,7 +153,7 @@ interface TestInterface {
|
|||
TestExternalInterface? receiveNullableExternal();
|
||||
TestExternalInterface receiveWeakExternal();
|
||||
TestExternalInterface? receiveWeakNullableExternal();
|
||||
// A verstion to test for casting to TestExternalInterface&
|
||||
// A version to test for casting to TestExternalInterface&
|
||||
void passExternal(TestExternalInterface arg);
|
||||
// A version we can use to test for the exact type passed in
|
||||
void passExternal2(TestExternalInterface arg);
|
||||
|
@ -170,7 +170,7 @@ interface TestInterface {
|
|||
TestCallbackInterface? receiveNullableCallbackInterface();
|
||||
TestCallbackInterface receiveWeakCallbackInterface();
|
||||
TestCallbackInterface? receiveWeakNullableCallbackInterface();
|
||||
// A verstion to test for casting to TestCallbackInterface&
|
||||
// A version to test for casting to TestCallbackInterface&
|
||||
void passCallbackInterface(TestCallbackInterface arg);
|
||||
// A version we can use to test for the exact type passed in
|
||||
void passCallbackInterface2(TestCallbackInterface arg);
|
||||
|
|
|
@ -252,7 +252,7 @@ impl XMLHttpRequest {
|
|||
let (chan, cors_port) = channel();
|
||||
let req2 = req.clone();
|
||||
// TODO: this exists only to make preflight check non-blocking
|
||||
// perhaps shoud be handled by the resource_loader?
|
||||
// perhaps should be handled by the resource_loader?
|
||||
spawn_named("XHR:Cors", proc() {
|
||||
let response = req2.http_fetch();
|
||||
chan.send(response);
|
||||
|
|
|
@ -262,7 +262,7 @@ pub fn parse_media_query_list(input: &[ComponentValue]) -> MediaQueryList {
|
|||
}
|
||||
|
||||
// Add the media query if it was valid and no trailing tokens were found.
|
||||
// Otherwse, create a 'not all' media query, that will never match.
|
||||
// Otherwise, create a 'not all' media query, that will never match.
|
||||
let media_query = match (media_query_result, trailing_tokens) {
|
||||
(Ok(media_query), false) => media_query,
|
||||
_ => MediaQuery::new(Some(Not), All, vec!()),
|
||||
|
|
|
@ -663,7 +663,7 @@ fn matches_compound_selector<'a,E,N>(selector: &CompoundSelector,
|
|||
/// candidates for "d1" becomes less than before and d1 .
|
||||
///
|
||||
/// The next example is siblings. When the selector "b1 + b2 ~ d1 a" is
|
||||
/// providied and we cannot *find* an appropriate brother node for b1,
|
||||
/// provided and we cannot *find* an appropriate brother node for b1,
|
||||
/// the selector matching raises NotMatchedAndRestartFromClosestDescendant.
|
||||
/// The selectors ("b1 + b2 ~") doesn't match and matching restart from "d1".
|
||||
///
|
||||
|
|
|
@ -46,7 +46,7 @@ impl Stylesheet {
|
|||
mut input: I, base_url: Url, protocol_encoding_label: Option<&str>,
|
||||
environment_encoding: Option<EncodingRef>, origin: StylesheetOrigin) -> Stylesheet {
|
||||
let mut bytes = vec!();
|
||||
// TODO: incremental decoding and tokinization/parsing
|
||||
// TODO: incremental decoding and tokenization/parsing
|
||||
for chunk in input {
|
||||
bytes.push_all(chunk.as_slice())
|
||||
}
|
||||
|
|
|
@ -25,13 +25,13 @@ impl WritingMode {
|
|||
self.intersects(FLAG_VERTICAL)
|
||||
}
|
||||
|
||||
/// Asuming .is_vertical(), does the block direction go left to right?
|
||||
/// Assuming .is_vertical(), does the block direction go left to right?
|
||||
#[inline]
|
||||
pub fn is_vertical_lr(&self) -> bool {
|
||||
self.intersects(FLAG_VERTICAL_LR)
|
||||
}
|
||||
|
||||
/// Asuming .is_vertical(), does the inline direction go top to bottom?
|
||||
/// Assuming .is_vertical(), does the inline direction go top to bottom?
|
||||
#[inline]
|
||||
pub fn is_inline_tb(&self) -> bool {
|
||||
!(self.intersects(FLAG_SIDEWAYS_LEFT) ^ self.intersects(FLAG_RTL))
|
||||
|
@ -403,7 +403,7 @@ impl<T: Copy + Sub<T, T>> LogicalPoint<T> {
|
|||
|
||||
impl<T: Add<T,T>> LogicalPoint<T> {
|
||||
/// This doesn’t really makes sense,
|
||||
/// but happens when dealing with mutliple origins.
|
||||
/// but happens when dealing with multiple origins.
|
||||
#[inline]
|
||||
pub fn add_point(&self, other: &LogicalPoint<T>) -> LogicalPoint<T> {
|
||||
self.debug_writing_mode.check_debug(other.debug_writing_mode);
|
||||
|
|
|
@ -864,7 +864,7 @@ pub struct _cef_browser_host_t {
|
|||
|
||||
//
|
||||
// Search for |searchText|. |identifier| can be used to have multiple searches
|
||||
// running simultaniously. |forward| indicates whether to search forward or
|
||||
// running simultaneously. |forward| indicates whether to search forward or
|
||||
// backward within the page. |matchCase| indicates whether the search should
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up.
|
||||
|
@ -1089,7 +1089,7 @@ pub struct _cef_browser_host_t {
|
|||
// being cancelled. |x| and |y| are mouse coordinates relative to the upper-
|
||||
// left corner of the view. If the web view is both the drag source and the
|
||||
// drag target then all DragTarget* functions should be called before
|
||||
// DragSource* mthods. This function is only used when window rendering is
|
||||
// DragSource* methods. This function is only used when window rendering is
|
||||
// disabled.
|
||||
//
|
||||
pub drag_source_ended_at: Option<extern "C" fn(this: *mut cef_browser_host_t,
|
||||
|
@ -1101,7 +1101,7 @@ pub struct _cef_browser_host_t {
|
|||
// cef_render_handler_t::StartDragging call has completed. This function may
|
||||
// be called immediately without first calling DragSourceEndedAt to cancel a
|
||||
// drag operation. If the web view is both the drag source and the drag target
|
||||
// then all DragTarget* functions should be called before DragSource* mthods.
|
||||
// then all DragTarget* functions should be called before DragSource* methods.
|
||||
// This function is only used when window rendering is disabled.
|
||||
//
|
||||
pub drag_source_system_drag_ended: Option<extern "C" fn(
|
||||
|
@ -1416,7 +1416,7 @@ impl CefBrowserHost {
|
|||
|
||||
//
|
||||
// Search for |searchText|. |identifier| can be used to have multiple searches
|
||||
// running simultaniously. |forward| indicates whether to search forward or
|
||||
// running simultaneously. |forward| indicates whether to search forward or
|
||||
// backward within the page. |matchCase| indicates whether the search should
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up.
|
||||
|
@ -1888,7 +1888,7 @@ impl CefBrowserHost {
|
|||
// being cancelled. |x| and |y| are mouse coordinates relative to the upper-
|
||||
// left corner of the view. If the web view is both the drag source and the
|
||||
// drag target then all DragTarget* functions should be called before
|
||||
// DragSource* mthods. This function is only used when window rendering is
|
||||
// DragSource* methods. This function is only used when window rendering is
|
||||
// disabled.
|
||||
//
|
||||
pub fn drag_source_ended_at(&self, x: libc::c_int, y: libc::c_int,
|
||||
|
@ -1911,7 +1911,7 @@ impl CefBrowserHost {
|
|||
// cef_render_handler_t::StartDragging call has completed. This function may
|
||||
// be called immediately without first calling DragSourceEndedAt to cancel a
|
||||
// drag operation. If the web view is both the drag source and the drag target
|
||||
// then all DragTarget* functions should be called before DragSource* mthods.
|
||||
// then all DragTarget* functions should be called before DragSource* methods.
|
||||
// This function is only used when window rendering is disabled.
|
||||
//
|
||||
pub fn drag_source_system_drag_ended(&self) -> () {
|
||||
|
|
|
@ -274,7 +274,7 @@ impl CefWrap<*mut cef_context_menu_handler_t> for Option<CefContextMenuHandler>
|
|||
|
||||
|
||||
//
|
||||
// Provides information about the context menu state. The ethods of this
|
||||
// Provides information about the context menu state. The methods of this
|
||||
// structure can only be accessed on browser process the UI thread.
|
||||
//
|
||||
#[repr(C)]
|
||||
|
@ -438,7 +438,7 @@ pub type cef_context_menu_params_t = _cef_context_menu_params_t;
|
|||
|
||||
|
||||
//
|
||||
// Provides information about the context menu state. The ethods of this
|
||||
// Provides information about the context menu state. The methods of this
|
||||
// structure can only be accessed on browser process the UI thread.
|
||||
//
|
||||
pub struct CefContextMenuParams {
|
||||
|
|
|
@ -95,7 +95,7 @@ pub struct _cef_life_span_handler_t {
|
|||
browser: *mut interfaces::cef_browser_t) -> libc::c_int>,
|
||||
|
||||
//
|
||||
// Called when a browser has recieved a request to close. This may result
|
||||
// Called when a browser has received a request to close. This may result
|
||||
// directly from a call to cef_browser_host_t::close_browser() or indirectly
|
||||
// if the browser is a top-level OS window created by CEF and the user
|
||||
// attempts to close the window. This function will be called after the
|
||||
|
@ -318,7 +318,7 @@ impl CefLifeSpanHandler {
|
|||
}
|
||||
|
||||
//
|
||||
// Called when a browser has recieved a request to close. This may result
|
||||
// Called when a browser has received a request to close. This may result
|
||||
// directly from a call to cef_browser_host_t::close_browser() or indirectly
|
||||
// if the browser is a top-level OS window created by CEF and the user
|
||||
// attempts to close the window. This function will be called after the
|
||||
|
|
|
@ -1168,7 +1168,7 @@ pub struct _cef_v8value_t {
|
|||
pub get_int_value: Option<extern "C" fn(this: *mut cef_v8value_t) -> i32>,
|
||||
|
||||
//
|
||||
// Return an unisgned int value. The underlying data will be converted to if
|
||||
// Return an unsigned int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
//
|
||||
pub get_uint_value: Option<extern "C" fn(this: *mut cef_v8value_t) -> u32>,
|
||||
|
@ -1714,7 +1714,7 @@ impl CefV8Value {
|
|||
}
|
||||
|
||||
//
|
||||
// Return an unisgned int value. The underlying data will be converted to if
|
||||
// Return an unsigned int value. The underlying data will be converted to if
|
||||
// necessary.
|
||||
//
|
||||
pub fn get_uint_value(&self) -> u32 {
|
||||
|
|
|
@ -385,7 +385,7 @@ pub struct cef_key_event {
|
|||
pub windows_key_code: c_int,
|
||||
|
||||
//
|
||||
// The actual key code genenerated by the platform.
|
||||
// The actual key code generated by the platform.
|
||||
//
|
||||
pub native_key_code: c_int,
|
||||
|
||||
|
@ -761,7 +761,7 @@ pub struct cef_settings {
|
|||
|
||||
//
|
||||
// Opaque background color used for accelerated content. By default the
|
||||
// background color will be white. Only the RGB compontents of the specified
|
||||
// background color will be white. Only the RGB components of the specified
|
||||
// value will be used. The alpha component must greater than 0 to enable use
|
||||
// of the background color but will be otherwise ignored.
|
||||
//
|
||||
|
@ -1441,7 +1441,7 @@ pub struct _cef_geoposition_t {
|
|||
pub speed: c_double,
|
||||
|
||||
//
|
||||
// Time of position measurement in miliseconds since Epoch in UTC time. This
|
||||
// Time of position measurement in milliseconds since Epoch in UTC time. This
|
||||
// is taken from the host computer's system clock.
|
||||
//
|
||||
pub timestamp: cef_time_t,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/* picture setup */
|
||||
#top { margin: 100em 3em 0; padding: 2em 0 0 .5em; text-align: left; font: 2em/24px sans-serif; color: navy; white-space: pre; } /* "Hello World!" text */
|
||||
.picture { position: relative; border: 1em solid transparent; margin: 0 0 100em 3em; } /* containing block for face */
|
||||
.picture { background: red; } /* overriden by preferred stylesheet below */
|
||||
.picture { background: red; } /* overridden by preferred stylesheet below */
|
||||
|
||||
/* top line of face (scalp): fixed positioning and min/max height/width */
|
||||
.picture p { position: fixed; margin: 0; padding: 0; border: 0; top: 9em; left: 11em; width: 140%; max-width: 4em; height: 8px; min-height: 1em; max-height: 2mm; /* min-height overrides max-height, see 10.7 */ background: black; border-bottom: 0.5em yellow solid; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче