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