Bug 23030: Cannot setTransform with a non-invertible ctm
[WebKit-https.git] / WebCore / ChangeLog
1 2008-12-29  Oliver Hunt  <oliver@apple.com>
2
3         Reviewed by Cameron Zwarich.
4
5         Bug 23030: Cannot setTransform with a non-invertible ctm
6
7         Removed a series of unnecessary and incorrect checks for an invertible
8         transform.
9
10         Test: fast/canvas/canvas-set-properties-with-non-invertible-ctm.html
11
12         * html/CanvasRenderingContext2D.cpp:
13         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
14         (WebCore::CanvasRenderingContext2D::setFillStyle):
15             These properties are not effected by the current CTM, so there
16             is no need to prevent them from being assigned.
17
18         (WebCore::CanvasRenderingContext2D::setTransform):
19             The whole point of tracking whether the current CTM was expected to be
20             non-invertible was to allow setTransform to be used when the CTM had become
21             non-invertible.
22
23         (WebCore::CanvasRenderingContext2D::beginPath):
24         (WebCore::CanvasRenderingContext2D::closePath):
25             beginPath and closePath change the state of the path, but not any of
26             its coordinates so there is no need prevent them from being called.
27
28 2008-12-29  Josh Roesslein  <jroesslein@gmail.com>
29
30         Reviewed by Oliver Hunt.
31
32         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22968
33
34         Context menu rendering error when full page zoomed
35
36         * page/ContextMenuController.cpp:
37         (WebCore::ContextMenuController::handleContextMenuEvent):
38
39 2008-12-29  Sam Weinig  <sam@webkit.org>
40
41         Reviewed by Mark Rowe.
42
43         Add some basic memory statistic logging for Node.
44
45         * dom/Node.cpp:
46         (WebCore::Node::dumpStatistics):
47         (WebCore::Node::Node):
48         (WebCore::Node::~Node):
49         (WebCore::Node::setDocument):
50         * dom/Node.h:
51
52 2008-12-29  Sam Weinig  <sam@webkit.org>
53
54         Reviewed by Anders Carlsson.
55
56         Remove one use of DeprecatedPtrList.
57
58         * css/CSSRuleList.cpp:
59         (WebCore::CSSRuleList::~CSSRuleList):
60         (WebCore::CSSRuleList::length):
61         (WebCore::CSSRuleList::item):
62         (WebCore::CSSRuleList::deleteRule):
63         (WebCore::CSSRuleList::append):
64         (WebCore::CSSRuleList::insertRule):
65         * css/CSSRuleList.h: Change m_lstCSSRules from using DeprecatedPtrList to a Vector.
66         I measured no performance change and was comforted by the fact that we use a Vector
67         for StyleList, which serves the exact same purpose.
68
69 2008-12-29  Adele Peterson  <adele@apple.com>
70
71         Reviewed by Brady Eidson.
72
73         Fix for https://bugs.webkit.org/show_bug.cgi?id=21797
74         <rdar://problem/6310682> REGRESSION: Crash in CFHTTPCookieStorageCopy beneath WebCore::cookies() when 
75         running fast/dom/document-attribute-js-null.html and http/tests/security/cookies/create-document.html
76         
77         Return early if the document is trying to get or set a cookie with an empty cookie url.
78
79         * dom/Document.cpp:
80         (WebCore::Document::cookie):
81         (WebCore::Document::setCookie):
82
83 2008-12-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
84
85         Reviewed by Sam Weinig.
86
87         Bug 23016: JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
88         <https://bugs.webkit.org/show_bug.cgi?id=23016>
89         <rdar://problem/6425077>
90
91         JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while
92         reparsing all JS functions, which will execute JS in the inspector. Depending
93         on the order in which functions are recompiled, a function could have a new
94         body but other functions that have not been recompiled could have an optimized
95         (in the sense of inline caching) call to it, bypassing the check of whether or
96         not there is generated bytecode. This leads to a crash caused by accessing
97         indices off of a null pointer.
98
99         To fix the problem, simply delay calling sourceParsed() until after all functions
100         have been reparsed. The crash isn't 100% reproducible, but on the one test case
101         I have, this makes it impossible to reproduce after a large number of attempts,
102         when it used to happen every few attempts.
103
104         * inspector/JavaScriptDebugServer.cpp:
105         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
106
107 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
108
109         Rubber-stamped by Antti Koivisto.
110         Oops, remove some last minute ASSERTS that are obviously wrong.
111
112         * rendering/RenderTextControlMultiLine.cpp:
113         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
114         * rendering/RenderTextControlSingleLine.cpp:
115         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
116
117 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
118
119         Reviewed by Antti Koivisto.
120
121         Fixes: https://bugs.webkit.org/show_bug.cgi?id=23015
122
123         Don't rely on HTMLFormControlElement in RenderTextControl.
124
125         Introduce an abstract FormControlElement class, containing the
126         valueMatchesRenderer/setValueMatchesRenderer, the only HTMLFormControlElement
127         specific methods that RenderTextControl relies on.
128
129         This makes it possible for WML to reuse RenderTextControl.
130         RenderTextControlSingleLine still relies on HTMLInputElement,
131         this will change if WMLInputElement is introduced.
132
133         * GNUmakefile.am:
134         * WebCore.vcproj/WebCore.vcproj:
135         * WebCore.xcodeproj/project.pbxproj:
136         * dom/FormControlElement.h: Added.
137         (WebCore::FormControlElement::~FormControlElement):
138         (WebCore::FormControlElement::FormControlElement):
139         * html/HTMLFormControlElement.h:
140         (WebCore::HTMLFormControlElement::valueMatchesRenderer):
141         (WebCore::HTMLFormControlElement::setValueMatchesRenderer):
142         * html/HTMLTextAreaElement.cpp:
143         (WebCore::HTMLTextAreaElement::updateValue):
144         * rendering/RenderTextControl.cpp:
145         (WebCore::RenderTextControl::adjustInnerTextStyle):
146         (WebCore::RenderTextControl::updateFromElement):
147         (WebCore::RenderTextControl::setInnerTextValue):
148         (WebCore::RenderTextControl::selectionChanged):
149         (WebCore::RenderTextControl::formControlElement):
150         * rendering/RenderTextControl.h:
151         * rendering/RenderTextControlMultiLine.cpp:
152         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
153         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
154         * rendering/RenderTextControlSingleLine.cpp:
155         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
156         (WebCore::RenderTextControlSingleLine::updateFromElement):
157
158 2008-12-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
159
160         Reviewed by Darin Adler.
161
162         Bug 23006: Many Loader::Host member functions are not safe to use reentrantly
163         <https://bugs.webkit.org/show_bug.cgi?id=23006>
164         <rdar://problem/6216106>
165
166         Many Loader::Host member functions set m_processingResource to true when they
167         begin processing a resource and set it to false when they are done. Thanks to
168         JavaScript and the web inspector, almost anything can happen during the
169         processing of a resource, including these functions being called reentrantly,
170         which is unsafe due to this way of using m_processingResource.
171
172         This can theoretically cause a Loader::Host to be used after it is freed,
173         because when Loader::servedPendingRequests() is called, it will free Hosts
174         that have m_processingResource set to false.
175
176         To fix this, we replace m_processingResource with m_numResourcesProcessing,
177         which is incremented and decremented using a helper object, ProcessingResource.
178
179         There are no occurrences of crashes caused by this bug that are reproducible
180         by multiple people, but this fixes the problem of m_processingResource being
181         set to false while a Host is still alive.
182
183         * loader/loader.cpp:
184         (WebCore::Loader::Host::Host):
185         (WebCore::Loader::Host::didFinishLoading): Change to use ProcessingResource
186         instead of manually setting m_processingResource.
187         (WebCore::Loader::Host::didFail): Ditto.
188         (WebCore::Loader::Host::didReceiveData): Ditto.
189         * loader/loader.h:
190         (WebCore::Loader::Host::ProcessingResource::ProcessingResource): Added.
191         (WebCore::Loader::Host::ProcessingResource::~ProcessingResource): Added.
192         (WebCore::Loader::Host::processingResource): Change to use m_numResourcesProcessing
193         instead of just getting m_processingResource.
194
195 2008-12-28  Alexey Proskuryakov  <ap@webkit.org>
196
197         Reviewed by Darin Adler.
198
199         https://bugs.webkit.org/show_bug.cgi?id=23007
200         REGRESSION: Timer-related crash when closing Web Inspector
201
202         Test: fast/dom/Window/remove-timeout-crash.html
203
204         * bindings/js/DOMTimer.cpp: (WebCore::DOMTimer::fired): Besides deleting the timer, make
205         sure to remove it from a Document map.
206
207 2008-12-28  Alexey Proskuryakov  <ap@webkit.org>
208
209         Reviewed by Anders Carlsson.
210
211         https://bugs.webkit.org/show_bug.cgi?id=23012
212         Bring application cache manifest parsing up to date
213
214         Test: http/tests/appcache/manifest-parsing.html
215
216         * loader/appcache/ManifestParser.cpp:
217         (WebCore::Mode): Added a constant for unknown sections, which are ignored when parsing. This
218         is necessary for future extensions.
219         (WebCore::parseManifest): Parse unknown sections correctly. Ignore trailing tokens in
220         supported sections.
221
222 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
223
224         Reviewed by Darin Adler.
225
226         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22996
227
228         RenderTextControl heavily depends on HTMLInputElement & HTMLTextAreaElement.
229         It handles multi & single line text control rendering in one class. Split up
230         in two new classes: RenderTextControlSingleLine & RenderTextControlMultiLine.
231
232         This has several benefits - code is more readable now, the memory usage
233         for RenderTextControlMultiLine is reduced, as all stuff related to search fields
234         lives in RenderTextControlSingleLine, and it's easier to introduce an
235         abstraction for input/textarea-like elements for other HTML flavours like WML.
236
237         * GNUmakefile.am:
238         * WebCore.order:
239         * WebCore.pro:
240         * WebCore.scons:
241         * WebCore.vcproj/WebCore.vcproj:
242         * WebCore.xcodeproj/project.pbxproj:
243         * WebCoreSources.bkl:
244         * html/HTMLInputElement.cpp:
245         (WebCore::HTMLInputElement::createRenderer):
246         (WebCore::HTMLInputElement::defaultEventHandler):
247         (WebCore::HTMLInputElement::updatePlaceholderVisibility):
248         (WebCore::HTMLInputElement::addSearchResult):
249         (WebCore::HTMLInputElement::onSearch):
250         * html/HTMLTextAreaElement.cpp:
251         (WebCore::HTMLTextAreaElement::createRenderer):
252         (WebCore::HTMLTextAreaElement::defaultEventHandler):
253         * rendering/RenderTextControl.cpp:
254         (WebCore::RenderTextControl::RenderTextControl):
255         (WebCore::RenderTextControl::~RenderTextControl):
256         (WebCore::RenderTextControl::styleDidChange):
257         (WebCore::RenderTextControl::adjustInnerTextStyle):
258         (WebCore::RenderTextControl::createSubtreeIfNeeded):
259         (WebCore::RenderTextControl::textBlockHeight):
260         (WebCore::RenderTextControl::textBlockWidth):
261         (WebCore::RenderTextControl::updateFromElement):
262         (WebCore::RenderTextControl::setInnerTextValue):
263         (WebCore::RenderTextControl::setSelectionRange):
264         (WebCore::RenderTextControl::visiblePositionForIndex):
265         (WebCore::RenderTextControl::indexForVisiblePosition):
266         (WebCore::RenderTextControl::subtreeHasChanged):
267         (WebCore::RenderTextControl::scrollbarThickness):
268         (WebCore::RenderTextControl::calcHeight):
269         (WebCore::RenderTextControl::hitInnerTextBlock):
270         (WebCore::RenderTextControl::forwardEvent):
271         (WebCore::RenderTextControl::calcPrefWidths):
272         (WebCore::RenderTextControl::selectionChanged):
273         (WebCore::RenderTextControl::innerTextElement):
274         * rendering/RenderTextControl.h:
275         (WebCore::RenderTextControl::hasControlClip):
276         (WebCore::RenderTextControl::canHaveChildren):
277         (WebCore::RenderTextControl::avoidsFloats):
278         (WebCore::RenderTextControl::isEdited):
279         (WebCore::RenderTextControl::setEdited):
280         * rendering/RenderTextControlMultiLine.cpp: Added.
281         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
282         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
283         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
284         (WebCore::RenderTextControlMultiLine::layout):
285         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
286         (WebCore::RenderTextControlMultiLine::forwardEvent):
287         (WebCore::RenderTextControlMultiLine::preferredContentWidth):
288         (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
289         (WebCore::RenderTextControlMultiLine::baselinePosition):
290         (WebCore::RenderTextControlMultiLine::updateFromElement):
291         (WebCore::RenderTextControlMultiLine::cacheSelection):
292         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
293         * rendering/RenderTextControlMultiLine.h: Added.
294         (WebCore::RenderTextControlMultiLine::isTextArea):
295         * rendering/RenderTextControlSingleLine.cpp: Added.
296         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
297         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
298         (WebCore::RenderTextControlSingleLine::placeholderShouldBeVisible):
299         (WebCore::RenderTextControlSingleLine::updatePlaceholderVisibility):
300         (WebCore::RenderTextControlSingleLine::addSearchResult):
301         (WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
302         (WebCore::RenderTextControlSingleLine::showPopup):
303         (WebCore::RenderTextControlSingleLine::hidePopup):
304         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
305         (WebCore::RenderTextControlSingleLine::paint):
306         (WebCore::RenderTextControlSingleLine::layout):
307         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
308         (WebCore::RenderTextControlSingleLine::forwardEvent):
309         (WebCore::RenderTextControlSingleLine::styleDidChange):
310         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
311         (WebCore::RenderTextControlSingleLine::textBlockWidth):
312         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
313         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
314         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
315         (WebCore::RenderTextControlSingleLine::updateFromElement):
316         (WebCore::RenderTextControlSingleLine::cacheSelection):
317         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
318         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
319         (WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
320         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
321         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
322         (WebCore::RenderTextControlSingleLine::autosaveName):
323         (WebCore::RenderTextControlSingleLine::startSearchEventTimer):
324         (WebCore::RenderTextControlSingleLine::searchEventTimerFired):
325         (WebCore::RenderTextControlSingleLine::valueChanged):
326         (WebCore::RenderTextControlSingleLine::itemText):
327         (WebCore::RenderTextControlSingleLine::itemIsEnabled):
328         (WebCore::RenderTextControlSingleLine::itemStyle):
329         (WebCore::RenderTextControlSingleLine::menuStyle):
330         (WebCore::RenderTextControlSingleLine::clientInsetLeft):
331         (WebCore::RenderTextControlSingleLine::clientInsetRight):
332         (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
333         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
334         (WebCore::RenderTextControlSingleLine::listSize):
335         (WebCore::RenderTextControlSingleLine::selectedIndex):
336         (WebCore::RenderTextControlSingleLine::itemIsSeparator):
337         (WebCore::RenderTextControlSingleLine::itemIsLabel):
338         (WebCore::RenderTextControlSingleLine::itemIsSelected):
339         (WebCore::RenderTextControlSingleLine::setTextFromItem):
340         (WebCore::RenderTextControlSingleLine::fontSelector):
341         (WebCore::RenderTextControlSingleLine::hostWindow):
342         (WebCore::RenderTextControlSingleLine::createScrollbar):
343         * rendering/RenderTextControlSingleLine.h: Added.
344         (WebCore::RenderTextControlSingleLine::hasControlClip):
345         (WebCore::RenderTextControlSingleLine::isTextField):
346         (WebCore::RenderTextControlSingleLine::placeholderIsVisible):
347         (WebCore::RenderTextControlSingleLine::popupIsVisible):
348         (WebCore::RenderTextControlSingleLine::shouldPopOver):
349         (WebCore::RenderTextControlSingleLine::valueShouldChangeOnHotTrack):
350         * rendering/TextControlInnerElements.cpp:
351         (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
352         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
353
354 2008-12-28  Dmitry Titov  <dimich@chromium.org>
355
356         Reviewed by Darin Adler.
357
358         https://bugs.webkit.org/show_bug.cgi?id=22755
359         Prepare to add create/remove timeout methods to JSWorkerContext by moving
360         timer-specific code from JSDOMWindowBase to DOMTimer.
361         Moved everything JS-related from DOMTimer to ScheduledAction.
362         Now ScheduledAction is what it wanted to be all the time: a JS engine-specific 
363         container for timer callback that knows how to invoke it.
364         DOMTimer is not anymore JS-specific.
365
366         This is mostly moving the code around. No intended functional changes.
367
368         * bindings/js/DOMTimer.cpp:
369         (WebCore::DOMTimer::DOMTimer):
370         (WebCore::DOMTimer::~DOMTimer):
371         (WebCore::DOMTimer::install):
372         (WebCore::DOMTimer::removeById):
373         (WebCore::DOMTimer::fired):
374         (WebCore::DOMTimer::stop):
375         * bindings/js/DOMTimer.h:
376         * bindings/js/JSDOMWindowBase.cpp:
377         (WebCore::JSDOMWindowBase::installTimeout):
378         (WebCore::JSDOMWindowBase::removeTimeout):
379         * bindings/js/JSDOMWindowBase.h:
380         * bindings/js/ScheduledAction.cpp:
381         (WebCore::ScheduledAction::execute):
382         * bindings/js/ScheduledAction.h:
383         * dom/Document.cpp:
384         (WebCore::Document::addTimeout):
385
386 2008-12-26  Zalan Bujtas  <zbujtas@gmail.com>
387
388         Reviewed by Darin Adler.
389
390         https://bugs.webkit.org/show_bug.cgi?id=22999
391         Check if database thread exists.
392
393         * storage/Database.cpp:
394         (WebCore::Database::openAndVerifyVersion):
395         (WebCore::Database::markAsDeletedAndClose):
396         (WebCore::Database::tableNames):
397
398 2008-12-26  Alexey Proskuryakov  <ap@webkit.org>
399
400         Reviewed by Darin Adler.
401
402         https://bugs.webkit.org/show_bug.cgi?id=23001
403         A call to applicationCache.update() from a cached event listener should be ignored
404
405         Test: http/tests/appcache/idempotent-update.html
406
407         * loader/appcache/ApplicationCacheGroup.cpp:
408         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after
409         dispatching events.
410
411 2008-12-26  Alexey Proskuryakov  <ap@webkit.org>
412
413         Reviewed by Darin Adler.
414
415         https://bugs.webkit.org/show_bug.cgi?id=22997
416         ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()
417
418         Tests: http/tests/appcache/top-frame-1.html
419                http/tests/appcache/top-frame-2.html
420                http/tests/appcache/top-frame-3.html
421                http/tests/appcache/top-frame-4.html
422
423         * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
424         Fixed one more instance of top level frame being used for caching purposes.
425
426 2008-12-26  Dmitry Titov  <dimich@chromium.org>
427
428         Reviewed by Darin Adler.
429
430         https://bugs.webkit.org/show_bug.cgi?id=22987
431         Fix for broken test editing/execCommand/5763082.html
432
433         * editing/CompositeEditCommand.cpp:
434         (WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto
435         function parameter across multiple calls.
436
437 2008-12-25  Alexey Proskuryakov  <ap@webkit.org>
438
439         Reviewed by Darin Adler.
440
441         https://bugs.webkit.org/show_bug.cgi?id=22993
442         Application cache shouldn't be inherited by subframes
443
444         <rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
445         This crash happened because main resource for subframe was looked up in top frame's
446         appcache. If not for the spec change, it could have been fixed by preventing the load
447         altogether.
448
449         Test: http/tests/appcache/foreign-iframe-main.html
450         I intend to write additional tests for the behavior change.
451
452         * loader/DocumentLoader.cpp:
453         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
454         * loader/DocumentLoader.h:
455         (WebCore::DocumentLoader::applicationCache):
456         * loader/MainResourceLoader.cpp:
457         (WebCore::MainResourceLoader::load):
458         * loader/appcache/DOMApplicationCache.cpp:
459         (WebCore::DOMApplicationCache::associatedCache):
460         Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
461
462         * loader/appcache/ApplicationCacheGroup.cpp:
463         (WebCore::ApplicationCacheGroup::selectCache):
464         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
465         Removed checks for the frame being top-level one, now that subframes are cached independently.
466
467 2008-12-25  Antti Koivisto  <antti@apple.com>
468
469         Reviewed by Oliver Hunt.
470
471         <rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient
472         
473         Disallow turning resources that are being revalidated to purgable state.
474         
475         No test, the condition is difficult to produce in DRT.
476
477         * loader/CachedCSSStyleSheet.cpp:
478         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
479         * loader/CachedImage.cpp:
480         (WebCore::CachedImage::destroyDecodedData):
481         * loader/CachedResource.cpp:
482         (WebCore::CachedResource::isSafeToMakePurgeable):
483         (WebCore::CachedResource::makePurgeable):
484         * loader/CachedResource.h:
485         * loader/CachedScript.cpp:
486         (WebCore::CachedScript::destroyDecodedData):
487
488 2008-12-25  Alexey Proskuryakov  <ap@webkit.org>
489
490         Qt build fix.
491
492         * WebCore.pro: Added ThreadGlobalData.cpp.
493
494 2008-12-24  Mark Rowe  <mrowe@apple.com>
495
496         Build fix.
497
498         * WebCore.base.exp:  Remove a symbol from the export file now that it is no longer generated.
499
500 2008-12-24  Holger Hans Peter Freyther  <zecke@selfish.org>
501
502         Unreviewed build fix to find addSubresourceURL
503
504         This is needed to compile on WebKit/Gtk+
505
506         * css/CSSFontFaceSrcValue.cpp:
507
508 2008-12-23  Alexey Proskuryakov  <ap@webkit.org>
509
510         Reviewed by Darin Adler.
511
512         https://bugs.webkit.org/show_bug.cgi?id=22980
513         WebCore uses more thread specific keys than it really needs
514
515         Consolidated ThreadSpecific data into a single ThreadGlobalData structure.
516
517         * GNUmakefile.am:
518         * WebCore.base.exp:
519         * WebCore.scons:
520         * WebCore.vcproj/WebCore.vcproj:
521         * WebCore.xcodeproj/project.pbxproj:
522         * WebCoreSources.bkl:
523         * dom/EventNames.cpp:
524         * dom/EventNames.h:
525         (WebCore::eventNames):
526         * page/Frame.cpp:
527         (WebCore::Frame::Frame):
528         * platform/ThreadGlobalData.cpp: Added.
529         (WebCore::threadGlobalData):
530         (WebCore::ThreadGlobalData::ThreadGlobalData):
531         (WebCore::ThreadGlobalData::~ThreadGlobalData):
532         * platform/ThreadGlobalData.h: Added.
533         (WebCore::ThreadGlobalData::eventNames):
534         (WebCore::ThreadGlobalData::emptyString):
535         (WebCore::ThreadGlobalData::atomicStringTable):
536         (WebCore::ThreadGlobalData::cachedConverterICU):
537         (WebCore::ThreadGlobalData::cachedConverterTEC):
538         * platform/text/AtomicString.cpp:
539         (WebCore::stringTable):
540         (WebCore::AtomicString::add):
541         (WebCore::AtomicString::remove):
542         (WebCore::AtomicString::find):
543         (WebCore::AtomicString::init):
544         * platform/text/StringImpl.cpp:
545         (WebCore::StringImpl::empty):
546         * platform/text/StringImpl.h:
547         * platform/text/TextCodecICU.cpp:
548         (WebCore::ICUConverterWrapper::~ICUConverterWrapper):
549         (WebCore::cachedConverterICU):
550         * platform/text/TextCodecICU.h:
551         (WebCore::ICUConverterWrapper::ICUConverterWrapper):
552         * platform/text/mac/TextCodecMac.cpp:
553         (WebCore::cachedConverterTEC):
554         * platform/text/mac/TextCodecMac.h:
555         (WebCore::TECConverterWrapper::TECConverterWrapper):
556         (WebCore::TECConverterWrapper::~TECConverterWrapper):
557
558 2008-12-23  Mark Rowe  <mrowe@apple.com>
559
560         Build fix.
561
562         * WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied
563         into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
564         derived sources are generated.
565
566 2008-12-23  Simon Fraser  <simon.fraser@apple.com>
567
568         Reviewed by Dan Bernstein
569
570         https://bugs.webkit.org/show_bug.cgi?id=22941
571         
572         If the document element has opacity, we need to erase the view background to
573         white before painting.
574         
575         Test: fast/backgrounds/opacity-on-document-element.html
576
577         * rendering/RenderView.cpp:
578         (WebCore::rendererObscuresBackground):
579
580 2008-12-23  Simon Fraser  <simon.fraser@apple.com>
581
582         Reviewed by Dan Bernstein
583
584         https://bugs.webkit.org/show_bug.cgi?id=21910
585         
586         Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
587         Otherwise the FrameView is left at 0x0, and nothing paints.
588         
589         * svg/graphics/SVGImage.cpp:
590         (WebCore::SVGImage::draw):
591
592 2008-12-23  Darin Adler  <darin@apple.com>
593
594         Reviewed by John Sullivan.
595
596         - improve robustness of undo/redo in HTML editing to fix the following bugs
597           <https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply()
598           <rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo
599
600         Major categories of improvements:
601
602             1) Added null checks.
603             2) Eliminated type casts without corresponding type checks.
604             3) Avoided possible infinite loops by building up lists of nodes to operate on
605                before starting to make DOM changes.
606             4) Use more RefPtr.
607
608         No test at this time, but test cases should follow in separate patches.
609
610         * WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it
611         can be used in other Private headers, specifically editing ones.
612
613         * css/CSSStyleSelector.cpp:
614         (WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement.
615         (WebCore::CSSStyleSelector::locateSharedStyle): Ditto.
616         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
617
618         * dom/Element.cpp: (WebCore::Element::cloneElement): Added.
619         * dom/Element.h: Added cloneElement and an implementation of parentElement.
620         * dom/Node.h: Moved parentElement from here to Element.h and changed its
621         implementation so it will return 0 when the parent is not an element
622         (document, document fragment, etc.).
623
624         * editing/AppendNodeCommand.cpp:
625         (WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element.
626         Moved assertions from doApply in here.
627         (WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked
628         appendChild call.
629         (WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
630         * editing/AppendNodeCommand.h: Updated.
631
632         * editing/ApplyStyleCommand.cpp:
633         (WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more
634         direct way with new instead of createElementNS.
635         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr.
636         (WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID.
637         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
638         * editing/ApplyStyleCommand.h:
639
640         * editing/BreakBlockquoteCommand.cpp:
641         (WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
642
643         * editing/CompositeEditCommand.cpp:
644         (WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned.
645         (WebCore::CompositeEditCommand::removeStyledElement): Ditto.
646         (WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
647         (WebCore::CompositeEditCommand::insertNodeAfter): Ditto.
648         (WebCore::CompositeEditCommand::insertNodeAt): Ditto.
649         (WebCore::CompositeEditCommand::appendNode): Ditto.
650         (WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to
651         make the list of children in case removing them has side effects.
652         (WebCore::CompositeEditCommand::removeNode): Ditto.
653         (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
654         (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto.
655         (WebCore::CompositeEditCommand::splitTextNode): Ditto.
656         (WebCore::CompositeEditCommand::splitElement): Ditto.
657         (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
658         (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
659         (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
660         (WebCore::CompositeEditCommand::joinTextNodes): Ditto.
661         (WebCore::CompositeEditCommand::inputText): Ditto.
662         (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
663         (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
664         (WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
665         (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto.
666         (WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
667         (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling
668         setNodeAttribute instead of with its own SimpleEditCommand.
669         (WebCore::CompositeEditCommand::setNodeAttribute): Ditto.
670         (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
671         (WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto.
672         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
673         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't
674         bother using an undoable operation to put the break element into the paragraph
675         element because there's no need to split them and redo this when doing undo/redo.
676         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
677         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
678         * editing/CompositeEditCommand.h: Ditto.
679
680         * editing/DeleteFromTextNodeCommand.cpp:
681         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned.
682         (WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions.
683         (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
684         * editing/DeleteFromTextNodeCommand.h:
685
686         * editing/DeleteSelectionCommand.cpp:
687         (WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr.
688         (WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
689         * editing/DeleteSelectionCommand.h:
690
691         * editing/FormatBlockCommand.cpp:
692         (WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString.
693         (WebCore::FormatBlockCommand::doApply): Use Element.
694         * editing/FormatBlockCommand.h:
695
696         * editing/IndentOutdentCommand.cpp:
697         (WebCore::createIndentBlockquoteElement): Use new to create the element
698         instead of calling a function so we have a more specific type.
699         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
700         Use RefPtr and Element.
701         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
702         (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
703         * editing/IndentOutdentCommand.h:
704
705         * editing/InsertIntoTextNodeCommand.cpp:
706         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
707         Use unsigned. Added an assertion.
708         (WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions.
709         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
710         * editing/InsertIntoTextNodeCommand.h:
711
712         * editing/InsertLineBreakCommand.cpp:
713         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element.
714         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
715
716         * editing/InsertListCommand.cpp:
717         (WebCore::InsertListCommand::doApply): Use Element.
718
719         * editing/InsertNodeBeforeCommand.cpp:
720         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions
721         here from doApply.
722         (WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions.
723         Added a null check.
724         (WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
725
726         * editing/InsertParagraphSeparatorCommand.cpp:
727         (WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
728
729         * editing/JoinTextNodesCommand.cpp:
730         (WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions.
731         Added some runtime checks. Don't store anything in m_offset.
732         (WebCore::JoinTextNodesCommand::doUnapply): Ditto.
733         * editing/JoinTextNodesCommand.h:
734
735         * editing/MergeIdenticalElementsCommand.cpp:
736         (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved
737         an assertion here from doApply.
738         (WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions.
739         Added a null check. Changed implementation to use remove to avoid null parent issue.
740         Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating.
741         (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
742
743         * editing/ModifySelectionListLevel.cpp:
744         (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*.
745         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
746         * editing/ModifySelectionListLevel.h:
747
748         * editing/RemoveCSSPropertyCommand.cpp:
749         (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and
750         CSSPropertyID. Also renamed m_decl to m_style.
751         (WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions.
752         (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
753
754         * editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted.
755         Use SetNodeAttributeCommand instead.
756         * editing/RemoveNodeAttributeCommand.h: Ditto.
757
758         * editing/RemoveNodeCommand.cpp:
759         (WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply.
760         Don't initialize m_refChild here; rather do it in doApply.
761         (WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added
762         checks and streamlined implementation.
763         (WebCore::RemoveNodeCommand::doUnapply): Ditto.
764         * editing/RemoveNodeCommand.h:
765
766         * editing/RemoveNodePreservingChildrenCommand.cpp:
767         (WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
768
769         * editing/ReplaceSelectionCommand.cpp:
770         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
771
772         * editing/SetNodeAttributeCommand.cpp:
773         (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString.
774         Removed assertion that prevents us from using this to remove an attribute.
775         (WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions.
776         (WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
777         * editing/SetNodeAttributeCommand.h:
778
779         * editing/SplitElementCommand.cpp:
780         (WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply.
781         (WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector
782         to avoid possible infinite loops.
783         (WebCore::SplitElementCommand::doUnapply): Ditto.
784
785         * editing/SplitTextNodeCommand.cpp:
786         (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment
787         here from doApply.
788         (WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying.
789         (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
790
791         * editing/SplitTextNodeContainingElementCommand.cpp:
792         (WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
793
794         * editing/WrapContentsInDummySpanCommand.cpp:
795         (WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures.
796         Don't reuse the dummy span. Simplified logic.
797         (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
798
799         * editing/htmlediting.cpp:
800         (WebCore::isBlock): Make sure this returns true only for elements.
801         (WebCore::enclosingBlock): Return an Element*.
802         (WebCore::enclosingTableCell): Ditto.
803         (WebCore::enclosingList): Return an HTMLElement*.
804         (WebCore::outermostEnclosingList): Return an HTMLElement*.
805         (WebCore::createDefaultParagraphElement): Return an HTMLElement*.
806         (WebCore::createBreakElement): Return an HTMLElement*.
807         (WebCore::createOrderedListElement): Return an HTMLElement*.
808         (WebCore::createUnorderedListElement): Return an HTMLElement*.
809         (WebCore::createListItemElement): Return an HTMLElement*.
810         (WebCore::createHTMLElement): Return an HTMLElement*.
811         * editing/htmlediting.h:
812
813         * editing/markup.cpp:
814         (WebCore::createFragmentFromText): Use createBreakElement and use Element*.
815
816         * page/MouseEventWithHitTestResults.cpp:
817         (WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
818
819 2008-12-23  Darin Adler  <darin@apple.com>
820
821         Reviewed by Dan Bernstein.
822
823         * dom/Node.h: Tweak comments and order of bits that Sam moved
824         here last night.
825         * dom/Node.cpp: Ditto.
826
827 2008-12-22  Julien Chaffraix  <jchaffraix@webkit.org>
828
829         Reviewed by Darin Adler.
830
831         Bug 11106: Some XMLHttpRequest URI resolving tests fail
832         https://bugs.webkit.org/show_bug.cgi?id=11106
833
834         Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
835         The previous code was using the containing DOMWindow to do so which would fail for
836         XMLHttpRequest object being passed between iframe.
837
838         Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
839                http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
840                http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
841                http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
842                http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
843                http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
844                http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
845
846         * bindings/js/JSXMLHttpRequestCustom.cpp:
847         (WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext
848         to resolve the URL.
849
850         * dom/Document.cpp:
851         (WebCore::Document::virtualCompleteURL): Virtual method added to
852         avoid performance hit on completeURL call.
853
854         * dom/Document.h:
855         * dom/ScriptExecutionContext.h:
856         (WebCore::ScriptExecutionContext::completeURL): Non-virtual method
857         that wrap the call to the virtual call.
858         * dom/WorkerContext.cpp:
859         (WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
860         * dom/WorkerContext.h:
861
862 2008-12-23  Darin Adler  <darin@apple.com>
863
864         Reviewed by Dan Bernstein.
865
866         - https://bugs.webkit.org/show_bug.cgi?id=22978
867           a couple tweaks to the new strokeBoundingRect functions
868
869         * platform/graphics/cairo/PathCairo.cpp:
870         (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
871         if the applier is non-null.
872
873         * platform/graphics/cg/PathCG.cpp:
874         (WebCore::putBytesNowhere): Added.
875         (WebCore::createScratchContext): Changed to use a "/dev/null" type
876         function to discard bytes rather than using a data object. This
877         eliminates the possibility that memory will be used if someone draws
878         into the scratch context by accident. Also moved to the top of the
879         file; it was in a slightly strange place before.
880         (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
881         if the applier is non-null. Simplify the empty path special case.
882
883 2008-12-22  Sam Weinig  <sam@webkit.org>
884
885         Reviewed by Mark Rowe.
886
887         Save a word in all Elements by moving the 5 loose bits to Node,
888         where we had 16 spare.
889
890         * dom/Element.cpp:
891         (WebCore::Element::Element):
892         * dom/Element.h:
893         * dom/Node.cpp:
894         (WebCore::Node::Node):
895         * dom/Node.h:
896
897 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
898
899         Reviewed by George Staikos.
900
901         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22972
902
903         Add WML <meta> element support. All needed functionality is present
904         in Document::processHttpEquiv, already covered by tests.
905
906         * GNUmakefile.am:
907         * WebCore.pro:
908         * WebCore.vcproj/WebCore.vcproj:
909         * WebCore.xcodeproj/project.pbxproj:
910         * wml/WMLMetaElement.cpp: Added.
911         (WebCore::WMLMetaElement::WMLMetaElement):
912         (WebCore::WMLMetaElement::parseMappedAttribute):
913         (WebCore::WMLMetaElement::insertedIntoDocument):
914         * wml/WMLMetaElement.h: Added.
915         * wml/WMLTagNames.in:
916
917 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
918
919         Rubber-stamped by Darin Adler.
920
921         Don't reference specific layout tests in comments.
922
923         * html/HTMLFormElement.cpp:
924         (WebCore::HTMLFormElement::createFormData):
925
926 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
927
928         Reviewed by George Staikos.
929
930         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22965
931
932         Add WML <head> element support. Doesn't require a WMLHeadElement.
933         No functional behaviour, as we already created a WMLElement for headTag, by default.
934         It's just cleaner to list <head> in WMLTagNames, forwarding to a WMLElement constructor.
935
936         * wml/WMLTagNames.in:
937
938 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
939
940         Reviewed by George Staikos.
941
942         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22971
943
944         Fix regression caused by the HTMLFormElement refactorization.
945         File form elements without a name have to be included in multipart/form-data
946         submission. Cover this behaviour with a new test case.
947
948         Test: http/tests/misc/empty-file-formdata.html
949
950         * html/HTMLFormElement.cpp:
951         (WebCore::HTMLFormElement::createFormData):
952         * wml/WMLTagNames.in:
953
954 2008-12-22  David Kilzer  <ddkilzer@apple.com>
955
956         <rdar://problem/6438298> Bump schema version for app cache
957
958         Reviewed by Alexey Proskuryakov.
959
960         * loader/appcache/ApplicationCacheStorage.cpp: Increment
961         SchemaVersion from 2 to 3.
962
963 2008-12-22  David Kilzer  <ddkilzer@apple.com>
964
965         Use Deque in CSSStyleSheet::addSubresourceStyleURLs()
966
967         Reviewed by Darin Adler.
968
969         * css/CSSStyleSheet.cpp:
970         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Replaced
971         use of ListHashSet with more efficient Deque.
972
973 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
974
975         Reviewed by Sam Weinig.
976
977         Fix obvious crash fix for WML enabled builds.
978
979         * css/CSSStyleSelector.cpp:
980         (WebCore::CSSStyleSelector::adjustRenderStyle):
981
982 2008-12-22  David Kilzer  <ddkilzer@apple.com>
983
984         Bug 11850: Webarchive fails to save images referenced in CSS
985
986         <https://bugs.webkit.org/show_bug.cgi?id=11850>
987
988         Reviewed by Darin Adler.
989
990         This entry contains two parts since the tests for adding a
991         completeURL() method to StyleSheet and CSSStyleSheet (part 1) depend
992         on Bug 11850 being fixed (part 2).
993
994         --
995
996         Tests: http/tests/webarchive/test-css-url-encoding-shift-jis.html
997                http/tests/webarchive/test-css-url-encoding-utf-8.html
998                http/tests/webarchive/test-css-url-encoding.html
999
1000         Added completeURL() methods to StyleSheet and CSSStyleSheet that
1001         match the behavior of Document::completeURL().  Most notably,
1002         CSSStyleSheet::completeURL() uses the charset of the stylesheet
1003         (if it exists) to construct URLs, just like Document::completeURL().
1004
1005         * css/CSSParser.cpp:
1006         (WebCore::CSSParser::parseValue): Use CSSStyleSheet::completeURL().
1007         (WebCore::CSSParser::parseContent): Ditto.
1008         (WebCore::CSSParser::parseFillImage): Ditto.
1009         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
1010         (WebCore::CSSParser::parseBorderImage): Ditto.
1011
1012         * css/CSSStyleSheet.cpp:
1013         (WebCore::CSSStyleSheet::completeURL): Added.
1014         * css/CSSStyleSheet.h:
1015         (WebCore::CSSStyleSheet::completeURL): Added declaration.
1016
1017         * css/StyleSheet.cpp:
1018         (WebCore::StyleSheet::completeURL): Added.
1019         * css/StyleSheet.h:
1020         (WebCore::StyleSheet::completeURL): Added declaration.
1021
1022         * dom/Document.cpp:
1023         (WebCore::Document::completeURL): Added comment referring to the new
1024         completeURL() methods in StyleSheet and CSSStyleSheet.
1025
1026         --
1027
1028         Tests: webarchive/test-css-url-resources-in-stylesheets.html
1029                webarchive/test-css-url-resources-inline-styles.html
1030
1031         Walk stylesheets and inline style attributes for url() references
1032         when building a list of URLs to include in a webarchive.  Note that
1033         not all URLs found this way will be included in the webarchive if
1034         they were not used (and thus not downloaded) when laying out the
1035         page.
1036
1037         The key method for CSS stylesheets is
1038         CSSStyleSheet::addSubresourceStyleURLs() which iterates over all
1039         CSSStyleSheet objects recursively referenced from its own stylesheet
1040         through @import rules.  Starting with the CSSRule objects in each
1041         sheet and continuing down through the CSSMutableStyleDeclaration and
1042         CSSValue objects, addSubresourceStyleURLs() methods are called to
1043         gather URLs.
1044
1045         For inline style attributes in HTML DOM elements,
1046         StyledElement::addSubresourceAttributeURLs() calls
1047         CSSMutableStyleDeclaration::addSubresourceStyleURLs() to gather URLs
1048         from each element, hence the need to call
1049         addSubresourceAttributeURLs() on superclasses when the method is
1050         implemented on the element class itself.
1051
1052         * css/CSSBorderImageValue.cpp:
1053         (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added.
1054         * css/CSSBorderImageValue.h:
1055         (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added
1056         declaration.
1057
1058         * css/CSSFontFaceRule.cpp:
1059         (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added.
1060         * css/CSSFontFaceRule.h:
1061         (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added
1062         declaration.
1063
1064         * css/CSSFontFaceSrcValue.cpp:
1065         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added.
1066         * css/CSSFontFaceSrcValue.h:
1067         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added
1068         declaration.
1069
1070         * css/CSSImportRule.cpp:
1071         (WebCore::CSSImportRule::addSubresourceStyleURLs): Added.
1072         * css/CSSImportRule.h:
1073         (WebCore::CSSImportRule::addSubresourceStyleURLs): Added
1074         declaration.
1075
1076         * css/CSSMutableStyleDeclaration.cpp:
1077         (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added.
1078         Iterates over m_properties vector of CSSProperty objects calling
1079         addSubresourceStyleURLs() on each property's CSSValue object.
1080         * css/CSSMutableStyleDeclaration.h:
1081         (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added
1082         declaration.
1083
1084         * css/CSSPrimitiveValue.cpp:
1085         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added.
1086         * css/CSSPrimitiveValue.h:
1087         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added
1088         declaration.
1089
1090         * css/CSSReflectValue.cpp:
1091         (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added.
1092         * css/CSSReflectValue.h:
1093         (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added
1094         declaration.
1095
1096         * css/CSSRule.h:
1097         (WebCore::CSSRule::addSubresourceStyleURLs): Added.  Virtual
1098         method with empty implementation that's overridden by subclasses
1099         as needed.
1100
1101         * css/CSSStyleRule.cpp:
1102         (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added.
1103         * css/CSSStyleRule.h:
1104         (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added
1105         declaration.
1106
1107         * css/CSSStyleSheet.cpp:
1108         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated to
1109         call CSSRule::addSubresourceStyleURLs on each rule to extract
1110         URLs.  Removed unneeded baseURL parameter now that the
1111         completeURL() method exists.
1112         * css/CSSStyleSheet.h:
1113         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated
1114         declaration.
1115
1116         * css/CSSValue.h:
1117         (WebCore::CSSValue::addSubresourceStyleURLs): Added.  Virtual
1118         method with empty implementation that's overridden by subclasses
1119         as needed.
1120
1121         * css/CSSValueList.cpp:
1122         (WebCore::CSSValueList::addSubresourceStyleURLs): Added.
1123         Iterates over m_values vector of CSSValue objects calling
1124         addSubresourceStyleURLs() on each.
1125         * css/CSSValueList.h:
1126         (WebCore::CSSValueList::addSubresourceStyleURLs): Added
1127         declaration.
1128
1129         * css/StyleSheet.h:
1130         (WebCore::StyleSheet::addSubresourceStyleURLs): Updated
1131         declaration to remove unneeded baseURL parameter.
1132
1133         * dom/ProcessingInstruction.cpp:
1134         (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
1135         Fixed to use the StyleBase::baseURL() method to get the
1136         stylesheet's URL instead of calling Document::completeURL().
1137
1138         * dom/StyledElement.cpp:
1139         (WebCore::StyledElement::addSubresourceAttributeURLs): Added method
1140         to extract URLs from inline style declarations.
1141         * dom/StyledElement.h:
1142         (WebCore::StyledElement::addSubresourceAttributeURLs): Added
1143         declaration.
1144
1145         * html/HTMLBodyElement.cpp:
1146         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Call
1147         addSubresourceAttributeURLs() in superclass to extract URLs
1148         from inline style declarations.
1149         * html/HTMLEmbedElement.cpp:
1150         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
1151         * html/HTMLImageElement.cpp:
1152         (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
1153         * html/HTMLInputElement.cpp:
1154         (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
1155         * html/HTMLLinkElement.cpp:
1156         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
1157         * html/HTMLObjectElement.cpp:
1158         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
1159         * html/HTMLParamElement.cpp:
1160         (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
1161         * html/HTMLScriptElement.cpp:
1162         (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
1163         * html/HTMLStyleElement.cpp:
1164         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
1165         * html/HTMLTableCellElement.cpp:
1166         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
1167         * html/HTMLTableElement.cpp:
1168         (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
1169         * svg/SVGCursorElement.cpp:
1170         (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Ditto.
1171         * svg/SVGFEImageElement.cpp:
1172         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
1173         * svg/SVGImageElement.cpp:
1174         (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
1175         * svg/SVGScriptElement.cpp:
1176         (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
1177
1178 2008-12-22  Dhananjoy Chutia  <dhanrd@gmail.com>
1179
1180         Reviewed by David Kilzer.
1181
1182         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22959
1183         Memory leak fixes for WebKit+soup
1184
1185         * platform/network/soup/ResourceHandleSoup.cpp:
1186         (WebCore::finishedCallback):
1187
1188 2008-12-22  Alexey Proskuryakov  <ap@webkit.org>
1189
1190         Reviewed by Darin Adler.
1191
1192         <rdar://problem/6277060> ASSERTION FAILED: !m_cacheBeingUpdated if the manifest is not available
1193
1194         Tests: http/tests/appcache/404-manifest.html
1195                http/tests/appcache/fail-on-update.html
1196
1197         * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::stopLoading):
1198         Removed the incorrect assertion.
1199
1200         * loader/appcache/ApplicationCacheGroup.h: Added an explanation of somewhat nonintuitive
1201         m_currentHandle handling.
1202
1203 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1204
1205         Reviewed by Alexey Proskuryakov & George Staikos.
1206
1207         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22961
1208
1209         Add WML <fieldset> element support.
1210         Unlike HTML's <fieldset> element, WML doesn't provide a <legend> child element
1211         to describe the <fieldset>. WML instead offers a 'title' attribute on the <fieldset>
1212         element. To integrate within the existing RenderFieldset code, we just create an
1213         internal <insertedLegend> element as first child for a WML <fieldset> element, containing
1214         the title attribute value.
1215
1216         * GNUmakefile.am:
1217         * WebCore.pro:
1218         * WebCore.vcproj/WebCore.vcproj:
1219         * WebCore.xcodeproj/project.pbxproj:
1220         * css/CSSStyleSelector.cpp:
1221         (WebCore::CSSStyleSelector::adjustRenderStyle):
1222         * css/wml.css:
1223         * rendering/RenderFieldset.cpp:
1224         (WebCore::RenderFieldset::RenderFieldset):
1225         (WebCore::RenderFieldset::findLegend):
1226         * rendering/RenderFieldset.h:
1227         * rendering/RenderLegend.cpp:
1228         (WebCore::RenderLegend::RenderLegend):
1229         * rendering/RenderLegend.h:
1230         * wml/WMLFieldSetElement.cpp: Added.
1231         (WebCore::WMLFieldSetElement::WMLFieldSetElement):
1232         (WebCore::WMLFieldSetElement::~WMLFieldSetElement):
1233         (WebCore::WMLFieldSetElement::parseMappedAttribute):
1234         (WebCore::WMLFieldSetElement::insertedIntoDocument):
1235         (WebCore::WMLFieldSetElement::removedFromDocument):
1236         (WebCore::WMLFieldSetElement::createRenderer):
1237         * wml/WMLFieldSetElement.h: Added.
1238         * wml/WMLInsertedLegendElement.cpp: Added.
1239         (WebCore::WMLInsertedLegendElement::WMLInsertedLegendElement):
1240         (WebCore::WMLInsertedLegendElement::~WMLInsertedLegendElement):
1241         (WebCore::WMLInsertedLegendElement::createRenderer):
1242         * wml/WMLInsertedLegendElement.h: Added.
1243         * wml/WMLTagNames.in:
1244
1245 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1246
1247         Not reviewed. Try to fix clean Mac builds, set role=private for FormDataBuilder.h
1248
1249         * WebCore.xcodeproj/project.pbxproj:
1250
1251 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1252
1253         Rubber-stamped by George Staikos.
1254
1255         Unify all TorchMobile copyright lines. Consolidate in a single line, as requested by Mark Rowe, some time ago.
1256
1257         * css/CSSStyleSelector.cpp:
1258         * css/wml.css:
1259         * dom/DOMImplementation.cpp:
1260         * dom/Document.cpp:
1261         * dom/Document.h:
1262         * dom/XMLTokenizer.cpp:
1263         * dom/XMLTokenizerLibxml2.cpp:
1264         * dom/XMLTokenizerQt.cpp:
1265         * history/BackForwardList.cpp:
1266         * history/BackForwardList.h:
1267         * loader/FrameLoader.cpp:
1268         * loader/FrameLoader.h:
1269         * loader/MainResourceLoader.cpp:
1270         * page/Page.cpp:
1271         * page/Page.h:
1272         * platform/MIMETypeRegistry.cpp:
1273         * platform/network/FormDataBuilder.cpp:
1274         * platform/network/FormDataBuilder.h:
1275         * platform/qt/MIMETypeRegistryQt.cpp:
1276         * wml/WMLAElement.cpp:
1277         * wml/WMLAElement.h:
1278         * wml/WMLAccessElement.cpp:
1279         * wml/WMLAccessElement.h:
1280         * wml/WMLAnchorElement.cpp:
1281         * wml/WMLAnchorElement.h:
1282         * wml/WMLBRElement.cpp:
1283         * wml/WMLBRElement.h:
1284         * wml/WMLCardElement.cpp:
1285         * wml/WMLCardElement.h:
1286         * wml/WMLDoElement.cpp:
1287         * wml/WMLDoElement.h:
1288         * wml/WMLDocument.cpp:
1289         * wml/WMLDocument.h:
1290         * wml/WMLElement.cpp:
1291         * wml/WMLElement.h:
1292         * wml/WMLErrorHandling.cpp:
1293         * wml/WMLErrorHandling.h:
1294         * wml/WMLEventHandlingElement.cpp:
1295         * wml/WMLEventHandlingElement.h:
1296         * wml/WMLGoElement.cpp:
1297         * wml/WMLGoElement.h:
1298         * wml/WMLImageElement.cpp:
1299         * wml/WMLImageElement.h:
1300         * wml/WMLImageLoader.cpp:
1301         * wml/WMLImageLoader.h:
1302         * wml/WMLIntrinsicEvent.cpp:
1303         * wml/WMLIntrinsicEvent.h:
1304         * wml/WMLIntrinsicEventHandler.cpp:
1305         * wml/WMLIntrinsicEventHandler.h:
1306         * wml/WMLNoopElement.cpp:
1307         * wml/WMLNoopElement.h:
1308         * wml/WMLOnEventElement.cpp:
1309         * wml/WMLOnEventElement.h:
1310         * wml/WMLPElement.cpp:
1311         * wml/WMLPElement.h:
1312         * wml/WMLPageState.cpp:
1313         * wml/WMLPageState.h:
1314         * wml/WMLPostfieldElement.cpp:
1315         * wml/WMLPostfieldElement.h:
1316         * wml/WMLPrevElement.cpp:
1317         * wml/WMLPrevElement.h:
1318         * wml/WMLRefreshElement.cpp:
1319         * wml/WMLRefreshElement.h:
1320         * wml/WMLSetvarElement.cpp:
1321         * wml/WMLSetvarElement.h:
1322         * wml/WMLTableElement.cpp:
1323         * wml/WMLTableElement.h:
1324         * wml/WMLTaskElement.cpp:
1325         * wml/WMLTaskElement.h:
1326         * wml/WMLTemplateElement.cpp:
1327         * wml/WMLTemplateElement.h:
1328         * wml/WMLTimerElement.cpp:
1329         * wml/WMLTimerElement.h:
1330         * wml/WMLVariables.cpp:
1331         * wml/WMLVariables.h:
1332
1333 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1334
1335         Reviewed by George Staikos.
1336
1337         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22638
1338
1339         Add POST method support to WMLGoElement. GET & POST over HTTP
1340         covered by a new set of WML HTTP layout tests.
1341
1342         Tests: http/tests/wml/go-task-get-method-accept-charset.html
1343                http/tests/wml/go-task-get-method.html
1344                http/tests/wml/go-task-post-method-accept-charset.html
1345                http/tests/wml/go-task-post-method.html
1346
1347         * wml/WMLGoElement.cpp:
1348         (WebCore::WMLGoElement::WMLGoElement):
1349         (WebCore::WMLGoElement::registerPostfieldElement):
1350         (WebCore::WMLGoElement::parseMappedAttribute):
1351         (WebCore::WMLGoElement::executeTask):
1352         (WebCore::WMLGoElement::preparePOSTRequest):
1353         (WebCore::WMLGoElement::prepareGETRequest):
1354         (WebCore::WMLGoElement::createFormData):
1355         * wml/WMLGoElement.h:
1356         * wml/WMLPostfieldElement.cpp:
1357         (WebCore::encodedString):
1358         (WebCore::WMLPostfieldElement::encodeData):
1359         * wml/WMLPostfieldElement.h:
1360
1361 2008-12-21  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1362
1363         Reviewed by Darin Adler and George Staikos.
1364
1365         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22949
1366
1367         Refactor HTMLFormElement to share a maximum level of code between HTMLFormElement & WMLGoElement.
1368         Create a new helper class 'FormDataBuilder', which is hold as member variable in those classes.
1369         It encapsulates all functionality needed to generate a FormData object, usable for HTML/WML form
1370         submission, including boundary string generation, multi-part form handling etc.
1371
1372         No functional changes, no test cases affected.
1373         WMLGoElement will be converted in a follow-up patch.
1374
1375         * GNUmakefile.am:
1376         * WebCore.pro:
1377         * WebCore.scons:
1378         * WebCore.vcproj/WebCore.vcproj:
1379         * WebCore.xcodeproj/project.pbxproj:
1380         * WebCoreSources.bkl:
1381         * html/HTMLFormElement.cpp:
1382         (WebCore::HTMLFormElement::HTMLFormElement):
1383         (WebCore::HTMLFormElement::dataEncoding):
1384         (WebCore::HTMLFormElement::createFormData):
1385         (WebCore::HTMLFormElement::submit):
1386         (WebCore::HTMLFormElement::parseMappedAttribute):
1387         * html/HTMLFormElement.h:
1388         (WebCore::HTMLFormElement::enctype):
1389         (WebCore::HTMLFormElement::encoding):
1390         (WebCore::HTMLFormElement::setEncoding):
1391         (WebCore::HTMLFormElement::acceptCharset):
1392         * platform/network/FormDataBuilder.cpp: Added.
1393         (WebCore::FormDataBuilder::FormDataBuilder):
1394         (WebCore::FormDataBuilder::~FormDataBuilder):
1395         (WebCore::FormDataBuilder::parseEncodingType):
1396         (WebCore::FormDataBuilder::parseMethodType):
1397         (WebCore::FormDataBuilder::dataEncoding):
1398         (WebCore::appendString):
1399         (WebCore::FormDataBuilder::beginMultiPartHeader):
1400         (WebCore::FormDataBuilder::addBoundaryToMultiPartHeader):
1401         (WebCore::FormDataBuilder::addFileNameToMultiPartHeader):
1402         (WebCore::FormDataBuilder::addContentTypeToMultiPartHeader):
1403         (WebCore::FormDataBuilder::finishMultiPartHeader):
1404         (WebCore::FormDataBuilder::clear):
1405         (WebCore::FormDataBuilder::addKeyValuePairAsFormData):
1406         (WebCore::FormDataBuilder::encodeStringAsFormData):
1407         (WebCore::FormDataBuilder::generateUniqueBoundaryString):
1408         * platform/network/FormDataBuilder.h: Added.
1409         (WebCore::FormDataBuilder::isPostMethod):
1410         (WebCore::FormDataBuilder::setIsPostMethod):
1411         (WebCore::FormDataBuilder::isMultiPartForm):
1412         (WebCore::FormDataBuilder::setIsMultiPartForm):
1413         (WebCore::FormDataBuilder::encodingType):
1414         (WebCore::FormDataBuilder::setEncodingType):
1415         (WebCore::FormDataBuilder::acceptCharset):
1416         (WebCore::FormDataBuilder::setAcceptCharset):
1417         (WebCore::FormDataBuilder::encodedData):
1418         (WebCore::FormDataBuilder::multiPartData):
1419
1420 2008-12-21  Dirk Schulze  <krit@webkit.org>
1421
1422         Reviewed by Darin Adler, Nikolas Zimmermann.
1423
1424         Move the the platform dependent strokeBBox functionality out of RenderPath
1425         into Path with strokeBoundingRect.
1426
1427         RenderPath clean-up for strokeBoundingBox
1428         [https://bugs.webkit.org/show_bug.cgi?id=22902]
1429
1430         * GNUmakefile.am:
1431         * WebCore.xcodeproj/project.pbxproj:
1432         * platform/graphics/GraphicsContext.h:
1433         * platform/graphics/Path.h:
1434         * platform/graphics/StrokeStyleApplier.h: Added.
1435         (WebCore::StrokeStyleApplier::~StrokeStyleApplier):
1436         * platform/graphics/cairo/PathCairo.cpp:
1437         (WebCore::Path::strokeBoundingRect):
1438         * platform/graphics/cg/PathCG.cpp:
1439         (WebCore::createScratchContext):
1440         (WebCore::scratchContext):
1441         (WebCore::Path::strokeBoundingRect):
1442         * platform/graphics/qt/GraphicsContextQt.cpp:
1443         (WebCore::GraphicsContext::pen):
1444         * platform/graphics/qt/PathQt.cpp:
1445         (WebCore::Path::strokeBoundingRect):
1446         * rendering/RenderPath.cpp:
1447         (WebCore::StrokeBoundingRectStyleApplier::StrokeBoundingRectStyleApplier):
1448         (WebCore::StrokeBoundingRectStyleApplier::strokeStyle):
1449         (WebCore::RenderPath::relativeBBox):
1450         * rendering/RenderPath.h:
1451         * svg/graphics/cairo/RenderPathCairo.cpp:
1452         * svg/graphics/cg/RenderPathCg.cpp:
1453         * svg/graphics/qt/RenderPathQt.cpp:
1454
1455 2008-12-20  David Kilzer  <ddkilzer@apple.com>
1456
1457         Fix typo "CSSAferRuleValue" to "CSSAfterRuleValue"
1458
1459         * html/PreloadScanner.cpp:
1460         (WebCore::PreloadScanner::tokenizeCSS):
1461         * html/PreloadScanner.h:
1462         (WebCore::PreloadScanner::CSSState):
1463
1464 2008-12-19  Alexey Proskuryakov  <ap@webkit.org>
1465
1466         Reviewed by Geoff Garen.
1467
1468         <rdar://problem/6454076> Random crashes on JS raytracer
1469
1470         No test, because the crash is not readily reproducible.
1471
1472         * platform/text/StringImpl.cpp:
1473         (WebCore::StringImpl::empty):
1474         * platform/text/StringImpl.h:
1475         Made empty string per-thread.
1476
1477 2008-12-19  Anders Carlsson  <andersca@apple.com>
1478
1479         Reviewed by Sam Weinig.
1480
1481         Replace some uses of HardRetain etc with RetainPtr.
1482
1483         * platform/mac/DragImageMac.mm:
1484         * platform/mac/SharedBufferMac.mm:
1485         (WebCore::SharedBuffer::createCFData):
1486         * rendering/RenderThemeMac.mm:
1487         * svg/graphics/cg/SVGResourceFilterCg.mm:
1488         (WebCore::SVGResourceFilter::prepareFilter):
1489         (WebCore::SVGResourceFilter::applyFilter):
1490         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
1491         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
1492         (WebCore::SVGResourceFilterPlatformDataMac::SVGResourceFilterPlatformDataMac):
1493
1494 2008-12-19  miggilin  <mr.diggilin@gmail.com>
1495
1496         Reviewed by Kevin Ollivier.
1497
1498         Add Context Menu support to wx bindings.
1499         
1500         https://bugs.webkit.org/show_bug.cgi?id=22675
1501
1502         * platform/ContextMenu.h:
1503         * platform/ContextMenuItem.h:
1504         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
1505         * platform/wx/ContextMenuItemWx.cpp: Added.
1506         * platform/wx/ContextMenuWx.cpp: Added.
1507         * platform/wx/LocalizedStringsWx.cpp:
1508         * platform/wx/TemporaryLinkStubs.cpp:
1509         * webcore-wx.bkl:
1510
1511
1512 2008-12-19  Beth Dakin  <bdakin@apple.com>
1513
1514         Reviewed by Darin Adler.
1515
1516         Temporary band-aide fix for <rdar://problem/6372481> In Gmail, a 
1517         crash occurs at 
1518         AccessibilityTable::isTableExposableThroughAccessibility() when 
1519         attempting to create a link in a rich text message
1520
1521         We need to disable Accessibility Tables until we get this fixed for 
1522         real to prevent rampant crashing.
1523
1524         * page/AccessibilityTable.cpp:
1525         (WebCore::AccessibilityTable::AccessibilityTable):
1526
1527 2008-12-19  Simon Fraser  <simon.fraser@apple.com>
1528
1529         Reviewed by Darin Adler
1530
1531         https://bugs.webkit.org/show_bug.cgi?id=22938
1532         
1533         When the document element is transformed, we need to paint
1534         the view background to avoid unpainted areas.
1535         
1536         Test: fast/transforms/transformed-document-element.html
1537
1538         * rendering/RenderView.cpp:
1539         (WebCore::RenderView::paintBoxDecorations):
1540
1541 2008-12-19  Steve Falkenburg  <sfalken@apple.com>
1542
1543         Fix build.
1544
1545         * WebCore.vcproj/WebCore.vcproj:
1546
1547 2008-12-19  Kevin Ollivier  <kevino@theolliviers.com>
1548
1549         wx build fixes after recent changes.
1550
1551         * WebCoreSources.bkl:
1552         * platform/graphics/wx/ImageSourceWx.cpp:
1553         (WebCore::ImageSource::clear):
1554         * webcore-base.bkl:
1555
1556 2008-12-19  Holger Hans Peter Freyther  <zecke@selfish.org>
1557
1558         Reviewed by Sam Weinig.
1559
1560         [GTK] Fix make distcheck again
1561
1562         These files were moved to WebCore/platform/animation
1563         and WebCore/platform/graphics/transforms.
1564
1565         * GNUmakefile.am:
1566
1567 2008-12-19  Gustavo Noronha Silva  <gns@gnome.org>
1568
1569         Reviewed by Holger Freyther.
1570
1571         https://bugs.webkit.org/show_bug.cgi?id=22900
1572
1573         Fix AtomicString usage, so that building works.
1574
1575         * platform/network/soup/ResourceHandleSoup.cpp:
1576
1577 2008-12-19  Adam Roben  <aroben@apple.com>
1578
1579         Windows build fix on older versions of CFNetwork after r39393
1580
1581         * platform/network/cf/ResourceHandleCFNet.cpp:
1582         (WebCore::highestSupportedCFURLConnectionClientVersion): Changed
1583         preprocessor directives not to leave in unreachable code on old
1584         versions of CFNetwork.
1585
1586 2008-12-19  Antti Koivisto  <antti@apple.com>
1587
1588         Comment fix.
1589
1590         * platform/PurgeableBuffer.h:
1591
1592 2008-12-19  Holger Hans Peter Freyther  <zecke@selfish.org>
1593
1594         [GTK] Build fix by adding the new files.
1595
1596         * GNUmakefile.am:
1597
1598 2008-12-19  Jade Han <jade.han@nokia.com>
1599
1600         Reviewed by Tor Arne Vestbø.
1601
1602         [Qt] Allow conversion of JavaScript Number and Boolean types to Qt types
1603
1604         https://bugs.webkit.org/show_bug.cgi?id=22880
1605
1606         * bridge/qt/qt_runtime.cpp:
1607         (JSC::Bindings::convertValueToQVariant):
1608
1609 2008-12-19  Tor Arne Vestbø  <tavestbo@trolltech.com>
1610
1611         Reviewed by Holger Freyther.
1612
1613         Implement ImageDecoder::filenameExtension() for Qt
1614
1615         * platform/graphics/qt/ImageDecoderQt.cpp:
1616         (WebCore::ImageDecoderQt::filenameExtension):
1617         * platform/graphics/qt/ImageDecoderQt.h:
1618         * platform/graphics/qt/ImageSourceQt.cpp:
1619         (WebCore::ImageSource::filenameExtension):
1620
1621 2008-12-19  Adam Barth  <abarth@webkit.org>
1622
1623         Reviewed by Darin Alder.
1624
1625         Implement ImageSource::filenameExtension for Cario
1626           https://bugs.webkit.org/show_bug.cgi?id=22905
1627
1628         * platform/graphics/cairo/ImageSourceCairo.cpp:
1629         (WebCore::ImageSource::filenameExtension):
1630         * platform/image-decoders/ImageDecoder.h:
1631         * platform/image-decoders/bmp/BMPImageDecoder.h:
1632         (WebCore::BMPImageDecoder::filenameExtension):
1633         * platform/image-decoders/gif/GIFImageDecoder.h:
1634         (WebCore::GIFImageDecoder::filenameExtension):
1635         * platform/image-decoders/ico/ICOImageDecoder.h:
1636         (WebCore::ICOImageDecoder::filenameExtension):
1637         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
1638         (WebCore::JPEGImageDecoder::filenameExtension):
1639         * platform/image-decoders/png/PNGImageDecoder.h:
1640         (WebCore::PNGImageDecoder::filenameExtension):
1641         * platform/image-decoders/xbm/XBMImageDecoder.h:
1642         (WebCore::XBMImageDecoder::filenameExtension):
1643
1644 2008-12-18  Dan Bernstein  <mitz@apple.com>
1645
1646         Reviewed by Sam Weinig.
1647
1648         - avoid using the ResourceHandle-level credential storage, if any,
1649           unless the client opts to use it; when use of the credential
1650           storage is disallowed, all authentication challenges are sent to
1651           the client.
1652         - let the FrameLoaderClient decide whether to use the credential
1653           storage. 
1654
1655         * loader/EmptyClients.h:
1656         (WebCore::EmptyFrameLoaderClient::shouldUseCredentialStorage): Added.
1657         Returns false.
1658         * loader/FrameLoader.cpp:
1659         (WebCore::FrameLoader::shouldUseCredentialStorage): Added. Calls through
1660         to the FrameLoaderClient.
1661         * loader/FrameLoader.h: Declared shouldUseCredentialStorage().
1662         * loader/FrameLoaderClient.h: Declared shouldUseCredentialStorage().
1663         * loader/ResourceLoader.cpp: 
1664         (WebCore::ResourceLoader::shouldUseCredentialStorage): Added. Calls
1665         through to the FrameLoader.
1666         * loader/ResourceLoader.h:
1667         (WebCore::ResourceLoader::shouldUseCredentialStorage): Implemented this
1668         ResourceHandleClient method.
1669         * loader/SubresourceLoader.cpp:
1670         (WebCore::SubresourceLoader::shouldUseCredentialStorage): Added.
1671         Overrides the ResourceLoader implementation by letting the client
1672         supply the return value. If the client does not do this, continues
1673         with the ResourceLoader behavior of asking the FrameLoader.
1674         * loader/SubresourceLoader.h: Removed an unused #include and declared
1675         shouldUseCredentialStorage().
1676         * loader/SubresourceLoaderClient.h:
1677         (WebCore::SubresourceLoaderClient::getShouldUseCredentialStorage):
1678         Added a default implementation which returns false, meaning the client
1679         does not wish to decide whether the credential storage should be used.
1680         * platform/network/ResourceHandle.h: Removed unused forward declarations.
1681         Declared a new member function, shouldUseCredentialStorage(), on Mac and
1682         CFNetwork-using builds.
1683         * platform/network/ResourceHandleClient.h:
1684         (WebCore::ResourceHandleClient::shouldUseCredentialStorage): Added this
1685         default implementation that returns false.
1686         * platform/network/cf/ResourceHandleCFNet.cpp:
1687         (WebCore::findCFNetworkModule): Added. Returns a handle to the CFNetwork
1688         module.
1689         (WebCore::cfNetworkVersion): Added. Returns the high word of the
1690         CFNetwork library's product version.
1691         (WebCore::highestSupportedCFURLConnectionClientVersion): Added. Returns
1692         the highest version of the CFURLConnectionClient structure supported by
1693         the CFNetwork library. The only reason to check this at runtime is
1694         that WebKit may be linking at runtime against an older version of
1695         CFNetwork than the one it was built with, as is the case with nightly
1696         builds.
1697         (WebCore::shouldUseCredentialStorageCallback): Added this
1698         CFURLConnection callback which calls through to
1699         ResourceHandle::shouldUseCredentialStorage().
1700         (WebCore::ResourceHandle::start): Pass a version 3 CFURLConnectionClient
1701         including the shouldUseCredentialStorage callback. At runtime, clamp the
1702         client structure version down to the highest supported by CFNetwork.
1703         (WebCore::ResourceHandle::shouldUseCredentialStorage): Added. Calls through
1704         to the client if there is one. Otherwise returns false.
1705         * platform/network/mac/ResourceHandleMac.mm:
1706         (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto.
1707         (-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]):
1708         Added this delegate method which callls through to
1709         ResourceHandle::shouldUseCredentialStorage().
1710
1711 2008-12-18  David Kilzer  <ddkilzer@apple.com>
1712
1713         Reset role to "Private" on 6 header files to fix clean builds after r39378
1714
1715         Reviewed by BUILD FIX.
1716
1717         * WebCore.xcodeproj/project.pbxproj: Added back "Private" role
1718         that was lost on 6 headers when they were "moved":
1719         AffineTransform.h, Animation.h, AnimationList.h,
1720         TimingFunction.h, TransformOperation.h and
1721         TransformOperations.h.
1722
1723 2008-12-18  Pamela Greene  <pam@chromium.org>
1724
1725         Reviewed by Dan Bernstein.
1726
1727         Add initializer for m_textDirectionSubmenuInclusionBehavior.
1728         https://bugs.webkit.org/show_bug.cgi?id=22926
1729
1730         * page/Settings.cpp:
1731         (WebCore::Settings::Settings): Initialize m_textDirectionSubmenuInclusionBehavior
1732
1733 2008-12-18  Sam Weinig  <sam@webkit.org>
1734
1735         Reviewed by John Sullivan.
1736
1737         Add new FrameLoaderClient method to indicate the first visually 
1738         non-empty layout based on an heuristic.  Right now that heuristic
1739         is the first layout after an image, text or plugin has been added
1740         to the render tree, but I can imagine it becoming much smarter.
1741
1742         * loader/EmptyClients.h:
1743         (WebCore::EmptyFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
1744         * loader/FrameLoader.cpp:
1745         (WebCore::FrameLoader::didFirstVisuallyNonEmptyLayout):
1746         * loader/FrameLoader.h:
1747         * loader/FrameLoaderClient.h:
1748         * page/FrameView.cpp:
1749         (WebCore::FrameViewPrivate::reset):
1750         (WebCore::FrameView::layout):
1751         (WebCore::FrameView::performPostLayoutTasks):
1752         (WebCore::FrameView::setIsVisuallyNonEmpty):
1753         * page/FrameView.h:
1754         * rendering/RenderImage.cpp:
1755         (WebCore::RenderImage::RenderImage):
1756         * rendering/RenderPartObject.cpp:
1757         (WebCore::RenderPartObject::RenderPartObject):
1758         * rendering/RenderText.cpp:
1759         (WebCore::RenderText::RenderText):
1760
1761 2008-12-18  Darin Adler  <darin@apple.com>
1762
1763         Reviewed by Sam Weinig.
1764
1765         - fix <rdar://problem/6449841> reduce memory use of ResourceResponseBase by removing two maps
1766
1767         We were parsing the cache-control and pragma header field values into maps.
1768         I changed that so instead we only cache two bits with the data we were actually
1769         using. Later we might want to move this responsibility out of this class entirely;
1770         we can cache it at the higher level instead.
1771
1772         * loader/CachedResource.cpp:
1773         (WebCore::CachedResource::mustRevalidate): Changed to call a specific API to get at
1774         the bits in quest instead of a general "cache control directives" API.
1775
1776         * platform/network/ResourceResponseBase.cpp:
1777         (WebCore::ResourceResponseBase::setHTTPHeaderField): Remove the logic for the
1778         pragma header field since no one is using this for now.
1779         (WebCore::ResourceResponseBase::parseCacheControlDirectives): Eliminated the return
1780         value and made this function have side effects only. Changed it so it's the caller's
1781         responsibility to check m_haveParsedCacheControl. Set m_cacheControlContainsNoCache
1782         and m_cacheControlContainsMustRevalidate rather than keeping a map around.
1783
1784         * platform/network/ResourceResponseBase.h:
1785         (WebCore::ResourceResponseBase::cacheControlContainsNoCache): Added.
1786         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate): Added.
1787         (WebCore::ResourceResponseBase::ResourceResponseBase): Updated since I removed
1788         m_haveParsedCacheControl and renamed m_haveParsedCacheControlHeader to remove
1789         the imprecise use of the term "header".
1790
1791 2008-12-18  Steve Falkenburg  <sfalken@apple.com>
1792
1793         Build fix.
1794         Delete 2nd copy of code in these files.
1795
1796         * platform/animation/Animation.cpp:
1797         * platform/animation/Animation.h:
1798         * platform/animation/AnimationList.cpp:
1799         * platform/animation/AnimationList.h:
1800         * platform/animation/TimingFunction.h:
1801         * platform/graphics/transforms/AffineTransform.cpp:
1802         * platform/graphics/transforms/AffineTransform.h:
1803         * platform/graphics/transforms/IdentityTransformOperation.h:
1804         * platform/graphics/transforms/MatrixTransformOperation.cpp:
1805         * platform/graphics/transforms/MatrixTransformOperation.h:
1806         * platform/graphics/transforms/RotateTransformOperation.cpp:
1807         * platform/graphics/transforms/RotateTransformOperation.h:
1808         * platform/graphics/transforms/ScaleTransformOperation.cpp:
1809         * platform/graphics/transforms/ScaleTransformOperation.h:
1810         * platform/graphics/transforms/SkewTransformOperation.cpp:
1811         * platform/graphics/transforms/SkewTransformOperation.h:
1812         * platform/graphics/transforms/TransformOperation.h:
1813         * platform/graphics/transforms/TransformOperations.cpp:
1814         * platform/graphics/transforms/TransformOperations.h:
1815         * platform/graphics/transforms/TranslateTransformOperation.cpp:
1816         * platform/graphics/transforms/TranslateTransformOperation.h:
1817
1818 2008-12-18  Dimitri Glazkov  <dglazkov@chromium.org>
1819
1820         Reviewed by Geoffrey Garen.
1821
1822         https://bugs.webkit.org/show_bug.cgi?id=22859
1823         Abstract away the use of JSDOMWindow in CachedPage and introduce
1824         ScriptCachedPageData abstraction.
1825
1826         * GNUmakefile.am: Added ScriptCachedPageData to project.
1827         * WebCore.pro: Added ScriptCachedPageData to project.
1828         * WebCore.vcproj/WebCore.vcproj: Added ScriptCachedPageData to project.
1829         * WebCore.xcodeproj/project.pbxproj: Added ScriptCachedPageData to
1830             project.
1831         * bindings/js/ScriptCachedPageData.cpp: Added.
1832         (WebCore::ScriptCachedPageData::ScriptCachedPageData):
1833         (WebCore::ScriptCachedPageData::~ScriptCachedPageData):
1834         (WebCore::ScriptCachedPageData::restore):
1835         (WebCore::ScriptCachedPageData::clear):
1836         * bindings/js/ScriptCachedPageData.h: Added.
1837         * history/CachedPage.cpp: Replaced JSDOMWindow and ProtectedPtr with
1838             ScriptCachedPageData.
1839         (WebCore::CachedPage::CachedPage):
1840         (WebCore::CachedPage::domWindow):
1841         (WebCore::CachedPage::restore):
1842         (WebCore::CachedPage::clear):
1843         * history/CachedPage.h: Replaced JSDOMWindow and ProtectedPtr with
1844             ScriptCachedPageData.
1845
1846 2008-12-18  Chris Marrin  <cmarrin@apple.com>
1847
1848         Reviewed by Dave Hyatt.
1849
1850         https://bugs.webkit.org/show_bug.cgi?id=22888
1851
1852         To avoid future dependency issues, all the TransformOperations and Animation related files need to be moved to platform
1853
1854         * WebCore.xcodeproj/project.pbxproj:
1855         * platform/animation: Added.
1856         * platform/animation/Animation.cpp: Copied from WebCore/rendering/style/Animation.cpp.
1857         * platform/animation/Animation.h: Copied from WebCore/rendering/style/Animation.h.
1858         * platform/animation/AnimationList.cpp: Copied from WebCore/rendering/style/AnimationList.cpp.
1859         * platform/animation/AnimationList.h: Copied from WebCore/rendering/style/AnimationList.h.
1860         * platform/animation/TimingFunction.h: Copied from WebCore/rendering/style/TimingFunction.h.
1861         * platform/graphics/AffineTransform.cpp: Removed.
1862         * platform/graphics/AffineTransform.h: Removed.
1863         * platform/graphics/transforms: Added.
1864         * platform/graphics/transforms/AffineTransform.cpp: Copied from WebCore/platform/graphics/AffineTransform.cpp.
1865         * platform/graphics/transforms/AffineTransform.h: Copied from WebCore/platform/graphics/AffineTransform.h.
1866         * platform/graphics/transforms/IdentityTransformOperation.h: Copied from WebCore/rendering/style/IdentityTransformOperation.h.
1867         * platform/graphics/transforms/MatrixTransformOperation.cpp: Copied from WebCore/rendering/style/MatrixTransformOperation.cpp.
1868         * platform/graphics/transforms/MatrixTransformOperation.h: Copied from WebCore/rendering/style/MatrixTransformOperation.h.
1869         * platform/graphics/transforms/RotateTransformOperation.cpp: Copied from WebCore/rendering/style/RotateTransformOperation.cpp.
1870         * platform/graphics/transforms/RotateTransformOperation.h: Copied from WebCore/rendering/style/RotateTransformOperation.h.
1871         * platform/graphics/transforms/ScaleTransformOperation.cpp: Copied from WebCore/rendering/style/ScaleTransformOperation.cpp.
1872         * platform/graphics/transforms/ScaleTransformOperation.h: Copied from WebCore/rendering/style/ScaleTransformOperation.h.
1873         * platform/graphics/transforms/SkewTransformOperation.cpp: Copied from WebCore/rendering/style/SkewTransformOperation.cpp.
1874         * platform/graphics/transforms/SkewTransformOperation.h: Copied from WebCore/rendering/style/SkewTransformOperation.h.
1875         * platform/graphics/transforms/TransformOperation.h: Copied from WebCore/rendering/style/TransformOperation.h.
1876         * platform/graphics/transforms/TransformOperations.cpp: Copied from WebCore/rendering/style/TransformOperations.cpp.
1877         * platform/graphics/transforms/TransformOperations.h: Copied from WebCore/rendering/style/TransformOperations.h.
1878         * platform/graphics/transforms/TranslateTransformOperation.cpp: Copied from WebCore/rendering/style/TranslateTransformOperation.cpp.
1879         * platform/graphics/transforms/TranslateTransformOperation.h: Copied from WebCore/rendering/style/TranslateTransformOperation.h.
1880         * rendering/style/Animation.cpp: Removed.
1881         * rendering/style/Animation.h: Removed.
1882         * rendering/style/AnimationList.cpp: Removed.
1883         * rendering/style/AnimationList.h: Removed.
1884         * rendering/style/IdentityTransformOperation.h: Removed.
1885         * rendering/style/MatrixTransformOperation.cpp: Removed.
1886         * rendering/style/MatrixTransformOperation.h: Removed.
1887         * rendering/style/RotateTransformOperation.cpp: Removed.
1888         * rendering/style/RotateTransformOperation.h: Removed.
1889         * rendering/style/ScaleTransformOperation.cpp: Removed.
1890         * rendering/style/ScaleTransformOperation.h: Removed.
1891         * rendering/style/SkewTransformOperation.cpp: Removed.
1892         * rendering/style/SkewTransformOperation.h: Removed.
1893         * rendering/style/TimingFunction.h: Removed.
1894         * rendering/style/TransformOperation.h: Removed.
1895         * rendering/style/TransformOperations.cpp: Removed.
1896         * rendering/style/TransformOperations.h: Removed.
1897         * rendering/style/TranslateTransformOperation.cpp: Removed.
1898         * rendering/style/TranslateTransformOperation.h: Removed.
1899
1900 2008-12-18  Cameron Zwarich  <zwarich@apple.com>
1901
1902         Reviewed by Geoff Garen.
1903
1904         Bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link
1905         <https://bugs.webkit.org/show_bug.cgi?id=21855>
1906         <rdar://problem/6278244>
1907
1908         If JavaScript is not currently executing, the handleEvent member function
1909         of JSAbstractEventListener should set the dynamic global object to the
1910         global object of the context in which the event occurred.
1911         
1912         If this is not set, then JavaScriptCore will simply take the global object
1913         of the context where the event handler function was created, which may be
1914         a different frame. This will cause the popup blocker to incorrectly block
1915         windows opened from onclick events inside of an iframe whose handler was
1916         created in the outer frame, as it will check the outer frame and see that
1917         it is not processing any events.
1918
1919         * bindings/js/JSEventListener.cpp:
1920         (WebCore::JSAbstractEventListener::handleEvent):
1921
1922 2008-12-17  Simon Fraser  <simon.fraser@apple.com>
1923
1924         Reviewed by Dave Hyatt
1925
1926         https://bugs.webkit.org/show_bug.cgi?id=22570
1927         
1928         Add the ability to compute clip rects independently from
1929         caching them on the RenderLayer. When painting reflections, use 
1930         such temporarily computed clipRects, otherwise the layer may cache
1931         clipRects which are invalid, since they have been computed with
1932         a rootLayer that is not the one usually used to paint.
1933         
1934         Test: fast/reflections/reflection-overflow-hidden.html
1935
1936         * rendering/RenderLayer.cpp:
1937         (WebCore::RenderLayer::paintLayer):
1938         (WebCore::RenderLayer::hitTestLayer):
1939         (WebCore::RenderLayer::updateClipRects):
1940         (WebCore::RenderLayer::calculateClipRects):
1941         (WebCore::RenderLayer::calculateRects):
1942         * rendering/RenderLayer.h:
1943         (WebCore::ClipRects::ClipRects):
1944         (WebCore::ClipRects::reset):
1945         (WebCore::ClipRects::overflowClipRect):
1946         (WebCore::ClipRects::setOverflowClipRect):
1947         (WebCore::ClipRects::fixedClipRect):
1948         (WebCore::ClipRects::setFixedClipRect):
1949         (WebCore::ClipRects::posClipRect):
1950         (WebCore::ClipRects::setPosClipRect):
1951         (WebCore::ClipRects::setFixed):
1952         (WebCore::ClipRects::operator==):
1953         (WebCore::ClipRects::operator=):
1954         * rendering/RenderReplica.cpp:
1955         (WebCore::RenderReplica::paint):
1956
1957 2008-12-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1958
1959         Reviewed by Simon Hausmann.
1960
1961         https://bugs.webkit.org/show_bug.cgi?id=22618
1962
1963         Fix MinGW QtWebKit linking problems and also make the 
1964         QtWebKit build system more robust.
1965
1966         * WebCore.pro:
1967
1968 2008-12-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1969
1970         Reviewed by Maciej Stachowiak.
1971
1972         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22866
1973
1974         wml.css is based on an older copy of html4.css. Synchronize them.
1975         Remove all entries, that are irrelevant for WML.
1976
1977         Fix <do> appearance: should behave like HTMLs <button>.
1978
1979         * css/wml.css:
1980
1981 2008-12-17  Yury Semikhatsky <yurys@google.com>
1982
1983         Reviewed by Timothy Hatcher.
1984         Landed by Adam Barth.
1985
1986         Added more checks that WebInspector.panels.{resources,scripts} are
1987         defined where they are accessed from other panels and WebInspector
1988         (some panels are not yet supported in Chrome).
1989
1990         * inspector/front-end/Console.js:
1991         (WebInspector.Console.prototype.addMessage):
1992         (WebInspector.Console.prototype.clearMessages):
1993         (WebInspector.Console.prototype.completions):
1994         * inspector/front-end/ObjectPropertiesSection.js:
1995         (WebInspector.ObjectPropertyTreeElement.prototype.evaluateExpression):
1996         * inspector/front-end/ScriptsPanel.js:
1997         (WebInspector.ScriptsPanel.prototype.get searchableViews):
1998         (WebInspector.ScriptsPanel.prototype._sourceViewForScriptOrResource):
1999         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
2000         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
2001         * inspector/front-end/SourceView.js:
2002         (WebInspector.SourceView.prototype._addBreakpoint):
2003         * inspector/front-end/inspector.js:
2004         (WebInspector.addResource):
2005         (WebInspector.removeResource):
2006         (WebInspector.showResourceForURL):
2007
2008 2008-12-17  Cary Clark  < caryclark@google.com>
2009
2010         Reviewed by Darin Adler.
2011         Landed by Adam Barth.
2012
2013         Add ENABLE_TEXT_CARET to permit the ANDROID platform
2014         to invalidate and draw the caret in a separate thread.
2015
2016         * page/Frame.cpp:
2017         (WebCore::Frame::clearCaretRectIfNeeded): Body of
2018         function does nothing if text caret is disabled.
2019         (WebCore::Frame::selectionLayoutChanged): Do nothing
2020         if text caret is disabled and the caret only blinked.
2021         (WebCore::Frame::caretBlinkTimerFired):
2022         (WebCore::Frame::paintCaret):
2023         (WebCore::Frame::paintDragCaret): Body of
2024         functions does nothing if text caret is disabled.
2025
2026 2008-12-16  Darin Adler  <darin@apple.com>
2027
2028         Reviewed and landed by Cameron Zwarich.
2029
2030         Change the style of AtomicString::add() to match Identifier:add().
2031
2032         * platform/text/AtomicString.cpp:
2033         (WebCore::AtomicString::add):
2034
2035 2008-12-16  Adele Peterson  <adele@apple.com>
2036
2037         Reviewed by Darin Adler.
2038
2039         Fix for https://bugs.webkit.org/show_bug.cgi?id=22827
2040         <rdar://problem/6247724> RenderThemeWin buttons have weird heavy text
2041
2042         * rendering/RenderThemeWin.cpp:
2043         (WebCore::fillFontDescription): Add version that takes a font size.
2044         (WebCore::RenderThemeWin::systemFont): Use the default GUI font for control fonts, but specify the size.
2045         This will match Firefox.
2046
2047 2008-12-16  Stephanie Lewis  <slewis@apple.com>
2048
2049         Another build fix.
2050
2051         * platform/text/AtomicString.h:
2052         (WebCore::AtomicString::AtomicString):
2053
2054 2008-12-16  Stephanie Lewis  <slewis@apple.com>
2055
2056         Windows Build Fix.
2057
2058         * platform/text/AtomicString.h:
2059         (WebCore::AtomicString::AtomicString):
2060         (WebCore::AtomicString::createCFString):
2061
2062 2008-12-16  Peter Kasting  <pkasting@google.com>
2063
2064         Reviewed by David Hyatt.
2065
2066         https://bugs.webkit.org/show_bug.cgi?id=22885
2067         Fix memory corruption in GIFImageDecoder.cpp with certain GIFs.
2068
2069         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2070         (WebCore::GIFImageDecoder::frameComplete):
2071
2072 2008-12-16  Stephanie Lewis  <slewis@apple.com>
2073
2074         Reviewed by Geoff Garen.
2075
2076         Change HTTPHeaderMap to use an AtomicString as its key.  
2077         Shaves ~1MB off of the Mozilla Memory Test
2078         No functionality difference    
2079
2080         * WebCore.xcodeproj/project.pbxproj:
2081         * inspector/InspectorController.cpp:
2082         (WebCore::addHeaders):
2083         * loader/appcache/ApplicationCacheStorage.cpp:
2084         (WebCore::parseHeader):
2085         * platform/network/HTTPHeaderMap.h:
2086         * platform/network/ResourceRequestBase.cpp:
2087         (WebCore::ResourceRequestBase::httpHeaderField):
2088         (WebCore::ResourceRequestBase::setHTTPHeaderField):
2089         (WebCore::ResourceRequestBase::addHTTPHeaderField):
2090         * platform/network/ResourceRequestBase.h:
2091         * platform/network/ResourceResponseBase.cpp:
2092         (WebCore::ResourceResponseBase::httpHeaderField):
2093         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2094         * platform/network/ResourceResponseBase.h:
2095         * platform/text/StringHash.h:
2096         (WebCore::CaseFoldingHash::hash):
2097         (WebCore::CaseFoldingHash::equal):
2098         * xml/XMLHttpRequest.cpp:
2099         (WebCore::isSetCookieHeader):
2100         (WebCore::XMLHttpRequest::setRequestHeader):
2101         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2102         (WebCore::XMLHttpRequest::getRequestHeader):
2103         (WebCore::XMLHttpRequest::getResponseHeader):
2104         * xml/XMLHttpRequest.h:
2105
2106 2008-12-16  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2107
2108         Reviewed by Darin Adler.
2109
2110         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22876
2111
2112         Remove legacy randomNumber() functionality from HTMLFormElement, and use the new wtf/RandomNumber.h.
2113         Also remove an uneeded QFileInfo include while I'm at it - there is no Qt usage in this file.
2114
2115         * ForwardingHeaders/wtf/RandomNumber.h: Added.
2116         * html/HTMLFormElement.cpp:
2117         (WebCore::getUniqueBoundaryString):
2118
2119 2008-12-16 Yael Aharon <yael.aharon@nokia.com>
2120
2121         Reviewed by Tor Arne Vestbø.
2122
2123         Qt/Win build fix
2124
2125         * platform/win/SystemTimeWin.cpp:
2126
2127 2008-12-16  Kalle Vahlman  <kalle.vahlman@movial.com>
2128
2129         Reviewed by Holger Freyther.
2130
2131         [CURL] memory leak of ResouceHandles
2132         http://bugs.webkit.org/show_bug.cgi?id=20777
2133
2134         Fix ResourceHandle ref management to be consistent and correct.
2135         Original patch from Marco Barisione.
2136
2137         * platform/network/curl/ResourceHandleCurl.cpp:
2138         (WebCore::ResourceHandle::start):
2139         * platform/network/curl/ResourceHandleManager.cpp:
2140         (WebCore::ResourceHandleManager::removeFromCurl):
2141         (WebCore::ResourceHandleManager::add):
2142         (WebCore::ResourceHandleManager::removeScheduledJob):
2143
2144 2008-12-16  Simon Hausmann  <simon.hausmann@nokia.com>
2145
2146         Fix the Qt build.
2147
2148         * platform/graphics/qt/ImageSourceQt.cpp:
2149         (WebCore::ImageSource::clear): Adjust to new signature.
2150
2151 2008-12-15  Mark Rowe  <mrowe@apple.com>
2152
2153         Rubber-stamped by Cameron Zwarich.
2154
2155         <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2156
2157         * Configurations/Base.xcconfig:
2158         * Configurations/DebugRelease.xcconfig:
2159
2160 2008-12-15  Adele Peterson  <adele@apple.com>
2161
2162         Reviewed by Darin Adler.
2163
2164         Fix for https://bugs.webkit.org/show_bug.cgi?id=22871
2165         <rdar://problem/6417316> RenderThemeWin buttons are too short/thin
2166
2167         * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 
2168         Check if the button's style (not the new inner style) has appearance set to determine whether we should set padding on the inner style.
2169
2170 2008-12-15  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2171
2172         Reviewed by Oliver Hunt.
2173
2174         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22865
2175
2176         Add complete WML <table> / <tr> / <td> element support.
2177         Proper handling of all table related attributes, including tests.
2178
2179         Tests: fast/wml/table-element-align-attribute-invalid.wml (variable reference in 'align' attribute, raises error)
2180                fast/wml/table-element-columns-attribute-invalid-number.wml (columns='0', raises error)
2181                fast/wml/table-element-columns-attribute-invalid.wml (non-numeric 'columns' attribute value, raises error)
2182                fast/wml/table-element-columns-attribute-missing.wml (missing 'columns')
2183                fast/wml/table-element-columns-attribute.wml (test 'columns' attribute and <td> count mismatches)
2184
2185         * GNUmakefile.am:
2186         * WebCore.pro:
2187         * WebCore.vcproj/WebCore.vcproj:
2188         * WebCore.xcodeproj/project.pbxproj:
2189         * rendering/RenderObject.cpp:
2190         (WebCore::RenderObject::offsetParent):
2191         * rendering/RenderTableRow.cpp:
2192         (WebCore::RenderTableRow::addChild):
2193         * wml/WMLTableElement.cpp: Added.
2194         (WebCore::WMLTableElement::WMLTableElement):
2195         (WebCore::WMLTableElement::~WMLTableElement):
2196         (WebCore::WMLTableElement::mapToEntry):
2197         (WebCore::WMLTableElement::parseMappedAttribute):
2198         (WebCore::WMLTableElement::finishParsingChildren):
2199         * wml/WMLTableElement.h: Added.
2200         * wml/WMLTagNames.in:
2201
2202 2008-12-15  Darin Adler  <darin@apple.com>
2203
2204         Reviewed by Sam Weinig.
2205
2206         - fix <rdar://problem/6427048> crash due to infinite recursion after setting window.__proto__ = window
2207
2208         Test: fast/dom/Window/window-custom-prototype.html
2209
2210         Replaced toGlobalObject with the more generally useful unwrappedObject.
2211
2212         * bindings/js/JSDOMWindowShell.cpp:
2213         (WebCore::JSDOMWindowShell::unwrappedObject): Added.
2214         * bindings/js/JSDOMWindowShell.h: Declared unwrappedObject.
2215         * bindings/js/JSQuarantinedObjectWrapper.h:
2216         (WebCore::JSQuarantinedObjectWrapper::unwrappedObject): Ditto.
2217
2218 2008-12-15  Gustavo Noronha Silva  <kov@kov.eti.br>
2219
2220         Reviewed by Mark Rowe.
2221
2222         https://bugs.webkit.org/show_bug.cgi?id=22686
2223
2224         GTK+ build fix.
2225
2226         * GNUmakefile.am:
2227
2228 2008-12-15  Sam Weinig  <sam@webkit.org>
2229
2230         Reviewed by Darin Adler.
2231
2232         Fix for https://bugs.webkit.org/show_bug.cgi?id=22847
2233         Geolocation PositionOptions cannot be an arbitrary object.
2234
2235         Allow the PositionOptions to be a vanilla JS object and parse it
2236         appropriately.
2237
2238         * DerivedSources.make: Remove PositionOptions.
2239         * GNUmakefile.am: Ditto.
2240         * WebCore.pro: Ditto.
2241         * WebCore.vcproj/WebCore.vcproj: Ditto.
2242         * WebCore.xcodeproj/project.pbxproj: Ditto.
2243         * WebCoreSources.bkl: Ditto.
2244
2245         * bindings/js/JSGeolocationCustom.cpp:
2246         (WebCore::createPositionOptions): Added. Extracts the enableHighAccuracy
2247         and timeout fields from a vanilla JS object in order to create the 
2248         PositionOptions object, checking for exceptions as necessary.
2249         (WebCore::JSGeolocation::getCurrentPosition): Use createPositionOptions
2250         instead of toPositionOptions.
2251         (WebCore::JSGeolocation::watchPosition): Ditto.
2252         * page/PositionOptions.idl: Removed
2253
2254 2008-12-15  Peter Kasting  <pkasting@google.com>
2255
2256         Reviewed by David Hyatt.
2257
2258         https://bugs.webkit.org/show_bug.cgi?id=22108
2259         Large animated GIFs weren't always animating.  The code that deleted
2260         the entire decoder after each frame of a large image was resulting in
2261         us forgetting the loop count, breaking animations intermittently.
2262
2263         Instead of throwing the whole decoder away, we're more careful to just
2264         delete frames we don't care about.  This additionally addresses
2265         problems in the Cairo and Chromium ports with excessive peak memory
2266         use and CPU use when decoding large animated GIFs because it leads to
2267         much less redecoding (O(n) instead of O(n^2) CPU, and O(1) instead of
2268         O(n) memory).
2269
2270         This change has less impact on the CG decoder, which seems to throw
2271         away frames automatically when their external references are dropped;
2272         this means the CG decoder didn't suffer from the peak memory usage
2273         issue before (and still doesn't), but it also still burns excessive
2274         CPU redecoding earlier frames, that in theory it wouldn't need to
2275         redecode if it would judiciously save the most recent frames.  At
2276         least this patch plumbs some useful info to the ImageSource so it can
2277         help guide the CG decoder heuristics in the future.
2278
2279         * platform/graphics/BitmapImage.cpp:
2280         (WebCore::frameBytes):
2281         (WebCore::BitmapImage::destroyDecodedData):
2282         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2283         (WebCore::BitmapImage::destroyMetadataAndNotify):
2284         (WebCore::BitmapImage::clearFrame):
2285         (WebCore::BitmapImage::cacheFrame):
2286         (WebCore::BitmapImage::dataChanged):
2287         (WebCore::BitmapImage::startAnimation):
2288         (WebCore::BitmapImage::resetAnimation):
2289         (WebCore::BitmapImage::internalAdvanceAnimation):
2290         * platform/graphics/BitmapImage.h:
2291         * platform/graphics/GeneratedImage.h:
2292         (WebCore::GeneratedImage::destroyDecodedData):
2293         * platform/graphics/Image.h:
2294         * platform/graphics/ImageSource.h:
2295         * platform/graphics/cairo/ImageSourceCairo.cpp:
2296         (WebCore::ImageSource::~ImageSource):
2297         (WebCore::ImageSource::clear):
2298         * platform/graphics/cg/ImageSourceCG.cpp:
2299         (WebCore::ImageSource::~ImageSource):
2300         (WebCore::ImageSource::clear):
2301         * platform/graphics/cg/PDFDocumentImage.h:
2302         (WebCore::PDFDocumentImage::destroyDecodedData):
2303         * platform/graphics/qt/StillImageQt.h:
2304         (WebCore::StillImage::destroyDecodedData):
2305         * platform/image-decoders/ImageDecoder.h:
2306         (WebCore::RGBA32Buffer::clear):
2307         (WebCore::ImageDecoder::clearFrameBufferCache):
2308         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2309         (WebCore::GIFImageDecoder::repetitionCount):
2310         (WebCore::GIFImageDecoder::clearFrameBufferCache):
2311         (WebCore::GIFImageDecoder::initFrameBuffer):
2312         * platform/image-decoders/gif/GIFImageDecoder.h:
2313         * platform/image-decoders/gif/GIFImageReader.h:
2314         (GIFImageReader::GIFImageReader):
2315         * svg/graphics/SVGImage.h:
2316         (WebCore::SVGImage::destroyDecodedData):
2317
2318 2008-12-15  Cameron Zwarich  <zwarich@apple.com>
2319
2320         Reviewed by Darin Adler.
2321
2322         Bug 22562: REGRESSION (r37971): events not firing after going back in back/forward cache
2323         <https://bugs.webkit.org/show_bug.cgi?id=22562>
2324         <rdar://problem/6414593>
2325
2326         Restore the Frame's DOMWindow to its previous value when going back in
2327         the back/forward cache. The fact that it was not getting set before may
2328         have always caused some subtle bugs with the back/forward cache, but
2329         after r37971, it causes no events to fire after restoring a page.
2330
2331         Previously, ScriptController::clearScriptObjects() was calling
2332         clearPlatformScriptObjects(), which was not actually clearing any
2333         objects, only updating them to reflect some change in state. Since the
2334         window shell was not updated until after the call to clearScriptObjects(),
2335         this didn't actually make that much sense.
2336
2337         We rename clearPlatformScriptObjects() to reflect its actual purpose and
2338         call it after the window shell has been updated rather than before.
2339
2340         Unfortunately, there is no way to test this with a layout test because
2341         it involves the back/forward cache.
2342
2343         * bindings/js/ScriptController.cpp:
2344         (WebCore::ScriptController::updatePlatformScriptObjects): Renamed from
2345         clearPlatformScriptObjects(), because the only nonempty implementation
2346         doesn't actually clear any objects, it updates them. Also made public.
2347         (WebCore::ScriptController::clearScriptObjects): Remove the call to
2348         clearPlatformScriptObjects().
2349         * bindings/js/ScriptController.h:
2350         * bindings/js/ScriptControllerMac.mm:
2351         (WebCore::ScriptController::updatePlatformScriptObjects):
2352         * history/CachedPage.cpp:
2353         (WebCore::CachedPage::domWindow): Added.
2354         * history/CachedPage.h:
2355         * loader/FrameLoader.cpp:
2356         (WebCore::FrameLoader::cancelAndClear): Added call to updatePlatformScriptObjects().
2357         (WebCore::FrameLoader::begin): Added call to updatePlatformScriptObjects().
2358         (WebCore::FrameLoader::open): Added call to updatePlatformScriptObjects().
2359         * page/Frame.cpp:
2360         (WebCore::Frame::setDOMWindow): Added.
2361         (WebCore::Frame::pageDestroyed): Added call to updatePlatformScriptObjects().
2362         * page/Frame.h:
2363
2364 2008-12-15  Antti Koivisto  <antti@apple.com>
2365
2366         Reviewed by Darin Adler.
2367
2368         When a resource is cached locally, WebKit should follow RFC 2616 "Specific end-to-end revalidation" instead of "Unspecified end-to-end revalidation"
2369         https://bugs.webkit.org/show_bug.cgi?id=17998 
2370         
2371         - Enable conditional revalidation for reloads by default. 
2372         - Add a parameter to FrameLoader::reload() for forcing end-to-end reload.
2373         - To avoid duplicating state remove m_cachePolicy variables from FrameLoader and DocLoader. 
2374           Instead synthezise the policy on demand.
2375         
2376         This speeds up reloads and makes them use way less bandwidth.
2377
2378         * WebCore.base.exp:
2379         * loader/CachePolicy.h: Rename CachePolicyRefresh to CachePolicyRevalidate.
2380         (WebCore::):
2381         * loader/DocLoader.cpp:
2382         (WebCore::DocLoader::DocLoader):
2383         (WebCore::DocLoader::checkForReload): Support CachePolicyRevalidate.
2384         (WebCore::DocLoader::requestResource):
2385         (WebCore::DocLoader::cachePolicy):
2386         * loader/DocLoader.h: Get rid of m_cachePolicy member. 
2387         * loader/FrameLoader.cpp:
2388         (WebCore::ScheduledRedirection::ScheduledRedirection): 
2389             Add parameter to differentiate refresh from other types of redirects. 
2390             m_cachePolicy was used for signaling this before.
2391         (WebCore::isBackForwardLoadType):
2392         (WebCore::FrameLoader::FrameLoader):
2393         (WebCore::FrameLoader::changeLocation):
2394         (WebCore::FrameLoader::stopLoading):
2395         (WebCore::FrameLoader::receivedFirstData):
2396         (WebCore::FrameLoader::write):
2397         (WebCore::FrameLoader::startIconLoader):
2398         (WebCore::FrameLoader::restoreDocumentState):
2399         (WebCore::FrameLoader::scheduleHTTPRedirection):
2400         (WebCore::FrameLoader::scheduleLocationChange):
2401         (WebCore::FrameLoader::scheduleRefresh):
2402         (WebCore::FrameLoader::redirectionTimerFired):
2403         (WebCore::FrameLoader::canCachePage):
2404         (WebCore::FrameLoader::loadURL):
2405         (WebCore::FrameLoader::reload): 
2406             Differentiate between revalidation and reload.
2407             No need to use setHTTPHeaderField here, addExtraFieldsToRequest will set the headers.
2408         (WebCore::FrameLoader::transitionToCommitted):
2409         (WebCore::FrameLoader::cachePolicy): Determine the cache policy based on current load type. 
2410         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2411         (WebCore::FrameLoader::addExtraFieldsToRequest): Set Cache-control: no-cache for FrameLoadTypeReloadFromOrigin
2412         (WebCore::FrameLoader::shouldScrollToAnchor):
2413         (WebCore::FrameLoader::loadItem):
2414         (WebCore::FrameLoader::updateHistoryForReload):
2415         (WebCore::FrameLoader::updateHistoryForCommit):
2416         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2417         * loader/FrameLoader.h:
2418         * loader/FrameLoaderTypes.h: Add FrameLoadTypeReloadFromOrigin
2419         (WebCore::):
2420         * loader/NavigationAction.cpp: 
2421         (WebCore::navigationType):  Support FrameLoadTypeReloadFromOrigin
2422         * loader/loader.cpp:
2423         (WebCore::Loader::Host::servePendingRequests):
2424
2425 2008-12-15  Holger Hans Peter Freyther  <zecke@selfish.org>
2426
2427         Reviewed by Simon Hausmann.
2428
2429         Add null checks to PlatformScreenQt
2430
2431         The other ports do the null checks and JSDOMWindowBase is
2432         at least one caller that is passing 0.
2433
2434         * platform/qt/PlatformScreenQt.cpp:
2435         (WebCore::screenDepth):
2436         (WebCore::screenDepthPerComponent):
2437         (WebCore::screenIsMonochrome):
2438         (WebCore::screenRect):
2439         (WebCore::screenAvailableRect):
2440
2441 2008-12-15  Alexey Proskuryakov  <ap@webkit.org>
2442
2443         Reviewed by Oliver Hunt.
2444
2445         <rdar://problem/6444455> Worker Thread crash running multiple workers for a moderate amount of time
2446
2447         * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
2448         Detach the thread. Without this, one page of its stack was never unmmaped, and fragmentation
2449         made RegisterFile allocaiton fail after a while.
2450
2451 2008-12-13  Darin Adler  <darin@apple.com>
2452
2453         Reviewed by Sam Weinig.
2454
2455         - half of https://bugs.webkit.org/show_bug.cgi?id=17425
2456           eliminate DeprecatedPtrList
2457
2458         * dom/Document.cpp:
2459         (WebCore::Document::removeImage): Change to set slots in the vector
2460         to 0 rather than removing items from a list.
2461         (WebCore::Document::dispatchImageLoadEventsNow): Rewrite to process
2462         the list. Since we now use a "set to zero" design, we don't need to
2463         be careful about where the iterator points while iterating the list,
2464         instead we just have to skip zeros.
2465
2466         * dom/Document.h: Use Vector instead of DeprecatedPtrList.
2467
2468         * dom/EventTargetNode.cpp:
2469         (WebCore::EventTargetNode::dispatchGenericEvent): Use a Vector instead
2470         of a DeprecatedPtrList for the list of nodes to handle. Also streamlined
2471         the logic a bit and used goto in a couple key places.
2472
2473         * dom/Node.cpp:
2474         (WebCore::Node::eventParentNode): Moved this function into this file
2475         because it's a virtual function so already can't be inlined. Also updated
2476         to return a ContainerNode, so it needs to be in a place where the
2477         definition of ContainerNode is visible, not the header file.
2478
2479         * dom/Node.h: Changed return type of eventParentNode to ContainerNode
2480         and moved its definition into the cpp file.
2481
2482         * dom/XMLTokenizerLibxml2.cpp:
2483         (WebCore::PendingCallbacks::~PendingCallbacks): Added a call to
2484         deleteAllValues here instead of setAutoDelete in the constructor, since
2485         we're using Deque instead of DeprecatedPtrList.
2486         (WebCore::PendingCallbacks::callAndRemoveFirstCallback): Changed the
2487         code to use an OwnPtr since the deque won't delete the callback object.
2488
2489         * editing/ApplyStyleCommand.cpp:
2490         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Use a
2491         Vector instead of a DeprecatedPtrList.
2492
2493         * svg/SVGElement.cpp:
2494         (WebCore::SVGElement::eventParentNode): Moved this function into this file
2495         because it's a virtual function so already can't be inlined. Also updated
2496         to return a ContainerNode.
2497
2498         * svg/SVGElement.h: Changed setShadowParentNode to take a ContainerNode*,
2499         made eventParentNode return a ContainerNode*, and made m_shadowParent a
2500         ContainerNode*.
2501
2502 2008-12-14  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2503
2504         Reviewed by George Staikos.
2505
2506         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22857
2507
2508         Jumps within a WML deck using <go> task elements fail. Manual reloading
2509         is necessary to display the page - fix cache-policy in WMLGoElement::executeTask
2510         to prevent the problem.
2511
2512         Refactor setActiveCardInDocument in two new functions: findNamedCardInDocument
2513         and determineActiveCard, to fix a side-effect of executing a <go> task:
2514         when switching cards within a deck the active card was changed before the load
2515         was fired which resulted in a flash effect on the screen, and doing unnecessary work.
2516
2517         Test: wml/go-task-animation.html
2518
2519         * wml/WMLCardElement.cpp:
2520         (WebCore::WMLCardElement::findNamedCardInDocument):
2521         (WebCore::WMLCardElement::determineActiveCard):
2522         * wml/WMLCardElement.h:
2523         * wml/WMLDocument.cpp:
2524         (WebCore::WMLDocument::finishedParsing):
2525         * wml/WMLGoElement.cpp:
2526         (WebCore::WMLGoElement::executeTask):
2527         (WebCore::WMLGoElement::prepareGETRequest):
2528         * wml/WMLGoElement.h:
2529
2530 2008-12-14  Dirk Schulze  <krit@webkit.org>
2531
2532         Reviewed by Oliver Hunt.
2533
2534         Fixes an issue in cairo. A fully transparent color can cause wrong
2535         drawings on canvas' composite.
2536
2537         https://bugs.webkit.org/show_bug.cgi?id=22846
2538         [CAIRO] Canvas: transparent color and composite
2539
2540         Test: fast/canvas/canvas-transparency-and-composite.html
2541
2542         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2543         (WebCore::GraphicsContext::fillPath):
2544         (WebCore::GraphicsContext::strokePath):
2545
2546 2008-12-13  Julien Chaffraix  <jchaffraix@webkit.org>
2547
2548         Reviewed by Darin Adler.
2549
2550         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
2551         https://bugs.webkit.org/show_bug.cgi?id=22665
2552
2553         Remove setCreatedByParser from frame and iframe.
2554
2555         * html/HTMLElementFactory.cpp:
2556         (WebCore::frameConstructor):
2557         (WebCore::iframeConstructor):
2558         (WebCore::objectConstructor):
2559         * html/HTMLFrameElement.cpp:
2560         (WebCore::HTMLFrameElement::HTMLFrameElement):
2561         * html/HTMLFrameElement.h:
2562         * html/HTMLFrameElementBase.cpp:
2563         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2564         * html/HTMLFrameElementBase.h:
2565         * html/HTMLFrameOwnerElement.cpp:
2566         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
2567         * html/HTMLFrameOwnerElement.h:
2568         (WebCore::HTMLFrameOwnerElement::createdByParser):
2569         * html/HTMLIFrameElement.cpp:
2570         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2571         * html/HTMLIFrameElement.h:
2572         * html/HTMLPlugInElement.cpp:
2573         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2574         * html/HTMLTagNames.in:
2575
2576 2008-12-13  Alexey Proskuryakov  <ap@webkit.org>
2577
2578         Reviewed by Darin Adler.
2579
2580         https://bugs.webkit.org/show_bug.cgi?id=22843
2581         Auto-generate JSWorkerContext
2582
2583         * bindings/scripts/CodeGeneratorJS.pm:
2584         * dom/WorkerContext.idl: Added.
2585         * page/DOMWindow.idl:
2586         Added ExtendsDOMGlobalObject, a new attribute for behaviors common to DOMWindow and
2587         WorkerContext.
2588
2589         * bindings/js/WorkerScriptController.cpp:
2590         (WebCore::WorkerScriptController::initScript):
2591         Made JSWorkerContext creation look more like JSDOMWindow creation, to work with generated code.
2592
2593         * DerivedSources.make:
2594         * GNUmakefile.am:
2595         * WebCore.pro:
2596         * WebCore.scons:
2597         * WebCore.vcproj/WebCore.vcproj:
2598         * WebCore.xcodeproj/project.pbxproj:
2599         * bindings/js/JSWorkerContext.cpp: Removed.
2600         * bindings/js/JSWorkerContext.h: Removed.
2601         * bindings/js/JSWorkerContextBase.cpp: Copied from WebCore/bindings/js/JSWorkerContext.cpp.
2602         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
2603         (WebCore::JSWorkerContextBase::~JSWorkerContextBase):
2604         (WebCore::JSWorkerContextBase::scriptExecutionContext):
2605         (WebCore::getJSWorkerContextBaseTable):
2606         (WebCore::):
2607         (WebCore::JSWorkerContextBase::put):
2608         * bindings/js/JSWorkerContextBase.h: Copied from WebCore/bindings/js/JSWorkerContext.h.
2609         * bindings/js/JSWorkerContextCustom.cpp: Added.
2610         (WebCore::JSWorkerContext::customGetOwnPropertySlot):
2611         (WebCore::JSWorkerContext::mark):
2612         (WebCore::JSWorkerContext::self):
2613         (WebCore::JSWorkerContext::setSelf):
2614         (WebCore::JSWorkerContext::addEventListener):
2615         (WebCore::JSWorkerContext::removeEventListener):
2616         Moved code around. Note that currently, JSWorkerContextBase lookup table is empty, but we'll
2617         need to add some global objects to it in the future, as it is done in JSDOMWindowBase.
2618
2619         * page/WorkerNavigator.cpp:
2620         * page/WorkerNavigator.h:
2621         Added ENABLE(WORKERS) ifdefs.
2622
2623 2008-12-13  Darin Adler  <darin@apple.com>
2624
2625         - fix Release build
2626
2627         * dom/Node.cpp:
2628         (WebCore::Node::rareData): Remove inappropriate inline directive.
2629
2630 2008-12-13  Darin Adler  <darin@apple.com>
2631
2632         Reviewed by Dan Bernstein.
2633
2634         - fix https://bugs.webkit.org/show_bug.cgi?id=18734
2635           REGRESSION (r31081): Focus problems in Gmail 2/Plain text message text
2636           <rdar://problem/5892415>
2637
2638         Test: fast/forms/textarea-selection-preservation.html
2639
2640         The regression reported was caused by the fact that the renderer code had
2641         a bug where it would constantly think the newline at the end of text was
2642         missing, and so it would replace all the text even though it wasn't changing,
2643         which would destroy the selection.
2644
2645         When writing the regression test I discovered another problem: The value
2646         property in HTMLTextAreaElement was intentionally changing the selection
2647         to the end of the textarea, but doing that even when the value wasn't changing.
2648
2649         This patch fixes both and the test checks both.
2650
2651         * html/HTMLTextAreaElement.cpp:
2652         (WebCore::HTMLTextAreaElement::setValue): Exit early if the value is
2653         not changing.
2654
2655         * rendering/RenderTextControl.cpp:
2656         (WebCore::RenderTextControl::text): Add a newline character for each <br>
2657         element encountered in the control
2658
2659 2008-12-13  Darin Adler  <darin@apple.com>
2660
2661         - file deletion part of https://bugs.webkit.org/show_bug.cgi?id=17497
2662           eliminate DeprecatedValueList
2663
2664         * GNUmakefile.am: Removed references to deleted files.
2665         * WebCore.pro: Ditto.
2666         * WebCore.scons: Ditto.
2667         * WebCore.vcproj/WebCore.vcproj: Ditto.
2668         * WebCore.xcodeproj/project.pbxproj: Ditto.
2669         * WebCoreSources.bkl: Ditto.
2670
2671         * platform/DeprecatedPtrQueue.h: Removed.
2672         * platform/DeprecatedValueList.h: Removed.
2673         * platform/DeprecatedValueListImpl.cpp: Removed.
2674         * platform/DeprecatedValueListImpl.h: Removed.
2675
2676 2008-12-13  Darin Adler  <darin@apple.com>
2677
2678         Reviewed by Anders Carlsson.
2679
2680         - https://bugs.webkit.org/show_bug.cgi?id=17497
2681           eliminate DeprecatedValueList
2682
2683         * css/CSSStyleDeclaration.cpp: Removed unneeded include.
2684
2685         * dom/Document.cpp:
2686         (WebCore::Document::removeAllEventListenersFromAllNodes):
2687         Set the removed flag on the window event listeners in case we
2688         are in the middle of dispatching events on this window.
2689         (WebCore::Document::clear): Ditto.
2690         (WebCore::Document::handleWindowEvent): Changed to use a vector
2691         instead of a DeprecatedPtrList.
2692         (WebCore::Document::windowInlineEventListenerForType): Ditto.
2693         (WebCore::Document::removeWindowInlineEventListenerForType): Ditto.
2694         Also added a call to setRemoved, which is needed here just as in
2695         other functions that remove.
2696         (WebCore::Document::removeWindowEventListener): Ditto.
2697         (WebCore::Document::hasWindowEventListener): Ditto.
2698
2699         * dom/Document.h: Changed RegisteredEventListenerList to
2700         RegisteredEventListeners.
2701
2702         * dom/Element.cpp:
2703         (WebCore::Element::attach): Use a function to access rare data instead
2704         of getting directly at the data field.
2705         (WebCore::Element::focus): Ditto.
2706         (WebCore::Element::cancelFocusAppearanceUpdate): Ditto.
2707
2708         * dom/ElementRareData.h: Use "using" to make things that are protected
2709         in NodeRareData be public here.
2710
2711         * dom/EventTarget.h: Removed include of DeprecatedValueList and
2712         related declearations that weren't needed. Tweaked the definitions
2713         of the forbidEventDispatch functions too.
2714
2715         * dom/EventTargetNode.cpp:
2716         (WebCore::EventTargetNode::EventTargetNode): Eliminated code that
2717         was used to initialized m_regdListeners.
2718         (WebCore::EventTargetNode::~EventTargetNode): Elminated delete of
2719         m_regdListeners. Changed code to use eventListeners() instead of
2720         m_regdListeners.
2721         (WebCore::EventTargetNode::eventListeners): Added.
2722         (WebCore::EventTargetNode::insertedIntoDocument): Use eventListeners.
2723         (WebCore::EventTargetNode::removedFromDocument): Ditto.
2724         (WebCore::EventTargetNode::willMoveToNewOwnerDocument): Ditto.
2725         (WebCore::EventTargetNode::didMoveToNewOwnerDocument): Ditto.
2726         (WebCore::EventTargetNode::addEventListener): Ditto.
2727         (WebCore::EventTargetNode::removeEventListener): Ditto.
2728         (WebCore::EventTargetNode::removeAllEventListeners): Ditto.
2729         Also added code to call setRemoved on all the listeners.
2730         (WebCore::EventTargetNode::handleLocalEvents): Ditto.
2731         (WebCore::EventTargetNode::dispatchGenericEvent): Fixed indentation.
2732         (WebCore::EventTargetNode::removeInlineEventListenerForType): Use
2733         the new event listeners vector. Also added missing call to setRemoved.
2734         (WebCore::EventTargetNode::inlineEventListenerForType): Ditto.
2735
2736         * dom/EventTargetNode.h: Added a new RegisteredEventListenerVector
2737         type and replaced the old localEventListeners function with a new
2738         eventListeners function. Removed m_regdListeners.
2739
2740         * dom/Node.cpp:
2741         (WebCore::Node::childNodes): Removed unneeded std prefix.
2742         (WebCore::Node::setFocus): Use function instead of going directly
2743         at rare data.
2744         (WebCore::Node::rareDataFocused): Ditto.
2745         (WebCore::Node::registerDynamicNodeList): Removed unneeded std prefix.
2746         (WebCore::Node::getElementsByName): Ditto.
2747         (WebCore::Node::getElementsByClassName): Ditto.
2748         (WebCore::Node::compareDocumentPosition): Ditto.
2749
2750         * dom/Node.h: Removed unneeded forward declaration of
2751         RegisteredEventListener. This is now in EventTargetNode.
2752
2753         * dom/NodeRareData.h: Renamed m_focused to m_isFocused and made it
2754         private. Made m_needsFocusAppearanceUpdateSoonAfterAttach private.
2755         Added listeners and ensureListeners functions as well as isFocused,
2756         setFocused, and focus-appearance functions. Made all data members private.
2757
2758         * dom/RegisteredEventListener.cpp: Removed operator ==.
2759         * dom/RegisteredEventListener.h: Removed operator == and !=.
2760
2761         * svg/SVGElement.cpp:
2762         (WebCore::hasLoadListener): Rewrote to work with the vector.
2763         * svg/SVGUseElement.cpp:
2764         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
2765
2766 2008-12-13  Holger Hans Peter Freyther  <zecke@selfish.org>
2767
2768         Reviewed by Dan Bernstein.
2769
2770         https://bugs.webkit.org/show_bug.cgi?id=22824
2771
2772         Change ENABLE(FONT_FAST_PATH) to USE(FONT_FAST_PATH). With r39206
2773         floatWidth always used the complex path causing a regression
2774         in the pixel tests.
2775
2776         * platform/graphics/Font.cpp:
2777         (WebCore::Font::floatWidth): Use the fast path again
2778
2779 2008-12-13  Dirk Schulze  <krit@webkit.org>
2780
2781         Reviewed by Darin Adler.
2782
2783         Fixes behavior of gradients on empty path in canvas/Cg
2784
2785         https://bugs.webkit.org/show_bug.cgi?id=22844
2786         [Cg] Canvas fill() draws gradients even without a path
2787
2788         Test: fast/canvas/canvas-gradient-without-path.html
2789
2790         * html/CanvasRenderingContext2D.cpp:
2791         (WebCore::CanvasRenderingContext2D::fill):
2792         (WebCore::CanvasRenderingContext2D::stroke):
2793
2794 2008-12-13  Kevin Ollivier  <kevino@theolliviers.com>
2795
2796         wx build fix.
2797
2798         * platform/graphics/wx/ImageSourceWx.cpp:
2799         (WebCore::ImageSource::filenameExtension):
2800
2801 2008-12-12  Brent Fulgham  <bfulgham@gmail.com>
2802
2803         Reviewed by Oliver Hunt.
2804
2805         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22805
2806
2807         Provides implementation of image dragging logic for Windows Cairo
2808         back-end.
2809
2810         * platform/win/DragImageCGWin.cpp:
2811         (WebCore::deallocContext): Add a generic CGContextRef destructor.
2812         * platform/win/DragImageCairoWin.cpp:
2813         (WebCore::deallocContext): Add a generic cairo_* destructor. 
2814         (WebCore::allocImage):  New implementation to allocate a Cairo
2815         surface of a specified size.
2816         (WebCore::createCairoContextFromBitmap): New implementation to
2817         create a Cairo surface from a Windows BITMAP.
2818         (WebCore::scaleDragImage): Replace stub with implementation to
2819         actually create a scaled image.
2820         (WebCore::createDragImageFromImage): Replace stub with implementation
2821         to actually create an image.
2822
2823 2008-12-12  Dean Jackson  <dino@apple.com>
2824
2825         Reviewed by Darin Adler.
2826
2827         Expose WebKitAnimationEvent, WebKitTransitionEvent,
2828         WebKitCSSTransformValue, WebKitCSSKeyframeRule and
2829         WebKitCSSKeyframesRule to Window object.
2830         This required generating constructors for the event
2831         interfaces.
2832         
2833         https://bugs.webkit.org/show_bug.cgi?id=20560
2834
2835         * dom/WebKitAnimationEvent.idl:
2836         * dom/WebKitTransitionEvent.idl:
2837         * page/DOMWindow.idl:
2838
2839 2008-12-12  Dave Moore  <davemoore@google.com>
2840
2841         Reviewed by Eric Seidel.
2842
2843         Fixed https://bugs.webkit.org/show_bug.cgi?id=22798
2844
2845         In Font::drawTextUsingSVGFont() a variable of type SVGTextRunWalkerDrawTextData
2846         is created on the stack (called data). One of its fields, charsConsumed, is
2847         unitialized, leading to random values after calling walk() on the
2848         SVGTextRunWalker created with it. I now initialize the variable
2849
2850         This bug was revealed in our Purify run. I don't know of any specific incorrect
2851         behavior caused by it but it would lead to the charsConsumed field having a
2852         a wrong value.
2853
2854         * svg/SVGFont.cpp:
2855         (WebCore::Font::drawTextUsingSVGFont):
2856
2857 2008-12-12  Beth Dakin  <bdakin@apple.com>
2858
2859         Rubber Stamped by Steve Falkenburg.
2860
2861         Build fix.
2862
2863         * platform/KURL.h:
2864
2865 2008-12-12  Brett Wilson  <brettw@chromium.org>
2866
2867         Reviewed by Darin Adler.
2868
2869         Add the ability so that Google-URL can optionally be used in a build
2870         of WebKit without changing the shared header. The guts of KURL are
2871         optionally ifdefed out, and the replacement code goes in a different
2872         header to avoid polluting KURL.h
2873
2874         * platform/KURL.cpp:
2875         * platform/KURL.h:
2876         (WebCore::KURL::string):
2877         (WebCore::KURL::operator const String&):
2878         (WebCore::KURL::operator JSC::UString):
2879         (WebCore::KURL::operator NSString*):
2880         (WebCore::KURL::parsed):
2881         (WebCore::KURL::utf8String):
2882         (WebCore::KURL::isNull):
2883         (WebCore::KURL::isEmpty):
2884         (WebCore::KURL::isValid):
2885         (WebCore::KURL::hostStart):
2886         (WebCore::KURL::hostEnd):
2887         (WebCore::KURL::pathStart):
2888         (WebCore::KURL::pathEnd):
2889         (WebCore::KURL::pathAfterLastSlash):
2890
2891 2008-12-11  Steve Falkenburg  <sfalken@apple.com>
2892
2893         Delete the previous timer-queue timer in the main thread, just prior to scheduling a new timer.
2894         The code previously called DeleteTimerQueueTimer in the timer callback proc.
2895         
2896         The new technique simplifies the code, since we now create and delete timers on the
2897         same thread, and don't access the timer queue or timer handles in the callback.
2898         This allows us to remove some mutex use, and more importantly, it solves a race
2899         condition that was occuring between ChangeTimerQueueTimer and DeleteTimerQueueTimer.
2900         
2901         Since the timer callback isn't passed the timer handle, we were retrieving that handle
2902         via a global. If the timer callback code was entered, but then a new timer was immediately
2903         scheduled (prior to the callback acquiring the mutex and calling DeleteTimerQueueTimer),
2904         there was a small window where the timer could be re-scheduled via ChangeTimerQueueTimer
2905         and then immediately deleted once the already running callback acquired the mutex and
2906         then called DeleteTimerQueueTimer. This resulted in the newly scheduled timer never firing.
2907         
2908         Reviewed by Oliver Hunt.
2909
2910         * platform/win/SharedTimerWin.cpp:
2911         (WebCore::queueTimerProc): Don't delete the timer in the callback.
2912         (WebCore::setSharedTimerFireTime): Always delete and create the timer instead of using ChangeTimerQueueTimer.
2913         (WebCore::stopSharedTimer): Call DeleteTimerQueueTimer directly.
2914
2915 2008-12-12  Kai Brüning  <kai@granus.net>
2916
2917         Reviewed and tweaked by Darin Adler.
2918
2919         - fix https://bugs.webkit.org/show_bug.cgi?id=18205
2920           DOMNode objects are garbage collected although there are strong references
2921           <rdar://problem/6441200>
2922
2923         Fixes resurrection bug for wrapper objects by using an NSMapTable with zeroing weak
2924         memory for the wrapper reference for DOMWrapperCache (DOMInternal.mm),
2925         JSWrapperCache (WebScriptObject.mm) and wrapperCache (DOMRGBColor.mm).
2926         BUILDING_ON_TIGER is used to create a Leopard-only NSMapTable or an old-style
2927         procedural map table for Tiger systems.
2928
2929         No regression tests yet since we don't currently run any tests in GC mode.
2930
2931         * bindings/objc/DOMInternal.h: added WebCore::createWrapperCache for use by all three caches
2932         * bindings/objc/DOMInternal.mm:
2933         (WebCore::createWrapperCache): Contains the compile-time check for map table creation
2934         (WebCore::getDOMWrapper): HashMap -> NSMapTable
2935         (WebCore::addDOMWrapper): ditto
2936         (WebCore::removeDOMWrapper): ditto
2937         * bindings/objc/DOMObject.mm: removed [DOMObject finalize]
2938         * bindings/objc/DOMRGBColor.mm: removed [DOMRGBColor finalize]
2939         (WebCore::getWrapperForRGB): CFMutableDictionaryRef -> NSMapTable
2940         (WebCore::setWrapperForRGB): ditto
2941         (WebCore::removeWrapperForRGB): ditto
2942         * bindings/objc/WebScriptObject.mm:
2943         (WebCore::getJSWrapper): HashMap -> NSMapTable
2944         (WebCore::addJSWrapper): ditto
2945         (WebCore::removeJSWrapper): ditto
2946         (-[WebScriptObject finalize]): removed call of removeJSWrapper()
2947
2948 2008-12-12  Dimitri Glazkov  <dglazkov@chromium.org>
2949
2950         Reviewed by Alexey Proskuryakov.
2951
2952         https://bugs.webkit.org/show_bug.cgi?id=22813
2953         Remove unused references to JSDOMBinding, CallFrame, and JSLock.
2954
2955         * dom/Node.cpp: Removed CallFrame and JSLock header includes.
2956         * loader/FrameLoader.cpp: Removed JSDOMBinding header include.
2957
2958 2008-12-12  Holger Hans Peter Freyther  <zecke@selfish.org>
2959
2960         Reviewed by Simon Hausmann.
2961
2962         Update the WebKit.qrc and add a script to automatically generate the file.
2963
2964         With the way rcc and qmake work this can not be done at build time
2965         as the WebKit.qrc must sit inside the directory that contains the files
2966         and at build time we may not change the content of the source directory.
2967
2968         * inspector/front-end/WebKit.qrc: Updated with new script
2969
2970 2008-12-12  Oliver Hunt  <oliver@apple.com>
2971
2972         Reviewed by Alexey Proskuryakov.
2973
2974         REGRESSION: Canvas is broken in high dpi mode
2975         <rdar://problem/6432739> <https://bugs.webkit.org/show_bug.cgi?id=22823>
2976
2977         Simply made sure that we correctly scale the graphics context to
2978         account for the difference between logical and buffer resolution.
2979
2980         * html/HTMLCanvasElement.cpp:
2981         (WebCore::HTMLCanvasElement::createImageBuffer):
2982         (WebCore::HTMLCanvasElement::baseTransform):
2983
2984 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
2985
2986         Rubber-stamped by Oliver Hunt.
2987
2988         Share PluginView::paintMissingPluginIcon() between ports
2989
2990         Also, enable this feature for Qt/X11, Qt/Mac and GTK
2991
2992         * plugins/PluginView.cpp:
2993         (WebCore::PluginView::paintMissingPluginIcon):
2994         * plugins/gtk/PluginViewGtk.cpp:
2995         (WebCore::PluginView::paint):
2996         * plugins/mac/PluginViewMac.cpp:
2997         (WebCore::PluginView::paint):
2998         * plugins/qt/PluginViewQt.cpp:
2999         (WebCore::PluginView::paint):
3000         * plugins/win/PluginViewWin.cpp:
3001
3002 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
3003
3004         Reviewed by Simon Hausmann.
3005
3006         [Qt/Mac] Implement PluginView::updatePluginWidget()
3007
3008         We should update the window and clip rect regardless of whether or
3009         not the plugin has been loaded, for example to ensure that the
3010         missing plugin image is placed correctly.
3011
3012         * plugins/mac/PluginViewMac.cpp:
3013         (WebCore::PluginView::setNPWindowIfNeeded):
3014         (WebCore::PluginView::updatePluginWidget):
3015
3016 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
3017
3018         Rubber-stamped by Oliver Hunt.
3019
3020         Make PluginView::updatePluginWidget() non-const
3021
3022         We can do this now since frameRectsChanged() is no longer const. This
3023         also allows us to get rid of the mutables in the PluginView.
3024
3025         * platform/qt/TemporaryLinkStubs.cpp:
3026         (PluginView::updatePluginWidget):
3027         * plugins/PluginView.h:
3028         * plugins/gtk/PluginViewGtk.cpp:
3029         (WebCore::PluginView::updatePluginWidget):
3030         * plugins/mac/PluginViewMac.cpp:
3031         (WebCore::PluginView::updatePluginWidget):
3032         * plugins/qt/PluginViewQt.cpp:
3033         (WebCore::PluginView::updatePluginWidget):
3034         * plugins/win/PluginViewWin.cpp:
3035         (WebCore::PluginView::updatePluginWidget):
3036         * plugins/wx/PluginViewWx.cpp:
3037         (WebCore::PluginView::updatePluginWidget):
3038
3039 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
3040
3041         Reviewed by Simon Hausmann.
3042
3043         Implement ImageSource::filenameExtension() for the Qt port
3044         
3045         We're using QImageReader::imageFormat().toLower() to check
3046         that the image format is supported, and if it is we store
3047         the resulting extension when creating the ImageDecoderQt.
3048
3049         * platform/graphics/qt/ImageDecoderQt.cpp:
3050         (WebCore::ImageDecoderQt::create):
3051         (WebCore::ImageDecoderQt::ImageDecoderQt):
3052         (WebCore::ImageDecoderQt::imageFormat):
3053         * platform/graphics/qt/ImageDecoderQt.h:
3054         * platform/graphics/qt/ImageSourceQt.cpp:
3055         (WebCore::ImageSource::setData):
3056         (WebCore::ImageSource::filenameExtension):
3057
3058 2008-12-11  Stephanie Lewis  <slewis@apple.com>
3059
3060         Reviewed by Geoff Garen
3061
3062         Account for the size of the response and request headers as well as other overhead
3063         when calculating the size a resource takes up in the cache.  Halts unbounded 
3064         growth in the cache.  Reduced stress test memory high water marks by > 50%.
3065
3066         Uses estimates gathered from the stress test to set the overhead size.  
3067         A version of the patch was created that calculated most of the sizes, but it was 
3068         decided that the patch was still at a basic level an estimate.  What gains it made
3069         in accuracy was offset by the complexity involved in creating and updating the
3070         estimate.
3071
3072         * loader/Cache.cpp:
3073         (WebCore::Cache::resourceAccessed):
3074         (WebCore::Cache::TypeStatistic::addResource):
3075         (WebCore::Cache::dumpLRULists):
3076         * loader/CachedResource.cpp:
3077         (WebCore::CachedResource::overheadSize):
3078         * loader/CachedResource.h:
3079         (WebCore::CachedResource::size):
3080
3081 2008-12-11  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3082
3083         Reviewed by Holger Freyther.
3084
3085         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22814
3086
3087         Add <wml> image element support. Based on HTML/SVGImage{Element/Loader}, with
3088         the only difference that WML defines a second source attribute 'localsrc', that
3089         takes precedence over the 'src' attribute. If loading the 'localsrc' attribute
3090         fails, the user agent should try loading the 'src' attribute. If both fail the
3091         'alt' fallback content will be used - just like in HTML.
3092
3093         Fixes: fast/wml/img-localsrc.wml (<img> and 'localsrc' attribute)
3094                fast/wml/img-src-localsrc-alt.wml ('localsrc'/'src' fallback handling)
3095                fast/wml/img-src.wml (<img> and 'src' attribute)
3096
3097         * GNUmakefile.am:
3098         * WebCore.vcproj/WebCore.vcproj:
3099         * WebCore.xcodeproj/project.pbxproj:
3100         * rendering/HitTestResult.cpp:
3101         (WebCore::HitTestResult::altDisplayString):
3102         (WebCore::HitTestResult::absoluteImageURL):
3103         * rendering/RenderImage.cpp:
3104         (WebCore::RenderImage::updateAltText):
3105         * wml/WMLImageElement.cpp: Added.
3106         (WebCore::WMLImageElement::WMLImageElement):
3107         (WebCore::WMLImageElement::~WMLImageElement):
3108         (WebCore::WMLImageElement::mapToEntry):
3109         (WebCore::WMLImageElement::parseMappedAttribute):
3110         (WebCore::WMLImageElement::attach):
3111         (WebCore::WMLImageElement::createRenderer):
3112         (WebCore::WMLImageElement::insertedIntoDocument):
3113         (WebCore::WMLImageElement::isURLAttribute):
3114         (WebCore::WMLImageElement::imageSourceAttributeName):
3115         (WebCore::WMLImageElement::altText):
3116         * wml/WMLImageElement.h: Added.
3117         (WebCore::WMLImageElement::useFallbackAttribute):
3118         (WebCore::WMLImageElement::setUseFallbackAttribute):
3119         * wml/WMLImageLoader.cpp: Added.
3120         (WebCore::WMLImageLoader::WMLImageLoader):
3121         (WebCore::WMLImageLoader::~WMLImageLoader):
3122         (WebCore::WMLImageLoader::dispatchLoadEvent):
3123         (WebCore::WMLImageLoader::sourceURI):
3124         (WebCore::WMLImageLoader::notifyFinished):
3125         * wml/WMLImageLoader.h: Added.
3126         * wml/WMLTagNames.in:
3127
3128 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
3129
3130         Reviewed by Darin Adler.
3131
3132         https://bugs.webkit.org/show_bug.cgi?id=22043
3133
3134         Do not run into the WebCore::DocumentLoader::updateLoading
3135         ASSERT on Gtk+/CURL when trying to load tests from our LayoutTests.
3136
3137         Do not call setPrimaryLoadComplete when the
3138         activeDocumentLoader has already been replaced. This can happen
3139         when a script executed from within FramerLoader::didFinishLoading will
3140         navigate to another URL.
3141
3142         The assertion is caused by existing tests (e.g.
3143         fast/history/clicked-link-is-visited.html) reproducing this with
3144         network backends not equal to curl is tough or maybe not
3145         even possible.
3146
3147         * loader/DocumentLoader.cpp:
3148         (WebCore::DocumentLoader::setPrimaryLoadComplete):
3149
3150 2008-12-11  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3151
3152         Reviewed by Eric Seidel.
3153
3154         - Remove some dead, commented-out code from WMLAElement.
3155         - Add missing virtual destructor for <noop>, as suggested by Alexey.
3156         - Refactor addHTMLAlignment in a static helper function to share with WML.
3157
3158         * html/HTMLElement.cpp:
3159         (WebCore::HTMLElement::addHTMLAlignment):
3160         (WebCore::HTMLElement::addHTMLAlignmentToStyledElement):
3161         * html/HTMLElement.h:
3162         * wml/WMLAElement.cpp:
3163         (WebCore::WMLAElement::defaultEventHandler):
3164         * wml/WMLNoopElement.cpp:
3165         (WebCore::WMLNoopElement::~WMLNoopElement):
3166         * wml/WMLNoopElement.h:
3167
3168 2008-12-10  Oliver Hunt  <oliver@apple.com>
3169
3170         Reviewed by Adele Peterson.
3171
3172         <rdar://problem/6302405> Crash (null-deref) when using :before pseudoselector with content CSS rule in SVG
3173         <https://bugs.webkit.org/show_bug.cgi?id=22804>
3174
3175         This issue was caused by css generated content resulting in non-svg flowboxes
3176         being injected into SVG content.  As SVG spec does not describe behaviour in
3177         this case, and neither Opera nor Firefox displays such generated content, so
3178         now we make svg text layout and rendering just ignore any such content.
3179
3180         Test: svg/css/crash-css-generated-content.xhtml
3181
3182         * rendering/SVGRootInlineBox.cpp:
3183         (WebCore::SVGRootInlineBox::buildLayoutInformation):
3184         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
3185         (WebCore::SVGRootInlineBox::buildTextChunks):
3186
3187 2008-12-11  Cameron Zwarich  <zwarich@apple.com>
3188
3189         Reviewed by Dave Hyatt.
3190
3191         Bug 21256: REGRESSION (r36906): horizontally repeating image leaves ghosts when vertical scrolling
3192         <https://bugs.webkit.org/show_bug.cgi?id=21256>
3193         <rdar://problem/6362978>
3194
3195         The ScrollView refactoring in r36906 caused the ScrollView and the
3196         platform widget to disagree about whether optimizing scrolling via
3197         blitting is allowed. The easiest way to fix this is to make ScrollView
3198         simply ask the platform widget whether this is safe on platforms that
3199         are affected.
3200
3201         It is not possible to write a layout test for this bug because it
3202         involves the back/forward cache.
3203
3204         * platform/ScrollView.cpp:
3205         (WebCore::ScrollView::ScrollView):
3206         (WebCore::ScrollView::setCanBlitOnScroll):
3207         (WebCore::ScrollView::canBlitOnScroll):
3208         (WebCore::ScrollView::platformSetCanBlitOnScroll):
3209         (WebCore::ScrollView::platformCanBlitOnScroll):
3210         * platform/ScrollView.h:
3211         * platform/mac/ScrollViewMac.mm:
3212         (WebCore::ScrollView::platformSetCanBlitOnScroll):
3213         (WebCore::ScrollView::platformCanBlitOnScroll):
3214         * platform/wx/ScrollViewWx.cpp:
3215         (WebCore::ScrollView::platformSetCanBlitOnScroll):
3216         (WebCore::ScrollView::platformCanBlitOnScroll):
3217
3218 2008-12-11  Brent Fulgham  <bfulgham@gmail.com>
3219
3220         Reviewed by Adam Roben.
3221
3222         https://bugs.webkit.org/show_bug.cgi?id=22808
3223
3224         Correct build break due to malformed XML in Visual Studio project
3225         following @r39205 change.
3226
3227         * WebCore.vcproj/WebCore.vcproj: Correct file entry so project loads.
3228
3229 2008-12-10  Chris Marrin  <cmarrin@apple.com>
3230
3231         Reviewed by Dave Hyatt.
3232
3233         Fixed https://bugs.webkit.org/show_bug.cgi?id=22738
3234
3235         This gets rid of the per-animation timers which were used when an animation
3236         started, ended and looped. Their job is now done by the main AnimationController's
3237         timer. It is now set to fire as needed. For instance, if there is a delay, it will
3238         fire after the delay time and then every 30ms to run the animation. The start, loop
3239         and end events are generated as needed during the firing of this timer.
3240
3241         I had to add one more bit of code. When animation timers used to fire the animation events.
3242         This would always happen from the RunLoop, so any style changes that happened in the
3243         event handler would get picked up on the next updateRendering() call. But now the start
3244         event is generated during the styleIsAvailable() call, which is in the middle of the 
3245         updateRendering() cycle. And calling an event handler in the middle of updateRendering()
3246         is not allowed and causes style changes to get missed. We already have a mechanism in
3247         AnimationController to defer updateRendering() calls. So I added logic to defer all
3248         event handling to there. Now, I put any request for event handling into a list and ask
3249         for a deferred updateRendering() call. When that deferred timer fires, I go through that
3250         list, send all the events and then call updateRendering().
3251
3252         * page/animation/AnimationBase.cpp:
3253         (WebCore::AnimationBase::AnimationBase):
3254         (WebCore::AnimationBase::updateStateMachine):
3255         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3256         (WebCore::AnimationBase::willNeedService):
3257         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
3258         * page/animation/AnimationBase.h:
3259         * page/animation/AnimationController.cpp:
3260         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
3261         (WebCore::AnimationControllerPrivate::updateRenderingDispatcherFired):
3262         (WebCore::AnimationControllerPrivate::addEventToDispatch):
3263         (WebCore::AnimationControllerPrivate::animationTimerFired):
3264         (WebCore::AnimationController::addEventToDispatch):
3265         * page/animation/AnimationController.h:
3266         * page/animation/CompositeAnimation.cpp:
3267         (WebCore::CompositeAnimationPrivate::updateTransitions):
3268         (WebCore::CompositeAnimationPrivate::willNeedService):
3269         (WebCore::CompositeAnimationPrivate::getAnimationForProperty):
3270         (WebCore::CompositeAnimation::willNeedService):
3271         (WebCore::CompositeAnimation::getAnimationForProperty):
3272         * page/animation/CompositeAnimation.h:
3273         * page/animation/ImplicitAnimation.cpp:
3274         (WebCore::ImplicitAnimation::animate):
3275         (WebCore::ImplicitAnimation::onAnimationEnd):
3276         (WebCore::ImplicitAnimation::sendTransitionEvent):
3277         * page/animation/ImplicitAnimation.h:
3278         * page/animation/KeyframeAnimation.cpp:
3279         (WebCore::KeyframeAnimation::animate):
3280         (WebCore::KeyframeAnimation::sendAnimationEvent):
3281         * page/animation/KeyframeAnimation.h:
3282         (WebCore::KeyframeAnimation::setUnanimatedStyle):
3283
3284 2008-12-11  Simon Hausmann  <simon.hausmann@nokia.com>
3285
3286         Fix the Qt build with an empty filenameExtension() implementation.
3287
3288         * platform/graphics/qt/ImageSourceQt.cpp:
3289         (WebCore::ImageSource::filenameExtension):
3290
3291 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
3292
3293         Reviewed by Simon Hausmann.
3294
3295         Fix crash in the cairo implementation of the SVGPaintServer
3296
3297         For SVGFonts the RenderObject can be zero. The existing SVGFont
3298         test cases is exposing this bug. Qt and other ports have fixed
3299         this issue by adding null checks as well.
3300
3301         * svg/graphics/cairo/SVGPaintServerCairo.cpp:
3302         (WebCore::SVGPaintServer::renderPath):
3303
3304 2008-12-11  Holger Freyther  <zecke@selfish.org>
3305
3306         Reviewed by Simon Hausmann.
3307
3308         https://bugs.webkit.org/show_bug.cgi?id=20953
3309
3310         Make the Qt port follow the Win, Mac, Gtk+ port in regard to Font
3311         handling. FontQt.cpp from now on is only implementing the complex path. Create
3312         FontFallbackListQt.cpp and FontPlatformDataQt.cpp to work within
3313         the framework set by the Font code.
3314
3315         Sharing the Font.cpp implementation allows the Qt port to support
3316         the CSS font faces and SVG fonts.
3317
3318         Split out the Qt4.3 Font handling into FonQt43.cpp to allow to more
3319         easily deprecate it.
3320
3321         This commit is removing a lot of #ifdefs from Font.h as the Qt Font
3322         implementation is now in line with the rest of WebCore.
3323
3324         * WebCore.pro:
3325         * platform/graphics/Font.h: Remove #ifdefs
3326         (WebCore::Font::letterSpacing):
3327         (WebCore::Font::setLetterSpacing):
3328         (WebCore::Font::isPlatformFont):
3329         * platform/graphics/FontFallbackList.h:
3330         * platform/graphics/SimpleFontData.cpp:
3331         (WebCore::SimpleFontData::SimpleFontData):
3332         (WebCore::SimpleFontData::platformGlyphInit): There is no GlyphCache
3333         on Qt, move the initialisation over.
3334         (WebCore::SimpleFontData::~SimpleFontData):
3335         * platform/graphics/SimpleFontData.h:
3336         (WebCore::SimpleFontData::getQtFont):
3337         * platform/graphics/qt/FontCacheQt.cpp:
3338         (WebCore::FontCache::getCachedFontPlatformData): Remove unused parameter
3339         (WebCore::FontCache::releaseFontData): Add to build
3340         * platform/graphics/qt/FontCustomPlatformData.cpp:
3341         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3342         (WebCore::FontCustomPlatformData::fontPlatformData):
3343         (WebCore::createFontCustomPlatformData):
3344         * platform/graphics/qt/FontCustomPlatformData.h:
3345         * platform/graphics/qt/FontFallbackListQt.cpp: Added.
3346         (WebCore::FontFallbackList::FontFallbackList):
3347         (WebCore::FontFallbackList::invalidate):
3348         (WebCore::FontFallbackList::releaseFontData):
3349         (WebCore::FontFallbackList::determinePitch):
3350         (WebCore::FontFallbackList::fontDataAt):
3351         (WebCore::FontFallbackList::fontDataForCharacters):
3352         (WebCore::FontFallbackList::setPlatformFont):
3353         * platform/graphics/qt/FontPlatformData.h:
3354         (WebCore::FontPlatformData::font):
3355         (WebCore::FontPlatformData::size):
3356         * platform/graphics/qt/FontPlatformDataQt.cpp: Added.
3357         (WebCore::FontPlatformData::FontPlatformData):
3358         * platform/graphics/qt/FontQt.cpp:
3359         (WebCore::Font::drawComplexText):
3360         (WebCore::Font::floatWidthForComplexText):
3361         (WebCore::Font::offsetForPositionForComplexText):
3362         (WebCore::Font::selectionRectForComplexText):
3363         (WebCore::Font::font):
3364         * platform/graphics/qt/FontQt43.cpp: Added. Moved Qt4.3 code from FontQt.cpp
3365         (WebCore::Font::drawComplexText):
3366         (WebCore::Font::floatWidthForComplexText):
3367         (WebCore::Font::offsetForPositionForComplexText):
3368         (WebCore::Font::selectionRectForComplexText):
3369         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3370         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3371         (WebCore::GlyphPageTreeNode::pruneTreeFontData):
3372         * platform/graphics/qt/SimpleFontDataQt.cpp:
3373         (WebCore::SimpleFontData::determinePitch):
3374         (WebCore::SimpleFontData::containsCharacters):
3375         (WebCore::SimpleFontData::platformInit):
3376         (WebCore::SimpleFontData::platformGlyphInit):
3377         (WebCore::SimpleFontData::platformDestroy):
3378         * platform/qt/RenderThemeQt.cpp:
3379         (WebCore::RenderThemeQt::adjustButtonStyle): Avoid crashes.
3380
3381 2008-12-11  Holger Freyther  <zecke@selfish.org>
3382
3383         Reviewed by Simon Hausmann.
3384
3385         https://bugs.webkit.org/show_bug.cgi?id=20953
3386
3387         For Qt it is not pratical to have a FontCache and GlyphPageTreeNode
3388         implementation. This is one of the reasons why the Qt port is currently not
3389         using WebCore/platform/graphics/Font.cpp. By allowing to not use
3390         the simple/fast-path the Qt port will be able to use it.
3391
3392         Introduce USE(FONT_FAST_PATH) and define it for every port but the
3393         Qt one.
3394
3395         * platform/graphics/Font.cpp:
3396         (WebCore::Font::drawText):
3397         (WebCore::Font::floatWidth):
3398         (WebCore::Font::selectionRectForText):
3399         (WebCore::Font::offsetForPosition):
3400         * platform/graphics/Font.h:
3401
3402 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
3403
3404         Reviewed by Darin Adler.
3405
3406         https://bugs.webkit.org/show_bug.cgi?id=20953
3407
3408         Split out the font fast path from Fast.cpp into FontFastPath.cpp. This
3409         will allow the Qt port to share most of WebCore::Font
3410         implementation but the fast path. Qt does not provide the API to get
3411         individual Glyphs making the fast path hard to support.
3412
3413
3414         * GNUmakefile.am:
3415         * WebCore.vcproj/WebCore.vcproj:
3416         * WebCore.xcodeproj/project.pbxproj:
3417         * WebCoreSources.bkl:
3418         * platform/graphics/Font.cpp:
3419         * platform/graphics/FontFastPath.cpp: Added.
3420         (WebCore::Font::glyphDataForCharacter):
3421
3422 2008-12-11  Robert Carr  <racarr@svn.gnome.org>
3423
3424         Reviewed by Holger Freyther.
3425
3426         https://bugs.webkit.org/show_bug.cgi?id=22560
3427
3428         Code in PlatformScreenGtk for screenDepth and screenRect can not
3429         assume that the platformWindow for the widget has a valid "window"
3430         member. For example in the case of, a new browser view opening as a
3431         child of a GtkNotebook, but never being switched to, or manually
3432         realized. Solve by using the toplevel window of the widget, rather
3433         than the widget itself.
3434
3435         * platform/gtk/PlatformScreenGtk.cpp:
3436         (WebCore::screenDepth):
3437         (WebCore::screenRect):
3438
3439 2008-12-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
3440
3441         Reviewed by Darin Adler and Holger Freyther.
3442
3443         Make Widget::frameRectsChanged() and overrides non-const
3444
3445         This will hopefully allow us to get rid of some of the mutables in
3446         the classes that react to the callback by changing their own state.
3447
3448         * platform/ScrollView.cpp:
3449         (WebCore::ScrollView::frameRectsChanged):
3450         * platform/ScrollView.h:
3451         * platform/Widget.h:
3452         (WebCore::Widget::frameRectsChanged):
3453         * platform/gtk/ScrollbarGtk.cpp: Remove non-const version since
3454         this was more complex and did the same thing, changed const of
3455         the leftover frameRectsChanged() method.
3456         (ScrollbarGtk::frameRectsChanged):
3457         * platform/gtk/ScrollbarGtk.h:
3458         * plugins/PluginView.cpp:
3459         (WebCore::PluginView::frameRectsChanged):
3460         * plugins/PluginView.h:
3461
3462 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
3463
3464         Reviewed and implemented with Tor Arne Vestbø.
3465
3466         Reimplement RenderTheme::caretBlinkInterval for Qt.
3467
3468         The QApplication::cursorFlashTime is in milliseconds and describes
3469         the whole cycle while WebCore expects half a cycle.
3470
3471         * platform/qt/RenderThemeQt.cpp:
3472         (WebCore::RenderThemeQt::caretBlinkInterval):
3473         * platform/qt/RenderThemeQt.h:
3474
3475 2008-12-09  Trenton Schulz <trenton.schulz@nokia.com>
3476
3477         Reviewed by Tor Arne Vestbø.
3478
3479         [Qt/Mac] Don't call HIGetScaleFactor() if we're not on Tiger or better
3480
3481         * plugins/mac/PluginViewMac.cpp:
3482         (WebCore::tigerOrBetter):
3483         (WebCore::PluginView::globalMousePosForPlugin):
3484
3485 2008-12-10  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3486
3487         Reviewed by Eric Seidel and George Staikos.
3488
3489         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22799
3490
3491         Add WML <template> support. The <template> element is specified at deck-level
3492         and declares a template for all <card> elements in the document.
3493
3494         * GNUmakefile.am:
3495         * WebCore.vcproj/WebCore.vcproj:
3496         * WebCore.xcodeproj/project.pbxproj:
3497         * editing/htmlediting.cpp:
3498         (WebCore::canHaveChildrenForEditing): Treat <do> just like a <button>.
3499         * wml/WMLCardElement.cpp:
3500         (WebCore::WMLCardElement::WMLCardElement):
3501         (WebCore::WMLCardElement::setTemplateElement):
3502         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
3503         (WebCore::WMLCardElement::handleDeckLevelTaskOverridesIfNeeded):
3504         * wml/WMLCardElement.h:
3505         (WebCore::WMLCardElement::templateElement):
3506         * wml/WMLDoElement.cpp:
3507         (WebCore::WMLDoElement::insertedIntoDocument):
3508         * wml/WMLDocument.cpp:
3509         (WebCore::WMLDocument::finishedParsing):
3510         * wml/WMLErrorHandling.cpp:
3511         (WebCore::errorMessageForErrorCode):
3512         * wml/WMLErrorHandling.h:
3513         (WebCore::):
3514         * wml/WMLEventHandlingElement.cpp:
3515         (WebCore::WMLEventHandlingElement::~WMLEventHandlingElement):
3516         * wml/WMLEventHandlingElement.h:
3517         (WebCore::WMLEventHandlingElement::doElements):
3518         * wml/WMLTagNames.in:
3519         * wml/WMLTemplateElement.cpp: Added.
3520         (WebCore::WMLTemplateElement::WMLTemplateElement):
3521         (WebCore::WMLTemplateElement::~WMLTemplateElement):
3522         (WebCore::WMLTemplateElement::parseMappedAttribute):
3523         (WebCore::WMLTemplateElement::registerTemplatesInDocument):
3524         * wml/WMLTemplateElement.h: Added.
3525         * wml/WMLTimerElement.cpp:
3526         (WebCore::WMLTimerElement::timerFired):
3527
3528 2008-12-09  Dmitry Titov  <dimich@chromium.org>
3529
3530         Reviewed by Darin Adler.
3531
3532         Fix memory leak - need to call stopActiveDOMObjects
3533         when cached pages get destroyed.
3534         https://bugs.webkit.org/show_bug.cgi?id=22753
3535
3536         * dom/Document.cpp:
3537         (WebCore::Document::detach):
3538
3539 2008-12-10  Alice Liu  <alice.liu@apple.com>
3540
3541         Manual test for https://bugs.webkit.org/show_bug.cgi?id=20685
3542
3543         Reviewed by Darin Adler.
3544
3545         * manual-tests/drag-image-to-desktop.html: Added.