2007-12-29 Jan Michael Alonzo <jmalonzo@unpluggable.com>
[WebKit.git] / WebCore / ChangeLog
1 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2
3         Reviewed by Alp Toker.
4
5         http://bugs.webkit.org/show_bug.cgi?id=16669
6         autotools update and fixes
7
8         Autotools update and database/icon database inclusion guard fixes
9
10         * GNUmakefile.am:
11           - Update autotools config as per -r29012 changes
12           - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
13         * dom/Document.cpp:
14         * loader/icon/IconDatabase.h:
15         * page/DOMWindow.cpp:
16         * page/InspectorController.cpp:
17         * page/Settings.cpp:
18         * storage/Database.h:
19           - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
20
21 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
22
23         Reviewed by Alexey.
24
25         Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
26         (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
27
28         * svg/SVGFont.cpp:
29         (WebCore::Font::drawGlyphsWithSVGFont):
30
31 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
32
33         Reviewed by Oliver.
34
35         Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
36         SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
37
38         * platform/graphics/FontData.cpp:
39         (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
40         (WebCore::FontData::ascent):
41         (WebCore::FontData::descent):
42         * platform/graphics/FontData.h:
43         * svg/SVGFont.cpp:
44         (WebCore::isVerticalWritingMode): Add helper function.
45         (WebCore::Font::drawGlyphsWithSVGFont):
46         * svg/SVGFontElement.cpp:
47         (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
48         * svg/SVGGlyphElement.cpp:
49         (WebCore::parseArabicForm): Helper function.
50         (WebCore::parseOrientation): Ditto.
51         (WebCore::parsePathData): Ditto.
52         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
53         * svg/SVGGlyphElement.h:
54         (WebCore::SVGGlyphElement::rendererIsNeeded):
55
56 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
57
58         Reviewed by Oliver.
59
60         Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
61         SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
62
63         * svg/SVGAnimationElement.cpp:
64         (WebCore::SVGAnimationElement::parseMappedAttribute):
65         * svg/SVGParserUtilities.cpp:
66         (WebCore::parseDelimitedString):
67         * svg/SVGParserUtilities.h:
68
69 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
70
71         Reviewed by Maciej.
72
73         Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
74         Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
75
76         To optimize for the common case ('FontData' used for HTML rendering) it feels
77         better to hold one OwnPtr in FontData, than several floats.
78
79         Parse all <font> attributes in SVGFontFaceElement::createFontData.
80
81         * platform/graphics/FontData.cpp:
82         (WebCore::SVGFontData::SVGFontData):
83         (WebCore::FontData::FontData):
84         (WebCore::FontData::ascent):
85         (WebCore::FontData::descent):
86         * platform/graphics/FontData.h:
87         (WebCore::FontData::isSVGFont):
88         (WebCore::FontData::svgFontData):
89         * svg/SVGFont.cpp:
90         (WebCore::Font::drawGlyphsWithSVGFont):
91         * svg/SVGFontElement.cpp:
92         * svg/SVGFontElement.h:
93         (WebCore::SVGFontElement::rendererIsNeeded):
94         * svg/SVGFontFaceElement.cpp:
95         (WebCore::SVGFontFaceElement::unitsPerEm):
96         (WebCore::SVGFontFaceElement::createFontData):
97
98 2007-12-28  Darin Adler  <darin@apple.com>
99
100         - try to fix Windows and WX builds (broken by SVG Fonts check-in)
101
102         * platform/graphics/win/FontWin.cpp:
103         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
104         I can't see how it can be right to require the font size for ascent and descent,
105         but not for other metrics functions in FontData.
106
107         * platform/graphics/wx/FontWx.cpp:
108         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
109
110 2007-12-28  Dan Bernstein  <mitz@apple.com>
111
112         Reviewed by Mark Rowe.
113
114         - fix http://bugs.webkit.org/show_bug.cgi?id=16650
115           <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
116
117         Covered by existing pixel tests.
118
119         * platform/graphics/mac/FontMac.mm:
120         (WebCore::Font::drawComplexText): Corrected to maintain the style
121         information in the adjusted text run when passing it to
122         ATSUILayoutParameters. Prior to r28298 the style was passed separately.
123
124 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
125
126         Build fix, not reviewed.
127
128         Add wtf/OwnPtr.h include, to fix --svg-fonts build.
129
130         * css/SVGCSSFontFace.h:
131
132 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
133
134         Reviewed by Eric.
135
136         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
137
138         Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
139         Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
140         are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
141
142         Limited to single char <-> glyph mapping, no ligatures supported yet.
143         (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
144
145         Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
146
147         No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
148         attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
149
150         * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
151         * WebCore.pro: Updated build system.
152         * WebCore.vcproj/WebCore.vcproj: Ditto.
153         * WebCore.xcodeproj/project.pbxproj: Ditto.
154         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
155         * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
156         (WebCore::createElementClassMap):
157         * bindings/objc/DOMInternal.h: Ditto.
158         * bindings/objc/DOMSVG.h: Ditto.
159         * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
160         * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
161         (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
162         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
163         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
164         * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
165         (WebCore::CSSFontSelector::addFontFaceRule):
166         * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
167         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
168         (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
169         (WebCore::SVGCSSFontFace::isValid):
170         (WebCore::SVGCSSFontFace::addSource):
171         (WebCore::SVGCSSFontFace::getFontData):
172         * css/SVGCSSFontFace.h: Added.
173         * platform/graphics/cg/PathCG.cpp:
174         (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
175         * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
176         (WebCore::Font::ascent): Pass font size to FontData::ascent() call
177         (WebCore::Font::descent): Pass font size to FontData::descent() call
178         (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
179         (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
180         * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
181         (WebCore::TextRun::TextRun):
182         (WebCore::TextRun::referencingRenderObject):
183         (WebCore::TextRun::setReferencingRenderObject):
184         * platform/graphics/FontData.cpp:
185         (WebCore::FontData::FontData):
186         (WebCore::FontData::ascent):
187         (WebCore::FontData::descent):
188         * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
189         (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
190         (WebCore::FontData::svgFontFace):
191         * rendering/SVGInlineTextBox.cpp:
192         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
193         * rendering/SVGRootInlineBox.cpp:
194         (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
195         * svg/SVGFont.cpp: Added.
196         (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
197         * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
198         (WebCore::SVGFontElement::SVGFontElement):
199         (WebCore::SVGFontElement::~SVGFontElement):
200         (WebCore::SVGFontElement::parseMappedAttribute):
201         (WebCore::SVGFontElement::collectGlyphs):
202         (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
203         * svg/SVGFontElement.h: Added.
204         (WebCore::GlyphHash::hash):
205         (WebCore::GlyphHash::equal):
206         (WebCore::GlyphHashTraits::deletedValue):
207         (WebCore::SVGFontElement::rendererIsNeeded):
208         (WebCore::SVGFontElement::contextElement):
209         * svg/SVGFontElement.idl: Added.
210         * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
211         (WebCore::SVGFontFaceElement::unitsPerEm):
212         (WebCore::SVGFontFaceElement::fontFamily):
213         (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
214         (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
215         (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
216         (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
217         * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
218         * svg/SVGFontFaceElement.idl: Ditto.
219         * svg/SVGFontFaceFormatElement.cpp: Ditto.
220         * svg/SVGFontFaceFormatElement.h: Ditto.
221         * svg/SVGFontFaceFormatElement.idl: Ditto.
222         * svg/SVGFontFaceNameElement.cpp: Ditto.
223         * svg/SVGFontFaceNameElement.h: Ditto.
224         * svg/SVGFontFaceNameElement.idl: Ditto.
225         * svg/SVGFontFaceSrcElement.cpp: Ditto.
226         * svg/SVGFontFaceSrcElement.h: Ditto.
227         * svg/SVGFontFaceSrcElement.idl: Ditto.
228         * svg/SVGFontFaceUriElement.cpp: Ditto.
229         * svg/SVGFontFaceUriElement.h: Ditto.
230         * svg/SVGFontFaceUriElement.idl: Ditto.
231         * svg/SVGDefinitionSrcElement.cpp: Ditto.
232         * svg/SVGDefinitionSrcElement.h: Ditto.
233         * svg/SVGDefinitionSrcElement.idl: Ditto.
234         * svg/SVGGlyphElement.cpp: Added.
235         (WebCore::SVGGlyphElement::SVGGlyphElement):
236         (WebCore::SVGGlyphElement::parseMappedAttribute):
237         (WebCore::SVGGlyphElement::childrenChanged):
238         * svg/SVGGlyphElement.h: Added.
239         (WebCore::SVGGlyphElement::rendererIsNeeded):
240         (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
241         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
242         * svg/SVGGlyphElement.idl: Added.
243         * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
244         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
245         (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
246         (WebCore::SVGMissingGlyphElement::childrenChanged):
247         * svg/SVGMissingGlyphElement.h: Added.
248         (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
249         * svg/SVGMissingGlyphElement.idl: Added.
250         * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!).
251
252 2007-12-27  Dan Bernstein  <mitz@apple.com>
253
254         Reviewed by Alexey Proskuryakov.
255
256         - fix http://bugs.webkit.org/show_bug.cgi?id=16628
257           ASSERTION FAILED: m_resizeLayer (running layout tests)
258
259         * rendering/RenderLayer.cpp:
260         (WebCore::RenderLayer::~RenderLayer): Avoid calling
261         EventHandler::resizeLayerDestroyed() if the document is being destroyed.
262
263 2007-12-27  Dan Bernstein  <mitz@apple.com>
264
265         Reviewed by Oliver Hunt.
266
267         - fix http://bugs.webkit.org/show_bug.cgi?id=16603
268           <rdar://problem/5664199> Crash when resizing text field
269
270         Test: fast/layers/resize-layer-deletion-crash.html
271
272         The event handler has only a weak reference to the layer that is
273         currently in resize mode, so it is the layer's responsibility to let
274         the event handler know if it has been destroyed while in that mode.
275
276         * page/EventHandler.cpp:
277         (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
278         m_resizeLayer to 0.
279         * page/EventHandler.h:
280         * rendering/RenderLayer.cpp:
281         (WebCore::RenderLayer::~RenderLayer): Added a call to
282         EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
283
284 2007-12-27  Collin Jackson  <webkit@collinjackson.com>
285
286         Reviewed by Sam Weinig.
287
288         http://bugs.webkit.org/show_bug.cgi?id=16539
289         <rdar://problem/5659269>
290
291         The same-origin check was missing in the implementation of 
292         setTimeout, setInterval, addEventListener, and removeEventListener.
293
294         Suppose <http://www.badguy.com/> contains an iframe to 
295         <http://www.goodguy.com/>. Now www.badguy.com can steal
296         www.goodguy.com cookies by running this code:
297
298         setTimeout.call(frames[0], "alert(document.cookie)", 1000);
299
300         This patch changes the behavior so that setTimeout to does 
301         nothing and returns an undefined value if the caller is not
302         permitted to script the window whose setTimeout method is being
303         called. The same applies to setInterval, addEventListener, and 
304         removeEventListener.
305
306         Tests: http/tests/security/cross-frame-access-call.html
307
308         * bindings/js/kjs_window.cpp:
309         (KJS::WindowProtoFuncSetTimeout::callAsFunction)
310         (KJS::WindowProtoFuncSetInterval::callAsFunction)
311         (KJS::WindowProtoFuncAddEventListener::callAsFunction)
312         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
313
314 2007-12-27  Dan Bernstein  <mitz@apple.com>
315
316         Reviewed by Dave Hyatt and Sam Weinig.
317
318         - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
319
320         Test: fast/layers/add-layer-with-nested-stacking.html
321         Test: fast/layers/remove-layer-with-nested-stacking.html
322
323         * rendering/RenderLayer.cpp:
324         (WebCore::RenderLayer::addChild): If the new child is overflow-only
325         but has children of its own, dirty the stacking context's z-order lists
326         since the grandchildren might need to be in them.
327         (WebCore::RenderLayer::removeChild): Similarly for the old child.
328
329 2007-12-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
330
331         Reviewed by Alp Toker.
332
333         http://bugs.webkit.org/show_bug.cgi?id=16353
334         [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
335
336         Added the flags mentioned in the bug only when doing 'debug'
337         builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
338
339         * GNUmakefile.am:
340         * WebCore.pro:
341
342 2007-12-27  Dan Bernstein  <mitz@apple.com>
343
344         Reviewed by Eric Seidel.
345
346         - fix http://bugs.webkit.org/show_bug.cgi?id=16490
347           ASSERT in ~FrameView while viewing/reloading WICD test case
348
349         Test: fast/dynamic/paused-event-dispatch.html
350
351         * page/FrameView.cpp:
352         (WebCore::FrameView::~FrameView):
353         (WebCore::FrameView::layout): Changed to always pause event dispatch and
354         always resume event dispatch, regardless of whether the post-layout
355         task timer is active. However, if it is active, assert that event
356         dispatch is still paused.
357
358 2007-12-27  Alexey Proskuryakov  <ap@webkit.org>
359
360         Reviewed by Maciej.
361
362         http://bugs.webkit.org/show_bug.cgi?id=14500
363         need to be more generous about charset declaration with meta tag
364         
365         http://bugs.webkit.org/show_bug.cgi?id=12526
366         <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
367
368         <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
369
370         <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
371
372         Tests: fast/encoding/ahram-org-eg.html
373                fast/encoding/bandai-co-jp-releases.html
374                fast/encoding/floraexpress-ru.html
375                fast/encoding/hanarei-blog32-fc2-com.html
376                fast/encoding/yahoo-mail.html
377
378         * loader/TextResourceDecoder.cpp:
379         (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
380         seen at least 512 bytes of input.
381
382 2007-12-26  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
383
384         Reviewed by Alp Toker.
385
386         http://bugs.webkit.org/show_bug.cgi?id=16390
387         Use autotools or GNU make as the build system for the GTK port
388
389         * GNUmakefile.am: Added.
390
391 2007-12-26  Alexey Proskuryakov  <ap@webkit.org>
392
393         Reviewed by Sam Weinig.
394
395         http://bugs.webkit.org/show_bug.cgi?id=16609
396         Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
397
398         * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
399
400 2007-12-26  Mark Rowe  <mrowe@apple.com>
401
402         Windows build fix.
403
404         * platform/Threading.h:
405
406 2007-12-25  Rob Buis  <buis@kde.org>
407
408         Reviewed by Eric.
409
410         http://bugs.webkit.org/show_bug.cgi?id=15514
411         <clipPath> with <use> not respected
412         http://bugs.webkit.org/show_bug.cgi?id=16557
413         SVG circle elements have been clipped away completely, instead of partially.
414
415         Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
416
417         * svg/SVGClipPathElement.cpp:
418         (WebCore::SVGClipPathElement::canvasResource):
419         * svg/SVGStyledTransformableElement.h:
420         (WebCore::SVGStyledTransformableElement::toClipPath):
421         * svg/SVGUseElement.cpp:
422         (WebCore::isDirectReference):
423         (WebCore::SVGUseElement::toClipPath):
424         * svg/SVGUseElement.h:
425
426 2007-12-25  Sam Weinig  <sam@webkit.org>
427
428         Reviewed by Eric Seidel.
429
430         Clean up the files relating to NodeLists.
431
432         * dom/ChildNodeList.cpp:
433         (WebCore::ChildNodeList::ChildNodeList):
434         (WebCore::ChildNodeList::length):
435         (WebCore::ChildNodeList::item):
436         (WebCore::ChildNodeList::nodeMatches):
437         * dom/ChildNodeList.h:
438         * dom/DynamicNodeList.cpp:
439         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
440         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
441         (WebCore::DynamicNodeList::itemWithName):
442         * dom/DynamicNodeList.h:
443         (WebCore::DynamicNodeList::needsNotifications):
444         * dom/NameNodeList.cpp:
445         (WebCore::NameNodeList::NameNodeList):
446         (WebCore::NameNodeList::rootNodeAttributeChanged):
447         (WebCore::NameNodeList::nodeMatches):
448         * dom/NameNodeList.h:
449         * dom/NodeList.h:
450         * dom/SelectorNodeList.h:
451
452 2007-12-25  Sam Weinig  <sam@webkit.org>
453
454         Fix non-mac builds.
455
456         * WebCore.pro:
457         * WebCore.vcproj/WebCore.vcproj:
458         * WebCoreSources.bkl:
459
460 2007-12-25  Sam Weinig  <sam@webkit.org>
461
462         Rubber stamped by Eric Seidel.
463
464         Move TagNodeList into its own file.
465
466         * WebCore.xcodeproj/project.pbxproj:
467         * dom/Node.cpp:
468         * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
469         (WebCore::TagNodeList::TagNodeList):
470         * dom/TagNodeList.h: Copied from dom/Node.cpp.
471
472 2007-12-25  Sam Weinig  <sam@webkit.org>
473
474         Reviewed by Eric Seidel.
475
476         Simplify the NodeList architecture.
477         - Rename recursiveItem() to item(), since it is not recursive.
478         - Make recursiveLength() iterative and rename to length().
479         - Remove now unneeded overrides of item() and length() that used 
480           to call the recursive variants.
481
482         * dom/ClassNodeList.cpp:
483         * dom/ClassNodeList.h:
484         * dom/DynamicNodeList.cpp:
485         (WebCore::DynamicNodeList::length):
486         (WebCore::DynamicNodeList::item):
487         (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation 
488         into the .cpp file since virtual methods can't be inlined.
489         * dom/DynamicNodeList.h:
490         * dom/NameNodeList.cpp:
491         * dom/NameNodeList.h:
492         * dom/Node.cpp:
493
494 2007-12-25  Alp Toker  <alp@atoker.com>
495
496         More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
497         r28981.
498
499         * WebCore.pro:
500         * WebCore.vcproj/WebCore.vcproj:
501         * WebCoreSources.bkl:
502
503 2007-12-25  Alp Toker  <alp@atoker.com>
504
505         Win build fix for breakage introduced in r28981.
506
507         * WebCore.vcproj/WebCore.vcproj:
508
509 2007-12-25  Alp Toker  <alp@atoker.com>
510
511         Wx build fix for breakage introduced in r28981.
512
513         * WebCoreSources.bkl:
514
515 2007-12-25  Alp Toker  <alp@atoker.com>
516
517         GTK+/Qt build fix for breakage introduced in r28981.
518
519         * WebCore.pro:
520
521 2007-12-25  David Smith  <catfish.man@gmail.com> and Sam Weinig  <sam@webkit.org>
522
523         Reviewed by Oliver.
524         
525         - http://bugs.webkit.org/show_bug.cgi?id=16587
526         Implement the most useful part of the W3C Selectors API.
527
528         * WebCore.xcodeproj/project.pbxproj:
529         * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
530         * dom/ChildNodeList.cpp:
531         (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
532         * dom/ChildNodeList.h:
533         * dom/ClassNodeList.cpp:
534         (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
535         * dom/ClassNodeList.h:
536         * dom/Document.idl: Add the new functions
537         * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
538         (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
539         (WebCore::DynamicNodeList::~DynamicNodeList):
540         (WebCore::DynamicNodeList::recursiveLength):
541         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
542         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
543         (WebCore::DynamicNodeList::recursiveItem):
544         (WebCore::DynamicNodeList::itemWithName):
545         (WebCore::DynamicNodeList::rootNodeChildrenChanged):
546         (WebCore::DynamicNodeList::Caches::Caches):
547         (WebCore::DynamicNodeList::Caches::reset):
548         * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
549         (WebCore::DynamicNodeList::rootNodeAttributeChanged):
550         * dom/Element.idl: Add the new functions
551         * dom/NameNodeList.cpp: Change to being a DynamicNodeList
552         (WebCore::NameNodeList::NameNodeList):
553         * dom/NameNodeList.h:
554         (WebCore::NameNodeList::rootNodeAttributeChanged):
555         * dom/Node.cpp:
556         (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
557         (WebCore::Node::registerDynamicNodeList):
558         (WebCore::Node::unregisterDynamicNodeList):
559         (WebCore::Node::getElementsByName):
560         (WebCore::Node::getElementsByClassName):
561         (WebCore::Node::querySelector): new
562         (WebCore::Node::querySelectorAll): new
563         * dom/Node.h:
564         * dom/NodeList.cpp: Removed.
565         * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
566         (WebCore::NodeList::NodeList):
567         (WebCore::NodeList::~NodeList):
568         * dom/SelectorNodeList.cpp: Added.
569         (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
570         * dom/SelectorNodeList.h: Added.
571         * dom/StaticNodeList.cpp: Added.
572         (WebCore::StaticNodeList::length):
573         (WebCore::StaticNodeList::item):
574         (WebCore::StaticNodeList::itemWithName):
575         * dom/StaticNodeList.h: Added.
576         (WebCore::StaticNodeList::StaticNodeList):
577         (WebCore::StaticNodeList::~StaticNodeList):
578
579 2007-12-25  Mark Rowe  <mrowe@apple.com>
580
581         Reviewed by Sam Weinig.
582
583         Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
584         http://bugs.webkit.org/show_bug.cgi?id=16596
585
586         This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
587         of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
588         access to a single ThreadSafeShared object.
589
590         The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
591
592         * platform/Threading.h:
593         (WebCore::atomicIncrement):
594         (WebCore::atomicDecrement):
595         (WebCore::ThreadSafeShared::ThreadSafeShared):
596         (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
597         (WebCore::ThreadSafeShared::deref): Ditto.
598         (WebCore::ThreadSafeShared::hasOneRef):
599         (WebCore::ThreadSafeShared::refCount):
600         (WebCore::ThreadSafeShared::isThreadSafe):
601
602 2007-12-24  Darin Adler  <darin@apple.com>
603
604         * platform/text/PlatformString.h: Removed now-incorrect comment.
605         Added a comment about copy().
606         * platform/text/StringImpl.h: Added a comment about copy().
607
608 2007-12-24  Darin Adler  <darin@apple.com>
609
610         Reviewed by Maciej.
611
612         - http://bugs.webkit.org/show_bug.cgi?id=16550
613           make StringImpl immutable
614
615         I tried to keep the changes to a minimum. In some cases there is
616         room for optimization -- I didn't try to add in the "single ref count"
617         optimizations and there might be a tiny bit more string copying than
618         we had before.
619
620         * WebCore.base.exp: Updated.
621
622         * dom/CharacterData.cpp:
623         (WebCore::CharacterData::appendData): Changed to use String since
624         StringImpl doesn't have mutating functions any more.
625         (WebCore::CharacterData::insertData): Ditto.
626         (WebCore::CharacterData::deleteData): Ditto.
627         (WebCore::CharacterData::replaceData): Ditto.
628         * dom/Text.cpp:
629         (WebCore::Text::splitText): Changed to use substring instead of
630         remove since StringImpl does't have mutating functions any more.
631         * editing/CompositeEditCommand.cpp:
632         (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
633         to use String instead of StringImpl so we can use remove.
634
635         * platform/text/PlatformString.h: Removed newUninitialized.
636         Added append that takes a character pointer and length.
637
638         * platform/text/String.cpp:
639         (WebCore::String::insert): Added an implementation that does not
640         rely on an underlying StringImpl function.
641         (WebCore::String::append): Ditto.
642         (WebCore::String::truncate): Ditto.
643         (WebCore::String::remove): Ditto.
644         (WebCore::String::charactersWithNullTermination): Added an
645         implementation that uses the new StringImpl null termination feature,
646         which does not require modifying a string.
647
648         * platform/text/StringImpl.cpp:
649         (WebCore::isSpace): Fix comment.
650         (WebCore::StringImpl::StringImpl): Added a new constructor that makes
651         a string with a trailing null character.
652         (WebCore::StringImpl::substring): Marked const.
653         (WebCore::StringImpl::replace): Marked const; had to add quite a few
654         const_cast. Also rewrote one of these to work without modifying the
655         existing string.
656
657         * platform/text/StringImpl.h: Fixed a mistake where the empty string had
658         m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
659         for creating strings that have a trailing null character. Added a
660         hasTerminatingNullCharacter function. Removed newUninitialized,
661         charactersWithNullTermination, append, insert, truncate, and remove.
662         Marked lots of other functions const.
663
664         * platform/text/TextCodecLatin1.cpp:
665         (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
666         newUninitialized.
667         * platform/text/TextCodecUTF16.cpp:
668         (WebCore::TextCodecUTF16::decode): Ditto.
669         * platform/text/TextCodecUserDefined.cpp:
670         (WebCore::TextCodecUserDefined::decode): Ditto.
671
672         * rendering/RenderStyle.cpp:
673         (WebCore::RenderStyle::setContent): Changed to use String since
674         StringImpl doesn't have mutating functions any more.
675
676 2007-12-24  Alexey Proskuryakov  <ap@webkit.org>
677
678         Reviewed by Oliver.
679
680         Fix fast/events/arrow-keys-on-body.html, failing on Windows.
681
682         * platform/win/KeyEventWin.cpp:
683         (WebCore::isKeypadEvent):
684         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
685         Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
686
687 2007-12-23  Alexey Proskuryakov  <ap@webkit.org>
688
689         Fix Debug and Release QTMovieWin bulds.
690
691         * WebCore.vcproj/QTMovieWin.vcproj:
692         * WebCore.vcproj/debug.vsprops:
693         * WebCore.vcproj/debug_internal.vsprops:
694         * WebCore.vcproj/release.vsprops:
695         Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
696         Build release import lib into \lib, not \bin.
697
698 2007-12-23  Alp Toker  <alp@atoker.com>
699
700         Reviewed by Holger Freyther.
701
702         http://bugs.webkit.org/show_bug.cgi?id=15382
703         [CAIRO] Canvas pattern support
704
705         http://bugs.webkit.org/show_bug.cgi?id=16577
706         Merge Cairo enhancements from Apollo project
707
708         Add support for canvas patterns.
709
710         Make Image::nativeImageForCurrentFrame() public.
711
712         Fix some typos along the way.
713
714         The globalAlpha canvas fixes are not included in this patch as
715         they're slightly more intrusive and may conflict conceptually with
716         GraphicsContext::setAlpha().
717
718         * html/CanvasPattern.cpp:
719         (WebCore::CanvasPattern::CanvasPattern):
720         (WebCore::CanvasPattern::~CanvasPattern):
721         (WebCore::CanvasPattern::createPattern):
722         * html/CanvasPattern.h:
723         (WebCore::CanvasPattern::platformImage):
724         * html/CanvasRenderingContext2D.cpp:
725         (WebCore::CanvasRenderingContext2D::setShadow):
726         (WebCore::CanvasRenderingContext2D::applyShadow):
727         (WebCore::CanvasRenderingContext2D::drawImage):
728         (WebCore::CanvasRenderingContext2D::createPattern):
729         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
730         (WebCore::CanvasRenderingContext2D::applyFillPattern):
731         * platform/graphics/Image.h:
732         (WebCore::Image::nativeImageForCurrentFrame):
733
734 2007-12-23  Kevin Ollivier  <kevino@theolliviers.com>
735
736         Reviewed by Eric Seidel.
737
738         Remove getWxBitmap as we have nativeImageForCurrentFrame now,
739         and don't draw a border in fillRect.
740
741         * platform/graphics/BitmapImage.h:
742         * platform/graphics/wx/GraphicsContextWx.cpp:
743         (WebCore::GraphicsContext::fillRect):
744         * platform/graphics/wx/ImageWx.cpp:
745
746 2007-12-23  Alp Toker  <alp@atoker.com>
747
748         Reviewed by Holger Freyther.
749
750         http://bugs.webkit.org/show_bug.cgi?id=16577
751         Merge Cairo enhancements from Apollo project
752
753         This patch is based on initial merging work by Brent Fulgham. Adobe's
754         code has been modified in a few places to better suit the existing
755         coding style.
756
757         Implement more clipping and drawing functions.
758
759         Save and restore the fill rule manually when clipping.
760
761         Avoid image surface creation when the image buffer has height zero.
762
763         * platform/graphics/cairo/GraphicsContextCairo.cpp:
764         (WebCore::GraphicsContext::clip):
765         (WebCore::GraphicsContext::addInnerRoundedRectClip):
766         (WebCore::GraphicsContext::addPath):
767         (WebCore::GraphicsContext::clipOut):
768         (WebCore::GraphicsContext::clipOutEllipseInRect):
769         (WebCore::GraphicsContext::fillRoundedRect):
770         * platform/graphics/cairo/ImageSourceCairo.cpp:
771         (WebCore::ImageSource::createFrameAtIndex):
772
773 2007-12-23  Nikolas Zimmermann  <zimmermann@kde.org>
774
775         Reviewed by Mark.
776
777         Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
778
779         * bindings/objc/DOM.mm:
780         (WebCore::createElementClassMap):
781
782 2007-12-22  Alp Toker  <alp@atoker.com>
783
784         GTK+ build fix
785
786         GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
787         empty target flags for now.
788
789         Check GTK+, not GLib versions, since they are different.
790
791         * platform/gtk/PasteboardGtk.cpp:
792         (WebCore::Pasteboard::documentFragment):
793
794 2007-12-22  Luca Bruno  <lethalman88@gmail.com>
795
796         Reviewed by Alp Toker.
797
798         http://bugs.webkit.org/show_bug.cgi?id=16311
799         [Gtk] Copy rich text to clipboard as text/plain and text/html.
800
801         Hook into the WebView to get the correct clipboard object on the
802         appropriate display. This is necessary because GTK+ does not have
803         global clipboards.
804
805         * WebCore.pro:
806         * platform/Pasteboard.h:
807         (WebCore::Pasteboard::setHelper): added for GTK
808         (WebCore::Pasteboard::m_helper): private added for GTK
809         * platform/gtk/PasteboardGtk.cpp:
810         (WebCore::PasteboardSelectionData): added to support GTK selection data callback
811         (WebCore::clipboard_get_contents_cb): added
812         (WebCore::clipboard_clear_contents_cb): added
813         (WebCore::Pasteboard::~Pasteboard):
814         (WebCore::Pasteboard::setHelper):
815         (WebCore::Pasteboard::writeSelection): copy rich text
816         (WebCore::Pasteboard::documentFragment): 
817         (WebCore::Pasteboard::plainText): 
818         * platform/gtk/PasteboardHelper.h: Added.
819
820 2007-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
821
822         Reviewed by Oliver.
823
824         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
825
826         Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
827         SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
828         for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
829         in Web Inspector.
830
831         * rendering/InlineBox.h:
832         (WebCore::InlineBox::isSVGRootInlineBox):
833         * rendering/SVGInlineTextBox.cpp:
834         (WebCore::SVGInlineTextBox::svgRootInlineBox):
835         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
836         (WebCore::SVGInlineTextBox::selectionRect):
837         * rendering/SVGRenderTreeAsText.cpp:
838         (WebCore::writeSVGInlineTextBox):
839         * rendering/SVGRootInlineBox.h:
840         (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
841
842 2007-12-22  Alp Toker  <alp@atoker.com>
843
844         LOW_BANDWIDTH_DISPLAY build fix
845
846         Track recent KURL DeprecatedString changes.
847
848         * loader/FrameLoader.cpp:
849         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
850
851 2007-12-22  Dan Bernstein  <mitz@apple.com>
852
853         - Windows build fix
854
855         * WebCore.vcproj/WebCore.vcproj:
856
857 2007-12-22  Xan Lopez  <xan@gnome.org>
858
859         Reviewed by Alp Toker.
860
861         Add missing return 0 to fix a compile warning.
862
863         * page/gtk/FrameGtk.cpp:
864         (WebCore::Frame::createScriptInstanceForWidget):
865
866 2007-12-21  Antti Koivisto  <antti@apple.com>
867
868         Reviewed by Darin, Adam and Steve.
869
870         Add media playback support for Windows.
871         
872         The implementation uses low level QuickTime API. DLL is
873         needed to work around CF use in both WebKit and QuickTime.
874         
875         This makes Windows build depend on the QuickTime SDK 
876         
877         http://developer.apple.com/quicktime/download/
878         
879         but not QuickTime itself.
880         
881         QTMovieWinTimer contains some copy code from SharedTimerWin. It
882         is used in the QuickTime access DLL which can't use WebCore
883         SharedTimer due to dependency problems.
884
885         * WebCore.vcproj/QTMovieWin.vcproj: Added.
886         * WebCore.vcproj/WebCore.vcproj:
887         * WebCore.vcproj/build-generated-files.sh:
888         * html/HTMLMediaElement.cpp:
889         (WebCore::HTMLMediaElement::setSrc):
890         * platform/graphics/MediaPlayer.cpp:
891         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
892         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
893         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
894         (WebCore::MediaPlayerPrivate::load):
895         (WebCore::MediaPlayerPrivate::play):
896         (WebCore::MediaPlayerPrivate::pause):
897         (WebCore::MediaPlayerPrivate::duration):
898         (WebCore::MediaPlayerPrivate::currentTime):
899         (WebCore::MediaPlayerPrivate::seek):
900         (WebCore::MediaPlayerPrivate::doSeek):
901         (WebCore::MediaPlayerPrivate::cancelSeek):
902         (WebCore::MediaPlayerPrivate::seekTimerFired):
903         (WebCore::MediaPlayerPrivate::setEndTime):
904         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
905         (WebCore::MediaPlayerPrivate::endPointTimerFired):
906         (WebCore::MediaPlayerPrivate::paused):
907         (WebCore::MediaPlayerPrivate::seeking):
908         (WebCore::MediaPlayerPrivate::naturalSize):
909         (WebCore::MediaPlayerPrivate::hasVideo):
910         (WebCore::MediaPlayerPrivate::setVolume):
911         (WebCore::MediaPlayerPrivate::setMuted):
912         (WebCore::MediaPlayerPrivate::setRate):
913         (WebCore::MediaPlayerPrivate::dataRate):
914         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
915         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
916         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
917         (WebCore::MediaPlayerPrivate::bytesLoaded):
918         (WebCore::MediaPlayerPrivate::totalBytesKnown):
919         (WebCore::MediaPlayerPrivate::totalBytes):
920         (WebCore::MediaPlayerPrivate::cancelLoad):
921         (WebCore::MediaPlayerPrivate::updateStates):
922         (WebCore::MediaPlayerPrivate::didEnd):
923         (WebCore::MediaPlayerPrivate::setRect):
924         (WebCore::MediaPlayerPrivate::setVisible):
925         (WebCore::MediaPlayerPrivate::paint):
926         (WebCore::MediaPlayerPrivate::getSupportedTypes):
927         (WebCore::MediaPlayerPrivate::movieEnded):
928         (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
929         (WebCore::MediaPlayerPrivate::movieTimeChanged):
930         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
931         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
932         (WebCore::MediaPlayerPrivate::networkState):
933         (WebCore::MediaPlayerPrivate::readyState):
934         * platform/graphics/win/QTMovieWin.cpp: Added.
935         (updateTaskTimer):
936         (QTMovieWinPrivate::QTMovieWinPrivate):
937         (QTMovieWinPrivate::~QTMovieWinPrivate):
938         (taskTimerFired):
939         (QTMovieWinPrivate::startTask):
940         (QTMovieWinPrivate::endTask):
941         (QTMovieWinPrivate::task):
942         (QTMovieWinPrivate::registerDrawingCallback):
943         (QTMovieWinPrivate::drawingComplete):
944         (QTMovieWinPrivate::createGWorld):
945         (QTMovieWinPrivate::setSize):
946         (QTMovieWinPrivate::deleteGWorld):
947         (QTMovieWin::QTMovieWin):
948         (QTMovieWin::~QTMovieWin):
949         (QTMovieWin::play):
950         (QTMovieWin::pause):
951         (QTMovieWin::rate):
952         (QTMovieWin::setRate):
953         (QTMovieWin::duration):
954         (QTMovieWin::currentTime):
955         (QTMovieWin::setCurrentTime):
956         (QTMovieWin::setVolume):
957         (QTMovieWin::setMuted):
958         (QTMovieWin::dataSize):
959         (QTMovieWin::maxTimeLoaded):
960         (QTMovieWin::loadState):
961         (QTMovieWin::getNaturalSize):
962         (QTMovieWin::setSize):
963         (QTMovieWin::setVisible):
964         (QTMovieWin::paint):
965         (QTMovieWin::load):
966         (movieDrawingCompleteProc):
967         (initializeSupportedTypes):
968         (QTMovieWin::countSupportedTypes):
969         (QTMovieWin::getSupportedType):
970         (QTMovieWin::initializeQuickTime):
971         (DllMain):
972         * platform/graphics/win/QTMovieWin.h: Added.
973         * platform/graphics/win/QTMovieWinTimer.cpp: Added.
974         (TimerWindowWndProc):
975         (initializeOffScreenTimerWindow):
976         (setSharedTimerFiredFunction):
977         (timerFired):
978         (setSharedTimerFireDelay):
979         (stopSharedTimer):
980         (setSharedTimerInstanceHandle):
981         (systemTime):
982         * platform/graphics/win/QTMovieWinTimer.h: Added.
983         * rendering/RenderMedia.cpp:
984         (WebCore::MediaControlPlayButtonElement::update):
985
986 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
987
988         Reviewed by Alp Toker.
989
990         http://bugs.webkit.org/show_bug.cgi?id=16558
991         Cairo WebCore Rendering Fails on arc drawing
992
993         Fix for bug reported (and patched) by Apollo team in which
994         arcs were draw in reverse (resulting in inverted images).
995         Review of the source found that the 'clockwise' term was
996         actually meant to mean 'anticlockwise' so the IDL and
997         supporting classes have been changed to match this. 
998
999         * html/CanvasRenderingContext2D.cpp:
1000         (WebCore::CanvasRenderingContext2D::arc):
1001         * html/CanvasRenderingContext2D.idl:
1002         * platform/graphics/cairo/PathCairo.cpp:
1003         (WebCore::Path::addArc):
1004         (WebCore::Path::addEllipse):
1005         * platform/graphics/Path.h:
1006
1007 2007-12-21  Alexey Proskuryakov  <ap@webkit.org>
1008
1009         Reviewed by Oliver.
1010
1011         <rdar://problem/5629995> Incorrect display of Danish characters on web site.
1012
1013         Test: http/tests/xmlhttprequest/response-encoding.html
1014
1015         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
1016         Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
1017         rules for main content and XHR responses, but this matches both IE and Firefox.
1018
1019 2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
1020
1021         Reviewed by Kevin Decker.
1022
1023         <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
1024         shockwave plugin on freshly installed OS
1025
1026         Look for Director plugin in its native directory.
1027
1028         * plugins/win/PluginDatabaseWin.cpp:
1029         (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
1030         doesn't start with "np," so special case its filename.
1031         (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
1032         directories to the plugin paths.
1033         (WebCore::PluginDatabaseWin::defaultPluginPaths):
1034
1035 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
1036
1037         Reviewed by Alp Toker.
1038
1039         http://bugs.webkit.org/show_bug.cgi?id=16508
1040         Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
1041         decoded transparent areas.
1042
1043         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1044         (WebCore::GIFImageDecoder::haveDecodedRow):
1045         * platform/image-decoders/gif/GIFImageDecoder.h:
1046         * platform/image-decoders/gif/GIFImageReader.cpp:
1047         (GIFImageReader::output_row):
1048
1049 2007-12-20  Justin Garcia  <justin.garcia@apple.com>
1050
1051         Reviewed by Oliver Hunt.
1052
1053         <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
1054         
1055         Still need to fix similar issues with the other operations that iterate 
1056         over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
1057
1058         * editing/IndentOutdentCommand.cpp:
1059         (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
1060         * editing/IndentOutdentCommand.h: Removed an unused function.
1061         * editing/InsertListCommand.cpp:
1062         (WebCore::InsertListCommand::modifyRange): 
1063         Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
1064         Call the new selectionForParagraphIteration, which a) prevents operations like this
1065         one from being performed on a table that isn't fully selected (where the selection
1066         starts just before the table and ends inside it), and b) helps prevent paragraph
1067         iteration from going past the end of the selection.
1068         Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
1069         since when v is in the last paragraph of the last cell of a table, that expression 
1070         will return the position after the table, not the start of the next paragraph.
1071         * editing/htmlediting.cpp:
1072         (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
1073         take effect inside the table cell where they are performed.
1074         (WebCore::selectionForParagraphIteration): Added, see above.
1075         (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
1076         * editing/htmlediting.h:
1077         * editing/visible_units.cpp:
1078         (WebCore::startOfNextParagraph): Added, see above.
1079         * editing/visible_units.h:
1080         * editing/TextIterator.h:
1081         (WebCore::TextIterator::exitNode): Added a FIXME.
1082
1083 2007-12-20  Alp Toker  <alp@atoker.com>
1084
1085         Rubber-stamped by Maciej.
1086
1087         http://bugs.webkit.org/show_bug.cgi?id=16542
1088         [GTK] Text is missing with old Pango version
1089
1090         Back out commits r28880, r28876, r28865, r28864 which added Pango font
1091         selection support. These changes caused a regression where no text was
1092         displayed with older Pango versions.
1093
1094         * platform/graphics/gtk/FontCacheGtk.cpp:
1095         (WebCore::FontCache::fontExists):
1096         * platform/graphics/gtk/FontDataGtk.cpp:
1097         (WebCore::FontData::platformDestroy):
1098         (WebCore::FontData::containsCharacters):
1099         * platform/graphics/gtk/FontPlatformData.h:
1100         (WebCore::FontPlatformData::FontPlatformData):
1101         (WebCore::FontPlatformData::hash):
1102         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1103         (WebCore::FontPlatformData::FontPlatformData):
1104         (WebCore::FontPlatformData::init):
1105         (WebCore::FontPlatformData::~FontPlatformData):
1106         (WebCore::FontPlatformData::isFixedPitch):
1107         (WebCore::FontPlatformData::operator==):
1108         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
1109         (WebCore::GlyphPage::fill):
1110
1111 2007-12-20  Timothy Hatcher  <timothy@apple.com>
1112
1113         Reviewed by Sam Weinig.
1114
1115         <rdar://problem/5604897> Double-clicking on JavaScript console error
1116         won't show the line where it occurred
1117
1118         Make the URLs clickable in the console, since double clicking is used for
1119         word text selection. Makes the word "line" localizable. Messages that don't
1120         have a URL will no longer print "undefined". Messages that have a line number
1121         less than or equal to 0 will no longer be printed.
1122
1123         * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
1124         * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
1125           and change the click handler to look for a link with the
1126           "console-message-url" class name.
1127         * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
1128           line row is needed. 
1129         * page/inspector/inspector.css: Update the look of the URL in the console.
1130
1131 2007-12-20  Adam Barth  <hk9565@gmail.com>
1132
1133         Reviewed and landed by Sam Weinig.
1134
1135         http://bugs.webkit.org/show_bug.cgi?id=15313
1136         <rdar://problem/5514516>
1137
1138         The same-origin check was incorrect in two cases (both fixed in this
1139         patch):
1140
1141         A) If both the source and the target have set their document.domain
1142            to the same value, the protocol must also match in order for
1143            access to be allowed.  Without this requirement, the browser is
1144            vulnerable to the following attack:
1145
1146            1) Suppose there is an HTTPS site (www.example.com) that sets
1147               document.domain = "example.com".
1148            2) A network attacker redirects the browser to http://www.example.com/
1149               a) injects script to set document.domain = "example.com", and
1150               b) opens a window to https://www.example.com/
1151            3) Now the network attacker can inject script into the HTTPS page,
1152               stealing cookies and issuing banking transactions.
1153
1154         B) If only one of the source and target has set document.domain, then
1155            access should be denied.  With this behavior, the browser is
1156            vulnerable to the following attack:
1157
1158            1) Suppose http://foo.example.com/ opens an iframe to
1159               http://foo.example.com/frame.html that
1160               a) sets document.domain = "example.com", and
1161               b) opens an iframe to http://bar.example.com/
1162               This is a common usage of document.domain for cross-domain
1163               communication, see for example:
1164                 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
1165            2) The inner-most iframe, which is from bar.example.com, sets
1166               document.domain = "example.com".
1167            3) Now the inner-most iframe can inject script into the middle
1168               iframe (say via document.write).  This bar.example.com script
1169               now has access to the outer-most frame (from foo.example.com).
1170
1171         Both these changes cause WebKit to match the behavior of Firefox 2 and
1172         IE6 in these cases.  This patch includes regression tests for both
1173         issues.
1174
1175         Internet Explorer 7 and Opera 9 are more strict in that they require
1176         the port numbers to match when both pages have document.domain set.
1177         Opera 9 allows access when only one page has set document.domain, but
1178         this is a security vulnerability.
1179
1180         Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
1181                http/tests/security/cross-frame-access-parent-explicit-domain.html
1182
1183         * bindings/js/kjs_window.cpp:
1184         (KJS::createWindow):
1185         (KJS::Window::allowsAccessFrom):
1186         * dom/Document.cpp:
1187         (WebCore::Document::domain):
1188         (WebCore::Document::setDomain):
1189         (WebCore::Document::initSecurityOrigin):
1190         * dom/Document.h:
1191         (WebCore::Document::securityOrigin):
1192         * loader/FrameLoader.cpp:
1193         (WebCore::FrameLoader::begin):
1194         (WebCore::FrameLoader::checkCallImplicitClose):
1195         (WebCore::FrameLoader::shouldAllowNavigation):
1196         * platform/SecurityOrigin.cpp:
1197         (WebCore::SecurityOrigin::setForURL):
1198         (WebCore::SecurityOrigin::createForFrame):
1199         (WebCore::SecurityOrigin::canAccess):
1200         * platform/SecurityOrigin.h:
1201         (WebCore::SecurityOrigin::domain):
1202         * storage/Database.cpp:
1203         (WebCore::Database::openDatabase):
1204         (WebCore::Database::Database):
1205         (WebCore::Database::securityOriginData):
1206         * storage/Database.h:
1207         (WebCore::Database::databaseDebugName):
1208         * storage/DatabaseTracker.cpp:
1209         (WebCore::DatabaseTracker::canEstablishDatabase):
1210         * storage/SQLTransaction.cpp:
1211         (WebCore::SQLTransaction::postflightAndCommit):
1212         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1213
1214 2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>
1215
1216         Reviewed by Darin Adler.
1217
1218         Define XP_UNIX when building with plugins on X11.
1219         Use new npruntime_internal.h instead of npruntime.h.
1220         http://bugs.webkit.org/show_bug.cgi?id=15669
1221
1222         * ForwardingHeaders/bindings/npruntime_internal.h
1223         * WebCore.pro:
1224         * html/HTMLPlugInElement.h:
1225
1226 2007-12-19  johnnyding.webkit  <johnnyding.webkit@gmail.com>
1227
1228         Reviewed by Alexey. Landed by Stephanie.
1229
1230         - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
1231           Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
1232           Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing 
1233           the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
1234
1235
1236         * html/HTMLTokenizer.cpp:
1237         (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
1238         (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
1239         * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
1240
1241 2007-12-20  Eric Seidel  <eric@webkit.org>
1242
1243         Reviewed by Nikolas Zimmermann.
1244
1245         WebKit claims to support SVG feature strings it shouldn't
1246         http://bugs.webkit.org/show_bug.cgi?id=15480
1247
1248         * dom/DOMImplementation.cpp:
1249         (WebCore::isSVG10Feature):
1250         (WebCore::isSVG11Feature):
1251
1252 2007-12-20  John Sullivan  <sullivan@apple.com>
1253
1254         Reviewed by Oliver and Geoff
1255         
1256         - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter 
1257           than white "hole" behind it
1258
1259         * rendering/RenderText.cpp:
1260         (WebCore::RenderText::addLineBoxRects):
1261         respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
1262
1263 2007-12-20  Dan Bernstein  <mitz@apple.com>
1264
1265         Reviewed by Darin Adler.
1266
1267         - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
1268
1269         * platform/win/ScrollViewWin.cpp:
1270         (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
1271         scroll offsets even if scrolling is not allowed, because navigation and
1272         scrollTo should still work.
1273         (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
1274         not allowed.
1275
1276 2007-12-17  Tony Chang  <idealisms@gmail.com>
1277
1278         Reviewed by Darin.
1279
1280         - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
1281           text selection does not always begin at mouse down point
1282           Reset the m_dragSrc object on mouse down on all platforms.
1283
1284         Test: fast/text/reset-drag-on-mouse-down.html
1285
1286         * page/EventHandler.cpp:
1287         (WebCore::EventHandler::handleMousePressEvent):
1288         * page/mac/EventHandlerMac.mm:
1289         (WebCore::EventHandler::mouseDown):
1290
1291 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
1292
1293         Reviewed by Oliver Hunt.
1294
1295         Build support:
1296         * ForwardingHeaders/kjs/SymbolTable.h: Added.
1297         * ForwardingHeaders/wtf/VectorTraits.h: Added.
1298
1299         * bindings/js/JSDOMWindowCustom.cpp:
1300         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
1301         getDirectLocation with getOwnPropertySlot. getDirectLocation is no
1302         longer valid, since global declarations are not stored in the property
1303         map.
1304
1305         (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
1306         JSGlobalObject::put. JSObject::put is no longer valid, since global
1307         declarations are not stored in the property map.
1308
1309         * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
1310         calls, since JSObject is not our base class. This was always a bug, but
1311         the bug is even more apparent after some of my changes.
1312
1313         (KJS::Window::clear): Removed call to clearProperties because
1314         JSGlobalObject::reset takes care of that now.
1315
1316         * history/CachedPage.cpp:
1317         * history/CachedPage.h: Added support for saving a symbol table and
1318         localStorage to the page cache, and restoring it.
1319
1320 2007-12-19  Dan Bernstein  <mitz@apple.com>
1321
1322         Reviewed by Darin Adler and Dave Hyatt.
1323
1324         - Substitute the user's preferred standard font for an unknown primary
1325           font before falling back on the platform's last resort font
1326
1327         Cannot be tested in DumpRenderTree because it sets the standard font to
1328         Times, which is also the hard-coded last resort font on Mac.
1329
1330         * css/CSSFontSelector.cpp:
1331         (WebCore::CSSFontSelector::getFontData): Changed the early bail out
1332         condition to allow getting generic font families from settings even if
1333         there are not @font-face rules. Fixed a typo that mapped fantasy to
1334         cursive. Added a mapping from -webkit-standard to the standard family.
1335         * css/CSSStyleSelector.cpp:
1336         (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
1337         a font selector.
1338         (WebCore::CSSRuleSet::addRulesFromSheet):
1339         (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
1340         font selector.
1341         * css/CSSStyleSelector.h:
1342         (WebCore::CSSStyleSelector::fontSelector):
1343         * platform/graphics/FontCache.cpp:
1344         (WebCore::FontCache::getFontData): Try the user's preferred standard
1345         font before the platform's last resort font.
1346
1347 2007-12-19  Sven Herzberg  <sven@imendio.com>
1348
1349         Reviewed by Alp Toker.
1350
1351         Scaled font destruction takes place in FontData::platformDestroy(). No
1352         need to do it in FontPlatformData::~FontPlatformData().
1353
1354         Destroying platform data in platformDestroy() is a convention we
1355         borrow from the Mac and Win ports.
1356
1357         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1358
1359 2007-12-19  Alice Liu  <alice.liu@apple.com>
1360
1361         build fix (Windows)
1362
1363         Changed uint to unsigned int.  uint caused Windows build breakage
1364
1365         * page/Page.cpp:
1366         (WebCore::Page::markAllMatchesForText):
1367         * page/Page.h:
1368
1369 2007-12-19  Christian Dywan  <christian@twotoasts.de> 
1370
1371         Reviewed by Alp Toker.
1372
1373         http://bugs.webkit.org/show_bug.cgi?id=16222
1374         [GTK] Implement inline search and highlighting of matching strings.
1375
1376         Implement search and highlighting logic directly in WebCore.
1377
1378         * page/Page.cpp:
1379         (WebCore::incrementFrame):
1380         (WebCore::Page::findString):
1381         (WebCore::Page::markAllMatchesForText):
1382         (WebCore::Page::unmarkAllTextMatches):
1383         * page/Page.h:
1384
1385 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
1386
1387         Reviewed by Sam Weinig, Dan Bernstein.
1388
1389         Tiger build fix: restored some graphics code still needed on Tiger.
1390
1391         * platform/graphics/GraphicsTypes.h:
1392         * platform/graphics/cg/GraphicsContextCG.cpp:
1393         * platform/graphics/mac/GraphicsContextMac.mm:
1394         (WebCore::GraphicsContext::setCompositeOperation):
1395
1396 2007-12-19  Alp Toker  <alp@atoker.com>
1397
1398         Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
1399         the Pango backend API in these cases.
1400
1401         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1402         (WebCore::FontPlatformData::FontPlatformData):
1403         (WebCore::FontPlatformData::~FontPlatformData):
1404
1405 2007-12-19  Alice Liu  <alice.liu@apple.com>
1406
1407         Reviewed by Darin.
1408
1409         Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
1410         on Geico.com WebCore::Document::inPageCache()
1411
1412         Calling Node::willRemove on the focusedNode would immediately tell the document to remove
1413         the focused node, and trigger JS events.  This means that the document is mutated while
1414         the engine is trying to tell all child nodes that it's about to removed.  To avoid
1415         crashing, we need to hold off on mutating the document until node traversal is finished.
1416
1417         * dom/ContainerNode.cpp:
1418         (WebCore::ContainerNode::removeChild):
1419         (WebCore::ContainerNode::removeChildren):
1420         * dom/Node.cpp:
1421         * dom/Node.h:
1422         (WebCore::Node::willRemove):
1423         * loader/FrameLoader.cpp:
1424         (WebCore::FrameLoader::clear):
1425
1426 2007-12-19  Andre Boule  <aboule@apple.com>
1427
1428         Reviewed by Dan Bernstein.
1429
1430         Test: fast/canvas/canvas-composite.html
1431
1432         Fix for:
1433         <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
1434
1435         This fix makes setCompositeOperation consistent across all platforms that use CG.
1436
1437         The following compositing modes don't pass however that is covered by another bug:
1438         source-in
1439         source-out
1440         destination-in
1441         destination-atop
1442         copy
1443         <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
1444
1445         * platform/graphics/GraphicsTypes.h:
1446         * platform/graphics/cg/GraphicsContextCG.cpp:
1447         (WebCore::GraphicsContext::setCompositeOperation):
1448         * platform/graphics/mac/GraphicsContextMac.mm:
1449         * platform/win/GraphicsContextWin.cpp:
1450
1451 2007-12-19  Dan Bernstein  <mitz@apple.com>
1452
1453         Reviewed by Dave Hyatt.
1454
1455         - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
1456
1457         Test: fast/dynamic/subtree-boundary-percent-height.html
1458
1459         * rendering/RenderObject.cpp:
1460         (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
1461         percent heights because sometimes they compute to 'auto'.
1462
1463 2007-12-19  Sam Weinig  <sam@webkit.org>
1464
1465         Reviewed by Maciej.
1466
1467         http://bugs.webkit.org/show_bug.cgi?id=16511
1468         Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
1469         - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
1470
1471         * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
1472         (WebCore::ChildNodeList::ChildNodeList):
1473         * dom/ClassNodeList.cpp:
1474         (WebCore::ClassNodeList::ClassNodeList):
1475         * dom/ClassNodeList.h:
1476
1477         Move getElementsByName and getElementsByClassName to Node so they
1478         can use easily employ the caching already used by ChildNodeLists.  In the case of 
1479         getElementsByClassName, this reduces code duplication in Element as well
1480         * dom/Document.cpp:
1481         * dom/Document.h:
1482
1483         Move getElementsByClassName to Node.
1484         * dom/Element.cpp:
1485         * dom/Element.h:
1486
1487         * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
1488         (WebCore::NameNodeList::NameNodeList):
1489         (WebCore::NameNodeList::item):
1490         * dom/NameNodeList.h:
1491
1492         Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
1493         * dom/Node.cpp:
1494         (WebCore::TagNodeList::TagNodeList):
1495         (WebCore::Node::Node):
1496         (WebCore::Node::~Node):
1497         (WebCore::Node::childNodes):
1498         (WebCore::Node::registerNodeList):
1499         (WebCore::Node::getElementsByName):
1500         (WebCore::Node::getElementsByClassName):
1501         * dom/Node.h: Make m_nodeLists an OwnPtr.  Moved getElementsByName and getElementsByClassName here
1502
1503         Allow subclasses to choose whether they want to receive the notifications using a new bit.
1504         * dom/NodeList.cpp:
1505         (WebCore::NodeList::NodeList):
1506         * dom/NodeList.h:
1507         (WebCore::NodeList::needsNotifications):
1508
1509 2007-12-19  Dave Hyatt  <hyatt@apple.com>
1510
1511         Add support for GDI text rendering to WebKit.
1512       
1513         Reviewed by mitz
1514         
1515         * css/CSSStyleSelector.cpp:
1516         (WebCore::CSSStyleSelector::applyProperty):
1517         * dom/Document.cpp:
1518         (WebCore::Document::recalcStyle):
1519         * page/Settings.cpp:
1520         (WebCore::Settings::setFontRenderingMode):
1521         (WebCore::Settings::fontRenderingMode):
1522         * page/Settings.h:
1523         * platform/graphics/Font.h:
1524         (WebCore::Font::renderingMode):
1525         * platform/graphics/FontCache.cpp:
1526         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1527         (WebCore::FontPlatformDataCacheKey::operator==):
1528         (WebCore::computeHash):
1529         (WebCore::FontCache::getCachedFontPlatformData):
1530         * platform/graphics/FontDescription.h:
1531         (WebCore::):
1532         (WebCore::FontDescription::FontDescription):
1533         (WebCore::FontDescription::renderingMode):
1534         (WebCore::FontDescription::setRenderingMode):
1535         (WebCore::FontDescription::operator==):
1536         * platform/graphics/GraphicsContext.h:
1537         * platform/graphics/win/FontCacheWin.cpp:
1538         (WebCore::FontCache::fontExists):
1539         (WebCore::FontCache::createFontPlatformData):
1540         * platform/graphics/win/FontDataWin.cpp:
1541         (WebCore::FontData::platformInit):
1542         (WebCore::FontData::smallCapsFontData):
1543         (WebCore::FontData::containsCharacters):
1544         (WebCore::FontData::determinePitch):
1545         (WebCore::FontData::platformWidthForGlyph):
1546         * platform/graphics/win/FontPlatformData.h:
1547         (WebCore::FontPlatformData::FontPlatformData):
1548         (WebCore::FontPlatformData::useGDI):
1549         (WebCore::FontPlatformData::operator==):
1550         * platform/graphics/win/FontPlatformDataWin.cpp:
1551         (WebCore::FontPlatformData::FontPlatformData):
1552         * platform/graphics/win/FontWin.cpp:
1553         (WebCore::Font::drawGlyphs):
1554         * platform/graphics/win/IconWin.cpp:
1555         (WebCore::Icon::paint):
1556         * platform/win/GraphicsContextWin.cpp:
1557         (WebCore::GraphicsContext::getWindowsContext):
1558         (WebCore::GraphicsContext::releaseWindowsContext):
1559         * platform/win/UniscribeController.cpp:
1560         (WebCore::UniscribeController::shapeAndPlaceItem):
1561         * platform/win/UniscribeController.h:
1562         * plugins/win/PluginViewWin.cpp:
1563         (WebCore::PluginViewWin::paint):
1564
1565 2007-12-19  Sven Herzberg  <sven@imendio.com>
1566
1567         Reviewed by Alp Toker.
1568
1569         Replace the fontconfig/freetype based font management with a pango
1570         based one. Fixes:
1571         http://bugs.webkit.org/show_bug.cgi?id=15229
1572
1573         * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
1574         the platform specific destroy code
1575         (FontData::containsCharacters()): implemented font coverage with pango
1576         * platform/gtk/FontPlatformData.h: replaced fontconfig specific
1577         members with pango-specific ones
1578         * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
1579         FontPlatformData class
1580         (FontPlatformData::FontPlatformData()): implemented the font-matching
1581         with a PangoFontDescription instead of an FcPattern; initialize the
1582         scaled font by using the API for PangoCairoFont
1583         (FontPlatformData::init()): initialize the PangoFontMap and set up a
1584         hash table to translate the font family name into a font family
1585         (FontPlatformData::isFixedPitch()): implemented by querying the
1586         PangoFontFamily
1587         (FontPlatformData::operator==): compare the FontPlatformData by
1588         comparing the font pointers or the described fonts
1589         * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
1590         added a function to query a glyph from a PangoFont
1591         (GlyphPage::fill()): implemented the fill function with Pango instead
1592         of fontconfig/freetype
1593
1594 2007-12-19  Alp Toker  <alp@atoker.com>
1595
1596         Reviewed by Holger Freyther.
1597
1598         Improve graphics operator approximations
1599         
1600         These changes match Cairo's own CG approximations.
1601
1602         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1603         (WebCore::toCairoOperator):
1604
1605 2007-12-19  Alp Toker  <alp@atoker.com>
1606
1607         Reviewed by Holger Freyther.
1608
1609         Check the bounding box before doing a full hit test
1610
1611         * platform/graphics/cairo/PathCairo.cpp:
1612         (WebCore::Path::contains):
1613
1614 2007-12-18  Sam Weinig  <sam@webkit.org>
1615
1616         Reviewed by Geoff.
1617
1618         Fix for <rdar://problem/5646478>
1619         REGRESSION: fast/events/event-view-toString fails on Leopard
1620
1621         This fixes an issue where we were incorrectly setting the lastInPrototypeChain
1622         for the JSDOMWindow (the global object) before a call to setPrototype overwrote
1623         it. This fixes it by passing the prototype up the constructor chain so that it
1624         is set before any calls can be made.
1625
1626         * bindings/js/kjs_window.cpp:
1627         (KJS::Window::Window):
1628         * bindings/js/kjs_window.h:
1629         * bindings/scripts/CodeGeneratorJS.pm:
1630
1631 2007-12-18  Beth Dakin  <bdakin@apple.com>
1632
1633         Reviewed by Oliver.
1634
1635         Fix for <rdar://problem/5616982> SVGs with width and height 100% 
1636         fail to render when used as <img> or CSS image (16167)
1637
1638         This final part of the work fixes the <img> tag.
1639
1640         This is the real fix. 
1641         * rendering/RenderImage.cpp:
1642         (WebCore::RenderImage::calcReplacedWidth): Set the container size 
1643         on the image. Setting the container size only actually sticks if 
1644         the values are non-zero, so if the container size really was set, 
1645         use the imageSize that is calculated using the container size. If 
1646         it did not stick but the image does have relative width (meaning 
1647         that the container size is 0), set the width to 0 by hand. We want 
1648         to avoid setting the width before we have a container size or we 
1649         will end up incorrectly using the default size of 300x150.
1650         (WebCore::RenderImage::calcReplacedHeight): Same as above, but for 
1651         height.
1652
1653         A few more pieces of information have to be exposed through cached 
1654         image to make this happen.
1655         * loader/CachedImage.cpp:
1656         (WebCore::CachedImage::usesImageContainerSize): As mentioned above, 
1657         when setContainerSize() is called, the container size is only 
1658         actually set if the values are non-zero. This call tells you if it 
1659         was set.
1660         (WebCore::CachedImage::imageHasRelativeWidth):
1661         (WebCore::CachedImage::imageHasRelativeHeight):
1662         * loader/CachedImage.h:
1663         * platform/graphics/Image.h:
1664         (WebCore::Image::usesContainerSize):
1665         * svg/graphics/SVGImage.cpp:
1666         (WebCore::SVGImage::usesContainerSize):
1667         * svg/graphics/SVGImage.h:
1668
1669 2007-12-18  Mark Rowe  <mrowe@apple.com>
1670
1671         Rubber-stamped by Maciej Stachowiak.
1672
1673         Remove outdated and non-functioning project files for the Apollo port.
1674
1675         * WebCore.apolloproj: Removed.
1676
1677 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
1678
1679         <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
1680         
1681         Need to translate the char back into a key code for posting our WM_KEYDOWN.
1682         
1683         Reviewed by Ada.
1684
1685         * platform/win/PopupMenuWin.cpp:
1686         (WebCore::PopupWndProc):
1687
1688 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
1689
1690         <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
1691         
1692         Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
1693         Only create a font with the last one.
1694         
1695         Reviewed by Mitz, Darin.
1696
1697         * platform/graphics/win/FontCacheWin.cpp:
1698         (WebCore::metaFileEnumProc):
1699         (WebCore::FontCache::getFontDataForCharacters):
1700
1701 2007-12-17  Brent Fulgham  <bfulgham@gmail.com>
1702
1703         Reviewed by Darin.
1704
1705         http://bugs.webkit.org/show_bug.cgi?id=16464
1706         Modify WebCore to use win32 thread primitives
1707
1708         Updates to support native windows threading primitives
1709         rather than pthreads emulation library.
1710
1711         * WebCore.vcproj/WebCore.vcproj:
1712         * config.h:
1713         * platform/Threading.h:
1714         * platform/win/MutexWin.cpp: Added.
1715         (WebCore::Mutex::Mutex):
1716         (WebCore::Mutex::~Mutex):
1717         (WebCore::Mutex::lock):
1718         (WebCore::Mutex::tryLock):
1719         (WebCore::Mutex::unlock):
1720         * platform/win/ThreadConditionWin.cpp: Added.
1721         (WebCore::ThreadCondition::ThreadCondition):
1722         (WebCore::ThreadCondition::~ThreadCondition):
1723         (WebCore::ThreadCondition::wait):
1724         (WebCore::ThreadCondition::signal):
1725         (WebCore::ThreadCondition::broadcast):
1726         * platform/win/ThreadingWin.cpp:
1727         (WebCore::threadMapMutex):
1728         (WebCore::threadMap):
1729         (WebCore::storeThreadHandleByIdentifier):
1730         (WebCore::identifierByThreadHandle):
1731         (WebCore::threadHandleForIdentifier):
1732         (WebCore::clearThreadHandleForIdentifier):
1733         (WebCore::createThread):
1734         (WebCore::waitForThreadCompletion):
1735         (WebCore::detachThread):
1736         (WebCore::currentThread):
1737
1738 2007-12-18  Rodney Dawes  <dobey@wayofthemonkey.com>
1739
1740         Reviewed by Darin Adler.
1741
1742         Handle EINTR when set by select() and try the select() again
1743         http://bugs.webkit.org/show_bug.cgi?id=16071
1744
1745         * platform/network/curl/ResourceHandleManager.cpp:
1746         (ResourceHandleManager::downloadTimerCallback):
1747
1748 2007-12-18  Dan Bernstein  <mitz@apple.com>
1749
1750         Reviewed by Dave Hyatt.
1751
1752         - avoid the simplified Chinese font linking code for characters that are
1753           not in any Windows code page
1754
1755         * platform/graphics/win/FontCacheWin.cpp:
1756         (WebCore::FontCache::getFontDataForCharacters):
1757
1758 2007-12-18  Brady Eidson <beidson@apple.com>
1759
1760         Reviewed by Adele
1761
1762         <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
1763
1764         Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
1765         protected by authentication.  Occasionally one can view the main page of a site but the favicon
1766         is behind the iron curtain - in these cases, we should *not* prompt for a username and password
1767         solely for the favicon.
1768
1769         * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
1770
1771         * loader/SubresourceLoader.cpp:
1772         (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
1773           is virtual from ResourceLoader, SubresourceLoader can override.  First call to the 
1774           SubresourceLoaderClient.  If they cancel the resource load, return early. Otherwise, let
1775           ResourceLoader work its magic (resulting in the auth sheet coming down)
1776         * loader/SubresourceLoader.h:
1777
1778         * loader/SubresourceLoaderClient.h:
1779         (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
1780
1781         * loader/icon/IconLoader.cpp:
1782         (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
1783           never prompt the user for credentials just for a favicon.
1784         * loader/icon/IconLoader.h:
1785
1786 2007-12-18  John Sullivan  <sullivan@apple.com>
1787
1788         Reviewed by Brady
1789         
1790         - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
1791
1792         * storage/DatabaseTracker.cpp:
1793         (WebCore::DatabaseTracker::canEstablishDatabase):
1794         pass "name" instead of "displayName" if there's no displayName
1795
1796 2007-12-17  Dan Bernstein  <mitz@apple.com>
1797
1798         Reviewed by Maciej Stachowiak.
1799
1800         - restore ButtonFace and ThreeDFace to their previous values for non-Mac
1801           platforms. The Mac port also uses the same values for now instead
1802           of NSColor-based ones.
1803
1804         * rendering/RenderTheme.cpp:
1805         (WebCore::RenderTheme::systemColor):
1806
1807 2007-12-17  Rodney Dawes  <dobey@wayofthemonkey.com>
1808
1809         Reviewed by Maciej Stachowiak.
1810
1811         Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
1812         Add required Frame::createScriptInstanceForWidget to FrameGtk
1813
1814         * config.h:
1815         * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
1816
1817 2007-12-17  Alice Liu  <alice.liu@apple.com>
1818
1819         Reviewed by Adam.
1820
1821         Fixed <rdar://5566435> window with no scrollbars can be scrolled
1822
1823         * platform/win/ScrollViewWin.cpp:
1824         (WebCore::ScrollView::maximumScroll):
1825         corrected maximumScroll() to account for scrolling not allowed.
1826         (WebCore::ScrollView::wheelEvent):
1827
1828 2007-12-14  Juan A. Suarez Romero  <jasuarez@igalia.com>
1829
1830         Reviewed by Alp Toker.
1831
1832         http://bugs.webkit.org/show_bug.cgi?id=16042
1833         [GTK] Eliminate webkit_init()
1834
1835         Move webkit initialization to WebView class init.
1836
1837         * WebCore.pro:
1838
1839 2007-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
1840
1841         Reviewed by Darin.
1842
1843         <rdar://problem/5651291> REGRESSION: Flash content doesn't display
1844         (www.adobe.com)
1845
1846         We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
1847
1848         * plugins/win/PluginViewWin.cpp:
1849         (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
1850         NPEvent*
1851         (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
1852         (WebCore::PluginViewWin::handleKeyboardEvent): same
1853         (WebCore::PluginViewWin::handleMouseEvent): same
1854         * plugins/win/PluginViewWin.h:
1855
1856 2007-12-17  Alexey Proskuryakov  <ap@webkit.org>
1857
1858         Reviewed by Darin.
1859
1860         Live to the promise of never making AppKit special character codes visible via DOM.
1861
1862         Test: fast/events/arrow-keys-on-body.html
1863
1864         * page/EventHandler.cpp:
1865         (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
1866         to let quirks-aware code strip special charactrers.
1867         * platform/mac/KeyEventMac.mm:
1868         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
1869         mode, remove the text if it's a special character.
1870
1871 2007-12-17  Mark Rowe  <mrowe@apple.com>
1872
1873         Reviewed by Darin Adler.
1874
1875         Fix incorrect array size and incorrect array index in convertNSColorToColor.
1876
1877         * rendering/RenderThemeMac.mm:
1878         (WebCore::convertNSColorToColor):
1879
1880 2007-12-17  Darin Adler  <darin@apple.com>
1881
1882         Reviewed by Mark Rowe.
1883
1884         - fix http://bugs.webkit.org/show_bug.cgi?id=16468
1885           REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
1886
1887         * storage/DatabaseThread.cpp:
1888         (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
1889         because there's no guarantee it won't lose its last reference otherwise.
1890
1891 2007-12-17  Dan Bernstein  <mitz@apple.com>
1892
1893         Reviewed by Maciej Stachowiak.
1894
1895         - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
1896           and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
1897
1898         * platform/graphics/win/FontCacheWin.cpp:
1899         (WebCore::FontCache::getFontDataForCharacters): To ensure that font
1900         linking gives consistent results for characters that are exclusive to
1901         the simplified Chinese code page and characters that belong to that
1902         code page and other code pages, always ask to map to simplified Chinese
1903         alone first.
1904
1905 2007-12-17  Christian Dywan  <christian@twotoasts.de>
1906
1907         Reviewed by Alp Toker.
1908
1909         http://bugs.webkit.org/show_bug.cgi?id=16378
1910         Implement Icon for Gtk
1911
1912         Icon provides a GdkPixbuf containing a themed icon.
1913         The icon theme is probed for an icon name according to the
1914         Icon Naming Specification or conventional Gnome icon names respectively.
1915
1916         See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
1917
1918         * platform/graphics/Icon.h:
1919         * platform/graphics/gtk/IconGtk.cpp:
1920         (WebCore::Icon::~Icon):
1921         (WebCore::lookupIconName):
1922         (WebCore::Icon::newIconForFile):
1923         (WebCore::Icon::paint):
1924
1925 2007-12-16  Sam Weinig  <sam@webkit.org>
1926
1927         Reviewed by Mitz.
1928
1929         Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
1930         Move the JS Location object to its own file
1931
1932         - Move Location into its own file and rename it JSLocation.
1933
1934         * DerivedSources.make:
1935         * WebCore.pro:
1936         * WebCore.vcproj/WebCore.vcproj:
1937         * WebCore.xcodeproj/project.pbxproj:
1938         * WebCoreSources.bkl:
1939         * bindings/js/JSDocumentCustom.cpp:
1940         * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
1941         (WebCore::):
1942         (WebCore::JSLocation::JSLocation):
1943         (WebCore::JSLocation::getValueProperty):
1944         (WebCore::JSLocation::getOwnPropertySlot):
1945         (WebCore::JSLocation::put):
1946         (WebCore::JSLocationProtoFuncReplace::callAsFunction):
1947         (WebCore::JSLocationProtoFuncReload::callAsFunction):
1948         (WebCore::JSLocationProtoFuncAssign::callAsFunction):
1949         (WebCore::JSLocationProtoFuncToString::callAsFunction):
1950         * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
1951         (WebCore::JSLocation::):
1952         (WebCore::JSLocation::frame):
1953         (WebCore::JSLocation::classInfo):
1954         * bindings/js/kjs_window.cpp:
1955         (KJS::Window::location):
1956         * bindings/js/kjs_window.h:
1957         * history/CachedPage.cpp:
1958
1959 2007-12-16  Dan Bernstein  <mitz@apple.com>
1960
1961         Reviewed by Sam Weinig.
1962
1963         - make 'cursor: copy' and 'cursor: none' work.
1964
1965         Already covered by manual-tests/cursor.html
1966
1967         * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
1968         needed for the 33rd and 34th cursor values.
1969
1970 2007-12-16  Mark Rowe  <mrowe@apple.com>
1971
1972         Reviewed by Maciej Stachowiak.
1973
1974         Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
1975
1976         * WebCore.base.exp:
1977         * WebCore.xcodeproj/project.pbxproj:
1978         * loader/NetscapePlugInStreamLoader.h:
1979         * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
1980         * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
1981
1982 2007-12-16  Sam Weinig  <sam@webkit.org>
1983
1984         Reviewed by Maciej.
1985
1986         Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
1987         Cleanup kjs_window
1988
1989         - Move ScheduledAction into its own file and put it in the WebCore namespace.
1990
1991         * WebCore.pro:
1992         * WebCore.vcproj/WebCore.vcproj:
1993         * WebCore.xcodeproj/project.pbxproj:
1994         * WebCoreSources.bkl:
1995         * bindings/js/PausedTimeouts.cpp:
1996         * bindings/js/PausedTimeouts.h:
1997         * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
1998         (WebCore::ScheduledAction::ScheduledAction):
1999         (WebCore::ScheduledAction::execute):
2000         * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
2001         (WebCore::ScheduledAction::ScheduledAction):
2002         * bindings/js/kjs_window.cpp:
2003         (KJS::DOMWindowTimer::DOMWindowTimer):
2004         (KJS::DOMWindowTimer::action):
2005         (KJS::DOMWindowTimer::takeAction):
2006         (KJS::Window::installTimeout):
2007         (KJS::Window::timerFired):
2008         * bindings/js/kjs_window.h:
2009
2010 2007-12-16  Alp Toker  <alp@atoker.com>
2011
2012         Reviewed by Maciej.
2013
2014         http://bugs.webkit.org/show_bug.cgi?id=16356
2015         [GTK] Integrate GStreamer video with the graphics backend
2016
2017         Integrate the GStreamer media backend with the Cairo graphics backend.
2018         There are still some issues: Data is copied more often than necessary,
2019         and repaint() is not called, causing transformed video not to update
2020         sometimes.
2021
2022         * WebCore.pro:
2023         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2024         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2025         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2026         (WebCore::MediaPlayerPrivate::currentTime):
2027         (WebCore::MediaPlayerPrivate::setEndTime):
2028         (WebCore::MediaPlayerPrivate::seeking):
2029         (WebCore::MediaPlayerPrivate::naturalSize):
2030         (WebCore::MediaPlayerPrivate::setMuted):
2031         (WebCore::MediaPlayerPrivate::setRect):
2032         (WebCore::MediaPlayerPrivate::setVisible):
2033         (WebCore::MediaPlayerPrivate::repaint):
2034         (WebCore::MediaPlayerPrivate::paint):
2035         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2036         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
2037         * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
2038         (webkit_video_sink_base_init):
2039         (webkit_video_sink_init):
2040         (webkit_video_sink_idle_func):
2041         (webkit_video_sink_render):
2042         (webkit_video_sink_set_caps):
2043         (webkit_video_sink_dispose):
2044         (webkit_video_sink_finalize):
2045         (webkit_video_sink_set_property):
2046         (webkit_video_sink_get_property):
2047         (webkit_video_sink_stop):
2048         (webkit_video_sink_class_init):
2049         (webkit_video_sink_new):
2050         (webkit_video_sink_set_surface):
2051         (plugin_init):
2052         * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
2053
2054 2007-12-16  Mark Rowe  <mrowe@apple.com>
2055
2056         Mac build fix.
2057
2058         * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
2059         Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
2060         new shared implementation.
2061
2062 2007-12-16  Rodney Dawes  <dobey@wayofthemonkey.com>
2063
2064         Reviewed by Maciej Stachowiak.
2065
2066         http://bugs.webkit.org/show_bug.cgi?id=16389
2067         Bug 16389: Common Implementation of NetscapePlugInStreamLoader
2068
2069         * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
2070         * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
2071         * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
2072
2073 2007-12-16  Grace Kloba  <klobag@gmail.com>
2074
2075         Reviewed by Darin Adler.
2076
2077         Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
2078         Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
2079
2080         * dom/Document.cpp:
2081         (WebCore::Document::Document):
2082         * loader/FrameLoader.cpp:
2083         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
2084         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2085
2086 2007-12-16  Darin Adler  <darin@apple.com>
2087
2088         Reviewed by Maciej.
2089
2090         - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
2091
2092         Test: storage/execute-sql-args.html
2093
2094         * bindings/js/JSSQLTransactionCustom.cpp:
2095         (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
2096         exception happens, we won't try to do any more argument processing. Changed processing
2097         of the second argument so that we allow an undefined value or null, and simply omit the
2098         array. Changed processing of the second argument so that we don't require an actual
2099         JavaScript array. Instead, as with the JavaScript array operations themselves, we use
2100         the length property and corresponding numeric properties of the object, allowing other
2101         objects to act as arrays. Changed processing of the third and fourth arguments to
2102         allow the undefined value as well as null; we check the value of the argument rather
2103         than looking at the size of the passed-in arguments list.
2104
2105 2007-12-16  Sam Weinig  <sam@webkit.org>
2106
2107         Reviewed by Darin.
2108
2109         More of http://bugs.webkit.org/show_bug.cgi?id=16385
2110         Cleanup kjs_window
2111
2112         - Move PausedTimeouts into its own file and put it in the WebCore namespace.
2113
2114         * WebCore.pro:
2115         * WebCore.vcproj/WebCore.vcproj:
2116         * WebCore.xcodeproj/project.pbxproj:
2117         * WebCoreSources.bkl:
2118         * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
2119         * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
2120         * bindings/js/kjs_window.cpp:
2121         (KJS::Window::pauseTimeouts):
2122         * bindings/js/kjs_window.h:
2123         * history/CachedPage.cpp:
2124         * history/CachedPage.h:
2125         * page/Chrome.cpp:
2126
2127 2007-12-16  Beth Dakin  <bdakin@apple.com>
2128
2129         Reviewed by Geoff.
2130
2131         Make relative-size SVGs work in border-image.
2132
2133         * rendering/RenderBox.cpp:
2134         (WebCore::RenderBox::calculateBackgroundSize):
2135         * rendering/RenderObject.cpp:
2136         (WebCore::RenderObject::paintBorderImage):
2137
2138 2007-12-16  Darin Adler  <darin@apple.com>
2139
2140         - fix Tiger build (my fault it was broken)
2141
2142         * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
2143
2144 2007-12-16  Andrew Wellington  <proton@wiretapped.net>
2145
2146         Reviewed by Darin.
2147         
2148         http://bugs.webkit.org/show_bug.cgi?id=6129
2149         Incomplete implementation of CSS 2.1 system colors
2150
2151         Test: fast/css/css2-system-color.html
2152         
2153         Based on original patch by Rob Buis.
2154         
2155         System colors are retrieved from NSColor as appropriate. If the color is a pattern color
2156         (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
2157         color and sample that to get a solid color.
2158
2159         * css/CSSStyleSelector.cpp:
2160         (WebCore::):
2161         (WebCore::colorForCSSValue):
2162         * rendering/RenderTheme.cpp:
2163         (WebCore::RenderTheme::systemColor):
2164         * rendering/RenderTheme.h:
2165         * rendering/RenderThemeMac.h:
2166         * rendering/RenderThemeMac.mm:
2167         (WebCore::getSystemColor):
2168         (WebCore::RenderThemeMac::platformColorsDidChange):
2169         (WebCore::RenderThemeMac::systemColor):
2170
2171 2007-12-16  Dan Bernstein  <mitz@apple.com>
2172
2173         Reviewed by Darin Adler.
2174
2175         - fix http://bugs.webkit.org/show_bug.cgi?id=16426
2176           Divs with overflow:auto: scrollbars not correctly updated when contents change
2177
2178         Test: fast/overflow/scrollbar-position-update.html
2179
2180         * platform/mac/PlatformScrollBarMac.mm:
2181         (WebCore::PlatformScrollbar::updateThumbProportion): Update the
2182         NSScroller's value for the new proportions.
2183         * rendering/RenderLayer.cpp:
2184         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
2185         repaint(). Scrollbars repaint themselves as needed.
2186
2187 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
2188
2189         Reviewed by Darin.
2190
2191         http://bugs.webkit.org/show_bug.cgi?id=14140
2192         <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
2193
2194         * dom/KeyboardEvent.h:
2195         (WebCore::KeypressCommand::KeypressCommand):
2196         (WebCore::KeyboardEvent::keypressCommands):
2197         Change stored command class to preserve complete information about commands.
2198
2199         * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
2200         command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
2201         as a command.
2202
2203         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
2204         a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
2205
2206 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
2207
2208         Reviewed by Darin.
2209
2210         http://bugs.webkit.org/show_bug.cgi?id=16462
2211         REGRESSION: access keys broken on Windows
2212
2213         * page/EventHandler.cpp:
2214         (WebCore::EventHandler::handleAccessKey):
2215         (WebCore::EventHandler::keyEvent):
2216         * page/EventHandler.h:
2217         Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
2218
2219 2007-12-16  Xan Lopez  <xan@gnome.org>
2220
2221         Reviewed by Alexey Proskuryakov.
2222
2223         http://bugs.webkit.org/show_bug.cgi?id=16454
2224         [GTK] Text input doesn't work consistently on PPC
2225
2226         * platform/gtk/KeyEventGtk.cpp:
2227         (WebCore::singleCharacterString):
2228
2229         UChar is 2 bytes (UTF-16), so transform accordingly from
2230         gunichar (UCS-4). Fixes keyboard input on big endian systems.
2231
2232 2007-12-15  Darin Adler  <darin@apple.com>
2233
2234         Reviewed by Mark Rowe.
2235
2236         - better build fix for the problem affecting GTK and some other platforms
2237           "this time for sure"
2238
2239         * WebCore.xcodeproj/project.pbxproj:
2240         * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
2241         * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
2242         which won't work, declare the tables that are in the .lut.h file in the header.
2243
2244 2007-12-12  Kevin Watters  <kevin@dotsyntax.com>
2245
2246         Reviewed by Darin Adler.
2247
2248         Fixed the Wx port's FontPlatformData for use in HashTable.
2249         - FontPlatformData(Deleted) made unequal to FontPlatformData()
2250
2251         * platform/graphics/wx/FontPlatformData
2252
2253 2007-12-15  Dan Bernstein  <mitz@apple.com>
2254
2255         Reviewed by Darin Adler.
2256
2257         - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
2258
2259         * platform/graphics/win/FontCacheWin.cpp:
2260         (WebCore::metaFileEnumProc): Added. Called during metafile record
2261         enumeration and extracts the font from the create font record.
2262         (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
2263         let Uniscribe draw the characters and see what font it chooses.
2264
2265 2007-12-15  Darin Adler  <darin@apple.com>
2266
2267         * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
2268
2269 2007-12-15  Darin Adler  <darin@apple.com>
2270
2271         Another try at a GTK build fix.
2272
2273         * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
2274
2275 2007-12-15  Sam Weinig  <sam@webkit.org>
2276
2277         Force windows to regenerate COM DOM bindings.
2278
2279         * WebCore.vcproj/build-generated-files.sh: Add license. 
2280         * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
2281
2282 2007-12-15  Sam Weinig  <sam@webkit.org>
2283
2284         Fix Windows and wx builds.
2285
2286         * WebCore.vcproj/WebCore.vcproj:
2287         * WebCoreSources.bkl:
2288
2289 2007-12-15  Mark Rowe  <mrowe@apple.com>
2290
2291         Gtk build fix.  Add JSEventTargetBase.cpp to SOURCES.
2292
2293         * WebCore.pro:
2294
2295 2007-12-15  Sam Weinig  <sam@webkit.org>
2296
2297         Fix wx build.
2298
2299         * WebCoreSources.bkl:
2300
2301 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
2302
2303         Not reviewed. Build fix for Qt/Gtk.
2304
2305         * WebCore.pro: Include JSEventTargetBase.lut.h in generation
2306
2307 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
2308
2309         Reviewed by Eric.
2310
2311         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
2312
2313         Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
2314         in the base class. Applied the same refactorization to EventTargetNode.
2315
2316         This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
2317         to share as much code as possible with the EventTargetNode classes.
2318
2319         * DerivedSources.make:
2320         * WebCore.xcodeproj/project.pbxproj:
2321         * bindings/js/JSEventTargetBase.cpp: Added.
2322         (WebCore::retrieveEventTargetAndCorrespondingNode):
2323         (WebCore::eventNameForPropertyToken):
2324         * bindings/js/JSEventTargetBase.h: Added.
2325         (WebCore::JSEventTargetProperties::):
2326         (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
2327         (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
2328         (WebCore::):
2329         (WebCore::::create):
2330         (WebCore::JSEventTargetBase::JSEventTargetBase):
2331         (WebCore::JSEventTargetBase::getValueProperty):
2332         (WebCore::JSEventTargetBase::putValueProperty):
2333         (WebCore::JSEventTargetBase::getOwnPropertySlot):
2334         (WebCore::JSEventTargetBase::put):
2335         (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
2336         (WebCore::JSEventTargetPrototype::self):
2337         (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
2338         (WebCore::JSEventTargetPrototype::classInfo):
2339         * bindings/js/JSEventTargetNode.cpp:
2340         (WebCore::JSEventTargetNode::getOwnPropertySlot):
2341         (WebCore::JSEventTargetNode::getValueProperty):
2342         (WebCore::JSEventTargetNode::put):
2343         (WebCore::JSEventTargetNode::putValueProperty):
2344         (WebCore::JSEventTargetNode::setListener):
2345         (WebCore::toEventTargetNode):
2346         * bindings/js/JSEventTargetNode.h:
2347         (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
2348         (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
2349         * dom/EventTarget.cpp:
2350         (WebCore::EventTarget::addEventListener):
2351         (WebCore::EventTarget::removeEventListener):
2352         (WebCore::EventTarget::dispatchGenericEvent):
2353         (WebCore::EventTarget::removeAllEventListeners):
2354         (WebCore::EventTarget::insertedIntoDocument):
2355         (WebCore::EventTarget::removedFromDocument):
2356         (WebCore::EventTarget::handleLocalEvents):
2357         (WebCore::EventTarget::applySVGEventTargetRules):
2358         (WebCore::forbidEventDispatch):
2359         (WebCore::allowEventDispatch):
2360         (WebCore::eventDispatchForbidden):
2361         * dom/EventTarget.h:
2362         (WebCore::EventTarget::preDispatchEventHandler):
2363         (WebCore::EventTarget::postDispatchEventHandler):
2364         (WebCore::forbidEventDispatch):
2365         (WebCore::allowEventDispatch):
2366         * dom/EventTargetNode.cpp:
2367         (WebCore::EventTargetNode::~EventTargetNode):
2368         (WebCore::EventTargetNode::insertedIntoDocument):
2369         (WebCore::EventTargetNode::removedFromDocument):
2370         (WebCore::EventTargetNode::addEventListener):
2371         (WebCore::EventTargetNode::removeEventListener):
2372         (WebCore::EventTargetNode::removeAllEventListeners):
2373         (WebCore::EventTargetNode::handleLocalEvents):
2374         (WebCore::EventTargetNode::dispatchEvent):
2375         (WebCore::EventTargetNode::dispatchWindowEvent):
2376         * dom/EventTargetNode.h:
2377         (WebCore::EventTargetNode::localEventListeners):
2378         * svg/SVGElement.cpp:
2379         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
2380         (WebCore::SVGElement::dispatchEvent):
2381
2382 2007-12-15  Eric Seidel  <eric@webkit.org>
2383
2384         Reviewed by Oliver.
2385         
2386         Width of SVG elements not applied to container elements
2387         http://bugs.webkit.org/show_bug.cgi?id=16305
2388         Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
2389         This is caused by poor factoring in the render tree.  RenderContainer probably should be a template.
2390
2391         svg/css/css-box-min-width.html
2392
2393         * rendering/RenderSVGRoot.cpp:
2394         (WebCore::RenderSVGRoot::calcPrefWidths): Added.
2395         * rendering/RenderSVGRoot.h:
2396         * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
2397
2398 2007-12-15  David Kilzer  <ddkilzer@apple.com>
2399
2400         Fix comment after isSafeScript() was renamed to allowsAccessFrom().
2401
2402         * bindings/js/kjs_window.cpp:
2403         (KJS::createWindow):
2404
2405 2007-12-15  Alp Toker  <alp@atoker.com>
2406
2407         Reviewed by Mark Rowe.
2408
2409         http://bugs.webkit.org/show_bug.cgi?id=16449
2410         cairo_arc() functions hang or crash when passed inf as radius or start/end angle
2411
2412         Add checks. This matches a similar workaround for a CG bug in the CG
2413         graphics backend: <rdar://problem/5189233>
2414
2415         Fixes:
2416           fast/canvas/arc-crash.html
2417           fast/canvas/canvas-with-incorrect-args.html
2418
2419         * platform/graphics/cairo/PathCairo.cpp:
2420         (WebCore::Path::addArc):
2421
2422 2007-12-15  Alexey Proskuryakov  <ap@webkit.org>
2423
2424         Reviewed by Darin.
2425
2426         http://bugs.webkit.org/show_bug.cgi?id=16078
2427         Google Maps zooming via the scroll wheel (almost) always zooms IN only.
2428
2429         * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
2430         Ensure that delta is never rounded down to zero - we are getting values less than 1 from 
2431         many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
2432
2433 2007-12-14  Dan Bernstein  <mitz@apple.com>
2434
2435         - Windows build fix
2436
2437         * WebCore.vcproj/WebCore.vcproj:
2438
2439 2007-12-14  Alp Toker  <alp@atoker.com>
2440
2441         GTK+/Qt build fix. Track added files in r28722.
2442
2443         * WebCore.pro:
2444
2445 2007-12-14  Sam Weinig  <sam@webkit.org>
2446
2447         Reviewed by Geoff.
2448
2449         Speed up getElementByClassName.
2450         - This makes getElementByClassName 33% faster on the stress test
2451           linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
2452
2453         * platform/text/StringImpl.cpp:
2454         (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
2455
2456 2007-12-14  Alp Toker  <alp@atoker.com>
2457
2458         Reviewed by Maciej.
2459
2460         http://bugs.webkit.org/show_bug.cgi?id=16432
2461         [GTK] Update license headers
2462
2463         Consent has been given by the authors of these files to change license
2464         to the LGPL as outlined in the bug report.
2465
2466         * platform/gtk/ClipboardGtk.cpp:
2467         * platform/gtk/ContextMenuGtk.cpp:
2468         * platform/gtk/ContextMenuItemGtk.cpp:
2469         * platform/gtk/CookieJarGtk.cpp:
2470         * platform/gtk/CursorGtk.cpp:
2471         * platform/gtk/DragDataGtk.cpp:
2472         * platform/gtk/DragImageGtk.cpp:
2473         * platform/gtk/PasteboardGtk.cpp:
2474         * platform/gtk/PlatformScreenGtk.cpp:
2475         * platform/gtk/PlatformScrollBarGtk.cpp:
2476         * platform/gtk/SearchPopupMenuGtk.cpp:
2477         * platform/gtk/WidgetGtk.cpp:
2478
2479 2007-12-14  Darin Adler  <darin@apple.com>
2480
2481         Reviewed by Adele.
2482
2483         - fix http://bugs.webkit.org/show_bug.cgi?id=16442
2484           navigation policy delegate gets called twice for each load
2485
2486         * loader/MainResourceLoader.cpp:
2487         (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
2488         That's handled by FrameLoader.
2489
2490         * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
2491         and continueAfterNavigationPolicy.
2492
2493 2007-12-14  Anders Carlsson  <andersca@apple.com>
2494
2495         Reviewed by Brady.
2496
2497         Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't
2498         return nil in that case.
2499         
2500         * loader/FrameLoader.cpp:
2501         (WebCore::FrameLoader::didExplicitOpen):
2502
2503 2007-12-14  David Smith  <catfish.man@gmail.com>
2504
2505         Reviewed by Mitz.
2506
2507         - fix http://bugs.webkit.org/show_bug.cgi?id=14955
2508           Implement getElementsByClassName.
2509
2510         This patch also renames AtomicStringList to ClassNames to better reflect its actual use,
2511         and takes advantage of admitting that it's class-specific to encapsulate class attribute 
2512         parsing so it can be shared.  It also changes the class to use a Vector, rather than a linked
2513         list to store the class names.
2514
2515         Tests: fast/dom/getElementsByClassName/001.html
2516                fast/dom/getElementsByClassName/002.html
2517                fast/dom/getElementsByClassName/003.html
2518                fast/dom/getElementsByClassName/004.html
2519                fast/dom/getElementsByClassName/005.html
2520                fast/dom/getElementsByClassName/006.html
2521                fast/dom/getElementsByClassName/007.html
2522                fast/dom/getElementsByClassName/008.html
2523                fast/dom/getElementsByClassName/009.html
2524                fast/dom/getElementsByClassName/010.xml
2525                fast/dom/getElementsByClassName/011.xml
2526                fast/dom/getElementsByClassName/012.html
2527                fast/dom/getElementsByClassName/013.html
2528                fast/dom/getElementsByClassName/014.html
2529                fast/dom/getElementsByClassName/array/001.html
2530                fast/dom/getElementsByClassName/array/002.html
2531                fast/dom/getElementsByClassName/array/003.html
2532                fast/dom/getElementsByClassName/array/004.html
2533                fast/dom/getElementsByClassName/dumpNodeList.html
2534
2535         * WebCore.xcodeproj/project.pbxproj:
2536         * css/CSSStyleSelector.cpp:
2537         (WebCore::CSSStyleSelector::matchRules):
2538         (WebCore::CSSStyleSelector::checkOneSelector):
2539         * dom/AtomicStringList.h: Removed.
2540         * dom/ClassNames.cpp: Added.
2541         (WebCore::ClassNames::contains):
2542         (WebCore::ClassNames::parseClassAttribute):
2543         * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h.
2544         (WebCore::ClassNames::ClassNames):
2545         (WebCore::ClassNames::size):
2546         (WebCore::ClassNames::clear):
2547         (WebCore::ClassNames::operator[]):
2548         (WebCore::isClassWhitespace):
2549         * dom/ClassNodeList.cpp: Added.
2550         (WebCore::ClassNodeList::ClassNodeList):
2551         (WebCore::ClassNodeList::length):
2552         (WebCore::ClassNodeList::item):
2553         (WebCore::ClassNodeList::nodeMatches):
2554         * dom/ClassNodeList.h: Added.
2555         * dom/Document.cpp:
2556         (WebCore::Document::getElementsByName):
2557         (WebCore::Document::getElementsByClassName):
2558         * dom/Document.h:
2559         * dom/Document.idl:
2560         * dom/Element.cpp:
2561         (WebCore::Element::getClassNames):
2562         (WebCore::Element::getElementsByClassName):
2563         * dom/Element.h:
2564         * dom/Element.idl:
2565         * dom/NameNodeList.cpp:
2566         (WebCore::NameNodeList::NameNodeList):
2567         (WebCore::NameNodeList::item):
2568         (WebCore::NameNodeList::nodeMatches):
2569         * dom/NameNodeList.h:
2570         * dom/NamedMappedAttrMap.cpp:
2571         (WebCore::NamedMappedAttrMap::clearAttributes):
2572         (WebCore::NamedMappedAttrMap::parseClassAttribute):
2573         * dom/NamedMappedAttrMap.h:
2574         (WebCore::NamedMappedAttrMap::getClassNames):
2575         * dom/StyledElement.cpp:
2576         (WebCore::StyledElement::getClassNames):
2577         * dom/StyledElement.h:
2578
2579 2007-12-14  Darin Adler  <darin@apple.com>
2580
2581         Reviewed by Sam.
2582
2583         - fix http://bugs.webkit.org/show_bug.cgi?id=16351
2584           FontFallbackList.h doesn't include wtf/PassRefPtr.h
2585           
2586         * platform/graphics/FontFallbackList.h: Added include of <wtf/Forward.h>
2587         * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include.
2588
2589 2007-12-14  Darin Adler  <darin@apple.com>
2590
2591         Reviewed by Alexey.
2592
2593         - http://bugs.webkit.org/show_bug.cgi?id=16420
2594           change regression tests to use document.execCommand instead of textInputController.doCommand
2595
2596         Add a few more operations to document.execCommand.
2597
2598         Finished up the transition to the new Editor::Command, including removing
2599         the Editor::execCommand function.
2600
2601         * WebCore.base.exp: Added Editor::Command::isSupported.
2602         * editing/Editor.h: Removed execCommand.
2603         * editing/EditorCommand.cpp:
2604         (WebCore::expandSelectionToGranularity): Added.
2605         (WebCore::verticalScrollDistance): Added; replaces canScroll.
2606         (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView.
2607         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
2608         (WebCore::executeDeleteForward): Ditto.
2609         (WebCore::executeDeleteToBeginningOfLine): Ditto.
2610         (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
2611         (WebCore::executeDeleteToEndOfLine): Ditto.
2612         (WebCore::executeDeleteToEndOfParagraph): Ditto.
2613         (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other
2614         Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by
2615         removing the explicit scrolling, and letting it be done automatically by code that makes
2616         the caret visible. In some cases the old code would scroll twice which was harmless but
2617         unnecessary.
2618         (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView.
2619         (WebCore::executeMovePageUp): See MovePageDown above.
2620         (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView.
2621         (WebCore::executeSelectLine): Ditto.
2622         (WebCore::executeSelectParagraph): Ditto.
2623         (WebCore::executeSelectSentence): Ditto.
2624         (WebCore::executeSelectWord): Ditto.
2625         (WebCore::executeSwapWithMark): Some small tweaks.
2626
2627         * page/ContextMenuController.cpp:
2628         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command()
2629         instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a
2630         bit more, but I didn't do that this time.
2631
2632         - Removed some obsolete unused code.
2633
2634         * page/mac/EventHandlerMac.mm:
2635         (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for
2636         NSTextView. This was left over from when we used NSTextField and NSTextView for form
2637         elements and is no longer used at all.
2638
2639         * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side
2640         of the bridge or another. We really need to find a time to tear down the rest of the
2641         bridge, but that's not this patch.
2642
2643         * page/mac/WebCoreFrameBridge.mm:
2644         (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly
2645         instead of using a method.
2646         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
2647         Took out obsolete comment about matching enums (we use a single enum now and have for some
2648         time).
2649         (-[WebCoreFrameBridge selectionGranularity]): Ditto.
2650
2651 2007-12-14  Justin Garcia  <justin.garcia@apple.com>
2652
2653         Reviewed by Darin Adler.
2654
2655         <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list
2656
2657         * editing/CompositeEditCommand.cpp:
2658         (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
2659         * editing/CompositeEditCommand.h:
2660         * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
2661         * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
2662         * editing/InsertListCommand.cpp:
2663         (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
2664         it and listNode, if they exists, so that moving listChildNode doesn't put it out
2665         of order.  Added a test case to cover each change.
2666         * editing/SplitElementCommand.cpp:
2667         (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
2668         tries to split a container at a bogus child, and an early return to avoid a
2669         hang in that case.
2670
2671 2007-12-14  Anders Carlsson  <andersca@apple.com>
2672
2673         Reviewed by Darin and Geoff.
2674
2675         <rdar://problem/5619295> 
2676         REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
2677
2678         _NPN_CreateScriptObject doesn't take an origin root object anymore.
2679         
2680         * html/HTMLPlugInElement.cpp:
2681         (WebCore::HTMLPlugInElement::createNPObject):
2682         * page/Frame.cpp:
2683         (WebCore::Frame::windowScriptNPObject):
2684
2685 2007-12-14  Dan Bernstein  <mitz@apple.com>
2686
2687         Reviewed by Darin Adler.
2688
2689         - fix <rdar://problem/5643663> text-shadow and box-shadow offsets 1px smaller than specified
2690           which is the root cause of:
2691           http://bugs.webkit.org/show_bug.cgi?id=12943
2692           box-shadow: small values don't affect shadow position
2693           http://bugs.webkit.org/show_bug.cgi?id=14736
2694           Safari implementation of text-shadow off by 1px
2695
2696         * platform/graphics/cg/GraphicsContextCG.cpp:
2697         (WebCore::GraphicsContext::setShadow): Slightly increase the magnitude
2698         of the offsets passed to CGContextSetShadow* to ensure that the end
2699         result after truncation is the desired integer offsets.
2700
2701 2007-12-13  Alp Toker  <alp@atoker.com>
2702
2703         curl backend build fix for breakage introduced in r28709.
2704
2705         * platform/network/ResourceHandleInternal.h:
2706         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2707
2708 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
2709
2710         Reviewed by Oliver Hunt.
2711
2712         <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element
2713
2714         * editing/InsertLineBreakCommand.cpp:
2715         (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to
2716         handle editing positions, like [input, 0];
2717         * editing/InsertParagraphSeparatorCommand.cpp:
2718         (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled
2719         off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was
2720         the input element itself.
2721         Insert a <br> when a <form> element is the enclosing block instead of splitting/cloning or
2722         nesting a <div>.
2723
2724 2007-12-13  Alp Toker  <alp@atoker.com>
2725
2726         Reviewed by Oliver Hunt.
2727
2728         http://bugs.webkit.org/show_bug.cgi?id=16365
2729         [cURL] Acid2 test segmentation fault
2730
2731         This patch makes the Acid2 test pass.
2732
2733         Defer the cleanup of cancelled jobs and halt further transfer as early
2734         as possible.
2735
2736         Bug found by and initial patch provided by Luca Bruno.
2737
2738         * platform/network/curl/ResourceHandleManager.cpp:
2739         (WebCore::writeCallback):
2740         (WebCore::headerCallback):
2741         (WebCore::ResourceHandleManager::downloadTimerCallback):
2742         (WebCore::ResourceHandleManager::cancel):
2743
2744 2007-12-13  Sam Weinig  <sam@webkit.org>
2745
2746         Reviewed by Mark Rowe.
2747
2748         Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy.
2749
2750         * page/InspectorController.cpp:
2751         (WebCore::moveByUnrestricted):
2752         (WebCore::InspectorController::windowScriptObjectAvailable):
2753         (WebCore::InspectorController::moveWindowBy):
2754         * page/InspectorController.h:
2755         * page/inspector/inspector.js:
2756
2757 2007-12-13  Dan Bernstein  <mitz@apple.com>
2758
2759         Reviewed by Dave Hyatt.
2760
2761         - fix <rdar://problem/5642426> explicit cubic-bezier curves all treated as "default" for transition-timing-function
2762
2763         Test: fast/css/transition-timing-function.html
2764
2765         * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to
2766         not reject non-primitive non-list values, and instead made sure that the
2767         mapping functions rejected them if necessary. This allows non-primitive
2768         timing functions to be mapped.
2769         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
2770         (WebCore::CSSStyleSelector::mapBackgroundClip):
2771         (WebCore::CSSStyleSelector::mapBackgroundComposite):
2772         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
2773         (WebCore::CSSStyleSelector::mapBackgroundImage):
2774         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
2775         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2776         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2777         (WebCore::CSSStyleSelector::mapTransitionDuration):
2778         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
2779         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
2780         (WebCore::CSSStyleSelector::mapTransitionProperty):
2781         * css/CSSTimingFunctionValue.cpp:
2782         (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the
2783         regression test.
2784         * css/CSSTimingFunctionValue.h:
2785         (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue):
2786         Added. Returns true.
2787         * css/CSSValue.h:
2788         (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns
2789         false.
2790
2791 2007-12-13  Steve Falkenburg  <sfalken@apple.com>
2792
2793         Move source file generation into its own vcproj to fix build dependencies.
2794
2795         Reviewed by Adam.
2796
2797         * WebCore.vcproj/WebCore.make:
2798         * WebCore.vcproj/WebCore.sln:
2799         * WebCore.vcproj/WebCore.submit.sln:
2800         * WebCore.vcproj/WebCore.vcproj:
2801         * WebCore.vcproj/WebCoreGenerated.vcproj: Added.
2802
2803 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
2804
2805         Reviewed by Oliver Hunt.
2806         
2807         <rdar://problem/4145786> Undoing a color change of text in a compose window always changes it back to black
2808         
2809         Some of the operations performed in removeHTMLFontStyle were non-undoable.
2810         
2811         I'm having trouble writing a layout test for this because I can't get DRT to
2812         perform editing operations in separate Undo steps without adding unacceptably long
2813         wait times between operations.  I filed:
2814         
2815         <rdar://problem/5646779> Can't get DRT to perform editing operations in separate Undo steps
2816
2817         * editing/ApplyStyleCommand.cpp:
2818         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
2819
2820 2007-12-13  Sam Weinig  <sam@webkit.org>
2821
2822         Reviewed by Anders.
2823
2824         Fix for http://bugs.webkit.org/show_bug.cgi?id=16352
2825         Toolbar dragged inspector cannot be moved beyond screen edges
2826
2827         * page/InspectorController.cpp:
2828         (WebCore::moveByUnrestricted):
2829         (WebCore::InspectorController::windowScriptObjectAvailable):
2830         (WebCore::InspectorController::moveByUnrestricted):
2831         * page/InspectorController.h:
2832         * page/inspector/inspector.js:
2833
2834 2007-12-13  Adam Roben  <aroben@apple.com>
2835
2836         Fix <rdar://5517707> Crash on wptv.wp.pl when "make bigger" button is clicked
2837
2838         Windows Media Player has a modal message loop that will deliver
2839         messages to us at inappropriate times and we will crash if we handle
2840         them when they are delivered. In PluginViewWin, we add a quirk for
2841         Media Player to set a flag whenever we give the plugin a chance to
2842         execute code, and in SharedTimerWin we check if the plugin is
2843         executing code and repost messages if so.
2844
2845         Reviewed by Anders.
2846
2847         * platform/win/SharedTimerWin.cpp:
2848         (WebCore::TimerWindowWndProc): Repost messages if we're calling a
2849         plugin.
2850         * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with
2851         setCallingPlugin(true/false).
2852         (WebCore::PluginViewWin::updateWindow):
2853         (WebCore::PluginViewWin::dispatchNPEvent):
2854         (WebCore::PluginViewWin::setNPWindowRect):
2855         (WebCore::PluginViewWin::start):
2856         (WebCore::PluginViewWin::stop):
2857         (WebCore::PluginViewWin::performRequest):
2858         (WebCore::PluginViewWin::bindingInstance):
2859         (WebCore::PluginViewWin::determineQuirks):
2860         (WebCore::PluginViewWin::setCallingPlugin): Added.
2861         (WebCore::PluginViewWin::isCallingPlugin): Added.
2862         * plugins/win/PluginViewWin.h: Added a new quirk.
2863
2864 2007-12-13  Alp Toker  <alp@atoker.com>
2865
2866         Add a missing DEPENDPATH. Fixes non-clean builds following networking
2867         header changes.
2868
2869         * WebCore.pro:
2870
2871 2007-12-13  Dan Bernstein  <mitz@apple.com>
2872
2873         Reviewed by Anders Carlsson.
2874
2875         - fix regression in fast/text/international/bidi-override on Tiger
2876
2877         * platform/graphics/GlyphPageTreeNode.cpp:
2878         (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here
2879         too. I forgot to add them when I added them to treatAsZeroWidthSpace in
2880         an earlier patch.
2881
2882 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
2883
2884         Reviewed by Darin Adler.
2885
2886         <rdar://problem/5601583> GMail Editor: Copied link doesn't paste as a link, just colored text
2887         
2888         The code that checks the selected Range to see if it's inside an anchor
2889         checks ancestors of the Range's commonAncestor() but not the
2890         commonAncestor() itself, and so we'd fail to add markup for the enclosing
2891         anchor to the pasteboard.
2892         
2893         Some enclosing element getters check the node passed to the getter and some
2894         don't.  There were a few places where we incorrectly assumed that enclosing 
2895         element getters check the node passed to the getter, but this is the only 
2896         case that I'm able to write a test case for at the moment.
2897         
2898         In this patch I've:
2899         Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions,
2900         like the newer enclosing element getters.  This is important because we must
2901         soon add code to the getters so that they understand that some editing positions
2902         inside nodes don't actually refer to positions inside those nodes but positions
2903         before and after them.  Like [table, 0].
2904         Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with
2905         n where [n, o] is the position passed to the getter, instead of starting the the parent
2906         of n.  This makes all but a few of the enclosing element getters behave consistently.
2907         Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable 
2908         nodes if the input position was editable.  This fixes a bug that that the above change
2909         exposed.
2910         Changed enclosingTableCell to simply call enclosingNodeWithType.  We should do
2911         this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType
2912         unless doing so would affect readability, like it would in the case of enclosingTableCell.
2913         Ditto for enclosingBlock.
2914
2915         * editing/AppendNodeCommand.cpp:
2916         (WebCore::AppendNodeCommand::doApply):
2917         * editing/DeleteButtonController.cpp:
2918         (WebCore::enclosingDeletableElement):
2919         * editing/DeleteSelectionCommand.cpp:
2920         (WebCore::DeleteSelectionCommand::initializePositionData):
2921         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor):
2922         * editing/Editor.cpp:
2923         (WebCore::Editor::selectionUnorderedListState):
2924         (WebCore::Editor::selectionOrderedListState):
2925         * editing/IndentOutdentCommand.cpp:
2926         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
2927         (WebCore::IndentOutdentCommand::outdentParagraph):
2928         * editing/InsertNodeBeforeCommand.cpp:
2929         (WebCore::InsertNodeBeforeCommand::doApply):
2930         * editing/InsertParagraphSeparatorCommand.cpp:
2931         (WebCore::InsertParagraphSeparatorCommand::doApply):
2932         * editing/ReplaceSelectionCommand.cpp:
2933         (WebCore::ReplaceSelectionCommand::shouldMerge):
2934         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2935         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
2936         * editing/TextIterator.cpp:
2937         * editing/htmlediting.cpp:
2938         (WebCore::enclosingBlock):
2939         (WebCore::enclosingNodeWithTag):
2940         (WebCore::enclosingNodeOfType):
2941         (WebCore::enclosingTableCell):
2942         (WebCore::isTableCell):
2943         * editing/htmlediting.h:
2944         * editing/markup.cpp:
2945         (WebCore::appendStartMarkup):
2946         (WebCore::createMarkup):
2947
2948 2007-12-13  Alexey Proskuryakov  <ap@webkit.org>
2949
2950         Reviewed by Darin.
2951
2952         Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
2953
2954         * WebCore.base.exp:
2955         * dom/KeyboardEvent.cpp:
2956         (WebCore::KeyboardEvent::charCode):
2957         * page/EventHandler.cpp:
2958         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
2959         (WebCore::EventHandler::keyEvent):
2960         * page/EventHandler.h:
2961         * page/Settings.cpp:
2962         (WebCore::Settings::Settings):
2963         (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks):
2964         * page/Settings.h:
2965         (WebCore::Settings::needsKeyboardEventDisambiguationQuirks):
2966         * page/mac/EventHandlerMac.mm:
2967         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
2968         * platform/PlatformKeyboardEvent.h:
2969         * platform/mac/KeyEventMac.mm:
2970         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2971         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2972
2973 2007-12-13  Dan Bernstein  <mitz@apple.com>
2974
2975         - build fix
2976
2977         * platform/network/cf/ResourceErrorCF.cpp:
2978
2979 2007-12-13  Antti Koivisto  <antti@apple.com>
2980
2981         Reviewed by Tim Hatcher.
2982
2983         Fix <rdar://problem/5605674> 
2984         Make <video> display WebKit context menu instead of the QTKit one.
2985     
2986         It doesn't really matter where the QTMovieView is.
2987
2988         * ChangeLog:
2989         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2990         (WebCore::MediaPlayerPrivate::createQTMovieView):
2991         (WebCore::MediaPlayerPrivate::setRect):
2992
2993 2007-12-13  Dan Bernstein  <mitz@apple.com>
2994
2995         Reviewed by Adam Roben.
2996
2997         - ensure that Unicode bidi control characters are rendered as zero width
2998           spaces
2999
3000         Test: fast/text/international/bidi-control-chars-treated-as-ZWS.html
3001
3002         * platform/graphics/Font.h:
3003         (WebCore::Font::treatAsZeroWidthSpace):
3004         * platform/graphics/GlyphPageTreeNode.cpp:
3005         (WebCore::GlyphPageTreeNode::initializePage):
3006         * platform/text/CharacterNames.h:
3007
3008 2007-12-13  Brady Eidson  <beidson@apple.com>
3009
3010         Build fix
3011
3012         * platform/wx/TemporaryLinkStubs.cpp:
3013
3014 2007-12-12  Brady Eidson  <beidson@apple.com>
3015
3016         Build fix
3017
3018         * platform/gtk/TemporaryLinkStubs.cpp:
3019
3020 2007-12-12  Brady Eidson  <beidson@apple.com>
3021
3022         Build fix
3023
3024         * WebCore.pro:
3025         * history/qt/CachedPageQt.cpp: Removed. Whole purpose for this method being platform-specific has been removed
3026
3027 2007-12-12  Brady Eidson  <beidson@apple.com>
3028
3029         Build fix
3030
3031         * platform/win/TemporaryLinkStubs.cpp:
3032
3033 2007-12-12  Brady Eidson  <beidson@apple.com>
3034
3035         Reviewed by Sam Weinig
3036
3037         Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
3038
3039         All back/forward list and page cache related items used to be in WebKit.
3040         When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
3041         Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
3042         in CachedPage and having the Mac-only CachedPageMac.mm
3043
3044         To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the 
3045         concept of "CachedPagePlatformData" which can contain anything the platform API wants.  
3046
3047         I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.
3048
3049         * WebCore.base.exp:
3050         * WebCore.xcodeproj/project.pbxproj:
3051
3052         * history/CachedPage.cpp:
3053         (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
3054         (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
3055         (WebCore::CachedPage::setCachedPagePlatformData):
3056         (WebCore::CachedPage::cachedPagePlatformData):
3057         * history/CachedPage.h:
3058
3059         * history/CachedPagePlatformData.h: Added.
3060         (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
3061         (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().
3062
3063         * history/PageCache.cpp:
3064         (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"
3065
3066         * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.
3067
3068         * loader/FrameLoader.cpp:
3069         (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform 
3070           (setting the cached DocumentLoader to the Frame).
3071         (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods
3072
3073         * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
3074           become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly
3075
3076         * svg/graphics/SVGImageEmptyClients.h:
3077         (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
3078         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
3079         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):
3080
3081 2007-12-12  Dan Bernstein  <mitz@apple.com>
3082
3083         Reviewed by Oliver Hunt.
3084
3085         - fix <rdar://problem/5074620> text with font:initial; fails to appear (causes fast/text/font-initial.html to fail)
3086
3087         * css/CSSStyleSelector.cpp:
3088         (WebCore::CSSStyleSelector::applyProperty): When the font property is
3089         set to 'initial', set the font size to its initial value, 'medium',
3090         and the font family to the standard family.
3091
3092 2007-12-12  Justin Garcia  <justin.garcia@apple.com>
3093
3094         Reviewed by Darin Adler.
3095
3096         <rdar://problem/5433862> Mail crashes at WebCore::highestAncestor() when deleting a particular selection
3097
3098         * editing/DeleteSelectionCommand.cpp:
3099         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
3100         Don't remove the table row that contained the end of the selection if it is where we are
3101         about to place the ending selection.
3102         Don't remove all empty rows after the row that contained the start of the selection,
3103         they might come after the row that contained the end of the selection.
3104
3105 2007-12-12  Sam Weinig  <sam@webkit.org>
3106
3107         Reviewed by Anders Carlsson.
3108
3109         Add button to clear the Web Inspector's console.
3110
3111         * English.lproj/InspectorLocalizedStrings.js:
3112         * page/inspector/ConsolePanel.js:
3113         * page/inspector/inspector.css:
3114
3115 2007-12-12  Anders Carlsson  <andersca@apple.com>
3116
3117         Reviewed by Adam and Jon.
3118
3119         <rdar://problem/5349282>
3120         popup blocking is not applied to plugins on Windows.
3121         
3122         Implement popup blocking. If the plug-in supports the new 
3123         NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState API we just use that
3124         to determine if a plug-in request can open new windows.
3125         
3126         If a plug-in does not support the new API, we assume that a plug-in can open new windows
3127         in response to either mouse click or key press events.
3128         
3129         * plugins/win/PluginViewWin.cpp:
3130         (WebCore::PluginRequestWin::PluginRequestWin):
3131         (WebCore::PluginRequestWin::shouldAllowPopups):
3132         Add new shouldAllowPopups member.
3133         
3134         (WebCore::PluginViewWin::popPopupsStateTimerFired):
3135         Reset the popup state.
3136         
3137         (WebCore::isWindowsMessageUserGesture):
3138         New function that given a windows message id returns whether it's a user gesture or not.
3139         
3140         (WebCore::PluginViewWin::wndProc):
3141         Allow popups if the window message is a user gesture.
3142         
3143         (WebCore::PluginViewWin::dispatchNPEvent):
3144         New method that dispatches an NPEvent, turning on popups if necessary.
3145         
3146         (WebCore::PluginViewWin::paint):
3147         (WebCore::PluginViewWin::handleKeyboardEvent):
3148         (WebCore::PluginViewWin::handleMouseEvent):
3149         Call dispatchNPEvent().
3150         
3151         (WebCore::PluginViewWin::performRequest):
3152         (WebCore::PluginViewWin::load):
3153         Add calls to shouldAllowPopups().
3154         
3155         (WebCore::PluginViewWin::pushPopupsEnabledState):
3156         (WebCore::PluginViewWin::popPopupsEnabledState):
3157         New methods that maintain the popup state stack.
3158         
3159         (WebCore::PluginViewWin::arePopupsAllowed):
3160         New method that returns whether popups are allowed.
3161         
3162         (WebCore::PluginViewWin::PluginViewWin):
3163         * plugins/win/PluginViewWin.h:
3164         Add new instance variables.
3165         
3166         * plugins/win/npapi.cpp:
3167         (NPN_PushPopupsEnabledState):
3168         (NPN_PopPopupsEnabledState):
3169         Implement these.
3170
3171 2007-12-12  Dan Bernstein  <mitz@apple.com>
3172
3173         Reviewed by John Sullivan.
3174
3175         - fix a bug in debug builds only where selecting an earlier item in
3176           a popup selects the first item
3177
3178         Test: fast/forms/menulist-selection-reset.html
3179
3180         * html/HTMLSelectElement.cpp:
3181         (WebCore::HTMLSelectElement::recalcListItems): Added an argument that
3182         tells that function whether it should update the selected state of
3183         option elements.
3184         (WebCore::HTMLSelectElement::checkListItems): Changed to pass false
3185         as the above argument.
3186         * html/HTMLSelectElement.h:
3187
3188 2007-12-12  Adele Peterson  <adele@apple.com>
3189
3190         Reviewed by Geoff.
3191
3192         Fix for <rdar://problem/5643054> Remove cue point implementation for media elements
3193
3194         When the specification for cue ranges is more final, we will implement those.
3195
3196         * html/HTMLMediaElement.cpp:
3197         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3198         (WebCore::HTMLMediaElement::load):
3199         * html/HTMLMediaElement.h:
3200         * html/HTMLMediaElement.idl:
3201         * platform/graphics/MediaPlayer.cpp:
3202         * platform/graphics/MediaPlayer.h:
3203         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
3204         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3205         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3206         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3207         (WebCore::MediaPlayerPrivate::load):
3208         (WebCore::MediaPlayerPrivate::play):
3209         (WebCore::MediaPlayerPrivate::pause):
3210         (WebCore::MediaPlayerPrivate::setEndTime):
3211         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
3212         (WebCore::MediaPlayerPrivate::endPointTimerFired):
3213         (WebCore::MediaPlayerPrivate::timeChanged):
3214         (WebCore::MediaPlayerPrivate::didEnd):
3215         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3216         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3217         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
3218         (WebCore::MediaPlayerPrivate::endPointTimerFired):
3219         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3220
3221 2007-12-12  MorganL  <morganl.webkit@yahoo.com>
3222
3223         Reviewed by Maciej.
3224
3225         Fixes:
3226         http://bugs.webkit.org/show_bug.cgi?id=16408
3227
3228         When navigating back/forward to a http:// link, we should prefer to
3229         load from cache if possible.
3230
3231         * loader/FrameLoader.cpp:
3232
3233 2007-12-12  Anders Carlsson  <andersca@apple.com>
3234
3235         Reviewed by Sam.
3236
3237         <rdar://problem/5132003>
3238         dumpResourceLoadCallbacks is not implemented in DRT on Windows.
3239         
3240         * platform/network/cf/ResourceErrorCF.cpp:
3241         (WebCore::ResourceError::unpackPlatformError):
3242         Handle kCFErrorDomainWinSock.
3243         
3244         * platform/network/cf/ResourceHandleCFNet.cpp:
3245         (WebCore::willSendRequest):
3246         Ignore willSendRequest calls where the redirect response is null, like we do in 
3247         the Mac version.
3248
3249 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
3250
3251         <rdar://problem/5643785> Fix iBench regression caused by mis-placed nested timer check.
3252         
3253         Reviewed by Anders.
3254
3255         * platform/win/SharedTimerWin.cpp:
3256         (WebCore::TimerWindowWndProc): Don't set high-resolution timer flag inside non-high-resolution timer proc.
3257
3258 2007-12-12  Beth Dakin  <bdakin@apple.com>
3259
3260         Reviewed by Oliver.
3261
3262         Fix for <rdar://problem/5643770> REGRESSION: Free-standing SVGs 
3263         with width and height 100% clip to 300 x 150
3264
3265         Though it was correct in an earlier iteration of my patch, it is 
3266         not sufficient in the final, committed version to ask if the 
3267         relativeWidthValue() or relativeHeightValue() is greater than 0 
3268         just to determine if one has been set, for, they are now 
3269         initialized to 300 and 150 respectively! This patch instead adds a 
3270         bool to keep track of whether a container size has been set, and 
3271         only used the relative value if it has.
3272
3273         * rendering/RenderSVGRoot.cpp:
3274         (WebCore::RenderSVGRoot::calcViewport):
3275         * svg/SVGSVGElement.cpp:
3276         (WebCore::SVGSVGElement::SVGSVGElement):
3277         * svg/SVGSVGElement.h:
3278         (WebCore::SVGSVGElement::setContainerSize):
3279         (WebCore::SVGSVGElement::hasSetContainerSize):
3280
3281 2007-12-12  Brady Eidson  <beidson@apple.com>
3282
3283         Reviewed by Steve Falkenburg 
3284
3285         <rdar://problem/5012636> - WebURLProtectionSpace::realm returns the hostname rather than the authentication realm
3286
3287         * platform/network/ProtectionSpace.cpp:
3288         (WebCore::ProtectionSpace::ProtectionSpace): Assign the realm to m_realm, instead of the host
3289
3290 2007-12-12  Alp Toker  <alp@atoker.com>
3291
3292         Reviewed by Maciej.
3293
3294         http://bugs.webkit.org/show_bug.cgi?id=16388
3295         [GTK] Widget::setCursor() gets called frequently
3296
3297         Cache the current cursor to avoid calling gdk_window_set_cursor() when
3298         there's no change in cursor.
3299
3300         * platform/gtk/WidgetGtk.cpp:
3301         (WebCore::Widget::Widget):
3302         (WebCore::Widget::cursor):
3303         (WebCore::Widget::setCursor):
3304
3305 2007-12-12  Rodney Dawes  <dobey@wayofthemonkey.com>
3306
3307         Reviewed by Maciej.
3308
3309         http://bugs.webkit.org/show_bug.cgi?id=16342
3310         Build Warning and Error fixes in WebCore GTK+
3311
3312         Use C-style casts for casting function pointers to gpointer
3313         Use static_cast<int> to cast a float to int to fix a warning
3314
3315         * platform/gtk/PlatformScrollBarGtk.cpp:
3316         (PlatformScrollbar::PlatformScrollbar):
3317         (PlatformScrollbar::~PlatformScrollbar):
3318         (PlatformScrollbar::gtkValueChanged):
3319         * platform/gtk/ThreadingGtk.cpp:
3320         (callFunctionOnMainThread):
3321         (callOnMainThread):
3322
3323 2007-12-12  Dan Bernstein  <mitz@apple.com>
3324
3325         Reviewed by Darin Adler.
3326
3327         - better fix for a crash when pressing a key that is not associated
3328           with a command
3329
3330         * editing/EditorCommand.cpp:
3331         (WebCore::Editor::command): Return the empty command if the command name
3332         is empty.
3333
3334 2007-12-12  Alexey Proskuryakov  <ap@webkit.org>
3335
3336         Reviewed by Darin.
3337
3338         http://bugs.webkit.org/show_bug.cgi?id=16410
3339         Implement isKeypadEvent() on Windows
3340
3341         Test: platform/win/fast/events/keyLocation-numpad.html
3342
3343         * platform/win/KeyEventWin.cpp:
3344         (WebCore::isKeypadEvent): Added.
3345         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Also fixed a mistake with autorepeat.
3346
3347 2007-12-12  Oliver Hunt  <oliver@apple.com>
3348
3349         Reviewed by Maciej.
3350
3351         <rdar://problem/5071781> window.mouseout events are not sent 
3352         to window when mouse moves out of window 
3353
3354         Make PlatformMouseEvent recognise WM_MOUSELEAVE.
3355
3356         * platform/win/PlatformMouseEventWin.cpp:
3357         (WebCore::messageToEventType):
3358         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3359
3360 2007-12-12  Sam Weinig  <sam@webkit.org>
3361
3362         Fix Mac release build.
3363
3364         * WebCore.base.exp:
3365
3366 2007-12-12  Sam Weinig  <sam@webkit.org>
3367
3368         Build fix for Qt, Gtk, and Wx.
3369
3370         * css/CSSParser.cpp:
3371         (WebCore::CSSParser::parseValue):
3372         * loader/win/FrameLoaderWin.cpp:
3373         (WebCore::FrameLoader::urlSelected):
3374         * platform/network/curl/ResourceHandleManager.cpp:
3375         (WebCore::parseDataUrl):
3376         (WebCore::ResourceHandleManager::startJob):
3377         * platform/network/win/CookieJarWin.cpp:
3378         (WebCore::setCookies):
3379         (WebCore::cookies):
3380         * platform/network/win/ResourceHandleWin.cpp:
3381         (WebCore::ResourceHandle::start):
3382         * platform/qt/PasteboardQt.cpp:
3383         (WebCore::Pasteboard::writeURL):
3384
3385 2007-12-11  Dan Bernstein  <mitz@apple.com>
3386
3387         Reviewed by Maciej Stachowiak.
3388
3389         - allow non-integer font sizes on Windows for small caps
3390
3391         * platform/graphics/win/FontDataWin.cpp:
3392         (WebCore::FontData::smallCapsFontData):
3393         * platform/graphics/win/FontPlatformData.h:
3394         (WebCore::FontPlatformData::size):
3395         (WebCore::FontPlatformData::setSize):
3396         * platform/graphics/win/FontPlatformDataWin.cpp:
3397         (WebCore::FontPlatformData::FontPlatformData):
3398
3399 2007-12-11  Sam Weinig  <sam@webkit.org>
3400
3401         Build fix for Qt, Gtk, and Wx.
3402
3403         * platform/gtk/CookieJarGtk.cpp:
3404         (WebCore::setCookies):
3405         (WebCore::cookies):
3406         * platform/qt/ClipboardQt.cpp:
3407         (WebCore::ClipboardQt::writeURL):
3408         * platform/qt/CookieJarQt.cpp:
3409         (WebCore::setCookies):
3410         (WebCore::cookies):
3411         * platform/wx/PasteboardWx.cpp:
3412         (WebCore::Pasteboard::writeURL):
3413
3414 2007-12-11  Sam Weinig  <sam@webkit.org>
3415
3416         Reviewed by Darin Adler.
3417
3418         Scrub URL out of the tree in preparation for renaming KURL to URL.
3419             - Renames Document::URL() -> Document::url()
3420             - Renames DocumentLoader::URL() -> DocumentLoader::url()
3421             - Renames KURL::url() to KURL::string() and KURL::deprecatedString()
3422             - Remove FrameLoader::URL()
3423             - Various variable renames.
3424
3425         The change from Document::URL() to Document::url() required changes
3426         to the bindings scripts as well, because URL() is the name of a DOM
3427         method.  The code generation scripts now have code to special case URL()
3428         to url().
3429
3430         * WebCore.base.exp:
3431         * bindings/js/kjs_events.cpp:
3432         (WebCore::JSLazyEventListener::parseCode):
3433         * bindings/js/kjs_navigator.cpp:
3434         (KJS::Navigator::getValueProperty):
3435         * bindings/js/kjs_proxy.cpp:
3436         (WebCore::KJSProxy::initScript):
3437         * bindings/js/kjs_window.cpp:
3438         (KJS::Window::put):
3439         (KJS::Window::allowsAccessFrom):
3440         (KJS::Location::put):
3441         (KJS::LocationProtoFuncReplace::callAsFunction):
3442         (KJS::LocationProtoFuncReload::callAsFunction):
3443         (KJS::LocationProtoFuncAssign::callAsFunction):
3444         * bindings/scripts/CodeGenerator.pm:
3445         * bindings/scripts/CodeGeneratorCOM.pm:
3446         * bindings/scripts/CodeGeneratorJS.pm:
3447         * bindings/scripts/CodeGeneratorObjC.pm:
3448         * css/CSSImportRule.cpp:
3449         (WebCore::CSSImportRule::insertedIntoParent):
3450         * css/CSSParser.cpp:
3451         (WebCore::CSSParser::parseValue):
3452         (WebCore::CSSParser::parseContent):
3453         (WebCore::CSSParser::parseBackgroundImage):
3454         (WebCore::CSSParser::parseFontFaceSrc):
3455         (WebCore::CSSParser::parseBorderImage):
3456         (WebCore::CSSParser::createImportRule):
3457         * css/CSSStyleSelector.cpp:
3458         (WebCore::CSSStyleSelector::setEncodedURL):
3459         * dom/Document.cpp:
3460         (WebCore::Document::processHttpEquiv):
3461         (WebCore::Document::cookie):
3462         (WebCore::Document::setCookie):
3463         (WebCore::Document::domain):
3464         (WebCore::Document::setDomain):
3465         (WebCore::Document::getImageMap):
3466         (WebCore::Document::completeURL):
3467         * dom/Document.h:
3468         (WebCore::Document::url):
3469         (WebCore::Document::baseURL):
3470         * dom/Element.cpp:
3471         (WebCore::Element::baseURI):
3472         * dom/ProcessingInstruction.h:
3473         * dom/StyledElement.cpp:
3474         (WebCore::StyledElement::addCSSImageProperty):
3475         * dom/StyledElement.h:
3476         * dom/XMLTokenizer.cpp:
3477         (WebCore::XMLTokenizer::endElementNs):
3478         (WebCore::XMLTokenizer::end):
3479         (WebCore::):
3480         * dom/XMLTokenizer.h:
3481         * editing/Editor.cpp:
3482         (WebCore::Editor::copy):
3483         * editing/markup.cpp:
3484         (WebCore::completeURLs):
3485         * history/CachedPage.h:
3486         (WebCore::CachedPage::url):
3487         * history/HistoryItem.cpp:
3488         (WebCore::HistoryItem::HistoryItem):
3489         (WebCore::HistoryItem::setURL):
3490         (WebCore::HistoryItem::isCurrentDocument):
3491         * html/HTMLBaseElement.cpp:
3492         (WebCore::HTMLBaseElement::process):
3493         * html/HTMLParser.cpp:
3494         (WebCore::HTMLParser::reportErrorToConsole):
3495         * html/HTMLScriptElement.cpp:
3496         (WebCore::HTMLScriptElement::childrenChanged):
3497         (WebCore::HTMLScriptElement::insertedIntoDocument):
3498         (WebCore::HTMLScriptElement::evaluateScript):
3499         * html/HTMLScriptElement.h:
3500         * html/HTMLTokenizer.cpp:
3501         (WebCore::HTMLTokenizer::scriptExecution):
3502         * loader/Cache.cpp:
3503         (WebCore::createResource):
3504         (WebCore::Cache::requestResource):
3505         * loader/CachedCSSStyleSheet.cpp:
3506         (WebCore::CachedCSSStyleSheet::checkNotify):
3507         * loader/CachedResource.cpp:
3508         (WebCore::CachedResource::CachedResource):
3509         * loader/CachedResource.h:
3510         (WebCore::CachedResource::):
3511         * loader/CachedScript.h:
3512         * loader/DocLoader.cpp:
3513         (WebCore::DocLoader::checkForReload):
3514         (WebCore::DocLoader::requestResource):
3515         * loader/DocumentLoader.cpp:
3516         (WebCore::DocumentLoader::url):
3517         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
3518         (WebCore::DocumentLoader::setRequest):
3519         (WebCore::DocumentLoader::startLoadingMainResource):
3520         * loader/DocumentLoader.h:
3521         * loader/FrameLoader.cpp:
3522         (WebCore::FormSubmission::FormSubmission):
3523         (WebCore::ScheduledRedirection::ScheduledRedirection):
3524         (WebCore::FrameLoader::changeLocation):
3525         (WebCore::FrameLoader::urlSelected):
3526         (WebCore::FrameLoader::requestFrame):
3527         (WebCore::FrameLoader::loadSubframe):
3528         (WebCore::FrameLoader::submitFormAgain):
3529         (WebCore::FrameLoader::submitForm):
3530         (WebCore::FrameLoader::didExplicitOpen):
3531         (WebCore::FrameLoader::replaceContentsWithScriptResult):
3532         (WebCore::FrameLoader::executeScript):
3533         (WebCore::FrameLoader::receivedFirstData):
3534         (WebCore::FrameLoader::begin):
3535         (WebCore::FrameLoader::startIconLoader):
3536         (WebCore::FrameLoader::commitIconURLToIconDatabase):
3537         (WebCore::FrameLoader::scheduleRefresh):
3538         (WebCore::FrameLoader::redirectionTimerFired):
3539         (WebCore::FrameLoader::loadPlugin):
3540         (WebCore::FrameLoader::didNotOpenURL):
3541         (WebCore::FrameLoader::updatePolicyBaseURL):
3542         (WebCore::FrameLoader::scrollToAnchor):
3543         (WebCore::FrameLoader::startRedirectionTimer):
3544         (WebCore::FrameLoader::load):
3545         (WebCore::FrameLoader::canLoad):
3546         (WebCore::FrameLoader::shouldHideReferrer):
3547         (WebCore::FrameLoader::shouldAllowNavigation):
3548         (WebCore::FrameLoader::commitProvisionalLoad):
3549         (WebCore::FrameLoader::clientRedirected):
3550         (WebCore::FrameLoader::open):
3551         (WebCore::FrameLoader::didTellBridgeAboutLoad):
3552         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
3553         (WebCore::FrameLoader::post):
3554         (WebCore::FrameLoader::loadResourceSynchronously):
3555         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
3556         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
3557         (WebCore::FrameLoader::createHistoryItem):
3558         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
3559         (WebCore::FrameLoader::loadItem):
3560         (WebCore::FrameLoader::urlsMatchItem):
3561         (WebCore::FrameLoader::recursiveGoToItem):
3562         (WebCore::FrameLoader::updateHistoryForStandardLoad):
3563         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
3564         * loader/FrameLoader.h:
3565         (WebCore::FrameLoader::url):
3566         * loader/ImageDocument.cpp:
3567         (WebCore::ImageDocument::createDocumentStructure):
3568         * loader/MainResourceLoader.cpp:
3569         (WebCore::shouldLoadAsEmptyDocument):
3570         (WebCore::MainResourceLoader::didFinishLoading):
3571         * loader/NavigationAction.cpp:
3572         (WebCore::NavigationAction::NavigationAction):
3573         * loader/NavigationAction.h:
3574         (WebCore::NavigationAction::url):
3575         * loader/PluginDocument.cpp:
3576         (WebCore::PluginTokenizer::createDocumentStructure):
3577         * loader/SubresourceLoader.cpp:
3578         (WebCore::SubresourceLoader::load):
3579         (WebCore::SubresourceLoader::create):
3580         * loader/icon/IconLoader.cpp:
3581         (WebCore::IconLoader::startLoading):
3582         (WebCore::IconLoader::finishLoading):
3583         * loader/loader.cpp:
3584         (WebCore::Loader::servePendingRequests):
3585         * loader/mac/LoaderNSURLExtras.m:
3586         (urlOriginalData):
3587         * page/Chrome.cpp:
3588         (WebCore::Chrome::setToolTip):
3589         * page/ContextMenuController.cpp:
3590         (WebCore::ContextMenuController::contextMenuItemSelected):
3591         * page/Frame.cpp:
3592         (WebCore::Frame::setUserStyleSheetLocation):
3593         * page/InspectorController.cpp:
3594         (WebCore::InspectorResource::type):
3595         (WebCore::addSourceToFrame):
3596         (WebCore::InspectorController::addScriptResource):
3597         (WebCore::InspectorController::updateScriptResourceRequest):
3598         (WebCore::InspectorController::didCommitLoad):
3599         * page/mac/WebCoreFrameBridge.mm:
3600         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
3601         * platform/KURL.h:
3602         (WebCore::KURL::string):
3603         (WebCore::KURL::deprecatedString):
3604         * platform/mac/ClipboardMac.mm:
3605         (WebCore::ClipboardMac::getData):
3606         * platform/mac/CookieJar.mm:
3607         (WebCore::cookies):
3608         (WebCore::setCookies):
3609         * platform/mac/PasteboardMac.mm:
3610         (WebCore::Pasteboard::writeURL):
3611         (WebCore::fileWrapperForImage):
3612         (WebCore::Pasteboard::writeImage):
3613         (WebCore::Pasteboard::plainText):
3614         * platform/network/ResourceHandle.cpp:
3615         (WebCore::ResourceHandle::portAllowed):
3616         * platform/network/ResourceRequestBase.cpp:
3617         (WebCore::ResourceRequestBase::isNull):
3618         * platform/network/cf/ResourceHandleCFNet.cpp:
3619         (WebCore::willSendRequest):
3620         (WebCore::didReceiveResponse):
3621         (WebCore::didReceiveData):
3622         (WebCore::didFinishLoading):
3623         (WebCore::didFail):
3624         (WebCore::didReceiveChallenge):
3625         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
3626         (WebCore::ResourceHandle::~ResourceHandle):
3627         (WebCore::ResourceHandle::start):
3628         * platform/win/ClipboardUtilitiesWin.cpp:
3629         (WebCore::createGlobalData):
3630         (WebCore::urlToMarkup):
3631         * platform/win/ClipboardWin.cpp:
3632         (WebCore::writeURL):
3633         (WebCore::writeImageToDataObject):
3634         (WebCore::ClipboardWin::writeURL):
3635         (WebCore::ClipboardWin::writeRange):
3636         * platform/win/PasteboardWin.cpp:
3637         (WebCore::Pasteboard::writeSelection):
3638         (WebCore::Pasteboard::writeURL):
3639         * plugins/win/PluginDatabaseWin.cpp:
3640         (WebCore::PluginDatabaseWin::findPlugin):
3641         * plugins/win/PluginStreamWin.cpp:
3642         (WebCore::PluginStreamWin::startStream):
3643         (WebCore::PluginStreamWin::destroyStream):
3644         * plugins/win/PluginViewWin.cpp:
3645         (WebCore::scriptStringIfJavaScriptURL):
3646         (WebCore::PluginViewWin::performRequest):
3647         * svg/SVGImageLoader.cpp:
3648         (WebCore::SVGImageLoader::updateFromElement):
3649         * xml/XMLHttpRequest.cpp:
3650         (WebCore::XMLHttpRequest::getResponseXML):
3651         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):