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