4697b36ce80a47fe714623f5cd0db4c728f69b66
[WebKit-https.git] / WebCore / ChangeLog
1 2008-12-01  Julien Chaffraix  <jchaffraix@webkit.org>
2
3         Reviewed by Eric Seidel.
4
5         Bug 22564: Make HTML elements' constructors take a QualifiedName
6         https://bugs.webkit.org/show_bug.cgi?id=22564
7
8         - Modified the remaining HTML elements' constructors to take a QualifiedName.
9
10         - Added an assertion that the QualifiedName given corresponds to the element constructed.
11
12         * bindings/js/JSAudioConstructor.cpp:
13         (WebCore::constructAudio):
14         * html/HTMLAudioElement.cpp:
15         (WebCore::HTMLAudioElement::HTMLAudioElement):
16         * html/HTMLAudioElement.h:
17         * html/HTMLBRElement.cpp:
18         (WebCore::HTMLBRElement::HTMLBRElement):
19         * html/HTMLBRElement.h:
20         * html/HTMLElement.cpp:
21         (WebCore::HTMLElement::setInnerText):
22         * html/HTMLElementFactory.cpp:
23         (WebCore::brConstructor):
24         (WebCore::quoteConstructor):
25         (WebCore::marqueeConstructor):
26         (WebCore::audioConstructor):
27         (WebCore::videoConstructor):
28         (WebCore::sourceConstructor):
29         * html/HTMLMarqueeElement.cpp:
30         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
31         * html/HTMLMarqueeElement.h:
32         * html/HTMLQuoteElement.cpp:
33         (WebCore::HTMLQuoteElement::HTMLQuoteElement):
34         * html/HTMLQuoteElement.h:
35         * html/HTMLSourceElement.cpp:
36         (WebCore::HTMLSourceElement::HTMLSourceElement):
37         * html/HTMLSourceElement.h:
38         * html/HTMLVideoElement.cpp:
39         (WebCore::HTMLVideoElement::HTMLVideoElement):
40         * html/HTMLVideoElement.h:
41         * rendering/RenderTextControl.cpp:
42         (WebCore::RenderTextControl::updateFromElement):
43
44 2008-12-01  Julien Chaffraix  <jchaffraix@webkit.org>
45
46         Reviewed by Antti Koivisto.
47
48         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
49         https://bugs.webkit.org/show_bug.cgi?id=22441
50
51         Add an assertion to the modified HTML elements' constructor
52         to check that the QualifiedName parameter is the one that
53         matches the Element's.
54
55         * html/HTMLBaseElement.cpp:
56         (WebCore::HTMLBaseElement::HTMLBaseElement):
57         * html/HTMLBlockquoteElement.cpp:
58         (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
59         * html/HTMLBodyElement.cpp:
60         (WebCore::HTMLBodyElement::HTMLBodyElement):
61         * html/HTMLButtonElement.cpp:
62         (WebCore::HTMLButtonElement::HTMLButtonElement):
63         * html/HTMLDListElement.cpp:
64         (WebCore::HTMLDListElement::HTMLDListElement):
65         * html/HTMLDirectoryElement.cpp:
66         (WebCore::HTMLDirectoryElement::HTMLDirectoryElement):
67         * html/HTMLDivElement.cpp:
68         (WebCore::HTMLDivElement::HTMLDivElement):
69         * html/HTMLFieldSetElement.cpp:
70         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
71         * html/HTMLFormElement.cpp:
72         (WebCore::HTMLFormElement::HTMLFormElement):
73         * html/HTMLFrameElement.cpp:
74         (WebCore::HTMLFrameElement::HTMLFrameElement):
75         * html/HTMLFrameSetElement.cpp:
76         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
77         * html/HTMLHeadElement.cpp:
78         (WebCore::HTMLHeadElement::HTMLHeadElement):
79         * html/HTMLHtmlElement.cpp:
80         (WebCore::HTMLHtmlElement::HTMLHtmlElement):
81         * html/HTMLIFrameElement.cpp:
82         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
83         * html/HTMLInputElement.cpp:
84         (WebCore::HTMLInputElement::HTMLInputElement):
85         * html/HTMLIsIndexElement.cpp:
86         (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
87         * html/HTMLKeygenElement.cpp:
88         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
89         * html/HTMLLIElement.cpp:
90         (WebCore::HTMLLIElement::HTMLLIElement):
91         * html/HTMLLabelElement.cpp:
92         (WebCore::HTMLLabelElement::HTMLLabelElement):
93         * html/HTMLLegendElement.cpp:
94         (WebCore::HTMLLegendElement::HTMLLegendElement):
95         * html/HTMLLinkElement.cpp:
96         (WebCore::HTMLLinkElement::HTMLLinkElement):
97         * html/HTMLMenuElement.cpp:
98         (WebCore::HTMLMenuElement::HTMLMenuElement):
99         * html/HTMLMetaElement.cpp:
100         (WebCore::HTMLMetaElement::HTMLMetaElement):
101         * html/HTMLOListElement.cpp:
102         (WebCore::HTMLOListElement::HTMLOListElement):
103         * html/HTMLOptGroupElement.cpp:
104         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
105         * html/HTMLOptionElement.cpp:
106         (WebCore::HTMLOptionElement::HTMLOptionElement):
107         * html/HTMLSelectElement.cpp:
108         (WebCore::HTMLSelectElement::HTMLSelectElement):
109         * html/HTMLStyleElement.cpp:
110         (WebCore::HTMLStyleElement::HTMLStyleElement):
111         * html/HTMLTextAreaElement.cpp:
112         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
113         * html/HTMLTitleElement.cpp:
114         (WebCore::HTMLTitleElement::HTMLTitleElement):
115         * html/HTMLUListElement.cpp:
116         (WebCore::HTMLUListElement::HTMLUListElement):
117
118 2008-12-01  Chris Marrin  <cmarrin@apple.com>
119
120         Reviewed by Darin Adler.
121
122         https://bugs.webkit.org/show_bug.cgi?id=22046
123
124         Fixed another case of crashing because the animation object is getting deleted when
125         it's in the middle of a callback. I actually moved where I am retaining the pointer
126         up out of the lower level AnimationBase code and into the timer callback that calls
127         them. So now the pointer is valid throughout the entire sequence of callback code.
128
129         The testcase for https://bugs.webkit.org/show_bug.cgi?id=22052 also exhibits a
130         crash which this patch fixes. 
131
132         * page/animation/AnimationBase.cpp:
133         (WebCore::AnimationBase::updateStateMachine):
134         (WebCore::AnimationBase::animationTimerCallbackFired):
135         * page/animation/CompositeAnimation.cpp:
136         (WebCore::CompositeAnimationPrivate::setAnimationStartTime):
137         (WebCore::CompositeAnimationPrivate::setTransitionStartTime):
138         (WebCore::CompositeAnimationPrivate::styleAvailable):
139         * page/animation/ImplicitAnimation.cpp:
140         (WebCore::ImplicitAnimation::sendTransitionEvent):
141         * page/animation/KeyframeAnimation.cpp:
142         (WebCore::KeyframeAnimation::sendAnimationEvent):
143         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
144
145 2008-12-01  Tor Arne Vestbø  <tavestbo@trolltech.com>
146
147         Reviewed by Simon Hausmann.
148
149         [Qt/Mac] Initialize NPAPI plugins before getting their entry points
150
151         The old behavior (calling NP_GetEntryPoints before NP_Initialize) was
152         copied from Windows, but caused Silverlight on Mac to crash when loaded.
153
154         Apparently the call order of NP_Initialize and NP_GetEntryPoints is
155         reversed on Mac. See https://bugzilla.mozilla.org/show_bug.cgi?id=344425
156
157         Reported-by: Peter Johnson <peter@zattoo.com>
158
159         * plugins/mac/PluginPackageMac.cpp:
160         (WebCore::PluginPackage::load):
161
162 2008-11-30  Chris Fleizach  <cfleizach@apple.com>
163
164         Reviewed by John Sullivan.
165
166         https://bugs.webkit.org/show_bug.cgi?id=22510
167         Crash at WebCore::AccessibilityRenderObject::activeDescendant() on Google Reader with ARIA (22510)
168
169         A nil pointer needed to be checked
170
171         * page/AccessibilityRenderObject.cpp:
172         (WebCore::AccessibilityRenderObject::activeDescendant):
173
174 2008-11-30  Alexey Proskuryakov  <ap@webkit.org>
175
176         Reviewed by Dan Bernstein.
177
178         https://bugs.webkit.org/show_bug.cgi?id=22530
179         Assertion failures seen on buildbot due to uninitialized WorkerThread::m_threadID
180
181         * dom/WorkerThread.cpp:
182         (WebCore::WorkerThread::start): Protect worker startup with a mutex to ensure that this
183         function runs to completion before the thread begins execution.
184         (WebCore::WorkerThread::workerThread): Updated comments.
185         (WebCore::WorkerThread::stop): Ditto.
186         * dom/WorkerThread.h: Renamed m_workerContextMutex to m_threadCreationMutex, because it now
187         protects startup as a whole.
188
189         * storage/DatabaseThread.cpp:
190         * storage/DatabaseThread.h:
191         * storage/LocalStorageThread.cpp:
192         * storage/LocalStorageThread.h:
193         Fixed the same m_threadID problem.
194
195 2008-11-29  Brent Fulgham  <bfulgham@gmail.com>
196
197         Reviewed by Alexey Proskuryakov.
198
199         Remove Visual Studio project dependencies on non-redistributable
200         components in the Debug_Cairo and Release_Cairo build targets.
201         See https://bugs.webkit.org/show_bug.cgi?id=22527
202
203         * WebCore.vcproj/WebCore.vcproj:
204
205 2008-11-29  Sam Weinig  <sam@webkit.org>
206
207         Rubber-stamped by Alexey Proskuryakov.
208
209         Fix some sorting
210
211         * WebCore.xcodeproj/project.pbxproj:
212
213 2008-11-28  Sam Weinig  <sam@webkit.org>
214
215         Reviewed by Alexey Proskuryakov.
216
217         Fix for https://bugs.webkit.org/show_bug.cgi?id=21063
218         NULL pointer crash in dispatchEvent(null);
219
220         Test: fast/events/dispatchEvent-crash.html
221
222         * dom/MessagePort.cpp:
223         (WebCore::MessagePort::dispatchEvent):
224         * dom/Worker.cpp:
225         (WebCore::Worker::dispatchEvent):
226         * dom/WorkerContext.cpp:
227         (WebCore::WorkerContext::dispatchEvent):
228         * loader/appcache/DOMApplicationCache.cpp:
229         (WebCore::DOMApplicationCache::dispatchEvent):
230         * xml/XMLHttpRequest.cpp:
231         (WebCore::XMLHttpRequest::dispatchEvent):
232         * xml/XMLHttpRequestUpload.cpp:
233         (WebCore::XMLHttpRequestUpload::dispatchEvent):
234
235 2008-11-29  Dan Bernstein  <mitz@apple.com>
236
237         Reviewed by Alexey Proskuryakov.
238
239         - fix https://bugs.webkit.org/show_bug.cgi?id=22454
240           <rdar://problem/6405550> REGRESSION (3.2-TOT): Crash below FontFallbackList::fontDataAt on jacobian.org
241
242         Test: http/tests/misc/font-face-in-multiple-segmented-faces.html
243
244         The crash happened because style recalculation was invoked by
245         CSSFontSelector after one CSSSegmentedFontFace had pruned its tables but
246         before another CSSSegmentedFontFace using the same CSSFontFace had done
247         so. The fix is to let all CSSSegmentedFontFaces using the CSSFontFace
248         prune their tables before telling the CSSFontSelector to recalc style.
249
250         * css/CSSFontFace.cpp:
251         (WebCore::CSSFontFace::fontLoaded):
252         * css/CSSFontSelector.cpp:
253         (WebCore::CSSFontSelector::fontLoaded):
254         * css/CSSFontSelector.h:
255         * css/CSSSegmentedFontFace.cpp:
256         (WebCore::CSSSegmentedFontFace::fontLoaded):
257
258 2008-11-29  Alexey Proskuryakov  <ap@webkit.org>
259
260         Reviewed by Eric Seidel.
261
262         https://bugs.webkit.org/show_bug.cgi?id=14968
263         document.open() erroneously returns void instead of the new Document
264
265         Test: fast/dom/HTMLDocument/document-open-return-value.html
266
267         * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open):
268         Return the document on which this method was invoked, per HTML5.
269
270 2008-11-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
271
272         Reviewed by Cameron Zwarich.
273
274         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22550
275
276         Add <timer> element support. It provides a way to execute a task with a delay.
277         The user is notified by firing the task associated with the <card>'s ontimer attribute.
278         Only one timer element is allowed per <card> (fix wrong error message in reportWMLError)
279
280         * WebCore.xcodeproj/project.pbxproj:
281         * wml/WMLCardElement.cpp:
282         (WebCore::WMLCardElement::WMLCardElement):
283         (WebCore::WMLCardElement::setIntrinsicEventTimer):
284         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
285         * wml/WMLCardElement.h:
286         * wml/WMLDoElement.cpp:
287         (WebCore::WMLDoElement::defaultEventHandler):
288         * wml/WMLErrorHandling.cpp:
289         (WebCore::reportWMLError):
290         * wml/WMLPageState.h:
291         (WebCore::WMLPageState::getVariable):
292         * wml/WMLPrevElement.cpp:
293         (WebCore::WMLPrevElement::executeTask):
294         * wml/WMLRefreshElement.cpp:
295         (WebCore::WMLRefreshElement::executeTask):
296         * wml/WMLTagNames.in:
297         * wml/WMLTimerElement.cpp: Added.
298         (WebCore::WMLTimerElement::WMLTimerElement):
299         (WebCore::WMLTimerElement::parseMappedAttribute):
300         (WebCore::WMLTimerElement::insertedIntoDocument):
301         (WebCore::WMLTimerElement::timerFired):
302         (WebCore::WMLTimerElement::start):
303         (WebCore::WMLTimerElement::stop):
304         (WebCore::WMLTimerElement::storeIntervalToPageState):
305         * wml/WMLTimerElement.h: Added.
306
307 2008-11-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
308
309         Reviewed by Holger Freyther.
310
311         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22549
312
313         Add <do> element support. It provides a way to bind a task element to a <template>/<card> element. 
314         Changes numerous of layout tests which contain <do> elements, as they render as buttons now.
315
316         * WebCore.xcodeproj/project.pbxproj:
317         * rendering/RenderButton.cpp:
318         (WebCore::RenderButton::updateFromElement):
319         * wml/WMLCardElement.cpp:
320         (WebCore::WMLCardElement::registerDoElement):
321         * wml/WMLCardElement.h:
322         * wml/WMLDoElement.cpp: Added.
323         (WebCore::WMLDoElement::WMLDoElement):
324         (WebCore::WMLDoElement::defaultEventHandler):
325         (WebCore::WMLDoElement::parseMappedAttribute):
326         (WebCore::WMLDoElement::insertedIntoDocument):
327         (WebCore::WMLDoElement::createRenderer):
328         (WebCore::WMLDoElement::recalcStyle):
329         * wml/WMLDoElement.h: Added.
330         (WebCore::WMLDoElement::registerTask):
331         (WebCore::WMLDoElement::isActive):
332         (WebCore::WMLDoElement::label):
333         (WebCore::WMLDoElement::name):
334         (WebCore::WMLDoElement::setActive):
335         (WebCore::WMLDoElement::setNoop):
336         * wml/WMLNoopElement.cpp:
337         (WebCore::WMLNoopElement::insertedIntoDocument):
338         * wml/WMLTagNames.in:
339         * wml/WMLTaskElement.cpp:
340         (WebCore::WMLTaskElement::insertedIntoDocument):
341
342 2008-11-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
343
344         Reviewed by Sam Weinig.
345
346         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22545
347
348         Add onenterforward/onenterbackward/ontimer support for <card> elements.
349
350         No testing possible at the moment because WMLGoElement is not yet implemented.
351         After that we can add tests covering the <card> event handling.
352
353         * wml/WMLCardElement.cpp:
354         (WebCore::WMLCardElement::WMLCardElement):
355         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
356         (WebCore::WMLCardElement::parseMappedAttribute):
357         (WebCore::WMLCardElement::setActiveCardInDocument):
358         * wml/WMLCardElement.h:
359         (WebCore::WMLCardElement::isNewContext):
360         (WebCore::WMLCardElement::isOrdered):
361         * wml/WMLDocument.cpp:
362         (WebCore::WMLDocument::finishedParsing):
363         * wml/WMLIntrinsicEvent.cpp:
364         (WebCore::WMLIntrinsicEvent::WMLIntrinsicEvent):
365         * wml/WMLIntrinsicEvent.h:
366         (WebCore::WMLIntrinsicEvent::create):
367
368 2008-11-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
369
370         Reviewed by Tor Arne Vestbø.
371
372         Regression seen on QtWebKit - causes a build failure on Win using MinGW
373
374         https://bugs.webkit.org/show_bug.cgi?id=22536
375
376         * WebCore.pro:
377
378 2008-11-28  Simon Hausmann  <hausmann@webkit.org>
379
380         Reviewed by Tor Arne Vestbø.
381
382         Fix compilation and linking on Windows CE.
383
384         Use WIN_OS instead of WIN and therefore exclude determineModuleVersionFromDescription()
385         from the Windows'ish build.
386
387         Link against the newly required mmtimer.
388
389         * WebCore.pro:
390         * plugins/PluginPackage.cpp:
391
392 2008-11-28  David Levin  <levin@chromium.org>
393
394         Reviewed by Alexey Proskuryakov.
395
396         http://bugs.webkit.org/show_bug.cgi?id=22524
397
398         Made static initializations in XMLHttpRequest.cpp thread-safe in preparation for usage
399         of XMLHttpRequest by Workers (on threads).
400
401         No observable change in behavior, so no test.
402
403         * xml/XMLHttpRequest.cpp:
404         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
405         (WebCore::PreflightResultCacheItem::allowsCrossSiteMethod):
406         (WebCore::PreflightResultCacheItem::allowsCrossSiteHeaders):
407         (WebCore::PreflightResultCacheItem::allowsRequest):
408         (WebCore::createXMLHttpRequestStaticData):
409         (WebCore::initializeXMLHttpRequestStaticData):
410         (WebCore::XMLHttpRequest::XMLHttpRequest):
411         (WebCore::XMLHttpRequest::isSafeRequestHeader):
412         (WebCore::XMLHttpRequest::isOnAccessControlResponseHeaderWhitelist):
413         * xml/XMLHttpRequest.h:
414
415 2008-11-27  Cameron Zwarich  <zwarich@apple.com>
416
417         Not reviewed.
418
419         r38825, was committed without checking whether anything in WebCore
420         uses JSFunction::m_body. Use the appropriate getters and setters
421         instead.
422
423         * inspector/JavaScriptDebugServer.cpp:
424         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
425
426 2008-11-27  Alexey Proskuryakov  <ap@webkit.org>
427
428         Reviewed by Dan Bernstein.
429
430         https://bugs.webkit.org/show_bug.cgi?id=22529
431         Crashes seen on buildbots due to trying to stop a worker thread twice
432
433         * dom/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
434         Don't try to stop the thread if it's already stopping.
435
436 2008-11-27  Kent Hansen  <khansen@trolltech.com>
437
438         Reviewed by Simon Hausmann.
439
440         Make JavaScript bindings for Qt plugin widgets work again
441         this was a regression; need to handle non-NPAPI plugins as in 4.4.
442
443         * bindings/js/ScriptControllerQt.cpp:
444         (WebCore::ScriptController::createScriptInstanceForWidget):
445
446 2008-11-26  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
447
448         Reviewed by George Staikos.
449
450         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22522
451
452         Catch WML errors (invalid variable name/reference, multiple access elements, etc)
453         while parsing the document, and stop parsing immediately and wrap the document
454         fragment in a XHTML error document, just like it's done from XML parsing errors.
455
456         Until now all card elements were hidden by default (no renderer created), and
457         WMLDocument::finishedParsing() took care of showing the right card (either the first,
458         or any named card in the document, specified by document URL reference). Change this
459         behaviour to support displaying partially parsed WML document fragments: Mark the first
460         WMLCardElement inserted into the document as visible. If the document parsing finishes
461         without problems, WMLDocument::finishedParsing() will be called, which takes care of
462         showing the desired card (common case: first card in the document, which is already
463         visible, so nothing actually has to be done). If an error occours, the document is
464         correctly rendered until the error happened - wrapped in a XHTML document.
465
466         Fixes: fast/wml/err-event-binding-conflict.wml
467                fast/wml/err-invalid-variable-name.wml
468                fast/wml/err-multi-access.wml
469                fast/wml/err-unallowed-task-in-anchor.wml
470
471         * WebCore.xcodeproj/project.pbxproj:
472         * wml/WMLAccessElement.cpp:
473         (WebCore::WMLAccessElement::parseMappedAttribute):
474         (WebCore::WMLAccessElement::insertedIntoDocument):
475         * wml/WMLAccessElement.h:
476         * wml/WMLCardElement.cpp:
477         (WebCore::WMLCardElement::insertedIntoDocument):
478         (WebCore::WMLCardElement::setActiveCardInDocument):
479         * wml/WMLCardElement.h:
480         * wml/WMLDocument.cpp:
481         (WebCore::WMLDocument::finishedParsing):
482         * wml/WMLErrorHandling.cpp: Added.
483         (WebCore::reportWMLError):
484         * wml/WMLErrorHandling.h: Added.
485         (WebCore::):
486         * wml/WMLIntrinsicEventHandler.cpp:
487         (WebCore::WMLIntrinsicEventHandler::registerIntrinsicEvent):
488         * wml/WMLIntrinsicEventHandler.h:
489         * wml/WMLNoopElement.cpp:
490         (WebCore::WMLNoopElement::insertedIntoDocument):
491         * wml/WMLOnEventElement.cpp:
492         (WebCore::WMLOnEventElement::parseMappedAttribute):
493         (WebCore::WMLOnEventElement::registerTask):
494         * wml/WMLPageState.cpp:
495         (WebCore::WMLPageState::setNeedCheckDeckAccess):
496         * wml/WMLPageState.h:
497         * wml/WMLSetvarElement.cpp:
498         (WebCore::WMLSetvarElement::parseMappedAttribute):
499
500 2008-11-26  Glenn Wilson  <gwilson@chromium.org>
501
502         Reviewed by Dan Bernstein.
503
504         Fixed bug http://bugs.webkit.org/show_bug.cgi?id=21953
505
506         This fixes the crash when the small-caps font variant is used
507         on a lower-case glyph that does not have a corresponding
508         upper-case glyph defined in the set of available fonts.
509
510         This changes Font.cpp to check if the font being used exists before trying to apply the small-caps variant.
511         
512         Test: fast/css/small-caps-crash.html
513
514         * platform/graphics/Font.cpp:
515         (WebCore::Font::glyphDataForCharacter):
516
517 2008-11-26  Tony Chang  <tony@chromium.org>
518
519         Reviewed by Oliver Hunt.
520
521         Add a new platform specific method cleanupAfterSystemDrag
522         that platforms can ue to clean up drag state after a
523         system drag.  Use this method on PLAFORM(MAC).
524         https://bugs.webkit.org/show_bug.cgi?id=21956
525
526         * ChangeLog:
527         * page/DragController.cpp:
528         (WebCore::DragController::doSystemDrag):
529         * page/DragController.h:
530         * page/gtk/DragControllerGtk.cpp:
531         (WebCore::DragController::cleanupAfterSystemDrag):
532         * page/mac/DragControllerMac.mm:
533         (WebCore::DragController::cleanupAfterSystemDrag):
534         * page/qt/DragControllerQt.cpp:
535         (WebCore::DragController::cleanupAfterSystemDrag):
536         * page/win/DragControllerWin.cpp:
537         (WebCore::DragController::cleanupAfterSystemDrag):
538         * page/wx/DragControllerWx.cpp:
539       (WebCore::DragController::cleanupAfterSystemDrag):
540
541 2008-11-26  Nikolas Zimmermann  <zimmermann@kde.org>
542
543         Reviewed by Oliver Hunt.
544
545         Fix path to string logic, correctly taking closed (sub-)paths into account.
546         Code was just broken on cg, observed by Dirk Schulze.
547
548         QPainterPath doesn't seem to expose any functionality to detect closed sub paths,
549         using the elementAt() function. There might be a workaround - Dirk will investigate.
550
551         * platform/graphics/cg/PathCG.cpp:
552         (WebCore::CGPathToCFStringApplierFunction):
553         * platform/graphics/cairo/PathCairo.cpp:
554         (WebCore::Path::debugString):
555
556 2008-11-26  Darin Fisher  <darin@chromium.org>
557
558         Reviewed by Eric Seidel.
559
560         https://bugs.webkit.org/show_bug.cgi?id=22519
561         Remove unnecessary include.
562
563         * dom/XMLTokenizer.cpp:
564
565 2008-11-26  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
566
567         Reviewed by Oliver Hunt.
568
569         Add <noop> element support, completing the task element support.
570
571         * WebCore.xcodeproj/project.pbxproj:
572         * wml/WMLNoopElement.cpp: Added.
573         (WebCore::WMLNoopElement::WMLNoopElement):
574         (WebCore::WMLNoopElement::insertedIntoDocument):
575         * wml/WMLNoopElement.h: Added.
576         * wml/WMLTagNames.in: Reorganize file a bit.
577
578 2008-11-26  Julien Chaffraix  <jchaffraix@webkit.org>
579
580         Reviewed by Eric Seidel.
581
582         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
583         https://bugs.webkit.org/show_bug.cgi?id=22441
584
585         Make more HTML elements' constructors take a QualifiedName.
586
587         * editing/DeleteButtonController.cpp:
588         (WebCore::DeleteButtonController::createDeletionUI):
589         * html/HTMLBlockquoteElement.cpp:
590         (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
591         * html/HTMLBlockquoteElement.h:
592         * html/HTMLButtonElement.cpp:
593         (WebCore::HTMLButtonElement::HTMLButtonElement):
594         * html/HTMLButtonElement.h:
595         * html/HTMLDListElement.cpp:
596         (WebCore::HTMLDListElement::HTMLDListElement):
597         * html/HTMLDListElement.h:
598         * html/HTMLDirectoryElement.cpp:
599         (WebCore::HTMLDirectoryElement::HTMLDirectoryElement):
600         * html/HTMLDirectoryElement.h:
601         * html/HTMLDivElement.cpp:
602         (WebCore::HTMLDivElement::HTMLDivElement):
603         * html/HTMLDivElement.h:
604         * html/HTMLElementFactory.cpp:
605         (WebCore::styleConstructor):
606         (WebCore::titleConstructor):
607         (WebCore::frameConstructor):
608         (WebCore::framesetConstructor):
609         (WebCore::iframeConstructor):
610         (WebCore::formConstructor):
611         (WebCore::buttonConstructor):
612         (WebCore::inputConstructor):
613         (WebCore::isindexConstructor):
614         (WebCore::fieldsetConstructor):
615         (WebCore::keygenConstructor):
616         (WebCore::labelConstructor):
617         (WebCore::legendConstructor):
618         (WebCore::optgroupConstructor):
619         (WebCore::optionConstructor):
620         (WebCore::selectConstructor):
621         (WebCore::textareaConstructor):
622         (WebCore::dlConstructor):
623         (WebCore::ulConstructor):
624         (WebCore::olConstructor):
625         (WebCore::dirConstructor):
626         (WebCore::menuConstructor):
627         (WebCore::liConstructor):
628         (WebCore::blockquoteConstructor):
629         (WebCore::divConstructor):
630         (WebCore::headingConstructor):
631         * html/HTMLFieldSetElement.cpp:
632         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
633         * html/HTMLFieldSetElement.h:
634         * html/HTMLFormElement.cpp:
635         (WebCore::HTMLFormElement::HTMLFormElement):
636         * html/HTMLFormElement.h:
637         * html/HTMLFrameElement.cpp:
638         (WebCore::HTMLFrameElement::HTMLFrameElement):
639         * html/HTMLFrameElement.h:
640         * html/HTMLFrameSetElement.cpp:
641         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
642         * html/HTMLFrameSetElement.h:
643         * html/HTMLIFrameElement.cpp:
644         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
645         * html/HTMLIFrameElement.h:
646         * html/HTMLInputElement.cpp:
647         * html/HTMLInputElement.h:
648         * html/HTMLIsIndexElement.cpp:
649         (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
650         * html/HTMLIsIndexElement.h:
651         * html/HTMLKeygenElement.cpp:
652         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
653         * html/HTMLKeygenElement.h:
654         * html/HTMLLIElement.cpp:
655         (WebCore::HTMLLIElement::HTMLLIElement):
656         * html/HTMLLIElement.h:
657         * html/HTMLLabelElement.cpp:
658         (WebCore::HTMLLabelElement::HTMLLabelElement):
659         * html/HTMLLabelElement.h:
660         * html/HTMLLegendElement.cpp:
661         (WebCore::HTMLLegendElement::HTMLLegendElement):
662         * html/HTMLLegendElement.h:
663         * html/HTMLMenuElement.cpp:
664         (WebCore::HTMLMenuElement::HTMLMenuElement):
665         * html/HTMLMenuElement.h:
666         * html/HTMLOListElement.cpp:
667         (WebCore::HTMLOListElement::HTMLOListElement):
668         * html/HTMLOListElement.h:
669         * html/HTMLOptGroupElement.cpp:
670         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
671         * html/HTMLOptGroupElement.h:
672         * html/HTMLOptionElement.cpp:
673         (WebCore::HTMLOptionElement::HTMLOptionElement):
674         * html/HTMLOptionElement.h:
675         * html/HTMLParser.cpp:
676         (WebCore::HTMLParser::formCreateErrorCheck):
677         (WebCore::HTMLParser::handleIsindex):
678         * html/HTMLSelectElement.cpp:
679         * html/HTMLSelectElement.h:
680         * html/HTMLStyleElement.cpp:
681         (WebCore::HTMLStyleElement::HTMLStyleElement):
682         * html/HTMLStyleElement.h:
683         * html/HTMLTextAreaElement.cpp:
684         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
685         * html/HTMLTextAreaElement.h:
686         * html/HTMLTitleElement.cpp:
687         (WebCore::HTMLTitleElement::HTMLTitleElement):
688         * html/HTMLTitleElement.h:
689         * html/HTMLUListElement.cpp:
690         (WebCore::HTMLUListElement::HTMLUListElement):
691         * html/HTMLUListElement.h:
692         * html/HTMLViewSourceDocument.cpp:
693         (WebCore::HTMLViewSourceDocument::createContainingTable):
694         * rendering/MediaControlElements.cpp:
695         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
696         (WebCore::MediaControlInputElement::MediaControlInputElement):
697         * rendering/RenderFileUploadControl.cpp:
698         (WebCore::HTMLFileUploadInnerButtonElement::HTMLFileUploadInnerButtonElement):
699         * rendering/RenderMedia.cpp:
700         (WebCore::RenderMedia::createPanel):
701         (WebCore::RenderMedia::createTimeDisplay):
702         * rendering/RenderSlider.cpp:
703         (WebCore::HTMLSliderThumbElement::HTMLSliderThumbElement):
704         * rendering/TextControlInnerElements.cpp:
705         (WebCore::TextControlInnerElement::TextControlInnerElement):
706
707 2008-11-26  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
708
709         Reviewed by Sam Weinig.
710
711         Fix obvious problem in WMLPageState constructor, m_page was not set to the passed Page pointer.
712
713         * wml/WMLPageState.cpp:
714         (WebCore::WMLPageState::WMLPageState):
715
716 2008-11-26  Matt Perry  <mpcomplete@gmail.com>
717
718         Fix Qt bustage.
719
720         See https://bugs.webkit.org/show_bug.cgi?id=22051
721
722         * platform/qt/RenderThemeQt.cpp:
723         (WebCore::RenderThemeQt::extraDefaultStyleSheet):
724
725 2008-11-26  Matt Perry  <mpcomplete@gmail.com>
726
727         Reviewed by Maciej Stachowiak.
728
729         Fix https://bugs.webkit.org/show_bug.cgi?id=22051
730         Renderthemes should be able to supply additional CSS rules to the core
731         ones.
732
733         * DerivedSources.make:
734         * css/CSSStyleSelector.cpp:
735         (WebCore::parseUASheet):
736         (WebCore::loadFullDefaultStyle):
737         (WebCore::loadSimpleDefaultStyle):
738         * css/themeWin.css: Added.
739         * css/themeWinQuirks.css: Added.
740         * platform/qt/RenderThemeQt.cpp:
741         (WebCore::RenderThemeQt::extraDefaultStyleSheet):
742         * platform/qt/RenderThemeQt.h:
743         * rendering/RenderTheme.cpp:
744         * rendering/RenderTheme.h:
745         (WebCore::RenderTheme::extraDefaultStyleSheet):
746         (WebCore::RenderTheme::extraQuirksStyleSheet):
747         * rendering/RenderThemeWin.cpp:
748         (WebCore::RenderThemeWin::extraDefaultStyleSheet):
749         (WebCore::RenderThemeWin::extraQuirksStyleSheet):
750         * rendering/RenderThemeWin.h:
751
752 2008-11-26  David Kilzer  <ddkilzer@apple.com>
753
754         Make CSSStyleSheet::addSubresourceURLStrings() iterative
755
756         Part of the fix for Bug 11850: Webarchive fails to save images referenced in CSS
757         <https://bugs.webkit.org/show_bug.cgi?id=11850>
758
759         Reviewed by Brady Eidson.
760
761         * css/CSSStyleSheet.cpp:
762         (WebCore::CSSStyleSheet::addSubresourceURLStrings): Switch algorithm
763         from recursive to iterative for gathering the list of all CSS
764         stylesheets referenced in @import statements.
765
766 2008-11-26  Dirk Schulze  <krit@webkit.org>
767
768         Reviewed by Simon Hausmann.
769
770         Transformations to the context shouldn't transform the currentPath.
771         Fixed this on Qt.
772
773         [QT] GraphicsContext's currenPath can be transformed
774         https://bugs.webkit.org/show_bug.cgi?id=22163
775
776         * platform/graphics/GraphicsContextPrivate.h:
777         * platform/graphics/qt/GraphicsContextQt.cpp:
778         (WebCore::GraphicsContext::restorePlatformState):
779         (WebCore::GraphicsContext::fillPath):
780         (WebCore::GraphicsContext::strokePath):
781         (WebCore::GraphicsContext::fillRect):
782         (WebCore::GraphicsContext::translate):
783         (WebCore::GraphicsContext::rotate):
784         (WebCore::GraphicsContext::scale):
785         (WebCore::GraphicsContext::concatCTM):
786
787 2008-11-26  Jan Michael Alonzo  <jmalonzo@webkit.org>
788
789         Gtk build script minor fixes. Not reviewed.
790
791         * GNUmakefile.am:
792           - Add ScriptInstance.h (introduced in r38774) to
793         the build.
794           - Move WML and GEOLOCATION conditionals before the SVG
795         conditional to be consistent with the style of the script.
796           - Move GeolocationGtk sources to webcoregtk_sources.
797
798 2008-11-26  Dmitry Titov  <dimich@chromium.org>
799
800         Reviewed by Darin Adler and Eric Seidel.
801
802         https://bugs.webkit.org/show_bug.cgi?id=22469
803
804         Move the class DOMWindowTimer from JSDOMWindowBase into its own file in
805         preparation to making it work for Workers. For now, just move the code and couple
806         of global variables.
807
808         * GNUmakefile.am:
809         * WebCore.pro:
810         * WebCore.vcproj/WebCore.vcproj:
811         * WebCore.xcodeproj/project.pbxproj:
812         * WebCoreSources.bkl:
813         * bindings/js/JSDOMWindowBase.cpp:
814         (WebCore::JSDOMWindowBase::installTimeout):
815         (WebCore::JSDOMWindowBase::pauseTimeouts):
816         (WebCore::JSDOMWindowBase::resumeTimeouts):
817         (WebCore::JSDOMWindowBase::timerFired):
818         * bindings/js/JSDOMWindowBase.h:
819         * bindings/js/DOMTimer.cpp: Added.
820         (WebCore::DOMTimer::DOMTimer):
821         (WebCore::DOMTimer::~DOMTimer):
822         (WebCore::DOMTimer::fired):
823         * bindings/js/DOMTimer.h: Added.
824         (WebCore::DOMTimer::timeoutId):
825         (WebCore::DOMTimer::nestingLevel):
826         (WebCore::DOMTimer::setNestingLevel):
827         (WebCore::DOMTimer::action):
828         (WebCore::DOMTimer::takeAction):
829
830 2008-11-25  Darin Fisher  <darin@chromium.org>
831
832         Fix bustage.
833
834         https://bugs.webkit.org/show_bug.cgi?id=22493
835         Need to expose bridge/*.h to the WebKit build.
836
837         * WebCore.vcproj/WebCore.vcproj:
838
839 2008-11-25  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
840
841         Not reviewed. Fix build, by removing some wrong last-minute changes.
842
843         * wml/WMLIntrinsicEvent.cpp:
844         (WebCore::createTaskElement):
845         * wml/WMLOnEventElement.cpp:
846         (WebCore::WMLOnEventElement::registerTask):
847
848 2008-11-25  Darin Fisher  <darin@chromium.org>
849
850         Reviewed by Geoffrey Garen.
851
852         https://bugs.webkit.org/show_bug.cgi?id=22493
853         Abstract away JSC:: usage in WebCore/html
854
855         * WebCore.xcodeproj/project.pbxproj:
856         * bindings/js/JSPluginElementFunctions.cpp:
857         (WebCore::pluginInstance):
858         * bindings/js/ScriptController.h:
859         * bindings/js/ScriptControllerMac.mm:
860         (WebCore::ScriptController::createScriptInstanceForWidget):
861         * bindings/js/ScriptInstance.h: Added.
862         * html/HTMLPlugInElement.cpp:
863         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
864         (WebCore::HTMLPlugInElement::getInstance):
865         * html/HTMLPlugInElement.h:
866
867 2008-11-24  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
868
869         Reviewed by Sam Weinig.
870
871         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22477
872
873         A WMLTaskElement checks wheter it's parent is an <anchor>/<do>/<onevent> element, and calls registerTask(this) on the parent.
874         Add a isWMLTaskElement() function to WMLElement, making it possible to cast to WMLTaskElement directly.
875
876         Add WMLEventHandlingElement class, inheriting from WMLElement, to serve as common base WMLTemplate/Option/CardElement,
877         centralizing the eventHandler() / createEventHandlerIfNeeded() implementation. Add a isWMLEventHandlingElement()
878         function to WMLElement, so WMLOnEventElement can create event handlers, without knowing wheter it's a
879         <template>/<option> or <card> element.
880
881         Add complete <onevent> support.
882
883         * WebCore.xcodeproj/project.pbxproj:
884         * wml/WMLCardElement.cpp:
885         (WebCore::WMLCardElement::WMLCardElement):
886         (WebCore::WMLCardElement::setActiveCardInDocument):
887         * wml/WMLCardElement.h:
888         (WebCore::WMLCardElement::isVisible):
889         (WebCore::WMLCardElement::setVisible):
890         * wml/WMLElement.h:
891         (WebCore::WMLElement::isWMLTaskElement):
892         * wml/WMLEventHandlingElement.cpp: Added.
893         (WebCore::WMLEventHandlingElement::WMLEventHandlingElement):
894         (WebCore::WMLEventHandlingElement::createEventHandlerIfNeeded):
895         * wml/WMLEventHandlingElement.h: Added.
896         (WebCore::WMLEventHandlingElement::isWMLEventHandlingElement):
897         (WebCore::WMLEventHandlingElement::eventHandler):
898         * wml/WMLOnEventElement.cpp: Added.
899         (WebCore::WMLOnEventElement::WMLOnEventElement):
900         (WebCore::WMLOnEventElement::parseMappedAttribute):
901         (WebCore::WMLOnEventElement::registerTask):
902         * wml/WMLOnEventElement.h: Added.
903         * wml/WMLSetvarElement.cpp:
904         (WebCore::WMLSetvarElement::parseMappedAttribute):
905         (WebCore::WMLSetvarElement::insertedIntoDocument):
906         * wml/WMLTagNames.in:
907         * wml/WMLTaskElement.cpp:
908         (WebCore::WMLTaskElement::insertedIntoDocument):
909         * wml/WMLTaskElement.h:
910         (WebCore::WMLTaskElement::isWMLTaskElement):
911
912 2008-11-25  Pierre-Olivier Latour  <pol@apple.com>
913
914         Reviewed by Mark Rowe.
915
916         createFontCustomPlatformData() crashes if CGFontCreateWithPlatformFont() returns NULL
917
918         https://bugs.webkit.org/show_bug.cgi?id=22503
919
920         * platform/graphics/mac/FontCustomPlatformData.cpp:
921         (WebCore::createFontCustomPlatformData):
922
923 2008-11-25  Julien Chaffraix  <jchaffraix@webkit.org>
924
925         Reviewed by Eric Seidel.
926
927         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
928         https://bugs.webkit.org/show_bug.cgi?id=22441
929
930         Element's other than HTML ones take a QualifiedName in their constructors.
931         To make HTMLElementFactory closer to the other ElementFactory, we need
932         to make them take the same arguments.
933         This patch only makes the 5 first one in HTMLElementFactory abide by that. The others
934         will go into the next patch.
935
936         * dom/Document.cpp:
937         (WebCore::Document::implicitClose):
938         * html/HTMLBaseElement.cpp:
939         (WebCore::HTMLBaseElement::HTMLBaseElement):
940         * html/HTMLBaseElement.h:
941         * html/HTMLBodyElement.cpp:
942         (WebCore::HTMLBodyElement::HTMLBodyElement):
943         * html/HTMLBodyElement.h:
944         * html/HTMLElementFactory.cpp:
945         (WebCore::htmlConstructor):
946         (WebCore::headConstructor):
947         (WebCore::bodyConstructor):
948         (WebCore::baseConstructor):
949         (WebCore::linkConstructor):
950         (WebCore::metaConstructor):
951         * html/HTMLHeadElement.cpp:
952         (WebCore::HTMLHeadElement::HTMLHeadElement):
953         * html/HTMLHeadElement.h:
954         * html/HTMLHtmlElement.cpp:
955         (WebCore::HTMLHtmlElement::HTMLHtmlElement):
956         * html/HTMLHtmlElement.h:
957         * html/HTMLLinkElement.cpp:
958         (WebCore::HTMLLinkElement::HTMLLinkElement):
959         * html/HTMLLinkElement.h:
960         * html/HTMLMetaElement.cpp:
961         (WebCore::HTMLMetaElement::HTMLMetaElement):
962         * html/HTMLMetaElement.h:
963         * html/HTMLParser.cpp:
964         (WebCore::HTMLParser::handleError):
965         (WebCore::HTMLParser::headCreateErrorCheck):
966         (WebCore::HTMLParser::createHead):
967         (WebCore::HTMLParser::finished):
968         * html/HTMLViewSourceDocument.cpp:
969         (WebCore::HTMLViewSourceDocument::createContainingTable):
970
971 2008-11-25  Chris Marrin  <cmarrin@apple.com>
972
973         Reviewed by Dan Bernstein.
974
975         Fix for https://bugs.webkit.org/show_bug.cgi?id=22487
976         I was not checking for the case of 0 length keyframe lists and dereffing a null pointer.
977
978         Tests: animations/empty-keyframes.html
979                animations/fill-unset-properties.html
980
981         * css/CSSStyleSelector.cpp:
982         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
983
984 2008-11-25  Chris Marrin  <cmarrin@apple.com>
985
986         Reviewed by Darin Adler
987
988         https://bugs.webkit.org/show_bug.cgi?id=22046
989
990         Fix a crash when an animation or transition end event handler
991         removes the element upon which the transition/animation is running,
992         by keeping a reference to the AnimationBase object on the stack.
993
994         Tests: animations/transform-animation-event-destroy-element.html
995                transitions/transform-transition-event-destroy-element.html
996
997         * page/animation/AnimationBase.cpp:
998         (WebCore::AnimationBase::setChanged):
999         (WebCore::AnimationBase::updateStateMachine):
1000         * page/animation/AnimationBase.h:
1001         (WebCore::AnimationBase::clearRenderer):
1002         * page/animation/AnimationController.cpp:
1003         (WebCore::AnimationControllerPrivate::clear):
1004         * page/animation/CompositeAnimation.cpp:
1005         (WebCore::CompositeAnimationPrivate::~CompositeAnimationPrivate):
1006         * page/animation/CompositeAnimation.h:
1007
1008 2008-11-25  Kevin Ollivier  <kevino@theolliviers.com>
1009
1010         Better wx build fix - support PurgeableBuffer on Mac.
1011
1012         * platform/PurgeableBuffer.h:
1013         * webcore-wx.bkl:
1014
1015 2008-11-25  Holger Hans Peter Freyther  <zecke@selfish.org>
1016
1017         Reviewed by David Kilzer.
1018
1019         https://bugs.webkit.org/show_bug.cgi?id=22022
1020
1021         Add GeoleocationServiceGtk stubs and integrate it into the buildsystem
1022
1023         Add stubs for a Gtk Implementation.
1024
1025         * GNUmakefile.am:
1026         * platform/gtk/GeolocationServiceGtk.cpp: Added.
1027         (WebCore::GeolocationService::create):
1028         (WebCore::GeolocationServiceGtk::GeolocationServiceGtk):
1029         (WebCore::GeolocationServiceGtk::startUpdating):
1030         (WebCore::GeolocationServiceGtk::stopUpdating):
1031         (WebCore::GeolocationServiceGtk::suspend):
1032         (WebCore::GeolocationServiceGtk::resume):
1033         (WebCore::GeolocationServiceGtk::lastPosition):
1034         (WebCore::GeolocationServiceGtk::lastError):
1035         * platform/gtk/GeolocationServiceGtk.h: Added.
1036
1037 2008-11-25  Kevin Ollivier  <kevino@theolliviers.com>
1038
1039         wx build fix - we don't support PurgeableBuffer on Leopard for now.
1040         
1041         * platform/PurgeableBuffer.h:
1042
1043 2008-11-25  Antti Koivisto  <antti@apple.com>
1044
1045         Reviewed by Mark Rowe.
1046
1047         Fix https://bugs.webkit.org/show_bug.cgi?id=22483
1048         Assertion failure in CachedResource::makePurgeable during layout tests
1049         
1050         Deleting SVG image can re-enter destroyDecodedData.
1051
1052         * loader/CachedImage.cpp:
1053         (WebCore::CachedImage::destroyDecodedData):
1054
1055 2008-11-25  David Levin  <levin@chromium.org>
1056
1057         Reviewed by Alexey Proskuryakov.
1058
1059         https://bugs.webkit.org/show_bug.cgi?id=22443
1060         Made the PreflightResultCache thread-safe in preparation for usage of XMLHttpRequest by
1061         Workers on threads.
1062
1063         No observable change in behavior, so no test.
1064
1065         * platform/text/PlatformString.h:
1066         * platform/text/String.cpp:
1067         (WebCore::String::substringCopy):
1068         * platform/text/StringImpl.cpp:
1069         (WebCore::StringImpl::substringCopy):
1070         * platform/text/StringImpl.h:
1071         Added the ability to copy a substring.
1072
1073         * xml/XMLHttpRequest.cpp:
1074         (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
1075         (WebCore::PreflightResultCache::PreflightResultCache):
1076         (WebCore::PreflightResultCacheItem::addToAccessControlAllowList):
1077         (WebCore::PreflightResultCacheItem::parseAccessControlAllowList):
1078         (WebCore::PreflightResultCacheItem::parseAccessControlMaxAge):
1079         (WebCore::PreflightResultCacheItem::parse):
1080         (WebCore::PreflightResultCacheItem::allowsRequest):
1081         (WebCore::PreflightResultCache::shared):
1082         (WebCore::PreflightResultCache::appendEntry):
1083         (WebCore::PreflightResultCache::canSkipPreflight):
1084         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
1085         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
1086         Made the PreflightResultCache threadsafe.
1087
1088         (WebCore::PreflightResultCacheItem::allowsCrossSiteMethod):
1089         (WebCore::PreflightResultCacheItem::allowsCrossSiteHeaders):
1090         Consolidation of duplicate logic.
1091
1092 2008-11-24  Jungshik Shin  <jshin@chromium.org>
1093
1094         Reviewed by Darin Adler.
1095
1096         For Unicode encodings other than UTF-8, use UTF-8 for
1097         form submission and URL query part encoding.
1098
1099         See https://bugs.webkit.org/show_bug.cgi?id=21635
1100
1101         Tests: http/tests/misc/submit-get-in-utf16be.html
1102                http/tests/misc/submit-get-in-utf16le.html
1103                http/tests/misc/submit-get-in-utf32be.html
1104                http/tests/misc/submit-get-in-utf32le.html
1105                http/tests/misc/submit-get-in-utf7.html
1106                http/tests/misc/submit-post-in-utf16be.html
1107                http/tests/misc/submit-post-in-utf16le.html
1108                http/tests/misc/submit-post-in-utf32be.html
1109                http/tests/misc/submit-post-in-utf32le.html
1110                http/tests/misc/submit-post-in-utf7.html
1111                http/tests/misc/url-in-utf16be.html
1112                http/tests/misc/url-in-utf16le.html
1113                http/tests/misc/url-in-utf32be.html
1114                http/tests/misc/url-in-utf32le.html
1115                http/tests/misc/url-in-utf7.html
1116  
1117         * html/HTMLFormElement.cpp:
1118         (WebCore::HTMLFormElement::formData):
1119         * loader/TextResourceDecoder.cpp:
1120         (WebCore::TextResourceDecoder::setEncoding):
1121         * platform/KURL.cpp:
1122         (WebCore::KURL::KURL):
1123         * platform/text/TextEncoding.cpp:
1124         (WebCore::UTF7Encoding):
1125         (WebCore::TextEncoding::isNonByteBasedEncoding):
1126         (WebCore::TextEncoding::closestByteBasedEquivalent):
1127         (WebCore::TextEncoding::encodingForFormSubmission):
1128         * platform/text/TextEncoding.h:
1129
1130 2008-11-24  Julien Chaffraix  <jchaffraix@webkit.org>
1131
1132         Reviewed by Darin Adler.
1133
1134         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
1135         https://bugs.webkit.org/show_bug.cgi?id=22441
1136
1137         - Make the generated ElementFactory constructors return PassRefPtr instead of raw pointers.
1138
1139         - Tweaked the generated files to better match our coding style.
1140
1141         * dom/make_names.pl:
1142
1143 2008-11-24  Antti Koivisto  <antti@apple.com>
1144
1145         Reviewed by Darin Adler.
1146         
1147         Fix for https://bugs.webkit.org/show_bug.cgi?id=22073
1148         REGRESSION(r33544): Palace in the Sky crashes WebKit
1149         
1150         HTMLTokenizer::m_hasScriptsWaitingForStylesheets would still be set while
1151         there were no scripts left to execute. 
1152         
1153         If m_hasScriptsWaitingForStylesheets becomes true during script execution
1154         bail out from executing more scripts synchronously.
1155
1156         Test: fast/tokenizer/nested-cached-scripts-and-stylesheet.html
1157
1158         * html/HTMLTokenizer.cpp:
1159         (WebCore::HTMLTokenizer::reset):
1160         (WebCore::HTMLTokenizer::notifyFinished):
1161
1162 2008-11-24  Darin Fisher  <darin@chromium.org>
1163
1164         Reviewed by Geoffrey Garen.
1165
1166         https://bugs.webkit.org/show_bug.cgi?id=22465
1167         Define KURL::copy() and use it in WorkerThread.cpp
1168
1169         * dom/WorkerThread.cpp:
1170         (WebCore::WorkerThread::WorkerThread):
1171         * platform/KURL.cpp:
1172         (WebCore::KURL::copy):
1173         * platform/KURL.h:
1174
1175 2008-11-24  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1176
1177         Reviewed by Sam Weinig.
1178
1179         Name enum values in a style guide compatible way.
1180         Allow WMLIntrinsicEvent inclusion, without needing other includes.
1181
1182         * wml/WMLIntrinsicEvent.cpp:
1183         (WebCore::createTaskElement):
1184         * wml/WMLIntrinsicEvent.h:
1185         * wml/WMLIntrinsicEventHandler.cpp:
1186         * wml/WMLIntrinsicEventHandler.h:
1187         (WebCore::):
1188
1189 2008-11-24  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1190
1191         Reviewed by Sam Weinig.
1192
1193         Add wmlPageStateForDocument() helper function and use it in some places.
1194
1195         * wml/WMLAccessElement.cpp:
1196         (WebCore::WMLAccessElement::parseMappedAttribute):
1197         * wml/WMLDocument.cpp:
1198         (WebCore::WMLDocument::WMLDocument):
1199         (WebCore::WMLDocument::finishedParsing):
1200         (WebCore::wmlPageStateForDocument):
1201         * wml/WMLDocument.h:
1202         * wml/WMLGoElement.cpp:
1203         (WebCore::WMLGoElement::executeTask):
1204         * wml/WMLPrevElement.cpp:
1205         (WebCore::WMLPrevElement::executeTask):
1206         * wml/WMLRefreshElement.cpp:
1207         (WebCore::WMLRefreshElement::executeTask):
1208         * wml/WMLTaskElement.cpp:
1209         (WebCore::WMLTaskElement::storeVariableState):
1210         * wml/WMLTaskElement.h:
1211
1212 2008-11-24  Antti Koivisto  <antti@apple.com>
1213
1214         Reviewed by Geoff Garen and Sam Weinig.
1215
1216         https://bugs.webkit.org/show_bug.cgi?id=22214
1217         Keep dead resources in memory cache in purgeable memory.
1218         <rdar://problem/6333088>
1219         
1220         OS X 10.5 has purgeable memory kernel facility that allows marking reserved memory
1221         areas as less important. Under memory pressure system can steal pages that have
1222         been marked purgeable for (hopefully) better uses. This is ideal for caches.
1223         
1224         Only resources larger than 16KB will be moved to the purgeable memory.
1225
1226         * WebCore.base.exp:
1227         * WebCore.vcproj/WebCore.vcproj:
1228         * WebCore.xcodeproj/project.pbxproj:
1229         * loader/Cache.cpp:
1230         (WebCore::Cache::requestResource):
1231         (WebCore::Cache::requestUserCSSStyleSheet):
1232         (WebCore::Cache::resourceForURL):
1233         (WebCore::Cache::pruneDeadResources):
1234         (WebCore::Cache::TypeStatistic::addResource):
1235         (WebCore::Cache::getStatistics):
1236         (WebCore::Cache::dumpStats):
1237         * loader/Cache.h:
1238         (WebCore::Cache::TypeStatistic::TypeStatistic):
1239         * loader/CachedCSSStyleSheet.cpp:
1240         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
1241         (WebCore::CachedCSSStyleSheet::sheetText):
1242         * loader/CachedCSSStyleSheet.h:
1243         * loader/CachedImage.cpp:
1244         (WebCore::CachedImage::addClient):
1245         (WebCore::CachedImage::image):
1246         (WebCore::CachedImage::imageSize):
1247         (WebCore::CachedImage::imageRect):
1248         (WebCore::CachedImage::destroyDecodedData):
1249         * loader/CachedResource.cpp:
1250         (WebCore::CachedResource::addClient):
1251         (WebCore::CachedResource::makePurgeable):
1252         (WebCore::CachedResource::isPurgeable):
1253         (WebCore::CachedResource::wasPurged):
1254         * loader/CachedResource.h:
1255         (WebCore::CachedResource::data):
1256         * loader/CachedScript.cpp:
1257         (WebCore::CachedScript::allClientsRemoved):
1258         (WebCore::CachedScript::script):
1259         (WebCore::CachedScript::destroyDecodedData):
1260         * platform/PurgeableBuffer.h: Added.
1261         (WebCore::PurgeableBuffer::create):
1262         (WebCore::PurgeableBuffer::size):
1263         (WebCore::PurgeableBuffer::):
1264         (WebCore::PurgeableBuffer::purgePriority):
1265         (WebCore::PurgeableBuffer::isPurgeable):
1266         (WebCore::PurgeableBuffer::~PurgeableBuffer):
1267         (WebCore::PurgeableBuffer::data):
1268         (WebCore::PurgeableBuffer::setPurgePriority):
1269         (WebCore::PurgeableBuffer::wasPurged):
1270         (WebCore::PurgeableBuffer::makePurgeable):
1271         * platform/SharedBuffer.cpp:
1272         (WebCore::SharedBuffer::~SharedBuffer):
1273         (WebCore::SharedBuffer::adoptPurgeableBuffer):
1274         (WebCore::SharedBuffer::size):
1275         (WebCore::SharedBuffer::data):
1276         (WebCore::SharedBuffer::append):
1277         (WebCore::SharedBuffer::clear):
1278         (WebCore::SharedBuffer::releasePurgeableBuffer):
1279         * platform/SharedBuffer.h:
1280         (WebCore::SharedBuffer::hasPurgeableBuffer):
1281         * platform/cf/SharedBufferCF.cpp:
1282         * platform/mac/PurgeableBufferMac.cpp: Added.
1283         (WebCore::PurgeableBuffer::PurgeableBuffer):
1284         (WebCore::PurgeableBuffer::~PurgeableBuffer):
1285         (WebCore::PurgeableBuffer::create):
1286         (WebCore::PurgeableBuffer::makePurgeable):
1287         (WebCore::PurgeableBuffer::wasPurged):
1288         (WebCore::PurgeableBuffer::setPurgePriority):
1289         (WebCore::PurgeableBuffer::data):
1290
1291 2008-11-24  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1292
1293         Reviewed by George Staikos & Eric Seidel.
1294
1295         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22430
1296
1297         Regenerate WML layout test results after implementing WML specific <card> handling:
1298         Only the first <card> element should be visible after loading the document, others
1299         can be shown by using the <go> task element.
1300
1301         * dom/Document.h: Make 'finishedParsing()' a virtual function.
1302         * wml/WMLCardElement.cpp:
1303         (WebCore::WMLCardElement::WMLCardElement):
1304         (WebCore::WMLCardElement::~WMLCardElement):
1305         (WebCore::WMLCardElement::createRenderer):
1306         (WebCore::WMLCardElement::setActiveCardInDocument):
1307         (WebCore::WMLCardElement::setVisibility):
1308         * wml/WMLCardElement.h:
1309         * wml/WMLDocument.cpp:
1310         (WebCore::WMLDocument::finishedParsing): Execute WML specific logic after tokenzing.
1311         * wml/WMLDocument.h:
1312
1313 2008-11-24  Glenn Wilson  <gwilson@chromium.org>
1314
1315         Reviewed by Alexey Proskuryakov.
1316
1317         http://bugs.webkit.org/show_bug.cgi?id=15643
1318
1319         Added support for clients that wish to disable smart insert/delete
1320         and enable the "trailing whitespace selection" work-around.
1321
1322         Tests: editing/selection/doubleclick-whitespace.html
1323
1324         * editing/Editor.cpp:
1325         (WebCore::Editor::selectTrailingWhitespaceEnabled):
1326         * editing/Editor.h:
1327         * editing/Selection.cpp:
1328         (WebCore::Selection::includeTrailingWhitespace):
1329         * editing/Selection.h:
1330         * loader/EmptyClients.h:
1331         (WebCore::EmptyEditorClient::selectTrailingWhitespaceEnabled):
1332         * page/EditorClient.h:
1333         * page/EventHandler.cpp:
1334         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
1335
1336 2008-11-24  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1337
1338         Not reviewed. Forgot to include WMLPageState.h in last commit.
1339
1340         * wml/WMLPageState.h:
1341         (WebCore::WMLPageState::restrictDeckAccessToDomain):
1342         (WebCore::WMLPageState::restrictDeckAccessToPath):
1343
1344 2008-11-24  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1345
1346         Reviewed by Oliver Hunt & Eric Seidel.
1347
1348         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22431
1349
1350         Implement WMLAccessElement. It just propogates two attributes values to WMLPageState.
1351
1352         * WebCore.xcodeproj/project.pbxproj:
1353         * wml/WMLAccessElement.cpp: Added.
1354         (WebCore::WMLAccessElement::WMLAccessElement):
1355         (WebCore::WMLAccessElement::parseMappedAttribute):
1356         * wml/WMLAccessElement.h: Added.
1357         * wml/WMLTagNames.in:
1358         * wml/WMLPageState.h: Rename functions.
1359         (WebCore::WMLPageState::restrictDeckAccessToDomain):
1360         (WebCore::WMLPageState::restrictDeckAccessToPath):
1361         * wml/WMLVariables.cpp: Add new helper function.
1362         (WebCore::valueContainsVariableReference):
1363         * wml/WMLVariables.h:
1364         (WebCore::):
1365
1366 2008-11-24  Darin Adler  <darin@apple.com>
1367
1368         Reviewed by Dan Bernstein.
1369
1370         - https://bugs.webkit.org/show_bug.cgi?id=22470
1371           remove unneeded URL argument from FrameLoaderClient::updateGlobalHistory
1372
1373         * loader/EmptyClients.h:
1374         (WebCore::EmptyFrameLoaderClient::updateGlobalHistory): Remove argument.
1375         * loader/FrameLoader.cpp:
1376         (WebCore::FrameLoader::updateHistoryForStandardLoad): Don't pass the URL.
1377         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Ditto.
1378         * loader/FrameLoaderClient.h: Remove argument.
1379
1380 2008-11-24  Finnur Thorarinsson  <finnur.webkit@gmail.com>
1381
1382         Reviewed by Darin Adler.
1383
1384         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22432
1385
1386         Add plumbing for tickmark support for the scrollbars. The painting code
1387         for the scrollbar just needed to call paintTickmarks at the right time
1388         and a default no-op implementation is provided, which the ports will
1389         need to override.
1390
1391         * platform/ScrollbarThemeComposite.cpp:
1392         (WebCore::ScrollbarThemeComposite::paint):
1393         * platform/ScrollbarThemeComposite.h:
1394         (WebCore::ScrollbarThemeComposite::paintTickmarks):
1395
1396 2008-11-24  Darin Fisher  <darin@chromium.org>
1397
1398         Reviewed by Sam Weinig.
1399
1400         https://bugs.webkit.org/show_bug.cgi?id=22448
1401         Create an abstraction for JSC::SourceCode
1402
1403         * WebCore.vcproj/WebCore.vcproj:
1404         * bindings/js/CachedScriptSourceProvider.h:
1405         * bindings/js/ScriptController.cpp:
1406         (WebCore::ScriptController::evaluate):
1407         * bindings/js/ScriptController.h:
1408         * bindings/js/ScriptSourceCode.h: Added.
1409         (WebCore::ScriptSourceCode::ScriptSourceCode):
1410         (WebCore::ScriptSourceCode::length):
1411         (WebCore::ScriptSourceCode::jsSourceCode):
1412         * bindings/js/WorkerScriptController.cpp:
1413         (WebCore::Workevn ScriptController::evaluate):
1414         * bindings/js/WorkerScriptController.h:
1415         * dom/ScriptElement.cpp:
1416         (WebCore::ScriptElement::insertedIntoDocument):
1417         (WebCore::ScriptElement::childrenChanged):
1418         (WebCore::ScriptElementData::evaluateScript):
1419         (WebCore::ScriptElementData::notifyFinished):
1420         * dom/ScriptElement.h:
1421         * dom/WorkerThread.cpp:
1422         (WebCore::WorkerThread::workerThread):
1423         * dom/WorkerThread.h:
1424         * dom/XMLTokenizer.cpp:
1425         (WebCore::XMLTokenizer::notifyFinished):
1426         * dom/XMLTokenizerLibxml2.cpp:
1427         (WebCore::XMLTokenizer::endElementNs):
1428         * dom/XMLTokenizerQt.cpp:
1429         (WebCore::XMLTokenizer::parseEndElement):
1430         * html/HTMLTokenizer.cpp:
1431         (WebCore::HTMLTokenizer::scriptHandler):
1432         (WebCore::HTMLTokenizer::scriptExecution):
1433         (WebCore::HTMLTokenizer::notifyFinished):
1434         * html/HTMLTokenizer.h:
1435         * loader/FrameLoader.cpp:
1436         (WebCore::FrameLoader::executeScript):
1437         * loader/FrameLoader.h:
1438
1439 2008-11-24  Darin Adler  <darin@apple.com>
1440
1441         Reviewed by Dan Bernstein.
1442
1443         - finish https://bugs.webkit.org/show_bug.cgi?id=22295
1444           track which history items are from page load failures
1445
1446         * WebCore.base.exp: Exported new function.
1447
1448         * loader/DocumentLoader.cpp:
1449         (WebCore::DocumentLoader::urlForHistoryReflectsFailure): Added.
1450         * loader/DocumentLoader.h: Ditto.
1451
1452 2008-11-24  Chris Fleizach  <cfleizach@apple.com>
1453
1454         Reviewed by Beth Dakin.
1455
1456         Bug 22461: AccessibilityListBox::doAccessibilityHitTest() signature does not match the base class
1457         https://bugs.webkit.org/show_bug.cgi?id=22461
1458  
1459         Changing AccessibilityListBox to use its parent's signature for hit testing
1460
1461         * page/AccessibilityListBox.cpp:
1462         (WebCore::AccessibilityListBox::doAccessibilityHitTest):
1463         * page/AccessibilityListBox.h:
1464
1465 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
1466
1467         Fix Windows build: selectionRect() -> selectionBounds().
1468
1469         * page/win/FrameCGWin.cpp:
1470         (WebCore::imageFromSelection):
1471
1472 2008-11-24  Glenn Wilson  <gwilson@chromium.org>
1473
1474         Reviewed by Darin Adler.
1475
1476         http://bugs.webkit.org/show_bug.cgi?id=18703
1477         "Changing the 'size' property on a text input does not affect its length"
1478
1479         Text fields would not repaint themselves after having their "size" 
1480         attributes modified.  This fix tells the object to recalculate its 
1481         width and repaint itself when its "size" attribute is parsed.
1482
1483         Test: fast/js/text-field-resize.html
1484
1485         * html/HTMLInputElement.cpp:
1486         (WebCore::HTMLInputElement::parseMappedAttribute):
1487
1488 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
1489
1490         Reviewed by Darin Adler
1491
1492         Followup from changes for https://bugs.webkit.org/show_bug.cgi?id=22433
1493         
1494         Make RenderView::selectionRect() private to cause compile-time
1495         errors if someone tries to call it.
1496
1497         * rendering/RenderView.h:
1498
1499 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
1500
1501         Reviewed by Dan Bernstein
1502
1503         Via: https://bugs.webkit.org/show_bug.cgi?id=22433
1504         
1505         Rename RenderView::selectionRect() to selectionBounds(), to remove
1506         longstanding ambiguity with the base class selectionRect() method.
1507         Do the same on Frame for consistency with RenderView. Assert
1508         that RenderView::selectionRect() is never called.
1509
1510         * WebCore.base.exp:
1511         * editing/SelectionController.cpp:
1512         (WebCore::SelectionController::focusedOrActiveStateChanged):
1513         * page/DragController.cpp:
1514         (WebCore::dragLocForSelectionDrag):
1515         * page/Frame.cpp:
1516         (WebCore::Frame::selectionBounds):
1517         (WebCore::Frame::revealSelection):
1518         * page/Frame.h:
1519         * page/mac/FrameMac.mm:
1520         (WebCore::Frame::selectionImage):
1521         * rendering/RenderView.cpp:
1522         (WebCore::RenderView::selectionRect):
1523         (WebCore::RenderView::selectionBounds):
1524         * rendering/RenderView.h:
1525
1526 2008-11-19  Julien Chaffraix  <jchaffraix@webkit.org>
1527
1528         Reviewed by Darin Adler.
1529
1530         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
1531         https://bugs.webkit.org/show_bug.cgi?id=22441
1532
1533         - Make HTMLElementFactory::createHTMLElement take a QualifiedName instead of
1534         an AtomicString.
1535
1536         - Updated the elements' constructors and the callers to reflect the previous change.
1537
1538         * dom/Document.cpp:
1539         (WebCore::Document::createElement):
1540         * html/HTMLDocument.cpp:
1541         (WebCore::HTMLDocument::createElement):
1542         * html/HTMLElement.cpp:
1543         (WebCore::HTMLElement::cloneNode):
1544         * html/HTMLElementFactory.cpp:
1545         (WebCore::htmlConstructor):
1546         (WebCore::headConstructor):
1547         (WebCore::bodyConstructor):
1548         (WebCore::baseConstructor):
1549         (WebCore::linkConstructor):
1550         (WebCore::metaConstructor):
1551         (WebCore::styleConstructor):
1552         (WebCore::titleConstructor):
1553         (WebCore::frameConstructor):
1554         (WebCore::framesetConstructor):
1555         (WebCore::iframeConstructor):
1556         (WebCore::formConstructor):
1557         (WebCore::buttonConstructor):
1558         (WebCore::inputConstructor):
1559         (WebCore::isindexConstructor):
1560         (WebCore::fieldsetConstructor):
1561         (WebCore::keygenConstructor):
1562         (WebCore::labelConstructor):
1563         (WebCore::legendConstructor):
1564         (WebCore::optgroupConstructor):
1565         (WebCore::optionConstructor):
1566         (WebCore::selectConstructor):
1567         (WebCore::textareaConstructor):
1568         (WebCore::dlConstructor):
1569         (WebCore::ulConstructor):
1570         (WebCore::olConstructor):
1571         (WebCore::dirConstructor):
1572         (WebCore::menuConstructor):
1573         (WebCore::liConstructor):
1574         (WebCore::blockquoteConstructor):
1575         (WebCore::divConstructor):
1576         (WebCore::headingConstructor):
1577         (WebCore::hrConstructor):
1578         (WebCore::paragraphConstructor):
1579         (WebCore::preConstructor):
1580         (WebCore::basefontConstructor):
1581         (WebCore::fontConstructor):
1582         (WebCore::modConstructor):
1583         (WebCore::anchorConstructor):
1584         (WebCore::imageConstructor):
1585         (WebCore::mapConstructor):
1586         (WebCore::areaConstructor):
1587         (WebCore::canvasConstructor):
1588         (WebCore::appletConstructor):
1589         (WebCore::embedConstructor):
1590         (WebCore::objectConstructor):
1591         (WebCore::paramConstructor):
1592         (WebCore::scriptConstructor):
1593         (WebCore::tableConstructor):
1594         (WebCore::tableCaptionConstructor):
1595         (WebCore::tableColConstructor):
1596         (WebCore::tableRowConstructor):
1597         (WebCore::tableCellConstructor):
1598         (WebCore::tableSectionConstructor):
1599         (WebCore::brConstructor):
1600         (WebCore::quoteConstructor):
1601         (WebCore::marqueeConstructor):
1602         (WebCore::audioConstructor):
1603         (WebCore::videoConstructor):
1604         (WebCore::sourceConstructor):
1605         (WebCore::HTMLElementFactory::createHTMLElement):
1606         * html/HTMLElementFactory.h:
1607         * html/HTMLParser.cpp:
1608         (WebCore::HTMLParser::getNode):
1609
1610 2008-11-24  Brent Fulgham  <bfulgham@gmail.com>
1611
1612         Reviewed by Alexey Proskuryakov.
1613
1614         https://bugs.webkit.org/show_bug.cgi?id=22444
1615
1616         Correct bad default constructor for Cairo FontPlatformData so that
1617         the m_scaledFont member is initialized.  Previously this would be
1618         set to 0xbaadf00d, which would result in infinite loops while
1619         attempting to deal with the font cache.
1620
1621         * platform/graphics/win/FontPlatformData.h:
1622         (WebCore::FontPlatformData::FontPlatformData): Initialize m_scaledFont to 0
1623
1624 2008-11-24  Alexey Proskuryakov  <ap@webkit.org>
1625
1626         Reviewed by Darin Adler.
1627
1628         https://bugs.webkit.org/show_bug.cgi?id=22455
1629         Add support for Worker.terminate()
1630
1631         Test: fast/workers/worker-terminate.html
1632
1633         * dom/Worker.idl:
1634         * dom/Worker.cpp:
1635         * dom/Worker.h:
1636         Added terminate().
1637
1638         * dom/WorkerMessagingProxy.h: (WebCore::WorkerMessagingProxy::askedToTerminate):
1639         * dom/WorkerMessagingProxy.cpp:
1640         (WebCore::MessageWorkerTask::performTask): Don't dispatch messages if the worker was asked
1641         to terminate (this is not mentioned in draft spec, but makes sense anyway).
1642         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): The proxy now remembers if it was
1643         asked to terminate in m_askedToTerminate member variable. Also, changed m_unconfirmedMessageCount
1644         to only track messages that were posted to worker thread, avoiding a leak if the script
1645         could not be loaded.
1646         (WebCore::WorkerMessagingProxy::postMessageToWorkerContext): Return early if terminating.
1647         (WebCore::WorkerMessagingProxy::workerThreadCreated): Stop the thread if already asked for.
1648         (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): Even if worker context
1649         was destroyed, the worker object may still be alive now, so don't delete self in this case.
1650         (WebCore::WorkerMessagingProxy::terminate): Stop the thread if it was already created, or
1651         remember to stop it when it is created.
1652         (WebCore::WorkerMessagingProxy::reportWorkerThreadActivityInternal): Don't track activity
1653         if the thread asked to stop anyway.
1654         (WebCore::WorkerMessagingProxy::workerThreadHasPendingActivity): Ditto.
1655
1656         * dom/WorkerThread.cpp:
1657         * dom/WorkerThread.h:
1658         Fixed a race condition in stop().
1659
1660 2008-11-24  Alexey Proskuryakov  <ap@webkit.org>
1661
1662         Reviewed by Mark Rowe.
1663
1664         https://bugs.webkit.org/show_bug.cgi?id=22439
1665         Won't load stylesheets with filenames less than 2 characters long in xhtml.
1666
1667         Test: http/tests/misc/single-character-pi-stylesheet.xhtml
1668
1669         * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::checkStyleSheet):
1670         Fix up the logic.
1671
1672 2008-11-24  Holger Hans Peter Freyther  <zecke@selfish.org>
1673
1674         Reviewed by Mark Rowe.
1675
1676         [Gtk+] Add configure option to enable Web Workers and enable it by default
1677
1678         Add --enable-workers to the buildsystem (used by build-webkit) add
1679         the to be build files to the GNUmakefile.am and change build-webkit
1680         to enable Web Workers by default.
1681
1682         * GNUmakefile.am:
1683
1684 2008-11-24  Alexey Proskuryakov  <ap@webkit.org>
1685
1686         Build fix (for Windows Cairo port?)
1687
1688         * page/DOMWindow.idl: Use ENABLE_CHANNEL_MESSAGING instead of ENABLE(CHANNEL_MESSAGING), as
1689         the ENABLE macro is not available in idls.
1690
1691 2008-11-22  Dimitri Glazkov  <dglazkov@chromium.org>
1692
1693         Reviewed by Darin Adler.
1694
1695         https://bugs.webkit.org/show_bug.cgi?id=22421
1696         Added ScriptValue to Visual Studio and XCode projects.
1697
1698         * WebCore.vcproj/WebCore.vcproj:
1699         * WebCore.xcodeproj/project.pbxproj:
1700
1701 2008-11-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1702
1703         Reviewed by Holger Freyther.
1704
1705         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22426
1706
1707         Add WMLInstrinsicEvent/EventHandler implementation. Code not yet used.
1708
1709         * WebCore.xcodeproj/project.pbxproj:
1710         * wml/WMLIntrinsicEvent.cpp: Added.
1711         (WebCore::createTaskElement):
1712         (WebCore::WMLIntrinsicEvent::WMLIntrinsicEvent):
1713         * wml/WMLIntrinsicEvent.h: Added.
1714         (WebCore::WMLIntrinsicEvent::create):
1715         (WebCore::WMLIntrinsicEvent::createWithTask):
1716         (WebCore::WMLIntrinsicEvent::taskElement):
1717         * wml/WMLIntrinsicEventHandler.cpp: Added.
1718         (WebCore::WMLIntrinsicEventHandler::WMLIntrinsicEventHandler):
1719         (WebCore::WMLIntrinsicEventHandler::registerIntrinsicEvent):
1720         (WebCore::WMLIntrinsicEventHandler::triggerIntrinsicEvent):
1721         (WebCore::WMLIntrinsicEventHandler::hasIntrinsicEvent):
1722         * wml/WMLIntrinsicEventHandler.h: Added.
1723         (WebCore::):
1724
1725 2008-11-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1726
1727         Reviewed by Holger Freyther.
1728
1729         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22423
1730
1731         Add <go> stub implementation. Add complete <prev>/<refresh> and <setvar> implementation.
1732         Activate code handling <setvar> registration in WMLTaskElement.
1733
1734         * wml/WMLGoElement.cpp: Added.
1735         (WebCore::WMLGoElement::WMLGoElement):
1736         (WebCore::WMLGoElement::~WMLGoElement):
1737         (WebCore::WMLGoElement::parseMappedAttribute):
1738         (WebCore::WMLGoElement::executeTask):
1739         * wml/WMLGoElement.h: Added.
1740         * wml/WMLPrevElement.cpp: Added.
1741         (WebCore::WMLPrevElement::WMLPrevElement):
1742         (WebCore::WMLPrevElement::~WMLPrevElement):
1743         (WebCore::WMLPrevElement::executeTask):
1744         * wml/WMLPrevElement.h: Added.
1745         * wml/WMLRefreshElement.cpp: Added.
1746         (WebCore::WMLRefreshElement::WMLRefreshElement):
1747         (WebCore::WMLRefreshElement::~WMLRefreshElement):
1748         (WebCore::WMLRefreshElement::executeTask):
1749         * wml/WMLRefreshElement.h: Added.
1750         * wml/WMLSetvarElement.cpp: Added.
1751         (WebCore::WMLSetvarElement::WMLSetvarElement):
1752         (WebCore::WMLSetvarElement::~WMLSetvarElement):
1753         (WebCore::WMLSetvarElement::parseMappedAttribute):
1754         (WebCore::WMLSetvarElement::insertedIntoDocument):
1755         (WebCore::WMLSetvarElement::name):
1756         (WebCore::WMLSetvarElement::value):
1757         * wml/WMLSetvarElement.h: Added.
1758         * wml/WMLTagNames.in:
1759         * wml/WMLTaskElement.cpp:
1760         (WebCore::WMLTaskElement::registerVariableSetter):
1761         (WebCore::WMLTaskElement::storeVariableState):
1762         * wml/WMLTaskElement.h:
1763         * WebCore.xcodeproj/project.pbxproj:
1764
1765 2008-11-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1766
1767         Not reviewed. Forgot to include WMLPageState.* in the last commit.
1768
1769         * wml/WMLPageState.cpp:
1770         (WebCore::WMLPageState::setNeedCheckDeckAccess):
1771         * wml/WMLPageState.h:
1772         (WebCore::WMLPageState::storeVariables):
1773
1774 2008-11-21  Alexey Proskuryakov  <ap@webkit.org>
1775
1776         Reviewed by Darin Adler.
1777
1778         https://bugs.webkit.org/show_bug.cgi?id=22397
1779         Worker threads are not destroyed if running a JS loop
1780
1781         Since the event loop is not ever entered again in this case, the fix necessarily involves
1782         some shared data hackery.
1783
1784         * dom/WorkerThread.cpp: (WebCore::WorkerThread::stop):
1785         * dom/WorkerThread.h:
1786         Added a stop() method, which asks the thread to exit as soon as possible. In the future, it
1787         may need to abort other kinds of synchronous processing, such as importScripts or XHR.
1788
1789         * bindings/js/WorkerScriptController.cpp:
1790         (WebCore::WorkerScriptController::WorkerScriptController):
1791         (WebCore::WorkerScriptController::evaluate):
1792         (WebCore::WorkerScriptController::forbidExecution):
1793         * bindings/js/WorkerScriptController.h:
1794         Added a forbidExecution() method, which interrupts currently running JS, and makes any
1795         future calls to evaluate() return immediately.
1796
1797         * dom/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
1798         Call WorkerThread::stop().
1799
1800 2008-11-21  Kevin Watters  <kevinwatters@gmail.com>
1801
1802         Reviewed by Kevin Ollivier.
1803
1804         Improve wx image drawing performance considerably when using wxGraphicsContext
1805         by avoiding unnecessary copies and drawing.
1806         
1807         https://bugs.webkit.org/show_bug.cgi?id=22404
1808
1809         * platform/graphics/wx/ImageWx.cpp:
1810         (WebCore::BitmapImage::draw):
1811         (WebCore::BitmapImage::drawPattern):
1812
1813
1814 2008-11-21  Kevin Watters  <kevinwatters@gmail.com>
1815
1816         Reviewed by Kevin Ollivier.
1817
1818         Implementation of AffineTransform::mapRect for wx.
1819         
1820         https://bugs.webkit.org/show_bug.cgi?id=22401
1821
1822         * platform/graphics/wx/AffineTransformWx.cpp:
1823         (WebCore::AffineTransform::mapRect):
1824
1825 2008-11-21  Justin Garcia  <justin.garcia@apple.com>
1826
1827         Reviewed by Darin Adler.
1828
1829         <rdar://problem/5381788> Match NSTextView editing behavior at the end of hyperlink text
1830         
1831         Change link editing behavior to match TextEdit and MS Word when editing before and after 
1832         a link (Pages has two caret positions at link boundaries, Thunderbird and FF behave like we 
1833         used to, so it's difficult to get out of link editing mode):
1834         When inserting before or after a link, always insert content outside of the link.  This
1835         makes it impossible to get stuck in link editing mode, while making it slightly more 
1836         difficult to edit link labels.  WebKit editors that care about this can add UI for editing 
1837         link labels, like GMail and GoogleDocs have done.  We never actually had any bugs complaining
1838         about how it was difficult to edit link labels at the start/end, the code was just introduced 
1839         with another bug fix without much thought.
1840         
1841         Don't remember removed links anymore, no other editor does this and it made it 
1842         difficult/impossible to get out of link editing mode.  This code was added to fix
1843         <rdar://problem/4069359>, which is fixed instead by removing the styles from an 
1844         enclosing anchor element from those styles that we remember when we delete content.
1845
1846         * editing/CompositeEditCommand.cpp:
1847         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
1848         * editing/CompositeEditCommand.h:
1849         * editing/DeleteSelectionCommand.cpp:
1850         (WebCore::removeEnclosingAnchorStyle):
1851         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
1852         (WebCore::DeleteSelectionCommand::doApply):
1853         * editing/DeleteSelectionCommand.h:
1854         * editing/EditCommand.cpp:
1855         (WebCore::EditCommand::apply):
1856         * editing/Editor.cpp:
1857         (WebCore::Editor::appliedEditing):
1858         * editing/InsertTextCommand.cpp:
1859         (WebCore::InsertTextCommand::prepareForTextInsertion):
1860         (WebCore::InsertTextCommand::input):
1861         * editing/RemoveFormatCommand.cpp:
1862         (WebCore::RemoveFormatCommand::doApply):
1863         * editing/SelectionController.cpp:
1864         (WebCore::SelectionController::setSelection):
1865         * editing/SelectionController.h:
1866
1867 2008-11-21  Alice Liu  <alice.liu@apple.com>
1868
1869         Rubber-stamped by Dan Bernstein.
1870
1871         fixed <rdar://6340771> crashing on print preview
1872
1873         * platform/graphics/win/GraphicsContextCGWin.cpp:
1874         (WebCore::GraphicsContext::drawWindowsBitmap):
1875
1876 2008-11-21  Darin Fisher  <darin@chromium.org>
1877
1878         Reviewed by Geoffrey Garen.
1879
1880         https://bugs.webkit.org/show_bug.cgi?id=22390
1881         Abstract away JSC:: usage in WebCore/xml
1882
1883         * bindings/js/ScriptString.h: Added.
1884         (WebCore::ScriptString::ScriptString):
1885         (WebCore::ScriptString::operator JSC::UString):
1886         (WebCore::ScriptString::isNull):
1887         (WebCore::ScriptString::size):
1888         (WebCore::ScriptString::operator=):
1889         (WebCore::ScriptString::operator+=):
1890         * inspector/InspectorController.cpp:
1891         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
1892         (WebCore::InspectorResource::setXMLHttpRequestProperties):
1893         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1894         * inspector/InspectorController.h:
1895         * xml/XMLHttpRequest.cpp:
1896         (WebCore::XMLHttpRequest::responseText):
1897         (WebCore::XMLHttpRequest::clearResponse):
1898         (WebCore::XMLHttpRequest::dropProtection):
1899         (WebCore::XMLHttpRequest::didFinishLoading):
1900         (WebCore::XMLHttpRequest::didReceiveData):
1901         * xml/XMLHttpRequest.h:
1902         (WebCore::XMLHttpRequest::setLastSendURL):
1903
1904 2008-11-21  Sam Weinig  <sam@webkit.org>
1905
1906         Reviewed by Geoffrey Garen.
1907
1908         Destroy script decoded data on a zero-delay timer after
1909         decoding.  This means we now have no decoded script data
1910         at the end of Membuster.
1911
1912         * loader/CachedScript.cpp:
1913         (WebCore::CachedScript::CachedScript):
1914         (WebCore::CachedScript::allClientsRemoved):
1915         (WebCore::CachedScript::script):
1916         (WebCore::CachedScript::decodedDataDeletionTimerFired):
1917         * loader/CachedScript.h:
1918
1919 2008-11-21  Simon Fraser  <simon.fraser@apple.com>
1920
1921         Reviewed by Darin Adler
1922
1923         https://bugs.webkit.org/show_bug.cgi?id=22159
1924
1925         RenderBox::absoluteClippedOverflowRect() needs to inflate the rect by
1926         maximalOutlineSize(), since a child might have an outline which projects
1927         outside the parent overflowRect().
1928         
1929         We also need to ensure that maximalOutlineSize() is updated early in styleDidChange,
1930         so that it is valid for these repaints.
1931
1932         Test: fast/repaint/outline-child-repaint.html
1933
1934         * WebCore.xcodeproj/project.pbxproj:
1935         * rendering/RenderBox.cpp:
1936         (WebCore::RenderBox::styleDidChange):
1937         (WebCore::RenderBox::absoluteClippedOverflowRect):
1938
1939 2008-11-21  Jan Michael Alonzo  <jmalonzo@webkit.org>
1940
1941         Gtk, Qt, and Wx build fix.
1942
1943         Add LinkHash.cpp in the build scripts.
1944         Add LinkHash.h to Gtk's build script.
1945
1946         LinkHash.cpp/h was introduced in r38661.
1947
1948         * GNUmakefile.am:
1949         * WebCore.pro:
1950         * WebCoreSources.bkl:
1951
1952 2008-11-21  Sam Weinig  <sam@webkit.org>
1953
1954         Reviewed by Dan Bernstein.
1955
1956         Third step in https://bugs.webkit.org/show_bug.cgi?id=22394
1957         Be more eager in destroying script decoded data
1958
1959         Destroy the decoded data when all clients are removed from a CachedScript.
1960
1961         * loader/CachedScript.cpp:
1962         (WebCore::CachedScript::allClientsRemoved):
1963         * loader/CachedScript.h:
1964         (WebCore::CachedScript::allClientsRemoved):
1965
1966 2008-11-21  Pierre-Olivier Latour  <pol@apple.com>
1967
1968         Reviewed by Dan Bernstein.
1969
1970         WebKit should be using Device RGB colorspace everywhere for
1971         consistency.
1972
1973         https://bugs.webkit.org/show_bug.cgi?id=22300
1974
1975         * page/mac/AccessibilityObjectWrapper.mm:
1976         (CreateCGColorIfDifferent):
1977         * platform/graphics/mac/ColorMac.h:
1978         * platform/graphics/mac/ColorMac.mm:
1979         (WebCore::nsColor):
1980         (+[WebCoreControlTintObserver controlTintDidChange]):
1981         * rendering/RenderThemeMac.mm:
1982         (WebCore::convertNSColorToColor):
1983         (WebCore::menuBackgroundColor):
1984
1985 2008-11-20  Julien Chaffraix  <jchaffraix@webkit.org>
1986
1987         Reviewed by Darin Adler.
1988
1989         Bug 22388: Add JSInterfaceName to the .in files
1990         https://bugs.webkit.org/show_bug.cgi?id=22388        
1991
1992         Add JSInterfaceName that is similar to interfaceName but
1993         for the JS wrappers. JSInterfaceName is always equal to interfaceName
1994         unless explicitly set.
1995         
1996         * dom/make_names.pl:
1997         * html/HTMLTagNames.in:
1998         * svg/svgtags.in:
1999
2000 2008-11-21  Sam Weinig  <sam@webkit.org>
2001
2002         Reviewed by Geoffrey Garen.
2003
2004         Second step in https://bugs.webkit.org/show_bug.cgi?id=22394
2005         Be more eager in destroying script decoded data
2006
2007         Use a new CachedScriptSourceProvider to keep CachedScripts as
2008         CachedScripts, even down into JSC.  This has the added benefit
2009         of showing the CachedScripts as live in the Caches window.
2010
2011         * GNUmakefile.am:
2012         * WebCore.vcproj/WebCore.vcproj:
2013         * WebCore.xcodeproj/project.pbxproj:
2014         * bindings/js/CachedScriptSourceProvider.h: Added.
2015         (WebCore::CachedScriptSourceProvider::create):
2016         (WebCore::CachedScriptSourceProvider::~CachedScriptSourceProvider):
2017         (WebCore::CachedScriptSourceProvider::getRange):
2018         (WebCore::CachedScriptSourceProvider::data):
2019         (WebCore::CachedScriptSourceProvider::length):
2020         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
2021         (WebCore::makeSource):
2022         * dom/ScriptElement.cpp:
2023         (WebCore::ScriptElementData::notifyFinished):
2024         * dom/XMLTokenizer.cpp:
2025         (WebCore::XMLTokenizer::notifyFinished):
2026         * html/HTMLTokenizer.cpp:
2027         (WebCore::HTMLTokenizer::notifyFinished):
2028
2029 2008-11-21  Brett Wilson  <brettw@chromium.org>
2030
2031         Fix debug-only build bustage due to a typo in an assert, and add new
2032         files to the Windows build.
2033
2034         * Info.plist:
2035         * WebCore.vcproj/WebCore.vcproj:
2036         * platform/LinkHash.h:
2037         (WebCore::LinkHashHash::avoidDeletedValue):
2038
2039 2008-11-20  Brett Wilson  <brettw@chromium.org>
2040
2041         Reviewed by Eric Seidel.
2042
2043         https://bugs.webkit.org/show_bug.cgi?id=22131
2044
2045         Factor out visited link hashing and types into a new file, LinkHash.
2046         This also changes the hash type to 64 bits, but does not actually use
2047         the extra bits yet.
2048
2049         * WebCore.xcodeproj/project.pbxproj:
2050         (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState):
2051         (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged):
2052         * css/CSSStyleSelector.h:
2053         (WebCore::CSSStyleSelector::visitedStateChanged):
2054         * dom/Document.cpp:
2055         * dom/Document.h:
2056         * page/Page.cpp:
2057         (WebCore::Page::visitedStateChanged):
2058         * page/Page.h:
2059         * page/PageGroup.cpp:
2060         (WebCore::PageGroup::isLinkVisited):
2061         (WebCore::PageGroup::addVisitedLink):
2062         * page/PageGroup.h:
2063         * platform/LinkHash.cpp: Added.
2064         (WebCore::findSlashDotDotSlash):
2065         (WebCore::findSlashSlash):
2066         (WebCore::findSlashDotSlash):
2067         (WebCore::containsColonSlashSlash):
2068         (WebCore::cleanPath):
2069         (WebCore::matchLetter):
2070         (WebCore::needsTrailingSlash):
2071         (WebCore::visitedLinkHash):
2072         * platform/LinkHash.h: Added
2073         (WebCore::LinkHashHash::hash):
2074         (WebCore::LinkHashHash::equal):
2075         (WebCore::LinkHashHash::avoidDeletedValue):
2076
2077 2008-11-21  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2078
2079         Reviewed by Alexey Proskuryakov.
2080
2081         No need to use getElementsByTagNameNS() in WML documents. Revert to using getElementByTagName() again.
2082
2083         * wml/WMLPElement.cpp:
2084         (WebCore::WMLPElement::insertedIntoDocument):
2085
2086 2008-11-21  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2087
2088         Reviewed by Alexey Proskuryakov.
2089
2090         Fix some coding style/formatting issues in WMLAElement.
2091
2092         * wml/WMLAElement.cpp:
2093         (WebCore::WMLAElement::parseMappedAttribute):
2094         (WebCore::WMLAElement::defaultEventHandler):
2095         * wml/WMLAElement.h:
2096
2097 2008-11-21  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2098
2099         Reviewed by Alexey Proskuryakov.
2100
2101         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22399
2102
2103         Implement <anchor> support for WML, add WMLVariables file containing helper functions
2104         for variable support, and a WMLTaskElement base class for WMLPrev/Go/RefreshElement.
2105
2106         * css/CSSStyleSelector.cpp:
2107         (WebCore::linkAttribute):
2108         * rendering/HitTestResult.cpp:
2109         (WebCore::HitTestResult::absoluteImageURL):
2110         (WebCore::HitTestResult::absoluteLinkURL):
2111         (WebCore::HitTestResult::isLiveLink):
2112         * wml/WMLAnchorElement.cpp: Added.
2113         (WebCore::WMLAnchorElement::WMLAnchorElement):
2114         (WebCore::WMLAnchorElement::~WMLAnchorElement):
2115         (WebCore::WMLAnchorElement::defaultEventHandler):
2116         * wml/WMLAnchorElement.h: Added.
2117         (WebCore::WMLAnchorElement::registerTask):
2118         * wml/WMLTagNames.in:
2119         * wml/WMLTaskElement.cpp: Added.
2120         (WebCore::WMLTaskElement::WMLTaskElement):
2121         (WebCore::WMLTaskElement::~WMLTaskElement):
2122         (WebCore::WMLTaskElement::insertedIntoDocument):
2123         (WebCore::WMLTaskElement::addVariableSetter):
2124         (WebCore::WMLTaskElement::removeVariableSetter):
2125         (WebCore::WMLTaskElement::storeVariableState):
2126         * wml/WMLTaskElement.h: Added.
2127         * wml/WMLVariables.cpp: Added.
2128         (WebCore::isValidVariableCharacter):
2129         (WebCore::isValidVariableReferenceCharacter):
2130         (WebCore::isValidVariableName):
2131         (WebCore::substituteVariableReferences):
2132         * wml/WMLVariables.h: Added.
2133         (WebCore::):
2134
2135 2008-11-21  Julien Chaffraix  <jchaffraix@pleyo.com>
2136
2137         Rubber-stamped by Alexey Proskuryakov.
2138
2139         Build fix when building without WORKERS on non-POSIX, non-WINDOWS
2140         machine.
2141
2142         Spotted by Mario Bensi.
2143
2144         * platform/text/TextCodecICU.cpp:
2145
2146 2008-11-20  Sam Weinig  <sam@webkit.org>
2147
2148         Reviewed by Geoffrey Garen.
2149
2150         First step in https://bugs.webkit.org/show_bug.cgi?id=22394
2151         Be more eager in destroying script decoded data
2152
2153         Pass data to be used in script execution around as JSC::SourceCode instead
2154         of a source, url, and starting line.
2155
2156         * bindings/js/ScriptController.cpp:
2157         (WebCore::ScriptController::evaluate):
2158         * bindings/js/ScriptController.h:
2159         * bindings/js/StringSourceProvider.h:
2160         (WebCore::makeSource):
2161         * bindings/js/WorkerScriptController.cpp:
2162         (WebCore::WorkerScriptController::evaluate):
2163         * bindings/js/WorkerScriptController.h:
2164         * dom/ScriptElement.cpp:
2165         (WebCore::ScriptElement::insertedIntoDocument):
2166         (WebCore::ScriptElement::childrenChanged):
2167         (WebCore::ScriptElementData::evaluateScript):
2168         (WebCore::ScriptElementData::notifyFinished):
2169         * dom/ScriptElement.h:
2170         * dom/WorkerThread.cpp:
2171         (WebCore::WorkerThread::workerThread):
2172         * dom/XMLTokenizer.cpp:
2173         (WebCore::XMLTokenizer::notifyFinished):
2174         * dom/XMLTokenizerLibxml2.cpp:
2175         (WebCore::XMLTokenizer::endElementNs):
2176         * dom/XMLTokenizerQt.cpp:
2177         (WebCore::XMLTokenizer::parseEndElement):
2178         * html/HTMLTokenizer.cpp:
2179         (WebCore::HTMLTokenizer::scriptHandler):
2180         (WebCore::HTMLTokenizer::scriptExecution):
2181         (WebCore::HTMLTokenizer::notifyFinished):
2182         * html/HTMLTokenizer.h:
2183         * loader/FrameLoader.cpp:
2184         (WebCore::FrameLoader::executeScript):
2185         * loader/FrameLoader.h:
2186
2187 2008-11-20  Sam Weinig  <sam@webkit.org>
2188
2189         Reviewed by Geoffrey Garen.
2190
2191         Fix for https://bugs.webkit.org/show_bug.cgi?id=22392
2192         REGRESION: XMLHttpRequest.responseText does unnecessary trip though WebCore::String
2193
2194         - Use jsOwnedStringOrNull to avoid conversion to WebCore::String.
2195
2196         * bindings/js/JSXMLHttpRequestCustom.cpp:
2197         (WebCore::JSXMLHttpRequest::responseText):
2198         * xml/XMLHttpRequest.idl:
2199
2200 2008-11-20  Simon Fraser  <simon.fraser@apple.com>
2201
2202         Reviewed by Dan Bernstein
2203
2204         https://bugs.webkit.org/show_bug.cgi?id=19623
2205         
2206         When an non-layer object gained a transform, it would only repaint
2207         the bounds of the new layer, which could result in redraw artifacts
2208         if the new layer was smaller. So if we're gaining a transform, we
2209         repaint.
2210         
2211         Test: fast/repaint/change-transform.html
2212
2213         * rendering/RenderObject.cpp:
2214         (WebCore::RenderObject::styleWillChange):
2215
2216 2008-11-20  Adele Peterson  <adele@apple.com>
2217
2218         Reviewed by Darin Adler. 
2219
2220         Fix for <rdar://problem/6111436> Support upload progress events on Windows
2221
2222         * platform/network/cf/ResourceHandleCFNet.cpp:
2223         (WebCore::didSendBodyData): Added.
2224         (WebCore::ResourceHandle::start): Hook up didSendBodyData callback.
2225
2226 2008-11-20  Justin Garcia  <justin.garcia@apple.com>
2227
2228         Reviewed by Darin Adler.
2229
2230         <rdar://problem/2610675> Blank line that is quoted can't be deleted
2231         
2232         If the caret is in an empty quoted paragraph, and either there is nothing before that
2233         paragraph, or what is before is unquoted, and the user presses delete, unquote that
2234         paragraph.
2235
2236         * editing/CompositeEditCommand.cpp:
2237         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): Added.
2238         Removes the line break that holds open an empty paragraph and then attempts to
2239         prune the blockquote(s) that held that line break in case they have been emptied
2240         out.  Places a line break to create in empty unquoted paragraph in place of the
2241         quoted one that was removed.
2242         * editing/CompositeEditCommand.h:
2243         * editing/TypingCommand.cpp:
2244         (WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyBlockquotedParagraph.
2245         * editing/htmlediting.cpp:
2246         (WebCore::highestEnclosingNodeOfType): Added.
2247         * editing/htmlediting.h:
2248
2249 2008-11-20  Dean Jackson  <dino@apple.com>
2250
2251         Reviewed by Antti Koivisto
2252
2253         https://bugs.webkit.org/show_bug.cgi?id=21247
2254
2255         Make transition shorthand property accept transition-delay.
2256
2257         Test: transitions/transition-shorthand-delay.html
2258
2259         * css/CSSParser.cpp:
2260         (WebCore::CSSParser::parseTransitionShorthand):
2261
2262 2008-11-20  Dean Jackson  <dino@apple.com>
2263
2264         Reviewed by Antti Koivisto
2265
2266         https://bugs.webkit.org/show_bug.cgi?id=22368
2267
2268         Make sure pauseTransition API takes transition delay into account.
2269
2270         Test: transitions/transition-drt-api-delay.html
2271
2272         * page/animation/AnimationBase.cpp:
2273         (WebCore::AnimationBase::pauseAtTime):
2274
2275 2008-11-20  Simon Fraser  <simon.fraser@apple.com>
2276
2277         Reviewed by Darin Adler
2278
2279         https://bugs.webkit.org/show_bug.cgi?id=20368
2280
2281         Implement getComputedStyle for animation properties. Remove individual
2282         computed values for transform-origin-x, transform-origin-y, and just
2283         return transform-origin instead. Return "none" for default animation-name,
2284         and fix the initial value.
2285         
2286         Tests: animations/computed-style.html
2287                transforms/computed-style-origin.html
2288
2289         * css/CSSComputedStyleDeclaration.cpp:
2290         (WebCore::):
2291         (WebCore::getDelayValue):
2292         (WebCore::getDurationValue):
2293         (WebCore::getTimingFunctionValue):
2294         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2295         * rendering/style/RenderStyle.h:
2296         (WebCore::InheritedFlags::initialAnimationName):
2297
2298 2008-11-20  Justin Garcia  <justin.garcia@apple.com>
2299
2300         Reviewed by Beth Dakin.
2301         
2302         Preparation for:
2303         <rdar://problem/2610675> Blank line that is quoted can't be deleted
2304         
2305         To fix this we need to make changes to the code that creates selections to delete
2306         when the user does a backward or forward delete with a caret selection.  For certain
2307         caret positions, we now want to remove something other than the standard "caret extended
2308         backward/forward by one unit".  The problem is that there were two pieces of code 
2309         responsible for doing this, one in Editor::deleteWithDirection, and another inside 
2310         TypingCommand::deleteKeyPressed.  The code in deleteWithDirection is a recent 
2311         addition (r19172), and adding it there caused regressions because it prevented the 
2312         code in deleteKeyPressed from ever running.  The regressions were never caught because 
2313         JS deletion uses deleteKeyPressed while manual deletion uses deleteWithDirection.
2314         
2315         This patch removes selection creation code from deleteWithDirection so that deleteKeyPressed
2316         can handle it.  That required moving code to handle the kill ring down into deleteKeyPressed.
2317         
2318         Follow up patches will fix <rdar://problem/2610675>, and attempt to eliminate the rest of the 
2319         discrepancies between the behavior of JS deletions and manual deletions, so that we 
2320         have better test coverage.
2321
2322         * editing/Editor.cpp:
2323         (WebCore::Editor::deleteWithDirection): Early return if m_frame->document() is null, instead
2324         of checking for that periodically throughout the function.  There's really nothing to be done
2325         if it's null anyway.
2326         Move kill ring code down into deleteKeyPressed.
2327         * editing/Editor.h:
2328         * editing/TypingCommand.cpp:
2329         (WebCore::TypingCommand::TypingCommand):
2330         (WebCore::TypingCommand::deleteKeyPressed):
2331         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2332         (WebCore::TypingCommand::doApply):
2333         * editing/TypingCommand.h:
2334         (WebCore::TypingCommand::create):
2335
2336 2008-11-20  Darin Adler  <darin@apple.com>
2337
2338         Earlier version reviewed by Justin Garcia.
2339
2340         - fix <rdar://problem/4108572> REGRESSION: Can't extend selection with shift-arrow in read only mode
2341
2342         * editing/Editor.cpp:
2343         (WebCore::Editor::handleKeyboardEvent): Remove isContentEditable check -- keyboard events can be
2344         handled even when the selection is not in an editable area.
2345         (WebCore::Editor::handleInputMethodKeydown): Ditto.
2346
2347         * editing/EditorCommand.cpp: Changed the enabled rule for operations that change the selection to
2348         allow use when there's a selection even if it's not in an editable area. This includes commands
2349         like shift-arrow keys to extend the slection, but not commands like arrow keys to move the
2350         insertion point.
2351
2352 2008-11-20  Alexey Proskuryakov  <ap@webkit.org>
2353
2354         Reviewed by Darin Adler.
2355
2356         https://bugs.webkit.org/show_bug.cgi?id=22380
2357         Fix WorkerContext refcounting
2358
2359         * dom/WorkerContext.cpp:
2360         (WebCore::WorkerContext::WorkerContext):
2361         * dom/WorkerContext.h:
2362         (WebCore::WorkerContext::script):
2363         (WebCore::WorkerContext::clearScript):
2364         Added a method to manually destroy WorkerScriptController.
2365
2366         * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
2367         Destroy WorkerScriptController to release any references to WorkerContext.
2368
2369 2008-11-19  Julien Chaffraix  <jchaffraix@webkit.org>
2370
2371         Reviewed by Darin Adler.
2372
2373         Last part of bug 21106: .in format discussed changes
2374         https://bugs.webkit.org/show_bug.cgi?id=21106
2375
2376         - Renamed isAudioHack to wrapperOnlyIfMediaIsAvailable as requested.
2377
2378         - Cleaned up additionnal function parameters that were unneeded.
2379
2380         * dom/make_names.pl:
2381         * html/HTMLTagNames.in:
2382
2383 2008-11-20  Alexey Proskuryakov  <ap@webkit.org>
2384
2385         Reviewed by Darin Adler.
2386
2387         https://bugs.webkit.org/show_bug.cgi?id=22383
2388         Worker tests spill error messages over to consequent tests
2389
2390         * dom/Worker.cpp: (WebCore::Worker::Worker):
2391         Raise an exception immediately if URL is empty. Dcoument::completeURL() returns document URL
2392         in this case, and there is no sense in starting a thread and trying to parse document source
2393         as JavaScript.
2394
2395         * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker):
2396         Return quickly if toString() raised an exception.
2397
2398 2008-11-19  Simon Fraser  <simon.fraser@apple.com>
2399
2400         Reviewed by Adele Peterson.
2401
2402         https://bugs.webkit.org/show_bug.cgi?id=22190
2403
2404         Fix the painting and event handling in transformed search fields.
2405         When painting the cancel and results button parts,  get the rect from AppKit
2406         relative to the input bounds (rather than in absolute coords), then convert
2407         it into the coords of the part's renderer (which is the one that is painting).
2408         To do this we need to compute an offset relative to some container, so expose
2409         a method on RenderObject for that.
2410         
2411         Also fix the location at which the search popup shows up to take transforms
2412         into account, and fix the math that is used to figure out if the search
2413         results button, or the cancel button should get the mouse events.
2414         
2415         Test: fast/forms/search-transformed.html
2416
2417         * rendering/RenderBox.h:
2418         * rendering/RenderObject.cpp:
2419         (WebCore::RenderObject::offsetFromContainer):
2420         * rendering/RenderObject.h:
2421         * rendering/RenderTextControl.cpp:
2422         (WebCore::RenderTextControl::forwardEvent):
2423         (WebCore::RenderTextControl::showPopup):
2424         * rendering/RenderThemeMac.h:
2425         * rendering/RenderThemeMac.mm:
2426         (WebCore::RenderThemeMac::convertToPaintingRect):
2427         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2428         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2429         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2430
2431 2008-11-20  Joerg Bornemann  <joerg.bornemann@trolltech.com>
2432
2433         Reviewed by Simon Hausmann.
2434
2435         Steps towards making the the Qt port of WebKit compile on Windows CE
2436
2437         https://bugs.webkit.org/show_bug.cgi?id=20746
2438
2439         * WebCore.pro: Various fixes to include windows specific build options
2440         also in the Windows CE build.
2441         * loader/icon/IconDatabase.cpp: Removed unnecessary errno.h inclusion.
2442         * platform/FileSystem.h: Changed Q_OS_WIN32 to Q_OS_WIN to include CE.
2443         * platform/graphics/qt/GraphicsContextQt.cpp:
2444         (WebCore::GraphicsContext::getWindowsContext): SetWorldTransform is
2445         not available on CE.
2446         * platform/graphics/qt/PathQt.cpp: Added local definition of M_PI.
2447         * platform/qt/FileSystemQt.cpp: Changed Q_OS_WIN32 to Q_OS_WIN to include CE.
2448         * platform/qt/KeyboardCodes.h: Extend #idefs to define the missing OEM
2449         constants on CE.
2450         * platform/qt/TemporaryLinkStubs.cpp: Added stubs for plugins.
2451         * platform/text/RegularExpression.cpp: Removed unused sys/types.h and
2452         pcre.h inclusions.
2453         * platform/win/SystemTimeWin.cpp:
2454         (WebCore::userIdleTime): Don't use GetLastInputInfo on CE, it does not
2455         exist.
2456
2457 2008-11-20  Antti Koivisto  <antti@apple.com>
2458
2459         Reviewed by Maciej Stachowiak.
2460
2461         https://bugs.webkit.org/show_bug.cgi?id=22379
2462         Make CSSOM use less memory
2463         
2464         - Shrink CSSProperty by half by using bitfields.
2465         - Get rid of m_strictParsing field in StyleBase by moving it up to CSSStyleSheet
2466           and CSSMutableStyleDeclaration. This reduces size of many highly popular objects.
2467
2468         * css/CSSMutableStyleDeclaration.cpp:
2469         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
2470         (WebCore::CSSMutableStyleDeclaration::operator=):
2471         * css/CSSMutableStyleDeclaration.h:
2472         (WebCore::CSSMutableStyleDeclaration::setStrictParsing):
2473         (WebCore::CSSMutableStyleDeclaration::useStrictParsing):
2474         * css/CSSProperty.h:
2475         * css/CSSStyleSheet.cpp:
2476         (WebCore::CSSStyleSheet::CSSStyleSheet):
2477         * css/CSSStyleSheet.h:
2478         (WebCore::CSSStyleSheet::setStrictParsing):
2479         (WebCore::CSSStyleSheet::useStrictParsing):
2480         * css/StyleBase.h:
2481         (WebCore::StyleBase::useStrictParsing):
2482         (WebCore::StyleBase::StyleBase):
2483
2484 2008-11-19  Darin Fisher  <darin@chromium.org>
2485
2486         Fix bustage.
2487
2488         https://bugs.webkit.org/show_bug.cgi?id=22373
2489         Ports busted by addition of ScriptValue.{h,cpp}
2490         
2491         * plugins/PluginView.cpp:
2492         (WebCore::PluginView::performRequest):
2493
2494 2008-11-19  Darin Fisher  <darin@chromium.org>
2495
2496         Bustage fix.
2497
2498         https://bugs.webkit.org/show_bug.cgi?id=22373
2499         Ports busted by addition of ScriptValue.{h,cpp}
2500
2501         * GNUmakefile.am:
2502         * WebCore.pro:
2503         * WebCoreSources.bkl:
2504         * dom/XMLTokenizerQt.cpp:
2505         * plugins/PluginView.cpp:
2506
2507 2008-11-19  Darin Fisher  <darin@chromium.org>
2508
2509         Reviewed by Geoff Garen.
2510
2511         https://bugs.webkit.org/show_bug.cgi?id=22345
2512         Define ScriptValue as a thin container for a JSC::Value*.
2513
2514         * WebCore.vcproj/WebCore.vcproj:
2515         * WebCore.xcodeproj/project.pbxproj:
2516         * bindings/js/ScheduledAction.cpp:
2517         * bindings/js/ScriptController.cpp:
2518         (WebCore::ScriptController::evaluate):
2519         * bindings/js/ScriptController.h:
2520         * bindings/js/ScriptValue.cpp: Added.
2521         (WebCore::ScriptValue::getString):
2522         * bindings/js/ScriptValue.h: Added.
2523         (WebCore::ScriptValue::ScriptValue):
2524         (WebCore::ScriptValue::jsValue):
2525         * dom/ScriptElement.cpp:
2526         * dom/XMLTokenizer.cpp:
2527         * dom/XMLTokenizerLibxml2.cpp:
2528         * html/HTMLTokenizer.cpp:
2529         * loader/FrameLoader.cpp:
2530         (WebCore::FrameLoader::executeIfJavaScriptURL):
2531         (WebCore::FrameLoader::executeScript):
2532         * loader/FrameLoader.h:
2533
2534 2008-11-19  Beth Dakin  <bdakin@apple.com>
2535
2536         Reviewed by Justin Garcia.
2537
2538         Fix for <rdar://problem/5472507> Remove color property when a user 
2539         sets color to black
2540
2541         This patch prevents us from inserting font nodes during the 
2542         ApplyStyleCommand if they will not change the computed style of an 
2543         element.
2544
2545         * editing/ApplyStyleCommand.cpp:
2546         (WebCore::fontColorChangesComputedStyle):
2547         (WebCore::fontSizeChangesComputedStyle):
2548         (WebCore::fontFaceChangesComputedStyle):
2549         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
2550
2551 2008-11-19  Simon Fraser  <simon.fraser@apple.com>
2552
2553         Reviewed by Antti Koivisto
2554         
2555         https://bugs.webkit.org/show_bug.cgi?id=22111
2556         
2557         Fix hit testing in controls on transformed video elements
2558         by replacing absoluteBoundingBoxRect().contains() with
2559         code that maps the point into local coords, taking
2560         transforms into account.
2561
2562         Test: media/video-controls-transformed.html
2563
2564         * platform/graphics/MediaPlayer.h:
2565         * rendering/RenderMedia.cpp:
2566         (WebCore::rendererContainsPoint):
2567         (WebCore::RenderMedia::forwardEvent):
2568
2569 2008-11-19  Simon Fraser  <simon.fraser@apple.com>
2570
2571         Reviewed by Darin Adler
2572
2573         https://bugs.webkit.org/show_bug.cgi?id=22348
2574         
2575         Need to educate style sharing about autofill, so that style does not
2576         get shared between input elements that are autofilled, and those
2577         that are not. Setting autofill should also do a setChanged on the node.
2578
2579         * css/CSSStyleSelector.cpp:
2580         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2581         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2582         * dom/Node.h:
2583         (WebCore::Node::isAutofilled):
2584         * html/HTMLInputElement.cpp:
2585         (WebCore::HTMLInputElement::setAutofilled):
2586         * html/HTMLInputElement.h:
2587         (WebCore::HTMLInputElement::isAutofilled):
2588
2589 2008-11-19  Brett Wilson  <brettw@chromium.org>
2590
2591         Reviewed by Antti Koivisto.
2592
2593         https://bugs.webkit.org/show_bug.cgi?id=22349
2594
2595         Clear the subresource loader client when the client is removed in
2596         response to a 304 (not modified). This prevents an inconsistent state
2597         where the loader thinks it's active and the loader::Host doesn't.
2598
2599         * loader/loader.cpp:
2600         (WebCore::Loader::Host::didReceiveResponse):
2601
2602 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
2603
2604         Reviewed by Darin Adler.
2605
2606         https://bugs.webkit.org/show_bug.cgi?id=22355
2607         Systematize code for replacing global constructors
2608
2609         Test: fast/workers/worker-replace-global-constructor.html
2610
2611         * bindings/js/JSDOMWindowBase.cpp:
2612         (setJSDOMWindowBaseEvent): Changed to put the value as property, matching what generated
2613         code for global constructor setters does.
2614         (setJSDOMWindowBaseAudio): Ditto.
2615         (setJSDOMWindowBaseImage): Ditto.
2616         (setJSDOMWindowBaseMessageChannel): Ditto.
2617         (setJSDOMWindowBaseOption): Ditto.
2618         (setJSDOMWindowBaseWorker): Ditto.
2619         (setJSDOMWindowBaseXMLHttpRequest): Ditto.
2620         (setJSDOMWindowBaseXSLTProcessor): Ditto.
2621         (WebCore::JSDOMWindowBase::put): Removed special cases for global constructors.
2622
2623         * bindings/js/JSWorkerContext.cpp:
2624         (WebCore::JSWorkerContext::getOwnPropertySlot): Look up overrides before own properties,
2625         as it is done for Window.
2626         (WebCore::setJSWorkerContextMessageEvent): Implemented in the same way as Window global
2627         constructors are.
2628         (WebCore::setJSWorkerContextWorkerLocation): Ditto.
2629
2630 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
2631
2632         Reviewed by Darin Adler.
2633
2634         https://bugs.webkit.org/show_bug.cgi?id=22341
2635         Text codecs should not use static data without locking
2636
2637         * platform/text/TextCodecICU.cpp:
2638         * platform/text/mac/TextCodecMac.cpp:
2639         Made cached converters per-thread.
2640
2641         * platform/text/TextEncodingRegistry.cpp:
2642         (WebCore::encodingRegistryMutex): Added a mutex for codec maps access.
2643         (WebCore::addToTextCodecMap): Don't use TextEncoding just to canonicalize the name, as it
2644         causes a deadlock due to a recursive call into registry.
2645         (WebCore::buildBaseTextCodecMaps): Added assertions.
2646         (WebCore::newTextCodec): Take a lock to avoid concurrent access to codec maps.
2647         (WebCore::atomicCanonicalTextEncodingName): Ditto.
2648         (WebCore::noExtendedTextEncodingNameUsed): Added a comment, explaining why locking is not
2649         necessary here.
2650
2651 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
2652
2653         Touch WebCorePrefix.h to force a rebuild, needed because of changed feature defines.
2654
2655         * WebCorePrefix.h:
2656
2657 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
2658
2659         Reviewed by Darin Adler.
2660
2661         https://bugs.webkit.org/show_bug.cgi?id=22310
2662         Worker exceptions should be printed to console
2663
2664         * dom/Document.cpp: (WebCore::Document::reportException):
2665         * dom/Document.h:
2666         * dom/ScriptExecutionContext.h:
2667         * dom/WorkerContext.cpp: (WebCore::WorkerContext::reportException):
2668         * dom/WorkerContext.h:
2669         Added a reportException() method on ScriptExecutionContext. It forwards the exception info
2670         up until it finds a Document context, and then it prints it to console.
2671
2672         * bindings/js/JSEventListener.cpp:
2673         (WebCore::JSAbstractEventListener::handleEvent): Don't talk to Console directly, use
2674         ScriptExecutionContext::reportException. Also, fixed a bug where Document::updateDocumentsRendering()
2675         could be called from workers.
2676         (WebCore::JSLazyEventListener::parseCode): Moved variable declaration inside if block for clarity.
2677
2678         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
2679         Report exceptions to ScriptExecutionContext.
2680
2681         * dom/WorkerMessagingProxy.cpp:
2682         (WebCore::MessageWorkerTask::performTask):
2683         (WebCore::WorkerExceptionTask::create):
2684         (WebCore::WorkerExceptionTask::WorkerExceptionTask):
2685         (WebCore::WorkerExceptionTask::performTask):
2686         (WebCore::WorkerMessagingProxy::postWorkerException):
2687         * dom/WorkerMessagingProxy.h:
2688         Added a task for posting exception information.
2689
2690         * bindings/js/JSDOMBinding.cpp:
2691         (WebCore::reportException):
2692         (WebCore::reportCurrentException):
2693         * bindings/js/JSDOMBinding.h:
2694         Added helper methods for reporting exceptions via ScriptExecutionContext.
2695
2696         * page/Console.cpp:
2697         * page/Console.h:
2698         Removed methods for directly reporting exceptions to console.
2699
2700         * bindings/js/JSCustomPositionCallback.cpp:
2701         (WebCore::JSCustomPositionCallback::handleEvent):
2702         * bindings/js/JSCustomPositionErrorCallback.cpp:
2703         (WebCore::JSCustomPositionErrorCallback::handleEvent):
2704         * bindings/js/JSCustomSQLStatementCallback.cpp:
2705         (WebCore::JSCustomSQLStatementCallback::handleEvent):
2706         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2707         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
2708         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2709         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
2710         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2711         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
2712         * bindings/js/JSCustomVoidCallback.cpp:
2713         (WebCore::JSCustomVoidCallback::handleEvent):
2714         * bindings/js/JSCustomXPathNSResolver.cpp:
2715         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2716         * bindings/js/ScheduledAction.cpp:
2717         (WebCore::ScheduledAction::execute):
2718         * bindings/js/ScriptController.cpp:
2719         (WebCore::ScriptController::evaluate):
2720         * bindings/objc/WebScriptObject.mm:
2721         (WebCore::addExceptionToConsole):
2722         Switch to JSDOMBinding methods for reporting exceptions.
2723
2724 2008-11-18  Dan Bernstein  <mitz@apple.com>
2725
2726         Reviewed by Mark Rowe.
2727
2728         - WebCore part of https://bugs.webkit.org/show_bug.cgi?id=22331
2729           <rdar://problem/6381657> REGRESSION: Contextual menu no longer has an "Inspect Element" item
2730
2731         * platform/ContextMenuItem.h:
2732         (WebCore::ContextMenuAction): Reorder this enum to keep it in sync with
2733         the one in WebUIDelegate.h.
2734
2735 2008-11-18  Dimitri Glazkov  <dglazkov@chromium.org>
2736
2737         Reviewed by Darin Adler.
2738
2739         https://bugs.webkit.org/show_bug.cgi?id=22346
2740         PlatformString should also include HashSet.h for non-JSC builds
2741
2742         * platform/text/PlatformString.h:
2743
2744 2008-11-18  Adele Peterson  <adele@apple.com>
2745
2746         Reviewed by Holger Hans Peter Freyther.
2747
2748         Flip check added in recent refactoring so the background gets updated when the background color is valid, not invalid.
2749
2750         * loader/FrameLoaderClient.cpp: (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
2751
2752 2008-11-18  Dimitri Glazkov  <dglazkov@chromium.org>
2753
2754         Reviewed by Sam Weinig.
2755
2756         https://bugs.webkit.org/show_bug.cgi?id=22343
2757         Remove unused runtime/Collector, JSLock includes in Page.cpp
2758
2759         * page/Page.cpp:
2760
2761 2008-11-18  Ada Chan  <adachan@apple.com>
2762
2763         Bug 22344: Make select popup window opaque
2764         https://bugs.webkit.org/show_bug.cgi?id=22344
2765
2766         Reviewed by Steve Falkenburg.
2767
2768         * platform/win/PopupMenuWin.cpp:
2769         (WebCore::PopupMenu::show):
2770
2771 2008-11-18  Dimitri Glazkov  <dglazkov@chromium.org>
2772
2773         Reviewed by Sam Weinig.
2774
2775         https://bugs.webkit.org/show_bug.cgi?id=22342
2776         Remove unused JSLock.h include
2777
2778         * dom/Document.cpp:
2779
2780 2008-11-18  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2781
2782         Reviewed by Sam Weinig.
2783
2784         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22334
2785
2786         Add WMLBRElement, correcting <br/> behaviour in WML.
2787         Enable entity replacment for WML documents.
2788         Handle WML specific <p> 'mode' attribute.
2789
2790         Generate layout tests results for fast/wml.
2791
2792         Tests cases that pass now:
2793         fast/wml/br-element-in-table.wml
2794         fast/wml/br-element-in-text.wml
2795         fast/wml/case-sensitivity.wml
2796         fast/wml/cdata-section.wml
2797         fast/wml/comment.wml
2798         fast/wml/entity.wml
2799         fast/wml/p-align.wml
2800         fast/wml/p-mode.wml
2801         fast/wml/text-emphasis.wml
2802         fast/wml/validate-dtd.wml
2803
2804         * GNUmakefile.am:
2805         * WebCore.pro:
2806         * WebCore.xcodeproj/project.pbxproj:
2807         * dom/XMLTokenizer.cpp:
2808         (WebCore::XMLTokenizer::isWMLDocument):
2809         (WebCore::XMLTokenizer::insertErrorMessageBlock):
2810         * dom/XMLTokenizer.h:
2811         * dom/XMLTokenizerLibxml2.cpp:
2812         (WebCore::XMLTokenizer::internalSubset):
2813         (WebCore::getEntityHandler):
2814         * dom/XMLTokenizerQt.cpp:
2815         (WebCore::XMLTokenizer::parse):
2816         * wml/WMLBRElement.cpp: Added.
2817         (WebCore::WMLBRElement::WMLBRElement):
2818         (WebCore::WMLBRElement::mapToEntry):
2819         (WebCore::WMLBRElement::parseMappedAttribute):
2820         (WebCore::WMLBRElement::createRenderer):
2821         * wml/WMLBRElement.h: Added.
2822         * wml/WMLPElement.cpp:
2823         (WebCore::WMLPElement::parseMappedAttribute):
2824         (WebCore::WMLPElement::insertedIntoDocument):
2825         * wml/WMLPElement.h:
2826         * wml/WMLTagNames.in:
2827
2828 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
2829
2830         Windows build fix.
2831
2832         * WebCore.vcproj/WebCore.vcproj: Fix relative paths to use $(WebKitOutputDir).
2833
2834 2008-11-18  Darin Adler  <darin@apple.com>
2835
2836         - try to fix Wx build
2837
2838         * WebCoreSources.bkl: Added FrameLoaderClient.cpp.
2839
2840 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
2841
2842         Reviewed by Darin Adler.
2843
2844         https://bugs.webkit.org/show_bug.cgi?id=22337
2845         Enable workers by default
2846
2847         Tests: fast/workers/worker-constructor.html
2848                fast/workers/worker-event-listener.html
2849                fast/workers/worker-gc.html
2850                fast/workers/worker-location.html
2851
2852         * Configurations/WebCore.xcconfig:
2853         * WebCore.vcproj/WebCore.vcproj:
2854         * WebCore.vcproj/build-generated-files.sh:
2855         Define ENABLE_WORKERS.
2856
2857 2008-11-18  Darin Adler  <darin@apple.com>
2858
2859         Reviewed by Alexey Proskuryakov.
2860
2861         - first cut at https://bugs.webkit.org/show_bug.cgi?id=10957
2862           <rdar://problem/5516594> please add support for HTTP-only cookies
2863
2864         Test: http/tests/xmlhttprequest/get-dangerous-headers.html
2865
2866         No test for HTTP-only support in JavaScript yet, since the Mac and Win changes
2867         require an updated CFNetwork.
2868
2869         * platform/mac/CookieJar.mm:
2870         (WebCore::isHTTPOnly): Added.
2871         (WebCore::filterCookies): Added.
2872         (WebCore::cookies): Use filterCookies to prevent getting HTTP-only cookies.
2873         (WebCore::setCookies): Use filterCookies to prevent setting HTTP-only cookies.
2874
2875         * platform/network/win/CookieJarCFNetWin.cpp:
2876         (WebCore::isHTTPOnly): Added.
2877         (WebCore::filterCookies): Added.
2878         (WebCore::setCookies): Use filterCookies to prevent getting HTTP-only cookies.
2879         (WebCore::cookies): Use filterCookies to prevent getting HTTP-only cookies.
2880
2881         * xml/XMLHttpRequest.cpp:
2882         (WebCore::isSetCookieHeader): Added.
2883         (WebCore::XMLHttpRequest::getAllResponseHeaders): Hide Set-Cookie headers from
2884         clients that don't have local-resource privileges.
2885         (WebCore::XMLHttpRequest::getResponseHeader): Ditto.
2886
2887         - clean soup-specific details out of shared cookie jar header
2888
2889         * platform/CookieJar.h: Removed the soup-specific parts of this.
2890         * platform/network/soup/CookieJarSoup.cpp: Changed to include
2891         CookieJarSoup.h. Tweaked implementation a bit to handle UTF-8 better.
2892         * platform/network/soup/CookieJarSoup.h: Added. Has the Soup-specified
2893         part of CookieJar.h.
2894         * platform/network/soup/ResourceHandleSoup.cpp: Changed to include
2895         CookieJarSoup.h.
2896
2897 2008-11-18  Steve Falkenburg  <sfalken@apple.com>
2898
2899         https://bugs.webkit.org/show_bug.cgi?id=22329
2900         Improper bitwise and tests against 0 in Windows context menu code
2901
2902         Reviewed by John Sullivan.
2903
2904         * platform/win/ContextMenuItemWin.cpp:
2905         (WebCore::ContextMenuItem::type):
2906         (WebCore::ContextMenuItem::enabled):
2907
2908 2008-11-18  John Sullivan  <sullivan@apple.com>
2909
2910         Yet more Mac build fixing
2911
2912         * WebCore.base.exp: Export __ZTVN7WebCore17FrameLoaderClientE
2913
2914 2008-11-18  Tor Arne Vestbø  <tavestbo@trolltech.com>
2915
2916         Reviewed by Simon Hausmann.
2917
2918         React properly to frame rect changes for QWidget based plugins
2919
2920         We now set the geometry of the QWidget in frameRectsChanged,
2921         intead of setFrameRect, which means we pick up the changes to
2922         the frame rect when scrolling. We also set a mask on the
2923         widget to keep it from painting over scrollbars and the like
2924
2925         * platform/qt/WidgetQt.cpp:
2926         (WebCore::Widget::setFrameRect):
2927
2928 2008-11-18  Tor Arne Vestbø  <tavestbo@trolltech.com>
2929
2930         Rubber-stamped by Simon Hausmann.
2931
2932         Don't mark scrollbars as focused in QtWebKit
2933
2934         When initing from the widget we also got the focus state,
2935         but this does not make sense for scrollbars.
2936
2937         * platform/qt/ScrollbarThemeQt.cpp:
2938         (WebCore::styleOptionSlider):
2939
2940 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
2941
2942         More Mac build fixing.
2943
2944         * WebCore.base.exp: Export FrameLoaderClient destructor.
2945
2946 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
2947
2948         Mac build fix.
2949
2950         * WebCore.xcodeproj/project.pbxproj: Add FrameLoaderClient.cpp for now.
2951
2952 2008-11-18  Holger Hans Peter Freyther  <zecke@selfish.org>
2953
2954         Reviewed by Simon Hausmann.
2955
2956         https://bugs.webkit.org/show_bug.cgi?id=22056
2957
2958         Attempt to share transitionToCommittedForNewPage of FrameLoaderClient with the different ports
2959
2960         After Hyatt's work on Widget and ScrollView there is little difference
2961         between the implementation of Qt, Gtk+ and Win. In fact any kind of
2962         difference is mostly a bug. Alp has fixed two of such errors for the Gtk+
2963         port and the Qt port has at least one of them left.
2964
2965         The only difference between the implementations is in getting the the
2966         IntSize for the new FrameView, the background color to be applied and
2967         eventually some post processing.
2968
2969         Unify the implementations by providing a static helper function that
2970         takes a Frame, IntSize, color and transparency bit and calling it from
2971         the Gtk+, the Qt and the Windows port.
2972
2973         * GNUmakefile.am:
2974         * WebCore.pro:
2975         * WebCore.vcproj/WebCore.vcproj:
2976         * loader/FrameLoaderClient.cpp: Added.
2977         (WebCore::FrameLoaderClient::~FrameLoaderClient):
2978         (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
2979         * loader/FrameLoaderClient.h:
2980
2981 2008-11-18  Holger Hans Peter Freyther  <zecke@selfish.org>
2982
2983         Reviewed by Simon Hausmann.
2984
2985         https://bugs.webkit.org/show_bug.cgi?id=22056
2986
2987         Move setting the background color and transparency from WebKit/win
2988         to WebCore. This allows WebKit/win, WebKit/Qt and WebKit/Gtk+
2989         to share this code.
2990
2991         * page/FrameView.cpp:
2992         (WebCore::FrameView::updateBackgroundRecursively):
2993         * page/FrameView.h:
2994
2995 2008-11-18  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2996
2997         Reviewed by Tor Arne Vestbø.
2998
2999         Fix the bug where select elements are painted without border.
3000         http://trolltech.com/developer/task-tracker/index_html?id=218957&method=entry
3001
3002         * platform/qt/RenderThemeQt.cpp:
3003         (WebCore::RenderThemeQt::paintMenuList):
3004
3005 2008-11-18  Jan Michael Alonzo  <jmalonzo@webkit.org>
3006
3007         Gtk build fix. Not reviewed.
3008
3009         * GNUmakefile.am: Fix USER_AGENT_STYLESHEETS, wml.css is in css/,
3010         not in wml/.
3011
3012 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
3013
3014         Reviewed by Darin Adler.
3015
3016         https://bugs.webkit.org/show_bug.cgi?id=22308
3017         Improve Worker GC behavior
3018
3019         * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::hasPendingActivity):
3020         * dom/ActiveDOMObject.h:
3021         Made hasPendingActivity() virtual, letting Worker add behavior to it.
3022
3023         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
3024         * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
3025         Tell message proxy whether there are active objects in the worker whenever JS execution
3026         finishes.
3027
3028         * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::activeDOMObjects):
3029         Added a typedef for activeDOMObjects() return type, necessary to declare iterators.
3030
3031         * dom/Worker.h:
3032         * dom/Worker.cpp: (WebCore::Worker::hasPendingActivity): A Worker is active if it is still
3033         loading, or if it has unconfirmed messages, or it the worker thread has pending activity.
3034
3035         * dom/WorkerContext.h:
3036         * dom/WorkerContext.cpp: (WebCore::WorkerContext::hasPendingActivity): Check all registered
3037         active objects for pending activity.
3038
3039         * dom/WorkerMessagingProxy.cpp:
3040         (WebCore::MessageWorkerContextTask::performTask):
3041         (WebCore::WorkerThreadActivityReportTask::create):
3042         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask):
3043         (WebCore::WorkerThreadActivityReportTask::performTask):
3044         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
3045         (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
3046         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
3047         (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal):
3048         (WebCore::WorkerMessagingProxy::confirmWorkerThreadMessage):
3049         (WebCore::WorkerMessagingProxy::reportWorkerThreadActivity):
3050         (WebCore::WorkerMessagingProxy::reportWorkerThreadActivityInternal):
3051         (WebCore::WorkerMessagingProxy::workerThreadHasPendingActivity):
3052         * dom/WorkerMessagingProxy.h:
3053         Track outstanding messages, and activity reported by worker thread.
3054
3055 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
3056
3057         Rubber-stamped by Darin Adler.
3058
3059         https://bugs.webkit.org/show_bug.cgi?id=22306
3060         Disable channel messaging support
3061
3062         * bindings/js/JSDOMWindowBase.cpp:
3063         (jsDOMWindowBaseMessageChannel):
3064         * page/DOMWindow.idl:
3065         Hide MesssagePort and MessageChannel global constructors. Due to the way MessageChannel
3066         constructor is added, it remains enumerable, but undefined.
3067
3068 2008-11-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3069
3070         Reviewed by Mark Rowe.
3071
3072         Remove WBXML code. MainResourceLoader is not an appropriate location.
3073         Revert until we find a better place.
3074
3075         The mime type which belongs to wmlc should be enabled anyway so WML documents get build.
3076         Remove the ENABLE(WBXML) blocks around these types in MIMETypeRegistry / DOMImplementation.
3077
3078         * WebCore.pro:
3079         * dom/DOMImplementation.cpp:
3080         (WebCore::DOMImplementation::createDocument):
3081         * loader/MainResourceLoader.cpp:
3082         (WebCore::MainResourceLoader::addData):
3083         * platform/MIMETypeRegistry.cpp:
3084         (WebCore::initializeSupportedNonImageMimeTypes):
3085
3086 2008-11-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3087
3088         Not reviewed. Build fix.
3089
3090         Oops, disable WML by default on Qt.
3091
3092         * WebCore.pro:
3093
3094 2008-11-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3095
3096         Reviewed by George Staikos.
3097
3098         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22324 (Add basic subset of WML elements)
3099
3100         Add first bits of WML support. Only <card> & <p> and <a> elements are supported in this first patch.
3101         Support for most other elements will be added step-by-step (merging in small chunks from a big patch).
3102
3103         WML is not build by default.
3104
3105         * DerivedSources.make: Handle WMLNames/WMLElementFactory generation.
3106         * GNUmakefile.am: Add new files and generator hooks.
3107         * WebCore.pro: Ditto.
3108         * WebCore.xcodeproj/project.pbxproj: Ditto.
3109         * css/CSSStyleSelector.cpp: Load wml.css on demand, just like it's done for SVG.
3110         (WebCore::linkAttribute):
3111         (WebCore::CSSStyleSelector::styleForElement):c
3112         * css/wml.css: Added.
3113         * dom/DOMImplementation.cpp: Handle WMLDocument creation
3114         (WebCore::DOMImplementation::createDocument):
3115         * dom/Document.cpp: Handle WMLElement creation.
3116         (WebCore::Document::createElement):
3117         * dom/Document.h: Add helper function identifying WML documents.
3118         (WebCore::Document::isWMLDocument):
3119         * dom/Node.h: Add heper function identifying WML elements.
3120         (WebCore::Node::isWMLElement):
3121         * dom/XMLTokenizer.cpp: Handle errors in WML documents
3122         (WebCore::XMLTokenizer::insertErrorMessageBlock):
3123         * dom/XMLTokenizerLibxml2.cpp: Add WML DTD checks.
3124         (WebCore::XMLTokenizer::internalSubset):
3125         * dom/XMLTokenizerQt.cpp: Ditto.
3126         (WebCore::):
3127         * dom/make_names.pl: Force internal linkage for the "tagConstructor" functions, avoiding SVG<->WML clashes.
3128         * history/BackForwardList.cpp: Add WML specific function for clearing the history.
3129         (WebCore::BackForwardList::clearWmlPageHistory):
3130         * history/BackForwardList.h:
3131         * loader/FrameLoader.cpp: Add WML specific 'shouldReload' logic.
3132         (WebCore::FrameLoader::FrameLoader):
3133         (WebCore::FrameLoader::setForceReloadWmlDeck):
3134         (WebCore::FrameLoader::shouldReload):
3135         (WebCore::FrameLoader::loadItem):
3136         * loader/FrameLoader.h:
3137         * loader/MainResourceLoader.cpp: Add WBXML support (only enabled on Linux/Qt at the moment)
3138         (WebCore::MainResourceLoader::addData):
3139         * page/Frame.cpp: Initialize WMLNames.
3140         (WebCore::Frame::Frame):
3141         * page/Page.cpp: Maintain WMLPageState object per Page.
3142         (WebCore::Page::Page):
3143         (WebCore::Page::setWMLPageState):
3144         (WebCore::Page::wmlPageState):
3145         * page/Page.h:
3146         * platform/MIMETypeRegistry.cpp: Recognize WML extensions.
3147         (WebCore::initializeSupportedNonImageMimeTypes):
3148         * platform/gtk/MIMETypeRegistryGtk.cpp: Ditto.
3149         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3150         * platform/qt/MIMETypeRegistryQt.cpp: Ditto.
3151         (WebCore::):
3152         * platform/win/MIMETypeRegistryWin.cpp: Ditto.
3153         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3154         * manual-tests/wml: Added.
3155         * manual-tests/wml/a-br-element.wml: Added.
3156         * manual-tests/wml/a-element.wml: Added.
3157         * manual-tests/wml/a-img-element.wml: Added.
3158         * manual-tests/wml/access-target.wml: Added.
3159         * manual-tests/wml/anchor-br-element.wml: Added.
3160         * manual-tests/wml/anchor-element.wml: Added.
3161         * manual-tests/wml/anchor-img-element.wml: Added.
3162         * manual-tests/wml/card-newcontext-attr.wml: Added.
3163         * manual-tests/wml/card-onenterbackward.wml: Added.
3164         * manual-tests/wml/card-onenterforward.wml: Added.
3165         * manual-tests/wml/card-ontimer.wml: Added.
3166         * manual-tests/wml/deck-access-control.wml: Added.
3167         * manual-tests/wml/go-element.wml: Added.
3168         * manual-tests/wml/input-emptyok.wml: Added.
3169         * manual-tests/wml/input-format.wml: Added.
3170         * manual-tests/wml/onevent-go.wml: Added.
3171         * manual-tests/wml/onevent-noop.wml: Added.
3172         * manual-tests/wml/onevent-prev.wml: Added.
3173         * manual-tests/wml/onevent-refresh.wml: Added.
3174         * manual-tests/wml/onevent-shadow.wml: Added.
3175         * manual-tests/wml/postfield-get.wml: Added.
3176         * manual-tests/wml/postfield-post.wml: Added.
3177         * manual-tests/wml/select-element.wml: Added.
3178         * manual-tests/wml/select-onpick-event.wml: Added.
3179         * manual-tests/wml/setvar-element.wml: Added.
3180         * manual-tests/wml/targetdeck.wml: Added.
3181         * manual-tests/wml/task-go-in-anchor.wml: Added.
3182         * manual-tests/wml/task-noop-in-do.wml: Added.
3183         * manual-tests/wml/task-noop-in-onevent.wml: Added.
3184         * manual-tests/wml/task-prev-in-anchor.wml: Added.
3185         * manual-tests/wml/task-refresh-in-anchor.wml: Added.
3186         * manual-tests/wml/template-go.wml: Added.
3187         * manual-tests/wml/template-onevent.wml: Added.
3188         * manual-tests/wml/template-ontimer.wml: Added.
3189         * manual-tests/wml/timer.wml: Added.
3190         * manual-tests/wml/variable-substitution.wml: Added.
3191         * wml: Added.
3192         * wml/WMLAElement.cpp: Added.
3193         (WebCore::WMLAElement::WMLAElement):
3194         (WebCore::WMLAElement::parseMappedAttribute):
3195         (WebCore::WMLAElement::supportsFocus):
3196         (WebCore::WMLAElement::isFocusable):
3197         (WebCore::WMLAElement::isMouseFocusable):
3198         (WebCore::WMLAElement::isKeyboardFocusable):
3199         (WebCore::WMLAElement::defaultEventHandler):
3200         (WebCore::WMLAElement::accessKeyAction):
3201         (WebCore::WMLAElement::isURLAttribute):
3202         (WebCore::WMLAElement::target):
3203         * wml/WMLAElement.h: Added.
3204         * wml/WMLAttributeNames.in: Added.
3205         * wml/WMLCardElement.cpp: Added.
3206         (WebCore::WMLCardElement::WMLCardElement):
3207         * wml/WMLCardElement.h: Added.
3208         * wml/WMLDocument.cpp: Added.
3209         (WebCore::WMLDocument::WMLDocument):
3210         (WebCore::WMLDocument::~WMLDocument):
3211         * wml/WMLDocument.h: Added.
3212         (WebCore::WMLDocument::create):
3213         (WebCore::WMLDocument::isWMLDocument):
3214         * wml/WMLElement.cpp: Added.
3215         (WebCore::WMLElement::WMLElement):
3216         (WebCore::WMLElement::mapToEntry):
3217         (WebCore::WMLElement::parseMappedAttribute):
3218         (WebCore::WMLElement::rendererIsNeeded):
3219         (WebCore::WMLElement::createRenderer):
3220         * wml/WMLElement.h: Added.
3221         (WebCore::WMLElement::isWMLElement):
3222         * wml/WMLPElement.cpp: Added.
3223         (WebCore::WMLPElement::WMLPElement):
3224         (WebCore::WMLPElement::mapToEntry):
3225         (WebCore::WMLPElement::parseMappedAttribute):
3226         * wml/WMLPElement.h: Added.
3227         * wml/WMLPageState.cpp: Added.
3228         (WebCore::WMLPageState::WMLPageState):
3229         (WebCore::WMLPageState::~WMLPageState):
3230         (WebCore::WMLPageState::reset):
3231         (WebCore::WMLPageState::setNeedCheckDeckAccess):
3232         (WebCore::WMLPageState::isDeckAccessible):
3233         * wml/WMLPageState.h: Added.
3234         (WebCore::WMLPageState::storeVariable):
3235         (WebCore::WMLPageState::storeVariables):
3236         (WebCore::WMLPageState::getVaribale):
3237         (WebCore::WMLPageState::hasVariables):
3238         (WebCore::WMLPageState::historyLength):
3239         (WebCore::WMLPageState::setHistoryLength):
3240         (WebCore::WMLPageState::page):
3241         (WebCore::WMLPageState::activeCard):
3242         (WebCore::WMLPageState::setActiveCard):
3243         (WebCore::WMLPageState::setDeckAccessDomain):
3244         (WebCore::WMLPageState::setDeckAccessPath):
3245         (WebCore::WMLPageState::hasDeckAccess):
3246         * wml/WMLTagNames.in: Added.
3247
3248 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3249
3250         Reviewed by Sam Weinig.
3251         
3252         Updated for JavaScriptCore renames.
3253
3254         * WebCore.pro:
3255         * webcore-base.bkl:
3256
3257 2008-11-17  Justin Garcia  <justin.garcia@apple.com>
3258
3259         Reviewed by Beth Dakin.
3260
3261         <rdar://problem/4922709> Copying less than a paragraph of quoted text and pasting it doesn't retain quote level
3262         
3263         There was code to intentionally avoid quoting pasted content if less than a paragraph of 
3264         it was copied.  That was added for <rdar://problem/5006779>, but was unnecessary because
3265         that bug was about Paste and Match style for single paragraphs.  And quote stripping for
3266         Paste and Match style is handled elsewhere.
3267
3268         * editing/markup.cpp:
3269         (WebCore::createMarkup):
3270
3271 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3272
3273         Reviewed by Sam Weinig.
3274         
3275         Updated for JavaScriptCore rename.
3276
3277         * ForwardingHeaders/interpreter/CallFrame.h: Copied from WebCore/ForwardingHeaders/runtime/ExecState.h.
3278         * ForwardingHeaders/runtime/ExecState.h: Removed.
3279         * bindings/objc/WebScriptObject.mm:
3280         * bridge/c/c_instance.cpp:
3281         * bridge/jni/jni_jsobject.mm:
3282         * dom/Node.cpp:
3283         * dom/NodeFilter.cpp:
3284         * dom/NodeIterator.cpp:
3285         * dom/TreeWalker.cpp:
3286         * inspector/JavaScriptCallFrame.h:
3287
3288 2008-11-17  Pierre-Olivier Latour  <pol@apple.com>
3289
3290         Reviewed by Sam Weinig.
3291
3292         Added functionality to AnimationController to allow pausing a running
3293         animation or transition at a given time for testing purposes.
3294
3295         https://bugs.webkit.org/show_bug.cgi?id=21261
3296
3297         Tests: animations/animation-drt-api.html
3298                transitions/transition-drt-api.html
3299
3300         * WebCore.base.exp:
3301         * WebCore.xcodeproj/project.pbxproj:
3302         * page/animation/AnimationBase.cpp:
3303         (WebCore::AnimationBase::updateStateMachine):
3304         (WebCore::AnimationBase::progress):
3305         (WebCore::AnimationBase::pauseAtTime):
3306         * page/animation/AnimationBase.h:
3307         * page/animation/AnimationController.cpp:
3308         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3309         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
3310         (WebCore::AnimationController::pauseAnimationAtTime):
3311         (WebCore::AnimationController::pauseTransitionAtTime):
3312         * page/animation/AnimationController.h:
3313         * page/animation/CompositeAnimation.cpp:
3314         (WebCore::CompositeAnimationPrivate::isAnimating):
3315         (WebCore::CompositeAnimationPrivate::pauseAnimationAtTime):
3316         (WebCore::CompositeAnimationPrivate::pauseTransitionAtTime):
3317         (WebCore::CompositeAnimation::pauseAnimationAtTime):
3318         (WebCore::CompositeAnimation::pauseTransitionAtTime):
3319         * page/animation/CompositeAnimation.h:
3320         * page/animation/ImplicitAnimation.cpp:
3321         (WebCore::ImplicitAnimation::animate):
3322
3323 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3324
3325         Reviewed by Sam Weinig.
3326         
3327         Updated for JavaScriptCore renames.
3328
3329         * ForwardingHeaders/VM: Removed.
3330         * ForwardingHeaders/VM/Machine.h: Removed.
3331         * ForwardingHeaders/interpreter: Added.
3332         * ForwardingHeaders/interpreter/Interpreter.h: Copied from ForwardingHeaders/VM/Machine.h.
3333         * WebCore.pro:
3334         * bindings/js/JSXMLHttpRequestCustom.cpp:
3335         * page/Console.cpp:
3336         * webcore-base.bkl:
3337
3338 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3339
3340         Reviewed by Sam Weinig.
3341
3342         Updated for JavaScriptCore renames.
3343
3344         * ForwardingHeaders/runtime/Interpreter.h: Removed.
3345         * WebCore.vcproj/WebCore.vcproj:
3346         * bindings/js/JSDOMBinding.h:
3347         * bindings/js/WorkerScriptController.cpp:
3348         * bindings/objc/WebScriptObject.mm:
3349         * bridge/NP_jsobject.cpp:
3350         * bridge/jni/jni_jsobject.mm:
3351         * html/CanvasRenderingContext2D.cpp:
3352         * inspector/JavaScriptCallFrame.cpp:
3353         * page/Console.cpp:
3354
3355 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3356
3357         Not reviewed.
3358
3359         Try to fix wx build.
3360
3361         * webcore-base.bkl:
3362
3363 2008-11-17  Greg Bolsinga  <bolsinga@apple.com>
3364
3365         Reviewed by Darin Adler.
3366
3367         https://bugs.webkit.org/show_bug.cgi?id=21810
3368         Remove use of static C++ objects that are destroyed at exit time (destructors)
3369
3370         Find some missing DEFINE_STATIC_LOCAL use cases.
3371         
3372         * bindings/js/JSSVGPODTypeWrapper.h:
3373         (WebCore::PODTypeWrapperCacheInfoTraits::emptyValue):
3374         (WebCore::JSSVGDynamicPODTypeWrapperCache::dynamicWrapperHashMap):
3375         * dom/make_names.pl: Generate code to use DEFINE_STATIC_LOCAL.
3376         * page/AccessibilityRenderObject.cpp:
3377         (WebCore::RoleEntry::): This method is only called once, so the array does not have to be static.
3378         * platform/graphics/FontCache.cpp:
3379         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
3380         (WebCore::FontDataCacheKeyTraits::emptyValue):
3381         * rendering/style/RenderStyle.h:
3382         (WebCore::InheritedFlags::initialTransform):
3383
3384 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
3385
3386         Not reviewed.
3387
3388         Try to fix Qt build.
3389
3390         * WebCore.pro:
3391
3392 2008-11-16  Simon Fraser  <simon.fraser@apple.com>
3393
3394         Reviewed by Dan Bernstein
3395
3396         https://bugs.webkit.org/show_bug.cgi?id=22118
3397         
3398         Fix resize corner tracking in transformed elements by using 
3399         mapping the point into local coords using absoluteToLocal,
3400         rather than convertToLayerCoords.
3401         
3402         Test: fast/css/resize-corner-tracking-transformed.html
3403
3404         * page/EventHandler.h:
3405         * rendering/RenderLayer.cpp:
3406         (WebCore::RenderLayer::absoluteToContents):
3407         (WebCore::RenderLayer::offsetFromResizeCorner):
3408         (WebCore::RenderLayer::isPointInResizeControl):
3409         * rendering/RenderLayer.h:
3410
3411 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
3412
3413         Not reviewed.
3414
3415         Try to fix Qt build.
3416
3417         * WebCore.pro:
3418
3419 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
3420
3421         Reviewed by Geoffrey Garen.
3422
3423         Use RefPtr and PassRefPtr where appropriate.
3424
3425         * loader/FTPDirectoryDocument.cpp:
3426         (WebCore::createTemplateDocumentData):
3427
3428 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
3429
3430         Fix build break for real.
3431
3432         * loader/FTPDirectoryDocument.cpp:
3433         (WebCore::createTemplateDocumentData):
3434
3435 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
3436
3437         Fix build break and bug.
3438
3439         * loader/FTPDirectoryDocument.cpp:
3440         (WebCore::createTemplateDocumentData):
3441
3442 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
3443
3444         Reviewed by Darin Adler.
3445
3446         https://bugs.webkit.org/show_bug.cgi?id=21810
3447         Remove use of static C++ objects that are destroyed at exit time (destructors)
3448
3449         Use DEFINE_STATIC_LOCAL for static RetainPtr<T>, RefPtr<T>. Add additional
3450         uses of DEFINE_STATIC_LOCAL where appropriate.
3451
3452         * html/HTMLTableElement.cpp:
3453         (WebCore::HTMLTableElement::addSharedCellBordersDecl): new the AtomicStrings
3454         * loader/CachedImage.cpp:
3455         (WebCore::brokenImage):
3456         (WebCore::nullImage):
3457         * loader/FTPDirectoryDocument.cpp:
3458         (WebCore::_createTemplateDocumentData): Created so accessor has one line initialization
3459         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
3460         * loader/icon/IconDatabase.cpp:
3461         (WebCore::loadDefaultIconRecord):
3462         * page/AccessibilityObject.cpp:
3463         (WebCore::AccessibilityObject::actionVerb):
3464         * page/AccessibilityRenderObject.cpp:
3465         (WebCore::AccessibilityRenderObject::actionVerb):
3466         * page/mac/EventHandlerMac.mm:
3467         (WebCore::currentEvent):
3468         * platform/ScrollView.cpp:
3469         (WebCore::ScrollView::paint):
3470         * platform/graphics/Image.cpp:
3471         (WebCore::Image::nullImage):
3472         * platform/graphics/mac/ColorMac.mm:
3473         (WebCore::nsColor):
3474         * platform/graphics/mac/FontCacheMac.mm: new the Strings
3475         (WebCore::FontCache::getSimilarFontPlatformData):
3476         * platform/graphics/mac/GraphicsContextMac.mm:
3477         (WebCore::_createPatternColor): Created so accessor has one line initialization
3478         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3479         * platform/graphics/mac/SimpleFontDataMac.mm:
3480         (WebCore::webFallbackFontFamily):
3481         * platform/mac/PasteboardMac.mm:
3482         (WebCore::writableTypesForURL):
3483         (WebCore::createWritableTypesForImage): Created so accessor has one line initialization
3484         (WebCore::writableTypesForImage):
3485         (WebCore::stripAttachmentCharacters):
3486         * rendering/RenderLayer.cpp:
3487         (WebCore::RenderLayer::paintResizer):
3488
3489 2008-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
3490
3491         Reviewed by Darin Adler.
3492
3493         Do not spit Curl errors into the stdout as this is used by DRT
3494
3495         We have failing tests results due the curl errors printed to stdout,
3496         move them to stderr to be able to pass those tests.
3497
3498         * platform/network/curl/ResourceHandleManager.cpp:
3499         (WebCore::ResourceHandleManager::startJob):
3500
3501 2008-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
3502
3503         - fix the Gtk+ build
3504
3505         * GNUmakefile.am:
3506
3507 2008-11-16  Darin Adler  <darin@apple.com>
3508
3509         - try to fix Qt build
3510
3511         * WebCore.pro: Add the worker-related source files.
3512
3513 2008-11-16  Darin Adler  <darin@apple.com>
3514
3515         Suggested by Alexey Proskuryakov.
3516
3517         - fix the GTK build another way
3518
3519         * GNUmakefile.am: Add the worker-related source files.
3520         * bindings/js/JSEventTarget.cpp: Take the #if back out.
3521
3522 2008-11-16  Darin Adler  <darin@apple.com>
3523
3524         - try to fix GTK build
3525
3526         * bindings/js/JSEventTarget.cpp: Put worker includes inside an #if.
3527
3528 2008-11-16  Darin Adler  <darin@apple.com>
3529
3530         Reviewed by Dan Bernstein.
3531
3532         - https://bugs.webkit.org/show_bug.cgi?id=22295
3533           track which history items are from page load failures
3534
3535         * history/HistoryItem.cpp: Sort includes, add newly needed ones, and remove
3536         no-longer-needed ones.
3537         (WebCore::HistoryItem::HistoryItem): Initialize m_lastVisitWasFailure to false.
3538         (WebCore::HistoryItem::showTreeWithIndent): Rewrote to avoid appending to a
3539         String, since that's not efficient.
3540
3541         * history/HistoryItem.h: Removed unneeded includes. Added lastVisitWasFailure,
3542         setLastVisitWasFailure, and m_lastVisitWasFailure.
3543
3544         * history/mac/HistoryItemMac.mm: Add newly-needed include
3545         (WebCore::HistoryItem::setTransientProperty): Rewrote to avoid keeping a
3546         m_transientProperties map around when it is empty.
3547
3548         * loader/FrameLoader.cpp:
3549         (WebCore::FrameLoader::createHistoryItem): Call setLastVisitWasFailure when
3550         the page was unreachable or an HTTP page with a status code that indicates
3551         failure.
3552
3553 2008-11-16  Yong Li  <yong.li@torchmobile.com>
3554
3555         Reviewed by Timothy Hatcher.
3556         Landed by George Staikos.
3557
3558         Optimization: don't relayout, repaint, or emit a DOM event if the
3559         scroll event didn't scroll anywhere.
3560
3561         * rendering/RenderLayer.cpp:
3562         (WebCore::RenderLayer::scrollToOffset): add early exit
3563
3564 2008-11-16  Alexey Proskuryakov  <ap@webkit.org>
3565
3566         Reviewed by Dan Bernstein.
3567
3568         https://bugs.webkit.org/show_bug.cgi?id=22290
3569         Remove cross-heap GC and MessagePort multi-threading support
3570
3571         It is broken (and may not be implementable at all), and no longer needed, as we
3572         don't use MessagePorts for communication with workers any more.
3573
3574         * bindings/js/JSDOMBinding.cpp:
3575         * bindings/js/JSDOMBinding.h:
3576         * bindings/js/JSDOMWindowBase.cpp:
3577         * bindings/js/JSDOMWindowBase.h:
3578         Removed cross-heap GC implementation.
3579
3580         * dom/MessagePort.cpp:
3581         (WebCore::MessagePort::hasPendingActivity):
3582         * dom/MessagePort.h:
3583         Made objects RefCounted instead of ThreadSafeShared, added FIXME comments for code that is
3584         unnecessarily complicated for single threaded case.
3585
3586 2008-11-14  Alexey Proskuryakov  <ap@webkit.org>
3587
3588         Reviewed by Maciej Stachowiak.
3589
3590         https://bugs.webkit.org/show_bug.cgi?id=22266
3591         Stop using MessagePort for communication with workers
3592
3593         The current MessagePort specification is not well suited for being implemented in a
3594         multi-threaded or multi-process environment, and this doesn't appear to be easily fixable.
3595         This patch implements a simpler Mozilla API for workers instead.
3596
3597         * WebCore.xcodeproj/project.pbxproj:
3598         * DerivedSources.make:
3599         * bindings/js/JSDOMWindowBase.cpp: (jsDOMWindowBaseWorker):
3600         * bindings/js/JSDedicatedWorkerConstructor.cpp: Removed.
3601         * bindings/js/JSDedicatedWorkerConstructor.h: Removed.
3602         * bindings/js/JSDedicatedWorkerCustom.cpp: Removed.
3603         * bindings/js/JSWorkerConstructor.cpp: Copied from WebCore/bindings/js/JSDedicatedWorkerConstructor.cpp.
3604         * bindings/js/JSWorkerConstructor.h: Copied from WebCore/bindings/js/JSDedicatedWorkerConstructor.h.
3605         * bindings/js/JSWorkerCustom.cpp: Copied from WebCore/bindings/js/JSDedicatedWorkerCustom.cpp.
3606         * dom/DedicatedWorker.cpp: Removed.
3607         * dom/DedicatedWorker.h: Removed.
3608         * dom/DedicatedWorker.idl: Removed.
3609         Renamed DedicatedWorker to Worker to match Mozilla and current WHATWG cpec.
3610
3611         * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent):
3612         Clear worker exceptions to avoid hitting an assertion.
3613
3614         * dom/EventTarget.cpp: (WebCore::EventTarget::toWorker):
3615         * dom/EventTarget.h:
3616         * bindings/js/JSEventTarget.cpp: (WebCore::toJS):
3617         WorkerContext is now an EventTarget, too.
3618
3619         * bindings/js/JSWorkerContext.cpp: Removed onconnect, constructors for MessageChannel and
3620         MessagePort. Added postMessage() and onmessage.
3621
3622         * dom/ScriptExecutionContext.cpp: (WebCore::performTask): Do not reference ScriptExecutionContext
3623         when posting a task - this operation is not thread safe. It is also not necessary any more,
3624         as the context is kept alive by WorkerMessagingProxy.
3625
3626         * dom/Worker.cpp: Copied from WebCore/dom/DedicatedWorker.cpp.
3627         (WebCore::Worker::Worker): Start loading the script right away - there is no reason to do
3628         that on a timer.
3629         (WebCore::Worker::~Worker): Notify messaging proxy.
3630         (WebCore::Worker::postMessage): Just ask the proxy to post the message.
3631         (WebCore::Worker::notifyFinished): Notify messaging proxy when a thread object becomes
3632         available. Also, it is now safe to unsetPendingActivity(), making the object collectable.
3633         I'm not sure if this is the right lifetime for workers, as unreachable workers with event
3634         listeners should probably be kept alive, but it at least lets the object be collected.
3635         (WebCore::Worker::addEventListener): Added an EventTarget implementation.
3636         (WebCore::Worker::removeEventListener): Added an EventTarget implementation.
3637         (WebCore::Worker::dispatchEvent): Added an EventTarget implementation.
3638
3639         * dom/Worker.h: Copied from WebCore/dom/DedicatedWorker.h.
3640         * dom/Worker.idl: Copied from WebCore/dom/DedicatedWorker.idl.
3641         Removed onclose, made an EventListener. Actual messaging is now handled by WorkerMessagingProxy.
3642
3643         * dom/WorkerContext.cpp:
3644         (WebCore::WorkerContext::~WorkerContext): Notify messaging proxy that the context was shut
3645         down successfully.
3646         (WebCore::WorkerContext::postMessage): Added. Post the message via messaging proxy.
3647
3648         * dom/WorkerContext.h: Added postMessage and onmessage, removed onconnect.
3649
3650         * dom/WorkerMessagingProxy.cpp: Added.
3651         * dom/WorkerMessagingProxy.h: Added.
3652         This new class implements actual messaging. It is notified when a Worker is garbage collected,
3653         and asks the thread to shut down. It also owns the thread object, and references script
3654         execution context, making it safe to post messages to it remotely.
3655
3656         * dom/WorkerThread.cpp:
3657         * dom/WorkerThread.h:
3658         Keep a reference to messaging proxy, not to Worker itself. Also, the thread object no longer
3659         keeps itself alive - it is now the job of messaging proxy.
3660
3661 2008-11-15  Darin Adler  <darin@apple.com>
3662
3663         Rubber stamped by Geoff Garen.
3664
3665         - do the long-planned StructureID -> Structure rename
3666
3667         * ForwardingHeaders/runtime/Structure.h: Copied from WebCore/ForwardingHeaders/runtime/StructureID.h.
3668         * ForwardingHeaders/runtime/StructureID.h: Removed.
3669         * bindings/js/JSAudioConstructor.cpp:
3670         (WebCore::JSAudioConstructor::JSAudioConstructor):
3671         * bindings/js/JSDOMBinding.cpp:
3672         (WebCore::getCachedDOMStructure):
3673         (WebCore::cacheDOMStructure):
3674         * bindings/js/JSDOMBinding.h:
3675         (WebCore::DOMObject::DOMObject):
3676         (WebCore::getDOMStructure):
3677         * bindings/js/JSDOMGlobalObject.cpp:
3678         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
3679         * bindings/js/JSDOMGlobalObject.h:
3680         * bindings/js/JSDOMWindowBase.cpp:
3681         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3682         * bindings/js/JSDOMWindowBase.h:
3683         * bindings/js/JSDOMWindowShell.cpp:
3684         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
3685         (WebCore::JSDOMWindowShell::setWindow):
3686         * bindings/js/JSDOMWindowShell.h:
3687         (WebCore::JSDOMWindowShell::createStructure):
3688         * bindings/js/JSDedicatedWorkerConstructor.cpp:
3689         (WebCore::JSDedicatedWorkerConstructor::JSDedicatedWorkerConstructor):
3690         * bindings/js/JSHTMLAllCollection.h:
3691         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
3692         (WebCore::JSHTMLAllCollection::createStructure):
3693         * bindings/js/JSImageConstructor.cpp:
3694         (WebCore::JSImageConstructor::JSImageConstructor):
3695         * bindings/js/JSInspectedObjectWrapper.cpp:
3696         (WebCore::JSInspectedObjectWrapper::wrap):
3697         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
3698         * bindings/js/JSInspectedObjectWrapper.h:
3699         * bindings/js/JSInspectorCallbackWrapper.cpp:
3700         (WebCore::leakInspectorCallbackWrapperStructure):
3701         (WebCore::JSInspectorCallbackWrapper::wrap):
3702         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
3703         * bindings/js/JSInspectorCallbackWrapper.h:
3704         * bindings/js/JSMessageChannelConstructor.cpp:
3705         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
3706         * bindings/js/JSNamedNodesCollection.h:
3707         (WebCore::JSNamedNodesCollection::createStructure):
3708         * bindings/js/JSOptionConstructor.cpp:
3709         (WebCore::JSOptionConstructor::JSOptionConstructor):
3710         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3711         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
3712         * bindings/js/JSQuarantinedObjectWrapper.h:
3713         (WebCore::JSQuarantinedObjectWrapper::createStructure):
3714         * bindings/js/JSRGBColor.h:
3715         (WebCore::JSRGBColor::createStructure):
3716         * bindings/js/JSWorkerContext.cpp:
3717         (WebCore::createJSWorkerContextStructure):
3718         (WebCore::JSWorkerContext::JSWorkerContext):
3719         (WebCore::JSWorkerContext::createPrototype):
3720         * bindings/js/JSWorkerContext.h:
3721         (WebCore::JSWorkerContext::createStructure):
3722         (WebCore::JSWorkerContextPrototype::JSWorkerContextPrototype):
3723         (WebCore::JSWorkerContextPrototype::createStructure):
3724         * bindings/js/JSXMLHttpRequestConstructor.cpp:
3725         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3726         * bindings/js/JSXSLTProcessorConstructor.cpp:
3727         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
3728         * bindings/scripts/CodeGeneratorJS.pm:
3729         * bridge/objc/objc_runtime.h:
3730         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
3731         * bridge/qt/qt_runtime.cpp:
3732         (JSC::Bindings::QtConnectionObject::execute):
3733         * bridge/qt/qt_runtime.h:
3734         (JSC::Bindings::QtRuntimeMethod::createStructure):
3735         * bridge/runtime_array.h:
3736         (JSC::RuntimeArray::createStructure):
3737         * bridge/runtime_method.h:
3738         (JSC::RuntimeMethod::createStructure):
3739         * bridge/runtime_object.cpp:
3740         (JSC::RuntimeObjectImp::RuntimeObjectImp):
3741         * bridge/runtime_object.h:
3742         (JSC::RuntimeObjectImp::createStructure):
3743
3744 2008-11-15  Darin Adler  <darin@apple.com>
3745
3746         Reviewed by Dan Bernstein.
3747
3748         - fix just-introduced crash in the svg/custom/svg-fonts-in-html.html test
3749
3750         This gets rid of the crash. It restores the behavior of the CG case from before Dirk
3751         Shulze removed the platorm-dependent code, but perhaps it should be changed further
3752         in the future so that the default for no style is "no stroke". I think the patch is
3753         fine for fill.
3754
3755         * svg/graphics/SVGPaintServerSolid.cpp:
3756         (WebCore::SVGPaintServerSolid::setup): Added null checks for svgStyle.
3757         (WebCore::SVGPaintServerSolid::renderPath): Added null checks for style and svgStyle.
3758
3759 2008-11-15  Kevin Ollivier  <kevino@theolliviers.com>
3760
3761         Reviewed by Timothy Hatcher.
3762
3763         Initialize m_networkStateChangedFunction to 0 as otherwise the check for null will fail.
3764         
3765         https://bugs.webkit.org/show_bug.cgi?id=22284
3766
3767         * platform/network/NetworkStateNotifier.h:
3768         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
3769
3770 2008-11-15  Dirk Schulze  <krit@webkit.org>
3771
3772         Reviewed by Geoffrey Garen.
3773
3774         r38426 caused a wrong drawing of a LayoutTest. Use another
3775         way to set the color to pass this test again.
3776
3777         * svg/graphics/SVGPaintServerSolid.cpp:
3778         (WebCore::SVGPaintServerSolid::setup):
3779
3780 2008-11-15  Dirk Schulze  <krit@webkit.org>
3781
3782         Reviewed by Darin Adler.
3783
3784         Removed platform dependent code on SVGPaintServerSolid.
3785
3786         * GNUmakefile.am:
3787         * WebCore.pro:
3788         * WebCore.vcproj/WebCore.vcproj:
3789         * WebCore.xcodeproj/project.pbxproj:
3790         * svg/graphics/SVGPaintServerSolid.cpp:
3791         (WebCore::SVGPaintServerSolid::setup):
3792         (WebCore::SVGPaintServerSolid::renderPath):
3793         * svg/graphics/SVGPaintServerSolid.h:
3794         * svg/graphics/cairo/SVGPaintServerSolidCairo.cpp: Removed.
3795         * svg/graphics/cg/SVGPaintServerSolidCg.cpp: Removed.
3796         * svg/graphics/qt/SVGPaintServerSolidQt.cpp: Removed.
3797
3798 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
3799
3800         Reviewed by Sam Weinig.
3801         
3802         Updated for JavaScriptCore renames.
3803
3804         * bindings/js/JSNodeCustom.cpp:
3805         (WebCore::JSNode::mark):
3806         * bindings/js/JSXMLHttpRequestCustom.cpp:
3807         (WebCore::JSXMLHttpRequest::send):
3808         * bindings/js/ScriptController.cpp:
3809         (WebCore::ScriptController::evaluate):
3810         * bindings/js/WorkerScriptController.cpp:
3811         (WebCore::WorkerScriptController::evaluate):
3812         * bindings/objc/WebScriptObject.mm:
3813         (-[WebScriptObject evaluateWebScript:]):
3814         * bridge/NP_jsobject.cpp:
3815         (_NPN_Evaluate):
3816         * bridge/jni/jni_jsobject.mm:
3817         (JavaJSObject::eval):
3818         * page/Console.cpp:
3819         (WebCore::retrieveLastCaller):
3820         (WebCore::Console::trace):
3821
3822 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
3823
3824         Reviewed by Darin Adler.
3825
3826         https://bugs.webkit.org/show_bug.cgi?id=21810
3827         Remove use of static C++ objects that are destroyed at exit time (destructors)
3828
3829         Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid 
3830         exit-time destructor. Update code that was changed to fix this issue that ran 
3831         into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference 
3832         in gcc build 5465). Also typdefs for template types needed to be added in some 
3833         cases so the type could make it through the macro successfully.
3834
3835         Basically code of the form:
3836         static T m;
3837         becomes:
3838         DEFINE_STATIC_LOCAL(T, m, ());
3839
3840         Also any code of the form:
3841         static T& m = *new T;
3842         also becomes:
3843         DEFINE_STATIC_LOCAL(T, m, ());
3844
3845         * ForwardingHeaders/wtf/StdLibExtras.h: Added.
3846         * bindings/js/GCController.cpp:
3847         (WebCore::gcController):
3848         * bindings/js/JSDOMBinding.cpp:
3849         (WebCore::wrapperSet):
3850         * bindings/js/JSInspectedObjectWrapper.cpp:
3851         (WebCore::wrappers):
3852         * bindings/js/JSInspectorCallbackWrapper.cpp:
3853         (WebCore::wrappers):
3854         * bindings/js/JSNavigatorCustom.cpp:
3855         (WebCore::needsYouTubeQuirk):
3856         * bridge/runtime_root.cpp:
3857         (JSC::Bindings::rootObjectSet):
3858         * css/CSSMutableStyleDeclaration.cpp:
3859         (WebCore::initShorthandMap):
3860         (WebCore::CSSMutableStyleDeclaration::removeProperty):
3861         * css/CSSPrimitiveValue.cpp:
3862         (WebCore::CSSPrimitiveValue::cssText):
3863         * css/CSSSelector.cpp:
3864         (WebCore::CSSSelector::extractPseudoType):
3865         * css/CSSStyleSelector.cpp:
3866         (WebCore::screenEval):
3867         (WebCore::printEval):
3868         * dom/DOMImplementation.cpp:
3869         (WebCore::addString):
3870         (WebCore::isSVG10Feature):
3871         (WebCore::isSVG11Feature):
3872         (WebCore::DOMImplementation::isXMLMIMEType):
3873         * dom/Document.cpp:
3874         (WebCore::Document::hasPrefixNamespaceMismatch):
3875         * dom/ScriptElement.cpp:
3876         (WebCore::isSupportedJavaScriptLanguage):
3877         * editing/ApplyStyleCommand.cpp:
3878         (WebCore::styleSpanClassString):
3879         * editing/HTMLInterchange.cpp:
3880         (WebCore::):
3881         * editing/IndentOutdentCommand.cpp:
3882         (WebCore::indentBlockquoteString):
3883         * editing/ReplaceSelectionCommand.cpp:
3884         (WebCore::isInterchangeNewlineNode):
3885         (WebCore::isInterchangeConvertedSpaceSpan):
3886         * editing/htmlediting.cpp:
3887         (WebCore::stringWithRebalancedWhitespace):
3888         (WebCore::nonBreakingSpaceString):
3889         * editing/markup.cpp:
3890         (WebCore::appendAttributeValue):
3891         (WebCore::appendEscapedContent):
3892         (WebCore::shouldAddNamespaceAttr):
3893         (WebCore::appendNamespace):
3894         (WebCore::appendStartMarkup):
3895         (WebCore::createMarkup):
3896         * html/HTMLButtonElement.cpp:
3897         (WebCore::HTMLButtonElement::type):
3898         * html/HTMLElement.cpp:
3899         (WebCore::HTMLElement::isRecognizedTagName):
3900         (WebCore::inlineTagList):
3901         (WebCore::blockTagList):
3902         * html/HTMLFieldSetElement.cpp:
3903         (WebCore::HTMLFieldSetElement::type):
3904         * html/HTMLInputElement.cpp:
3905         (WebCore::HTMLInputElement::type):
3906         * html/HTMLKeygenElement.cpp:
3907         (WebCore::HTMLKeygenElement::type):
3908         * html/HTMLLegendElement.cpp:
3909         (WebCore::HTMLLegendElement::type):
3910         * html/HTMLOptGroupElement.cpp:
3911         (WebCore::HTMLOptGroupElement::type):
3912         * html/HTMLOptionElement.cpp:
3913         (WebCore::HTMLOptionElement::type):
3914         * html/HTMLParser.cpp:
3915         (WebCore::HTMLParser::getNode):
3916         (WebCore::HTMLParser::isHeaderTag):
3917         (WebCore::HTMLParser::isResidualStyleTag):
3918         (WebCore::HTMLParser::isAffectedByResidualStyle):
3919         * html/HTMLSelectElement.cpp:
3920         (WebCore::HTMLSelectElement::type):
3921         * html/HTMLTextAreaElement.cpp:
3922         (WebCore::HTMLTextAreaElement::type):
3923         * inspector/InspectorController.cpp:
3924         (WebCore::platform):
3925         * inspector/JavaScriptDebugServer.cpp:
3926         (WebCore::JavaScriptDebugServer::shared):
3927         * inspector/JavaScriptProfile.cpp:
3928         (WebCore::profileCache):
3929         * inspector/JavaScriptProfileNode.cpp:
3930         (WebCore::profileNodeCache):
3931         * loader/FrameLoader.cpp:
3932         (WebCore::localSchemes):
3933         * loader/appcache/ApplicationCacheStorage.cpp:
3934         (WebCore::cacheStorage):
3935         * loader/archive/ArchiveFactory.cpp:
3936         (WebCore::archiveMIMETypes):
3937         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
3938         * loader/icon/IconDatabase.cpp:
3939         (WebCore::IconDatabase::defaultDatabaseFilename):
3940         * page/EventHandler.cpp:
3941         (WebCore::EventHandler::dragState):
3942         * page/Frame.cpp:
3943         (WebCore::createRegExpForLabels):
3944         (WebCore::keepAliveSet):
3945         * page/Page.cpp:
3946         (WebCore::Page::groupName):
3947         * page/SecurityOrigin.cpp:
3948         (WebCore::isDefaultPortForProtocol):
3949         (WebCore::SecurityOrigin::databaseIdentifier):
3950         * page/mac/FrameMac.mm:
3951         (WebCore::regExpForLabels):
3952         * platform/KURL.cpp:
3953         (WebCore::blankURL):
3954         * platform/graphics/FontCache.cpp:
3955         (WebCore::alternateFamilyName):
3956         * platform/graphics/mac/FontCacheMac.mm:
3957         (WebCore::FontCache::getSimilarFontPlatformData):
3958         (WebCore::FontCache::getLastResortFallbackFont):
3959         * platform/mac/CursorMac.mm:
3960         (WebCore::leakNamedCursor):
3961         (WebCore::pointerCursor):
3962         (WebCore::crossCursor):
3963         (WebCore::handCursor):
3964         (WebCore::moveCursor):
3965         (WebCore::verticalTextCursor):
3966         (WebCore::cellCursor):
3967         (WebCore::contextMenuCursor):
3968         (WebCore::aliasCursor):
3969         (WebCore::zoomInCursor):
3970         (WebCore::zoomOutCursor):
3971         (WebCore::copyCursor):
3972         (WebCore::noneCursor):
3973         (WebCore::progressCursor):
3974         (WebCore::noDropCursor):
3975         (WebCore::notAllowedCursor):
3976         (WebCore::iBeamCursor):
3977         (WebCore::waitCursor):
3978         (WebCore::helpCursor):
3979         (WebCore::eastResizeCursor):
3980         (WebCore::northResizeCursor):
3981         (WebCore::northEastResizeCursor):
3982         (WebCore::northWestResizeCursor):
3983         (WebCore::southResizeCursor):
3984         (WebCore::southEastResizeCursor):
3985         (WebCore::southWestResizeCursor):
3986         (WebCore::westResizeCursor):
3987         (WebCore::northSouthResizeCursor):
3988         (WebCore::eastWestResizeCursor):
3989         (WebCore::northEastSouthWestResizeCursor):
3990         (WebCore::northWestSouthEastResizeCursor):
3991         (WebCore::columnResizeCursor):
3992         (WebCore::rowResizeCursor):
3993         (WebCore::grabCursor):
3994         (WebCore::grabbingCursor):
3995         * platform/mac/ScrollbarThemeMac.mm:
3996         (WebCore::ScrollbarTheme::nativeTheme):
3997         * platform/mac/ThemeMac.mm:
3998         (WebCore::platformTheme):
3999         * platform/mac/ThreadCheck.mm:
4000         (WebCoreReportThreadViolation):
4001         * platform/network/NetworkStateNotifier.cpp:
4002         (WebCore::networkStateNotifier):
4003         * platform/network/mac/FormDataStreamMac.mm:
4004         (WebCore::getStreamFormDataMap):
4005         (WebCore::getStreamResourceHandleMap):
4006         * platform/network/mac/ResourceResponseMac.mm:
4007         (WebCore::ResourceResponse::platformLazyInit):
4008         * platform/text/TextEncoding.cpp:
4009         (WebCore::TextEncoding::isJapanese):
4010         * plugins/PluginMainThreadScheduler.cpp:
4011         (WebCore::PluginMainThreadScheduler::scheduler):
4012         * rendering/RenderBlock.cpp:
4013         (WebCore::continuationOutlineTable):
4014         (WebCore::RenderBlock::addContinuationWithOutline):
4015         (WebCore::RenderBlock::paintContinuationOutlines):
4016         * rendering/RenderCounter.cpp:
4017         (WebCore::counterMaps):
4018         * rendering/RenderFlexibleBox.cpp:
4019         (WebCore::RenderFlexibleBox::layoutVerticalBox):
4020         * rendering/RenderListItem.cpp:
4021         (WebCore::RenderListItem::markerText):
4022         * rendering/RenderScrollbarTheme.cpp:
4023         (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
4024         * rendering/RenderThemeMac.mm:
4025         (WebCore::RenderThemeMac::systemFont):
4026         * rendering/bidi.cpp:
4027         (WebCore::RenderBlock::checkLinesForTextOverflow):
4028         * rendering/style/RenderStyle.cpp:
4029         (WebCore::RenderStyle::initialDashboardRegions):
4030         (WebCore::RenderStyle::noneDashboardRegions):
4031         * storage/Database.cpp:
4032         (WebCore::guidMutex):
4033         (WebCore::guidToVersionMap):
4034         (WebCore::guidToDatabaseMap):
4035         (WebCore::Database::databaseInfoTableName):
4036         (WebCore::databaseVersionKey):
4037         (WebCore::Database::getVersionFromDatabase):
4038         (WebCore::Database::setVersionInDatabase):
4039         (WebCore::guidForOriginAndName):
4040         * storage/DatabaseTracker.cpp:
4041         (WebCore::DatabaseTracker::tracker):
4042         (WebCore::notificationMutex):
4043         (WebCore::notificationQueue):
4044         * storage/LocalStorage.cpp:
4045         (WebCore::localStorageMap):
4046         * svg/SVGAnimateMotionElement.cpp:
4047         (WebCore::SVGAnimateMotionElement::rotateMode):
4048         * svg/SVGAnimationElement.cpp:
4049         (WebCore::SVGAnimationElement::calcMode):
4050         (WebCore::SVGAnimationElement::attributeType):
4051         (WebCore::SVGAnimationElement::isAdditive):
4052         (WebCore::SVGAnimationElement::isAccumulated):
4053         * svg/SVGLangSpace.cpp:
4054         (WebCore::SVGLangSpace::xmlspace):
4055         * svg/SVGSVGElement.cpp:
4056         (WebCore::SVGSVGElement::contentScriptType):
4057         (WebCore::SVGSVGElement::contentStyleType):
4058         * svg/SVGStyleElement.cpp:
4059         (WebCore::SVGStyleElement::type):
4060         (WebCore::SVGStyleElement::media):
4061         * svg/SVGTextContentElement.cpp:
4062         (WebCore::SVGTextContentElement::parseMappedAttribute):
4063         * svg/animation/SVGSMILElement.cpp:
4064         (WebCore::SVGSMILElement::parseClockValue):
4065         (WebCore::SVGSMILElement::restart):
4066         (WebCore::SVGSMILElement::fill):
4067         (WebCore::SVGSMILElement::repeatCount):
4068         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
4069         * svg/graphics/SVGResource.cpp:
4070         (WebCore::clientMap):
4071         (WebCore::SVGResource::removeClient):
4072         * svg/graphics/SVGResourceMarker.cpp:
4073         (WebCore::SVGResourceMarker::draw):
4074         * xml/XMLHttpRequest.cpp:
4075         (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
4076         (WebCore::preflightResultCache):
4077         (WebCore::appendPreflightResultCacheEntry):
4078         (WebCore::isSafeRequestHeader):
4079         (WebCore::isOnAccessControlResponseHeaderWhitelist):
4080         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
4081         * xml/XPathExpressionNode.cpp:
4082         (WebCore::XPath::Expression::evaluationContext):
4083         * xml/XPathParser.cpp:
4084         (WebCore::XPath::setUpAxisNamesMap):
4085         (WebCore::XPath::isAxisName):
4086         (WebCore::XPath::isNodeTypeName):
4087         * xml/XPathValue.cpp:
4088         (WebCore::XPath::Value::toNodeSet):
4089
4090 2008-11-14  Dan Bernstein  <mitz@apple.com>
4091
4092         - attempt to fix the Qt build
4093
4094         * platform/qt/Localizations.cpp:
4095         (WebCore::contextMenuItemTagTextDirectionMenu): Added. Maybe this string
4096         needs to go somewhere else in addition to here.
4097
4098 2008-11-14  Kevin Ollivier  <kevino@theolliviers.com>
4099
4100         wx build fix.
4101
4102         * platform/wx/LocalizedStringsWx.cpp:
4103         (WebCore::contextMenuItemTagTextDirectionMenu):
4104
4105 2008-11-14  Dan Bernstein  <mitz@apple.com>
4106
4107         Reviewed by Darin Adler.
4108
4109         - <rdar://problem/6234307> Support action methods for setting and clearing character-level directionality
4110         - WebCore part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
4111
4112         * WebCore.base.exp: Exported
4113         WebCore::Settings::setTextDirectionSubmenuInclusionBehavior().
4114
4115         * editing/ApplyStyleCommand.cpp:
4116         (StyleChange::init): Changed to always include the direction property
4117         in the result if the unicode-bidi property is included.
4118         (ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Added. Finds the
4119         highest ancestor of the given node that establishes bidi embedding. If
4120         that embedding agrees with the given allowed direction, finds the
4121         second-highest embedding ancestor. Splits all nodes through that
4122         ancestor. If the highest embedding ancestor did not need to be split,
4123         it is returned.
4124         (ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Added. Removes
4125         bidi embedding attributes and styles from all ancestors of the given
4126         node up to its enclosing block or the given node.
4127         (ApplyStyleCommand::applyInlineStyle): Added code to handle the
4128         unicode-bidi property. Applying style the includes this property
4129         involves removing all bidi embedding in effect, except  for one-level
4130         embedding that agrees with the desired embedding, then applying the
4131         desired embedding where it is not already in effect.
4132         (ApplyStyleCommand::applyInlineStyleToRange): Factored out from
4133         applyInlineStyle().
4134         (ApplyStyleCommand::removeHTMLBidiEmbeddingStyle): Added. Removed the
4135         "dir" attribute if necessary and the element if it becomes an unstyled
4136         style span.
4137         (ApplyStyleCommand::removeCSSStyle): Changed to remove the direction
4138         property when removing the unicode-bidi property.
4139         (ApplyStyleCommand::removeInlineStyle): Added a call to
4140         removeHTMLBidiEmbeddingStyle().
4141
4142         * editing/ApplyStyleCommand.h:
4143         * editing/Editor.cpp:
4144         (Editor::textDirectionForSelection): Added. Returns the character-level
4145         writing direction of the selection if it is uniform and simple (at most
4146         one level of embedding).
4147         (Editor::hasBidiSelection): Added. Returns true if the selection lies
4148         entirely within a single block, and that block has direction:rtl or
4149         contains any inline boxes with non-zero bidi embedding level.
4150
4151         * editing/Editor.h:
4152         * editing/EditorCommand.cpp:
4153         (stateTextWritingDirection): Added this helper function for deciding
4154         the state of Text Direction submenu items.
4155         (executeMakeTextWritingDirectionLeftToRight): Added. Applies
4156         "unicode-bidi: embed; direction: ltr;".
4157         (executeMakeTextWritingDirectionNatural): Added. Applies
4158         "unicode-bidi: normal;"
4159         (executeMakeTextWritingDirectionRightToLeft): Added. Applies
4160         "unicode-bidi: embed; direction: rtl;".
4161         (stateTextWritingDirectionLeftToRight): Added.
4162         (stateTextWritingDirectionNatural): Added.
4163         (stateTextWritingDirectionRightToLeft): Added.
4164         (createCommandMap): Added "MakeTextWritingDirectionLeftToRight",
4165         "MakeTextWritingDirectionNatural",
4166         and "MakeTextWritingDirectionRightToLeft".
4167
4168         * editing/InsertTextCommand.cpp:
4169         (InsertTextCommand::input): Added code to maintain the unicode-bidi
4170         and direction properties in the typing style. Even if they have the
4171         same values as the computed style at the caret, they need to be included
4172         in the typing style so that inserted text will not inherit any nested
4173         embedding.
4174
4175         * page/ContextMenuController.cpp:
4176         (ContextMenuController::contextMenuItemSelected): Added calls to
4177         the editor for the text direction menu items.
4178
4179         * page/Frame.cpp
4180         (Frame::computeAndSetTypingStyle): Added code to maintain the
4181         unicode-bidi and direction properties in the typing style.
4182
4183         * page/Settings.cpp:
4184         (Settings::setTextDirectionSubmenuInclusionBehavior): Added this setter.
4185
4186         * page/Settings.h: Added a TextDirectionSubmenuInclusionBehavior enum,
4187         an m_textDirectionSubmenuInclusionBehavior member, and accessors.
4188
4189         * page/mac/WebCoreViewFactory.h:
4190         * platform/ContextMenu.cpp:
4191         (WebCore::createAndAppendTextDirectionSubMenu): Added.
4192         (ContextMenu::populate): Added the Text Direction submenu item based on
4193         the inclusion behavior and the existence of a bidi selection.
4194         (ContextMenu::checkOrEnableIfNeeded): Added code for the text direction
4195         menu items.
4196
4197         * platform/ContextMenuItem.h:
4198         * platform/LocalizedStrings.h: Declared
4199         contextMenuItemTagTextDirectionMenu().
4200
4201         * platform/mac/LocalizedStringsMac.mm: Defined
4202         contextMenuItemTagTextDirectionMenu().
4203
4204         * rendering/RenderBlock.cpp:
4205         (RenderBlock::containsNonZeroBidiLevel): Added.
4206         * rendering/RenderBlock.h:
4207
4208 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
4209
4210         Reviewed by Darin Adler.
4211
4212         https://bugs.webkit.org/show_bug.cgi?id=22264
4213         Need to update to latest Geolocation spec (13 November 2008)
4214         
4215         Update to new error code constants and values.
4216
4217         * page/Geolocation.cpp: Use new named ErrorCode enums
4218         (WebCore::Geolocation::GeoNotifier::timerFired):
4219         (WebCore::Geolocation::getCurrentPosition):
4220         (WebCore::Geolocation::watchPosition):
4221         * page/PositionError.h: Have ErrorCode enum names match new error constant names and values
4222         (WebCore::PositionError::):
4223         * page/PositionError.idl: Add new named error constants
4224
4225 2008-11-14  Beth Dakin  <bdakin@apple.com>
4226
4227         Reviewed by Justin Garcia.
4228
4229         Fix (again) for <rdar://problem/5089327> Too much indentation when 
4230         pasting quoted paragraphs
4231
4232         This patch goes back to Justin's original approach to fix this bug, 
4233         written in revision 38273. That fix was mostly rolled out by 
4234         revision 38310 because of styling issues created by the addition of 
4235         extra blockquote nodes. This patch again goes back to Justin's 
4236         original fix because of cases we discovered the newer fix could not 
4237         possibly cover. This version of the patch minimizes the styling 
4238         issues of extra blockquotes by opting into the merge start code. 
4239
4240         * editing/ReplaceSelectionCommand.cpp:
4241         (WebCore::hasMatchingQuoteLevel): We want shouldMergeStart to 
4242         return true when the quoting level of the end of the inserted 
4243         content matches the quoting level of the end of the existing 
4244         content.
4245         (WebCore::ReplaceSelectionCommand::shouldMergeStart): Now calls 
4246         hasMatchingQuoteLevel
4247         (WebCore::ReplaceSelectionCommand::doApply):
4248
4249 2008-11-14  Dirk Schulze  <vbs85@gmx.de>
4250
4251         Reviewed by Eric Seidel.
4252
4253         Made SVGResourceClipper platform independent.
4254         https://bugs.webkit.org/show_bug.cgi?id=21444
4255
4256         * GNUmakefile.am:
4257         * WebCore.pro:
4258         * WebCore.vcproj/WebCore.vcproj:
4259         * WebCore.xcodeproj/project.pbxproj:
4260         * platform/graphics/GraphicsContext.h:
4261         * platform/graphic