Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: webkit/port/page/inspector/InspectorController.cpp

Issue 8947: Fix the JSC build.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Google Inc. All rights reserved. 2 * Copyright (C) 2007 Google Inc. All rights reserved.
3 * Authors: Collin Jackson, Adam Barth 3 * Authors: Collin Jackson, Adam Barth
4 * 4 *
5 * This is the V8 version of the KJS InspectorController, which is located in 5 * This is the V8 version of the KJS InspectorController, which is located in
6 * webkit/pending. 6 * webkit/pending.
7 * Copyright (C) 2007 Apple Inc. All rights reserved. 7 * Copyright (C) 2007 Apple Inc. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 m_mainResource = NULL; 792 m_mainResource = NULL;
793 m_frameResources.clear(); 793 m_frameResources.clear();
794 m_resources.clear(); 794 m_resources.clear();
795 } 795 }
796 796
797 void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, ScriptCallContext* context) 797 void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, ScriptCallContext* context)
798 { 798 {
799 if (!enabled()) 799 if (!enabled())
800 return; 800 return;
801 801
802 addConsoleMessage(new ConsoleMessage(source, level, context, m_groupLevel)); 802 addConsoleMessage(context, new ConsoleMessage(source, level, context, m_grou pLevel));
803 } 803 }
804 804
805 void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID) 805 void InspectorController::addMessageToConsole(MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
806 { 806 {
807 if (!enabled()) 807 if (!enabled())
808 return; 808 return;
809 809
810 addConsoleMessage(new ConsoleMessage(source, level, message, lineNumber, sou rceID, m_groupLevel)); 810 addConsoleMessage(0, new ConsoleMessage(source, level, message, lineNumber, sourceID, m_groupLevel));
811 } 811 }
812 812
813 void InspectorController::addConsoleMessage(ConsoleMessage* consoleMessage) 813 void InspectorController::addConsoleMessage(ScriptCallContext* context, ConsoleM essage* consoleMessage)
814 { 814 {
815 ASSERT(enabled()); 815 ASSERT(enabled());
816 ASSERT_ARG(consoleMessage, consoleMessage); 816 ASSERT_ARG(consoleMessage, consoleMessage);
817 817
818 // Limit the number of console messages we keep in memory so a poorly 818 // Limit the number of console messages we keep in memory so a poorly
819 // behaving script doesn't cause unbounded memory growth. We remove the 819 // behaving script doesn't cause unbounded memory growth. We remove the
820 // oldest messages so that the most recent errors are preserved. 820 // oldest messages so that the most recent errors are preserved.
821 // TODO(erikkay): this is not very efficient since Vector has to do a copy 821 // TODO(erikkay): this is not very efficient since Vector has to do a copy
822 // when you remove from anywhere other than the end. Unfortunately, WTF 822 // when you remove from anywhere other than the end. Unfortunately, WTF
823 // doesn't appear to have a double-ended list we could use instead. The 823 // doesn't appear to have a double-ended list we could use instead. The
(...skipping 12 matching lines...) Expand all
836 void InspectorController::clearConsoleMessages() 836 void InspectorController::clearConsoleMessages()
837 { 837 {
838 deleteAllValues(m_consoleMessages); 838 deleteAllValues(m_consoleMessages);
839 m_consoleMessages.clear(); 839 m_consoleMessages.clear();
840 } 840 }
841 841
842 void InspectorController::startGroup(MessageSource source, ScriptCallContext* co ntext) 842 void InspectorController::startGroup(MessageSource source, ScriptCallContext* co ntext)
843 { 843 {
844 ++m_groupLevel; 844 ++m_groupLevel;
845 845
846 addConsoleMessage(new ConsoleMessage(source, StartGroupMessageLevel, context , m_groupLevel)); 846 addConsoleMessage(context, new ConsoleMessage(source, StartGroupMessageLevel , context, m_groupLevel));
847 } 847 }
848 848
849 void InspectorController::endGroup(MessageSource source, unsigned lineNumber, co nst String& sourceURL) 849 void InspectorController::endGroup(MessageSource source, unsigned lineNumber, co nst String& sourceURL)
850 { 850 {
851 if (m_groupLevel == 0) 851 if (m_groupLevel == 0)
852 return; 852 return;
853 853
854 --m_groupLevel; 854 --m_groupLevel;
855 855
856 addConsoleMessage(new ConsoleMessage(source, EndGroupMessageLevel, String(), lineNumber, sourceURL, m_groupLevel)); 856 addConsoleMessage(0, new ConsoleMessage(source, EndGroupMessageLevel, String (), lineNumber, sourceURL, m_groupLevel));
857 } 857 }
858 858
859 void InspectorController::attachWindow() 859 void InspectorController::attachWindow()
860 { 860 {
861 if (!enabled()) 861 if (!enabled())
862 return; 862 return;
863 m_client->attachWindow(); 863 m_client->attachWindow();
864 } 864 }
865 865
866 void InspectorController::detachWindow() 866 void InspectorController::detachWindow()
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 element->scrollIntoViewIfNeeded(); 1765 element->scrollIntoViewIfNeeded();
1766 overlayRect = view->visibleContentRect(); 1766 overlayRect = view->visibleContentRect();
1767 } 1767 }
1768 1768
1769 context.translate(-overlayRect.x(), -overlayRect.y()); 1769 context.translate(-overlayRect.x(), -overlayRect.y());
1770 1770
1771 drawHighlightForBoxes(context, lineBoxRects, contentBox, paddingBox, borderB ox, marginBox); 1771 drawHighlightForBoxes(context, lineBoxRects, contentBox, paddingBox, borderB ox, marginBox);
1772 } 1772 }
1773 1773
1774 } // namespace WebCore 1774 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698