Skip to content
Permalink
Browse files

Format remaining files

  • Loading branch information
pyfisch committed Nov 6, 2018
1 parent bf47f90 commit cb07debcb6f3d3561177ce536c320986720791b7
Showing with 5,976 additions and 3,776 deletions.
  1. +16 −24 components/allocator/lib.rs
  2. +9 −6 components/bluetooth/lib.rs
  3. +4 −2 components/bluetooth/test.rs
  4. +272 −157 components/canvas/canvas_data.rs
  5. +71 −126 components/canvas/canvas_paint_thread.rs
  6. +32 −28 components/canvas/gl_context.rs
  7. +2 −1 components/canvas/lib.rs
  8. +629 −485 components/canvas/webgl_thread.rs
  9. +70 −55 components/canvas_traits/canvas.rs
  10. +6 −4 components/canvas_traits/lib.rs
  11. +64 −25 components/canvas_traits/webgl.rs
  12. +21 −16 components/channel/lib.rs
  13. +2 −1 components/compositing/build.rs
  14. +21 −17 components/compositing/compositor.rs
  15. +6 −3 components/config/opts.rs
  16. +2 −1 components/config/prefs.rs
  17. +159 −106 components/constellation/constellation.rs
  18. +3 −1 components/constellation/network_listener.rs
  19. +7 −6 components/constellation/pipeline.rs
  20. +4 −2 components/debugger/lib.rs
  21. +6 −3 components/devtools/actors/console.rs
  22. +3 −4 components/devtools/actors/device.rs
  23. +12 −6 components/devtools/actors/inspector.rs
  24. +17 −10 components/devtools/actors/network_event.rs
  25. +4 −2 components/devtools/actors/performance.rs
  26. +0 −1 components/devtools/actors/stylesheets.rs
  27. +6 −3 components/devtools/actors/timeline.rs
  28. +23 −5 components/devtools/lib.rs
  29. +2 −1 components/dom_struct/lib.rs
  30. +3 −3 components/domobject_derive/lib.rs
  31. +4 −2 components/gfx/font.rs
  32. +8 −4 components/gfx/font_cache_thread.rs
  33. +2 −1 components/gfx/font_context.rs
  34. +13 −4 components/gfx/platform/freetype/android/font_list.rs
  35. +2 −1 components/gfx/platform/freetype/font.rs
  36. +2 −1 components/gfx/platform/freetype/font_template.rs
  37. +1 −2 components/gfx/platform/macos/font.rs
  38. +4 −2 components/gfx/platform/macos/font_template.rs
  39. +4 −2 components/gfx/platform/windows/font.rs
  40. +2 −1 components/gfx/platform/windows/font_template.rs
  41. +2 −1 components/gfx/tests/font_context.rs
  42. +2 −1 components/gfx/tests/font_template.rs
  43. +4 −3 components/gfx/text/glyph.rs
  44. +2 −1 components/gfx/text/text_run.rs
  45. +13 −7 components/layout/animation.rs
  46. +6 −3 components/layout/block.rs
  47. +3 −2 components/layout/construct.rs
  48. +2 −1 components/layout/display_list/items.rs
  49. +2 −1 components/layout/flex.rs
  50. +41 −33 components/layout/fragment.rs
  51. +10 −5 components/layout/inline.rs
  52. +2 −1 components/layout/list_item.rs
  53. +18 −12 components/layout/model.rs
  54. +2 −1 components/layout/multicol.rs
  55. +6 −7 components/layout/query.rs
  56. +2 −1 components/layout/table_cell.rs
  57. +10 −8 components/layout/table_wrapper.rs
  58. +2 −6 components/layout_thread/dom_wrapper.rs
  59. +7 −5 components/layout_thread/lib.rs
  60. +2 −1 components/malloc_size_of_derive/lib.rs
  61. +3 −4 components/net/cookie_storage.rs
  62. +15 −16 components/net/fetch/methods.rs
  63. +12 −16 components/net/http_loader.rs
  64. +3 −4 components/net/mime_classifier.rs
  65. +49 −31 components/net/tests/fetch.rs
  66. +32 −24 components/net/tests/hsts.rs
  67. +185 −143 components/net/tests/http_loader.rs
  68. +4 −1 components/pixels/lib.rs
  69. +6 −3 components/profile/mem.rs
  70. +26 −14 components/profile/time.rs
  71. +3 −6 components/profile_traits/ipc.rs
  72. +2 −1 components/profile_traits/mem.rs
  73. +4 −2 components/remutex/tests/smoke.rs
  74. +3 −2 components/script/body.rs
  75. +2 −1 components/script/build.rs
  76. +2 −1 components/script/devtools.rs
  77. +2 −1 components/script/document_loader.rs
  78. +40 −31 components/script/dom/analysernode.rs
  79. +9 −11 components/script/dom/audiobuffer.rs
  80. +13 −5 components/script/dom/baseaudiocontext.rs
  81. +2 −1 components/script/dom/bindings/settings_stack.rs
  82. +1 −1 components/script/dom/bindings/trace.rs
  83. +1 −1 components/script/dom/bindings/utils.rs
  84. +25 −21 components/script/dom/biquadfilternode.rs
  85. +4 −2 components/script/dom/bluetooth.rs
  86. +6 −3 components/script/dom/bluetoothdevice.rs
  87. +6 −3 components/script/dom/bluetoothremotegattcharacteristic.rs
  88. +2 −1 components/script/dom/bluetoothremotegattdescriptor.rs
  89. +2 −1 components/script/dom/bluetoothremotegattserver.rs
  90. +30 −12 components/script/dom/canvasrenderingcontext2d.rs
  91. +2 −1 components/script/dom/cssstyledeclaration.rs
  92. +7 −8 components/script/dom/csssupportsrule.rs
  93. +2 −1 components/script/dom/customelementregistry.rs
  94. +8 −4 components/script/dom/dedicatedworkerglobalscope.rs
  95. +44 −21 components/script/dom/document.rs
  96. +4 −2 components/script/dom/dommatrix.rs
  97. +9 −7 components/script/dom/element.rs
  98. +21 −10 components/script/dom/eventsource.rs
  99. +2 −1 components/script/dom/eventtarget.rs
  100. +2 −1 components/script/dom/filereader.rs
  101. +2 −1 components/script/dom/filereadersync.rs
  102. +2 −1 components/script/dom/formdata.rs
  103. +3 −3 components/script/dom/gainnode.rs
  104. +18 −9 components/script/dom/globalscope.rs
  105. +29 −20 components/script/dom/headers.rs
  106. +1 −1 components/script/dom/htmlbuttonelement.rs
  107. +1 −1 components/script/dom/htmlcanvaselement.rs
  108. +13 −11 components/script/dom/htmlelement.rs
  109. +46 −15 components/script/dom/htmlformelement.rs
  110. +2 −1 components/script/dom/htmliframeelement.rs
  111. +23 −17 components/script/dom/htmlimageelement.rs
  112. +10 −5 components/script/dom/htmlinputelement.rs
  113. +10 −6 components/script/dom/htmlmediaelement.rs
  114. +18 −15 components/script/dom/htmlscriptelement.rs
  115. +7 −3 components/script/dom/htmlsourceelement.rs
  116. +4 −2 components/script/dom/htmltableelement.rs
  117. +1 −5 components/script/dom/htmltablerowelement.rs
  118. +9 −8 components/script/dom/node.rs
  119. +2 −1 components/script/dom/paintrenderingcontext2d.rs
  120. +4 −2 components/script/dom/performance.rs
  121. +7 −11 components/script/dom/promiserejectionevent.rs
  122. +21 −13 components/script/dom/radionodelist.rs
  123. +2 −1 components/script/dom/range.rs
  124. +13 −8 components/script/dom/request.rs
  125. +8 −4 components/script/dom/servoparser/async_html.rs
  126. +2 −1 components/script/dom/servoparser/html.rs
  127. +15 −11 components/script/dom/servoparser/mod.rs
  128. +10 −5 components/script/dom/storage.rs
  129. +16 −5 components/script/dom/storageevent.rs
  130. +16 −13 components/script/dom/timeranges.rs
  131. +2 −2 components/script/dom/url.rs
  132. +2 −1 components/script/dom/urlsearchparams.rs
  133. +14 −7 components/script/dom/vrdisplay.rs
  134. +6 −5 components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs
  135. +6 −5 components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs
  136. +2 −1 components/script/dom/webgl_extensions/extensions.rs
  137. +17 −7 components/script/dom/webglrenderbuffer.rs
  138. +23 −10 components/script/dom/webglrenderingcontext.rs
  139. +3 −2 components/script/dom/websocket.rs
  140. +4 −2 components/script/dom/window.rs
  141. +5 −1 components/script/dom/worklet.rs
  142. +2 −1 components/script/dom/workletglobalscope.rs
  143. +81 −59 components/script/dom/xmlhttprequest.rs
  144. +2 −1 components/script/fetch.rs
  145. +43 −30 components/script/script_runtime.rs
  146. +54 −42 components/script/script_thread.rs
  147. +2 −1 components/script/serviceworker_manager.rs
  148. +5 −1 components/script/stylesheet_loader.rs
  149. +2 −1 components/script/task_queue.rs
  150. +2 −5 components/script/textinput.rs
  151. +26 −13 components/script/webdriver_handlers.rs
  152. +2 −1 components/script_layout_interface/wrapper_traits.rs
  153. +2 −1 components/selectors/matching.rs
  154. +75 −70 components/selectors/parser.rs
  155. +3 −1 components/selectors/tree.rs
  156. +8 −10 components/servo/lib.rs
  157. +9 −6 components/style/animation.rs
  158. +2 −1 components/style/build.rs
  159. +24 −12 components/style/build_gecko.rs
  160. +2 −1 components/style/counter_style/mod.rs
  161. +3 −10 components/style/custom_properties.rs
  162. +8 −13 components/style/dom_apis.rs
  163. +9 −8 components/style/font_face.rs
  164. +13 −9 components/style/gecko/conversions.rs
  165. +6 −6 components/style/gecko/media_features.rs
  166. +22 −22 components/style/gecko/non_ts_pseudo_class_list.rs
  167. +2 −9 components/style/gecko/url.rs
  168. +2 −1 components/style/gecko/values.rs
  169. +4 −2 components/style/gecko/wrapper.rs
  170. +14 −6 components/style/gecko_bindings/sugar/ns_css_value.rs
  171. +3 −1 components/style/gecko_bindings/sugar/ns_t_array.rs
  172. +2 −1 components/style/lib.rs
  173. +8 −9 components/style/matching.rs
  174. +2 −1 components/style/media_queries/media_query.rs
  175. +2 −1 components/style/rule_tree/mod.rs
  176. +4 −4 components/style/sharing/mod.rs
  177. +6 −3 components/style/style_adjuster.rs
  178. +2 −1 components/style/stylesheets/document_rule.rs
  179. +6 −3 components/style/stylesheets/keyframes_rule.rs
  180. +2 −1 components/style/stylesheets/mod.rs
  181. +57 −62 components/style/stylesheets/supports_rule.rs
  182. +4 −3 components/style/stylist.rs
  183. +6 −3 components/style/traversal.rs
  184. +3 −1 components/style/values/animated/font.rs
  185. +8 −2 components/style/values/animated/length.rs
  186. +8 −8 components/style/values/animated/mod.rs
  187. +21 −30 components/style/values/animated/svg.rs
  188. +2 −1 components/style/values/computed/angle.rs
  189. +14 −4 components/style/values/computed/length.rs
  190. +2 −1 components/style/values/computed/list.rs
  191. +2 −2 components/style/values/computed/svg.rs
  192. +4 −2 components/style/values/generics/basic_shape.rs
  193. +3 −1 components/style/values/generics/easing.rs
  194. +1 −1 components/style/values/generics/length.rs
  195. +15 −3 components/style/values/generics/ui.rs
  196. +3 −6 components/style/values/specified/angle.rs
  197. +6 −3 components/style/values/specified/basic_shape.rs
  198. +4 −2 components/style/values/specified/border.rs
  199. +1 −2 components/style/values/specified/calc.rs
  200. +4 −2 components/style/values/specified/counters.rs
  201. +3 −4 components/style/values/specified/easing.rs
  202. +8 −4 components/style/values/specified/font.rs
  203. +5 −2 components/style/values/specified/image.rs
  204. +4 −2 components/style/values/specified/source_size_list.rs
  205. +0 −1 components/style/values/specified/svg_path.rs
  206. +30 −20 components/style/values/specified/text.rs
  207. +6 −3 components/style_derive/cg.rs
  208. +2 −1 components/style_derive/to_css.rs
  209. +151 −62 components/webdriver_server/lib.rs
  210. +8 −4 components/webvr/webvr_thread.rs
  211. +82 −48 ports/libmlservo/src/lib.rs
  212. +15 −16 ports/libsimpleservo/src/api.rs
  213. +34 −24 ports/libsimpleservo/src/capi.rs
  214. +10 −2 ports/libsimpleservo/src/gl_glue.rs
  215. +39 −30 ports/libsimpleservo/src/jniapi.rs
  216. +0 −1 support/rust-task_info/src/lib.rs
  217. +13 −9 support/rust-task_info/src/task_basic_info.rs
  218. +12 −16 tests/unit/malloc_size_of/lib.rs
  219. +18 −9 tests/unit/metrics/interactive_time.rs
  220. +1 −1 tests/unit/metrics/paint_time.rs
  221. +14 −8 tests/unit/profile/time.rs
  222. +10 −8 tests/unit/script/headers.rs
  223. +104 −36 tests/unit/script/htmlareaelement.rs
  224. +107 −27 tests/unit/script/htmlimageelement.rs
  225. +22 −12 tests/unit/script/lib.rs
  226. +45 −9 tests/unit/script/origin.rs
  227. +71 −31 tests/unit/script/textinput.rs
  228. +11 −11 tests/unit/script_plugins/lib.rs
  229. +114 −58 tests/unit/style/animated_properties.rs
  230. +15 −11 tests/unit/style/attr.rs
  231. +16 −13 tests/unit/style/custom_properties.rs
  232. +6 −3 tests/unit/style/lib.rs
  233. +16 −8 tests/unit/style/parsing/animation.rs
  234. +170 −45 tests/unit/style/parsing/background.rs
  235. +44 −15 tests/unit/style/parsing/border.rs
  236. +23 −15 tests/unit/style/parsing/effects.rs
  237. +106 −56 tests/unit/style/parsing/image.rs
  238. +6 −4 tests/unit/style/parsing/inherited_text.rs
  239. +58 −34 tests/unit/style/parsing/mod.rs
  240. +0 −1 tests/unit/style/parsing/position.rs
  241. +7 −2 tests/unit/style/parsing/selectors.rs
  242. +4 −1 tests/unit/style/parsing/supports.rs
  243. +38 −7 tests/unit/style/parsing/transition_timing_function.rs
  244. +23 −19 tests/unit/style/properties/mod.rs
  245. +33 −7 tests/unit/style/properties/scaffolding.rs
  246. +226 −179 tests/unit/style/properties/serialization.rs
  247. +70 −45 tests/unit/style/rule_tree/bench.rs
  248. +35 −7 tests/unit/style/size_of.rs
  249. +5 −1 tests/unit/style/str.rs
  250. +348 −217 tests/unit/style/stylesheets.rs
  251. +92 −53 tests/unit/style/stylist.rs
  252. +412 −182 tests/unit/style/viewport.rs
