| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 return 0; | 252 return 0; |
| 253 RenderObject* renderer = focusedElement->renderer(); | 253 RenderObject* renderer = focusedElement->renderer(); |
| 254 if (!renderer || !renderer->isBox()) | 254 if (!renderer || !renderer->isBox()) |
| 255 return 0; | 255 return 0; |
| 256 RenderStyle* style = renderer->style(); | 256 RenderStyle* style = renderer->style(); |
| 257 if (!style) | 257 if (!style) |
| 258 return 0; | 258 return 0; |
| 259 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse
dElement->rendererIsEditable())) | 259 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse
dElement->rendererIsEditable())) |
| 260 return 0; | 260 return 0; |
| 261 int height = std::min<int>(toRenderBox(renderer)->clientHeight(), frame->vie
w()->visibleHeight()); | 261 int height = std::min<int>(toRenderBox(renderer)->clientHeight(), frame->vie
w()->visibleHeight()); |
| 262 return static_cast<unsigned>(max(max<int>(height * Scrollbar::minFractionToS
tepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()), 1)); | 262 return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFracti
onToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1)); |
| 263 } | 263 } |
| 264 | 264 |
| 265 static RefPtr<Range> unionDOMRanges(Range* a, Range* b) | 265 static RefPtr<Range> unionDOMRanges(Range* a, Range* b) |
| 266 { | 266 { |
| 267 Range* start = a->compareBoundaryPoints(Range::START_TO_START, b, ASSERT_NO_
EXCEPTION) <= 0 ? a : b; | 267 Range* start = a->compareBoundaryPoints(Range::START_TO_START, b, ASSERT_NO_
EXCEPTION) <= 0 ? a : b; |
| 268 Range* end = a->compareBoundaryPoints(Range::END_TO_END, b, ASSERT_NO_EXCEPT
ION) <= 0 ? b : a; | 268 Range* end = a->compareBoundaryPoints(Range::END_TO_END, b, ASSERT_NO_EXCEPT
ION) <= 0 ? b : a; |
| 269 | 269 |
| 270 return Range::create(a->ownerDocument(), start->startContainer(), start->sta
rtOffset(), end->endContainer(), end->endOffset()); | 270 return Range::create(a->ownerDocument(), start->startContainer(), start->sta
rtOffset(), end->endContainer(), end->endOffset()); |
| 271 } | 271 } |
| 272 | 272 |
| (...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState
? "true" : "false"; | 1741 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState
? "true" : "false"; |
| 1742 return m_command->value(m_frame.get(), triggeringEvent); | 1742 return m_command->value(m_frame.get(), triggeringEvent); |
| 1743 } | 1743 } |
| 1744 | 1744 |
| 1745 bool Editor::Command::isTextInsertion() const | 1745 bool Editor::Command::isTextInsertion() const |
| 1746 { | 1746 { |
| 1747 return m_command && m_command->isTextInsertion; | 1747 return m_command && m_command->isTextInsertion; |
| 1748 } | 1748 } |
| 1749 | 1749 |
| 1750 } // namespace WebCore | 1750 } // namespace WebCore |
| OLD | NEW |