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