2008-12-09 Dmitry Titov <dimich@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-12-09  Dmitry Titov  <dimich@chromium.org>
2
3         Reviewed by Darin Adler.
4
5         Fix memory leak - need to call stopActiveDOMObjects
6         when cached pages get destroyed.
7         https://bugs.webkit.org/show_bug.cgi?id=22753
8
9         * dom/Document.cpp:
10         (WebCore::Document::detach):
11
12 2008-12-10  Alice Liu  <alice.liu@apple.com>
13
14         Manual test for https://bugs.webkit.org/show_bug.cgi?id=20685
15
16         Reviewed by Darin Adler.
17
18         * manual-tests/drag-image-to-desktop.html: Added.
19
20 2008-12-10  Alice Liu  <alice.liu@apple.com>
21
22         fixed https://bugs.webkit.org/show_bug.cgi?id=20685
23
24         Reviewed by Darin Adler.
25
26         Manual test case is manual-tests/drag-image-to-desktop.html
27
28         Added new files to projects
29         * WebCore.vcproj/WebCore.vcproj:
30         * WebCore.xcodeproj/project.pbxproj:
31
32         * page/DragController.cpp:
33         (WebCore::DragController::startDrag):
34         * platform/MIMETypeRegistry.cpp:
35         (WebCore::initializeSupportedImageMIMETypes):
36         (WebCore::initializeSupportedImageMIMETypesForEncoding):
37
38         These changes add a method to obtain the extension for an image
39         * platform/graphics/BitmapImage.cpp:
40         (WebCore::BitmapImage::filenameExtension):
41         * platform/graphics/BitmapImage.h:
42         * platform/graphics/Image.h:
43         (WebCore::Image::filenameExtension):
44         * platform/graphics/ImageSource.h:
45         * platform/graphics/cairo/ImageSourceCairo.cpp:
46         (WebCore::ImageSource::filenameExtension):
47         * platform/graphics/cg/ImageSourceCG.cpp:
48         (WebCore::ImageSource::filenameExtension):
49
50         These changes added a utility that returns the preferred extension for a UTI
51         * platform/graphics/cg/ImageSourceCG.h: Added.
52         * platform/graphics/cg/ImageSourceCGMac.mm: Added.
53         (WebCore::MIMETypeForImageSourceType):
54         (WebCore::preferredExtensionForImageSourceType):
55         * platform/graphics/cg/ImageSourceCGWin.cpp: Added.
56         (WebCore::MIMETypeForImageSourceType):
57         (WebCore::preferredExtensionForImageSourceType):
58
59         * platform/mac/MIMETypeRegistryMac.mm:
60         moved getMIMETypeForUTI to ImageSourceCGMac.mm
61
62         Ask image for its file extension instead of relying on MIME type and file path
63         * platform/win/ClipboardWin.cpp:
64         (WebCore::createGlobalImageFileDescriptor):
65
66         Remove extraneous code from getPreferredExtensionForMIMEType.
67         Also moved getMIMETypeForUTI to ImageSourceCGWin.cpp
68         * platform/win/MIMETypeRegistryWin.cpp:
69         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
70
71 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
72
73         Reviewed by Antti Koivisto
74
75         <rdar://problem/6431224>
76         
77         When updating the value of a slider, don't mark the parents
78         as needing layout, because the size of the slider can never
79         change. This fixes full-page repaints in some cases.
80
81         * rendering/RenderSlider.cpp:
82         (WebCore::RenderSlider::updateFromElement):
83
84 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
85
86         Potential build fix. The forward declaration of FloatPoint should
87         be inside the WebCore namespace.
88         
89         * platform/graphics/FloatPoint3D.h:
90
91 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
92
93         Reviewed by Sam Weinig
94
95         https://bugs.webkit.org/show_bug.cgi?id=22793
96
97         Cleanup FloatPoint3D: inline the getters and setters,
98         fix a potential divide-by-zero in normalize(), and add
99         a FloatPoint constructor.
100         
101         * platform/graphics/FloatPoint3D.cpp:
102         (WebCore::FloatPoint3D::FloatPoint3D):
103         (WebCore::FloatPoint3D::normalize):
104         * platform/graphics/FloatPoint3D.h:
105         (WebCore::FloatPoint3D::x):
106         (WebCore::FloatPoint3D::setX):
107         (WebCore::FloatPoint3D::y):
108         (WebCore::FloatPoint3D::setY):
109         (WebCore::FloatPoint3D::z):
110         (WebCore::FloatPoint3D::setZ):
111
112 2008-12-09  Julien Chaffraix  <jchaffraix@webkit.org>
113
114         Reviewed by Eric Seidel.
115
116         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
117         https://bugs.webkit.org/show_bug.cgi?id=22665
118
119         - Removed setCreatedByParser from style and link elements.
120
121         - Removed XMLTokenizer::eventuallyMarkAsCreatedByParser.
122
123         * dom/XMLTokenizer.cpp:
124         * dom/XMLTokenizer.h:
125         * dom/XMLTokenizerLibxml2.cpp:
126         (WebCore::XMLTokenizer::startElementNs):
127         * dom/XMLTokenizerQt.cpp:
128         (WebCore::XMLTokenizer::parseStartElement):
129         * html/HTMLElementFactory.cpp:
130         (WebCore::linkConstructor):
131         (WebCore::styleConstructor):
132         * html/HTMLLinkElement.cpp:
133         (WebCore::HTMLLinkElement::HTMLLinkElement):
134         * html/HTMLLinkElement.h:
135         * html/HTMLStyleElement.cpp:
136         (WebCore::HTMLStyleElement::HTMLStyleElement):
137         * html/HTMLStyleElement.h:
138         * html/HTMLTagNames.in:
139         * svg/SVGStyleElement.cpp:
140         (WebCore::SVGStyleElement::SVGStyleElement):
141         * svg/SVGStyleElement.h:
142         * svg/svgtags.in:
143
144 2008-12-10  Brady Eidson  <beidson@apple.com>
145
146         Reviewed by Darin
147
148         https://bugs.webkit.org/show_bug.cgi?id=22194 and <rdar://problem/6388378> -
149         Dialog when going back to a page from whence you submitted a form
150
151         http://trac.webkit.org/changeset/37317 changed the manner in which headers are added to
152         http requests, which caused the networking layer to have an incomplete set of headers
153         just before consulting the Policy Delegate.  This caused a cache miss and incorrectly made
154         us believe we'd be resubmitting the form.
155
156         * loader/FrameLoader.cpp:
157         (WebCore::FrameLoader::loadItem):  Being careful to maintain the new behavior required by
158           the Origin header mechanism as discussed in bug 22194, restore the previous behavior of
159           setting all the headers before the networking layer is asked about the cache lookup.
160
161 2008-12-10  Dimitri Glazkov  <dglazkov@chromium.org>
162
163         Reviewed by Timothy Hatcher.
164
165         Add back ability to end all profiling via console by invoking profileEnd
166         with no arguments.
167
168         * page/Console.cpp:
169         (WebCore::Console::profileEnd): Removed title null-checking and
170             subsequent early exit.
171
172 2008-12-10  Pierre-Olivier Latour  <pol@apple.com>
173
174         Reviewed by Darin Adler.
175
176         KeyframeAnimation::animate() needs to compute the elapsed animation time
177         properly taking into account its paused state.
178
179         https://bugs.webkit.org/show_bug.cgi?id=22773
180
181         Test: animations/animation-drt-api-multiple-keyframes.html
182
183         * page/animation/KeyframeAnimation.cpp:
184         (WebCore::KeyframeAnimation::animate):
185
186 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
187
188         Reviewed by Dan Bernstein
189
190         Part of
191         https://bugs.webkit.org/show_bug.cgi?id=22570
192         
193         Rename methods on RenderLayer for clarity:
194             clearClipRects -> clearClipRectsIncludingDescendants
195             clearClipRect  -> clearClipRects
196
197         * rendering/RenderBox.cpp:
198         (WebCore::RenderBox::destroy):
199         * rendering/RenderLayer.cpp:
200         (WebCore::RenderLayer::updateLayerPosition):
201         (WebCore::RenderLayer::removeOnlyThisLayer):
202         (WebCore::RenderLayer::insertOnlyThisLayer):
203         (WebCore::RenderLayer::clearClipRectsIncludingDescendants):
204         (WebCore::RenderLayer::clearClipRects):
205         * rendering/RenderLayer.h:
206         * rendering/RenderObject.cpp:
207         (WebCore::RenderObject::styleWillChange):
208         * rendering/RenderWidget.cpp:
209         (WebCore::RenderWidget::destroy):
210
211 2008-12-10  Kevin Ollivier  <kevino@theolliviers.com>
212
213         wx build fix after the script call stack/frame additions.
214         
215         * WebCoreSources.bkl:
216
217 2008-12-10   Srinivasa Rao M. Hamse  <msrinirao@gmail.com>
218
219         Reviewed by Holger Freyther.
220
221         F1-F12 key mappings for WebKit Gtk Port
222
223         * platform/gtk/KeyEventGtk.cpp:
224         (WebCore::windowsKeyCodeForKeyEvent):
225
226 2008-12-10  Enrico Ros  <enrico.ros@m31.com>
227
228         Reviewed by Simon Hausmann.
229
230         Fix the Qt build when SVG is disabled. A broken dependancy caused
231         unnecessary rebuilds even with no changes.
232
233         * WebCore.pro: fix a broken build dependancy
234
235 2008-12-10  Hironori Bono  <hbono@chromium.org>
236
237         Reviewed by Alexey Proskuryakov.
238
239         Bug 21820: Unable to enter the Tamil UNICODE Characters via Thamizha Phonetic IME
240         https://bugs.webkit.org/show_bug.cgi?id=21820
241
242         <rdar://problem/5683248> Typing backspace to delete a diacritical mark also deletes the character before (Arabic)
243         <rdar://problem/5702038> Backspace removes Thai Character in wrong sequence
244
245         Tests: editing/deleting/delete-ligature-001.html
246                editing/deleting/delete-ligature-002.html
247                editing/deleting/delete-ligature-003.html
248
249         * editing/TypingCommand.cpp:
250         (WebCore::TypingCommand::deleteKeyPressed): Delete only the last character
251         of a ligature which consists of multiple Unicode characters when deleting it with
252         a backspace key.
253
254 2008-12-10  David Levin  <levin@chromium.org>
255
256         Reviewed by Alexey Proskuryakov.
257
258         https://bugs.webkit.org/show_bug.cgi?id=22177
259         Fix the windows build by removing calls to notifyFormStateChanged
260         where they didn't appear in the original reviewed patch.
261
262         * html/HTMLInputElement.cpp:
263         (WebCore::HTMLInputElement::type):
264         (WebCore::HTMLInputElement::attach):
265
266 2008-12-09  Adam Barth  <abarth@webkit.org>
267
268         Reviewed by Sam Weinig.
269
270         Add ScriptController::updateSecurityOrigin to notify the bindings
271         that a document's securityOrigin has been updated.  This is used by
272         V8 to update its security context.
273
274         * bindings/js/ScriptController.cpp:
275         (WebCore::ScriptController::updateSecurityOrigin):
276         * bindings/js/ScriptController.h:
277         * dom/Document.cpp:
278         (WebCore::Document::setDomain):
279
280 2008-12-09  Eric Seidel  <eric@webkit.org>
281
282         No review, build fix only.
283
284         Fix a few config issues to let the Chromium Windows WebCore build get further.
285
286         * WebCore.scons:
287
288 2008-12-09  Brett Wilson  <brettw@chromium.org>
289
290         Reviewed by Dave Hyatt.
291
292         https://bugs.webkit.org/show_bug.cgi?id=22177
293
294         Add a callback on ChromeClient that the state of form elements on
295         the page has changed. This is to allow clients implementing session
296         saving to know when the current state is dirty.
297
298         * html/HTMLInputElement.cpp:
299         (WebCore::notifyFormStateChanged):
300         (WebCore::HTMLInputElement::setInputType):
301         (WebCore::HTMLInputElement::type):
302         (WebCore::HTMLInputElement::attach):
303         (WebCore::HTMLInputElement::setValue):
304         (WebCore::HTMLInputElement::setValueFromRenderer):
305         (WebCore::HTMLInputElement::setFileListFromRenderer):
306         * html/HTMLSelectElement.cpp:
307         (WebCore::HTMLSelectElement::setSelectedIndex):
308         * html/HTMLTextAreaElement.cpp:
309         (WebCore::notifyFormStateChanged):
310         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
311         (WebCore::HTMLTextAreaElement::updateValue):
312         (WebCore::HTMLTextAreaElement::setValue):
313         * loader/EmptyClients.h:
314         (WebCore::EmptyChromeClient::formStateDidChange):
315         * page/ChromeClient.h:
316
317 2008-12-09  Sam Weinig  <sam@webkit.org>
318
319         Reviewed by Darin Adler.
320
321         https://bugs.webkit.org/show_bug.cgi?id=19762
322
323         Fix intermittent crash in buildbot. The CSSCursorImageValues and
324         SVGCursorElements held onto raw SVGElement pointers without any
325         guarantee that the element is still around.
326
327         We did not fix the design that resulted in this issue, we just fixed
328         the pointer lifetimes.
329
330         * css/CSSCursorImageValue.cpp:
331         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Zero out the back pointers.
332         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Set up a back pointer.
333         (WebCore::CSSCursorImageValue::removeReferencedElement): Added. Used when the element
334         is destroyed.
335         * css/CSSCursorImageValue.h: Added removeReferencedElement.
336
337         * svg/SVGCursorElement.cpp:
338         (WebCore::SVGCursorElement::~SVGCursorElement): Zero out the back pointers.
339         (WebCore::SVGCursorElement::addClient): Set up a back pointer.
340         (WebCore::SVGCursorElement::removeClient): Zero out the back pointer.
341
342         * svg/SVGElement.cpp:
343         (WebCore::SVGElement::SVGElement): Initialize back pointers to zero.
344         (WebCore::SVGElement::~SVGElement): Call both the element and cursor image value
345         to remove the element from their sets.
346         * svg/SVGElement.h:
347         (WebCore::SVGElement::setCursorElement): Added.
348         (WebCore::SVGElement::setCursorImageValue): Added.
349
350 2008-12-09  David Hyatt  <hyatt@apple.com>
351
352         Add code that will create custom CSS scrollbars from the <body>, the document element (<html>) and the owning
353         frame/iframe.  If any of them set a custom style, it will be used.  The scrollbars do not update dynamically
354         yet as you switch from page to page (until they are destroyed and recreated).
355
356         Reviewed by Adele
357
358         * page/FrameView.cpp:
359         (WebCore::FrameView::createScrollbar):
360
361 2008-12-09  Ojan Vafai  <ojan@chromium.org>
362
363         Reviewed by Dave Hyatt.
364
365         https://bugs.webkit.org/show_bug.cgi?id=22689
366         Match Firefox button metrics on Windows.
367
368         * rendering/RenderButton.cpp:
369         (WebCore::RenderButton::addChild):
370         (WebCore::RenderButton::styleDidChange):
371         (WebCore::RenderButton::setupInnerStyle):
372         * rendering/RenderButton.h:
373         * rendering/RenderTheme.cpp:
374         (WebCore::RenderTheme::adjustButtonInnerStyle):
375         * rendering/RenderTheme.h:
376         * rendering/RenderThemeWin.cpp:
377         (WebCore::RenderThemeWin::adjustSliderThumbSize):
378         (WebCore::RenderThemeWin::adjustButtonInnerStyle):
379         * rendering/RenderThemeWin.h:
380
381 2008-12-09  Darin Fisher  <darin@chromium.org>
382
383         Fixes bustages.
384
385         https://bugs.webkit.org/show_bug.cgi?id=22631
386         Adding missing files from previous commit.
387
388         * bindings/js/ScriptCallFrame.cpp: Added.
389         (WebCore::ScriptCallFrame::ScriptCallFrame):
390         (WebCore::ScriptCallFrame::~ScriptCallFrame):
391         (WebCore::ScriptCallFrame::argumentAt):
392         * bindings/js/ScriptCallFrame.h: Added.
393         (WebCore::ScriptCallFrame::functionName):
394         (WebCore::ScriptCallFrame::sourceURL):
395         (WebCore::ScriptCallFrame::lineNumber):
396         (WebCore::ScriptCallFrame::argumentCount):
397         * bindings/js/ScriptCallStack.cpp: Added.
398         (WebCore::ScriptCallStack::ScriptCallStack):
399         (WebCore::ScriptCallStack::~ScriptCallStack):
400         (WebCore::ScriptCallStack::at):
401         (WebCore::ScriptCallStack::size):
402         (WebCore::ScriptCallStack::initialize):
403         * bindings/js/ScriptCallStack.h: Added.
404         (WebCore::ScriptCallStack::state):
405
406 2008-12-09  Dimitri Glazkov  <dglazkov@chromium.org>
407
408         Reviewed by Timothy Hatcher.
409
410         https://bugs.webkit.org/show_bug.cgi?id=22631
411         Streamline Console.cpp, abstract out the use of JSC::ExecState and
412         JSC::ArgList by introducing ScriptCallFrame and ScriptCallStack
413         abstractions.
414
415         * GNUmakefile.am: Added ScriptCallFrame and ScriptCallStack to build
416         * WebCore.pro:  Added ScriptCallFrame and ScriptCallStack to build
417         * WebCore.vcproj/WebCore.vcproj: Added ScriptCallFrame and
418         ScriptCallStack to project
419         * WebCore.xcodeproj/project.pbxproj: Added ScriptCallFrame and
420         ScriptCallStack to project
421         * bindings/js/JSConsoleCustom.cpp: Remove custom bindings.
422         * bindings/js/ScriptCallFrame.cpp: Added.
423         (WebCore::ScriptCallFrame::ScriptCallFrame):
424         (WebCore::ScriptCallFrame::~ScriptCallFrame):
425         (WebCore::ScriptCallFrame::argumentAt):
426         * bindings/js/ScriptCallFrame.h: Added.
427         (WebCore::ScriptCallFrame::functionName):
428         (WebCore::ScriptCallFrame::sourceURL):
429         (WebCore::ScriptCallFrame::lineNumber):
430         (WebCore::ScriptCallFrame::argumentCount):
431         * bindings/js/ScriptCallStack.cpp: Added.
432         (WebCore::ScriptCallStack::ScriptCallStack):
433         (WebCore::ScriptCallStack::~ScriptCallStack):
434         (WebCore::ScriptCallStack::at):
435         (WebCore::ScriptCallStack::size):
436         (WebCore::ScriptCallStack::initialize):
437         * bindings/js/ScriptCallStack.h: Added.
438         (WebCore::ScriptCallStack::ScriptCallStack):
439         (WebCore::ScriptCallStack::~ScriptCallStack):
440         (WebCore::ScriptCallStack::state):
441         (WebCore::ScriptCallStack::at):
442         (WebCore::ScriptCallStack::size):
443         (WebCore::ScriptCallStack::initialize):
444         * bindings/js/ScriptString.h: Added missing PlatformString include.
445         (WebCore::ScriptString::ScriptString): Added default constructor.
446         (WebCore::ScriptString::operator==): Added equality operator.
447         (WebCore::ScriptString::operator!=):
448         * bindings/js/ScriptValue.cpp: Added isNull and isUndefined.
449         (WebCore::ScriptValue::isNull):
450         (WebCore::ScriptValue::isUndefined):
451         * bindings/js/ScriptValue.h: Added isNull and isUndefined
452         * bindings/scripts/CodeGeneratorJS.pm: Add handling for
453         CustomArgumentHandling attribute.
454         * inspector/InspectorController.cpp: Refactored to use 
455         ScriptCallFrame and ScriptCallStack.
456         (WebCore::ConsoleMessage::ConsoleMessage):
457         (WebCore::InspectorController::addMessageToConsole):
458         (WebCore::InspectorController::startGroup):
459         (WebCore::InspectorController::addScriptConsoleMessage):
460         (WebCore::InspectorController::count):
461         (WebCore::InspectorController::startTiming):
462         (WebCore::InspectorController::stopTiming):
463         * inspector/InspectorController.h: Refactored to use ScriptCallFrame and
464         ScriptCallStack.
465         * inspector/front-end/Console.js: Modified to use argument value itself
466         rather than f.name for stack trace.
467         * page/Console.cpp: Refactored to use ScriptCallFrame and
468         ScriptCallStack.
469         (WebCore::getFirstArgumentAsString):
470         (WebCore::Console::addMessage):
471         (WebCore::Console::debug):
472         (WebCore::Console::error):
473         (WebCore::Console::info):
474         (WebCore::Console::log):
475         (WebCore::Console::dir):
476         (WebCore::Console::dirxml):
477         (WebCore::Console::trace):
478         (WebCore::Console::assertCondition):
479         (WebCore::Console::count):
480         (WebCore::Console::profile):
481         (WebCore::Console::profileEnd):
482         (WebCore::Console::time):
483         (WebCore::Console::timeEnd):
484         (WebCore::Console::group):
485         (WebCore::Console::warn):
486         * page/Console.h:
487         * page/Console.idl: Removed Custom attributes, added
488         CustomArgumentHandling attributes, and tweaked argument defs.
489
490 2008-12-09  Darin Adler  <darin@apple.com>
491
492         Try to fix non-Mac builds.
493
494         * GNUmakefile.am: Added NavigatorBase.
495         * WebCore.pro: Ditto.
496         * WebCore.scons: Ditto.
497         * WebCore.vcproj/WebCore.vcproj: Ditto.
498         * WebCoreSources.bkl: Ditto.
499
500         Unrelated tweak sitting in my tree.
501
502         * bindings/objc/DOMAbstractView.mm: Remove pointless override of finalize method.
503
504 2008-12-09  Darin Adler  <darin@apple.com>
505
506         Try to fix Tiger build.
507
508         * platform/network/mac/NetworkStateNotifierMac.cpp: Declare CFRunLoopGetMain.
509
510 2008-12-09  Alexey Proskuryakov  <ap@webkit.org>
511
512         Reviewed by Darin Adler.
513
514         https://bugs.webkit.org/show_bug.cgi?id=22719
515         Implement Navigator object in Workers
516
517         Test: fast/workers/worker-navigator.html
518
519         * DerivedSources.make:
520         * GNUmakefile.am:
521         * WebCore.pro:
522         * WebCore.vcproj/WebCore.vcproj:
523         * WebCore.xcodeproj/project.pbxproj:
524         Added WorkerNavigator sources.
525
526         * bindings/js/JSWorkerContext.cpp: (WebCore::jsWorkerContextNavigator):
527         Worker.navigator returns a WoerkerNavigator object (it is named just Navigator in the spec,
528         but it is not the same interface that is available on Windows).
529
530         * dom/Worker.cpp:
531         (WebCore::Worker::notifyFinished):
532         * dom/WorkerContext.cpp:
533         (WebCore::WorkerContext::WorkerContext):
534         (WebCore::WorkerContext::navigator):
535         * dom/WorkerContext.h:
536         (WebCore::WorkerContext::create):
537         * dom/WorkerThread.cpp:
538         (WebCore::WorkerThread::create):
539         (WebCore::WorkerThread::WorkerThread):
540         (WebCore::WorkerThread::workerThread):
541         * dom/WorkerThread.h:
542         Pass a pre-computed user agent string into worker, because it cannot call a client method
543         directly, and pre-computing is easier than sending a synchronous message to the main thread.
544
545         * page/Navigator.cpp:
546         * page/Navigator.h:
547         * page/NavigatorBase.cpp: Added.
548         * page/NavigatorBase.h: Added.
549         Factor out common (and uncommon, but very similar) functionality into a base class.
550
551         * page/WorkerNavigator.cpp: Added.
552         * page/WorkerNavigator.h: Added.
553         * page/WorkerNavigator.idl: Added.
554         Per Web Workers and HTML5, implement a small subset of what we currently have in Window.Navigator.
555
556         * platform/network/NetworkStateNotifier.cpp: (WebCore::networkStateNotifier):
557         Make networkStateNotifier() static constructor thread safe. The object is created on the
558         thread it is first called from, while callbacks are registered on the main thread. Calls to
559         onLine() from other threads are safe, because it is just loading a boolean.
560
561         * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::NetworkStateNotifier):
562         Schedule notifications on main event loop, not the current one.
563
564 2008-12-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
565
566         Rubber-stamped by Alexey Proskuryakov.
567
568         Forgot to update Qt/WML build - add some new files to the build.
569
570         * WebCore.pro:
571
572 2008-12-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
573
574         Reviewed by Alexey Proskuryakov.
575
576         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22637
577
578         Implement the GET method for WMLGoElement, and some test covering it's behaviour.
579         Update all build systems supporting WML that haven't been updated since a while.
580
581         Add WMLPostField stub implementation, needed for implementing POST method.
582
583         Tests: wml/go-task-get-method-external-deck-with-href.html
584                wml/go-task-get-method-external-deck.html
585                wml/go-task-get-method-same-deck.html
586
587         * GNUmakefile.am:
588         * WebCore.vcproj/WebCore.vcproj:
589         * WebCore.xcodeproj/project.pbxproj:
590         * dom/Document.cpp:
591         (WebCore::Document::resetWMLPageState):
592         * wml/WMLCardElement.cpp:
593         * wml/WMLCardElement.h:
594         * wml/WMLEventHandlingElement.cpp:
595         (WebCore::WMLCardElement::registerDoElement):
596         * wml/WMLEventHandlingElement.h:
597         * wml/WMLGoElement.cpp:
598         (WebCore::WMLGoElement::WMLGoElement):
599         (WebCore::WMLGoElement::registerPostfieldElement):
600         (WebCore::WMLGoElement::parseMappedAttribute):
601         (WebCore::WMLGoElement::executeTask):
602         (WebCore::WMLGoElement::parseContentType):
603         (WebCore::WMLGoElement::preparePOSTRequest):
604         (WebCore::WMLGoElement::prepareGETRequest):
605         * wml/WMLGoElement.h:
606         * wml/WMLPostfieldElement.cpp: Added.
607         (WebCore::WMLPostfieldElement::WMLPostfieldElement):
608         (WebCore::WMLPostfieldElement::parseMappedAttribute):
609         (WebCore::WMLPostfieldElement::insertedIntoDocument):
610         * wml/WMLPostfieldElement.h: Added.
611         (WebCore::WMLPostfieldElement::name):
612         (WebCore::WMLPostfieldElement::value):
613         * wml/WMLTagNames.in:
614
615 2008-12-08  Peter Kasting  <pkasting@google.com>
616
617         Reviewed by Anders Carlsson.
618
619         https://bugs.webkit.org/show_bug.cgi?id=16814
620         Allow ports to disable ActiveX->NPAPI conversion for Media Player.
621         Improve handling of miscellaneous ActiveX objects.
622
623         * rendering/RenderPartObject.cpp:
624         (WebCore::mapClassIdToServiceType):
625         (WebCore::shouldUseChildEmbedOfObject):
626         (WebCore::RenderPartObject::updateWidget):
627
628 2008-12-08  Darin Adler  <darin@apple.com>
629
630         Reviewed by John Sullivan.
631
632         - fix https://bugs.webkit.org/show_bug.cgi?id=22409
633           REGRESSION: cmd-shift-left/right don't switch tabs, instead select text
634
635         Tests: editing/execCommand/enabling-and-selection-2.html
636                editing/execCommand/enabling-and-selection.html
637
638         * editing/EditorCommand.cpp: Updated table to use these functions by their new names.
639         (WebCore::enabledVisibleSelection): Renamed this to reflect its new algorithm.
640         An invisible selection with a position that selects no characters doesn't count
641         as a visible selection.
642         (WebCore::enabledVisibleSelectionAndMark): Ditto.
643
644 2008-12-08  David Kilzer  <ddkilzer@apple.com>
645
646         Remove duplicate entries from WebCore project.
647
648         Reviewed by Eric Seidel.
649
650         Bug 22555: Sort "children" sections in Xcode project files.
651         <https://bugs.webkit.org/show_bug.cgi?id=22555>
652
653         Recipe for removing duplicates:
654         $ ./WebKitTools/Scripts/sort-Xcode-project-file project.pbxproj
655         $ uniq < project.pbxproj | diff -u project.pbxproj - | patch -p0 project.pbxproj
656
657         * WebCore.xcodeproj/project.pbxproj: Removed duplicates.
658
659 2008-12-08  Julien Chaffraix  <jchaffraix@webkit.org>
660
661         Reviewed by Darin Adler.
662
663         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
664         https://bugs.webkit.org/show_bug.cgi?id=22665
665
666         Remove setCreatedByParser from the script elements (HTML and SVG).
667
668         * dom/XMLTokenizer.cpp:
669         (WebCore::XMLTokenizer::eventuallyMarkAsParserCreated): Removed
670         call to setCreatedByParser for the 2 elements.
671
672         * dom/make_names.pl: Modified to call the constructor with
673         the createByParser parameter if 'constructorNeedsCreatedByParser'
674         is set.
675
676         * html/HTMLElementFactory.cpp:
677         (WebCore::scriptConstructor):
678         * html/HTMLScriptElement.cpp:
679         (WebCore::HTMLScriptElement::HTMLScriptElement):
680         * html/HTMLScriptElement.h:
681         * html/HTMLTagNames.in: Added constructorNeedsCreatedByParser
682         to script.
683         * svg/SVGScriptElement.cpp:
684         (WebCore::SVGScriptElement::SVGScriptElement):
685         * svg/SVGScriptElement.h:
686         * svg/svgtags.in: Added constructorNeedsCreatedByParser
687         to script.
688
689 2008-12-08  David Kilzer  <ddkilzer@apple.com>
690
691         Bug 22555: Sort "children" sections in Xcode project files
692
693         <https://bugs.webkit.org/show_bug.cgi?id=22555>
694
695         Reviewed by Eric Seidel.
696
697         * WebCore.xcodeproj/project.pbxproj: Sorted.
698         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj: Sorted.
699
700 2008-12-08  Tony Chang  <tony@chromium.org>
701
702         Reviewed by Eric Seidel.
703
704         Add a bool to GraphicsContext so that shadows can ignore
705         transformations.  This is needed by HTML canvas element
706         where the spec says shadows are applied w/o transformations.
707         https://bugs.webkit.org/show_bug.cgi?id=22580
708
709         No functional changes, thus no tests.
710
711         * html/CanvasRenderingContext2D.cpp:
712         (WebCore::CanvasRenderingContext2D::setShadow):
713         (WebCore::CanvasRenderingContext2D::applyShadow):
714         * html/HTMLCanvasElement.cpp:
715         (WebCore::HTMLCanvasElement::createImageBuffer):
716         * platform/graphics/GraphicsContext.cpp:
717         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
718         * platform/graphics/GraphicsContext.h:
719         * platform/graphics/GraphicsContextPrivate.h:
720         (WebCore::GraphicsContextState::GraphicsContextState):
721         * platform/graphics/cg/GraphicsContextCG.cpp:
722         (WebCore::GraphicsContext::setPlatformShadow):
723
724 2008-12-08  Julien Chaffraix  <jchaffraix@webkit.org>
725
726         Reviewed by Darin Adler.
727
728         Bug 17897: Not Rendering Images Imported from XHTML Document
729         <rdar://problem/5827614>
730
731         When we were loading document with XMLHttpRequest that contained images, the images
732         would not be fetched as they would not be displayed. However if we inserted such
733         an image element into a rendered document, we would not fetch the image and thus never
734         display it.
735
736         Now we check if the image has been loaded when we insert an HTMLImageElement into a
737         document.
738         To enable this, the image loader has an error flag. To avoid doing several attempts
739         when we know that the image is in error, we store the failed URL.
740         However Firefox and Opera ignore errors when the 'src' attribute changes and thus
741         we also have an updateFromElementIgnoringPreviousError to match the other browser.
742
743         Tests: http/tests/misc/image-blocked-src-change.html
744                http/tests/misc/image-blocked-src-no-change.html
745                http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded-svg.svg
746                http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded.html
747
748         * html/HTMLEmbedElement.cpp:
749         (WebCore::HTMLEmbedElement::parseMappedAttribute): Changed to call updateFromElementIgnoringPreviousError.
750         * html/HTMLImageElement.cpp:
751         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
752         (WebCore::HTMLImageElement::insertedIntoDocument): Call updateFromElement if we do not have
753         an image.
754
755         * html/HTMLInputElement.cpp:
756         (WebCore::HTMLInputElement::parseMappedAttribute): Changed to call updateFromElementIgnoringPreviousError.
757         * html/HTMLObjectElement.cpp:
758         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
759         * html/HTMLVideoElement.cpp:
760         (WebCore::HTMLVideoElement::parseMappedAttribute): Ditto.
761         * loader/ImageLoader.cpp:
762         (WebCore::ImageLoader::setImage): Added an assertion.
763         (WebCore::ImageLoader::updateFromElement): Added a check for load error (to avoid displaying
764         multiple errors in the console for a single image load).
765
766         (WebCore::ImageLoader::updateFromElementIgnoringPreviousError): This method clears previous error
767         before calling updateFromElement.
768
769         (WebCore::ImageLoader::notifyFinished): Added an assertion.
770         * loader/ImageLoader.h:
771         * svg/SVGImageElement.cpp:
772         (WebCore::SVGImageElement::svgAttributeChanged): Changed to call updateFromElementIgnoringPreviousError.
773
774 2008-12-08  David Hyatt  <hyatt@apple.com>
775
776         Make scrollbar creation virtual on ScrollView so that FrameView can have the capability to create
777         custom CSS scrollbars.
778
779         Reviewed by Eric Seidel
780
781         * page/FrameView.cpp:
782         (WebCore::FrameView::createScrollbar):
783         * page/FrameView.h:
784         * platform/ScrollView.cpp:
785         (WebCore::ScrollView::setHasHorizontalScrollbar):
786         (WebCore::ScrollView::setHasVerticalScrollbar):
787         (WebCore::ScrollView::createScrollbar):
788         * platform/ScrollView.h:
789
790 2008-12-08  Dan Bernstein  <mitz@apple.com>
791
792         Reviewed by John Sullivan.
793
794         - WebCore part of tracking the global history item for a WebView
795
796         * loader/FrameLoader.cpp:
797         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Set the page's
798         global history item to the current back/forward list item, respecting
799         private browsing mode.
800         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto in this
801         case.
802         (WebCore::FrameLoader::goToItem): Ditto in this case.
803         (WebCore::FrameLoader::updateHistoryForStandardLoad): If this load
804         creates a new global history item, set the page's global history item
805         to it.
806         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
807         Ditto.
808         * page/Page.cpp:
809         (WebCore::Page::setGlobalHistoryItem): Added this setter.
810         * page/Page.h: Added a m_globalHistoryItem data member.
811         (WebCore::Page::globalHistoryItem): Added this getter.
812
813 2008-12-08  Antti Koivisto  <antti@apple.com>
814
815         Reviewed by Dave Kilzer.
816
817         A few stylistic fixes suggested by Dave Kilzer.
818
819         * css/CSSPrimitiveValue.cpp:
820         (WebCore::CSSPrimitiveValue::createIdentifier):
821         (WebCore::CSSPrimitiveValue::create):
822
823 2008-12-08  Alexey Proskuryakov  <ap@webkit.org>
824
825         Reviewed by Darin Adler.
826
827         https://bugs.webkit.org/show_bug.cgi?id=22737
828         Try debug version when locating CFNetwork
829
830         * platform/network/cf/ResourceRequestCFNet.cpp:
831         (WebCore::findCFNetworkModule):
832         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
833         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
834         * platform/network/win/CookieJarCFNetWin.cpp:
835         (WebCore::findCFNetworkModule):
836         (WebCore::findIsHTTPOnlyFunction):
837
838 2008-12-08  Aaron Boodman  <aa@chromium.org>
839
840         Reviewed by Stephanie Lewis.
841
842         https://bugs.webkit.org/show_bug.cgi?id=22301
843         Make dispatchDidFinishLoading() always fire before didFinishLoadForFrame().
844
845         * loader/FrameLoader.cpp:
846         (WebCore::FrameLoader::finishedParsing):
847
848 2008-12-08  Trenton Schulz <trenton.schulz@nokia.com>
849
850         Rubber-stamped by Tor Arne Vestbø.
851
852         Fix build warning on Mac
853
854         * platform/text/mac/StringImplMac.mm:
855
856 2008-12-08  Simon Hausmann  <simon.hausmann@nokia.com>
857
858         Fix the Qt build.
859
860         * bridge/qt/qt_runtime.cpp:
861         (JSC::Bindings::convertQVariantToValue): Pass JSGlobalData to RegExp
862           constructor.
863
864 2008-12-08  Oliver Hunt  <oliver@apple.com>
865
866         Reviewed by Alexey Proskuryakov.
867
868         Bug 22398: r39059: Crash when clearing webkitTransitionDuration in webkitTransitionEnd event handler
869         <rdar://problem/6426245> REGRESSION(r39059): Reproducible crash when clearing webkitTransitionDuration in webkitTransitionEnd event handler (22398)
870
871         This regression was caused by r39059 replacing the protector on the active
872         animation with a protector on just the composition.  It turns out that both
873         protectors are necessary.
874
875         Test: transitions/transition-duration-cleared-in-transitionend-crash.html
876
877         * page/animation/AnimationBase.cpp:
878         (WebCore::AnimationBase::animationTimerCallbackFired):
879
880 2008-12-08  Dmitry Titov  <dimich@chromium.org>
881
882         Reviewed by Alexey Proskuryakov.
883
884         https://bugs.webkit.org/show_bug.cgi?id=22732
885         Remove unused files PausedTimeouts.h,.cpp
886         The change that deprecated this code was https://bugs.webkit.org/show_bug.cgi?id=22620
887
888         * GNUmakefile.am:
889         * WebCore.pro:
890         * WebCore.scons:
891         * WebCore.vcproj/WebCore.vcproj:
892         * WebCore.xcodeproj/project.pbxproj:
893         * WebCoreSources.bkl:
894           These are build files which had PausedTimeouts referenced.
895
896         * bindings/js/PausedTimeouts.cpp: Removed.
897         * bindings/js/PausedTimeouts.h: Removed.
898         * bindings/js/ScriptController.cpp: Removed '#include'
899         * page/Chrome.cpp: Removed '#include' and unused variable.
900
901 2008-12-07  Simon Fraser  <simon.fraser@apple.com>
902
903         Reviewed by Dan Bernstein
904
905         https://bugs.webkit.org/show_bug.cgi?id=22594
906
907         Fix issues which break reading inline style for -webkit-transition
908         and -webkit-transform-origin.
909         
910         Test: fast/css/transform-inline-style.html
911
912         * css/CSSMutableStyleDeclaration.cpp:
913         (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Add cases 
914         for CSSPropertyWebkitTransformOrigin and CSSPropertyWebkitTransition
915         so that these shorthand properties are returned correctly.
916         * css/CSSParser.cpp:
917         (WebCore::CSSParser::parseAnimationProperty): Create CSSPrimitiveValues
918         with the correct CSSValueAll and CSSValueNone identifiers, not the
919         RenderStyle-level cAnimateAll, cAnimateNone.
920         * css/CSSStyleSelector.cpp:
921         (WebCore::CSSStyleSelector::mapAnimationProperty): Special-case CSSValueAll
922         and CSSValueNone values to set cAnimateAll and cAnimateNone transition properties.
923
924 2008-12-07  Antti Koivisto  <antti@apple.com>
925
926         Reviewed by Darin Adler.
927
928         https://bugs.webkit.org/show_bug.cgi?id=22717
929         Make CSS values use less memory
930         
931         Share CSSPrimitiveValue objects for commonly used values including
932         - idents
933         - colors
934         - small integers
935         
936         This reduces the amount CSSPrimitiveValue instances by > 80%.
937
938         * css/CSSPrimitiveValue.cpp:
939         (WebCore::CSSPrimitiveValue::createIdentifier):
940         (WebCore::CSSPrimitiveValue::createColor):
941         (WebCore::CSSPrimitiveValue::create):
942         * css/CSSPrimitiveValue.h:
943         (WebCore::CSSPrimitiveValue::create):
944
945 2008-12-07  Antti Koivisto  <antti@apple.com>
946
947         Reviewed by Darin Adler.
948
949         https://bugs.webkit.org/show_bug.cgi?id=22717
950         Make CSS values use less memory
951
952         Get CSSValues off from the common StyleBase base class. They don't
953         need a parent pointer or anything else there and there is no real
954         reason to have them in same data structures with other CSSOM objects.
955         
956         Disabled (instead of refactoring around the lack of common base) the ability 
957         to have style declaration blocks as CSS variable values. They don't exist in 
958         the spec so I wasn't sure if they have future or not. It would not be hard to 
959         get them back. CSS variables are in any case an experimental feature and 
960         not enabled by default.
961
962         * css/CSSInitialValue.h:
963         (WebCore::CSSInitialValue::createExplicit):
964         (WebCore::CSSInitialValue::createImplicit):
965         * css/CSSParser.cpp:
966         (WebCore::CSSParser::addVariableDeclarationBlock):
967         * css/CSSParser.h:
968         * css/CSSValue.h:
969         (WebCore::CSSValue::~CSSValue):
970         (WebCore::CSSValue::parserValue):
971         * css/CSSVariablesDeclaration.cpp:
972         (WebCore::CSSVariablesDeclaration::CSSVariablesDeclaration):
973         (WebCore::CSSVariablesDeclaration::getVariableValue):
974         (WebCore::CSSVariablesDeclaration::removeVariable):
975         (WebCore::CSSVariablesDeclaration::addParsedVariable):
976         (WebCore::CSSVariablesDeclaration::getParsedVariable):
977         (WebCore::CSSVariablesDeclaration::getParsedVariableDeclarationBlock):
978         * css/CSSVariablesDeclaration.h:
979         (WebCore::CSSVariablesDeclaration::create):
980         * css/StyleBase.h:
981
982 2008-12-07  Dirk Schulze  <krit@webkit.org>
983
984         Reviewed by Oliver Hunt.
985
986         Add gradient and pattern support for strokeRect on canvas/Cg.
987
988         Canvas strokeRect() doesn't support gradients
989         https://bugs.webkit.org/show_bug.cgi?id=19790
990
991         Test: fast/canvas/canvas-strokeRect.html
992
993         * platform/graphics/cg/GraphicsContextCG.cpp:
994         (WebCore::GraphicsContext::strokeRect):
995
996 2008-12-06  Dirk Schulze  <krit@webkit.org>
997
998         Reviewed by Oliver Hunt.
999
1000         Add support for setTransform() in canvas.
1001
1002         <canvas> lacks transform() and setTransform()
1003         https://bugs.webkit.org/show_bug.cgi?id=16604
1004
1005         Test: fast/canvas/canvas-setTransform.html
1006
1007         * html/CanvasRenderingContext2D.cpp:
1008         (WebCore::CanvasRenderingContext2D::State::State):
1009         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
1010         (WebCore::CanvasRenderingContext2D::setFillStyle):
1011         (WebCore::CanvasRenderingContext2D::scale):
1012         (WebCore::CanvasRenderingContext2D::rotate):
1013         (WebCore::CanvasRenderingContext2D::translate):
1014         (WebCore::CanvasRenderingContext2D::transform):
1015         (WebCore::CanvasRenderingContext2D::setTransform):
1016         (WebCore::CanvasRenderingContext2D::beginPath):
1017         (WebCore::CanvasRenderingContext2D::closePath):
1018         (WebCore::CanvasRenderingContext2D::moveTo):
1019         (WebCore::CanvasRenderingContext2D::lineTo):
1020         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
1021         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
1022         (WebCore::CanvasRenderingContext2D::arcTo):
1023         (WebCore::CanvasRenderingContext2D::arc):
1024         (WebCore::CanvasRenderingContext2D::rect):
1025         (WebCore::CanvasRenderingContext2D::fill):
1026         (WebCore::CanvasRenderingContext2D::stroke):
1027         (WebCore::CanvasRenderingContext2D::clip):
1028         (WebCore::CanvasRenderingContext2D::isPointInPath):
1029         (WebCore::CanvasRenderingContext2D::clearRect):
1030         (WebCore::CanvasRenderingContext2D::fillRect):
1031         (WebCore::CanvasRenderingContext2D::strokeRect):
1032         (WebCore::CanvasRenderingContext2D::drawImage):
1033         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
1034         (WebCore::CanvasRenderingContext2D::willDraw):
1035         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1036         * html/CanvasRenderingContext2D.h:
1037         * html/CanvasRenderingContext2D.idl:
1038         * html/HTMLCanvasElement.cpp:
1039         (WebCore::HTMLCanvasElement::baseTransform):
1040         * html/HTMLCanvasElement.h:
1041         * platform/graphics/ImageBuffer.h:
1042         (WebCore::ImageBuffer::baseTransform):
1043
1044 2008-12-06  Antti Koivisto  <antti@apple.com>
1045
1046         Reviewed by Darin Adler.
1047
1048         Also copy m_implicit field. Darin wanted this change commited separately.
1049
1050         * css/CSSProperty.h:
1051         (WebCore::CSSProperty::operator=):
1052
1053 2008-12-06  Antti Koivisto  <antti@apple.com>
1054
1055         Reviewed by Darin Adler.
1056
1057         https://bugs.webkit.org/show_bug.cgi?id=22379
1058         Make CSSOM use less memory
1059         
1060         Use vector instead of a double linked list for properties in CSSMutableStyleDeclaration.
1061         
1062         Taught setter functions to use existing slots to avoid memory moves, plus some
1063         other optimizations.
1064
1065         * WebCore.xcodeproj/project.pbxproj:
1066         * css/CSSMutableStyleDeclaration.cpp:
1067         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
1068         (WebCore::CSSMutableStyleDeclaration::operator=):
1069         (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
1070         (WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
1071         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1072         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
1073         (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
1074         (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
1075         (WebCore::CSSMutableStyleDeclaration::setProperty):
1076         (WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
1077         (WebCore::CSSMutableStyleDeclaration::setStringProperty):
1078         (WebCore::CSSMutableStyleDeclaration::setImageProperty):
1079         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
1080         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
1081         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
1082         (WebCore::CSSMutableStyleDeclaration::setLengthProperty):
1083         (WebCore::CSSMutableStyleDeclaration::length):
1084         (WebCore::CSSMutableStyleDeclaration::item):
1085         (WebCore::CSSMutableStyleDeclaration::cssText):
1086         (WebCore::CSSMutableStyleDeclaration::setCssText):
1087         (WebCore::CSSMutableStyleDeclaration::merge):
1088         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
1089         (WebCore::CSSMutableStyleDeclaration::copy):
1090         (WebCore::CSSMutableStyleDeclaration::findPropertyWithId):
1091         * css/CSSMutableStyleDeclaration.h:
1092         (WebCore::CSSMutableStyleDeclarationConstIterator::operator*):
1093         (WebCore::CSSMutableStyleDeclarationConstIterator::operator->):
1094         (WebCore::CSSMutableStyleDeclarationConstIterator::operator!=):
1095         (WebCore::CSSMutableStyleDeclarationConstIterator::operator==):
1096         (WebCore::CSSMutableStyleDeclaration::create):
1097         (WebCore::CSSMutableStyleDeclaration::begin):
1098         (WebCore::CSSMutableStyleDeclaration::end):
1099         (WebCore::CSSMutableStyleDeclarationConstIterator::CSSMutableStyleDeclarationConstIterator):
1100         (WebCore::CSSMutableStyleDeclarationConstIterator::~CSSMutableStyleDeclarationConstIterator):
1101         (WebCore::CSSMutableStyleDeclarationConstIterator::operator=):
1102         (WebCore::CSSMutableStyleDeclarationConstIterator::operator++):
1103         (WebCore::CSSMutableStyleDeclarationConstIterator::operator--):
1104         * css/CSSProperty.h:
1105         (WTF::):
1106         * css/CSSStyleDeclaration.cpp:
1107         (WebCore::CSSStyleDeclaration::diff):
1108         (WebCore::CSSStyleDeclaration::copyPropertiesInSet):
1109         * css/CSSStyleSelector.cpp:
1110         (WebCore::CSSStyleSelector::resolveVariablesForDeclaration):
1111         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
1112         (WebCore::CSSStyleSelector::applyDeclarations):
1113         * dom/EventTarget.h:
1114         * editing/ApplyStyleCommand.cpp:
1115         (WebCore::StyleChange::init):
1116         (WebCore::ApplyStyleCommand::isHTMLStyleNode):
1117         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
1118         (WebCore::ApplyStyleCommand::removeCSSStyle):
1119         * editing/Editor.cpp:
1120         (WebCore::Editor::selectionStartHasStyle):
1121         (WebCore::updateState):
1122         * editing/ReplaceSelectionCommand.cpp:
1123         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1124         * editing/markup.cpp:
1125         (WebCore::appendStartMarkup):
1126
1127 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
1128
1129         Reviewed by Antti Koivisto, Dan Bernstein
1130
1131         https://bugs.webkit.org/show_bug.cgi?id=22088
1132
1133         Fix logic related to repainting when transform changes:
1134         If an object has a layer, and the transform changes, then we need
1135         to do a repaintIncludingDescendants(), not just a repaint.
1136         
1137         Test: fast/repaint/transform-repaint-descendants.html
1138
1139         * rendering/RenderObject.cpp:
1140         (WebCore::RenderObject::styleWillChange):
1141
1142 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
1143
1144         Reviewed by Dan Bernstein
1145
1146         https://bugs.webkit.org/show_bug.cgi?id=15739
1147
1148         When painting the selection on a replaced element, paint
1149         using local coordinates so that the selection is correctly
1150         painted for transformed elements.
1151
1152         Test: fast/replaced/selection-rect-transform.html
1153
1154         * rendering/RenderReplaced.cpp:
1155         (WebCore::RenderReplaced::paint):
1156
1157 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
1158
1159         Reviewed by Dave Hyatt
1160
1161         https://bugs.webkit.org/show_bug.cgi?id=15671
1162         
1163         Fix caret rendering to behave correctly with transforms:
1164         * Rename caretRect() methods to localCaretRect() and
1165           absoluteCaretBounds() as appropriate
1166         * Fix localCaretRect() methods to return a rect in the
1167           appropriate coordinates.
1168         * Pass tx, ty down through the paintCaret() methods, after fixing them
1169           up to account for differences between contents coords, and renderer-local
1170           coords (via RenderBlock::offsetForContents()).
1171         * Remove m_caretPositionOnLayout from SelectionController, and instead
1172           call invalidateSelection() from RenderLayer::scrollToOffset(), because
1173           we can no longer assume simple x/y offsets from scrolling with transforms.
1174         * Move the logic to compute which RenderObject actually paints the caret into
1175           SelectionController::caretRenderer(), rather than having it in RenderBlock.
1176         * SelectionController now computes and caches a local caret rect. For invalidation,
1177           it computes the absolute bounds of that (possibly transformed) local rect.
1178           The local rect is computed in the coordinate system of the RenderObject that
1179           will paint the caret (this may require offsetting from the actual renderer
1180           at the start of the selection).
1181         * Fix LayoutState(RenderObject* root) to take transforms into account
1182         * Make offsetFromContainer() a virtual method on RenderObject, and implement
1183           the RenderObject version. It's used to map from selection start renderer
1184           to caret renderer.
1185
1186         Test: fast/transforms/transformed-caret.html
1187
1188         * WebCore.base.exp:
1189         * editing/DeleteSelectionCommand.cpp:
1190         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1191         * editing/SelectionController.cpp:
1192         (WebCore::SelectionController::SelectionController):
1193         (WebCore::absoluteCaretY):
1194         (WebCore::SelectionController::modify):
1195         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
1196         (WebCore::SelectionController::layout):
1197         (WebCore::SelectionController::caretRenderer):
1198         (WebCore::SelectionController::localCaretRect):
1199         (WebCore::SelectionController::absoluteCaretBounds):
1200         (WebCore::SelectionController::caretRepaintRect):
1201         (WebCore::SelectionController::recomputeCaretRect):
1202         (WebCore::SelectionController::invalidateCaretRect):
1203         (WebCore::SelectionController::paintCaret):
1204         (WebCore::SelectionController::caretRendersInsideNode):
1205         * editing/SelectionController.h:
1206         * editing/VisiblePosition.cpp:
1207         (WebCore::VisiblePosition::localCaretRect):
1208         (WebCore::VisiblePosition::absoluteCaretBounds):
1209         (WebCore::VisiblePosition::xOffsetForVerticalNavigation):
1210         * editing/VisiblePosition.h:
1211         * editing/mac/SelectionControllerMac.mm:
1212         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
1213         * html/HTMLElement.cpp:
1214         (WebCore::HTMLElement::isContentEditable):
1215         * page/AccessibilityRenderObject.cpp:
1216         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
1217         * page/Frame.cpp:
1218         (WebCore::Frame::firstRectForRange):
1219         (WebCore::Frame::selectionLayoutChanged):
1220         (WebCore::Frame::paintCaret):
1221         (WebCore::Frame::paintDragCaret):
1222         (WebCore::Frame::revealSelection):
1223         (WebCore::Frame::revealCaret):
1224         * page/Frame.h:
1225         * rendering/LayoutState.cpp:
1226         (WebCore::LayoutState::LayoutState):
1227         * rendering/RenderBlock.cpp:
1228         (WebCore::RenderBlock::paintCaret):
1229         (WebCore::RenderBlock::paintObject):
1230         (WebCore::RenderBlock::positionForCoordinates):
1231         (WebCore::RenderBlock::offsetForContents):
1232         * rendering/RenderBlock.h:
1233         * rendering/RenderBox.cpp:
1234         (WebCore::RenderBox::localCaretRect):
1235         * rendering/RenderBox.h:
1236         * rendering/RenderFlow.cpp:
1237         (WebCore::RenderFlow::localCaretRect):
1238         * rendering/RenderFlow.h:
1239         * rendering/RenderLayer.cpp:
1240         (WebCore::RenderLayer::scrollToOffset):
1241         * rendering/RenderObject.cpp:
1242         (WebCore::RenderObject::localCaretRect):
1243         * rendering/RenderObject.h:
1244         * rendering/RenderSVGInlineText.cpp:
1245         (WebCore::RenderSVGInlineText::localCaretRect):
1246         * rendering/RenderSVGInlineText.h:
1247         * rendering/RenderText.cpp:
1248         (WebCore::RenderText::RenderText):
1249         (WebCore::RenderText::localCaretRect):
1250         * rendering/RenderText.h:
1251
1252 2008-12-06  David Kilzer  <ddkilzer@apple.com>
1253
1254         Bug 22711: Current svn (build 39065) fails to compile
1255
1256         <https://bugs.webkit.org/show_bug.cgi?id=22711>
1257
1258         BUILD FIX for r39065: Forgot parentheses after "document".
1259
1260         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
1261         <https://bugs.webkit.org/show_bug.cgi?id=22666>
1262
1263         * svg/SVGFEImageElement.cpp:
1264         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Changed
1265         document to document().
1266
1267 2008-12-06  Dmitry Titov  <dimich@chromium.org>
1268
1269         Reviewed by Alexey Proskuryakov.
1270
1271         https://bugs.webkit.org/show_bug.cgi?id=22710
1272         Memory leak due to circular reference Document->DOMTimer->ScheduledAction->[JS objects]->Document
1273
1274         * bindings/js/DOMTimer.cpp:
1275         (WebCore::DOMTimer::stop): Delete ScheduledAction, which contains a protected object.
1276
1277 2008-12-06  David Kilzer  <ddkilzer@apple.com>
1278
1279         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
1280
1281         <https://bugs.webkit.org/show_bug.cgi?id=22666>
1282
1283         Reviewed by Darin Adler.
1284
1285         When creating a webarchive from WebCore::LegacyWebArchive::create(),
1286         HashSet<String>, Vector<KURL> and Vector<String> were all used to
1287         store a list of URLs for resources found in the document.  Instead
1288         use a single ListHashSet<KURL> to store the list and resolve the
1289         relative URLs as they're added.  We use a new inline method called
1290         WebCore::addSubresourceURL() to add KURL objects to the ListHashSet
1291         to prevent "null" KURL objects from crashing in the KURL hashing
1292         function.
1293
1294         * WebCore.base.exp: Changed export of
1295         WebCore::Node::getSubresourceURLs() to take a ListHashSet<KURL>
1296         argument instead of a Vector<KURL>.
1297
1298         * WebCore.xcodeproj/project.pbxproj: Marked KURLHash.h as a private
1299         header for use in WebKit.
1300
1301         * css/CSSStyleSheet.cpp:
1302         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Renamed from
1303         addSubresourceURLStrings().  Changed to use ListHashSet<KURL>
1304         instead of HashSet<String>.  Cleaned up code.
1305         * css/CSSStyleSheet.h:
1306         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Ditto.
1307         * css/StyleSheet.h:
1308         (WebCore::StyleSheet::addSubresourceStyleURLs): Ditto.
1309
1310         * dom/Node.cpp:
1311         (WebCore::Node::getSubresourceURLs): Changed to use
1312         ListHashSet<KURL> instead of Vector<KURL>.  Cleaned up code.
1313         * dom/Node.h:
1314         (WebCore::Node::getSubresourceURLs): Ditto.
1315         (WebCore::Node::addSubresourceAttributeURLs): Renamed from
1316         getSubresourceAttributeStrings().  Changed to use ListHashSet<KURL>
1317         instead of Vector<String>.
1318         (WebCore::addSubresourceURL): Added.  Safely adds new KURL objects
1319         to a ListHashSet<KURL> object.  A "null" KURL object will cause the
1320         hash function to crash since it contains a null StringImpl.  Used in
1321         Node::addSubresourceAttributeURLs() and addSubresourceStyleURLs() in
1322         the style subsystem.
1323
1324         * dom/ProcessingInstruction.cpp:
1325         (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
1326         Renamed from getSubresourceAttributeStrings().  Changed to use
1327         ListHashSet<KURL> instead of Vector<String>.  Use
1328         WebCore::addSubresourceURL() to add new KURL objects.
1329         * dom/ProcessingInstruction.h: Ditto.
1330         * html/HTMLBodyElement.cpp:
1331         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Ditto.
1332         * html/HTMLBodyElement.h: Ditto.
1333         * html/HTMLEmbedElement.cpp:
1334         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
1335         * html/HTMLEmbedElement.h: Ditto.
1336         * html/HTMLImageElement.cpp:
1337         (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
1338         * html/HTMLImageElement.h: Ditto.
1339         * html/HTMLInputElement.cpp:
1340         (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
1341         * html/HTMLInputElement.h: Ditto.
1342         * html/HTMLLinkElement.cpp:
1343         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
1344         * html/HTMLLinkElement.h: Ditto.
1345         * html/HTMLObjectElement.cpp:
1346         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
1347         * html/HTMLObjectElement.h: Ditto.
1348         * html/HTMLParamElement.cpp:
1349         (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
1350         * html/HTMLParamElement.h: Ditto.
1351         * html/HTMLScriptElement.cpp:
1352         (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
1353         * html/HTMLScriptElement.h: Ditto.
1354         * html/HTMLStyleElement.cpp:
1355         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
1356         * html/HTMLStyleElement.h: Ditto.
1357         * html/HTMLTableCellElement.cpp:
1358         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
1359         * html/HTMLTableCellElement.h: Ditto.
1360         * html/HTMLTableElement.cpp:
1361         (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
1362         * html/HTMLTableElement.h: Ditto.
1363
1364         * loader/archive/cf/LegacyWebArchive.cpp:
1365         (WebCore::LegacyWebArchive::create): Changed from using
1366         HashSet<String> to ListHashSet<KURL> for tracking unique
1367         subresources.  Changed from using Vector<KURL> to ListHashSet<KURL>
1368         when calling WebCore::Node::getSubresourceURLs().  Cleaned up code.
1369
1370         * svg/SVGCursorElement.cpp:
1371         (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Renamed
1372         from getSubresourceAttributeStrings().  Changed to use
1373         ListHashSet<KURL> instead of Vector<String>.  Use
1374         WebCore::addSubresourceURL() to add new KURL objects.
1375         * svg/SVGCursorElement.h: Ditto.
1376         * svg/SVGFEImageElement.cpp:
1377         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
1378         * svg/SVGFEImageElement.h: Ditto.
1379         * svg/SVGImageElement.cpp:
1380         (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
1381         * svg/SVGImageElement.h: Ditto.
1382         * svg/SVGScriptElement.cpp:
1383         (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
1384         * svg/SVGScriptElement.h: Ditto.
1385
1386 2008-12-05  Brett Wilson  <brettw@chromium.org>
1387
1388         Reviewed by Darin Adler.
1389
1390         Make the page group use the proper link hashing functions rather than
1391         calling the string hash functions directly. Add Chromium-specfic ifdefs
1392         in the visited link computation functions to allow integration.
1393
1394         * page/PageGroup.cpp:
1395         (WebCore::PageGroup::isLinkVisited):
1396         (WebCore::PageGroup::addVisitedLink):
1397         * platform/LinkHash.cpp:
1398         (WebCore::visitedLinkHash):
1399         * platform/LinkHash.h:
1400
1401 2008-12-05  Chris Marrin  <cmarrin@apple.com>
1402
1403         Reviewed by Dave Hyatt.
1404
1405         Fix for https://bugs.webkit.org/show_bug.cgi?id=22635
1406         For iteration and end events, previous fixes to prevent the deletion of
1407         Animation objects (ref counting and hanging onto a ref during event callbacks)
1408         was sufficient to prevent dangling pointers. But start events are sent in
1409         the styleAvailable() call, which iterates over CompositeAnimation objects,
1410         which are not ref counted. So that object can get destroyed in the event
1411         handler while still active. So I added refcounting for CompositeAnimations.
1412
1413         Additionally, when am iterating over the CompositingAnimation list, it can
1414         be deleted, which mutates the list. So I now make one pass over the list
1415         building a vector of CompositeAnimation objects that need to be called and
1416         then iterate over that vector to make the actual calls.
1417
1418         Finally, to make sure the lifetime of the CompositeAnimation exceeds that of
1419         the Animation objects it owns, I now keep a ref to the CompositeAnimation
1420         in the timer callback for the iteration and end events. That means I no
1421         longer need to keep a ref to the Animation objects themselves in that timer
1422         callback, since the CompositeAnimation already has one.
1423
1424         Tests: animations/animation-iteration-event-destroy-renderer.html
1425                animations/animation-start-event-destroy-renderer.html
1426
1427         * page/animation/AnimationBase.cpp:
1428         (WebCore::AnimationBase::updateStateMachine):
1429         (WebCore::AnimationBase::animationTimerCallbackFired):
1430         * page/animation/AnimationController.cpp:
1431         (WebCore::AnimationControllerPrivate::~AnimationControllerPrivate):
1432         (WebCore::AnimationControllerPrivate::accessCompositeAnimation):
1433         (WebCore::AnimationControllerPrivate::clear):
1434         (WebCore::AnimationControllerPrivate::styleAvailable):
1435         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
1436         (WebCore::AnimationControllerPrivate::animationTimerFired):
1437         (WebCore::AnimationControllerPrivate::isAnimatingPropertyOnRenderer):
1438         (WebCore::AnimationControllerPrivate::suspendAnimations):
1439         (WebCore::AnimationControllerPrivate::resumeAnimations):
1440         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1441         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1442         (WebCore::AnimationController::updateAnimations):
1443         (WebCore::AnimationController::setAnimationStartTime):
1444         (WebCore::AnimationController::setTransitionStartTime):
1445         * page/animation/CompositeAnimation.cpp:
1446         (WebCore::CompositeAnimationPrivate::animationController):
1447         (WebCore::CompositeAnimationPrivate::isWaitingForStyleAvailable):
1448         (WebCore::CompositeAnimationPrivate::~CompositeAnimationPrivate):
1449         (WebCore::CompositeAnimationPrivate::clearRenderer):
1450         (WebCore::CompositeAnimation::clearRenderer):
1451         (WebCore::CompositeAnimation::animationController):
1452         (WebCore::CompositeAnimation::isWaitingForStyleAvailable):
1453         * page/animation/CompositeAnimation.h:
1454         (WebCore::CompositeAnimation::create):
1455
1456 2008-12-05  David Kilzer  <ddkilzer@apple.com>
1457
1458         Bug 22609: Provide a build-time choice when generating hash tables for properties of built-in DOM objects
1459
1460         <https://bugs.webkit.org/show_bug.cgi?id=22609>
1461         <rdar://problem/6331749>
1462
1463         Reviewed by Darin Adler.
1464
1465         Initial patch by Yosen Lin.  Adapted for ToT WebKit by David Kilzer.
1466
1467         Added back the code that generates a "compact" hash (instead of a
1468         perfect hash) as a build-time option using the
1469         ENABLE(PERFECT_HASH_SIZE) macro as defined in Lookup.h.
1470
1471         * bindings/scripts/CodeGeneratorJS.pm:
1472         (GenerateImplementation): Compute the number of elements that will
1473         be stored in each hash table and pass it to GenerateHashTable().
1474         (GenerateHashTable): Added new second parameter representing the
1475         number of elements to store in the compact hash table.  Added back
1476         code to compute compact hash tables.  Generate both hash table sizes
1477         and emit conditionalized code based on ENABLE(PERFECT_HASH_SIZE).
1478
1479 2008-12-05  Brett Wilson  <brettw@chromium.org>
1480
1481         Fix build bustage from previous patch.
1482
1483         * css/CSSSelector.h:
1484
1485 2008-12-05  Brett Wilson  <brettw@chromium.org>
1486
1487         Reviewed by Eric Seidel.
1488
1489         Add a missing include for OwnPtr to make CSSSelector compile without
1490         precompiled headers.
1491
1492         * css/CSSSelector.h:
1493
1494 2008-12-05  Finnur Thorarinsson  <finnur.webkit@gmail.com>
1495
1496         Reviewed by Darin Adler.
1497
1498         Bug 22579: Providing a function to ScrollbarClient.h which allows us to get at the tickmarks
1499         without relying on high-level WebCore types, as requested by Dave Hyatt.
1500         
1501         No functional changes, thus no test cases.
1502
1503         * page/FrameView.cpp:
1504         (WebCore::FrameView::getTickmarks):
1505         * page/FrameView.h:
1506         * platform/ScrollbarClient.h:
1507
1508 2008-12-05  Dean Jackson  <dino@apple.com>
1509
1510         Reviewed by David Hyatt.
1511
1512         Make sure Window event listeners also tell the
1513         Document about the event type, so noisy events
1514         will be dispatched even if nothing in the document
1515         is listening.
1516         https://bugs.webkit.org/show_bug.cgi?id=20572
1517
1518         * dom/Document.cpp:
1519         (WebCore::Document::addWindowEventListener):
1520
1521 2008-12-05  Adam Roben  <aroben@apple.com>
1522
1523         Windows build fix after r39026
1524
1525         * platform/network/cf/ResourceRequestCFNet.cpp:
1526         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1527         (WebCore::ResourceRequest::doUpdateResourceRequest):
1528         Add some missing .get()s.
1529
1530 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
1531
1532         Tiger build fix.
1533
1534         * platform/network/mac/ResourceRequestMac.mm: Define NSUInteger.
1535
1536 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
1537
1538         Reviewed by Darin Adler.
1539
1540         <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
1541         in Safari before opening a mail message in Mail
1542
1543         * platform/mac/WebCoreObjCExtras.mm:
1544         (WebCoreObjCFinalizeOnMainThread):
1545         Don't call initializeThreading: we now expect the caller to do it, to simplify keeping
1546         Tiger and post-Tiger behavior in line.
1547
1548         * bindings/objc/DOMRGBColor.mm:
1549         (+[DOMRGBColor initialize]):
1550         * bindings/objc/WebScriptObject.mm:
1551         (+[WebScriptObject initialize]):
1552         * page/mac/AccessibilityObjectWrapper.mm:
1553         (+[AccessibilityObjectWrapper initialize]):
1554         * platform/mac/SharedBufferMac.mm:
1555         (+[WebCoreSharedBufferData initialize]):
1556         Call JSC::initializeThreading();
1557
1558 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
1559
1560         Reviewed by Darin Adler.
1561
1562         <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled
1563
1564         * platform/network/ResourceRequestBase.cpp:
1565         (WebCore::ResourceRequestBase::setResponseContentDispositionEncodingFallbackArray):
1566         * platform/network/ResourceRequestBase.h:
1567         * platform/network/cf/ResourceRequestCFNet.cpp:
1568         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
1569         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
1570         (WebCore::setContentDispositionEncodingFallbackArray):
1571         (WebCore::copyContentDispositionEncodingFallbackArray):
1572         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1573         (WebCore::ResourceRequest::doUpdateResourceRequest):
1574         * platform/network/mac/ResourceRequestMac.mm:
1575         (WebCore::ResourceRequest::doUpdateResourceRequest):
1576         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1577         Added a way to specify encoding fallback list for Content-Disposition header.
1578
1579         * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): Generate and
1580         pass a list of encodings to try when decoding Content-Disposition header, as described
1581         in comments.
1582
1583 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
1584
1585         Reviewed by Darin Adler.
1586
1587         https://bugs.webkit.org/show_bug.cgi?id=22672
1588         ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout
1589
1590         Test: http/tests/xmlhttprequest/send-on-abort.html
1591
1592         * dom/ScriptExecutionContext.cpp:
1593         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
1594         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
1595         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
1596         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
1597         Add a comment explaining that ActiveDOMObject methods shouldn't execute arbitrary JS.
1598
1599         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::stop): Don't dispatch events. This
1600         reverts a recent change that made the behavior slightly closer to Firefox - but the
1601         compatibility effect should be very minor if any, and Firefox itself behaves inconsistently.
1602
1603 2008-12-05  Tobias König <tobias.koenig@nokia.com>
1604
1605         Reviewed by Simon Hausmann.
1606
1607         Record required package dependencies for the Qt build for a correct
1608         pkg-config file.
1609
1610         * WebCore.pro:
1611
1612 2008-12-05  Tor Arne Vestbø  <tavestbo@trolltech.com>
1613
1614         Rubber-stamped by Simon Hausmann.
1615
1616         [Qt/Mac] Blacklist QuickTime plugin until we support the QuickDraw drawing model
1617
1618         * plugins/mac/PluginPackageMac.cpp:
1619         (WebCore::PluginPackage::fetchInfo):
1620         (WebCore::PluginPackage::isPluginBlacklisted):
1621
1622 2008-12-05  Jungshik Shin  <jshin@chromium.org>
1623
1624         Reviewed by Alexey Proskuryakov.
1625
1626         https://bugs.webkit.org/show_bug.cgi?id=22472
1627
1628         Revises charset alias map for TextCodecICU.
1629         - Uses windows-949 and windows-874 instead of windows-949-2000 and windows-874-2000
1630         - Replaces 'windows874' in a couple of place with 'windows-874' (for the canonical name)
1631         - Maps 'dos-874' to 'windows-874'. Currently, it's aliases to 'cp874', which is in turn
1632           mapped to 'TIS-620'. 'TIS-620' is manually aliased to 'windows-874'. We'd better directly
1633           alias 'dos-874' to 'windows-874'.
1634         - Replaces 'EUC-CN' with 'GBK' when it's used as the canonical name.
1635           Similar to the above case, we're getting rid of indirection that eventually leads to 'GBK' by
1636           directly going to 'GBK'.
1637         - Adds 'x-uhc' as an alias for 'windows-949'. It's used in some web pages.
1638
1639         Tests: fast/encoding/char-decoding-mac.html
1640                fast/encoding/char-decoding.html
1641
1642         * platform/text/TextCodecICU.cpp:
1643         (WebCore::TextCodecICU::registerExtendedEncodingNames):
1644
1645 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
1646
1647         Reviewed by Kevin Ollivier.
1648
1649         Add a MIME mapping for the .htm extension to wx and GTK ports.
1650         
1651         https://bugs.webkit.org/show_bug.cgi?id=22668
1652         
1653         * platform/gtk/MIMETypeRegistryGtk.cpp:
1654         (WebCore::):
1655         * platform/wx/MimeTypeRegistryWx.cpp:
1656         (WebCore::):
1657
1658 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
1659
1660         Reviewed by Kevin Ollivier.
1661
1662         Implement basic text paste support in wx and add notImplemented stubs
1663         to catch other methods.
1664         
1665         https://bugs.webkit.org/show_bug.cgi?id=22667
1666
1667         * platform/wx/PasteboardWx.cpp:
1668         (WebCore::Pasteboard::canSmartReplace):
1669         (WebCore::Pasteboard::plainText):
1670         (WebCore::Pasteboard::documentFragment):
1671         (WebCore::Pasteboard::writeImage):
1672
1673 2008-12-04  Kevin Ollivier  <kevino@theolliviers.com>
1674
1675         wx build fix for !USE(WXGC) build config.
1676
1677         * platform/graphics/wx/PathWx.cpp:
1678         (WebCore::Path::contains):
1679         (WebCore::Path::addLineTo):
1680         (WebCore::Path::addQuadCurveTo):
1681         (WebCore::Path::addBezierCurveTo):
1682         (WebCore::Path::addArcTo):
1683         (WebCore::Path::closeSubpath):
1684         (WebCore::Path::addArc):
1685         (WebCore::Path::addRect):
1686         (WebCore::Path::addEllipse):
1687         (WebCore::Path::transform):
1688         (WebCore::Path::apply):
1689         (WebCore::Path::isEmpty):
1690
1691 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
1692
1693         Reviewed by Kevin Ollivier.
1694
1695         Turn off styled controls until we can implement them properly.
1696         
1697         https://bugs.webkit.org/show_bug.cgi?id=22662
1698
1699         * platform/wx/RenderThemeWx.cpp:
1700         (WebCore::RenderThemeWx::isControlStyled):
1701
1702 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
1703
1704         Reviewed by Kevin Ollivier.
1705
1706         wx implementations for Path API.
1707
1708         https://bugs.webkit.org/show_bug.cgi?id=22661
1709
1710         * platform/graphics/wx/PathWx.cpp:
1711         (WebCore::Path::~Path):
1712         (WebCore::Path::contains):
1713         (WebCore::Path::addLineTo):
1714         (WebCore::Path::addQuadCurveTo):
1715         (WebCore::Path::addBezierCurveTo):
1716         (WebCore::Path::addArcTo):
1717         (WebCore::Path::closeSubpath):
1718         (WebCore::Path::addArc):
1719         (WebCore::Path::addRect):
1720         (WebCore::Path::addEllipse):
1721         (WebCore::Path::transform):
1722         (WebCore::Path::isEmpty):
1723
1724 2008-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
1725
1726         Reviewed by Eric Seidel.
1727
1728         Bug 22564: Make HTML elements' constructors take a QualifiedName
1729         https://bugs.webkit.org/show_bug.cgi?id=22564
1730
1731         Updated the remaining constructors.
1732
1733         * bindings/js/JSImageConstructor.cpp:
1734         (WebCore::constructImage):
1735         * dom/Document.cpp:
1736         (WebCore::Document::getCSSCanvasElement):
1737         * editing/DeleteButton.cpp:
1738         (WebCore::DeleteButton::DeleteButton):
1739         * html/HTMLAppletElement.cpp:
1740         (WebCore::HTMLAppletElement::HTMLAppletElement):
1741         * html/HTMLAppletElement.h:
1742         * html/HTMLAreaElement.cpp:
1743         (WebCore::HTMLAreaElement::HTMLAreaElement):
1744         * html/HTMLAreaElement.h:
1745         * html/HTMLBaseFontElement.cpp:
1746         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
1747         * html/HTMLBaseFontElement.h:
1748         * html/HTMLCanvasElement.cpp:
1749         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1750         * html/HTMLCanvasElement.h:
1751         * html/HTMLElementFactory.cpp:
1752         (WebCore::hrConstructor):
1753         (WebCore::paragraphConstructor):
1754         (WebCore::basefontConstructor):
1755         (WebCore::fontConstructor):
1756         (WebCore::anchorConstructor):
1757         (WebCore::imageConstructor):
1758         (WebCore::mapConstructor):
1759         (WebCore::areaConstructor):
1760         (WebCore::canvasConstructor):
1761         (WebCore::appletConstructor):
1762         (WebCore::embedConstructor):
1763         (WebCore::objectConstructor):
1764         (WebCore::paramConstructor):
1765         (WebCore::scriptConstructor):
1766         (WebCore::tableConstructor):
1767         (WebCore::tableCaptionConstructor):
1768         (WebCore::tableRowConstructor):
1769         * html/HTMLEmbedElement.cpp:
1770         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
1771         * html/HTMLEmbedElement.h:
1772         * html/HTMLFontElement.cpp:
1773         (WebCore::HTMLFontElement::HTMLFontElement):
1774         * html/HTMLFontElement.h:
1775         * html/HTMLHRElement.cpp:
1776         (WebCore::HTMLHRElement::HTMLHRElement):
1777         * html/HTMLHRElement.h:
1778         * html/HTMLImageElement.cpp:
1779         (WebCore::HTMLImageElement::HTMLImageElement):
1780         * html/HTMLImageElement.h:
1781         * html/HTMLMapElement.cpp:
1782         (WebCore::HTMLMapElement::HTMLMapElement):
1783         * html/HTMLMapElement.h:
1784         * html/HTMLObjectElement.cpp:
1785         (WebCore::HTMLObjectElement::HTMLObjectElement):
1786         * html/HTMLObjectElement.h:
1787         * html/HTMLParagraphElement.cpp:
1788         (WebCore::HTMLParagraphElement::HTMLParagraphElement):
1789         * html/HTMLParagraphElement.h:
1790         * html/HTMLParamElement.cpp:
1791         (WebCore::HTMLParamElement::HTMLParamElement):
1792         * html/HTMLParamElement.h:
1793         * html/HTMLParser.cpp:
1794         (WebCore::HTMLParser::handleError):
1795         (WebCore::HTMLParser::mapCreateErrorCheck):
1796         (WebCore::HTMLParser::handleIsindex):
1797         * html/HTMLScriptElement.cpp:
1798         (WebCore::HTMLScriptElement::HTMLScriptElement):
1799         * html/HTMLScriptElement.h:
1800         * html/HTMLTableCaptionElement.cpp:
1801         (WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
1802         * html/HTMLTableCaptionElement.h:
1803         * html/HTMLTableElement.cpp:
1804         (WebCore::HTMLTableElement::HTMLTableElement):
1805         (WebCore::HTMLTableElement::createCaption):
1806         (WebCore::HTMLTableElement::insertRow):
1807         * html/HTMLTableElement.h:
1808         * html/HTMLTableRowElement.cpp:
1809         (WebCore::HTMLTableRowElement::HTMLTableRowElement):
1810         * html/HTMLTableRowElement.h:
1811         * html/HTMLTableSectionElement.cpp:
1812         (WebCore::HTMLTableSectionElement::insertRow):
1813         * html/HTMLViewSourceDocument.cpp:
1814         (WebCore::HTMLViewSourceDocument::createContainingTable):
1815         (WebCore::HTMLViewSourceDocument::addLine):
1816         * loader/ImageDocument.cpp:
1817         (WebCore::ImageDocumentElement::ImageDocumentElement):
1818
1819 2008-12-04  Eric Seidel  <eric@webkit.org>
1820
1821         No review, build fix only.
1822
1823         Add file missing from last commit.
1824
1825         * bindings/js/ScriptState.h: Added.
1826
1827 2008-12-04  Dimitri Glazkov  <dglazkov@chromium.org>
1828
1829         Reviewed by Geoff Garen.
1830
1831         Implement ScriptState abstraction (initially, a simple typedef)
1832         as means of carrying exception information across bindings boundaries
1833         and in a script engine-independent way.
1834
1835         * WebCore.vcproj/WebCore.vcproj:
1836         * WebCore.xcodeproj/project.pbxproj:
1837         * bindings/js/JSDOMBinding.cpp:
1838         (WebCore::scriptStateFromNode):
1839         * bindings/js/JSDOMBinding.h:
1840         * bindings/js/JSNodeFilterCondition.h:
1841         * bindings/js/ScriptState.h: Added.
1842         * dom/NodeFilter.cpp:
1843         (WebCore::NodeFilter::acceptNode):
1844         * dom/NodeFilter.h:
1845         (WebCore::NodeFilter::acceptNode):
1846         * dom/NodeFilterCondition.cpp:
1847         (WebCore::NodeFilterCondition::acceptNode):
1848         * dom/NodeFilterCondition.h:
1849         * dom/NodeIterator.cpp:
1850         (WebCore::NodeIterator::nextNode):
1851         (WebCore::NodeIterator::previousNode):
1852         * dom/NodeIterator.h:
1853         (WebCore::NodeIterator::nextNode):
1854         (WebCore::NodeIterator::previousNode):
1855         * dom/Traversal.cpp:
1856         (WebCore::Traversal::acceptNode):
1857         * dom/Traversal.h:
1858         * dom/TreeWalker.cpp:
1859         (WebCore::TreeWalker::parentNode):
1860         (WebCore::TreeWalker::firstChild):
1861         (WebCore::TreeWalker::lastChild):
1862         (WebCore::TreeWalker::previousSibling):
1863         (WebCore::TreeWalker::nextSibling):
1864         (WebCore::TreeWalker::previousNode):
1865         (WebCore::TreeWalker::nextNode):
1866         * dom/TreeWalker.h:
1867         (WebCore::TreeWalker::parentNode):
1868         (WebCore::TreeWalker::firstChild):
1869         (WebCore::TreeWalker::lastChild):
1870         (WebCore::TreeWalker::previousSibling):
1871         (WebCore::TreeWalker::nextSibling):
1872         (WebCore::TreeWalker::previousNode):
1873         (WebCore::TreeWalker::nextNode):
1874
1875 2008-12-04  Pierre-Olivier Latour  <pol@apple.com>
1876
1877         Reviewed by Dan Bernstein.
1878
1879         Fixed pauseTransitionAtTimeOnElementWithId() in DRT asserting when passed invalid property name
1880         and potential similar issue with pauseAnimationAtTimeOnElementWithId().
1881
1882         https://bugs.webkit.org/show_bug.cgi?id=22641
1883
1884         * page/animation/CompositeAnimation.cpp:
1885         (WebCore::CompositeAnimationPrivate::pauseAnimationAtTime):
1886         (WebCore::CompositeAnimationPrivate::pauseTransitionAtTime):
1887
1888 2008-12-04  Dimitri Glazkov  <dglazkov@chromium.org>
1889
1890         Reviewed by Darin Adler.
1891
1892         Remove unused Completion.h include.
1893
1894         * html/CanvasRenderingContext2D.cpp: Removed Completion.h include.
1895
1896 2008-11-13  David Hyatt  <hyatt@apple.com>
1897
1898         Fix a bug in ScrollView's refactoring.  An isVisible check should have been isSelfVisible.
1899
1900         Reviewed by Darin Adler
1901
1902         * platform/ScrollView.cpp:
1903         (WebCore::ScrollView::setParentVisible):
1904
1905 2008-12-04  Friedemann Kleint  <friedemann.kleint@nokia.com>
1906
1907         Reviewed by Tor Arne Vestbø.
1908
1909         Fix small translation glitch in the Qt file chooser.
1910
1911         * platform/qt/FileChooserQt.cpp:
1912         (WebCore::FileChooser::basenameForWidth):
1913
1914 2008-12-04  Tor Arne Vestbø  <tavestbo@trolltech.com>
1915
1916         Rubber-stamped by Simon Hausmann.
1917
1918         Blacklist Silverlight plugin on Qt/Mac until supported
1919
1920         Currently the plugin crashes with a corrupted stack trace, possibly
1921         related to https://bugs.webkit.org/show_bug.cgi?id=20635
1922
1923         * plugins/mac/PluginPackageMac.cpp:
1924         (WebCore::PluginPackage::fetchInfo):
1925         (WebCore::PluginPackage::isPluginBlacklisted):
1926
1927 2008-12-03  Dmitry Titov  <dimich@chromium.org>
1928
1929         Reviewed by Alexey Proskuryakov.
1930
1931         Fix non-Mac build.
1932
1933         * page/Chrome.cpp: (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
1934
1935 2008-12-03  David Levin  <levin@chromium.org>
1936
1937         Reviewed by Alexey Proskuryakov.
1938
1939         Remove uses of document() in XMLHttpRequest where simple.
1940         https://bugs.webkit.org/show_bug.cgi?id=22619
1941
1942         * xml/XMLHttpRequest.cpp:
1943         (WebCore::XMLHttpRequest::responseXML):
1944         Return NULL in the worker case which is according to spec (and avoids using document()).
1945
1946         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1947         (WebCore::XMLHttpRequest::initSend):
1948         Use scriptExecutionContext() instead of document().
1949
1950 2008-12-03  David Levin  <levin@chromium.org>
1951
1952         Reviewed by Alexey Proskuryakov.
1953
1954         Make ScriptExecutionContextTaskWorkerTask::performTask a pure virtual function.
1955         https://bugs.webkit.org/show_bug.cgi?id=22642
1956
1957         * dom/Document.cpp:
1958         (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
1959         (WebCore::ScriptExecutionContextTaskTimer::fired):
1960         (WebCore::PerformTaskContext::PerformTaskContext):
1961         (WebCore::performTask):
1962         (WebCore::Document::postTask):
1963         * dom/Document.h:
1964         * dom/ScriptExecutionContext.cpp:
1965         * dom/ScriptExecutionContext.h:
1966         * dom/WorkerContext.cpp:
1967         (WebCore::ScriptExecutionContextTaskWorkerTask::create):
1968         (WebCore::ScriptExecutionContextTaskWorkerTask::ScriptExecutionContextTaskWorkerTask):
1969         (WebCore::ScriptExecutionContextTaskWorkerTask::performTask):
1970         (WebCore::WorkerContext::postTask):
1971         * dom/WorkerContext.h:
1972
1973 2008-12-03  Dmitry Titov  <dimich@chromium.org>
1974
1975         Reviewed by Alexey Proskuryakov.
1976
1977         Using ActiveDOMObject as base class for DOMTimer.
1978         https://bugs.webkit.org/show_bug.cgi?id=22620
1979
1980         Using ActiveDOMObject simplifies the code because ActiveDOMObject
1981         is wired for stop/pause/resume on loading/unloading/caching the page etc
1982         so the timer-specific code that does the same can be removed.
1983         In addition, timers can be now paused/resumed 'in place' which
1984         makes it unnecessary to 'serialize' them into special PausedTimeouts
1985         instance, so pause/resumeTimeouts implementation in JSDOMWindowBase can also be removed.
1986         Also, moving TimeoutMap from JSDOMWindowBase to Document matches lifetime
1987         of timeouts and makes it possible to not roundtrip them via PausedTimeouts 
1988         every time when JSDOMWindow wrapper is destroyed while the page is in the b/f cache.
1989
1990         Timeouts are now paused with other ActiveDOMObjects:
1991         - before creating CachedPage in FrameLoader::commitProvisionalLoad()
1992         - in JavaScriptDebugServer::setJavaScriptPaused
1993         - during modal UI operations in Chrome::*
1994         this is equivalent to previous usage of JSDOMWindowBase::pauseTimeouts()
1995
1996         Timeouts are stopped to prevent future firing from:
1997         - FrameLoader::clear()
1998         - FrameLoader::frameDetached()
1999         this is equivalent to previous usage of JSDOMWindowBase::clearAllTimeouts()
2000
2001         This is also one of the steps to having timers in Workers. See the plan of
2002         the next steps in the bug above.
2003
2004         * bindings/js/DOMTimer.cpp:
2005         (WebCore::DOMTimer::DOMTimer):
2006         (WebCore::DOMTimer::fired):
2007         (WebCore::DOMTimer::hasPendingActivity):
2008         (WebCore::DOMTimer::contextDestroyed):
2009         (WebCore::DOMTimer::stop):
2010         (WebCore::DOMTimer::suspend):
2011         (WebCore::DOMTimer::resume):
2012         (WebCore::DOMTimer::canSuspend): Implemented ActiveDOMObject methods.
2013
2014         * bindings/js/DOMTimer.h:
2015         * bindings/js/JSDOMBinding.cpp: ActiveDOMObject can have no JS wrapper
2016         (WebCore::markActiveObjectsForContext): 
2017
2018         * bindings/js/JSDOMWindowBase.cpp:
2019         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
2020         (WebCore::JSDOMWindowBase::clear):
2021         (WebCore::JSDOMWindowBase::installTimeout):
2022         (WebCore::JSDOMWindowBase::removeTimeout):
2023         (WebCore::JSDOMWindowBase::timerFired):
2024         (WebCore::JSDOMWindowBase::disconnectFrame):
2025         * bindings/js/JSDOMWindowBase.h:
2026         * bindings/js/ScriptController.cpp:
2027         * bindings/js/ScriptController.h:
2028
2029         * dom/Document.cpp: Document now holds a hash map id->timeout
2030         (WebCore::Document::addTimeout):
2031         (WebCore::Document::removeTimeout):
2032         (WebCore::Document::findTimeout):
2033         * dom/Document.h:
2034         * history/CachedPage.cpp:
2035         (WebCore::CachedPage::CachedPage):
2036         (WebCore::CachedPage::restore):
2037         (WebCore::CachedPage::clear):
2038         * history/CachedPage.h:
2039         * inspector/JavaScriptDebugServer.cpp:
2040         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
2041         (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
2042         * inspector/JavaScriptDebugServer.h:
2043
2044         * loader/FrameLoader.cpp:
2045         (WebCore::FrameLoader::commitProvisionalLoad): 
2046         removed clearAllTimeouts since all ActiveDOMObjects will be stopped in FrameLoader::clear();
2047         I don't see how the old comment can be correct - the code in the same method proceeds to invoke 'onunload'
2048         and then calls into client which can be external code and can cause any active object created in onunload
2049         to fire. We can stop them all before firing onunload but it does not make a lot of sense.
2050         I have a test to go with the next patch which verifies that timers set in onunload do not fire.
2051
2052         (WebCore::FrameLoader::open):
2053         * page/Chrome.cpp:
2054         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2055         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2056
2057 2008-12-03  Justin Garcia  <justin.garcia@apple.com>
2058
2059         Reviewed by Beth Dakin.
2060
2061         <rdar://problem/6018653> Extra blank line when pasting paragraph in plain text
2062         
2063         In SnowLeopard, Mail occasionally adds an empty, unstyled paragraph at the
2064         end of pasted content so that users don't get stuck with non-standard pargraph
2065         spacing.  This content threw off our handling of interchange newlines.  Any interchange
2066         newline, regardless of it's position in the incoming fragment was considered to be
2067         "at the start" of the fragment, and would result in us inserting in a newline before 
2068         inserted content.  This patch makes the checks for interchange newlines more strict, 
2069         and treats interchange newlines found elsewhere as normal <br>s.
2070
2071         * editing/ReplaceSelectionCommand.cpp:
2072         (WebCore::ReplacementFragment::ReplacementFragment):
2073         (WebCore::ReplacementFragment::removeInterchangeNodes):
2074         * editing/VisiblePosition.cpp:
2075         (WebCore::VisiblePosition::init):
2076         (WebCore::VisiblePosition::canonicalPosition):
2077         * editing/VisiblePosition.h:
2078
2079 2008-12-03  Eric Seidel  <eric@webkit.org>
2080
2081         Rubber-stamped by David Hyatt.
2082
2083         Bring the WebCore chromium build a couple steps closer to building.
2084
2085         * WebCore.scons:
2086
2087 2008-12-03  Kevin Ollivier  <kevino@theolliviers.com>
2088
2089         wx build fix.
2090
2091         * WebCoreSources.bkl:
2092
2093 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2094
2095         Reviewed by George Staikos.
2096
2097         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22636
2098
2099         Implement WML variable substitution & validation.
2100         Created a framework for scriptable WML layout tests, that are able to test variable substiution & validation.
2101
2102         Tests: wml/variable-reference-invalid-character.html
2103                wml/variable-reference-valid.html
2104
2105         * wml/WMLVariables.cpp:
2106         (WebCore::isValidFirstVariableNameCharacter):
2107         (WebCore::isValidVariableNameCharacter):
2108         (WebCore::isValidVariableEscapingModeString):
2109         (WebCore::isValidVariableName):
2110         (WebCore::containsVariableReference):
2111         (WebCore::substituteVariableReferences):
2112         * wml/WMLVariables.h:
2113
2114 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2115
2116         Reviewed by Cameron Zwarich.
2117
2118         Further preparations for WML layout tests.
2119         - Enable variable substitution in Text.cpp - if the parent is a WMLElement derived class.
2120         - Dump WMLMessageSource messages to the console, just like it's done for JSMessageSource
2121         - Add helper method in Document.idl, to reset the WML page state to a well-known default state.
2122           (will be used in the upcoming LayoutTests/wml testcases)
2123
2124          * dom/Document.cpp:
2125         (WebCore::Document::resetWMLPageState):
2126         * dom/Document.h:
2127         * dom/Document.idl:
2128         * dom/Text.cpp:
2129         (WebCore::Text::insertedIntoDocument):
2130         * dom/Text.h:
2131         * page/Console.cpp:
2132         (WebCore::Console::addMessage):
2133         * wml/WMLPageState.h: Readd heper function
2134         (WebCore::WMLPageState::hasVariables):
2135
2136 2008-12-03  Antti Koivisto  <antti@apple.com>
2137
2138         Reviewed by Sam Weinig.
2139
2140         Don't leak selectors in case selector list parsing failed.
2141
2142         * css/CSSGrammar.y:
2143         * css/CSSParser.cpp:
2144         (WebCore::CSSParser::~CSSParser):
2145
2146 2008-12-03  Chris Marrin  <cmarrin@apple.com>
2147
2148         Reviewed by Dave Hyatt.
2149
2150         Fix https://bugs.webkit.org/show_bug.cgi?id=22520
2151
2152         This is a regression (causes a crash of LayoutTests/animations/transform-animation-event-destroy-element.html).
2153         This patch fixes the testcase.
2154
2155         This is another case of animations getting destroyed in the end animation callback and causing dangling
2156         pointers on return. This one involves iterating over the CompositeAnimation, which has been destroyed.
2157         So I now check for a null m_object pointer (which is nullified when the CompositeAnimation is destroyed)
2158         and skip that call.
2159
2160         * page/animation/AnimationBase.cpp:
2161         (WebCore::AnimationBase::updateStateMachine):
2162
2163 2008-12-03  Antti Koivisto  <antti@apple.com>
2164
2165         Reviewed by Darin Adler.
2166
2167         https://bugs.webkit.org/show_bug.cgi?id=22379
2168         Make CSSOM use less memory
2169
2170         Reduce size of the CSSSelector by one more pointer by using an array
2171         instead of a linked list to store them.
2172
2173         * WebCore.xcodeproj/project.pbxproj:
2174         * css/CSSGrammar.y:
2175         * css/CSSParser.cpp:
2176         (WebCore::CSSParser::CSSParser):
2177         (WebCore::CSSParser::parseSelector):
2178         (WebCore::CSSParser::createStyleRule):
2179         * css/CSSParser.h:
2180         (WebCore::CSSParser::reusableSelectorVector):
2181         * css/CSSSelector.h:
2182         (WebCore::CSSSelector::CSSSelector):
2183         (WebCore::CSSSelector::~CSSSelector):
2184         (WebCore::CSSSelector::isLastInSelectorList):
2185         (WebCore::CSSSelector::setLastInSelectorList):
2186         * css/CSSStyleRule.cpp:
2187         (WebCore::CSSStyleRule::CSSStyleRule):
2188         (WebCore::CSSStyleRule::~CSSStyleRule):
2189         (WebCore::CSSStyleRule::selectorText):
2190         * css/CSSStyleRule.h:
2191         (WebCore::CSSStyleRule::adoptSelectorVector):
2192         (WebCore::CSSStyleRule::selectorList):
2193         * css/CSSStyleSelector.cpp:
2194         (WebCore::CSSRuleSet::addRulesFromSheet):
2195         * dom/Node.cpp:
2196         (WebCore::forEachSelector):
2197         (WebCore::selectorNeedsNamespaceResolution):
2198         (WebCore::Node::querySelector):
2199         (WebCore::Node::querySelectorAll):
2200         * dom/SelectorNodeList.cpp:
2201         (WebCore::createSelectorNodeList):
2202         * dom/SelectorNodeList.h:
2203
2204 2008-12-03  Alexey Proskuryakov  <ap@webkit.org>
2205
2206         Reviewed by Darin Adler.
2207
2208         https://bugs.webkit.org/show_bug.cgi?id=22630
2209         Assertion failure in XMLHttpRequest::contextDestroyed
2210
2211         Test: http/tests/xmlhttprequest/close-window.html
2212
2213         * loader/FrameLoader.cpp:
2214         (WebCore::FrameLoader::clear):
2215         (WebCore::FrameLoader::commitProvisionalLoad):
2216         Move stopping active objects to clear(), so that closing a window is also covered.
2217
2218         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::abort): Protect the object in abort(),
2219         because internalAbort() deref()'s.
2220
2221 2008-12-03  Dean Jackson  <dino@apple.com>
2222
2223         Reviewed by Dan Bernstein.
2224
2225         Implement CSS 3 <angle> turn unit and support it
2226         in rotations.
2227         https://bugs.webkit.org/show_bug.cgi?id=22497
2228
2229         * css/CSSGrammar.y:
2230         * css/CSSParser.cpp:
2231         (WebCore::CSSParser::validUnit):
2232         (WebCore::unitFromString):
2233         (WebCore::CSSParser::lex):
2234         * css/CSSPrimitiveValue.cpp:
2235         (WebCore::CSSPrimitiveValue::cssText):
2236         (WebCore::CSSPrimitiveValue::parserValue):
2237         * css/CSSPrimitiveValue.h:
2238         (WebCore::CSSPrimitiveValue::):
2239         * css/CSSStyleSelector.cpp:
2240         (WebCore::CSSStyleSelector::createTransformOperations):
2241         * css/tokenizer.flex:
2242
2243 2008-12-03  Dirk Schulze  <krit@webkit.org>
2244
2245         Reviewed by Nikolas Zimmermann.
2246
2247         Make use of the gradient code in GraphicsContext and get rid of most of the
2248         platform dependent code.
2249
2250         SVG should use the new Gradient support on GraphicsContext
2251         https://bugs.webkit.org/show_bug.cgi?id=20543
2252
2253         * GNUmakefile.am:
2254         * WebCore.pro:
2255         * WebCore.vcproj/WebCore.vcproj:
2256         * WebCore.xcodeproj/project.pbxproj:
2257         * platform/graphics/FloatSize.h:
2258         (WebCore::FloatSize::shrunkTo):
2259         * svg/SVGLinearGradientElement.cpp:
2260         (WebCore::SVGLinearGradientElement::buildGradient):
2261         * svg/SVGRadialGradientElement.cpp:
2262         (WebCore::SVGRadialGradientElement::buildGradient):
2263         * svg/graphics/SVGPaintServer.h:
2264         * svg/graphics/SVGPaintServerGradient.cpp:
2265         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
2266         (WebCore::SVGPaintServerGradient::~SVGPaintServerGradient):
2267         (WebCore::SVGPaintServerGradient::gradient):
2268         (WebCore::SVGPaintServerGradient::setGradient):
2269         (WebCore::findTextRootObject):
2270         (WebCore::createMaskAndSwapContextForTextGradient):
2271         (WebCore::clipToTextMask):
2272         (WebCore::SVGPaintServerGradient::setup):
2273         (WebCore::SVGPaintServerGradient::renderPath):
2274         (WebCore::SVGPaintServerGradient::teardown):
2275         * svg/graphics/SVGPaintServerGradient.h:
2276         (WebCore::SVGPaintServerGradient::setGradientStops):
2277         (WebCore::SVGPaintServerGradient::gradientStops):
2278         * svg/graphics/SVGPaintServerLinearGradient.h:
2279         * svg/graphics/SVGPaintServerRadialGradient.h:
2280         * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp: Removed.
2281         * svg/graphics/cg/SVGPaintServerCg.cpp:
2282         * svg/graphics/cg/SVGPaintServerGradientCg.cpp: Removed.
2283         * svg/graphics/qt/SVGPaintServerGradientQt.cpp: Removed.
2284         * svg/graphics/qt/SVGPaintServerLinearGradientQt.cpp: Removed.
2285         * svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp: Removed.
2286
2287 2008-12-03  Sam Weinig  <sam@webkit.org>
2288
2289         Reviewed by Mark Rowe.
2290
2291         Fix formatting.
2292
2293         * css/CSSSelector.h:
2294         (WebCore::CSSSelector::createRareData):
2295
2296 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2297
2298         Reviewed by Adam Roben.
2299
2300         As Adam Roben noticed, synchronize MessageSource enum with Console.js, and add a comment.
2301
2302         * inspector/front-end/Console.js:
2303         * page/Console.h:
2304
2305 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2306
2307         Reviewed by Alexey Proskuryakov.
2308
2309         Next steps to make LayoutTests work:
2310         Never access the main frame from WMLRefreshElement/WMLCardElement, but
2311         the current documents frame (WML layout tests will run in an <iframe>)
2312
2313         Prepare WMLErrorHandling for the case that no tokenizer is available anymore
2314         -> report errors through Console::addMessage(), so they get logged in the
2315            expected layout test results.
2316
2317         * wml/WMLCardElement.cpp:
2318         (WebCore::WMLCardElement::setActiveCardInDocument):
2319         * wml/WMLErrorHandling.cpp:
2320         (WebCore::reportWMLError):
2321         (WebCore::errorMessageForErrorCode):
2322         * wml/WMLErrorHandling.h:
2323         * wml/WMLRefreshElement.cpp:
2324         (WebCore::WMLRefreshElement::executeTask):
2325         * page/Console.cpp: Handle WMLMessageSource.
2326         (WebCore::printMessageSourceAndLevelPrefix):
2327         * page/Console.h: Add WMLMessageSource.
2328         (WebCore::):
2329
2330 2008-12-03  Tor Arne Vestbø  <tavestbo@trolltech.com>
2331
2332         Reviewed by Simon Hausmann.
2333
2334         Allow passing jsNull and jsUndefined to Qt plugins
2335
2336         Currently limited to functions with QString and QVariant arguments,
2337         and properties of these types. Both jsNull and jsUndefined ends up
2338         as default-constructed QStrings and QVariants, which means you can
2339         check for isEmpty() and isValid() in the native plugin code.
2340
2341         Based on patches by Jade Han <jade.han@nokia.com>
2342
2343         * bridge/qt/qt_runtime.cpp:
2344         (JSC::Bindings::convertValueToQVariant):
2345         (JSC::Bindings::findMethodIndex):
2346
2347 2008-12-03  Trenton Schulz  <trenton.schulz@nokia.com>
2348
2349         Reviewed by Simon Hausmann.
2350
2351         Fix the build with Qt for Mac OS X.
2352
2353         * platform/PurgeableBuffer.h: Use the dummy wrappers for now.
2354
2355 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2356
2357         Reviewed by Alexey Proskuryakov.
2358
2359         Fix error handling in WMLSetvarElement. If an invalid variable reference is contained
2360         in the 'name' attribute of <setvar>, a 'WMLErrorInvalidVariableName' error should be
2361         reported, instead of 'WMLErrorInvalidVariableReference'.
2362
2363         * wml/WMLElement.cpp:
2364         (WebCore::WMLElement::parseValueSubstitutingVariableReferences):
2365         (WebCore::WMLElement::parseValueForbiddingVariableReferences):
2366         * wml/WMLElement.h:
2367         * wml/WMLSetvarElement.cpp:
2368         (WebCore::WMLSetvarElement::parseMappedAttribute):
2369         * wml/WMLSetvarElement.h:
2370         (WebCore::WMLSetvarElement::name):
2371         (WebCore::WMLSetvarElement::value):
2372
2373 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2374
2375         Reviewed by Alexey Proskuryakov.
2376
2377         Preparations to get WML layout tests going.
2378         Make WMLPageState an OwnPtr to Page, and let Page create it on demand.
2379
2380         * page/Page.cpp:
2381         (WebCore::Page::Page):
2382         (WebCore::Page::wmlPageState):
2383         * page/Page.h:
2384         * wml/WMLDocument.cpp:
2385         (WebCore::WMLDocument::WMLDocument):
2386         (WebCore::WMLDocument::finishedParsing):
2387         (WebCore::wmlPageStateForDocument):
2388         * wml/WMLPageState.h: Don't inherit from RefCounted anymore.
2389         (WebCore::WMLPageState::hasVariables): Remove helper function.
2390
2391 2008-12-03  Alexey Proskuryakov  <ap@webkit.org>
2392
2393         Reviewed by Mark Rowe.
2394
2395         https://bugs.webkit.org/show_bug.cgi?id=22627
2396         fast/workers/worker-terminate.html fails randomly
2397
2398         The problem is that worker termination uses script timeouts, so an InterruptedExecutionError
2399         is raised, and it sometimes reaches the main thread.
2400
2401         * dom/WorkerMessagingProxy.cpp:
2402         (WebCore::WorkerExceptionTask::create):
2403         (WebCore::WorkerExceptionTask::WorkerExceptionTask):
2404         (WebCore::WorkerExceptionTask::performTask):
2405         (WebCore::WorkerMessagingProxy::postWorkerException):
2406         * dom/WorkerMessagingProxy.h:
2407         Ignore exceptions that happen in terminated workers.
2408
2409 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2410
2411         Reviewed by Alexey Proskuryakov.
2412
2413         Remove some unncessary includes.
2414
2415         * wml/WMLAccessElement.cpp:
2416         * wml/WMLDocument.h:
2417         * wml/WMLRefreshElement.cpp:
2418
2419 2008-12-03  Alexey Proskuryakov  <ap@webkit.org>
2420
2421         Rubber-stamped by Cameron Zwarich and Adam Roben.
2422
2423         Fix a typo: m_executionForbidded.
2424
2425         * bindings/js/WorkerScriptController.cpp:
2426         (WebCore::WorkerScriptController::WorkerScriptController):
2427         (WebCore::WorkerScriptController::evaluate):
2428         (WebCore::WorkerScriptController::forbidExecution):
2429         * bindings/js/WorkerScriptController.h:
2430
2431 2008-12-03  Dean McNamee  <deanm@chromium.org>
2432
2433         Bug 22623: Uninitialized memory access in cache parsing code
2434         <https://bugs.webkit.org/show_bug.cgi?id=22623>
2435
2436         Reviewed by David Kilzer.
2437
2438         Initialize m_haveParsedCacheControlHeader and m_haveParsedPragmaHeader.
2439
2440         * platform/network/ResourceResponseBase.h:
2441         (WebCore::ResourceResponseBase::ResourceResponseBase):
2442
2443 2008-12-03  Antti Koivisto  <antti@apple.com>
2444
2445         Probable build fix.
2446
2447         * WebCoreSources.bkl:
2448
2449 2008-12-03  Antti Koivisto  <antti@apple.com>
2450
2451         Forgot to commit these.
2452
2453         * dom/Node.cpp:
2454         (WebCore::forEachTagSelector):
2455         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2456         (WebCore::Node::querySelector):
2457         * dom/SelectorNodeList.cpp:
2458         (WebCore::createSelectorNodeList):
2459
2460 2008-12-03  Antti Koivisto  <antti@apple.com>
2461
2462         Reviewed by Dan Bernstein and Mark Rowe.
2463
2464         https://bugs.webkit.org/show_bug.cgi?id=22379
2465         Make CSSOM use less memory
2466
2467         Reduce size of the CSSSelector by 3/8 by moving rarely used fields to a rare data
2468         struct. Browsing around with some instrumentation showed that ~0.1% of all selectors
2469         encountered had rare data.
2470         
2471         This also eliminates the CSSNthSelector subclass which will make possible to store
2472         CSSSelectors in an array instead of a linked list for futher memory savings.
2473
2474         * css/CSSGrammar.y:
2475         * css/CSSNthSelector.cpp: Removed.
2476         * css/CSSNthSelector.h: Removed.
2477         * css/CSSParser.cpp:
2478         (WebCore::CSSParser::createFloatingSelector):
2479         * css/CSSParser.h:
2480         * css/CSSSelector.cpp:
2481         (WebCore::CSSSelector::specificity):
2482         (WebCore::CSSSelector::operator==):
2483         (WebCore::CSSSelector::selectorText):
2484         (WebCore::CSSSelector::setTagHistory):
2485         (WebCore::CSSSelector::attribute):
2486         (WebCore::CSSSelector::setAttribute):
2487         (WebCore::CSSSelector::setArgument):
2488         (WebCore::CSSSelector::setSimpleSelector):
2489         (WebCore::CSSSelector::parseNth):
2490         (WebCore::CSSSelector::matchNth):
2491         (WebCore::CSSSelector::RareData::parseNth):
2492         (WebCore::CSSSelector::RareData::matchNth):
2493         * css/CSSSelector.h:
2494         (WebCore::CSSSelector::CSSSelector):
2495         (WebCore::CSSSelector::~CSSSelector):
2496         (WebCore::CSSSelector::tagHistory):
2497         (WebCore::CSSSelector::hasAttribute):
2498         (WebCore::CSSSelector::argument):
2499         (WebCore::CSSSelector::simpleSelector):
2500         (WebCore::CSSSelector::RareData::RareData):
2501         (WebCore::CSSSelector::createRareData):
2502         (WebCore::CSSSelector::):
2503         * css/CSSStyleSelector.cpp:
2504         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
2505         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2506
2507 2008-12-03  Jian Li  <jianli@chromium.org>
2508
2509         Reviewed by Alexey Proskuryakov.
2510
2511         Remove unneeded included file in WorkerThread.cpp.
2512         https://bugs.webkit.org/show_bug.cgi?id=22613
2513
2514         * dom/WorkerThread.cpp: No need to include JSWorkerContext.h.
2515
2516 2008-12-02  Alexey Proskuryakov  <ap@webkit.org>
2517
2518         Reviewed by Maciej Stachowiak.
2519
2520         https://bugs.webkit.org/show_bug.cgi?id=22543
2521         Consolidate ActiveDOMObject page cache interaction
2522
2523         Test: http/tests/xmlhttprequest/abort-on-leaving-page.html
2524
2525         * dom/ActiveDOMObject.cpp:
2526         (WebCore::ActiveDOMObject::canSuspend):
2527         (WebCore::ActiveDOMObject::suspend):
2528         (WebCore::ActiveDOMObject::resume):
2529         * dom/ActiveDOMObject.h:
2530         * dom/ScriptExecutionContext.cpp:
2531         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
2532         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2533         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2534         * dom/ScriptExecutionContext.h:
2535         Added methods for suspending and resuming active objects.
2536
2537         * dom/Worker.cpp:
2538         (WebCore::Worker::canSuspend):
2539         (WebCore::Worker::stop):
2540         * dom/Worker.h:
2541         Workers cannot be suspended yet. This is a change in behavior, as workers used to keep
2542         running until their owner was destroyed.
2543
2544         * loader/FrameLoader.cpp:
2545         (WebCore::FrameLoader::stopLoading): No longer call stopActiveDOMObjects() here, because
2546         their activity is not necessarily loading.
2547         (WebCore::FrameLoader::canCachePage): Can only cache if all active objects can be suspended.
2548         Previously, stopLoading() cancelled outstanding XMLHttpRequests, which made the page
2549         uncacheable due to no-null main document error.
2550         (WebCore::FrameLoader::commitProvisionalLoad): Suspend or stop active objects, depending on
2551         whether the document will be cached.
2552         (WebCore::FrameLoader::frameDetached): Stop active objects to let them clean up before their
2553         context is destroyed.
2554
2555         * xml/XMLHttpRequest.h: added canSuspend().
2556         * xml/XMLHttpRequest.cpp:
2557         (WebCore::XMLHttpRequest::canSuspend): Only XHRs that are not loading can be suspended.
2558         (WebCore::XMLHttpRequest::stop): Call abort() instead of internalAbort() to dispatch events
2559         for Firefox compatibility. This is a change in behavior that helps test that requests do
2560         get aborted.
2561         (WebCore::XMLHttpRequest::contextDestroyed): The request must have been stopped by now, so
2562         assert that.
2563
2564 2008-12-02  Chris Fleizach  <cfleizach@apple.com>
2565
2566         Reviewed by Beth Dakin.
2567
2568         Bug 22606: Can <th> serves as the AXTitleUIElement for <td>?
2569
2570         Test: accessibility/th-as-title-ui.html
2571
2572         * page/AccessibilityObject.h:
2573         (WebCore::AccessibilityObject::isGroup):
2574         * page/AccessibilityRenderObject.cpp:
2575         (WebCore::AccessibilityRenderObject::isGroup):
2576         * page/AccessibilityRenderObject.h:
2577         * page/AccessibilityTableCell.cpp:
2578         (WebCore::AccessibilityTableCell::rowIndexRange):
2579         (WebCore::AccessibilityTableCell::columnIndexRange):
2580         (WebCore::AccessibilityTableCell::titleUIElement):
2581         * page/AccessibilityTableCell.h:
2582         * page/mac/AccessibilityObjectWrapper.mm:
2583         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2584
2585 2008-12-02  Simon Fraser  <simon.fraser@apple.com>
2586
2587         Reviewed by Dave Hyatt
2588
2589         https://bugs.webkit.org/show_bug.cgi?id=22472
2590         
2591         Override absoluteClippedOverflowRect() in RenderReplaced to return a rect
2592         that is large enough to encompass the selection, so that the repainting of
2593         selected replaced elements works correctly.
2594         
2595         Test: fast/repaint/selected-replaced.html
2596
2597         * rendering/RenderReplaced.cpp:
2598         (WebCore::RenderReplaced::selectionRect):
2599         (WebCore::RenderReplaced::localSelectionRect):
2600         (WebCore::RenderReplaced::absoluteClippedOverflowRect):
2601         * rendering/RenderReplaced.h:
2602
2603 2008-12-02  Gregory Hughes  <ghughes@apple.com>
2604
2605         Reviewed by Beth Dakin.
2606
2607         Bug 22513: ZOOM: text selection does not send correct zoom bounds
2608
2609         When zoomed, text selection must send the zoom bounds in flipped
2610         screen coordinates.
2611
2612         * editing/mac/SelectionControllerMac.mm:
2613         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
2614         * page/mac/WebCoreViewFactory.h:
2615
2616 2008-12-02  Dean Jackson  <dino@apple.com>
2617
2618         Reviewed by Sam Weinig.
2619
2620         Remove support for 'now' from CSS (was
2621         erroneously added to transition and animation delay)
2622         https://bugs.webkit.org/show_bug.cgi?id=22571
2623
2624         * css/CSSParser.cpp:
2625         (WebCore::CSSParser::parseAnimationDelay):
2626         * css/CSSStyleSelector.cpp:
2627         (WebCore::CSSStyleSelector::mapAnimationDelay):
2628         * css/CSSValueKeywords.in:
2629
2630 2008-12-02  Eric Seidel  <eric@webkit.org>
2631
2632         Build fix, no review.
2633
2634         Fix the Mac and gtk builds:
2635         Don't use a float to hold a double.
2636         Remove a now duplicate symbol.
2637
2638         * page/Frame.cpp:
2639         (WebCore::Frame::selectionLayoutChanged):
2640         * platform/gtk/TemporaryLinkStubs.cpp:
2641
2642 2008-12-02  Chris Fleizach  <cfleizach@apple.com>
2643
2644         Bug 22596: Some elements don't report AXBlockQuoteLevel
2645         https://bugs.webkit.org/show_bug.cgi?id=22596
2646  
2647         Reviewed by John Sullivan.
2648
2649         * page/mac/AccessibilityObjectWrapper.mm:
2650         (blockquoteLevel):
2651         (AXAttributeStringSetBlockquoteLevel):
2652         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2653         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2654
2655 2008-12-02  Dean McNamee  <deanm@chromium.org>
2656
2657         Reviewed by Eric Seidel.
2658
2659         Correctly handle a theme returning a non-blinking interval.  We should
2660         not set any timers when the interval is 0 (non-blinking), otherwise we
2661         repeatedly set and destroy a blinking timer, causing a paint and timer
2662         storm.  This is applicable to GTK and Windows, where a user can set a
2663         non-blinking caret in their system preferences.
2664
2665         Renamed caretBlinkFrequency to the more accurate caretBlinkInterval.
2666
2667         * page/Frame.cpp:
2668         (WebCore::Frame::selectionLayoutChanged):
2669         * platform/Theme.h:
2670         (WebCore::Theme::caretBlinkInterval):
2671         * platform/gtk/RenderThemeGtk.cpp:
2672         (WebCore::RenderThemeGtk::caretBlinkInterval):
2673         * platform/gtk/RenderThemeGtk.h:
2674         * rendering/RenderTheme.h:
2675         (WebCore::RenderTheme::caretBlinkInterval):
2676
2677 2008-12-02  David Levin  <levin@chromium.org>
2678
2679         Reviewed by Eric Seidel.
2680
2681         https://bugs.webkit.org/show_bug.cgi?id=22538
2682         
2683         startsWith uses find which searches through the whole string if no match is found.
2684         Using reverseFind with an index of 0 has the benefit of only searching for the match
2685         at the beginning of the string.  This may only be a small benefit in the overall program,
2686         but it may help in some cases when the string is big.
2687
2688         No observable change in behavior, so no test.
2689  
2690         * platform/text/StringImpl.h:
2691         (WebCore::StringImpl::startsWith):
2692
2693 2008-10-29  Eric Seidel  <eric@webkit.org>
2694
2695         Reviewed by Darin Adler.
2696
2697         Wrap a JSC-only hack in a USE(JSC) block to fix the v8 build.
2698         https://bugs.webkit.org/show_bug.cgi?id=21951
2699
2700         * svg/SVGElementInstance.cpp:
2701         (WebCore::SVGElementInstance::forgetWrapper):
2702
2703 2008-12-02  Eric Seidel  <eric@webkit.org>
2704
2705         Reviewed by Darin Adler.
2706
2707         Add an ASSERT to try and catch the root cause of:
2708         https://bugs.webkit.org/show_bug.cgi?id=22168
2709         http://code.google.com/p/chromium/issues/detail?id=4122
2710
2711         * editing/TextIterator.cpp:
2712         (WebCore::TextIterator::emitText):
2713
2714 2008-12-02  Brent Fulgham  <bfulgham@gmail.com>
2715
2716         Reviewed by Adam Roben.
2717
2718         Remove some CG-specific code from the Windows Cairo build.
2719         https://bugs.webkit.org/show_bug.cgi?id=22586
2720
2721         No new test cases since this update should create no user-visible
2722         changes, and should be fully covered by the existing regression
2723         tests.
2724
2725         * WebCore.vcproj/WebCore.vcproj: Remove FontDatabase from
2726         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2727         (WebCore::focusRingColor): Add stub method
2728         * platform/win/TemporaryLinkStubs.cpp:
2729         (WebCore::populateFontDatabase): Add stub method.
2730
2731 2008-12-01 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2732
2733         Reviewed by Tor Arne Vestbø.
2734
2735         MinGW compilation fix for PluginPackageWin.cpp
2736
2737         https://bugs.webkit.org/show_bug.cgi?id=22585
2738
2739         * plugins/win/PluginPackageWin.cpp:
2740         (WebCore::PluginPackage::fetchInfo):
2741
2742 2008-12-02  Adam Roben  <aroben@apple.com>
2743
2744         Build fix for Windows projects with NOMINMAX defined globally
2745
2746         * platform/win/COMPtr.h: Don't redefine NOMINMAX if it's already
2747         defined.
2748
2749 2008-12-02  Simon Hausmann  <hausmann@webkit.org>
2750
2751         Reviewed by Tor Arne Vestbø.
2752
2753         Build JavaScriptCore into libQtWebKit.so through a direct build
2754         instead of a static library. When linking a static library into
2755         a shared library qmake generates an incorrect .prl file, which
2756         causes all sorts of different build problems when linking against
2757         QtWebKit. Fixing this in qmake requires bigger changes that are
2758         currently not possible, so we need to work around this limitation
2759         for now. The advantages of the separate build did not outweight the
2760         build problems it caused.
2761
2762         * WebCore.pro: include JavaScriptCore.pri, re-enable prl support
2763         and rename the lut generator to domlut to avoid a conflict with
2764         JavaScriptCore.pri's lut generator.
2765
2766 2008-12-02  David Levin  <levin@chromium.org>
2767
2768         Reviewed by Alexey Proskuryakov.
2769
2770         https://bugs.webkit.org/show_bug.cgi?id=22588
2771         Move securityOrigin() from Document and WorkerContext into ScriptExecutionContext.
2772
2773         No observable change in behavior, so no test.
2774         
2775         * dom/Document.cpp:
2776         (WebCore::Document::open):
2777         (WebCore::Document::domain):
2778         (WebCore::Document::setDomain):
2779         (WebCore::Document::initSecurityContext):
2780         (WebCore::Document::setSecurityOrigin):
2781         * dom/Document.h:
2782         * dom/ScriptExecutionContext.cpp:
2783         (WebCore::ScriptExecutionContext::setSecurityOrigin):
2784         * dom/ScriptExecutionContext.h:
2785         (WebCore::ScriptExecutionContext::securityOrigin):
2786         * dom/WorkerContext.cpp:
2787         (WebCore::WorkerContext::WorkerContext):
2788         * dom/WorkerContext.h:
2789         These changes are for the move of securityOrigin().
2790         
2791         * xml/XMLHttpRequest.cpp:
2792         (WebCore::XMLHttpRequest::createRequest):
2793         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
2794         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
2795         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
2796         (WebCore::XMLHttpRequest::setRequestHeader):
2797         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2798         (WebCore::XMLHttpRequest::getResponseHeader):
2799         (WebCore::XMLHttpRequest::processSyncLoadResults):
2800         (WebCore::XMLHttpRequest::willSendRequest):
2801         (WebCore::XMLHttpRequest::accessControlCheck):
2802         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
2803         Change XMLHttpRequest to use ScriptExecutionContext instead of Document to access securityOrigin().
2804
2805 2008-12-02  André Pönitz  <apoenitz@trolltech.com>
2806
2807         Reviewed by Simon Hausmann.
2808
2809         Disable the creation of debug information for the Qt build when done
2810         inside Qt. With 670 mb it was slowing down gdb start significantly
2811         for third-party applications that usually don't need it.
2812
2813         * WebCore.pro:
2814
2815 2008-12-01  Beth Dakin  <bdakin@apple.com>
2816
2817         Reviewed by Dan Bernstein.
2818
2819         Fix for https://bugs.webkit.org/show_bug.cgi?id=13736 REGRESSION 
2820         (r19811): Using the down arrow in a textarea gets "stuck" at the 
2821         end of a wrapped line
2822         And corresponding: <rdar://problem/5347931>
2823
2824         The basic problem here is that Position::getInlineBoxAndOffset() 
2825         failed to look beyond a single renderer. This patch looks for a 
2826         better match beyond the first renderer when the affinity is 
2827         downstream and we failed to find a "perfect" match. 
2828         * dom/Position.cpp:
2829         (WebCore::isNonTextLeafChild):
2830         (WebCore::searchAheadForBetterMatch):
2831         (WebCore::Position::getInlineBoxAndOffset):
2832
2833         This is a fix I made based on code inspection. It looks like the 
2834         old code here and skipped over the parent as a possible match. 
2835         * rendering/RenderObject.cpp:
2836         (WebCore::RenderObject::nextInPreOrderAfterChildren):
2837
2838 2008-12-01  Brent Fulgham  <bfulgham@gmail.com>
2839
2840         Reviewed by Adam Roben.
2841
2842         Add WML related files to Visual Studio projects.
2843         https://bugs.webkit.org/show_bug.cgi?id=22561
2844
2845         * WebCore.vcproj/WebCore.vcproj:
2846           1. Add files from the wml directory to the set of windows files.
2847           2. Extend include paths with new wml directory. 
2848           3. Add new autogenerated WML files to DerivedSources.
2849           4. Alphabetize preprocesor includes (holdover from earlier debugging).
2850
2851 2008-12-01  Steve Falkenburg  <sfalken@apple.com>
2852
2853         Revise node/selection image fix.
2854         Moved updateLayout call so selection rect is fetched after the layout.
2855         
2856         Reviewed by Adam Roben.
2857
2858         * page/win/FrameCGWin.cpp:
2859         (WebCore::imageFromRect):
2860         (WebCore::imageFromSelection):
2861         (WebCore::Frame::nodeImage):
2862
2863 2008-12-01  Steve Falkenburg  <sfalken@apple.com>
2864
2865         Support needed to implement renderedImage for Windows.
2866         https://bugs.webkit.org/show_bug.cgi?25648
2867
2868         Reviewed by Adam Roben.
2869
2870         * page/Frame.h:
2871         * page/win/FrameCGWin.cpp:
2872         (WebCore::imageFromRect):
2873         (WebCore::imageFromSelection):
2874         (WebCore::Frame::nodeImage):
2875         * page/win/FrameCairoWin.cpp:
2876         (WebCore::imageFromNode):
2877
2878 2008-12-01  Simon Fraser  <simon.fraser@apple.com>
2879
2880         Reviewed by Dan Bernstein
2881
2882         https://bugs.webkit.org/show_bug.cgi?id=22581
2883         
2884         Fix the painting of the caps lock indicator for transformed text inputs,
2885         by replacing a call to absoluteContentBox() with code that computes the
2886         painting rect for the input contents.
2887
2888         * rendering/RenderTextControl.cpp:
2889         (WebCore::RenderTextControl::paint):
2890
2891 2008-12-01  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2892
2893         Reviewed by George Staikos.
2894
2895         Add two new helper functions to WMLElement, parseValueSubstitutingVariableReferences/parseValueForbiddingVariableReferences.
2896
2897         Convert all elements to parse their attribute values using these new helper functions. This simplifies the
2898         actual attribute parsing code in all WMLElement derived classes, as most WML attribute values either report
2899         an error if there's a variable reference used in the attribute value, or if it's invalid.
2900
2901         Split the WMLErrorInvalidVariableReference error which covered both 'invalid syntax' / 'wrong location'
2902         in two seperated error codes: WMLErrorInvalidVariableReference / WMLErrorInvalidVariableReferenceLocation.
2903
2904         * wml/WMLAccessElement.cpp:
2905         (WebCore::WMLAccessElement::parseMappedAttribute):
2906         * wml/WMLDoElement.cpp:
2907         (WebCore::WMLDoElement::defaultEventHandler):
2908         (WebCore::WMLDoElement::parseMappedAttribute):
2909         * wml/WMLElement.cpp:
2910         (WebCore::WMLElement::parseValueSubstitutingVariableReferences):
2911         (WebCore::WMLElement::parseValueForbiddingVariableReferences):
2912         * wml/WMLElement.h:
2913         * wml/WMLErrorHandling.cpp:
2914         (WebCore::reportWMLError):
2915         * wml/WMLErrorHandling.h:
2916         (WebCore::):
2917         * wml/WMLOnEventElement.cpp:
2918         (WebCore::WMLOnEventElement::parseMappedAttribute):
2919         * wml/WMLPrevElement.cpp:
2920         (WebCore::WMLPrevElement::executeTask):
2921         * wml/WMLSetvarElement.cpp:
2922         (WebCore::WMLSetvarElement::parseMappedAttribute):
2923         * wml/WMLTimerElement.cpp:
2924         (WebCore::WMLTimerElement::parseMappedAttribute):
2925
2926 2008-12-01  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2927
2928         Reviewed by George Staikos.
2929
2930         Fix switching active cards within a document. No way to test, until <go> support is implemented.
2931
2932         * wml/WMLCardElement.cpp:
2933         (WebCore::WMLCardElement::showCard):
2934         (WebCore::WMLCardElement::hideCard):
2935         (WebCore::WMLCardElement::setActiveCardInDocument):
2936         * wml/WMLCardElement.h:
2937
2938 2008-12-01  David Kilzer  <ddkilzer@apple.com>
2939
2940         Fix logic error in LegacyWebArchive::create() from r38884.
2941
2942         * loader/archive/cf/LegacyWebArchive.cpp:
2943         (WebCore::LegacyWebArchive::create): Only continue if the
2944         subresource is actually added.
2945
2946 2008-12-01  David Kilzer  <ddkilzer@apple.com>
2947
2948         Bug 22466: REGRESSION (35867): Many resources missing when saving webarchive of webkit.org
2949
2950         <https://bugs.webkit.org/show_bug.cgi?id=22466>
2951         <rdar://problem/6403593>
2952
2953         Reviewed by Brady Eidson.
2954
2955         Test: http/tests/webarchive/test-preload-resources.html
2956
2957         * loader/archive/cf/LegacyWebArchive.cpp:
2958         (WebCore::LegacyWebArchive::create): Check the WebCore cache for
2959         resources if DocumentLoader::subresource() doesn't return them.
2960         Note that the DocumentLoader::subresource() method returned
2961         preloaded resources before r35867, but this caused a regression in
2962         Mail.
2963
2964 2008-12-01  Julien Chaffraix  <jchaffraix@webkit.org>
2965
2966         Reviewed by Eric Seidel.
2967
2968         Bug 22564: Make HTML elements' constructors take a QualifiedName
2969         https://bugs.webkit.org/show_bug.cgi?id=22564
2970
2971         - Modified the remaining HTML elements' constructors to take a QualifiedName.
2972
2973         - Added an assertion that the QualifiedName given corresponds to the element constructed.
2974
2975         * bindings/js/JSAudioConstructor.cpp:
2976         (WebCore::constructAudio):
2977         * html/HTMLAudioElement.cpp:
2978         (WebCore::HTMLAudioElement::HTMLAudioElement):
2979         * html/HTMLAudioElement.h:
2980         * html/HTMLBRElement.cpp:
2981         (WebCore::HTMLBRElement::HTMLBRElement):
2982         * html/HTMLBRElement.h:
2983         * html/HTMLElement.cpp:
2984         (WebCore::HTMLElement::setInnerText):
2985         * html/HTMLElementFactory.cpp:
2986         (WebCore::brConstructor):
2987         (WebCore::quoteConstructor):
2988         (WebCore::marqueeConstructor):
2989         (WebCore::audioConstructor):
2990         (WebCore::videoConstructor):
2991         (WebCore::sourceConstructor):
2992         * html/HTMLMarqueeElement.cpp:
2993         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
2994         * html/HTMLMarqueeElement.h:
2995         * html/HTMLQuoteElement.cpp:
2996         (WebCore::HTMLQuoteElement::HTMLQuoteElement):
2997         * html/HTMLQuoteElement.h:
2998         * html/HTMLSourceElement.cpp:
2999         (WebCore::HTMLSourceElement::HTMLSourceElement):
3000         * html/HTMLSourceElement.h:
3001         * html/HTMLVideoElement.cpp:
3002         (WebCore::HTMLVideoElement::HTMLVideoElement):
3003         * html/HTMLVideoElement.h:
3004         * rendering/RenderTextControl.cpp:
3005         (WebCore::RenderTextControl::updateFromElement):
3006
3007 2008-12-01  Julien Chaffraix  <jchaffraix@webkit.org>
3008
3009         Reviewed by Antti Koivisto.
3010
3011         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
3012         https://bugs.webkit.org/show_bug.cgi?id=22441
3013
3014         Add an assertion to the modified HTML elements' constructor
3015         to check that the QualifiedName parameter is the one that
3016         matches the Element's.
3017
3018         * html/HTMLBaseElement.cpp:
3019         (WebCore::HTMLBaseElement::HTMLBaseElement):
3020         * html/HTMLBlockquoteElement.cpp:
3021         (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
3022         * html/HTMLBodyElement.cpp:
3023         (WebCore::HTMLBodyElement::HTMLBodyElement):
3024         * html/HTMLButtonElement.cpp:
3025         (WebCore::HTMLButtonElement::HTMLButtonElement):
3026         * html/HTMLDListElement.cpp:
3027         (WebCore::HTMLDListElement::HTMLDListElement):
3028         * html/HTMLDirectoryElement.cpp:
3029         (WebCore::HTMLDirectoryElement::HTMLDirectoryElement):
3030         * html/HTMLDivElement.cpp:
3031         (WebCore::HTMLDivElement::HTMLDivElement):
3032         * html/HTMLFieldSetElement.cpp:
3033         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
3034         * html/HTMLFormElement.cpp:
3035         (WebCore::HTMLFormElement::HTMLFormElement):
3036         * html/HTMLFrameElement.cpp:
3037         (WebCore::HTMLFrameElement::HTMLFrameElement):
3038         * html/HTMLFrameSetElement.cpp:
3039         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3040         * html/HTMLHeadElement.cpp:
3041         (WebCore::HTMLHeadElement::HTMLHeadElement):
3042         * html/HTMLHtmlElement.cpp:
3043         (WebCore::HTMLHtmlElement::HTMLHtmlElement):
3044         * html/HTMLIFrameElement.cpp:
3045         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
3046         * html/HTMLInputElement.cpp:
3047         (WebCore::HTMLInputElement::HTMLInputElement):
3048         * html/HTMLIsIndexElement.cpp:
3049         (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
3050         * html/HTMLKeygenElement.cpp:
3051         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3052         * html/HTMLLIElement.cpp:
3053         (WebCore::HTMLLIElement::HTMLLIElement):
3054         * html/HTMLLabelElement.cpp:
3055         (WebCore::HTMLLabelElement::HTMLLabelElement):
3056         * html/HTMLLegendElement.cpp:
3057         (WebCore::HTMLLegendElement::HTMLLegendElement):
3058         * html/HTMLLinkElement.cpp:
3059         (WebCore::HTMLLinkElement::HTMLLinkElement):
3060         * html/HTMLMenuElement.cpp:
3061         (WebCore::HTMLMenuElement::HTMLMenuElement):
3062         * html/HTMLMetaElement.cpp:
3063         (WebCore::HTMLMetaElement::HTMLMetaElement):
3064         * html/HTMLOListElement.cpp:
3065         (WebCore::HTMLOListElement::HTMLOListElement):
3066         * html/HTMLOptGroupElement.cpp:
3067         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
3068         * html/HTMLOptionElement.cpp:
3069         (WebCore::HTMLOptionElement::HTMLOptionElement):
3070         * html/HTMLSelectElement.cpp:
3071         (WebCore::HTMLSelectElement::HTMLSelectElement):
3072         * html/HTMLStyleElement.cpp:
3073         (WebCore::HTMLStyleElement::HTMLStyleElement):
3074         * html/HTMLTextAreaElement.cpp:
3075         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
3076         * html/HTMLTitleElement.cpp:
3077         (WebCore::HTMLTitleElement::HTMLTitleElement):
3078         * html/HTMLUListElement.cpp:
3079         (WebCore::HTMLUListElement::HTMLUListElement):
3080
3081 2008-12-01  Chris Marrin  <cmarrin@apple.com>
3082
3083         Reviewed by Darin Adler.
3084
3085         https://bugs.webkit.org/show_bug.cgi?id=22046
3086
3087         Fixed another case of crashing because the animation object is getting deleted when
3088         it's in the middle of a callback. I actually moved where I am retaining the pointer
3089         up out of the lower level AnimationBase code and into the timer callback that calls
3090         them. So now the pointer is valid throughout the entire sequence of callback code.
3091
3092         The testcase for https://bugs.webkit.org/show_bug.cgi?id=22052 also exhibits a
3093         crash which this patch fixes. 
3094
3095         * page/animation/AnimationBase.cpp:
3096         (WebCore::AnimationBase::updateStateMachine):
3097         (WebCore::AnimationBase::animationTimerCallbackFired):
3098         * page/animation/CompositeAnimation.cpp:
3099         (WebCore::CompositeAnimationPrivate::setAnimationStartTime):
3100         (WebCore::CompositeAnimationPrivate::setTransitionStartTime):
3101         (WebCore::CompositeAnimationPrivate::styleAvailable):
3102         * page/animation/ImplicitAnimation.cpp:
3103         (WebCore::ImplicitAnimation::sendTransitionEvent):
3104         * page/animation/KeyframeAnimation.cpp:
3105         (WebCore::KeyframeAnimation::sendAnimationEvent):
3106         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
3107
3108 2008-12-01  Tor Arne Vestbø  <tavestbo@trolltech.com>
3109
3110         Reviewed by Simon Hausmann.
3111
3112         [Qt/Mac] Initialize NPAPI plugins before getting their entry points
3113
3114         The old behavior (calling NP_GetEntryPoints before NP_Initialize) was
3115         copied from Windows, but caused Silverlight on Mac to crash when loaded.
3116
3117         Apparently the call order of NP_Initialize and NP_GetEntryPoints is
3118         reversed on Mac. See https://bugzilla.mozilla.org/show_bug.cgi?id=344425
3119
3120         Reported-by: Peter Johnson <peter@zattoo.com>
3121
3122         * plugins/mac/PluginPackageMac.cpp:
3123         (WebCore::PluginPackage::load):
3124
3125 2008-11-30  Chris Fleizach  <cfleizach@apple.com>
3126
3127         Reviewed by John Sullivan.
3128
3129         https://bugs.webkit.org/show_bug.cgi?id=22510
3130         Crash at WebCore::AccessibilityRenderObject::activeDescendant() on Google Reader with ARIA (22510)
3131
3132         A nil pointer needed to be checked
3133
3134         * page/AccessibilityRenderObject.cpp:
3135         (WebCore::AccessibilityRenderObject::activeDescendant):
3136
3137 2008-11-30  Alexey Proskuryakov  <ap@webkit.org>
3138
3139         Reviewed by Dan Bernstein.
3140
3141         https://bugs.webkit.org/show_bug.cgi?id=22530
3142         Assertion failures seen on buildbot due to uninitialized WorkerThread::m_threadID
3143
3144         * dom/WorkerThread.cpp:
3145         (WebCore::WorkerThread::start): Protect worker startup with a mutex to ensure that this
3146         function runs to completion before the thread begins execution.
3147         (WebCore::WorkerThread::workerThread): Updated comments.
3148         (WebCore::WorkerThread::stop): Ditto.
3149         * dom/WorkerThread.h: Renamed m_workerContextMutex to m_threadCreationMutex, because it now
3150         protects startup as a whole.
3151
3152         * storage/DatabaseThread.cpp:
3153         * storage/DatabaseThread.h:
3154         * storage/LocalStorageThread.cpp:
3155         * storage/LocalStorageThread.h:
3156         Fixed the same m_threadID problem.
3157
3158 2008-11-29  Brent Fulgham  <bfulgham@gmail.com>
3159
3160         Reviewed by Alexey Proskuryakov.
3161
3162         Remove Visual Studio project dependencies on non-redistributable
3163         components in the Debug_Cairo and Release_Cairo build targets.
3164         See https://bugs.webkit.org/show_bug.cgi?id=22527
3165
3166         * WebCore.vcproj/WebCore.vcproj:
3167
3168 2008-11-29  Sam Weinig  <sam@webkit.org>
3169
3170         Rubber-stamped by Alexey Proskuryakov.
3171
3172         Fix some sorting
3173
3174         * WebCore.xcodeproj/project.pbxproj:
3175
3176 2008-11-28  Sam Weinig  <sam@webkit.org>
3177
3178         Reviewed by Alexey Proskuryakov.
3179
3180         Fix for https://bugs.webkit.org/show_bug.cgi?id=21063
3181         NULL pointer crash in dispatchEvent(null);
3182
3183         Test: fast/events/dispatchEvent-crash.html
3184
3185         * dom/MessagePort.cpp:
3186         (WebCore::MessagePort::dispatchEvent):
3187         * dom/Worker.cpp:
3188         (WebCore::Worker::dispatchEvent):
3189         * dom/WorkerContext.cpp:
3190         (WebCore::WorkerContext::dispatchEvent):
3191         * loader/appcache/DOMApplicationCache.cpp:
3192         (WebCore::DOMApplicationCache::dispatchEvent):
3193         * xml/XMLHttpRequest.cpp:
3194         (WebCore::XMLHttpRequest::dispatchEvent):
3195         * xml/XMLHttpRequestUpload.cpp:
3196         (WebCore::XMLHttpRequestUpload::dispatchEvent):
3197
3198 2008-11-29  Dan Bernstein  <mitz@apple.com>
3199
3200         Reviewed by Alexey Proskuryakov.
3201
3202         - fix https://bugs.webkit.org/show_bug.cgi?id=22454
3203           <rdar://problem/6405550> REGRESSION (3.2-TOT): Crash below FontFallbackList::fontDataAt on jacobian.org
3204
3205         Test: http/tests/misc/font-face-in-multiple-segmented-faces.html
3206
3207         The crash happened because style recalculation was invoked by
3208         CSSFontSelector after one CSSSegmentedFontFace had pruned its tables but
3209         before another CSSSegmentedFontFace using the same CSSFontFace had done
3210         so. The fix is to let all CSSSegmentedFontFaces using the CSSFontFace
3211         prune their tables before telling the CSSFontSelector to recalc style.
3212
3213         * css/CSSFontFace.cpp:
3214         (WebCore::CSSFontFace::fontLoaded):
3215         * css/CSSFontSelector.cpp:
3216         (WebCore::CSSFontSelector::fontLoaded):
3217         * css/CSSFontSelector.h:
3218         * css/CSSSegmentedFontFace.cpp:
3219         (WebCore::CSSSegmentedFontFace::fontLoaded):
3220
3221 2008-11-29  Alexey Proskuryakov  <ap@webkit.org>
3222
3223         Reviewed by Eric Seidel.
3224
3225         https://bugs.webkit.org/show_bug.cgi?id=14968
3226         document.open() erroneously returns void instead of the new Document
3227
3228         Test: fast/dom/HTMLDocument/document-open-return-value.html
3229
3230         * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open):
3231         Return the document on which this method was invoked, per HTML5.
3232
3233 2008-11-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3234
3235         Reviewed by Cameron Zwarich.
3236
3237         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22550
3238
3239         Add <timer> element support. It provides a way to execute a task with a delay.
3240         The user is notified by firing the task associated with the <card>'s ontimer attribute.
3241         Only one timer element is allowed per <card> (fix wrong error message in reportWMLError)
3242
3243         * WebCore.xcodeproj/project.pbxproj:
3244         * wml/WMLCardElement.cpp:
3245         (WebCore::WMLCardElement::WMLCardElement):
3246         (WebCore::WMLCardElement::setIntrinsicEventTimer):
3247         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
3248         * wml/WMLCardElement.h:
3249         * wml/WMLDoElement.cpp:
3250         (WebCore::WMLDoElement::defaultEventHandler):
3251         * wml/WMLErrorHandling.cpp:
3252         (WebCore::reportWMLError):
3253         * wml/WMLPageState.h:
3254         (WebCore::WMLPageState::getVariable):
3255         * wml/WMLPrevElement.cpp:
3256         (WebCore::WMLPrevElement::executeTask):
3257         * wml/WMLRefreshElement.cpp:
3258         (WebCore::WMLRefreshElement::executeTask):
3259         * wml/WMLTagNames.in:
3260         * wml/WMLTimerElement.cpp: Added.
3261         (WebCore::WMLTimerElement::WMLTimerElement):
3262         (WebCore::WMLTimerElement::parseMappedAttribute):
3263         (WebCore::WMLTimerElement::insertedIntoDocument):
3264         (WebCore::WMLTimerElement::timerFired):
3265         (WebCore::WMLTimerElement::start):
3266         (WebCore::WMLTimerElement::stop):
3267         (WebCore::WMLTimerElement::storeIntervalToPageState):
3268         * wml/WMLTimerElement.h: Added.
3269
3270 2008-11-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3271
3272         Reviewed by Holger Freyther.
3273
3274         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22549
3275
3276         Add <do> element support. It provides a way to bind a task element to a <template>/<card> element. 
3277         Changes numerous of layout tests which contain <do> elements, as they render as buttons now.
3278
3279         * WebCore.xcodeproj/project.pbxproj:
3280         * rendering/RenderButton.cpp:
3281         (WebCore::RenderButton::updateFromElement):
3282         * wml/WMLCardElement.cpp:
3283         (WebCore::WMLCardElement::registerDoElement):
3284         * wml/WMLCardElement.h:
3285         * wml/WMLDoElement.cpp: Added.
3286         (WebCore::WMLDoElement::WMLDoElement):
3287         (WebCore::WMLDoElement::defaultEventHandler):
3288         (WebCore::WMLDoElement::parseMappedAttribute):
3289         (WebCore::WMLDoElement::insertedIntoDocument):
3290         (WebCore::WMLDoElement::createRenderer):
3291         (WebCore::WMLDoElement::recalcStyle):
3292         * wml/WMLDoElement.h: Added.
3293         (WebCore::WMLDoElement::registerTask):
3294         (WebCore::WMLDoElement::isActive):
3295         (WebCore::WMLDoElement::label):
3296         (WebCore::WMLDoElement::name):
3297         (WebCore::WMLDoElement::setActive):
3298         (WebCore::WMLDoElement::setNoop):
3299         * wml/WMLNoopElement.cpp:
3300         (WebCore::WMLNoopElement::insertedIntoDocument):
3301         * wml/WMLTagNames.in:
3302         * wml/WMLTaskElement.cpp:
3303         (WebCore::WMLTaskElement::insertedIntoDocument):
3304
3305 2008-11-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3306
3307         Reviewed by Sam Weinig.
3308
3309         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22545
3310
3311         Add onenterforward/onenterbackward/ontimer support for <card> elements.
3312
3313         No testing possible at the moment because WMLGoElement is not yet implemented.
3314         After that we can add tests covering the <card> event handling.
3315
3316         * wml/WMLCardElement.cpp:
3317         (WebCore::WMLCardElement::WMLCardElement):
3318         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
3319         (WebCore::WMLCardElement::parseMappedAttribute):
3320         (WebCore::WMLCardElement::setActiveCardInDocument):
3321         * wml/WMLCardElement.h:
3322         (WebCore::WMLCardElement::isNewContext):
3323         (WebCore::WMLCardElement::isOrdered):
3324         * wml/WMLDocument.cpp:
3325         (WebCore::WMLDocument::finishedParsing):
3326         * wml/WMLIntrinsicEvent.cpp:
3327         (WebCore::WMLIntrinsicEvent::WMLIntrinsicEvent):
3328         * wml/WMLIntrinsicEvent.h:
3329         (WebCore::WMLIntrinsicEvent::create):
3330
3331 2008-11-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3332
3333         Reviewed by Tor Arne Vestbø.
3334
3335         Regression seen on QtWebKit - causes a build failure on Win using MinGW
3336
3337         https://bugs.webkit.org/show_bug.cgi?id=22536
3338
3339         * WebCore.pro:
3340
3341 2008-11-28  Simon Hausmann  <hausmann@webkit.org>
3342
3343         Reviewed by Tor Arne Vestbø.
3344
3345         Fix compilation and linking on Windows CE.
3346
3347         Use WIN_OS instead of WIN and therefore exclude determineModuleVersionFromDescription()
3348         from the Windows'ish build.
3349
3350         Link against the newly required mmtimer.
3351
3352         * WebCore.pro:
3353         * plugins/PluginPackage.cpp:
3354
3355 2008-11-28  David Levin  <levin@chromium.org>
3356
3357         Reviewed by Alexey Proskuryakov.
3358
3359         http://bugs.webkit.org/show_bug.cgi?id=22524
3360
3361         Made static initializations in XMLHttpRequest.cpp thread-safe in preparation for usage
3362         of XMLHttpRequest by Workers (on threads).
3363
3364         No observable change in behavior, so no test.
3365
3366         * xml/XMLHttpRequest.cpp:
3367         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
3368         (WebCore::PreflightResultCacheItem::allowsCrossSiteMethod):
3369         (WebCore::PreflightResultCacheItem::allowsCrossSiteHeaders):
3370         (WebCore::PreflightResultCacheItem::allowsRequest):
3371         (WebCore::createXMLHttpRequestStaticData):
3372         (WebCore::initializeXMLHttpRequestStaticData):
3373         (WebCore::XMLHttpRequest::XMLHttpRequest):
3374         (WebCore::XMLHttpRequest::isSafeRequestHeader):
3375         (WebCore::XMLHttpRequest::isOnAccessControlResponseHeaderWhitelist):
3376         * xml/XMLHttpRequest.h:
3377
3378 2008-11-27  Cameron Zwarich  <zwarich@apple.com>
3379
3380         Not reviewed.
3381
3382         r38825, was committed without checking whether anything in WebCore
3383         uses JSFunction::m_body. Use the appropriate getters and setters
3384         instead.
3385
3386         * inspector/JavaScriptDebugServer.cpp:
3387         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
3388
3389 2008-11-27  Alexey Proskuryakov  <ap@webkit.org>
3390
3391         Reviewed by Dan Bernstein.
3392
3393         https://bugs.webkit.org/show_bug.cgi?id=22529
3394         Crashes seen on buildbots due to trying to stop a worker thread twice
3395
3396         * dom/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
3397         Don't try to stop the thread if it's already stopping.
3398
3399 2008-11-27  Kent Hansen  <khansen@trolltech.com>
3400
3401         Reviewed by Simon Hausmann.
3402
3403         Make JavaScript bindings for Qt plugin widgets work again
3404         this was a regression; need to handle non-NPAPI plugins as in 4.4.
3405
3406         * bindings/js/ScriptControllerQt.cpp:
3407         (WebCore::ScriptController::createScriptInstanceForWidget):
3408
3409 2008-11-26  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3410
3411         Reviewed by George Staikos.
3412
3413         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22522
3414
3415         Catch WML errors (invalid variable name/reference, multiple access elements, etc)
3416         while parsing the document, and stop parsing immediately and wrap the document
3417         fragment in a XHTML error document, just like it's done from XML parsing errors.
3418
3419         Until now all card elements were hidden by default (no renderer created), and
3420         WMLDocument::finishedParsing() took care of showing the right card (either the first,
3421         or any named card in the document, specified by document URL reference). Change this
3422         behaviour to support displaying partially parsed WML document fragments: Mark the first
3423         WMLCardElement inserted into the document as visible. If the document parsing finishes
3424         without problems, WMLDocument::finishedParsing() will be called, which takes care of
3425         showing the desired card (common case: first card in the document, which is already
3426         visible, so nothing actually has to be done). If an error occours, the document is
3427         correctly rendered until the error happened - wrapped in a XHTML document.
3428
3429         Fixes: fast/wml/err-event-binding-conflict.wml
3430                fast/wml/err-invalid-variable-name.wml
3431                fast/wml/err-multi-access.wml
3432                fast/wml/err-unallowed-task-in-anchor.wml
3433
3434         * WebCore.xcodeproj/project.pbxproj:
3435         * wml/WMLAccessElement.cpp:
3436         (WebCore::WMLAccessElement::parseMappedAttribute):
3437         (WebCore::WMLAccessElement::insertedIntoDocument):
3438         * wml/WMLAccessElement.h:
3439         * wml/WMLCardElement.cpp:
3440         (WebCore::WMLCardElement::insertedIntoDocument):
3441         (WebCore::WMLCardElement::setActiveCardInDocument):
3442         * wml/WMLCardElement.h:
3443         * wml/WMLDocument.cpp:
3444         (WebCore::WMLDocument::finishedParsing):
3445         * wml/WMLErrorHandling.cpp: Added.
3446         (WebCore::reportWMLError):
3447         * wml/WMLErrorHandling.h: Added.
3448         (WebCore::):
3449         * wml/WMLIntrinsicEventHandler.cpp:
3450         (WebCore::WMLIntrinsicEventHandler::registerIntrinsicEvent):
3451         * wml/WMLIntrinsicEventHandler.h:
3452         * wml/WMLNoopElement.cpp:
3453         (WebCore::WMLNoopElement::insertedIntoDocument):
3454         * wml/WMLOnEventElement.cpp:
3455         (WebCore::WMLOnEventElement::parseMappedAttribute):
3456         (WebCore::WMLOnEventElement::registerTask):
3457         * wml/WMLPageState.cpp:
3458         (WebCore::WMLPageState::setNeedCheckDeckAccess):
3459         * wml/WMLPageState.h:
3460         * wml/WMLSetvarElement.cpp:
3461         (WebCore::WMLSetvarElement::parseMappedAttribute):
3462
3463 2008-11-26  Glenn Wilson  <gwilson@chromium.org>
3464
3465         Reviewed by Dan Bernstein.
3466
3467         Fixed bug http://bugs.webkit.org/show_bug.cgi?id=21953
3468
3469         This fixes the crash when the small-caps font variant is used
3470         on a lower-case glyph that does not have a corresponding
3471         upper-case glyph defined in the set of available fonts.
3472
3473         This changes Font.cpp to check if the font being used exists before trying to apply the small-caps variant.
3474         
3475         Test: fast/css/small-caps-crash.html
3476
3477         * platform/graphics/Font.cpp:
3478         (WebCore::Font::glyphDataForCharacter):
3479
3480 2008-11-26  Tony Chang  <tony@chromium.org>
3481
3482         Reviewed by Oliver Hunt.
3483
3484         Add a new platform specific method cleanupAfterSystemDrag
3485         that platforms can ue to clean up drag state after a
3486         system drag.  Use this method on PLAFORM(MAC).
3487         https://bugs.webkit.org/show_bug.cgi?id=21956
3488
3489         * ChangeLog:
3490         * page/DragController.cpp:
3491         (WebCore::DragController::doSystemDrag):
3492         * page/DragController.h:
3493         * page/gtk/DragControllerGtk.cpp:
3494         (WebCore::DragController::cleanupAfterSystemDrag):
3495         * page/mac/DragControllerMac.mm:
3496         (WebCore::DragController::cleanupAfterSystemDrag):
3497         * page/qt/DragControllerQt.cpp:
3498         (WebCore::DragController::cleanupAfterSystemDrag):
3499         * page/win/DragControllerWin.cpp:
3500         (WebCore::DragController::cleanupAfterSystemDrag):
3501         * page/wx/DragControllerWx.cpp:
3502       (WebCore::DragController::cleanupAfterSystemDrag):
3503
3504 2008-11-26  Nikolas Zimmermann  <zimmermann@kde.org>
3505
3506         Reviewed by Oliver Hunt.
3507
3508         Fix path to string logic, correctly taking closed (sub-)paths into account.
3509         Code was just broken on cg, observed by Dirk Schulze.
3510
3511         QPainterPath doesn't seem to expose any functionality to detect closed sub paths,
3512         using the elementAt() function. There might be a workaround - Dirk will investigate.
3513
3514         * platform/graphics/cg/PathCG.cpp:
3515         (WebCore::CGPathToCFStringApplierFunction):
3516         * platform/graphics/cairo/PathCairo.cpp:
3517         (WebCore::Path::debugString):
3518
3519 2008-11-26  Darin Fisher  <darin@chromium.org>
3520
3521         Reviewed by Eric Seidel.
3522
3523         https://bugs.webkit.org/show_bug.cgi?id=22519
3524         Remove unnecessary include.
3525
3526         * dom/XMLTokenizer.cpp:
3527
3528 2008-11-26  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3529
3530         Reviewed by Oliver Hunt.
3531
3532         Add <noop> element support, completing the task element support.
3533
3534         * WebCore.xcodeproj/project.pbxproj:
3535         * wml/WMLNoopElement.cpp: Added.
3536         (WebCore::WMLNoopElement::WMLNoopElement):
3537         (WebCore::WMLNoopElement::insertedIntoDocument):
3538         * wml/WMLNoopElement.h: Added.
3539         * wml/WMLTagNames.in: Reorganize file a bit.
3540
3541 2008-11-26  Julien Chaffraix  <jchaffraix@webkit.org>
3542
3543         Reviewed by Eric Seidel.
3544
3545         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
3546         https://bugs.webkit.org/show_bug.cgi?id=22441
3547
3548         Make more HTML elements' constructors take a QualifiedName.
3549
3550         * editing/DeleteButtonController.cpp:
3551         (WebCore::DeleteButtonController::createDeletionUI):
3552         * html/HTMLBlockquoteElement.cpp:
3553         (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
3554         * html/HTMLBlockquoteElement.h:
3555         * html/HTMLButtonElement.cpp:
3556         (WebCore::HTMLButtonElement::HTMLButtonElement):
3557         * html/HTMLButtonElement.h:
3558         * html/HTMLDListElement.cpp:
3559         (WebCore::HTMLDListElement::HTMLDListElement):
3560         * html/HTMLDListElement.h:
3561         * html/HTMLDirectoryElement.cpp:
3562         (WebCore::HTMLDirectoryElement::HTMLDirectoryElement):
3563         * html/HTMLDirectoryElement.h:
3564         * html/HTMLDivElement.cpp:
3565         (WebCore::HTMLDivElement::HTMLDivElement):
3566         * html/HTMLDivElement.h:
3567         * html/HTMLElementFactory.cpp:
3568         (WebCore::styleConstructor):
3569         (WebCore::titleConstructor):
3570         (WebCore::frameConstructor):
3571         (WebCore::framesetConstructor):
3572         (WebCore::iframeConstructor):
3573         (WebCore::formConstructor):
3574         (WebCore::buttonConstructor):
3575         (WebCore::inputConstructor):
3576         (WebCore::isindexConstructor):
3577         (WebCore::fieldsetConstructor):
3578         (WebCore::keygenConstructor):
3579         (WebCore::labelConstructor):
3580         (WebCore::legendConstructor):
3581         (WebCore::optgroupConstructor):
3582         (WebCore::optionConstructor):
3583         (WebCore::selectConstructor):
3584         (WebCore::textareaConstructor):
3585         (WebCore::dlConstructor):
3586         (WebCore::ulConstructor):
3587         (WebCore::olConstructor):
3588         (WebCore::dirConstructor):
3589         (WebCore::menuConstructor):
3590         (WebCore::liConstructor):
3591         (WebCore::blockquoteConstructor):
3592         (WebCore::divConstructor):
3593         (WebCore::headingConstructor):
3594         * html/HTMLFieldSetElement.cpp:
3595         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
3596         * html/HTMLFieldSetElement.h:
3597         * html/HTMLFormElement.cpp:
3598         (WebCore::HTMLFormElement::HTMLFormElement):
3599         * html/HTMLFormElement.h:
3600         * html/HTMLFrameElement.cpp:
3601         (WebCore::HTMLFrameElement::HTMLFrameElement):
3602         * html/HTMLFrameElement.h:
3603         * html/HTMLFrameSetElement.cpp:
3604         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3605         * html/HTMLFrameSetElement.h:
3606         * html/HTMLIFrameElement.cpp:
3607         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
3608         * html/HTMLIFrameElement.h:
3609         * html/HTMLInputElement.cpp:
3610         * html/HTMLInputElement.h:
3611         * html/HTMLIsIndexElement.cpp: