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