| OLD | NEW |
| 1 # Browser View Resizer | 1 # Browser View Resizer |
| 2 | 2 |
| 3 To fix bug [458](http://code.google.com/p/chromium/issues/detail?id=458), which | 3 To fix bug [458](http://code.google.com/p/chromium/issues/detail?id=458), which |
| 4 identifies that it is hard to hit the thin window frame corner to resize the | 4 identifies that it is hard to hit the thin window frame corner to resize the |
| 5 window. It would be better to have a resize hit area (called widget from now on) | 5 window. It would be better to have a resize hit area (called widget from now on) |
| 6 in the corner, as we currently have for edit boxes for example. | 6 in the corner, as we currently have for edit boxes for example. |
| 7 | 7 |
| 8 [TOC] | 8 [TOC] |
| 9 | 9 |
| 10 ## Background | 10 ## Background |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 interactions to resize the browser. We can let Windows take care of properly | 85 interactions to resize the browser. We can let Windows take care of properly |
| 86 resizing the view by returning the HTBOTTOMLEFT or HTBOTTOMRIGHT flags from the | 86 resizing the view by returning the HTBOTTOMLEFT or HTBOTTOMRIGHT flags from the |
| 87 NCClientHitTest windows message handler when they occur over the resize widget. | 87 NCClientHitTest windows message handler when they occur over the resize widget. |
| 88 The browser view also takes care of changing the mouse cursor to the appropriate | 88 The browser view also takes care of changing the mouse cursor to the appropriate |
| 89 resizing arrows when the mouse hovers over the resize widget area. | 89 resizing arrows when the mouse hovers over the resize widget area. |
| 90 | 90 |
| 91 ### Without a Dynamic View | 91 ### Without a Dynamic View |
| 92 | 92 |
| 93 To make sure that the scroll bars (handled by `WebKit`) are not drawn on top of | 93 To make sure that the scroll bars (handled by `WebKit`) are not drawn on top of |
| 94 the resizer widget (or vice versa), we need to properly implement the callback | 94 the resizer widget (or vice versa), we need to properly implement the callback |
| 95 specifyinhg the rectangle covered by the resizer. This callback is implemented | 95 specifying the rectangle covered by the resizer. This callback is implemented |
| 96 on the `RenderWidget` class that can delegate to a derive class via a new | 96 on the `RenderWidget` class that can delegate to a derive class via a new |
| 97 virtual method which returns an empty rect on the base class. Via a series of | 97 virtual method which returns an empty rect on the base class. Via a series of |
| 98 delegate interface calls, we eventually get back to the browser view which can | 98 delegate interface calls, we eventually get back to the browser view which can |
| 99 return the size and position of the resize widget, but only if it is laid out on | 99 return the size and position of the resize widget, but only if it is laid out on |
| 100 top of the tabs view, it returns an empty rect when there is a dynamic view. | 100 top of the tabs view, it returns an empty rect when there is a dynamic view. |
| 101 | 101 |
| 102 To handle the drawing of the resize widget over the render widget, we need to | 102 To handle the drawing of the resize widget over the render widget, we need to |
| 103 add code to the Windows specific version of the render widget host view which | 103 add code to the Windows specific version of the render widget host view which |
| 104 receives the bitmap rendered by WebKit so it can layer the transparent bitmap | 104 receives the bitmap rendered by WebKit so it can layer the transparent bitmap |
| 105 used for the resize widget. That same render widget host view must also handle | 105 used for the resize widget. That same render widget host view must also handle |
| (...skipping 20 matching lines...) Expand all Loading... |
| 126 bottom portion of the browser view, since it would look weird to have a resize | 126 bottom portion of the browser view, since it would look weird to have a resize |
| 127 corner widget that is not in the real... corner... of the browser view ;-) | 127 corner widget that is not in the real... corner... of the browser view ;-) |
| 128 | 128 |
| 129 We may decide that we don't want to see the resize widget bitmap hide some | 129 We may decide that we don't want to see the resize widget bitmap hide some |
| 130 pixels from the tab contents (or dynamic view) yet we would still have the | 130 pixels from the tab contents (or dynamic view) yet we would still have the |
| 131 resizing functionality via the mouse interaction and also get visual feedback | 131 resizing functionality via the mouse interaction and also get visual feedback |
| 132 with the mouse cursor changes while we hover over the resize widget area. | 132 with the mouse cursor changes while we hover over the resize widget area. |
| 133 | 133 |
| 134 We may do more research to find a way to solve this problem in a single place as | 134 We may do more research to find a way to solve this problem in a single place as |
| 135 opposed to the current dual solution, but none was found so far. | 135 opposed to the current dual solution, but none was found so far. |
| OLD | NEW |