Fix typos in ChangeLog
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-15  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Geoffrey Garen.
4
5         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
6
7         - Update JS Function implementations to use a static function based method. This decreases
8           the binary size of an Intel only build by 1013.5K.
9
10         * WebCore.xcodeproj/project.pbxproj:
11         * bindings/js/JSDOMWindowCustom.cpp:
12         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
13         * bindings/js/JSEventTargetBase.cpp:
14         (WebCore::jsEventTargetAddEventListener):
15         (WebCore::jsEventTargetRemoveEventListener):
16         (WebCore::jsEventTargetDispatchEvent):
17         (WebCore::retrieveEventTargetAndCorrespondingNode):
18         * bindings/js/JSEventTargetBase.h:
19         * bindings/js/JSHTMLInputElementBase.cpp:
20         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
21         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
22         * bindings/js/JSHTMLInputElementBase.h:
23         * bindings/js/JSLocation.cpp:
24         (WebCore::JSLocation::getOwnPropertySlot):
25         (WebCore::jsLocationProtoFuncReplace):
26         (WebCore::jsLocationProtoFuncReload):
27         (WebCore::jsLocationProtoFuncAssign):
28         (WebCore::jsLocationProtoFuncToString):
29         * bindings/js/JSLocation.h:
30         * bindings/js/JSXMLHttpRequest.cpp:
31         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
32         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
33         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
34         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
35         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
36         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
37         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
38         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
39         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
40         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
41         * bindings/js/JSXMLHttpRequest.h:
42         * bindings/js/JSXSLTProcessor.cpp:
43         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
44         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
45         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
46         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
47         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
48         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
49         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
50         (KJS::jsXSLTProcessorPrototypeFunctionReset):
51         * bindings/js/JSXSLTProcessor.h:
52         * bindings/js/kjs_events.cpp:
53         (WebCore::jsClipboardPrototypeFunctionClearData):
54         (WebCore::jsClipboardPrototypeFunctionGetData):
55         (WebCore::jsClipboardPrototypeFunctionSetData):
56         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
57         * bindings/js/kjs_events.h:
58         * bindings/js/kjs_navigator.cpp:
59         (KJS::pluginsFunctionRefresh):
60         (KJS::navigatorProtoFuncJavaEnabled):
61         * bindings/js/kjs_navigator.h:
62         * bindings/js/kjs_window.cpp:
63         (KJS::Window::getOwnPropertySlot):
64         (KJS::windowProtoFuncAToB):
65         (KJS::windowProtoFuncBToA):
66         (KJS::windowProtoFuncOpen):
67         (KJS::windowProtoFuncSetTimeout):
68         (KJS::windowProtoFuncClearTimeout):
69         (KJS::windowProtoFuncSetInterval):
70         (KJS::windowProtoFuncAddEventListener):
71         (KJS::windowProtoFuncRemoveEventListener):
72         (KJS::windowProtoFuncShowModalDialog):
73         (KJS::windowProtoFuncNotImplemented):
74         * bindings/js/kjs_window.h:
75         * bindings/scripts/CodeGenerator.pm:
76         * bindings/scripts/CodeGeneratorJS.pm:
77
78 2008-01-15  Adele Peterson  <adele@apple.com>
79
80         Reviewed by Dan.
81
82         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
83
84         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
85           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
86
87 2008-01-15  Alp Toker  <alp@atoker.com>
88
89         Rubber-stamped by Anders.
90
91         Make the HTTP backend configurable in the GTK+ port. curl is currently
92         the only option.
93
94         * GNUmakefile.am:
95
96 2008-01-15  Adele Peterson  <adele@apple.com>
97
98         Build fix.
99
100         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
101
102 2008-01-14  Samuel Weinig  <sam@webkit.org>
103
104         Reviewed by Darin.
105
106         Fix for <rdar://problem/5671040>
107         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
108
109         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
110         which does not completely make up reported regression, but I was not able to
111         reproduce those findings either.
112
113         * css/CSSStyleSelector.cpp:
114         (WebCore::CSSStyleSelector::matchRules):
115         (WebCore::CSSStyleSelector::checkOneSelector):
116         * dom/ClassNames.cpp:
117         (WebCore::ClassNames::parseClassAttribute):
118         * dom/ClassNames.h:
119         (WebCore::ClassNames::contains):
120         (WebCore::ClassNames::operator[]):
121
122 2008-01-15  Adele Peterson  <adele@apple.com>
123
124         Build fix.  This time for real.
125
126         * rendering/RenderThemeSafari.cpp:
127
128 2008-01-15  Adele Peterson  <adele@apple.com>
129
130         Build fix.
131
132         * rendering/RenderThemeSafari.cpp:
133
134 2008-01-15  Dan Bernstein  <mitz@apple.com>
135
136         Reviewed by Darin Adler.
137
138         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
139
140         * svg/SVGPreserveAspectRatio.cpp:
141         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
142         from float to double in order to make the values passed to scale() and
143         translate() on Mac OS X and on Windows the same.
144         * svg/SVGPreserveAspectRatio.h:
145
146 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
147
148         Reviewed by Darin.
149
150         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
151
152         Test: fast/encoding/mailto-always-utf-8.html
153
154         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
155
156 2008-01-15  Adele Peterson  <adele@apple.com>
157
158         Reviewed by Adam and Antti.
159
160         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
161
162         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
163         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
164         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
165         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
166
167         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
168           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
169         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
170         * platform/mac/WebCoreSystemInterface.mm: ditto.
171
172         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
173         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
174         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
175         * rendering/RenderThemeMac.mm:
176         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
177         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
178         * rendering/RenderThemeSafari.cpp: ditto.
179         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
180         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
181         * rendering/RenderThemeSafari.h:
182
183 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
184
185         Reviewed by Mark Rowe.
186
187         Some logging channels weren't initialized from user defaults.
188
189         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
190         Initialize LogPlatformLeaks, LogStorageAPI, LogMedia, LogPlugin.
191
192 2008-01-14  Steve Falkenburg  <sfalken@apple.com>
193
194         Use shared vsprops for most vcproj properties.
195         
196         Reviewed by Darin.
197
198         * WebCore.vcproj/QTMovieWin.vcproj:
199         * WebCore.vcproj/WebCore.vcproj:
200         * platform/graphics/win/QTMovieWin.cpp:
201         (QTMovieWin::initializeQuickTime): Fix compiler warning.
202
203 2008-01-14  Eric Seidel  <eric@webkit.org>
204
205         Reviewed by mjs.
206
207         Remove a couple more uses of DeprecatedString
208
209         No functional changes, thus no test case.
210
211         * dom/Document.cpp:
212         (WebCore::Document::write):
213         (WebCore::Document::writeln):
214         (WebCore::Document::recalcStyleSelector):
215         * dom/Document.h:
216
217 2008-01-14  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
218
219         Reviewed by Alp Toker.
220
221         Build fix: missing symbols when compiling WebKit/Gtk+ with --enable-svg-filters
222         http://bugs.webkit.org/show_bug.cgi?id=16874
223
224         * GNUmakefile.am:
225         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Added.
226         (WebCore::SVGResourceFilter::createPlatformData):
227         (WebCore::SVGResourceFilter::prepareFilter):
228         (WebCore::SVGResourceFilter::applyFilter):
229
230 2008-01-14  Finnur Thorarinsson  <finnur.webkit@gmail.com>
231
232         Reviewed by hyatt & eseidel.
233
234         - fix http://bugs.webkit.org/show_bug.cgi?id=16844
235         RenderText::addLineBoxRects erroneously includes last char for boundingBox
236
237         This patch fixes an issue with addLineBoxRects not correctly calculating the 
238         rects due to an off-by-one error in using box->end(). We were assuming that 
239         end() gives the index past the last character, when in fact it gives the 
240         index _of_ the last character. 
241
242         Eric Seidel and I could not find a way to test this via DRT. This method is 
243         only used by WebKit or Safari for displaying selection rects AFAICT.
244
245         * rendering/RenderText.cpp:
246         (WebCore::RenderText::addLineBoxRects):
247
248 2008-01-14  Darin Adler  <darin@apple.com>
249
250         Reviewed by Geoff.
251
252         - fix crash seen in layout tests
253
254         * html/HTMLFrameSetElement.cpp:
255         (WebCore::HTMLFrameSetElement::attach):
256         Remove incorrect cast to HTMLElement* for parentNode(). The parent is either an
257         HTMLElement or a Document, not necessarily an HTMLElement.
258
259 2008-01-14  Darin Adler  <darin@apple.com>
260
261         Reviewed by Sam.
262
263         - fix mistakes Sam noticed in my re-speed-up patch
264
265         * dom/Element.cpp:
266         (WebCore::Element::virtualHasTagName): Moved out of header file. No reason to make
267         this inline.
268         * dom/Element.h: Moved virtualHasTagName out of header file.
269
270         * dom/Node.cpp:
271         (WebCore::Node::virtualHasTagName): Moved out of header file. No reason to make
272         this inline.
273         * dom/Node.h: Removed incorrect "virtual" on hasTagName and moved virtualHasTagName
274         out of header file.
275
276         * platform/text/StringBuffer.h: Added. Has just the new StringBuffer class.
277
278         * platform/text/StringImpl.h: Removed StringBuffer class.
279
280         * loader/DocumentLoader.cpp: Added StringBuffer.h include.
281         * platform/text/String.cpp: Ditto.
282         * platform/text/StringImpl.cpp: Ditto.
283         * platform/text/TextCodecLatin1.cpp: Ditto.
284         * platform/text/TextCodecUTF16.cpp: Ditto.
285         * platform/text/TextCodecUserDefined.cpp: Ditto.
286
287         * WebCore.vcproj/WebCore.vcproj: Added StringBuffer.h.
288         * WebCore.xcodeproj/project.pbxproj: Ditto.
289
290 2008-01-14  Dave Hyatt  <hyatt@apple.com>
291
292         Clean up all the misplaced graphics files after the recent file moves.  Clean up the project to
293         accurately reflect the location of all the graphics files.
294         
295         Reviewed by Adam
296
297         * WebCore.vcproj/WebCore.vcproj:
298         * platform/graphics/win/GraphicsContextWin.cpp: Copied from platform/win/GraphicsContextWin.cpp.
299         * platform/graphics/win/UniscribeController.cpp: Copied from platform/win/UniscribeController.cpp.
300         * platform/graphics/win/UniscribeController.h: Copied from platform/win/UniscribeController.h.
301         * platform/win/GraphicsContextWin.cpp: Removed.
302         * platform/win/UniscribeController.cpp: Removed.
303         * platform/win/UniscribeController.h: Removed.
304
305 2008-01-14  Geoffrey Garen  <ggaren@apple.com>
306
307         Reviewed by Sam Weinig.
308         
309         Some cleanup to my last patch.
310
311         Removed one unused setter declaration and one unused setter definition.
312         
313         Renamed DoNotCheckDomainSecurityOnRead to DoNotCheckDomainSecurityOnGet
314         because "get" is all over the IDL files, and "read" is not.
315
316         * bindings/scripts/CodeGeneratorJS.pm:
317         * page/DOMWindow.h:
318         (WebCore::DOMWindow::defaultstatus):
319         * page/DOMWindow.idl:
320
321 2008-01-14  Dan Bernstein  <mitz@apple.com>
322
323         Rubber-stamped by Alice Liu.
324
325         - remove reference to nonexistent file
326
327         * WebCore.vcproj/WebCore.vcproj: Removed reference to SVGFont.h.
328
329 2008-01-14  Darin Adler  <darin@apple.com>
330
331         Reviewed by Adam.
332
333         - re-speed-up the page load test (my StringImpl change slowed it down)
334           <rdar://problem/5677241> 1.5% PLT regression from r29098
335
336         To reverse the slowdown I caused by changing StringImpl, I tightened it up,
337         and also did a little optimization in the HTML tokenizer and in other clients
338         of Vector.
339
340         * WebCore.base.exp: Removed export of a now-inline function.
341
342         * css/CSSParser.cpp:
343         (WebCore::CSSParser::parseTransitionProperty): Removed use of DeprecatedString
344         to get property ID. This could be sped up even more by writing a fast path
345         to use a local Vector<char> rather than allocating a string.
346         (WebCore::convertASCIIToFloat): Added. Allows numeric conversion without
347         allocating a string object to hold the number.
348         (WebCore::CSSParser::lex): Changed to call convertASCIIToFloat instead of
349         DeprecatedString::toFloat.
350
351         * dom/Element.h:
352         (WebCore::Element::hasTagName): Made this non-virtual and inline if you have
353         an Element*. It's still virtual if you have a Node*.
354         (WebCore::Element::virtualHasTagName): Virtual version that makes the Node*
355         case work.
356
357         * dom/Node.h:
358         (WebCore::Node::hasTagName): Made this non-virtual and inline so that Element
359         can override it with an inline. This is the same technique we use for
360         firstChild and lastChild.
361         (WebCore::Node::virtualHasTagName): This is the private virtual that Element
362         overrides.
363
364         * dom/Text.cpp:
365         (WebCore::Text::splitText): Clean up by using a RefPtr here instead of a
366         PassRefPtr.
367
368         * html/HTMLTokenizer.cpp:
369         (WebCore::HTMLTokenizer::parseSpecial): Use the new advancePastNonNewline(),
370         which is more efficient in cases where we know the character is not a newline
371         and hence we don't have to update the line number.
372         (WebCore::HTMLTokenizer::parseComment): Ditto.
373         (WebCore::HTMLTokenizer::parseServer): Ditto.
374         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
375         (WebCore::HTMLTokenizer::parseText): Ditto.
376         (WebCore::HTMLTokenizer::parseEntity): Ditto.
377         (WebCore::HTMLTokenizer::parseTag): Ditto. Also streamline the QuotedValue case
378         so there's one less branch taken for non-punctuation characters since this
379         code path is *so* hot.
380         (WebCore::HTMLTokenizer::write): More of the same.
381
382         * loader/Cache.cpp:
383         (WebCore::Cache::lruListFor): Use Vector::grow instead of resize.
384
385         * loader/DocumentLoader.cpp:
386         (WebCore::canonicalizedTitle): Use StringBuffer instead of Vector<UChar>.
387
388         * loader/TextResourceDecoder.cpp:
389         (WebCore::TextResourceDecoder::checkForCSSCharset): Use Vector::grow instead of resize.
390         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
391         (WebCore::TextResourceDecoder::decode): Use Vector::grow and shrink instead of resize.
392         (WebCore::TextResourceDecoder::flush): Use Vector::shrink instead of resize.
393
394         * platform/KURL.cpp:
395         (WebCore::KURL::decode_string): Use Vector::grow instead of resize.
396
397         * platform/SharedBuffer.cpp:
398         (WebCore::SharedBuffer::clear): Use Vector::shrink instead of resize.
399
400         * platform/graphics/BitmapImage.cpp:
401         (WebCore::BitmapImage::cacheFrame): Use Vector::grow instead of resize.
402
403         * platform/network/FormData.cpp:
404         (WebCore::FormData::appendData): Use Vector::grow instead of resize.
405         (WebCore::FormData::flatten): Ditto.
406
407         * platform/text/AtomicString.cpp:
408         (WebCore::CStringTranslator::translate): Use a new StringImpl constructor made just
409         for use by AtomicString. Avoids setting fields twice, and also preserves reference
410         count behavior (which I changed for the other constructors, since they're entirely
411         private and used only inside the class).
412         (WebCore::UCharBufferTranslator::translate): Ditto.
413
414         * platform/text/Base64.cpp:
415         (WebCore::base64Encode): Use Vector::grow instead of resize.
416         (WebCore::base64Decode): Use Vector::grow and shrink instead of resize.
417
418         * platform/text/PlatformString.h:
419         (WebCore::String::adopt): Added an overload for the new StringBuffer class. Also
420         made both versions inline.
421
422         * platform/text/SegmentedString.h:
423         (WebCore::SegmentedString::advancePastNewline): Added. One less branch for case
424         where the character is known to be a newline.
425         (WebCore::SegmentedString::advancePastNonNewline): Added. Less code for case where
426         the character is known not to be a newline.
427
428         * platform/text/String.cpp:
429         (WebCore::String::append): Use StringBuffer instead of Vector<UChar>.
430         (WebCore::String::insert): Ditto.
431         (WebCore::String::truncate): Ditto.
432         (WebCore::String::remove): Ditto.
433         (WebCore::String::format): Use Vector::grow instead of resize.
434
435         * platform/text/StringImpl.cpp:
436         (WebCore::StringImpl::StringImpl): Changed constructors to start with a refCount
437         of 1 instead of 0, and made them all inline. Eliminates the WithOneRef constructor
438         since they all behave this way now. The only exceptions are the constructors for
439         AtomicString, which retain the old behavior.
440         (WebCore::StringImpl::empty): Simplified, since we no longer need to use the
441         special WithOneRef constructor.
442         (WebCore::StringImpl::toCoordsArray): Use StringBuffer instead of Vector<UChar>.
443         (WebCore::StringImpl::lower): Ditto.
444         (WebCore::StringImpl::upper): Ditto.
445         (WebCore::StringImpl::secure): Ditto.
446         (WebCore::StringImpl::foldCase): Ditto.
447         (WebCore::StringImpl::simplifyWhiteSpace): Ditto. Also change to use Vector::shrink
448         instead of resize (since half of the function uses Vector<UChar>).
449         (WebCore::StringImpl::capitalize): Use StringBuffer instead of Vector<UChar>.
450         (WebCore::StringImpl::replace): Ditto.
451         (WebCore::StringImpl::ascii): Streamlined a bit.
452         (WebCore::StringImpl::createStrippingNullCharacters): Use StringBuffer insetad of
453         Vector<UChar>. Took out checks for null characters and 0 length that aren't needed.
454         Coded the check for null characters in a slightly more efficient way. Since this
455         is so hot, didn't call adopt at all, putting the code right in here, including
456         the call to the StringImpl constructor and adoptRef (for the fast case).
457         (WebCore::StringImpl::adopt): Added a version for the new StringBuffer class.
458         Removed the attempt to resize the buffer at the time we adopt based on measuring
459         actual use and realizing that it's just a character here or there and not worth
460         a call to fastRealloc. Changed to use adoptRef since the constructor now starts
461         with a refCount of 1.
462         (WebCore::StringImpl::create): Changed to use adoptRef since the constructor now
463         starts with a refCount of 1.
464         (WebCore::StringImpl::createWithTerminatingNullCharacter): Ditto.
465         (WebCore::StringImpl::copy): Ditto. Also made non-inline since the constructor
466         itself is now inline.
467
468         * platform/text/StringImpl.h: Added a StringBuffer class that's useful for
469         putting characters into a buffer before creating an immutable string. Not good
470         at resizing the way Vector<UChar> is, so only useful for things that rarely need
471         to be resized. Added a new AdoptBuffer constructor and empty constructor, but
472         made all constructors private so they can be inlined and only used inside the
473         StringImpl class. Added two new constructors for AtomicString. Made copy()
474         no longer inline. Changed the type of the [] operator to unsigned instead of
475         int and added an assertion. Made the hash functions inline.
476
477         * platform/text/TextCodecICU.cpp:
478         (WebCore::TextCodecICU::encode): Use Vector::grow instead of resize.
479
480         * platform/text/TextCodecLatin1.cpp:
481         (WebCore::TextCodecLatin1::decode): Use StringBuffer instead of Vector<UChar>.
482         (WebCore::encodeComplexWindowsLatin1): Use Vector::grow instead of resize.
483
484         * platform/text/TextCodecUTF16.cpp:
485         (WebCore::TextCodecUTF16::decode): Use StringBuffer instead of Vector<UChar>.
486
487         * platform/text/TextCodecUserDefined.cpp:
488         (WebCore::TextCodecUserDefined::decode): Use StringBuffer instead of Vector<UChar>.
489         (WebCore::encodeComplexUserDefined): Use Vector::grow instead of resize.
490
491         * platform/text/TextEncoding.cpp:
492         (WebCore::TextEncoding::encode): Use Vector::grow instead of resize.
493
494         * platform/text/TextStream.cpp:
495         (WebCore::TextStream::operator<<): Use Vector::grow instead of resize.
496
497         * platform/text/mac/TextCodecMac.cpp:
498         (WebCore::TextCodecMac::encode): Use Vector::grow instead of resize.
499
500         * rendering/AutoTableLayout.cpp:
501         (WebCore::AutoTableLayout::insertSpanCell): Use Vector::grow instead of resize.
502
503         * rendering/RenderFrameSet.h:
504         (WebCore::FrameEdgeInfo::FrameEdgeInfo): Allocate vectors with the correct initial
505         size instead of calling resize on them after allocating empty.
506
507         * rendering/RenderListMarker.cpp:
508         (WebCore::RenderListMarker::paint): Use Vector::grow instead of resize.
509
510         * rendering/RenderStyle.cpp: Removed CursorList::operator==.
511         * rendering/RenderStyle.h:
512         (WebCore::CursorList::operator==): Implemented using the Vector ==.
513         (WebCore::CursorList::operator!=): Ditto.
514
515         * rendering/RenderTable.cpp:
516         (WebCore::RenderTable::splitColumn): Use Vector::grow instead of resize.
517         (WebCore::RenderTable::appendColumn): Ditto.
518
519         * rendering/RenderTableSection.cpp:
520         (WebCore::RenderTableSection::ensureRows): Use Vector::grow instead of resize.
521
522         * rendering/bidi.cpp:
523         (WebCore::addMidpoint): Use Vector::grow instead of resize.
524
525         * xml/XPathNodeSet.h:
526         (WebCore::XPath::NodeSet::clear): Use Vector::shrink instead of resize.
527
528 2008-01-13  Steve Falkenburg  <sfalken@apple.com>
529
530         Share common files across projects.
531         
532         Unify vsprops files
533         Debug:          common.vsprops, debug.vsprops
534         Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops
535         Release:        common.vsprops, release.vsprops
536         
537         Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops.
538         debug_internal.vsprops will be mostly empty except for file path prefix modifiers.
539
540         Pull auto-version.sh, VERSION, and PRODUCTVERSION from tools.
541
542         Reviewed by Adam Roben.
543
544         * WebCore.vcproj/PRODUCTVERSION: Removed.
545         * WebCore.vcproj/QTMovieWin.vcproj:
546         * WebCore.vcproj/VERSION: Removed.
547         * WebCore.vcproj/WebCore.vcproj:
548         * WebCore.vcproj/auto-version.sh: Removed.
549         * WebCore.vcproj/debug.vsprops: Removed.
550         * WebCore.vcproj/debug_internal.vsprops: Removed.
551         * WebCore.vcproj/release.vsprops: Removed.
552
553 2008-01-13  Dan Bernstein  <mitz@apple.com>
554
555         Reviewed by Darin Adler.
556
557         - fix http://bugs.webkit.org/show_bug.cgi?id=16865
558           fast/layers/resize-layer-deletion-crash.html crashes under GuardMalloc
559
560         * rendering/RenderBox.cpp:
561         (WebCore::RenderBox::destroy): Removed the call to
562         RenderLayer::destroy() from here, because ~RenderLayer() calls
563         RenderObject() methods.
564         * rendering/RenderObject.cpp:
565         (WebCore::RenderObject::destroy): Added the call to
566         RenderLayer::destroy() here.
567
568 2008-01-13  Eric Seidel  <eric@webkit.org>
569
570         Reviewed by darin.
571
572         Range.insertNode does not update endContainer endIndex correctly
573         in the case where it had to split a text node.
574         http://bugs.webkit.org/show_bug.cgi?id=16765
575         
576         Darin pointed out during review that we still don't handle the dynamic
577         range case (where the dom tree changes not using range methods)
578         Thus this code will get ripped out when we add that.  The test cases
579         are still valid and useful however, so I'm landing this as-is.
580
581         Tests: fast/dom/Range/range-insertNode-separate-endContainer.html
582                fast/dom/Range/range-insertNode-splittext.html
583
584         * dom/Range.cpp:
585         (WebCore::Range::insertNode): handle the splitText case correctly.
586
587 2008-01-13  Darin Adler  <darin@apple.com>
588
589         Reviewed by Eric.
590
591         - http://bugs.webkit.org/show_bug.cgi?id=16861
592           get rid of unnecessary string copying
593
594         * dom/Document.cpp:
595         (WebCore::Document::setDomain): Removed unneeded call to copy.
596         (WebCore::Document::parseQualifiedName): Removed unneeded call to copy, and
597         unneeded length argument to substring, which stops at the end of the string
598         if you don't specify a length.
599         (WebCore::Document::createAttributeNS): Replaced code that was calling copy
600         with more-efficient code using the substring function.
601         * dom/StyledElement.cpp:
602         (WebCore::StyledElement::addCSSColor): Removed unneeded call to copy.
603         * editing/InsertIntoTextNodeCommand.cpp:
604         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Removed
605         unneeded copy and also initialized text instead of assigning to it.
606         (WebCore::InsertIntoTextNodeCommand::doApply): Removed redundant assertions.
607         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
608
609         * editing/htmlediting.cpp:
610         (WebCore::stringWithRebalancedWhitespace): Removed unneeded call to copy.
611         This one was particularly bad since we just turned around and copied it again!
612
613         * editing/markup.cpp:
614         (WebCore::stringValueForRange): Removed unneeded call to copy.
615
616         * loader/icon/IconDatabase.cpp:
617         (WebCore::IconDatabase::performOpenInitialization): Changed logging code to not
618         get the path from the database object. This was the only reason the database
619         had to keep its path around.
620
621         * platform/sql/SQLiteDatabase.cpp:
622         (WebCore::SQLiteDatabase::open): Use a local variable instead of a data member to
623         convert the string to a null-terminated one.
624         (WebCore::SQLiteDatabase::close): Removed the code to clear out m_path.
625         * platform/sql/SQLiteDatabase.h: Removed the m_path data member and the path
626         functio member. Also tweaked formatting and comments a bit. Removed the unused
627         escapeSQLString function.
628
629         * platform/text/String.cpp: (WebCore::operator+): Removed uneeded calls to copy.
630
631 2008-01-13  Oliver Hunt  <oliver@apple.com>
632
633         Attempt to fix QT build
634
635         * html/CanvasRenderingContext2D.cpp:
636         (WebCore::CanvasRenderingContext2D::willDraw):
637
638 2008-01-13  Oliver Hunt  <oliver@apple.com>
639
640         Reviewed by Mark Rowe.
641
642         Avoid repainting the entire canvas element when possible.
643
644         http://bugs.webkit.org/show_bug.cgi?id=16859
645
646         We now only register the dirty regions of a canvas for repainting, rather
647         than the entire element (though repaint coalescing may choose to combine
648         these regions).  This doesn't cause a measurable regression in the worst
649         case (clearing the canvas repeatedly), but is a moderate-large win if only
650         a minor update has occurred.  If there is any CSS scaling applied to the
651         canvas almost any update short of clearing the entire element is substantially
652         faster.
653
654         * html/CanvasRenderingContext2D.cpp:
655         (WebCore::CanvasRenderingContext2D::willDraw):
656         * html/HTMLCanvasElement.cpp:
657         (WebCore::HTMLCanvasElement::willDraw):
658
659 2008-01-13  Michael Goddard  <michael.goddard@trolltech.com>
660
661         Reviewed by Anders Carlsson.
662
663         Move RuntimeObjectImp creations into Instance.
664         Make the ctor protected, and Instance a friend class, so
665         that all creation of RuntimeObjectImps goes through
666         one place.
667
668         * bindings/js/kjs_dom.cpp:
669         (WebCore::getRuntimeObject):
670
671 2008-01-12  Rodney Dawes  <dobey@wayofthemonkey.com>
672
673         Gtk debug build fix.  Reviewed by Mark Rowe.
674
675         Add plugin logging channel, and use it rather than Win32-specific debugging methods _RPTF1 _RPTF2 and _CRT_WARN.
676
677         * WebCore.pro: Add plugins directory to DEPENDPATH so dependencies are correctly tracked.
678         * platform/Logging.cpp:
679         * platform/Logging.h:
680         * plugins/PluginDebug.h:
681
682 2008-01-12  Adam Barth  <hk9565@gmail.com>
683
684         Reviewed by Maciej (and also tweaked a little bit).
685
686         - more thorough fix for some crashing tests
687           http://bugs.webkit.org/show_bug.cgi?id=16782
688
689         * loader/FrameLoader.cpp:
690         (WebCore::FrameLoader::urlSelected):
691         (WebCore::FrameLoader::submitForm):
692         (WebCore::FrameLoader::executeIfJavaScriptURL):
693         * loader/FrameLoader.h:
694
695 2008-01-12  Maciej Stachowiak  <mjs@apple.com>
696
697         Reviewed by Sam.
698
699         - fixed <rdar://problem/5556374> REGRESSION: cross-domain error when one URL uses an explicit port number and another doesn't
700         
701         * platform/SecurityOrigin.cpp:
702         (WebCore::isDefaultPortForProtocol):
703         (WebCore::SecurityOrigin::SecurityOrigin):
704
705 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
706
707         Reviewed by Oliver Hunt.
708         
709         Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global
710         variable access (16644)
711         
712         Removed the ReadOnly bit from some properties, to match Firefox. Also
713         removed status-related setters, to allow using their names as variable
714         names.
715         
716         * bindings/scripts/CodeGeneratorJS.pm: Added support for properties that
717         are one-way across domain boundaries, to match Firefox.
718
719         * bindings/js/kjs_window.cpp: Changed ReadOnly declarations to match FF.
720
721         * bindings/scripts/CodeGeneratorJS.pm: Don't use JSObject:: because
722         we don't know that JSObject is our base class.
723
724         * page/DOMWindow.idl: Replaced lots of readonly declarations with
725         [Replaceable] declarations.
726
727         * page/DOMWindow.h: Removed interfaces for setting status text via the
728         DOM. (They were getting in the way of, e.g., "var status"
729         declarations.) By default, IE 7 and FF disable these interfaces in order
730         to defend against phishing attacks that try to spoof domain names in the
731         statusbar.
732         * page/DOMWindow.cpp:
733
734 2008-01-11  Anyang Ren  <anyang.ren@gmail.com>
735
736         Reviewed by Darin Adler.
737
738         http://bugs.webkit.org/show_bug.cgi?id=15960
739         The view source mode should skip an empty attribute value only if
740         the attribute name is not followed by an equal sign (=).
741
742         Test: fast/frames/viewsource-empty-attribute-value.html
743
744         * html/HTMLViewSourceDocument.cpp:
745         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
746
747 2008-01-11  Sylvain Pasche  <sylvain.pasche@gmail.com>
748
749         Reviewed by Alp Toker.
750
751         [Gtk] Uneven glyph spacing with subpixel antialiasing
752         http://bugs.webkit.org/show_bug.cgi?id=16715
753
754         Use cairo font options from the default GDK screen when creating a
755         scaled font.
756
757         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
758         (WebCore::FontPlatformData::FontPlatformData):
759
760 2008-01-11  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
761
762         Reviewed by Maciej.
763
764         Added a new forwarding header, because Activation.h has been separated
765         from function.h
766
767         * ForwardingHeaders/kjs/Activation.h: Added.
768
769 2008-01-11  Luca Bruno  <lethalman88@gmail.com>
770
771         Reviewed by Alp Toker.
772
773         http://bugs.webkit.org/show_bug.cgi?id=16729
774         [cURL] Allow multiple files for upload
775
776         * platform/network/ResourceHandleInternal.h:
777         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
778         * platform/network/curl/ResourceHandleCurl.cpp:
779         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
780         * platform/network/curl/ResourceHandleManager.cpp:
781         (WebCore::readCallback): added
782         (WebCore::ResourceHandleManager::setupPOST): setup for streaming the POST
783         (WebCore::ResourceHandleManager::startJob):
784         (WebCore::ResourceHandleManager::cancel): revert the previous patch for regression
785         * platform/network/curl/ResourceHandleManager.h:
786
787 2008-01-11  Christian Dywan  <christian@imendio.com>
788
789         Reviewed by Alp Toker.
790
791         [Gtk] Menu items need underscores
792         http://bugs.webkit.org/show_bug.cgi?id=16817
793
794         Add underscores to appropriate menu labels.
795         Also adjust strings slightly.
796
797         * platform/gtk/ContextMenuItemGtk.cpp:
798         (WebCore::ContextMenuItem::createNativeMenuItem):
799         * platform/gtk/LocalizedStringsGtk.cpp:
800         (WebCore::searchableIndexIntroduction):
801         (WebCore::fileButtonChooseFileLabel):
802         (WebCore::fileButtonNoFileSelectedLabel):
803         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
804         (WebCore::contextMenuItemTagDownloadLinkToDisk):
805         (WebCore::contextMenuItemTagCopyLinkToClipboard):
806         (WebCore::contextMenuItemTagOpenImageInNewWindow):
807         (WebCore::contextMenuItemTagDownloadImageToDisk):
808         (WebCore::contextMenuItemTagCopyImageToClipboard):
809         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
810         (WebCore::contextMenuItemTagCopy):
811         (WebCore::contextMenuItemTagGoBack):
812         (WebCore::contextMenuItemTagGoForward):
813         (WebCore::contextMenuItemTagStop):
814         (WebCore::contextMenuItemTagReload):
815         (WebCore::contextMenuItemTagCut):
816         (WebCore::contextMenuItemTagPaste):
817         (WebCore::contextMenuItemTagIgnoreSpelling):
818         (WebCore::contextMenuItemTagLearnSpelling):
819         (WebCore::contextMenuItemTagSearchWeb):
820         (WebCore::contextMenuItemTagLookUpInDictionary):
821         (WebCore::contextMenuItemTagOpenLink):
822         (WebCore::contextMenuItemTagIgnoreGrammar):
823         (WebCore::contextMenuItemTagSpellingMenu):
824         (WebCore::contextMenuItemTagShowSpellingPanel):
825         (WebCore::contextMenuItemTagCheckSpelling):
826         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
827         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
828         (WebCore::contextMenuItemTagFontMenu):
829         (WebCore::contextMenuItemTagBold):
830         (WebCore::contextMenuItemTagItalic):
831         (WebCore::contextMenuItemTagUnderline):
832         (WebCore::contextMenuItemTagOutline):
833         (WebCore::contextMenuItemTagWritingDirectionMenu):
834         (WebCore::contextMenuItemTagDefaultDirection):
835         (WebCore::contextMenuItemTagLeftToRight):
836         (WebCore::contextMenuItemTagRightToLeft):
837         (WebCore::contextMenuItemTagInspectElement):
838         (WebCore::searchMenuClearRecentSearchesText):
839
840 2008-01-11  Ada Chan  <adachan@apple.com>
841
842         <rdar://problem/5681557> On Windows Safari, mouse events are ignored after clicking on link that triggers download
843         Moved the call to cache page from provisionalLoadStarted() to commitProvisionalLoad(), since 
844         provisionalLoadStarted() can be called for cases that do not result in a page navigation, for example,
845         when a link to download a file has been clicked.
846
847         Reviewed by John and Anders.
848
849         * loader/FrameLoader.cpp:
850         (WebCore::FrameLoader::provisionalLoadStarted):
851         (WebCore::FrameLoader::commitProvisionalLoad):
852
853 2008-01-11  Jon Honeycutt  <jhoneycutt@apple.com>
854
855         Reviewed by Anders.
856
857         <rdar://problem/5683529> plugins/embed-inside-object.html is timing
858         out/failing
859
860         Revert to using FrameTree::find() so that frame aliases like "_self" and
861         "_current" are interpreted properly
862
863         * plugins/win/PluginViewWin.cpp:
864         (WebCore::PluginViewWin::performRequest):
865         (WebCore::PluginViewWin::load):
866
867 2008-01-11  Alp Toker  <alp@atoker.com>
868
869         Reviewed by Dave Hyatt and Mark Rowe.
870
871         http://bugs.webkit.org/show_bug.cgi?id=16089
872         [GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
873
874         Add support for CSS2 @font-face custom/downloadable fonts to the GTK+
875         port.
876
877         * GNUmakefile.am:
878         * WebCore.pro:
879         * loader/CachedFont.cpp:
880         (WebCore::CachedFont::~CachedFont):
881         (WebCore::CachedFont::ensureCustomFontData):
882         (WebCore::CachedFont::platformDataFromCustomData):
883         (WebCore::CachedFont::allReferencesRemoved):
884         * platform/graphics/gtk/FontCustomPlatformData.cpp: Added.
885         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
886         (WebCore::FontCustomPlatformData::fontPlatformData):
887         (WebCore::releaseData):
888         (WebCore::createFontCustomPlatformData):
889         * platform/graphics/gtk/FontCustomPlatformData.h: Added.
890         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
891         * platform/graphics/gtk/FontPlatformData.h:
892         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
893         (WebCore::FontPlatformData::FontPlatformData):
894         (WebCore::FontPlatformData::init):
895         (WebCore::FontPlatformData::isFixedPitch):
896         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
897         (WebCore::SimpleFontData::platformDestroy):
898
899 2008-01-11  Adam Roben  <aroben@apple.com>
900
901         Remove FrameLoader::committedFirstRealDocumentLoad
902         
903         This method no longer has any callers.
904
905         Reviewed by Hyatt.
906
907         * loader/FrameLoader.h:
908
909 2008-01-11  Antti Koivisto  <antti@apple.com>
910
911         Add a standalone version of the blog post video player as a manual test.
912
913         * manual-tests/resources/touch-poster.png: Added.
914         * manual-tests/video-player.html: Added.
915
916 2008-01-10  Antti Koivisto  <antti@apple.com>
917
918         Reviewed by Adam.
919
920         Fix <rdar://problem/5682767>
921         Video does not show up in http://webkit.org/blog/140/html5-media-support/ on Windows
922         
923         Take care that GWorld is created and deletes when needed as size or visibility changes.
924
925         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
926         (WebCore::MediaPlayerPrivate::load):
927         * platform/graphics/win/QTMovieWin.cpp:
928         (QTMovieWinPrivate::QTMovieWinPrivate):
929         (QTMovieWinPrivate::updateGWorld):
930         (QTMovieWinPrivate::setSize):
931         (QTMovieWin::setVisible):
932         (QTMovieWin::initializeQuickTime):
933
934 2008-01-11  David Hyatt  <hyatt@apple.com>
935
936         Fix for bug 11188, setting hspace on a table overrides align=center.  Fix align=center to be done using
937         mapped attributes so that it does not get overridden by hspace all the time.
938
939         Reviewed by mitz
940
941         Added fast/table/table-hspace-align-center.html
942
943         * css/html4.css:
944         * html/HTMLTableElement.cpp:
945         (WebCore::HTMLTableElement::parseMappedAttribute):
946
947 2008-01-11  Mark Rowe  <mrowe@apple.com>
948
949         Qt build fix.
950
951         * platform/qt/TemporaryLinkStubs.cpp: Include CString.h.
952
953 2008-01-11  Mark Rowe  <mrowe@apple.com>
954
955         Qt build fix.  Add link stubs for the new FileSystem.h functions introduced
956         in r29399.
957
958         * platform/qt/TemporaryLinkStubs.cpp:
959         (WebCore::openTemporaryFile):
960
961 2008-01-11  Rodney Dawes  <dobey@wayofthemonkey.com>
962
963         Reviewed by Anders Carlsson.
964
965         Bug 16779: Make the PluginStream implementation be shared across platforms
966         http://bugs.webkit.org/show_bug.cgi?id=16779
967
968         Add the new shared PluginStream files to the GTK+ and Win32 builds.
969         Add PluginStreamClient class for the streamDidFinishLoading method.
970         Add open/close/write methods to FileSystem for temporary file handling.
971         Add PluginDebug.h and npfunctions.h for shared PluginStream.
972         Add shared PluginStream.
973         Remove PluginStreamWin.
974         Update PluginViewWin to use shared PluginStream and PluginStreamClass.
975
976         * GNUmakefile.am:
977         * WebCore.pro:
978         * WebCore.vcproj/WebCore.vcproj:
979         * platform/FileSystem.h:
980         * platform/gtk/FileSystemGtk.cpp:
981         * platform/win/FileSystemWin.cpp:
982         * plugins/PluginDebug.h:
983         * plugins/PluginStream.cpp:
984         * plugins/PluginStream.h:
985         * plugins/npfunctions.h:
986         * plugins/win/PluginDebug: Moved to PluginDebug.h.
987         * plugins/win/PluginStreamWin.cpp: Moved to PluginStream.cpp.
988         * plugins/win/PluginStreamWin.h: Moved to PluginStream.h
989         * plugins/win/PluginViewWin.cpp:
990         * plugins/win/PluginViewWin.h:
991         * plugins/win/npfunctions.h: Moved to npfunctions.h
992
993 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
994
995         Try to fix Mac build: Edit the right .exp file.
996
997         * WebCore.base.exp:
998
999 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1000
1001         Try to fix Qt build: don't use pthreads if they're not available.
1002
1003         * bindings/js/GCController.cpp:
1004
1005 2008-01-10  Geoffrey Garen  <ggaren@apple.com>
1006
1007         Reviewed by John Sullivan.
1008
1009         Fixed some world leak reports:
1010         * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
1011         Interpreter after running cvs-base suite
1012
1013         * <rdar://problem/5669423> PLT complains about world leak if browser
1014         window is open when PLT starts
1015         
1016         These were both bugs in the reporting mechanism, so I took the
1017         opportunity to do some house cleaning there.
1018
1019         Stupid class, I kill you:
1020         * bridge/JavaScriptStatistics.cpp: Removed.
1021         * bridge/JavaScriptStatistics.h: Removed.
1022
1023         * bindings/js/GCController.h: Adopted the only useful features of
1024         JavaScriptStatistics, since they were GC-related.
1025         * bindings/js/GCController.cpp:
1026
1027 2008-01-10  Eric Seidel  <eric@webkit.org>
1028
1029         Reviewed by Adele.
1030
1031         No functional changes, only code cleanup.
1032
1033         * css/MediaQueryEvaluator.cpp:
1034         (WebCore::compareValue): renamed from cmpvalue
1035         (WebCore::colorMediaFeatureEval):
1036         (WebCore::device_aspect_ratioMediaFeatureEval):
1037         (WebCore::device_pixel_ratioMediaFeatureEval):
1038         (WebCore::gridMediaFeatureEval):
1039         (WebCore::device_heightMediaFeatureEval):
1040         (WebCore::device_widthMediaFeatureEval):
1041         (WebCore::heightMediaFeatureEval):
1042         (WebCore::widthMediaFeatureEval):
1043
1044 2008-01-10  Dan Bernstein  <mitz@apple.com>
1045
1046         Reviewed by Anders Carlsson.
1047
1048         - fix a crash when calling alert() from a repeating timer
1049
1050         On non-Mac platforms, the PageGroupLoadDeferrer pauses DOM timers during
1051         alert() and other similar functions, which deletes the actual
1052         DOMWindowTimer objects and replaces them with new objects when resuming.
1053
1054         * bindings/js/kjs_window.cpp:
1055         (KJS::Window::timerFired): Re-fetch the timer object from the map in
1056         case it has been deleted or replaced.
1057
1058 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
1059
1060         Reviewed by Sam.
1061
1062         - remove SecurityOriginData and fold its functionality into SecurityOrigin
1063
1064         * GNUmakefile.am:
1065         * WebCore.base.exp:
1066         * WebCore.pro:
1067         * WebCore.vcproj/WebCore.vcproj:
1068         * WebCore.xcodeproj/project.pbxproj:
1069         * WebCoreSources.bkl:
1070         * bindings/js/JSDOMWindowCustom.cpp:
1071         (WebCore::JSDOMWindow::postMessage):
1072         * dom/Document.cpp:
1073         (WebCore::Document::domain):
1074         * page/Chrome.cpp:
1075         (WebCore::Chrome::requestQuotaIncreaseForNewDatabase):
1076         (WebCore::Chrome::requestQuotaIncreaseForDatabaseOperation):
1077         * page/Chrome.h:
1078         * page/ChromeClient.h:
1079         * platform/SecurityOrigin.cpp:
1080         (WebCore::SecurityOrigin::copy):
1081         (WebCore::SecurityOrigin::createFromIdentifier):
1082         (WebCore::SecurityOrigin::stringIdentifier):
1083         * platform/SecurityOrigin.h:
1084         (WebCore::SecurityOrigin::host):
1085         (WebCore::SecurityOrigin::protocol):
1086         (WebCore::SecurityOrigin::port):
1087         (WebCore::SecurityOrigin::equal):
1088         * platform/SecurityOriginData.cpp: Removed.
1089         * platform/SecurityOriginData.h: Removed.
1090         * storage/Database.cpp:
1091         (WebCore::Database::openDatabase):
1092         (WebCore::Database::Database):
1093         (WebCore::Database::securityOriginCopy):
1094         * storage/Database.h:
1095         * storage/DatabaseTracker.cpp:
1096         (WebCore::SecurityOriginHash::hash):
1097         (WebCore::SecurityOriginHash::equal):
1098         (WebCore::SecurityOriginTraits::deletedValue):
1099         (WebCore::SecurityOriginTraits::emptyValue):
1100         (WebCore::DatabaseTracker::canEstablishDatabase):
1101         (WebCore::DatabaseTracker::hasEntryForOrigin):
1102         (WebCore::DatabaseTracker::hasEntryForDatabase):
1103         (WebCore::DatabaseTracker::establishEntryForOrigin):
1104         (WebCore::DatabaseTracker::fullPathForDatabase):
1105         (WebCore::DatabaseTracker::populateOrigins):
1106         (WebCore::DatabaseTracker::origins):
1107         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1108         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1109         (WebCore::DatabaseTracker::setDatabaseDetails):
1110         (WebCore::DatabaseTracker::usageForDatabase):
1111         (WebCore::DatabaseTracker::usageForOrigin):
1112         (WebCore::DatabaseTracker::quotaForOrigin):
1113         (WebCore::DatabaseTracker::setQuota):
1114         (WebCore::DatabaseTracker::addDatabase):
1115         (WebCore::DatabaseTracker::deleteAllDatabases):
1116         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
1117         (WebCore::DatabaseTracker::deleteDatabase):
1118         (WebCore::DatabaseTracker::deleteDatabaseFile):
1119         (WebCore::notificationQueue):
1120         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1121         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1122         * storage/DatabaseTracker.h:
1123         * storage/DatabaseTrackerClient.h:
1124         * storage/SQLTransaction.cpp:
1125         (WebCore::SQLTransaction::openTransactionAndPreflight):
1126         (WebCore::SQLTransaction::runStatements):
1127         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
1128         (WebCore::SQLTransaction::postflightAndCommit):
1129         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1130         * svg/graphics/SVGImageEmptyClients.h:
1131         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForNewDatabase):
1132         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForDatabaseOperation):
1133
1134 2008-01-10  Anders Carlsson  <andersca@apple.com>
1135
1136         Reviewed by Sam.
1137
1138         Use the correct frame loader load method. Using the old method would not cause a 
1139         new window to be open if the frame navigation was not allowed.
1140         
1141         * plugins/win/PluginViewWin.cpp:
1142         (WebCore::PluginViewWin::performRequest):
1143
1144 2008-01-10  Alp Toker  <alp@atoker.com>
1145
1146         SVG font build fix for GTK+/autotools.
1147
1148         * GNUmakefile.am:
1149
1150 2008-01-10  Adam Barth  <hk9565@gmail.com>
1151
1152         Reviewed by Sam Weinig and Anders Carlsson.
1153
1154         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
1155         <rdar://problem/5657355>
1156
1157         This patch makes two changes:
1158
1159         1) Java calls FrameLoader::load in a slightly different way than
1160            JavaScript, which previously let a malicious web site bypass the
1161            shouldAllowNavigation check.  This patch adds that check to that
1162            code path.
1163
1164         2) FrameLoader now wraps calls to m_frame->tree()->find(name) with
1165            findFrameForNavigation, which calls shouldAllowNavigation.  This
1166            treats disallowed frame navigations as if the named frame did not
1167            exist, resulting in a popup window when appropriate.
1168
1169         Tests: http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html
1170                http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html
1171
1172         * WebCore.base.exp:
1173         * bindings/js/kjs_window.cpp:
1174         (KJS::WindowProtoFuncOpen::callAsFunction):
1175         * loader/FrameLoader.cpp:
1176         (WebCore::FrameLoader::createWindow):
1177         (WebCore::FrameLoader::load):
1178         (WebCore::FrameLoader::post):
1179         (WebCore::FrameLoader::findFrameForNavigation):
1180         * loader/FrameLoader.h:
1181
1182 2008-01-10  John Sullivan  <sullivan@apple.com>
1183
1184         Written by Hyatt, reviewed by me
1185         
1186         - fixed <rdar://problem/5654297> Mail crashes occurs at WebCore::FontFallbackList::fontDataAt() when attempting to display 
1187           a <video> element that uses controls attribute
1188
1189         * rendering/MediaControlElements.cpp:
1190         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
1191         force the render style to inherit from the media element's style; Hyatt filed 5682383 to cover cleaning
1192         up this architecture, but this one-line fix will prevent the crash in the meantime
1193
1194 2008-01-10  Ada Chan  <adachan@apple.com>
1195
1196         Fix fast/forms/input-radio-checked-tab.html
1197         Meta key is not the same as Alt key on windows.
1198
1199         Reviewed by Darin.
1200
1201         * platform/win/KeyEventWin.cpp:
1202         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1203
1204 2008-01-10  Anders Carlsson  <andersca@apple.com>
1205
1206         Reviewed by Jon.
1207
1208         Fix an assert that would happen when a plug-in tries to load a URL while a provisional load is going.
1209         
1210         * plugins/win/PluginViewWin.cpp:
1211         (WebCore::PluginViewWin::performRequest):
1212         Move document loader check here since we don't start loading until here and a new document load could have started in the meantime.
1213         
1214         (WebCore::PluginViewWin::requestTimerFired):
1215         Don't leak the plugin requests.
1216         
1217         (WebCore::PluginViewWin::load):
1218
1219 2008-01-10  Anders Carlsson  <andersca@apple.com>
1220
1221         Reviewed by John Sullivan.
1222
1223         <rdar://problem/5455889>
1224         REGRESSION: BumperCar crashes when attempting to load a long invalid URL
1225         
1226         Make sure to call FrameLoader::receivedMainResourceError before calling
1227         FrameLoader::didFailToLoad. The call to receivedMainResourceError takes care of
1228         clearing out the provisional document loader so that we won't call the didFail
1229         ResourceLoadDelegate method twice. This also makes us call the FrameLoadDelegate method
1230         didFailPrivisionalLoad before calling the ResourceLoadDelegate method, which Safari 2.0 does.
1231         
1232         * loader/MainResourceLoader.cpp:
1233         (WebCore::MainResourceLoader::receivedError):
1234
1235 2008-01-10  Antti Koivisto  <antti@apple.com>
1236
1237         Reviewed by Adele.
1238
1239         Fix <rdar://problem/5658048>
1240         After <video> has finished playing, dragging the scroller on different location of controller starts to play movie
1241         
1242         - Move to paused state if the playback had ended and the controller is used to seek to earlier time
1243         - Pause video playback during drag so the knob does not constantly try to escape from the mouse pointer
1244
1245         * html/HTMLMediaElement.cpp:
1246         (WebCore::HTMLMediaElement::HTMLMediaElement):
1247         (WebCore::HTMLMediaElement::updateMediaPlayer):
1248         (WebCore::HTMLMediaElement::setPausedInternal):
1249         * html/HTMLMediaElement.h:
1250         * rendering/MediaControlElements.cpp:
1251         (WebCore::MediaControlTimelineElement::defaultEventHandler):
1252
1253 2008-01-10  Alexey Proskuryakov  <ap@webkit.org>
1254
1255         Reviewed by Adam Roben.
1256
1257         <rdar://problem/5667003> fast/dom/xmlhttprequest-html-response-encoding.html is failing
1258
1259         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Do not disable sniffing for file://
1260         requests, as CFNetwork doesn't perform extension to MIME type mapping then.
1261
1262 2008-01-10  Adam Roben  <aroben@apple.com>
1263
1264         Fixes to allow multiple FrameViews on Windows
1265
1266         Reviewed by Hyatt.
1267
1268         * page/FrameView.cpp:
1269         (WebCore::FrameView::FrameView): Added a new constructor that takes an
1270         IntSize to specify the FrameView's initial size.
1271         (WebCore::FrameView::scheduleRelayout): Added an assertion that our
1272         Document is not in the page cache.
1273         * page/FrameView.h:
1274         * platform/gtk/WidgetGtk.cpp:
1275         (WebCore::Widget::~Widget): Add a warm, fuzzy ASSERT.
1276         * platform/qt/WidgetQt.cpp:
1277         (WebCore::Widget::~Widget): Ditto.
1278         * rendering/RenderWidget.cpp:
1279         (WebCore::RenderWidget::setWidget): Make sure to remove any existing
1280         Widget from the Widget hierarchy before deleting it. One instance
1281         where this is needed is when setWidget is called during FrameView
1282         creation on Windows.
1283
1284 2008-01-10  Alp Toker  <alp@atoker.com>
1285
1286         Include math.h to get ceilf(). Part of the SVG font GTK+ build fix.
1287
1288         * svg/SVGFontFaceElement.cpp:
1289
1290 2008-01-10  Justin Garcia  <justin.garcia@apple.com>
1291
1292         Reviewed by Alice Liu.
1293
1294         <rdar://problem/5658603> Crash in InsertNodeBefore::doUnapply() on Undo in Yahoo Mail
1295         <rdar://problem/5658709> Crash in RenderView::setSelection on Undo in Yahoo Mail
1296         
1297         Make sure we have an updated layout before we perform any editing work.
1298
1299         * editing/EditCommand.cpp:
1300         (WebCore::EditCommand::apply):
1301         (WebCore::EditCommand::unapply):
1302         (WebCore::EditCommand::reapply):
1303
1304 2008-01-10  Luca Bruno  <lethalman88@gmail.com>
1305
1306         Reviewed by Alp Toker.
1307
1308         Back out r29206 which was causing regressions in curl http job
1309         cancellation.
1310
1311         * platform/network/curl/ResourceHandleManager.cpp
1312         (ResourceHandleManager::cancel): 
1313
1314 2008-01-10  Kevin McCullough  <kmccullough@apple.com>
1315
1316         Reviewed by Darin, Sam, and Adam.
1317
1318         - <rdar://problem/5654486> REGRESSION (Safari 3.0.4-TOT): clicking on
1319         - link in gmail message displays JavaScript alert falsely complaining
1320         about pop-up blocking
1321         - When trying to open a new window, we now see if the user gesture 
1322         occurred in the global dynamic object instead of the frame since that is
1323         the only place an event can occur. 
1324
1325         * bindings/js/kjs_window.cpp: - Check the dynamic global object instead
1326         of the frame.
1327         (KJS::allowPopUp):
1328         (KJS::showModalDialog):
1329         (KJS::WindowProtoFuncOpen::callAsFunction):
1330
1331 2008-01-10  David Hyatt  <hyatt@apple.com>
1332
1333         Fix for bug 16247, visibility:hidden not honored when hit testing inline replaced elements.
1334
1335         Reviewed by adele
1336
1337         Added fast/css/visibility-hit-test.html test case.
1338
1339         * rendering/RenderBox.cpp:
1340         (WebCore::RenderBox::nodeAtPoint):
1341
1342 2008-01-10  Lars Knoll  <lars@trolltech.com>
1343
1344         Reviewed by Simon.
1345
1346         rename QWebPageHistory to QWebHistory.
1347
1348         * WebCore.pro:
1349
1350 2008-01-10  Lars Knoll  <lars@trolltech.com>
1351
1352         Reviewed by Simon.
1353
1354         fix the drawing errors that where introduced due to refactoring.
1355
1356         Correctly clip to the rectangle we want to draw in ScrollView::paint().
1357
1358         * platform/qt/ScrollViewQt.cpp:
1359         (WebCore::ScrollView::paint):
1360
1361 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
1362
1363         Reviewed by Lars.
1364
1365         Temporarily disable gzip decompression in qhttp due to a bug.
1366
1367         * platform/network/qt/QNetworkReplyHandler.cpp:
1368         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1369
1370 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
1371
1372         Reviewed by Lars.
1373
1374         http://bugs.webkit.org/show_bug.cgi?id=16588
1375
1376         Added a (last) Frame argument to ResourceHandle::loadResourceSynchronously.
1377         This allows implementing the synchronous loading correctly for the Qt port where the networking
1378         backend is bound to the page.
1379
1380         * loader/FrameLoader.cpp:
1381         (WebCore::FrameLoader::loadResourceSynchronously):
1382         * platform/network/ResourceHandle.h:
1383         * platform/network/cf/ResourceHandleCFNet.cpp:
1384         * platform/network/curl/ResourceHandleCurl.cpp:
1385         * platform/network/mac/ResourceHandleMac.mm:
1386         * platform/network/qt/ResourceHandleQt.cpp:
1387         (WebCore::ResourceHandle::loadResourceSynchronously):
1388
1389 2008-01-10  Kevin Ollivier  <kevino@theolliviers.com>
1390
1391         wx build fix for changes in r29328
1392
1393         * WebCoreSources.bkl:
1394
1395 2008-01-09  Maciej Stachowiak  <mjs@apple.com>
1396
1397         Reviewed by Sam.
1398
1399         - refactor SecurityOrigin in preparation for merging with SecurityOriginData
1400
1401         * platform/SecurityOrigin.cpp:
1402         (WebCore::SecurityOrigin::SecurityOrigin):
1403         (WebCore::SecurityOrigin::create):
1404         (WebCore::SecurityOrigin::createForFrame):
1405         * platform/SecurityOrigin.h:
1406
1407 2008-01-09  Ada Chan  <adachan@apple.com>
1408
1409         Tabs with ctrl, meta, or altgraph modifier key down should not advance focus.
1410
1411         Reviewed by Darin.
1412
1413         Test: fast/forms/tabs-with-modifiers.html
1414
1415         * page/EventHandler.cpp:
1416         (WebCore::EventHandler::defaultKeyboardEventHandler):
1417         (WebCore::EventHandler::defaultTabEventHandler): bail if ctrl, meta, or altgraph key is down.  
1418         Clean up the code a bit.
1419         * page/EventHandler.h:
1420         * page/FocusController.cpp: Remove the advanceFocus() that takes in a KeyboardEvent.  It was
1421         only called in EventHandler::defaultTabEventHandler() but we have cleaned up the code there and
1422         no longer needs it.
1423         * page/FocusController.h:
1424
1425 2008-01-09  Antti Koivisto  <antti@apple.com>
1426
1427         Reviewed by Mitz.
1428
1429         Fix http://bugs.webkit.org/show_bug.cgi?id=16376
1430         <rdar://problem/5665206>
1431         <video> element fails to play frames when navigating back to page (16376)
1432         
1433         Don't make MediaPlayer visible when it is actually in page cache.
1434
1435         * rendering/RenderVideo.cpp:
1436         (WebCore::RenderVideo::updatePlayer):
1437
1438 2008-01-09  Anders Carlsson  <andersca@apple.com>
1439
1440         Reviewed by Darin.
1441
1442         <rdar://problem/5532361> 
1443         CrashTracer: 9840 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance [in-charge deleting] + 35
1444         
1445         Clear the frame's plugin root objects so that they don't outlive the plugin bundle.
1446         
1447         * page/Frame.cpp:
1448         (WebCore::Frame::pageDestroyed):
1449
1450 2008-01-09  John Sullivan  <sullivan@apple.com>
1451
1452         Reviewed by Adam Roben and Anders Carlsson
1453         
1454         - fixed <rdar://problem/5469398> Repro assertion failure in context menu code due to 
1455           missing-but-expected Reload item
1456
1457         * platform/ContextMenu.cpp:
1458         (WebCore::ContextMenu::populate):
1459         use isLoadingInAPISense when deciding whether to include Stop or Reload in context
1460         menu, to match the WebKit API
1461
1462 2008-01-09  Mark Rowe  <mrowe@apple.com>
1463
1464         Fix Windows debug build for opensource developers.
1465
1466         * WebCore.vcproj/QTMovieWin.vcproj: Use the correct library suffix.
1467
1468 2007-10-01  Allan Sandfeld Jensen  <sandfeld@kde.org>
1469
1470         Reworked by Eric, Reviewed by Hyatt.
1471
1472         - fix http://bugs.webkit.org/show_bug.cgi?id=9454
1473         Add support for :lang inheritance and xml:lang support.
1474
1475         Tests: fast/selectors/lang-inheritance.html
1476                fast/selectors/lang-inheritance2.html
1477                fast/selectors/lang-vs-xml-lang.html
1478                fast/selectors/lang-vs-xml-lang-xhtml.xhtml
1479
1480         * css/CSSStyleSelector.cpp:
1481         (WebCore::CSSStyleSelector::canShareStyleWithElement): Do not share style between elements with
1482         different LANG-attribute.
1483         (WebCore::CSSStyleSelector::checkOneSelector): Change :lang() to recursively check the LANG attribute
1484         for all the elements parents and the content-language of the document.
1485         * dom/Document.cpp:
1486         (WebCore::Document::processHttpEquiv): Parse MIME Content-Language
1487         * dom/Document.h:
1488         (WebCore::Document::contentLanguage):
1489         (WebCore::Document::setContentLanguage):
1490
1491 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1492
1493         Reviewed by Brady.
1494
1495         Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
1496         http://bugs.webkit.org/show_bug.cgi?id=16678
1497
1498         Add a NULL check for controller before calling JSObjectSetPrivate.
1499
1500         * page/InspectorController.cpp:
1501         (WebCore::InspectorController::~InspectorController):
1502
1503 2008-01-08  Xan Lopez  <xan@gnome.org>
1504
1505         Reviewed by Alp Toker.
1506
1507         http://bugs.webkit.org/show_bug.cgi?id=15610
1508         [GTK] Text rendering using Pango
1509
1510         Use Pango to render Complex path text.
1511
1512         * platform/graphics/gtk/FontGtk.cpp:
1513         (WebCore::utf16_to_utf8):
1514         (WebCore::convertUniCharToUTF8):
1515         (WebCore::setPangoAttributes):
1516         (WebCore::Font::drawGlyphs):
1517         (WebCore::Font::drawComplexText):
1518         (WebCore::Font::floatWidthForComplexText):
1519         (WebCore::Font::offsetForPositionForComplexText):
1520
1521 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1522
1523         Reviewed by Darin Adler.
1524
1525         <rdar://problem/5665860> With the web inspector displayed, a crash occurs
1526         at WebCore::Frame::document() when navigating back to previous page
1527
1528         This fixes the crash, but the inspector was totally broken with back/forward.
1529         So this also fixes back/forward navigation so the right main resource shows
1530         up in the inspector.
1531
1532         * page/InspectorController.cpp:
1533         (WebCore::addSourceToFrame): Add some null checks for the frame when
1534         getting the textEncoding. This was the crash.
1535         (WebCore::InspectorController::addScriptResource): Create a script object
1536         only if needed, and always add it by calling addResource.
1537         (WebCore::InspectorController::didCommitLoad): Check if the loader is 
1538         loading from the page cache, and clear m_mainResource. If the load is
1539         normal, then call addAndUpdateScriptResource with the main resource. 
1540         (WebCore::InspectorController::identifierForInitialRequest): If the load
1541         is from the page cache and the resource is the main resource call
1542         addAndUpdateScriptResource since didCommitLoad did not do it.
1543
1544 2008-01-08  Alp Toker  <alp@atoker.com>
1545
1546         Back out VIDEO by default in the GTK+ qmake build. The build bot
1547         doesn't have the necessary libraries installed.
1548
1549         * WebCore.pro:
1550
1551 2008-01-08  Alp Toker  <alp@atoker.com>
1552
1553         Win build fix for breakage introduced in r29328.
1554
1555         * WebCore.vcproj/WebCore.vcproj:
1556
1557 2008-01-08  Alp Toker  <alp@atoker.com>
1558
1559         Rubber-stamped by Mark Rowe.
1560
1561         Enable VIDEO by default in the GTK+ qmake build.
1562
1563         * WebCore.pro:
1564
1565 2008-01-08  Alp Toker  <alp@atoker.com>
1566
1567         GTK+ VIDEO build fix for breakage introduced in r29328.
1568
1569         Issue noticed by Ori_B.
1570
1571         * GNUmakefile.am:
1572         * WebCore.pro:
1573
1574 2008-01-08  Antti Koivisto  <antti@apple.com>
1575
1576         Reviewed by Darin.
1577         
1578         HTMLAudioElement needs generated constructor. Otherwise video instanceof HTMLAudioElement is true which is 
1579         bit strange.
1580         
1581         Renamed custom constructor JSHTMLAudioElementConstructor to JSAudioConstructor to avoid name clashes.
1582
1583         Test: media/constructors.html
1584
1585         * ChangeLog:
1586         * WebCore.xcodeproj/project.pbxproj:
1587         * bindings/js/JSAudioConstructor.cpp: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.cpp.
1588         (WebCore::JSAudioConstructor::JSAudioConstructor):
1589         (WebCore::JSAudioConstructor::implementsConstruct):
1590         (WebCore::JSAudioConstructor::construct):
1591         * bindings/js/JSAudioConstructor.h: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.h.
1592         * bindings/js/JSHTMLAudioElementConstructor.cpp: Removed.
1593         * bindings/js/JSHTMLAudioElementConstructor.h: Removed.
1594         * bindings/js/kjs_window.cpp:
1595         (KJS::Window::getValueProperty):
1596         * html/HTMLAudioElement.idl:
1597
1598 2008-01-08  Anders Carlsson  <andersca@apple.com>
1599
1600         Reviewed by Mitz.
1601
1602         Don't add the applet widget to the view, that's done later by RenderApplet.
1603             
1604         * loader/FrameLoader.cpp:
1605         (WebCore::FrameLoader::createJavaAppletWidget):
1606
1607 2008-01-08  Antti Koivisto  <antti@apple.com>
1608
1609         Reviewed by Weinig.
1610         
1611         Add security check for Audio constructor.
1612
1613         * bindings/js/kjs_window.cpp:
1614         (KJS::Window::getValueProperty):
1615
1616 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1617
1618         Reviewed by Adam Roben.
1619
1620         <rdar://problem/5676515> List of scripts and images missing when opening Web Inspector from new window (16567)
1621
1622         InspectorController::didLoadResourceFromMemoryCache was not being called for
1623         resources that loaded from the memory cache that the FrameLoader's client
1624         has already been notified about. This fix always calls the InspectorController
1625         when loading a memory cached resource. No test possible for the Web Inspector.
1626
1627         * loader/DocLoader.cpp:
1628         (WebCore::DocLoader::checkCacheObjectStatus): Moved most of the logic to
1629         FrameLoader::loadedResourceFromMemoryCache so the InspectorController can always be notified.
1630         * loader/FrameLoader.cpp:
1631         (WebCore::FrameLoader::didTellClientAboutLoad): Renamed from didTellBridgeAboutLoad.
1632         (WebCore::FrameLoader::haveToldClientAboutLoad): Renamed from haveToldBridgeAboutLoad.
1633         (WebCore::FrameLoader::loadResourceSynchronously): Call the renamed didTellClientAboutLoad.
1634         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Only takes a CachedResource now.
1635         Always call InspectorController. If the resource's sendResourceLoadCallbacks is false or
1636         didTellClientAboutLoad is true, do an early return. Otherwise call the client and call
1637         didTellClientAboutLoad.
1638         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Removed, work now done
1639         in FrameLoader::loadedResourceFromMemoryCache.
1640         * loader/FrameLoader.h: Renamed {didTell,haveTold}BridgeAboutLoad to {didTell,haveTold}ClientAboutLoad.
1641         Made loadedResourceFromMemoryCache only take a CachedResource. Renamed m_urlsBridgeKnowsAbout to 
1642         m_urlsClientKnowsAbout.
1643         * loader/SubresourceLoader.cpp:
1644         (WebCore::SubresourceLoader::load): Call the renamed didTellClientAboutLoad.
1645
1646 2008-01-08  Dan Bernstein  <mitz@apple.com>
1647
1648         Rubber-stamped by Sam Weinig.
1649
1650         - prefix all member variables in CSSStyleSelector with m_
1651
1652         * css/CSSStyleSelector.cpp:
1653         (WebCore::CSSStyleSelector::CSSStyleSelector):
1654         (WebCore::CSSStyleSelector::init):
1655         (WebCore::CSSStyleSelector::setEncodedURL):
1656         (WebCore::CSSStyleSelector::loadDefaultStyle):
1657         (WebCore::CSSStyleSelector::matchRules):
1658         (WebCore::CSSStyleSelector::matchRulesForList):
1659         (WebCore::CSSStyleSelector::initElementAndPseudoState):
1660         (WebCore::CSSStyleSelector::initForStyleResolve):
1661         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1662         (WebCore::CSSStyleSelector::locateSharedStyle):
1663         (WebCore::CSSStyleSelector::matchUARules):
1664         (WebCore::CSSStyleSelector::styleForElement):
1665         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1666         (WebCore::CSSStyleSelector::updateFont):
1667         (WebCore::CSSStyleSelector::cacheBorderAndBackground):
1668         (WebCore::CSSStyleSelector::checkSelector):
1669         (WebCore::CSSStyleSelector::checkOneSelector):
1670         (WebCore::CSSStyleSelector::applyProperty):
1671         (WebCore::CSSStyleSelector::mapBackgroundImage):
1672         (WebCore::CSSStyleSelector::mapBackgroundSize):
1673         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
1674         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
1675         (WebCore::CSSStyleSelector::checkForTextSizeAdjust):
1676         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
1677         * css/CSSStyleSelector.h:
1678         (WebCore::CSSStyleSelector::):
1679         (WebCore::CSSRuleData::CSSRuleData):
1680         (WebCore::CSSRuleDataList::CSSRuleDataList):
1681         (WebCore::CSSRuleDataList::append):
1682         * css/SVGCSSStyleSelector.cpp:
1683         (WebCore::CSSStyleSelector::applySVGProperty):
1684         * rendering/RenderStyle.cpp:
1685         (WebCore::RenderStyle::isStyleAvailable):
1686
1687 2008-01-08  David D. Kilzer  <ddkilzer@apple.com>
1688
1689         Removed unnecessary files from Copy Bundle Resources build phase.
1690
1691         Reviewed by Sam.
1692
1693         * WebCore.xcodeproj/project.pbxproj: Files removed from build phase:
1694         DOMCoreException.idl
1695         EventException.idl
1696         MessageEvent.idl
1697         SVGAElement.idl
1698         SVGAngle.idl
1699         SVGAnimateColorElement.idl
1700         SVGAnimateElement.idl
1701         SVGAnimateTransformElement.idl
1702         SVGAnimatedAngle.idl
1703         SVGAnimatedBoolean.idl
1704         SVGAnimatedEnumeration.idl
1705         SVGAnimatedInteger.idl
1706         SVGAnimatedLength.idl
1707         SVGAnimatedLengthList.idl
1708         SVGAnimatedNumber.idl
1709         SVGAnimatedNumberList.idl
1710         SVGAnimatedPathData.idl
1711         SVGAnimatedPoints.idl
1712         SVGAnimatedPreserveAspectRatio.idl
1713         SVGAnimatedRect.idl
1714         SVGAnimatedString.idl
1715         SVGAnimatedTransformList.idl
1716         SVGAnimationElement.idl
1717         SVGCSSPropertyNames.in
1718         SVGCSSValueKeywords.in
1719         SVGCircleElement.idl
1720         SVGClipPathElement.idl
1721         SVGColor.idl
1722         SVGComponentTransferFunctionElement.idl
1723         SVGCursorElement.idl
1724         SVGDefinitionSrcElement.idl
1725         SVGDefsElement.idl
1726         SVGDescElement.idl
1727         SVGDocument.idl
1728         SVGElement.idl
1729         SVGElementInstance.idl
1730         SVGElementInstanceList.idl
1731         SVGEllipseElement.idl
1732         SVGException.idl
1733         SVGExternalResourcesRequired.idl
1734         SVGFEBlendElement.idl
1735         SVGFEColorMatrixElement.idl
1736         SVGFEComponentTransferElement.idl
1737         SVGFECompositeElement.idl
1738         SVGFEDiffuseLightingElement.idl
1739         SVGFEDisplacementMapElement.idl
1740         SVGFEDistantLightElement.idl
1741         SVGFEFloodElement.idl
1742         SVGFEFuncAElement.idl
1743         SVGFEFuncBElement.idl
1744         SVGFEFuncGElement.idl
1745         SVGFEFuncRElement.idl
1746         SVGFEGaussianBlurElement.idl
1747         SVGFEImageElement.idl
1748         SVGFEMergeElement.idl
1749         SVGFEMergeNodeElement.idl
1750         SVGFEOffsetElement.idl
1751         SVGFEPointLightElement.idl
1752         SVGFESpecularLightingElement.idl
1753         SVGFESpotLightElement.idl
1754         SVGFETileElement.idl
1755         SVGFETurbulenceElement.idl
1756         SVGFilterElement.idl
1757         SVGFilterPrimitiveStandardAttributes.idl
1758         SVGFitToViewBox.idl
1759         SVGFontElement.idl
1760         SVGFontFaceElement.idl
1761         SVGFontFaceFormatElement.idl
1762         SVGFontFaceNameElement.idl
1763         SVGFontFaceSrcElement.idl
1764         SVGFontFaceUriElement.idl
1765         SVGForeignObjectElement.idl
1766         SVGGElement.idl
1767         SVGGlyphElement.idl
1768         SVGGradientElement.idl
1769         SVGImageElement.idl
1770         SVGLangSpace.idl
1771         SVGLength.idl
1772         SVGLengthList.idl
1773         SVGLineElement.idl
1774         SVGLinearGradientElement.idl
1775         SVGLocatable.idl
1776         SVGMarkerElement.idl
1777         SVGMaskElement.idl
1778         SVGMatrix.idl
1779         SVGMetadataElement.idl
1780         SVGMissingGlyphElement.idl
1781         SVGNumber.idl
1782         SVGNumberList.idl
1783         SVGPaint.idl
1784         SVGPathElement.idl
1785         SVGPathSeg.idl
1786         SVGPathSegArcAbs.idl
1787         SVGPathSegArcRel.idl
1788         SVGPathSegClosePath.idl
1789         SVGPathSegCurvetoCubicAbs.idl
1790         SVGPathSegCurvetoCubicRel.idl
1791         SVGPathSegCurvetoCubicSmoothAbs.idl
1792         SVGPathSegCurvetoCubicSmoothRel.idl
1793         SVGPathSegCurvetoQuadraticAbs.idl
1794         SVGPathSegCurvetoQuadraticRel.idl
1795         SVGPathSegCurvetoQuadraticSmoothAbs.idl
1796         SVGPathSegCurvetoQuadraticSmoothRel.idl
1797         SVGPathSegLinetoAbs.idl
1798         SVGPathSegLinetoHorizontalAbs.idl
1799         SVGPathSegLinetoHorizontalRel.idl
1800         SVGPathSegLinetoRel.idl
1801         SVGPathSegLinetoVerticalAbs.idl
1802         SVGPathSegLinetoVerticalRel.idl
1803         SVGPathSegList.idl
1804         SVGPathSegMovetoAbs.idl
1805         SVGPathSegMovetoRel.idl
1806         SVGPatternElement.idl
1807         SVGPoint.idl
1808         SVGPointList.idl
1809         SVGPolygonElement.idl
1810         SVGPolylineElement.idl
1811         SVGPreserveAspectRatio.idl
1812         SVGRadialGradientElement.idl
1813         SVGRect.idl
1814         SVGRectElement.idl
1815         SVGRenderingIntent.idl
1816         SVGSVGElement.idl
1817         SVGScriptElement.idl
1818         SVGSetElement.idl
1819         SVGStopElement.idl
1820         SVGStringList.idl
1821         SVGStylable.idl
1822         SVGStyleElement.idl
1823         SVGSwitchElement.idl
1824         SVGSymbolElement.idl
1825         SVGTRefElement.idl
1826         SVGTSpanElement.idl
1827         SVGTests.idl
1828         SVGTextContentElement.idl
1829         SVGTextElement.idl
1830         SVGTextPathElement.idl
1831         SVGTextPositioningElement.idl
1832         SVGTitleElement.idl
1833         SVGTransform.idl
1834         SVGTransformList.idl
1835         SVGTransformable.idl
1836         SVGURIReference.idl
1837         SVGUnitTypes.idl
1838         SVGUseElement.idl
1839         SVGViewElement.idl
1840         SVGViewSpec.idl
1841         SVGZoomAndPan.idl
1842         SVGZoomEvent.idl
1843         XMLHttpRequestException.idl
1844         XPathException.idl
1845         character-sets.txt
1846         mac-encodings.txt
1847         make-charset-table.pl
1848         svgattrs.in
1849         svgtags.in
1850         xlinkattrs.in
1851
1852 2008-01-08  Luca Bruno  <lethalman88@gmail.com>
1853
1854         Reviewed by Alp Toker.
1855
1856         Support copying the selected URL to the clipboard.
1857
1858         * platform/gtk/PasteboardGtk.cpp:
1859         (WebCore::Pasteboard::writeURL): implemented
1860
1861 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
1862
1863         Renamed CharacterData::m_str to m_data
1864
1865         Rubber-stamped by Adam again.
1866
1867         No test cases added since there is no change in behavior.
1868
1869         * dom/CDATASection.cpp:
1870         * dom/CharacterData.cpp:
1871         (WebCore::CharacterData::CharacterData):
1872         (WebCore::CharacterData::setData):
1873         (WebCore::CharacterData::substringData):
1874         (WebCore::CharacterData::appendData):
1875         (WebCore::CharacterData::insertData):
1876         (WebCore::CharacterData::deleteData):
1877         (WebCore::CharacterData::replaceData):
1878         (WebCore::CharacterData::nodeValue):
1879         (WebCore::CharacterData::containsOnlyWhitespace):
1880         (WebCore::CharacterData::dispatchModifiedEvent):
1881         (WebCore::CharacterData::checkCharDataOperation):
1882         (WebCore::CharacterData::dump):
1883         * dom/CharacterData.h:
1884         * dom/Comment.cpp:
1885         * dom/Text.cpp:
1886         (WebCore::Text::splitText):
1887         (WebCore::Text::createRenderer):
1888         (WebCore::Text::recalcStyle):
1889
1890 2008-01-08  Steve Falkenburg  <sfalken@apple.com>
1891
1892         Fix a couple of compiler warnings.
1893         
1894         Reviewed by Mitz.
1895
1896         * platform/win/ThreadingWin.cpp:
1897         * platform/win/UniscribeController.cpp: Remove unused function.
1898         (WebCore::UniscribeController::advance): Fix bogus warning about un-initialized variable.
1899
1900 2008-01-08  Adele Peterson  <adele@apple.com>
1901
1902         Reviewed by Darin.
1903
1904         Fix for <rdar://problem/5674667> fast/forms/slider-mouse-events.html is broken by media control checkin 29257
1905
1906         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
1907           After fixing a bug in EventHandler to make sure events always go to the capturing node, this bug was exposed.
1908           MouseMove and MouseUp events were going to the thumb element, but not to the slider input element.  
1909           This change makes the input element the capturing node, and then the input element forwards the mouse events to the thumb element.
1910           I also added a missing call to setDefaultHandled for the mousemove event.
1911
1912 2008-01-08  Adele Peterson  <adele@apple.com>
1913
1914         Reviewed by Adam. 
1915
1916         * rendering/RenderThemeSafari.cpp: Use the SafariTheme version number to decide whether or not to
1917         paint the media controls in RenderThemeSafari.
1918
1919 2008-01-08  Oliver Hunt  <oliver@apple.com>
1920
1921         Reviewed by Adele and John.
1922
1923         Fix <rdar://problem/5652740> Crash occurs at WebCore::Widget::getView() after
1924         dragging file into window that contains web page ( http://www.econocraft.com/flood_arch.htm )
1925
1926         We hit this crash if the page reloads between DragController::dragUpdated
1927         and DragController::performDrag, meaning that m_document starts pointing to
1928         a now viewless document.  This is picked up by an assertion in performDrag
1929         which I have now replaced with an assignment given that the assertion is 
1930         invalid -- it is possible for m_document to be changed between dragUpdated
1931         performDrag
1932
1933         * page/DragController.cpp:
1934         (WebCore::DragController::performDrag):
1935
1936 2008-01-08  Alexey Proskuryakov  <ap@webkit.org>
1937
1938         Reviewed by Darin.
1939
1940         <rdar://problem/5659812> CrashTracer: 462 crashes in Safari at com.apple.WebCore:
1941         WebCore::Node::setChanged + 96
1942
1943         Test: fast/dom/cssTarget-crash.html
1944
1945         * dom/Node.cpp: (WebCore::Node::removedFromDocument):
1946         Check to see if the node being removed is currently set as the Document's cssTarget.
1947         If it is, clear the cssTarget to prevent a hanging reference to it.
1948
1949 2008-01-08  Adam Roben  <aroben@apple.com>
1950
1951         * bindings/scripts/CodeGeneratorJS.pm: Touch this so the bindings will
1952         rebuild on Windows now that the media elements are enabled.
1953
1954 2008-01-08  Adam Roben  <aroben@apple.com>
1955
1956         * svg/svgtags.in: Touch this again for the sake of the Windows bots.
1957
1958 2008-01-08  Timothy Hatcher  <timothy@apple.com>
1959
1960         Reviewed by Adam Roben.
1961
1962         Use JSRetainPtr in the Web Inspector everywhere we own a JSStringRef.
1963         Also added some #pragma marks to help find places in the file.
1964
1965         * page/InspectorController.cpp:
1966         (WebCore::callSimpleFunction): Use JSRetainPtr<JSStringRef>.
1967         And return the result of JSObjectCallAsFunction.
1968         (WebCore::search): Use JSRetainPtr<JSStringRef>.
1969         (WebCore::databaseTableNames): Ditto.
1970         (WebCore::localizedStrings): Ditto.
1971         (WebCore::InspectorController::~InspectorController): Ditto.
1972         (WebCore::InspectorController::focusNode): Ditto.
1973         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
1974         (WebCore::InspectorController::scriptObjectReady): Ditto.
1975         (WebCore::addHeaders): Ditto.
1976         (WebCore::InspectorController::addScriptResource): Ditto.
1977         (WebCore::InspectorController::removeScriptResource): Ditto.
1978         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
1979         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
1980         (WebCore::InspectorController::updateScriptResource): Ditto.
1981         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
1982         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
1983         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
1984
1985 2008-01-08  Dan Bernstein  <mitz@apple.com>
1986
1987         Rubber-stamped by Sam Weinig.
1988
1989         - rename FontDataBaseClass.{cpp,h} back to FontData.{cpp,h}
1990
1991         * GNUmakefile.am:
1992         * WebCore.pro:
1993         * WebCore.vcproj/WebCore.vcproj:
1994         * WebCore.xcodeproj/project.pbxproj:
1995         * WebCoreSources.bkl:
1996         * editing/Editor.cpp:
1997         * platform/graphics/FontData.cpp: Copied from WebCore/platform/graphics/FontDataBaseClass.cpp.
1998         * platform/graphics/FontData.h: Copied from WebCore/platform/graphics/FontDataBaseClass.h.
1999         * platform/graphics/FontDataBaseClass.cpp: Removed.
2000         * platform/graphics/FontDataBaseClass.h: Removed.
2001         * platform/graphics/SegmentedFontData.h:
2002         * platform/graphics/SimpleFontData.h:
2003
2004 2008-01-08  Dan Bernstein  <mitz@apple.com>
2005
2006         Fix a Wx build error.
2007
2008         * platform/graphics/wx/GlyphMapWx.cpp:
2009         (WebCore::GlyphPage::fill):
2010
2011 2008-01-08  Dan Bernstein  <mitz@apple.com>
2012
2013         Fix a Qt build error.
2014
2015         * platform/graphics/qt/SimpleFontDataQt.cpp:
2016         (WebCore::SimpleFontData::containsCharacters):
2017         (WebCore::SimpleFontData::fontDataForCharacter):
2018         (WebCore::SimpleFontData::isSegmented):
2019
2020 2008-01-08  Adam Roben  <aroben@apple.com>
2021
2022         Windows build fix.
2023
2024         Touch config.h to force a rebuild (apparently changing preprocessor
2025         definitions in the .vcproj doesn't force a rebuild).
2026
2027         * config.h:
2028
2029 2008-01-08  Dan Bernstein  <mitz@apple.com>
2030
2031         Fix a Wx build failure.
2032
2033         * webcore-wx.bkl:
2034
2035 2008-01-08  Dan Bernstein  <mitz@apple.com>
2036
2037         Fix a Qt build failure.
2038
2039         * WebCore.pro:
2040
2041 2008-01-08  John Sullivan  <sullivan@apple.com>
2042
2043         Reviewed by Adam Roben
2044         
2045         - fixed <rdar://problem/5671668> REGRESSION (r28711-r28730): With caret in an empty form field, 
2046           Delete menu item is enabled but shouldn't be
2047
2048         The enabled logic was incorrect for the Delete menu item. To fix this, I added an EditorCommandSource
2049         parameter to the enabled functions so that they can have parallel logic to the execute functions.
2050
2051         * editing/EditorCommand.cpp:
2052         added EditorCommandSource parameter to isEnabled function prototype
2053         (WebCore::enabled):
2054         added unused EditorCommandSource parameter to these isEnabled functions:
2055         (WebCore::enabledAnySelection):
2056         (WebCore::enabledAnySelectionAndMark):
2057         (WebCore::enableCaretInEditableText):
2058         (WebCore::enabledCopy):
2059         (WebCore::enabledCut):
2060
2061         (WebCore::enabledDelete):
2062         new function, uses logic previously used by Delete command for DOM sources; uses logic in enabledCut
2063         for menu source
2064
2065         added unused EditorCommandSource parameter to these isEnabled functions:
2066         (WebCore::enabledInEditableText):
2067         (WebCore::enabledInRichlyEditableText):
2068         (WebCore::enabledPaste):
2069         (WebCore::enabledRangeInEditableText):
2070         (WebCore::enabledRangeInRichlyEditableText):
2071         (WebCore::enabledRedo):
2072         (WebCore::enabledUndo):
2073         
2074         (WebCore::CommandEntry::):
2075         wire up new enabledDelete function as delete function for Delete command
2076         
2077         (WebCore::Editor::Command::isEnabled):
2078         pass EditorCommandSource parameter to isEnabled function
2079
2080 2008-01-08  Adam Roben  <aroben@apple.com>
2081
2082         Visual C++ Express build fix
2083
2084         * WebCore.vcproj/QTMovieWin.vcproj: Explicitly link against user32.lib
2085         and advapi32.lib. VS implicitly links against these, VC++ Express
2086         doesn't.
2087
2088 2008-01-08  Dan Bernstein  <mitz@apple.com>
2089
2090         - add bug number
2091
2092         * platform/graphics/mac/FontCustomPlatformData.cpp:
2093         (WebCore::createFontCustomPlatformData):
2094
2095 2008-01-08  Dan Bernstein  <mitz@apple.com>
2096
2097         Try to fix the Qt build.
2098
2099         * WebCore.pro:
2100
2101 2008-01-08  Nikolas Zimmermann  <zimmermann@kde.org>
2102
2103         Not reviewed. Try to fix Qt builds after Timothy's inspector changes.
2104
2105         * page/inspector/WebKit.qrc:
2106
2107 2008-01-08  Maciej Stachowiak  <mjs@apple.com>
2108
2109         Reviewed by Mark.
2110
2111         - remove duplicate definition of getElementById from HTMLDocument IDL (and ObjC bindings)
2112
2113         * bindings/objc/PublicDOMInterfaces.h:
2114         * html/HTMLDocument.idl:
2115
2116 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
2117
2118         Renamed CharacterData::str to m_str to match coding style
2119
2120         Rubber-stamped by Adam.
2121
2122         No test cases added since there is no change in behavior.
2123
2124         * dom/CDATASection.cpp:
2125         * dom/CharacterData.cpp:
2126         (WebCore::CharacterData::CharacterData):
2127         (WebCore::CharacterData::setData):
2128         (WebCore::CharacterData::substringData):
2129         (WebCore::CharacterData::appendData):
2130         (WebCore::CharacterData::insertData):
2131         (WebCore::CharacterData::deleteData):
2132         (WebCore::CharacterData::replaceData):
2133         (WebCore::CharacterData::nodeValue):
2134         (WebCore::CharacterData::containsOnlyWhitespace):
2135         (WebCore::CharacterData::dispatchModifiedEvent):
2136         (WebCore::CharacterData::checkCharDataOperation):
2137         (WebCore::CharacterData::dump):
2138         * dom/CharacterData.h:
2139         * dom/Comment.cpp:
2140         * dom/Text.cpp:
2141         (WebCore::Text::splitText):
2142         (WebCore::Text::createRenderer):
2143         (WebCore::Text::recalcStyle):
2144
2145 2008-01-08  Oliver Hunt  <oliver@apple.com>
2146
2147         Set the ENABLE_SVG_FONTS flag in Windows build, now builds, 
2148         I'm not sure if it just caused the right files to regenerate,
2149         or if there's some configuration weirdness in the non-SVG-fonts
2150         build. 
2151
2152         * WebCore.vcproj/WebCore.vcproj:
2153
2154 2008-01-07  Maciej Stachowiak  <mjs@apple.com>
2155
2156         Reviewed by Brady.
2157
2158         - fixed <rdar://problem/5644300> Back/Forward Cache should not include pages with databases
2159         
2160         Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
2161         
2162         * dom/Document.cpp:
2163         (WebCore::Document::Document):
2164         * dom/Document.h:
2165         (WebCore::Document::setHasOpenDatabases):
2166         (WebCore::Document::hasOpenDatabases):
2167         * loader/FrameLoader.cpp:
2168         (WebCore::FrameLoader::canCachePage):
2169         * storage/Database.cpp:
2170         (WebCore::Database::openDatabase):
2171
2172 2008-01-07  Dan Bernstein  <mitz@apple.com>
2173
2174         Reviewed by Oliver Hunt.
2175
2176         - fix leaks seen on the build bot
2177
2178         * css/CSSFontSelector.cpp:
2179         (WebCore::CSSFontSelector::addFontFaceRule): Avoid creating a
2180         CSSFontFaceSource for SVG font-face elements going into an
2181         SVGCSSFontFace because it just leaks them. Avoid adding SVG font-
2182         face elements to a CSSFontFace because it will not work as expected.
2183
2184 2008-01-07  Mark Rowe  <mrowe@apple.com>
2185
2186         Tiger build fix.
2187
2188         * platform/graphics/mac/FontCustomPlatformData.cpp:
2189         (WebCore::createFontCustomPlatformData): Only include this code on Leopard.
2190         It's not needed on Tiger, and breaks the build.
2191
2192 2008-01-07  Antti Koivisto  <antti@apple.com>
2193
2194         Reviewed by Steve.
2195
2196         Re-enable media support in Windows build.
2197
2198         * WebCore.vcproj/QTMovieWin.vcproj:
2199         * WebCore.vcproj/WebCore.vcproj:
2200         * WebCore.vcproj/build-generated-files.sh:
2201
2202 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
2203
2204         Add version resource to QTMovieWin.dll
2205         
2206         Reviewed by Adam.
2207
2208         * WebCore.vcproj/PRODUCTVERSION: Copied from ../WebKit/win/WebKit.vcproj/PRODUCTVERSION.
2209         * WebCore.vcproj/QTMovieWin.rc: Added.
2210         * WebCore.vcproj/QTMovieWin.vcproj:
2211         * WebCore.vcproj/VERSION: Copied from ../WebKit/win/WebKit.vcproj/VERSION.
2212         * WebCore.vcproj/auto-version.sh: Copied from ../WebKit/win/WebKit.vcproj/auto-version.sh.
2213
2214 2008-01-07  Dan Bernstein  <mitz@apple.com>
2215
2216         Build fix.
2217
2218         * platform/graphics/qt/FontCustomPlatformData.cpp:
2219         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added.
2220         Calls QFontDatabase::removeApplicationFont().
2221         * platform/graphics/qt/FontCustomPlatformData.h:
2222         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2223         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData): Removed the
2224         implementation because Qt does not use the WebCore glyph cache.
2225
2226 2008-01-07  Dan Bernstein  <mitz@apple.com>
2227
2228         Reviewed by Oliver Hunt.
2229
2230         - fix an assertion failure in svg/W3C-SVG-1.1/fonts-elem-03-b.svg on
2231           Tiger and multiple SVG layout test failures on Leopard.
2232
2233         * css/CSSSegmentedFontFace.cpp:
2234         (WebCore::CSSSegmentedFontFace::getFontData): Avoid returning an
2235         empty SegmentedFontData.
2236         * platform/graphics/mac/FontCustomPlatformData.cpp:
2237         (WebCore::createFontCustomPlatformData): Avoid creating a font that
2238         contains no glyphs. On Leopard, ATS might create such a font given
2239         data in an unsupported format (such as SVG).
2240
2241 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
2242
2243         Build fix.
2244
2245         * WebCore.vcproj/WebCore.sln:
2246         * WebCore.vcproj/WebCore.submit.sln:
2247
2248 2008-01-07  Oliver Hunt  <oliver@apple.com>
2249
2250         Reviewed by Niko.
2251
2252         Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
2253
2254         Test: svg/custom/image-with-aspect-ratio-stretch.svg
2255
2256         * rendering/RenderSVGImage.cpp:
2257         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
2258
2259 2008-01-07  Dan Bernstein  <mitz@apple.com>
2260
2261         Build fix.
2262
2263         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2264         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2265
2266 2008-01-07  Adele Peterson  <adele@apple.com>
2267
2268         Add missing newline.
2269
2270         * rendering/MediaControlElements.cpp:
2271
2272 2008-01-07  Jon Honeycutt  <jhoneycutt@apple.com>
2273
2274         Reviewed by Hyatt.
2275
2276         <rdar://problem/5673489> Safari does not render windowless plugins in an
2277         iframe when opacity < 1.0
2278
2279         Plugins in transparency layers handle their own world transforms, so
2280         only apply the horizontal/vertical transform if we are not in a
2281         transparency layer.
2282
2283         * platform/graphics/GraphicsContext.h: Add a Windows-platform-only
2284         inTransparencyLayer() function
2285         * platform/win/GraphicsContextWin.cpp:
2286         (WebCore::GraphicsContext::getWindowsContext): Use inTransparencyLayer()
2287         (WebCore::GraphicsContext::inTransparencyLayer):
2288         (WebCore::GraphicsContext::releaseWindowsContext): Use
2289         inTransparencyLayer()
2290         * plugins/win/PluginViewWin.cpp:
2291         (WebCore::PluginViewWin::paint): When retrieving the HDC, use the rect
2292         relative to the window. Pass m_isTransparent to
2293         get/releaseWindowsContext(). Only set the world transform if we are not
2294         in a transparency layer.
2295
2296 2008-01-07  Adele Peterson  <adele@apple.com>
2297
2298         Build fix.  Need to wrap these classes in #if ENABLE(VIDEO)
2299
2300         * rendering/MediaControlElements.cpp:
2301         * rendering/MediaControlElements.h:
2302
2303 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2304
2305         Reviewed by Mark.
2306
2307         Enable SVG_FONTS by default.
2308
2309         * Configurations/WebCore.xcconfig:
2310         * WebCore.vcproj/build-generated-files.sh:
2311
2312 2008-01-07  Dan Bernstein  <mitz@apple.com>
2313
2314         Build fix.
2315
2316         * platform/graphics/qt/SimpleFontDataQt.cpp:
2317         (WebCore::SimpleFontData::SimpleFontData):
2318         (WebCore::SimpleFontData::~SimpleFontData):
2319
2320 2008-01-07  Adam Barth  <hk9565@gmail.com>
2321
2322         Reviewed by Sam Weinig
2323
2324         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16523
2325         <rdar://problem/5657447>
2326
2327         When a frame is created with the URL "about:blank" or "", it should
2328         inherit its SecurityOrigin from its opener.  However, once it has
2329         decided on that SecurityOrigin, it should not change its mind.
2330         Prior to this patch, several events could induce the frame to change
2331         its SecurityOrigin, permitting an attacker to inject script into an
2332         arbitrary SecurityOrigin.
2333
2334         This patch makes several changes:
2335
2336         1) Documents refuse to change from one SecurityOrigin to another
2337            unless explicitly instructed to do so.
2338
2339         2) Navigating to a JavaScript URL that produces a value
2340            preserves the current SecurityOrigin explicitly instead of
2341            relying on the URL to preserve the origin (which fails for
2342            about:blank URLs and SecurityOrigins with document.domain set).
2343
2344            Ideally, we should not preserve the URL at all.  Instead, the
2345            frame's URL should be the JavaScript URL, as in Firefox, but this
2346            would require changes that are too risky for this patch.  I'll
2347            file this as a separate issue.
2348
2349         3) Various methods of navigating to JavaScript URLs were not
2350            properly handling JavaScript that returned a value (and should
2351            therefore replace the current document).  This patch unifies
2352            those code paths with the path that works.
2353
2354            There are still a handful of bugs relating to the handling of
2355            JavaScript URLs, but I'll file those as separate issues.
2356
2357         Tests: http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
2358                http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
2359                http/tests/security/aboutBlank/xss-DENIED-set-opener.html
2360
2361         * dom/Document.cpp:
2362         (WebCore::Document::initSecurityOrigin):
2363         * dom/Document.h:
2364         (WebCore::Document::setSecurityOrigin):
2365         * loader/FrameLoader.cpp:
2366         (WebCore::FrameLoader::changeLocation):
2367         (WebCore::FrameLoader::urlSelected):
2368         (WebCore::FrameLoader::requestFrame):
2369         (WebCore::FrameLoader::submitForm):
2370         (WebCore::FrameLoader::executeIfJavaScriptURL):
2371         (WebCore::FrameLoader::begin):
2372         * loader/FrameLoader.h:
2373         * platform/SecurityOrigin.cpp:
2374         (WebCore::SecurityOrigin::setForURL):
2375         (WebCore::SecurityOrigin::createForFrame):
2376         * platform/SecurityOrigin.h:
2377
2378 2008-01-07  Adele Peterson  <adele@apple.com>
2379
2380         Forgot to check in these changes in my last checkin.
2381
2382         * rendering/RenderThemeSafari.cpp:
2383
2384 2008-01-07  Dan Bernstein  <mitz@apple.com>
2385
2386         Build fixes.
2387
2388         * WebCore.pro:
2389         * platform/graphics/qt/FontCacheQt.cpp:
2390         (WebCore::FontCache::getCachedFontData):
2391
2392 2008-01-07  Timothy Hatcher  <timothy@apple.com>
2393
2394         Reviewed by John Sullivan.
2395
2396         <rdar://problem/5674119> Make the Web Inspector toolbar the normal size when not docked
2397
2398         * page/inspector/inspector.css: Changed CSS rules to have the toolbar and buttons be
2399           normal height when not docked, and small when docked. Also added some cursor properties
2400           prevent showing the text cursor over areas that are not selectable.
2401         * page/inspector/Images: A few images added and old ones removed or renamed.
2402
2403 2008-01-07  Alp Toker  <alp@atoker.com>
2404
2405         Prospective GTK+ autotools/qmake VIDEO build fix for breakage
2406         introduced in r29257.
2407
2408         * GNUmakefile.am:
2409         * WebCore.pro:
2410
2411 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2412
2413         Reviewed by Oliver.
2414
2415         Build fix affecting all builds - again related to the unicode-range addition.
2416
2417         * css/CSSFontSelector.cpp:
2418         (WebCore::CSSFontSelector::addFontFaceRule):
2419         * css/SVGCSSFontFace.cpp:
2420         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
2421         * css/SVGCSSFontFace.h:
2422         * rendering/RenderSVGText.cpp:
2423         * svg/SVGFont.cpp:
2424         (WebCore::svgFontAndFontFaceElementForFontData):
2425         (WebCore::floatWidthMissingGlyphCallback):
2426         (WebCore::drawTextMissingGlyphCallback):
2427         * svg/SVGFontFaceElement.cpp:
2428
2429 2008-01-07  Adele Peterson  <adele@apple.com>
2430
2431         Reviewed by Antti, Adam, and Mitz.
2432
2433         WebCore part of fix for 
2434         <rdar://problem/5619073> Updated look for <video> controls
2435         <rdar://problem/5619057> Add volume control to video controls
2436
2437         * WebCore.base.exp: Added symbols for WebKitSystemInterface drawing methods.
2438         * WebCore.xcodeproj/project.pbxproj: Added MediaControlElements.h/cpp
2439         * WebCore.vcproj/WebCore.vcproj: ditto.
2440
2441         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added cases for new appearances.
2442         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added cases for new types.
2443         * css/CSSSelector.h: (WebCore::CSSSelector::): Added new pseudo elements.
2444         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): ditto.
2445         * css/CSSValueKeywords.in: Added keywords for new control appearance styles.
2446         * css/html4.css: Added new styles for new controls.
2447
2448         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlay): Added. Takes loading state into account.
2449         * html/HTMLMediaElement.h:
2450
2451         * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): Make sure the events always go to the capturing node, if there is one.
2452
2453         * platform/mac/WebCoreSystemInterface.h: Added drawing methods for controls.
2454         * platform/mac/WebCoreSystemInterface.mm: ditto.
2455
2456         * rendering/MediaControlElements.cpp: Added.
2457         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Moved from RenderMedia.  Made this relatively positioned, instead of absolute.
2458         (WebCore::MediaControlInputElement::MediaControlInputElement): Moved from RenderMedia.  Removed call to updateFromElement, 
2459          since its too early to do this here, and causes crashes for the slider.
2460         (WebCore::MediaControlInputElement::attachToParent): Moved from RenderMedia.
2461         (WebCore::MediaControlInputElement::update): ditto.
2462         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Added.
2463         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): ditto.
2464         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Moved from RenderMedia.
2465         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
2466         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Added.
2467         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
2468         (WebCore::MediaControlSeekButtonElement::seekTimerFired): ditto.
2469         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Moved from RenderMedia.
2470         (WebCore::MediaControlTimelineElement::defaultEventHandler): ditto.
2471         (WebCore::MediaControlTimelineElement::update): ditto. 
2472         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Added.
2473         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
2474         * rendering/MediaControlElements.h: Added. Moved from RenderMedia.
2475         (WebCore::MediaControlShadowRootElement::isShadowNode):
2476         (WebCore::MediaControlShadowRootElement::shadowParentNode):
2477         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
2478         (WebCore::RenderMediaControlShadowRoot::setParent):
2479
2480         * rendering/RenderMedia.cpp: Moved control element classes to MediaControlElements files.
2481         (WebCore::RenderMedia::RenderMedia): No need to initialize RefPtrs.
2482         (WebCore::RenderMedia::layout): Set the position for the controlsRenderer.
2483         (WebCore::RenderMedia::createPanel): Added nil check for the renderer.
2484         (WebCore::RenderMedia::createMuteButton): Added.
2485         (WebCore::RenderMedia::createSeekBackButton): ditto.
2486         (WebCore::RenderMedia::createSeekForwardButton): ditto.
2487         (WebCore::RenderMedia::createTimeDisplay): Added nil check for the renderer.
2488         (WebCore::RenderMedia::createFullscreenButton): Added.
2489         (WebCore::RenderMedia::updateControls): Create, delete, and update new controls when appropriate.
2490         (WebCore::RenderMedia::updateControlVisibility): Don't fade controls for audio controls. 
2491         (WebCore::RenderMedia::forwardEvent): Forward events for new controls.
2492         * rendering/RenderMedia.h: Added new methods for creating new controls.
2493
2494         * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Updated special case for media elements, which are replaced elements, 
2495           but also can contain children (the controls' container) that may need to look for the containing block.
2496
2497         * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Added case for MediaSliderAppearance.
2498
2499         * rendering/RenderStyle.h: Added appearance constants and pseudo ids for new controls.
2500         (WebCore::):
2501         (WebCore::RenderStyle::):
2502
2503         * rendering/RenderTheme.cpp:
2504         (WebCore::RenderTheme::adjustStyle): Added cases for new appearances.
2505         (WebCore::RenderTheme::paint): ditto.
2506         * rendering/RenderTheme.h: Added new methods for painting new appearances.
2507         (WebCore::RenderTheme::paintMediaBackground):
2508         (WebCore::RenderTheme::paintMediaFullscreenButton):
2509         (WebCore::RenderTheme::paintMediaPlayButton):
2510         (WebCore::RenderTheme::paintMediaMuteButton):
2511         (WebCore::RenderTheme::paintMediaSeekBackButton):
2512         (WebCore::RenderTheme::paintMediaSeekForwardButton):
2513         (WebCore::RenderTheme::paintMediaSliderThumb):
2514         * rendering/RenderThemeMac.h:
2515         * rendering/RenderThemeMac.mm:
2516         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_mediaControlBackgroundImage.
2517         (WebCore::RenderThemeMac::~RenderThemeMac): Delete m_mediaControlBackgroundImage.
2518         (WebCore::RenderThemeMac::paintCapsLockIndicator): Use LocalCurrentGraphicsContext here too, since we use it in all other painting methods.
2519         (WebCore::RenderThemeMac::paintSliderTrack): Added case for MediaSliderAppearance.
2520         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added case for MediaSliderThumbAppearance.
2521         (WebCore::RenderThemeMac::paintMediaBackground): Draws the new artwork for the controls.
2522         (WebCore::RenderThemeMac::paintMediaFullscreenButton): ditto.
2523         (WebCore::RenderThemeMac::paintMediaMuteButton): ditto.
2524         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
2525         (WebCore::RenderThemeMac::paintMediaSeekBackButton): ditto.
2526         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): ditto.
2527         (WebCore::RenderThemeMac::paintMediaSliderThumb): ditto.
2528         * rendering/RenderThemeSafari.cpp: Draws the new artwork on Windows.
2529         (WebCore::RenderThemeSafari::paintSliderTrack):
2530         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2531         (WebCore::RenderThemeSafari::paintMediaBackground):
2532         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
2533         (WebCore::RenderThemeSafari::paintMediaMuteButton):
2534         (WebCore::RenderThemeSafari::paintMediaPlayButton):
2535         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
2536         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
2537         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
2538         * rendering/RenderThemeSafari.h:
2539
2540 2008-01-07  Timothy Hatcher  <timothy@apple.com>
2541
2542         Reviewed by Darin Adler.
2543
2544         Fix ASSERTION FAILED: dstOffset + srcSegmentLength == static_cast<int>(data.size())
2545         when the replacment string is a different length.
2546
2547         * platform/text/StringImpl.cpp:
2548         (WebCore::StringImpl::replace): Move the parenthesis to be around only the subtraction in
2549         the Vector size calculation, correcting the order of math operations.
2550
2551 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2552
2553         Reviewed by Eric. Hopefully fix build with mac tiger after the unicode-range addition. NSInteger not available there.
2554
2555         * platform/graphics/mac/FontCacheMac.mm:
2556
2557 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2558
2559         Reviewed by Oliver. Fix build error introduced by Dan's unicode-range support patch & enabling SVG_FONTS by default.
2560
2561         * css/CSSFontSelector.cpp:
2562         (WebCore::CSSFontSelector::getFontData):
2563
2564 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2565
2566         Not reviewed. Next try to fix wx/mac leopard build.
2567
2568         * css/CSSFontSelector.cpp: Need to wrap a SVG* include in ENABLE(SVG) blocks, as this port doesn't build this generated file.
2569         * svg/SVGFontFaceElement.cpp:
2570         (WebCore::SVGFontFaceElement::createFontData): Fix double<->float conversion issue.
2571         * webcore-base.bkl: Undo svg/ include.
2572
2573 2008-01-07  Dan Bernstein  <mitz@apple.com>
2574
2575         Reviewed by Dave Hyatt.
2576
2577         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
2578
2579         * GNUmakefile.am:
2580         * WebCore.pro:
2581         * WebCore.vcproj/WebCore.vcproj:
2582         * WebCore.xcodeproj/project.pbxproj:
2583         * WebCoreSources.bkl:
2584         * bindings/objc/DOM.mm:
2585         * bridge/mac/WebCoreAXObject.mm:
2586         * css/CSSComputedStyleDeclaration.cpp:
2587         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2588         * css/CSSFontFace.cpp:
2589         (WebCore::CSSFontFace::fontLoaded): Changed to call the owning segmented
2590         font face.
2591         (WebCore::CSSFontFace::getFontData):
2592         * css/CSSFontFace.h:
2593         (WebCore::CSSFontFace::CSSFontFace):
2594         (WebCore::CSSFontFace::setSegmentedFontFace):
2595         * css/CSSFontFaceSource.cpp:
2596         (WebCore::CSSFontFaceSource::pruneTable): Removed the calls to
2597         GlyphPageTreeNode::pruneTreeCustomFontData because the fonts in the
2598         font table are not exposed in the glyph page tree. Only the segmented
2599         font is, and that is taken care of by the segmented font face.
2600         (WebCore::CSSFontFaceSource::getFontData):
2601         * css/CSSFontFaceSource.h:
2602         * css/CSSFontSelector.cpp:
2603         (WebCore::CSSFontSelector::addFontFaceRule): Changed to collect
2604         @font-face rules with the same family and traits into a single
2605         segmented font face, instead of just retaining the most recent one.
2606         (WebCore::CSSFontSelector::fontLoaded):
2607         (WebCore::CSSFontSelector::getFontData):
2608         * css/CSSFontSelector.h:
2609         * css/CSSGrammar.y:
2610         * css/CSSParser.cpp:
2611         (WebCore::CSSParser::parseValue):
2612         (WebCore::CSSParser::parseFontFaceUnicodeRange): Added. Parses a unicode
2613         range value.
2614         * css/CSSParser.h:
2615         * css/CSSPrimitiveValue.h:
2616         (WebCore::CSSPrimitiveValue::):
2617         * css/CSSPropertyNames.in:
2618         * css/CSSSegmentedFontFace.cpp: Added.
2619         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2620         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
2621         (WebCore::CSSSegmentedFontFace::pruneTable):
2622         (WebCore::CSSSegmentedFontFace::isLoaded):
2623         (WebCore::CSSSegmentedFontFace::isValid):
2624         (WebCore::CSSSegmentedFontFace::fontLoaded):
2625         (WebCore::CSSSegmentedFontFace::overlayRange):
2626         (WebCore::CSSSegmentedFontFace::getFontData):
2627         * css/CSSSegmentedFontFace.h: Added.
2628         (WebCore::FontFaceRange::FontFaceRange):
2629         (WebCore::FontFaceRange::from):
2630         (WebCore::FontFaceRange::to):
2631         (WebCore::FontFaceRange::fontFace):
2632         (WebCore::CSSSegmentedFontFace::fontSelector):
2633         * css/CSSStyleSelector.cpp:
2634         (WebCore::CSSStyleSelector::applyProperty):
2635         * css/CSSUnicodeRangeValue.cpp: Added.
2636         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
2637         (WebCore::CSSUnicodeRangeValue::cssText):
2638         * css/CSSUnicodeRangeValue.h: Added.
2639         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
2640         (WebCore::CSSUnicodeRangeValue::from):
2641         (WebCore::CSSUnicodeRangeValue::to):
2642         * css/SVGCSSFontFace.cpp:
2643         (WebCore::SVGCSSFontFace::getFontData):
2644         * css/SVGCSSFontFace.h:
2645         * editing/Editor.cpp:
2646         (WebCore::Editor::fontForSelection):
2647         * editing/Editor.h:
2648         * page/mac/FrameMac.mm:
2649         * page/mac/WebCoreFrameBridge.mm:
2650         (-[WebCoreFrameBridge fontForSelection:]):
2651         * platform/graphics/Font.cpp:
2652         (WebCore::WidthIterator::advance):
2653         (WebCore::Font::glyphDataForCharacter):
2654         (WebCore::Font::primaryFont): Changed to return the simple font data
2655         used for the space character.
2656         (WebCore::Font::fontDataAt):
2657         (WebCore::Font::fontDataForCharacters):
2658         (WebCore::Font::drawGlyphBuffer):
2659         * platform/graphics/Font.h:
2660         * platform/graphics/FontCache.cpp:
2661         (WebCore::FontCache::getCachedFontData):
2662         (WebCore::FontCache::getFontData):
2663         * platform/graphics/FontCache.h:
2664         * platform/graphics/FontData.cpp: Renamed to SimpleFontData.cpp
2665         * platform/graphics/FontData.h: Renamed to SimpleFontData.cpp.
2666         * platform/graphics/FontDataBaseClass.cpp: Added. This will be renamed
2667         FontData.cpp.
2668         (WebCore::FontData::~FontData):
2669         * platform/graphics/FontDataBaseClass.h: Added. This will be renamed
2670         FontData.h.
2671         * platform/graphics/FontFallbackList.cpp:
2672         (WebCore::FontFallbackList::determinePitch):
2673         (WebCore::FontFallbackList::fontDataAt):
2674         (WebCore::FontFallbackList::fontDataForCharacters):
2675         * platform/graphics/FontFallbackList.h:
2676         (WebCore::FontFallbackList::primaryFont):
2677         * platform/graphics/FontSelector.h:
2678         * platform/graphics/GlyphBuffer.h:
2679         (WebCore::GlyphBuffer::fontDataAt):
2680         (WebCore::GlyphBuffer::swap):
2681         (WebCore::GlyphBuffer::add):
2682         * platform/graphics/GlyphPageTreeNode.cpp:
2683         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2684         (WebCore::GlyphPageTreeNode::initializePage): Added code to initialize
2685         pages for segmented font data.
2686         (WebCore::GlyphPageTreeNode::getChild):
2687         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
2688         * platform/graphics/GlyphPageTreeNode.h:
2689         (WebCore::GlyphPage::setGlyphDataForCharacter):
2690         (WebCore::GlyphPage::setGlyphDataForIndex):
2691         (WebCore::GlyphPageTreeNode::getRootChild):
2692         * platform/graphics/SegmentedFontData.cpp: Added.
2693         (WebCore::SegmentedFontData::~SegmentedFontData):
2694         (WebCore::SegmentedFontData::fontDataForCharacter):
2695         (WebCore::SegmentedFontData::containsCharacters):
2696         (WebCore::SegmentedFontData::isCustomFont):
2697         (WebCore::SegmentedFontData::isLoading):
2698         (WebCore::SegmentedFontData::isSegmented):
2699         * platform/graphics/SegmentedFontData.h: Added.
2700         (WebCore::FontDataRange::FontDataRange):
2701         (WebCore::FontDataRange::from):
2702         (WebCore::FontDataRange::to):
2703         (WebCore::FontDataRange::fontData):
2704         (WebCore::SegmentedFontData::appendRange):
2705         (WebCore::SegmentedFontData::numRanges):
2706         (WebCore::SegmentedFontData::rangeAt):
2707         * platform/graphics/SimpleFontData.cpp: Copied from WebCore/platform/graphics/FontData.cpp.
2708         (WebCore::SimpleFontData::SimpleFontData):
2709         (WebCore::SimpleFontData::~SimpleFontData):
2710         (WebCore::SimpleFontData::ascent):
2711         (WebCore::SimpleFontData::descent):
2712         (WebCore::SimpleFontData::widthForGlyph):
2713         (WebCore::SimpleFontData::fontDataForCharacter):
2714         (WebCore::SimpleFontData::isSegmented):
2715         * platform/graphics/SimpleFontData.h: Copied from WebCore/platform/graphics/FontData.h.
2716         (WebCore::SimpleFontData::isCustomFont):
2717         (WebCore::SimpleFontData::isLoading):
2718         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2719         (WebCore::GraphicsContext::setPlatformFont):
2720         * platform/graphics/gtk/FontCacheGtk.cpp:
2721         (WebCore::FontCache::getFontDataForCharacters):
2722         * platform/graphics/gtk/FontDataGtk.cpp: Renamed to
2723         SimpleFontDataGtk.cpp.
2724         * platform/graphics/gtk/FontGtk.cpp:
2725         (WebCore::Font::drawGlyphs):
2726         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
2727         (WebCore::GlyphPage::fill):
2728         * platform/graphics/gtk/SimpleFontDataGtk.cpp: Copied from WebCore/platform/graphics/gtk/FontDataGtk.cpp.
2729         (WebCore::SimpleFontData::platformInit):
2730         (WebCore::SimpleFontData::platformDestroy):
2731         (WebCore::SimpleFontData::smallCapsFontData):
2732         (WebCore::SimpleFontData::containsCharacters):
2733         (WebCore::SimpleFontData::determinePitch):
2734         (WebCore::SimpleFontData::platformWidthForGlyph):
2735         (WebCore::SimpleFontData::setFont):
2736         * platform/graphics/mac/FontCacheMac.mm:
2737         (WebCore::FontCache::getFontDataForCharacters):
2738         * platform/graphics/mac/FontDataMac.mm: Renamed to SimpleFontDataMac.mm.
2739         * platform/graphics/mac/FontMac.mm:
2740         (WebCore::initializeATSUStyle):
2741         (WebCore::overrideLayoutOperation):
2742         (WebCore::ATSULayoutParameters::initialize):
2743         (WebCore::Font::drawGlyphs):
2744         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2745         (WebCore::GlyphPage::fill):
2746         * platform/graphics/mac/SimpleFontDataMac.mm: Copied from WebCore/platform/graphics/mac/FontDataMac.mm.
2747         (WebCore::initFontData):
2748         (WebCore::SimpleFontData::platformInit):
2749         (WebCore::SimpleFontData::platformDestroy):
2750         (WebCore::SimpleFontData::smallCapsFontData):
2751         (WebCore::SimpleFontData::containsCharacters):
2752         (WebCore::SimpleFontData::determinePitch):
2753         (WebCore::SimpleFontData::platformWidthForGlyph):
2754         (WebCore::SimpleFontData::checkShapesArabic):
2755         * platform/graphics/qt/FontDataQt.cpp: Renamed to SimpleFontDataQt.cpp.
2756         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2757         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2758         * platform/graphics/qt/SimpleFontDataQt.cpp: Copied from WebCore/platform/graphics/qt/FontDataQt.cpp.
2759         * platform/graphics/win/FontCacheWin.cpp:
2760         (WebCore::FontCache::getFontDataForCharacters):
2761         * platform/graphics/win/FontDataWin.cpp: Renamed to
2762         SimpleFontDataWin.cpp.
2763         * platform/graphics/win/FontWin.cpp:
2764         (WebCore::Font::drawGlyphs):
2765         * platform/graphics/win/GlyphPageTreeNodeWin.cpp:
2766         (WebCore::GlyphPage::fill):
2767         * platform/graphics/win/SimpleFontDataWin.cpp: Copied from WebCore/platform/graphics/win/FontDataWin.cpp.
2768         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
2769         (WebCore::SimpleFontData::platformInit):
2770         (WebCore::SimpleFontData::platformDestroy):
2771         (WebCore::SimpleFontData::smallCapsFontData):
2772         (WebCore::SimpleFontData::containsCharacters):
2773         (WebCore::SimpleFontData::determinePitch):
2774         (WebCore::SimpleFontData::platformWidthForGlyph):
2775         (WebCore::SimpleFontData::scriptFontProperties):
2776         * platform/graphics/wx/FontCacheWx.cpp:
2777         (WebCore::FontCache::getFontDataForCharacters):
2778         * platform/graphics/wx/FontDataWx.cpp: Renamed to SimpleFontDataWx.cpp.
2779         * platform/graphics/wx/FontWx.cpp:
2780         (WebCore::Font::drawGlyphs):
2781         * platform/graphics/wx/GlyphMapWx.cpp:
2782         (WebCore::GlyphPage::fill):
2783         * platform/graphics/wx/SimpleFontDataWx.cpp: Copied from WebCore/platform/graphics/wx/FontDataWx.cpp.
2784         (WebCore::SimpleFontData::platformInit):
2785         (WebCore::SimpleFontData::platformDestroy):
2786         (WebCore::SimpleFontData::smallCapsFontData):
2787         (WebCore::SimpleFontData::containsCharacters):
2788         (WebCore::SimpleFontData::determinePitch):
2789         (WebCore::SimpleFontData::platformWidthForGlyph):
2790         * platform/mac/FileChooserMac.mm:
2791         * platform/mac/PopupMenuMac.mm:
2792         * platform/mac/WebCoreTextRenderer.mm:
2793         * platform/win/PopupMenuWin.cpp:
2794         * platform/win/UniscribeController.cpp:
2795         (WebCore::UniscribeController::advance):
2796         (WebCore::UniscribeController::itemizeShapeAndPlace):
2797         (WebCore::UniscribeController::shapeAndPlaceItem):
2798         (WebCore::UniscribeController::shape):
2799         * platform/win/UniscribeController.h:
2800         * svg/SVGFont.cpp:
2801         (WebCore::Font::drawGlyphsWithSVGFont):
2802         * svg/SVGFontElement.cpp:
2803         (WebCore::SVGFontElement::collectGlyphs):
2804         * svg/SVGFontFaceElement.cpp:
2805         (WebCore::SVGFontFaceElement::createFontData):
2806         * svg/SVGFontFaceElement.h:
2807         * svg/SVGGlyphElement.cpp:
2808
2809 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2810
2811         Not reviewed. Try to fix mac build by forcing SVGNames regeneration.
2812
2813         * svg/svgtags.in:
2814
2815 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
2816
2817         Not reviewed. Proposed build fix for wx.
2818
2819         * webcore-base.bkl:
2820
2821 2008-01-07  Dan Bernstein  <mitz@apple.com>
2822
2823         64-bit build fix
2824
2825         * platform/graphics/mac/FontCustomPlatformData.cpp:
2826         (WebCore::FontCustomPlatformData::fontPlatformData): Have to use a
2827         cast here since FMGetFontFromATSFontRef() is not available on 64-bit.
2828
2829 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
2830
2831         Reviewed by Oliver. Parts reviewed by Eric, David Hyatt & Dan & Alexey.
2832         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15741 (REGRESSION: svg/W3C-SVG-1.1/fonts-elem-03-b.svg shows worse behavior on TOT)
2833
2834         Display SVG Fonts, fill svg/SVGFont.cpp with life by adding all needed code to
2835         measure & render glyphs contained in SVG Fonts, including ligature lookup support.
2836
2837         Implement floatWidth/selectionRectForText for SVG Fonts, fixing text selection.
2838
2839         Support horiz-origin-x/y, horiz-adv-x, vert-adv-y, vert-origin-x/y & arabic-form.
2840         Implement simple algorithm to determine the arabic forms for a string (initial, isolated, medial, terminal).
2841
2842         Removed drawGlyphsWithSVGFont - create a new function drawTextWithSVGFont instead.
2843         This doesn't involve creating/using a 'GlyphBuffer' object anymore, which is not
2844         required for SVG Fonts anyway (we already know all our offsets/advances/etc..)
2845
2846         Don't call it from drawSimpleText anymore, but directly in drawText - as Dan suggested.
2847
2848         <glyph> elements now register themselves in the SVGFontElement's glyph cache.
2849         (insertedIntoDocument / removedFromDocument take care of this)
2850
2851         The cache is built once now, and is kept updated - it's not rebuild anymore
2852         on painting (!) - which was a crude hack for testing.
2853
2854         W3C testcase which include SVG Fonts:
2855         svg/W3C-SVG-1.1/animate-elem-03-t.svg (Fixed, of course not the anim itself, but it's SVG Fonts usage)
2856         svg/W3C-SVG-1.1/animate-elem-24-t.svg (Ditto)
2857         svg/W3C-SVG-1.1/animate-elem-36-t.svg (Ditto)
2858         svg/W3C-SVG-1.1/animate-elem-40-t.svg (Ditto)
2859         svg/W3C-SVG-1.1/fonts-kern-01-t.svg (missing <vkern>/<hkern> support)
2860         svg/W3C-SVG-1.1/fonts-desc-02-t.svg (Fixed, tests CSS font matching based on font-variant attribute)
2861         svg/W3C-SVG-1.1/fonts-elem-01-t.svg (Fixed, basic SVG font test)
2862         svg/W3C-SVG-1.1/fonts-elem-02-t.svg (Fixed, accuracy test for embedded SVG font)
2863         svg/W3C-SVG-1.1/fonts-elem-05-t.svg (Fixed, checks horiz-origin-x support, note: W3C reference image is wrong)
2864         svg/W3C-SVG-1.1/fonts-elem-06-t.svg (Fixed, checks horiz-adv-x support)
2865         svg/W3C-SVG-1.1/fonts-glyph-02-t.svg (Fixed, checks arabic-form support)
2866         svg/W3C-SVG-1.1/fonts-glyph-03-t.svg (Fixed, checks glyph matching based on xml:lang)
2867         svg/W3C-SVG-1.1/masking-mask-01-b.svg (Fixed, SVG Fonts & masking)
2868         svg/W3C-SVG-1.1/pservers-grad-08-b.svg (Fixed, SVG Fonts & gradient on fill/stroke)
2869         svg/W3C-SVG-1.1/render-elems-06-t.svg (Fixed, simple 'fill' property test)
2870         svg/W3C-SVG-1.1/render-elems-07-t.svg (Fixed, simple 'stroke' property test - shows SVG Font interprets stroke-width in glyph coordinate system, as demanded by spec)
2871         svg/W3C-SVG-1.1/render-elems-08-t.svg (Fixed, simple 'fill' & 'stroke' property test)
2872         svg/W3C-SVG-1.1/render-groups-01-b.svg (missing <vkern>/<hkern> support)
2873         svg/W3C-SVG-1.1/render-groups-03-t.svg (Ditto)
2874         svg/W3C-SVG-1.1/text-altglyph-01-b.svg (no <altGlyph> support yet)
2875         svg/W3C-SVG-1.1/text-text-04-t.svg (Fixed, absolute placing of characters pixel perfect now)
2876         svg/W3C-SVG-1.1/text-text-05-t.svg (FIXME: problem with text-anchor)
2877         svg/W3C-SVG-1.1/text-text-06-t.svg (highlights problem with ligatures & absolute positioned characters)
2878
2879         Questionable testcases:
2880         svg/W3C-SVG-1.1/fonts-glyph-04-t.svg (tests that glyph selection is done in the order in the definition of the font element.)
2881         I am not sure why this behaviour is desired, no comment given in spec - doesn't make much sense to me, ignoring it for now.
2882
2883         Several other batik testcases fixed, which use SVG Fonts in combination with gradients & filters.
2884
2885         * css/CSSFontSelector.cpp:
2886         (WebCore::CSSFontSelector::addFontFaceRule):
2887         (WebCore::CSSFontSelector::getFontData):
2888         * platform/graphics/Font.cpp:
2889         (WebCore::Font::lineSpacing):
2890         (WebCore::Font::xHeight):
2891         (WebCore::Font::canUseGlyphCache):
2892         (WebCore::Font::drawGlyphBuffer):
2893         (WebCore::Font::drawText):
2894         (WebCore::Font::floatWidth):
2895         (WebCore::Font::selectionRectForText):
2896         * platform/graphics/Font.h:
2897         (WebCore::TextRun::TextRun):
2898         (WebCore::TextRun::activePaintServer):
2899         (WebCore::TextRun::setActivePaintServer):
2900         * platform/graphics/FontData.cpp:
2901         (WebCore::FontData::lineSpacing):
2902         (WebCore::FontData::lineGap):
2903         (WebCore::FontData::xHeight):
2904         * platform/graphics/FontData.h:
2905         * platform/graphics/win/FontWin.cpp:
2906         (WebCore::Font::drawGlyphs):
2907         * rendering/RenderSVGText.cpp:
2908         (WebCore::RenderSVGText::relativeBBox):
2909         * rendering/SVGInlineTextBox.cpp:
2910         (WebCore::SVGInlineTextBox::paintCharacters):
2911         * rendering/SVGInlineTextBox.h:
2912         * rendering/SVGRootInlineBox.cpp:
2913         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
2914         * svg/SVGFont.cpp:
2915         (WebCore::):
2916         (WebCore::processArabicFormDetection):
2917         (WebCore::charactersWithArabicForm):
2918         (WebCore::isCompatibleArabicForm):
2919         (WebCore::isCompatibleGlyph):
2920         (WebCore::svgFontAndFontFaceElementForFontData):
2921         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
2922         (WebCore::SVGTextRunWalker::walk):
2923         (WebCore::floatWidthUsingSVGFontCallback):
2924         (WebCore::floatWidthMissingGlyphCallback):
2925         (WebCore::floatWidthOfSubStringUsingSVGFont):
2926         (WebCore::Font::floatWidthUsingSVGFont):
2927         (WebCore::drawTextUsingSVGFontCallback):
2928         (WebCore::drawTextMissingGlyphCallback):
2929         (WebCore::Font::drawTextUsingSVGFont):
2930         (WebCore::Font::selectionRectForTextUsingSVGFont):
2931         * svg/SVGFontElement.cpp:
2932         (WebCore::SVGFontElement::SVGFontElement):
2933         (WebCore::SVGFontElement::addGlyphToCache):
2934         (WebCore::SVGFontElement::removeGlyphFromCache):
2935         (WebCore::SVGFontElement::firstMissingGlyphElement):
2936         (WebCore::SVGFontElement::glyphIdentifiersForString):
2937         * svg/SVGFontElement.h:
2938         (WebCore::SVGFontElement::maximumHashKeyLength):
2939         * svg/SVGFontFaceElement.cpp:
2940         (WebCore::SVGFontFaceElement::createFontData):
2941         (WebCore::SVGFontFaceElement::rebuildFontFace):
2942         (WebCore::SVGFontFaceElement::associatedFontElement):
2943         * svg/SVGFontFaceElement.h:
2944         * svg/SVGGlyphElement.cpp:
2945         (WebCore::SVGGlyphElement::insertedIntoDocument):
2946         (WebCore::SVGGlyphElement::removedFromDocument):
2947         (WebCore::parseArabicForm):
2948         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
2949         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
2950         * svg/SVGGlyphElement.h:
2951         (WebCore::SVGGlyphIdentifier::):
2952         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
2953         (WebCore::SVGGlyphIdentifier::inheritedValue):
2954         (WebCore::SVGGlyphIdentifier::operator==):
2955         (WebCore::SVGGlyphElement::~SVGGlyphElement):
2956
2957 2008-01-07  David Hyatt  <hyatt@apple.com>
2958
2959         Fix for bug 13095, CSS3 multiple backgrounds don't work on table cells.
2960
2961         Reviewed by Dan
2962
2963         * rendering/RenderBox.h:
2964         * rendering/RenderTableCell.cpp:
2965         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2966
2967 2008-01-07  Holger Freyther  <zecke@selfish.org>
2968
2969         Reviewed by Alp Toker.
2970
2971         * Fix indention
2972
2973         * platform/gtk/ContextMenuGtk.cpp:
2974         (WebCore::ContextMenu::~ContextMenu):
2975
2976 2008-01-07  Holger Freyther  <zecke@selfish.org>
2977
2978         Reviewed by Alp Toker.
2979
2980         * The ContextMenuController is going to live longer than the ContextMenu. It is
2981         going to live as long as the WebCore::Page is around where the ContextMenu, specially
2982         in the case of a SubMenu, is gone before we popup the menu.
2983
2984         * platform/gtk/ContextMenuGtk.cpp:
2985         (WebCore::menuItemActivated):
2986         (WebCore::ContextMenu::appendItem):
2987
2988 2008-01-07  Holger Freyther  <zecke@selfish.org>
2989
2990         Reviewed by Alp Toker.
2991
2992         * Fix SubMenu handling
2993         * Do not connect to the activated signal if we are a separator or submenu
2994         * Change our type from ActionType to SubMenuType when we have a submenu
2995         * Initialize the SubMenu
2996
2997         * platform/gtk/ContextMenuGtk.cpp:
2998         (WebCore::ContextMenu::appendItem):
2999         * platform/gtk/ContextMenuItemGtk.cpp:
3000         (WebCore::ContextMenuItem::ContextMenuItem):
3001         (WebCore::ContextMenuItem::createNativeMenuItem):
3002         (WebCore::ContextMenuItem::setSubMenu):
3003
3004 2008-01-07  Holger Freyther  <zecke@selfish.org>
3005
3006         Reviewed by Alp Toker.
3007
3008         * Qt and Gtk must know if a ContextMenuItem is checkable. Add a new ContextMenuItemType for checkable
3009         actions.
3010         * Use this information in the Gtk platform to create a GtkCheckMenuItem when needed.
3011         * Update the ContextMenuController to accept CheckableActionTypes as well.
3012         * Change ContextMenu.cpp to use the CheckableActionType. The information if a item is checkable
3013         was extracted from ContextMenu::checkOrEnableIfNeeded.
3014         * Update the Qt and Windows port.
3015
3016
3017         * page/ContextMenuController.cpp:
3018         * platform/ContextMenu.cpp:
3019         (WebCore::createAndAppendFontSubMenu):
3020         (WebCore::createAndAppendSpellingAndGrammarSubMenu):
3021         (WebCore::createAndAppendSpellingSubMenu):
3022         (WebCore::createAndAppendWritingDirectionSubMenu):
3023         * platform/ContextMenuItem.h:
3024         * platform/gtk/ContextMenuItemGtk.cpp:
3025         (WebCore::ContextMenuItem::ContextMenuItem):
3026         (WebCore::ContextMenuItem::createNativeMenuItem):
3027
3028 2008-01-07  Luca Bruno  <lethalman88@gmail.com>
3029
3030         Reviewed by Alp Toker.
3031
3032         http://bugs.webkit.org/show_bug.cgi?id=16745
3033         [GTK] Context menu doesn't feel or look native - no icons
3034
3035         Use GTK+ stock icons for menu items where possible.
3036
3037         * platform/gtk/ContextMenuItemGtk.cpp:
3038         (WebCore::gtkStockIDFromContextMenuAction):
3039         (WebCore::ContextMenuItem::createNativeMenuItem):
3040         (WebCore::ContextMenuItem::setAction):
3041
3042 2008-01-07  Dan Bernstein  <mitz@apple.com>
3043
3044         Reviewed by John Sullivan.
3045
3046         - make the ATSUI code path work with custom fonts rather than crash
3047
3048         * platform/graphics/mac/FontCustomPlatformData.cpp:
3049         (WebCore::FontCustomPlatformData::fontPlatformData):
3050         * platform/graphics/mac/FontMac.mm:
3051         (WebCore::initializeATSUStyle):
3052
3053 2008-01-07  Thiago Macieira  <thiago.macieira@trolltech.com>
3054
3055         Reviewed by Simon.
3056
3057         abort() now emits the signals, so disconnect them before you abort()
3058
3059         * platform/network/qt/QNetworkReplyHandler.cpp:
3060         (WebCore::QNetworkReplyHandler::abort):
3061
3062 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
3063
3064         Reviewed by Lars.
3065
3066         Use a faster and safer way of flattening the form data.
3067
3068         * platform/network/qt/QNetworkReplyHandler.cpp:
3069         (WebCore::QNetworkReplyHandler::start):
3070
3071 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
3072
3073         Reviewed by Lars.
3074
3075         Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
3076
3077         * WebCore.pro:
3078         * platform/network/ResourceHandleInternal.h:
3079         * platform/network/qt/QNetworkReplyHandler.cpp: Added.
3080         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
3081         (WebCore::QNetworkReplyHandler::abort):
3082         (WebCore::QNetworkReplyHandler::finish):
3083         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3084         (WebCore::QNetworkReplyHandler::forwardData):
3085         (WebCore::QNetworkReplyHandler::start):
3086         * platform/network/qt/QNetworkReplyHandler.h: Added.
3087         (WebCore::QNetworkReplyHandler::reply):
3088         * platform/network/qt/ResourceHandleQt.cpp:
3089         (WebCore::ResourceHandle::start):
3090         (WebCore::ResourceHandle::cancel):
3091         (WebCore::ResourceHandle::loadResourceSynchronously):
3092         * platform/network/qt/ResourceRequest.h:
3093         (WebCore::ResourceRequest::ResourceRequest):
3094         * platform/network/qt/ResourceRequestQt.cpp: Added.
3095         (WebCore::ResourceRequest::toNetworkRequest):
3096         * platform/qt/MIMETypeRegistryQt.cpp:
3097         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3098         * platform/qt/PlugInInfoStoreQt.cpp:
3099         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
3100         (WebCore::PlugInInfoStore::pluginCount):
3101         (WebCore::PlugInInfoStore::pluginNameForMIMEType):
3102
3103 2008-01-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3104
3105         Reviewed by Lars.
3106
3107         * Remove m_dirtyRegion as it is not used as we pass every dirty region
3108         directly to the ChromeClient
3109
3110         * platform/qt/ScrollViewQt.cpp:
3111         (WebCore::ScrollView::paint):
3112
3113 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
3114
3115         Reviewed by Oliver.
3116
3117         Small CG paint server cleanups - use more GraphicsContext method where possible.
3118
3119         * svg/graphics/cg/CgSupport.cpp:
3120         (WebCore::applyStrokeStyleToContext):
3121         (WebCore::strokeBoundingBox):
3122         * svg/graphics/cg/CgSupport.h:
3123         * svg/graphics/cg/RenderPathCg.cpp:
3124         (WebCore::RenderPath::strokeContains):
3125         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
3126         (WebCore::SVGPaintServerGradient::setup):
3127         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
3128         (WebCore::SVGPaintServerPattern::setup):
3129         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
3130         (WebCore::SVGPaintServerSolid::setup):
3131
3132 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
3133
3134         Reviewed by Dan.
3135
3136         Use new helper function isArabicChar() - which also calls ublock_getCode() == UBLOCK_ARABIC on mac.
3137
3138         * platform/graphics/mac/FontMac.mm:
3139         (WebCore::ATSULayoutParameters::initialize):
3140
3141 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
3142
3143         Reviewed by Darin.
3144         
3145         DOMRange doesn't correctly re-size when inserting items (Acid3)
3146         http://bugs.webkit.org/show_bug.cgi?id=16764
3147         
3148         Update the offset for the range when inserting items into the range.
3149
3150         Test: fast/dom/Range/range-modifycontents.html
3151
3152         * dom/Range.cpp:
3153         (WebCore::Range::insertNode):
3154
3155 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
3156
3157         Reviewed by Darin.
3158
3159         http://bugs.webkit.org/show_bug.cgi?id=16731
3160         Incorrect node type for whitespace when setting innerHTML in an XHTML document
3161
3162         Test: fast/dom/xhtml-fragment-whitespace.xhtml
3163
3164         * dom/XMLTokenizer.cpp: (WebCore::parseXMLDocumentFragment):
3165         Use balancedCharactersHandler for ignorable whitespace.
3166
3167 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
3168
3169         Reviewed by Darin.
3170
3171         http://bugs.webkit.org/show_bug.cgi?id=16701
3172         <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
3173         causes page load error
3174
3175         Test: http/tests/misc/location-with-space.php
3176
3177         * platform/network/cf/ResourceRequestCFNet.cpp:
3178         (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
3179
3180 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
3181
3182         Reviewed by Darin.
3183         
3184         DOMRange.cloneContents does not work (Acid3 bug)
3185         http://bugs.webkit.org/show_bug.cgi?id=16748
3186         
3187         When cloning an empty range, return an empty DocmentFragment instead of
3188         null or undefined.
3189
3190         Test: fast/dom/Range/range-clone-empty.html
3191
3192         * dom/Range.cpp:
3193         (WebCore::Range::processContents):
3194
3195 2008-01-06  Luca Bruno  <lethalman88@gmail.com>
3196
3197         Reviewed by Alp Toker.
3198
3199         Remove curl handles immediately if the timer is not running.
3200
3201         * platform/network/curl/ResourceHandleManager.cpp:
3202         (WebCore::ResourceHandleManager::cancel):
3203
3204 2008-01-06  Alp Toker  <alp@atoker.com>
3205
3206         Reviewed by Eric.
3207
3208         Cairo canvas refcounting fix. Reference the surface in the constructor
3209         to match its destruction in the destructor.
3210
3211         Fixes a crash triggered by leaving this page:
3212           http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
3213
3214         * html/CanvasPattern.cpp:
3215         (WebCore::CanvasPattern::CanvasPattern):
3216
3217 2008-01-06  Eric Seidel  <eric@webkit.org>
3218
3219         Reviewed by darin.
3220
3221         Make attr selectors case-insensitive for certain HTML attributes
3222         http://bugs.webkit.org/show_bug.cgi?id=15470
3223
3224         Test: fast/css/html-attr-case-sensitivity.html
3225
3226         * css/CSSStyleSelector.cpp:
3227         (WebCore::addLocalNameToSet):
3228         (WebCore::createHtmlCaseInsensitiveAttributesSet):
3229         (WebCore::htmlAttributeHasCaseInsensitiveValue):
3230         (WebCore::CSSStyleSelector::checkOneSelector):
3231
3232 2008-01-06  Eric Seidel  <eric@webkit.org>
3233
3234         Reviewed by Sam.
3235
3236         Fix :checked matching type='text' and add test case
3237         http://bugs.webkit.org/show_bug.cgi?id=16750
3238
3239         Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
3240
3241         * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
3242
3243 2008-01-05  Sam Weinig  <sam@webkit.org>
3244
3245         Reviewed by Eric Seidel.
3246
3247         Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
3248         ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
3249
3250         - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
3251
3252         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
3253
3254         * dom/TreeWalker.cpp:
3255         (WebCore::TreeWalker::parentNode):
3256         (WebCore::TreeWalker::firstChild):
3257         (WebCore::TreeWalker::lastChild):
3258         (WebCore::TreeWalker::previousSibling):
3259         (WebCore::TreeWalker::nextSibling):
3260         (WebCore::TreeWalker::previousNode):
3261         (WebCore::TreeWalker::nextNode):
3262
3263 2008-01-04  Oliver Hunt  <oliver@apple.com>
3264
3265         Reviewed by Beth Dakin.
3266
3267         Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
3268         and other image repaint bugs.
3269
3270         We now cache the full local bounds for the <image> element, as otherwise certain
3271         combinations of attribute changes could result in incorrect dirty rects.
3272         Additionally we no longer use any of the integer bounds fields on RenderObject for
3273         determining repaint bounds (this was the principle cause of bug #16015).
3274
3275         I also removed the outline painting code as it was both wrong, and not correctly
3276         repainted.  I feel safe doing this as no other browser or viewer supports outline
3277         properties on svg elements.
3278
3279         I was unable to make a testcase for this unfortunately, despite seemingly deterministic 
3280         behaviour :(
3281
3282         * rendering/RenderSVGImage.cpp:
3283         (WebCore::RenderSVGImage::layout):
3284         (WebCore::RenderSVGImage::paint):
3285         (WebCore::RenderSVGImage::nodeAtPoint):
3286         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
3287         * rendering/RenderSVGImage.h:
3288
3289 2008-01-04  Beth Dakin  <bdakin@apple.com>
3290
3291         Reviewed by Oliver.
3292
3293         Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with 
3294         type="hidden" matches :enabled/:disabled (Acid3 bug)
3295
3296         Prevent :enabled and :disabled from applying to input type="hidden" 
3297
3298         * css/CSSStyleSelector.cpp:
3299         (WebCore::CSSStyleSelector::checkOneSelector): Rather than 
3300         allowing :enabled and :disabled to apply to all controls, only 
3301         allow it to apply to non-"hidden" controls
3302         * dom/Element.h:
3303         (WebCore::Element::isInputTypeHidden): 
3304         * html/HTMLInputElement.h:
3305         (WebCore::HTMLInputElement::isInputTypeHidden):
3306
3307 2008-01-04  Sam Weinig  <sam@webkit.org>
3308
3309         Reviewed by Oliver Hunt.
3310
3311         - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
3312           getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
3313           if the type of the CSSPrimitiveValue is not the same as the type requested.
3314         - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
3315
3316         Test: fast/css/CSSPrimitiveValue-exceptions.html
3317
3318         * css/CSSPrimitiveValue.cpp:
3319         (WebCore::CSSPrimitiveValue::getDoubleValue):
3320         (WebCore::CSSPrimitiveValue::getStringValue):
3321         (WebCore::CSSPrimitiveValue::getCounterValue):
3322         (WebCore::CSSPrimitiveValue::getRectValue):
3323         (WebCore::CSSPrimitiveValue::getRGBColorValue):
3324         (WebCore::CSSPrimitiveValue::getPairValue):
3325         * css/CSSPrimitiveValue.h:
3326         (WebCore::CSSPrimitiveValue::getFloatValue):
3327         (WebCore::CSSPrimitiveValue::getIntValue):
3328         (WebCore::CSSPrimitiveValue::getCounterValue):
3329         (WebCore::CSSPrimitiveValue::getRectValue):
3330         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
3331         * css/CSSPrimitiveValue.idl:
3332
3333 2008-01-04  Antti Koivisto  <antti@apple.com>
3334
3335         Reviewed by Darin.
3336         
3337         Windows part of <rdar://problem/5647034>
3338         Media tests crash if an old version of QuickTime is installed
3339
3340         Check QuickTime version on Windows too.
3341
3342         * platform/graphics/MediaPlayer.cpp:
3343         (WebCore::MediaPlayer::isAvailable):
3344         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3345         (WebCore::MediaPlayerPrivate::isAvailable):
3346         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3347         (WebCore::MediaPlayerPrivate::isAvailable):
3348         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
3349         * platform/graphics/win/QTMovieWin.cpp:
3350         (QTMovieWin::initializeQuickTime):
3351
3352 2008-01-04  Darin Adler  <darin@apple.com>
3353
3354         Reviewed by Maciej and Alice.
3355
3356         - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
3357
3358         Test: fast/images/border.html
3359
3360         * html/HTMLImageElement.cpp:
3361         (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
3362         where the border value is not a number to use the value "0" for the border width instead
3363         of not setting the border width and style at all. This matches other browsers, and makes
3364         more sense.
3365
3366 2008-01-04  Antti Koivisto  <antti@apple.com>
3367
3368         Try to fix 64-bit build
3369
3370         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3371         (WebCore::MediaPlayerPrivate::isAvailable):
3372
3373 2008-01-04  Stephanie  <slewis@apple.com>
3374
3375         Reviewed by Oliver.
3376
3377         WARNING: NO TEST CASES ADDED OR CHANGED
3378
3379         Fix another stringImpl leak.
3380
3381         * platform/text/StringImpl.cpp: remove an extra allocation
3382         (WebCore::StringImpl::StringImpl):
3383
3384 2008-01-04  Alice Liu  <alice.liu@apple.com>
3385
3386         Reviewed by Mitz.
3387
3388         * platform/graphics/win/FontCacheWin.cpp:
3389         fix loop condition that was causing crash
3390
3391 2008-01-04  Timothy Hatcher  <timothy@apple.com>
3392
3393         Reviewed by Adam Roben.
3394
3395         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
3396
3397         * page/inspector/inspector.css: Remove styles related to the toggle button
3398           and make the area always visible. 
3399         * page/inspector/inspector.html: Remove the toggle button.
3400         * page/inspector/inspector.js: Remove code to toggle the status area.
3401
3402 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
3403
3404         Reviewed by Adam Roben.
3405
3406         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
3407
3408         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
3409
3410 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
3411
3412         Reviewed by Darin.
3413
3414         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
3415
3416         Enable the fix on Windows.
3417
3418         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
3419         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
3420
3421         * xml/XSLTUnicodeSort.cpp:
3422         (WebCore::xsltUnicodeSortFunction):
3423         * xml/XSLTUnicodeSort.h:
3424         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
3425
3426 2008-01-04  Antti Koivisto  <antti@apple.com>
3427
3428         Fix build.
3429
3430         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3431
3432 2008-01-04  Antti Koivisto  <antti@apple.com>
3433
3434         Reviewed by Darin.
3435         
3436         Partial fix for <rdar://problem/5647034>
3437         Media tests crash if an old version of QuickTime is installed
3438
3439         Disable media support if QuickTime is not current enough (>=7.3).
3440         
3441         Windows patch coming soon.
3442
3443         * bindings/js/JSHTMLElementWrapperFactory.cpp:
3444         (WebCore::createJSHTMLWrapper):
3445         * bindings/js/kjs_window.cpp:
3446         (KJS::Window::getValueProperty):
3447         * html/HTMLElementFactory.cpp:
3448         (WebCore::audioConstructor):
3449         (WebCore::videoConstructor):
3450         (WebCore::sourceConstructor):
3451         * platform/graphics/MediaPlayer.cpp:
3452         (WebCore::MediaPlayer::isAvailable):
3453         * platform/graphics/MediaPlayer.h:
3454         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3455         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3456         (WebCore::MediaPlayerPrivate::isAvailable):
3457
3458 2008-01-04  Timothy Hatcher  <timothy@apple.com>
3459
3460         Reviewed by Darin Adler.
3461
3462         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
3463
3464         Check if the property is a getter before asking for the value.
3465         If the property is a getter, we no longer show the value.
3466
3467         * page/inspector/PropertiesSidebarPane.js:
3468         * page/inspector/inspector.css:
3469
3470 2008-01-04  Dan Bernstein  <mitz@apple.com>
3471
3472         Reviewed by Darin Adler.
3473
3474         - fix synthetic bold and italic on Windows
3475
3476         Covered by an existing test.
3477
3478         * platform/graphics/win/FontPlatformDataWin.cpp:
3479         (WebCore::FontPlatformData::FontPlatformData):
3480
3481 2008-01-04  Alp Toker  <alp@atoker.com>
3482
3483         GTK+ autotools build fix. Terminate empty rules.
3484
3485         * GNUmakefile.am:
3486
3487 2008-01-04  Lars Knoll  <lars@trolltech.com>
3488
3489         Reviewed by Simon.
3490
3491         Remove most dependencies of Widget/ScrollView onto native QWidgets.
3492
3493         This also brings the code closer in line with the Windows code. Seems
3494         to work nicely on first try :)
3495
3496         * page/qt/FrameQt.cpp:
3497         (WebCore::Frame::createScriptInstanceForWidget):
3498         * platform/Widget.h:
3499         * platform/qt/PlatformScreenQt.cpp:
3500         (WebCore::screenDepth):
3501         (WebCore::screenDepthPerComponent):
3502         (WebCore::screenIsMonochrome):
3503         (WebCore::screenRect):
3504         * platform/qt/PlatformScrollBarQt.cpp:
3505         (WebCore::PlatformScrollbar::thumbPosition):
3506         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
3507         * platform/qt/ScrollViewQt.cpp:
3508         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3509         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
3510         (WebCore::ScrollView::updateContents):
3511         (WebCore::ScrollView::update):
3512         (WebCore::ScrollView::scrollRectIntoViewRecursively):
3513         (WebCore::ScrollView::updateScrollbars):
3514         (WebCore::ScrollView::addChild):
3515         (WebCore::ScrollView::removeChild):
3516         (WebCore::ScrollView::paint):
3517         * platform/qt/WidgetQt.cpp:
3518         (WebCore::WidgetPrivate::WidgetPrivate):
3519         (WebCore::WidgetPrivate::~WidgetPrivate):
3520         (WebCore::Widget::frameGeometry):
3521         (WebCore::Widget::setFrameGeometry):
3522         (WebCore::Widget::setCursor):
3523         (WebCore::Widget::show):
3524         (WebCore::Widget::hide):
3525         (WebCore::Widget::nativeWidget):
3526         (WebCore::Widget::setNativeWidget):
3527         (WebCore::Widget::suppressInvalidation):
3528         (WebCore::Widget::setSuppressInvalidation):
3529         (WebCore::Widget::invalidateRect):
3530         (WebCore::Widget::topLevel):
3531         (WebCore::Widget::containingWindow):
3532
3533 2008-01-04  Lars Knoll  <lars@trolltech.com>
3534
3535         Reviewed by Simon.
3536
3537         make QWebPage a QObject and get things to compile.
3538
3539         Nothing works currently though.
3540
3541         * platform/qt/ScrollViewQt.cpp:
3542         (WebCore::ScrollView::updateContents):
3543         (WebCore::ScrollView::update):
3544         * platform/qt/WidgetQt.cpp:
3545         (WebCore::Widget::qwidget):
3546         (WebCore::Widget::invalidateRect):
3547
3548 2008-01-04  Alp Toker  <alp@atoker.com>
3549
3550         Reviewed by Mark Rowe.
3551
3552         http://bugs.webkit.org/show_bug.cgi?id=16667
3553         make -j is failing with the autotools based system
3554
3555         Support parallel code generation. Nearly every use of explicit
3556         multiple targets was a potential concurrency bug, though in practice
3557         the bison rules were the first to be noticed because they took longer
3558         to complete and broke the build immediately.
3559
3560         * GNUmakefile.am:
3561
3562 2008-01-04  Alp Toker  <alp@atoker.com>
3563
3564         Reviewed by Mark Rowe.
3565
3566         Re-use a single static dummy surface rather than creating and
3567         destroying a surface for each CairoPath.
3568
3569         * platform/graphics/cairo/CairoPath.h:
3570         (WebCore::CairoPath::CairoPath):
3571
3572 2008-01-04  Mark Rowe  <mrowe@apple.com>
3573
3574         Tiger build fix.
3575
3576         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
3577
3578 2008-01-03  Mark Rowe  <mrowe@apple.com>
3579
3580         Reviewed by Maciej Stachowiak.
3581
3582         Use platform-provided atomic operations in place of inline assembly to
3583         increase portability.
3584
3585         * platform/Threading.h:
3586         (WebCore::atomicIncrement):
3587         (WebCore::atomicDecrement):
3588
3589 2008-01-03  Oliver Hunt  <oliver@apple.com>
3590
3591         Reviewed by Maciej.
3592
3593         Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
3594
3595         We need to cache the absolute bounds of the <image>,
3596         as there's no reliable way to recompute the old bounding
3597         box one we have started layout.
3598