[AI] Fix conflicts and builds for PR #12458 - #12466
[AI] Fix conflicts and builds for PR #12458#12466cobalt-github-releaser-bot wants to merge 2 commits into
Conversation
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
There was a problem hiding this comment.
Code Review
This pull request resolves merge conflicts to integrate Cobalt-specific changes, updating dependencies, build configurations, platform-specific code, and adding Blink stubs for WebXR and WebGPU. However, several critical issues must be addressed before merging. These include compilation errors caused by passing too many arguments to the BASE_FEATURE macro in base/features.cc and content_features.cc, a duplicate feature declaration in base/features.h, and a broken conflict resolution in render_widget_host_view_tvos_uiview.mm that incorrectly nests sendKeyboardEvent methods. Additionally, multiple style guide violations regarding indentation and formatting in render_widget_host_view_tvos_uiview.mm need to be corrected.
| BASE_FEATURE(kCobaltInProcessImageTransferCache, | ||
| "CobaltInProcessImageTransferCache", | ||
| FEATURE_DISABLED_BY_DEFAULT); |
There was a problem hiding this comment.
The BASE_FEATURE macro in this version of base only takes 2 arguments (the feature name and the default state). Passing 3 arguments will cause a compilation error. Please update kCobaltInProcessImageTransferCache to use the 2-argument form.
BASE_FEATURE(kCobaltInProcessImageTransferCache,
FEATURE_DISABLED_BY_DEFAULT);| BASE_FEATURE(kDoNotGenerateChromiumA11yTree, | ||
| "DoNotGenerateChromiumA11yTree", | ||
| BUILDFLAG(IS_COBALT) ? base::FEATURE_ENABLED_BY_DEFAULT | ||
| : base::FEATURE_DISABLED_BY_DEFAULT); |
There was a problem hiding this comment.
The BASE_FEATURE macro in this version of base only takes 2 arguments. Passing 3 arguments (including the string name) will cause a compilation error. Please update kDoNotGenerateChromiumA11yTree to use the 2-argument form.
BASE_FEATURE(kDoNotGenerateChromiumA11yTree,
BUILDFLAG(IS_COBALT) ? base::FEATURE_ENABLED_BY_DEFAULT
: base::FEATURE_DISABLED_BY_DEFAULT);| - (void)sendKeyboardEvent:(UIPress*)press eventType:(blink::WebInputEvent::Type)type { | ||
| input::NativeWebKeyboardEvent native_event = | ||
| input::NativeWebKeyboardEvent(base::apple::OwnedUIPress(press)); | ||
| if (!blink::WebInputEvent::IsKeyboardEventType(native_event.GetType())) { | ||
| // Helper method to send the keyboard event. | ||
| - (BOOL)sendKeyboardEvent:(UIPress*)press | ||
| >>>>>>> parent of c7607f4f00d (CONFLICTED Chromium Cherry pick: Revert Cobalt.) | ||
| eventType:(blink::WebInputEvent::Type)type { | ||
| input::NativeWebKeyboardEvent native_event = | ||
| input::NativeWebKeyboardEvent(base::apple::OwnedUIPress(press)); | ||
| if (!blink::WebInputEvent::IsKeyboardEventType(native_event.GetType())) { | ||
| <<<<<<< HEAD | ||
| return; | ||
| } | ||
| _view->SendKeyEvent(native_event); | ||
| } | ||
|
|
||
| // Helper method to generate WebKeyboardEvent with `direction`. | ||
| - (void)sendKeyEventWithDirection:(NavigationDirection)direction | ||
| eventType:(blink::WebInputEvent::Type)type { | ||
| ======= | ||
| return NO; | ||
| } | ||
| if (native_event.dom_code == static_cast<uint32_t>(ui::DomCode::NONE)) { |
There was a problem hiding this comment.
This is a critical compilation error. The conflict resolution has nested the BOOL returning version of sendKeyboardEvent inside the if block of the void returning version. Additionally, the void returning version is obsolete and should be completely removed. Please remove the outer void version and keep only the BOOL version.
- (BOOL)sendKeyboardEvent:(UIPress*)press
eventType:(blink::WebInputEvent::Type)type {
input::NativeWebKeyboardEvent native_event =
input::NativeWebKeyboardEvent(base::apple::OwnedUIPress(press));
if (!blink::WebInputEvent::IsKeyboardEventType(native_event.GetType())) {
return NO;
}
if (native_event.dom_code == static_cast<uint32_t>(ui::DomCode::NONE)) {
| RemoteButton button = remoteButtonFromPressType(press.type); | ||
| if (button == kNone) { | ||
| // Since UIPress has key information from the physical keyboard, | ||
| // NativeWebKeyboardEvent is built with it in `sendKeyboardEvent`. | ||
| needToHandleInFramework |= ![self sendKeyboardEvent:press eventType:type]; | ||
| >>>>>>> parent of c7607f4f00d (CONFLICTED Chromium Cherry pick: Revert Cobalt.) | ||
| continue; | ||
| needToHandleInFramework |= ![self sendKeyboardEvent:press eventType:type]; continue; | ||
| } |
There was a problem hiding this comment.
Fix the indentation of RemoteButton button and split the continue; statement onto its own line to adhere to the style guide and improve readability.
RemoteButton button = remoteButtonFromPressType(press.type);
if (button == kNone) {
// Since UIPress has key information from the physical keyboard,
// NativeWebKeyboardEvent is built with it in `sendKeyboardEvent`.
needToHandleInFramework |= ![self sendKeyboardEvent:press eventType:type];
continue;
}
References
- All code submitted to this repository must adhere to the established upstream Chromium style guides, which require proper indentation and statements on separate lines. (link)
| BOOL handled = [self handlePresses:presses | ||
| withType:blink::WebInputEvent::Type::kKeyUp]; | ||
| if (!handled) { | ||
| [super pressesEnded:presses withEvent:event]; | ||
| >>>>>>> parent of c7607f4f00d (CONFLICTED Chromium Cherry pick: Revert Cobalt.) | ||
| } | ||
| } } |
There was a problem hiding this comment.
Fix the indentation of BOOL handled and remove the duplicate closing brace } on line 375.
BOOL handled = [self handlePresses:presses
withType:blink::WebInputEvent::Type::kKeyUp];
if (!handled) {
[super pressesEnded:presses withEvent:event];
}
References
- All code submitted to this repository must adhere to the established upstream Chromium style guides, which require proper indentation and statements on separate lines. (link)
| BASE_EXPORT BASE_DECLARE_FEATURE(kBoostCompositorThreadsPriorityWhenIdle); | ||
| ======= | ||
|
|
||
| BASE_EXPORT BASE_DECLARE_FEATURE(kBoostCompositorThreadsPriorityWhenIdle); | ||
|
|
| - (BOOL)sendKeyEventWithRemoteButton:(RemoteButton)remoteButton | ||
| eventType:(blink::WebInputEvent::Type)type { | ||
| >>>>>>> parent of c7607f4f00d (CONFLICTED Chromium Cherry pick: Revert Cobalt.) | ||
| blink::WebKeyboardEvent event(type, blink::WebInputEvent::kNoModifiers, | ||
| eventType:(blink::WebInputEvent::Type)type { blink::WebKeyboardEvent event(type, blink::WebInputEvent::kNoModifiers, | ||
| ui::EventTimeForNow()); |
There was a problem hiding this comment.
Format the method body to start on a new line with proper indentation rather than on the same line as the method signature.
- (BOOL)sendKeyEventWithRemoteButton:(RemoteButton)remoteButton
eventType:(blink::WebInputEvent::Type)type {
blink::WebKeyboardEvent event(type, blink::WebInputEvent::kNoModifiers,
ui::EventTimeForNow());
References
- All code submitted to this repository must adhere to the established upstream Chromium style guides, which require proper indentation and statements on separate lines. (link)
Vertex AI Rebase Agent Resolution
Automated rebase resolution for target PR #12458.
experimental/rebase_agent_pr_pr_12458_0ade9ded66autoroll-chromium/main-to-staging