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