source: webkit/trunk/JavaScriptCore/kjs/debugger.h@ 1791

Last change on this file since 1791 was 1024, checked in by darin, 23 years ago

Merged KDE 3.0 final code in and:

JavaScriptCore:

  • kjs/internal.cpp:
  • kjs/property_map.cpp:
  • kjs/ustring.h: Removed some unneeded <config.h> includes so we are more similar to the real KDE sources.

Merged changes from KDE 3.0 final and did some build fixes.

  • kjs/grammar.*: Regenerated.
  • kjs/*.lut.h: Regenerated.

WebCore:

  • src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration): Remove some minor gratuitous diffs vs. KDE.
  • src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration): Richard updated to reflect changes in KDE.
  • src/kdelibs/khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl): Fix comment.
  • src/kdelibs/khtml/css/cssstyleselector.cpp: Remove some gratuitous diffs vs. KDE.
  • src/kdelibs/khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): Remove unneeded copy from KWQ's early days.
  • src/kdelibs/khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseAttribute), (HTMLTablePartElementImpl::parseAttribute): Remove unneeded copy from KWQ's early days.
  • src/kdelibs/khtml/html/htmltokenizer.cpp: (HTMLTokenizer::processToken): Redo the APPLE_CHANGES ifdef here.
  • src/kdelibs/khtml/khtmlpart_p.h: Update to latest kde.
  • src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::KHTMLView): Add ifdef APPLE_CHANGES. (KHTMLView::~KHTMLView): Add ifdef APPLE_CHANGES. (KHTMLView::print): Remove code left in here during merge process.
  • src/kwq/KWQKHTMLPart.mm: Remove unused setFontSizes(), fontSizes(), and resetFontSizes(). After the merge is landed, remove more.
  • src/libwebcore.exp: Export updateStyleSelector() for WebKit.

Fix text to it displays at the right font size.

  • src/kdelibs/khtml/css/cssstyleselector.cpp: (CSSStyleSelector::computeFontSizes): Apply the same SCREEN_RESOLUTION hack here that we do elsewhere.
  • src/kdelibs/khtml/rendering/font.cpp: (Font::width): Use kMin instead of max (oops). (Font::update): Turn off font database chicanery.
  • src/kwq/KWQKHTMLPart.mm: (KHTMLPart::zoomFactor): Use zoom factor 100, not 1.

More fixes so text displays (still at wrong font size).

  • src/kdelibs/khtml/rendering/font.cpp: (max): New helper. (Font::drawText): Simplified implementation for now. (Font::width): Simplified implementation for now.
  • src/kwq/KWQColorGroup.mm: Reinstated QCOLOR_GROUP_SIZE.
  • src/kwq/qt/qfontmetrics.h: Removed charWidth and changed _width to take QChar *.
  • src/kwq/KWQFontMetrics.mm: Removed charWidth and changed _width to take QChar *.

Merged changes from KDE 3.0 final. Other fixes to get things compiling.

  • src/kdelibs/khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::setProperty): Fix unused variable.
  • src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::contentsContextMenuEvent): Fix unused variable.
  • src/kdelibs/khtml/rendering/font.cpp: (Font::drawText), (Font::width), (Font::update): Disable special "nsbp" logic for now. We can reenable it if necessary.
  • src/kdelibs/khtml/rendering/render_replaced.cpp: Fix mismerge.
  • src/kdelibs/khtml/rendering/render_text.cpp: (RenderText::nodeAtPoint): Fix unused variable.
  • src/kwq/KWQApplication.mm: (QDesktopWidget::width), (QApplication::desktop): Fix mismerge.
  • src/kwq/KWQColorGroup.mm: Fix QCOLOR_GROUP_SIZE.
  • src/kwq/KWQFontMetrics.mm: (QFontMetrics::lineSpacing): New. (QFontMetrics::width): Remove unused optimization.
  • src/kwq/qt/qfontmetrics.h: Add lineSpacing().

Merged changes from previous merge pass.

2002-03-25 Darin Adler <Darin Adler>

Last bit of making stuff compile and link. Probably will drop the merge now
and take it up again when it's time to merge in KDE 3.0 final.

  • src/kwq/KWQEvent.mm: (QFocusEvent::reason): New.
  • src/kwq/KWQPainter.mm: (QPainter::drawText): New overload.

2002-03-25 Darin Adler <Darin Adler>

  • src/kdelibs/khtml/rendering/font.cpp: (Font::width): Make it call _width so we don't lose the optimization.
  • src/kwq/KWQApplication.mm: (QDesktopWidget::screenNumber): New. (QDesktopWidget::screenGeometry): New. (QApplication::style): New.
  • src/kwq/KWQColorGroup.mm: (QColorGroup::highlight): New. (QColorGroup::highlightedText): New.
  • src/kwq/KWQFont.mm: (QFont::setPixelSize): New.
  • src/kwq/KWQFontMetrics.mm: (QFontMetrics::charWidth): New.
  • src/kwq/KWQKGlobal.mm: (KGlobal::locale): Implement. (KLocale::KLocale): New. (KLocale::languageList): New.
  • src/kwq/KWQKHTMLPart.mm: (KHTMLPart::sheetUsed): New. (KHTMLPart::setSheetUsed): New. (KHTMLPart::zoomFactor): New.
  • src/kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): New.
  • src/kwq/KWQScrollView.mm: (QScrollView::childX): New. (QScrollView::childY): New.
  • src/kwq/qt/qapplication.h: style() returns a QStyle &.
  • src/kwq/qt/qpalette.h: Add Highlight and HighlightedText.

2002-03-24 Darin Adler <Darin Adler>

More compiling. Still won't link.

  • src/kdelibs/khtml/khtmlview.cpp: Disable printing and drag and drop code.
  • src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration): Temporarily turn off our smarter underlining since it relies on access to the string, and TextSlave doesn't have that any more. (RenderText::nodeAtPoint): Get rid of a workaround we don't need any more for a bug that was fixed by KDE folks.
  • src/kwq/KWQApplication.mm: (QApplication::desktop): Make the desktop be a QDesktopWidget.
  • src/kwq/qt/qnamespace.h: Add MetaButton.
  • src/kwq/qt/qtooltip.h: Add a maybeTip virtual function member and a virtual destructor.

2002-03-24 Darin Adler <Darin Adler>

Some fixes to get more stuff to compile.

  • src/kdelibs/khtml/ecma/kjs_dom.cpp: (DOMDocument::getValueProperty): Don't try to look at the private m_bComplete to display "complete". Just do "loading" and "loaded".
  • src/kdelibs/khtml/khtmlpart_p.h: #ifdef this all out for APPLE_CHANGES.
  • src/kdelibs/khtml/rendering/font.cpp: (Font::update): Add an explicit cast to int to avoid float -> int warning.
  • src/kdelibs/khtml/rendering/render_table.cpp: (RenderTable::calcColMinMax): Add an explicit cast to int to avoid uint compared with int warning.
  • src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector): Use sheetUsed() and setSheetUsed() functions on KHTMLPart intead of getting at private fields the way the real KDE code does.
  • src/kwq/KWQKHTMLPart.h: Declare zoomFactor(), sheetUsed(), and setSheetUsed().
  • src/kwq/KWQStyle.h: Add PM_DefaultFramWidth as another metric.
  • src/kwq/kdecore/klocale.h: Add languageList().
  • src/kwq/khtml/khtml_settings.h: Add mediumFontSize().
  • src/kwq/qt/qapplication.h: Add style() and QDesktopWidget.
  • src/kwq/qt/qevent.h: Add reason().
  • src/kwq/qt/qfont.h: Add setPixelSize(int).
  • src/kwq/qt/qfontmetrics.h: Add charWidth() and _charWidth() functions.
  • src/kwq/qt/qpainter.h: Add drawText() overload with position parameter.
  • src/kwq/qt/qpalette.h: Add highlight() and highlightedText().
  • src/kwq/qt/qscrollview.h: Add childX() and childY().
  • src/kwq/KWQApplication.mm: Change KWQDesktopWidget to QDesktopWidget.

WebKit:

  • WebView.subproj/IFPreferences.h:
  • WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Remove the old WebKitFontSizes preference. (-[IFPreferences mediumFontSize]), (-[IFPreferences setMediumFontSize:]): New.
  • WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]): Call updateStyleSelector() instead of recalcStyle().

Merged changes from previous merge branch.

2002-03-25 Darin Adler <Darin Adler>

  • WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Add WebKitMediumFontSizePreferenceKey.

WebBrowser:

  • Preferences.subproj/TextPreferences.m: (-[TextPreferences defaultFontSize]), (-[TextPreferences setDefaultFontSize:]): Just get and set the new mediumFontSize preference rather than doing the whole fontSizes preference dance.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 KB
Line 
1// -*- c-basic-offset: 2 -*-
2/*
3 * This file is part of the KDE libraries
4 * Copyright (C) 1999-2001 Harri Porten ([email protected])
5 * Copyright (C) 2001 Peter Kelly ([email protected])
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#ifndef _KJSDEBUGGER_H_
24#define _KJSDEBUGGER_H_
25
26namespace KJS {
27
28 class DebuggerImp;
29 class Interpreter;
30 class ExecState;
31 class Object;
32 class UString;
33 class List;
34
35 /**
36 * @internal
37 *
38 * Provides an interface which receives notification about various
39 * script-execution related events such as statement execution and function
40 * calls.
41 *
42 * WARNING: This interface is still a work in progress and is not yet
43 * offically publicly available. It is likely to change in binary incompatible
44 * (and possibly source incompatible) ways in future versions. It is
45 * anticipated that at some stage the interface will be frozen and made
46 * available for general use.
47 */
48 class Debugger {
49 public:
50
51 /**
52 * Creates a new debugger
53 */
54 Debugger();
55
56 /**
57 * Destroys the debugger. If the debugger is attached to any interpreters,
58 * it is automatically detached.
59 */
60 virtual ~Debugger();
61
62 DebuggerImp *imp() const { return rep; }
63
64 /**
65 * Attaches the debugger to specified interpreter. This will cause this
66 * object to receive notification of events from the interpreter.
67 *
68 * If the interpreter is deleted, the debugger will automatically be
69 * detached.
70 *
71 * Note: only one debugger can be attached to an interpreter at a time.
72 * Attaching another debugger to the same interpreter will cause the
73 * original debugger to be detached from that interpreter.
74 *
75 * @param interp The interpreter to attach to
76 *
77 * @see detach()
78 */
79 void attach(Interpreter *interp);
80
81 /**
82 * Detach the debugger from an interpreter
83 *
84 * @param interp The interpreter to detach from. If 0, the debugger will be
85 * detached from all interpreters to which it is attached.
86 *
87 * @see attach()
88 */
89 void detach(Interpreter *interp);
90
91 /**
92 * Called to notify the debugger that some javascript source code has
93 * been parsed. For calls to Interpreter::evaluate(), this will be called
94 * with the supplied source code before any other code is parsed.
95 * Other situations in which this may be called include creation of a
96 * function using the Function() constructor, or the eval() function.
97 *
98 * The default implementation does nothing. Override this method if
99 * you want to process this event.
100 *
101 * @param exec The current execution state
102 * @param sourceId The ID of the source code (corresponds to the
103 * sourceId supplied in other functions such as @ref atStatement()
104 * @param source The source code that was parsed
105 * @param errorLine The line number at which parsing encountered an
106 * error, or -1 if the source code was valid and parsed succesfully
107 * @return true if execution should be continue, false if it should
108 * be aborted
109 */
110 virtual bool sourceParsed(ExecState *exec, int sourceId,
111 const UString &source, int errorLine);
112
113 /**
114 * Called when all functions/programs associated with a particular
115 * sourceId have been deleted. After this function has been called for
116 * a particular sourceId, that sourceId will not be used again.
117 *
118 * The default implementation does nothing. Override this method if
119 * you want to process this event.
120 *
121 * @param exec The current execution state
122 * @param sourceId The ID of the source code (corresponds to the
123 * sourceId supplied in other functions such as atLine()
124 * @return true if execution should be continue, false if it should
125 * be aborted
126 */
127 virtual bool sourceUnused(ExecState *exec, int sourceId);
128
129 /**
130 * Called when an exception is thrown during script execution.
131 *
132 * The default implementation does nothing. Override this method if
133 * you want to process this event.
134 *
135 * @param exec The current execution state
136 * @param sourceId The ID of the source code being executed
137 * @param lineno The line at which the error occurred
138 * @param exceptionObj The exception object
139 * @return true if execution should be continue, false if it should
140 * be aborted
141 */
142 virtual bool exception(ExecState *exec, int sourceId, int lineno,
143 Object &exceptionObj);
144
145 /**
146 * Called when a line of the script is reached (before it is executed)
147 *
148 * The default implementation does nothing. Override this method if
149 * you want to process this event.
150 *
151 * @param exec The current execution state
152 * @param sourceId The ID of the source code being executed
153 * @param firstLine The starting line of the statement that is about to be
154 * executed
155 * @param firstLine The ending line of the statement that is about to be
156 * executed (usually the same as firstLine)
157 * @return true if execution should be continue, false if it should
158 * be aborted
159 */
160 virtual bool atStatement(ExecState *exec, int sourceId, int firstLine,
161 int lastLine);
162 /**
163 * Called on each function call. Use together with @ref #returnEvent
164 * if you want to keep track of the call stack.
165 *
166 * Note: This only gets called for functions that are declared in ECMAScript
167 * source code or passed to eval(), not for internal KJS or
168 * application-supplied functions.
169 *
170 * The default implementation does nothing. Override this method if
171 * you want to process this event.
172 *
173 * @param exec The current execution state
174 * @param sourceId The ID of the source code being executed
175 * @param lineno The line that is about to be executed
176 * @param function The function being called
177 * @param args The arguments that were passed to the function
178 * line is being executed
179 * @return true if execution should be continue, false if it should
180 * be aborted
181 */
182 virtual bool callEvent(ExecState *exec, int sourceId, int lineno,
183 Object &function, const List &args);
184
185 /**
186 * Called on each function exit. The function being returned from is that
187 * which was supplied in the last callEvent().
188 *
189 * Note: This only gets called for functions that are declared in ECMAScript
190 * source code or passed to eval(), not for internal KJS or
191 * application-supplied functions.
192 *
193 * The default implementation does nothing. Override this method if
194 * you want to process this event.
195 *
196 * @param exec The current execution state
197 * @param sourceId The ID of the source code being executed
198 * @param lineno The line that is about to be executed
199 * @param function The function being called
200 * @return true if execution should be continue, false if it should
201 * be aborted
202 */
203 virtual bool returnEvent(ExecState *exec, int sourceId, int lineno,
204 Object &function);
205
206 private:
207 DebuggerImp *rep;
208 };
209
210};
211
212#endif
Note: See TracBrowser for help on using the repository browser.