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