WebCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2008-11-14  Justin Garcia  <justin.garcia@apple.com>
2
3         Reviewed by Beth Dakin.
4
5         <rdar://problem/4230923> "Make Plain Text" doesn't reset text alignment in single paragraph messages
6         
7         When applying block styles, we would add block properties to the body element, and Mail's
8         Make Plain Text feature isn't equipped to remove those.  This could have been fixed on our side,
9         but this change has the advantage that it fixes the bug on Tiger, where Mail does not plan future updates.
10         
11         We have code that puts the paragraphs that we're operating on into blocks of their own before
12         adding or removing block properties from the blocks that enclose them.  We need to run this code 
13         when the enclosing block is the body element.
14         
15         * editing/CompositeEditCommand.cpp:
16         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Added, moved code from moveParagraphContents
17         to here.
18         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Renamed some variables for clarity.
19         Added a few comments.  Fixed bug by not bailing out when the block about to be used is the body element.
20         * editing/CompositeEditCommand.h:
21
22 2008-11-14  Cameron Zwarich  <zwarich@apple.com>
23
24         Reviewed by Darin Adler.
25
26         Bug 22245: Move wtf/dtoa.h into the WTF namespace
27         <https://bugs.webkit.org/show_bug.cgi?id=22245>
28
29         Move wtf/dtoa.h into the WTF namespace from the JSC namespace.
30
31         * platform/text/String.cpp:
32         (WebCore::charactersToDouble):
33
34 2008-11-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
35
36         Rubber-stamped by Simon Hausmann.
37
38         Make sure Qt scrollbars follow the style with regard to context menus
39
40         * platform/qt/ScrollbarQt.cpp:
41         (WebCore::Scrollbar::contextMenu):
42
43 2008-11-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
44
45         Rubber-stamped by Simon Hausmann.
46
47         Make scrollbar look active when the window is active on Qt/Mac
48
49         * platform/qt/ScrollbarThemeQt.cpp:
50         (WebCore::styleOptionSlider):
51         (WebCore::ScrollbarThemeQt::paint):
52
53 2008-11-13  Eric Seidel  <eric@webkit.org>
54
55         Reviewed by Adam Roben.
56
57         Add a basic Scons-based build system for building
58         Chromium-Mac WebCore.
59         https://bugs.webkit.org/show_bug.cgi?id=21991
60
61         The build currently fails due to missing files from our
62         platform directory (platform skia and platform chromium)
63         I will be sending those up shortly in separate patches.
64         I expect it will be a while before our WebCore build links.
65
66         * SConstruct: Added.
67         * WebCore.scons: Added.
68
69 2008-11-13  Darin Fisher  <darin@chromium.org>
70
71         Reviewed by Darin Adler.
72
73         https://bugs.webkit.org/show_bug.cgi?id=22248
74         AtomicString.cpp uses JSC types outside of #if USE(JSC)
75
76         * platform/text/AtomicString.cpp:
77         (WebCore::AtomicString::add):
78         
79 2008-11-13  Justin Garcia  <justin.garcia@apple.com>
80
81         Reviewed by Darin Adler.
82         
83         https://bugs.webkit.org/show_bug.cgi?id=18620
84         Long hang under TextIterator::advance() when loading http://www.lsvd.de/
85
86         A huge section at the beginning of this document is invisible.  As we iterate through it,
87         we create VisiblePositions unnecessarily.
88
89         * editing/TextIterator.cpp:
90         (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Don't proceed to VisiblePosition 
91         creation if m_node is unrendered or invisible.  The answers wouldn't have much meaning 
92         and would be wasteful.  Also fixed some comments to reflect the fact that this function
93         isn't specifically about emitting a newline.
94
95 2008-11-13  Pierre-Olivier Latour  <pol@apple.com>
96
97         Reviewed by Sam Weinig.
98
99         Remove unused or unnecessary code from AnimationBase class.
100
101         * page/animation/AnimationBase.cpp:
102         (WebCore::AnimationBase::AnimationBase):
103         (WebCore::AnimationBase::playStatePlaying):
104         * page/animation/AnimationBase.h:
105
106 2008-11-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
107
108         Reviewed by Simon Hausmann.
109
110         Inital implementation of PluginPackage and PluginView for Mac NPAPI support in WebCore
111
112         Currently only used by QtWebKit. See also:
113
114         https://bugs.webkit.org/show_bug.cgi?id=21427
115
116         * WebCore.pro:
117         * platform/qt/TemporaryLinkStubs.cpp:
118         (PluginView::userAgentStatic):
119         (PluginView::getValueStatic):
120         * plugins/PluginView.cpp:
121         (WebCore::PluginView::handleEvent):
122         (WebCore::PluginView::setValue):
123         (WebCore::PluginView::PluginView):
124         * plugins/PluginView.h:
125         (WebCore::PluginView::setPlatformPluginWidget):
126         * plugins/mac/PluginPackageMac.cpp: Added.
127         (WebCore::PluginPackage::determineQuirks):
128         (WebCore::readPListFile):
129         (WebCore::stringListFromResourceId):
130         (WebCore::PluginPackage::fetchInfo):
131         (WebCore::PluginPackage::load):
132         (WebCore::PluginPackage::hash):
133         (WebCore::PluginPackage::equal):
134         (WebCore::PluginPackage::compareFileVersion):
135         * plugins/mac/PluginViewMac.cpp: Added.
136         (WebCore::nativeWindowFor):
137         (WebCore::cgHandleFor):
138         (WebCore::topLevelOffsetFor):
139         (WebCore::PluginView::init):
140         (WebCore::PluginView::~PluginView):
141         (WebCore::PluginView::stop):
142         (WebCore::PluginView::getValueStatic):
143         (WebCore::PluginView::getValue):
144         (WebCore::PluginView::setParent):
145         (WebCore::PluginView::show):
146         (WebCore::PluginView::hide):
147         (WebCore::PluginView::setFocus):
148         (WebCore::PluginView::setParentVisible):
149         (WebCore::PluginView::setNPWindowRect):
150         (WebCore::PluginView::setNPWindowIfNeeded):
151         (WebCore::PluginView::updatePluginWidget):
152         (WebCore::PluginView::paint):
153         (WebCore::PluginView::invalidateRect):
154         (WebCore::PluginView::invalidateRegion):
155         (WebCore::PluginView::forceRedraw):
156         (WebCore::PluginView::handleMouseEvent):
157         (WebCore::PluginView::handleKeyboardEvent):
158         (WebCore::PluginView::nullEventTimerFired):
159         (WebCore::modifiersForEvent):
160         (WebCore::PluginView::globalMousePosForPlugin):
161         (WebCore::PluginView::dispatchNPEvent):
162         (WebCore::PluginView::userAgent):
163         (WebCore::PluginView::userAgentStatic):
164         (WebCore::PluginView::handlePostReadFile):
165
166 2008-11-12  Alexey Proskuryakov  <ap@webkit.org>
167
168         Reviewed by Darin Adler.
169
170         https://bugs.webkit.org/show_bug.cgi?id=22200
171         Crash when close event is dispatched to MessagePort due to document destruction
172
173         Test: fast/events/message-port-onclose.html
174
175         * dom/MessagePort.cpp: (WebCore::MessagePort::contextDestroyed):
176         Don't dispatch close event, even though HTML5 currently says that we should. It is not
177         right for GC to have observable effects.
178
179 2008-11-12  Alexey Proskuryakov  <ap@webkit.org>
180
181         Reviewed by Darin Adler.
182
183         https://bugs.webkit.org/show_bug.cgi?id=22203
184         Implement Worker messaging
185
186         No test cases included, because this functionality is disabled by default.
187
188         The implementation is known to still have many race condition, but works quite well for
189         testing.
190
191         * WebCore.xcodeproj/project.pbxproj: Added WorkerTask.{h,cpp}.
192
193         * bindings/js/JSDOMBinding.cpp:
194         (WebCore::markActiveObjectsForContext): Re-worded comments a little.
195         (WebCore::markCrossHeapDependentObjectsForContext): Existing cross-heap GC protocol was
196         incorrect, changed it to a much simpler (but still incorrect) version.
197
198         * dom/WorkerTask.cpp: Added.
199         (WebCore::WorkerTask::~WorkerTask):
200         * dom/WorkerTask.h: Added.
201         Tasks posted to workers implement this new interface.
202
203         * bindings/js/JSDedicatedWorkerCustom.cpp:
204         (WebCore::JSDedicatedWorker::mark):
205         (WebCore::JSDedicatedWorker::connect):
206         * dom/DedicatedWorker.h:
207         * dom/DedicatedWorker.idl:
208         Auto-generate event listener attributes. Renamed startConversation() to connect(), tracking
209         WHATWG discussions.
210
211         * dom/DedicatedWorker.cpp:
212         (WebCore::WorkerConnectTask::WorkerConnectTask): A task that performs worker-side connect()
213         operations.
214         (WebCore::DedicatedWorker::DedicatedWorker): Initialize WorkerThread pointer.
215         (WebCore::DedicatedWorker::connect): Connect() creates a pair of entangled ports, and posts
216         one to worker. Since message port registration in ScriptExecutionContext is not thread safe,
217         this port starts with a null context pointer.
218         (WebCore::DedicatedWorker::notifyFinished): Since Worker methods should work immediately
219         after creation, we have to queue tasks until after a WorkerThread object is created. Then we
220         forward all queued tasks to its queue.
221
222         * dom/EventTarget.cpp: (WebCore::EventTarget::toWorkerContext):
223         * dom/EventTarget.h:
224         * bindings/js/JSEventTarget.cpp: (WebCore::toJS):
225         Added cases for WorkerContext, which is now an EventTarget, too.
226
227         * bindings/js/JSWorkerContext.h: Added JSWorkerContext::put() to make onconnect settable.
228         * bindings/js/JSWorkerContext.cpp:
229         (WebCore::JSWorkerContext::mark): Mark event listeners.
230         (WebCore::JSWorkerContext::createPrototype): Fixed a typo, use the right StructureID.
231         (WebCore::JSWorkerContext::put): Implemented.
232         (WebCore::jsWorkerContextPrototypeFunctionAddEventListener): Added an EventTarget implementation.
233         (WebCore::jsWorkerContextPrototypeFunctionRemoveEventListener): Ditto.
234         (WebCore::jsWorkerContextPrototypeFunctionDispatchEvent): Ditto.
235         (WebCore::jsWorkerContextOnconnect): Added.
236         (WebCore::setJSWorkerContextOnconnect): Added.
237
238         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
239         Made it actually work by adding necessary setup.
240
241         * bindings/js/WorkerScriptController.h: (WebCore::WorkerScriptController::initScriptIfNeeded):
242         Check the right variable - it is the wrapper that may not be initialized yet.
243
244         * dom/ActiveDOMObject.cpp:
245         (WebCore::ActiveDOMObject::ActiveDOMObject):
246         (WebCore::ActiveDOMObject::~ActiveDOMObject):
247         Assert being called from the correct thread, as active DOM object tracking is not thread safe.
248
249         * dom/ScriptExecutionContext.h: Added a Task interface and a postTask() method, to be used
250         for asynchronously executing tasks in context's thread.
251
252         * dom/ScriptExecutionContext.cpp:
253         (WebCore::ProcessMessagesSoonTask): Changed from a Timer to a Task
254         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Removed m_firedMessagePortTimer.
255         It was an optimization that couldn't be easily preserved without introducing race conditions
256         in multithreading case.
257         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon): Use postTask().
258         (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): Added a comment explaining
259         why it's OK to not ref() ports in a frozen copy.
260         (WebCore::ScriptExecutionContext::createdMessagePort): Assert that we're not being called
261         from a wrong thread.
262         (WebCore::ScriptExecutionContext::destroyedMessagePort): Ditto.
263         (WebCore::ScriptExecutionContextTaskTimer): Part of
264         ScriptExecutionContext::Task implementation - use Timer if posting from main thread to main
265         thread.
266         (WebCore::ScriptExecutionContextTaskWorkerTask): Another part - use WorkerTask if posting
267         to a worker.
268         (WebCore::PerformTaskContext::PerformTaskContext): Finally, use callOnMainThread() if posting
269         to main thread from a secondary one.
270         (WebCore::performTask): A helper function for callOnMainThread().
271         (WebCore::ScriptExecutionContext::postTask): Use one of the above implementations.
272
273         * dom/MessagePort.h: Fixed message queue to keep EventData pointers - otherwise, we would
274         ref/deref EventData::message from different threads, which is not allowed.
275
276         * dom/MessagePort.cpp:
277         (WebCore::MessagePortCloseEventTask): Use a task instead of a timer to work across threads.
278         (WebCore::MessagePort::EventData::create): Updated for EventData being refcountable now.
279         (WebCore::MessagePort::EventData::EventData): Ditto.
280         (WebCore::MessagePort::MessagePort): ScriptExecutionContext is now allowed to be null at
281         first, because we need to create ports for posting to other threads, and it is not possible
282         to register in a context from another thread.
283         (WebCore::MessagePort::clone): Always create ports with null contexts - it is now message
284         receiver's job to set the context.
285         (WebCore::MessagePort::postMessage): Enable posting to ports that are not attached to any
286         context yet.
287         (WebCore::MessagePort::startConversation): Ditto. Data port is always posted unattached.
288         (WebCore::MessagePort::contextDestroyed): Assert that we had a context.
289         (WebCore::MessagePort::attachToContext): Called when receiving a data port to register in
290         context.
291         (WebCore::MessagePort::scriptExecutionContext): Moved from header, as the function is virtual.
292         (WebCore::MessagePort::dispatchMessages): Attach data port to receiving context. Use postTask().
293         (WebCore::MessagePort::queueCloseEvent): Use postTask().
294         (WebCore::MessagePort::hasPendingActivity): Reworded comment a little. As mentioned above,
295         MessagePort cross-heap GC is still quite wrong.
296
297         * dom/WorkerContext.h: Made WorkerContext an event target, added onconnect attribute.
298         * dom/WorkerContext.cpp: Keep a pointer to WorkerThread. It is only used for debug assertions
299         now, but there is no harm in tracking it in release builds, too.
300
301         * dom/WorkerThread.cpp:
302         (WebCore::WorkerThread::create): WorkerThread is refcountable, construct with create().
303         (WebCore::WorkerThread::workerThread): Implemented a message loop.
304         * dom/WorkerThread.h:
305         (WebCore::WorkerThread::threadID): Also only used for assertions.
306         (WebCore::WorkerThread::messageQueue): Return a reference to queue, so clients can post to it.
307
308         * page/DOMWindow.cpp:
309         (WebCore::DOMWindow::postMessage): MessagePort::clone() no longer takes a context, as it
310         always sets it to null.
311         (WebCore::DOMWindow::postMessageTimerFired): Attach data port to receiving context.
312
313 2008-11-12  Dirk Schulze  <vbs85@gmx.de>
314
315         Reviewed Darin Adler.
316
317         use strokeColor.alpha() instead of fillColor.alpha()
318         on GraphicsContext::strokePath()
319
320         [Canvas] Transparent fillStyle stops line rendering
321         https://bugs.webkit.org/show_bug.cgi?id=21888
322
323         Test: fast/canvas/canvas-stroke-empty-fill.html
324
325         * ChangeLog:
326         * platform/graphics/cg/GraphicsContextCG.cpp:
327         (WebCore::GraphicsContext::strokePath):
328
329 2008-11-12  Stephanie  <slewis@apple.com>
330
331         Reviewed by Mark Rowe.
332
333         Fix context leak in XSLStyleSheets.
334         See bug https://bugs.webkit.org/show_bug.cgi?id=15715
335
336         * xml/XSLStyleSheet.cpp:
337         (WebCore::XSLStyleSheet::parseString):
338
339 2008-11-12  Alp Toker  <alp@nuanti.com>
340
341         autotools: List web worker-related headers needed for a successful
342         build. distcheck is passing again with this change.
343
344         * GNUmakefile.am:
345
346 2008-11-12  Alp Toker  <alp@nuanti.com>
347
348         autotools build system fix-up only. Add FloatQuad.h to the source
349         lists and sort them.
350
351         * GNUmakefile.am:
352
353 2008-11-12  Alp Toker  <alp@nuanti.com>
354
355         Build fixes for r38346. FloatQuad.cpp is missing:
356
357         1) #include "config.h"
358         2) #include <algorithm> for various mathematical definitions it uses.
359
360         * platform/graphics/FloatQuad.cpp:
361
362 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
363
364         Reviewed by Dan Bernstein
365
366         https://bugs.webkit.org/show_bug.cgi?id=22212
367
368         Rename absoluteOutlineBox() to absoluteOutlineBounds(), to indicate that
369         it may be the bounding outline box of a transformed element, and fix it
370         to respect transforms by mapping the outline box to an absolute quad and
371         taking the enclosing rect.
372         
373         RenderBox::localToAbsoluteQuad() can no longer assert that there is no
374         LayoutState, but LayoutState cannot be used during quad mapping (it knows
375         nothing about transforms).
376         
377         Finally, fix a bug in RenderBox::localToAbsoluteQuad() which was getting
378         borderTopExtra() from the object, rather than its container (as localToAbsolute()
379         does).
380         
381         Test: fast/repaint/transform-absolute-child.html
382
383         * rendering/RenderBlock.cpp:
384         (WebCore::RenderBlock::layoutBlock):
385         * rendering/RenderBox.cpp:
386         (WebCore::RenderBox::localToAbsoluteQuad):
387         * rendering/RenderFlexibleBox.cpp:
388         (WebCore::RenderFlexibleBox::layoutBlock):
389         * rendering/RenderForeignObject.cpp:
390         (WebCore::RenderForeignObject::layout):
391         * rendering/RenderLayer.cpp:
392         (WebCore::RenderLayer::updateLayerPositions):
393         (WebCore::RenderLayer::setHasVisibleContent):
394         * rendering/RenderObject.cpp:
395         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
396         (WebCore::RenderObject::absoluteOutlineBounds):
397         * rendering/RenderObject.h:
398         * rendering/RenderPath.cpp:
399         (WebCore::RenderPath::layout):
400         * rendering/RenderReplaced.cpp:
401         (WebCore::RenderReplaced::layout):
402         * rendering/RenderSVGContainer.cpp:
403         (WebCore::RenderSVGContainer::layout):
404         * rendering/RenderSVGImage.cpp:
405         (WebCore::RenderSVGImage::layout):
406         * rendering/RenderSVGRoot.cpp:
407         (WebCore::RenderSVGRoot::layout):
408         * rendering/RenderSVGText.cpp:
409         (WebCore::RenderSVGText::layout):
410         * rendering/RenderSVGViewportContainer.cpp:
411         (WebCore::RenderSVGViewportContainer::layout):
412         * rendering/RenderTable.cpp:
413         (WebCore::RenderTable::layout):
414
415 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
416
417         Reviewed by Dave Hyatt
418
419         https://bugs.webkit.org/show_bug.cgi?id=21942
420         https://bugs.webkit.org/show_bug.cgi?id=18557
421         
422         Add methods which can be used to map renderer-local rectangles
423         to quads in absolute coordinates, taking transforms into account:
424             localToAbsoluteQuad() converts a local rect into an absolute quad.
425             collectAbsoluteLineBoxQuads() is an analogue of addLineBoxRects()
426                 that works with quads.
427             absoluteQuads() is an analogue of absoluteRects(), for quads.
428         
429         Use the quad methods to fix the inspector highlight for transformed
430         elements.
431
432         * GNUmakefile.am:
433         * WebCore.pro:
434         * WebCore.vcproj/WebCore.vcproj:
435         * WebCore.xcodeproj/project.pbxproj:
436         * WebCoreSources.bkl:
437         * inspector/InspectorController.cpp:
438         (WebCore::drawOutlinedQuad):
439         (WebCore::drawHighlightForBoxes):
440         (WebCore::frameToMainFrameOffset):
441         (WebCore::InspectorController::drawNodeHighlight):
442         * platform/graphics/AffineTransform.cpp:
443         (WebCore::AffineTransform::mapQuad):
444         * platform/graphics/AffineTransform.h:
445         * platform/graphics/FloatQuad.cpp: Added.
446         (WebCore::min4):
447         (WebCore::max4):
448         (WebCore::FloatQuad::boundingBox):
449         * platform/graphics/FloatQuad.h: Added.
450         (WebCore::FloatQuad::FloatQuad):
451         (WebCore::FloatQuad::p1):
452         (WebCore::FloatQuad::p2):
453         (WebCore::FloatQuad::p3):
454         (WebCore::FloatQuad::p4):
455         (WebCore::FloatQuad::setP1):
456         (WebCore::FloatQuad::setP2):
457         (WebCore::FloatQuad::setP3):
458         (WebCore::FloatQuad::setP4):
459         (WebCore::FloatQuad::isEmpty):
460         (WebCore::FloatQuad::enclosingBoundingBox):
461         (WebCore::FloatQuad::move):
462         (WebCore::operator+=):
463         (WebCore::operator-=):
464         (WebCore::operator==):
465         (WebCore::operator!=):
466         * rendering/RenderBox.cpp:
467         (WebCore::RenderBox::localToAbsoluteQuad):
468         * rendering/RenderBox.h:
469         * rendering/RenderContainer.cpp:
470         (WebCore::RenderContainer::collectAbsoluteLineBoxQuads):
471         * rendering/RenderContainer.h:
472         * rendering/RenderInline.cpp:
473         (WebCore::RenderInline::absoluteQuads):
474         * rendering/RenderInline.h:
475         * rendering/RenderObject.cpp:
476         (WebCore::RenderObject::absoluteBoundingBoxRect):
477         (WebCore::RenderObject::collectAbsoluteLineBoxQuads):
478         (WebCore::RenderObject::absoluteQuads):
479         (WebCore::RenderObject::localToAbsoluteQuad):
480         (WebCore::RenderObject::absoluteContentQuad):
481         * rendering/RenderObject.h:
482         * rendering/RenderPath.cpp:
483         (WebCore::RenderPath::absoluteQuads):
484         * rendering/RenderPath.h:
485         * rendering/RenderSVGContainer.cpp:
486         (WebCore::RenderSVGContainer::absoluteQuads):
487         * rendering/RenderSVGContainer.h:
488         * rendering/RenderSVGHiddenContainer.cpp:
489         (WebCore::RenderSVGHiddenContainer::absoluteQuads):
490         * rendering/RenderSVGHiddenContainer.h:
491         * rendering/RenderSVGImage.cpp:
492         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
493         (WebCore::RenderSVGImage::absoluteQuads):
494         * rendering/RenderSVGImage.h:
495         * rendering/RenderSVGInlineText.cpp:
496         (WebCore::RenderSVGInlineText::absoluteQuads):
497         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
498         * rendering/RenderSVGInlineText.h:
499         * rendering/RenderSVGRoot.cpp:
500         (WebCore::RenderSVGRoot::absoluteQuads):
501         * rendering/RenderSVGRoot.h:
502         * rendering/RenderSVGTSpan.cpp:
503         (WebCore::RenderSVGTSpan::absoluteRects):
504         (WebCore::RenderSVGTSpan::absoluteQuads):
505         * rendering/RenderSVGTSpan.h:
506         * rendering/RenderSVGText.cpp:
507         (WebCore::RenderSVGText::absoluteRects):
508         (WebCore::RenderSVGText::absoluteQuads):
509         * rendering/RenderSVGText.h:
510         * rendering/RenderSVGTextPath.cpp:
511         (WebCore::RenderSVGTextPath::absoluteRects):
512         (WebCore::RenderSVGTextPath::absoluteQuads):
513         * rendering/RenderSVGTextPath.h:
514         * rendering/RenderTableCell.cpp:
515         (WebCore::RenderTableCell::localToAbsolute):
516         (WebCore::RenderTableCell::localToAbsoluteQuad):
517         * rendering/RenderTableCell.h:
518         * rendering/RenderText.cpp:
519         (WebCore::RenderText::absoluteQuads):
520         (WebCore::RenderText::collectAbsoluteLineBoxQuads):
521         * rendering/RenderText.h:
522         * rendering/RenderView.cpp:
523         (WebCore::RenderView::localToAbsoluteQuad):
524         (WebCore::RenderView::absoluteQuads):
525         * rendering/RenderView.h:
526
527 2008-11-12  Brent Fulgham <bfulgham@gmail.com>
528
529         Fix Bug 22178: Build errors in WebKit Cairo port
530
531         <https://bugs.webkit.org/show_bug.cgi?id=22178>
532
533         Reviewed by Mark Rowe.
534
535         * platform/graphics/cairo/PatternCairo.cpp: Correct build error under
536         Visual Studio.
537         (WebCore::Pattern::createPlatformPattern):
538
539 2008-11-12  Adam Roben  <aroben@apple.com>
540
541         Fix a typo in the include path for the Release_Cairo configuration
542
543         * WebCore.vcproj/WebCore.vcproj: Fixed "caro" -> "cairo" typo.
544
545 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
546
547         Reviewed by Dave Hyatt
548
549         https://bugs.webkit.org/show_bug.cgi?id=17840
550         Patch 2
551         
552         Code cleanup in RenderBox::computeAbsoluteRepaintRect().
553
554         * rendering/RenderBox.cpp:
555         (WebCore::RenderBox::computeAbsoluteRepaintRect):
556
557 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
558
559         Reviewed by Dave Hyatt
560
561         https://bugs.webkit.org/show_bug.cgi?id=17840
562
563         Fix repainting when the transform on a positioned element changes.
564         In computeAbsoluteRepaintRect(), add the offsets due to relative positioning,
565         and being in a positioned container after applying the transform to the local
566         rect.
567
568         Tests: fast/repaint/transform-absolute-in-positioned-container.html
569                fast/repaint/transform-relative-position.html
570
571         * rendering/RenderBox.cpp:
572         (WebCore::RenderBox::computeAbsoluteRepaintRect):
573
574 2008-11-12  Justin Garcia  <justin.garcia@apple.com>
575  
576         Reviewed by Beth Dakin.
577  
578         <rdar://problem/5495723> Selecting and deleting quoted text quotes other text
579         <rdar://problem/4775313> Deleting lines from the bottom of a messages leaves the last blank line quoted
580         
581         We don't want to merge into a block if it will mean changing the quote level of content after deleting 
582         selections that contain a whole number paragraphs plus a line break, since it is unclear to most users 
583         that such a selection actually ends at the start of the next paragraph.  Instead we want to completely
584         remove the selected paragraph(s) and all evidence of the first one's quote level.  This matches TextEdit behavior 
585         for indented paragraphs.
586  
587         * editing/DeleteSelectionCommand.cpp:
588         (WebCore::DeleteSelectionCommand::initializePositionData): For the selections described above, do not
589         try to merge after the deletion.  Instead try and prune the start block or blocks if they've been emptied
590         so that we remove evidence of the deleted paragraphs' quote level.
591         (WebCore::DeleteSelectionCommand::mergeParagraphs): Try and prune the start block(s) if necessary.  Also 
592         make sure that the caret is placed correctly so that it ends up on the same line that the deleted selection 
593         started on, instead of one higher.
594         * editing/DeleteSelectionCommand.h:
595         * editing/htmlediting.cpp:
596         (WebCore::numEnclosingMailBlockquotes): Added.
597         * editing/htmlediting.h:
598
599 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
600
601         Reviewed by Simon Hausmann.
602
603         Move _web_encodingForResource from WebKit into WebCore and change return type
604
605         This change is needed to implement NSAPI in WebCore for Mac, see:
606
607         https://bugs.webkit.org/show_bug.cgi?id=21427
608
609         * WebCore.base.exp:
610         * platform/mac/WebCoreNSStringExtras.h:
611         * platform/mac/WebCoreNSStringExtras.mm:
612         (stringEncodingForResource):
613
614 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
615
616         Reviewed by Simon Hausmann.
617
618         Moved the implementation of _webkit_isCaseInsensitiveEqualToString to
619         WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString.
620
621         This change is needed to implement NSAPI in WebCore for Mac, see:
622
623         https://bugs.webkit.org/show_bug.cgi?id=21427
624
625         * WebCore.base.exp:
626         * platform/mac/WebCoreNSStringExtras.h:
627         * platform/mac/WebCoreNSStringExtras.mm:
628         (stringIsCaseInsensitiveEqualToString):
629
630 2008-11-11  Stephanie  <slewis@apple.com>
631
632         Reviewed by Dan Bernstein.
633
634         Null check image data before setting it as image source.
635
636         Test: fast/images/image-empty-data.html
637
638         * platform/graphics/BitmapImage.cpp:
639         (WebCore::BitmapImage::destroyDecodedData):
640
641 2008-11-11  Adele Peterson  <adele@apple.com>
642
643         Reviewed by Tim Hatcher.
644
645         Remove ifdef so future OS versions can use the new delegate method.
646
647         * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didSendBodyDataDelegateExists):
648
649 2008-11-11  Eric Seidel  <eric@webkit.org>
650
651         Reviewed by Antti Koivisto and Sam Weinig.
652
653         Clean up HTMLTokenizer a litle
654         https://bugs.webkit.org/show_bug.cgi?id=22188
655
656         Rename pendingScripts to m_pendingScripts
657         Rename scriptNode to m_scriptNode make the type specific
658         Rename pendingSrc to m_pendingSrc
659         Rename currentPrependingSrc to m_currentPrependingSrc
660         Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer
661         Remove long-since-dead kdDebug and qDebug calls
662         Rename brokenComments to m_brokenComments
663         Remove HTMLTokenizer includes and document the rest
664         Rename src to m_src
665         Rename parser to m_parser and make it an OwnPtr
666         Rename inWrite to m_inWrite and jsProxy to scriptController
667         Rename brokenServer to m_brokenServer
668         Rename buffer to m_buffer and dest to m_dest
669         Rename size to m_bufferSize
670         Rename attrName to m_attrName
671         Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen
672         Rename scriptCode* to m_scriptCode* and change scriptCodeMax to m_scriptCodeCapacity
673         Rename scriptStartLineno to m_currentScriptTagStartLineNumber and tagStartLineno to m_currentTagStartLineNumber
674         Rename scriptSrc to m_scriptTagSrcAttrValue and scriptSrcCharset to m_scriptTagCharsetAttrValue -- a bit unwieldy, but more precise
675         Rename flat to selfClosingTag
676         Rename currToken to m_currentToken
677
678         * css/CSSParser.cpp:
679         * dom/XMLTokenizer.cpp:
680         * dom/XMLTokenizerLibxml2.cpp:
681         * html/HTMLDocument.cpp:
682         * html/HTMLElement.cpp:
683         * html/HTMLFormControlElement.cpp:
684         * html/HTMLParser.h:
685         * html/HTMLTokenizer.cpp:
686         (WebCore::Token::addAttribute):
687         (WebCore::HTMLTokenizer::HTMLTokenizer):
688         (WebCore::HTMLTokenizer::reset):
689         (WebCore::HTMLTokenizer::begin):
690         (WebCore::HTMLTokenizer::processListing):
691         (WebCore::HTMLTokenizer::parseSpecial):
692         (WebCore::HTMLTokenizer::scriptHandler):
693         (WebCore::HTMLTokenizer::scriptExecution):
694         (WebCore::HTMLTokenizer::parseComment):
695         (WebCore::HTMLTokenizer::parseServer):
696         (WebCore::HTMLTokenizer::parseProcessingInstruction):
697         (WebCore::HTMLTokenizer::parseText):
698         (WebCore::HTMLTokenizer::parseEntity):
699         (WebCore::HTMLTokenizer::parseTag):
700         (WebCore::HTMLTokenizer::write):
701         (WebCore::HTMLTokenizer::processingData):
702         (WebCore::HTMLTokenizer::end):
703         (WebCore::HTMLTokenizer::finish):
704         (WebCore::HTMLTokenizer::processToken):
705         (WebCore::HTMLTokenizer::processDoctypeToken):
706         (WebCore::HTMLTokenizer::~HTMLTokenizer):
707         (WebCore::HTMLTokenizer::enlargeBuffer):
708         (WebCore::HTMLTokenizer::enlargeScriptBuffer):
709         (WebCore::HTMLTokenizer::notifyFinished):
710         (WebCore::HTMLTokenizer::setSrc):
711         * html/HTMLTokenizer.h:
712         (WebCore::Token::Token):
713         (WebCore::Token::reset):
714         (WebCore::HTMLTokenizer::processingContentWrittenByScript):
715         (WebCore::HTMLTokenizer::htmlParser):
716         (WebCore::HTMLTokenizer::checkBuffer):
717         (WebCore::HTMLTokenizer::checkScriptBuffer):
718         * html/HTMLViewSourceDocument.h:
719         * rendering/RenderBlock.cpp:
720         (WebCore::RenderBlock::leftRelOffset):
721         (WebCore::RenderBlock::rightRelOffset):
722         (WebCore::RenderBlock::lineWidth):
723         * xml/XSLTProcessor.cpp:
724
725 2008-11-11  Sam Weinig  <sam@webkit.org>
726
727         Reviewed by Dan Bernstein.
728
729         Fix for https://bugs.webkit.org/show_bug.cgi?id=22189
730         Track CachedScript decoded data
731
732         We now track the decoded size of CachedScripts in the Cache allowing
733         them to accounted for when deciding when to evict data.  The decoded
734         data itself can be evicted when Cache pressure gets high enough through
735         CachedScript::destroyDecodedData.
736
737         * loader/CachedResource.h:
738         (WebCore::CachedResource::allClientsRemoved):
739         (WebCore::CachedResource::destroyDecodedData):
740         * loader/CachedScript.cpp:
741         (WebCore::CachedScript::script):
742         (WebCore::CachedScript::data):
743         (WebCore::CachedScript::destroyDecodedData):
744         * loader/CachedScript.h:
745
746 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
747
748         Reviewed by Geoff Garen.
749
750         Remove pointless dependencies on the now-deleted kjs directory and
751         mentions of it in comments that are no longer relevant.
752
753         * WebCore.pro:
754         * webcore-base.bkl:
755
756 2008-11-11  Dan Bernstein  <mitz@apple.com>
757
758         Reviewed by Adam Roben.
759
760         WebCore part of adding a master volume control for media elements in a WebView
761
762         * WebCore.base.exp: Exported WebCore::Page::setMediaVolume().
763         * dom/Document.cpp:
764         (WebCore::Document::mediaVolumeDidChange): Added. Called by the Page
765         when the media volume is changed.
766         (WebCore::Document::registerForMediaVolumeCallbacks): Added. Allows
767         elements to register for a callback when the media volume is changed.
768         (WebCore::Document::unregisterForMediaVolumeCallbacks): Added. Allows
769         elements to unregister for the callback.
770         * dom/Document.h:
771         * dom/Element.h:
772         (WebCore::Element::mediaVolumeDidChange): Added an empty implementation.
773         * html/HTMLMediaElement.cpp:
774         (WebCore::HTMLMediaElement::HTMLMediaElement): Added a call to
775         registerForMediaVolumeCallbacks().
776         (WebCore::HTMLMediaElement::~HTMLMediaElement): Added a call to
777         unregisterForMediaVolumeCallbacks().
778         (WebCore::HTMLMediaElement::updateVolume): Changed to multiply the
779         element's intrinsic volume by the master volume from the page.
780         (WebCore::HTMLMediaElement::mediaVolumeDidChange): Added. Calls
781         updateVolume().
782         * html/HTMLMediaElement.h:
783         * page/Page.cpp:
784         (WebCore::Page::Page): Initialize m_mediaVolume to 1.
785         (WebCore::Page::setMediaVolume): Added. Calls mediaVolumeDidChange() on
786         every document in the page when the master volume changes.
787         * page/Page.h:
788         (WebCore::Page::mediaVolume): Added this getter.
789
790 2008-11-11  David Hyatt  <hyatt@apple.com>
791
792         https://bugs.webkit.org/show_bug.cgi?id=22182
793
794         Fix problems with scrollbars when the OS setting for clicks in the track jumping the thumb to that location
795         is turned on.  Make sure to only jump the thumb if the click happens in the track.  Also fix some math
796         errors when jumping the thumb that cause dragging after the jump to incorrectly jump the thumb again.
797
798         Reviewed by Adele
799
800         * platform/Scrollbar.cpp:
801         (WebCore::Scrollbar::mouseDown):
802
803 2008-11-11  Beth Dakin  <bdakin@apple.com>
804
805         Reviewed by Darin Adler.
806
807         Fix for <rdar://problem/5089327> Too much indentation when pasting 
808         quoted paragraphs
809
810         This patch re-addresses pasting blockquotes into blockquotes. It 
811         backs out most of revision 38273. 38273 fixed the bug by inserting 
812         the pasted content as a sibling blockquote node to the pre-existing 
813         blockquote node. The problem with that is that by default, 
814         blockquotes have a giant margin, so visually, this can be weird. 
815         This patch instead inserts the pasted content as siblings of the 
816         the content already inside the outer blockquote, and then removes 
817         the blockquote node from the pasted content itself, so that it 
818         doesn't nest itself into the outer blockquote.
819         * editing/ReplaceSelectionCommand.cpp:
820         (WebCore::ReplaceSelectionCommand::doApply):
821
822         Move contains() from Element to Node since there is nothing 
823         Element-specific about it.
824         * dom/Element.cpp:
825         * dom/Element.h:
826         * dom/Node.cpp:
827         (WebCore::Node::contains):
828         * dom/Node.h:
829
830 2008-11-11  David Hyatt  <hyatt@apple.com>
831
832         https://bugs.webkit.org/show_bug.cgi?id=17997
833
834         Stop using the new Leopard API tiling call for scaled tiles when drawing background images.  The method
835         is buggy.  Fall back to using the slower (and more correct) pattern tiling that Tiger still uses.  This
836         is a Leopard-only workaround, since the API has been fixed on Snow Leopard.
837
838         Reviewed by John Sullivan
839
840         * platform/graphics/cg/ImageCG.cpp:
841         (WebCore::Image::drawPattern):
842
843 2008-11-10  David Hyatt  <hyatt@apple.com>
844
845         Disable the Aqua look for menu lists when full page zoom is turned on.  Because the control is buggy
846         when scaling and because it's impossible to paint into an offscreen bitmap without completely rewriting
847         how we draw the control on Mac, our only real option for now is to just switch to our styled look when zoomed.
848
849         Reviewed by Adam Roben
850
851         * rendering/RenderThemeMac.mm:
852         (WebCore::RenderThemeMac::isControlStyled):
853
854 2008-11-11  Darin Adler  <darin@apple.com>
855
856         Reviewed by Dan Bernstein.
857
858         - https://bugs.webkit.org/show_bug.cgi?id=22160
859         speculative fix for <rdar://problem/5995450> Nil deref because nextLinePosition
860         (previousLinePosition, too) uses a nil node
861
862         * editing/visible_units.cpp:
863         (WebCore::nextLinePosition): Use RenderObject::node instead of RenderObject::element
864         to check editingIgnoresContent. It makes sense to use the associated DOM node for
865         this, even in cases of anonymous content, and it avoids the case where element() can
866         be 0.
867         (WebCore::previousLinePosition): Ditto.
868
869 2008-11-11  Dirk Schulze  <vbs85@gmx.de>
870
871         Reviewed by Darin Adler.
872
873         Removed default: in applySpreadMethod. This causes the problems
874         in radial gradients. We don't need CAIRO_EXTEND_NONE in SVG, Canvas
875         or CSS.
876
877         * platform/graphics/cairo/GraphicsContextCairo.cpp:
878         (WebCore::applySpreadMethod):
879
880 2008-11-11  Ariya Hidayat  <ariya.hidayat@trolltech.com>
881
882         Reviewed by Tor Arne Vestbø.
883
884         Fix crash when rendering the file chooser.
885         Also proper implementation for multi-selected files.
886
887         * platform/qt/FileChooserQt.cpp:
888         (WebCore::FileChooser::basenameForWidth):
889
890 2008-11-11  Dirk Schulze  <vbs85@gmx.de>
891
892         Reviewed by Oliver Hunt.
893
894         PatternCairo needs to invert the pattern matrix because
895         of transformation from user space to pattern space.
896         Give a identity matrix to pattern for Qt and Cairo. Because the 
897         context is transformed already.
898
899         [CAIRO][QT] Canvas transformations applied twice to Patterns
900         https://bugs.webkit.org/show_bug.cgi?id=21555
901
902         * platform/graphics/cairo/GraphicsContextCairo.cpp:
903         (WebCore::GraphicsContext::fillPath):
904         (WebCore::GraphicsContext::strokePath):
905         * platform/graphics/cairo/PatternCairo.cpp:
906         (WebCore::Pattern::createPlatformPattern):
907         * platform/graphics/qt/GraphicsContextQt.cpp:
908         (WebCore::GraphicsContext::strokePath):
909         (WebCore::GraphicsContext::fillRect):
910
911 2008-11-10  Stephanie Lewis  <slewis@apple.com>
912
913         Reviewed by Dan Bernstein.
914
915         Clear the image source cache even if we haven't decoded any of the image data.
916         We use the image source cache when calculating layout.
917
918         * loader/Cache.cpp:
919         (WebCore::Cache::pruneDeadResources):
920         * platform/graphics/BitmapImage.cpp:
921         (WebCore::BitmapImage::destroyDecodedData):
922
923 2008-11-10  Adam Roben  <aroben@apple.com>
924
925         Fix Bug 22161: Assertion failure in RenderThemeWin::systemColor when
926         loading microsoftpdc.com
927
928         <https://bugs.webkit.org/show_bug.cgi?id=22161>
929
930         Reviewed by Dan Bernstein.
931
932         Test: fast/css/outline-invert-assertion.html
933
934         * rendering/RenderThemeWin.cpp:
935         (WebCore::RenderThemeWin::systemColor): If we can't determine a good
936         Win32 system color to use, defer to RenderTheme instead of asserting.
937         This matches what RenderThemeMac does.
938
939 2008-11-10  Justin Garcia  <justin.garcia@apple.com>
940
941         Reviewed by Beth Dakin.
942
943         <rdar://problem/4037481> REGRESSION (Mail): pasting quoted text 
944         into quoted text yields double-quoting
945         
946         Don't nest inserted content in Mail blockquotes.  Perform a 
947         BreakBlockquoteCommand if we're in
948         one and insert the incoming fragment between the split blockquotes.
949
950         * editing/ReplaceSelectionCommand.cpp:
951         (WebCore::ReplaceSelectionCommand::shouldMerge): Renamed from -> 
952         source and to -> destination.
953         (WebCore::ReplaceSelectionCommand::doApply):
954
955 2008-11-10  Adam Roben  <aroben@apple.com>
956
957         Fix Bug 22158: Would like to turn on WebCore logging channels via an
958         environment variable
959
960         <https://bugs.webkit.org/show_bug.cgi?id=22158>
961
962         Logging channels can now be enabled by setting the WebCoreLogLevel
963         environment variable to a hexadecimal number.
964
965         Reviewed by Anders Carlsson.
966
967         * WebCore.vcproj/WebCore.vcproj: Added LoggingWin.cpp.
968         * platform/win/LoggingWin.cpp: Copied from WebCore/platform/mac/LoggingMac.mm.
969         (WebCore::initializeWithUserDefault): Read in the WebCoreLogLevel
970         environment variable, parse its value as a hexadecimal number, and
971         turn the channel on/off based on whether the mask bit is set.
972         (WebCore::InitializeLoggingChannelsIfNecessary): Initialize each
973         logging channel in turn.
974
975 2008-11-10  Darin Adler  <darin@apple.com>
976
977         Reviewed by Adam Roben.
978
979         - fix https://bugs.webkit.org/show_bug.cgi?id=22103
980           Changing fonts in preferences does not immediately update WebViews
981
982         This broke when the meaning of FrameView::invalidate changed.
983         I changed setNeedsReapplyStyles to no longer depend on invalidate.
984
985         * dom/Document.cpp: (WebCore::Document::shouldScheduleLayout):
986         Removed the part of this function that duplicated what's already in
987         FrameView::needsLayout, since the copy here left out a few key things.
988         For example, it didn't handle the fact that "needs reapply styles"
989         counts as needing layout.
990
991         * page/Frame.cpp: (WebCore::Frame::setNeedsReapplyStyles): This called
992         FrameView::invalidate before. There were two things wrong with that.
993         1) It requested that the entire view repaint even if the style change
994         didn't necessitate that. 2) FrameView::invalidate no longer causes any
995         repainting at all in certain cases, because of Hyatt's changes to how
996         widgets and the host window are involved in the repainting process.
997         So call FrameView::scheduleRelayout instead, which is more precisely
998         what we want and need here.
999
1000         * page/FrameView.cpp:
1001         (WebCore::FrameView::scheduleRelayout): Add a call to needsLayout here
1002         so that Document::shouldScheduleLayout doesn't have to replicate the
1003         logic that's in needsLayout and can instead rely on the fact that it
1004         was already called.
1005         (WebCore::FrameView::needsLayout): Tweaked the comments and formatting
1006         in this function.
1007
1008 2008-11-10  Darin Adler  <darin@apple.com>
1009
1010         Reviewed by Adam Roben.
1011
1012         - speculative fix for <rdar://problem/5557243> crashes in Safari at
1013           WebCore::HTMLSelectElement::updateListBoxSelection + 280
1014
1015         * html/HTMLSelectElement.cpp:
1016         (WebCore::HTMLSelectElement::updateListBoxSelection):
1017         Check index against size of vector before indexing into the vector.
1018
1019 2008-11-10  Tom Cooksey  <thomas.cooksey@trolltech.com>
1020
1021         Reviewed by Tor Arne Vestbø.
1022
1023         Fix QtWebkit build failure on arm.
1024
1025         pen.widthF() is a qreal, which means it's a float on arm.
1026
1027         * platform/graphics/qt/GraphicsContextQt.cpp:
1028         (WebCore::GraphicsContext::setLineDash):
1029
1030 2008-11-10  Morten Sørvig  <msorvig@trolltech.com>
1031
1032         Reviewed by Simon Hausmann.
1033
1034         Improve mouse wheel scolling on Qt/Cocoa.
1035         Cocoa differs from Carbon (and other platforms I think) in that the
1036         mouse wheel events we get have a much higher acceleration factor.
1037
1038         This submit switches over to scroll-per-pixel from scroll-per-line
1039         for most of our scrolling views. This matches the native views
1040         and works well with the increased acceleration.
1041
1042         * platform/qt/WheelEventQt.cpp:
1043
1044 2008-11-09  Cameron Zwarich  <zwarich@apple.com>
1045
1046         Reviewed by Darin Adler.
1047
1048         Bug 19541: Null pointer in showModalDialog()
1049         <https://bugs.webkit.org/show_bug.cgi?id=19541>
1050
1051         Add null frame->page() checks to JSDOMWindowBase::canShowModalDialog()
1052         and JSDOMWindowBase::canShowModalDialogNow()C
1053
1054         * bindings/js/JSDOMWindowBase.cpp:
1055         (WebCore::canShowModalDialog):
1056         (WebCore::canShowModalDialogNow):
1057
1058 2008-11-09  Darin Adler  <darin@apple.com>
1059
1060         - try to fix Windows build
1061
1062         * platform/graphics/Color.cpp: For some reason MSVC doesn't follow the rules
1063         about needed a separate definition for static const integer data members.
1064         Until I get to the bottom of this, put the definitions inside an ifdef.
1065
1066 2008-11-09  David Kilzer  <ddkilzer@apple.com>
1067
1068         BUILD FIX: Qt build broke after r38235.
1069
1070         Added HAVE(ACCESSIBILITY) header guards to platform implementation
1071         source files.
1072
1073         * page/gtk/AccessibilityObjectAtk.cpp: Added HAVE(ACCESSIBILITY)
1074         guards.
1075         * page/gtk/AccessibilityObjectWrapperAtk.cpp: Ditto.
1076         * page/qt/AccessibilityObjectQt.cpp: Ditto.
1077         * page/win/AccessibilityObjectWin.cpp: Ditto.
1078         * page/wx/AccessibilityObjectWx.cpp: Ditto.
1079
1080 2008-11-09  Alexey Proskuryakov  <ap@webkit.org>
1081
1082         Reviewed by Darin Adler.
1083
1084         https://bugs.webkit.org/show_bug.cgi?id=22104
1085         Javascript URL percent encoding/decoding broken by some characters
1086
1087         Test: fast/loader/javascript-url-encoding-2.html
1088
1089         * platform/KURL.cpp: (WebCore::encodeRelativeString): Don't try to break down javascript URLs.
1090
1091 2008-11-09  Holger Hans Peter Freyther  <zecke@selfish.org>
1092
1093         Reviewed and tweaked by Darin Adler.
1094
1095         * platform/graphics/Color.cpp: Added definitions for the static data members
1096         in this class. Static data members need a definition, even when they are the
1097         simple integer constant kind that can be initialized in the header.
1098
1099 2008-11-08  Antti Koivisto  <antti@apple.com>
1100
1101         Reviewed by Sam Weinig.
1102         
1103         Fix https://bugs.webkit.org/show_bug.cgi?id=22141
1104         REGRESSION: Safari error page is not fully styled when loaded from cache
1105         
1106         Reset text decoder on flush so it does not pass through the BOM when it is reused.
1107
1108         Test: fast/encoding/css-cached-bom.html
1109
1110         * loader/TextResourceDecoder.cpp:
1111         (WebCore::TextResourceDecoder::flush):
1112
1113 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
1114  
1115         Reviewed by Mark Rowe.
1116
1117         Send URL errors to stderr rather than stdout. While debugging wx DumpRenderTree,
1118         it was causing these errors to end up in the page's text representation.
1119
1120         * platform/network/curl/ResourceHandleManager.cpp:
1121         (WebCore::ResourceHandleManager::downloadTimerCallback):
1122
1123 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
1124
1125         wx build fixes after addition of JSCore parser and bycompiler dirs. 
1126
1127         * webcore-base.bkl:
1128         * webcore-wx.bkl:
1129
1130 2008-11-08  Simon Fraser  <simon.fraser@apple.com>
1131
1132         Reviewed by Dan Bernstein
1133
1134         https://bugs.webkit.org/show_bug.cgi?id=21906
1135         
1136         Override addFocusRingRects() in RenderTextControl to avoid
1137         the RenderFlow behavior of recursing on descendent renderers.
1138         RenderTextControl should only ever need a simple focus rect.
1139         
1140         This fixes focus ring issues with transforms on text controls.
1141         
1142         Test: fast/transforms/transformed-focused-text-input.html
1143
1144         * rendering/RenderTextControl.cpp:
1145         (WebCore::RenderTextControl::addFocusRingRects):
1146         * rendering/RenderTextControl.h:
1147
1148 2008-11-08  Dimitri Dupuis-Latour  <dupuislatour@apple.com>
1149
1150         Make sure the icon thumbnail width/height is at least 1px in
1151         the Web Inspector's resource panel.
1152
1153         <rdar://problem/5988888>
1154
1155         Reviewed by Tim Hatcher.
1156
1157         * inspector/front-end/inspector.css:
1158
1159 2008-11-08  David Kilzer  <ddkilzer@apple.com>
1160
1161         Bug 22137: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
1162
1163         <https://bugs.webkit.org/show_bug.cgi?id=22137>
1164
1165         Reviewed by Darin Adler.
1166
1167         * page/AccessibilityObject.h:
1168         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
1169         Provide a default implementation when HAVE(ACCESSIBILITY) is false.
1170         * page/mac/AXObjectCacheMac.mm: Added HAVE(ACCESSIBILITY) guard.
1171         * page/mac/AccessibilityObjectMac.mm: Ditto.
1172         * page/mac/AccessibilityObjectWrapper.mm: Ditto.
1173
1174 2008-11-08  Dan Bernstein  <mitz@apple.com>
1175
1176         Reviewed by Darin Adler.
1177
1178         - WebCore part of adding WebPreferences for controlling databases and local storage
1179
1180         * WebCore.base.exp: Exported Settings::setDatabasesEnabled() and
1181         Settings::setLocalStorageEnabled().
1182         * page/DOMWindow.cpp:
1183         (WebCore::DOMWindow::localStorage): Changed to return 0 if local storage
1184         is disabled in settings.
1185         (WebCore::DOMWindow::openDatabase): Changed to return 0 if databases
1186         are disabled in settings.
1187         * page/Settings.cpp:
1188         (WebCore::Settings::Settings): Initialize m_databasesEnabled and
1189         m_localStorageEnabled.
1190         (WebCore::Settings::setDatabasesEnabled): Added.
1191         (WebCore::Settings::setLocalStorageEnabled): Added.
1192         * page/Settings.h:
1193         (WebCore::Settings::databasesEnabled): Added.
1194         (WebCore::Settings::localStorageEnabled): Added.
1195
1196 2008-11-07  Alp Toker  <alp@nuanti.com>
1197
1198         Fix build with bleeding edge GTK+ versions. GTK+ and other libraries
1199         now require that only their top-level header file is included.
1200
1201         Patch tested and still builds fine with older GTK+ versions (back to
1202         2.8).
1203
1204         Future WebKit GTK+ contributions are required to adhere to this
1205         policy.
1206
1207         * platform/gtk/FileSystemGtk.cpp:
1208         * platform/gtk/KeyEventGtk.cpp:
1209         * platform/gtk/MouseEventGtk.cpp:
1210         * platform/gtk/WheelEventGtk.cpp:
1211         * platform/gtk/gtkdrawing.h:
1212         * plugins/gtk/gtk2xtbin.c:
1213         * plugins/gtk/gtk2xtbin.h:
1214
1215 2008-11-07  Anders Carlsson  <andersca@apple.com>
1216
1217         Reviewed by Kevin Decker
1218
1219         Explicitly initialize the NPDrawingModelCoreAnimation.
1220
1221         * bridge/npapi.h:
1222
1223 2008-11-07  Alp Toker  <alp@nuanti.com>
1224
1225         autotools fix. Always use the configured perl binary (which may be
1226         different to the one in $PATH) when generating sources.
1227
1228         * GNUmakefile.am:
1229
1230 2008-11-07  Simon Fraser  <simon.fraser@apple.com>
1231
1232         Reviewed by Dan Bernstein
1233
1234         https://bugs.webkit.org/show_bug.cgi?id=22122
1235         
1236         Use a stack-based object to simplify the pushLayoutState/popLayoutState
1237         code. LayoutStateMaintainer either pushes in the constructor, or allows
1238         an explicit push() later. Both cases require an explicit pop().
1239
1240         * rendering/RenderBlock.cpp:
1241         (WebCore::RenderBlock::layoutBlock):
1242         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
1243         * rendering/RenderContainer.cpp:
1244         (WebCore::RenderContainer::layout):
1245         * rendering/RenderFlexibleBox.cpp:
1246         (WebCore::RenderFlexibleBox::layoutBlock):
1247         * rendering/RenderTable.cpp:
1248         (WebCore::RenderTable::layout):
1249         * rendering/RenderTableRow.cpp:
1250         (WebCore::RenderTableRow::layout):
1251         * rendering/RenderTableSection.cpp:
1252         (WebCore::RenderTableSection::setCellWidths):
1253         (WebCore::RenderTableSection::calcRowHeight):
1254         (WebCore::RenderTableSection::layoutRows):
1255         * rendering/RenderView.h:
1256         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
1257         (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer):
1258         (WebCore::LayoutStateMaintainer::pop):
1259         (WebCore::LayoutStateMaintainer::push):
1260         (WebCore::LayoutStateMaintainer::didPush):
1261
1262 2008-11-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
1263
1264         Fix the QtWebKit build on Mac
1265
1266         * platform/qt/TemporaryLinkStubs.cpp:
1267         (PluginView::invalidateRect):
1268
1269 2008-11-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
1270
1271         Rubber-stamped by Simon Hausmann.
1272
1273         Don't allow Phonon's invisible video widget to keep the app running
1274
1275         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1276         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1277
1278 2008-11-07  Henrik Hartz  <henrik.hartz@nokia.com>
1279
1280         Reviewed by Simon Hausmann.
1281
1282         Fix valgrind warning about uninitialized lastStop variable.
1283
1284         * platform/graphics/qt/GradientQt.cpp:
1285         (WebCore::Gradient::platformGradient):
1286
1287 2008-11-07  Alexey Proskuryakov  <ap@webkit.org>
1288
1289         Reviewed by Maciej Stachowiak.
1290
1291         Fix layout test brokenness following r38211.
1292
1293         * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
1294         Restore old Shift key behavior. We ignore Shift key state when matching access keys (which
1295         matches neither IE nor Firefox), and this patch made WebKit behave like Firefox
1296         inadvertently. This may or may not be a good thing, but it's certainly not something that
1297         should change by accident.
1298
1299 2008-11-06  Antti Koivisto  <antti@apple.com>
1300
1301         Eh, this trivial last minute change was wrong.
1302
1303         * loader/CachedCSSStyleSheet.cpp:
1304         (WebCore::CachedCSSStyleSheet::sheetText):
1305
1306 2008-11-06  Antti Koivisto  <antti@apple.com>
1307
1308         Reviewed by Dan Bernstein.
1309
1310         https://bugs.webkit.org/show_bug.cgi?id=22093
1311         
1312         Delaying the text decoding caused regression since the decoding
1313         also determines the encoding in case of @charset rule. 
1314         
1315         Decode immediately in data() and keep the decoded string around
1316         during the checkNotify().
1317
1318         * loader/CachedCSSStyleSheet.cpp:
1319         (WebCore::CachedCSSStyleSheet::sheetText):
1320         (WebCore::CachedCSSStyleSheet::data):
1321         * loader/CachedCSSStyleSheet.h:
1322
1323 2008-11-06  Alexey Proskuryakov  <ap@webkit.org>
1324
1325         Reviewed by Darin Adler.
1326
1327         https://bugs.webkit.org/show_bug.cgi?id=22097
1328         Expose MessageEvent constructor on WorkerContext
1329
1330         * bindings/js/JSWorkerContext.cpp:
1331         (WebCore::jsWorkerContextMessageEvent):
1332         (WebCore::setJSWorkerContextMessageEvent):
1333
1334 2008-11-06  Alexey Proskuryakov  <ap@webkit.org>
1335
1336         Reviewed by Darin Adler.
1337
1338         https://bugs.webkit.org/show_bug.cgi?id=21107
1339         <rdar://problem/6264219> New access key combination conflicts with VoiceOver
1340
1341         * page/EventHandler.h:
1342         * page/gtk/EventHandlerGtk.cpp:
1343         (WebCore::EventHandler::accessKeyModifiers):
1344         * page/qt/EventHandlerQt.cpp:
1345         (WebCore::EventHandler::accessKeyModifiers):
1346         * page/win/EventHandlerWin.cpp:
1347         (WebCore::EventHandler::accessKeyModifiers):
1348         * page/wx/EventHandlerWx.cpp:
1349         (WebCore::EventHandler::accessKeyModifiers):
1350         Access access key modifiers via a function, not a static variable.
1351
1352         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::accessKeyModifiers):
1353         Use Ctrl when VoiceOver is enabled, because a conflict with Emacs-style key bindings is
1354         less troublesome than one with VO keys.
1355
1356         * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
1357         Also fix an access key matching bug introduced in r32424 - Any superset of specified
1358         modifier set invoked access keys. We can use simple equality comparison instead because
1359         CapsLock is not part of modifiers(), so it doesn't need to be ignored explicitly.
1360
1361 2008-11-06  Anders Carlsson  <andersca@apple.com>
1362
1363         Reviewed by Kevin Decker.
1364
1365         https://bugs.webkit.org/show_bug.cgi?id=22115
1366         NPN_HasPropertyUPP and NPN_HasMethodUPP entries in NPNetscapeFuncs are NULL
1367
1368         Export _NPN_HasMethod and _NPN_HasProperty.
1369         
1370         * WebCore.NPAPI.exp:
1371
1372 2008-11-06  Simon Fraser  <simon.fraser@apple.com>
1373
1374         Reviewed by Antti Koivisto
1375
1376         https://bugs.webkit.org/show_bug.cgi?id=15678
1377         
1378         Fix transformed menu selects to show the popup in the correct
1379         location.
1380
1381         * rendering/RenderMenuList.cpp:
1382         (WebCore::RenderMenuList::showPopup):
1383
1384 2008-11-06  David Kilzer  <ddkilzer@apple.com>
1385
1386         BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
1387
1388         Apparently older versions of gcc have issues with this patch.
1389         Backing out a second time until the issues are resolved.
1390
1391 2008-11-06  Julien Chaffraix  <jchaffraix@pleyo.com>
1392
1393         Reviewed by Maciej Stachowiak.
1394
1395         Bug 21106: .in format discussed changes
1396         https://bugs.webkit.org/show_bug.cgi?id=21106
1397
1398         Include the namespace into the interfaceName.
1399
1400         * dom/make_names.pl: Do not append the namespace when
1401         using the interfaceName.
1402         * html/HTMLTagNames.in: Added namespace prefix for custom
1403         interfaceName.
1404         * svg/svgtags.in: Ditto.
1405
1406 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
1407
1408         Reviewed by Geoff Garen.
1409
1410         Move the remaining files in the kjs subdirectory of JavaScriptCore to
1411         a new parser subdirectory, and remove the kjs subdirectory entirely.
1412
1413         * ForwardingHeaders/kjs: Removed.
1414         * ForwardingHeaders/kjs/Parser.h: Removed.
1415         * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
1416         * ForwardingHeaders/kjs/SourceCode.h: Removed.
1417         * ForwardingHeaders/kjs/SourceProvider.h: Removed.
1418         * ForwardingHeaders/parser: Added.
1419         * ForwardingHeaders/parser/Parser.h: Copied from ForwardingHeaders/kjs/Parser.h.
1420         * ForwardingHeaders/parser/SourceCode.h: Copied from ForwardingHeaders/kjs/SourceCode.h.
1421         * ForwardingHeaders/parser/SourceProvider.h: Copied from ForwardingHeaders/kjs/SourceProvider.h.
1422         * WebCore.pro:
1423         * WebCore.vcproj/WebCore.vcproj:
1424         * bindings/js/StringSourceProvider.h:
1425         * bindings/js/WorkerScriptController.cpp:
1426         * bridge/NP_jsobject.cpp:
1427         * bridge/jni/jni_jsobject.mm:
1428         * bridge/testbindings.pro:
1429         * inspector/JavaScriptDebugServer.cpp:
1430
1431 2008-11-06  David Kilzer  <ddkilzer@apple.com>
1432
1433         BUILD WAS NOT BROKEN: Rolling r38189 back in.
1434
1435         Please perform a clean build if you see crashes.
1436
1437 2008-11-06  David Kilzer  <ddkilzer@apple.com>
1438
1439         BUILD FIX: Backed out r38189 since it apparently broke the world.
1440
1441 2008-11-06  Chris Fleizach  <cfleizach@apple.com>
1442
1443         Reviewed by Beth Dakin.
1444
1445         Bug 22112: if a <body> has contenteditable=true, it should report a writable AXValue
1446         https://bugs.webkit.org/show_bug.cgi?id=22112
1447
1448         Test: accessibility/content-editable.html
1449
1450         * page/AccessibilityRenderObject.cpp:
1451         (WebCore::AccessibilityRenderObject::isReadOnly):
1452
1453 2008-11-06  Sam Weinig  <sam@webkit.org>
1454
1455         Reviewed by Alice Liu.
1456
1457         Fix failed assert at launch caused by unintialized data member on the mac.
1458
1459         * platform/network/mac/NetworkStateNotifierMac.cpp:
1460         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1461
1462 2008-11-06  Steve Falkenburg  <sfalken@apple.com>
1463
1464         Fix failed assert at launch caused by unintialized data member.
1465         
1466         Reviewed by Maciej Stachowiak.
1467
1468         * platform/network/win/NetworkStateNotifierWin.cpp:
1469         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1470
1471 2008-11-06  Simon Fraser  <simon.fraser@apple.com>
1472
1473         Reviewed by Antti Koivisto
1474
1475         https://bugs.webkit.org/show_bug.cgi?id=22109
1476         Make <input type="range"> work correctly with transforms
1477
1478         Test: fast/forms/slider-transformed.html
1479
1480         * html/HTMLInputElement.cpp:
1481         (WebCore::HTMLInputElement::defaultEventHandler):
1482             Compute a correct local point when the event is retargeted
1483         * rendering/RenderSlider.cpp:
1484         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
1485             Compute m_initialClickPoint in slider-local coords, so that
1486             deltas are computed correctly with transforms
1487         (WebCore::RenderSlider::mouseEventIsInThumb):
1488             Rather than computing an absolute bounds for the thumb,
1489             convert the point to local coords and compare it with the border box.
1490
1491 2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
1492
1493         Reviewed by Darin Adler.
1494
1495         Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
1496         https://bugs.webkit.org/show_bug.cgi?id=21810
1497
1498         * bindings/js/GCController.cpp:
1499         (WebCore::gcController): Changed to leak an object to avoid an exit-time destructor.
1500         * bindings/js/JSDOMBinding.cpp:
1501         (WebCore::wrapperSet): Ditto
1502         * bindings/js/JSInspectedObjectWrapper.cpp:
1503         (WebCore::wrappers): Ditto
1504         * bindings/js/JSInspectorCallbackWrapper.cpp:
1505         (WebCore::wrappers): Ditto
1506         * bridge/runtime_root.cpp:
1507         (JSC::Bindings::rootObjectSet): Ditto
1508         * css/CSSMutableStyleDeclaration.cpp:
1509         (WebCore::CSSMutableStyleDeclaration::removeProperty): Ditto
1510         * css/CSSPrimitiveValue.cpp:
1511         (WebCore::CSSPrimitiveValue::cssText): Ditto
1512         * css/CSSSelector.cpp:
1513         (WebCore::CSSSelector::extractPseudoType): Ditto
1514         * css/CSSStyleSelector.cpp:
1515         (WebCore::screenEval): Ditto
1516         (WebCore::printEval): Ditto
1517         * dom/DOMImplementation.cpp:
1518         (WebCore::isSVG10Feature): Ditto
1519         (WebCore::isSVG11Feature): Ditto
1520         (WebCore::DOMImplementation::isXMLMIMEType): Ditto
1521         * dom/Document.cpp:
1522         (WebCore::Document::hasPrefixNamespaceMismatch): Ditto
1523         * dom/ScriptElement.cpp:
1524         (WebCore::isSupportedJavaScriptLanguage): Ditto
1525         * editing/ApplyStyleCommand.cpp:
1526         (WebCore::styleSpanClassString): Ditto
1527         * editing/HTMLInterchange.cpp:
1528         (WebCore::): Ditto
1529         * editing/IndentOutdentCommand.cpp:
1530         (WebCore::indentBlockquoteString): Ditto
1531         * editing/ReplaceSelectionCommand.cpp:
1532         (WebCore::isInterchangeNewlineNode): Ditto
1533         (WebCore::isInterchangeConvertedSpaceSpan): Ditto
1534         * editing/htmlediting.cpp:
1535         (WebCore::stringWithRebalancedWhitespace): Ditto
1536         (WebCore::nonBreakingSpaceString): Ditto
1537         * editing/markup.cpp:
1538         (WebCore::appendAttributeValue): Ditto
1539         (WebCore::appendEscapedContent): Ditto
1540         (WebCore::shouldAddNamespaceAttr): Ditto
1541         (WebCore::appendNamespace): Ditto
1542         (WebCore::appendStartMarkup): Ditto
1543         (WebCore::createMarkup): Ditto
1544         * html/HTMLButtonElement.cpp:
1545         (WebCore::HTMLButtonElement::type): Ditto
1546         * html/HTMLElement.cpp:
1547         (WebCore::HTMLElement::isRecognizedTagName): Ditto
1548         (WebCore::inlineTagList): Ditto
1549         (WebCore::blockTagList): Ditto
1550         * html/HTMLFieldSetElement.cpp:
1551         (WebCore::HTMLFieldSetElement::type): Ditto
1552         * html/HTMLInputElement.cpp:
1553         (WebCore::HTMLInputElement::type): Ditto
1554         * html/HTMLKeygenElement.cpp:
1555         (WebCore::HTMLKeygenElement::type): Ditto
1556         * html/HTMLLegendElement.cpp:
1557         (WebCore::HTMLLegendElement::type): Ditto
1558         * html/HTMLOptGroupElement.cpp:
1559         (WebCore::HTMLOptGroupElement::type): Ditto
1560         * html/HTMLOptionElement.cpp:
1561         (WebCore::HTMLOptionElement::type): Ditto
1562         * html/HTMLParser.cpp:
1563         (WebCore::HTMLParser::getNode): Ditto
1564         (WebCore::HTMLParser::isHeaderTag): Ditto
1565         (WebCore::HTMLParser::isResidualStyleTag): Ditto
1566         (WebCore::HTMLParser::isAffectedByResidualStyle): Ditto
1567         * html/HTMLSelectElement.cpp:
1568         (WebCore::HTMLSelectElement::type): Ditto
1569         * html/HTMLTextAreaElement.cpp:
1570         (WebCore::HTMLTextAreaElement::type): Ditto
1571         * inspector/InspectorController.cpp:
1572         (WebCore::platform): Ditto
1573         * inspector/JavaScriptDebugServer.cpp:
1574         (WebCore::JavaScriptDebugServer::shared): Ditto
1575         * inspector/JavaScriptProfile.cpp:
1576         (WebCore::profileCache): Ditto
1577         * inspector/JavaScriptProfileNode.cpp:
1578         (WebCore::profileNodeCache): Ditto
1579         * loader/FrameLoader.cpp:
1580         (WebCore::localSchemes): Ditto
1581         * loader/appcache/ApplicationCacheStorage.cpp:
1582         (WebCore::cacheStorage): Ditto
1583         * loader/archive/ArchiveFactory.cpp:
1584         (WebCore::archiveMIMETypes): Ditto
1585         * loader/icon/IconDatabase.cpp:
1586         (WebCore::IconDatabase::defaultDatabaseFilename): Ditto
1587         * page/EventHandler.cpp:
1588         (WebCore::EventHandler::dragState): Ditto
1589         * page/Frame.cpp:
1590         (WebCore::createRegExpForLabels): Ditto
1591         (WebCore::keepAliveSet): Ditto
1592         * page/Page.cpp:
1593         (WebCore::Page::groupName): Ditto
1594         * page/SecurityOrigin.cpp:
1595         (WebCore::isDefaultPortForProtocol): Ditto
1596         (WebCore::SecurityOrigin::databaseIdentifier): Ditto
1597         * page/mac/FrameMac.mm:
1598         (WebCore::regExpForLabels): Ditto
1599         * platform/KURL.cpp:
1600         (WebCore::blankURL): Ditto
1601         * platform/graphics/FontCache.cpp:
1602         (WebCore::alternateFamilyName): Ditto
1603         * platform/graphics/mac/FontCacheMac.mm:
1604         (WebCore::FontCache::getSimilarFontPlatformData): Ditto
1605         (WebCore::FontCache::getLastResortFallbackFont): Ditto
1606         * platform/mac/ScrollbarThemeMac.mm:
1607         (WebCore::ScrollbarTheme::nativeTheme): Ditto
1608         * platform/mac/ThemeMac.mm:
1609         (WebCore::platformTheme): Ditto
1610         * platform/mac/ThreadCheck.mm:
1611         (WebCoreReportThreadViolation): Ditto
1612         * platform/network/NetworkStateNotifier.cpp:
1613         (WebCore::networkStateNotifier): Ditto
1614         * platform/network/mac/FormDataStreamMac.mm:
1615         (WebCore::getStreamFormDataMap): Ditto
1616         (WebCore::getStreamResourceHandleMap): Ditto
1617         * platform/network/mac/ResourceResponseMac.mm:
1618         (WebCore::ResourceResponse::platformLazyInit): Ditto
1619         * platform/text/TextEncoding.cpp:
1620         (WebCore::TextEncoding::isJapanese): Ditto
1621         * rendering/RenderBlock.cpp:
1622         (WebCore::continuationOutlineTable): Ditto
1623         * rendering/RenderCounter.cpp:
1624         (WebCore::counterMaps): Ditto
1625         * rendering/RenderFlexibleBox.cpp:
1626         (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto
1627         * rendering/RenderListItem.cpp:
1628         (WebCore::RenderListItem::markerText): Ditto
1629         * rendering/RenderScrollbarTheme.cpp:
1630         (WebCore::RenderScrollbarTheme::renderScrollbarTheme): Ditto
1631         * rendering/RenderThemeMac.mm:
1632         (WebCore::RenderThemeMac::systemFont): Ditto
1633         * rendering/bidi.cpp:
1634         (WebCore::RenderBlock::checkLinesForTextOverflow): Ditto
1635         * rendering/style/RenderStyle.cpp:
1636         (WebCore::RenderStyle::initialDashboardRegions): Ditto
1637         (WebCore::RenderStyle::noneDashboardRegions): Ditto
1638         * storage/LocalStorage.cpp:
1639         (WebCore::localStorageMap): Ditto
1640         * svg/SVGAnimateMotionElement.cpp:
1641         (WebCore::SVGAnimateMotionElement::rotateMode): Ditto
1642         * svg/SVGAnimationElement.cpp:
1643         (WebCore::SVGAnimationElement::calcMode): Ditto
1644         (WebCore::SVGAnimationElement::attributeType): Ditto
1645         (WebCore::SVGAnimationElement::isAdditive): Ditto
1646         (WebCore::SVGAnimationElement::isAccumulated): Ditto
1647         * svg/SVGLangSpace.cpp:
1648         (WebCore::SVGLangSpace::xmlspace): Ditto
1649         * svg/SVGSVGElement.cpp:
1650         (WebCore::SVGSVGElement::contentScriptType): Ditto
1651         (WebCore::SVGSVGElement::contentStyleType): Ditto
1652         * svg/SVGStyleElement.cpp:
1653         (WebCore::SVGStyleElement::type): Ditto
1654         (WebCore::SVGStyleElement::media): Ditto
1655         * svg/SVGTextContentElement.cpp:
1656         (WebCore::SVGTextContentElement::parseMappedAttribute): Ditto
1657         * svg/animation/SVGSMILElement.cpp:
1658         (WebCore::SVGSMILElement::parseClockValue): Ditto
1659         (WebCore::SVGSMILElement::restart): Ditto
1660         (WebCore::SVGSMILElement::fill): Ditto
1661         (WebCore::SVGSMILElement::repeatCount): Ditto
1662         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): Ditto
1663         * svg/graphics/SVGResource.cpp:
1664         (WebCore::clientMap): Ditto
1665         * svg/graphics/SVGResourceMarker.cpp:
1666         (WebCore::SVGResourceMarker::draw): Ditto
1667         * xml/XMLHttpRequest.cpp:
1668         (WebCore::preflightResultCache): Ditto
1669         (WebCore::isSafeRequestHeader): Ditto
1670         (WebCore::isOnAccessControlResponseHeaderWhitelist): Ditto
1671         * xml/XPathExpressionNode.cpp:
1672         (WebCore::XPath::Expression::evaluationContext): Ditto
1673         * xml/XPathParser.cpp:
1674         (WebCore::XPath::isAxisName): Ditto
1675         (WebCore::XPath::isNodeTypeName): Ditto
1676         * xml/XPathValue.cpp:
1677         (WebCore::XPath::Value::toNodeSet): Ditto
1678
1679 2008-11-06  Tor Arne Vestbø  <tavestbo@trolltech.com>
1680
1681         Rubber-stamped by Simon Hausmann.
1682
1683         Remove a bunch of unused methods in the Qt media element implementation
1684
1685         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1686         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1687         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
1688
1689 2008-11-05  Simon Fraser  <simon.fraser@apple.com>
1690
1691         Reviewed by Dave Hyatt
1692
1693         https://bugs.webkit.org/show_bug.cgi?id=21870
1694         
1695         Implement absoluteToLocal() to convert a point from absolute
1696         to local coordinates, optionally taking transforms into account.
1697         
1698         Use this to set offsetX/offsetY in mouse events, thus fixing
1699         offsetX/offsetY in events on elements with transforms.
1700
1701         Test: fast/events/offsetX-offsetY.html
1702
1703         * dom/MouseRelatedEvent.cpp:
1704         (WebCore::MouseRelatedEvent::receivedTarget):
1705         * rendering/RenderBox.cpp:
1706         (WebCore::RenderBox::localToAbsolute):
1707         (WebCore::RenderBox::absoluteToLocal):
1708         (WebCore::RenderBox::offsetFromContainer):
1709         * rendering/RenderBox.h:
1710         * rendering/RenderObject.cpp:
1711         (WebCore::RenderObject::absoluteToLocal):
1712         * rendering/RenderObject.h:
1713         * rendering/RenderTableCell.cpp:
1714         (WebCore::RenderTableCell::localToAbsolute):
1715         (WebCore::RenderTableCell::absoluteToLocal):
1716         * rendering/RenderTableCell.h:
1717         * rendering/RenderView.cpp:
1718         (WebCore::RenderView::absoluteToLocal):
1719         * rendering/RenderView.h:
1720
1721 2008-11-06  Alp Toker  <alp@nuanti.com>
1722
1723         Reviewed by Cameron Zwarich.
1724
1725         https://bugs.webkit.org/show_bug.cgi?id=22067
1726         [GTK] Sun Java plugin segfaults at PluginPackage::createPackage()
1727
1728         null-check symbols loaded from plugin modules, initialize the function
1729         table (like Win already does) and update it with the latest
1730         additions. Adjust whitespace for easy diff'ing with the Win port code
1731         from which it was forked.
1732
1733         This fixes crashes with libnspr4.so and any other plugins that don't
1734         provide the symbols we expect.
1735
1736         * plugins/gtk/PluginPackageGtk.cpp:
1737         (WebCore::PluginPackage::fetchInfo):
1738         (WebCore::PluginPackage::load):
1739
1740 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
1741
1742         Reviewed by Simon Hausmann.
1743
1744         Removed dead (and broken) code from an ancient Symbian port.
1745
1746         * config.h:
1747         * platform/text/AtomicString.h:
1748         * platform/text/PlatformString.h:
1749
1750 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
1751
1752         Reviewed by Simon Hausmann.
1753
1754         Use QLibrary as PlatformModule when compiling with Qt for S60.
1755
1756         * platform/FileSystem.h:
1757
1758 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
1759
1760         Reviewed by Simon Hausmann.
1761
1762         Compile fix for Symbian.
1763         The snprintf function is defined in stdio.h, the inclusion
1764         of snprintf.h inside this PLATFORM(SYMBIAN) block does not
1765         compile.
1766
1767         * config.h:
1768
1769 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
1770
1771         Reviewed by Simon Hausmann.
1772
1773         Disable webkit plugins for Symbian.
1774
1775         * WebCore.pro:
1776
1777 2008-11-06  Tor Arne Vestbø  <tavestbo@trolltech.com>
1778
1779         Fix build break in debug mode when XSLT is not enabled
1780
1781         * loader/Cache.cpp:
1782         (WebCore::Cache::dumpStats):
1783
1784 2008-11-06  Tor Arne Vestbø  <tavestbo@trolltech.com>
1785
1786         Reviewed by Simon Hausmann.
1787
1788         Repaint video on UpdateRequest to prevent recursive painting
1789
1790         Calling QWidget::render() to update the video generates a paint
1791         event that's then picked up by the event filter once more :(
1792
1793         We're really only interested in updates from Phonon, which we
1794         get through the UpdateRequest for each new frame.
1795
1796         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
1797         (WebCore::MediaPlayerPrivate::eventFilter):
1798
1799 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
1800
1801         Not reviewed.
1802
1803         Fix the WebCore build for some platforms by changing build scripts to
1804         account for the recent move of the create_hash_table script from the kjs
1805         subdirectory of JavaScriptCore to the root directory.
1806
1807         * WebCore.pro:
1808         * make-generated-sources.sh:
1809
1810 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
1811
1812         Not reviewed.
1813
1814         Fix a case-sensitivity issue in Mac forwarding headers. Strangely
1815         enough, this does not always cause the build to break, even with a
1816         case-sensitive filesystem.
1817
1818         * ForwardingHeaders/runtime/Interpreter.h:
1819
1820 2008-11-05  Alexey Proskuryakov  <ap@webkit.org>
1821
1822         Reviewed by Maciej Stachowiak.
1823
1824         https://bugs.webkit.org/show_bug.cgi?id=22083
1825         MessageEvents cannot be used across threads
1826
1827         * dom/Event.idl:
1828         * dom/MessageEvent.idl:
1829         Add a NoStaticTables attribute - MessageEvent is used in worker threads, so static tables
1830         won't work.
1831
1832         * dom/MessagePort.cpp:
1833         (WebCore::MessagePort::EventData::EventData):
1834         (WebCore::MessagePort::EventData::~EventData):
1835         (WebCore::MessagePort::clone):
1836         (WebCore::MessagePort::postMessage):
1837         (WebCore::MessagePort::startConversation):
1838         (WebCore::MessagePort::dispatchMessages):
1839         * dom/MessagePort.h:
1840         Don't create a MessageEvent until dispatch time - messages can be posted across threads,
1841         but MessageEvents are tied to the thread that they were created in.
1842
1843 2008-11-05  Alexey Proskuryakov  <ap@webkit.org>
1844
1845         Reviewed by Darin Adler.
1846
1847         https://bugs.webkit.org/show_bug.cgi?id=22066
1848         Implement Worker global object
1849
1850         * DerivedSources.make: Added WorkerLocation IDL and JSWorkerContext lookup table.
1851
1852         * WebCore.xcodeproj/project.pbxproj: Only adding files to Mac project for now, as Worker
1853         support is still disabled by default.
1854
1855         * bindings/js/JSDOMGlobalObject.cpp: (WebCore::toJSDOMGlobalObject): Implemented Worker case.
1856
1857         * bindings/js/JSMessageChannelConstructor.cpp:
1858         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): Ditto.
1859
1860         * bindings/js/JSWorkerContext.cpp: Added.
1861         * bindings/js/JSWorkerContext.h: Added.
1862         * bindings/js/WorkerScriptController.cpp: Added.
1863         * bindings/js/WorkerScriptController.h: Added.
1864         * dom/WorkerContext.cpp: Added.
1865         * dom/WorkerContext.h: Added.
1866         Added an implementation of worker contexts.
1867
1868         * dom/DedicatedWorker.cpp:
1869         (WebCore::DedicatedWorker::startLoad): Fixed a lifetime bug I saw on my tests.
1870         (WebCore::DedicatedWorker::notifyFinished): Create a thread. Currently, object ownership
1871         and lifetime is not clear at all.
1872
1873         * dom/WorkerLocation.cpp: Added.
1874         * dom/WorkerLocation.h: Added.
1875         * dom/WorkerLocation.idl: Added.
1876         Added WorkerLocation, which is one of the objects available to workers.
1877
1878         * dom/WorkerThread.cpp: Added.
1879         (WebCore::WorkerThread::WorkerThread):
1880         (WebCore::WorkerThread::start):
1881         (WebCore::WorkerThread::workerThreadStart):
1882         (WebCore::WorkerThread::workerThread):
1883         * dom/WorkerThread.h: Added.
1884         (WebCore::WorkerThread::create):
1885         Run some code in a worker thread (no message loop yet).
1886
1887 2008-11-05  Antti Koivisto  <antti@apple.com>
1888
1889         Reviewed by Dan Bernstein.
1890         
1891         https://bugs.webkit.org/show_bug.cgi?id=22093
1892         Don't keep decoded stylesheet data in cache
1893         
1894         <rdar://problem/6343588>
1895
1896         Don't keep decoded stylesheet string around in the cache. There are no sharing benefits and
1897         performance benefits are negligible (no measured PLT impact). Reduces memory consumption of
1898         style sheet data in cache by 2/3 in common case.  
1899
1900         * loader/CachedCSSStyleSheet.cpp:
1901         (WebCore::CachedCSSStyleSheet::sheetText):
1902         (WebCore::CachedCSSStyleSheet::data):
1903         * loader/CachedCSSStyleSheet.h:
1904
1905 2008-11-05  David Kilzer  <ddkilzer@apple.com>
1906
1907         Bug 21596: WebCore::Cache should use parsed Pragma and Cache-Control headers
1908
1909         <https://bugs.webkit.org/show_bug.cgi?id=21596>
1910
1911         Reviewed by Antti.
1912
1913         This patch adds real parsing for Pragma and Cache-Control headers
1914         based on RFC 2616, Sections 2, 14.9 and 14.32.  It also adds some
1915         new String and StringImpl methods to assist with the parsing.
1916
1917         * loader/Cache.cpp:
1918         (WebCore::Cache::dumpStats): Added.  Convenience method for dumping
1919         stats outside of Safari.
1920         * loader/Cache.h: Declared dumpStats().
1921
1922         * loader/CachedResource.cpp:
1923         (WebCore::CachedResource::mustRevalidate): Updated to use
1924         ResourceResponseBase::cacheControlDirectives() instead of substring
1925         matching of the entire Cache-Control header.
1926
1927         * loader/loader.cpp:
1928         (WebCore::Loader::Host::didReceiveResponse): Used the local
1929         'resource' variable instead of 'request->cachedResource()'.
1930
1931         * platform/network/ResourceResponseBase.cpp:
1932         (WebCore::ResourceResponseBase::setHTTPHeaderField): Set
1933         m_haveParsedCacheControlHeader to false when a "Cache-Control"
1934         header is set.  Ditto for m_haveParsedPragmaHeader and "Pragma".
1935         (WebCore::ResourceResponseBase::parsePragmaDirectives): Added.
1936         Provides parsed Pragma header directives.
1937         (WebCore::ResourceResponseBase::parseCacheControlDirectives): Added.
1938         Provides parsed Cache-Control header directives.
1939         (WebCore::isCacheHeaderSeparator): Added.  Returns true if a
1940         character is a separator character per RFC 2616, Section 2.2, else
1941         returns false.
1942         (WebCore::isControlCharacter): Added.  Returns true if a character
1943         is a control character per RFC 2616 Section 2.2, else returns false.
1944         (WebCore::trimToNextSeparator): Added.  Returns a string truncated
1945         at the first separator character per isCacheHeaderSeparator().
1946         (WebCore::parseCacheHeader): Added.  This is the main parsing
1947         routine for both Cache-Control and Pragma headers.
1948         (WebCore::parseCacheControlDirectiveValues): Added.  This splits
1949         certain Cache-Control directive values into a vector of strings.
1950         * platform/network/ResourceResponseBase.h:
1951         (WebCore::CacheControlDirectiveMap): Added.  Typedef for a parsed
1952         Cache-Control header.
1953         (WebCore::PragmaDirectiveMap): Added.  Typedef for a parsed Pragma
1954         header.
1955         (WebCore::ResourceResponseBase::parsePragmaDirectives): Added
1956         declaration.
1957         (WebCore::ResourceResponseBase::parseCacheControlDirectives): Ditto.
1958         (WebCore::ResourceResponseBase::m_haveParsedCacheControlHeader):
1959         Added.  Boolean to describe when the "Cache-Control" header needs to
1960         be reparsed.
1961         (WebCore::ResourceResponseBase::m_haveParsedPragmaHeader):  Added.
1962         Boolean to describe when the "Pragma" header needs to be reparsed.
1963         (WebCore::ResourceResponseBase::m_cacheControlDirectiveMap): Added.
1964         Cached map to hold parsed "Cache-Control" headers.
1965         (WebCore::ResourceResponseBase::m_pragmaDirectiveMap): Added.
1966         Cached map to hold parsed "Pragma" headers.
1967
1968         * platform/text/PlatformString.h:
1969         (WebCore::String::find): Added.  Returns the first match based on
1970         the character-matching function pointer passed in.
1971         (WebCore::String::removeCharacters): Added declaration.
1972         (WebCore::find): Added.  Inline method that takes a character-
1973         matching function pointer.  Called by StringImpl::find().
1974         * platform/text/String.cpp:
1975         (WebCore::String::removeCharacters): Added.  Calls
1976         StringImpl::removeCharacters().
1977         * platform/text/StringImpl.cpp:
1978         (WebCore::StringImpl::removeCharacters): Added.  Returns a string
1979         with all characters removed that match the character-matching
1980         function pointer passed in.  If there is no change to the string, it
1981         returns itself.  Based heavily on StringImpl::simplifyWhitespace().
1982         (WebCore::StringImpl::find): Added.  Calls WebCore::find().
1983         * platform/text/StringImpl.h:
1984         (WebCore::FindMatchFunctionPtr): Added.  Typedef for a character-
1985         matching function pointer.
1986         (WebCore::StringImpl::removeCharacters): Added declaration.
1987         (WebCore::StringImpl::find): Ditto.
1988
1989 2008-11-05  Justin Garcia  <justin.garcia@apple.com>
1990
1991         Reviewed by Beth Dakin.
1992
1993         <rdar://problem/5480736> In Mail and Gmail, copied indented text pastes with line break
1994         
1995         As a rule, we don't allow merges out of blockquotes.  In the bug, we are inserting a text node 
1996         between two blockquotes.  Because the start merge moves the text node into a blockquote, when we
1997         determine whether or not we should do the end merge, it incorrectly appears as though the end merge 
1998         is merging out of a blockquote.  The fix is to determine whether or not we should do the end merge
1999         before we do the start merge, so that the start merge doesn't effect our decision.
2000
2001         * editing/ReplaceSelectionCommand.cpp:
2002         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Initialize the new boolean.
2003         (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): Moved code from doApply() here for clarity.
2004         (WebCore::ReplaceSelectionCommand::doApply): Set m_shouldMergeEnd before we do the start merge.
2005         * editing/ReplaceSelectionCommand.h: Added m_shouldMergeEnd.
2006
2007 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
2008
2009         Not reviewed.
2010
2011         Speculatively fix the Windows build, even though these changes may not
2012         actually matter for anything in the build, because the Windows bots are
2013         behind.
2014
2015         * WebCore.vcproj/WebCore.vcproj:
2016
2017 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
2018
2019         Not reviewed.
2020
2021         Fix the Qt build.
2022
2023         * bridge/qt/qt_class.cpp:
2024         * bridge/qt/qt_runtime.h:
2025
2026 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
2027
2028         Rubber-stamped by Sam Weinig.
2029
2030         Move more files to the runtime subdirectory of JavaScriptCore.
2031
2032         * ForwardingHeaders/kjs/collector.h: Removed.
2033         * ForwardingHeaders/kjs/completion.h: Removed.
2034         * ForwardingHeaders/kjs/identifier.h: Removed.
2035         * ForwardingHeaders/kjs/interpreter.h: Removed.
2036         * ForwardingHeaders/kjs/lookup.h: Removed.
2037         * ForwardingHeaders/kjs/operations.h: Removed.
2038         * ForwardingHeaders/kjs/protect.h: Removed.
2039         * ForwardingHeaders/kjs/ustring.h: Removed.
2040         * ForwardingHeaders/runtime/Collector.h: Copied from ForwardingHeaders/kjs/collector.h.
2041         * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/kjs/completion.h.
2042         * ForwardingHeaders/runtime/Identifier.h: Copied from ForwardingHeaders/kjs/identifier.h.
2043         * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
2044         * ForwardingHeaders/runtime/Lookup.h: Copied from ForwardingHeaders/kjs/lookup.h.
2045         * ForwardingHeaders/runtime/Operations.h: Copied from ForwardingHeaders/kjs/operations.h.
2046         * ForwardingHeaders/runtime/Protect.h: Copied from ForwardingHeaders/kjs/protect.h.
2047         * ForwardingHeaders/runtime/UString.h: Copied from ForwardingHeaders/kjs/ustring.h.
2048         * bindings/js/GCController.cpp:
2049         * bindings/js/JSCustomPositionCallback.h:
2050         * bindings/js/JSCustomPositionErrorCallback.h:
2051         * bindings/js/JSCustomSQLStatementCallback.h:
2052         * bindings/js/JSCustomSQLStatementErrorCallback.h:
2053         * bindings/js/JSCustomSQLTransactionErrorCallback.h:
2054         * bindings/js/JSCustomVoidCallback.h:
2055         * bindings/js/JSDOMBinding.h:
2056         * bindings/js/JSDOMWindowBase.h:
2057         * bindings/js/JSEventListener.h:
2058         * bindings/js/ScheduledAction.h:
2059         * bindings/js/ScriptController.cpp:
2060         * bindings/js/ScriptController.h:
2061         * bindings/objc/WebScriptObject.mm:
2062         * bindings/scripts/CodeGeneratorJS.pm:
2063         * bridge/NP_jsobject.cpp:
2064         * bridge/c/c_class.cpp:
2065         * bridge/jni/jni_class.cpp:
2066         * bridge/jni/jni_jsobject.mm:
2067         * bridge/npruntime.cpp:
2068         * bridge/runtime_root.h:
2069         * history/CachedPage.h:
2070         * html/CanvasRenderingContext2D.cpp:
2071         * html/HTMLCanvasElement.cpp:
2072         * inspector/InspectorController.cpp:
2073         * inspector/JavaScriptCallFrame.cpp:
2074         * page/Console.cpp:
2075         * page/Page.cpp:
2076         * platform/text/AtomicString.cpp:
2077         * platform/text/PlatformString.h:
2078
2079 2008-11-05  Sam Weinig  <sam@webkit.org>
2080
2081         Reviewed by Anders Carlsson.
2082
2083         Fix https://bugs.webkit.org/show_bug.cgi?id=22085
2084         The Plugin JS object should expose item() and namedItem() methods to match Firefox
2085
2086         * bindings/js/JSPluginCustom.cpp:
2087         (WebCore::JSPlugin::nameGetter):
2088         * plugins/Plugin.cpp:
2089         (WebCore::Plugin::namedItem):
2090         * plugins/Plugin.h:
2091         * plugins/Plugin.idl:
2092
2093 2008-11-05  Alexey Proskuryakov  <ap@webkit.org>
2094
2095         Reviewed by Maciej Stachowiak.
2096
2097         https://bugs.webkit.org/show_bug.cgi?id=21060
2098         Range#surroundContents incorrectly throws BAD_BOUNDARYPOINTS_ERR
2099
2100         Test: fast/dom/Range/surroundContents-check-boundary-points.html
2101
2102         * dom/Range.cpp: (WebCore::Range::surroundContents): Fix BAD_BOUNDARYPOINTS_ERR checks.
2103
2104 2008-11-05  Anders Carlsson  <andersca@apple.com>
2105
2106         Reviewed by Dan Bernstein.
2107
2108         Remove two global destructors from CoreTextController.
2109         
2110         * platform/graphics/mac/CoreTextController.cpp:
2111         (WebCore::CoreTextController::collectCoreTextRunsForCharacters):
2112
2113 2008-11-05  Darin Fisher  <darin@chromium.org>
2114
2115         Reviewed by Darin Adler.
2116
2117         CRASH at Scrollbar::invalidateRect due to null m_client
2118         https://bugs.webkit.org/show_bug.cgi?id=22080
2119
2120         * platform/Scrollbar.cpp:
2121         (WebCore::Scrollbar::isWindowActive):
2122         (WebCore::Scrollbar::invalidateRect):
2123
2124 2008-11-04  Sam Weinig  <sam@webkit.org>
2125
2126         Reviewed by Simon Hausmann.
2127
2128         Fix https://bugs.webkit.org/show_bug.cgi?id=21648
2129         navigator.mimeTypes and navigator.plugins don't expose item and namedItem to JS
2130
2131         - Also adds constructors for Plugin, PluginArray, MimeType and MimeTypeArray.
2132
2133         * bindings/js/JSMimeTypeArrayCustom.cpp:
2134         (WebCore::JSMimeTypeArray::nameGetter):
2135         * bindings/js/JSPluginArrayCustom.cpp:
2136         (WebCore::JSPluginArray::nameGetter):
2137         * page/DOMWindow.idl:
2138         * plugins/MimeType.idl:
2139         * plugins/MimeTypeArray.cpp:
2140         (WebCore::MimeTypeArray::namedItem):
2141         * plugins/MimeTypeArray.h:
2142         * plugins/MimeTypeArray.idl:
2143         * plugins/Plugin.idl:
2144         * plugins/PluginArray.cpp:
2145         (WebCore::PluginArray::namedItem):
2146         * plugins/PluginArray.h:
2147         * plugins/PluginArray.idl:
2148
2149 2008-11-05  Steve Falkenburg  <sfalken@apple.com>
2150
2151         Build fix.
2152
2153         * plugins/PluginPackage.cpp:
2154
2155 2008-11-05  Jeff Cook  <cookiecaper@gmail.com>
2156
2157         Reviewed by Simon Hausmann and Tor Arne.
2158
2159         Fix crash in the Qt port when unloading swfdec and Flash 10
2160         by reordering window destruction and plugin stop.
2161
2162         See https://bugs.webkit.org/show_bug.cgi?id=20779
2163
2164         * plugins/qt/PluginViewQt.cpp:
2165         (WebCore::PluginView::stop):
2166
2167 2008-11-05  Simon Hausmann  <hausmann@webkit.org>
2168
2169         Reviewed by Tor Arne Vestbø
2170
2171         Fix loading of Flash 10 in the Qt port by faking the toolkit to be Gtk.
2172
2173         Otherwise Flash refuses to load and function :(
2174
2175         * plugins/PluginPackage.cpp:
2176         (WebCore::PluginPackage::determineQuirks):
2177         * plugins/PluginQuirkSet.h:
2178         (WebCore::):
2179         * plugins/qt/PluginViewQt.cpp:
2180         (WebCore::PluginView::getValue):
2181
2182 2008-11-05  Simon Hausmann  <hausmann@webkit.org>
2183
2184         Reviewed by Tor Arne Vestbø
2185
2186         Unify determineQuirks between the Qt and the Gtk PluginPackage.
2187         Share the code for parsing the module version from the description.
2188         This is currently used to determine Flash based quirks.
2189
2190         * plugins/PluginPackage.cpp:
2191         (WebCore::PluginPackage::createPackage):
2192         (WebCore::PluginPackage::determineQuirks):
2193         (WebCore::PluginPackage::determineModuleVersionFromDescription):
2194         * plugins/PluginPackage.h:
2195         * plugins/gtk/PluginPackageGtk.cpp:
2196         (WebCore::PluginPackage::fetchInfo):
2197         * plugins/qt/PluginPackageQt.cpp:
2198         (WebCore::PluginPackage::fetchInfo):
2199
2200 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
2201
2202         Rubber-stamped by Sam Weinig.
2203
2204         Move kjs/dtoa.h to the wtf subdirectory of JavaScriptCore.
2205
2206         * ForwardingHeaders/kjs/dtoa.h: Removed.
2207         * ForwardingHeaders/wtf/dtoa.h: Copied from ForwardingHeaders/kjs/dtoa.h.
2208         * css/CSSParser.cpp:
2209         * platform/text/String.cpp:
2210         * platform/text/StringImpl.cpp:
2211
2212 2008-11-04  Jonathan Haas  <myrdred@gmail.com>
2213
2214         Addiitonal tweaks and patch prep by Pamela Greene <pam@chromium.org>
2215
2216         Reviewed by Darin Adler.
2217
2218         Fixed an issue which could cause memory corruption using ToT libxml.
2219         See https://bugs.webkit.org/show_bug.cgi?id=15715
2220
2221         Test: fast/xsl/xslt-nested-stylesheets.xml
2222
2223         * xml/XSLImportRule.cpp:
2224         (WebCore::XSLImportRule::setXSLStyleSheet): Set parent rather than owner document
2225         * xml/XSLStyleSheet.cpp:
2226         (WebCore::XSLStyleSheet::XSLStyleSheet): Initialize m_parentStyleSheet
2227         (WebCore::XSLStyleSheet::parseString): Make all child stylesheets use parent's dictionary
2228         (WebCore::XSLStyleSheet::setParentStyleSheet): Added
2229         * xml/XSLStyleSheet.h: Added m_parentStyleSheet member
2230
2231 2008-11-04  Simon Fraser  <simon.fraser@apple.com>
2232
2233         No review.
2234
2235         Improved buid fix: include MathExtras.h to get roundf on all platforms.
2236
2237         * platform/graphics/FloatPoint.h:
2238
2239 2008-11-04  Brady Eidson  <beidson@apple.com>
2240
2241         Reviewed by John Sullivan
2242
2243         Add a simple "visited" method to HistoryItem for use by global history
2244
2245         * WebCore.base.exp:
2246
2247         * history/HistoryItem.cpp:
2248         (WebCore::HistoryItem::visited):  Update the title on the item, set last visited time,
2249           and bump the visit count.  All things that should happen when a url is visited again!
2250         * history/HistoryItem.h:
2251
2252 2008-11-04  Jan Michael Alonzo  <jmalonzo@webkit.org>
2253
2254         Build fix. Not reviewed.
2255
2256         * platform/graphics/FloatPoint.h: include math.h.
2257         reported by zdobersek in #webkit.
2258
2259 2008-11-04  Darin Fisher  <darin@chromium.org>
2260  
2261         Reviewed by Anders Carlsson.
2262  
2263         No need to clobber all ResourceRequest fields in FrameLoader::reload()
2264         https://bugs.webkit.org/show_bug.cgi?id=21949
2265  
2266         * loader/FrameLoader.cpp:
2267         (WebCore::FrameLoader::reload):
2268
2269 2008-11-04  Darin Adler  <darin@apple.com>
2270
2271         Reviewed by Tim Hatcher.
2272
2273         * storage/Database.cpp:
2274         (WebCore::databaseVersionKey): Tweaked formatting.
2275
2276 2008-11-03  Darin Adler  <darin@apple.com>
2277
2278         Reviewed by Tim Hatcher.
2279
2280         - https://bugs.webkit.org/show_bug.cgi?id=22061
2281           create script to check for exit-time destructors
2282
2283         * WebCore.xcodeproj/project.pbxproj: Added a script
2284         phase that runs the check-for-exit-time-destructors script.
2285
2286         * html/HTMLAttributeNames.in: Removed some unused attribute names.
2287
2288         * html/HTMLEmbedElement.cpp:
2289         (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed code that
2290         sets the write-only m_pluginPage.
2291         * html/HTMLEmbedElement.h: Ditto.
2292
2293         * platform/mac/CursorMac.mm:
2294         (WebCore::leakNamedCursor): Changed to return a Cursor&.
2295         (WebCore::pointerCursor): Changed to leak an object to avoid an
2296         exit-time destructor.
2297         (WebCore::crossCursor): Ditto.
2298         (WebCore::handCursor): Ditto.
2299         (WebCore::moveCursor): Ditto.
2300         (WebCore::verticalTextCursor): Ditto.
2301         (WebCore::cellCursor): Ditto.
2302         (WebCore::contextMenuCursor): Ditto.
2303         (WebCore::aliasCursor): Ditto.
2304         (WebCore::zoomInCursor): Ditto.
2305         (WebCore::zoomOutCursor): Ditto.
2306         (WebCore::copyCursor): Ditto.
2307         (WebCore::noneCursor): Ditto.
2308         (WebCore::progressCursor): Ditto.
2309         (WebCore::noDropCursor): Ditto.
2310         (WebCore::notAllowedCursor): Ditto.
2311         (WebCore::iBeamCursor): Ditto.
2312         (WebCore::waitCursor): Ditto.
2313         (WebCore::helpCursor): Ditto.
2314         (WebCore::eastResizeCursor): Ditto.
2315         (WebCore::northResizeCursor): Ditto.
2316         (WebCore::northEastResizeCursor): Ditto.
2317         (WebCore::northWestResizeCursor): Ditto.
2318         (WebCore::southResizeCursor): Ditto.
2319         (WebCore::southEastResizeCursor): Ditto.
2320         (WebCore::southWestResizeCursor): Ditto.
2321         (WebCore::westResizeCursor): Ditto.
2322         (WebCore::northSouthResizeCursor): Ditto.
2323         (WebCore::eastWestResizeCursor): Ditto.
2324         (WebCore::northEastSouthWestResizeCursor): Ditto.
2325         (WebCore::northWestSouthEastResizeCursor): Ditto.
2326         (WebCore::columnResizeCursor): Ditto.
2327         (WebCore::rowResizeCursor): Ditto.
2328         (WebCore::grabCursor): Ditto.
2329         (WebCore::grabbingCursor): Ditto.
2330
2331         * storage/Database.cpp:
2332         (WebCore::guidMutex): Changed to leak an object to avoid an
2333         exit-time destructor. Also added a comment explaining why it's
2334         thread safe.
2335         (WebCore::guidToVersionMap): Ditto.
2336         (WebCore::guidToDatabaseMap): Ditto.
2337         (WebCore::Database::databaseInfoTableName): Ditto.
2338         (WebCore::databaseVersionKey): Ditto.
2339         (WebCore::Database::getVersionFromDatabase): Ditto.
2340         (WebCore::Database::setVersionInDatabase): Ditto.
2341         (WebCore::guidForOriginAndName): Ditto.
2342         * storage/DatabaseTracker.cpp:
2343         (WebCore::DatabaseTracker::tracker): Ditto.
2344         (WebCore::notificationMutex): Ditto.
2345         (WebCore::notificationQueue): Ditto.
2346         (WebCore::DatabaseTracker::notifyDatabasesChanged): Ditto.
2347
2348 2008-11-04  Simon Fraser  <simon.fraser@apple.com>
2349
2350         Reviewed by Dave Hyatt
2351
2352         https://bugs.webkit.org/show_bug.cgi?id=21941
2353
2354         Rename absolutePosition() to localToAbsolute(), and add the ability
2355         to optionally take transforms into account (which will eventually be the
2356         default behavior).
2357
2358         * WebCore.base.exp:
2359         * WebCore.xcodeproj/project.pbxproj:
2360         * dom/ContainerNode.cpp:
2361         (WebCore::ContainerNode::getUpperLeftCorner):
2362         (WebCore::ContainerNode::getLowerRightCorner):
2363         (WebCore::ContainerNode::getRect):
2364         * dom/ContainerNode.h:
2365         * dom/MouseRelatedEvent.cpp:
2366         (WebCore::MouseRelatedEvent::receivedTarget):
2367         * dom/Node.cpp:
2368         (WebCore::Node::getRect):
2369         * editing/SelectionController.cpp:
2370         (WebCore::SelectionController::layout):
2371         (WebCore::SelectionController::caretRect):
2372         * editing/visible_units.cpp:
2373         (WebCore::previousLinePosition):
2374         (WebCore::nextLinePosition):
2375         * html/HTMLAnchorElement.cpp:
2376         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
2377         (WebCore::HTMLAnchorElement::defaultEventHandler):
2378         * html/HTMLAreaElement.cpp:
2379         (WebCore::HTMLAreaElement::getRect):
2380         * html/HTMLImageElement.cpp:
2381         (WebCore::HTMLImageElement::x):
2382         (WebCore::HTMLImageElement::y):
2383         * html/HTMLInputElement.cpp:
2384         (WebCore::HTMLInputElement::defaultEventHandler):
2385         * html/HTMLInputElement.h:
2386         * page/AccessibilityRenderObject.cpp:
2387         (WebCore::AccessibilityRenderObject::boundingBoxRect):
2388         * page/EventHandler.cpp:
2389         (WebCore::EventHandler::handleDrag):
2390         * platform/graphics/FloatPoint.h:
2391         (WebCore::roundedIntPoint):
2392         * platform/graphics/IntSize.h:
2393         (WebCore::IntSize::expand):
2394         * rendering/LayoutState.cpp:
2395         (WebCore::LayoutState::LayoutState):
2396         * rendering/RenderBlock.cpp:
2397         (WebCore::RenderBlock::layoutBlock):
2398         (WebCore::RenderBlock::paintObject):
2399         (WebCore::RenderBlock::selectionGapRects):
2400         (WebCore::RenderBlock::fillBlockSelectionGaps):
2401         (WebCore::RenderBlock::nodeAtPoint):
2402         (WebCore::RenderBlock::positionForCoordinates):
2403         * rendering/RenderBox.cpp:
2404         (WebCore::RenderBox::localToAbsolute):
2405         (WebCore::RenderBox::computeAbsoluteRepaintRect):
2406         (WebCore::RenderBox::caretRect):
2407         * rendering/RenderBox.h:
2408         (WebCore::RenderBox::relativePositionOffset):
2409         * rendering/RenderContainer.cpp:
2410         (WebCore::RenderContainer::addLineBoxRects):
2411         * rendering/RenderFlow.cpp:
2412         (WebCore::RenderFlow::absoluteClippedOverflowRect):
2413         (WebCore::RenderFlow::caretRect):
2414         (WebCore::RenderFlow::addFocusRingRects):
2415         * rendering/RenderLayer.cpp:
2416         (WebCore::RenderLayer::updateLayerPosition):
2417         (WebCore::RenderLayer::convertToLayerCoords):
2418         (WebCore::RenderLayer::addScrolledContentOffset):
2419         (WebCore::RenderLayer::subtractScrolledContentOffset):
2420         (WebCore::RenderLayer::scrollRectToVisible):
2421         * rendering/RenderLayer.h:
2422         (WebCore::RenderLayer::scrolledContentOffset):
2423         (WebCore::RenderLayer::relativePositionOffset):
2424         * rendering/RenderListBox.cpp:
2425         (WebCore::RenderListBox::panScroll):
2426         (WebCore::RenderListBox::scrollToward):
2427         * rendering/RenderListMarker.cpp:
2428         (WebCore::RenderListMarker::selectionRect):
2429         * rendering/RenderObject.cpp:
2430         (WebCore::RenderObject::absoluteBoundingBoxRect):
2431         (WebCore::RenderObject::computeAbsoluteRepaintRect):
2432         (WebCore::RenderObject::localToAbsolute):
2433         (WebCore::RenderObject::addDashboardRegions):
2434         (WebCore::RenderObject::absoluteContentBox):
2435         (WebCore::RenderObject::absoluteOutlineBox):
2436         * rendering/RenderObject.h:
2437         (WebCore::RenderObject::localToAbsoluteForContent):
2438         * rendering/RenderPart.cpp:
2439         (WebCore::RenderPart::updateWidgetPosition):
2440         * rendering/RenderReplaced.cpp:
2441         (WebCore::RenderReplaced::selectionRect):
2442         * rendering/RenderSVGInlineText.cpp:
2443         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
2444         * rendering/RenderSVGText.cpp:
2445         (WebCore::RenderSVGText::absoluteRects):
2446         * rendering/RenderTableCell.cpp:
2447         (WebCore::RenderTableCell::localToAbsolute):
2448         * rendering/RenderTableCell.h:
2449         * rendering/RenderText.cpp:
2450         (WebCore::RenderText::addLineBoxRects):
2451         (WebCore::RenderText::caretRect):
2452         (WebCore::RenderText::selectionRect):
2453         * rendering/RenderVideo.cpp:
2454         (WebCore::RenderVideo::updatePlayer):
2455         * rendering/RenderView.cpp:
2456         (WebCore::RenderView::localToAbsolute):
2457         * rendering/RenderView.h:
2458         * rendering/RenderWidget.cpp:
2459         (WebCore::RenderWidget::updateWidgetPosition):
2460         * svg/SVGSVGElement.cpp:
2461         (WebCore::SVGSVGElement::getScreenCTM):
2462
2463 2008-11-03  Yael Aharon  <yael.aharon@nokia.com>
2464
2465         Reviewed by Simon Hausmann.
2466
2467         Add methods for getting and setting user data on History Item.
2468         This change is limited to QT port only. Tests were added in
2469         the patch for https://bugs.webkit.org/show_bug.cgi?id=21864.
2470
2471         Minor change by Simon: made the functions inline and added a missing
2472         const.
2473
2474         * history/HistoryItem.h:
2475
2476 2008-11-01  Alexey Proskuryakov  <ap@webkit.org>
2477
2478         Reviewed by Darin Adler.
2479
2480         https://bugs.webkit.org/show_bug.cgi?id=22030
2481         Make EventNames usable from multiple threads
2482
2483         * platform/text/AtomicString.cpp:
2484         (WebCore::stringTable):
2485         (WebCore::AtomicString::add):
2486         (WebCore::AtomicString::remove):
2487         (WebCore::AtomicString::find):
2488         (WebCore::AtomicString::init):
2489         * platform/text/AtomicString.h:
2490         Atomic string table is now per-thread. Individual strings cannot be shared between threads,
2491         so global AtomicString constants cannot be used from threads other than the main one.
2492
2493         * dom/EventNames.cpp:
2494         (WebCore::EventNames::EventNames):
2495         (WebCore::eventNames):
2496         (WebCore::EventNames::init):
2497         * dom/EventNames.h:
2498         Made EventNames a ThreadSpecific struct. Individual event names are now accessed as
2499         eventNames().fooEvent, not EventNames::fooEvent. This makes EventNames usable from all
2500         threads.
2501
2502         * WebCore.base.exp:
2503         * bindings/js/JSDOMWindowBase.cpp:
2504         * bindings/js/JSEventListener.cpp:
2505         * bindings/js/ScriptController.cpp:
2506         (WebCore::ScriptController::processingUserGesture):
2507         * dom/BeforeTextInsertedEvent.cpp:
2508         (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent):
2509         * dom/BeforeUnloadEvent.cpp:
2510         (WebCore::BeforeUnloadEvent::BeforeUnloadEvent):
2511         * dom/CharacterData.cpp:
2512         (WebCore::CharacterData::dispatchModifiedEvent):
2513         * dom/ContainerNode.cpp:
2514         (WebCore::dispatchChildInsertionEvents):
2515         (WebCore::dispatchChildRemovalEvents):
2516         * dom/DedicatedWorker.cpp:
2517         (WebCore::DedicatedWorker::dispatchErrorEvent):
2518         * dom/Document.cpp:
2519         (WebCore::Document::implicitClose):
2520         (WebCore::Document::setFocusedNode):
2521         (WebCore::Document::addListenerTypeIfNeeded):
2522         (WebCore::Document::removeWindowInlineEventListenerForType):
2523         (WebCore::Document::addWindowEventListener):
2524         (WebCore::Document::removeWindowEventListener):
2525         (WebCore::Document::finishedParsing):
2526         * dom/EventTargetNode.cpp:
2527         (WebCore::EventTargetNode::dispatchGenericEvent):
2528         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
2529         (WebCore::EventTargetNode::dispatchWindowEvent):
2530         (WebCore::EventTargetNode::dispatchUIEvent):
2531         (WebCore::EventTargetNode::dispatchSimulatedClick):
2532         (WebCore::EventTargetNode::dispatchMouseEvent):
2533         (WebCore::EventTargetNode::dispatchFocusEvent):
2534         (WebCore::EventTargetNode::dispatchBlurEvent):
2535         (WebCore::EventTargetNode::defaultEventHandler):
2536         (WebCore::EventTargetNode::on*): (multiple methods)
2537         (WebCore::EventTargetNode::setOn*): (multiple methods)
2538         * dom/KeyboardEvent.cpp:
2539         (WebCore::eventTypeForKeyboardEventType):
2540         (WebCore::KeyboardEvent::keyCode):
2541         (WebCore::KeyboardEvent::charCode):
2542         * dom/MessageEvent.cpp:
2543         (WebCore::MessageEvent::MessageEvent):
2544         * dom/MessagePort.cpp:
2545         (WebCore::MessagePort::dispatchMessages):
2546         (WebCore::MessagePort::dispatchCloseEvent):
2547         * dom/MouseEvent.cpp:
2548         (WebCore::MouseEvent::isDragEvent):
2549         (WebCore::MouseEvent::toElement):
2550         (WebCore::MouseEvent::fromElement):
2551         * dom/OverflowEvent.cpp:
2552         (WebCore::OverflowEvent::OverflowEvent):
2553         * dom/TextEvent.cpp:
2554         (WebCore::TextEvent::TextEvent):
2555         * dom/WebKitAnimationEvent.cpp:
2556         (WebCore::WebKitAnimationEvent::WebKitAnimationEvent):
2557         (WebCore::WebKitAnimationEvent::~WebKitAnimationEvent):
2558         (WebCore::WebKitAnimationEvent::initWebKitAnimationEvent):
2559         (WebCore::WebKitAnimationEvent::animationName):
2560         (WebCore::WebKitAnimationEvent::elapsedTime):
2561         * dom/WebKitTransitionEvent.cpp:
2562         (WebCore::WebKitTransitionEvent::WebKitTransitionEvent):
2563         (WebCore::WebKitTransitionEvent::~WebKitTransitionEvent):
2564         (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent):
2565         (WebCore::WebKitTransitionEvent::propertyName):
2566         (WebCore::WebKitTransitionEvent::elapsedTime):
2567         * dom/WheelEvent.cpp:
2568         (WebCore::WheelEvent::WheelEvent):
2569         (WebCore::WheelEvent::initWheelEvent):
2570         * dom/XMLTokenizerLibxml2.cpp:
2571         * dom/XMLTokenizerQt.cpp:
2572         * editing/DeleteButton.cpp:
2573         (WebCore::DeleteButton::defaultEventHandler):
2574         * editing/EditCommand.cpp:
2575         * editing/Editor.cpp:
2576         (WebCore::Editor::canDHTMLCut):
2577         (WebCore::Editor::canDHTMLCopy):
2578         (WebCore::Editor::canDHTMLPaste):
2579         (WebCore::Editor::tryDHTMLCopy):
2580         (WebCore::Editor::tryDHTMLCut):
2581         (WebCore::Editor::tryDHTMLPaste):
2582         (WebCore::dispatchEditableContentChangedEvents):
2583         * editing/ReplaceSelectionCommand.cpp:
2584         (WebCore::ReplacementFragment::ReplacementFragment):
2585         * editing/SelectionController.cpp:
2586         (WebCore::SelectionController::setFocused):
2587         * html/HTMLAnchorElement.cpp:
2588         (WebCore::HTMLAnchorElement::defaultEventHandler):
2589         * html/HTMLBodyElement.cpp:
2590         (WebCore::HTMLBodyElement::parseMappedAttribute):
2591         * html/HTMLButtonElement.cpp:
2592         (WebCore::HTMLButtonElement::parseMappedAttribute):
2593         (WebCore::HTMLButtonElement::defaultEventHandler):
2594         * html/HTMLElement.cpp:
2595         (WebCore::HTMLElement::parseMappedAttribute):
2596         * html/HTMLFormControlElement.cpp:
2597         (WebCore::HTMLFormControlElement::onChange):
2598         * html/HTMLFormElement.cpp:
2599         (WebCore::HTMLFormElement::handleLocalEvents):
2600         (WebCore::HTMLFormElement::prepareSubmit):
2601         (WebCore::HTMLFormElement::reset):
2602         (WebCore::HTMLFormElement::parseMappedAttribute):
2603         * html/HTMLFrameElementBase.cpp:
2604         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
2605         * html/HTMLFrameSetElement.cpp:
2606         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
2607         * html/HTMLImageElement.cpp:
2608         (WebCore::HTMLImageElement::parseMappedAttribute):
2609         * html/HTMLImageLoader.cpp:
2610         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2611         * html/HTMLInputElement.cpp:
2612         (WebCore::HTMLInputElement::parseMappedAttribute):
2613         (WebCore::HTMLInputElement::setValueFromRenderer):
2614         (WebCore::HTMLInputElement::preDispatchEventHandler):
2615         (WebCore::HTMLInputElement::postDispatchEventHandler):
2616         (WebCore::HTMLInputElement::defaultEventHandler):
2617         (WebCore::HTMLInputElement::onSearch):
2618         * html/HTMLLabelElement.cpp:
2619         (WebCore::HTMLLabelElement::defaultEventHandler):
2620         * html/HTMLMediaElement.cpp:
2621         (WebCore::HTMLMediaElement::load):
2622         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2623         (WebCore::HTMLMediaElement::setReadyState):
2624         (WebCore::HTMLMediaElement::progressEventTimerFired):
2625         (WebCore::HTMLMediaElement::seek):
2626         (WebCore::HTMLMediaElement::setDefaultPlaybackRate):
2627         (WebCore::HTMLMediaElement::setPlaybackRate):
2628         (WebCore::HTMLMediaElement::play):
2629         (WebCore::HTMLMediaElement::pause):
2630         (WebCore::HTMLMediaElement::setVolume):
2631         (WebCore::HTMLMediaElement::setMuted):
2632         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2633         (WebCore::HTMLMediaElement::documentWillBecomeInactive):
2634         * html/HTMLObjectElement.cpp:
2635         (WebCore::HTMLObjectElement::parseMappedAttribute):
2636         * html/HTMLOptionElement.cpp:
2637         * html/HTMLScriptElement.cpp:
2638         (WebCore::HTMLScriptElement::parseMappedAttribute):
2639         (WebCore::HTMLScriptElement::dispatchLoadEvent):
2640         (WebCore::HTMLScriptElement::dispatchErrorEvent):
2641         * html/HTMLSelectElement.cpp:
2642         (WebCore::HTMLSelectElement::parseMappedAttribute):
2643         (WebCore::HTMLSelectElement::defaultEventHandler):
2644         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2645         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2646         * html/HTMLTextAreaElement.cpp:
2647         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
2648         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2649         * html/HTMLTokenizer.cpp:
2650         (WebCore::HTMLTokenizer::notifyFinished):
2651         * loader/FrameLoader.cpp:
2652         (WebCore::FrameLoader::stopLoading):
2653         (WebCore::FrameLoader::canCachePage):
2654         * loader/ImageDocument.cpp:
2655         (WebCore::ImageEventListener::handleEvent):
2656         * loader/ImageLoader.cpp:
2657         * loader/MediaDocument.cpp:
2658         (WebCore::MediaDocument::defaultEventHandler):
2659         * loader/appcache/DOMApplicationCache.cpp:
2660         (WebCore::DOMApplicationCache::callCheckingListener):
2661         (WebCore::DOMApplicationCache::callErrorListener):
2662         (WebCore::DOMApplicationCache::callNoUpdateListener):
2663         (WebCore::DOMApplicationCache::callDownloadingListener):
2664         (WebCore::DOMApplicationCache::callProgressListener):
2665         (WebCore::DOMApplicationCache::callUpdateReadyListener):
2666         (WebCore::DOMApplicationCache::callCachedListener):
2667         * page/AccessibilityObject.cpp:
2668         * page/AccessibilityRenderObject.cpp:
2669         (WebCore::AccessibilityRenderObject::mouseButtonListener):
2670         * page/ContextMenuController.cpp:
2671         (WebCore::ContextMenuController::handleContextMenuEvent):
2672         * page/DOMWindow.cpp:
2673         (WebCore::DOMWindow::on*): (multiple methods)
2674         (WebCore::DOMWindow::setOn*): (multiple methods)
2675         * page/EventHandler.cpp:
2676         (WebCore::EventHandler::handleMousePressEvent):
2677         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2678         (WebCore::EventHandler::handleMouseMoveEvent):
2679         (WebCore::EventHandler::handleMouseReleaseEvent):
2680         (WebCore::EventHandler::updateDragAndDrop):
2681         (WebCore::EventHandler::cancelDragAndDrop):
2682         (WebCore::EventHandler::performDragAndDrop):
2683         (WebCore::EventHandler::updateMouseEventTargetNode):
2684         (WebCore::EventHandler::dispatchMouseEvent):
2685         (WebCore::EventHandler::sendContextMenuEvent):
2686         (WebCore::EventHandler::canMouseDownStartSelect):
2687         (WebCore::EventHandler::canMouseDragExtendSelect):
2688         (WebCore::EventHandler::defaultKeyboardEventHandler):
2689         (WebCore::EventHandler::dragSourceMovedTo):
2690         (WebCore::EventHandler::dragSourceEndedAt):
2691         (WebCore::EventHandler::handleDrag):
2692         (WebCore::EventHandler::handleTextInputEvent):
2693         * page/FocusController.cpp:
2694         * page/Frame.cpp:
2695         (WebCore::Frame::sendResizeEvent):
2696         (WebCore::Frame::sendScrollEvent):
2697         * page/Page.cpp:
2698         (WebCore::networkStateChanged):
2699         * page/animation/AnimationBase.cpp:
2700         (WebCore::AnimationBase::updateStateMachine):
2701         (WebCore::AnimationBase::animationTimerCallbackFired):
2702         (WebCore::AnimationBase::primeEventTimers):
2703         * page/animation/ImplicitAnimation.cpp:
2704         (WebCore::ImplicitAnimation::onAnimationEnd):
2705         (WebCore::ImplicitAnimation::sendTransitionEvent):
2706         * page/animation/KeyframeAnimation.cpp:
2707         (WebCore::KeyframeAnimation::onAnimationStart):
2708         (WebCore::KeyframeAnimation::onAnimationIteration):
2709         (WebCore::KeyframeAnimation::onAnimationEnd):
2710         (WebCore::KeyframeAnimation::sendAnimationEvent):
2711         * page/gtk/EventHandlerGtk.cpp:
2712         * page/mac/EventHandlerMac.mm:
2713         (WebCore::isKeyboardOptionTab):
2714         * page/mac/FrameMac.mm:
2715         * page/qt/EventHandlerQt.cpp:
2716         (WebCore::isKeyboardOptionTab):
2717         * plugins/PluginView.cpp:
2718         * plugins/gtk/PluginViewGtk.cpp:
2719         * plugins/qt/PluginViewQt.cpp:
2720         * plugins/win/PluginViewWin.cpp:
2721         (WebCore::PluginView::handleKeyboardEvent):
2722         (WebCore::PluginView::handleMouseEvent):
2723         * rendering/MediaControlElements.cpp:
2724         (WebCore::MediaControlMuteButtonElement::defaultEventHandler):
2725         (WebCore::MediaControlPlayButtonElement::defaultEventHandler):
2726         (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
2727         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2728         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2729         * rendering/RenderFrameSet.cpp:
2730         (WebCore::RenderFrameSet::userResize):
2731         * rendering/RenderLayer.cpp:
2732         (WebCore::RenderLayer::scrollToOffset):
2733         * rendering/RenderListBox.cpp:
2734         (WebCore::RenderListBox::valueChanged):
2735         * rendering/RenderMedia.cpp:
2736         (WebCore::RenderMedia::forwardEvent):
2737         * rendering/RenderObject.cpp:
2738         * rendering/RenderSlider.cpp:
2739         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
2740         * rendering/RenderTextControl.cpp:
2741         (WebCore::RenderTextControl::forwardEvent):
2742         (WebCore::RenderTextControl::selectionChanged):
2743         * rendering/RenderWidget.cpp:
2744         * rendering/TextControlInnerElements.cpp:
2745         (WebCore::TextControlInnerTextElement::defaultEventHandler):
2746         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
2747         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
2748         * storage/LocalStorageArea.cpp:
2749         (WebCore::LocalStorageArea::dispatchStorageEvent):
2750         * storage/SessionStorageArea.cpp:
2751         (WebCore::SessionStorageArea::dispatchStorageEvent):
2752         * svg/SVGAElement.cpp:
2753         (WebCore::SVGAElement::defaultEventHandler):
2754         * svg/SVGDocument.cpp:
2755         (WebCore::SVGDocument::dispatchZoomEvent):
2756         (WebCore::SVGDocument::dispatchScrollEvent):
2757         * svg/SVGElement.cpp:
2758         (WebCore::SVGElement::parseMappedAttribute):
2759         (WebCore::hasLoadListener):
2760         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
2761         * svg/SVGElementInstance.cpp:
2762         (WebCore::SVGElementInstance::on*): (multiple methods)
2763         (WebCore::SVGElementInstance::setOn*): (multiple methods)
2764         * svg/SVGImageLoader.cpp:
2765         (WebCore::SVGImageLoader::dispatchLoadEvent):
2766         * svg/SVGSVGElement.cpp:
2767         (WebCore::SVGSVGElement::parseMappedAttribute):
2768         * svg/SVGScriptElement.cpp:
2769         (WebCore::SVGScriptElement::dispatchErrorEvent):
2770         * xml/XMLHttpRequest.cpp:
2771         (WebCore::XMLHttpRequest::dispatchReadyStateChangeEvent):
2772         (WebCore::XMLHttpRequest::dispatchAbortEvent):
2773         (WebCore::XMLHttpRequest::dispatchErrorEvent):
2774         (WebCore::XMLHttpRequest::dispatchLoadEvent):
2775         (WebCore::XMLHttpRequest::dispatchLoadStartEvent):
2776         (WebCore::XMLHttpRequest::dispatchProgressEvent):
2777         * xml/XMLHttpRequestUpload.cpp:
2778         (WebCore::XMLHttpRequestUpload::dispatchAbortEvent):
2779         (WebCore::XMLHttpRequestUpload::dispatchErrorEvent):
2780         (WebCore::XMLHttpRequestUpload::dispatchLoadEvent):
2781         (WebCore::XMLHttpRequestUpload::dispatchLoadStartEvent):
2782         (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
2783         * xml/XPathResult.cpp:
2784         (WebCore::XPathResult::XPathResult):
2785         (WebCore::XPathResult::~XPathResult):
2786         (WebCore::XPathResult::invalidateIteratorState):
2787         Access event names via eventNames() function.
2788
2789 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
2790
2791         Reviewed by Mark Rowe.
2792
2793         Delete unused forwarding headers.
2794
2795         * ForwardingHeaders/kjs/Activation.h: Removed.
2796         * ForwardingHeaders/kjs/Register.h: Removed.
2797         * ForwardingHeaders/kjs/RegisterID.h: Removed.
2798
2799 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
2800
2801         Not reviewed.
2802
2803         Fix stupid typo in previous build fix.
2804
2805         * bindings/js/JSStorageCustom.cpp:
2806         * bindings/scripts/CodeGeneratorJS.pm:
2807         * bridge/NP_jsobject.cpp:
2808
2809 2008-11-03  Cameron Zwarich  <zwarich@apple.com>
2810
2811         Not reviewed.
2812
2813         Fix the build for all non-Mac platforms.
2814
2815         * ForwardingHeaders/kjs/PropertyNameArray.h: Removed.
2816         * ForwardingHeaders/runtime/PropertyNameArray.h: Copied from ForwardingHeaders/kjs/PropertyNameArray.h.
2817         * bindings/js/JSStorageCustom.cpp:
2818         * bindings/scripts/CodeGeneratorJS.pm:
2819         * bridge/NP_jsobject.cpp:
2820
2821 2008-11-03  Cameron Zwarich  <zwarich@apple.com>
2822
2823         Not reviewed.
2824
2825         Fix the wxWindows build.
2826
2827         * bridge/c/c_instance.cpp:
2828
2829 2008-11-03  Cameron Zwarich  <zwarich@apple.com>
2830
2831         Rubber-stamped by Maciej Stachowiak.
2832
2833         Move more files into the runtime subdirectory of JavaScriptCore.
2834
2835         * ForwardingHeaders/kjs/ArgList.h: Removed.
2836         * ForwardingHeaders/kjs/CollectorHeapIterator.h: Removed.
2837         * ForwardingHeaders/kjs/ExecState.h: Removed.
2838         * ForwardingHeaders/kjs/InitializeThreading.h: Removed.
2839         * ForwardingHeaders/kjs/JSGlobalData.h: Removed.
2840         * ForwardingHeaders/kjs/JSLock.h: Removed.
2841         * ForwardingHeaders/kjs/SymbolTable.h: Removed.
2842         * ForwardingHeaders/runtime/ArgList.h: Copied from ForwardingHeaders/kjs/ArgList.h.
2843         * ForwardingHeaders/runtime/CollectorHeapIterator.h: Copied from ForwardingHeaders/kjs/CollectorHeapIterator.h.
2844         * ForwardingHeaders/runtime/ExecState.h: Copied from ForwardingHeaders/kjs/ExecState.h.
2845         * ForwardingHeaders/runtime/InitializeThreading.h: Copied from ForwardingHeaders/kjs/InitializeThreading.h.
2846         * ForwardingHeaders/runtime/JSGlobalData.h: Copied from ForwardingHeaders/kjs/JSGlobalData.h.
2847         * ForwardingHeaders/runtime/JSLock.h: Copied from ForwardingHeaders/kjs/JSLock.h.
2848         * ForwardingHeaders/runtime/SymbolTable.h: Copied from ForwardingHeaders/kjs/SymbolTable.h.
2849         * bindings/js/GCController.cpp:
2850         * bindings/js/JSCustomPositionCallback.cpp:
2851         * bindings/js/JSCustomPositionErrorCallback.cpp:
2852         * bindings/js/JSCustomSQLStatementCallback.cpp:
2853         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2854         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2855         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2856         * bindings/js/JSCustomVoidCallback.cpp:
2857         * bindings/js/JSCustomXPathNSResolver.cpp:
2858         * bindings/js/JSDOMWindowBase.cpp:
2859         * bindings/js/JSEventCustom.cpp:
2860         * bindings/js/JSEventListener.cpp:
2861         * bindings/js/JSNodeFilterCondition.cpp:
2862         * bindings/js/ScheduledAction.cpp:
2863         * bindings/js/ScriptController.cpp:
2864         * bindings/js/ScriptControllerMac.mm:
2865         * bindings/objc/WebScriptObject.mm:
2866         * bridge/NP_jsobject.cpp:
2867         * bridge/c/c_class.cpp:
2868         * bridge/c/c_instance.cpp:
2869         * bridge/c/c_runtime.cpp:
2870         * bridge/c/c_utility.cpp:
2871         * bridge/jni/jni_class.cpp:
2872         * bridge/jni/jni_instance.cpp:
2873         * bridge/jni/jni_jsobject.mm:
2874         * bridge/jni/jni_objc.mm:
2875         * bridge/jni/jni_runtime.cpp:
2876         * bridge/jni/jni_runtime.h:
2877         * bridge/jni/jni_utility.cpp:
2878         * bridge/npruntime.cpp:
2879         * bridge/objc/objc_instance.mm:
2880         * bridge/objc/objc_runtime.mm:
2881         * bridge/objc/objc_utility.mm:
2882         * bridge/runtime.cpp:
2883         * dom/Document.cpp:
2884         * dom/Node.cpp:
2885         * dom/NodeFilter.cpp:
2886         * dom/NodeIterator.cpp:
2887         * dom/TreeWalker.cpp:
2888         * history/CachedPage.cpp:
2889         * inspector/InspectorController.cpp:
2890         * inspector/JavaScriptCallFrame.cpp:
2891         * inspector/JavaScriptCallFrame.h:
2892         * inspector/JavaScriptDebugServer.cpp:
2893         * inspector/JavaScriptProfileNode.cpp:
2894         * loader/FrameLoader.cpp:
2895         * loader/icon/IconDatabase.cpp:
2896         * page/Console.cpp:
2897         * page/Page.cpp:
2898         * page/mac/FrameMac.mm:
2899         * plugins/PluginView.cpp:
2900         * plugins/gtk/PluginViewGtk.cpp:
2901         * plugins/qt/PluginViewQt.cpp:
2902         * plugins/win/PluginViewWin.cpp:
2903         * storage/Database.cpp:
2904         * xml/XMLHttpRequest.cpp:
2905
2906 2008-11-03  Cameron Zwarich  <zwarich@apple.com>
2907
2908         Reviewed by Sam Weinig.
2909
2910         Remove the forwarding header for FunctionCallProfile, because it was
2911         renamed to ProfileNode in r33466.
2912
2913         * ForwardingHeaders/kjs/FunctionCallProfile.h: Removed.
2914
2915 2008-11-03  Simon Fraser  <simon.fraser@apple.com>
2916
2917         Reviewed by Dave Hyatt
2918
2919         https://bugs.webkit.org/show_bug.cgi?id=22026
2920
2921         When computing the bounds of the transparency layer, we need to
2922         map the clipRect through the enclosing transform.
2923         
2924         Test: fast/layers/opacity-transforms.html
2925
2926         * rendering/RenderLayer.cpp:
2927         (WebCore::transparencyClipBox):
2928
2929 2008-11-03  Kevin Decker  <kdecker@apple.com>
2930
2931         Reviewed by Anders Carlsson.
2932
2933         https://bugs.webkit.org/show_bug.cgi?id=22053
2934
2935         Added additional support needed for the NPDrawingModelCoreAnimation drawing model. 
2936
2937         * bridge/npapi.h:
2938
2939 2008-11-03  Xan Lopez  <xan@gnome.org>
2940
2941         Reviewed by Alp Toker.
2942
2943         Update parseDataUrl() function in the libsoup http backend with
2944         the one from the curl backend which has recent correctness and crash
2945         fixes.
2946
2947         * platform/network/soup/ResourceHandleSoup.cpp:
2948         (WebCore::parseDataUrl):
2949
2950 2008-11-03  Holger Hans Peter Freyther  <zecke@selfish.org>
2951
2952         Reviewed by Alp Toker.
2953
2954         https://bugs.webkit.org/show_bug.cgi?id=22041
2955         Fix CURL crashes on the test suite
2956
2957         Fix segfault with setDefersLoading(). Do not call into curl when we
2958         don't have a CURL handle.
2959
2960         It is attempted to defer the loading before the load has been
2961         started (no curl handle was allocated yet). If that happens then
2962         just remember that. ResourceHandleManager::startJob is already taking
2963         care of this and in initResourceHandle the the downloading will
2964         be paused if needed.
2965
2966         Fixes fast/loader/simultaneous-reloads-assert.html
2967
2968         * platform/network/curl/ResourceHandleCurl.cpp:
2969         (WebCore::ResourceHandle::setDefersLoading):
2970
2971 2008-11-03  Holger Hans Peter Freyther  <zecke@selfish.org>
2972
2973         Reviewed by Alp Toker.
2974
2975         https://bugs.webkit.org/show_bug.cgi?id=22041
2976         Fix CURL crashes on the test suite
2977
2978         Do not send "no data" to WebCore in parseDataUrl().
2979
2980         Fixes assert on fast/tokenizer/image-empty-crash.html
2981
2982         * platform/network/curl/ResourceHandleManager.cpp:
2983         (WebCore::parseDataUrl):
2984
2985 2008-11-02  Xan Lopez  <xan@gnome.org>
2986
2987         Reviewed by Holger Freyther.
2988
2989         https://bugs.webkit.org/show_bug.cgi?id=22009
2990         HTML5 Video with GStreamer pulls gnome-vfs without using it
2991
2992         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2993         Remove gnome-vfs include.
2994
2995 2008-11-01  Adam Barth  <abarth@webkit.org>
2996
2997         Reviewed by Sam Weinig.
2998
2999         Be sure to check the final URLs of requested resources to make sure we
3000         don't get fooled by HTTP redirects.
3001
3002         https://bugs.webkit.org/show_bug.cgi?id=21963
3003
3004         Tests: http/tests/security/xss-DENIED-xsl-document-redirect.xml
3005                http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml
3006
3007         * dom/XMLTokenizerLibxml2.cpp:
3008         (WebCore::openFunc):
3009         * loader/DocLoader.cpp:
3010         (WebCore::DocLoader::canRequest):
3011         (WebCore::DocLoader::requestResource):
3012         * loader/DocLoader.h:
3013         * xml/XSLTProcessor.cpp:
3014         (WebCore::docLoaderFunc):
3015
3016 2008-11-01  Alexey Proskuryakov  <ap@webkit.org>
3017
3018         Reviewed by Darin Adler.
3019
3020         https://bugs.webkit.org/show_bug.cgi?id=22001
3021         AtomicStringImpl* keys of event listener maps can outlive their strings
3022
3023         Test: fast/events/destroyed-atomic-string.html
3024
3025         * dom/MessagePort.cpp:
3026         (WebCore::MessagePort::addEventListener):
3027         (WebCore::MessagePort::removeEventListener):
3028         (WebCore::MessagePort::dispatchEvent):
3029         * dom/MessagePort.h:
3030         * loader/appcache/DOMApplicationCache.cpp:
3031         (WebCore::DOMApplicationCache::addEventListener):
3032         (WebCore::DOMApplicationCache::removeEventListener):
3033         (WebCore::DOMApplicationCache::dispatchEvent):
3034         * loader/appcache/DOMApplicationCache.h:
3035         * xml/XMLHttpRequest.cpp:
3036         (WebCore::XMLHttpRequest::addEventListener):
3037         (WebCore::XMLHttpRequest::removeEventListener):
3038         (WebCore::XMLHttpRequest::dispatchEvent):
3039         * xml/XMLHttpRequest.h:
3040         * xml/XMLHttpRequestUpload.cpp:
3041         (WebCore::XMLHttpRequestUpload::addEventListener):
3042         (WebCore::XMLHttpRequestUpload::removeEventListener):
3043         (WebCore::XMLHttpRequestUpload::dispatchEvent):
3044         * xml/XMLHttpRequestUpload.h:
3045         Changed EventListenersMap to use AtomicString as key (instead of AtomicStringImpl*).
3046
3047 2008-10-31  Alexey Proskuryakov  <ap@webkit.org>
3048
3049         Reviewed by Darin Adler.
3050
3051         https://bugs.webkit.org/show_bug.cgi?id=21998
3052         Use JSDOMGlobalObject in EventListener-related bindings
3053
3054         * dom/MessagePort.idl: Auto-generate bindings for onclose and onmessage.
3055
3056         * bindings/scripts/CodeGeneratorJS.pm: Use JSDOMGlobalObject instead of JSDOMWindow in JS
3057         bindings for inline event handlers.
3058
3059         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3060         (WebCore::JSDOMApplicationCache::addEventListener):
3061         (WebCore::JSDOMApplicationCache::removeEventListener):
3062         * bindings/js/JSEventTargetNodeCustom.cpp:
3063         (WebCore::JSEventTargetNode::addEventListener):
3064         (WebCore::JSEventTargetNode::removeEventListener):
3065         * bindings/js/JSMessagePortCustom.cpp:
3066         (WebCore::JSMessagePort::removeEventListener):
3067         * bindings/js/JSSVGElementInstanceCustom.cpp:
3068         (WebCore::JSSVGElementInstance::addEventListener):
3069         (WebCore::JSSVGElementInstance::removeEventListener):
3070         * bindings/js/JSXMLHttpRequestCustom.cpp:
3071         (WebCore::JSXMLHttpRequest::addEventListener):
3072         (WebCore::JSXMLHttpRequest::removeEventListener):
3073         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3074         (WebCore::JSXMLHttpRequestUpload::addEventListener):
3075         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
3076         Use ScriptExecutionContext and JSDOMGlobalObject in bindings.
3077
3078         * dom/EventTarget.h:
3079         * dom/EventTargetNode.cpp:
3080         (WebCore::EventTargetNode::scriptExecutionContext):
3081         * dom/EventTargetNode.h:
3082         * dom/MessagePort.cpp:
3083         * dom/MessagePort.h:
3084         (WebCore::MessagePort::scriptExecutionContext):
3085         * loader/appcache/DOMApplicationCache.cpp:
3086         (WebCore::DOMApplicationCache::scriptExecutionContext):
3087         * loader/appcache/DOMApplicationCache.h:
3088         * svg/SVGElementInstance.cpp:
3089         (WebCore::SVGElementInstance::scriptExecutionContext):
3090         * svg/SVGElementInstance.h:
3091         * xml/XMLHttpRequest.cpp:
3092         (WebCore::XMLHttpRequest::scriptExecutionContext):
3093         * xml/XMLHttpRequest.h:
3094         * xml/XMLHttpRequestUpload.cpp:
3095         (WebCore::XMLHttpRequestUpload::scriptExecutionContext):
3096         * xml/XMLHttpRequestUpload.h:
3097         Remove associatedFrame() method, and provide scriptExecutionContext() where it wasn't
3098         available yet.
3099
3100 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
3101
3102         Rubber-stamped by Geoff Garen.
3103
3104         Rename SourceRange.h to SourceCode.h.
3105
3106         * ForwardingHeaders/kjs/SourceCode.h: Copied from ForwardingHeaders/kjs/SourceRange.h.
3107         * ForwardingHeaders/kjs/SourceRange.h: Removed.
3108         * bindings/js/StringSourceProvider.h:
3109         * bridge/NP_jsobject.cpp:
3110
3111 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
3112
3113         Reviewed by Darin Adler.
3114
3115         Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
3116         <https://bugs.webkit.org/show_bug.cgi?id=22019>
3117
3118         * WebCore.base.exp:
3119         * page/Console.cpp:
3120         (WebCore::printToStandardOut):
3121         (WebCore::Console::shouldPrintExceptions):
3122         (WebCore::Console::setShouldPrintExceptions):
3123         * page/Console.h:
3124
3125 2008-10-31  Dan Bernstein  <mitz@apple.com>
3126
3127         Reviewed by John Sullivan.
3128
3129         - WebCore part of <rdar://problem/6334641> Add WebView SPI for disabling document.cookie
3130
3131         * dom/Document.cpp:
3132         (WebCore::Document::cookie): Added checking if cookies are disabled.
3133         (WebCore::Document::setCookie): Ditto.
3134         * page/Navigator.cpp:
3135         (WebCore::Navigator::cookieEnabled): Ditto.
3136         * page/Page.cpp:
3137         (WebCore::Page::Page): Initialize m_cookieEnabled to true.
3138         * page/Page.h:
3139         (WebCore::Page::cookieEnabled): Added.
3140         (WebCore::Page::setCookieEnabled): Added.
3141
3142 2008-10-31  Adele Peterson  <adele@apple.com>
3143
3144         Reviewed by Darin Adler.
3145
3146         WebCore Windows part of fix for <rdar://problem/5839256> FILE CONTROL: multi-file upload.
3147         https://bugs.webkit.org/show_bug.cgi?id=22008
3148
3149         * platform/FileChooser.cpp: (WebCore::FileChooser::chooseIcon): 
3150         Rename newIconForFile and newIconForFiles to createIconForFile and createIconForFiles.
3151         * platform/graphics/Icon.h: ditto.
3152         * platform/graphics/gtk/IconGtk.cpp:
3153         (WebCore::Icon::createIconForFile): ditto.
3154         (WebCore::Icon::createIconForFiles): ditto.
3155         * platform/graphics/mac/IconMac.mm:
3156         (WebCore::Icon::createIconForFile): ditto.
3157         (WebCore::Icon::createIconForFiles): ditto.
3158         * platform/graphics/qt/IconQt.cpp:
3159         (WebCore::Icon::createIconForFile): ditto.
3160         (WebCore::Icon::createIconForFiles): ditto.
3161         * platform/wx/TemporaryLinkStubs.cpp:
3162         (Icon::createIconForFile): ditto.
3163         (Icon::createIconForFiles): ditto.
3164         * platform/graphics/win/IconWin.cpp:
3165         (WebCore::Icon::createIconForFile): ditto.
3166         (WebCore::Icon::createIconForFiles): Add creation of an icon for multiple files.
3167
3168         * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::paintSearchFieldResultsDecoration):        
3169         Improve icon creation code to match new code in Icon::createIconForFiles
3170         
3171 2008-10-31  Timothy Hatcher  <timothy@apple.com>
3172
3173         Add manual tests that check breakpoints on a blockless body of "for" loops.
3174
3175         https://bugs.webkit.org/show_bug.cgi?id=22004
3176
3177         Reviewed by Darin Adler.
3178
3179         * manual-tests/inspector/debugger-pause-on-for-in-statements.html: Added.
3180         * manual-tests/inspector/debugger-pause-on-for-statements.html: Added.
3181
3182 2008-10-31  Darin Adler  <darin@apple.com>
3183
3184         - fix build
3185
3186         * platform/win/WCDataObject.cpp: Added missing include of "config.h".
3187
3188 2008-10-30  Alexey Proskuryakov  <ap@webkit.org>
3189
3190         Reviewed by Darin Adler.
3191
3192         https://bugs.webkit.org/show_bug.cgi?id=21970
3193         Make MessagePort event dispatch work in workers
3194
3195         * bindings/js/JSDOMGlobalObject.cpp:
3196         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
3197         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
3198         (WebCore::JSDOMGlobalObject::findJSEventListener):
3199         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
3200         (WebCore::JSDOMGlobalObject::findJSUnprotectedEventListener):
3201         (WebCore::JSDOMGlobalObject::findOrCreateJSUnprotectedEventListener):
3202         (WebCore::JSDOMGlobalObject::jsEventListeners):
3203         (WebCore::JSDOMGlobalObject::jsInlineEventListeners):
3204         (WebCore::JSDOMGlobalObject::jsUnprotectedEventListeners):
3205         (WebCore::JSDOMGlobalObject::jsUnprotectedInlineEventListeners):
3206         (WebCore::JSDOMGlobalObject::setCurrentEvent):
3207         (WebCore::JSDOMGlobalObject::currentEvent):
3208         (WebCore::toJSDOMGlobalObject):
3209         * bindings/js/JSDOMGlobalObject.h:
3210         * bindings/js/JSDOMWindowBase.cpp:
3211         (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData):
3212         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
3213         (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
3214         * bindings/js/JSDOMWindowBase.h:
3215         Moved event listener tracking from JSDOMWindow to JSDOMGlobalObject.
3216
3217         * bindings/js/JSEventListener.cpp:
3218         (WebCore::JSAbstractEventListener::handleEvent):
3219         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
3220         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
3221         (WebCore::JSUnprotectedEventListener::globalObject):
3222         (WebCore::JSUnprotectedEventListener::clearGlobalObject):
3223         (WebCore::JSEventListener::JSEventListener):
3224         (WebCore::JSEventListener::~JSEventListener):
3225         (WebCore::JSEventListener::globalObject):
3226         (WebCore::JSEventListener::clearGlobalObject):
3227         (WebCore::JSLazyEventListener::JSLazyEventListener):
3228         (WebCore::JSLazyEventListener::parseCode):
3229         * bindings/js/JSEventListener.h:
3230         (WebCore::JSUnprotectedEventListener::create):
3231         (WebCore::JSEventListener::create):
3232         (WebCore::JSLazyEventListener::create):
3233         Changed to use JSDOMGlobalObject and ScriptExecutionContext.
3234
3235         * bindings/js/JSMessagePortCustom.cpp:
3236         (WebCore::JSMessagePort::startConversation):
3237         (WebCore::JSMessagePort::addEventListener):
3238         (WebCore::JSMessagePort::removeEventListener):
3239         (WebCore::JSMessagePort::setOnmessage):
3240         (WebCore::JSMessagePort::setOnclose):
3241         Updated bindings to work with JSDOMGlobalObject. Next step is to make code generator emit
3242         such code, and stop using a custom implementation for JSMessagePort inline event handler
3243         getters and setters.
3244
3245         * dom/Document.cpp:
3246         (WebCore::Document::virtualURL):
3247         * dom/Document.h:
3248         * dom/ScriptExecutionContext.h:
3249         Expose url() method on ScriptExecutionContext (necessary for compiling scripts in
3250         JSLazyEventListener).
3251
3252 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
3253
3254         Not reviewed.
3255
3256         Speculative wxWindows build fix.
3257
3258         * webcore-base.bkl:
3259
3260 2008-10-30  Mark Rowe  <mrowe@apple.com>
3261
3262         Reviewed by Jon Homeycutt.
3263
3264         Explicitly default to building for only the native architecture in debug and release builds.
3265
3266         * Configurations/DebugRelease.xcconfig:
3267
3268 2008-10-30  Cameron Zwarich  <zwarich@apple.com>
3269
3270         Rubber-stamped by Sam Weinig.
3271
3272         Create a debugger directory in JavaScriptCore and move the relevant
3273         files to it.
3274
3275         * ForwardingHeaders/debugger: Added.
3276         * ForwardingHeaders/debugger/Debugger.h: Copied from ForwardingHeaders/kjs/debugger.h.
3277         * ForwardingHeaders/debugger/DebuggerCallFrame.h: Copied from ForwardingHeaders/kjs/DebuggerCallFrame.h.
3278         * ForwardingHeaders/kjs/DebuggerCallFrame.h: Removed.
3279         * ForwardingHeaders/kjs/debugger.h: Removed.
3280         * WebCore.pro:
3281         * bindings/js/ScriptController.cpp:
3282         * inspector/JavaScriptCallFrame.cpp:
3283         * inspector/JavaScriptCallFrame.h:
3284         * inspector/JavaScriptDebugServer.cpp:
3285         * inspector/JavaScriptDebugServer.h:
3286
3287 2008-10-30  Tony Chang <tony@chromium.org>
3288
3289         Fix 2 Windows theme bugs:
3290         1) Checkboxes marked readonly were rendered incorrectly
3291         2) If a button has focus and is pressed, it was rendered
3292            as focused rather than pressed.
3293
3294         https://bugs.webkit.org/show_bug.cgi?id=21859
3295
3296         Reviewed by Dave Hyatt.
3297
3298         * rendering/RenderThemeWin.cpp:
3299         (WebCore::RenderThemeWin::determineState):
3300         (WebCore::RenderThemeWin::determineButtonState):
3301
3302 2008-10-30  Benjamin K. Stuhl  <bks24@cornell.edu>
3303
3304         gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||"
3305         warnings; add some parentheses to disambiguate things. No functional
3306         changes, so no tests.
3307
3308         https://bugs.webkit.org/show_bug.cgi?id=21973
3309         Add parentheses to clean up some gcc warnings
3310
3311         Reviewed by Dan Bernstein.
3312
3313         * platform/graphics/Font.h:
3314         (WebCore::Font::treatAsZeroWidthSpace):
3315
3316 2008-10-30  Aaron Boodman  <aa@chromium.org>
3317
3318         Added an explicit dependency on HashMap.h. It was getting pulled in via
3319         <kjs/identifier.h> in the case of JSC, causing errors for the Chromium port.
3320
3321         Reviewed by Darin Adler.
3322
3323         * platform/text/PlatformString.h:
3324
3325 2008-10-30  Greg Bolsinga  <bolsinga@apple.com>
3326
3327         Reviewed by Sam Weinig
3328
3329         https://bugs.webkit.org/show_bug.cgi?id=21967
3330         
3331         For some platforms the GeolocationService must be suspended and resumed.
3332
3333         * page/Geolocation.cpp:
3334         (WebCore::Geolocation::clearWatch): now uses Geolocation::hasListeners()
3335         (WebCore::Geolocation::suspend): calls GeolocationService::suspend() if there are listeners
3336         (WebCore::Geolocation::resume): calls GeolocationService::resume() if there are listeners
3337         (WebCore::Geolocation::geolocationServicePositionChanged): now uses Geolocation::hasListeners()
3338         * page/Geolocation.h:
3339         (WebCore::Geolocation::hasListeners): Indicates of the Geolocation has interested GeolocationService listeners
3340         * platform/GeolocationService.h:
3341         (WebCore::GeolocationService::suspend): empty implementation
3342         (WebCore::GeolocationService::resume): empty implementation
3343
3344 2008-10-30  Greg Bolsinga  <bolsinga@apple.com>
3345
3346         Reviewed by Sam Weinig
3347
3348         https://bugs.webkit.org/show_bug.cgi?id=21966
3349         
3350         The Geolocation spec was updated on 10/27/2008. This brings WebCore up to date.
3351         http://dev.w3.org/geo/api/spec-source.html
3352
3353         * page/Geolocation.cpp:
3354         (WebCore::Geolocation::GeoNotifier::GeoNotifier): PositionOptions' timeout now unsigned
3355         * page/Geoposition.cpp: velocity is now called speed
3356         (WebCore::Geoposition::toString):
3357         * page/Geoposition.h: velocity is now called speed
3358         (WebCore::Geoposition::create):
3359         (WebCore::Geoposition::speed):
3360         (WebCore::Geoposition::Geoposition):
3361         * page/Geoposition.idl: velocity is now called speed
3362         * page/PositionOptions.h: timeout is now unsigned
3363         (WebCore::PositionOptions::create):
3364         (WebCore::PositionOptions::timeout):
3365         (WebCore::PositionOptions::setTimeout):
3366         (WebCore::PositionOptions::PositionOptions):
3367         * page/PositionOptions.idl: timeout is now unsigned long
3368
3369 2008-10-30  Justin Garcia  <justin.garcia@apple.com>
3370
3371         Also handle preserved newlines.
3372
3373         * editing/BreakBlockquoteCommand.cpp:
3374         (WebCore::BreakBlockquoteCommand::doApply):
3375
3376 2008-10-30  Justin Garcia  <justin.garcia@apple.com>
3377
3378         Reviewed by Beth Dakin.
3379
3380         <rdar://problem/6104369> Hitting return at the end of a quoted line creates an extraneous quoted line
3381
3382         * editing/BreakBlockquoteCommand.cpp:
3383         (WebCore::BreakBlockquoteCommand::doApply): 
3384         Don't store the endingSelection() in selection, just call endingSelection() in the few places it's 
3385         needed.  This function is cheap since it just returns a reference to a Selection instead of creating one.
3386         Don't store an affinity.  In the one place that it was used, isLastVisiblePositionInNode(VisiblePosition(pos, affinity), topBlockquote),
3387         we now use visiblePos (in order to avoid VisiblePosition creation).
3388         Set pos after we delete the current selection (if there is one), and be consistent about what we set 
3389         pos to.  Before, we upstream()ed it if there was a selection to delete and left it alone otherwise.  In fact...
3390         ...we need to use downstream() for pos so that when a caret is at the boundary between two nodes, pos is 
3391         in the first node that we want to move.  This fixes the bug, since it lets code that checks for the case 
3392         where the caret is between text and a br work correctly.
3393
3394 2008-10-30  Yael Aharon  <yael.aharon@nokia.com>
3395
3396         Reviewed by Darin Adler.
3397
3398         Fix the Qt build.
3399
3400         https://bugs.webkit.org/show_bug.cgi?id=21969
3401
3402         * inspector/front-end/WebKit.qrc:
3403         * platform/graphics/qt/ImageBufferQt.cpp:
3404         (WebCore::ImageBufferData::ImageBufferData):
3405         (WebCore::ImageBuffer::ImageBuffer):
3406         (WebCore::ImageBuffer::context):
3407         (WebCore::ImageBuffer::image):
3408         (WebCore::ImageBuffer::toDataURL):
3409
3410 2008-10-30  Justin Garcia  <justin.garcia@apple.com>
3411
3412         Reviewed by Darin Adler.
3413
3414         More preparation for:
3415         <rdar://problem/6104369> Hitting return at the end of a quoted line creates an extraneous quoted line
3416
3417         * editing/BreakBlockquoteCommand.cpp:
3418         (WebCore::BreakBlockquoteCommand::doApply): Added comments.  Don't need to use newStartNode.  If the 
3419         startNode needs to change, change it.  Afterwords, check to make sure that it hasn't left topBlockquote.  
3420         This is slightly stricter than before, where we just made sure that it still had a topBlockquote.  This 
3421         doesn't really fix a bug, since we can't really get into a situation where we move to a different 
3422         topBlockquote, but it simplifies the code.
3423
3424 2008-10-30  Dirk Schulze  <vbs85@gmx.de>
3425
3426         Reviewed by Alp Toker.
3427
3428         https://bugs.webkit.org/show_bug.cgi?id=21883
3429         [CAIRO] globalAlpha has to be stored and restored
3430
3431         Cairo's globalAlpha has to be stored and reloaded on calling
3432         save() and restore(). We use the power of GraphicsContextState for this.
3433
3434         * platform/graphics/GraphicsContextPrivate.h:
3435         (WebCore::GraphicsContextState::GraphicsContextState):
3436         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3437         (WebCore::GraphicsContext::fillPath):
3438         (WebCore::GraphicsContext::strokePath):
3439         (WebCore::GraphicsContext::setAlpha):
3440         (WebCore::GraphicsContext::getAlpha):
3441         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3442         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3443
3444 2008-10-29  Alexey Proskuryakov  <ap@webkit.org>
3445
3446         Reviewed by Maciej Stachowiak.
3447
3448         Rename "attachedToEventTargetNode" to "isInline".
3449
3450         Inline (onXXX) attributes are used not just with event target nodes, but also with Window,
3451         XMLHttpRequest, MessagePort et al.
3452
3453         Also renamed createHTMLEventHandler() (which was a leftover from earlier isHTMLEvent ->
3454         attachedToEventTargetNode rename made for SVG) to createInlineEventListener().
3455         And also renamed EventTargetNode, Document and Window "eventListenerForType" methods to
3456         "inlineEventListenerForType", as they work with inline listeners.
3457
3458         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3459         (WebCore::JSDOMApplicationCache::addEventListener):
3460         (WebCore::JSDOMApplicationCache::removeEventListener):
3461         * bindings/js/JSMessagePortCustom.cpp:
3462         (WebCore::JSMessagePort::setOnmessage):
3463         (WebCore::JSMessagePort::setOnclose):
3464         * bindings/js/JSXMLHttpRequestCustom.cpp:
3465         (WebCore::JSXMLHttpRequest::addEventListener):
3466         (WebCore::JSXMLHttpRequest::removeEventListener):
3467         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3468         (WebCore::JSXMLHttpRequestUpload::addEventListener):
3469         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
3470         Pass a correct value for this argument - callers used to be confused, because they didn't
3471         consider themselves event target nodes. This doesn't affect behavior however, as the only
3472         difference between inline and non-inline event handlers is that the former treat
3473         "return false" as "event.preventDefault()", which is not important to any of these objects.
3474
3475         * bindings/js/JSEventListener.cpp: (WebCore::JSLazyEventListener::parseCode):
3476         Assert that isInline is true instead of checking its value, as the constructor of this class
3477         always sets it to true.
3478
3479         * bindings/js/JSDOMWindowBase.cpp:
3480         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
3481         (WebCore::JSDOMWindowBase::findJSEventListener):
3482         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
3483         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
3484         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
3485         (WebCore::JSDOMWindowBase::jsInlineEventListeners):
3486         (WebCore::JSDOMWindowBase::jsUnprotectedInlineEventListeners):
3487         * bindings/js/JSDOMWindowBase.h:
3488         * bindings/js/JSEventListener.cpp:
3489         (WebCore::JSAbstractEventListener::handleEvent):
3490         (WebCore::JSAbstractEventListener::isInline):
3491         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
3492         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
3493         (WebCore::JSEventListener::JSEventListener):
3494         (WebCore::JSEventListener::~JSEventListener):
3495         (WebCore::JSLazyEventListener::parseCode):
3496         * bindings/js/JSEventListener.h:
3497         (WebCore::JSAbstractEventListener::JSAbstractEventListener):
3498         (WebCore::JSUnprotectedEventListener::create):
3499         (WebCore::JSEventListener::create):
3500         * bindings/js/ScriptController.cpp:
3501         (WebCore::ScriptController::createInlineEventHandler):
3502         * bindings/js/ScriptController.h:
3503         * dom/Document.cpp:
3504         (WebCore::Document::setWindowInlineEventListenerForType):
3505         (WebCore::Document::windowInlineEventListenerForType):
3506         (WebCore::Document::removeWindowInlineEventListenerForType):
3507         (WebCore::Document::createEventListener):
3508         (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute):
3509         * dom/Document.h:
3510         * dom/EventListener.h:
3511         (WebCore::EventListener::isInline):
3512         * dom/EventTargetNode.cpp:
3513         (WebCore::EventTargetNode::removeInlineEventListenerForType):
3514         (WebCore::EventTargetNode::setInlineEventListenerForType):
3515         (WebCore::EventTargetNode::setInlineEventListenerForTypeAndAttribute):
3516         (WebCore::EventTargetNode::inlineEventListenerForType):
3517         (WebCore::EventTargetNode::on*): (many methods)
3518         (WebCore::EventTargetNode::setOn*): (many methods)
3519         * dom/EventTargetNode.h:
3520         * editing/ReplaceSelectionCommand.cpp:
3521         (WebCore::ReplacementFragment::ReplacementFragment):
3522         * html/HTMLBodyElement.cpp:
3523         (WebCore::HTMLBodyElement::parseMappedAttribute):
3524         * html/HTMLButtonElement.cpp:
3525         (WebCore::HTMLButtonElement::parseMappedAttribute):
3526         * html/HTMLElement.cpp:
3527         (WebCore::HTMLElement::parseMappedAttribute):
3528         * html/HTMLFormElement.cpp:
3529         (WebCore::HTMLFormElement::parseMappedAttribute):
3530         * html/HTMLFrameElementBase.cpp:
3531         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
3532         * html/HTMLFrameSetElement.cpp:
3533         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
3534         * html/HTMLImageElement.cpp:
3535         (WebCore::HTMLImageElement::parseMappedAttribute):
3536         * html/HTMLInputElement.cpp:
3537         (WebCore::HTMLInputElement::parseMappedAttribute):
3538         * html/HTMLObjectElement.cpp:
3539         (WebCore::HTMLObjectElement::parseMappedAttribute):
3540         * html/HTMLScriptElement.cpp:
3541         (WebCore::HTMLScriptElement::parseMappedAttribute):
3542         * html/HTMLSelectElement.cpp:
3543         (WebCore::HTMLSelectElement::parseMappedAttribute):
3544         * html/HTMLTextAreaElement.cpp:
3545         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
3546         * page/AccessibilityRenderObject.cpp:
3547         (WebCore::AccessibilityRenderObject::mouseButtonListener):
3548         * page/DOMWindow.cpp:
3549         (WebCore::DOMWindow::setInlineEventListenerForType):
3550         (WebCore::DOMWindow::inlineEventListenerForType):
3551         (WebCore::DOMWindow::on*): (many methods)
3552         (WebCore::DOMWindow::setOn*): (many methods)
3553         * page/DOMWindow.h:
3554         * svg/SVGElement.cpp:
3555         (WebCore::SVGElement::parseMappedAttribute):
3556         * svg/SVGElementInstance.cpp:
3557         (WebCore::SVGElementInstance::on*): (many methods)
3558         (WebCore::SVGElementInstance::setOn*): (many methods)
3559         * svg/SVGSVGElement.cpp:
3560         (WebCore::SVGSVGElement::parseMappedAttribute):
3561         Rename things, as described above.
3562
3563 2008-10-29  Gustavo Noronha Silva  <gns@gnome.org>
3564
3565         Reviewed and slightly changed by Holger Freyther.
3566
3567         Added all the files that need to be installed for the Inspector to
3568         work.
3569
3570         * GNUmakefile.am: Invoke the shell to get the files.
3571
3572 2008-10-29  Andrew Scherkus  <scherkus@chromium.org>
3573
3574         Reviewed by Darin Adler
3575
3576         Add MediaPlayerPrivateChromium to MediaPlayer
3577         https://bugs.webkit.org/show_bug.cgi?id=21930
3578
3579         * platform/graphics/MediaPlayer.cpp:
3580
3581 2008-10-29  Justin Garcia  <justin.garcia@apple.com>
3582
3583         Reviewed by Darin Adler.
3584
3585         Some preparation for:
3586         <rdar://problem/6104369> Hitting return at the end of a quoted line creates an extraneous quoted line
3587         
3588         Added an early return to avoid a level of if-nesting.  No other changes.  We probably don't
3589         need to rebalance whitespace before the early return but for now don't risk any change in behavior
3590         I'll revisit that later.
3591
3592         * editing/BreakBlockquoteCommand.cpp:
3593         (WebCore::BreakBlockquoteCommand::doApply):
3594
3595 2008-10-29  Kevin Ollivier  <kevino@theolliviers.com>
3596
3597         wx build fixes after addition of runtime and ImageBuffer changes.
3598         
3599         * platform/graphics/wx/ImageBufferData.h: Added.
3600         * platform/graphics/wx/ImageBufferWx.cpp:
3601         (WebCore::ImageBufferData::ImageBufferData):
3602         (WebCore::ImageBuffer::ImageBuffer):
3603         (WebCore::ImageBuffer::context):
3604         * webcore-base.bkl:
3605
3606 2008-10-29  Brett Wilson  <brettw@chromium.org>
3607
3608         Reviewed by Darin Adler
3609         https://bugs.webkit.org/attachment.cgi?id=24745
3610
3611         Allow Skia implementations to get text style changed notifications.
3612
3613         * platform/graphics/GraphicsContext.cpp:
3614
3615 2008-10-29  Timothy Hatcher  <timothy@apple.com>
3616
3617         Add a manual test that checks breakpoints on a blockless body of
3618         an "else" statement.
3619
3620         https://bugs.webkit.org/show_bug.cgi?id=21944
3621
3622         Reviewed by Maciej Stachowiak.
3623
3624         * manual-tests/inspector/debugger-pause-on-else-statements.html: Added.
3625
3626 2008-10-29  Alexey Proskuryakov  <ap@webkit.org>
3627
3628         Reviewed by Darin Adler.
3629
3630         https://bugs.webkit.org/show_bug.cgi?id=21921
3631         MessagePort messages are dispatched to documents that are not fully active
3632
3633         Covered by corrected fast/events/message-port-inactive-document.html
3634
3635         * bindings/js/JSEventListener.cpp:
3636         (WebCore::JSAbstractEventListener::handleEvent): Don't dispatch messages to contexts
3637         that are not fully active.
3638
3639 2008-10-29  Alexey Proskuryakov  <ap@webkit.org>
3640
3641         Reviewed by Sam Weinig.
3642
3643         https://bugs.webkit.org/show_bug.cgi?id=21922
3644         Expose MessagePort global constructor
3645
3646         Covered by existing dumper tests.
3647
3648         * dom/MessagePort.idl:
3649         * page/DOMWindow.idl:
3650
3651 2008-10-29  Alexey Proskuryakov  <ap@webkit.org>
3652
3653         Reviewed by Darin Adler.
3654
3655         https://bugs.webkit.org/show_bug.cgi?id=21924
3656         HashTable internal index is not always deleted
3657
3658         * bindings/js/JSDOMBinding.cpp: (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
3659         Call deleteTable for HashTables that are being deleted.
3660
3661 2008-10-28  Alexey Proskuryakov  <ap@webkit.org>
3662
3663         Reviewed by Darin Adler.
3664
3665         https://bugs.webkit.org/show_bug.cgi?id=21923
3666         Create an abstraction for script execution context
3667
3668         * GNUmakefile.am:
3669         * WebCore.pro:
3670         * WebCore.vcproj/WebCore.vcproj:
3671         * WebCore.xcodeproj/project.pbxproj:
3672         * WebCoreSources.bkl:
3673         Added ScriptExecutionContext.{h,cpp}.
3674
3675         * bindings/js/JSAudioConstructor.cpp:
3676         (WebCore::JSAudioConstructor::JSAudioConstructor):
3677         * bindings/js/JSAudioConstructor.h:
3678         * bindings/js/JSImageConstructor.cpp:
3679         (WebCore::JSImageConstructor::JSImageConstructor):
3680         * bindings/js/JSImageConstructor.h:
3681         * bindings/js/JSOptionConstructor.cpp:
3682         (WebCore::JSOptionConstructor::JSOptionConstructor):
3683         * bindings/js/JSOptionConstructor.h:
3684         * bindings/js/JSXMLHttpRequestConstructor.cpp:
3685         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3686         * bindings/js/JSXMLHttpRequestConstructor.h:
3687         Pass ScriptExecutionContext instead of Document to make getDOMConstructor() happy.
3688         Since these objects can only work within documents now, it is immediately converted back
3689         to Document.
3690
3691         * bindings/js/JSMessageChannelConstructor.cpp:
3692         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
3693         (WebCore::JSMessageChannelConstructor::construct):
3694         * bindings/js/JSMessageChannelConstructor.h:
3695         (WebCore::JSMessageChannelConstructor::scriptExecutionContext):
3696         MessageChannel needs to be supported in workers right away, so the constructor operates with
3697         it directly.
3698
3699         * dom/ActiveDOMObject.cpp:
3700         (WebCore::ActiveDOMObject::ActiveDOMObject):
3701         (WebCore::ActiveDOMObject::~ActiveDOMObject):
3702         (WebCore::ActiveDOMObject::contextDestroyed):
3703         * dom/ActiveDOMObject.h:
3704         (WebCore::ActiveDOMObject::scriptExecutionContext):
3705         * bindings/js/JSDOMBinding.cpp:
3706         (WebCore::markActiveObjectsForContext):
3707         (WebCore::markCrossHeapDependentObjectsForContext):
3708         Use ScriptExecutionContext instead of Document, now that ActiveDOMObject and MessagePort
3709         tracking is handled by ScriptExecutionContext.
3710
3711         * bindings/js/JSDOMBinding.h: (WebCore::getDOMPrototype): Moved to JSDOMGlobalObject.
3712
3713         * bindings/js/JSDOMGlobalObject.h:
3714         (WebCore::getDOMConstructor): Moved to this file, as constructors live in JSDOMGlobalObject.
3715         Also, the two-argument version that used to be in JSDOMWindowBase.cpp need to be accessible
3716         to worker context implementation.
3717         (WebCore::scriptExecutionContext): Added a pure virtual method to access
3718         ScriptExecutionContext, implemented by subclasses.
3719
3720         * bindings/js/JSDOMWindowBase.h:
3721         * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::scriptExecutionContext):
3722         Implement by returning the associated document. Note that this method currently gives bogus
3723         results after navigation - DOMWindow Frame reference is not zeroed out, so we get a document
3724         that is currently in the frame, not the one associated with this window.
3725
3726         * bindings/js/JSDedicatedWorkerConstructor.cpp: Removed unnecessary include of DOMWindow.h.
3727
3728         * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark):
3729         Call markActiveObjectsForContext() by its new name.
3730
3731         * dom/DedicatedWorker.cpp:
3732         (WebCore::DedicatedWorker::DedicatedWorker):
3733         (WebCore::DedicatedWorker::document):
3734         * dom/DedicatedWorker.h:
3735         * xml/XMLHttpRequest.cpp:
3736         (WebCore::XMLHttpRequest::document):
3737         * xml/XMLHttpRequest.h:
3738         Added a document() function that upcasts ScriptExecutionContext, as these objects only work
3739         within documents currently (at least for XMLHttpRequest, this will change soon though).
3740
3741         * dom/Document.cpp:
3742         (WebCore::Document::Document):
3743         (WebCore::Document::~Document):
3744         Moved active object and MessagePort tracking up to ScriptExecutionContext, to share code
3745         with workers.
3746         
3747         * dom/Document.h:
3748         (WebCore::Document::isDocument):
3749         (WebCore::Document::refScriptExecutionContext):
3750         (WebCore::Document::derefScriptExecutionContext):
3751         Inherit from ScriptExecutionContext.
3752
3753         * dom/MessageChannel.cpp:
3754         (WebCore::MessageChannel::MessageChannel):
3755         * dom/MessageChannel.h:
3756         (WebCore::MessageChannel::create):
3757         Use ScriptExecutionContext instead of Document.
3758
3759         * dom/MessagePort.cpp:
3760         (WebCore::CloseMessagePortTimer::CloseMessagePortTimer): Make m_port a RefPtr, because
3761         MessagePort doesn't ref() itself when posting this event any more (this is a fix for an
3762         unrelated issue that was causing random crashes in layout tests).
3763         (WebCore::MessagePort::MessagePort):
3764         (WebCore::MessagePort::~MessagePort):
3765         (WebCore::MessagePort::associatedFrame):
3766         (WebCore::MessagePort::clone):
3767         (WebCore::MessagePort::postMessage):
3768         (WebCore::MessagePort::startConversation):
3769         (WebCore::MessagePort::start):
3770         (WebCore::MessagePort::contextDestroyed):
3771         (WebCore::MessagePort::dispatchMessages):
3772         * dom/MessagePort.h:
3773         (WebCore::MessagePort::create):
3774         (WebCore::MessagePort::scriptExecutionContext):
3775         Use ScriptExecutionContext instead of Document. This is a step toward making MessagePort
3776         work in worker contexts - we need to also make some its method thread safe for cross-thread
3777         messaging, and make event dispatching thread safe.
3778
3779         * dom/ScriptExecutionContext.cpp: Added.
3780         * dom/ScriptExecutionContext.h: Added.
3781         ActiveDOMObject and MessagePort tracking is moved from Document.
3782         It is debatable whether ScriptExecutionContext should be a parent of Document or DOMWindow,
3783         but as I'm just moving Document code, and it is Document that is the main context object
3784         in our implementation currently.
3785         Changing ScriptExecutionContext to be a parent of DOMWindow causes a number of bugs that
3786         seem non-trivial to fix, and isn't really a part of this task.
3787
3788 2008-10-28  Alp Toker  <alp@nuanti.com>
3789
3790         List newly-added ImageBufferData.h in build system.
3791
3792         * GNUmakefile.am:
3793
3794 2008-10-28  Alp Toker  <alp@nuanti.com>
3795
3796         Reviewed by Cameron Zwarich.
3797
3798         De-list unused WebCore ForwardingHeaders to fix the dist target.
3799
3800         * GNUmakefile.am:
3801
3802 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
3803
3804         Not reviewed.
3805
3806         Attempt to fix the Windows build by generating Forwardingheaders for the
3807         runtime directory in JavaScriptCore.
3808
3809         * WebCore.vcproj/WebCore.vcproj:
3810
3811 2008-10-28  Justin Garcia  <justin.garcia@apple.com>
3812
3813         Reviewed by Darin Adler.
3814
3815         <rdar://problem/5188560> REGRESSION: Spell checker doesn't clear spelling/grammar marker after error is marked as Ignored
3816
3817         * editing/Editor.cpp:
3818         (WebCore::Editor::ignoreSpelling): Remove misspelling markers from the word.
3819         (WebCore::Editor::learnSpelling): Added a FIXME about <rdar://problem/5396072>, which 
3820         will probably require a change more complicated than just marking the learned word as 
3821         misspelled.  I'll address it with a separate patch.
3822         * editing/EditorCommand.cpp:
3823         (WebCore::executeIgnoreSpelling): Added.
3824         (WebCore::CommandEntry::): Added an entry for IgnoreSpelling.
3825
3826 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
3827
3828         Reviewed by Mark Rowe.
3829
3830         Move ForwardingHeaders to their correct location after the creation of
3831         the runtime directory in JavaScriptCore.
3832
3833         * ForwardingHeaders/kjs/ArrayPrototype.h: Removed.
3834         * ForwardingHeaders/kjs/BooleanObject.h: Removed.
3835         * ForwardingHeaders/kjs/CallData.h: Removed.
3836         * ForwardingHeaders/kjs/ConstructData.h: Removed.
3837         * ForwardingHeaders/kjs/DateInstance.h: Removed.
3838         * ForwardingHeaders/kjs/Error.h: Removed.
3839         * ForwardingHeaders/kjs/FunctionConstructor.h: Removed.
3840         * ForwardingHeaders/kjs/FunctionPrototype.h: Removed.
3841         * ForwardingHeaders/kjs/InternalFunction.h: Removed.
3842         * ForwardingHeaders/kjs/JSArray.h: Removed.
3843         * ForwardingHeaders/kjs/JSFunction.h: Removed.
3844         * ForwardingHeaders/kjs/JSGlobalObject.h: Removed.
3845         * ForwardingHeaders/kjs/JSNumberCell.h: Removed.
3846         * ForwardingHeaders/kjs/JSObject.h: Removed.
3847         * ForwardingHeaders/kjs/JSString.h: Removed.
3848         * ForwardingHeaders/kjs/JSValue.h: Removed.
3849         * ForwardingHeaders/kjs/ObjectPrototype.h: Removed.
3850         * ForwardingHeaders/kjs/PropertyMap.h: Removed.
3851         * ForwardingHeaders/kjs/PrototypeFunction.h: Removed.
3852         * ForwardingHeaders/kjs/StringObject.h: Removed.
3853         * ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h: Removed.
3854         * ForwardingHeaders/kjs/StringPrototype.h: Removed.
3855         * ForwardingHeaders/kjs/StructureID.h: Removed.
3856         * ForwardingHeaders/runtime: Added.
3857         * ForwardingHeaders/runtime/ArrayPrototype.h: Copied from ForwardingHeaders/kjs/ArrayPrototype.h.
3858         * ForwardingHeaders/runtime/BooleanObject.h: Copied from ForwardingHeaders/kjs/BooleanObject.h.
3859         * ForwardingHeaders/runtime/CallData.h: Copied from ForwardingHeaders/kjs/CallData.h.
3860         * ForwardingHeaders/runtime/ConstructData.h: Copied from ForwardingHeaders/kjs/ConstructData.h.
3861         * ForwardingHeaders/runtime/DateInstance.h: Copied from ForwardingHeaders/kjs/DateInstance.h.
3862         * ForwardingHeaders/runtime/Error.h: Copied from ForwardingHeaders/kjs/Error.h.
3863         * ForwardingHeaders/runtime/FunctionConstructor.h: Copied from ForwardingHeaders/kjs/FunctionConstructor.h.
3864         * ForwardingHeaders/runtime/FunctionPrototype.h: Copied from ForwardingHeaders/kjs/FunctionPrototype.h.
3865         * ForwardingHeaders/runtime/InternalFunction.h: Copied from ForwardingHeaders/kjs/InternalFunction.h.
3866         * ForwardingHeaders/runtime/JSArray.h: Copied from ForwardingHeaders/kjs/JSArray.h.
3867         * ForwardingHeaders/runtime/JSFunction.h: Copied from ForwardingHeaders/kjs/JSFunction.h.
3868         * ForwardingHeaders/runtime/JSGlobalObject.h: Copied from ForwardingHeaders/kjs/JSGlobalObject.h.
3869         * ForwardingHeaders/runtime/JSNumberCell.h: Copied from ForwardingHeaders/kjs/JSNumberCell.h.
3870         * ForwardingHeaders/runtime/JSObject.h: Copied from ForwardingHeaders/kjs/JSObject.h.
3871         * ForwardingHeaders/runtime/JSString.h: Copied from ForwardingHeaders/kjs/JSString.h.
3872         * ForwardingHeaders/runtime/JSValue.h: Copied from ForwardingHeaders/kjs/JSValue.h.
3873         * ForwardingHeaders/runtime/ObjectPrototype.h: Copied from ForwardingHeaders/kjs/ObjectPrototype.h.
3874         * ForwardingHeaders/runtime/PropertyMap.h: Copied from ForwardingHeaders/kjs/PropertyMap.h.
3875         * ForwardingHeaders/runtime/PrototypeFunction.h: Copied from ForwardingHeaders/kjs/PrototypeFunction.h.
3876         * ForwardingHeaders/runtime/StringObject.h: Copied from ForwardingHeaders/kjs/StringObject.h.
3877         * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h: Copied from ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h.
3878         * ForwardingHeaders/runtime/StringPrototype.h: Copied from ForwardingHeaders/kjs/StringPrototype.h.
3879         * ForwardingHeaders/runtime/StructureID.h: Copied from ForwardingHeaders/kjs/StructureID.h.
3880         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3881         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3882         * bindings/js/JSClipboardCustom.cpp:
3883         * bindings/js/JSConsoleCustom.cpp:
3884         * bindings/js/JSCustomPositionCallback.h:
3885         * bindings/js/JSCustomPositionErrorCallback.h:
3886         * bindings/js/JSCustomSQLStatementCallback.h:
3887         * bindings/js/JSCustomSQLStatementErrorCallback.h:
3888         * bindings/js/JSCustomSQLTransactionErrorCallback.h:
3889         * bindings/js/JSCustomVoidCallback.h:
3890         * bindings/js/JSCustomXPathNSResolver.h:
3891         * bindings/js/JSDOMBinding.cpp:
3892         * bindings/js/JSDOMBinding.h:
3893         * bindings/js/JSDOMGlobalObject.h:
3894         * bindings/js/JSDOMWindowBase.cpp:
3895         * bindings/js/JSDOMWindowCustom.cpp:
3896         * bindings/js/JSDOMWindowShell.cpp:
3897         * bindings/js/JSDatabaseCustom.cpp:
3898         * bindings/js/JSEventListener.cpp:
3899         * bindings/js/JSEventTarget.h:
3900         * bindings/js/JSHTMLDocumentCustom.cpp:
3901         * bindings/js/JSHistoryCustom.cpp:
3902         * bindings/js/JSInspectedObjectWrapper.cpp:
3903         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3904         * bindings/js/JSLocationCustom.cpp:
3905         * bindings/js/JSNodeFilterCondition.h:
3906         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3907         * bindings/js/JSQuarantinedObjectWrapper.h:
3908         * bindings/js/JSXMLHttpRequestCustom.cpp:
3909         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3910         * bindings/objc/WebScriptObject.mm:
3911         * bindings/objc/WebScriptObjectPrivate.h:
3912         * bindings/scripts/CodeGeneratorJS.pm:
3913         * bridge/NP_jsobject.cpp:
3914         * bridge/c/c_instance.cpp:
3915         * bridge/c/c_utility.cpp:
3916         * bridge/c/c_utility.h:
3917         * bridge/jni/jni_instance.cpp:
3918         * bridge/jni/jni_jsobject.h:
3919         * bridge/jni/jni_jsobject.mm:
3920         * bridge/jni/jni_runtime.cpp:
3921         * bridge/jni/jni_utility.cpp:
3922         * bridge/jni/jni_utility.h:
3923         * bridge/objc/objc_instance.mm:
3924         * bridge/objc/objc_runtime.h:
3925         * bridge/objc/objc_runtime.mm:
3926         * bridge/objc/objc_utility.h:
3927         * bridge/objc/objc_utility.mm:
3928         * bridge/runtime.h:
3929         * bridge/runtime_array.cpp:
3930         * bridge/runtime_array.h:
3931         * bridge/runtime_method.cpp:
3932         * bridge/runtime_method.h:
3933         * bridge/runtime_object.cpp:
3934         * bridge/runtime_object.h:
3935         * bridge/runtime_root.cpp:
3936         * inspector/JavaScriptCallFrame.cpp:
3937         * inspector/JavaScriptProfile.cpp:
3938         * inspector/JavaScriptProfile.h:
3939         * inspector/JavaScriptProfileNode.cpp:
3940         * inspector/JavaScriptProfileNode.h:
3941         * loader/FrameLoader.cpp:
3942         * page/Console.cpp:
3943         * plugins/PluginView.cpp:
3944         * plugins/gtk/PluginViewGtk.cpp:
3945         * plugins/qt/PluginViewQt.cpp:
3946         * plugins/win/PluginViewWin.cpp:
3947
3948 2008-10-28  Adele Peterson  <adele@apple.com>
3949
3950         Windows build fix.  This removes Cairo include directories from non-Cairbo build configurations.
3951
3952         * WebCore.vcproj/WebCore.vcproj:
3953
3954 2008-10-28  Adele Peterson  <adele@apple.com>
3955
3956         Windows build fix.
3957
3958         * platform/graphics/ImageBuffer.h:
3959         (WebCore::ImageBuffer::create):
3960
3961 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
3962
3963         Not reviewed.
3964
3965         Roll out a mistaken attempt at fixing the GTK build in r37947.
3966
3967         * GNUmakefile.am:
3968
3969 2008-10-28  Adele Peterson  <adele@apple.com>
3970
3971         Reviewed by John Sullivan.
3972
3973         Fix for https://bugs.webkit.org/show_bug.cgi?id=21880
3974         "files" string for multifile uploads needs to be localized
3975
3976         * page/mac/WebCoreViewFactory.h:
3977         * platform/LocalizedStrings.h:
3978         * platform/gtk/FileChooserGtk.cpp: (WebCore::FileChooser::basenameForWidth):
3979         * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::multipleFileUploadText):
3980         * platform/mac/FileChooserMac.mm: (WebCore::FileChooser::basenameForWidth):
3981         * platform/mac/LocalizedStringsMac.mm: (WebCore::multipleFileUploadText):
3982         * platform/qt/Localizations.cpp: (WebCore::multipleFileUploadText):
3983         * platform/wx/LocalizedStringsWx.cpp: (WebCore::multipleFileUploadText):
3984
3985 2008-10-28  Brett Wilson  <brettw@chromium.org>
3986
3987         Reviewed by Darin Adler.
3988
3989         https://bugs.webkit.org/show_bug.cgi?id=21816
3990
3991         Remove platform ifdefs in ImageBuffer.h by moving platform specific code
3992         into a new PlatformImageBuffer class. Move the static create function
3993         into the header because it can be cross-platform. Initialization now
3994         happens in the cunstructor which sets a flag that create uses to know
3995         whether it should return null or not. I also made passing of IntSize
3996         more consistent (always by reference).
3997
3998         This change also changes the ifdefs in GraphicsContext to allow Skia
3999         ports to implement text drawing modes.
4000
4001         * platform/graphics/ImageBuffer.h:
4002         (WebCore::ImageBuffer::create):
4003         (WebCore::ImageBuffer::size):
4004         * platform/graphics/cairo/ImageBufferCairo.cpp:
4005         (WebCore::ImageBufferData::ImageBufferData):
4006         (WebCore::ImageBuffer::ImageBuffer):
4007         (WebCore::ImageBuffer::~ImageBuffer):
4008         (WebCore::ImageBuffer::image):
4009         (WebCore::ImageBuffer::getImageData):
4010         (WebCore::ImageBuffer::putImageData):
4011         * platform/graphics/cairo/ImageBufferData.h:
4012         * platform/graphics/cg/ImageBufferCG.cpp:
4013         (WebCore::ImageBufferData::ImageBufferData):
4014         (WebCore::ImageBuffer::ImageBuffer):
4015         (WebCore::ImageBuffer::~ImageBuffer):
4016         (WebCore::ImageBuffer::getImageData):
4017         (WebCore::ImageBuffer::putImageData):
4018         * platform/graphics/cg/ImageBufferData.h:
4019         * platform/graphics/qt/ImageBufferData.h:
4020         * platform/graphics/qt/ImageBufferQt.cpp:
4021         (WebCore::ImageBufferData::ImageBufferData):
4022         (WebCore::ImageBuffer::ImageBuffer):
4023         (WebCore::ImageBuffer::~ImageBuffer):
4024
4025 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
4026
4027         Not reviewed.
4028
4029         Fix the GTK build.
4030
4031         * GNUmakefile.am:
4032
4033 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
4034
4035         Not reviewed.
4036
4037         Another Qt build fix.
4038
4039         * WebCore.pro:
4040
4041 2008-10-28  Greg Bolsinga  <bolsinga@apple.com>
4042
4043         Reviewed by David Kilzer.
4044
4045         https://bugs.webkit.org/show_bug.cgi?id=21932
4046         Add non-pointer constant lookups to SoftLinking.h
4047
4048         * platform/mac/SoftLinking.h:
4049
4050 2008-10-28  Greg Bolsinga  <bolsinga@apple.com>
4051
4052         Reviewed by David Kilzer.
4053
4054         https://bugs.webkit.org/show_bug.cgi?id=2192
4055         Missing semi-colons in Geoposition.idl
4056
4057         * page/Geoposition.idl: Add missing semi-colons
4058
4059 2008-10-28  Timothy Hatcher  <timothy@apple.com>
4060
4061         Make the Profiles panel in the Web Inspector have an enable screen.
4062         Profiling now needs to be enabled before console.profile() works.
4063
4064         <rdar://problem/6211578> Make the JavaScript profiler opt-in, so it does
4065         not slow down JavaScript all the time
4066
4067         Reviewed by Darin Adler and Kevin McCullough.
4068
4069         * English.lproj/localizedStrings.js: New strings.
4070         * WebCore.base.exp: New and changed exports.
4071         * WebCore.vcproj/WebCore.vcproj: Add the PanelEnablerView.js file.
4072         * bindings/js/JSDOMWindowBase.cpp:
4073         (WebCore::JSDOMWindowBase::supportsProfiling): Call InspectorController:profilerEnabled.
4074         * inspector/InspectorController.cpp:
4075         (WebCore::InspectorController::InspectorController): Initialize the m_startProfiling
4076         Timer to call InspectorController::startUserInitiatedProfiling.
4077         (WebCore::InspectorController::startUserInitiatedProfilingSoon): Start a one-shot timer
4078         that calls InspectorController::startUserInitiatedProfiling.
4079         (WebCore::InspectorController::startUserInitiatedProfiling): Recompile all JavaScript
4080         and enable the profiler if the profiler was not enabled.
4081         (WebCore::InspectorController::stopUserInitiatedProfiling): Rearrange code for readability.
4082         (WebCore::InspectorController::enableProfiler): Recompile all the JavaScript functions
4083         if the skipRecompile argument is false. Call the profilerWasEnabled script function.
4084         (WebCore::InspectorController::disableProfiler): Recompile all the JavaScript functions.
4085         Call the profilerWasEnabled script function.
4086         (WebCore::InspectorController::disableDebugger): Set m_attachDebuggerWhenShown to false,
4087         so it won't be started later.
4088         * inspector/InspectorController.h:
4089         (WebCore::InspectorController::profilerEnabled): Return enabled() && m_profilerEnabled.
4090         * inspector/front-end/Images/debuggingButtons.png: Remove.
4091         * inspector/front-end/Images/enableButtons.png: Added.
4092         * inspector/front-end/Images/profilesSilhouette.png: Added.
4093         * inspector/front-end/Images/scriptsSilhouette.png: Added.
4094         * inspector/front-end/PanelEnablerView.js: Added.
4095         (WebInspector.PanelEnablerView):
4096         (WebInspector.PanelEnablerView.prototype._enableButtonCicked): Fire the "enable clicked"
4097         event so listeners can do their thing.
4098         (WebInspector.PanelEnablerView.prototype._windowResized): Test if the icon should be hidden.
4099         * inspector/front-end/ProfilesPanel.js:
4100         (WebInspector.ProfilesPanel): Create the PanelEnablerView and the strings needed for it.
4101         (WebInspector.ProfilesPanel.prototype.get statusBarItems): Include the enableToggleButton.
4102         (WebInspector.ProfilesPanel.prototype.profilerWasEnabled): Call reset and populateInterface.
4103         (WebInspector.ProfilesPanel.prototype.profilerWasDisabled): Call reset.
4104         (WebInspector.ProfilesPanel.prototype.reset): Call _updateInterface.
4105         (WebInspector.ProfilesPanel.prototype.setRecordingProfile): Moved in the code, no changes.
4106         (WebInspector.ProfilesPanel.prototype._updateInterface): Update the toggle button and
4107         show/hide other buttons. Also show/hide the PanelEnablerView.
4108         (WebInspector.ProfilesPanel.prototype._enableProfiling): Call _toggleProfiling if not enabled.
4109         (WebInspector.ProfilesPanel.prototype._toggleProfiling): Call InspectorController's
4110         disableProfiler or enableProfiler.
4111         * inspector/front-end/ScriptsPanel.js:
4112         (WebInspector.ScriptsPanel): Replace the overlay element with a PanelEnablerView. Replace the
4113         debuggingButton with the enableToggleButton.
4114         (WebInspector.ScriptsPanel.prototype.get statusBarItems): Replace the debuggingButton with
4115         the enableToggleButton.
4116         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons): Hide/show the pauseOnExceptionButton
4117         when needed. Replace the overlay element with a PanelEnablerView. Replace the debuggingButton
4118         with the enableToggleButton.
4119         (WebInspector.ScriptsPanel.prototype._enableDebugging): Call _toggleDebugging when not enabled.
4120         (WebInspector.ScriptsPanel.prototype._toggleDebugging): Remove the call to _clearInterface,
4121         since reset is called from debuggerWasEnabled and debuggerWasDisabled.
4122         * inspector/front-end/View.js: Inherit from WebInspector.Object.
4123         * inspector/front-end/WebKit.qrc: Add the PanelEnablerView.js file.
4124         * inspector/front-end/inspector.css: New styles for the PanelEnablerView.
4125         * inspector/front-end/inspector.html: Add the PanelEnablerView.js file.
4126         * inspector/front-end/inspector.js:
4127         (WebInspector.profilerWasEnabled): Added. Calls the ProfilesPanel.
4128         (WebInspector.profilerWasDisabled): Ditto.
4129         * page/Console.cpp:
4130         (WebCore::Console::error): Remove null check for m_frame, since m_frame isn't used.
4131         (WebCore::Console::info): Ditto.
4132         (WebCore::Console::log): Ditto.
4133         (WebCore::Console::assertCondition): Ditto.
4134         (WebCore::Console::dirxml): Remove null check for m_frame and use this->page().
4135         (WebCore::Console::count): Ditto.
4136         (WebCore::Console::profile): Return early if InspectorController::profilerEnabled is false.
4137         (WebCore::Console::profileEnd): Ditto.
4138         (WebCore::Console::warn): Remove null check for m_frame, since m_frame isn't used.
4139         * page/Settings.cpp:
4140         (WebCore::Settings::Settings): Remove initialization of m_didInitializeDeveloperExtrasEnabled.
4141         (WebCore::Settings::setDeveloperExtrasEnabled): Remove code that recompiled functions.
4142         Now just sets the member boolean.
4143         * page/Settings.h: Remove m_didInitializeDeveloperExtrasEnabled.
4144
4145 2008-10-28  Timothy Hatcher  <timothy@apple.com>
4146
4147         Rename a few methods related to attaching and detaching the debugger. Also
4148         adds stub methods for enabling and disabling the profiler.
4149
4150         * Rename attachDebugger to enableDebugger.
4151         * Rename detachDebugger to disableDebugger.
4152         * Rename the debuggerAttached getter to debuggerEnabled.
4153         * Rename the debuggerAttached callback to debuggerWasEnabled.
4154         * Rename the debuggerDetached callback to debuggerWasDisabled.
4155
4156         Reviewed by Darin Adler.
4157
4158         * WebCore.base.exp:
4159         * inspector/InspectorController.cpp:
4160         (WebCore::InspectorController::InspectorController):
4161         (WebCore::InspectorController::setWindowVisible):
4162         (WebCore::InspectorController::windowScriptObjectAvailable):
4163         (WebCore::InspectorController::close):
4164         (WebCore::InspectorController::enableProfiler):
4165         (WebCore::InspectorController::disableProfiler):
4166         (WebCore::InspectorController::enableDebugger):
4167         (WebCore::InspectorController::disableDebugger):
4168         (WebCore::InspectorController::pauseInDebugger):
4169         (WebCore::InspectorController::resumeDebugger):
4170         (WebCore::InspectorController::stepOverStatementInDebugger):
4171         (WebCore::InspectorController::stepIntoStatementInDebugger):
4172         (WebCore::InspectorController::stepOutOfFunctionInDebugger):
4173         * inspector/InspectorController.h:
4174         (WebCore::InspectorController::profilerEnabled):
4175         (WebCore::InspectorController::debuggerEnabled):
4176         * inspector/front-end/BreakpointsSidebarPane.js:
4177         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
4178         (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
4179         (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
4180         * inspector/front-end/Object.js:
4181         * inspector/front-end/ProfilesPanel.js:
4182         (WebInspector.ProfilesPanel):