OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2432 | 2432 |
2433 Document* document = frame()->document(); | 2433 Document* document = frame()->document(); |
2434 if (!document) | 2434 if (!document) |
2435 return; | 2435 return; |
2436 | 2436 |
2437 RenderView* documentView = document->renderView(); | 2437 RenderView* documentView = document->renderView(); |
2438 Element* documentElement = document->documentElement(); | 2438 Element* documentElement = document->documentElement(); |
2439 if (!documentView || !documentElement) | 2439 if (!documentView || !documentElement) |
2440 return; | 2440 return; |
2441 | 2441 |
2442 // Start from the minimum height and allow it to grow. | 2442 // If this is the first time we run autosize, start from small height and |
2443 resize(frameRect().width(), m_minAutoSize.height()); | 2443 // allow it to grow. |
2444 if (!m_didRunAutosize) | |
2445 resize(frameRect().width(), m_minAutoSize.height()); | |
levin
2013/04/16 21:22:05
This stops "unconditionally start laying out from
mthiesse
2013/04/16 21:48:51
My thinking is we trigger the ASSERT because we ca
| |
2444 | 2446 |
2445 IntSize size = frameRect().size(); | 2447 IntSize size = frameRect().size(); |
2446 | 2448 |
2447 // Do the resizing twice. The first time is basically a rough calculation us ing the preferred width | 2449 // Do the resizing twice. The first time is basically a rough calculation us ing the preferred width |
2448 // which may result in a height change during the second iteration. | 2450 // which may result in a height change during the second iteration. |
2449 for (int i = 0; i < 2; i++) { | 2451 for (int i = 0; i < 2; i++) { |
2450 // Update various sizes including contentsSize, scrollHeight, etc. | 2452 // Update various sizes including contentsSize, scrollHeight, etc. |
2451 document->updateLayoutIgnorePendingStylesheets(); | 2453 document->updateLayoutIgnorePendingStylesheets(); |
2452 int width = documentView->minPreferredLogicalWidth(); | 2454 int width = documentView->minPreferredLogicalWidth(); |
2453 int height = documentView->documentRect().height(); | 2455 int height = documentView->documentRect().height(); |
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3590 } | 3592 } |
3591 | 3593 |
3592 AXObjectCache* FrameView::axObjectCache() const | 3594 AXObjectCache* FrameView::axObjectCache() const |
3593 { | 3595 { |
3594 if (frame() && frame()->document()) | 3596 if (frame() && frame()->document()) |
3595 return frame()->document()->existingAXObjectCache(); | 3597 return frame()->document()->existingAXObjectCache(); |
3596 return 0; | 3598 return 0; |
3597 } | 3599 } |
3598 | 3600 |
3599 } // namespace WebCore | 3601 } // namespace WebCore |
OLD | NEW |