IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1430 | 1430 | var currentScroll = win.getScrollPosition().y; |
1431 | 1431 | if ( offset > currentScroll || offset < currentScroll - winHeight ) |
1432 | 1432 | win.$.scrollTo( 0, offset ); |
| 1433 | |
| 1434 | // Check whether the host page need to scroll too. (#7946) |
| 1435 | var doc = CKEDITOR.document; |
| 1436 | if ( !this.getDocument().equals( doc ) ) |
| 1437 | { |
| 1438 | var rect = this.$.getBoundingClientRect(), |
| 1439 | pos = this.getDocumentPosition( doc ), |
| 1440 | marker = new CKEDITOR.dom.element( 'div', doc ); |
| 1441 | |
| 1442 | // marker will of the same size of the current. |
| 1443 | marker.setStyles( |
| 1444 | { |
| 1445 | position : 'absolute', |
| 1446 | visibility : 'hidden', |
| 1447 | left : pos.x + 'px', |
| 1448 | top : pos.y + 'px', |
| 1449 | width : ( rect.width || rect.right - rect.left ) + 'px', |
| 1450 | height : ( rect.height || rect.top - rect.bottom ) + 'px' |
| 1451 | }); |
| 1452 | doc.getBody().append( marker ); |
| 1453 | |
| 1454 | rect = marker.$.getBoundingClientRect(); |
| 1455 | winHeight = doc.getWindow().getViewPaneSize().height; |
| 1456 | |
| 1457 | // Scroll host page only when client rectangle is outside of viewport. |
| 1458 | if ( rect.bottom < 0 || rect.top > winHeight ) |
| 1459 | marker.$.scrollIntoView( alignTop ); |
| 1460 | |
| 1461 | marker.remove(); |
| 1462 | } |
1433 | 1463 | }, |
1434 | 1464 | |
1435 | 1465 | setState : function( state ) |