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 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 | 456 |
457 LocalFrame* LocalFrame::localFrameRoot() | 457 LocalFrame* LocalFrame::localFrameRoot() |
458 { | 458 { |
459 LocalFrame* curFrame = this; | 459 LocalFrame* curFrame = this; |
460 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 460 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
461 curFrame = toLocalFrame(curFrame->tree().parent()); | 461 curFrame = toLocalFrame(curFrame->tree().parent()); |
462 | 462 |
463 return curFrame; | 463 return curFrame; |
464 } | 464 } |
465 | 465 |
466 String LocalFrame::layerTreeAsText(LayerTreeFlags flags) const | |
467 { | |
468 TextStream textStream; | |
469 textStream << localLayerTreeAsText(flags); | |
470 | |
471 for (Frame* child = tree().firstChild(); child; child = child->tree().traver
seNext(this)) { | |
472 if (!child->isLocalFrame()) | |
473 continue; | |
474 String childLayerTree = toLocalFrame(child)->localLayerTreeAsText(flags)
; | |
475 if (!childLayerTree.length()) | |
476 continue; | |
477 | |
478 textStream << "\n\n--------\nFrame: '"; | |
479 textStream << child->tree().uniqueName(); | |
480 textStream << "'\n--------\n"; | |
481 textStream << childLayerTree; | |
482 } | |
483 | |
484 return textStream.release(); | |
485 } | |
486 | |
487 void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const Flo
atSize& originalPageSize, float maximumShrinkRatio) | 466 void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const Flo
atSize& originalPageSize, float maximumShrinkRatio) |
488 { | 467 { |
489 // In setting printing, we should not validate resources already cached for
the document. | 468 // In setting printing, we should not validate resources already cached for
the document. |
490 // See https://bugs.webkit.org/show_bug.cgi?id=43704 | 469 // See https://bugs.webkit.org/show_bug.cgi?id=43704 |
491 ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher()
); | 470 ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher()
); |
492 | 471 |
493 document()->setPrinting(printing); | 472 document()->setPrinting(printing); |
494 view()->adjustMediaTypeForPrinting(printing); | 473 view()->adjustMediaTypeForPrinting(printing); |
495 | 474 |
496 if (shouldUsePrintingLayout()) { | 475 if (shouldUsePrintingLayout()) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 return false; | 723 return false; |
745 | 724 |
746 return document()->isSecureTransitionTo(url); | 725 return document()->isSecureTransitionTo(url); |
747 } | 726 } |
748 | 727 |
749 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) | 728 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) |
750 { | 729 { |
751 spellChecker().removeSpellingMarkersUnderWords(words); | 730 spellChecker().removeSpellingMarkersUnderWords(words); |
752 } | 731 } |
753 | 732 |
754 String LocalFrame::localLayerTreeAsText(unsigned flags) const | 733 String LocalFrame::layerTreeAsText(unsigned flags) const |
755 { | 734 { |
756 if (contentLayoutItem().isNull()) | 735 if (contentLayoutItem().isNull()) |
757 return String(); | 736 return String(); |
758 | 737 |
759 return contentLayoutItem().compositor()->layerTreeAsText(static_cast<LayerTr
eeFlags>(flags)); | 738 return contentLayoutItem().compositor()->layerTreeAsText(static_cast<LayerTr
eeFlags>(flags)); |
760 } | 739 } |
761 | 740 |
762 bool LocalFrame::shouldThrottleRendering() const | 741 bool LocalFrame::shouldThrottleRendering() const |
763 { | 742 { |
764 return view() && view()->shouldThrottleRendering(); | 743 return view() && view()->shouldThrottleRendering(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 m_frame->client()->frameBlameContext()->Enter(); | 814 m_frame->client()->frameBlameContext()->Enter(); |
836 } | 815 } |
837 | 816 |
838 ScopedFrameBlamer::~ScopedFrameBlamer() | 817 ScopedFrameBlamer::~ScopedFrameBlamer() |
839 { | 818 { |
840 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 819 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
841 m_frame->client()->frameBlameContext()->Leave(); | 820 m_frame->client()->frameBlameContext()->Leave(); |
842 } | 821 } |
843 | 822 |
844 } // namespace blink | 823 } // namespace blink |
OLD | NEW |