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