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