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 = focusedNode->renderer(); | 253 RenderObject* renderer = focusedNode->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
dNode->rendererIsEditable())) | 259 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse
dNode->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 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState
? "true" : "false"; | 1727 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState
? "true" : "false"; |
1728 return m_command->value(m_frame.get(), triggeringEvent); | 1728 return m_command->value(m_frame.get(), triggeringEvent); |
1729 } | 1729 } |
1730 | 1730 |
1731 bool Editor::Command::isTextInsertion() const | 1731 bool Editor::Command::isTextInsertion() const |
1732 { | 1732 { |
1733 return m_command && m_command->isTextInsertion; | 1733 return m_command && m_command->isTextInsertion; |
1734 } | 1734 } |
1735 | 1735 |
1736 } // namespace WebCore | 1736 } // namespace WebCore |
OLD | NEW |