OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 axis.m_deltas[axis.m_splitBeingResized - 1] += delta; | 465 axis.m_deltas[axis.m_splitBeingResized - 1] += delta; |
466 axis.m_deltas[axis.m_splitBeingResized] -= delta; | 466 axis.m_deltas[axis.m_splitBeingResized] -= delta; |
467 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged
); | 467 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged
); |
468 } | 468 } |
469 | 469 |
470 bool LayoutFrameSet::userResize(MouseEvent* evt) | 470 bool LayoutFrameSet::userResize(MouseEvent* evt) |
471 { | 471 { |
472 if (!m_isResizing) { | 472 if (!m_isResizing) { |
473 if (needsLayout()) | 473 if (needsLayout()) |
474 return false; | 474 return false; |
475 if (evt->type() == EventTypeNames::mousedown && evt->button() == LeftBut
ton) { | 475 if (evt->type() == EventTypeNames::mousedown && evt->button() == static_
cast<short>(WebPointerProperties::Button::Left)) { |
476 FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocati
on()), UseTransforms); | 476 FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocati
on()), UseTransforms); |
477 startResizing(m_cols, localPos.x()); | 477 startResizing(m_cols, localPos.x()); |
478 startResizing(m_rows, localPos.y()); | 478 startResizing(m_rows, localPos.y()); |
479 if (m_cols.m_splitBeingResized != noSplit || m_rows.m_splitBeingResi
zed != noSplit) { | 479 if (m_cols.m_splitBeingResized != noSplit || m_rows.m_splitBeingResi
zed != noSplit) { |
480 setIsResizing(true); | 480 setIsResizing(true); |
481 return true; | 481 return true; |
482 } | 482 } |
483 } | 483 } |
484 } else { | 484 } else { |
485 if (evt->type() == EventTypeNames::mousemove || (evt->type() == EventTyp
eNames::mouseup && evt->button() == LeftButton)) { | 485 if (evt->type() == EventTypeNames::mousemove || (evt->type() == EventTyp
eNames::mouseup && evt->button() == static_cast<short>(WebPointerProperties::But
ton::Left))) { |
486 FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocati
on()), UseTransforms); | 486 FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocati
on()), UseTransforms); |
487 continueResizing(m_cols, localPos.x()); | 487 continueResizing(m_cols, localPos.x()); |
488 continueResizing(m_rows, localPos.y()); | 488 continueResizing(m_rows, localPos.y()); |
489 if (evt->type() == EventTypeNames::mouseup && evt->button() == LeftB
utton) { | 489 if (evt->type() == EventTypeNames::mouseup && evt->button() == stati
c_cast<short>(WebPointerProperties::Button::Left)) { |
490 setIsResizing(false); | 490 setIsResizing(false); |
491 return true; | 491 return true; |
492 } | 492 } |
493 } | 493 } |
494 } | 494 } |
495 | 495 |
496 return false; | 496 return false; |
497 } | 497 } |
498 | 498 |
499 void LayoutFrameSet::setIsResizing(bool isResizing) | 499 void LayoutFrameSet::setIsResizing(bool isResizing) |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 return SetCursor; | 571 return SetCursor; |
572 } | 572 } |
573 if (canResizeColumn(roundedPoint)) { | 573 if (canResizeColumn(roundedPoint)) { |
574 cursor = columnResizeCursor(); | 574 cursor = columnResizeCursor(); |
575 return SetCursor; | 575 return SetCursor; |
576 } | 576 } |
577 return LayoutBox::getCursor(point, cursor); | 577 return LayoutBox::getCursor(point, cursor); |
578 } | 578 } |
579 | 579 |
580 } // namespace blink | 580 } // namespace blink |
OLD | NEW |