[WRTjs] Fix display and video rotation is not the same time issue 25/296525/2
authorzhaosy <shiyusy.zhao@samsung.com>
Mon, 31 Jul 2023 07:49:25 +0000 (15:49 +0800)
committerBot Blink <blinkbot@samsung.com>
Tue, 8 Aug 2023 02:20:55 +0000 (02:20 +0000)
Display and video both have it's own rotation, this two
rotation change info is not come in the same time.
So sometimes, webapp and video is separated for a moment.

Change-Id: I74f8841c5ba3168dba55ee60c0f585b7c4780683
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
wrt/src/browser/api/wrt_api_web_contents.cc

index ce07006fe23a9bcdefff2b7f41df22aa5c1c0cff..99c7aae08844103637949c61a735fd384196669d 100644 (file)
@@ -114,9 +114,6 @@ void WebContents::WillDraw(int new_rotation, gfx::Size frame_data_output_size) {
   const bool is_changed_portrait_to_portrait =
       (rotation_ == 0 && new_rotation == 180) ||
       (rotation_ == 180 && new_rotation == 0);
-  // landscape <--> portrait rotation
-  // 'is_frame_data_width_changed' is not working in pause->resume case
-  const bool is_orientation_changed = (((rotation_ + new_rotation) / 90) & 1);
   const bool is_frame_data_width_changed =
       frame_output_size_.width() != frame_data_output_size.width();
   // While javascript dialog(alert, etc.) is showing, renderer is blocked.
@@ -129,7 +126,7 @@ void WebContents::WillDraw(int new_rotation, gfx::Size frame_data_output_size) {
                                             rotation_ != new_rotation;
   if (is_manual_rotation_not_initialized || is_changed_landscape_to_landscape ||
       is_changed_portrait_to_portrait || is_frame_data_width_changed ||
-      is_showing_javascript_dialog || is_orientation_changed) {
+      is_showing_javascript_dialog) {
     rotation_ = new_rotation;
     frame_output_size_.set_width(frame_data_output_size.width());
     Evas_Object* window =