0d864fc8e28c9d645c1db9bc1a4a1353958b5da0
[WebKit-https.git] / WebCore / ChangeLog
1 2008-11-20  Justin Garcia  <justin.garcia@apple.com>
2
3         Reviewed by Beth Dakin.
4         
5         Preparation for:
6         <rdar://problem/2610675> Blank line that is quoted can't be deleted
7         
8         To fix this we need to make changes to the code that creates selections to delete
9         when the user does a backward or forward delete with a caret selection.  For certain
10         caret positions, we now want to remove something other than the standard "caret extended
11         backward/forward by one unit".  The problem is that there were two pieces of code 
12         responsible for doing this, one in Editor::deleteWithDirection, and another inside 
13         TypingCommand::deleteKeyPressed.  The code in deleteWithDirection is a recent 
14         addition (r19172), and adding it there caused regressions because it prevented the 
15         code in deleteKeyPressed from ever running.  The regressions were never caught because 
16         JS deletion uses deleteKeyPressed while manual deletion uses deleteWithDirection.
17         
18         This patch removes selection creation code from deleteWithDirection so that deleteKeyPressed
19         can handle it.  That required moving code to handle the kill ring down into deleteKeyPressed.
20         
21         Follow up patches will fix <rdar://problem/2610675>, and attempt to eliminate the rest of the 
22         discrepancies between the behavior of JS deletions and manual deletions, so that we 
23         have better test coverage.
24
25         * editing/Editor.cpp:
26         (WebCore::Editor::deleteWithDirection): Early return if m_frame->document() is null, instead
27         of checking for that periodically throughout the function.  There's really nothing to be done
28         if it's null anyway.
29         Move kill ring code down into deleteKeyPressed.
30         * editing/Editor.h:
31         * editing/TypingCommand.cpp:
32         (WebCore::TypingCommand::TypingCommand):
33         (WebCore::TypingCommand::deleteKeyPressed):
34         (WebCore::TypingCommand::forwardDeleteKeyPressed):
35         (WebCore::TypingCommand::doApply):
36         * editing/TypingCommand.h:
37         (WebCore::TypingCommand::create):
38
39 2008-11-20  Darin Adler  <darin@apple.com>
40
41         Earlier version reviewed by Justin Garcia.
42
43         - fix <rdar://problem/4108572> REGRESSION: Can't extend selection with shift-arrow in read only mode
44
45         * editing/Editor.cpp:
46         (WebCore::Editor::handleKeyboardEvent): Remove isContentEditable check -- keyboard events can be
47         handled even when the selection is not in an editable area.
48         (WebCore::Editor::handleInputMethodKeydown): Ditto.
49
50         * editing/EditorCommand.cpp: Changed the enabled rule for operations that change the selection to
51         allow use when there's a selection even if it's not in an editable area. This includes commands
52         like shift-arrow keys to extend the slection, but not commands like arrow keys to move the
53         insertion point.
54
55 2008-11-20  Alexey Proskuryakov  <ap@webkit.org>
56
57         Reviewed by Darin Adler.
58
59         https://bugs.webkit.org/show_bug.cgi?id=22380
60         Fix WorkerContext refcounting
61
62         * dom/WorkerContext.cpp:
63         (WebCore::WorkerContext::WorkerContext):
64         * dom/WorkerContext.h:
65         (WebCore::WorkerContext::script):
66         (WebCore::WorkerContext::clearScript):
67         Added a method to manually destroy WorkerSctriptController.
68
69         * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
70         Destroy WorkerScriptController to release any references to WorkerContext.
71
72 2008-11-19  Julien Chaffraix  <jchaffraix@webkit.org>
73
74         Reviewed by Darin Adler.
75
76         Last part of bug 21106: .in format discussed changes
77         https://bugs.webkit.org/show_bug.cgi?id=21106
78
79         - Renamed isAudioHack to wrapperOnlyIfMediaIsAvailable as requested.
80
81         - Cleaned up additionnal function parameters that were unneeded.
82
83         * dom/make_names.pl:
84         * html/HTMLTagNames.in:
85
86 2008-11-20  Alexey Proskuryakov  <ap@webkit.org>
87
88         Reviewed by Darin Adler.
89
90         https://bugs.webkit.org/show_bug.cgi?id=22383
91         Worker tests spill error messages over to consequent tests
92
93         * dom/Worker.cpp: (WebCore::Worker::Worker):
94         Raise an exception immediately if URL is empty. Dcoument::completeURL() returns document URL
95         in this case, and there is no sense in starting a thread and trying to parse document source
96         as JavaScript.
97
98         * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker):
99         Return quickly if toString() raised an exception.
100
101 2008-11-19  Simon Fraser  <simon.fraser@apple.com>
102
103         Reviewed by Adele Peterson.
104
105         https://bugs.webkit.org/show_bug.cgi?id=22190
106
107         Fix the painting and event handling in transformed search fields.
108         When painting the cancel and results button parts,  get the rect from AppKit
109         relative to the input bounds (rather than in absolute coords), then convert
110         it into the coords of the part's renderer (which is the one that is painting).
111         To do this we need to compute an offset relative to some container, so expose
112         a method on RenderObject for that.
113         
114         Also fix the location at which the search popup shows up to take transforms
115         into account, and fix the math that is used to figure out if the search
116         results button, or the cancel button should get the mouse events.
117         
118         Test: fast/forms/search-transformed.html
119
120         * rendering/RenderBox.h:
121         * rendering/RenderObject.cpp:
122         (WebCore::RenderObject::offsetFromContainer):
123         * rendering/RenderObject.h:
124         * rendering/RenderTextControl.cpp:
125         (WebCore::RenderTextControl::forwardEvent):
126         (WebCore::RenderTextControl::showPopup):
127         * rendering/RenderThemeMac.h:
128         * rendering/RenderThemeMac.mm:
129         (WebCore::RenderThemeMac::convertToPaintingRect):
130         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
131         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
132         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
133
134 2008-11-20  Joerg Bornemann  <joerg.bornemann@trolltech.com>
135
136         Reviewed by Simon Hausmann.
137
138         Steps towards making the the Qt port of WebKit compile on Windows CE
139
140         https://bugs.webkit.org/show_bug.cgi?id=20746
141
142         * WebCore.pro: Various fixes to include windows specific build options
143         also in the Windows CE build.
144         * loader/icon/IconDatabase.cpp: Removed unnecessary errno.h inclusion.
145         * platform/FileSystem.h: Changed Q_OS_WIN32 to Q_OS_WIN to include CE.
146         * platform/graphics/qt/GraphicsContextQt.cpp:
147         (WebCore::GraphicsContext::getWindowsContext): SetWorldTransform is
148         not available on CE.
149         * platform/graphics/qt/PathQt.cpp: Added local definition of M_PI.
150         * platform/qt/FileSystemQt.cpp: Changed Q_OS_WIN32 to Q_OS_WIN to include CE.
151         * platform/qt/KeyboardCodes.h: Extend #idefs to define the missing OEM
152         constants on CE.
153         * platform/qt/TemporaryLinkStubs.cpp: Added stubs for plugins.
154         * platform/text/RegularExpression.cpp: Removed unused sys/types.h and
155         pcre.h inclusions.
156         * platform/win/SystemTimeWin.cpp:
157         (WebCore::userIdleTime): Don't use GetLastInputInfo on CE, it does not
158         exist.
159
160 2008-11-20  Antti Koivisto  <antti@apple.com>
161
162         Reviewed by Maciej Stachowiak.
163
164         https://bugs.webkit.org/show_bug.cgi?id=22379
165         Make CSSOM use less memory
166         
167         - Shrink CSSProperty by half by using bitfields.
168         - Get rid of m_strictParsing field in StyleBase by moving it up to CSSStyleSheet
169           and CSSMutableStyleDeclaration. This reduces size of many highly popular objects.
170
171         * css/CSSMutableStyleDeclaration.cpp:
172         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
173         (WebCore::CSSMutableStyleDeclaration::operator=):
174         * css/CSSMutableStyleDeclaration.h:
175         (WebCore::CSSMutableStyleDeclaration::setStrictParsing):
176         (WebCore::CSSMutableStyleDeclaration::useStrictParsing):
177         * css/CSSProperty.h:
178         * css/CSSStyleSheet.cpp:
179         (WebCore::CSSStyleSheet::CSSStyleSheet):
180         * css/CSSStyleSheet.h:
181         (WebCore::CSSStyleSheet::setStrictParsing):
182         (WebCore::CSSStyleSheet::useStrictParsing):
183         * css/StyleBase.h:
184         (WebCore::StyleBase::useStrictParsing):
185         (WebCore::StyleBase::StyleBase):
186
187 2008-11-19  Darin Fisher  <darin@chromium.org>
188
189         Fix bustage.
190
191         https://bugs.webkit.org/show_bug.cgi?id=22373
192         Ports busted by addition of ScriptValue.{h,cpp}
193         
194         * plugins/PluginView.cpp:
195         (WebCore::PluginView::performRequest):
196
197 2008-11-19  Darin Fisher  <darin@chromium.org>
198
199         Bustage fix.
200
201         https://bugs.webkit.org/show_bug.cgi?id=22373
202         Ports busted by addition of ScriptValue.{h,cpp}
203
204         * GNUmakefile.am:
205         * WebCore.pro:
206         * WebCoreSources.bkl:
207         * dom/XMLTokenizerQt.cpp:
208         * plugins/PluginView.cpp:
209
210 2008-11-19  Darin Fisher  <darin@chromium.org>
211
212         Reviewed by Geoff Garen.
213
214         https://bugs.webkit.org/show_bug.cgi?id=22345
215         Define ScriptValue as a thin container for a JSC::Value*.
216
217         * WebCore.vcproj/WebCore.vcproj:
218         * WebCore.xcodeproj/project.pbxproj:
219         * bindings/js/ScheduledAction.cpp:
220         * bindings/js/ScriptController.cpp:
221         (WebCore::ScriptController::evaluate):
222         * bindings/js/ScriptController.h:
223         * bindings/js/ScriptValue.cpp: Added.
224         (WebCore::ScriptValue::getString):
225         * bindings/js/ScriptValue.h: Added.
226         (WebCore::ScriptValue::ScriptValue):
227         (WebCore::ScriptValue::jsValue):
228         * dom/ScriptElement.cpp:
229         * dom/XMLTokenizer.cpp:
230         * dom/XMLTokenizerLibxml2.cpp:
231         * html/HTMLTokenizer.cpp:
232         * loader/FrameLoader.cpp:
233         (WebCore::FrameLoader::executeIfJavaScriptURL):
234         (WebCore::FrameLoader::executeScript):
235         * loader/FrameLoader.h:
236
237 2008-11-19  Beth Dakin  <bdakin@apple.com>
238
239         Reviewed by Justin Garcia.
240
241         Fix for <rdar://problem/5472507> Remove color property when a user 
242         sets color to black
243
244         This patch prevents us from inserting font nodes during the 
245         ApplyStyleCommand if they will not change the computed style of an 
246         element.
247
248         * editing/ApplyStyleCommand.cpp:
249         (WebCore::fontColorChangesComputedStyle):
250         (WebCore::fontSizeChangesComputedStyle):
251         (WebCore::fontFaceChangesComputedStyle):
252         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
253
254 2008-11-19  Simon Fraser  <simon.fraser@apple.com>
255
256         Reviewed by Antti Koivisto
257         
258         https://bugs.webkit.org/show_bug.cgi?id=22111
259         
260         Fix hit testing in controls on transformed video elements
261         by replacing absoluteBoundingBoxRect().contains() with
262         code that maps the point into local coords, taking
263         transforms into account.
264
265         Test: media/video-controls-transformed.html
266
267         * platform/graphics/MediaPlayer.h:
268         * rendering/RenderMedia.cpp:
269         (WebCore::rendererContainsPoint):
270         (WebCore::RenderMedia::forwardEvent):
271
272 2008-11-19  Simon Fraser  <simon.fraser@apple.com>
273
274         Reviewed by Darin Adler
275
276         https://bugs.webkit.org/show_bug.cgi?id=22348
277         
278         Need to educate style sharing about autofill, so that style does not
279         get shared between input elements that are autofilled, and those
280         that are not. Setting autofill should also do a setChanged on the node.
281
282         * css/CSSStyleSelector.cpp:
283         (WebCore::CSSStyleSelector::canShareStyleWithElement):
284         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
285         * dom/Node.h:
286         (WebCore::Node::isAutofilled):
287         * html/HTMLInputElement.cpp:
288         (WebCore::HTMLInputElement::setAutofilled):
289         * html/HTMLInputElement.h:
290         (WebCore::HTMLInputElement::isAutofilled):
291
292 2008-11-19  Brett Wilson  <brettw@chromium.org>
293
294         Reviewed by Antti Koivisto.
295
296         https://bugs.webkit.org/show_bug.cgi?id=22349
297
298         Clear the subresource loader client when the client is removed in
299         response to a 304 (not modified). This prevents an inconsistent state
300         where the loader thinks it's active and the loader::Host doesn't.
301
302         * loader/loader.cpp:
303         (WebCore::Loader::Host::didReceiveResponse):
304
305 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
306
307         Reviewed by Darin Adler.
308
309         https://bugs.webkit.org/show_bug.cgi?id=22355
310         Systematize code for replacing global constructors
311
312         Test: fast/workers/worker-replace-global-constructor.html
313
314         * bindings/js/JSDOMWindowBase.cpp:
315         (setJSDOMWindowBaseEvent): Changed to put the value as property, matching what generated
316         code for global constructor setters does.
317         (setJSDOMWindowBaseAudio): Ditto.
318         (setJSDOMWindowBaseImage): Ditto.
319         (setJSDOMWindowBaseMessageChannel): Ditto.
320         (setJSDOMWindowBaseOption): Ditto.
321         (setJSDOMWindowBaseWorker): Ditto.
322         (setJSDOMWindowBaseXMLHttpRequest): Ditto.
323         (setJSDOMWindowBaseXSLTProcessor): Ditto.
324         (WebCore::JSDOMWindowBase::put): Removed special cases for global constructors.
325
326         * bindings/js/JSWorkerContext.cpp:
327         (WebCore::JSWorkerContext::getOwnPropertySlot): Look up overrides before own properties,
328         as it is done for Window.
329         (WebCore::setJSWorkerContextMessageEvent): Implemented in the same way as Window global
330         constructors are.
331         (WebCore::setJSWorkerContextWorkerLocation): Ditto.
332
333 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
334
335         Reviewed by Darin Adler.
336
337         https://bugs.webkit.org/show_bug.cgi?id=22341
338         Text codecs should not use static data without locking
339
340         * platform/text/TextCodecICU.cpp:
341         * platform/text/mac/TextCodecMac.cpp:
342         Made cached converters per-thread.
343
344         * platform/text/TextEncodingRegistry.cpp:
345         (WebCore::encodingRegistryMutex): Added a mutex for codec maps access.
346         (WebCore::addToTextCodecMap): Don't use TextEncoding just to cacnonicalize the name, as it
347         causes a dedalock due to a recursive call into registry.
348         (WebCore::buildBaseTextCodecMaps): Added assertions.
349         (WebCore::newTextCodec): Take a lock to avoid concurrent access to codec maps.
350         (WebCore::atomicCanonicalTextEncodingName): Ditto.
351         (WebCore::noExtendedTextEncodingNameUsed): Added a comment, explaining why locking is not
352         necessary here.
353
354 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
355
356         Touch WebCorePrefix.h to force a rebuild, needed because of changed feature defines.
357
358         * WebCorePrefix.h:
359
360 2008-11-19  Alexey Proskuryakov  <ap@webkit.org>
361
362         Reviewed by Darin Adler.
363
364         https://bugs.webkit.org/show_bug.cgi?id=22310
365         Worker exceptions should be printed to console
366
367         * dom/Document.cpp: (WebCore::Document::reportException):
368         * dom/Document.h:
369         * dom/ScriptExecutionContext.h:
370         * dom/WorkerContext.cpp: (WebCore::WorkerContext::reportException):
371         * dom/WorkerContext.h:
372         Added a reportException() method on ScriptExecutionContext. It forwards the exception info
373         up until it finds a Document context, and then it prints it to console.
374
375         * bindings/js/JSEventListener.cpp:
376         (WebCore::JSAbstractEventListener::handleEvent): Don't talk to Console directly, use
377         ScriptExecutionContext::reportException. Also, fixed a bug where Document::updateDocumentsRendering()
378         could be called from workers.
379         (WebCore::JSLazyEventListener::parseCode): Moved variable declaration inside if block for clarity.
380
381         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
382         Report exceptions to ScriptExecutionContext.
383
384         * dom/WorkerMessagingProxy.cpp:
385         (WebCore::MessageWorkerTask::performTask):
386         (WebCore::WorkerExceptionTask::create):
387         (WebCore::WorkerExceptionTask::WorkerExceptionTask):
388         (WebCore::WorkerExceptionTask::performTask):
389         (WebCore::WorkerMessagingProxy::postWorkerException):
390         * dom/WorkerMessagingProxy.h:
391         Added a task for posting exception information.
392
393         * bindings/js/JSDOMBinding.cpp:
394         (WebCore::reportException):
395         (WebCore::reportCurrentException):
396         * bindings/js/JSDOMBinding.h:
397         Added helper methods for reporting exceptions via ScriptExecutionContext.
398
399         * page/Console.cpp:
400         * page/Console.h:
401         Removed methods for directly reporting exceptions to console.
402
403         * bindings/js/JSCustomPositionCallback.cpp:
404         (WebCore::JSCustomPositionCallback::handleEvent):
405         * bindings/js/JSCustomPositionErrorCallback.cpp:
406         (WebCore::JSCustomPositionErrorCallback::handleEvent):
407         * bindings/js/JSCustomSQLStatementCallback.cpp:
408         (WebCore::JSCustomSQLStatementCallback::handleEvent):
409         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
410         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
411         * bindings/js/JSCustomSQLTransactionCallback.cpp:
412         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
413         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
414         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
415         * bindings/js/JSCustomVoidCallback.cpp:
416         (WebCore::JSCustomVoidCallback::handleEvent):
417         * bindings/js/JSCustomXPathNSResolver.cpp:
418         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
419         * bindings/js/ScheduledAction.cpp:
420         (WebCore::ScheduledAction::execute):
421         * bindings/js/ScriptController.cpp:
422         (WebCore::ScriptController::evaluate):
423         * bindings/objc/WebScriptObject.mm:
424         (WebCore::addExceptionToConsole):
425         Switch to JSDOMBinding methods for reporting exceptions.
426
427 2008-11-18  Dan Bernstein  <mitz@apple.com>
428
429         Reviewed by Mark Rowe.
430
431         - WebCore part of https://bugs.webkit.org/show_bug.cgi?id=22331
432           <rdar://problem/6381657> REGRESSION: Contextual menu no longer has an "Inspect Element" item
433
434         * platform/ContextMenuItem.h:
435         (WebCore::ContextMenuAction): Reorder this enum to keep it in sync with
436         the one in WebUIDelegate.h.
437
438 2008-11-18  Dimitri Glazkov  <dglazkov@chromium.org>
439
440         Reviewed by Darin Adler.
441
442         https://bugs.webkit.org/show_bug.cgi?id=22346
443         PlatformString should also include HashSet.h for non-JSC builds
444
445         * platform/text/PlatformString.h:
446
447 2008-11-18  Adele Peterson  <adele@apple.com>
448
449         Reviewed by Holger Hans Peter Freyther.
450
451         Flip check added in recent refactoring so the background gets updated when the background color is valid, not invalid.
452
453         * loader/FrameLoaderClient.cpp: (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
454
455 2008-11-18  Dimitri Glazkov  <dglazkov@chromium.org>
456
457         Reviewed by Sam Weinig.
458
459         https://bugs.webkit.org/show_bug.cgi?id=22343
460         Remove unused runtime/Collector, JSLock includes in Page.cpp
461
462         * page/Page.cpp:
463
464 2008-11-18  Ada Chan  <adachan@apple.com>
465
466         Bug 22344: Make select popup window opaque
467         https://bugs.webkit.org/show_bug.cgi?id=22344
468
469         Reviewed by Steve Falkenburg.
470
471         * platform/win/PopupMenuWin.cpp:
472         (WebCore::PopupMenu::show):
473
474 2008-11-18  Dimitri Glazkov  <dglazkov@chromium.org>
475
476         Reviewed by Sam Weinig.
477
478         https://bugs.webkit.org/show_bug.cgi?id=22342
479         Remove unused JSLock.h include
480
481         * dom/Document.cpp:
482
483 2008-11-18  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
484
485         Reviewed by Sam Weinig.
486
487         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22334
488
489         Add WMLBRElement, correcting <br/> behaviour in WML.
490         Enable entity replacment for WML documents.
491         Handle WML specific <p> 'mode' attribute.
492
493         Generate layout tests results for fast/wml.
494
495         Tests cases that pass now:
496         fast/wml/br-element-in-table.wml
497         fast/wml/br-element-in-text.wml
498         fast/wml/case-sensitivity.wml
499         fast/wml/cdata-section.wml
500         fast/wml/comment.wml
501         fast/wml/entity.wml
502         fast/wml/p-align.wml
503         fast/wml/p-mode.wml
504         fast/wml/text-emphasis.wml
505         fast/wml/validate-dtd.wml
506
507         * GNUmakefile.am:
508         * WebCore.pro:
509         * WebCore.xcodeproj/project.pbxproj:
510         * dom/XMLTokenizer.cpp:
511         (WebCore::XMLTokenizer::isWMLDocument):
512         (WebCore::XMLTokenizer::insertErrorMessageBlock):
513         * dom/XMLTokenizer.h:
514         * dom/XMLTokenizerLibxml2.cpp:
515         (WebCore::XMLTokenizer::internalSubset):
516         (WebCore::getEntityHandler):
517         * dom/XMLTokenizerQt.cpp:
518         (WebCore::XMLTokenizer::parse):
519         * wml/WMLBRElement.cpp: Added.
520         (WebCore::WMLBRElement::WMLBRElement):
521         (WebCore::WMLBRElement::mapToEntry):
522         (WebCore::WMLBRElement::parseMappedAttribute):
523         (WebCore::WMLBRElement::createRenderer):
524         * wml/WMLBRElement.h: Added.
525         * wml/WMLPElement.cpp:
526         (WebCore::WMLPElement::parseMappedAttribute):
527         (WebCore::WMLPElement::insertedIntoDocument):
528         * wml/WMLPElement.h:
529         * wml/WMLTagNames.in:
530
531 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
532
533         Windows build fix.
534
535         * WebCore.vcproj/WebCore.vcproj: Fix relative paths to use $(WebKitOutputDir).
536
537 2008-11-18  Darin Adler  <darin@apple.com>
538
539         - try to fix Wx build
540
541         * WebCoreSources.bkl: Added FrameLoaderClient.cpp.
542
543 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
544
545         Reviewed by Darin Adler.
546
547         https://bugs.webkit.org/show_bug.cgi?id=22337
548         Enable workers by default
549
550         Tests: fast/workers/worker-constructor.html
551                fast/workers/worker-event-listener.html
552                fast/workers/worker-gc.html
553                fast/workers/worker-location.html
554
555         * Configurations/WebCore.xcconfig:
556         * WebCore.vcproj/WebCore.vcproj:
557         * WebCore.vcproj/build-generated-files.sh:
558         Define ENABLE_WORKERS.
559
560 2008-11-18  Darin Adler  <darin@apple.com>
561
562         Reviewed by Alexey Proskuryakov.
563
564         - first cut at https://bugs.webkit.org/show_bug.cgi?id=10957
565           <rdar://problem/5516594> please add support for HTTP-only cookies
566
567         Test: http/tests/xmlhttprequest/get-dangerous-headers.html
568
569         No test for HTTP-only support in JavaScript yet, since the Mac and Win changes
570         require an updated CFNetwork.
571
572         * platform/mac/CookieJar.mm:
573         (WebCore::isHTTPOnly): Added.
574         (WebCore::filterCookies): Added.
575         (WebCore::cookies): Use filterCookies to prevent getting HTTP-only cookies.
576         (WebCore::setCookies): Use filterCookies to prevent setting HTTP-only cookies.
577
578         * platform/network/win/CookieJarCFNetWin.cpp:
579         (WebCore::isHTTPOnly): Added.
580         (WebCore::filterCookies): Added.
581         (WebCore::setCookies): Use filterCookies to prevent getting HTTP-only cookies.
582         (WebCore::cookies): Use filterCookies to prevent getting HTTP-only cookies.
583
584         * xml/XMLHttpRequest.cpp:
585         (WebCore::isSetCookieHeader): Added.
586         (WebCore::XMLHttpRequest::getAllResponseHeaders): Hide Set-Cookie headers from
587         clients that don't have local-resource privileges.
588         (WebCore::XMLHttpRequest::getResponseHeader): Ditto.
589
590         - clean soup-specific details out of shared cookie jar header
591
592         * platform/CookieJar.h: Removed the soup-specific parts of this.
593         * platform/network/soup/CookieJarSoup.cpp: Changed to include
594         CookieJarSoup.h. Tweaked implementation a bit to handle UTF-8 better.
595         * platform/network/soup/CookieJarSoup.h: Added. Has the Soup-specified
596         part of CookieJar.h.
597         * platform/network/soup/ResourceHandleSoup.cpp: Changed to include
598         CookieJarSoup.h.
599
600 2008-11-18  Steve Falkenburg  <sfalken@apple.com>
601
602         https://bugs.webkit.org/show_bug.cgi?id=22329
603         Improper bitwise and tests against 0 in Windows context menu code
604
605         Reviewed by John Sullivan.
606
607         * platform/win/ContextMenuItemWin.cpp:
608         (WebCore::ContextMenuItem::type):
609         (WebCore::ContextMenuItem::enabled):
610
611 2008-11-18  John Sullivan  <sullivan@apple.com>
612
613         Yet more Mac build fixing
614
615         * WebCore.base.exp: Export __ZTVN7WebCore17FrameLoaderClientE
616
617 2008-11-18  Tor Arne Vestbø  <tavestbo@trolltech.com>
618
619         Reviewed by Simon Hausmann.
620
621         React properly to frame rect changes for QWidget based plugins
622
623         We now set the geometry of the QWidget in frameRectsChanged,
624         intead of setFrameRect, which means we pick up the changes to
625         the frame rect when scrolling. We also set a mask on the
626         widget to keep it from painting over scrollbars and the like
627
628         * platform/qt/WidgetQt.cpp:
629         (WebCore::Widget::setFrameRect):
630
631 2008-11-18  Tor Arne Vestbø  <tavestbo@trolltech.com>
632
633         Rubber-stamped by Simon Hausmann.
634
635         Don't mark scrollbars as focused in QtWebKit
636
637         When initing from the widget we also got the focus state,
638         but this does not make sense for scrollbars.
639
640         * platform/qt/ScrollbarThemeQt.cpp:
641         (WebCore::styleOptionSlider):
642
643 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
644
645         More Mac build fixing.
646
647         * WebCore.base.exp: Export FrameLoaderClient destructor.
648
649 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
650
651         Mac build fix.
652
653         * WebCore.xcodeproj/project.pbxproj: Add FrameLoaderClient.cpp for now.
654
655 2008-11-18  Holger Hans Peter Freyther  <zecke@selfish.org>
656
657         Reviewed by Simon Hausmann.
658
659         https://bugs.webkit.org/show_bug.cgi?id=22056
660
661         Attempt to share transitionToCommittedForNewPage of FrameLoaderClient with the different ports
662
663         After Hyatt's work on Widget and ScrollView there is little difference
664         between the implementation of Qt, Gtk+ and Win. In fact any kind of
665         difference is mostly a bug. Alp has fixed two of such errors for the Gtk+
666         port and the Qt port has at least one of them left.
667
668         The only difference between the implementations is in getting the the
669         IntSize for the new FrameView, the background color to be applied and
670         eventually some post processing.
671
672         Unify the implementations by providing a static helper function that
673         takes a Frame, IntSize, color and transparency bit and calling it from
674         the Gtk+, the Qt and the Windows port.
675
676         * GNUmakefile.am:
677         * WebCore.pro:
678         * WebCore.vcproj/WebCore.vcproj:
679         * loader/FrameLoaderClient.cpp: Added.
680         (WebCore::FrameLoaderClient::~FrameLoaderClient):
681         (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
682         * loader/FrameLoaderClient.h:
683
684 2008-11-18  Holger Hans Peter Freyther  <zecke@selfish.org>
685
686         Reviewed by Simon Hausmann.
687
688         https://bugs.webkit.org/show_bug.cgi?id=22056
689
690         Move setting the background color and transparency from WebKit/win
691         to WebCore. This allows WebKit/win, WebKit/Qt and WebKit/Gtk+
692         to share this code.
693
694         * page/FrameView.cpp:
695         (WebCore::FrameView::updateBackgroundRecursively):
696         * page/FrameView.h:
697
698 2008-11-18  Ariya Hidayat  <ariya.hidayat@trolltech.com>
699
700         Reviewed by Tor Arne Vestbø.
701
702         Fix the bug where select elements are painted without border.
703         http://trolltech.com/developer/task-tracker/index_html?id=218957&method=entry
704
705         * platform/qt/RenderThemeQt.cpp:
706         (WebCore::RenderThemeQt::paintMenuList):
707
708 2008-11-18  Jan Michael Alonzo  <jmalonzo@webkit.org>
709
710         Gtk build fix. Not reviewed.
711
712         * GNUmakefile.am: Fix USER_AGENT_STYLESHEETS, wml.css is in css/,
713         not in wml/.
714
715 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
716
717         Reviewed by Darin Adler.
718
719         https://bugs.webkit.org/show_bug.cgi?id=22308
720         Improve Worker GC behavior
721
722         * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::hasPendingActivity):
723         * dom/ActiveDOMObject.h:
724         Made hasPendingActivity() virtual, letting Worker add behavior to it.
725
726         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
727         * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
728         Tell message proxy whether there are active objects in the worker whenever JS execution
729         finishes.
730
731         * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::activeDOMObjects):
732         Added a typedef for activeDOMObjects() return type, necessary to declare iterators.
733
734         * dom/Worker.h:
735         * dom/Worker.cpp: (WebCore::Worker::hasPendingActivity): A Worker is active if it is still
736         loading, or if it has unconfirmed messages, or it the worker thread has pending activity.
737
738         * dom/WorkerContext.h:
739         * dom/WorkerContext.cpp: (WebCore::WorkerContext::hasPendingActivity): Check all registered
740         active objects for pending activity.
741
742         * dom/WorkerMessagingProxy.cpp:
743         (WebCore::MessageWorkerContextTask::performTask):
744         (WebCore::WorkerThreadActivityReportTask::create):
745         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask):
746         (WebCore::WorkerThreadActivityReportTask::performTask):
747         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
748         (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
749         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
750         (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal):
751         (WebCore::WorkerMessagingProxy::confirmWorkerThreadMessage):
752         (WebCore::WorkerMessagingProxy::reportWorkerThreadActivity):
753         (WebCore::WorkerMessagingProxy::reportWorkerThreadActivityInternal):
754         (WebCore::WorkerMessagingProxy::workerThreadHasPendingActivity):
755         * dom/WorkerMessagingProxy.h:
756         Track outstanding messages, and activity reported by worker thread.
757
758 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
759
760         Rubber-stamped by Darin Adler.
761
762         https://bugs.webkit.org/show_bug.cgi?id=22306
763         Disable channel messaging support
764
765         * bindings/js/JSDOMWindowBase.cpp:
766         (jsDOMWindowBaseMessageChannel):
767         * page/DOMWindow.idl:
768         Hide MesssagePort and MessageChannel global constructors. Due to the way MessageChannel
769         constructor is added, it remains enumerable, but undefined.
770
771 2008-11-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
772
773         Reviewed by Mark Rowe.
774
775         Remove WBXML code. MainResourceLoader is not an appropriate location.
776         Revert until we find a better place.
777
778         The mime type which belongs to wmlc should be enabled anyway so WML documents get build.
779         Remove the ENABLE(WBXML) blocks around these types in MIMETypeRegistry / DOMImplementation.
780
781         * WebCore.pro:
782         * dom/DOMImplementation.cpp:
783         (WebCore::DOMImplementation::createDocument):
784         * loader/MainResourceLoader.cpp:
785         (WebCore::MainResourceLoader::addData):
786         * platform/MIMETypeRegistry.cpp:
787         (WebCore::initializeSupportedNonImageMimeTypes):
788
789 2008-11-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
790
791         Not reviewed. Build fix.
792
793         Oops, disable WML by default on Qt.
794
795         * WebCore.pro:
796
797 2008-11-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
798
799         Reviewed by George Staikos.
800
801         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22324 (Add basic subset of WML elements)
802
803         Add first bits of WML support. Only <card> & <p> and <a> elements are supported in this first patch.
804         Support for most other elements will be added step-by-step (merging in small chunks from a big patch).
805
806         WML is not build by default.
807
808         * DerivedSources.make: Handle WMLNames/WMLElementFactory generation.
809         * GNUmakefile.am: Add new files and generator hooks.
810         * WebCore.pro: Ditto.
811         * WebCore.xcodeproj/project.pbxproj: Ditto.
812         * css/CSSStyleSelector.cpp: Load wml.css on demand, just like it's done for SVG.
813         (WebCore::linkAttribute):
814         (WebCore::CSSStyleSelector::styleForElement):c
815         * css/wml.css: Added.
816         * dom/DOMImplementation.cpp: Handle WMLDocument creation
817         (WebCore::DOMImplementation::createDocument):
818         * dom/Document.cpp: Handle WMLElement creation.
819         (WebCore::Document::createElement):
820         * dom/Document.h: Add helper function identifying WML documents.
821         (WebCore::Document::isWMLDocument):
822         * dom/Node.h: Add heper function identifying WML elements.
823         (WebCore::Node::isWMLElement):
824         * dom/XMLTokenizer.cpp: Handle errors in WML documents
825         (WebCore::XMLTokenizer::insertErrorMessageBlock):
826         * dom/XMLTokenizerLibxml2.cpp: Add WML DTD checks.
827         (WebCore::XMLTokenizer::internalSubset):
828         * dom/XMLTokenizerQt.cpp: Ditto.
829         (WebCore::):
830         * dom/make_names.pl: Force internal linkage for the "tagConstructor" functions, avoiding SVG<->WML clashes.
831         * history/BackForwardList.cpp: Add WML specific function for clearing the history.
832         (WebCore::BackForwardList::clearWmlPageHistory):
833         * history/BackForwardList.h:
834         * loader/FrameLoader.cpp: Add WML specific 'shouldReload' logic.
835         (WebCore::FrameLoader::FrameLoader):
836         (WebCore::FrameLoader::setForceReloadWmlDeck):
837         (WebCore::FrameLoader::shouldReload):
838         (WebCore::FrameLoader::loadItem):
839         * loader/FrameLoader.h:
840         * loader/MainResourceLoader.cpp: Add WBXML support (only enabled on Linux/Qt at the moment)
841         (WebCore::MainResourceLoader::addData):
842         * page/Frame.cpp: Initialize WMLNames.
843         (WebCore::Frame::Frame):
844         * page/Page.cpp: Maintain WMLPageState object per Page.
845         (WebCore::Page::Page):
846         (WebCore::Page::setWMLPageState):
847         (WebCore::Page::wmlPageState):
848         * page/Page.h:
849         * platform/MIMETypeRegistry.cpp: Recognize WML extensions.
850         (WebCore::initializeSupportedNonImageMimeTypes):
851         * platform/gtk/MIMETypeRegistryGtk.cpp: Ditto.
852         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
853         * platform/qt/MIMETypeRegistryQt.cpp: Ditto.
854         (WebCore::):
855         * platform/win/MIMETypeRegistryWin.cpp: Ditto.
856         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
857         * manual-tests/wml: Added.
858         * manual-tests/wml/a-br-element.wml: Added.
859         * manual-tests/wml/a-element.wml: Added.
860         * manual-tests/wml/a-img-element.wml: Added.
861         * manual-tests/wml/access-target.wml: Added.
862         * manual-tests/wml/anchor-br-element.wml: Added.
863         * manual-tests/wml/anchor-element.wml: Added.
864         * manual-tests/wml/anchor-img-element.wml: Added.
865         * manual-tests/wml/card-newcontext-attr.wml: Added.
866         * manual-tests/wml/card-onenterbackward.wml: Added.
867         * manual-tests/wml/card-onenterforward.wml: Added.
868         * manual-tests/wml/card-ontimer.wml: Added.
869         * manual-tests/wml/deck-access-control.wml: Added.
870         * manual-tests/wml/go-element.wml: Added.
871         * manual-tests/wml/input-emptyok.wml: Added.
872         * manual-tests/wml/input-format.wml: Added.
873         * manual-tests/wml/onevent-go.wml: Added.
874         * manual-tests/wml/onevent-noop.wml: Added.
875         * manual-tests/wml/onevent-prev.wml: Added.
876         * manual-tests/wml/onevent-refresh.wml: Added.
877         * manual-tests/wml/onevent-shadow.wml: Added.
878         * manual-tests/wml/postfield-get.wml: Added.
879         * manual-tests/wml/postfield-post.wml: Added.
880         * manual-tests/wml/select-element.wml: Added.
881         * manual-tests/wml/select-onpick-event.wml: Added.
882         * manual-tests/wml/setvar-element.wml: Added.
883         * manual-tests/wml/targetdeck.wml: Added.
884         * manual-tests/wml/task-go-in-anchor.wml: Added.
885         * manual-tests/wml/task-noop-in-do.wml: Added.
886         * manual-tests/wml/task-noop-in-onevent.wml: Added.
887         * manual-tests/wml/task-prev-in-anchor.wml: Added.
888         * manual-tests/wml/task-refresh-in-anchor.wml: Added.
889         * manual-tests/wml/template-go.wml: Added.
890         * manual-tests/wml/template-onevent.wml: Added.
891         * manual-tests/wml/template-ontimer.wml: Added.
892         * manual-tests/wml/timer.wml: Added.
893         * manual-tests/wml/variable-substitution.wml: Added.
894         * wml: Added.
895         * wml/WMLAElement.cpp: Added.
896         (WebCore::WMLAElement::WMLAElement):
897         (WebCore::WMLAElement::parseMappedAttribute):
898         (WebCore::WMLAElement::supportsFocus):
899         (WebCore::WMLAElement::isFocusable):
900         (WebCore::WMLAElement::isMouseFocusable):
901         (WebCore::WMLAElement::isKeyboardFocusable):
902         (WebCore::WMLAElement::defaultEventHandler):
903         (WebCore::WMLAElement::accessKeyAction):
904         (WebCore::WMLAElement::isURLAttribute):
905         (WebCore::WMLAElement::target):
906         * wml/WMLAElement.h: Added.
907         * wml/WMLAttributeNames.in: Added.
908         * wml/WMLCardElement.cpp: Added.
909         (WebCore::WMLCardElement::WMLCardElement):
910         * wml/WMLCardElement.h: Added.
911         * wml/WMLDocument.cpp: Added.
912         (WebCore::WMLDocument::WMLDocument):
913         (WebCore::WMLDocument::~WMLDocument):
914         * wml/WMLDocument.h: Added.
915         (WebCore::WMLDocument::create):
916         (WebCore::WMLDocument::isWMLDocument):
917         * wml/WMLElement.cpp: Added.
918         (WebCore::WMLElement::WMLElement):
919         (WebCore::WMLElement::mapToEntry):
920         (WebCore::WMLElement::parseMappedAttribute):
921         (WebCore::WMLElement::rendererIsNeeded):
922         (WebCore::WMLElement::createRenderer):
923         * wml/WMLElement.h: Added.
924         (WebCore::WMLElement::isWMLElement):
925         * wml/WMLPElement.cpp: Added.
926         (WebCore::WMLPElement::WMLPElement):
927         (WebCore::WMLPElement::mapToEntry):
928         (WebCore::WMLPElement::parseMappedAttribute):
929         * wml/WMLPElement.h: Added.
930         * wml/WMLPageState.cpp: Added.
931         (WebCore::WMLPageState::WMLPageState):
932         (WebCore::WMLPageState::~WMLPageState):
933         (WebCore::WMLPageState::reset):
934         (WebCore::WMLPageState::setNeedCheckDeckAccess):
935         (WebCore::WMLPageState::isDeckAccessible):
936         * wml/WMLPageState.h: Added.
937         (WebCore::WMLPageState::storeVariable):
938         (WebCore::WMLPageState::storeVariables):
939         (WebCore::WMLPageState::getVaribale):
940         (WebCore::WMLPageState::hasVariables):
941         (WebCore::WMLPageState::historyLength):
942         (WebCore::WMLPageState::setHistoryLength):
943         (WebCore::WMLPageState::page):
944         (WebCore::WMLPageState::activeCard):
945         (WebCore::WMLPageState::setActiveCard):
946         (WebCore::WMLPageState::setDeckAccessDomain):
947         (WebCore::WMLPageState::setDeckAccessPath):
948         (WebCore::WMLPageState::hasDeckAccess):
949         * wml/WMLTagNames.in: Added.
950
951 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
952
953         Reviewed by Sam Weinig.
954         
955         Updated for JavaScriptCore renames.
956
957         * WebCore.pro:
958         * webcore-base.bkl:
959
960 2008-11-17  Justin Garcia  <justin.garcia@apple.com>
961
962         Reviewed by Beth Dakin.
963
964         <rdar://problem/4922709> Copying less than a paragraph of quoted text and pasting it doesn't retain quote level
965         
966         There was code to intentionally avoid quoting pasted content if less than a paragraph of 
967         it was copied.  That was added for <rdar://problem/5006779>, but was unnecessary because
968         that bug was about Paste and Match style for single paragraphs.  And quote stripping for
969         Paste and Match style is handled elsewhere.
970
971         * editing/markup.cpp:
972         (WebCore::createMarkup):
973
974 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
975
976         Reviewed by Sam Weinig.
977         
978         Updated for JavaScriptCore rename.
979
980         * ForwardingHeaders/interpreter/CallFrame.h: Copied from WebCore/ForwardingHeaders/runtime/ExecState.h.
981         * ForwardingHeaders/runtime/ExecState.h: Removed.
982         * bindings/objc/WebScriptObject.mm:
983         * bridge/c/c_instance.cpp:
984         * bridge/jni/jni_jsobject.mm:
985         * dom/Node.cpp:
986         * dom/NodeFilter.cpp:
987         * dom/NodeIterator.cpp:
988         * dom/TreeWalker.cpp:
989         * inspector/JavaScriptCallFrame.h:
990
991 2008-11-17  Pierre-Olivier Latour  <pol@apple.com>
992
993         Reviewed by Sam Weinig.
994
995         Added functionality to AnimationController to allow pausing a running
996         animation or transition at a given time for testing purposes.
997
998         https://bugs.webkit.org/show_bug.cgi?id=21261
999
1000         Tests: animations/animation-drt-api.html
1001                transitions/transition-drt-api.html
1002
1003         * WebCore.base.exp:
1004         * WebCore.xcodeproj/project.pbxproj:
1005         * page/animation/AnimationBase.cpp:
1006         (WebCore::AnimationBase::updateStateMachine):
1007         (WebCore::AnimationBase::progress):
1008         (WebCore::AnimationBase::pauseAtTime):
1009         * page/animation/AnimationBase.h:
1010         * page/animation/AnimationController.cpp:
1011         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1012         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1013         (WebCore::AnimationController::pauseAnimationAtTime):
1014         (WebCore::AnimationController::pauseTransitionAtTime):
1015         * page/animation/AnimationController.h:
1016         * page/animation/CompositeAnimation.cpp:
1017         (WebCore::CompositeAnimationPrivate::isAnimating):
1018         (WebCore::CompositeAnimationPrivate::pauseAnimationAtTime):
1019         (WebCore::CompositeAnimationPrivate::pauseTransitionAtTime):
1020         (WebCore::CompositeAnimation::pauseAnimationAtTime):
1021         (WebCore::CompositeAnimation::pauseTransitionAtTime):
1022         * page/animation/CompositeAnimation.h:
1023         * page/animation/ImplicitAnimation.cpp:
1024         (WebCore::ImplicitAnimation::animate):
1025
1026 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1027
1028         Reviewed by Sam Weinig.
1029         
1030         Updated for JavaScriptCore renames.
1031
1032         * ForwardingHeaders/VM: Removed.
1033         * ForwardingHeaders/VM/Machine.h: Removed.
1034         * ForwardingHeaders/interpreter: Added.
1035         * ForwardingHeaders/interpreter/Interpreter.h: Copied from ForwardingHeaders/VM/Machine.h.
1036         * WebCore.pro:
1037         * bindings/js/JSXMLHttpRequestCustom.cpp:
1038         * page/Console.cpp:
1039         * webcore-base.bkl:
1040
1041 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1042
1043         Reviewed by Sam Weinig.
1044
1045         Updated for JavaScriptCore renames.
1046
1047         * ForwardingHeaders/runtime/Interpreter.h: Removed.
1048         * WebCore.vcproj/WebCore.vcproj:
1049         * bindings/js/JSDOMBinding.h:
1050         * bindings/js/WorkerScriptController.cpp:
1051         * bindings/objc/WebScriptObject.mm:
1052         * bridge/NP_jsobject.cpp:
1053         * bridge/jni/jni_jsobject.mm:
1054         * html/CanvasRenderingContext2D.cpp:
1055         * inspector/JavaScriptCallFrame.cpp:
1056         * page/Console.cpp:
1057
1058 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1059
1060         Not reviewed.
1061
1062         Try to fix wx build.
1063
1064         * webcore-base.bkl:
1065
1066 2008-11-17  Greg Bolsinga  <bolsinga@apple.com>
1067
1068         Reviewed by Darin Adler.
1069
1070         https://bugs.webkit.org/show_bug.cgi?id=21810
1071         Remove use of static C++ objects that are destroyed at exit time (destructors)
1072
1073         Find some missing DEFINE_STATIC_LOCAL use cases.
1074         
1075         * bindings/js/JSSVGPODTypeWrapper.h:
1076         (WebCore::PODTypeWrapperCacheInfoTraits::emptyValue):
1077         (WebCore::JSSVGDynamicPODTypeWrapperCache::dynamicWrapperHashMap):
1078         * dom/make_names.pl: Generate code to use DEFINE_STATIC_LOCAL.
1079         * page/AccessibilityRenderObject.cpp:
1080         (WebCore::RoleEntry::): This method is only called once, so the array does not have to be static.
1081         * platform/graphics/FontCache.cpp:
1082         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
1083         (WebCore::FontDataCacheKeyTraits::emptyValue):
1084         * rendering/style/RenderStyle.h:
1085         (WebCore::InheritedFlags::initialTransform):
1086
1087 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1088
1089         Not reviewed.
1090
1091         Try to fix Qt build.
1092
1093         * WebCore.pro:
1094
1095 2008-11-16  Simon Fraser  <simon.fraser@apple.com>
1096
1097         Reviewed by Dan Bernstein
1098
1099         https://bugs.webkit.org/show_bug.cgi?id=22118
1100         
1101         Fix resize corner tracking in transformed elements by using 
1102         mapping the point into local coords using absoluteToLocal,
1103         rather than convertToLayerCoords.
1104         
1105         Test: fast/css/resize-corner-tracking-transformed.html
1106
1107         * page/EventHandler.h:
1108         * rendering/RenderLayer.cpp:
1109         (WebCore::RenderLayer::absoluteToContents):
1110         (WebCore::RenderLayer::offsetFromResizeCorner):
1111         (WebCore::RenderLayer::isPointInResizeControl):
1112         * rendering/RenderLayer.h:
1113
1114 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
1115
1116         Not reviewed.
1117
1118         Try to fix Qt build.
1119
1120         * WebCore.pro:
1121
1122 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
1123
1124         Reviewed by Geoffrey Garen.
1125
1126         Use RefPtr and PassRefPtr where appropriate.
1127
1128         * loader/FTPDirectoryDocument.cpp:
1129         (WebCore::createTemplateDocumentData):
1130
1131 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
1132
1133         Fix build break for real.
1134
1135         * loader/FTPDirectoryDocument.cpp:
1136         (WebCore::createTemplateDocumentData):
1137
1138 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
1139
1140         Fix build break and bug.
1141
1142         * loader/FTPDirectoryDocument.cpp:
1143         (WebCore::createTemplateDocumentData):
1144
1145 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
1146
1147         Reviewed by Darin Adler.
1148
1149         https://bugs.webkit.org/show_bug.cgi?id=21810
1150         Remove use of static C++ objects that are destroyed at exit time (destructors)
1151
1152         Use DEFINE_STATIC_LOCAL for static RetainPtr<T>, RefPtr<T>. Add additional
1153         uses of DEFINE_STATIC_LOCAL where appropriate.
1154
1155         * html/HTMLTableElement.cpp:
1156         (WebCore::HTMLTableElement::addSharedCellBordersDecl): new the AtomicStrings
1157         * loader/CachedImage.cpp:
1158         (WebCore::brokenImage):
1159         (WebCore::nullImage):
1160         * loader/FTPDirectoryDocument.cpp:
1161         (WebCore::_createTemplateDocumentData): Created so accessor has one line initialization
1162         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
1163         * loader/icon/IconDatabase.cpp:
1164         (WebCore::loadDefaultIconRecord):
1165         * page/AccessibilityObject.cpp:
1166         (WebCore::AccessibilityObject::actionVerb):
1167         * page/AccessibilityRenderObject.cpp:
1168         (WebCore::AccessibilityRenderObject::actionVerb):
1169         * page/mac/EventHandlerMac.mm:
1170         (WebCore::currentEvent):
1171         * platform/ScrollView.cpp:
1172         (WebCore::ScrollView::paint):
1173         * platform/graphics/Image.cpp:
1174         (WebCore::Image::nullImage):
1175         * platform/graphics/mac/ColorMac.mm:
1176         (WebCore::nsColor):
1177         * platform/graphics/mac/FontCacheMac.mm: new the Strings
1178         (WebCore::FontCache::getSimilarFontPlatformData):
1179         * platform/graphics/mac/GraphicsContextMac.mm:
1180         (WebCore::_createPatternColor): Created so accessor has one line initialization
1181         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1182         * platform/graphics/mac/SimpleFontDataMac.mm:
1183         (WebCore::webFallbackFontFamily):
1184         * platform/mac/PasteboardMac.mm:
1185         (WebCore::writableTypesForURL):
1186         (WebCore::createWritableTypesForImage): Created so accessor has one line initialization
1187         (WebCore::writableTypesForImage):
1188         (WebCore::stripAttachmentCharacters):
1189         * rendering/RenderLayer.cpp:
1190         (WebCore::RenderLayer::paintResizer):
1191
1192 2008-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
1193
1194         Reviewed by Darin Adler.
1195
1196         Do not spit Curl errors into the stdout as this is used by DRT
1197
1198         We have failing tests results due the curl errors printed to stdout,
1199         move them to stderr to be able to pass those tests.
1200
1201         * platform/network/curl/ResourceHandleManager.cpp:
1202         (WebCore::ResourceHandleManager::startJob):
1203
1204 2008-11-16  Holger Hans Peter Freyther  <zecke@selfish.org>
1205
1206         - fix the Gtk+ build
1207
1208         * GNUmakefile.am:
1209
1210 2008-11-16  Darin Adler  <darin@apple.com>
1211
1212         - try to fix Qt build
1213
1214         * WebCore.pro: Add the worker-related source files.
1215
1216 2008-11-16  Darin Adler  <darin@apple.com>
1217
1218         Suggested by Alexey Proskuryakov.
1219
1220         - fix the GTK build another way
1221
1222         * GNUmakefile.am: Add the worker-related source files.
1223         * bindings/js/JSEventTarget.cpp: Take the #if back out.
1224
1225 2008-11-16  Darin Adler  <darin@apple.com>
1226
1227         - try to fix GTK build
1228
1229         * bindings/js/JSEventTarget.cpp: Put worker includes inside an #if.
1230
1231 2008-11-16  Darin Adler  <darin@apple.com>
1232
1233         Reviewed by Dan Bernstein.
1234
1235         - https://bugs.webkit.org/show_bug.cgi?id=22295
1236           track which history items are from page load failures
1237
1238         * history/HistoryItem.cpp: Sort includes, add newly needed ones, and remove
1239         no-longer-needed ones.
1240         (WebCore::HistoryItem::HistoryItem): Initialize m_lastVisitWasFailure to false.
1241         (WebCore::HistoryItem::showTreeWithIndent): Rewrote to avoid appending to a
1242         String, since that's not efficient.
1243
1244         * history/HistoryItem.h: Removed unneeded includes. Added lastVisitWasFailure,
1245         setLastVisitWasFailure, and m_lastVisitWasFailure.
1246
1247         * history/mac/HistoryItemMac.mm: Add newly-needed include
1248         (WebCore::HistoryItem::setTransientProperty): Rewrote to avoid keeping a
1249         m_transientProperties map around when it is empty.
1250
1251         * loader/FrameLoader.cpp:
1252         (WebCore::FrameLoader::createHistoryItem): Call setLastVisitWasFailure when
1253         the page was unreachable or an HTTP page with a status code that indicates
1254         failure.
1255
1256 2008-11-16  Yong Li  <yong.li@torchmobile.com>
1257
1258         Reviewed by Timothy Hatcher.
1259         Landed by George Staikos.
1260
1261         Optimization: don't relayout, repaint, or emit a DOM event if the
1262         scroll event didn't scroll anywhere.
1263
1264         * rendering/RenderLayer.cpp:
1265         (WebCore::RenderLayer::scrollToOffset): add early exit
1266
1267 2008-11-16  Alexey Proskuryakov  <ap@webkit.org>
1268
1269         Reviewed by Dan Bernstein.
1270
1271         https://bugs.webkit.org/show_bug.cgi?id=22290
1272         Remove cross-heap GC and MessagePort multi-threading support
1273
1274         It is broken (and may not be implementable at all), and no longer needed, as we
1275         don't use MessagePorts for communication with workers any more.
1276
1277         * bindings/js/JSDOMBinding.cpp:
1278         * bindings/js/JSDOMBinding.h:
1279         * bindings/js/JSDOMWindowBase.cpp:
1280         * bindings/js/JSDOMWindowBase.h:
1281         Removed cross-heap GC implementation.
1282
1283         * dom/MessagePort.cpp:
1284         (WebCore::MessagePort::hasPendingActivity):
1285         * dom/MessagePort.h:
1286         Made objects RefCounted instead of ThreadSafeShared, added FIXME comments for code that is
1287         unnecessarily complicated for single threaded case.
1288
1289 2008-11-14  Alexey Proskuryakov  <ap@webkit.org>
1290
1291         Reviewed by Maciej Stachowiak.
1292
1293         https://bugs.webkit.org/show_bug.cgi?id=22266
1294         Stop using MessagePort for communication with workers
1295
1296         The current MessagePort specification is not well suited for being implemented in a
1297         multi-threaded or multi-process environment, and this doesn't appear to be easily fixable.
1298         This patch implements a simpler Mozilla API for workers instead.
1299
1300         * WebCore.xcodeproj/project.pbxproj:
1301         * DerivedSources.make:
1302         * bindings/js/JSDOMWindowBase.cpp: (jsDOMWindowBaseWorker):
1303         * bindings/js/JSDedicatedWorkerConstructor.cpp: Removed.
1304         * bindings/js/JSDedicatedWorkerConstructor.h: Removed.
1305         * bindings/js/JSDedicatedWorkerCustom.cpp: Removed.
1306         * bindings/js/JSWorkerConstructor.cpp: Copied from WebCore/bindings/js/JSDedicatedWorkerConstructor.cpp.
1307         * bindings/js/JSWorkerConstructor.h: Copied from WebCore/bindings/js/JSDedicatedWorkerConstructor.h.
1308         * bindings/js/JSWorkerCustom.cpp: Copied from WebCore/bindings/js/JSDedicatedWorkerCustom.cpp.
1309         * dom/DedicatedWorker.cpp: Removed.
1310         * dom/DedicatedWorker.h: Removed.
1311         * dom/DedicatedWorker.idl: Removed.
1312         Renamed DedicatedWorker to Worker to match Mozilla and current WHATWG cpec.
1313
1314         * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent):
1315         Clear worker exceptions to avoid hitting an assertion.
1316
1317         * dom/EventTarget.cpp: (WebCore::EventTarget::toWorker):
1318         * dom/EventTarget.h:
1319         * bindings/js/JSEventTarget.cpp: (WebCore::toJS):
1320         WorkerContext is now an EventTarget, too.
1321
1322         * bindings/js/JSWorkerContext.cpp: Removed onconnect, constructors for MessageChannel and
1323         MessagePort. Added postMessage() and onmessage.
1324
1325         * dom/ScriptExecutionContext.cpp: (WebCore::performTask): Do not reference ScriptExecutionContext
1326         when posting a task - this operation is not thread safe. It is also not necessary any more,
1327         as the context is kept alive by WorkerMessagingProxy.
1328
1329         * dom/Worker.cpp: Copied from WebCore/dom/DedicatedWorker.cpp.
1330         (WebCore::Worker::Worker): Start loading the script right away - there is no reason to do
1331         that on a timer.
1332         (WebCore::Worker::~Worker): Notify messaging proxy.
1333         (WebCore::Worker::postMessage): Just ask the proxy to post the message.
1334         (WebCore::Worker::notifyFinished): Notify messaging proxy when a thread object becomes
1335         available. Also, it is now safe to unsetPendingActivity(), making the object collectable.
1336         I'm not sure if this is the right lifetime for workers, as unreachable workers with event
1337         listeners should probably be kept alive, but it at least lets the object be collected.
1338         (WebCore::Worker::addEventListener): Added an EventTarget implementation.
1339         (WebCore::Worker::removeEventListener): Added an EventTarget implementation.
1340         (WebCore::Worker::dispatchEvent): Added an EventTarget implementation.
1341
1342         * dom/Worker.h: Copied from WebCore/dom/DedicatedWorker.h.
1343         * dom/Worker.idl: Copied from WebCore/dom/DedicatedWorker.idl.
1344         Removed onclose, made an EventListener. Actual messaging is now handled by WorkerMessagingProxy.
1345
1346         * dom/WorkerContext.cpp:
1347         (WebCore::WorkerContext::~WorkerContext): Notify messaging proxy that the context was shut
1348         down successfully.
1349         (WebCore::WorkerContext::postMessage): Added. Post the message via messaging proxy.
1350
1351         * dom/WorkerContext.h: Added postMessage and onmessage, removed onconnect.
1352
1353         * dom/WorkerMessagingProxy.cpp: Added.
1354         * dom/WorkerMessagingProxy.h: Added.
1355         This new class implements actual messaging. It is notified when a Worker is garbage collected,
1356         and asks the thread to shut down. It also owns the thread object, and references script
1357         execution context, making it safe to post messages to it remotely.
1358
1359         * dom/WorkerThread.cpp:
1360         * dom/WorkerThread.h:
1361         Keep a reference to messaging proxy, not to Worker itself. Also, the thread object no longer
1362         keeps itself alive - it is now the job of messaging proxy.
1363
1364 2008-11-15  Darin Adler  <darin@apple.com>
1365
1366         Rubber stamped by Geoff Garen.
1367
1368         - do the long-planned StructureID -> Structure rename
1369
1370         * ForwardingHeaders/runtime/Structure.h: Copied from WebCore/ForwardingHeaders/runtime/StructureID.h.
1371         * ForwardingHeaders/runtime/StructureID.h: Removed.
1372         * bindings/js/JSAudioConstructor.cpp:
1373         (WebCore::JSAudioConstructor::JSAudioConstructor):
1374         * bindings/js/JSDOMBinding.cpp:
1375         (WebCore::getCachedDOMStructure):
1376         (WebCore::cacheDOMStructure):
1377         * bindings/js/JSDOMBinding.h:
1378         (WebCore::DOMObject::DOMObject):
1379         (WebCore::getDOMStructure):
1380         * bindings/js/JSDOMGlobalObject.cpp:
1381         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1382         * bindings/js/JSDOMGlobalObject.h:
1383         * bindings/js/JSDOMWindowBase.cpp:
1384         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1385         * bindings/js/JSDOMWindowBase.h:
1386         * bindings/js/JSDOMWindowShell.cpp:
1387         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
1388         (WebCore::JSDOMWindowShell::setWindow):
1389         * bindings/js/JSDOMWindowShell.h:
1390         (WebCore::JSDOMWindowShell::createStructure):
1391         * bindings/js/JSDedicatedWorkerConstructor.cpp:
1392         (WebCore::JSDedicatedWorkerConstructor::JSDedicatedWorkerConstructor):
1393         * bindings/js/JSHTMLAllCollection.h:
1394         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
1395         (WebCore::JSHTMLAllCollection::createStructure):
1396         * bindings/js/JSImageConstructor.cpp:
1397         (WebCore::JSImageConstructor::JSImageConstructor):
1398         * bindings/js/JSInspectedObjectWrapper.cpp:
1399         (WebCore::JSInspectedObjectWrapper::wrap):
1400         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
1401         * bindings/js/JSInspectedObjectWrapper.h:
1402         * bindings/js/JSInspectorCallbackWrapper.cpp:
1403         (WebCore::leakInspectorCallbackWrapperStructure):
1404         (WebCore::JSInspectorCallbackWrapper::wrap):
1405         (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper):
1406         * bindings/js/JSInspectorCallbackWrapper.h:
1407         * bindings/js/JSMessageChannelConstructor.cpp:
1408         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
1409         * bindings/js/JSNamedNodesCollection.h:
1410         (WebCore::JSNamedNodesCollection::createStructure):
1411         * bindings/js/JSOptionConstructor.cpp:
1412         (WebCore::JSOptionConstructor::JSOptionConstructor):
1413         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1414         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper):
1415         * bindings/js/JSQuarantinedObjectWrapper.h:
1416         (WebCore::JSQuarantinedObjectWrapper::createStructure):
1417         * bindings/js/JSRGBColor.h:
1418         (WebCore::JSRGBColor::createStructure):
1419         * bindings/js/JSWorkerContext.cpp:
1420         (WebCore::createJSWorkerContextStructure):
1421         (WebCore::JSWorkerContext::JSWorkerContext):
1422         (WebCore::JSWorkerContext::createPrototype):
1423         * bindings/js/JSWorkerContext.h:
1424         (WebCore::JSWorkerContext::createStructure):
1425         (WebCore::JSWorkerContextPrototype::JSWorkerContextPrototype):
1426         (WebCore::JSWorkerContextPrototype::createStructure):
1427         * bindings/js/JSXMLHttpRequestConstructor.cpp:
1428         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
1429         * bindings/js/JSXSLTProcessorConstructor.cpp:
1430         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
1431         * bindings/scripts/CodeGeneratorJS.pm:
1432         * bridge/objc/objc_runtime.h:
1433         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
1434         * bridge/qt/qt_runtime.cpp:
1435         (JSC::Bindings::QtConnectionObject::execute):
1436         * bridge/qt/qt_runtime.h:
1437         (JSC::Bindings::QtRuntimeMethod::createStructure):
1438         * bridge/runtime_array.h:
1439         (JSC::RuntimeArray::createStructure):
1440         * bridge/runtime_method.h:
1441         (JSC::RuntimeMethod::createStructure):
1442         * bridge/runtime_object.cpp:
1443         (JSC::RuntimeObjectImp::RuntimeObjectImp):
1444         * bridge/runtime_object.h:
1445         (JSC::RuntimeObjectImp::createStructure):
1446
1447 2008-11-15  Darin Adler  <darin@apple.com>
1448
1449         Reviewed by Dan Bernstein.
1450
1451         - fix just-introduced crash in the svg/custom/svg-fonts-in-html.html test
1452
1453         This gets rid of the crash. It restores the behavior of the CG case from before Dirk
1454         Shulze removed the platorm-dependent code, but perhaps it should be changed further
1455         in the future so that the default for no style is "no stroke". I think the patch is
1456         fine for fill.
1457
1458         * svg/graphics/SVGPaintServerSolid.cpp:
1459         (WebCore::SVGPaintServerSolid::setup): Added null checks for svgStyle.
1460         (WebCore::SVGPaintServerSolid::renderPath): Added null checks for style and svgStyle.
1461
1462 2008-11-15  Kevin Ollivier  <kevino@theolliviers.com>
1463
1464         Reviewed by Timothy Hatcher.
1465
1466         Initialize m_networkStateChangedFunction to 0 as otherwise the check for null will fail.
1467         
1468         https://bugs.webkit.org/show_bug.cgi?id=22284
1469
1470         * platform/network/NetworkStateNotifier.h:
1471         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1472
1473 2008-11-15  Dirk Schulze  <krit@webkit.org>
1474
1475         Reviewed by Geoffrey Garen.
1476
1477         r38426 caused a wrong drawing of a LayoutTest. Use another
1478         way to set the color to pass this test again.
1479
1480         * svg/graphics/SVGPaintServerSolid.cpp:
1481         (WebCore::SVGPaintServerSolid::setup):
1482
1483 2008-11-15  Dirk Schulze  <krit@webkit.org>
1484
1485         Reviewed by Darin Adler.
1486
1487         Removed platform dependent code on SVGPaintServerSolid.
1488
1489         * GNUmakefile.am:
1490         * WebCore.pro:
1491         * WebCore.vcproj/WebCore.vcproj:
1492         * WebCore.xcodeproj/project.pbxproj:
1493         * svg/graphics/SVGPaintServerSolid.cpp:
1494         (WebCore::SVGPaintServerSolid::setup):
1495         (WebCore::SVGPaintServerSolid::renderPath):
1496         * svg/graphics/SVGPaintServerSolid.h:
1497         * svg/graphics/cairo/SVGPaintServerSolidCairo.cpp: Removed.
1498         * svg/graphics/cg/SVGPaintServerSolidCg.cpp: Removed.
1499         * svg/graphics/qt/SVGPaintServerSolidQt.cpp: Removed.
1500
1501 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
1502
1503         Reviewed by Sam Weinig.
1504         
1505         Updated for JavaScriptCore renames.
1506
1507         * bindings/js/JSNodeCustom.cpp:
1508         (WebCore::JSNode::mark):
1509         * bindings/js/JSXMLHttpRequestCustom.cpp:
1510         (WebCore::JSXMLHttpRequest::send):
1511         * bindings/js/ScriptController.cpp:
1512         (WebCore::ScriptController::evaluate):
1513         * bindings/js/WorkerScriptController.cpp:
1514         (WebCore::WorkerScriptController::evaluate):
1515         * bindings/objc/WebScriptObject.mm:
1516         (-[WebScriptObject evaluateWebScript:]):
1517         * bridge/NP_jsobject.cpp:
1518         (_NPN_Evaluate):
1519         * bridge/jni/jni_jsobject.mm:
1520         (JavaJSObject::eval):
1521         * page/Console.cpp:
1522         (WebCore::retrieveLastCaller):
1523         (WebCore::Console::trace):
1524
1525 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
1526
1527         Reviewed by Darin Adler.
1528
1529         https://bugs.webkit.org/show_bug.cgi?id=21810
1530         Remove use of static C++ objects that are destroyed at exit time (destructors)
1531
1532         Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid 
1533         exit-time destructor. Update code that was changed to fix this issue that ran 
1534         into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference 
1535         in gcc build 5465). Also typdefs for template types needed to be added in some 
1536         cases so the type could make it through the macro successfully.
1537
1538         Basically code of the form:
1539         static T m;
1540         becomes:
1541         DEFINE_STATIC_LOCAL(T, m, ());
1542
1543         Also any code of the form:
1544         static T& m = *new T;
1545         also becomes:
1546         DEFINE_STATIC_LOCAL(T, m, ());
1547
1548         * ForwardingHeaders/wtf/StdLibExtras.h: Added.
1549         * bindings/js/GCController.cpp:
1550         (WebCore::gcController):
1551         * bindings/js/JSDOMBinding.cpp:
1552         (WebCore::wrapperSet):
1553         * bindings/js/JSInspectedObjectWrapper.cpp:
1554         (WebCore::wrappers):
1555         * bindings/js/JSInspectorCallbackWrapper.cpp:
1556         (WebCore::wrappers):
1557         * bindings/js/JSNavigatorCustom.cpp:
1558         (WebCore::needsYouTubeQuirk):
1559         * bridge/runtime_root.cpp:
1560         (JSC::Bindings::rootObjectSet):
1561         * css/CSSMutableStyleDeclaration.cpp:
1562         (WebCore::initShorthandMap):
1563         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1564         * css/CSSPrimitiveValue.cpp:
1565         (WebCore::CSSPrimitiveValue::cssText):
1566         * css/CSSSelector.cpp:
1567         (WebCore::CSSSelector::extractPseudoType):
1568         * css/CSSStyleSelector.cpp:
1569         (WebCore::screenEval):
1570         (WebCore::printEval):
1571         * dom/DOMImplementation.cpp:
1572         (WebCore::addString):
1573         (WebCore::isSVG10Feature):
1574         (WebCore::isSVG11Feature):
1575         (WebCore::DOMImplementation::isXMLMIMEType):
1576         * dom/Document.cpp:
1577         (WebCore::Document::hasPrefixNamespaceMismatch):
1578         * dom/ScriptElement.cpp:
1579         (WebCore::isSupportedJavaScriptLanguage):
1580         * editing/ApplyStyleCommand.cpp:
1581         (WebCore::styleSpanClassString):
1582         * editing/HTMLInterchange.cpp:
1583         (WebCore::):
1584         * editing/IndentOutdentCommand.cpp:
1585         (WebCore::indentBlockquoteString):
1586         * editing/ReplaceSelectionCommand.cpp:
1587         (WebCore::isInterchangeNewlineNode):
1588         (WebCore::isInterchangeConvertedSpaceSpan):
1589         * editing/htmlediting.cpp:
1590         (WebCore::stringWithRebalancedWhitespace):
1591         (WebCore::nonBreakingSpaceString):
1592         * editing/markup.cpp:
1593         (WebCore::appendAttributeValue):
1594         (WebCore::appendEscapedContent):
1595         (WebCore::shouldAddNamespaceAttr):
1596         (WebCore::appendNamespace):
1597         (WebCore::appendStartMarkup):
1598         (WebCore::createMarkup):
1599         * html/HTMLButtonElement.cpp:
1600         (WebCore::HTMLButtonElement::type):
1601         * html/HTMLElement.cpp:
1602         (WebCore::HTMLElement::isRecognizedTagName):
1603         (WebCore::inlineTagList):
1604         (WebCore::blockTagList):
1605         * html/HTMLFieldSetElement.cpp:
1606         (WebCore::HTMLFieldSetElement::type):
1607         * html/HTMLInputElement.cpp:
1608         (WebCore::HTMLInputElement::type):
1609         * html/HTMLKeygenElement.cpp:
1610         (WebCore::HTMLKeygenElement::type):
1611         * html/HTMLLegendElement.cpp:
1612         (WebCore::HTMLLegendElement::type):
1613         * html/HTMLOptGroupElement.cpp:
1614         (WebCore::HTMLOptGroupElement::type):
1615         * html/HTMLOptionElement.cpp:
1616         (WebCore::HTMLOptionElement::type):
1617         * html/HTMLParser.cpp:
1618         (WebCore::HTMLParser::getNode):
1619         (WebCore::HTMLParser::isHeaderTag):
1620         (WebCore::HTMLParser::isResidualStyleTag):
1621         (WebCore::HTMLParser::isAffectedByResidualStyle):
1622         * html/HTMLSelectElement.cpp:
1623         (WebCore::HTMLSelectElement::type):
1624         * html/HTMLTextAreaElement.cpp:
1625         (WebCore::HTMLTextAreaElement::type):
1626         * inspector/InspectorController.cpp:
1627         (WebCore::platform):
1628         * inspector/JavaScriptDebugServer.cpp:
1629         (WebCore::JavaScriptDebugServer::shared):
1630         * inspector/JavaScriptProfile.cpp:
1631         (WebCore::profileCache):
1632         * inspector/JavaScriptProfileNode.cpp:
1633         (WebCore::profileNodeCache):
1634         * loader/FrameLoader.cpp:
1635         (WebCore::localSchemes):
1636         * loader/appcache/ApplicationCacheStorage.cpp:
1637         (WebCore::cacheStorage):
1638         * loader/archive/ArchiveFactory.cpp:
1639         (WebCore::archiveMIMETypes):
1640         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
1641         * loader/icon/IconDatabase.cpp:
1642         (WebCore::IconDatabase::defaultDatabaseFilename):
1643         * page/EventHandler.cpp:
1644         (WebCore::EventHandler::dragState):
1645         * page/Frame.cpp:
1646         (WebCore::createRegExpForLabels):
1647         (WebCore::keepAliveSet):
1648         * page/Page.cpp:
1649         (WebCore::Page::groupName):
1650         * page/SecurityOrigin.cpp:
1651         (WebCore::isDefaultPortForProtocol):
1652         (WebCore::SecurityOrigin::databaseIdentifier):
1653         * page/mac/FrameMac.mm:
1654         (WebCore::regExpForLabels):
1655         * platform/KURL.cpp:
1656         (WebCore::blankURL):
1657         * platform/graphics/FontCache.cpp:
1658         (WebCore::alternateFamilyName):
1659         * platform/graphics/mac/FontCacheMac.mm:
1660         (WebCore::FontCache::getSimilarFontPlatformData):
1661         (WebCore::FontCache::getLastResortFallbackFont):
1662         * platform/mac/CursorMac.mm:
1663         (WebCore::leakNamedCursor):
1664         (WebCore::pointerCursor):
1665         (WebCore::crossCursor):
1666         (WebCore::handCursor):
1667         (WebCore::moveCursor):
1668         (WebCore::verticalTextCursor):
1669         (WebCore::cellCursor):
1670         (WebCore::contextMenuCursor):
1671         (WebCore::aliasCursor):
1672         (WebCore::zoomInCursor):
1673         (WebCore::zoomOutCursor):
1674         (WebCore::copyCursor):
1675         (WebCore::noneCursor):
1676         (WebCore::progressCursor):
1677         (WebCore::noDropCursor):
1678         (WebCore::notAllowedCursor):
1679         (WebCore::iBeamCursor):
1680         (WebCore::waitCursor):
1681         (WebCore::helpCursor):
1682         (WebCore::eastResizeCursor):
1683         (WebCore::northResizeCursor):
1684         (WebCore::northEastResizeCursor):
1685         (WebCore::northWestResizeCursor):
1686         (WebCore::southResizeCursor):
1687         (WebCore::southEastResizeCursor):
1688         (WebCore::southWestResizeCursor):
1689         (WebCore::westResizeCursor):
1690         (WebCore::northSouthResizeCursor):
1691         (WebCore::eastWestResizeCursor):
1692         (WebCore::northEastSouthWestResizeCursor):
1693         (WebCore::northWestSouthEastResizeCursor):
1694         (WebCore::columnResizeCursor):
1695         (WebCore::rowResizeCursor):
1696         (WebCore::grabCursor):
1697         (WebCore::grabbingCursor):
1698         * platform/mac/ScrollbarThemeMac.mm:
1699         (WebCore::ScrollbarTheme::nativeTheme):
1700         * platform/mac/ThemeMac.mm:
1701         (WebCore::platformTheme):
1702         * platform/mac/ThreadCheck.mm:
1703         (WebCoreReportThreadViolation):
1704         * platform/network/NetworkStateNotifier.cpp:
1705         (WebCore::networkStateNotifier):
1706         * platform/network/mac/FormDataStreamMac.mm:
1707         (WebCore::getStreamFormDataMap):
1708         (WebCore::getStreamResourceHandleMap):
1709         * platform/network/mac/ResourceResponseMac.mm:
1710         (WebCore::ResourceResponse::platformLazyInit):
1711         * platform/text/TextEncoding.cpp:
1712         (WebCore::TextEncoding::isJapanese):
1713         * plugins/PluginMainThreadScheduler.cpp:
1714         (WebCore::PluginMainThreadScheduler::scheduler):
1715         * rendering/RenderBlock.cpp:
1716         (WebCore::continuationOutlineTable):
1717         (WebCore::RenderBlock::addContinuationWithOutline):
1718         (WebCore::RenderBlock::paintContinuationOutlines):
1719         * rendering/RenderCounter.cpp:
1720         (WebCore::counterMaps):
1721         * rendering/RenderFlexibleBox.cpp:
1722         (WebCore::RenderFlexibleBox::layoutVerticalBox):
1723         * rendering/RenderListItem.cpp:
1724         (WebCore::RenderListItem::markerText):
1725         * rendering/RenderScrollbarTheme.cpp:
1726         (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
1727         * rendering/RenderThemeMac.mm:
1728         (WebCore::RenderThemeMac::systemFont):
1729         * rendering/bidi.cpp:
1730         (WebCore::RenderBlock::checkLinesForTextOverflow):
1731         * rendering/style/RenderStyle.cpp:
1732         (WebCore::RenderStyle::initialDashboardRegions):
1733         (WebCore::RenderStyle::noneDashboardRegions):
1734         * storage/Database.cpp:
1735         (WebCore::guidMutex):
1736         (WebCore::guidToVersionMap):
1737         (WebCore::guidToDatabaseMap):
1738         (WebCore::Database::databaseInfoTableName):
1739         (WebCore::databaseVersionKey):
1740         (WebCore::Database::getVersionFromDatabase):
1741         (WebCore::Database::setVersionInDatabase):
1742         (WebCore::guidForOriginAndName):
1743         * storage/DatabaseTracker.cpp:
1744         (WebCore::DatabaseTracker::tracker):
1745         (WebCore::notificationMutex):
1746         (WebCore::notificationQueue):
1747         * storage/LocalStorage.cpp:
1748         (WebCore::localStorageMap):
1749         * svg/SVGAnimateMotionElement.cpp:
1750         (WebCore::SVGAnimateMotionElement::rotateMode):
1751         * svg/SVGAnimationElement.cpp:
1752         (WebCore::SVGAnimationElement::calcMode):
1753         (WebCore::SVGAnimationElement::attributeType):
1754         (WebCore::SVGAnimationElement::isAdditive):
1755         (WebCore::SVGAnimationElement::isAccumulated):
1756         * svg/SVGLangSpace.cpp:
1757         (WebCore::SVGLangSpace::xmlspace):
1758         * svg/SVGSVGElement.cpp:
1759         (WebCore::SVGSVGElement::contentScriptType):
1760         (WebCore::SVGSVGElement::contentStyleType):
1761         * svg/SVGStyleElement.cpp:
1762         (WebCore::SVGStyleElement::type):
1763         (WebCore::SVGStyleElement::media):
1764         * svg/SVGTextContentElement.cpp:
1765         (WebCore::SVGTextContentElement::parseMappedAttribute):
1766         * svg/animation/SVGSMILElement.cpp:
1767         (WebCore::SVGSMILElement::parseClockValue):
1768         (WebCore::SVGSMILElement::restart):
1769         (WebCore::SVGSMILElement::fill):
1770         (WebCore::SVGSMILElement::repeatCount):
1771         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
1772         * svg/graphics/SVGResource.cpp:
1773         (WebCore::clientMap):
1774         (WebCore::SVGResource::removeClient):
1775         * svg/graphics/SVGResourceMarker.cpp:
1776         (WebCore::SVGResourceMarker::draw):
1777         * xml/XMLHttpRequest.cpp:
1778         (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
1779         (WebCore::preflightResultCache):
1780         (WebCore::appendPreflightResultCacheEntry):
1781         (WebCore::isSafeRequestHeader):
1782         (WebCore::isOnAccessControlResponseHeaderWhitelist):
1783         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
1784         * xml/XPathExpressionNode.cpp:
1785         (WebCore::XPath::Expression::evaluationContext):
1786         * xml/XPathParser.cpp:
1787         (WebCore::XPath::setUpAxisNamesMap):
1788         (WebCore::XPath::isAxisName):
1789         (WebCore::XPath::isNodeTypeName):
1790         * xml/XPathValue.cpp:
1791         (WebCore::XPath::Value::toNodeSet):
1792
1793 2008-11-14  Dan Bernstein  <mitz@apple.com>
1794
1795         - attempt to fix the Qt build
1796
1797         * platform/qt/Localizations.cpp:
1798         (WebCore::contextMenuItemTagTextDirectionMenu): Added. Maybe this string
1799         needs to go somewhere else in addition to here.
1800
1801 2008-11-14  Kevin Ollivier  <kevino@theolliviers.com>
1802
1803         wx build fix.
1804
1805         * platform/wx/LocalizedStringsWx.cpp:
1806         (WebCore::contextMenuItemTagTextDirectionMenu):
1807
1808 2008-11-14  Dan Bernstein  <mitz@apple.com>
1809
1810         Reviewed by Darin Adler.
1811
1812         - <rdar://problem/6234307> Support action methods for setting and clearing character-level directionality
1813         - WebCore part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
1814
1815         * WebCore.base.exp: Exported
1816         WebCore::Settings::setTextDirectionSubmenuInclusionBehavior().
1817
1818         * editing/ApplyStyleCommand.cpp:
1819         (StyleChange::init): Changed to always include the direction property
1820         in the result if the unicode-bidi property is included.
1821         (ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Added. Finds the
1822         highest ancestor of the given node that establishes bidi embedding. If
1823         that embedding agrees with the given allowed direction, finds the
1824         second-highest embedding ancestor. Splits all nodes through that
1825         ancestor. If the highest embedding ancestor did not need to be split,
1826         it is returned.
1827         (ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Added. Removes
1828         bidi embedding attributes and styles from all ancestors of the given
1829         node up to its enclosing block or the given node.
1830         (ApplyStyleCommand::applyInlineStyle): Added code to handle the
1831         unicode-bidi property. Applying style the includes this property
1832         involves removing all bidi embedding in effect, except  for one-level
1833         embedding that agrees with the desired embedding, then applying the
1834         desired embedding where it is not already in effect.
1835         (ApplyStyleCommand::applyInlineStyleToRange): Factored out from
1836         applyInlineStyle().
1837         (ApplyStyleCommand::removeHTMLBidiEmbeddingStyle): Added. Removed the
1838         "dir" attribute if necessary and the element if it becomes an unstyled
1839         style span.
1840         (ApplyStyleCommand::removeCSSStyle): Changed to remove the direction
1841         property when removing the unicode-bidi property.
1842         (ApplyStyleCommand::removeInlineStyle): Added a call to
1843         removeHTMLBidiEmbeddingStyle().
1844
1845         * editing/ApplyStyleCommand.h:
1846         * editing/Editor.cpp:
1847         (Editor::textDirectionForSelection): Added. Returns the character-level
1848         writing direction of the selection if it is uniform and simple (at most
1849         one level of embedding).
1850         (Editor::hasBidiSelection): Added. Returns true if the selection lies
1851         entirely within a single block, and that block has direction:rtl or
1852         contains any inline boxes with non-zero bidi embedding level.
1853
1854         * editing/Editor.h:
1855         * editing/EditorCommand.cpp:
1856         (stateTextWritingDirection): Added this helper function for deciding
1857         the state of Text Direction submenu items.
1858         (executeMakeTextWritingDirectionLeftToRight): Added. Applies
1859         "unicode-bidi: embed; direction: ltr;".
1860         (executeMakeTextWritingDirectionNatural): Added. Applies
1861         "unicode-bidi: normal;"
1862         (executeMakeTextWritingDirectionRightToLeft): Added. Applies
1863         "unicode-bidi: embed; direction: rtl;".
1864         (stateTextWritingDirectionLeftToRight): Added.
1865         (stateTextWritingDirectionNatural): Added.
1866         (stateTextWritingDirectionRightToLeft): Added.
1867         (createCommandMap): Added "MakeTextWritingDirectionLeftToRight",
1868         "MakeTextWritingDirectionNatural",
1869         and "MakeTextWritingDirectionRightToLeft".
1870
1871         * editing/InsertTextCommand.cpp:
1872         (InsertTextCommand::input): Added code to maintain the unicode-bidi
1873         and direction properties in the typing style. Even if they have the
1874         same values as the computed style at the caret, they need to be included
1875         in the typing style so that inserted text will not inherit any nested
1876         embedding.
1877
1878         * page/ContextMenuController.cpp:
1879         (ContextMenuController::contextMenuItemSelected): Added calls to
1880         the editor for the text direction menu items.
1881
1882         * page/Frame.cpp
1883         (Frame::computeAndSetTypingStyle): Added code to maintain the
1884         unicode-bidi and direction properties in the typing style.
1885
1886         * page/Settings.cpp:
1887         (Settings::setTextDirectionSubmenuInclusionBehavior): Added this setter.
1888
1889         * page/Settings.h: Added a TextDirectionSubmenuInclusionBehavior enum,
1890         an m_textDirectionSubmenuInclusionBehavior member, and accessors.
1891
1892         * page/mac/WebCoreViewFactory.h:
1893         * platform/ContextMenu.cpp:
1894         (WebCore::createAndAppendTextDirectionSubMenu): Added.
1895         (ContextMenu::populate): Added the Text Direction submenu item based on
1896         the inclusion behavior and the existence of a bidi selection.
1897         (ContextMenu::checkOrEnableIfNeeded): Added code for the text direction
1898         menu items.
1899
1900         * platform/ContextMenuItem.h:
1901         * platform/LocalizedStrings.h: Declared
1902         contextMenuItemTagTextDirectionMenu().
1903
1904         * platform/mac/LocalizedStringsMac.mm: Defined
1905         contextMenuItemTagTextDirectionMenu().
1906
1907         * rendering/RenderBlock.cpp:
1908         (RenderBlock::containsNonZeroBidiLevel): Added.
1909         * rendering/RenderBlock.h:
1910
1911 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
1912
1913         Reviewed by Darin Adler.
1914
1915         https://bugs.webkit.org/show_bug.cgi?id=22264
1916         Need to update to latest Geolocation spec (13 November 2008)
1917         
1918         Update to new error code constants and values.
1919
1920         * page/Geolocation.cpp: Use new named ErrorCode enums
1921         (WebCore::Geolocation::GeoNotifier::timerFired):
1922         (WebCore::Geolocation::getCurrentPosition):
1923         (WebCore::Geolocation::watchPosition):
1924         * page/PositionError.h: Have ErrorCode enum names match new error constant names and values
1925         (WebCore::PositionError::):
1926         * page/PositionError.idl: Add new named error constants
1927
1928 2008-11-14  Beth Dakin  <bdakin@apple.com>
1929
1930         Reviewed by Justin Garcia.
1931
1932         Fix (again) for <rdar://problem/5089327> Too much indentation when 
1933         pasting quoted paragraphs
1934
1935         This patch goes back to Justin's original approach to fix this bug, 
1936         written in revision 38273. That fix was mostly rolled out by 
1937         revision 38310 because of styling issues created by the addition of 
1938         extra blockquote nodes. This patch again goes back to Justin's 
1939         original fix because of cases we discovered the newer fix could not 
1940         possibly cover. This version of the patch minimizes the styling 
1941         issues of extra blockquotes by opting into the merge start code. 
1942
1943         * editing/ReplaceSelectionCommand.cpp:
1944         (WebCore::hasMatchingQuoteLevel): We want shouldMergeStart to 
1945         return true when the quoting level of the end of the inserted 
1946         content matches the quoting level of the end of the existing 
1947         content.
1948         (WebCore::ReplaceSelectionCommand::shouldMergeStart): Now calls 
1949         hasMatchingQuoteLevel
1950         (WebCore::ReplaceSelectionCommand::doApply):
1951
1952 2008-11-14  Dirk Schulze  <vbs85@gmx.de>
1953
1954         Reviewed by Eric Seidel.
1955
1956         Made SVGResourceClipper platform independent.
1957         https://bugs.webkit.org/show_bug.cgi?id=21444
1958
1959         * GNUmakefile.am:
1960         * WebCore.pro:
1961         * WebCore.vcproj/WebCore.vcproj:
1962         * WebCore.xcodeproj/project.pbxproj:
1963         * platform/graphics/GraphicsContext.h:
1964         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1965         (WebCore::GraphicsContext::clipPath):
1966         * platform/graphics/cg/GraphicsContextCG.cpp:
1967         (WebCore::GraphicsContext::clipPath):
1968         * platform/graphics/qt/GraphicsContextQt.cpp:
1969         (WebCore::GraphicsContext::addPath):
1970         (WebCore::GraphicsContext::clipPath):
1971         * svg/graphics/SVGResourceClipper.cpp:
1972         (WebCore::SVGResourceClipper::applyClip):
1973         * svg/graphics/cairo/SVGResourceClipperCairo.cpp: Removed.
1974         * svg/graphics/cg/SVGResourceClipperCg.cpp: Removed.
1975         * svg/graphics/qt/SVGResourceClipperQt.cpp: Removed.
1976
1977 2008-11-14  Antti Koivisto  <antti@apple.com>
1978
1979         Reviewed by Anders Carlsson.
1980
1981         Combine loadFrameRequestWithFormState to loadFrameRequestWithFormAndValues.
1982
1983         * loader/FrameLoader.cpp:
1984         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues):
1985         * loader/FrameLoader.h:
1986
1987 2008-11-14  Sam Weinig  <sam@webkit.org>
1988
1989         Reviewed by Eric Seidel.
1990
1991         Remove unneeded forward declaration.
1992
1993         * plugins/Plugin.h:
1994
1995 2008-11-14  Darin Fisher  <darin@chromium.org>
1996
1997         Reviewed by Darin Adler.
1998
1999         https://bugs.webkit.org/show_bug.cgi?id=22251
2000         HTMLCanvasElement.cpp unnecessarily includes runtime/Interpreter.h
2001
2002         * html/HTMLCanvasElement.cpp:
2003
2004 2008-11-14  Yael Aharon  <yael.aharon@nokia.com>
2005
2006         Reviewed by Simon Hausmann.
2007
2008         Add new files from the Qt port to the build.
2009
2010         * WebCore.pro:
2011
2012 2008-11-14  Yael Aharon  <yael.aharon@nokia.com>
2013
2014         Reviewed by Simon Hausmann.
2015
2016         Made DatabaseTracker::hasEntryForOrigin() public. This allows the Qt
2017         port to apply a default quota only if there is no entry in the
2018         database for a given origin yet.
2019
2020         * storage/DatabaseTracker.h:
2021
2022 2008-11-14  Yael Aharon  <yael.aharon@nokia.com>
2023
2024         Reviewed by Simon Hausmann.
2025
2026         Make it possible to get the cache directory set in the application
2027         cache storage.
2028
2029         * loader/appcache/ApplicationCacheStorage.cpp:
2030         (WebCore::ApplicationCacheStorage::cacheDirectory): Added.
2031         * loader/appcache/ApplicationCacheStorage.h:
2032
2033 2008-11-14  Justin Garcia  <justin.garcia@apple.com>
2034
2035         Reviewed by Beth Dakin.
2036
2037         <rdar://problem/4230923> "Make Plain Text" doesn't reset text alignment in single paragraph messages
2038         
2039         When applying block styles, we would add block properties to the body element, and Mail's
2040         Make Plain Text feature isn't equipped to remove those.  This could have been fixed on our side,
2041         but this change has the advantage that it fixes the bug on Tiger, where Mail does not plan future updates.
2042         
2043         We have code that puts the paragraphs that we're operating on into blocks of their own before
2044         adding or removing block properties from the blocks that enclose them.  We need to run this code 
2045         when the enclosing block is the body element.
2046         
2047         * editing/CompositeEditCommand.cpp:
2048         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Added, moved code from moveParagraphContents
2049         to here.
2050         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Renamed some variables for clarity.
2051         Added a few comments.  Fixed bug by not bailing out when the block about to be used is the body element.
2052         * editing/CompositeEditCommand.h:
2053
2054 2008-11-14  Cameron Zwarich  <zwarich@apple.com>
2055
2056         Reviewed by Darin Adler.
2057
2058         Bug 22245: Move wtf/dtoa.h into the WTF namespace
2059         <https://bugs.webkit.org/show_bug.cgi?id=22245>
2060
2061         Move wtf/dtoa.h into the WTF namespace from the JSC namespace.
2062
2063         * platform/text/String.cpp:
2064         (WebCore::charactersToDouble):
2065
2066 2008-11-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
2067
2068         Rubber-stamped by Simon Hausmann.
2069
2070         Make sure Qt scrollbars follow the style with regard to context menus
2071
2072         * platform/qt/ScrollbarQt.cpp:
2073         (WebCore::Scrollbar::contextMenu):
2074
2075 2008-11-14  Tor Arne Vestbø  <tavestbo@trolltech.com>
2076
2077         Rubber-stamped by Simon Hausmann.
2078
2079         Make scrollbar look active when the window is active on Qt/Mac
2080
2081         * platform/qt/ScrollbarThemeQt.cpp:
2082         (WebCore::styleOptionSlider):
2083         (WebCore::ScrollbarThemeQt::paint):
2084
2085 2008-11-13  Eric Seidel  <eric@webkit.org>
2086
2087         Reviewed by Adam Roben.
2088
2089         Add a basic Scons-based build system for building
2090         Chromium-Mac WebCore.
2091         https://bugs.webkit.org/show_bug.cgi?id=21991
2092
2093         The build currently fails due to missing files from our
2094         platform directory (platform skia and platform chromium)
2095         I will be sending those up shortly in separate patches.
2096         I expect it will be a while before our WebCore build links.
2097
2098         * SConstruct: Added.
2099         * WebCore.scons: Added.
2100
2101 2008-11-13  Darin Fisher  <darin@chromium.org>
2102
2103         Reviewed by Darin Adler.
2104
2105         https://bugs.webkit.org/show_bug.cgi?id=22248
2106         AtomicString.cpp uses JSC types outside of #if USE(JSC)
2107
2108         * platform/text/AtomicString.cpp:
2109         (WebCore::AtomicString::add):
2110         
2111 2008-11-13  Justin Garcia  <justin.garcia@apple.com>
2112
2113         Reviewed by Darin Adler.
2114         
2115         https://bugs.webkit.org/show_bug.cgi?id=18620
2116         Long hang under TextIterator::advance() when loading http://www.lsvd.de/
2117
2118         A huge section at the beginning of this document is invisible.  As we iterate through it,
2119         we create VisiblePositions unnecessarily.
2120
2121         * editing/TextIterator.cpp:
2122         (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Don't proceed to VisiblePosition 
2123         creation if m_node is unrendered or invisible.  The answers wouldn't have much meaning 
2124         and would be wasteful.  Also fixed some comments to reflect the fact that this function
2125         isn't specifically about emitting a newline.
2126
2127 2008-11-13  Pierre-Olivier Latour  <pol@apple.com>
2128
2129         Reviewed by Sam Weinig.
2130
2131         Remove unused or unnecessary code from AnimationBase class.
2132
2133         * page/animation/AnimationBase.cpp:
2134         (WebCore::AnimationBase::AnimationBase):
2135         (WebCore::AnimationBase::playStatePlaying):
2136         * page/animation/AnimationBase.h:
2137
2138 2008-11-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
2139
2140         Reviewed by Simon Hausmann.
2141
2142         Inital implementation of PluginPackage and PluginView for Mac NPAPI support in WebCore
2143
2144         Currently only used by QtWebKit. See also:
2145
2146         https://bugs.webkit.org/show_bug.cgi?id=21427
2147
2148         * WebCore.pro:
2149         * platform/qt/TemporaryLinkStubs.cpp:
2150         (PluginView::userAgentStatic):
2151         (PluginView::getValueStatic):
2152         * plugins/PluginView.cpp:
2153         (WebCore::PluginView::handleEvent):
2154         (WebCore::PluginView::setValue):
2155         (WebCore::PluginView::PluginView):
2156         * plugins/PluginView.h:
2157         (WebCore::PluginView::setPlatformPluginWidget):
2158         * plugins/mac/PluginPackageMac.cpp: Added.
2159         (WebCore::PluginPackage::determineQuirks):
2160         (WebCore::readPListFile):
2161         (WebCore::stringListFromResourceId):
2162         (WebCore::PluginPackage::fetchInfo):
2163         (WebCore::PluginPackage::load):
2164         (WebCore::PluginPackage::hash):
2165         (WebCore::PluginPackage::equal):
2166         (WebCore::PluginPackage::compareFileVersion):
2167         * plugins/mac/PluginViewMac.cpp: Added.
2168         (WebCore::nativeWindowFor):
2169         (WebCore::cgHandleFor):
2170         (WebCore::topLevelOffsetFor):
2171         (WebCore::PluginView::init):
2172         (WebCore::PluginView::~PluginView):
2173         (WebCore::PluginView::stop):
2174         (WebCore::PluginView::getValueStatic):
2175         (WebCore::PluginView::getValue):
2176         (WebCore::PluginView::setParent):
2177         (WebCore::PluginView::show):
2178         (WebCore::PluginView::hide):
2179         (WebCore::PluginView::setFocus):
2180         (WebCore::PluginView::setParentVisible):
2181         (WebCore::PluginView::setNPWindowRect):
2182         (WebCore::PluginView::setNPWindowIfNeeded):
2183         (WebCore::PluginView::updatePluginWidget):
2184         (WebCore::PluginView::paint):
2185         (WebCore::PluginView::invalidateRect):
2186         (WebCore::PluginView::invalidateRegion):
2187         (WebCore::PluginView::forceRedraw):
2188         (WebCore::PluginView::handleMouseEvent):
2189         (WebCore::PluginView::handleKeyboardEvent):
2190         (WebCore::PluginView::nullEventTimerFired):
2191         (WebCore::modifiersForEvent):
2192         (WebCore::PluginView::globalMousePosForPlugin):
2193         (WebCore::PluginView::dispatchNPEvent):
2194         (WebCore::PluginView::userAgent):
2195         (WebCore::PluginView::userAgentStatic):
2196         (WebCore::PluginView::handlePostReadFile):
2197
2198 2008-11-12  Alexey Proskuryakov  <ap@webkit.org>
2199
2200         Reviewed by Darin Adler.
2201
2202         https://bugs.webkit.org/show_bug.cgi?id=22200
2203         Crash when close event is dispatched to MessagePort due to document destruction
2204
2205         Test: fast/events/message-port-onclose.html
2206
2207         * dom/MessagePort.cpp: (WebCore::MessagePort::contextDestroyed):
2208         Don't dispatch close event, even though HTML5 currently says that we should. It is not
2209         right for GC to have observable effects.
2210
2211 2008-11-12  Alexey Proskuryakov  <ap@webkit.org>
2212
2213         Reviewed by Darin Adler.
2214
2215         https://bugs.webkit.org/show_bug.cgi?id=22203
2216         Implement Worker messaging
2217
2218         No test cases included, because this functionality is disabled by default.
2219
2220         The implementation is known to still have many race condition, but works quite well for
2221         testing.
2222
2223         * WebCore.xcodeproj/project.pbxproj: Added WorkerTask.{h,cpp}.
2224
2225         * bindings/js/JSDOMBinding.cpp:
2226         (WebCore::markActiveObjectsForContext): Re-worded comments a little.
2227         (WebCore::markCrossHeapDependentObjectsForContext): Existing cross-heap GC protocol was
2228         incorrect, changed it to a much simpler (but still incorrect) version.
2229
2230         * dom/WorkerTask.cpp: Added.
2231         (WebCore::WorkerTask::~WorkerTask):
2232         * dom/WorkerTask.h: Added.
2233         Tasks posted to workers implement this new interface.
2234
2235         * bindings/js/JSDedicatedWorkerCustom.cpp:
2236         (WebCore::JSDedicatedWorker::mark):
2237         (WebCore::JSDedicatedWorker::connect):
2238         * dom/DedicatedWorker.h:
2239         * dom/DedicatedWorker.idl:
2240         Auto-generate event listener attributes. Renamed startConversation() to connect(), tracking
2241         WHATWG discussions.
2242
2243         * dom/DedicatedWorker.cpp:
2244         (WebCore::WorkerConnectTask::WorkerConnectTask): A task that performs worker-side connect()
2245         operations.
2246         (WebCore::DedicatedWorker::DedicatedWorker): Initialize WorkerThread pointer.
2247         (WebCore::DedicatedWorker::connect): Connect() creates a pair of entangled ports, and posts
2248         one to worker. Since message port registration in ScriptExecutionContext is not thread safe,
2249         this port starts with a null context pointer.
2250         (WebCore::DedicatedWorker::notifyFinished): Since Worker methods should work immediately
2251         after creation, we have to queue tasks until after a WorkerThread object is created. Then we
2252         forward all queued tasks to its queue.
2253
2254         * dom/EventTarget.cpp: (WebCore::EventTarget::toWorkerContext):
2255         * dom/EventTarget.h:
2256         * bindings/js/JSEventTarget.cpp: (WebCore::toJS):
2257         Added cases for WorkerContext, which is now an EventTarget, too.
2258
2259         * bindings/js/JSWorkerContext.h: Added JSWorkerContext::put() to make onconnect settable.
2260         * bindings/js/JSWorkerContext.cpp:
2261         (WebCore::JSWorkerContext::mark): Mark event listeners.
2262         (WebCore::JSWorkerContext::createPrototype): Fixed a typo, use the right StructureID.
2263         (WebCore::JSWorkerContext::put): Implemented.
2264         (WebCore::jsWorkerContextPrototypeFunctionAddEventListener): Added an EventTarget implementation.
2265         (WebCore::jsWorkerContextPrototypeFunctionRemoveEventListener): Ditto.
2266         (WebCore::jsWorkerContextPrototypeFunctionDispatchEvent): Ditto.
2267         (WebCore::jsWorkerContextOnconnect): Added.
2268         (WebCore::setJSWorkerContextOnconnect): Added.
2269
2270         * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
2271         Made it actually work by adding necessary setup.
2272
2273         * bindings/js/WorkerScriptController.h: (WebCore::WorkerScriptController::initScriptIfNeeded):
2274         Check the right variable - it is the wrapper that may not be initialized yet.
2275
2276         * dom/ActiveDOMObject.cpp:
2277         (WebCore::ActiveDOMObject::ActiveDOMObject):
2278         (WebCore::ActiveDOMObject::~ActiveDOMObject):
2279         Assert being called from the correct thread, as active DOM object tracking is not thread safe.
2280
2281         * dom/ScriptExecutionContext.h: Added a Task interface and a postTask() method, to be used
2282         for asynchronously executing tasks in context's thread.
2283
2284         * dom/ScriptExecutionContext.cpp:
2285         (WebCore::ProcessMessagesSoonTask): Changed from a Timer to a Task
2286         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Removed m_firedMessagePortTimer.
2287         It was an optimization that couldn't be easily preserved without introducing race conditions
2288         in multithreading case.
2289         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon): Use postTask().
2290         (WebCore::ScriptExecutionContext::dispatchMessagePortEvents): Added a comment explaining
2291         why it's OK to not ref() ports in a frozen copy.
2292         (WebCore::ScriptExecutionContext::createdMessagePort): Assert that we're not being called
2293         from a wrong thread.
2294         (WebCore::ScriptExecutionContext::destroyedMessagePort): Ditto.
2295         (WebCore::ScriptExecutionContextTaskTimer): Part of
2296         ScriptExecutionContext::Task implementation - use Timer if posting from main thread to main
2297         thread.
2298         (WebCore::ScriptExecutionContextTaskWorkerTask): Another part - use WorkerTask if posting
2299         to a worker.
2300         (WebCore::PerformTaskContext::PerformTaskContext): Finally, use callOnMainThread() if posting
2301         to main thread from a secondary one.
2302         (WebCore::performTask): A helper function for callOnMainThread().
2303         (WebCore::ScriptExecutionContext::postTask): Use one of the above implementations.
2304
2305         * dom/MessagePort.h: Fixed message queue to keep EventData pointers - otherwise, we would
2306         ref/deref EventData::message from different threads, which is not allowed.
2307
2308         * dom/MessagePort.cpp:
2309         (WebCore::MessagePortCloseEventTask): Use a task instead of a timer to work across threads.
2310         (WebCore::MessagePort::EventData::create): Updated for EventData being refcountable now.
2311         (WebCore::MessagePort::EventData::EventData): Ditto.
2312         (WebCore::MessagePort::MessagePort): ScriptExecutionContext is now allowed to be null at
2313         first, because we need to create ports for posting to other threads, and it is not possible
2314         to register in a context from another thread.
2315         (WebCore::MessagePort::clone): Always create ports with null contexts - it is now message
2316         receiver's job to set the context.
2317         (WebCore::MessagePort::postMessage): Enable posting to ports that are not attached to any
2318         context yet.
2319         (WebCore::MessagePort::startConversation): Ditto. Data port is always posted unattached.
2320         (WebCore::MessagePort::contextDestroyed): Assert that we had a context.
2321         (WebCore::MessagePort::attachToContext): Called when receiving a data port to register in
2322         context.
2323         (WebCore::MessagePort::scriptExecutionContext): Moved from header, as the function is virtual.
2324         (WebCore::MessagePort::dispatchMessages): Attach data port to receiving context. Use postTask().
2325         (WebCore::MessagePort::queueCloseEvent): Use postTask().
2326         (WebCore::MessagePort::hasPendingActivity): Reworded comment a little. As mentioned above,
2327         MessagePort cross-heap GC is still quite wrong.
2328
2329         * dom/WorkerContext.h: Made WorkerContext an event target, added onconnect attribute.
2330         * dom/WorkerContext.cpp: Keep a pointer to WorkerThread. It is only used for debug assertions
2331         now, but there is no harm in tracking it in release builds, too.
2332
2333         * dom/WorkerThread.cpp:
2334         (WebCore::WorkerThread::create): WorkerThread is refcountable, construct with create().
2335         (WebCore::WorkerThread::workerThread): Implemented a message loop.
2336         * dom/WorkerThread.h:
2337         (WebCore::WorkerThread::threadID): Also only used for assertions.
2338         (WebCore::WorkerThread::messageQueue): Return a reference to queue, so clients can post to it.
2339
2340         * page/DOMWindow.cpp:
2341         (WebCore::DOMWindow::postMessage): MessagePort::clone() no longer takes a context, as it
2342         always sets it to null.
2343         (WebCore::DOMWindow::postMessageTimerFired): Attach data port to receiving context.
2344
2345 2008-11-12  Dirk Schulze  <vbs85@gmx.de>
2346
2347         Reviewed Darin Adler.
2348
2349         use strokeColor.alpha() instead of fillColor.alpha()
2350         on GraphicsContext::strokePath()
2351
2352         [Canvas] Transparent fillStyle stops line rendering
2353         https://bugs.webkit.org/show_bug.cgi?id=21888
2354
2355         Test: fast/canvas/canvas-stroke-empty-fill.html
2356
2357         * ChangeLog:
2358         * platform/graphics/cg/GraphicsContextCG.cpp:
2359         (WebCore::GraphicsContext::strokePath):
2360
2361 2008-11-12  Stephanie  <slewis@apple.com>
2362
2363         Reviewed by Mark Rowe.
2364
2365         Fix context leak in XSLStyleSheets.
2366         See bug https://bugs.webkit.org/show_bug.cgi?id=15715
2367
2368         * xml/XSLStyleSheet.cpp:
2369         (WebCore::XSLStyleSheet::parseString):
2370
2371 2008-11-12  Alp Toker  <alp@nuanti.com>
2372
2373         autotools: List web worker-related headers needed for a successful
2374         build. distcheck is passing again with this change.
2375
2376         * GNUmakefile.am:
2377
2378 2008-11-12  Alp Toker  <alp@nuanti.com>
2379
2380         autotools build system fix-up only. Add FloatQuad.h to the source
2381         lists and sort them.
2382
2383         * GNUmakefile.am:
2384
2385 2008-11-12  Alp Toker  <alp@nuanti.com>
2386
2387         Build fixes for r38346. FloatQuad.cpp is missing:
2388
2389         1) #include "config.h"
2390         2) #include <algorithm> for various mathematical definitions it uses.
2391
2392         * platform/graphics/FloatQuad.cpp:
2393
2394 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
2395
2396         Reviewed by Dan Bernstein
2397
2398         https://bugs.webkit.org/show_bug.cgi?id=22212
2399
2400         Rename absoluteOutlineBox() to absoluteOutlineBounds(), to indicate that
2401         it may be the bounding outline box of a transformed element, and fix it
2402         to respect transforms by mapping the outline box to an absolute quad and
2403         taking the enclosing rect.
2404         
2405         RenderBox::localToAbsoluteQuad() can no longer assert that there is no
2406         LayoutState, but LayoutState cannot be used during quad mapping (it knows
2407         nothing about transforms).
2408         
2409         Finally, fix a bug in RenderBox::localToAbsoluteQuad() which was getting
2410         borderTopExtra() from the object, rather than its container (as localToAbsolute()
2411         does).
2412         
2413         Test: fast/repaint/transform-absolute-child.html
2414
2415         * rendering/RenderBlock.cpp:
2416         (WebCore::RenderBlock::layoutBlock):
2417         * rendering/RenderBox.cpp:
2418         (WebCore::RenderBox::localToAbsoluteQuad):
2419         * rendering/RenderFlexibleBox.cpp:
2420         (WebCore::RenderFlexibleBox::layoutBlock):
2421         * rendering/RenderForeignObject.cpp:
2422         (WebCore::RenderForeignObject::layout):
2423         * rendering/RenderLayer.cpp:
2424         (WebCore::RenderLayer::updateLayerPositions):
2425         (WebCore::RenderLayer::setHasVisibleContent):
2426         * rendering/RenderObject.cpp:
2427         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2428         (WebCore::RenderObject::absoluteOutlineBounds):
2429         * rendering/RenderObject.h:
2430         * rendering/RenderPath.cpp:
2431         (WebCore::RenderPath::layout):
2432         * rendering/RenderReplaced.cpp:
2433         (WebCore::RenderReplaced::layout):
2434         * rendering/RenderSVGContainer.cpp:
2435         (WebCore::RenderSVGContainer::layout):
2436         * rendering/RenderSVGImage.cpp:
2437         (WebCore::RenderSVGImage::layout):
2438         * rendering/RenderSVGRoot.cpp:
2439         (WebCore::RenderSVGRoot::layout):
2440         * rendering/RenderSVGText.cpp:
2441         (WebCore::RenderSVGText::layout):
2442         * rendering/RenderSVGViewportContainer.cpp:
2443         (WebCore::RenderSVGViewportContainer::layout):
2444         * rendering/RenderTable.cpp:
2445         (WebCore::RenderTable::layout):
2446
2447 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
2448
2449         Reviewed by Dave Hyatt
2450
2451         https://bugs.webkit.org/show_bug.cgi?id=21942
2452         https://bugs.webkit.org/show_bug.cgi?id=18557
2453         
2454         Add methods which can be used to map renderer-local rectangles
2455         to quads in absolute coordinates, taking transforms into account:
2456             localToAbsoluteQuad() converts a local rect into an absolute quad.
2457             collectAbsoluteLineBoxQuads() is an analogue of addLineBoxRects()
2458                 that works with quads.
2459             absoluteQuads() is an analogue of absoluteRects(), for quads.
2460         
2461         Use the quad methods to fix the inspector highlight for transformed
2462         elements.
2463
2464         * GNUmakefile.am:
2465         * WebCore.pro:
2466         * WebCore.vcproj/WebCore.vcproj:
2467         * WebCore.xcodeproj/project.pbxproj:
2468         * WebCoreSources.bkl:
2469         * inspector/InspectorController.cpp:
2470         (WebCore::drawOutlinedQuad):
2471         (WebCore::drawHighlightForBoxes):
2472         (WebCore::frameToMainFrameOffset):
2473         (WebCore::InspectorController::drawNodeHighlight):
2474         * platform/graphics/AffineTransform.cpp:
2475         (WebCore::AffineTransform::mapQuad):
2476         * platform/graphics/AffineTransform.h:
2477         * platform/graphics/FloatQuad.cpp: Added.
2478         (WebCore::min4):
2479         (WebCore::max4):
2480         (WebCore::FloatQuad::boundingBox):
2481         * platform/graphics/FloatQuad.h: Added.
2482         (WebCore::FloatQuad::FloatQuad):
2483         (WebCore::FloatQuad::p1):
2484         (WebCore::FloatQuad::p2):
2485         (WebCore::FloatQuad::p3):
2486         (WebCore::FloatQuad::p4):
2487         (WebCore::FloatQuad::setP1):
2488         (WebCore::FloatQuad::setP2):
2489         (WebCore::FloatQuad::setP3):
2490         (WebCore::FloatQuad::setP4):
2491         (WebCore::FloatQuad::isEmpty):
2492         (WebCore::FloatQuad::enclosingBoundingBox):
2493         (WebCore::FloatQuad::move):
2494         (WebCore::operator+=):
2495         (WebCore::operator-=):
2496         (WebCore::operator==):
2497         (WebCore::operator!=):
2498         * rendering/RenderBox.cpp:
2499         (WebCore::RenderBox::localToAbsoluteQuad):
2500         * rendering/RenderBox.h:
2501         * rendering/RenderContainer.cpp:
2502         (WebCore::RenderContainer::collectAbsoluteLineBoxQuads):
2503         * rendering/RenderContainer.h:
2504         * rendering/RenderInline.cpp:
2505         (WebCore::RenderInline::absoluteQuads):
2506         * rendering/RenderInline.h:
2507         * rendering/RenderObject.cpp:
2508         (WebCore::RenderObject::absoluteBoundingBoxRect):
2509         (WebCore::RenderObject::collectAbsoluteLineBoxQuads):
2510         (WebCore::RenderObject::absoluteQuads):
2511         (WebCore::RenderObject::localToAbsoluteQuad):
2512         (WebCore::RenderObject::absoluteContentQuad):
2513         * rendering/RenderObject.h:
2514         * rendering/RenderPath.cpp:
2515         (WebCore::RenderPath::absoluteQuads):
2516         * rendering/RenderPath.h:
2517         * rendering/RenderSVGContainer.cpp:
2518         (WebCore::RenderSVGContainer::absoluteQuads):
2519         * rendering/RenderSVGContainer.h:
2520         * rendering/RenderSVGHiddenContainer.cpp:
2521         (WebCore::RenderSVGHiddenContainer::absoluteQuads):
2522         * rendering/RenderSVGHiddenContainer.h:
2523         * rendering/RenderSVGImage.cpp:
2524         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
2525         (WebCore::RenderSVGImage::absoluteQuads):
2526         * rendering/RenderSVGImage.h:
2527         * rendering/RenderSVGInlineText.cpp:
2528         (WebCore::RenderSVGInlineText::absoluteQuads):
2529         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
2530         * rendering/RenderSVGInlineText.h:
2531         * rendering/RenderSVGRoot.cpp:
2532         (WebCore::RenderSVGRoot::absoluteQuads):
2533         * rendering/RenderSVGRoot.h:
2534         * rendering/RenderSVGTSpan.cpp:
2535         (WebCore::RenderSVGTSpan::absoluteRects):
2536         (WebCore::RenderSVGTSpan::absoluteQuads):
2537         * rendering/RenderSVGTSpan.h:
2538         * rendering/RenderSVGText.cpp:
2539         (WebCore::RenderSVGText::absoluteRects):
2540         (WebCore::RenderSVGText::absoluteQuads):
2541         * rendering/RenderSVGText.h:
2542         * rendering/RenderSVGTextPath.cpp:
2543         (WebCore::RenderSVGTextPath::absoluteRects):
2544         (WebCore::RenderSVGTextPath::absoluteQuads):
2545         * rendering/RenderSVGTextPath.h:
2546         * rendering/RenderTableCell.cpp:
2547         (WebCore::RenderTableCell::localToAbsolute):
2548         (WebCore::RenderTableCell::localToAbsoluteQuad):
2549         * rendering/RenderTableCell.h:
2550         * rendering/RenderText.cpp:
2551         (WebCore::RenderText::absoluteQuads):
2552         (WebCore::RenderText::collectAbsoluteLineBoxQuads):
2553         * rendering/RenderText.h:
2554         * rendering/RenderView.cpp:
2555         (WebCore::RenderView::localToAbsoluteQuad):
2556         (WebCore::RenderView::absoluteQuads):
2557         * rendering/RenderView.h:
2558
2559 2008-11-12  Brent Fulgham <bfulgham@gmail.com>
2560
2561         Fix Bug 22178: Build errors in WebKit Cairo port
2562
2563         <https://bugs.webkit.org/show_bug.cgi?id=22178>
2564
2565         Reviewed by Mark Rowe.
2566
2567         * platform/graphics/cairo/PatternCairo.cpp: Correct build error under
2568         Visual Studio.
2569         (WebCore::Pattern::createPlatformPattern):
2570
2571 2008-11-12  Adam Roben  <aroben@apple.com>
2572
2573         Fix a typo in the include path for the Release_Cairo configuration
2574
2575         * WebCore.vcproj/WebCore.vcproj: Fixed "caro" -> "cairo" typo.
2576
2577 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
2578
2579         Reviewed by Dave Hyatt
2580
2581         https://bugs.webkit.org/show_bug.cgi?id=17840
2582         Patch 2
2583         
2584         Code cleanup in RenderBox::computeAbsoluteRepaintRect().
2585
2586         * rendering/RenderBox.cpp:
2587         (WebCore::RenderBox::computeAbsoluteRepaintRect):
2588
2589 2008-11-12  Simon Fraser  <simon.fraser@apple.com>
2590
2591         Reviewed by Dave Hyatt
2592
2593         https://bugs.webkit.org/show_bug.cgi?id=17840
2594
2595         Fix repainting when the transform on a positioned element changes.
2596         In computeAbsoluteRepaintRect(), add the offsets due to relative positioning,
2597         and being in a positioned container after applying the transform to the local
2598         rect.
2599
2600         Tests: fast/repaint/transform-absolute-in-positioned-container.html
2601                fast/repaint/transform-relative-position.html
2602
2603         * rendering/RenderBox.cpp:
2604         (WebCore::RenderBox::computeAbsoluteRepaintRect):
2605
2606 2008-11-12  Justin Garcia  <justin.garcia@apple.com>
2607  
2608         Reviewed by Beth Dakin.
2609  
2610         <rdar://problem/5495723> Selecting and deleting quoted text quotes other text
2611         <rdar://problem/4775313> Deleting lines from the bottom of a messages leaves the last blank line quoted
2612         
2613         We don't want to merge into a block if it will mean changing the quote level of content after deleting 
2614         selections that contain a whole number paragraphs plus a line break, since it is unclear to most users 
2615         that such a selection actually ends at the start of the next paragraph.  Instead we want to completely
2616         remove the selected paragraph(s) and all evidence of the first one's quote level.  This matches TextEdit behavior 
2617         for indented paragraphs.
2618  
2619         * editing/DeleteSelectionCommand.cpp:
2620         (WebCore::DeleteSelectionCommand::initializePositionData): For the selections described above, do not
2621         try to merge after the deletion.  Instead try and prune the start block or blocks if they've been emptied
2622         so that we remove evidence of the deleted paragraphs' quote level.
2623         (WebCore::DeleteSelectionCommand::mergeParagraphs): Try and prune the start block(s) if necessary.  Also 
2624         make sure that the caret is placed correctly so that it ends up on the same line that the deleted selection 
2625         started on, instead of one higher.
2626         * editing/DeleteSelectionCommand.h:
2627         * editing/htmlediting.cpp:
2628         (WebCore::numEnclosingMailBlockquotes): Added.
2629         * editing/htmlediting.h:
2630
2631 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
2632
2633         Reviewed by Simon Hausmann.
2634
2635         Move _web_encodingForResource from WebKit into WebCore and change return type
2636
2637         This change is needed to implement NSAPI in WebCore for Mac, see:
2638
2639         https://bugs.webkit.org/show_bug.cgi?id=21427
2640
2641         * WebCore.base.exp:
2642         * platform/mac/WebCoreNSStringExtras.h:
2643         * platform/mac/WebCoreNSStringExtras.mm:
2644         (stringEncodingForResource):
2645
2646 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
2647
2648         Reviewed by Simon Hausmann.
2649
2650         Moved the implementation of _webkit_isCaseInsensitiveEqualToString to
2651         WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString.
2652
2653         This change is needed to implement NSAPI in WebCore for Mac, see:
2654
2655         https://bugs.webkit.org/show_bug.cgi?id=21427
2656
2657         * WebCore.base.exp:
2658         * platform/mac/WebCoreNSStringExtras.h:
2659         * platform/mac/WebCoreNSStringExtras.mm:
2660         (stringIsCaseInsensitiveEqualToString):
2661
2662 2008-11-11  Stephanie  <slewis@apple.com>
2663
2664         Reviewed by Dan Bernstein.
2665
2666         Null check image data before setting it as image source.
2667
2668         Test: fast/images/image-empty-data.html
2669
2670         * platform/graphics/BitmapImage.cpp:
2671         (WebCore::BitmapImage::destroyDecodedData):
2672
2673 2008-11-11  Adele Peterson  <adele@apple.com>
2674
2675         Reviewed by Tim Hatcher.
2676
2677         Remove ifdef so future OS versions can use the new delegate method.
2678
2679         * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didSendBodyDataDelegateExists):
2680
2681 2008-11-11  Eric Seidel  <eric@webkit.org>
2682
2683         Reviewed by Antti Koivisto and Sam Weinig.
2684
2685         Clean up HTMLTokenizer a litle
2686         https://bugs.webkit.org/show_bug.cgi?id=22188
2687
2688         Rename pendingScripts to m_pendingScripts
2689         Rename scriptNode to m_scriptNode make the type specific
2690         Rename pendingSrc to m_pendingSrc
2691         Rename currentPrependingSrc to m_currentPrependingSrc
2692         Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer
2693         Remove long-since-dead kdDebug and qDebug calls
2694         Rename brokenComments to m_brokenComments
2695         Remove HTMLTokenizer includes and document the rest
2696         Rename src to m_src
2697         Rename parser to m_parser and make it an OwnPtr
2698         Rename inWrite to m_inWrite and jsProxy to scriptController
2699         Rename brokenServer to m_brokenServer
2700         Rename buffer to m_buffer and dest to m_dest
2701         Rename size to m_bufferSize
2702         Rename attrName to m_attrName
2703         Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen
2704         Rename scriptCode* to m_scriptCode* and change scriptCodeMax to m_scriptCodeCapacity
2705         Rename scriptStartLineno to m_currentScriptTagStartLineNumber and tagStartLineno to m_currentTagStartLineNumber
2706         Rename scriptSrc to m_scriptTagSrcAttrValue and scriptSrcCharset to m_scriptTagCharsetAttrValue -- a bit unwieldy, but more precise
2707         Rename flat to selfClosingTag
2708         Rename currToken to m_currentToken
2709
2710         * css/CSSParser.cpp:
2711         * dom/XMLTokenizer.cpp:
2712         * dom/XMLTokenizerLibxml2.cpp:
2713         * html/HTMLDocument.cpp:
2714         * html/HTMLElement.cpp:
2715         * html/HTMLFormControlElement.cpp:
2716         * html/HTMLParser.h:
2717         * html/HTMLTokenizer.cpp:
2718         (WebCore::Token::addAttribute):
2719         (WebCore::HTMLTokenizer::HTMLTokenizer):
2720         (WebCore::HTMLTokenizer::reset):
2721         (WebCore::HTMLTokenizer::begin):
2722         (WebCore::HTMLTokenizer::processListing):
2723         (WebCore::HTMLTokenizer::parseSpecial):
2724         (WebCore::HTMLTokenizer::scriptHandler):
2725         (WebCore::HTMLTokenizer::scriptExecution):
2726         (WebCore::HTMLTokenizer::parseComment):
2727         (WebCore::HTMLTokenizer::parseServer):
2728         (WebCore::HTMLTokenizer::parseProcessingInstruction):
2729         (WebCore::HTMLTokenizer::parseText):
2730         (WebCore::HTMLTokenizer::parseEntity):
2731         (WebCore::HTMLTokenizer::parseTag):
2732         (WebCore::HTMLTokenizer::write):
2733         (WebCore::HTMLTokenizer::processingData):
2734         (WebCore::HTMLTokenizer::end):
2735         (WebCore::HTMLTokenizer::finish):
2736         (WebCore::HTMLTokenizer::processToken):
2737         (WebCore::HTMLTokenizer::processDoctypeToken):
2738         (WebCore::HTMLTokenizer::~HTMLTokenizer):
2739         (WebCore::HTMLTokenizer::enlargeBuffer):
2740         (WebCore::HTMLTokenizer::enlargeScriptBuffer):
2741         (WebCore::HTMLTokenizer::notifyFinished):
2742         (WebCore::HTMLTokenizer::setSrc):
2743         * html/HTMLTokenizer.h:
2744         (WebCore::Token::Token):
2745         (WebCore::Token::reset):
2746         (WebCore::HTMLTokenizer::processingContentWrittenByScript):
2747         (WebCore::HTMLTokenizer::htmlParser):
2748         (WebCore::HTMLTokenizer::checkBuffer):
2749         (WebCore::HTMLTokenizer::checkScriptBuffer):
2750         * html/HTMLViewSourceDocument.h:
2751         * rendering/RenderBlock.cpp:
2752         (WebCore::RenderBlock::leftRelOffset):
2753         (WebCore::RenderBlock::rightRelOffset):
2754         (WebCore::RenderBlock::lineWidth):
2755         * xml/XSLTProcessor.cpp:
2756
2757 2008-11-11  Sam Weinig  <sam@webkit.org>
2758
2759         Reviewed by Dan Bernstein.
2760
2761         Fix for https://bugs.webkit.org/show_bug.cgi?id=22189
2762         Track CachedScript decoded data
2763
2764         We now track the decoded size of CachedScripts in the Cache allowing
2765         them to accounted for when deciding when to evict data.  The decoded
2766         data itself can be evicted when Cache pressure gets high enough through
2767         CachedScript::destroyDecodedData.
2768
2769         * loader/CachedResource.h:
2770         (WebCore::CachedResource::allClientsRemoved):
2771         (WebCore::CachedResource::destroyDecodedData):
2772         * loader/CachedScript.cpp:
2773         (WebCore::CachedScript::script):
2774         (WebCore::CachedScript::data):
2775         (WebCore::CachedScript::destroyDecodedData):
2776         * loader/CachedScript.h:
2777
2778 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
2779
2780         Reviewed by Geoff Garen.
2781
2782         Remove pointless dependencies on the now-deleted kjs directory and
2783         mentions of it in comments that are no longer relevant.
2784
2785         * WebCore.pro:
2786         * webcore-base.bkl:
2787
2788 2008-11-11  Dan Bernstein  <mitz@apple.com>
2789
2790         Reviewed by Adam Roben.
2791
2792         WebCore part of adding a master volume control for media elements in a WebView
2793
2794         * WebCore.base.exp: Exported WebCore::Page::setMediaVolume().
2795         * dom/Document.cpp:
2796         (WebCore::Document::mediaVolumeDidChange): Added. Called by the Page
2797         when the media volume is changed.
2798         (WebCore::Document::registerForMediaVolumeCallbacks): Added. Allows
2799         elements to register for a callback when the media volume is changed.
2800         (WebCore::Document::unregisterForMediaVolumeCallbacks): Added. Allows
2801         elements to unregister for the callback.
2802         * dom/Document.h:
2803         * dom/Element.h:
2804         (WebCore::Element::mediaVolumeDidChange): Added an empty implementation.
2805         * html/HTMLMediaElement.cpp:
2806         (WebCore::HTMLMediaElement::HTMLMediaElement): Added a call to
2807         registerForMediaVolumeCallbacks().
2808         (WebCore::HTMLMediaElement::~HTMLMediaElement): Added a call to
2809         unregisterForMediaVolumeCallbacks().
2810         (WebCore::HTMLMediaElement::updateVolume): Changed to multiply the
2811         element's intrinsic volume by the master volume from the page.
2812         (WebCore::HTMLMediaElement::mediaVolumeDidChange): Added. Calls
2813         updateVolume().
2814         * html/HTMLMediaElement.h:
2815         * page/Page.cpp:
2816         (WebCore::Page::Page): Initialize m_mediaVolume to 1.
2817         (WebCore::Page::setMediaVolume): Added. Calls mediaVolumeDidChange() on
2818         every document in the page when the master volume changes.
2819         * page/Page.h:
2820         (WebCore::Page::mediaVolume): Added this getter.
2821
2822 2008-11-11  David Hyatt  <hyatt@apple.com>
2823
2824         https://bugs.webkit.org/show_bug.cgi?id=22182
2825
2826         Fix problems with scrollbars when the OS setting for clicks in the track jumping the thumb to that location
2827         is turned on.  Make sure to only jump the thumb if the click happens in the track.  Also fix some math
2828         errors when jumping the thumb that cause dragging after the jump to incorrectly jump the thumb again.
2829
2830         Reviewed by Adele
2831
2832         * platform/Scrollbar.cpp:
2833         (WebCore::Scrollbar::mouseDown):
2834
2835 2008-11-11  Beth Dakin  <bdakin@apple.com>
2836
2837         Reviewed by Darin Adler.
2838
2839         Fix for <rdar://problem/5089327> Too much indentation when pasting 
2840         quoted paragraphs
2841
2842         This patch re-addresses pasting blockquotes into blockquotes. It 
2843         backs out most of revision 38273. 38273 fixed the bug by inserting 
2844         the pasted content as a sibling blockquote node to the pre-existing 
2845         blockquote node. The problem with that is that by default, 
2846         blockquotes have a giant margin, so visually, this can be weird. 
2847         This patch instead inserts the pasted content as siblings of the 
2848         the content already inside the outer blockquote, and then removes 
2849         the blockquote node from the pasted content itself, so that it 
2850         doesn't nest itself into the outer blockquote.
2851         * editing/ReplaceSelectionCommand.cpp:
2852         (WebCore::ReplaceSelectionCommand::doApply):
2853
2854         Move contains() from Element to Node since there is nothing 
2855         Element-specific about it.
2856         * dom/Element.cpp:
2857         * dom/Element.h:
2858         * dom/Node.cpp:
2859         (WebCore::Node::contains):
2860         * dom/Node.h:
2861
2862 2008-11-11  David Hyatt  <hyatt@apple.com>
2863
2864         https://bugs.webkit.org/show_bug.cgi?id=17997
2865
2866         Stop using the new Leopard API tiling call for scaled tiles when drawing background images.  The method
2867         is buggy.  Fall back to using the slower (and more correct) pattern tiling that Tiger still uses.  This
2868         is a Leopard-only workaround, since the API has been fixed on Snow Leopard.
2869
2870         Reviewed by John Sullivan
2871
2872         * platform/graphics/cg/ImageCG.cpp:
2873         (WebCore::Image::drawPattern):
2874
2875 2008-11-10  David Hyatt  <hyatt@apple.com>
2876
2877         Disable the Aqua look for menu lists when full page zoom is turned on.  Because the control is buggy
2878         when scaling and because it's impossible to paint into an offscreen bitmap without completely rewriting
2879         how we draw the control on Mac, our only real option for now is to just switch to our styled look when zoomed.
2880
2881         Reviewed by Adam Roben
2882
2883         * rendering/RenderThemeMac.mm:
2884         (WebCore::RenderThemeMac::isControlStyled):
2885
2886 2008-11-11  Darin Adler  <darin@apple.com>
2887
2888         Reviewed by Dan Bernstein.
2889
2890         - https://bugs.webkit.org/show_bug.cgi?id=22160
2891         speculative fix for <rdar://problem/5995450> Nil deref because nextLinePosition
2892         (previousLinePosition, too) uses a nil node
2893
2894         * editing/visible_units.cpp:
2895         (WebCore::nextLinePosition): Use RenderObject::node instead of RenderObject::element
2896         to check editingIgnoresContent. It makes sense to use the associated DOM node for
2897         this, even in cases of anonymous content, and it avoids the case where element() can
2898         be 0.
2899         (WebCore::previousLinePosition): Ditto.
2900
2901 2008-11-11  Dirk Schulze  <vbs85@gmx.de>
2902
2903         Reviewed by Darin Adler.
2904
2905         Removed default: in applySpreadMethod. This causes the problems
2906         in radial gradients. We don't need CAIRO_EXTEND_NONE in SVG, Canvas
2907         or CSS.
2908
2909         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2910         (WebCore::applySpreadMethod):
2911
2912 2008-11-11  Ariya Hidayat  <ariya.hidayat@trolltech.com>
2913
2914         Reviewed by Tor Arne Vestbø.
2915
2916         Fix crash when rendering the file chooser.
2917         Also proper implementation for multi-selected files.
2918
2919         * platform/qt/FileChooserQt.cpp:
2920         (WebCore::FileChooser::basenameForWidth):
2921
2922 2008-11-11  Dirk Schulze  <vbs85@gmx.de>
2923
2924         Reviewed by Oliver Hunt.
2925
2926         PatternCairo needs to invert the pattern matrix because
2927         of transformation from user space to pattern space.
2928         Give a identity matrix to pattern for Qt and Cairo. Because the 
2929         context is transformed already.
2930
2931         [CAIRO][QT] Canvas transformations applied twice to Patterns
2932         https://bugs.webkit.org/show_bug.cgi?id=21555
2933
2934         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2935         (WebCore::GraphicsContext::fillPath):
2936         (WebCore::GraphicsContext::strokePath):
2937         * platform/graphics/cairo/PatternCairo.cpp:
2938         (WebCore::Pattern::createPlatformPattern):
2939         * platform/graphics/qt/GraphicsContextQt.cpp:
2940         (WebCore::GraphicsContext::strokePath):
2941         (WebCore::GraphicsContext::fillRect):
2942
2943 2008-11-10  Stephanie Lewis  <slewis@apple.com>
2944
2945         Reviewed by Dan Bernstein.
2946
2947         Clear the image source cache even if we haven't decoded any of the image data.
2948         We use the image source cache when calculating layout.
2949
2950         * loader/Cache.cpp:
2951         (WebCore::Cache::pruneDeadResources):
2952         * platform/graphics/BitmapImage.cpp:
2953         (WebCore::BitmapImage::destroyDecodedData):
2954
2955 2008-11-10  Adam Roben  <aroben@apple.com>
2956
2957         Fix Bug 22161: Assertion failure in RenderThemeWin::systemColor when
2958         loading microsoftpdc.com
2959
2960         <https://bugs.webkit.org/show_bug.cgi?id=22161>
2961
2962         Reviewed by Dan Bernstein.
2963
2964         Test: fast/css/outline-invert-assertion.html
2965
2966         * rendering/RenderThemeWin.cpp:
2967         (WebCore::RenderThemeWin::systemColor): If we can't determine a good
2968         Win32 system color to use, defer to RenderTheme instead of asserting.
2969         This matches what RenderThemeMac does.
2970
2971 2008-11-10  Justin Garcia  <justin.garcia@apple.com>
2972
2973         Reviewed by Beth Dakin.
2974
2975         <rdar://problem/4037481> REGRESSION (Mail): pasting quoted text 
2976         into quoted text yields double-quoting
2977         
2978         Don't nest inserted content in Mail blockquotes.  Perform a 
2979         BreakBlockquoteCommand if we're in
2980         one and insert the incoming fragment between the split blockquotes.
2981
2982         * editing/ReplaceSelectionCommand.cpp:
2983         (WebCore::ReplaceSelectionCommand::shouldMerge): Renamed from -> 
2984         source and to -> destination.
2985         (WebCore::ReplaceSelectionCommand::doApply):
2986
2987 2008-11-10  Adam Roben  <aroben@apple.com>
2988
2989         Fix Bug 22158: Would like to turn on WebCore logging channels via an
2990         environment variable
2991
2992         <https://bugs.webkit.org/show_bug.cgi?id=22158>
2993
2994         Logging channels can now be enabled by setting the WebCoreLogLevel
2995         environment variable to a hexadecimal number.
2996
2997         Reviewed by Anders Carlsson.
2998
2999         * WebCore.vcproj/WebCore.vcproj: Added LoggingWin.cpp.
3000         * platform/win/LoggingWin.cpp: Copied from WebCore/platform/mac/LoggingMac.mm.
3001         (WebCore::initializeWithUserDefault): Read in the WebCoreLogLevel
3002         environment variable, parse its value as a hexadecimal number, and
3003         turn the channel on/off based on whether the mask bit is set.
3004         (WebCore::InitializeLoggingChannelsIfNecessary): Initialize each
3005         logging channel in turn.
3006
3007 2008-11-10  Darin Adler  <darin@apple.com>
3008
3009         Reviewed by Adam Roben.
3010
3011         - fix https://bugs.webkit.org/show_bug.cgi?id=22103
3012           Changing fonts in preferences does not immediately update WebViews
3013
3014         This broke when the meaning of FrameView::invalidate changed.
3015         I changed setNeedsReapplyStyles to no longer depend on invalidate.
3016
3017         * dom/Document.cpp: (WebCore::Document::shouldScheduleLayout):
3018         Removed the part of this function that duplicated what's already in
3019         FrameView::needsLayout, since the copy here left out a few key things.
3020         For example, it didn't handle the fact that "needs reapply styles"
3021         counts as needing layout.
3022
3023         * page/Frame.cpp: (WebCore::Frame::setNeedsReapplyStyles): This called
3024         FrameView::invalidate before. There were two things wrong with that.
3025         1) It requested that the entire view repaint even if the style change
3026         didn't necessitate that. 2) FrameView::invalidate no longer causes any
3027         repainting at all in certain cases, because of Hyatt's changes to how
3028         widgets and the host window are involved in the repainting process.
3029         So call FrameView::scheduleRelayout instead, which is more precisely
3030         what we want and need here.
3031
3032         * page/FrameView.cpp:
3033         (WebCore::FrameView::scheduleRelayout): Add a call to needsLayout here
3034         so that Document::shouldScheduleLayout doesn't have to replicate the
3035         logic that's in needsLayout and can instead rely on the fact that it
3036         was already called.
3037         (WebCore::FrameView::needsLayout): Tweaked the comments and formatting
3038         in this function.
3039
3040 2008-11-10  Darin Adler  <darin@apple.com>
3041
3042         Reviewed by Adam Roben.
3043
3044         - speculative fix for <rdar://problem/5557243> crashes in Safari at
3045           WebCore::HTMLSelectElement::updateListBoxSelection + 280
3046
3047         * html/HTMLSelectElement.cpp:
3048         (WebCore::HTMLSelectElement::updateListBoxSelection):
3049         Check index against size of vector before indexing into the vector.
3050
3051 2008-11-10  Tom Cooksey  <thomas.cooksey@trolltech.com>
3052
3053         Reviewed by Tor Arne Vestbø.
3054
3055         Fix QtWebkit build failure on arm.
3056
3057         pen.widthF() is a qreal, which means it's a float on arm.
3058
3059         * platform/graphics/qt/GraphicsContextQt.cpp:
3060         (WebCore::GraphicsContext::setLineDash):
3061
3062 2008-11-10  Morten Sørvig  <msorvig@trolltech.com>
3063
3064         Reviewed by Simon Hausmann.
3065
3066         Improve mouse wheel scolling on Qt/Cocoa.
3067         Cocoa differs from Carbon (and other platforms I think) in that the
3068         mouse wheel events we get have a much higher acceleration factor.
3069
3070         This submit switches over to scroll-per-pixel from scroll-per-line
3071         for most of our scrolling views. This matches the native views
3072         and works well with the increased acceleration.
3073
3074         * platform/qt/WheelEventQt.cpp:
3075
3076 2008-11-09  Cameron Zwarich  <zwarich@apple.com>
3077
3078         Reviewed by Darin Adler.
3079
3080         Bug 19541: Null pointer in showModalDialog()
3081         <https://bugs.webkit.org/show_bug.cgi?id=19541>
3082
3083         Add null frame->page() checks to JSDOMWindowBase::canShowModalDialog()
3084         and JSDOMWindowBase::canShowModalDialogNow()C
3085
3086         * bindings/js/JSDOMWindowBase.cpp:
3087         (WebCore::canShowModalDialog):
3088         (WebCore::canShowModalDialogNow):
3089
3090 2008-11-09  Darin Adler  <darin@apple.com>
3091
3092         - try to fix Windows build
3093
3094         * platform/graphics/Color.cpp: For some reason MSVC doesn't follow the rules
3095         about needed a separate definition for static const integer data members.
3096         Until I get to the bottom of this, put the definitions inside an ifdef.
3097
3098 2008-11-09  David Kilzer  <ddkilzer@apple.com>
3099
3100         BUILD FIX: Qt build broke after r38235.
3101
3102         Added HAVE(ACCESSIBILITY) header guards to platform implementation
3103         source files.
3104
3105         * page/gtk/AccessibilityObjectAtk.cpp: Added HAVE(ACCESSIBILITY)
3106         guards.
3107         * page/gtk/AccessibilityObjectWrapperAtk.cpp: Ditto.
3108         * page/qt/AccessibilityObjectQt.cpp: Ditto.
3109         * page/win/AccessibilityObjectWin.cpp: Ditto.
3110         * page/wx/AccessibilityObjectWx.cpp: Ditto.
3111
3112 2008-11-09  Alexey Proskuryakov  <ap@webkit.org>
3113
3114         Reviewed by Darin Adler.
3115
3116         https://bugs.webkit.org/show_bug.cgi?id=22104
3117         Javascript URL percent encoding/decoding broken by some characters
3118
3119         Test: fast/loader/javascript-url-encoding-2.html
3120
3121         * platform/KURL.cpp: (WebCore::encodeRelativeString): Don't try to break down javascript URLs.
3122
3123 2008-11-09  Holger Hans Peter Freyther  <zecke@selfish.org>
3124
3125         Reviewed and tweaked by Darin Adler.
3126
3127         * platform/graphics/Color.cpp: Added definitions for the static data members
3128         in this class. Static data members need a definition, even when they are the
3129         simple integer constant kind that can be initialized in the header.
3130
3131 2008-11-08  Antti Koivisto  <antti@apple.com>
3132
3133         Reviewed by Sam Weinig.
3134         
3135         Fix https://bugs.webkit.org/show_bug.cgi?id=22141
3136         REGRESSION: Safari error page is not fully styled when loaded from cache
3137         
3138         Reset text decoder on flush so it does not pass through the BOM when it is reused.
3139
3140         Test: fast/encoding/css-cached-bom.html
3141
3142         * loader/TextResourceDecoder.cpp:
3143         (WebCore::TextResourceDecoder::flush):
3144
3145 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
3146  
3147         Reviewed by Mark Rowe.
3148
3149         Send URL errors to stderr rather than stdout. While debugging wx DumpRenderTree,
3150         it was causing these errors to end up in the page's text representation.
3151
3152         * platform/network/curl/ResourceHandleManager.cpp:
3153         (WebCore::ResourceHandleManager::downloadTimerCallback):
3154
3155 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
3156
3157         wx build fixes after addition of JSCore parser and bycompiler dirs. 
3158
3159         * webcore-base.bkl:
3160         * webcore-wx.bkl:
3161
3162 2008-11-08  Simon Fraser  <simon.fraser@apple.com>
3163
3164         Reviewed by Dan Bernstein
3165
3166         https://bugs.webkit.org/show_bug.cgi?id=21906
3167         
3168         Override addFocusRingRects() in RenderTextControl to avoid
3169         the RenderFlow behavior of recursing on descendent renderers.
3170         RenderTextControl should only ever need a simple focus rect.
3171         
3172         This fixes focus ring issues with transforms on text controls.
3173         
3174         Test: fast/transforms/transformed-focused-text-input.html
3175
3176         * rendering/RenderTextControl.cpp:
3177         (WebCore::RenderTextControl::addFocusRingRects):
3178         * rendering/RenderTextControl.h:
3179
3180 2008-11-08  Dimitri Dupuis-Latour  <dupuislatour@apple.com>
3181
3182         Make sure the icon thumbnail width/height is at least 1px in
3183         the Web Inspector's resource panel.
3184
3185         <rdar://problem/5988888>
3186
3187         Reviewed by Tim Hatcher.
3188
3189         * inspector/front-end/inspector.css:
3190
3191 2008-11-08  David Kilzer  <ddkilzer@apple.com>
3192
3193         Bug 22137: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
3194
3195         <https://bugs.webkit.org/show_bug.cgi?id=22137>
3196
3197         Reviewed by Darin Adler.
3198
3199         * page/AccessibilityObject.h:
3200         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
3201         Provide a default implementation when HAVE(ACCESSIBILITY) is false.
3202         * page/mac/AXObjectCacheMac.mm: Added HAVE(ACCESSIBILITY) guard.
3203         * page/mac/AccessibilityObjectMac.mm: Ditto.
3204         * page/mac/AccessibilityObjectWrapper.mm: Ditto.
3205
3206 2008-11-08  Dan Bernstein  <mitz@apple.com>
3207
3208         Reviewed by Darin Adler.
3209
3210         - WebCore part of adding WebPreferences for controlling databases and local storage
3211
3212         * WebCore.base.exp: Exported Settings::setDatabasesEnabled() and
3213         Settings::setLocalStorageEnabled().
3214         * page/DOMWindow.cpp:
3215         (WebCore::DOMWindow::localStorage): Changed to return 0 if local storage
3216         is disabled in settings.
3217         (WebCore::DOMWindow::openDatabase): Changed to return 0 if databases
3218         are disabled in settings.
3219         * page/Settings.cpp:
3220         (WebCore::Settings::Settings): Initialize m_databasesEnabled and
3221         m_localStorageEnabled.
3222         (WebCore::Settings::setDatabasesEnabled): Added.
3223         (WebCore::Settings::setLocalStorageEnabled): Added.
3224         * page/Settings.h:
3225         (WebCore::Settings::databasesEnabled): Added.
3226         (WebCore::Settings::localStorageEnabled): Added.
3227
3228 2008-11-07  Alp Toker  <alp@nuanti.com>
3229
3230         Fix build with bleeding edge GTK+ versions. GTK+ and other libraries
3231         now require that only their top-level header file is included.
3232
3233         Patch tested and still builds fine with older GTK+ versions (back to
3234         2.8).
3235
3236         Future WebKit GTK+ contributions are required to adhere to this
3237         policy.
3238
3239         * platform/gtk/FileSystemGtk.cpp:
3240         * platform/gtk/KeyEventGtk.cpp:
3241         * platform/gtk/MouseEventGtk.cpp:
3242         * platform/gtk/WheelEventGtk.cpp:
3243         * platform/gtk/gtkdrawing.h:
3244         * plugins/gtk/gtk2xtbin.c:
3245         * plugins/gtk/gtk2xtbin.h:
3246
3247 2008-11-07  Anders Carlsson  <andersca@apple.com>
3248
3249         Reviewed by Kevin Decker
3250
3251         Explicitly initialize the NPDrawingModelCoreAnimation.
3252
3253         * bridge/npapi.h:
3254
3255 2008-11-07  Alp Toker  <alp@nuanti.com>
3256
3257         autotools fix. Always use the configured perl binary (which may be
3258         different to the one in $PATH) when generating sources.
3259
3260         * GNUmakefile.am:
3261
3262 2008-11-07  Simon Fraser  <simon.fraser@apple.com>
3263
3264         Reviewed by Dan Bernstein
3265
3266         https://bugs.webkit.org/show_bug.cgi?id=22122
3267         
3268         Use a stack-based object to simplify the pushLayoutState/popLayoutState
3269         code. LayoutStateMaintainer either pushes in the constructor, or allows
3270         an explicit push() later. Both cases require an explicit pop().
3271
3272         * rendering/RenderBlock.cpp:
3273         (WebCore::RenderBlock::layoutBlock):
3274         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
3275         * rendering/RenderContainer.cpp:
3276         (WebCore::RenderContainer::layout):
3277         * rendering/RenderFlexibleBox.cpp:
3278         (WebCore::RenderFlexibleBox::layoutBlock):
3279         * rendering/RenderTable.cpp:
3280         (WebCore::RenderTable::layout):
3281         * rendering/RenderTableRow.cpp:
3282         (WebCore::RenderTableRow::layout):
3283         * rendering/RenderTableSection.cpp:
3284         (WebCore::RenderTableSection::setCellWidths):
3285         (WebCore::RenderTableSection::calcRowHeight):
3286         (WebCore::RenderTableSection::layoutRows):
3287         * rendering/RenderView.h:
3288         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
3289         (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer):
3290         (WebCore::LayoutStateMaintainer::pop):
3291         (WebCore::LayoutStateMaintainer::push):
3292         (WebCore::LayoutStateMaintainer::didPush):
3293
3294 2008-11-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
3295
3296         Fix the QtWebKit build on Mac
3297
3298         * platform/qt/TemporaryLinkStubs.cpp:
3299         (PluginView::invalidateRect):
3300
3301 2008-11-07  Tor Arne Vestbø  <tavestbo@trolltech.com>
3302
3303         Rubber-stamped by Simon Hausmann.
3304
3305         Don't allow Phonon's invisible video widget to keep the app running
3306
3307         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
3308         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3309
3310 2008-11-07  Henrik Hartz  <henrik.hartz@nokia.com>
3311
3312         Reviewed by Simon Hausmann.
3313
3314         Fix valgrind warning about uninitialized lastStop variable.
3315
3316         * platform/graphics/qt/GradientQt.cpp:
3317         (WebCore::Gradient::platformGradient):
3318
3319 2008-11-07  Alexey Proskuryakov  <ap@webkit.org>
3320
3321         Reviewed by Maciej Stachowiak.
3322
3323         Fix layout test brokenness following r38211.
3324
3325         * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
3326         Restore old Shift key behavior. We ignore Shift key state when matching access keys (which
3327         matches neither IE nor Firefox), and this patch made WebKit behave like Firefox
3328         inadvertently. This may or may not be a good thing, but it's certainly not something that
3329         should change by accident.
3330
3331 2008-11-06  Antti Koivisto  <antti@apple.com>
3332
3333         Eh, this trivial last minute change was wrong.
3334
3335         * loader/CachedCSSStyleSheet.cpp:
3336         (WebCore::CachedCSSStyleSheet::sheetText):
3337
3338 2008-11-06  Antti Koivisto  <antti@apple.com>
3339
3340         Reviewed by Dan Bernstein.
3341
3342         https://bugs.webkit.org/show_bug.cgi?id=22093
3343         
3344         Delaying the text decoding caused regression since the decoding
3345         also determines the encoding in case of @charset rule. 
3346         
3347         Decode immediately in data() and keep the decoded string around
3348         during the checkNotify().
3349
3350         * loader/CachedCSSStyleSheet.cpp:
3351         (WebCore::CachedCSSStyleSheet::sheetText):
3352         (WebCore::CachedCSSStyleSheet::data):
3353         * loader/CachedCSSStyleSheet.h:
3354
3355 2008-11-06  Alexey Proskuryakov  <ap@webkit.org>
3356
3357         Reviewed by Darin Adler.
3358
3359         https://bugs.webkit.org/show_bug.cgi?id=22097
3360         Expose MessageEvent constructor on WorkerContext
3361
3362         * bindings/js/JSWorkerContext.cpp:
3363         (WebCore::jsWorkerContextMessageEvent):
3364         (WebCore::setJSWorkerContextMessageEvent):
3365
3366 2008-11-06  Alexey Proskuryakov  <ap@webkit.org>
3367
3368         Reviewed by Darin Adler.
3369
3370         https://bugs.webkit.org/show_bug.cgi?id=21107
3371         <rdar://problem/6264219> New access key combination conflicts with VoiceOver
3372
3373         * page/EventHandler.h:
3374         * page/gtk/EventHandlerGtk.cpp:
3375         (WebCore::EventHandler::accessKeyModifiers):
3376         * page/qt/EventHandlerQt.cpp:
3377         (WebCore::EventHandler::accessKeyModifiers):
3378         * page/win/EventHandlerWin.cpp:
3379         (WebCore::EventHandler::accessKeyModifiers):
3380         * page/wx/EventHandlerWx.cpp:
3381         (WebCore::EventHandler::accessKeyModifiers):
3382         Access access key modifiers via a function, not a static variable.
3383
3384         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::accessKeyModifiers):
3385         Use Ctrl when VoiceOver is enabled, because a conflict with Emacs-style key bindings is
3386         less troublesome than one with VO keys.
3387
3388         * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey):
3389         Also fix an access key matching bug introduced in r32424 - Any superset of specified
3390         modifier set invoked access keys. We can use simple equality comparison instead because
3391         CapsLock is not part of modifiers(), so it doesn't need to be ignored explicitly.
3392
3393 2008-11-06  Anders Carlsson  <andersca@apple.com>
3394
3395         Reviewed by Kevin Decker.
3396
3397         https://bugs.webkit.org/show_bug.cgi?id=22115
3398         NPN_HasPropertyUPP and NPN_HasMethodUPP entries in NPNetscapeFuncs are NULL
3399
3400         Export _NPN_HasMethod and _NPN_HasProperty.
3401         
3402         * WebCore.NPAPI.exp:
3403
3404 2008-11-06  Simon Fraser  <simon.fraser@apple.com>
3405
3406         Reviewed by Antti Koivisto
3407
3408         https://bugs.webkit.org/show_bug.cgi?id=15678
3409         
3410         Fix transformed menu selects to show the popup in the correct
3411         location.
3412
3413         * rendering/RenderMenuList.cpp:
3414         (WebCore::RenderMenuList::showPopup):
3415
3416 2008-11-06  David Kilzer  <ddkilzer@apple.com>
3417
3418         BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
3419
3420         Apparently older versions of gcc have issues with this patch.
3421         Backing out a second time until the issues are resolved.
3422
3423 2008-11-06  Julien Chaffraix  <jchaffraix@pleyo.com>
3424
3425         Reviewed by Maciej Stachowiak.
3426
3427         Bug 21106: .in format discussed changes
3428         https://bugs.webkit.org/show_bug.cgi?id=21106
3429
3430         Include the namespace into the interfaceName.
3431
3432         * dom/make_names.pl: Do not append the namespace when
3433         using the interfaceName.
3434         * html/HTMLTagNames.in: Added namespace prefix for custom
3435         interfaceName.
3436         * svg/svgtags.in: Ditto.
3437
3438 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
3439
3440         Reviewed by Geoff Garen.
3441
3442         Move the remaining files in the kjs subdirectory of JavaScriptCore to
3443         a new parser subdirectory, and remove the kjs subdirectory entirely.
3444
3445         * ForwardingHeaders/kjs: Removed.
3446         * ForwardingHeaders/kjs/Parser.h: Removed.
3447         * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
3448         * ForwardingHeaders/kjs/SourceCode.h: Removed.
3449         * ForwardingHeaders/kjs/SourceProvider.h: Removed.
3450         * ForwardingHeaders/parser: Added.
3451         * ForwardingHeaders/parser/Parser.h: Copied from ForwardingHeaders/kjs/Parser.h.
3452         * ForwardingHeaders/parser/SourceCode.h: Copied from ForwardingHeaders/kjs/SourceCode.h.
3453         * ForwardingHeaders/parser/SourceProvider.h: Copied from ForwardingHeaders/kjs/SourceProvider.h.
3454         * WebCore.pro:
3455         * WebCore.vcproj/WebCore.vcproj:
3456         * bindings/js/StringSourceProvider.h:
3457         * bindings/js/WorkerScriptController.cpp:
3458         * bridge/NP_jsobject.cpp:
3459         * bridge/jni/jni_jsobject.mm:
3460         * bridge/testbindings.pro:
3461         * inspector/JavaScriptDebugServer.cpp:
3462
3463 2008-11-06  David Kilzer  <ddkilzer@apple.com>
3464
3465         BUILD WAS NOT BROKEN: Rolling r38189 back in.
3466
3467         Please perform a clean build if you see crashes.
3468
3469 2008-11-06  David Kilzer  <ddkilzer@apple.com>
3470
3471         BUILD FIX: Backed out r38189 since it apparently broke the world.
3472
3473 2008-11-06  Chris Fleizach  <cfleizach@apple.com>
3474
3475         Reviewed by Beth Dakin.
3476
3477         Bug 22112: if a <body> has contenteditable=true, it should report a writable AXValue
3478         https://bugs.webkit.org/show_bug.cgi?id=22112
3479
3480         Test: accessibility/content-editable.html
3481
3482         * page/AccessibilityRenderObject.cpp:
3483         (WebCore::AccessibilityRenderObject::isReadOnly):
3484
3485 2008-11-06  Sam Weinig  <sam@webkit.org>
3486
3487         Reviewed by Alice Liu.
3488
3489         Fix failed assert at launch caused by unintialized data member on the mac.
3490
3491         * platform/network/mac/NetworkStateNotifierMac.cpp:
3492         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
3493
3494 2008-11-06  Steve Falkenburg  <sfalken@apple.com>
3495
3496         Fix failed assert at launch caused by unintialized data member.
3497         
3498         Reviewed by Maciej Stachowiak.
3499
3500         * platform/network/win/NetworkStateNotifierWin.cpp:
3501         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
3502
3503 2008-11-06  Simon Fraser  <simon.fraser@apple.com>
3504
3505         Reviewed by Antti Koivisto
3506
3507         https://bugs.webkit.org/show_bug.cgi?id=22109
3508         Make <input type="range"> work correctly with transforms
3509
3510         Test: fast/forms/slider-transformed.html
3511
3512         * html/HTMLInputElement.cpp:
3513         (WebCore::HTMLInputElement::defaultEventHandler):
3514             Compute a correct local point when the event is retargeted
3515         * rendering/RenderSlider.cpp:
3516         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
3517             Compute m_initialClickPoint in slider-local coords, so that
3518             deltas are computed correctly with transforms
3519         (WebCore::RenderSlider::mouseEventIsInThumb):
3520             Rather than computing an absolute bounds for the thumb,
3521             convert the point to local coords and compare it with the border box.
3522
3523 2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
3524
3525         Reviewed by Darin Adler.
3526
3527         Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
3528         https://bugs.webkit.org/show_bug.cgi?id=21810
3529
3530         * bindings/js/GCController.cpp:
3531         (WebCore::gcController): Changed to leak an object to avoid an exit-time destructor.
3532         * bindings/js/JSDOMBinding.cpp:
3533         (WebCore::wrapperSet): Ditto
3534         * bindings/js/JSInspectedObjectWrapper.cpp:
3535         (WebCore::wrappers): Ditto
3536         * bindings/js/JSInspectorCallbackWrapper.cpp:
3537         (WebCore::wrappers): Ditto
3538         * bridge/runtime_root.cpp:
3539         (JSC::Bindings::rootObjectSet): Ditto
3540         * css/CSSMutableStyleDeclaration.cpp:
3541         (WebCore::CSSMutableStyleDeclaration::removeProperty): Ditto
3542         * css/CSSPrimitiveValue.cpp:
3543         (WebCore::CSSPrimitiveValue::cssText): Ditto
3544         * css/CSSSelector.cpp:
3545         (WebCore::CSSSelector::extractPseudoType): Ditto
3546         * css/CSSStyleSelector.cpp:
3547         (WebCore::screenEval): Ditto
3548         (WebCore::printEval): Ditto
3549         * dom/DOMImplementation.cpp:
3550         (WebCore::isSVG10Feature): Ditto
3551         (WebCore::isSVG11Feature): Ditto
3552         (WebCore::DOMImplementation::isXMLMIMEType): Ditto
3553         * dom/Document.cpp:
3554         (WebCore::Document::hasPrefixNamespaceMismatch): Ditto
3555         * dom/ScriptElement.cpp:
3556         (WebCore::isSupportedJavaScriptLanguage): Ditto
3557         * editing/ApplyStyleCommand.cpp:
3558         (WebCore::styleSpanClassString): Ditto
3559         * editing/HTMLInterchange.cpp:
3560         (WebCore::): Ditto
3561         * editing/IndentOutdentCommand.cpp:
3562         (WebCore::indentBlockquoteString): Ditto
3563         * editing/ReplaceSelectionCommand.cpp:
3564         (WebCore::isInterchangeNewlineNode): Ditto
3565         (WebCore::isInterchangeConvertedSpaceSpan): Ditto
3566         * editing/htmlediting.cpp:
3567         (WebCore::stringWithRebalancedWhitespace): Ditto
3568         (WebCore::nonBreakingSpaceString): Ditto
3569         * editing/markup.cpp:
3570         (WebCore::appendAttributeValue): Ditto
3571         (WebCore::appendEscapedContent): Ditto
3572         (WebCore::shouldAddNamespaceAttr): Ditto
3573         (WebCore::appendNamespace): Ditto
3574         (WebCore::appendStartMarkup): Ditto
3575         (WebCore::createMarkup): Ditto
3576         * html/HTMLButtonElement.cpp:
3577         (WebCore::HTMLButtonElement::type): Ditto
3578         * html/HTMLElement.cpp:
3579         (WebCore::HTMLElement::isRecognizedTagName): Ditto
3580         (WebCore::inlineTagList): Ditto
3581         (WebCore::blockTagList): Ditto
3582         * html/HTMLFieldSetElement.cpp:
3583         (WebCore::HTMLFieldSetElement::type): Ditto
3584         * html/HTMLInputElement.cpp:
3585         (WebCore::HTMLInputElement::type): Ditto
3586         * html/HTMLKeygenElement.cpp:
3587         (WebCore::HTMLKeygenElement::type): Ditto
3588         * html/HTMLLegendElement.cpp:
3589         (WebCore::HTMLLegendElement::type): Ditto