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