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