@@ -30,31 +30,23 @@ mod platform {

// The minimum alignment guaranteed by the architecture. This value is used to
// add fast paths for low alignment values.
#[cfg(
all(
any(
target_arch = "arm",
target_arch = "mips",
target_arch = "mipsel",
target_arch = "powerpc"
)
)
)]
#[cfg(all(any(
target_arch = "arm",
target_arch = "mips",
target_arch = "mipsel",
target_arch = "powerpc"
)))]
const MIN_ALIGN: usize = 8;
#[cfg(
all(
any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "powerpc64",
target_arch = "powerpc64le",
target_arch = "mips64",
target_arch = "s390x",
target_arch = "sparc64"
)
)
)]
#[cfg(all(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "powerpc64",
target_arch = "powerpc64le",
target_arch = "mips64",
target_arch = "s390x",
target_arch = "sparc64"
)))]
const MIN_ALIGN: usize = 16;

fn layout_to_flags(align: usize, size: usize) -> c_int {
@@ -74,7 +74,8 @@ impl BluetoothThreadFactory for IpcSender<BluetoothRequest> {
BluetoothAdapter::init()
} else {
BluetoothAdapter::init_mock()
}.ok();
}
.ok();
thread::Builder::new()
.name("BluetoothThread".to_owned())
.spawn(move || {
@@ -465,8 +466,10 @@ impl BluetoothManager {
};

services.retain(|s| {
!uuid_is_blocklisted(&s.get_uuid().unwrap_or(String::new()), Blocklist::All) &&
self.allowed_services.get(device_id).map_or(false, |uuids| {
!uuid_is_blocklisted(&s.get_uuid().unwrap_or(String::new()), Blocklist::All) && self
.allowed_services
.get(device_id)
.map_or(false, |uuids| {
uuids.contains(&s.get_uuid().unwrap_or(String::new()))
})
});
@@ -556,9 +559,9 @@ impl BluetoothManager {
}

fn characteristic_is_cached(&self, characteristic_id: &str) -> bool {
self.cached_characteristics.contains_key(characteristic_id) &&
self.characteristic_to_service
.contains_key(characteristic_id)
self.cached_characteristics.contains_key(characteristic_id) && self
.characteristic_to_service
.contains_key(characteristic_id)
}

// Descriptor
@@ -294,14 +294,16 @@ fn create_generic_access_service(
NUMBER_OF_DIGITALS_UUID.to_owned(),
vec![49],
)?;
number_of_digitals_descriptor_1.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
number_of_digitals_descriptor_1
.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;

let number_of_digitals_descriptor_2 = create_descriptor_with_value(
&device_name_characteristic,
NUMBER_OF_DIGITALS_UUID.to_owned(),
vec![50],
)?;
number_of_digitals_descriptor_2.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
number_of_digitals_descriptor_2
.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;

// Characteristic User Description Descriptor
let _characteristic_user_description = create_descriptor_with_value(

0 comments on commit cb07deb

Please sign in to comment.
You can’t perform that action at this time.