@@ -606,42 +606,23 @@ void NativeWindowWin::OnViewWasResized() {
606
606
DCHECK (web_view_);
607
607
gfx::Size sz = web_view_->size ();
608
608
int height = sz.height (), width = sz.width ();
609
- int radius = 1 ;
610
609
gfx::Path path;
611
- if (window_->IsMaximized () || window_->IsFullscreen ()) {
612
- // Don't round the corners when the window is maximized or fullscreen.
613
- path.addRect (0 , 0 , width, height);
614
- } else {
615
- if (!has_frame ()) {
616
- path.moveTo (0 , radius);
617
- path.lineTo (radius, 0 );
618
- path.lineTo (width - radius, 0 );
619
- path.lineTo (width, radius);
620
- } else {
621
- // Don't round the top corners in chrome-style frame mode.
622
- path.moveTo (0 , 0 );
623
- path.lineTo (width, 0 );
624
- }
625
- path.lineTo (width, height - radius - 1 );
626
- path.lineTo (width - radius - 1 , height);
627
- path.lineTo (radius + 1 , height);
628
- path.lineTo (0 , height - radius - 1 );
629
- path.close ();
630
- }
610
+ path.addRect (0 , 0 , width, height);
631
611
SetWindowRgn (web_contents ()->GetNativeView (), path.CreateNativeRegion (), 1 );
632
612
633
613
SkRegion* rgn = new SkRegion;
634
614
if (!window_->IsFullscreen ()) {
635
615
if (draggable_region ())
636
616
rgn->op (*draggable_region (), SkRegion::kUnion_Op );
637
617
if (!window_->IsMaximized ()) {
638
- if (!has_frame ())
618
+ if (!has_frame ()) {
639
619
rgn->op (0 , 0 , width, kResizeInsideBoundsSize , SkRegion::kUnion_Op );
640
- rgn->op (0 , 0 , kResizeInsideBoundsSize , height, SkRegion::kUnion_Op );
641
- rgn->op (width - kResizeInsideBoundsSize , 0 , width, height,
642
- SkRegion::kUnion_Op );
643
- rgn->op (0 , height - kResizeInsideBoundsSize , width, height,
644
- SkRegion::kUnion_Op );
620
+ rgn->op (0 , 0 , kResizeInsideBoundsSize , height, SkRegion::kUnion_Op );
621
+ rgn->op (width - kResizeInsideBoundsSize , 0 , width, height,
622
+ SkRegion::kUnion_Op );
623
+ rgn->op (0 , height - kResizeInsideBoundsSize , width, height,
624
+ SkRegion::kUnion_Op );
625
+ }
645
626
}
646
627
}
647
628
if (web_contents ()->GetRenderViewHost ()->GetView ())
0 commit comments