| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1920 return; | 1920 return; |
| 1921 } | 1921 } |
| 1922 | 1922 |
| 1923 if (Element* oe = ownerElement()) | 1923 if (Element* oe = ownerElement()) |
| 1924 oe->document()->updateLayout(); | 1924 oe->document()->updateLayout(); |
| 1925 | 1925 |
| 1926 updateStyleIfNeeded(); | 1926 updateStyleIfNeeded(); |
| 1927 | 1927 |
| 1928 StackStats::LayoutCheckPoint layoutCheckPoint; | 1928 StackStats::LayoutCheckPoint layoutCheckPoint; |
| 1929 | 1929 |
| 1930 if (renderView()) | |
| 1931 renderView()->markQuoteContainingBlocksForLayoutIfNeeded(); | |
| 1932 | |
| 1933 // Only do a layout if changes have occurred that make it necessary. | 1930 // Only do a layout if changes have occurred that make it necessary. |
| 1934 if (frameView && renderer() && (frameView->layoutPending() || renderer()->ne
edsLayout())) | 1931 if (frameView && renderer() && (frameView->layoutPending() || renderer()->ne
edsLayout())) |
| 1935 frameView->layout(); | 1932 frameView->layout(); |
| 1936 } | 1933 } |
| 1937 | 1934 |
| 1938 // FIXME: This is a bad idea and needs to be removed eventually. | 1935 // FIXME: This is a bad idea and needs to be removed eventually. |
| 1939 // Other browsers load stylesheets before they continue parsing the web page. | 1936 // Other browsers load stylesheets before they continue parsing the web page. |
| 1940 // Since we don't, we can run JavaScript code that needs answers before the | 1937 // Since we don't, we can run JavaScript code that needs answers before the |
| 1941 // stylesheets are loaded. Doing a layout ignoring the pending stylesheets | 1938 // stylesheets are loaded. Doing a layout ignoring the pending stylesheets |
| 1942 // lets us get reasonable answers. The long term solution to this problem is | 1939 // lets us get reasonable answers. The long term solution to this problem is |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2473 | 2470 |
| 2474 frame()->loader()->checkCallImplicitClose(); | 2471 frame()->loader()->checkCallImplicitClose(); |
| 2475 RenderObject* renderObject = renderer(); | 2472 RenderObject* renderObject = renderer(); |
| 2476 | 2473 |
| 2477 // We used to force a synchronous display and flush here. This really isn't | 2474 // We used to force a synchronous display and flush here. This really isn't |
| 2478 // necessary and can in fact be actively harmful if pages are loading at a r
ate of > 60fps | 2475 // necessary and can in fact be actively harmful if pages are loading at a r
ate of > 60fps |
| 2479 // (if your platform is syncing flushes and limiting them to 60fps). | 2476 // (if your platform is syncing flushes and limiting them to 60fps). |
| 2480 m_overMinimumLayoutThreshold = true; | 2477 m_overMinimumLayoutThreshold = true; |
| 2481 if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->rende
rer()->needsLayout())) { | 2478 if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->rende
rer()->needsLayout())) { |
| 2482 updateStyleIfNeeded(); | 2479 updateStyleIfNeeded(); |
| 2483 | 2480 |
| 2484 if (renderView()) | |
| 2485 renderView()->markQuoteContainingBlocksForLayoutIfNeeded(); | |
| 2486 | |
| 2487 // Always do a layout after loading if needed. | 2481 // Always do a layout after loading if needed. |
| 2488 if (view() && renderObject && (!renderObject->firstChild() || renderObje
ct->needsLayout())) | 2482 if (view() && renderObject && (!renderObject->firstChild() || renderObje
ct->needsLayout())) |
| 2489 view()->layout(); | 2483 view()->layout(); |
| 2490 } | 2484 } |
| 2491 | 2485 |
| 2492 m_processingLoadEvent = false; | 2486 m_processingLoadEvent = false; |
| 2493 | 2487 |
| 2494 #if PLATFORM(MAC) || PLATFORM(CHROMIUM) | 2488 #if PLATFORM(MAC) || PLATFORM(CHROMIUM) |
| 2495 if (f && renderObject && AXObjectCache::accessibilityEnabled()) { | 2489 if (f && renderObject && AXObjectCache::accessibilityEnabled()) { |
| 2496 // The AX cache may have been cleared at this point, but we need to make
sure it contains an | 2490 // The AX cache may have been cleared at this point, but we need to make
sure it contains an |
| (...skipping 3506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6003 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL()
); | 5997 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL()
); |
| 6004 else | 5998 else |
| 6005 m_templateContentsOwnerDocument = Document::create(0, blankURL()); | 5999 m_templateContentsOwnerDocument = Document::create(0, blankURL()); |
| 6006 } | 6000 } |
| 6007 | 6001 |
| 6008 return m_templateContentsOwnerDocument.get(); | 6002 return m_templateContentsOwnerDocument.get(); |
| 6009 } | 6003 } |
| 6010 #endif | 6004 #endif |
| 6011 | 6005 |
| 6012 } // namespace WebCore | 6006 } // namespace WebCore |
| OLD | NEW |