LayoutTests:
[WebKit-https.git] / WebCore / ChangeLog
1 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
2
3         Reviewed by harrison
4         
5         <rdar://problem/4903193> 
6         On particular page, Copy is so slow it seems like a hang
7         
8         ~2x speedup copying:
9         http://shakespeare.mit.edu/henryviii/full.html 
10         Also produces less bloated markup.
11
12         * editing/markup.cpp:
13         (WebCore::startMarkup): Don't wrap text nodes in style spans.
14         For Elements, don't inline styles inherited from ancestors.
15         (WebCore::createMarkup): No longer necessary to find 
16         the root's default style and pass it to startMarkup.
17         Add a wrapper span around the markup with the styles
18         that all nodes in the markup inherit (the inheritable 
19         styles from the common ancestor container's computed style).
20         Added a FIXME about unecessary markup for inline ancestors 
21         up to the commonAncestorBlock.
22
23 2007-03-08  Darin Adler  <darin@apple.com>
24
25         Reviewed by Adele.
26
27         - <rdar://problem/4470381> multipart/form-data boundary security vulnerability
28
29         By making the form data boundary a string with some random data in it, we reduce
30         the possibility that anyone could take advantage of it by creating a file that
31         intentionally has the boundary string in it.
32
33         * html/HTMLFormElement.h: Removed boundary(), setBoundary(), and m_boundary.
34         Marked a lot more stuff private.
35         * html/HTMLFormElement.cpp:
36         (WebCore::HTMLFormElement::HTMLFormElement): Removed code to initialize
37         m_boundary.
38         (WebCore::randomNumber): Added. Function that returns a random number, including
39         seeding the random number generator the first time it's called. For now, usees the more
40         random function random() on Mac OS X and the more-standard rand() on other platforms.
41         (WebCore::HTMLFormElement::formData): Take a parameter with the form boundary string,
42         and use that instead of m_boundary.
43         (WebCore::getUniqueBoundaryString): Added. Makes a boundary string using random numbers
44         and base 64 encoding.
45         (WebCore::HTMLFormElement::submit): Call getUniqueBoundaryString and pass the boundary
46         string into formData for multipart form posts.
47
48 2007-03-08  Maciej Stachowiak  <mjs@apple.com>
49
50         Reviewed by Adele.
51         
52         <rdar://problem/4646563> REGRESSION: Unable to send text message from Verizon text message website: vtext.com (12588)
53         http://bugs.webkit.org/show_bug.cgi?id=12588
54
55         Carefully revised which focus operations restore previous selection, which clear it, and which
56         select the whole control contents.
57         
58         Tests:
59         fast/forms/focus-selection-input.html
60         fast/forms/focus-selection-textarea.html
61         
62         * dom/Element.cpp:
63         (WebCore::Element::focus):
64         * dom/Element.h:
65         * html/HTMLInputElement.cpp:
66         (WebCore::HTMLInputElement::focus):
67         (WebCore::HTMLInputElement::accessKeyAction):
68         * html/HTMLInputElement.h:
69         * html/HTMLLabelElement.cpp:
70         (WebCore::HTMLLabelElement::focus):
71         (WebCore::HTMLLabelElement::accessKeyAction):
72         * html/HTMLLabelElement.h:
73         * html/HTMLLegendElement.cpp:
74         (WebCore::HTMLLegendElement::focus):
75         * html/HTMLLegendElement.h:
76         * html/HTMLTextAreaElement.cpp:
77         (WebCore::HTMLTextAreaElement::focus):
78         * html/HTMLTextAreaElement.h:
79         * page/FocusController.cpp:
80         (WebCore::FocusController::advanceFocus):
81
82 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
83
84         Reviewed by harrison
85
86         <http://bugs.webkit.org/show_bug.cgi?id=12244>
87         FCKeditor: Find dialog doesn't work
88
89         * bindings/js/kjs_window.cpp:
90         (KJS::Window::find): Added.  This function doesn't yet 
91         support whole word searches, searching in subframes, or
92         opening the find dialog.
93         (KJS::WindowFunc::callAsFunction):
94         * bindings/js/kjs_window.h:
95         (KJS::Window::):
96
97 2007-03-08  David Hyatt  <hyatt@apple.com>
98
99         Fix regression from throwing away frames of large animated images.  Alter
100         animated images so that they refuse to advance the animation until the
101         current displayed frame has been fully decoded.
102
103         Reviewed by ggaren
104
105         * platform/graphics/BitmapImage.cpp:
106         (WebCore::BitmapImage::startAnimation):
107         (WebCore::BitmapImage::advanceAnimation):
108         * platform/graphics/ImageSource.h:
109         * platform/graphics/cg/ImageSourceCG.cpp:
110         (WebCore::ImageSource::frameIsCompleteAtIndex):
111
112 2007-03-08  David Hyatt  <hyatt@apple.com>
113
114         Fix 2% performance regression on the PLT.  Increase the large animated
115         image cutoff from 1MB to 5MB.
116
117         In addition when pruning we will aggressively discard image sources.
118
119         Reviewed by ggaren
120
121         * platform/graphics/BitmapImage.cpp:
122         (WebCore::BitmapImage::destroyDecodedData):
123
124 2007-03-08  Timothy Hatcher  <timothy@apple.com>
125
126         Reviewed by John.
127
128         <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
129
130         Pass the RenderObject's node to customHighlightLineRect and paintCustomHighlight.
131
132         * page/Frame.h:
133         * page/mac/FrameMac.mm:
134         (WebCore::Frame::customHighlightLineRect):
135         (WebCore::Frame::paintCustomHighlight):
136         * page/mac/WebCoreFrameBridge.h:
137         * rendering/InlineTextBox.cpp:
138         (WebCore::InlineTextBox::paintCustomHighlight):
139         * rendering/RenderBox.cpp:
140         (WebCore::RenderBox::paintCustomHighlight):
141         * rendering/RootInlineBox.cpp:
142         (WebCore::RootInlineBox::addHighlightOverflow):
143         (WebCore::RootInlineBox::paintCustomHighlight):
144
145 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
146
147         Reviewed by harrison
148         
149         <http://bugs.webkit.org/show_bug.cgi?id=13000>
150         Range.createContextualFragment is not supported
151
152         * dom/Range.cpp:
153         (WebCore::Range::createContextualFragment): The
154         "startContainer" may not be a container, if the
155         range starts inside text.  In that case, look
156         to the parent of the start node for an HTMLElement.
157
158 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
159
160         Reviewed by harrison
161         
162         <rdar://problem/5049671>
163         Gmail Editor: With linked text, Remove Formatting doesn't always remove underline
164
165         * editing/Editor.cpp:
166         (WebCore::Editor::removeFormattingAndStyle): Clear removed
167         anchors after the deletion.
168
169 2007-03-08  David Kilzer  <ddkilzer@webkit.org>
170
171         Reviewed by NOBODY (build fix).
172
173         Added missing file for r20059:
174         <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
175
176         File was taken from this svn repository which contained versions of ucnv.h and ucnv_err.h
177         that were identical to ours:
178         http://source.icu-project.org/repos/icu/icu/tags/release-3-2/source/common/unicode/ucnv_cb.h
179
180         * icu/unicode/ucnv_cb.h: Added.
181
182 2007-03-08  Shrikant Gangoda  <shrikant.gangoda@celunite.com>
183
184         Gdk build fix.
185
186         * platform/graphics/cairo/ImageSourceCairo.cpp:
187         (WebCore::ImageSource::~ImageSource):
188         (WebCore::ImageSource::clear):
189
190 2007-03-08  Oliver Hunt  <oliver@apple.com>
191
192         Reviewed by Adam.
193
194         To match old TEC behaviour when using ICU we need to use 
195         a few manual fallback encodings for the GBK/EUC-CN charsets
196
197         <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
198
199         * platform/TextCodecICU.cpp:
200         (WebCore::TextCodecICU::TextCodecICU):
201         (WebCore::TextCodecICU::createICUConverter):
202         (WebCore::gbkEscapes):
203         (WebCore::gbkCallbackEscape):
204         (WebCore::gbkCallbackSubstitute):
205         (WebCore::TextCodecICU::encode):
206         * platform/TextCodecICU.h:
207         (WebCore::TextCodecICU::needsGBKFallbacks):
208         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
209
210 2007-03-08  Alexey Proskuryakov  <ap@webkit.org>
211
212         Build fix.
213
214         * xml/XPathUtil.cpp:
215         (WebCore::XPath::stringValue):
216
217 2007-03-08  David Hyatt  <hyatt@apple.com>
218
219         This patch dramatically reduces the memory consumed by animated images.  For large animated GIFs (defined for
220         now as >1mb in terms of decoded frame buffer size), we will now aggressively flush previous frames of the
221         animated GIF and just re-decode them on the fly if the animation loops.
222
223         Whenever a large animated GIF has its animation reset, we will also just throw out everything and start
224         the animation over (in order to get rid of any cached detritus held in the ImageSource).
225
226         With this patch and the sample GIF used to test, WebKit's memory consumption went from 160MB down to 16MB.
227
228         Reviewed by mjs
229
230         * platform/graphics/BitmapImage.cpp:
231         (WebCore::BitmapImage::destroyDecodedData):
232         (WebCore::BitmapImage::resetAnimation):
233         (WebCore::BitmapImage::advanceAnimation):
234         * platform/graphics/ImageSource.h:
235         * platform/graphics/cg/ImageSourceCG.cpp:
236         (WebCore::ImageSource::~ImageSource):
237         (WebCore::ImageSource::clear):
238
239 2007-03-08  Alexey Proskuryakov  <ap@webkit.org>
240
241         Reviewed by Darin.
242
243         http://bugs.webkit.org/show_bug.cgi?id=13006
244         XPath string-value is broken for some node types
245
246         Test: fast/xpath/string-value.html
247
248         * xml/XPathUtil.cpp:
249         (WebCore::XPath::stringValue): Fix it :-)
250
251 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
252
253         Reviewed by Adam.
254
255         <rdar://problem/4981000> 
256         http://bugs.webkit.org/show_bug.cgi?id=12634
257         REGRESSION: crash loading web archive (12634)
258         
259         The reason this bug wasn't always reproducible is that it involved sending an event to a plugin while 
260         the page was loading. Before we send the event to the plugin we defer loads. The problem was that
261         MainResourceLoader::setDefersLoad would not work with data loads.
262         
263         * loader/DocumentLoader.cpp:
264         (WebCore::DocumentLoader::setRequest):
265         Only set m_committed to false if we also have a valid unreachable URL.
266         
267         * loader/MainResourceLoader.cpp:
268         (WebCore::MainResourceLoader::setDefersLoading):
269         Make sure to stop and start data loads.
270
271 2007-03-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
272
273         Not reviewed.
274
275         Gdk build fixes.
276
277         * platform/gdk/EditorClientGdk.cpp:
278         (WebCore::EditorClientGdk::handleKeypress): renamed
279         (WebCore::EditorClientGdk::handleInputMethodKeypress): add a stub
280         * platform/gdk/EditorClientGdk.h:
281         * platform/graphics/cairo/ImageSourceCairo.cpp:
282         (WebCore::ImageSource::destroyFrameAtIndex): add a stub
283
284 2007-03-07  Alexey Proskuryakov  <ap@webkit.org>
285
286         Reviewed by Darin.
287
288         http://bugs.webkit.org/show_bug.cgi?id=13004
289         Repeatedly calling XPathExpression.evaluate() causes crashes or memory leaks
290
291         Removed XPath::Expression::optimize() and related methods, since they were buggy and almost useless.
292         Merged doEvaluate() into evaluate(), since this was all evaluate() was doing after the above changes.
293
294         Test: fast/xpath/evaluate-twice.html
295
296         * xml/XPathExpression.cpp:
297         (WebCore::XPathExpression::evaluate):
298         * xml/XPathExpressionNode.cpp:
299         (WebCore::XPath::Expression::Expression):
300         (WebCore::XPath::Expression::~Expression):
301         * xml/XPathExpressionNode.h:
302         * xml/XPathFunctions.cpp:
303         (WebCore::XPath::FunLast::evaluate):
304         (WebCore::XPath::FunPosition::evaluate):
305         (WebCore::XPath::FunId::evaluate):
306         (WebCore::XPath::FunLocalName::evaluate):
307         (WebCore::XPath::FunNamespaceURI::evaluate):
308         (WebCore::XPath::FunName::evaluate):
309         (WebCore::XPath::FunCount::evaluate):
310         (WebCore::XPath::FunString::evaluate):
311         (WebCore::XPath::FunConcat::evaluate):
312         (WebCore::XPath::FunStartsWith::evaluate):
313         (WebCore::XPath::FunContains::evaluate):
314         (WebCore::XPath::FunSubstringBefore::evaluate):
315         (WebCore::XPath::FunSubstringAfter::evaluate):
316         (WebCore::XPath::FunSubstring::evaluate):
317         (WebCore::XPath::FunStringLength::evaluate):
318         (WebCore::XPath::FunNormalizeSpace::evaluate):
319         (WebCore::XPath::FunTranslate::evaluate):
320         (WebCore::XPath::FunBoolean::evaluate):
321         (WebCore::XPath::FunNot::evaluate):
322         (WebCore::XPath::FunTrue::evaluate):
323         (WebCore::XPath::FunLang::evaluate):
324         (WebCore::XPath::FunFalse::evaluate):
325         (WebCore::XPath::FunNumber::evaluate):
326         (WebCore::XPath::FunSum::evaluate):
327         (WebCore::XPath::FunFloor::evaluate):
328         (WebCore::XPath::FunCeiling::evaluate):
329         (WebCore::XPath::FunRound::evaluate):
330         * xml/XPathPath.cpp:
331         (WebCore::XPath::Filter::evaluate):
332         (WebCore::XPath::LocationPath::evaluate):
333         (WebCore::XPath::Path::evaluate):
334         * xml/XPathPath.h:
335         * xml/XPathPredicate.cpp:
336         (WebCore::XPath::Number::evaluate):
337         (WebCore::XPath::StringExpression::evaluate):
338         (WebCore::XPath::Negative::evaluate):
339         (WebCore::XPath::NumericOp::evaluate):
340         (WebCore::XPath::EqTestOp::evaluate):
341         (WebCore::XPath::LogicalOp::evaluate):
342         (WebCore::XPath::Union::evaluate):
343         * xml/XPathPredicate.h:
344         * xml/XPathStep.cpp:
345         * xml/XPathStep.h:
346         * xml/XPathVariableReference.cpp:
347         (WebCore::XPath::VariableReference::evaluate):
348         * xml/XPathVariableReference.h:
349
350 2007-03-07  Sam Weinig  <sam@webkit.org>
351
352         Reviewed by Tim H.
353
354         Remove unused #import from Objective-C bindings and cleanup the order of #imports.
355
356         * bindings/scripts/CodeGeneratorObjC.pm:
357
358 2007-03-07  Sam Weinig  <sam@webkit.org>
359
360         Reviewed by Tim H.
361
362         Make sure the baseURI attribute generates for private Objective-C bindings.
363
364         * dom/Node.idl:
365
366 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
367
368         Reviewed by Maciej.
369
370         <rdar://problem/4874059>
371         REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()
372
373         If a load is done from inside of an error delegate method that is called because we cancel another load, 
374         the first load should be ignored since this is what shipping WebKit does. 
375         
376         (Actually, it does load the page in the data source but doesn't do anything with it since the data source
377         won't have a web frame).
378         
379         * loader/FrameLoader.cpp:
380         (WebCore::FrameLoader::load):
381         Just bail out if m_isStoppingLoad is true.
382
383 2007-03-07  David Hyatt  <hyatt@apple.com>
384
385         Use CGImageRelease instead of CFRelease.
386
387         Reviewed by aroben
388
389         * platform/graphics/cg/ImageCG.cpp:
390         (WebCore::FrameData::clear):
391         * platform/graphics/cg/ImageSourceCG.cpp:
392         (WebCore::ImageSource::destroyFrameAtIndex):
393
394 2007-03-07  David Hyatt  <hyatt@apple.com>
395
396         Fix a regression where the cache size overflows because of a double
397         subtraction per resource when they got removed from the cache.  Add an
398         assert to adjustSize to detect this case in the future.
399
400         Fix ImageSourceCG so that when we flush decoded data from our cache that
401         we also flush it from the ImageSource.
402
403         Reviewed by mjs
404
405         * loader/Cache.cpp:
406         (WebCore::Cache::adjustSize):
407         * platform/graphics/BitmapImage.cpp:
408         (WebCore::BitmapImage::~BitmapImage):
409         (WebCore::BitmapImage::destroyDecodedData):
410         * platform/graphics/Image.h:
411         * platform/graphics/ImageSource.h:
412         * platform/graphics/cg/ImageSourceCG.cpp:
413         (WebCore::ImageSource::setData):
414         (WebCore::ImageSource::destroyFrameAtIndex):
415
416 2007-03-07  Mitz Pettel  <mitz@webkit.org>
417
418         Reviewed by Darin.
419
420         - fix http://bugs.webkit.org/show_bug.cgi?id=13002
421           Incomplete repaint of inset outlines
422
423         Test: fast/repaint/outline-inset.html
424
425         * rendering/RenderObject.cpp:
426         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
427
428 2007-03-07  Oliver Hunt  <oliver@apple.com>
429
430         Reviewed by Antti.
431
432         Reset mouse down/drag state variables on mouse button release
433         
434         Fixes <rdar://problem/5044654>: Drag out of some QuickTime plug-ins converting into image drag
435
436         * page/EventHandler.cpp:
437         (WebCore::EventHandler::handleMouseReleaseEvent):
438
439 2007-03-07  Adele Peterson  <adele@apple.com>
440
441         Reviewed by Darin.
442
443         WebCore part of fix for:
444         http://bugs.webkit.org/show_bug.cgi?id=10871
445         http://bugs.webkit.org/show_bug.cgi?id=12677
446         <rdar://problem/4823129> REGRESSION: IME key events different in nightly
447         <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm a clause in kotoeri
448
449         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Call handleInputMethodKeypress before actually dispatching the keypress event
450           so that input methods have a chance to handle the event.  
451           If the input method handles the event (by marking or unmarking text), then we don't need to send the keypress event.
452           If an input method doesn't handle the event, then we'll save the data we need to perform the correct action (like what text to insert or what selector to use) 
453           when we dispatch the keypress event.
454
455         * dom/KeyboardEvent.h: Added Mac-specific KeypressCommand struct, so we can store command info during handleInputMethodKeypress, and use it during handleKeypress.
456         (WebCore::KeyboardEvent::keypressCommand):
457         (WebCore::KeyboardEvent::setKeypressCommand):
458
459         * bridge/EditorClient.h:
460         * editing/Editor.cpp:
461         (WebCore::Editor::handleKeypress): Changed handleKeyPress to handleKeypress.
462         (WebCore::Editor::handleInputMethodKeypress): Added.
463         * editing/Editor.h:
464
465         * platform/graphics/svg/SVGImageEmptyClients.h:
466         (WebCore::SVGEmptyEditorClient::handleKeypress): Changed handleKeyPress to handleKeypress.
467         (WebCore::SVGEmptyEditorClient::handleInputMethodKeypress): Added.
468
469 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
470
471         Reviewed by Brady.
472
473         Remove some methods in FrameLoader that just calls down to the active document loader. Since each
474         resource loader now has a pointer to its document loader, we can just call directly to the
475         document loader.
476
477         * WebCore.exp:
478         * loader/FrameLoader.cpp:
479         * loader/FrameLoader.h:
480         * loader/MainResourceLoader.cpp:
481         (WebCore::MainResourceLoader::willSendRequest):
482         (WebCore::MainResourceLoader::didReceiveResponse):
483         * loader/SubresourceLoader.cpp:
484         (WebCore::SubresourceLoader::SubresourceLoader):
485         (WebCore::SubresourceLoader::didFinishLoading):
486         (WebCore::SubresourceLoader::didFail):
487         (WebCore::SubresourceLoader::didCancel):
488         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
489         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
490         (WebCore::NetscapePlugInStreamLoader::didFail):
491         (WebCore::NetscapePlugInStreamLoader::didCancel):
492
493 2007-03-06  Geoffrey Garen  <ggaren@apple.com>
494
495         Reviewed by Maciej Stachowiak.
496         
497         Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586
498         PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586)
499         
500         No test because this is very difficult to repro, and the new ASSERTs in 
501         JavaScriptCore catch the underlying cause while running normal layout tests.
502         
503         This is a modified version of r14752 on the branch.
504         
505         The fix is to use a bit inside each node, instead of a hash table, to track 
506         which node subtrees are in the process of being marked. This avoids a call 
507         to malloc inside mark().
508         
509         * bindings/js/kjs_binding.cpp:
510         (KJS::domObjects):
511         (KJS::domNodesPerDocument):
512         * bindings/js/kjs_dom.cpp:
513         (KJS::DOMNode::mark):
514         * dom/Node.cpp:
515         (WebCore::Node::Node):
516         * dom/Node.h:
517
518 2007-03-06  David Hyatt  <hyatt@apple.com>
519
520         This patch reworks the WebCore memory cache to significantly reduce the amount of memory consumed by
521         images in the cache and to enhance the accuracy of the cache size as an absolute bound for the objects
522         contained within it.  WebCore's memory use over time should significantly improve as a result of these
523         changes.
524
525         Cached resources now have both an encoded size (the original data stream) and a decoded size (an estimate of
526         the amount of memory consumed by an expanded version of that resource, e.g., the decoded frames of an image).
527         Both sizes now count towards the total size of the object and towards the allowed memory cache total.
528
529         By including both totals the reported size of resources will now be larger, and the cache will therefore become
530         much more aggressive about flushing.
531
532         Objects are stored in size-adjusted and popularity-aware LRU lists as before, but encoded size is now always
533         used when determining the correct LRU list.
534
535         The flush algorithm for the memory cache has been rewritten to first destroy decoded data before evicting
536         resources.  By being able to compact its resources without evicting them, the memory cache can now hold many more
537         unique resources (encoded) in the same amount of space.  Depending on how much of a hit we want to take from
538         re-decoding images, the memory cache could in theory have its size significantly reduced now while still holding
539         more resources than it did at the larger size!
540
541         Reviewed by mjs
542
543         * WebCore.xcodeproj/project.pbxproj:
544         * loader/Cache.cpp:
545         (WebCore::Cache::requestResource):
546         (WebCore::Cache::prune):
547         (WebCore::Cache::remove):
548         (WebCore::Cache::lruListFor):
549         (WebCore::Cache::adjustSize):
550         * loader/Cache.h:
551         * loader/CachedCSSStyleSheet.cpp:
552         (WebCore::CachedCSSStyleSheet::data):
553         * loader/CachedImage.cpp:
554         (WebCore::CachedImage::CachedImage):
555         (WebCore::CachedImage::allReferencesRemoved):
556         (WebCore::CachedImage::clear):
557         (WebCore::CachedImage::data):
558         (WebCore::CachedImage::destroyDecodedData):
559         (WebCore::CachedImage::decodedSize):
560         (WebCore::CachedImage::decodedSizeChanged):
561         (WebCore::CachedImage::shouldPauseAnimation):
562         * loader/CachedImage.h:
563         * loader/CachedResource.cpp:
564         (WebCore::CachedResource::CachedResource):
565         (WebCore::CachedResource::deref):
566         (WebCore::CachedResource::setEncodedSize):
567         * loader/CachedResource.h:
568         (WebCore::CachedResource::allReferencesRemoved):
569         (WebCore::CachedResource::size):
570         (WebCore::CachedResource::encodedSize):
571         (WebCore::CachedResource::decodedSize):
572         (WebCore::CachedResource::destroyDecodedData):
573         * loader/CachedScript.cpp:
574         (WebCore::CachedScript::data):
575         * loader/CachedXSLStyleSheet.cpp:
576         (WebCore::CachedXSLStyleSheet::data):
577         * platform/graphics/BitmapImage.cpp:
578         (WebCore::BitmapImage::BitmapImage):
579         (WebCore::BitmapImage::~BitmapImage):
580         (WebCore::BitmapImage::destroyDecodedData):
581         (WebCore::BitmapImage::pruneDecodedDataIfNeeded):
582         (WebCore::BitmapImage::cacheFrame):
583         (WebCore::BitmapImage::setNativeData):
584         (WebCore::BitmapImage::shouldAnimate):
585         (WebCore::BitmapImage::advanceAnimation):
586         * platform/graphics/BitmapImage.h:
587         (WebCore::BitmapImage::decodedSize):
588         * platform/graphics/Image.cpp:
589         (WebCore::Image::Image):
590         * platform/graphics/Image.h:
591         (WebCore::Image::destroyDecodedData):
592         (WebCore::Image::decodedSize):
593         (WebCore::Image::imageObserver):
594         * platform/graphics/ImageAnimationObserver.h: Removed.
595         * platform/graphics/ImageObserver.h: Added.
596         (WebCore::ImageObserver::~ImageObserver):
597         * platform/graphics/svg/SVGImage.cpp:
598         (WebCore::SVGImage::SVGImage):
599         * platform/graphics/svg/SVGImage.h:
600
601 2007-03-06  Alexey Proskuryakov  <ap@webkit.org>
602
603         Reviewed by Sam Weinig.
604
605         http://bugs.webkit.org/show_bug.cgi?id=12987
606         Fix and import 4XPath test_numeric_expr.html
607
608         * xml/XPathPredicate.cpp:
609         (WebCore::XPath::Negative::doEvaluate): Convert the argument to number.
610         (WebCore::XPath::NumericOp::doEvaluate): Convert the arguments to numbers. Use a correct operation for mod.
611         * xml/XPathStep.cpp:
612         (WebCore::XPath::Step::nodesInAxis): Do not append parent node if there is none.
613         * xml/XPathValue.cpp:
614         (WebCore::XPath::Value::toNumber): Do not convert to DeprecatedString just to trim whitespace and to convert to double.
615         * platform/DeprecatedString.cpp:
616         (WebCore::DeprecatedStringData::makeAscii): Added a FIXME about unreliable makeAscii() behavior.
617
618 2007-03-06  Maciej Stachowiak  <mjs@apple.com>
619
620         Reviewed by Adele.
621
622         <rdar://problem/4619663> REGRESSION (NativePopup): Popup menu doesn't draw at the correct vertical position (9816)
623         
624         * platform/mac/PopupMenuMac.mm:
625         (WebCore::PopupMenu::show): Make a temporary dummy view with the
626         passed in rect, since AppKit will use the view bounds to determine
627         what area to exclude when popping up a menu moved to the top of
628         the screen.
629
630 2007-03-06  Geoffrey Garen  <ggaren@apple.com>
631
632         Reviewed by Maciej Stachowiak.
633
634         Fixed all known crashers exposed by run-webkit-tests --threaded [*]. See 
635         JavaScriptCore ChangeLog for more details.
636
637         * bindings/js/kjs_binding.cpp:
638         (KJS::domNodesPerDocument): Added thread safety ASSERT.
639         (KJS::ScriptInterpreter::mark): Removed obsolete logic for marking unsafe
640         objects when collecting on a secondary thread. The Collector takes care
641         of this now.
642
643         * bindings/js/kjs_binding.h:
644         (KJS::DOMObject::DOMObject): Used new API for specifying that WebCore
645         objects should be garbage collected on the main thread only.
646
647         * bindings/js/kjs_window.cpp:
648         (KJS::ScheduledAction::execute): Moved JSLock to cover implementedsCall() call,
649         which, for some subclasses, ends up allocating garbage collected objects.
650         (This fix was speculative. I didn't actually see a crash from this.)
651         (KJS::Window::timerFired): Added JSLock around ScheduleAction destruction,
652         since it destroys a KJS::List.
653
654         * bindings/objc/WebScriptObject.mm:
655         (-[WebScriptObject setException:]): Added JSLock. (This fix was speculative. 
656         I didn't actually see a crash from this.)
657
658         * bridge/mac/WebCoreScriptDebugger.mm:
659         (-[WebCoreScriptCallFrame evaluateWebScript:]): Added JSLock. (This fix 
660         was speculative. I didn't actually see a crash from this.)
661
662         * dom/Document.cpp:
663         (WebCore::Document::~Document): Added JSLock around modification to 
664         domNodesPerDocument(), which can be accessed concurrently during garbage 
665         collection.
666         * dom/Node.cpp:
667         (WebCore::Node::setDocument): ditto.
668         
669         [*] fast/js/toString-stack-overflow.html is an exception. --threaded mode
670         crashes this test because it causes the garbage collector to run frequently,
671         and this test crashes if you happen to garbage collect while it's running.
672         This is a known issue with stack overflow during the mark phase. It's
673         not related to threading.
674
675 2007-03-06  Mark Rowe  <mrowe@apple.com>
676
677         Reviewed by Sam Weinig.
678
679         Fix http://bugs.webkit.org/show_bug.cgi?id=12942
680         Bug 12942: ASSERTION FAILURE: qantas.com.au changing selected item in <select> via JS
681
682         Test: fast/dom/select-selectedIndex-bug-12942.html.
683
684         * html/HTMLSelectElement.cpp:
685         (WebCore::HTMLSelectElement::recalcListItems): Reset m_lastOnChangeIndex when recalculating list items.
686         * html/HTMLSelectElement.h:
687
688 2007-03-06  Brady Eidson  <beidson@apple.com>
689
690         Rubberstamped by Kevin Decker
691
692         20,000!
693
694         * ChangeLog: Point out revision 20,000
695
696 2007-03-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
697
698         Not reviewed.
699
700         Gdk build fix.
701
702         * loader/gdk/FrameLoaderClientGdk.cpp: update userAgent() signature.
703         (WebCore::FrameLoaderClientGdk::userAgent):
704         * loader/gdk/FrameLoaderClientGdk.h: ditto.
705
706 2007-03-06  Mitz Pettel  <mitz@webkit.org>
707
708         Reviewed by Adele.
709
710         - fix http://bugs.webkit.org/show_bug.cgi?id=12986
711           REGRESSION(NativeListBox): Listboxes not updated when resized dynamically
712
713         Test: fast/forms/select-change-listbox-size.html
714
715         * html/HTMLSelectElement.cpp:
716         (WebCore::HTMLSelectElement::parseMappedAttribute): Reattach on list box size change.
717
718 2007-03-06  Mitz Pettel  <mitz@webkit.org>
719
720         Reviewed by Dave Hyatt.
721
722         - fix http://bugs.webkit.org/show_bug.cgi?id=12885
723           REGRESSION (r19696): Incomplete background repaint
724
725         Tests: fast/repaint/content-into-overflow.html
726                fast/repaint/overflow-into-content.html
727
728         Changed repaintAfterLayoutIfNeeded() to take, in addition to the clipped overflow
729         rect, the unclipped border box plus outline, and to repaint any areas that
730         were added or removed from that box, in addition to any areas added or removed
731         from the clipped overflow rect.
732
733         * platform/graphics/svg/SVGResourceMarker.cpp:
734         (WebCore::SVGResourceMarker::draw):
735         * rendering/RenderBlock.cpp:
736         (WebCore::RenderBlock::layoutBlock):
737         * rendering/RenderBox.cpp:
738         (WebCore::RenderBox::absoluteClippedOverflowRect): Renamed getAbsoluteRepaintRect() to
739         this.
740         * rendering/RenderBox.h:
741         * rendering/RenderFlexibleBox.cpp:
742         (WebCore::RenderFlexibleBox::layoutBlock):
743         * rendering/RenderFlow.cpp:
744         (WebCore::RenderFlow::absoluteClippedOverflowRect):
745         * rendering/RenderFlow.h:
746         * rendering/RenderForeignObject.cpp:
747         (WebCore::RenderForeignObject::layout):
748         * rendering/RenderHTMLCanvas.cpp:
749         (WebCore::RenderHTMLCanvas::layout):
750         * rendering/RenderImage.cpp:
751         (WebCore::RenderImage::layout):
752         * rendering/RenderLayer.cpp:
753         (WebCore::RenderLayer::RenderLayer):
754         (WebCore::RenderLayer::checkForRepaintOnResize):
755         (WebCore::RenderLayer::updateLayerPositions):
756         * rendering/RenderLayer.h:
757         * rendering/RenderObject.cpp:
758         (WebCore::RenderObject::repaint):
759         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
760         (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
761         (WebCore::RenderObject::absoluteClippedOverflowRect):
762         (WebCore::RenderObject::absoluteOutlineBox):
763         * rendering/RenderObject.h:
764         * rendering/RenderPath.cpp:
765         (WebCore::RenderPath::layout):
766         (WebCore::RenderPath::absoluteClippedOverflowRect):
767         (WebCore::RenderPath::absoluteRects):
768         (WebCore::RenderPath::drawMarkersIfNeeded):
769         * rendering/RenderPath.h:
770         * rendering/RenderSVGContainer.cpp:
771         (WebCore::RenderSVGContainer::layout):
772         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
773         (WebCore::RenderSVGContainer::absoluteRects):
774         * rendering/RenderSVGContainer.h:
775         * rendering/RenderSVGHiddenContainer.cpp:
776         (WebCore::RenderSVGHiddenContainer::absoluteClippedOverflowRect):
777         * rendering/RenderSVGHiddenContainer.h:
778         * rendering/RenderSVGImage.cpp:
779         (WebCore::RenderSVGImage::imageChanged):
780         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
781         (WebCore::RenderSVGImage::absoluteRects):
782         * rendering/RenderSVGImage.h:
783         * rendering/RenderSVGText.cpp:
784         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
785         (WebCore::RenderSVGText::layout):
786         (WebCore::RenderSVGText::absoluteRects):
787         * rendering/RenderSVGText.h:
788         * rendering/RenderTable.cpp:
789         (WebCore::RenderTable::layout):
790         * rendering/RenderTableCell.cpp:
791         (WebCore::RenderTableCell::absoluteClippedOverflowRect):
792         * rendering/RenderTableCell.h:
793         * rendering/RenderTableCol.cpp:
794         (WebCore::RenderTableCol::absoluteClippedOverflowRect):
795         * rendering/RenderTableCol.h:
796         * rendering/RenderTableRow.cpp:
797         (WebCore::RenderTableRow::absoluteClippedOverflowRect):
798         * rendering/RenderTableRow.h:
799         * rendering/RenderText.cpp:
800         (WebCore::RenderText::absoluteClippedOverflowRect):
801         * rendering/RenderText.h:
802
803 2007-03-06  Ian Eng <ian.eng.webkit@gmail.com>
804
805         Reviewed by Maciej.
806
807         - fixed http://bugs.webkit.org/show_bug.cgi?id=12720
808         Bug 12720: Re-defining window.location.toString function keeps re-loading forever
809
810         * bindings/js/kjs_window.cpp:
811         Disallow replacing functions in LocationTable, and return early without updating URL.
812
813 2007-03-06  Kevin McCullough  <kmccullough@apple.com>
814
815         Reviewed by Darin.
816
817         <http://bugs.webkit.org/show_bug.cgi?id=12686>
818         REGRESSION: Bloglines.com Feeds tab cannot expand folders in TOT
819         - Now all class constructors implement implementsHasInstance.
820
821         * bindings/scripts/CodeGeneratorJS.pm:
822
823 2007-03-07  Nikolas Zimmermann  <zimmermann@kde.org>
824
825         Reviewed by Rob & Oliver.
826
827         Preparations for the new SVG text engine.
828
829         Handle baseline-shift / kerning css values correctly.
830         Recognize missing svg presentation attribute "font-size-adjust".
831         Add all missing svg<->css property mappings in mapToEntry().
832
833         Doesn't affect any layout test (as these properties are not used w/o my text patch).
834         While I'm at it, unify the macro names (RS_ -> SVG_RS_) & cleanup style a bit.
835
836         * ksvg2/css/CSSPropertyNames.in:
837         * ksvg2/css/SVGCSSParser.cpp:
838         (WebCore::CSSParser::parseSVGValue):
839         * ksvg2/css/SVGCSSStyleSelector.cpp:
840         (WebCore::CSSStyleSelector::applySVGProperty):
841         * ksvg2/css/SVGRenderStyle.cpp:
842         (WebCore::SVGRenderStyle::SVGRenderStyle):
843         (WebCore::SVGRenderStyle::operator==):
844         (WebCore::SVGRenderStyle::inheritedNotEqual):
845         (WebCore::SVGRenderStyle::inheritFrom):
846         * ksvg2/css/SVGRenderStyle.h:
847         (WebCore::SVGRenderStyle::NonInheritedFlags::):
848         (WebCore::SVGRenderStyle::setBitDefaults):
849         * ksvg2/css/SVGRenderStyleDefs.cpp:
850         (StyleTextData::StyleTextData):
851         (StyleTextData::operator==):
852         (StyleMiscData::StyleMiscData):
853         (StyleMiscData::operator==):
854         * ksvg2/css/SVGRenderStyleDefs.h:
855         (WebCore::):
856         (WebCore::StyleTextData::operator!=):
857         * ksvg2/svg/SVGStyledElement.cpp:
858         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
859
860 2007-03-06  Justin Garcia  <justin.garcia@apple.com>
861
862         Reviewed by kevin
863         
864         <http://bugs.webkit.org/show_bug.cgi?id=12245>
865         FCKeditor: Remove Format sometimes doesn't work
866         <rdar://problem/4786404>
867         Underline style is not removed from selection after performing Remove Format
868
869         * editing/Editor.cpp:
870         (WebCore::Editor::removeFormattingAndStyle): Re-wrote this.
871
872 2007-03-07  Nikolas Zimmermann  <zimmermann@kde.org>
873
874         Reviewed by Oliver.
875
876         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12979
877         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12981
878
879         Guard against registering pending resources with empty id.
880         Be careful with calling recalcStyle() in SVGUseElement, when change is "Detach" we
881         have to use special code, as calling attach() on the shadow tree root element will crash,
882         because it has no (direct) parent node, only a shadow parent node element.
883
884         * ksvg2/misc/SVGDocumentExtensions.cpp:
885         (WebCore::SVGDocumentExtensions::addPendingResource):
886         * ksvg2/svg/SVGUseElement.cpp:
887         (WebCore::SVGUseElement::recalcStyle):
888
889 2007-03-06  Kevin Decker  <kdecker@apple.com>
890
891         Reviewed by Adele.
892
893         Fixed: <rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for Thawte email certs
894         
895         * bindings/objc/DOM.mm:
896         (WebCore::createElementClassMap): Added <keygen> to the DOM bindings so it can be accessed from Objective-C.
897         * css/html4.css: Apply the look of the <select> element to <keygen>.
898         * html/HTMLElementFactory.cpp:
899         (WebCore::keygenConstructor): Added. 
900         (WebCore::createFunctionMap): Added keygen.
901         * html/HTMLSelectElement.cpp: Made const typeAheadTimeout variable static const. 
902         (WebCore::HTMLSelectElement::HTMLSelectElement):  Fix both HTMLSelectElement constructors to initialize the
903          same number of member variables. The fact that some fields were not initialized could (and would) crash the
904          keygen element when selecting different items. Also removed m_typedString(String()) from the constructor
905          initialization because this is not needed.
906
907 2007-03-06  Kevin McCullough  <kmccullough@apple.com>
908
909         Reviewed by Darin.
910
911         - Rename a function to clarify its purpose.
912
913         * WebCore.exp:
914         * loader/FrameLoader.cpp:
915         (WebCore::FrameLoader::registerURLSchemeAsLocal):
916         * loader/FrameLoader.h:
917
918 2007-03-06  Adam Roben  <aroben@apple.com>
919
920         Build fix.
921
922         * WebCore.exp: Updated symbols.
923
924 2007-03-06  Adam Roben  <aroben@apple.com>
925
926         Reviewed by Anders.
927
928         Added a parameter to all StringTruncator methods to specify whether
929         rounding hacks should be on or off.
930
931         No layout test possible.
932
933         * platform/StringTruncator.cpp:
934         (WebCore::stringWidth): Added disableRoundingHacks parameter.
935         (WebCore::truncateString): Ditto.
936         (WebCore::StringTruncator::centerTruncate): Ditto.
937         (WebCore::StringTruncator::rightTruncate): Ditto.
938         (WebCore::StringTruncator::width): Ditto.
939         * platform/StringTruncator.h: Ditto.
940         * platform/mac/FileChooserMac.mm:
941         (WebCore::FileChooser::basenameForWidth): Pass in false to
942         centerTruncate so that the truncation matches the way the text will be
943         rendered.
944
945 2007-03-06  Anders Carlsson  <acarlsson@apple.com>
946
947         Reviewed by Maciej.
948
949         <rdar://problem/5035045>
950         REGRESSION: WebKit browser doesn't display image at http://www.metoffice.gov.uk/weather/satellite/index.html
951         
952         It turns out WinIE does allow you to access images by their id as special document properties. However, this is only
953         allowed when the element also has a name attribute. The value of the name attribute is ignored and can even be empty!
954         
955         * bindings/js/kjs_html.cpp:
956         (KJS::JSHTMLDocument::namedItemGetter):
957         Return jsUndefined() if the collection is empty.
958         
959         * html/HTMLImageElement.cpp:
960         (WebCore::HTMLImageElement::parseMappedAttribute):
961         (WebCore::HTMLImageElement::insertedIntoDocument):
962         (WebCore::HTMLImageElement::removedFromDocument):
963         * html/HTMLImageElement.h:
964         Add the id attribute value to the extra named item map.
965         
966         * html/HTMLNameCollection.cpp:
967         (WebCore::HTMLNameCollection::traverseNextItem):
968         Check for images with name attributes that match, as well as elements with id attributes that match where
969         the element also has a name attribute.
970
971 2007-03-06  Anders Carlsson  <acarlsson@apple.com>
972
973         Reviewed by Adam.
974
975         WebCore part of patch to make it possible to have different user agents for different URLs.
976
977         * bindings/js/kjs_navigator.cpp:
978         (KJS::Navigator::getValueProperty):
979         * bindings/js/kjs_proxy.cpp:
980         (WebCore::KJSProxy::initScriptIfNeeded):
981         * loader/DocumentLoader.cpp:
982         (WebCore::DocumentLoader::setLoading):
983         * loader/FrameLoader.cpp:
984         (WebCore::FrameLoader::userAgent):
985         (WebCore::FrameLoader::loadResourceSynchronously):
986         (WebCore::FrameLoader::applyUserAgent):
987         * loader/FrameLoader.h:
988         * loader/FrameLoaderClient.h:
989         * platform/graphics/svg/SVGImageEmptyClients.h:
990         (WebCore::SVGEmptyFrameLoaderClient::userAgent):
991
992 2007-03-05  Kevin McCullough  <kmccullough@apple.com>
993
994         Reviewed by Mark and Dave H.
995
996         - rdar://problem/5038491
997         An oversight of the security fix that prevented remote from loading local is that it
998         prevents user style sheets when the site is remote.  This fixes that.
999
1000         * loader/Cache.cpp: Propogate and check user style sheet flag.
1001         (WebCore::createResource):
1002         (WebCore::Cache::requestResource):
1003         * loader/Cache.h: Propogate user style sheet flag.
1004         * loader/CachedCSSStyleSheet.cpp: Propogate user style sheet flag.
1005         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1006         * loader/CachedCSSStyleSheet.h: Propogate user style sheet flag.
1007         * loader/DocLoader.cpp: Propogate user style sheet flag.
1008         (WebCore::DocLoader::requestResource):
1009         * loader/SubresourceLoader.cpp: Propogate and check user style sheet flag.
1010         (WebCore::SubresourceLoader::create):
1011         * loader/SubresourceLoader.h: Add check for user style sheet flag.
1012         * loader/loader.cpp: Propogate user style sheet flag.
1013         (WebCore::Loader::load):
1014         (WebCore::Loader::servePendingRequests):
1015         * loader/loader.h: Propogate user style sheet flag.
1016
1017 2007-03-06  Nikolas Zimmermann  <zimmermann@kde.org>
1018
1019         Reviewed by Darin.
1020
1021         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12936 (Master bug used to track all current use problems.)
1022
1023         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12926 (transform attribute not respected in nested <use> elements)
1024         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12267 (getElementById broken for <use>)
1025         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12916 (use instance in symbol definition does not work)
1026         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12917 (mouseout event does not occur after scaling use instance)
1027         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> DOM broken for script)
1028
1029         Added test: svg/custom/use-nested-transform.svg
1030         Added test: svg/custom/struct-use-09-b.svg (not yet official W3C-SVG-1.1 testcase)
1031         Fixes test: svg/custom/use-elementInstance-event-target.svg (rectangle now turns green on first click)
1032
1033         Fix all (except one) known <use> bug. The remaining bug (12630) is not crucical at all.
1034         Enable <use> again as default SVG feature, as discussed on webkit-dev.
1035
1036         dom/Element.cpp needed following tweak: set hasParentStyle to true, if there is no parentNode
1037         available - which happens for <use> nodes, as it's a shadow node. This fixes recalcStyle behaviour.
1038         Override recalcStyle() in SVGUseElement, and properly forward the call to the shadow tree root element.
1039         The shadow tree now receives proper style updates (without having to recreate the whole tree!).
1040
1041         Override attributeChanged() in SVGUseElement and only call notifyAttributeChange if one of x/y/width/height/xlink:href
1042         attribute changed - otherwhise we'll end up recreating the tree for every transform/style/(non-existing-attribute) change.
1043
1044         Do not override transform in nested use situations, but correctly append (right-sided) the translation of the <use> element.
1045         Some cosmetic fixes: don't add transform="translate(0 0)" attributes if both x/y values are null in the shadow tree.
1046
1047         Factor out logic for replacing symbol/svg tags in the shadow tree, and also invoke it during expandUseElementsInShadowTree -
1048         otherwhise <symbol><use xlink:href="#someOtherSymbol"></symbol> the <use> gets expanded to a <symbol>. Though no one expands
1049         the <symbol> element - and we're end up in hitting an assertion. Avoid that.
1050
1051         * bindings/js/JSSVGElementWrapperFactory.cpp:
1052         * bindings/js/kjs_dom.cpp:
1053         (KJS::toJS):
1054         * bindings/objc/DOM.mm:
1055         (WebCore::createElementClassMap):
1056         * dom/Element.cpp:
1057         (WebCore::Element::recalcStyle):
1058         * ksvg2/svg/SVGElement.cpp:
1059         (WebCore::shadowTreeParentElementForShadowTreeElement):
1060         (WebCore::SVGElement::dispatchEvent):
1061         * ksvg2/svg/SVGElementInstance.cpp:
1062         * ksvg2/svg/SVGElementInstance.h:
1063         * ksvg2/svg/SVGElementInstance.idl:
1064         * ksvg2/svg/SVGElementInstanceList.cpp:
1065         * ksvg2/svg/SVGElementInstanceList.h:
1066         * ksvg2/svg/SVGElementInstanceList.idl:
1067         * ksvg2/svg/SVGStyledElement.cpp:
1068         (WebCore::SVGStyledElement::notifyAttributeChange):
1069         (WebCore::SVGStyledElement::updateElementInstance):
1070         * ksvg2/svg/SVGStyledElement.h:
1071         * ksvg2/svg/SVGUseElement.cpp:
1072         (WebCore::SVGUseElement::attributeChanged):
1073         (WebCore::SVGUseElement::notifyAttributeChange):
1074         (WebCore::SVGUseElement::recalcStyle):
1075         (WebCore::SVGUseElement::buildPendingResource):
1076         (WebCore::SVGUseElement::buildShadowTreeForSymbolTag):
1077         (WebCore::SVGUseElement::alterShadowTreeForSVGTag):
1078         (WebCore::SVGUseElement::buildShadowTree):
1079         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1080         (WebCore::SVGUseElement::attachShadowTree):
1081         * ksvg2/svg/SVGUseElement.h:
1082         * ksvg2/svg/SVGUseElement.idl:
1083         * ksvg2/svg/svgtags.in:
1084
1085 2007-03-05  Brady Eidson  <beidson@apple.com>
1086
1087         Reviewed by John
1088
1089         Fixes <rdar://problem/4974258>
1090         Adds some key null checking
1091
1092         * bindings/js/kjs_html.cpp:
1093         (KJS::JSHTMLElement::implementsCall): Null check doc/frame
1094         * bindings/objc/DOMInternal.mm:
1095         (-[WebScriptObject _initializeScriptDOMNodeImp]): Null check doc/frame
1096
1097 2007-03-06  Nikolas Zimmermann  <zimmermann@kde.org>
1098
1099         Reviewed by Darin.
1100
1101         Path::normalAngleAtLength() / Path::pointAtLength() don't work correctly.
1102         pointAtLength() was not implemented, basically and normalAngleAtLength()
1103         had a bug in the tangent slope calculation.
1104
1105         The normalAngleAtLength() stuff can only be tested with my local textPath support.
1106         New LayoutTest: svg/custom/path-textPath-simulation.svg
1107
1108         * platform/graphics/Path.cpp:
1109         (WebCore::pathLengthApplierFunction):
1110         * platform/graphics/PathTraversalState.cpp:
1111         (WebCore::PathTraversalState::quadraticBezierTo):
1112         (WebCore::PathTraversalState::cubicBezierTo):
1113         * platform/graphics/PathTraversalState.h:
1114         (WebCore::PathTraversalState::):
1115
1116 2007-03-05  Alexey Proskuryakov  <ap@webkit.org>
1117
1118         Reviewed by Darin.
1119
1120         http://bugs.webkit.org/show_bug.cgi?id=12970
1121         Fix and import 4XPath test_core_functions.html test
1122
1123         * xml/XPathExpression.cpp:
1124         (WebCore::XPathExpression::evaluate): Fully initialize the evaluation context.
1125
1126         * xml/XPathFunctions.cpp:
1127         (WebCore::XPath::FunSubstring::doEvaluate): Fixed handling of edge cases.
1128         (WebCore::XPath::FunRound::round): Reimplemented to match the spec; exposed FunRound::round() to be used in
1129         other functions.
1130
1131 2007-03-05  Alexey Proskuryakov  <ap@webkit.org>
1132
1133         Reviewed by Darin.
1134
1135         http://bugs.webkit.org/show_bug.cgi?id=12954
1136         XPath relative operations are implemented incorrectly
1137
1138         * xml/XPathPredicate.cpp:
1139         (WebCore::XPath::NumericOp::doEvaluate):
1140         (WebCore::XPath::EqTestOp::compare):
1141         (WebCore::XPath::EqTestOp::doEvaluate):
1142         Reimplemented relative equality operations to match the spec.
1143
1144         * xml/XPathPredicate.h:
1145         (WebCore::XPath::NumericOp::):
1146         (WebCore::XPath::EqTestOp::):
1147         Moved relative operations to EqTestOp.
1148
1149         * xml/XPathGrammar.y:
1150         * xml/XPathParser.cpp:
1151         (WebCore::XPath::Parser::nextTokenInternal):
1152         (WebCore::XPath::Parser::lex):
1153         Adapted for the above changes.
1154
1155 2007-03-05  Mark Rowe  <mrowe@apple.com>
1156
1157         Reviewed by Lars.
1158
1159         Fix http://bugs.webkit.org/show_bug.cgi?id=12947
1160         Bug 12947: REGRESSION: ASSERTION FAILED: maxWidth >= 0 in StringTruncator.cpp:109 in WebCore::truncateString()
1161
1162         Handle nil window correctly in toUserSpace and toDeviceSpace.  On Intel Macs a message to nil that returns a
1163         float will return 0.0.  We use this as the divisor in calculating a scale factor, which results in NaN being
1164         introduced into our rect.
1165
1166         * platform/mac/ScreenMac.mm:
1167         (WebCore::toUserSpace):
1168         (WebCore::toDeviceSpace):
1169
1170 2007-03-05  Rob Buis  <buis@kde.org>
1171
1172         Reviewed by Darin.
1173
1174         http://bugs.webkit.org/show_bug.cgi?id=12868
1175         parts of the CSS classes in this simple SVG example are not applied
1176
1177         Make sure the xml stylesheets are parsed in strict mode.
1178
1179         * dom/ProcessingInstruction.cpp:
1180         (WebCore::ProcessingInstruction::parseStyleSheet):
1181
1182 2007-03-04  Adele Peterson  <adele@apple.com>
1183
1184         Reviewed by Darin.
1185
1186         Change to dispatch the keypress event during the defaultEventHandler for keydown events.  This matches IE behavior.
1187         This is preparation for fixing event dispatch with input methods (http://bugs.webkit.org/show_bug.cgi?id=10871)
1188
1189         Test: fast/events/keydown-keypress-preventDefault.html
1190
1191         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Call the defaultKeyboardEventHandler for keydown events.
1192         * page/EventHandler.cpp:
1193         (WebCore::eventTargetNodeForDocument): Return 0 instead of false since the return type in EventTargetNode.
1194         (WebCore::EventHandler::keyEvent): Removed dispatch of keypress event, since this is now done in the default event handler.
1195         (WebCore::EventHandler::defaultKeyboardEventHandler): For keydown events, create and dispatch a keypress event.
1196
1197 2007-03-04  Alexey Proskuryakov  <ap@webkit.org>
1198
1199         Reviewed by Nikolas Zimmermann (yay!).
1200
1201         http://bugs.webkit.org/show_bug.cgi?id=12962
1202         4XPath tests crash on lang() function
1203
1204         Covered by 4XPath tests, to be landed later.
1205
1206         * platform/StringImpl.cpp:
1207         (WebCore::StringImpl::reverseFind): Do not crash with empty strings.
1208         * xml/XPathFunctions.cpp:
1209         (WebCore::XPath::FunLang::doEvaluate): Do not crash when an element has no
1210         attributes. Use a proper namespace for xml:lang (not sure where "xms" came from).
1211         Rewrote the algorithm for suffix removing to match the spec.
1212
1213 2007-03-02  Anders Carlsson  <acarlsson@apple.com>
1214
1215         Reviewed by Darin.
1216
1217         <rdar://problem/5028165> 
1218         http://bugs.webkit.org/show_bug.cgi?id=12915
1219         REGRESSION: XMLHttpRequest.abort() does not stop loading (12915)
1220         
1221         * loader/DocumentLoader.cpp:
1222         (WebCore::DocumentLoader::stopLoading):
1223         Save the value of m_loading since calling FrameLoader::stopLoading could set it to false.
1224         
1225         * loader/SubresourceLoader.cpp:
1226         (WebCore::SubresourceLoader::didCancel):
1227         * loader/SubresourceLoader.h:
1228         Get rid of didCancel now, it's not needed anymore.
1229         
1230         * xml/xmlhttprequest.cpp:
1231         (WebCore::XMLHttpRequest::abort):
1232         Call cancel() instead of stopLoading(). Also, set m_aborted to true so the XMLHttpRequest object
1233         won't be dereferenced in didFail when aborting.
1234
1235 2007-03-04  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1236
1237         Reviewed by Nikolas Zimmermann.
1238
1239         Move ScrollView stubs to ScrollViewGdk.cpp
1240
1241         * platform/gdk/FrameGdk.h: remove comment that no longer makes sense
1242         * platform/gdk/ScrollViewGdk.cpp:
1243         (WebCore::ScrollView::addChild):
1244         (WebCore::ScrollView::removeChild):
1245         (WebCore::ScrollView::scrollPointRecursively):
1246         (WebCore::ScrollView::inWindow):
1247         (WebCore::ScrollView::wheelEvent):
1248         (WebCore::ScrollView::updateScrollbars):
1249         (WebCore::ScrollView::updateScrollInfo):
1250         (WebCore::ScrollView::windowToContents):
1251         (WebCore::ScrollView::contentsToWindow):
1252         (WebCore::ScrollView::scrollbarUnderMouse):
1253         * platform/gdk/TemporaryLinkStubs.cpp:
1254
1255 2007-03-02  Kevin McCullough  <kmccullough@apple.com>
1256
1257         Reviewed by Geoff.
1258
1259         - rdar://problem/4922454
1260         - This fixes a security issue by making remote referrers not able to access local
1261         resources, unless they register their schemes to be treated as local. The result is
1262         that those schemes can access local resources and cannot be accessed by remote
1263         referrers.
1264         Because this behavior is new a link-on-or-after check is made to determine if the
1265         app should use the older, less safe, behavior.
1266
1267         * WebCore.exp: added exported functions
1268         * bindings/objc/DOM.mm: consolodated function to base class
1269         (-[DOMElement image]):
1270         (-[DOMElement _imageTIFFRepresentation]):
1271         * dom/Document.cpp: Cache the document's ability to load local resources.
1272         (WebCore::Document::Document):
1273         (WebCore::Document::setURL):
1274         (WebCore::Document::shouldBeAllowedToLoadLocalResources):
1275         (WebCore::Document::stylesheetLoaded):
1276         * dom/Document.h: Cache the docuent's ability to load local resources.
1277         (WebCore::Document::getPendingSheet):
1278         (WebCore::Document::isAllowedToLoadLocalResources):
1279         * html/HTMLImageLoader.cpp: Moved functionality into base class.
1280         (WebCore::HTMLImageLoader::updateFromElement):
1281         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1282         * html/HTMLLinkElement.cpp: Handles null returns correctly now.
1283         * html/HTMLTokenizer.cpp: Moved functionality into base class.
1284         (WebCore::HTMLTokenizer::notifyFinished):
1285         * ksvg2/misc/SVGImageLoader.cpp: Moved functionality into base class.
1286         (WebCore::SVGImageLoader::dispatchLoadEvent):
1287         * loader/Cache.cpp: Checks if the cached resource can be loaded.
1288         (WebCore::Cache::requestResource):
1289         * loader/CachedCSSStyleSheet.cpp: Moved functionality into base class.
1290         (WebCore::CachedCSSStyleSheet::ref):
1291         (WebCore::CachedCSSStyleSheet::error):
1292         * loader/CachedImage.cpp: Moved functionality into base class.
1293         (WebCore::CachedImage::CachedImage):
1294         * loader/CachedImage.h: Moved functionality into base class.
1295         (WebCore::CachedImage::canRender):
1296         * loader/CachedResource.cpp: Cache if the CachedResource should be treated as local
1297         (WebCore::CachedResource::CachedResource):
1298         * loader/CachedResource.h: Moved functionality into base class.
1299         (WebCore::CachedResource::errorOccurred):
1300         (WebCore::CachedResource::shouldTreatAsLocal):
1301         * loader/CachedScript.cpp: Moved functionality into base class.
1302         (WebCore::CachedScript::CachedScript):
1303         * loader/CachedScript.h: Moved functionality into base class.
1304         (WebCore::CachedScript::schedule):
1305         * loader/CachedXBLDocument.cpp: Moved functionality into base class.
1306         (WebCore::CachedXBLDocument::error):
1307         * loader/CachedXSLStyleSheet.cpp: Moved functionality into base class.
1308         (WebCore::CachedXSLStyleSheet::error):
1309         * loader/FrameLoader.cpp: See comments for each function below.
1310         (WebCore::FrameLoader::loadSubframe): Use new canLoad.
1311         (WebCore::FrameLoader::restrictAccessToLocal): return value of linked-on-or-after check.
1312         (WebCore::FrameLoader::setRestrictAccessToLocal): set value for linked-on-or-after check.
1313         (WebCore::localSchemes): Return set of schemes that are to be treated as local.
1314         (WebCore::FrameLoader::loadPlugin): Use new canLoad.
1315         (WebCore::FrameLoader::canLoad): Now multiple functions that each do the same work but some can take advantage of the cached values, if they were computed previously.
1316         (WebCore::FrameLoader::shouldHideReferrer): Extracted out the logic to determine if the referrer should be hidden so it is only calculated when needed.
1317         (WebCore::FrameLoader::loadResourceSynchronously): No longer calls canLoad to get hideReferrer info.
1318         (WebCore::FrameLoader::registerSchemeAsLocal): Functionality to register a scheme to be treated as local.
1319         (WebCore::FrameLoader::treatURLAsLocal): Given a URL this function determines if it should be treated as local.
1320         * loader/FrameLoader.h: Declared functions for this security fix.  See above.
1321         * loader/MainResourceLoader.cpp: Optized order of bools to regain performance.
1322         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1323         * loader/SubresourceLoader.cpp: Now restricts remote from loading local resources.
1324         (WebCore::SubresourceLoader::create):
1325         * page/EventHandler.cpp: Moved functionality into base class.
1326         (WebCore::selectCursor):
1327         * platform/KURL.cpp: KURLs need to check all the registered schemes now.
1328         (WebCore::KURL::isLocalFile):
1329         * rendering/HitTestResult.cpp: Moved functionality into base class.
1330         (WebCore::HitTestResult::image):
1331         * rendering/RenderImage.cpp: Moved functionality into base class.
1332         (WebCore::RenderImage::setCachedImage):
1333         (WebCore::RenderImage::imageChanged):
1334         (WebCore::RenderImage::paint):
1335         (WebCore::RenderImage::layout):
1336         (WebCore::RenderImage::calcAspectRatioWidth):
1337         (WebCore::RenderImage::calcAspectRatioHeight):
1338         * rendering/RenderImage.h: Moved functionality into base class.
1339         (WebCore::RenderImage::errorOccurred):
1340         * rendering/RenderListItem.cpp: Moved functionality into base class.
1341         (WebCore::RenderListItem::setStyle):
1342         * rendering/RenderListMarker.cpp: Moved functionality into base class.
1343         (WebCore::RenderListMarker::isImage):
1344         * xml/xmlhttprequest.cpp: Check doc's cached value instead of determining independently.
1345         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
1346
1347 2007-03-02  Justin Garcia  <justin.garcia@apple.com>
1348
1349         Reviewed by kevin
1350         
1351         <rdar://problem/5028447>
1352         REGRESSION: Gmail Editor: Copied message text pastes at the wrong font size
1353
1354         * editing/markup.cpp:
1355         (WebCore::createMarkup): The style of the div that holds
1356         a fully selected body's styles didn't include styles inherited
1357         from the body's ancestors.
1358         
1359 2007-03-02  Justin Garcia  <justin.garcia@apple.com>
1360
1361         Reviewed by harrison
1362
1363         <rdar://problem/4545040>
1364         innerHTML does not HTML-escape text nodes inside PRE elements
1365         <rdar://problem/5027857>
1366         Pasting into Mail from Safari's view-source window renders the HTML
1367
1368         * editing/HTMLInterchange.cpp:
1369         (WebCore::convertHTMLTextToInterchangeFormat): Send this function
1370         the node that the text comes from as a parameter.  It shouldn't convert
1371         '\n's to spaces/nbsps if the text is coming from text where newlines are
1372         preserved.
1373         * editing/HTMLInterchange.h:
1374         * editing/markup.cpp:
1375         (WebCore::startMarkup): Escape text inside the children of PREs.
1376
1377 2007-03-02  Sam Weinig  <sam@webkit.org>
1378
1379         Reviewed by Anders.
1380
1381         Try to fix the Qt build.
1382
1383         * platform/qt/TemporaryLinkStubs.cpp: Add stubs.
1384         (WebCore::searchMenuNoRecentSearchesText):
1385         (WebCore::searchMenuRecentSearchesText):
1386         (WebCore::searchMenuClearRecentSearchesText):
1387         (WebCore::AXWebAreaText):
1388         (WebCore::AXLinkText):
1389         (WebCore::AXListMarkerText):
1390         (WebCore::AXImageMapText):
1391         (WebCore::AXHeadingText):
1392
1393 2007-03-02  David Harrison  <harrison@apple.com>
1394
1395         Suggested by Darin.
1396
1397         A more efficient solution to rdar://4961431.
1398
1399         * bridge/mac/WebCoreAXObject.mm:
1400         (-[WebCoreAXObject accessibilityIsIgnored]):
1401
1402 2007-03-01  Justin Garcia  <justin.garcia@apple.com>
1403
1404         Reviewed by john
1405         
1406         <rdar://problem/5032095>
1407         Gmail Editor: Copied text pastes on a new line instead of current line
1408         
1409         Start merge failed to occur because positionAtStartOfInsertedContent
1410         had a bug.
1411
1412         * editing/ReplaceSelectionCommand.cpp:
1413         (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
1414         Was failing when inserting <span><div>foo/div></span>. Return the 
1415         inserted content's first VisiblePosition.
1416
1417 2007-03-02  Dave Hyatt  <hyatt@apple.com>
1418
1419         Fix crasher in glyph map code (buffer overrun).
1420
1421         Reviewed by darin
1422
1423         * platform/win/GlyphPageTreeNodeWin.cpp:
1424         (WebCore::GlyphPage::fill):
1425
1426 2007-03-01  Antti Koivisto  <antti@apple.com>
1427
1428         Reviewed by Maciej.
1429
1430         Fix for http://bugs.webkit.org/show_bug.cgi?id=12895
1431         REGRESSION: imagemap: pointer cursor is shown everywhere
1432         <rdar://problem/5028163>
1433  
1434         Image with imagemap should never itself be URLElement in hit test results. 
1435                
1436         No layout test, cursor state can't be captured.
1437
1438         * rendering/RenderLayer.cpp:
1439         (WebCore::RenderLayer::hitTest):
1440
1441 2007-03-01  Antti Koivisto  <antti@apple.com>
1442
1443         Reviewed by Maciej.
1444         
1445         Fix http://bugs.webkit.org/show_bug.cgi?id=12690
1446         REGRESSION: can not log in to bank of america with TOT webkit
1447         <rdar://problem/4990044>
1448         
1449         and http://bugs.webkit.org/show_bug.cgi?id=12604
1450         REGRESSION: After closing the "Would you like to save password" sheet, the form fails 
1451         to submit automatically at http://www.mac.com/WebObjects/HomePage.woa
1452         <rdar://problem/4871752>
1453         
1454         and http://bugs.webkit.org/show_bug.cgi?id=12020
1455         REGRESSION: Flickr uploading broken
1456         <rdar://problem/4928662>
1457         
1458         Turn protection against multiple forms submission back on. This approach is buggy 
1459         but it is way better than not having it at all. Not protecting against this
1460         breaks number of major sites.
1461         
1462         * bridge/mac/WebCoreAXObject.mm:
1463         (-[WebCoreAXObject accessibilityPerformAction:]):
1464         * loader/FrameLoader.cpp:
1465         (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
1466         (WebCore::FrameLoader::submitForm):
1467         (WebCore::FrameLoader::receivedMainResourceError):
1468         * loader/FrameLoader.h:
1469         * page/EventHandler.cpp:
1470         (WebCore::EventHandler::keyEvent):
1471         * page/Frame.cpp:
1472         (WebCore::Frame::setView):
1473         * page/mac/EventHandlerMac.mm:
1474         (WebCore::EventHandler::mouseDown):
1475
1476 2007-03-01  Kevin McCullough  <kmccullough@apple.com>
1477
1478         Reviewed by Adam.
1479
1480         - Added the test case: external-script-URL-location.html
1481         - Fix an issue where the url of a document is null after an open if the document
1482         has no parent.
1483
1484         * dom/Document.cpp:
1485         (WebCore::Document::open):
1486
1487 2007-03-01  Anders Carlsson  <acarlsson@apple.com>
1488
1489         Reviewed by Darin.
1490
1491         <rdar://problem/4960250> 
1492         http://bugs.webkit.org/show_bug.cgi?id=11627
1493         REGRESSION: Reproducible crash at IMDb in WebCore::FrameLoader::stopLoadingSubframes
1494         
1495         In rare cases, we could end up calling checkLoadComplete twice for the same frame. This would cause the 
1496         didFailProvisionalLoad delegate method to be called twice for the same frame, and also cause the provisional document loader
1497         to be reset to null when other code wasn't expecting it.
1498         
1499         This regressed in revision 10904 with the fix for <rdar://problem/4184719>. The fix is to only call stopLoading on the frame
1500         if either the document loader is loading, or the document is still being parsed. I've verified that the bug is still fixed and
1501         that no leaks occur.
1502         
1503         * loader/DocumentLoader.cpp:
1504         (WebCore::DocumentLoader::stopLoading):
1505
1506 2007-03-01  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1507
1508         Reviewed by Darin.
1509
1510         Fix ARM crash due to accessing non-4-byte-aligned memory
1511         as 32-bit values.
1512
1513         * platform/AtomicString.cpp:
1514         (WebCore::UCharBufferTranslator::equal):
1515
1516 2007-03-01  David Harrison  <harrison@apple.com>
1517
1518         Reviewed by Darin.
1519
1520         <rdar://problem/5033905> Have the DOM secondary thread check raise an exception by default
1521
1522         * platform/mac/ThreadCheck.mm:
1523         (WebCore::_WebCoreThreadViolationCheck):
1524         Initialize threadViolationIsException to true.
1525
1526 2007-03-01  Brady Eidson  <beidson@apple.com>
1527
1528         Reviewed by Darin
1529
1530         <rdar://problem/5030628> - Crash opening a new window with the
1531         "New windows open to the same page" pref set
1532
1533         * history/HistoryItem.cpp:
1534         (WebCore::HistoryItem::HistoryItem): Set the m_subItems vector capacity correctly
1535
1536 2007-03-01  Alexey Proskuryakov  <ap@webkit.org>
1537
1538         Reviewed by Maciej.
1539
1540         http://bugs.webkit.org/show_bug.cgi?id=12801
1541         Assertion failure in createMarkup() (root) when doing Select All, Copy in an SVG document
1542
1543         Test: editing/pasteboard/createMarkup-assert.xml
1544
1545         * editing/markup.cpp:
1546         (WebCore::createMarkup): Removed the assertion, because it's wrong in a non-HTML world.
1547
1548 2007-02-28  Adam Roben  <aroben@apple.com>
1549
1550         Reviewed by Oliver and Hyatt.
1551
1552         Fix <rdar://problem/5024233> Crash while using Find on empty document
1553
1554         No layout test possible, as this involves a null document.
1555
1556         * dom/Range.cpp:
1557         (WebCore::rangeOfContents): Added an ASSERT.
1558         * page/Frame.cpp:
1559         (WebCore::Frame::findString): Added a null-check for document().
1560         (WebCore::Frame::markAllMatchesForText): Ditto.
1561
1562 2007-02-28  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1563
1564         Not reviewed - simple gdk build fix.
1565
1566         Add stubs for newly introduced localized strings.
1567
1568         * platform/gdk/TemporaryLinkStubs.cpp:
1569         (WebCore::searchMenuNoRecentSearchesText):
1570         (WebCore::searchMenuRecentSearchesText):
1571         (WebCore::searchMenuClearRecentSearchesText):
1572
1573 2007-02-28  Brady Eidson  <beidson@apple.com>
1574
1575         Reviewed by Beth
1576
1577         Move the Thread Safety Check functions into their own header for export to WebKit
1578
1579         * WebCore.exp: Export the function
1580         * WebCore.xcodeproj/project.pbxproj: 
1581         * bindings/scripts/CodeGeneratorObjC.pm: Include the new header
1582         * platform/Logging.h: Move stuff to ThreadCheck.h
1583         * platform/ThreadCheck.h: Added.
1584         * platform/mac/LoggingMac.mm: Move stuff to ThreadCheck.mm
1585         * platform/mac/ThreadCheck.mm: Added.
1586         (WebCore::_WebCoreThreadViolationCheck):
1587         (WebCoreReportThreadViolation):
1588
1589 2007-02-28  Beth Dakin  <bdakin@apple.com>
1590
1591         Reviewed by Brady.
1592
1593         Fix for http://bugs.webkit.org/show_bug.cgi?id=12923 REGRESSION: 
1594         Assertion failure copying standalone image
1595
1596         * platform/mac/PasteboardMac.mm:
1597         (WebCore::Pasteboard::writeImage): Use the CachedImage as the 
1598         resource. This makes more sense anyway. There is no need to null-
1599         check the renderer or the CachedImage since we return early if 
1600         there is no Image* and the HitTestResult::image() function checks 
1601         for these things.
1602
1603 2007-02-28  Adele Peterson  <adele@apple.com>
1604
1605         Reviewed by Beth.
1606
1607         Fix for <rdar://problem/4887423> REGRESSION: search results popup menu strings are not localized
1608         and <rdar://problem/3517227> accessibility-related strings in WebCore are not localized
1609
1610         Use localized strings from WebKit instead of hard coded strings.
1611
1612         * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject roleDescription]):
1613         * page/mac/WebCoreViewFactory.h:
1614         * platform/LocalizedStrings.h:
1615         * platform/mac/LocalizedStringsMac.mm:
1616         (WebCore::searchMenuNoRecentSearchesText):
1617         (WebCore::searchMenuRecentSearchesText):
1618         (WebCore::searchMenuClearRecentSearchesText):
1619         (WebCore::AXWebAreaText):
1620         (WebCore::AXLinkText):
1621         (WebCore::AXListMarkerText):
1622         (WebCore::AXImageMapText):
1623         (WebCore::AXHeadingText):
1624         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::itemText):
1625
1626 2007-02-27  Antti Koivisto  <antti@apple.com>
1627
1628         Reviewed by Maciej.
1629
1630         - fix http://bugs.webkit.org/show_bug.cgi?id=12911
1631         GoogleDocs: Ordered lists don't update immediately when start attribute changed
1632         
1633         Update list marker value when start attribute changes.
1634
1635         * html/HTMLOListElement.cpp:
1636         (WebCore::HTMLOListElement::parseMappedAttribute):
1637
1638 2007-02-28  Nikolas Zimmermann  <zimmermann@kde.org>
1639
1640         Reviewed by Maciej.
1641
1642         Corrected the use of the new ENABLE() macros in some ksvg2/svg files.
1643         Add new build-webkit flags "--(no-)xpath" / "--(no-)xslt", to be able
1644         to switch off build features easily. Also add "--(no-)svg-experimental-features"
1645         flag, to be able to test filters/animations/use/foreignObject easily.
1646
1647         * DerivedSources.make:
1648         * ksvg2/scripts/make_names.pl:
1649         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
1650         * ksvg2/svg/SVGStyledElement.cpp:
1651         * ksvg2/svg/SVGUseElement.cpp:
1652
1653 2007-02-28  Rob Buis  <buis@kde.org>
1654
1655         Reviewed by Maciej.
1656
1657         http://bugs.webkit.org/show_bug.cgi?id=12609
1658         Any SVG element will create renderers even when children of HTML elements
1659
1660         Allow creation of svg renderers only when parent is SVG, except for
1661         the <svg> element.
1662
1663         * ksvg2/svg/SVGAElement.h:
1664         * ksvg2/svg/SVGAnimationElement.h:
1665         * ksvg2/svg/SVGCircleElement.h:
1666         * ksvg2/svg/SVGClipPathElement.h:
1667         (WebCore::SVGClipPathElement::rendererIsNeeded):
1668         * ksvg2/svg/SVGDefsElement.cpp:
1669         * ksvg2/svg/SVGDefsElement.h:
1670         * ksvg2/svg/SVGDescElement.h:
1671         (WebCore::SVGDescElement::rendererIsNeeded):
1672         * ksvg2/svg/SVGElement.cpp:
1673         * ksvg2/svg/SVGEllipseElement.h:
1674         * ksvg2/svg/SVGFilterElement.h:
1675         (WebCore::SVGFilterElement::rendererIsNeeded):
1676         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
1677         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
1678         * ksvg2/svg/SVGForeignObjectElement.h:
1679         * ksvg2/svg/SVGGElement.h:
1680         * ksvg2/svg/SVGGradientElement.h:
1681         * ksvg2/svg/SVGImageElement.h:
1682         * ksvg2/svg/SVGLineElement.h:
1683         * ksvg2/svg/SVGMarkerElement.h:
1684         * ksvg2/svg/SVGMaskElement.h:
1685         * ksvg2/svg/SVGPathElement.h:
1686         * ksvg2/svg/SVGPatternElement.h:
1687         * ksvg2/svg/SVGPolyElement.h:
1688         * ksvg2/svg/SVGRectElement.h:
1689         * ksvg2/svg/SVGStopElement.h:
1690         * ksvg2/svg/SVGStyledElement.cpp:
1691         (WebCore::SVGStyledElement::rendererIsNeeded):
1692         * ksvg2/svg/SVGStyledElement.h:
1693         * ksvg2/svg/SVGSwitchElement.h:
1694         * ksvg2/svg/SVGSymbolElement.h:
1695         (WebCore::SVGSymbolElement::rendererIsNeeded):
1696         * ksvg2/svg/SVGTRefElement.h:
1697         * ksvg2/svg/SVGTSpanElement.h:
1698         * ksvg2/svg/SVGTextElement.h:
1699         * ksvg2/svg/SVGTitleElement.h:
1700         (WebCore::SVGTitleElement::rendererIsNeeded):
1701         * ksvg2/svg/SVGUseElement.h:
1702         * ksvg2/svg/SVGViewElement.h:
1703         (WebCore::SVGViewElement::rendererIsNeeded):
1704
1705 2007-02-28  Rob Buis  <buis@kde.org>
1706
1707         Reviewed by Maciej.
1708
1709         http://bugs.webkit.org/show_bug.cgi?id=12913
1710         Markers do not render in webkit when it misses markerWidth or markerHeight attribute
1711
1712         Set defaults for markerWidth/markerHeight so markers that do not specify them render.
1713
1714         * ksvg2/svg/SVGMarkerElement.cpp:
1715         (WebCore::SVGMarkerElement::SVGMarkerElement):
1716
1717 2007-02-27  Anders Carlsson  <acarlsson@apple.com>
1718
1719         * loader/ResourceLoader.cpp:
1720         (WebCore::ResourceLoader::~ResourceLoader):
1721         Remove comment.
1722
1723 2007-02-27  Justin Garcia  <justin.garcia@apple.com>
1724
1725         Reviewed by oliver
1726
1727         <rdar://problem/5027300>
1728         REGRESSION: Images inserted with align left/right are lost
1729
1730         * editing/ReplaceSelectionCommand.cpp:
1731         (WebCore::ReplaceSelectionCommand::shouldMerge):
1732         Don't attempt to merge to or from a position before 
1733         or after a block because it will be a no-op and
1734         lead to infinite recursion.
1735         In this case it instead resulted in content loss because 
1736         of bugs in start/endOfParagraph (5027702).
1737         * editing/visible_units.cpp: Added two FIXMEs for
1738         the problems with start/endOfParagraph.
1739
1740 2007-02-27  Anders Carlsson  <acarlsson@apple.com>
1741
1742         Reviewed by Geoff.
1743
1744         Make resource load delegate methods pass the right document loader.
1745         
1746         * loader/FrameLoader.cpp:
1747         (WebCore::FrameLoader::willSendRequest):
1748         (WebCore::FrameLoader::didReceiveResponse):
1749         (WebCore::FrameLoader::didReceiveData):
1750         (WebCore::FrameLoader::didFailToLoad):
1751         (WebCore::FrameLoader::didFinishLoad):
1752         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
1753         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
1754         Use the resource loader's document loader instead of the active one.
1755         
1756         * loader/MainResourceLoader.cpp:
1757         (WebCore::MainResourceLoader::receivedError):
1758         Make it so we send the frame load delegate method before the resource load delegate method.
1759         This was a regression from 2.0 and was caused by the fix to rdar://problem/4609195. Because the way the loader
1760         now works, both delegate methods will be called.
1761         
1762         * loader/ResourceLoader.cpp:
1763         (WebCore::ResourceLoader::ResourceLoader):
1764         * loader/ResourceLoader.h:
1765         (WebCore::ResourceLoader::documentLoader):
1766         Add document loader pointer to ResourceLoader.
1767
1768 2007-02-27  Mitz Pettel  <mitz@webkit.org>
1769
1770         Reviewed by Hyatt.
1771
1772         - fix http://bugs.webkit.org/show_bug.cgi?id=12910
1773           REGRESSION (r18756-r18765): list-bullet doesn't redraw properly when changing the list's content using JavaScript
1774
1775         Test: fast/repaint/list-marker.html
1776
1777         * rendering/RenderListItem.cpp:
1778         (WebCore::RenderListItem::positionListMarker): Add the marker to the visual
1779         overflow of all its ancestor blocks up to the list item. This needs to be
1780         done here since the marker is positioned only after those blocks have been
1781         laid out.
1782
1783 2007-02-27  Antti Koivisto  <antti@apple.com>
1784
1785         Reviewed by Hyatt.
1786         
1787         - fix http://bugs.webkit.org/show_bug.cgi?id=12918
1788         REGRESSION: Google Finance dropdown Flickers
1789         <rdar://4988039>
1790         
1791         If a node dies while mouse is over it, it is still supposed to receive
1792         mouseout event (wasn't case in Tiger webkit). However this event should 
1793         not propagate to any other nodes. This patch matches Firefox behavior in
1794         this respect.
1795
1796         * dom/EventTargetNode.cpp:
1797         (WebCore::EventTargetNode::dispatchGenericEvent):
1798
1799 2007-02-27  Geoffrey Garen  <ggaren@apple.com>
1800
1801         Reviewed by Maciej Stachowiak.
1802         
1803         Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
1804         JS objects not collected after closing window @ ebay.com/maps.google.com
1805
1806         Garbage collect in the KJSProxy destructor, after clearing our reference
1807         to the interpreter, because that's when the interpreter has torn down fully.
1808
1809         (Technically speaking, we can't *prove* that we have the only reference to 
1810         our interpreter, but that's how it works in practice, and manual garbage 
1811         collection is just an opportunistic optimization, so it's OK for it to 
1812         work in practice even if it can't be proven in theory.)
1813         
1814         Layout tests pass. No leaks reported.
1815
1816         * bindings/js/kjs_proxy.cpp:
1817         (WebCore::KJSProxy::~KJSProxy):
1818         * bindings/js/kjs_proxy.h:
1819         * page/Page.cpp:
1820         (WebCore::Page::~Page): Merged pageDestroyed() calls. Moved debug-only
1821         code to the bottom.
1822         * page/Frame.cpp:
1823         (WebCore::Frame::~Frame): Don't call getObject() because globalObject()
1824         returns a JSObject* already, and the call can leave a pointer to the Window
1825         object on the stack. Don't check for NULL because it is an invariant of
1826         JavaScriptCore that no JSObject* can be NULL. Do use a volatile pointer
1827         for w because the 'w = 0' assignment just screams to the compiler, "Don't
1828         generate any code for me!"
1829
1830 2007-02-27  Rob Buis  <buis@kde.org>
1831
1832         Reviewed by David Hyatt.
1833
1834         http://bugs.webkit.org/show_bug.cgi?id=4128
1835         !important is ignored in inline styling.
1836
1837         Handle properties with !important flag better in inline
1838         style declarations.
1839
1840         * css/CSSMutableStyleDeclaration.cpp:
1841         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
1842
1843 2007-02-27  David Hyatt  <hyatt@apple.com>
1844
1845         Bug 11435.  Make sure RenderViews always paintBoxDecorations.  They used to before I removed RenderView's
1846         paint method.  This fix restores the original behavior.
1847
1848         Reviewed by mitz
1849
1850         * rendering/RenderBox.cpp:
1851         (WebCore::RenderBox::setStyle):
1852
1853 2007-02-27  David Hyatt  <hyatt@apple.com>
1854
1855         Fix for bug 12094, make sure setMinMaxKnown starts off false for the weird/rare case of empty
1856         plaintext documents (which really are buggy and should be fixed to generate root elements).
1857
1858         Reviewed by mitz
1859
1860         * rendering/RenderView.cpp:
1861         (WebCore::RenderView::RenderView):
1862
1863 2007-02-27  Dex Deacon  <occupant4@gmail.com>
1864
1865         Reviewed by Darin.
1866
1867         Fixed the case where a BackForwardList of capacity==1 would grow without bound.
1868
1869         * history/BackForwardList.cpp:
1870         (WebCore::BackForwardList::addItem):
1871
1872 2007-02-22  Lars Naesbye Christensen  <lars@naesbye.dk>
1873
1874         Reviewed by Maciej.
1875
1876         http://bugs.webkit.org/show_bug.cgi?id=12848
1877         Help cursor should have a white outline
1878
1879         * Resources/helpCursor.png:
1880
1881 2007-02-27  Alexey Proskuryakov  <ap@webkit.org>
1882
1883         Reviewed by Maciej.
1884
1885         http://bugs.webkit.org/show_bug.cgi?id=12594
1886         REGRESSION: Strange highlight in active input area
1887
1888         No automated test possible.
1889
1890         * rendering/InlineTextBox.cpp:
1891         (WebCore::InlineTextBox::paint): Restore a check lost in r12792.
1892
1893 2007-02-27  Darin Adler  <darin@apple.com>
1894
1895         Reviewed by Mitz.
1896
1897         - fix http://bugs.webkit.org/show_bug.cgi?id=12908
1898           crash in http/tests/incremental/frame-focus-before-load.html
1899
1900         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView):
1901         Add null checks.
1902
1903 2007-02-27  Darin Adler  <darin@apple.com>
1904
1905         Reviewed by Alexey.
1906
1907         - fix http://bugs.webkit.org/show_bug.cgi?id=12909
1908           should use ICU, not TEC, for MacRoman decoding
1909
1910         * platform/TextCodecICU.cpp: (WebCore::TextCodecICU::registerEncodingNames):
1911         Add "macroman" as an alias for "macintosh". We have seen that in use in mail,
1912         although I'm not sure it's used on the web.
1913
1914         * platform/mac/mac-encodings.txt: Remove MacRoman line, which was added back
1915         as part of the patch for bug 4971226. But by adding it to this file rather
1916         than the ICU codec, we get it only on Mac OS X. And long term we are trying to
1917         get rid of the use of TEC entirely, so we want this file to be as empty as
1918         possible.
1919
1920 2007-02-27  Rob Buis  <buis@kde.org>
1921
1922         Reviewed by Maciej.
1923
1924         http://bugs.webkit.org/show_bug.cgi?id=12905
1925         Not all svg shapes should support markers
1926
1927         Restrict marker usage to svg shapes polyline, polygon, line and path.
1928
1929         * ksvg2/svg/SVGLineElement.h:
1930         (WebCore::SVGLineElement::supportsMarkers):
1931         * ksvg2/svg/SVGPathElement.h:
1932         (WebCore::SVGPathElement::supportsMarkers):
1933         * ksvg2/svg/SVGPolyElement.h:
1934         (WebCore::SVGPolyElement::supportsMarkers):
1935         * ksvg2/svg/SVGStyledElement.h:
1936         (WebCore::SVGStyledElement::supportsMarkers):
1937         * rendering/RenderPath.cpp:
1938         (WebCore::RenderPath::paint):
1939
1940 2007-02-26  Adele Peterson  <adele@apple.com>
1941
1942         Reviewed by Lars.
1943
1944         Fix for http://bugs.webkit.org/show_bug.cgi?id=12902
1945         <rdar://problem/5012679> REGRESSION: Pressing return key doesn't 
1946         move caret to next line after applying a font color in GMail
1947
1948         Test: fast/frames/iframe-window-focus-2.html
1949
1950         * page/EventHandler.h: Make focusDocumentView public.
1951         * page/Frame.cpp: (WebCore::Frame::focusWindow): Instead of just setting the focused frame,
1952           we should set also focus the document view.  The bug here was that since the subframe view
1953           wasn't the first responder, the key down event was going to the wrong frame.
1954
1955 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
1956
1957         Reviewed by Oliver.
1958
1959         - fixed <rdar://problem/4946881> Recursive loop with <marker> not caught, crashes in WebCore::SVGPaintServer::draw (11244)
1960         http://bugs.webkit.org/show_bug.cgi?id=11244
1961
1962         * platform/graphics/svg/SVGResourceMarker.cpp:
1963         (WebCore::SVGResourceMarker::draw): Use a HashSet to guard against
1964         reference cycles.
1965
1966 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
1967
1968         Reviewed by Kevin McCullough.
1969
1970         - fix Qt build for earlier SVG changes.
1971
1972         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
1973
1974 2007-02-26  Oliver Hunt  <oliver@apple.com>
1975
1976         Reviewed by Maciej.
1977
1978         Fix for <rdar://problem/4827378>: Canvas with large height 
1979         uses lots of memory, computer almost stops responding
1980          
1981         Put cap on maximum area of canvas, size is similar too the 
1982         maximum size allowed by firefox (firefox seems to to cut off 
1983         at area == 32767 * 9358). 
1984
1985         Also protect renderer against the possibility of a null context
1986         (this was triggering a CG warning)
1987
1988         * html/HTMLCanvasElement.cpp:
1989         (WebCore::HTMLCanvasElement::createDrawingContext):
1990            Apply maximum canvas area
1991         (WebCore::HTMLCanvasElement::createPlatformImage):
1992            Protect against null CG Context
1993
1994 2007-02-26  Mitz Pettel  <mitz@webkit.org>
1995
1996         Reviewed by Antti Koivisto.
1997
1998         - fix http://bugs.webkit.org/show_bug.cgi?id=12899
1999           Ordered lists not updating dynamically with new styles
2000
2001         Test: fast/lists/list-style-type-dynamic-change.html
2002
2003         * rendering/RenderListMarker.cpp:
2004         (WebCore::RenderListMarker::setStyle): Made changing the marker type trigger
2005         updating of the marker.
2006
2007 2007-02-26  Adele Peterson  <adele@apple.com>
2008
2009         Reviewed by Maciej.
2010
2011         Fix for <rdar://problem/5012761> REGRESSION: form submit invokes wrong event handler
2012
2013         Test: fast/events/submit-reset-nested-bubble.html
2014
2015         * dom/EventTargetNode.h: Made handleLocalEvents virtual.
2016         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::handleLocalEvents): If we're
2017           not in the capture phase, and the target is a different form, and we're handling
2018           the submitEvent or the resetEvent, then stop propagation of the event.  This matches
2019           Firefox behavior.  You can only get in this situation if misnested tags cause
2020           forms to be nested.
2021         * html/HTMLFormElement.h: Added handleLocalEvents.
2022
2023 2007-02-26  Darin Adler  <darin@apple.com>
2024
2025         Reviewed by Oliver Hunt.
2026
2027         - <rdar://problem/5021555> TextCodecICU does not use fallback mappings; it should
2028
2029         * platform/TextCodecICU.cpp: (WebCore::TextCodecICU::createICUConverter):
2030         Added a call to ucnv_setFallback(TRUE).
2031
2032 2007-02-26  Oliver Hunt  <oliver@apple.com>
2033
2034         Reviewed by Adam.
2035
2036         Fix for rdar://problem/5021127 
2037
2038         Need to add null check to node -- original Obj-C didn't need 
2039         the null check due to the Obj-C null messaging semantics
2040
2041         * editing/Editor.cpp:
2042         (WebCore::Editor::shouldInsertFragment):
2043
2044 2007-02-26  David Hyatt  <hyatt@apple.com>
2045
2046         Make text files render using white-space: pre-wrap instead of white-space: pre.
2047         
2048         Reviewed by aroben
2049
2050         * loader/TextDocument.cpp:
2051         (WebCore::TextTokenizer::write):
2052
2053 2007-02-26  David Hyatt  <hyatt@apple.com>
2054
2055         Back out the change to add fullyClippedContentRect.  The layout test
2056         was actually showing more correct results.
2057
2058         * page/Frame.cpp:
2059         (WebCore::Frame::visibleSelectionRect):
2060         (WebCore::Frame::setIsActive):
2061         (WebCore::Frame::markAllMatchesForText):
2062         * platform/ScrollView.h:
2063         * platform/mac/ScrollViewMac.mm:
2064         * rendering/RenderLayer.cpp:
2065         (WebCore::RenderLayer::scrollRectToVisible):
2066
2067 2007-02-26  David Hyatt  <hyatt@apple.com>
2068
2069         Add support for a new property called -webkit-border-fit.  This property
2070         has two values: border and lines.  The "border" value means the border and
2071         background paint normally at the border box level.  The "lines" value indicates
2072         that the border and background should shrink dynamically to snugly hug the
2073         line boxes of normal flow descendants.
2074
2075         Reviewed by darin
2076
2077         fast/borders/border-fit.html
2078
2079         * WebCore.xcodeproj/project.pbxproj:
2080         * css/CSSComputedStyleDeclaration.cpp:
2081         (WebCore::):
2082         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2083         * css/CSSPropertyNames.in:
2084         * css/CSSValueKeywords.in:
2085         * css/cssparser.cpp:
2086         (WebCore::CSSParser::parseValue):
2087         * css/cssstyleselector.cpp:
2088         (WebCore::CSSStyleSelector::applyProperty):
2089         * rendering/RenderBlock.cpp:
2090         (WebCore::RenderBlock::adjustForBorderFit):
2091         (WebCore::RenderBlock::borderFitAdjust):
2092         * rendering/RenderBlock.h:
2093         * rendering/RenderBox.cpp:
2094         (WebCore::RenderBox::paintBoxDecorations):
2095         * rendering/RenderBox.h:
2096         (WebCore::RenderBox::borderFitAdjust):
2097         * rendering/RenderStyle.cpp:
2098         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2099         (WebCore::StyleRareNonInheritedData::operator==):
2100         (WebCore::RenderStyle::diff):
2101         * rendering/RenderStyle.h:
2102         (WebCore::):
2103         (WebCore::RenderStyle::borderFit):
2104         (WebCore::RenderStyle::setBorderFit):
2105         (WebCore::RenderStyle::initialBorderFit):
2106
2107 2007-02-26  Adam Roben  <aroben@apple.com>
2108
2109         Reviewed by Darin.
2110
2111         Build fix.
2112
2113         * rendering/RenderTreeAsText.cpp: Can't use #ifndef with ENABLE() macro.
2114
2115 2007-02-26  Adele Peterson  <adele@apple.com>
2116
2117         Reviewed by Adam.
2118
2119         Fix for <rdar://problem/4990700> Safari always crashes when attempting to edit/view 
2120         Yahoo pipes in WebCore::HTMLSelectElement::optionToListIndex
2121
2122         Test: fast/forms/select-out-of-bounds-index.html
2123
2124         * html/HTMLSelectElement.cpp:
2125         (WebCore::HTMLSelectElement::setSelectedIndex): If we're about to deselect all options, then set m_lastOnChangeIndex to -1.
2126         (WebCore::HTMLSelectElement::optionToListIndex): Moved listSize to a local variable.  Rewrote using a simpler for-loop to prevent out-of-bounds errors.
2127
2128 2007-02-26  Anders Carlsson  <acarlsson@apple.com>
2129
2130         Reviewed by Geoff.
2131
2132         <rdar://problem/4816376>
2133         REGRESSION: NetNewsWire 3.0 - Crashes in WebDocumentLoaderMac::attachToFrame() (12674)
2134         
2135         * loader/FrameLoader.cpp:
2136         (WebCore::FrameLoader::reload):
2137         Remove call to setPolicyDocumentLoader here, it's set by the ::load function that we end up calling.
2138
2139 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
2140
2141         Reviewed by Lars.
2142
2143         - fixed <rdar://problem/5021698> Disable experimental SVG features (12883)
2144         
2145         I added an ENABLE_SVG_EXPERIMENTAL_FEATURES define to guard all use of the experimental
2146         features, and used it to guard relevant tag names, elements, JS bindings and renderers.
2147         
2148         I also converted all the existing optional feature defines to
2149         ENABLE_FOO instead of FOO_SUPPORT since that is the more standard
2150         way to do it in open source projects and works with the handy new
2151         ENABLE() macro.
2152
2153         * CMakeLists.txt:
2154         * DerivedSources.make:
2155         * Projects/gdk/webcore-gdk.bkl:
2156         * WebCore.pro:
2157         * WebCore.vcproj/WebCore/WebCore.vcproj:
2158         * WebCore.vcproj/WebCore/build-generated-files.sh:
2159         * WebCore.xcodeproj/project.pbxproj:
2160         * bindings/js/JSCustomXPathNSResolver.cpp:
2161         * bindings/js/JSCustomXPathNSResolver.h:
2162         * bindings/js/JSSVGElementWrapperFactory.cpp:
2163         * bindings/js/JSSVGElementWrapperFactory.h:
2164         * bindings/js/JSSVGMatrixCustom.cpp:
2165         * bindings/js/JSSVGPODTypeWrapper.h:
2166         * bindings/js/JSSVGPathSegCustom.cpp:
2167         * bindings/js/JSSVGPathSegListCustom.cpp:
2168         * bindings/js/JSSVGPointListCustom.cpp:
2169         * bindings/js/JSXSLTProcessor.cpp:
2170         * bindings/js/JSXSLTProcessor.h:
2171         * bindings/js/kjs_binding.cpp:
2172         (KJS::setDOMException):
2173         * bindings/js/kjs_css.cpp:
2174         (KJS::toJS):
2175         * bindings/js/kjs_dom.cpp:
2176         (KJS::toJS):
2177         * bindings/js/kjs_html.cpp:
2178         (KJS::HTMLElementFunction::callAsFunction):
2179         * bindings/js/kjs_proxy.cpp:
2180         * bindings/js/kjs_proxy.h:
2181         * bindings/js/kjs_window.cpp:
2182         (KJS::Window::getValueProperty):
2183         * bindings/objc/DOM.mm:
2184         (WebCore::createElementClassMap):
2185         (+[DOMNode _nodeWith:WebCore::]):
2186         * bindings/objc/DOMCSS.mm:
2187         (+[DOMCSSValue _CSSValueWith:WebCore::]):
2188         * bindings/objc/DOMCustomXPathNSResolver.h:
2189         * bindings/objc/DOMCustomXPathNSResolver.mm:
2190         * bindings/objc/DOMEvents.mm:
2191         (+[DOMEvent _eventWith:WebCore::]):
2192         * bindings/objc/DOMInternal.h:
2193         * bindings/objc/DOMSVGPathSegInternal.mm:
2194         * bindings/objc/DOMXPath.mm:
2195         * bindings/objc/ExceptionHandlers.mm:
2196         (WebCore::raiseDOMException):
2197         * bindings/objc/PublicDOMInterfaces.h:
2198         * bindings/scripts/CodeGeneratorJS.pm:
2199         * bindings/scripts/CodeGeneratorObjC.pm:
2200         * config.h:
2201         * css/CSSGrammar.y:
2202         * css/CSSStyleDeclaration.cpp:
2203         (WebCore::propertyID):
2204         * css/StyleBase.h:
2205         * css/cssparser.cpp:
2206         (WebCore::CSSParser::parseValue):
2207         * css/cssparser.h:
2208         * css/cssstyleselector.cpp:
2209         (WebCore::CSSStyleSelector::loadDefaultStyle):
2210         (WebCore::CSSStyleSelector::initForStyleResolve):
2211         (WebCore::checkPseudoState):
2212         (WebCore::CSSStyleSelector::adjustRenderStyle):
2213         (WebCore::CSSStyleSelector::applyProperty):
2214         * css/cssstyleselector.h:
2215         * dom/DOMImplementation.cpp:
2216         (WebCore::DOMImplementation::hasFeature):
2217         (WebCore::DOMImplementation::createDocument):
2218         * dom/Document.cpp:
2219         (WebCore::Document::Document):
2220         (WebCore::Document::~Document):
2221         (WebCore::Document::createElement):
2222         (WebCore::Document::implicitClose):
2223         (WebCore::Document::recalcStyleSelector):
2224         (WebCore::Document::createEvent):
2225         * dom/Document.h:
2226         * dom/Document.idl:
2227         * dom/Event.cpp:
2228         * dom/Event.h:
2229         * dom/EventTarget.cpp:
2230         * dom/EventTarget.h:
2231         * dom/MappedAttributeEntry.h:
2232         (WebCore::):
2233         * dom/Node.cpp:
2234         (WebCore::Node::createRendererIfNeeded):
2235         (WebCore::Node::shadowAncestorNode):
2236         * dom/Node.h:
2237         * dom/ProcessingInstruction.cpp:
2238         (WebCore::ProcessingInstruction::ProcessingInstruction):
2239         (WebCore::ProcessingInstruction::checkStyleSheet):
2240         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2241         * dom/ProcessingInstruction.h:
2242         * dom/Text.cpp:
2243         (WebCore::Text::createRenderer):
2244         * dom/XMLTokenizer.cpp:
2245         (WebCore::XMLTokenizer::startElementNs):
2246         (WebCore::XMLTokenizer::endElementNs):
2247         (WebCore::XMLTokenizer::processingInstruction):
2248         (WebCore::XMLTokenizer::end):
2249         (WebCore::XMLTokenizer::insertErrorMessageBlock):
2250         * dom/XMLTokenizer.h:
2251         * html/HTMLEmbedElement.cpp:
2252         * html/HTMLEmbedElement.h:
2253         * html/HTMLObjectElement.cpp:
2254         * html/HTMLObjectElement.h:
2255         * ksvg2/css/SVGCSSParser.cpp:
2256         * ksvg2/css/SVGCSSStyleSelector.cpp:
2257         * ksvg2/css/SVGRenderStyle.cpp:
2258         * ksvg2/css/SVGRenderStyle.h:
2259         * ksvg2/css/SVGRenderStyleDefs.cpp:
2260         * ksvg2/css/SVGRenderStyleDefs.h:
2261         * ksvg2/events/JSSVGLazyEventListener.cpp:
2262         * ksvg2/events/JSSVGLazyEventListener.h:
2263         * ksvg2/events/SVGZoomEvent.cpp:
2264         * ksvg2/events/SVGZoomEvent.h:
2265         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2266         * ksvg2/misc/KCanvasRenderingStyle.h:
2267         * ksvg2/misc/PointerEventsHitRules.cpp:
2268         * ksvg2/misc/PointerEventsHitRules.h:
2269         * ksvg2/misc/SVGDocumentExtensions.cpp:
2270         * ksvg2/misc/SVGDocumentExtensions.h:
2271         * ksvg2/misc/SVGImageLoader.cpp:
2272         * ksvg2/misc/SVGImageLoader.h:
2273         * ksvg2/misc/SVGTimer.cpp:
2274         * ksvg2/misc/SVGTimer.h:
2275         * ksvg2/misc/TimeScheduler.cpp:
2276         * ksvg2/misc/TimeScheduler.h:
2277         * ksvg2/scripts/make_names.pl:
2278         * ksvg2/svg/ColorDistance.cpp:
2279         * ksvg2/svg/ColorDistance.h:
2280         * ksvg2/svg/GradientAttributes.h:
2281         * ksvg2/svg/LinearGradientAttributes.h:
2282         * ksvg2/svg/PatternAttributes.h:
2283         * ksvg2/svg/RadialGradientAttributes.h:
2284         * ksvg2/svg/SVGAElement.cpp:
2285         * ksvg2/svg/SVGAElement.h:
2286         * ksvg2/svg/SVGAngle.cpp:
2287         * ksvg2/svg/SVGAngle.h:
2288         * ksvg2/svg/SVGAnimateColorElement.cpp:
2289         * ksvg2/svg/SVGAnimateColorElement.h:
2290         * ksvg2/svg/SVGAnimateElement.cpp:
2291         * ksvg2/svg/SVGAnimateElement.h:
2292         * ksvg2/svg/SVGAnimateElement.idl:
2293         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2294         * ksvg2/svg/SVGAnimateMotionElement.h:
2295         * ksvg2/svg/SVGAnimateTransformElement.cpp:
2296         * ksvg2/svg/SVGAnimateTransformElement.h:
2297         * ksvg2/svg/SVGAnimateTransformElement.idl:
2298         * ksvg2/svg/SVGAnimatedPathData.cpp:
2299         * ksvg2/svg/SVGAnimatedPathData.h:
2300         * ksvg2/svg/SVGAnimatedPoints.cpp:
2301         * ksvg2/svg/SVGAnimatedPoints.h:
2302         * ksvg2/svg/SVGAnimatedTemplate.h:
2303         * ksvg2/svg/SVGAnimationElement.cpp:
2304         * ksvg2/svg/SVGAnimationElement.h:
2305         * ksvg2/svg/SVGCircleElement.cpp:
2306         * ksvg2/svg/SVGCircleElement.h:
2307         * ksvg2/svg/SVGClipPathElement.cpp:
2308         * ksvg2/svg/SVGClipPathElement.h:
2309         * ksvg2/svg/SVGColor.cpp:
2310         * ksvg2/svg/SVGColor.h:
2311         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
2312         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
2313         * ksvg2/svg/SVGCursorElement.cpp:
2314         * ksvg2/svg/SVGCursorElement.h:
2315         * ksvg2/svg/SVGDefsElement.cpp:
2316         * ksvg2/svg/SVGDefsElement.h:
2317         * ksvg2/svg/SVGDescElement.cpp:
2318         * ksvg2/svg/SVGDescElement.h:
2319         * ksvg2/svg/SVGDocument.cpp:
2320         * ksvg2/svg/SVGDocument.h:
2321         * ksvg2/svg/SVGElement.cpp:
2322         (WebCore::SVGElement::dispatchEvent):
2323         * ksvg2/svg/SVGElement.h:
2324         * ksvg2/svg/SVGElementInstance.cpp:
2325         * ksvg2/svg/SVGElementInstance.h:
2326         * ksvg2/svg/SVGElementInstance.idl:
2327         * ksvg2/svg/SVGElementInstanceList.cpp:
2328         * ksvg2/svg/SVGElementInstanceList.h:
2329         * ksvg2/svg/SVGElementInstanceList.idl:
2330         * ksvg2/svg/SVGEllipseElement.cpp:
2331         * ksvg2/svg/SVGEllipseElement.h:
2332         * ksvg2/svg/SVGException.h:
2333         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
2334         * ksvg2/svg/SVGExternalResourcesRequired.h:
2335         * ksvg2/svg/SVGFEBlendElement.cpp:
2336         * ksvg2/svg/SVGFEBlendElement.h:
2337         * ksvg2/svg/SVGFEBlendElement.idl:
2338         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
2339         * ksvg2/svg/SVGFEColorMatrixElement.h:
2340         * ksvg2/svg/SVGFEColorMatrixElement.idl:
2341         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
2342         * ksvg2/svg/SVGFEComponentTransferElement.h:
2343         * ksvg2/svg/SVGFEComponentTransferElement.idl:
2344         * ksvg2/svg/SVGFECompositeElement.cpp:
2345         * ksvg2/svg/SVGFECompositeElement.h:
2346         * ksvg2/svg/SVGFECompositeElement.idl:
2347         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2348         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
2349         * ksvg2/svg/SVGFEDiffuseLightingElement.idl:
2350         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
2351         * ksvg2/svg/SVGFEDisplacementMapElement.h:
2352         * ksvg2/svg/SVGFEDisplacementMapElement.idl:
2353         * ksvg2/svg/SVGFEDistantLightElement.cpp:
2354         * ksvg2/svg/SVGFEDistantLightElement.h:
2355         * ksvg2/svg/SVGFEDistantLightElement.idl:
2356         * ksvg2/svg/SVGFEFloodElement.cpp:
2357         * ksvg2/svg/SVGFEFloodElement.h:
2358         * ksvg2/svg/SVGFEFloodElement.idl:
2359         * ksvg2/svg/SVGFEFuncAElement.cpp:
2360         * ksvg2/svg/SVGFEFuncAElement.h:
2361         * ksvg2/svg/SVGFEFuncAElement.idl:
2362         * ksvg2/svg/SVGFEFuncBElement.cpp:
2363         * ksvg2/svg/SVGFEFuncBElement.h:
2364         * ksvg2/svg/SVGFEFuncBElement.idl:
2365         * ksvg2/svg/SVGFEFuncGElement.cpp:
2366         * ksvg2/svg/SVGFEFuncGElement.h:
2367         * ksvg2/svg/SVGFEFuncGElement.idl:
2368         * ksvg2/svg/SVGFEFuncRElement.cpp:
2369         * ksvg2/svg/SVGFEFuncRElement.h:
2370         * ksvg2/svg/SVGFEFuncRElement.idl:
2371         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
2372         * ksvg2/svg/SVGFEGaussianBlurElement.h:
2373         * ksvg2/svg/SVGFEGaussianBlurElement.idl:
2374         * ksvg2/svg/SVGFEImageElement.cpp:
2375         * ksvg2/svg/SVGFEImageElement.h:
2376         * ksvg2/svg/SVGFEImageElement.idl:
2377         * ksvg2/svg/SVGFELightElement.cpp:
2378         * ksvg2/svg/SVGFELightElement.h:
2379         * ksvg2/svg/SVGFEMergeElement.cpp:
2380         * ksvg2/svg/SVGFEMergeElement.h:
2381         * ksvg2/svg/SVGFEMergeElement.idl:
2382         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
2383         * ksvg2/svg/SVGFEMergeNodeElement.h:
2384         * ksvg2/svg/SVGFEMergeNodeElement.idl:
2385         * ksvg2/svg/SVGFEOffsetElement.cpp:
2386         * ksvg2/svg/SVGFEOffsetElement.h:
2387         * ksvg2/svg/SVGFEOffsetElement.idl:
2388         * ksvg2/svg/SVGFEPointLightElement.cpp:
2389         * ksvg2/svg/SVGFEPointLightElement.h:
2390         * ksvg2/svg/SVGFEPointLightElement.idl:
2391         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
2392         * ksvg2/svg/SVGFESpecularLightingElement.h:
2393         * ksvg2/svg/SVGFESpecularLightingElement.idl:
2394         * ksvg2/svg/SVGFESpotLightElement.cpp:
2395         * ksvg2/svg/SVGFESpotLightElement.h:
2396         * ksvg2/svg/SVGFESpotLightElement.idl:
2397         * ksvg2/svg/SVGFETileElement.cpp:
2398         * ksvg2/svg/SVGFETileElement.h:
2399         * ksvg2/svg/SVGFETileElement.idl:
2400         * ksvg2/svg/SVGFETurbulenceElement.cpp:
2401         * ksvg2/svg/SVGFETurbulenceElement.h:
2402         * ksvg2/svg/SVGFETurbulenceElement.idl:
2403         * ksvg2/svg/SVGFilterElement.cpp:
2404         * ksvg2/svg/SVGFilterElement.h:
2405         * ksvg2/svg/SVGFilterElement.idl:
2406         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
2407         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
2408         * ksvg2/svg/SVGFitToViewBox.cpp:
2409         * ksvg2/svg/SVGFitToViewBox.h:
2410         * ksvg2/svg/SVGForeignObjectElement.cpp:
2411         * ksvg2/svg/SVGForeignObjectElement.h:
2412         * ksvg2/svg/SVGForeignObjectElement.idl:
2413         * ksvg2/svg/SVGGElement.cpp:
2414         * ksvg2/svg/SVGGElement.h:
2415         * ksvg2/svg/SVGGradientElement.cpp:
2416         * ksvg2/svg/SVGGradientElement.h:
2417         * ksvg2/svg/SVGImageElement.cpp:
2418         * ksvg2/svg/SVGImageElement.h:
2419         * ksvg2/svg/SVGLangSpace.cpp:
2420         * ksvg2/svg/SVGLangSpace.h:
2421         * ksvg2/svg/SVGLength.cpp:
2422         * ksvg2/svg/SVGLength.h:
2423         * ksvg2/svg/SVGLengthList.cpp:
2424         * ksvg2/svg/SVGLengthList.h:
2425         * ksvg2/svg/SVGLineElement.cpp:
2426         * ksvg2/svg/SVGLineElement.h:
2427         * ksvg2/svg/SVGLinearGradientElement.cpp:
2428         * ksvg2/svg/SVGLinearGradientElement.h:
2429         * ksvg2/svg/SVGList.h:
2430         * ksvg2/svg/SVGListTraits.h:
2431         * ksvg2/svg/SVGLocatable.cpp:
2432         (WebCore::SVGLocatable::nearestViewportElement):
2433         (WebCore::SVGLocatable::farthestViewportElement):
2434         * ksvg2/svg/SVGLocatable.h:
2435         * ksvg2/svg/SVGMPathElement.cpp:
2436         * ksvg2/svg/SVGMPathElement.h:
2437         * ksvg2/svg/SVGMarkerElement.cpp:
2438         * ksvg2/svg/SVGMarkerElement.h:
2439         * ksvg2/svg/SVGMaskElement.cpp:
2440         * ksvg2/svg/SVGMaskElement.h:
2441         * ksvg2/svg/SVGMetadataElement.cpp:
2442         * ksvg2/svg/SVGMetadataElement.h:
2443         * ksvg2/svg/SVGNumberList.cpp:
2444         * ksvg2/svg/SVGNumberList.h:
2445         * ksvg2/svg/SVGPaint.cpp:
2446         * ksvg2/svg/SVGPaint.h:
2447         * ksvg2/svg/SVGParserUtilities.cpp:
2448         * ksvg2/svg/SVGParserUtilities.h:
2449         * ksvg2/svg/SVGPathElement.cpp:
2450         * ksvg2/svg/SVGPathElement.h:
2451         * ksvg2/svg/SVGPathSeg.h:
2452         * ksvg2/svg/SVGPathSegArc.cpp:
2453         * ksvg2/svg/SVGPathSegArc.h:
2454         * ksvg2/svg/SVGPathSegClosePath.cpp:
2455         * ksvg2/svg/SVGPathSegClosePath.h:
2456         * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
2457         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
2458         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
2459         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
2460         * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
2461         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
2462         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
2463         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
2464         * ksvg2/svg/SVGPathSegLineto.cpp:
2465         * ksvg2/svg/SVGPathSegLineto.h:
2466         * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
2467         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
2468         * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
2469         * ksvg2/svg/SVGPathSegLinetoVertical.h:
2470         * ksvg2/svg/SVGPathSegList.cpp:
2471         * ksvg2/svg/SVGPathSegList.h:
2472         * ksvg2/svg/SVGPathSegMoveto.cpp:
2473         * ksvg2/svg/SVGPathSegMoveto.h:
2474         * ksvg2/svg/SVGPatternElement.cpp:
2475         * ksvg2/svg/SVGPatternElement.h:
2476         * ksvg2/svg/SVGPointList.cpp:
2477         * ksvg2/svg/SVGPointList.h:
2478         * ksvg2/svg/SVGPolyElement.cpp:
2479         * ksvg2/svg/SVGPolyElement.h:
2480         * ksvg2/svg/SVGPolygonElement.cpp:
2481         * ksvg2/svg/SVGPolygonElement.h:
2482         * ksvg2/svg/SVGPolylineElement.cpp:
2483         * ksvg2/svg/SVGPolylineElement.h:
2484         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2485         * ksvg2/svg/SVGPreserveAspectRatio.h:
2486         * ksvg2/svg/SVGRadialGradientElement.cpp:
2487         * ksvg2/svg/SVGRadialGradientElement.h:
2488         * ksvg2/svg/SVGRectElement.cpp:
2489         * ksvg2/svg/SVGRectElement.h:
2490         * ksvg2/svg/SVGRenderingIntent.h:
2491         * ksvg2/svg/SVGSVGElement.cpp:
2492         * ksvg2/svg/SVGSVGElement.h:
2493         * ksvg2/svg/SVGScriptElement.cpp:
2494         * ksvg2/svg/SVGScriptElement.h:
2495         * ksvg2/svg/SVGSetElement.cpp:
2496         * ksvg2/svg/SVGSetElement.h:
2497         * ksvg2/svg/SVGStopElement.cpp:
2498         * ksvg2/svg/SVGStopElement.h:
2499         * ksvg2/svg/SVGStringList.cpp:
2500         * ksvg2/svg/SVGStringList.h:
2501         * ksvg2/svg/SVGStylable.cpp:
2502         * ksvg2/svg/SVGStylable.h:
2503         * ksvg2/svg/SVGStyleElement.cpp:
2504         * ksvg2/svg/SVGStyleElement.h:
2505         * ksvg2/svg/SVGStyledElement.cpp:
2506         (WebCore::SVGStyledElement::notifyAttributeChange):
2507         * ksvg2/svg/SVGStyledElement.h:
2508         * ksvg2/svg/SVGStyledLocatableElement.cpp:
2509         * ksvg2/svg/SVGStyledLocatableElement.h:
2510         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2511         * ksvg2/svg/SVGStyledTransformableElement.h:
2512         * ksvg2/svg/SVGSwitchElement.cpp:
2513         * ksvg2/svg/SVGSwitchElement.h:
2514         * ksvg2/svg/SVGSymbolElement.cpp:
2515         * ksvg2/svg/SVGSymbolElement.h:
2516         * ksvg2/svg/SVGTRefElement.cpp:
2517         * ksvg2/svg/SVGTRefElement.h:
2518         * ksvg2/svg/SVGTSpanElement.cpp:
2519         * ksvg2/svg/SVGTSpanElement.h:
2520         * ksvg2/svg/SVGTests.cpp:
2521         * ksvg2/svg/SVGTests.h:
2522         * ksvg2/svg/SVGTextContentElement.cpp:
2523         * ksvg2/svg/SVGTextContentElement.h:
2524         * ksvg2/svg/SVGTextElement.cpp:
2525         * ksvg2/svg/SVGTextElement.h:
2526         * ksvg2/svg/SVGTextPositioningElement.cpp:
2527         * ksvg2/svg/SVGTextPositioningElement.h:
2528         * ksvg2/svg/SVGTitleElement.cpp:
2529         * ksvg2/svg/SVGTitleElement.h:
2530         * ksvg2/svg/SVGTransform.cpp:
2531         * ksvg2/svg/SVGTransform.h:
2532         * ksvg2/svg/SVGTransformDistance.cpp:
2533         * ksvg2/svg/SVGTransformDistance.h:
2534         * ksvg2/svg/SVGTransformList.cpp:
2535         * ksvg2/svg/SVGTransformList.h:
2536         * ksvg2/svg/SVGTransformable.cpp:
2537         * ksvg2/svg/SVGTransformable.h:
2538         * ksvg2/svg/SVGURIReference.cpp:
2539         * ksvg2/svg/SVGURIReference.h:
2540         * ksvg2/svg/SVGUnitTypes.h:
2541         * ksvg2/svg/SVGUseElement.cpp:
2542         * ksvg2/svg/SVGUseElement.h:
2543         * ksvg2/svg/SVGUseElement.idl:
2544         * ksvg2/svg/SVGViewElement.cpp:
2545         * ksvg2/svg/SVGViewElement.h:
2546         * ksvg2/svg/SVGZoomAndPan.cpp:
2547         * ksvg2/svg/SVGZoomAndPan.h:
2548         * ksvg2/svg/svgtags.in:
2549         * loader/Cache.cpp:
2550         (WebCore::createResource):
2551         (WebCore::Cache::getStatistics):
2552         * loader/Cache.h:
2553         * loader/CachedImage.cpp:
2554         (WebCore::CachedImage::createImage):
2555         * loader/CachedResource.h:
2556         (WebCore::CachedResource::):
2557         * loader/CachedResourceClient.h:
2558         * loader/CachedXBLDocument.cpp:
2559         * loader/CachedXBLDocument.h:
2560         * loader/CachedXSLStyleSheet.cpp:
2561         * loader/CachedXSLStyleSheet.h:
2562         * loader/DocLoader.cpp:
2563         * loader/DocLoader.h:
2564         * page/DOMWindow.idl:
2565         * page/EventHandler.cpp:
2566         (WebCore::EventHandler::handleMouseMoveEvent):
2567         (WebCore::selectCursor):
2568         * page/Frame.cpp:
2569         (WebCore::Frame::Frame):
2570         * page/PageState.cpp:
2571         (WebCore::PageState::PageState):
2572         (WebCore::PageState::restore):
2573         * platform/MimeTypeRegistry.cpp:
2574         (WebCore::initialiseSupportedNonImageMimeTypes):
2575         * platform/graphics/FloatPoint3D.cpp:
2576         * platform/graphics/FloatPoint3D.h:
2577         * platform/graphics/ImageBuffer.cpp:
2578         (WebCore::ImageBuffer::renderSubtreeToImage):
2579         * platform/graphics/svg/SVGImage.cpp:
2580         * platform/graphics/svg/SVGImage.h:
2581         * platform/graphics/svg/SVGImageEmptyClients.h:
2582         * platform/graphics/svg/SVGPaintServer.cpp:
2583         * platform/graphics/svg/SVGPaintServer.h:
2584         * platform/graphics/svg/SVGPaintServerGradient.cpp:
2585         * platform/graphics/svg/SVGPaintServerGradient.h:
2586         * platform/graphics/svg/SVGPaintServerLinearGradient.cpp:
2587         * platform/graphics/svg/SVGPaintServerLinearGradient.h:
2588         * platform/graphics/svg/SVGPaintServerPattern.cpp:
2589         * platform/graphics/svg/SVGPaintServerPattern.h:
2590         * platform/graphics/svg/SVGPaintServerRadialGradient.cpp:
2591         * platform/graphics/svg/SVGPaintServerRadialGradient.h:
2592         * platform/graphics/svg/SVGPaintServerSolid.cpp:
2593         * platform/graphics/svg/SVGPaintServerSolid.h:
2594         * platform/graphics/svg/SVGResource.cpp:
2595         * platform/graphics/svg/SVGResource.h:
2596         * platform/graphics/svg/SVGResourceClipper.cpp:
2597         * platform/graphics/svg/SVGResourceClipper.h:
2598         * platform/graphics/svg/SVGResourceFilter.cpp:
2599         * platform/graphics/svg/SVGResourceFilter.h:
2600         * platform/graphics/svg/SVGResourceMarker.cpp:
2601         * platform/graphics/svg/SVGResourceMarker.h:
2602         * platform/graphics/svg/SVGResourceMasker.cpp:
2603         * platform/graphics/svg/SVGResourceMasker.h:
2604         * platform/graphics/svg/cg/CgSupport.cpp:
2605         * platform/graphics/svg/cg/CgSupport.h:
2606         * platform/graphics/svg/cg/RenderPathCg.cpp:
2607         * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
2608         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2609         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
2610         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
2611         * platform/graphics/svg/cg/SVGResourceClipperCg.cpp:
2612         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
2613         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
2614         * platform/graphics/svg/filters/SVGDistantLightSource.h:
2615         * platform/graphics/svg/filters/SVGFEBlend.cpp:
2616         * platform/graphics/svg/filters/SVGFEBlend.h:
2617         * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
2618         * platform/graphics/svg/filters/SVGFEColorMatrix.h:
2619         * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
2620         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
2621         * platform/graphics/svg/filters/SVGFEComposite.cpp:
2622         * platform/graphics/svg/filters/SVGFEComposite.h:
2623         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
2624         * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
2625         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
2626         * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
2627         * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
2628         * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
2629         * platform/graphics/svg/filters/SVGFEFlood.cpp:
2630         * platform/graphics/svg/filters/SVGFEFlood.h:
2631         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
2632         * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
2633         * platform/graphics/svg/filters/SVGFEImage.cpp:
2634         * platform/graphics/svg/filters/SVGFEImage.h:
2635         * platform/graphics/svg/filters/SVGFEMerge.cpp:
2636         * platform/graphics/svg/filters/SVGFEMerge.h:
2637         * platform/graphics/svg/filters/SVGFEMorphology.cpp:
2638         * platform/graphics/svg/filters/SVGFEMorphology.h:
2639         * platform/graphics/svg/filters/SVGFEOffset.cpp:
2640         * platform/graphics/svg/filters/SVGFEOffset.h:
2641         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
2642         * platform/graphics/svg/filters/SVGFESpecularLighting.h:
2643         * platform/graphics/svg/filters/SVGFETile.h:
2644         * platform/graphics/svg/filters/SVGFETurbulence.cpp:
2645         * platform/graphics/svg/filters/SVGFETurbulence.h:
2646         * platform/graphics/svg/filters/SVGFilterEffect.cpp:
2647         * platform/graphics/svg/filters/SVGFilterEffect.h:
2648         * platform/graphics/svg/filters/SVGLightSource.cpp:
2649         * platform/graphics/svg/filters/SVGLightSource.h:
2650         * platform/graphics/svg/filters/SVGPointLightSource.h:
2651         * platform/graphics/svg/filters/SVGSpotLightSource.h:
2652         * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
2653         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
2654         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
2655         * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
2656         * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
2657         * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
2658         * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
2659         * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
2660         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
2661         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
2662         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
2663         * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
2664         * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
2665         * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
2666         * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
2667         * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
2668         * platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp:
2669         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
2670         * platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp:
2671         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
2672         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
2673         * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
2674         * platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
2675         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
2676         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
2677         * rendering/HitTestResult.cpp:
2678         (WebCore::HitTestResult::absoluteImageURL):
2679         (WebCore::HitTestResult::absoluteLinkURL):
2680         (WebCore::HitTestResult::isLiveLink):
2681         * rendering/RenderForeignObject.cpp:
2682         * rendering/RenderForeignObject.h:
2683         * rendering/RenderLayer.cpp:
2684         (WebCore::RenderLayer::isTransparent):
2685         * rendering/RenderObject.cpp:
2686         (WebCore::RenderObject::containingBlock):
2687         * rendering/RenderObject.h:
2688         * rendering/RenderPath.cpp:
2689         * rendering/RenderPath.h:
2690         * rendering/RenderSVGBlock.cpp:
2691         * rendering/RenderSVGBlock.h:
2692         * rendering/RenderSVGContainer.cpp:
2693         * rendering/RenderSVGContainer.h:
2694         * rendering/RenderSVGGradientStop.cpp:
2695         * rendering/RenderSVGGradientStop.h:
2696         * rendering/RenderSVGHiddenContainer.cpp:
2697         * rendering/RenderSVGHiddenContainer.h:
2698         * rendering/RenderSVGImage.cpp:
2699         * rendering/RenderSVGImage.h:
2700         * rendering/RenderSVGInline.cpp:
2701         * rendering/RenderSVGInline.h:
2702         * rendering/RenderSVGInlineText.cpp:
2703         * rendering/RenderSVGInlineText.h:
2704         * rendering/RenderSVGTSpan.cpp:
2705         * rendering/RenderSVGTSpan.h:
2706         * rendering/RenderSVGText.cpp:
2707         * rendering/RenderSVGText.h:
2708         * rendering/RenderStyle.cpp:
2709         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2710         (WebCore::StyleRareNonInheritedData::~StyleRareNonInheritedData):
2711         (WebCore::StyleRareNonInheritedData::operator==):
2712         (WebCore::RenderStyle::RenderStyle):
2713         (WebCore::RenderStyle::inheritFrom):
2714         (WebCore::RenderStyle::operator==):
2715         (WebCore::RenderStyle::inheritedNotEqual):
2716         (WebCore::RenderStyle::diff):
2717         * rendering/RenderStyle.h:
2718         * rendering/RenderText.cpp:
2719         (WebCore::RenderText::setStyle):
2720         (WebCore::RenderText::setTextInternal):
2721         * rendering/RenderTreeAsText.cpp:
2722         (WebCore::write):
2723         (WebCore::externalRepresentation):
2724         * rendering/SVGInlineFlowBox.cpp:
2725         * rendering/SVGInlineFlowBox.h:
2726         * rendering/SVGRenderTreeAsText.cpp:
2727         * rendering/SVGRenderTreeAsText.h:
2728         * rendering/SVGRootInlineBox.cpp:
2729         * rendering/SVGRootInlineBox.h:
2730         * rendering/bidi.cpp:
2731         (WebCore::shouldPreserveNewline):
2732         (WebCore::RenderBlock::findNextLineBreak):
2733         * webcore-base.bkl:
2734         * xml/NativeXPathNSResolver.cpp:
2735         * xml/NativeXPathNSResolver.h:
2736         * xml/XPathEvaluator.cpp:
2737         * xml/XPathEvaluator.h:
2738         * xml/XPathExpression.cpp:
2739         * xml/XPathExpression.h:
2740         * xml/XPathExpressionNode.cpp:
2741         * xml/XPathExpressionNode.h:
2742         * xml/XPathFunctions.cpp:
2743         * xml/XPathFunctions.h:
2744         * xml/XPathGrammar.y:
2745         * xml/XPathNSResolver.cpp:
2746         * xml/XPathNSResolver.h:
2747         * xml/XPathNamespace.cpp:
2748         * xml/XPathNamespace.h:
2749         * xml/XPathParser.cpp:
2750         * xml/XPathParser.h:
2751         * xml/XPathPath.cpp:
2752         * xml/XPathPath.h:
2753         * xml/XPathPredicate.cpp:
2754         * xml/XPathPredicate.h:
2755         * xml/XPathResult.cpp:
2756         * xml/XPathResult.h:
2757         * xml/XPathStep.cpp:
2758         * xml/XPathStep.h:
2759         * xml/XPathUtil.cpp:
2760         * xml/XPathUtil.h:
2761         * xml/XPathValue.cpp:
2762         * xml/XPathValue.h:
2763         * xml/XPathVariableReference.cpp:
2764         * xml/XPathVariableReference.h:
2765         * xml/XSLImportRule.cpp:
2766         * xml/XSLImportRule.h:
2767         * xml/XSLStyleSheet.cpp:
2768         * xml/XSLStyleSheet.h:
2769         * xml/XSLTProcessor.cpp:
2770         * xml/XSLTProcessor.h:
2771
2772 2007-02-25  Mitz Pettel  <mitz@webkit.org>
2773
2774         Reviewed by David Hyatt.
2775
2776         - fix http://bugs.webkit.org/show_bug.cgi?id=12886
2777           Crash with Scriptalicious javascript library
2778
2779         Test: fast/dynamic/float-withdrawal.html
2780
2781         * rendering/RenderBlock.cpp:
2782         (WebCore::RenderBlock::layoutBlockChildren): Detect when a child block had
2783         intruding floats in a previous layout, and in that case force it to relayout.
2784
2785 2007-02-25  David Hyatt  <hyatt@apple.com>
2786
2787         Revert my change to the default fill color.  Just set the color to transparent explicitly when
2788         drawing textarea resizer frames.
2789
2790         * platform/graphics/GraphicsContext.cpp:
2791         (WebCore::GraphicsContextState::GraphicsContextState):
2792         * rendering/RenderLayer.cpp:
2793         (WebCore::RenderLayer::paintOverflowControls):
2794
2795 2007-02-25  Sam Weinig  <sam@webkit.org>
2796
2797         Update forgotten files.
2798
2799         * rendering/RenderLayer.cpp:
2800         (WebCore::RenderLayer::updateLayerPosition):
2801
2802 2007-02-25  David Hyatt  <hyatt@apple.com>
2803
2804         Fix for regression caused by changing the containing block of positioned elements with no positioned ancestor
2805         to be the initial containing block (represented in our tree by the RenderView).  Rework RenderView's layout
2806         to have very few special cases.   Now it will just relayout its children when the width/height of the
2807         view actually changes.  Positioned elements no longer get a special additional layout, since width/height
2808         adjustments are caught by the base class already anyway.
2809
2810         Reviewed by mjs, darin
2811
2812         * rendering/RenderBlock.cpp:
2813         (WebCore::RenderBlock::layoutBlock):
2814         * rendering/RenderFlexibleBox.cpp:
2815         (WebCore::RenderFlexibleBox::layoutBlock):
2816         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2817         * rendering/RenderView.cpp:
2818         (WebCore::RenderView::RenderView):
2819         (WebCore::RenderView::layout):
2820         * rendering/RenderView.h:
2821
2822 2007-02-25  Maciej Stachowiak  <mjs@apple.com>
2823
2824         Not reviewed, build fix.
2825
2826         - fix build breakage
2827
2828         * platform/gdk/ScrollViewGdk.cpp:
2829         (WebCore::ScrollView::fullyClippedContentRect):
2830         * platform/qt/ScrollViewQt.cpp:
2831         (WebCore::ScrollView::fullyClippedContentRect):
2832
2833 2007-02-24  Maciej Stachowiak  <mjs@apple.com>
2834
2835         Reviewed by Adam.
2836
2837         - fixed layout test failure in fast/overflow/scrollRevealButton
2838         
2839         I added a new ScrollView method, fullyClippedContentRect, that vies the content rect
2840         as clipped by all ancestor scroll views, not just this one. Currently it only works
2841         correctly on mac however. visibleContentRect, only accounting for the clipping from
2842         this particular scroll view, is sufficient for most purposes.
2843
2844         * page/Frame.cpp:
2845         (WebCore::Frame::visibleSelectionRect):
2846         (WebCore::Frame::setIsActive):
2847         (WebCore::Frame::markAllMatchesForText):
2848         * platform/ScrollView.h:
2849         * platform/gdk/ScrollViewGdk.cpp:
2850         (WebCore::ScrolView::fullyClippedContentRect):
2851         * platform/mac/ScrollViewMac.mm:
2852         (WebCore::ScrollView::fullyClippedContentRect):
2853         * platform/qt/ScrollViewQt.cpp:
2854         (WebCore::ScrolView::fullyClippedContentRect):
2855         * rendering/RenderLayer.cpp:
2856         (WebCore::RenderLayer::scrollRectToVisible):
2857
2858 2007-02-24  Adam Roben  <aroben@apple.com>
2859
2860         Reviewed by Steve.
2861
2862         "Look Up in Dictionary" context menu item should be Mac-only for now,
2863         since it's only implemented on that platform (<rdar://problem/5021468>)
2864
2865         * platform/ContextMenu.cpp:
2866         (WebCore::ContextMenu::populate): Wrap all instances of the dictionary
2867         menu item in #if PLATFORM(MAC).
2868
2869 2007-02-24  Geoffrey Garen  <ggaren@apple.com>
2870
2871         Reviewed by Darin Adler.
2872         
2873         Fixed <rdar://problem/4987649> leaks in BidiRun::operator new seen while 
2874         running WebKit unit tests
2875         
2876         In bidi.cpp, some functions allocate BidiRuns and put them in a global data
2877         structure, while others uses the BidiRuns in the global data structure. 
2878         The caller is responsible for knowing which functions may allocate runs
2879         and which may use them, and calling deleteBidiRuns() at the appropriate time.
2880
2881         The fix is to add some calls to deleteBidiRuns() where they were missing.
2882         
2883         I also added a BidiRun counter because these two leaks were introduced by
2884         our two bidi.cpp experts, so the odds that leaks will creep in again
2885         in the future seem pretty high.
2886
2887         * rendering/bidi.cpp:
2888         (WebCore::RenderBlock::bidiReorderCharacters): Added  missing call to
2889         deleteBidiRuns().
2890         (WebCore::BidiRunCounter::~BidiRunCounter):
2891         (WebCore::BidiRun::operator delete):
2892         (WebCore::RenderBlock::layoutInlineChildren): Added missing call to
2893         deleteBidiRuns(). Moved call to deleteBidiRuns() to same scope as call to
2894         bidiReorderLine(), to emphasize that they go together like new/delete.
2895         In theory, the old code was just as good, but I didn't want to rely on
2896         theory.
2897
2898 2007-02-24  David Harrison  <harrison@apple.com>
2899
2900         Reviewed by Kevin.
2901
2902         <rdar://problem/4961431> Image with empty string alt tag should be ignored
2903
2904         * bridge/mac/WebCoreAXObject.mm:
2905         (-[WebCoreAXObject accessibilityIsIgnored]):
2906         Ignore img element that has an alt attribute, but that string is empty.
2907
2908 2007-02-24  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2909
2910         Reviewed by Adam Roben.
2911
2912         Gdk improvements.
2913
2914         * platform/gdk/FrameGdk.cpp: only scroll on keydown, not both keydown and keyup.
2915         (WebCore::FrameGdk::keyPress):
2916         (WebCore::FrameGdk::handleGdkEvent):
2917         (WebCore::Frame::print):
2918         (WebCore::Frame::issueTransposeCommand):
2919         (WebCore::Frame::respondToChangedSelection):
2920         (WebCore::Frame::cleanupPlatformScriptObjects):
2921         (WebCore::Frame::dragImageForSelection):
2922         * platform/network/gdk/ResourceHandleManager.cpp: don't free memory that
2923         doesn't belong to us.
2924         (WebCore::ResourceHandleManager::downloadTimerCallback):
2925
2926 2007-02-23  Kevin Decker <kdecker@apple.com>
2927
2928         Reviewed by Anders.
2929
2930         Fixed: <rdar://problem/4971226> REGRESSION: Replying to closed HTML mail message does not quote original body (12503)
2931         
2932         There were two problems here:
2933         
2934         * page/mac/WebCoreFrameBridge.mm:
2935         (+[WebCoreFrameBridge stringWithData:textEncodingName:]): The old code said  "if there is no text encoding name than
2936          assume WindowsLatin1 (iso-8859-1) and try to decode that". That's not sufficient because it doesn't handle the fallback
2937          case for unknown encodings. This method will now attempt to decode using WindowsLatin1 for unknown encoding types.
2938         * platform/mac/mac-encodings.txt: Added the missing "macroman" encoding type. 
2939
2940 2007-02-23  Mitz Pettel  <mitz@webkit.org>
2941
2942         Reviewed by Maciej.
2943
2944         - fix http://bugs.webkit.org/show_bug.cgi?id=12856
2945           REGRESSION (r13685): Canceling the suggestion popup does not revert the change
2946
2947         * editing/ReplaceSelectionCommand.cpp:
2948         (WebCore::ReplaceSelectionCommand::doApply): If the fragment to be inserted
2949         is empty, first delete the selection, and only then bail out. 
2950
2951 2007-02-23  Anders Carlsson  <acarlsson@apple.com>
2952
2953         Reviewed by Adam.
2954
2955         <rdar://problem/5001923> 
2956         REGRESSION: Crash when navigating forward from an error page in WebFrameLoaderClient::dispatchDidReceiveContentLength
2957
2958         Fix an error that was introduced in revision r18541. We should check if the provisional document loader 
2959         has an unreachable URL, not the actual document loader.
2960         
2961         * loader/FrameLoader.cpp:
2962         (WebCore::FrameLoader::updateHistoryForCommit):
2963
2964 2007-02-23  Mitz Pettel  <mitz@webkit.org>
2965
2966         Reviewed by Darin.
2967
2968         - fix http://bugs.webkit.org/show_bug.cgi?id=12823
2969           REGRESSION(r16968-16977): unable to prevent selection by cancelling "selectstart" event
2970
2971         Test: fast/events/selectstart-during-autoscroll.html
2972
2973         * rendering/RenderLayer.cpp:
2974         (WebCore::RenderLayer::autoscroll): Invoke the renderer's shouldSelect() --
2975         which dispatches the selection DOM event and gives it a chance to cancel
2976         the selection -- before updating the selection during autoscroll.
2977
2978 2007-02-23  Oliver Hunt  <oliver@apple.com>
2979
2980         Reviewed by Adam.
2981
2982         Fix for http://bugs.webkit.org/show_bug.cgi?id=12870
2983
2984         It turns out short circuiting DragData::containsURL() was bad
2985  
2986         * manual-tests/directory-drop-on-view.html: Added.
2987         * platform/mac/DragDataMac.mm:
2988         (WebCore::DragData::containsURL):
2989
2990 2007-02-23  Maciej Stachowiak  <mjs@apple.com>
2991
2992         Reviewed by Mitz.
2993
2994         - 12.5% speedup on BenchJS test 6
2995         Partial fix for http://bugs.webkit.org/show_bug.cgi?id=12866
2996         
2997         It turns out that calling documentVisibleRect on an NSScrollView is pretty expensive,
2998         and calling visibleRect even more so. Take measures to call them less often.
2999
3000         * platform/mac/ScrollViewMac.mm:
3001         (WebCore::ScrollView::visibleContentRect): Use documentVisibleRect when possible.
3002         (WebCore::ScrollView::updateContents): Use visibleContentRect to be able to use
3003         documentVisibleRect when possible.
3004         * rendering/RenderView.cpp:
3005         (WebCore::RenderView::repaintViewRectangle): Don't get or intersect with viewRect
3006         if we don't have a parent frame, since the ScrollView will do that anyway. Also,
3007         don't get contentX and contentY separately since they are in the viewRect already.
3008         (WebCore::RenderView::viewRect): Use visibleContentRect instead of getting each
3009         coordinate individually, to avoid calling documentVisibleRect repeatedly.
3010
3011 2007-02-23  Maciej Stachowiak  <mjs@apple.com>
3012
3013         Reviewed by Mitz.
3014
3015         - 2% speedup on BenchJS test 6
3016         Partial fix for http://bugs.webkit.org/show_bug.cgi?id=12866
3017
3018         * css/CSSPrimitiveValue.cpp:
3019         (WebCore::CSSPrimitiveValue::cssText): Use format() instead of
3020         number() followed by append of a constant string.
3021
3022 2007-02-22  George Staikos  <staikos@kde.org>
3023
3024         Fix the Qt build.
3025
3026         * platform/qt/ClipboardQt.cpp:
3027         (WebCore::ClipboardQt::ClipboardQt):
3028
3029 2007-02-22  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3030
3031         Reviewed by Adam Roben, who never sleeps.
3032
3033         To avoid code duplication, move notImplementedGdk() macro to a separate
3034         header file. Remove existing notImplementedGdk() macros and replace
3035         remaining notImplemented() to notImplementedGdk() in gdk code.
3036
3037         * loader/gdk/DocumentLoaderGdk.cpp:
3038         (WebCore::DocumentLoader::getResponseModifiedHeader):
3039         * loader/gdk/FrameLoaderClientGdk.cpp:
3040         (WebCore::FrameLoaderClientGdk::hasWebView):
3041         (WebCore::FrameLoaderClientGdk::hasFrameView):
3042         * page/gdk/ContextMenuClientGdk.cpp:
3043         (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
3044         (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
3045         (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
3046         (WebCore::ContextMenuClientGdk::downloadURL):
3047         (WebCore::ContextMenuClientGdk::copyImageToClipboard):
3048         (WebCore::ContextMenuClientGdk::searchWithGoogle):
3049         (WebCore::ContextMenuClientGdk::lookUpInDictionary):
3050         (WebCore::ContextMenuClientGdk::speak):
3051         (WebCore::ContextMenuClientGdk::stopSpeaking):
3052         * page/gdk/EventHandlerGdk.cpp:
3053         * platform/gdk/CursorGdk.cpp:
3054         (WebCore::Cursor::Cursor):
3055         * platform/gdk/EditorClientGdk.cpp:
3056         * platform/gdk/NotImplementedGdk.h: Added.
3057         * platform/gdk/PopupMenuGdk.cpp:
3058         (WebCore::PopupMenu::PopupMenu):
3059         (WebCore::PopupMenu::~PopupMenu):
3060         (WebCore::PopupMenu::show):
3061         (WebCore::PopupMenu::hide):
3062         (WebCore::PopupMenu::updateFromElement):
3063         * platform/gdk/RenderThemeGdk.cpp:
3064         * platform/gdk/ScreenGdk.cpp:
3065         (WebCore::screenDepth):
3066         (WebCore::screenDepthPerComponent):
3067         (WebCore::screenIsMonochrome):
3068         (WebCore::screenRect):
3069         (WebCore::screenAvailableRect):
3070         * platform/gdk/TemporaryLinkStubs.cpp:
3071         * platform/graphics/gdk/ImageGdk.cpp:
3072         (WebCore::Image::drawPattern):
3073         * platform/network/gdk/ResourceHandleCurl.cpp:
3074         (WebCore::ResourceHandle::setDefersLoading):
3075         * platform/network/gdk/ResourceHandleManager.cpp:
3076         (WebCore::ResourceHandleManager::setupPUT):
3077         (WebCore::ResourceHandleManager::setupPOST):
3078
3079 2007-02-22  Ian Eng  <ian.eng.webkit@gmail.com>
3080
3081         Reviewed by Maciej.
3082
3083         - Patch for http://bugs.webkit.org/show_bug.cgi?id=12850
3084           Leaks >10k objects
3085
3086         and
3087
3088         - http://bugs.webkit.org/show_bug.cgi?id=12853
3089           add a EventListener leak counter
3090
3091         Problem: RemoveEventListener leaks memory if the listener is not
3092         registered.
3093         Fix: Added Window::findJSEventListener function w/o creating a 
3094         JSEventListener; Renamed getJSEventListener to findOrCreateJSEventListener;
3095
3096         As an enhancement, added a leak counter for EventListeners.
3097
3098         Added a test case, LayoutTests/fast/events/remove-event-listener.html.
3099
3100         * WebCore/bindings/js/kjs_dom.cpp:
3101         * WebCore/bindings/js/kjs_window.h:
3102         * WebCore/bindings/js/kjs_window.cpp:
3103         * WebCore/bindings/js/kjs_event.cpp: Add a leak counter.
3104         * WebCore/bindings/js/JSXMLHttpRequest.cpp:
3105         * LayoutTests/fast/events/remove-event-listener.html:
3106
3107 2007-02-22  Anders Carlsson  <acarlsson@apple.com>
3108
3109         Reviewed by Geoff.
3110
3111         <rdar://problem/4998203> 
3112         REGRESSION: Back-forward list gets messed up when navigating to error pages with back-forward cache turned off
3113         
3114         * loader/FrameLoader.cpp:
3115         (WebCore::FrameLoader::load):
3116         Remove call to setPolicyDocumentLoader(), the policy document loader is set immediately after, and setting it before 
3117         calling shouldReloadToHandleUnreachableURL causes us to get the wrong URL.
3118         
3119         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
3120         Check if the unreachable URL is equal to the document loader's request.
3121         
3122         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3123         Check the provisional document loader's unreachable URL.
3124
3125 2007-02-22  Justin Garcia  <justin.garcia@apple.com>
3126
3127         Reviewed by darin
3128         
3129         <rdar://problem/5007143>
3130         REGRESSION: WebKit doesn't remember horizontal position of caret when moving forward by line
3131
3132         * editing/SelectionController.cpp:
3133         (WebCore::SelectionController::SelectionController): Initialize 
3134         m_xPosForVerticalArrowNavigation.
3135         (WebCore::SelectionController::setSelection): Call the new setter.
3136         (WebCore::SelectionController::modifyMovingRightForward): For line
3137         and paragraph granularities, use the saved xPosForVerticalArrowNavigation 
3138         even if the old selection was a range. Use the x position of the 
3139         *start*, not the end of the selection if there is no saved 
3140         xPosForVerticalArrowNavigation.  This matches TextEdit's behavior.
3141         (WebCore::SelectionController::modifyMovingLeftBackward): For line
3142         and paragraph granularities, use the saved xPosForVerticalArrowNavigation 
3143         even if the old selection was a range.
3144         (WebCore::SelectionController::modify): Preserve the xPosForVerticalArrowNavigation
3145         for line and paragraph granularities.
3146         (WebCore::SelectionController::xPosForVerticalArrowNavigation): Removed
3147         the recalc bool because it is now always false.
3148         (WebCore::SelectionController::setXPosForVerticalArrowNavigation): Added.
3149         * editing/SelectionController.h: Moved m_xPosForVerticalArrowNavigation
3150         from Frame.
3151         * page/Frame.cpp: Moved m_xPosForVerticalArrowNavigation to SelectionController.
3152         * page/Frame.h: Ditto.
3153         * page/FramePrivate.h: Ditto.
3154
3155 2007-02-22  Beth Dakin  <bdakin@apple.com>
3156
3157         Reviewed by Adam. Manual test added.
3158
3159         Fix for http://bugs.webkit.org/show_bug.cgi?id=12399 REGRESSION: 
3160         Unable to prevent default context menu from appearing. <rdar://
3161         problem/5017416>
3162
3163         This problem appeared because of two facets of the current context 
3164         menu design. First, all context menu events are now considered to 
3165         be "swallowed" since we take care of building up the regular 
3166         context menu through the defaultEventHandler(). Second, the context 
3167         menu controller holds onto it's context menu until a new one is 
3168         created. There would be logistical problems changing this since 
3169         AppKit relies on the menu being around for as long as it is
3170         visible on the screen and we don't get any notification once the 
3171         menu is popped-down.
3172
3173         This patch fixes the problem by giving WebKit a way to clear the 
3174         controller's context menu. WebKit now clears the menu before it 
3175         propagates a new context menu event through the DOM.
3176
3177         * WebCore.exp:
3178         * manual-tests/DOMContextMenuEvent.html: Added.
3179         * page/ContextMenuController.cpp:
3180         (WebCore::ContextMenuController::clearContextMenu):
3181         * page/ContextMenuController.h:
3182
3183 2007-02-22  John Sullivan  <sullivan@apple.com>
3184
3185         Reviewed by Kevin and Adele
3186         
3187         - fixed <rdar://problem/4129417> Need final art for textarea's resize corner
3188         
3189         This probably broke some layout pixel tests since the image changed. I'm going to
3190         track those down in a moment (non-trivial since there are a bunch failing for other
3191         reasons).
3192
3193         * Resources/textAreaResizeCorner.tiff:
3194         new art
3195
3196         * Resources/deleteButton.tiff:
3197         * Resources/deleteButtonPressed.tiff:
3198         these got smaller when I ran compress-tiffs on this directory
3199         
3200 2007-02-22  Oliver Hunt  <oliver@apple.com>
3201
3202         Reviewed by Ada, Lou and Steve.
3203
3204         Moving basic components of ClipboardMac to Clipboard, 
3205         last of the basic common code merge will come later (namely setting the 
3206         drag element/image).
3207         
3208         Tidying up in DragController including a few bad PassRefPtr uses and
3209         removing unnecessary accessors.  Also initialise fields properly to
3210         fix <rdar:/problems/5014889>
3211
3212         * dom/Clipboard.cpp:
3213         (WebCore::Clipboard::Clipboard):
3214           New constructor
3215           
3216         * dom/Clipboard.h:
3217         (WebCore::Clipboard::isForDragging):
3218         (WebCore::Clipboard::dragLocation):
3219         (WebCore::Clipboard::dragImage):
3220         (WebCore::Clipboard::dragImageElement):
3221           Exposing common data
3222           
3223         * page/DragController.cpp:
3224         (WebCore::DragController::DragController):
3225           Initialise m_isHandlingDrag (oops)
3226         (WebCore::documentFragmentFromDragData):
3227         (WebCore::DragController::tryDocumentDrag):
3228           Fixing PassRefPtr misuse
3229         (WebCore::DragController::canProcessDrag):
3230         (WebCore::DragController::startDrag):
3231         (WebCore::DragController::doSystemDrag):
3232           Make sure we're using the correct coordinate space
3233           
3234         * page/EventHandler.cpp:
3235         (WebCore::EventHandler::handleDrag):
3236           Reset drag source correctly
3237           
3238         * platform/mac/ClipboardMac.h:
3239         * platform/mac/ClipboardMac.mm:
3240         (WebCore::ClipboardMac::ClipboardMac):
3241           update constructor to use new Clipboard constructor
3242
3243 2007-02-22  Adele Peterson  <adele@apple.com>
3244
3245         Reviewed by Darin.
3246
3247         Fix for <rdar://problem/5014970> 9A374: Tabs don't work in the message body
3248
3249         Test: fast/events/keypress-insert-tab.html
3250
3251         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
3252           If the defaultTabEventHandler doesn't handle the event, then go on to the insertText case.
3253
3254 2007-02-22  Timothy Hatcher  <timothy@apple.com>
3255
3256         Reviewed by Darin.
3257
3258         <rdar://problem/4948887> REGRESSION: Correct differences in public DOM API that inadvertently changed in Leopard
3259
3260         * bindings/objc/PublicDOMInterfaces.h: Changes return types for two size properties, adds deprecated DOMEventTarget methods.
3261         * bindings/scripts/CodeGeneratorObjC.pm: Fixed public API checking for protocols, adds support for ConvertToString.
3262         * dom/EventTarget.idl: Marks addEventListener and removeEventListener with the OldStyleObjC attribute.
3263         * html/HTMLBaseFontElement.idl: Changes the size property to a DOMString for ObjC only.
3264         * html/HTMLInputElement.idl: Changes the size property to a DOMString for ObjC only.
3265         * html/HTMLOptionsCollection.idl: Changes the length property to be unsigned.
3266
3267 2007-02-22  Adele Peterson  <adele@apple.com>
3268
3269         Reviewed by John.
3270
3271         Fix <rdar://problem/5016969> REGRESSION: "Check Spelling As You Type" context menu item is never checked
3272
3273         * platform/ContextMenu.cpp: (WebCore::ContextMenu::checkOrEnableIfNeeded): Set shouldCheck for ContextMenuItemTagCheckSpellingWhileTyping.
3274
3275 2007-02-22  Antti Koivisto  <antti@apple.com>
3276
3277         Reviewed by Darin.
3278
3279         - fix http://bugs.webkit.org/show_bug.cgi?id=11447
3280         REGRESSION(NativeListBox): List not scrolled to preselected option
3281         <rdar://problem/4957463>
3282         
3283         Initiate scroll when selected <option> is added to <select>.
3284
3285         * html/HTMLOptionElement.cpp:
3286         (WebCore::HTMLOptionElement::insertedIntoDocument):
3287         * html/HTMLOptionElement.h:
3288         * html/HTMLSelectElement.cpp:
3289         (WebCore::HTMLSelectElement::notifyOptionSelected):
3290         (WebCore::HTMLSelectElement::updateListBoxSelection):
3291         (WebCore::HTMLSelectElement::scrollToSelection):
3292         * html/HTMLSelectElement.h:
3293
3294 2007-02-22  Zack Rusin  <zrusin@trolltech.com>
3295
3296         Reviewed by Lars
3297
3298         Fix sites with fixed positioned backgrounds.
3299
3300         * platform/qt/ScrollViewQt.cpp:
3301         (WebCore::ScrollView::setStaticBackground):
3302
3303 2007-02-22  Zack Rusin  <zrusin@trolltech.com>
3304
3305         Reviewed by Lars
3306
3307         Properly implement canvas/scrollview's. Get
3308         rid of ScrollViewCanvas and replace it with
3309         a tailor abstractscrollview (now in qwebframe).
3310         Scrolling of pages is finally completely smooth.
3311
3312         * WebCore.pro:
3313         * platform/ScrollView.h:
3314         * platform/qt/ScrollViewCanvasQt.cpp: Removed.
3315         * platform/qt/ScrollViewCanvasQt.h: Removed.
3316         * platform/qt/ScrollViewQt.cpp:
3317         (WebCore::ScrollView::ScrollView):
3318         (WebCore::ScrollView::setScrollArea):
3319         (WebCore::ScrollView::updateContents):
3320         (WebCore::ScrollView::resizeContents):
3321         (WebCore::ScrollView::contentsWidth):
3322         (WebCore::ScrollView::contentsHeight):
3323         (WebCore::ScrollView::contentsToWindow):
3324         (WebCore::ScrollView::windowToContents):
3325         (WebCore::ScrollView::addChild):
3326         * platform/qt/WidgetQt.cpp:
3327         (WebCore::WidgetPrivate::canvas):
3328         (WebCore::WidgetPrivate::parentScroll):
3329         (WebCore::WidgetPrivate::setGeometry):
3330         (WebCore::WidgetPrivate::geometry):
3331         (WebCore::Widget::frameGeometry):
3332         (WebCore::Widget::setQWidget):
3333         (WebCore::Widget::setFrameGeometry):
3334
3335 2007-02-21  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3336
3337         Reviewed by Adam Roben.
3338
3339         Improve notImplemented() macro for gdk. Rename to notImplementedGdk() to
3340         give it a unique name (so that it doesn't clash with notImplemented()
3341         for other platforms).
3342         Make it print a given warning only once, so that frequently called
3343         functions don't clutter the output.
3344         Don't print the warning if DISABLE_NI_WARNING env variable is set.
3345
3346         * loader/gdk/FrameLoaderClientGdk.cpp:
3347         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
3348         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
3349         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
3350         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
3351         (WebCore::FrameLoaderClientGdk::createPlugin):
3352         (WebCore::FrameLoaderClientGdk::createFrame):
3353         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
3354         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
3355         (WebCore::FrameLoaderClientGdk::objectContentType):
3356         (WebCore::FrameLoaderClientGdk::overrideMediaType):
3357         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
3358         (WebCore::FrameLoaderClientGdk::hasWebView):
3359         (WebCore::FrameLoaderClientGdk::hasFrameView):
3360         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
3361         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
3362         (WebCore::FrameLoaderClientGdk::restoreViewState):
3363         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
3364         (WebCore::FrameLoaderClientGdk::makeDocumentView):
3365         (WebCore::FrameLoaderClientGdk::makeRepresentation):
3366         (WebCore::FrameLoaderClientGdk::forceLayout):
3367         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
3368         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
3369         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
3370         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
3371         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
3372         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
3373         (WebCore::FrameLoaderClientGdk::loadedFromPageCache):
3374         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
3375         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
3376         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
3377         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
3378         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
3379         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
3380         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
3381         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
3382         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
3383         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
3384         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
3385         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
3386         (WebCore::FrameLoaderClientGdk::dispatchShow):
3387         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
3388         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
3389         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
3390         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
3391         (WebCore::FrameLoaderClientGdk::willChangeTitle):
3392         (WebCore::FrameLoaderClientGdk::finishedLoading):
3393         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
3394         (WebCore::FrameLoaderClientGdk::setDefersLoading):
3395         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
3396         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
3397         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
3398         (WebCore::FrameLoaderClientGdk::canHandleRequest):
3399         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
3400         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
3401         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
3402         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
3403         (WebCore::FrameLoaderClientGdk::didFinishLoad):
3404         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
3405         (WebCore::FrameLoaderClientGdk::setTitle):
3406         (WebCore::FrameLoaderClientGdk::setDocumentViewFromPageCache):
3407         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
3408         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
3409         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
3410         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
3411         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
3412         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
3413         (WebCore::FrameLoaderClientGdk::download):
3414         (WebCore::FrameLoaderClientGdk::cancelledError):
3415         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
3416         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
3417         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
3418         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
3419         (WebCore::FrameLoaderClientGdk::shouldFallBack):
3420         (WebCore::FrameLoaderClientGdk::willUseArchive):
3421         (WebCore::FrameLoaderClientGdk::saveDocumentViewToPageCache):
3422         (WebCore::FrameLoaderClientGdk::canCachePage):
3423         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
3424         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
3425         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
3426         (WebCore::FrameLoaderClientGdk::startDownload):
3427         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
3428         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
3429         (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem):
3430         * page/gdk/EventHandlerGdk.cpp:
3431         (WebCore::EventHandler::passMouseDownEventToWidget):
3432         (WebCore::EventHandler::eventActivatedView):
3433         (WebCore::EventHandler::passSubframeEventToSubframe):
3434         (WebCore::EventHandler::passWheelEventToWidget):
3435         (WebCore::EventHandler::createDraggingClipboard):
3436         * platform/gdk/EditorClientGdk.cpp:
3437         (WebCore::EditorClientGdk::shouldDeleteRange):
3438         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
3439         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
3440         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
3441         (WebCore::EditorClientGdk::shouldBeginEditing):
3442         (WebCore::EditorClientGdk::shouldEndEditing):
3443         (WebCore::EditorClientGdk::shouldInsertText):
3444         (WebCore::EditorClientGdk::shouldChangeSelectedRange):
3445         (WebCore::EditorClientGdk::shouldApplyStyle):
3446         (WebCore::EditorClientGdk::didBeginEditing):
3447         (WebCore::EditorClientGdk::respondToChangedContents):
3448         (WebCore::EditorClientGdk::didEndEditing):
3449         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
3450         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
3451         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
3452         (WebCore::EditorClientGdk::isEditable):
3453         (WebCore::EditorClientGdk::registerCommandForUndo):
3454         (WebCore::EditorClientGdk::registerCommandForRedo):
3455         (WebCore::EditorClientGdk::clearUndoRedoOperations):
3456         (WebCore::EditorClientGdk::canUndo):
3457         (WebCore::EditorClientGdk::canRedo):
3458         (WebCore::EditorClientGdk::undo):
3459         (WebCore::EditorClientGdk::redo):
3460         (WebCore::EditorClientGdk::shouldInsertNode):
3461         (WebCore::EditorClientGdk::pageDestroyed):
3462         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
3463         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
3464         (WebCore::EditorClientGdk::textFieldDidBeginEditing):
3465         (WebCore::EditorClientGdk::textFieldDidEndEditing):
3466         (WebCore::EditorClientGdk::textDidChangeInTextField):
3467         (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
3468         (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
3469         (WebCore::EditorClientGdk::textDidChangeInTextArea):
3470         * platform/gdk/RenderThemeGdk.cpp:
3471         (WebCore::RenderThemeGdk::setCheckboxSize):
3472         (WebCore::RenderThemeGdk::setRadioSize):
3473         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
3474         * platform/gdk/TemporaryLinkStubs.cpp:
3475         (FrameView::updateBorder):
3476         (Widget::setEnabled):
3477         (Widget::isEnabled):
3478         (Widget::focusPolicy):
3479         (Widget::enableFlushDrawing):
3480         (Widget::disableFlushDrawing):
3481         (Widget::lockDrawingFocus):
3482         (Widget::unlockDrawingFocus):
3483         (Widget::removeFromParent):
3484         (Widget::paint):
3485         (Widget::setIsSelected):
3486         (Widget::invalidate):
3487         (Widget::invalidateRect):
3488         (PlatformMouseEvent::PlatformMouseEvent):
3489         (WebCore::findNextSentenceFromIndex):
3490         (WebCore::findSentenceBoundary):
3491         (WebCore::findNextWordFromIndex):
3492         (ChromeClientGdk::chromeDestroyed):
3493         (ChromeClientGdk::windowRect):
3494         (ChromeClientGdk::setWindowRect):
3495         (ChromeClientGdk::pageRect):
3496         (ChromeClientGdk::scaleFactor):
3497         (ChromeClientGdk::focus):
3498         (ChromeClientGdk::unfocus):
3499         (ChromeClientGdk::createWindow):
3500         (ChromeClientGdk::createModalDialog):
3501         (ChromeClientGdk::show):
3502         (ChromeClientGdk::canRunModal):
3503         (ChromeClientGdk::runModal):
3504         (ChromeClientGdk::setToolbarsVisible):
3505         (ChromeClientGdk::toolbarsVisible):
3506         (ChromeClientGdk::setStatusbarVisible):
3507         (ChromeClientGdk::statusbarVisible):
3508         (ChromeClientGdk::setScrollbarsVisible):
3509         (ChromeClientGdk::scrollbarsVisible):
3510         (ChromeClientGdk::setMenubarVisible):
3511         (ChromeClientGdk::menubarVisible):
3512         (ChromeClientGdk::setResizable):
3513         (ChromeClientGdk::closeWindowSoon):
3514         (ChromeClientGdk::canTakeFocus):
3515         (ChromeClientGdk::takeFocus):
3516         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
3517         (ChromeClientGdk::addMessageToConsole):
3518         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
3519         (ChromeClientGdk::runJavaScriptAlert):
3520         (ChromeClientGdk::runJavaScriptConfirm):
3521         (ChromeClientGdk::runJavaScriptPrompt):
3522         (ChromeClientGdk::setStatusbarText):
3523         (ChromeClientGdk::shouldInterruptJavaScript):
3524         (ChromeClientGdk::tabsToLinks):
3525         (ChromeClientGdk::windowResizerRect):
3526         (ChromeClientGdk::addToDirtyRegion):
3527         (ChromeClientGdk::scrollBackingStore):
3528         (ChromeClientGdk::updateBackingStore):
3529         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
3530         (PlugInInfoStore::pluginCount):
3531         (WebCore::PlugInInfoStore::supportsMIMEType):
3532         (WebCore::refreshPlugins):
3533         (SearchPopupMenu::saveRecentSearches):
3534         (SearchPopupMenu::loadRecentSearches):
3535         (SearchPopupMenu::SearchPopupMenu):
3536         (PlatformScrollbar::PlatformScrollbar):
3537         (PlatformScrollbar::~PlatformScrollbar):
3538         (PlatformScrollbar::setEnabled):
3539         (PlatformScrollbar::paint):
3540         (PlatformScrollbar::updateThumbPosition):
3541         (PlatformScrollbar::updateThumbProportion):
3542         (PlatformScrollbar::setRect):
3543         (FileChooser::FileChooser):
3544         (FileChooser::~FileChooser):
3545         (FileChooser::openFileChooser):
3546         (FileChooser::basenameForWidth):
3547         (ResourceHandle::willL