aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/hololens/.clang-format115
-rw-r--r--support/hololens/ServoApp/BrowserPage.cpp2
-rw-r--r--support/hololens/ServoApp/ServoControl/Servo.cpp33
-rw-r--r--support/hololens/ServoApp/ServoControl/ServoControl.cpp4
-rw-r--r--support/hololens/ServoApp/ServoControl/ServoControl.h10
5 files changed, 25 insertions, 139 deletions
diff --git a/support/hololens/.clang-format b/support/hololens/.clang-format
deleted file mode 100644
index a84532a0cf3..00000000000
--- a/support/hololens/.clang-format
+++ /dev/null
@@ -1,115 +0,0 @@
----
-Language: Cpp
-BasedOnStyle: Mozilla
-AccessModifierOffset: -2
-AlignAfterOpenBracket: Align
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlines: Right
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: All
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterDefinitionReturnType: None
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: false
-BinPackArguments: true
-BinPackParameters: true
-BraceWrapping:
- AfterClass: false
- AfterControlStatement: false
- AfterEnum: false
- AfterFunction: false
- AfterNamespace: false
- AfterObjCDeclaration: false
- AfterStruct: false
- AfterUnion: false
- AfterExternBlock: false
- BeforeCatch: false
- BeforeElse: false
- IndentBraces: false
- SplitEmptyFunction: true
- SplitEmptyRecord: true
- SplitEmptyNamespace: true
-BreakBeforeBinaryOperators: None
-BreakBeforeBraces: Attach
-BreakBeforeInheritanceComma: false
-BreakBeforeTernaryOperators: true
-BreakConstructorInitializersBeforeComma: false
-BreakConstructorInitializers: BeforeColon
-BreakAfterJavaFieldAnnotations: false
-BreakStringLiterals: true
-ColumnLimit: 80
-CommentPragmas: '^ IWYU pragma:'
-CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 4
-ContinuationIndentWidth: 4
-Cpp11BracedListStyle: true
-DerivePointerAlignment: false
-DisableFormat: false
-ExperimentalAutoDetectBinPacking: false
-FixNamespaceComments: true
-ForEachMacros:
- - foreach
- - Q_FOREACH
- - BOOST_FOREACH
-IncludeBlocks: Preserve
-IncludeCategories:
- - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
- Priority: 2
- - Regex: '^(<|"(gtest|gmock|isl|json)/)'
- Priority: 3
- - Regex: '.*'
- Priority: 1
-IncludeIsMainRegex: '(Test)?$'
-IndentCaseLabels: false
-IndentPPDirectives: None
-IndentWidth: 2
-IndentWrappedFunctionNames: false
-JavaScriptQuotes: Leave
-JavaScriptWrapImports: true
-KeepEmptyLinesAtTheStartOfBlocks: true
-MacroBlockBegin: ''
-MacroBlockEnd: ''
-MaxEmptyLinesToKeep: 1
-NamespaceIndentation: None
-ObjCBlockIndentWidth: 2
-ObjCSpaceAfterProperty: false
-ObjCSpaceBeforeProtocolList: true
-PenaltyBreakAssignment: 2
-PenaltyBreakBeforeFirstCallParameter: 19
-PenaltyBreakComment: 300
-PenaltyBreakFirstLessLess: 120
-PenaltyBreakString: 1000
-PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Right
-RawStringFormats:
- - Delimiter: pb
- Language: TextProto
- BasedOnStyle: google
-ReflowComments: true
-SortIncludes: false
-SortUsingDeclarations: true
-SpaceAfterCStyleCast: false
-SpaceAfterTemplateKeyword: true
-SpaceBeforeAssignmentOperators: true
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 1
-SpacesInAngles: false
-SpacesInContainerLiterals: true
-SpacesInCStyleCastParentheses: false
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-Standard: Cpp11
-TabWidth: 8
-UseTab: Never
-...
-
diff --git a/support/hololens/ServoApp/BrowserPage.cpp b/support/hololens/ServoApp/BrowserPage.cpp
index 61341dfcc29..a9de7e2942d 100644
--- a/support/hololens/ServoApp/BrowserPage.cpp
+++ b/support/hololens/ServoApp/BrowserPage.cpp
@@ -69,7 +69,7 @@ void BrowserPage::SetTransientMode(bool transient) {
navigationBar().Visibility(transient ? Visibility::Collapsed
: Visibility::Visible);
transientLoadingIndicator().Visibility(transient ? Visibility::Visible
- : Visibility::Collapsed);
+ : Visibility::Collapsed);
}
void BrowserPage::SetArgs(hstring args) { servoControl().SetArgs(args); }
diff --git a/support/hololens/ServoApp/ServoControl/Servo.cpp b/support/hololens/ServoApp/ServoControl/Servo.cpp
index 17aeb0d64e6..8c66e8cdeb3 100644
--- a/support/hololens/ServoApp/ServoControl/Servo.cpp
+++ b/support/hololens/ServoApp/ServoControl/Servo.cpp
@@ -47,17 +47,17 @@ void on_ime_state_changed(bool aShow) {
sServo->Delegate().OnServoIMEStateChanged(aShow);
}
-void set_clipboard_contents(const char* content) {
+void set_clipboard_contents(const char *content) {
// FIXME
}
-const char* get_clipboard_contents() {
+const char *get_clipboard_contents() {
// FIXME
return nullptr;
}
-Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height, float dpi,
- ServoDelegate &aDelegate)
+Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
+ float dpi, ServoDelegate &aDelegate)
: mWindowHeight(height), mWindowWidth(width), mDelegate(aDelegate) {
capi::CInitOptions o;
@@ -73,22 +73,23 @@ Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height, float dpi
// 7 filter modules.
/* Sample list of servo modules to filter.
static char *pfilters[] = {
- "servo",
- "simpleservo",
- "simpleservo::jniapi",
- "simpleservo::gl_glue::egl",
- // Show JS errors by default.
- "script::dom::bindings::error",
- // Show GL errors by default.
- "canvas::webgl_thread",
- "compositing::compositor",
- "constellation::constellation",
+ "servo",
+ "simpleservo",
+ "simpleservo::jniapi",
+ "simpleservo::gl_glue::egl",
+ // Show JS errors by default.
+ "script::dom::bindings::error",
+ // Show GL errors by default.
+ "canvas::webgl_thread",
+ "compositing::compositor",
+ "constellation::constellation",
};
*/
// Example Call when *pfilters[] is used:
// o.vslogger_mod_list = pfilters; // servo log modules
- // o.vslogger_mod_size = sizeof(pfilters) / sizeof(pfilters[0]) -1; // Important: Number of modules in pfilters
+ // o.vslogger_mod_size = sizeof(pfilters) / sizeof(pfilters[0]) -1; //
+ // Important: Number of modules in pfilters
o.vslogger_mod_list = NULL;
o.vslogger_mod_size = 0;
@@ -135,7 +136,7 @@ std::unique_ptr<char *> hstring2char(hstring hstr) {
char *str = new char[size];
size_t converted = 0;
wcstombs_s(&converted, str, size, wc, hstr.size());
- return std::make_unique<char*>(str);
+ return std::make_unique<char *>(str);
}
} // namespace winrt::servo
diff --git a/support/hololens/ServoApp/ServoControl/ServoControl.cpp b/support/hololens/ServoApp/ServoControl/ServoControl.cpp
index 47e6ab7b5c0..9e7323ae8f2 100644
--- a/support/hololens/ServoApp/ServoControl/ServoControl.cpp
+++ b/support/hololens/ServoApp/ServoControl/ServoControl.cpp
@@ -238,8 +238,8 @@ void ServoControl::Loop() {
if (mServo == nullptr) {
log("Entering loop");
ServoDelegate *sd = static_cast<ServoDelegate *>(this);
- mServo = std::make_unique<Servo>(mInitialURL, mArgs, panelWidth, panelHeight, mDPI,
- *sd);
+ mServo = std::make_unique<Servo>(mInitialURL, mArgs, panelWidth,
+ panelHeight, mDPI, *sd);
} else {
// FIXME: this will fail since create_task didn't pick the thread
// where Servo was running initially.
diff --git a/support/hololens/ServoApp/ServoControl/ServoControl.h b/support/hololens/ServoApp/ServoControl/ServoControl.h
index 816e68d095c..77645f6ffaf 100644
--- a/support/hololens/ServoApp/ServoControl/ServoControl.h
+++ b/support/hololens/ServoApp/ServoControl/ServoControl.h
@@ -118,12 +118,12 @@ private:
}
}
- void
- OnSurfaceTapped(IInspectable const &,
- Windows::UI::Xaml::Input::TappedRoutedEventArgs const &);
+ void OnSurfaceTapped(IInspectable const &,
+ Windows::UI::Xaml::Input::TappedRoutedEventArgs const &);
- void OnSurfacePointerPressed(IInspectable const &,
- Windows::UI::Xaml::Input::PointerRoutedEventArgs const &);
+ void OnSurfacePointerPressed(
+ IInspectable const &,
+ Windows::UI::Xaml::Input::PointerRoutedEventArgs const &);
void OnSurfacePointerCanceled(
IInspectable const &,