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