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 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3552 if (!frame) | 3552 if (!frame) |
3553 return; | 3553 return; |
3554 WebPoint startPoint(rect.x, rect.y); | 3554 WebPoint startPoint(rect.x, rect.y); |
3555 WebPoint endPoint(rect.x + rect.width, rect.y + rect.height); | 3555 WebPoint endPoint(rect.x + rect.width, rect.y + rect.height); |
3556 VisiblePosition startVisiblePosition = frame->visiblePositionForWindowPoint(
startPoint); | 3556 VisiblePosition startVisiblePosition = frame->visiblePositionForWindowPoint(
startPoint); |
3557 VisiblePosition endVisiblePosition = frame->visiblePositionForWindowPoint(en
dPoint); | 3557 VisiblePosition endVisiblePosition = frame->visiblePositionForWindowPoint(en
dPoint); |
3558 | 3558 |
3559 Position startPosition = startVisiblePosition.deepEquivalent(); | 3559 Position startPosition = startVisiblePosition.deepEquivalent(); |
3560 Position endPosition = endVisiblePosition.deepEquivalent(); | 3560 Position endPosition = endVisiblePosition.deepEquivalent(); |
3561 | 3561 |
3562 RefPtr<Range> range = Range::create(*startPosition.document(), startPosition
, endPosition); | 3562 RefPtrWillBeRawPtr<Range> range = Range::create(*startPosition.document(), s
tartPosition, endPosition); |
3563 if (!range) | 3563 if (!range) |
3564 return; | 3564 return; |
3565 | 3565 |
3566 clipHtml = createMarkup(range.get(), 0, AnnotateForInterchange, false, Resol
veNonLocalURLs); | 3566 clipHtml = createMarkup(range.get(), 0, AnnotateForInterchange, false, Resol
veNonLocalURLs); |
3567 } | 3567 } |
3568 | 3568 |
3569 void WebViewImpl::hidePopups() | 3569 void WebViewImpl::hidePopups() |
3570 { | 3570 { |
3571 hideSelectPopup(); | 3571 hideSelectPopup(); |
3572 if (m_pagePopup) | 3572 if (m_pagePopup) |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4214 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4214 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4215 | 4215 |
4216 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4216 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4217 return false; | 4217 return false; |
4218 | 4218 |
4219 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4219 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4220 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4220 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4221 } | 4221 } |
4222 | 4222 |
4223 } // namespace blink | 4223 } // namespace blink |
OLD | NEW |