| 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 22 matching lines...) Expand all Loading... |
| 33 #include "sky/engine/core/css/resolver/StyleResolver.h" | 33 #include "sky/engine/core/css/resolver/StyleResolver.h" |
| 34 #include "sky/engine/core/dom/DocumentMarkerController.h" | 34 #include "sky/engine/core/dom/DocumentMarkerController.h" |
| 35 #include "sky/engine/core/editing/FrameSelection.h" | 35 #include "sky/engine/core/editing/FrameSelection.h" |
| 36 #include "sky/engine/core/fetch/ResourceFetcher.h" | 36 #include "sky/engine/core/fetch/ResourceFetcher.h" |
| 37 #include "sky/engine/core/frame/FrameHost.h" | 37 #include "sky/engine/core/frame/FrameHost.h" |
| 38 #include "sky/engine/core/frame/LocalFrame.h" | 38 #include "sky/engine/core/frame/LocalFrame.h" |
| 39 #include "sky/engine/core/frame/Settings.h" | 39 #include "sky/engine/core/frame/Settings.h" |
| 40 #include "sky/engine/core/html/parser/TextResourceDecoder.h" | 40 #include "sky/engine/core/html/parser/TextResourceDecoder.h" |
| 41 #include "sky/engine/core/inspector/InspectorTraceEvents.h" | 41 #include "sky/engine/core/inspector/InspectorTraceEvents.h" |
| 42 #include "sky/engine/core/loader/FrameLoaderClient.h" | 42 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 43 #include "sky/engine/core/page/Chrome.h" | |
| 44 #include "sky/engine/core/page/ChromeClient.h" | 43 #include "sky/engine/core/page/ChromeClient.h" |
| 45 #include "sky/engine/core/page/EventHandler.h" | 44 #include "sky/engine/core/page/EventHandler.h" |
| 46 #include "sky/engine/core/page/FocusController.h" | 45 #include "sky/engine/core/page/FocusController.h" |
| 47 #include "sky/engine/core/page/Page.h" | 46 #include "sky/engine/core/page/Page.h" |
| 48 #include "sky/engine/core/rendering/RenderLayer.h" | 47 #include "sky/engine/core/rendering/RenderLayer.h" |
| 49 #include "sky/engine/core/rendering/RenderView.h" | 48 #include "sky/engine/core/rendering/RenderView.h" |
| 50 #include "sky/engine/core/rendering/style/RenderStyle.h" | 49 #include "sky/engine/core/rendering/style/RenderStyle.h" |
| 51 #include "sky/engine/platform/ScriptForbiddenScope.h" | 50 #include "sky/engine/platform/ScriptForbiddenScope.h" |
| 52 #include "sky/engine/platform/TraceEvent.h" | 51 #include "sky/engine/platform/TraceEvent.h" |
| 53 #include "sky/engine/platform/fonts/FontCache.h" | 52 #include "sky/engine/platform/fonts/FontCache.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 TRACE_EVENT_END1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Layout", "
endData", InspectorLayoutEvent::endData(rootForThisLayout)); | 353 TRACE_EVENT_END1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Layout", "
endData", InspectorLayoutEvent::endData(rootForThisLayout)); |
| 355 | 354 |
| 356 m_nestedLayoutCount--; | 355 m_nestedLayoutCount--; |
| 357 if (m_nestedLayoutCount) | 356 if (m_nestedLayoutCount) |
| 358 return; | 357 return; |
| 359 | 358 |
| 360 #if ENABLE(ASSERT) | 359 #if ENABLE(ASSERT) |
| 361 // Post-layout assert that nobody was re-marked as needing layout during lay
out. | 360 // Post-layout assert that nobody was re-marked as needing layout during lay
out. |
| 362 document->renderView()->assertSubtreeIsLaidOut(); | 361 document->renderView()->assertSubtreeIsLaidOut(); |
| 363 #endif | 362 #endif |
| 364 | |
| 365 // FIXME: It should be not possible to remove the FrameView from the frame/p
age during layout | |
| 366 // however m_inPerformLayout is not set for most of this function, so none o
f our RELEASE_ASSERTS | |
| 367 // in LocalFrame/Page will fire. One of the post-layout tasks is disconnecti
ng the LocalFrame from | |
| 368 // the page in fast/frames/crash-remove-iframe-during-object-beforeload-2.ht
ml | |
| 369 // necessitating this check here. | |
| 370 // ASSERT(frame()->page()); | |
| 371 if (frame().page()) | |
| 372 frame().page()->chrome().client().layoutUpdated(m_frame.get()); | |
| 373 } | 363 } |
| 374 | 364 |
| 375 DocumentLifecycle& FrameView::lifecycle() const | 365 DocumentLifecycle& FrameView::lifecycle() const |
| 376 { | 366 { |
| 377 return m_frame->document()->lifecycle(); | 367 return m_frame->document()->lifecycle(); |
| 378 } | 368 } |
| 379 | 369 |
| 380 void FrameView::setMediaType(const AtomicString& mediaType) | 370 void FrameView::setMediaType(const AtomicString& mediaType) |
| 381 { | 371 { |
| 382 ASSERT(m_frame->document()); | 372 ASSERT(m_frame->document()); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 407 | 397 |
| 408 void FrameView::setLayoutSize(const IntSize& size) | 398 void FrameView::setLayoutSize(const IntSize& size) |
| 409 { | 399 { |
| 410 ASSERT(!layoutSizeFixedToFrameSize()); | 400 ASSERT(!layoutSizeFixedToFrameSize()); |
| 411 | 401 |
| 412 setLayoutSizeInternal(size); | 402 setLayoutSizeInternal(size); |
| 413 } | 403 } |
| 414 | 404 |
| 415 HostWindow* FrameView::hostWindow() const | 405 HostWindow* FrameView::hostWindow() const |
| 416 { | 406 { |
| 417 Page* page = frame().page(); | 407 return frame().page(); |
| 418 if (!page) | |
| 419 return 0; | |
| 420 return &page->chrome(); | |
| 421 } | 408 } |
| 422 | 409 |
| 423 void FrameView::contentsResized() | 410 void FrameView::contentsResized() |
| 424 { | 411 { |
| 425 setNeedsLayout(); | 412 setNeedsLayout(); |
| 426 } | 413 } |
| 427 | 414 |
| 428 void FrameView::scheduleRelayout() | 415 void FrameView::scheduleRelayout() |
| 429 { | 416 { |
| 430 ASSERT(m_frame->view() == this); | 417 ASSERT(m_frame->view() == this); |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 { | 835 { |
| 849 // FIXME(sky): Remove | 836 // FIXME(sky): Remove |
| 850 return false; | 837 return false; |
| 851 } | 838 } |
| 852 | 839 |
| 853 void FrameView::setCursor(const Cursor& cursor) | 840 void FrameView::setCursor(const Cursor& cursor) |
| 854 { | 841 { |
| 855 Page* page = frame().page(); | 842 Page* page = frame().page(); |
| 856 if (!page || !page->settings().deviceSupportsMouse()) | 843 if (!page || !page->settings().deviceSupportsMouse()) |
| 857 return; | 844 return; |
| 858 page->chrome().setCursor(cursor); | 845 page->setCursor(cursor); |
| 859 } | 846 } |
| 860 | 847 |
| 861 void FrameView::setLayoutSizeInternal(const IntSize& size) | 848 void FrameView::setLayoutSizeInternal(const IntSize& size) |
| 862 { | 849 { |
| 863 if (m_layoutSize == size) | 850 if (m_layoutSize == size) |
| 864 return; | 851 return; |
| 865 | 852 |
| 866 m_layoutSize = size; | 853 m_layoutSize = size; |
| 867 contentsResized(); | 854 contentsResized(); |
| 868 } | 855 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 880 totalObjects = 0; | 867 totalObjects = 0; |
| 881 | 868 |
| 882 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { | 869 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { |
| 883 ++totalObjects; | 870 ++totalObjects; |
| 884 if (o->needsLayout()) | 871 if (o->needsLayout()) |
| 885 ++needsLayoutObjects; | 872 ++needsLayoutObjects; |
| 886 } | 873 } |
| 887 } | 874 } |
| 888 | 875 |
| 889 } // namespace blink | 876 } // namespace blink |
| OLD | NEW |