| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 m_rows.m_preventResize[r + 1] = true; | 307 m_rows.m_preventResize[r + 1] = true; |
| 308 } | 308 } |
| 309 | 309 |
| 310 void RenderFrameSet::computeEdgeInfo() | 310 void RenderFrameSet::computeEdgeInfo() |
| 311 { | 311 { |
| 312 m_rows.m_preventResize.fill(frameSet()->noResize()); | 312 m_rows.m_preventResize.fill(frameSet()->noResize()); |
| 313 m_rows.m_allowBorder.fill(false); | 313 m_rows.m_allowBorder.fill(false); |
| 314 m_cols.m_preventResize.fill(frameSet()->noResize()); | 314 m_cols.m_preventResize.fill(frameSet()->noResize()); |
| 315 m_cols.m_allowBorder.fill(false); | 315 m_cols.m_allowBorder.fill(false); |
| 316 | 316 |
| 317 RenderObject* child = firstChild(); | 317 LayoutObject* child = firstChild(); |
| 318 if (!child) | 318 if (!child) |
| 319 return; | 319 return; |
| 320 | 320 |
| 321 size_t rows = m_rows.m_sizes.size(); | 321 size_t rows = m_rows.m_sizes.size(); |
| 322 size_t cols = m_cols.m_sizes.size(); | 322 size_t cols = m_cols.m_sizes.size(); |
| 323 for (size_t r = 0; r < rows; ++r) { | 323 for (size_t r = 0; r < rows; ++r) { |
| 324 for (size_t c = 0; c < cols; ++c) { | 324 for (size_t c = 0; c < cols; ++c) { |
| 325 FrameEdgeInfo edgeInfo; | 325 FrameEdgeInfo edgeInfo; |
| 326 if (child->isFrameSet()) | 326 if (child->isFrameSet()) |
| 327 edgeInfo = toRenderFrameSet(child)->edgeInfo(); | 327 edgeInfo = toRenderFrameSet(child)->edgeInfo(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 | 490 |
| 491 return false; | 491 return false; |
| 492 } | 492 } |
| 493 | 493 |
| 494 void RenderFrameSet::setIsResizing(bool isResizing) | 494 void RenderFrameSet::setIsResizing(bool isResizing) |
| 495 { | 495 { |
| 496 m_isResizing = isResizing; | 496 m_isResizing = isResizing; |
| 497 for (RenderObject* ancestor = parent(); ancestor; ancestor = ancestor->paren
t()) { | 497 for (LayoutObject* ancestor = parent(); ancestor; ancestor = ancestor->paren
t()) { |
| 498 if (ancestor->isFrameSet()) | 498 if (ancestor->isFrameSet()) |
| 499 toRenderFrameSet(ancestor)->m_isChildResizing = isResizing; | 499 toRenderFrameSet(ancestor)->m_isChildResizing = isResizing; |
| 500 } | 500 } |
| 501 if (LocalFrame* frame = this->frame()) | 501 if (LocalFrame* frame = this->frame()) |
| 502 frame->eventHandler().setResizingFrameSet(isResizing ? frameSet() : 0); | 502 frame->eventHandler().setResizingFrameSet(isResizing ? frameSet() : 0); |
| 503 } | 503 } |
| 504 | 504 |
| 505 bool RenderFrameSet::canResizeRow(const IntPoint& p) const | 505 bool RenderFrameSet::canResizeRow(const IntPoint& p) const |
| 506 { | 506 { |
| 507 int r = hitTestSplit(m_rows, p.y()); | 507 int r = hitTestSplit(m_rows, p.y()); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 | 546 |
| 547 int splitPosition = axis.m_sizes[0]; | 547 int splitPosition = axis.m_sizes[0]; |
| 548 for (size_t i = 1; i < size; ++i) { | 548 for (size_t i = 1; i < size; ++i) { |
| 549 if (position >= splitPosition && position < splitPosition + borderThickn
ess) | 549 if (position >= splitPosition && position < splitPosition + borderThickn
ess) |
| 550 return i; | 550 return i; |
| 551 splitPosition += borderThickness + axis.m_sizes[i]; | 551 splitPosition += borderThickness + axis.m_sizes[i]; |
| 552 } | 552 } |
| 553 return noSplit; | 553 return noSplit; |
| 554 } | 554 } |
| 555 | 555 |
| 556 bool RenderFrameSet::isChildAllowed(RenderObject* child, const RenderStyle&) con
st | 556 bool RenderFrameSet::isChildAllowed(LayoutObject* child, const RenderStyle&) con
st |
| 557 { | 557 { |
| 558 return child->isFrame() || child->isFrameSet(); | 558 return child->isFrame() || child->isFrameSet(); |
| 559 } | 559 } |
| 560 | 560 |
| 561 CursorDirective RenderFrameSet::getCursor(const LayoutPoint& point, Cursor& curs
or) const | 561 CursorDirective RenderFrameSet::getCursor(const LayoutPoint& point, Cursor& curs
or) const |
| 562 { | 562 { |
| 563 IntPoint roundedPoint = roundedIntPoint(point); | 563 IntPoint roundedPoint = roundedIntPoint(point); |
| 564 if (canResizeRow(roundedPoint)) { | 564 if (canResizeRow(roundedPoint)) { |
| 565 cursor = rowResizeCursor(); | 565 cursor = rowResizeCursor(); |
| 566 return SetCursor; | 566 return SetCursor; |
| 567 } | 567 } |
| 568 if (canResizeColumn(roundedPoint)) { | 568 if (canResizeColumn(roundedPoint)) { |
| 569 cursor = columnResizeCursor(); | 569 cursor = columnResizeCursor(); |
| 570 return SetCursor; | 570 return SetCursor; |
| 571 } | 571 } |
| 572 return RenderBox::getCursor(point, cursor); | 572 return RenderBox::getCursor(point, cursor); |
| 573 } | 573 } |
| 574 | 574 |
| 575 } // namespace blink | 575 } // namespace blink |
| OLD | NEW |