| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 for (int r = 0; r < rows; r++) { | 414 for (int r = 0; r < rows; r++) { |
| 415 position.setX(0); | 415 position.setX(0); |
| 416 size.setHeight(m_rows.m_sizes[r]); | 416 size.setHeight(m_rows.m_sizes[r]); |
| 417 for (int c = 0; c < cols; c++) { | 417 for (int c = 0; c < cols; c++) { |
| 418 child->setLocation(position); | 418 child->setLocation(position); |
| 419 size.setWidth(m_cols.m_sizes[c]); | 419 size.setWidth(m_cols.m_sizes[c]); |
| 420 | 420 |
| 421 // has to be resized and itself resize its contents | 421 // has to be resized and itself resize its contents |
| 422 if (size != child->size()) { | 422 if (size != child->size()) { |
| 423 child->setSize(size); | 423 child->setSize(size); |
| 424 child->setNeedsLayoutAndFullPaintInvalidation(); | 424 child->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidation
Reason::SizeChanged); |
| 425 child->layout(); | 425 child->layout(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 position.setX(position.x() + size.width() + borderThickness); | 428 position.setX(position.x() + size.width() + borderThickness); |
| 429 | 429 |
| 430 child = child->nextSiblingBox(); | 430 child = child->nextSiblingBox(); |
| 431 if (!child) | 431 if (!child) |
| 432 return; | 432 return; |
| 433 } | 433 } |
| 434 position.setY(position.y() + size.height() + borderThickness); | 434 position.setY(position.y() + size.height() + borderThickness); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 454 if (needsLayout()) | 454 if (needsLayout()) |
| 455 return; | 455 return; |
| 456 if (axis.m_splitBeingResized == noSplit) | 456 if (axis.m_splitBeingResized == noSplit) |
| 457 return; | 457 return; |
| 458 int currentSplitPosition = splitPosition(axis, axis.m_splitBeingResized); | 458 int currentSplitPosition = splitPosition(axis, axis.m_splitBeingResized); |
| 459 int delta = (position - currentSplitPosition) - axis.m_splitResizeOffset; | 459 int delta = (position - currentSplitPosition) - axis.m_splitResizeOffset; |
| 460 if (!delta) | 460 if (!delta) |
| 461 return; | 461 return; |
| 462 axis.m_deltas[axis.m_splitBeingResized - 1] += delta; | 462 axis.m_deltas[axis.m_splitBeingResized - 1] += delta; |
| 463 axis.m_deltas[axis.m_splitBeingResized] -= delta; | 463 axis.m_deltas[axis.m_splitBeingResized] -= delta; |
| 464 setNeedsLayoutAndFullPaintInvalidation(); | 464 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged
); |
| 465 } | 465 } |
| 466 | 466 |
| 467 bool LayoutFrameSet::userResize(MouseEvent* evt) | 467 bool LayoutFrameSet::userResize(MouseEvent* evt) |
| 468 { | 468 { |
| 469 if (!m_isResizing) { | 469 if (!m_isResizing) { |
| 470 if (needsLayout()) | 470 if (needsLayout()) |
| 471 return false; | 471 return false; |
| 472 if (evt->type() == EventTypeNames::mousedown && evt->button() == LeftBut
ton) { | 472 if (evt->type() == EventTypeNames::mousedown && evt->button() == LeftBut
ton) { |
| 473 FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocati
on()), UseTransforms); | 473 FloatPoint localPos = absoluteToLocal(FloatPoint(evt->absoluteLocati
on()), UseTransforms); |
| 474 startResizing(m_cols, localPos.x()); | 474 startResizing(m_cols, localPos.x()); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 return SetCursor; | 568 return SetCursor; |
| 569 } | 569 } |
| 570 if (canResizeColumn(roundedPoint)) { | 570 if (canResizeColumn(roundedPoint)) { |
| 571 cursor = columnResizeCursor(); | 571 cursor = columnResizeCursor(); |
| 572 return SetCursor; | 572 return SetCursor; |
| 573 } | 573 } |
| 574 return LayoutBox::getCursor(point, cursor); | 574 return LayoutBox::getCursor(point, cursor); |
| 575 } | 575 } |
| 576 | 576 |
| 577 } // namespace blink | 577 } // namespace blink |
| OLD | NEW |