| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3851 VisiblePosition startVisiblePosition = frame->visiblePositionForViewportPoin
t(startPoint); | 3851 VisiblePosition startVisiblePosition = frame->visiblePositionForViewportPoin
t(startPoint); |
| 3852 VisiblePosition endVisiblePosition = frame->visiblePositionForViewportPoint(
endPoint); | 3852 VisiblePosition endVisiblePosition = frame->visiblePositionForViewportPoint(
endPoint); |
| 3853 | 3853 |
| 3854 Position startPosition = startVisiblePosition.deepEquivalent(); | 3854 Position startPosition = startVisiblePosition.deepEquivalent(); |
| 3855 Position endPosition = endVisiblePosition.deepEquivalent(); | 3855 Position endPosition = endVisiblePosition.deepEquivalent(); |
| 3856 | 3856 |
| 3857 // document() will return null if -webkit-user-select is set to none. | 3857 // document() will return null if -webkit-user-select is set to none. |
| 3858 if (!startPosition.document() || !endPosition.document()) | 3858 if (!startPosition.document() || !endPosition.document()) |
| 3859 return; | 3859 return; |
| 3860 | 3860 |
| 3861 clipHtml = createMarkup(startPosition, endPosition, AnnotateForInterchange,
ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 3861 if (startPosition.compareTo(endPosition) <= 0) { |
| 3862 clipHtml = createMarkup(startPosition, endPosition, AnnotateForInterchan
ge, ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 3863 } else { |
| 3864 clipHtml = createMarkup(endPosition, startPosition, AnnotateForInterchan
ge, ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 3865 } |
| 3862 } | 3866 } |
| 3863 | 3867 |
| 3864 void WebViewImpl::hidePopups() | 3868 void WebViewImpl::hidePopups() |
| 3865 { | 3869 { |
| 3866 cancelPagePopup(); | 3870 cancelPagePopup(); |
| 3867 } | 3871 } |
| 3868 | 3872 |
| 3869 void WebViewImpl::setIsTransparent(bool isTransparent) | 3873 void WebViewImpl::setIsTransparent(bool isTransparent) |
| 3870 { | 3874 { |
| 3871 // Set any existing frames to be transparent. | 3875 // Set any existing frames to be transparent. |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4569 { | 4573 { |
| 4570 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4574 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4571 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4575 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4572 if (!page()) | 4576 if (!page()) |
| 4573 return 1; | 4577 return 1; |
| 4574 | 4578 |
| 4575 return page()->deviceScaleFactor(); | 4579 return page()->deviceScaleFactor(); |
| 4576 } | 4580 } |
| 4577 | 4581 |
| 4578 } // namespace blink | 4582 } // namespace blink |
| OLD | NEW |