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