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