| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2009 Igalia S.L. | 4 * Copyright (C) 2009 Igalia S.L. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 264 |
| 265 static unsigned verticalScrollDistance(LocalFrame& frame) | 265 static unsigned verticalScrollDistance(LocalFrame& frame) |
| 266 { | 266 { |
| 267 Element* focusedElement = frame.document()->focusedElement(); | 267 Element* focusedElement = frame.document()->focusedElement(); |
| 268 if (!focusedElement) | 268 if (!focusedElement) |
| 269 return 0; | 269 return 0; |
| 270 LayoutObject* renderer = focusedElement->layoutObject(); | 270 LayoutObject* renderer = focusedElement->layoutObject(); |
| 271 if (!renderer || !renderer->isBox()) | 271 if (!renderer || !renderer->isBox()) |
| 272 return 0; | 272 return 0; |
| 273 LayoutBox& layoutBox = toLayoutBox(*renderer); | 273 LayoutBox& layoutBox = toLayoutBox(*renderer); |
| 274 const LayoutStyle* style = layoutBox.style(); | 274 const ComputedStyle* style = layoutBox.style(); |
| 275 if (!style) | 275 if (!style) |
| 276 return 0; | 276 return 0; |
| 277 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse
dElement->hasEditableStyle())) | 277 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse
dElement->hasEditableStyle())) |
| 278 return 0; | 278 return 0; |
| 279 int height = std::min<int>(layoutBox.clientHeight(), frame.view()->visibleHe
ight()); | 279 int height = std::min<int>(layoutBox.clientHeight(), frame.view()->visibleHe
ight()); |
| 280 return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFracti
onToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1)); | 280 return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFracti
onToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1)); |
| 281 } | 281 } |
| 282 | 282 |
| 283 static PassRefPtrWillBeRawPtr<Range> unionDOMRanges(Range* a, Range* b) | 283 static PassRefPtrWillBeRawPtr<Range> unionDOMRanges(Range* a, Range* b) |
| 284 { | 284 { |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 { | 1787 { |
| 1788 return m_command && m_command->isTextInsertion; | 1788 return m_command && m_command->isTextInsertion; |
| 1789 } | 1789 } |
| 1790 | 1790 |
| 1791 int Editor::Command::idForHistogram() const | 1791 int Editor::Command::idForHistogram() const |
| 1792 { | 1792 { |
| 1793 return isSupported() ? m_command->idForUserMetrics : 0; | 1793 return isSupported() ? m_command->idForUserMetrics : 0; |
| 1794 } | 1794 } |
| 1795 | 1795 |
| 1796 } // namespace blink | 1796 } // namespace blink |
| OLD | NEW |