| 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 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2423 } | 2423 } |
| 2424 | 2424 |
| 2425 bool WebViewImpl::selectionTextDirection(WebTextDirection& start, WebTextDirecti
on& end) const | 2425 bool WebViewImpl::selectionTextDirection(WebTextDirection& start, WebTextDirecti
on& end) const |
| 2426 { | 2426 { |
| 2427 const LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); | 2427 const LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); |
| 2428 if (!frame) | 2428 if (!frame) |
| 2429 return false; | 2429 return false; |
| 2430 FrameSelection& selection = frame->selection(); | 2430 FrameSelection& selection = frame->selection(); |
| 2431 if (!selection.toNormalizedRange()) | 2431 if (!selection.toNormalizedRange()) |
| 2432 return false; | 2432 return false; |
| 2433 start = selection.start().primaryDirection() == RTL ? WebTextDirectionRightT
oLeft : WebTextDirectionLeftToRight; | 2433 start = toWebTextDirection(selection.start().primaryDirection()); |
| 2434 end = selection.end().primaryDirection() == RTL ? WebTextDirectionRightToLef
t : WebTextDirectionLeftToRight; | 2434 end = toWebTextDirection(selection.end().primaryDirection()); |
| 2435 return true; | 2435 return true; |
| 2436 } | 2436 } |
| 2437 | 2437 |
| 2438 bool WebViewImpl::isSelectionAnchorFirst() const | 2438 bool WebViewImpl::isSelectionAnchorFirst() const |
| 2439 { | 2439 { |
| 2440 if (const LocalFrame* frame = toLocalFrame(focusedWebCoreFrame())) | 2440 if (const LocalFrame* frame = toLocalFrame(focusedWebCoreFrame())) |
| 2441 return frame->selection().selection().isBaseFirst(); | 2441 return frame->selection().selection().isBaseFirst(); |
| 2442 return false; | 2442 return false; |
| 2443 } | 2443 } |
| 2444 | 2444 |
| (...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4258 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4258 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4259 | 4259 |
| 4260 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4260 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4261 return false; | 4261 return false; |
| 4262 | 4262 |
| 4263 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4263 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4264 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4264 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4265 } | 4265 } |
| 4266 | 4266 |
| 4267 } // namespace blink | 4267 } // namespace blink |
| OLD | NEW |