    result.setFailIfMajorPerformanceCaveat(
        attrs.fail_if_major_performance_caveat);
    result.setCompatibleXRDevice(
-@@ -30,6 +31,7 @@ Platform::ContextAttributes ToPlatformContextAttributes(
+@@ -30,6 +30,7 @@ Platform::ContextAttributes ToPlatformContextAttributes(
      unsigned web_gl_version,
      bool support_own_offscreen_surface) {
    Platform::ContextAttributes result;
 +  result.prefer_integrated_gpu = attrs.power_preference == "low-power";
    result.fail_if_major_performance_caveat =
        attrs.fail_if_major_performance_caveat;
-   result.web_gl_version = web_gl_version;
-diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextAttributes.idl b/third_party/WebKit/Source/modules/webgl/WebGLContextAttributes.idl
+   result.context_type = web_gl_version == 2 ? Platform::kWebGL2ContextType
+diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl b/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl
 index 180673be9bd0..0af29cbc9402 100644
---- a/third_party/WebKit/Source/modules/webgl/WebGLContextAttributes.idl
-+++ b/third_party/WebKit/Source/modules/webgl/WebGLContextAttributes.idl
+--- a/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl
++++ b/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl
 @@ -26,6 +26,12 @@
  
  // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2

 [PermissiveDictionaryConversion]
 dictionary CanvasContextCreationAttributesModule {
     // This is an experimental feature, but it is not hidden behind a flag in
@@ -47,6 +53,7 @@ dictionary CanvasContextCreationAttributesModule {
     boolean antialias = true;
     boolean premultipliedAlpha = true;
     boolean preserveDrawingBuffer = false;
+    CanvasPowerPreference powerPreference = "default";
     boolean failIfMajorPerformanceCaveat = false;
     [RuntimeEnabled=WebXR] XRDevice compatibleXRDevice = null;
 };
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp b/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
index 332fa9fb0547..e8fae4b01c39 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp
@@ -18,6 +18,7 @@ WebGLContextAttributes ToWebGLContextAttributes(
   result.setAntialias(attrs.antialias);
   result.setPremultipliedAlpha(attrs.premultiplied_alpha);

   bool stencil = false;
 
   // This attribute is of type XRDevice, defined in modules/xr/XRDevice.h
diff --git a/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl b/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl
index 7419bb20d316..5b04af00fab4 100644
--- a/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl
+++ b/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl
@@ -28,6 +28,12 @@ enum CanvasPixelFormat {
     "float16",
 };
