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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
411 int borderThickness = frameSet()->border(); | 411 int borderThickness = frameSet()->border(); |
412 LayoutSize size; | 412 LayoutSize size; |
413 LayoutPoint position; | 413 LayoutPoint position; |
414 for (int r = 0; r < rows; r++) { | 414 for (int r = 0; r < rows; r++) { |
415 position.setX(LayoutUnit()); | 415 position.setX(LayoutUnit()); |
416 size.setHeight(LayoutUnit(m_rows.m_sizes[r])); | 416 size.setHeight(LayoutUnit(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(LayoutUnit(m_cols.m_sizes[c])); | 419 size.setWidth(LayoutUnit(m_cols.m_sizes[c])); |
420 | 420 |
421 // has to be resized and itself resize its contents | 421 // If we have a new size, we need to resize and layout the child. If the size is 0x0 we |
422 if (size != child->size()) { | 422 // also need to lay out, since this may mean that we're dealing with a child frameset |
423 // that wasn't previously initialized properly, because it was previ ously hidden, but | |
424 // no longer is, because rows * cols may have increased. | |
425 if (size != child->size() || size.isEmpty()) { | |
mstensho (USE GERRIT)
2016/04/01 12:21:47
This is the simplest fix that I can think of. A sa
| |
423 child->setSize(size); | 426 child->setSize(size); |
424 child->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidation Reason::SizeChanged); | 427 child->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidation Reason::SizeChanged); |
425 child->layout(); | 428 child->layout(); |
426 } | 429 } |
427 | 430 |
428 position.setX(position.x() + size.width() + borderThickness); | 431 position.setX(position.x() + size.width() + borderThickness); |
429 | 432 |
430 child = child->nextSiblingBox(); | 433 child = child->nextSiblingBox(); |
431 if (!child) | 434 if (!child) |
432 return; | 435 return; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
568 return SetCursor; | 571 return SetCursor; |
569 } | 572 } |
570 if (canResizeColumn(roundedPoint)) { | 573 if (canResizeColumn(roundedPoint)) { |
571 cursor = columnResizeCursor(); | 574 cursor = columnResizeCursor(); |
572 return SetCursor; | 575 return SetCursor; |
573 } | 576 } |
574 return LayoutBox::getCursor(point, cursor); | 577 return LayoutBox::getCursor(point, cursor); |
575 } | 578 } |
576 | 579 |
577 } // namespace blink | 580 } // namespace blink |
OLD | NEW |