23dd0962e70a6d07096149b4d06bb3dc77db0405
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
2
3         Reviewed by Oliver. Parts reviewed by Eric, David Hyatt & Dan & Alexey.
4         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15741 (REGRESSION: svg/W3C-SVG-1.1/fonts-elem-03-b.svg shows worse behavior on TOT)
5
6         Display SVG Fonts, fill svg/SVGFont.cpp with life by adding all needed code to
7         measure & render glyphs contained in SVG Fonts, including ligature lookup support.
8
9         Implement floatWidth/selectionRectForText for SVG Fonts, fixing text selection.
10
11         Support horiz-origin-x/y, horiz-adv-x, vert-adv-y, vert-origin-x/y & arabic-form.
12         Implement simple algorithm to determine the arabic forms for a string (initial, isolated, medial, terminal).
13
14         Removed drawGlyphsWithSVGFont - create a new function drawTextWithSVGFont instead.
15         This doesn't involve creating/using a 'GlyphBuffer' object anymore, which is not
16         required for SVG Fonts anyway (we already know all our offsets/advances/etc..)
17
18         Don't call it from drawSimpleText anymore, but directly in drawText - as Dan suggested.
19
20         <glyph> elements now register themselves in the SVGFontElement's glyph cache.
21         (insertedIntoDocument / removedFromDocument take care of this)
22
23         The cache is built once now, and is kept updated - it's not rebuild anymore
24         on painting (!) - which was a crude hack for testing.
25
26         W3C testcase which include SVG Fonts:
27         svg/W3C-SVG-1.1/animate-elem-03-t.svg (Fixed, of course not the anim itself, but it's SVG Fonts usage)
28         svg/W3C-SVG-1.1/animate-elem-24-t.svg (Ditto)
29         svg/W3C-SVG-1.1/animate-elem-36-t.svg (Ditto)
30         svg/W3C-SVG-1.1/animate-elem-40-t.svg (Ditto)
31         svg/W3C-SVG-1.1/fonts-kern-01-t.svg (missing <vkern>/<hkern> support)
32         svg/W3C-SVG-1.1/fonts-desc-02-t.svg (Fixed, tests CSS font matching based on font-variant attribute)
33         svg/W3C-SVG-1.1/fonts-elem-01-t.svg (Fixed, basic SVG font test)
34         svg/W3C-SVG-1.1/fonts-elem-02-t.svg (Fixed, accuracy test for embedded SVG font)
35         svg/W3C-SVG-1.1/fonts-elem-05-t.svg (Fixed, checks horiz-origin-x support, note: W3C reference image is wrong)
36         svg/W3C-SVG-1.1/fonts-elem-06-t.svg (Fixed, checks horiz-adv-x support)
37         svg/W3C-SVG-1.1/fonts-glyph-02-t.svg (Fixed, checks arabic-form support)
38         svg/W3C-SVG-1.1/fonts-glyph-03-t.svg (Fixed, checks glyph matching based on xml:lang)
39         svg/W3C-SVG-1.1/masking-mask-01-b.svg (Fixed, SVG Fonts & masking)
40         svg/W3C-SVG-1.1/pservers-grad-08-b.svg (Fixed, SVG Fonts & gradient on fill/stroke)
41         svg/W3C-SVG-1.1/render-elems-06-t.svg (Fixed, simple 'fill' property test)
42         svg/W3C-SVG-1.1/render-elems-07-t.svg (Fixed, simple 'stroke' property test - shows SVG Font interprets stroke-width in glyph coordinate system, as demanded by spec)
43         svg/W3C-SVG-1.1/render-elems-08-t.svg (Fixed, simple 'fill' & 'stroke' property test)
44         svg/W3C-SVG-1.1/render-groups-01-b.svg (missing <vkern>/<hkern> support)
45         svg/W3C-SVG-1.1/render-groups-03-t.svg (Ditto)
46         svg/W3C-SVG-1.1/text-altglyph-01-b.svg (no <altGlyph> support yet)
47         svg/W3C-SVG-1.1/text-text-04-t.svg (Fixed, absolute placing of characters pixel perfect now)
48         svg/W3C-SVG-1.1/text-text-05-t.svg (FIXME: problem with text-anchor)
49         svg/W3C-SVG-1.1/text-text-06-t.svg (highlights problem with ligatures & absolute positioned characters)
50
51         Questionable testcases:
52         svg/W3C-SVG-1.1/fonts-glyph-04-t.svg (tests that glyph selection is done in the order in the definition of the font element.)
53         I am not sure why this behaviour is desired, no comment given in spec - doesn't make much sense to me, ignoring it for now.
54
55         Several other batik testcases fixed, which use SVG Fonts in combination with gradients & filters.
56
57         * css/CSSFontSelector.cpp:
58         (WebCore::CSSFontSelector::addFontFaceRule):
59         (WebCore::CSSFontSelector::getFontData):
60         * platform/graphics/Font.cpp:
61         (WebCore::Font::lineSpacing):
62         (WebCore::Font::xHeight):
63         (WebCore::Font::canUseGlyphCache):
64         (WebCore::Font::drawGlyphBuffer):
65         (WebCore::Font::drawText):
66         (WebCore::Font::floatWidth):
67         (WebCore::Font::selectionRectForText):
68         * platform/graphics/Font.h:
69         (WebCore::TextRun::TextRun):
70         (WebCore::TextRun::activePaintServer):
71         (WebCore::TextRun::setActivePaintServer):
72         * platform/graphics/FontData.cpp:
73         (WebCore::FontData::lineSpacing):
74         (WebCore::FontData::lineGap):
75         (WebCore::FontData::xHeight):
76         * platform/graphics/FontData.h:
77         * platform/graphics/win/FontWin.cpp:
78         (WebCore::Font::drawGlyphs):
79         * rendering/RenderSVGText.cpp:
80         (WebCore::RenderSVGText::relativeBBox):
81         * rendering/SVGInlineTextBox.cpp:
82         (WebCore::SVGInlineTextBox::paintCharacters):
83         * rendering/SVGInlineTextBox.h:
84         * rendering/SVGRootInlineBox.cpp:
85         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
86         * svg/SVGFont.cpp:
87         (WebCore::):
88         (WebCore::processArabicFormDetection):
89         (WebCore::charactersWithArabicForm):
90         (WebCore::isCompatibleArabicForm):
91         (WebCore::isCompatibleGlyph):
92         (WebCore::svgFontAndFontFaceElementForFontData):
93         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
94         (WebCore::SVGTextRunWalker::walk):
95         (WebCore::floatWidthUsingSVGFontCallback):
96         (WebCore::floatWidthMissingGlyphCallback):
97         (WebCore::floatWidthOfSubStringUsingSVGFont):
98         (WebCore::Font::floatWidthUsingSVGFont):
99         (WebCore::drawTextUsingSVGFontCallback):
100         (WebCore::drawTextMissingGlyphCallback):
101         (WebCore::Font::drawTextUsingSVGFont):
102         (WebCore::Font::selectionRectForTextUsingSVGFont):
103         * svg/SVGFontElement.cpp:
104         (WebCore::SVGFontElement::SVGFontElement):
105         (WebCore::SVGFontElement::addGlyphToCache):
106         (WebCore::SVGFontElement::removeGlyphFromCache):
107         (WebCore::SVGFontElement::firstMissingGlyphElement):
108         (WebCore::SVGFontElement::glyphIdentifiersForString):
109         * svg/SVGFontElement.h:
110         (WebCore::SVGFontElement::maximumHashKeyLength):
111         * svg/SVGFontFaceElement.cpp:
112         (WebCore::SVGFontFaceElement::createFontData):
113         (WebCore::SVGFontFaceElement::rebuildFontFace):
114         (WebCore::SVGFontFaceElement::associatedFontElement):
115         * svg/SVGFontFaceElement.h:
116         * svg/SVGGlyphElement.cpp:
117         (WebCore::SVGGlyphElement::insertedIntoDocument):
118         (WebCore::SVGGlyphElement::removedFromDocument):
119         (WebCore::parseArabicForm):
120         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
121         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
122         * svg/SVGGlyphElement.h:
123         (WebCore::SVGGlyphIdentifier::):
124         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
125         (WebCore::SVGGlyphIdentifier::inheritedValue):
126         (WebCore::SVGGlyphIdentifier::operator==):
127         (WebCore::SVGGlyphElement::~SVGGlyphElement):
128
129 2008-01-07  David Hyatt  <hyatt@apple.com>
130
131         Fix for bug 13095, CSS3 multiple backgrounds don't work on table cells.
132
133         Reviewed by Dan
134
135         * rendering/RenderBox.h:
136         * rendering/RenderTableCell.cpp:
137         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
138
139 2008-01-07  Holger Freyther  <zecke@selfish.org>
140
141         Reviewed by Alp Toker.
142
143         * Fix indention
144
145         * platform/gtk/ContextMenuGtk.cpp:
146         (WebCore::ContextMenu::~ContextMenu):
147
148 2008-01-07  Holger Freyther  <zecke@selfish.org>
149
150         Reviewed by Alp Toker.
151
152         * The ContextMenuController is going to live longer than the ContextMenu. It is
153         going to live as long as the WebCore::Page is around where the ContextMenu, specially
154         in the case of a SubMenu, is gone before we popup the menu.
155
156         * platform/gtk/ContextMenuGtk.cpp:
157         (WebCore::menuItemActivated):
158         (WebCore::ContextMenu::appendItem):
159
160 2008-01-07  Holger Freyther  <zecke@selfish.org>
161
162         Reviewed by Alp Toker.
163
164         * Fix SubMenu handling
165         * Do not connect to the activated signal if we are a separator or submenu
166         * Change our type from ActionType to SubMenuType when we have a submenu
167         * Initialize the SubMenu
168
169         * platform/gtk/ContextMenuGtk.cpp:
170         (WebCore::ContextMenu::appendItem):
171         * platform/gtk/ContextMenuItemGtk.cpp:
172         (WebCore::ContextMenuItem::ContextMenuItem):
173         (WebCore::ContextMenuItem::createNativeMenuItem):
174         (WebCore::ContextMenuItem::setSubMenu):
175
176 2008-01-07  Holger Freyther  <zecke@selfish.org>
177
178         Reviewed by Alp Toker.
179
180         * Qt and Gtk must know if a ContextMenuItem is checkable. Add a new ContextMenuItemType for checkable
181         actions.
182         * Use this information in the Gtk platform to create a GtkCheckMenuItem when needed.
183         * Update the ContextMenuController to accept CheckableActionTypes as well.
184         * Change ContextMenu.cpp to use the CheckableActionType. The information if a item is checkable
185         was extracted from ContextMenu::checkOrEnableIfNeeded.
186         * Update the Qt and Windows port.
187
188
189         * page/ContextMenuController.cpp:
190         * platform/ContextMenu.cpp:
191         (WebCore::createAndAppendFontSubMenu):
192         (WebCore::createAndAppendSpellingAndGrammarSubMenu):
193         (WebCore::createAndAppendSpellingSubMenu):
194         (WebCore::createAndAppendWritingDirectionSubMenu):
195         * platform/ContextMenuItem.h:
196         * platform/gtk/ContextMenuItemGtk.cpp:
197         (WebCore::ContextMenuItem::ContextMenuItem):
198         (WebCore::ContextMenuItem::createNativeMenuItem):
199
200 2008-01-07  Luca Bruno  <lethalman88@gmail.com>
201
202         Reviewed by Alp Toker.
203
204         http://bugs.webkit.org/show_bug.cgi?id=16745
205         [GTK] Context menu doesn't feel or look native - no icons
206
207         Use GTK+ stock icons for menu items where possible.
208
209         * platform/gtk/ContextMenuItemGtk.cpp:
210         (WebCore::gtkStockIDFromContextMenuAction):
211         (WebCore::ContextMenuItem::createNativeMenuItem):
212         (WebCore::ContextMenuItem::setAction):
213
214 2008-01-07  Dan Bernstein  <mitz@apple.com>
215
216         Reviewed by John Sullivan.
217
218         - make the ATSUI code path work with custom fonts rather than crash
219
220         * platform/graphics/mac/FontCustomPlatformData.cpp:
221         (WebCore::FontCustomPlatformData::fontPlatformData):
222         * platform/graphics/mac/FontMac.mm:
223         (WebCore::initializeATSUStyle):
224
225 2008-01-07  Thiago Macieira  <thiago.macieira@trolltech.com>
226
227         Reviewed by Simon.
228
229         abort() now emits the signals, so disconnect them before you abort()
230
231         * platform/network/qt/QNetworkReplyHandler.cpp:
232         (WebCore::QNetworkReplyHandler::abort):
233
234 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
235
236         Reviewed by Lars.
237
238         Use a faster and safer way of flattening the form data.
239
240         * platform/network/qt/QNetworkReplyHandler.cpp:
241         (WebCore::QNetworkReplyHandler::start):
242
243 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
244
245         Reviewed by Lars.
246
247         Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
248
249         * WebCore.pro:
250         * platform/network/ResourceHandleInternal.h:
251         * platform/network/qt/QNetworkReplyHandler.cpp: Added.
252         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
253         (WebCore::QNetworkReplyHandler::abort):
254         (WebCore::QNetworkReplyHandler::finish):
255         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
256         (WebCore::QNetworkReplyHandler::forwardData):
257         (WebCore::QNetworkReplyHandler::start):
258         * platform/network/qt/QNetworkReplyHandler.h: Added.
259         (WebCore::QNetworkReplyHandler::reply):
260         * platform/network/qt/ResourceHandleQt.cpp:
261         (WebCore::ResourceHandle::start):
262         (WebCore::ResourceHandle::cancel):
263         (WebCore::ResourceHandle::loadResourceSynchronously):
264         * platform/network/qt/ResourceRequest.h:
265         (WebCore::ResourceRequest::ResourceRequest):
266         * platform/network/qt/ResourceRequestQt.cpp: Added.
267         (WebCore::ResourceRequest::toNetworkRequest):
268         * platform/qt/MIMETypeRegistryQt.cpp:
269         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
270         * platform/qt/PlugInInfoStoreQt.cpp:
271         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
272         (WebCore::PlugInInfoStore::pluginCount):
273         (WebCore::PlugInInfoStore::pluginNameForMIMEType):
274
275 2008-01-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
276
277         Reviewed by Lars.
278
279         * Remove m_dirtyRegion as it is not used as we pass every dirty region
280         directly to the ChromeClient
281
282         * platform/qt/ScrollViewQt.cpp:
283         (WebCore::ScrollView::paint):
284
285 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
286
287         Reviewed by Oliver.
288
289         Small CG paint server cleanups - use more GraphicsContext method where possible.
290
291         * svg/graphics/cg/CgSupport.cpp:
292         (WebCore::applyStrokeStyleToContext):
293         (WebCore::strokeBoundingBox):
294         * svg/graphics/cg/CgSupport.h:
295         * svg/graphics/cg/RenderPathCg.cpp:
296         (WebCore::RenderPath::strokeContains):
297         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
298         (WebCore::SVGPaintServerGradient::setup):
299         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
300         (WebCore::SVGPaintServerPattern::setup):
301         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
302         (WebCore::SVGPaintServerSolid::setup):
303
304 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
305
306         Reviewed by Dan.
307
308         Use new helper function isArabicChar() - which also calls ublock_getCode() == UBLOCK_ARABIC on mac.
309
310         * platform/graphics/mac/FontMac.mm:
311         (WebCore::ATSULayoutParameters::initialize):
312
313 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
314
315         Reviewed by Darin.
316         
317         DOMRange doesn't correctly re-size when inserting items (Acid3)
318         http://bugs.webkit.org/show_bug.cgi?id=16764
319         
320         Update the offset for the range when inserting items into the range.
321
322         Test: fast/dom/Range/range-modifycontents.html
323
324         * dom/Range.cpp:
325         (WebCore::Range::insertNode):
326
327 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
328
329         Reviewed by Darin.
330
331         http://bugs.webkit.org/show_bug.cgi?id=16731
332         Incorrect node type for whitespace when setting innerHTML in an XHTML document
333
334         Test: fast/dom/xhtml-fragment-whitespace.xhtml
335
336         * dom/XMLTokenizer.cpp: (WebCore::parseXMLDocumentFragment):
337         Use balancedCharactersHandler for ignorable whitespace.
338
339 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
340
341         Reviewed by Darin.
342
343         http://bugs.webkit.org/show_bug.cgi?id=16701
344         <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
345         causes page load error
346
347         Test: http/tests/misc/location-with-space.php
348
349         * platform/network/cf/ResourceRequestCFNet.cpp:
350         (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
351
352 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
353
354         Reviewed by Darin.
355         
356         DOMRange.cloneContents does not work (Acid3 bug)
357         http://bugs.webkit.org/show_bug.cgi?id=16748
358         
359         When cloning an empty range, return an empty DocmentFragment instead of
360         null or undefined.
361
362         Test: fast/dom/Range/range-clone-empty.html
363
364         * dom/Range.cpp:
365         (WebCore::Range::processContents):
366
367 2008-01-06  Luca Bruno  <lethalman88@gmail.com>
368
369         Reviewed by Alp Toker.
370
371         Remove curl handles immediately if the timer is not running.
372
373         * platform/network/curl/ResourceHandleManager.cpp:
374         (WebCore::ResourceHandleManager::cancel):
375
376 2008-01-06  Alp Toker  <alp@atoker.com>
377
378         Reviewed by Eric.
379
380         Cairo canvas refcounting fix. Reference the surface in the constructor
381         to match its destruction in the destructor.
382
383         Fixes a crash triggered by leaving this page:
384           http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
385
386         * html/CanvasPattern.cpp:
387         (WebCore::CanvasPattern::CanvasPattern):
388
389 2008-01-06  Eric Seidel  <eric@webkit.org>
390
391         Reviewed by darin.
392
393         Make attr selectors case-insensitive for certain HTML attributes
394         http://bugs.webkit.org/show_bug.cgi?id=15470
395
396         Test: fast/css/html-attr-case-sensitivity.html
397
398         * css/CSSStyleSelector.cpp:
399         (WebCore::addLocalNameToSet):
400         (WebCore::createHtmlCaseInsensitiveAttributesSet):
401         (WebCore::htmlAttributeHasCaseInsensitiveValue):
402         (WebCore::CSSStyleSelector::checkOneSelector):
403
404 2008-01-06  Eric Seidel  <eric@webkit.org>
405
406         Reviewed by Sam.
407
408         Fix :checked matching type='text' and add test case
409         http://bugs.webkit.org/show_bug.cgi?id=16750
410
411         Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
412
413         * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
414
415 2008-01-05  Sam Weinig  <sam@webkit.org>
416
417         Reviewed by Eric Seidel.
418
419         Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
420         ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
421
422         - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
423
424         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
425
426         * dom/TreeWalker.cpp:
427         (WebCore::TreeWalker::parentNode):
428         (WebCore::TreeWalker::firstChild):
429         (WebCore::TreeWalker::lastChild):
430         (WebCore::TreeWalker::previousSibling):
431         (WebCore::TreeWalker::nextSibling):
432         (WebCore::TreeWalker::previousNode):
433         (WebCore::TreeWalker::nextNode):
434
435 2008-01-04  Oliver Hunt  <oliver@apple.com>
436
437         Reviewed by Beth Dakin.
438
439         Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
440         and other image repaint bugs.
441
442         We now cache the full local bounds for the <image> element, as otherwise certain
443         combinations of attribute changes could result in incorrect dirty rects.
444         Additionally we no longer use any of the integer bounds fields on RenderObject for
445         determining repaint bounds (this was the principle cause of bug #16015).
446
447         I also removed the outline painting code as it was both wrong, and not correctly
448         repainted.  I feel safe doing this as no other browser or viewer supports outline
449         properties on svg elements.
450
451         I was unable to make a testcase for this unfortunately, despite seemingly deterministic 
452         behaviour :(
453
454         * rendering/RenderSVGImage.cpp:
455         (WebCore::RenderSVGImage::layout):
456         (WebCore::RenderSVGImage::paint):
457         (WebCore::RenderSVGImage::nodeAtPoint):
458         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
459         * rendering/RenderSVGImage.h:
460
461 2008-01-04  Beth Dakin  <bdakin@apple.com>
462
463         Reviewed by Oliver.
464
465         Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with 
466         type="hidden" matches :enabled/:disabled (Acid3 bug)
467
468         Prevent :enabled and :disabled from applying to input type="hidden" 
469
470         * css/CSSStyleSelector.cpp:
471         (WebCore::CSSStyleSelector::checkOneSelector): Rather than 
472         allowing :enabled and :disabled to apply to all controls, only 
473         allow it to apply to non-"hidden" controls
474         * dom/Element.h:
475         (WebCore::Element::isInputTypeHidden): 
476         * html/HTMLInputElement.h:
477         (WebCore::HTMLInputElement::isInputTypeHidden):
478
479 2008-01-04  Sam Weinig  <sam@webkit.org>
480
481         Reviewed by Oliver Hunt.
482
483         - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
484           getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
485           if the type of the CSSPrimitiveValue is not the same as the type requested.
486         - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
487
488         Test: fast/css/CSSPrimitiveValue-exceptions.html
489
490         * css/CSSPrimitiveValue.cpp:
491         (WebCore::CSSPrimitiveValue::getDoubleValue):
492         (WebCore::CSSPrimitiveValue::getStringValue):
493         (WebCore::CSSPrimitiveValue::getCounterValue):
494         (WebCore::CSSPrimitiveValue::getRectValue):
495         (WebCore::CSSPrimitiveValue::getRGBColorValue):
496         (WebCore::CSSPrimitiveValue::getPairValue):
497         * css/CSSPrimitiveValue.h:
498         (WebCore::CSSPrimitiveValue::getFloatValue):
499         (WebCore::CSSPrimitiveValue::getIntValue):
500         (WebCore::CSSPrimitiveValue::getCounterValue):
501         (WebCore::CSSPrimitiveValue::getRectValue):
502         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
503         * css/CSSPrimitiveValue.idl:
504
505 2008-01-04  Antti Koivisto  <antti@apple.com>
506
507         Reviewed by Darin.
508         
509         Windows part of <rdar://problem/5647034>
510         Media tests crash if an old version of QuickTime is installed
511
512         Check QuickTime version on Windows too.
513
514         * platform/graphics/MediaPlayer.cpp:
515         (WebCore::MediaPlayer::isAvailable):
516         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
517         (WebCore::MediaPlayerPrivate::isAvailable):
518         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
519         (WebCore::MediaPlayerPrivate::isAvailable):
520         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
521         * platform/graphics/win/QTMovieWin.cpp:
522         (QTMovieWin::initializeQuickTime):
523
524 2008-01-04  Darin Adler  <darin@apple.com>
525
526         Reviewed by Maciej and Alice.
527
528         - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
529
530         Test: fast/images/border.html
531
532         * html/HTMLImageElement.cpp:
533         (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
534         where the border value is not a number to use the value "0" for the border width instead
535         of not setting the border width and style at all. This matches other browsers, and makes
536         more sense.
537
538 2008-01-04  Antti Koivisto  <antti@apple.com>
539
540         Try to fix 64-bit build
541
542         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
543         (WebCore::MediaPlayerPrivate::isAvailable):
544
545 2008-01-04  Stephanie  <slewis@apple.com>
546
547         Reviewed by Oliver.
548
549         WARNING: NO TEST CASES ADDED OR CHANGED
550
551         Fix another stringImpl leak.
552
553         * platform/text/StringImpl.cpp: remove an extra allocation
554         (WebCore::StringImpl::StringImpl):
555
556 2008-01-04  Alice Liu  <alice.liu@apple.com>
557
558         Reviewed by Mitz.
559
560         * platform/graphics/win/FontCacheWin.cpp:
561         fix loop condition that was causing crash
562
563 2008-01-04  Timothy Hatcher  <timothy@apple.com>
564
565         Reviewed by Adam Roben.
566
567         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
568
569         * page/inspector/inspector.css: Remove styles related to the toggle button
570           and make the area always visible. 
571         * page/inspector/inspector.html: Remove the toggle button.
572         * page/inspector/inspector.js: Remove code to toggle the status area.
573
574 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
575
576         Reviewed by Adam Roben.
577
578         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
579
580         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
581
582 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
583
584         Reviewed by Darin.
585
586         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
587
588         Enable the fix on Windows.
589
590         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
591         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
592
593         * xml/XSLTUnicodeSort.cpp:
594         (WebCore::xsltUnicodeSortFunction):
595         * xml/XSLTUnicodeSort.h:
596         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
597
598 2008-01-04  Antti Koivisto  <antti@apple.com>
599
600         Fix build.
601
602         * bindings/js/JSHTMLElementWrapperFactory.cpp:
603
604 2008-01-04  Antti Koivisto  <antti@apple.com>
605
606         Reviewed by Darin.
607         
608         Partial fix for <rdar://problem/5647034>
609         Media tests crash if an old version of QuickTime is installed
610
611         Disable media support if QuickTime is not current enough (>=7.3).
612         
613         Windows patch coming soon.
614
615         * bindings/js/JSHTMLElementWrapperFactory.cpp:
616         (WebCore::createJSHTMLWrapper):
617         * bindings/js/kjs_window.cpp:
618         (KJS::Window::getValueProperty):
619         * html/HTMLElementFactory.cpp:
620         (WebCore::audioConstructor):
621         (WebCore::videoConstructor):
622         (WebCore::sourceConstructor):
623         * platform/graphics/MediaPlayer.cpp:
624         (WebCore::MediaPlayer::isAvailable):
625         * platform/graphics/MediaPlayer.h:
626         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
627         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
628         (WebCore::MediaPlayerPrivate::isAvailable):
629
630 2008-01-04  Timothy Hatcher  <timothy@apple.com>
631
632         Reviewed by Darin Adler.
633
634         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
635
636         Check if the property is a getter before asking for the value.
637         If the property is a getter, we no longer show the value.
638
639         * page/inspector/PropertiesSidebarPane.js:
640         * page/inspector/inspector.css:
641
642 2008-01-04  Dan Bernstein  <mitz@apple.com>
643
644         Reviewed by Darin Adler.
645
646         - fix synthetic bold and italic on Windows
647
648         Covered by an existing test.
649
650         * platform/graphics/win/FontPlatformDataWin.cpp:
651         (WebCore::FontPlatformData::FontPlatformData):
652
653 2008-01-04  Alp Toker  <alp@atoker.com>
654
655         GTK+ autotools build fix. Terminate empty rules.
656
657         * GNUmakefile.am:
658
659 2008-01-04  Lars Knoll  <lars@trolltech.com>
660
661         Reviewed by Simon.
662
663         Remove most dependencies of Widget/ScrollView onto native QWidgets.
664
665         This also brings the code closer in line with the Windows code. Seems
666         to work nicely on first try :)
667
668         * page/qt/FrameQt.cpp:
669         (WebCore::Frame::createScriptInstanceForWidget):
670         * platform/Widget.h:
671         * platform/qt/PlatformScreenQt.cpp:
672         (WebCore::screenDepth):
673         (WebCore::screenDepthPerComponent):
674         (WebCore::screenIsMonochrome):
675         (WebCore::screenRect):
676         * platform/qt/PlatformScrollBarQt.cpp:
677         (WebCore::PlatformScrollbar::thumbPosition):
678         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
679         * platform/qt/ScrollViewQt.cpp:
680         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
681         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
682         (WebCore::ScrollView::updateContents):
683         (WebCore::ScrollView::update):
684         (WebCore::ScrollView::scrollRectIntoViewRecursively):
685         (WebCore::ScrollView::updateScrollbars):
686         (WebCore::ScrollView::addChild):
687         (WebCore::ScrollView::removeChild):
688         (WebCore::ScrollView::paint):
689         * platform/qt/WidgetQt.cpp:
690         (WebCore::WidgetPrivate::WidgetPrivate):
691         (WebCore::WidgetPrivate::~WidgetPrivate):
692         (WebCore::Widget::frameGeometry):
693         (WebCore::Widget::setFrameGeometry):
694         (WebCore::Widget::setCursor):
695         (WebCore::Widget::show):
696         (WebCore::Widget::hide):
697         (WebCore::Widget::nativeWidget):
698         (WebCore::Widget::setNativeWidget):
699         (WebCore::Widget::suppressInvalidation):
700         (WebCore::Widget::setSuppressInvalidation):
701         (WebCore::Widget::invalidateRect):
702         (WebCore::Widget::topLevel):
703         (WebCore::Widget::containingWindow):
704
705 2008-01-04  Lars Knoll  <lars@trolltech.com>
706
707         Reviewed by Simon.
708
709         make QWebPage a QObject and get things to compile.
710
711         Nothing works currently though.
712
713         * platform/qt/ScrollViewQt.cpp:
714         (WebCore::ScrollView::updateContents):
715         (WebCore::ScrollView::update):
716         * platform/qt/WidgetQt.cpp:
717         (WebCore::Widget::qwidget):
718         (WebCore::Widget::invalidateRect):
719
720 2008-01-04  Alp Toker  <alp@atoker.com>
721
722         Reviewed by Mark Rowe.
723
724         http://bugs.webkit.org/show_bug.cgi?id=16667
725         make -j is failing with the autotools based system
726
727         Support parallel code generation. Nearly every use of explicit
728         multiple targets was a potential concurrency bug, though in practice
729         the bison rules were the first to be noticed because they took longer
730         to complete and broke the build immediately.
731
732         * GNUmakefile.am:
733
734 2008-01-04  Alp Toker  <alp@atoker.com>
735
736         Reviewed by Mark Rowe.
737
738         Re-use a single static dummy surface rather than creating and
739         destroying a surface for each CairoPath.
740
741         * platform/graphics/cairo/CairoPath.h:
742         (WebCore::CairoPath::CairoPath):
743
744 2008-01-04  Mark Rowe  <mrowe@apple.com>
745
746         Tiger build fix.
747
748         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
749
750 2008-01-03  Mark Rowe  <mrowe@apple.com>
751
752         Reviewed by Maciej Stachowiak.
753
754         Use platform-provided atomic operations in place of inline assembly to
755         increase portability.
756
757         * platform/Threading.h:
758         (WebCore::atomicIncrement):
759         (WebCore::atomicDecrement):
760
761 2008-01-03  Oliver Hunt  <oliver@apple.com>
762
763         Reviewed by Maciej.
764
765         Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
766
767         We need to cache the absolute bounds of the <image>,
768         as there's no reliable way to recompute the old bounding
769         box one we have started layout.
770
771         * rendering/RenderSVGImage.cpp:
772         (WebCore::RenderSVGImage::layout):
773         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
774         * rendering/RenderSVGImage.h:
775
776 2008-01-03  Alp Toker  <alp@atoker.com>
777
778         Reviewed by Mark Rowe.
779
780         Support building in Scratchbox, which has a version of make that fails
781         on wildcard syntax. Use a vpath to match IDL files instead.
782
783         * GNUmakefile.am:
784
785 2008-01-03  Jon Honeycutt  <jhoneycutt@apple.com>
786
787         Reviewed by Darin.
788
789         <rdar://problem/5504775> PDF page will not load first time after Adobe
790         Reader install, unless browser is relaunched
791
792         Refresh and re-search the plugin database if the MIME type is not
793         registered.
794
795         * plugins/win/PluginDatabaseWin.cpp:
796         (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
797         * plugins/win/PluginDatabaseWin.h:
798
799 2008-01-03  Dan Bernstein  <mitz@apple.com>
800
801         Reviewed by Darin Adler.
802
803         - fix http://bugs.webkit.org/show_bug.cgi?id=16548
804           <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
805
806         * platform/graphics/win/FontCacheWin.cpp:
807         (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
808         a valid LOGFONT for a given family.
809         (WebCore::getLinkedFonts): Added. Returns a vector of font families
810         linked to the given font family by the Windows registry key
811         HKLM\Software\...\FontLink\SystemLink. The registry values typically
812         differ based on the installed language version of Windows.
813         (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
814         font mapping, which is Windows code page based, except for characters in
815         the range U+2000..U+200F. Instead, this function gets the font Uniscribe
816         would use for the character. However, that font might not actually
817         contain the character, in which case GDI font linking would substitute a
818         different font. Therefore, this function walks the linked font list
819         until it finds a font that actually contains the character.
820
821 2008-01-03  Darin Adler  <darin@apple.com>
822
823         Reviewed by Mitz.
824
825         - fix http://bugs.webkit.org/show_bug.cgi?id=16723
826           tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
827
828         Test: fast/table/border-changes.html
829
830         * html/HTMLTableElement.h:
831         * html/HTMLTableElement.cpp:
832         (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
833         parsing attributes, rather than doing this only for the rules attribute.
834         (WebCore::HTMLTableElement::cellBorders): Added.
835         (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
836         rule about what type of borders to use.
837
838 2008-01-02  Sam Weinig  <sam@webkit.org>
839
840         Reviewed by Darin.
841
842         Pass the prototype of WebCore JS objects up the constructor chain
843         rather than explicitly setting using setPrototype.  This removes many
844         redundant settings of the prototype on construction.  To avoid a CG 
845         hazard, the prototype must be constructed before calling the
846         constructor of the JS object.
847
848         - JS objects that inherit from DOMObject, which all bindings objects
849           (except Window) do, now can't implicitly have a jsNull prototype, but
850           must explicitly pass it up the construction chain.
851
852         * bindings/js/JSCSSRuleCustom.cpp:
853         (WebCore::toJS):
854         * bindings/js/JSCSSValueCustom.cpp:
855         (WebCore::toJS):
856         * bindings/js/JSDocumentCustom.cpp:
857         (WebCore::toJS):
858         * bindings/js/JSEventCustom.cpp:
859         (WebCore::toJS):
860         * bindings/js/JSEventTargetNode.cpp:
861         (WebCore::JSEventTargetNode::JSEventTargetNode):
862         * bindings/js/JSEventTargetNode.h:
863         * bindings/js/JSHTMLAllCollection.h:
864         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
865         * bindings/js/JSHTMLAudioElementConstructor.cpp:
866         (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
867         * bindings/js/JSHTMLCollectionCustom.cpp:
868         (WebCore::getNamedItems):
869         (WebCore::toJS):
870         * bindings/js/JSHTMLElementWrapperFactory.cpp:
871         (WebCore::createJSHTMLWrapper):
872         * bindings/js/JSHTMLFormElementCustom.cpp:
873         (WebCore::JSHTMLFormElement::nameGetter):
874         * bindings/js/JSHTMLInputElementBase.cpp:
875         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
876         * bindings/js/JSHTMLInputElementBase.h:
877         * bindings/js/JSHTMLOptionElementConstructor.cpp:
878         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
879         * bindings/js/JSLocation.cpp:
880         (WebCore::JSLocation::JSLocation):
881         * bindings/js/JSLocation.h:
882         * bindings/js/JSNamedNodesCollection.cpp:
883         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
884         * bindings/js/JSNamedNodesCollection.h:
885         * bindings/js/JSNodeCustom.cpp:
886         (WebCore::toJS):
887         * bindings/js/JSSVGElementWrapperFactory.cpp:
888         (WebCore::createJSSVGWrapper):
889         * bindings/js/JSSVGPathSegCustom.cpp:
890         (WebCore::toJS):
891         * bindings/js/JSStyleSheetCustom.cpp:
892         (WebCore::toJS):
893         * bindings/js/JSXMLHttpRequest.cpp:
894         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
895         (KJS::JSXMLHttpRequestConstructorImp::construct):
896         (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
897         * bindings/js/JSXMLHttpRequest.h:
898         * bindings/js/JSXSLTProcessor.cpp:
899         (KJS::JSXSLTProcessor::JSXSLTProcessor):
900         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
901         (KJS::XSLTProcessorConstructorImp::implementsConstruct):
902         (KJS::XSLTProcessorConstructorImp::construct):
903         * bindings/js/JSXSLTProcessor.h:
904         * bindings/js/kjs_binding.h:
905         (KJS::DOMObject::DOMObject):
906         (KJS::cacheDOMObject):
907         (KJS::cacheSVGDOMObject):
908         * bindings/js/kjs_css.cpp:
909         (WebCore::JSRGBColor::JSRGBColor):
910         (WebCore::getJSRGBColor):
911         * bindings/js/kjs_css.h:
912         * bindings/js/kjs_events.cpp:
913         (WebCore::JSClipboard::JSClipboard):
914         (WebCore::toJS):
915         * bindings/js/kjs_events.h:
916         * bindings/js/kjs_html.cpp:
917         (WebCore::ImageConstructorImp::ImageConstructorImp):
918         * bindings/js/kjs_navigator.cpp:
919         (KJS::Navigator::Navigator):
920         (KJS::PluginBase::PluginBase):
921         * bindings/js/kjs_navigator.h:
922         * bindings/js/kjs_window.cpp:
923         (KJS::Window::Window):
924         (KJS::Window::location):
925         (KJS::Window::getValueProperty):
926         * bindings/js/kjs_window.h:
927         * bindings/scripts/CodeGeneratorJS.pm:
928
929 2008-01-03  Holger Hans Peter Freyther  <zecke@selfish.org>
930
931         Reviewed by Alp.
932
933         -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
934
935         Change the Gtk ContextMenuItem code to generate the GtkMenuItem
936         or GtkCheckMenuItem on the fly. Currently we will create a
937         GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
938         to be done is to change WebCore to tell the platform code if an item
939         is checkable or not.
940
941         * platform/ContextMenuItem.h:
942         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
943         * platform/gtk/ContextMenuGtk.cpp:
944         (WebCore::ContextMenu::appendItem):
945         * platform/gtk/ContextMenuItemGtk.cpp:
946         (WebCore::ContextMenuItem::ContextMenuItem):
947         (WebCore::ContextMenuItem::~ContextMenuItem):
948         (WebCore::ContextMenuItem::createNativeMenuItem):
949         (WebCore::ContextMenuItem::releasePlatformDescription):
950         (WebCore::ContextMenuItem::type):
951         (WebCore::ContextMenuItem::setType):
952         (WebCore::ContextMenuItem::action):
953         (WebCore::ContextMenuItem::setAction):
954         (WebCore::ContextMenuItem::platformSubMenu):
955         (WebCore::ContextMenuItem::setSubMenu):
956         (WebCore::ContextMenuItem::setChecked):
957
958 2008-01-03  Dan Bernstein  <mitz@apple.com>
959
960         Rubber-stamped by Adam Roben.
961
962         - update the project hierarchy to match the on-disk organization of
963           the platform directory.
964
965         * WebCore.vcproj/WebCore.vcproj:
966
967 2008-01-03  Adam Roben  <aroben@apple.com>
968
969         Fix a buffer overrun and a leak introduced in r29098
970
971         Reviewed by Mark.
972
973         * platform/text/StringImpl.cpp:
974         (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
975         it be big enough to hold the string contents plus the null terminator.
976
977 2008-01-03  Simon Hausmann  <hausmann@webkit.org>
978
979         Reviewed by Lars.
980
981         Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
982
983         * WebCore.pro:
984
985 2008-01-03  Alp Toker  <alp@atoker.com>
986
987         Suggested by Mark Rowe.
988
989         Fix indentation and remove trailing whitespace.
990
991         * platform/network/curl/ResourceHandleManager.cpp:
992
993 2008-01-03  Luca Bruno  <lethalman88@gmail.com>
994
995         Reviewed by Alp Toker.
996
997         Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
998         that the two POST methods don't conflict.
999
1000         * platform/network/curl/ResourceHandleManager.cpp:
1001         (WebCore::ResourceHandleManager::setupPOST):
1002
1003 2008-01-02  Darin Adler  <darin@apple.com>
1004
1005         - touched some files to try to get the Windows buildbot building again
1006
1007 2008-01-02  Dan Bernstein  <mitz@apple.com>
1008
1009         Reviewed by Sam Weinig.
1010
1011         - fix small caps rendering
1012
1013         Covered by an existing test.
1014
1015         * platform/graphics/win/FontDataWin.cpp:
1016         (WebCore::FontData::smallCapsFontData):
1017
1018 2008-01-02  Antti Koivisto  <antti@apple.com>
1019
1020         Reviewed by Oliver.
1021
1022         Calculate video position and size within the renderer box in WebCore. This
1023         way the aspect ratio calculation is not needed in each MediaPlayer implementation.
1024         
1025         This fixes video aspect ratio on Windows.
1026         
1027         Covered by an existing pixel test.
1028
1029         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1030         (WebCore::MediaPlayerPrivate::createQTMovieView):
1031         * rendering/RenderVideo.cpp:
1032         (WebCore::RenderVideo::videoBox):
1033         (WebCore::RenderVideo::paintReplaced):
1034         (WebCore::RenderVideo::updatePlayer):
1035         * rendering/RenderVideo.h:
1036
1037 2008-01-02  Ada Chan  <adachan@apple.com>
1038
1039         Fix windows build.
1040
1041         * WebCore.vcproj/WebCore.vcproj:
1042
1043 2008-01-02  John Sullivan  <sullivan@apple.com>
1044
1045         Reviewed by Dan Bernstein
1046         
1047         - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
1048
1049         * loader/DocumentLoader.cpp:
1050         (WebCore::canonicalizedTitle):
1051         in the code that replaces control characters with white space, also replace the unicode line separator
1052         and paragraph separator characters
1053
1054 2008-01-02  Darin Adler  <darin@apple.com>
1055
1056         - fix buffer overruns seen on buildbot
1057
1058         * platform/text/StringImpl.cpp:
1059         (WebCore::countCharacter): Added this.
1060         (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
1061         (WebCore::StringImpl::toLengthArray): Ditto.
1062         (WebCore::StringImpl::replace): Added assertions.
1063
1064 2008-01-02  Darin Adler  <darin@apple.com>
1065
1066         Reviewed by Maciej.
1067
1068         - fix http://bugs.webkit.org/show_bug.cgi?id=16657
1069           Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
1070         - fix http://bugs.webkit.org/show_bug.cgi?id=16659
1071           Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
1072
1073         Tests: dom/html/level2/html/HTMLCollection07.html
1074                dom/html/level2/html/HTMLCollection08.html
1075                dom/html/level2/xhtml/HTMLCollection07.xhtml
1076                dom/html/level2/xhtml/HTMLCollection08.xhtml
1077                fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
1078                fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
1079
1080         * GNUmakefile.am: Added HTMLTableRowsCollection.
1081         * WebCore.pro: Ditto.
1082         * WebCore.vcproj/WebCore.vcproj: Ditto.
1083         * WebCore.xcodeproj/project.pbxproj: Ditto.
1084         * WebCoreSources.bkl: Ditto.
1085
1086         * dom/XMLTokenizer.cpp: Took out stray include.
1087
1088         * html/HTMLCollection.cpp:
1089         (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
1090         a separate class for that collection. Also got rid of the distinct types for custom collections
1091         that don't need them (use Other for both).
1092         * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
1093
1094         * html/HTMLFormCollection.cpp:
1095         (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
1096         for the HTMLCollection type.
1097
1098         * html/HTMLTableElement.cpp:
1099         (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
1100         (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
1101         keeping a pointer to it.
1102         (WebCore::HTMLTableElement::setCaption): Rewrote.
1103         (WebCore::HTMLTableElement::tHead): Ditto.
1104         (WebCore::HTMLTableElement::setTHead): Ditto.
1105         (WebCore::HTMLTableElement::tFoot): Ditto.
1106         (WebCore::HTMLTableElement::setTFoot): Ditto.
1107         (WebCore::HTMLTableElement::createTHead): Ditto.
1108         (WebCore::HTMLTableElement::deleteTHead): Ditto.
1109         (WebCore::HTMLTableElement::createTFoot): Ditto.
1110         (WebCore::HTMLTableElement::deleteTFoot): Ditto.
1111         (WebCore::HTMLTableElement::createCaption): Ditto.
1112         (WebCore::HTMLTableElement::deleteCaption): Ditto.
1113         (WebCore::HTMLTableElement::lastBody): Added.
1114         (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
1115         This is different from the old code mainly in how it handles rows outside any section.
1116         (WebCore::HTMLTableElement::deleteRow): Ditto.
1117         (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
1118         these was a possible source of serious bugs too, including crashes with stale pointers, although I
1119         didn't write any test cases to prove those bugs existed.
1120         (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
1121         just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
1122         visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
1123         (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
1124         * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
1125         things like DOM mutation events take things ot of the tree before they are safely referenced by
1126         JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
1127         firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
1128         Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
1129         unneeded friend declaration for HTMLTableCellElement.
1130         * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
1131
1132         * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
1133         collection in which order.
1134         * html/HTMLTableRowsCollection.h: Added.
1135
1136         * loader/FTPDirectoryDocument.cpp:
1137         (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
1138         coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
1139         create a tbody element.
1140
1141 2008-01-02  Darin Adler  <darin@apple.com>
1142
1143         Reviewed by Alice and Tim.
1144
1145         - try to fix GTK and Qt builds
1146
1147         * platform/win/ScrollViewWin.cpp:
1148         (WebCore::ScrollView::scroll): Improve logic slightly for the case of
1149         vertical scrolling when there's no vertical scroll bar.
1150
1151         * platform/gtk/ScrollViewGtk.cpp:
1152         (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
1153         should be factored differently.
1154         * platform/qt/ScrollViewQt.cpp:
1155         (WebCore::ScrollView::scroll): Ditto.
1156
1157 2008-01-02  Darin Adler  <darin@apple.com>
1158
1159         Reviewed by Anders.
1160
1161         - http://bugs.webkit.org/show_bug.cgi?id=16712
1162           change StringImpl to take and return PassRefPtr instead of raw pointers
1163
1164         Also eliminated use of const StringImpl. Since StringImpl is immutable there
1165         is no distinction between a const and non-const one at the moment.
1166
1167         * WebCore.base.exp: Updated.
1168
1169         * css/CSSHelper.cpp:
1170         (WebCore::parseURL): Make String directly, not by making a StringImpl.
1171         * dom/Attr.cpp:
1172         (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
1173         not via StringImpl.
1174         (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
1175         to a function that takes a String.
1176
1177         * dom/CDATASection.cpp: Removed unused constructor.
1178         (WebCore::CDATASection::cloneNode): Added a now-needed .get().
1179         (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
1180         * dom/CDATASection.h:
1181
1182         * dom/CharacterData.cpp:
1183         (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
1184         ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
1185         (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
1186         a RefPtr.
1187         (WebCore::CharacterData::setData): More of that.
1188         (WebCore::CharacterData::substringData): Ditto.
1189         (WebCore::CharacterData::appendData): Ditto.
1190         (WebCore::CharacterData::insertData): Ditto.
1191         (WebCore::CharacterData::deleteData): Ditto.
1192         (WebCore::CharacterData::replaceData): Ditto.
1193         (WebCore::CharacterData::nodeValue): Ditto.
1194         (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
1195         (WebCore::CharacterData::dump): Ditto.
1196         * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
1197         instead, but since String adds extra branches to handle 0, I figured it was
1198         more conservative to just use RefPtr. Later it would be good to figure out
1199         which is preferred style and be more consistent. Maybe we'll phase out
1200         StringImpl, or maybe we'll go the other way and use it more since it can be
1201         more efficient.
1202
1203         * dom/DOMImplementation.cpp:
1204         (WebCore::addString): Changed set to use String rather than StringImpl.
1205         (WebCore::isSVG10Feature): Ditto.
1206         (WebCore::isSVG11Feature): Ditto.
1207         (WebCore::DOMImplementation::createDocument): Replaced custom code to
1208         find a colon with a call to String::find.
1209
1210         * dom/Range.cpp:
1211         (WebCore::Range::insertNode): Updated since the result of splitText is now
1212         a PassRefPtr.
1213
1214         * dom/Text.cpp:
1215         (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
1216         result of this function be a PassRefPtr.
1217         (WebCore::Text::createRenderer): Ditto.
1218         (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
1219         * dom/Text.h:
1220
1221         * html/HTMLElement.cpp:
1222         (WebCore::HTMLElement::nodeName): Use String::upper.
1223
1224         * html/HTMLInputElement.cpp:
1225         (WebCore::numGraphemeClusters): Remove now-unneeded const.
1226         (WebCore::numCharactersInGraphemeClusters): Ditto.
1227
1228         * html/HTMLTokenizer.cpp:
1229         (WebCore::HTMLTokenizer::processToken): Updated for function name change.
1230
1231         * platform/text/AtomicString.cpp:
1232         (WebCore::CStringTranslator::translate): Updated since there is no longer
1233         a constructor that takes a string.
1234
1235         * platform/text/PlatformString.h: Added new constructors that take
1236         PassRefPtr and RefPtr. Removed misleading comment.
1237
1238         * platform/text/String.cpp:
1239         (WebCore::String::String): Changed to use StringImpl::create, which handles
1240         the empty string automatically.
1241         (WebCore::String::append): Ditto.
1242         (WebCore::String::charactersWithNullTermination): Similar.
1243         (WebCore::String::format): Ditto.
1244
1245         * platform/text/StringHash.h: Took out unneeded const.
1246
1247         * platform/text/StringImpl.cpp:
1248         (WebCore::deleteUCharVector): Changed to take a const pointer since the
1249         buffers are now const UChar buffers.
1250         (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
1251         separate init functions. The constructors are now private and used only in
1252         the create functions and one or two other places.
1253         (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
1254         (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
1255         PassRefPtr.
1256         (WebCore::StringImpl::characterStartingAt): Ditto.
1257         (WebCore::StringImpl::toLength): Ditto.
1258         (WebCore::StringImpl::toCoordsArray): Ditto.
1259         (WebCore::StringImpl::toLengthArray): Ditto.
1260         (WebCore::StringImpl::isLower): Ditto.
1261         (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
1262         don't have to use new directly here. Makes empty string handling more consistent.
1263         (WebCore::StringImpl::upper): Ditto.
1264         (WebCore::StringImpl::secure): Ditto.
1265         (WebCore::StringImpl::foldCase): Ditto.
1266         (WebCore::StringImpl::stripWhiteSpace): Ditto.
1267         (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
1268         (WebCore::StringImpl::capitalize): Ditto.
1269         (WebCore::StringImpl::toInt): Removed now-meaningless const.
1270         (WebCore::StringImpl::toInt64): Ditto.
1271         (WebCore::StringImpl::toUInt64): Ditto.
1272         (WebCore::StringImpl::toDouble): Ditto.
1273         (WebCore::StringImpl::toFloat): Ditto.
1274         (WebCore::StringImpl::find): Ditto.
1275         (WebCore::StringImpl::reverseFind): Ditto.
1276         (WebCore::StringImpl::endsWith): Ditto.
1277         (WebCore::StringImpl::replace): Ditto.
1278         (WebCore::equal): Ditto.
1279         (WebCore::equalIgnoringCase): Ditto.
1280         (WebCore::StringImpl::ascii): Ditto.
1281         (WebCore::StringImpl::defaultWritingDirection): Ditto.
1282         (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
1283         (WebCore::StringImpl::adopt): Added special case so this uses the shared
1284         empty string like other functions. Also optimized the common case where the
1285         vector happens to already have the right size so we don't do a fastRealloc
1286         at all in those cases.
1287         (WebCore::StringImpl::create): Added. These are now the public functions for
1288         creating new StringImpl objects. They all implement the shared empty string.
1289         (WebCore::StringImpl::createWithTerminatingNullCharacter):
1290         * platform/text/StringImpl.h:
1291
1292         * platform/text/cf/StringCF.cpp:
1293         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
1294         * platform/text/cf/StringImplCF.cpp:
1295         (WebCore::StringImpl::createCFString): Removed now-obsolete const.
1296         * platform/text/mac/StringImplMac.mm:
1297         (WebCore::StringImpl::operator NSString *): Ditto.
1298         * platform/text/mac/StringMac.mm:
1299         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
1300         * platform/text/qt/StringQt.cpp:
1301         (WebCore::String::String): Ditto.
1302         * platform/text/wx/StringWx.cpp:
1303         (WebCore::String::String): Ditto.
1304         * rendering/RenderBR.cpp:
1305         (WebCore::RenderBR::RenderBR): Ditto.
1306
1307         * rendering/RenderSVGInlineText.cpp:
1308         (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
1309         * rendering/RenderSVGInlineText.h:
1310
1311         * rendering/RenderText.cpp:
1312         (WebCore::charactersAreAllASCII): Removed now-unneeded const.
1313         * rendering/RenderTextFragment.cpp:
1314         (WebCore::RenderTextFragment::originalText): Use RefPtr.
1315
1316 2008-01-02  Timothy Hatcher  <timothy@apple.com>
1317
1318         Reviewed by Oliver Hunt.
1319
1320         <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
1321
1322         Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
1323         internal element lookup tables. The represented DOM node object still holds the identifier
1324         it was assigned, and a later call to findTreeElement will use that original identifier
1325         against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
1326
1327         * page/inspector/treeoutline.js:
1328         (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
1329         but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
1330         instead of an early return.
1331
1332 2008-01-02  Alice Liu  <alice.liu@apple.com>
1333
1334         Reviewed by Maciej.
1335
1336         Fixed <rdar://5283861> (problems scrolling in gmail message content area)
1337
1338         * platform/ScrollView.h:
1339         * platform/win/ScrollViewWin.cpp:
1340         (WebCore::ScrollView::scroll):
1341          Changed return value to bool to reflect success of scroll attempt
1342
1343 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1344
1345         Fixed a typo (pointed out in review, but I somehow missed it at first).
1346
1347         * editing/EditorCommand.cpp: (WebCore::executeDelete):
1348
1349 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1350
1351         Reviewed by Darin.
1352
1353         Resolved several FIXMEs in EditorCommand.
1354         Made recently added commands hidden from JS again.
1355         Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
1356
1357         Tests: editing/execCommand/delete-no-scroll.html
1358                editing/execCommand/forward-delete-no-scroll.html
1359                editing/execCommand/insert-line-break-no-scroll.html
1360
1361         * editing/EditorCommand.cpp:
1362         (WebCore::executeDelete):
1363         (WebCore::executeForwardDelete):
1364         (WebCore::executeInsertLineBreak):
1365         (WebCore::supportedFromMenuOrKeyBinding):
1366         (WebCore::CommandEntry::):
1367
1368 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1369
1370         Reviewed by Darin.
1371
1372         http://bugs.webkit.org/show_bug.cgi?id=14555
1373         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
1374
1375         http://bugs.webkit.org/show_bug.cgi?id=14774
1376         Submitted data only includes first input item
1377
1378         Reworked encoding of mailto URLs to match other browsers.
1379         Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
1380
1381         Tests: fast/forms/mailto/advanced-get.html
1382                fast/forms/mailto/advanced-put.html
1383                fast/forms/mailto/get-multiple-items-text-plain.html
1384                fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
1385                fast/forms/mailto/get-multiple-items.html
1386                fast/forms/mailto/get-non-ascii.html
1387                fast/forms/mailto/get-non-ascii-text-plain.html
1388                fast/forms/mailto/get-overwrite-query.html
1389                fast/forms/mailto/post-append-query.html
1390                fast/forms/mailto/post-multiple-items-multipart-form-data.html
1391                fast/forms/mailto/post-multiple-items-text-plain.html
1392                fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
1393                fast/forms/mailto/post-multiple-items.html
1394
1395         * html/HTMLFormElement.cpp:
1396         (WebCore::HTMLFormElement::submit):
1397         * loader/FrameLoader.cpp:
1398         (WebCore::FrameLoader::submitForm):
1399
1400 2008-01-02  Mark Rowe  <mrowe@apple.com>
1401
1402         Autotools build fix.
1403
1404         * GNUmakefile.am: Remove files before generating them, not after.
1405
1406 2008-01-02  Mark Rowe  <mrowe@apple.com>
1407
1408         Rubber-stamped by Alp Toker.
1409
1410         Add missing dependencies to some GNUmakefile.am rules.
1411
1412         * GNUmakefile.am:
1413
1414 2008-01-02  Mark Rowe  <mrowe@apple.com>
1415
1416         Reviewed by Alp Toker.
1417
1418         Autotools build fix.  Make can expand $@ to any of the targets for the rule,
1419         while we always want to use the name of the .cpp file as the output file.
1420
1421         * GNUmakefile.am:
1422
1423 2008-01-02  Luca Bruno  <lethalman88@gmail.com>
1424
1425         Reviewed by Alp Toker.
1426
1427         http://bugs.webkit.org/show_bug.cgi?id=16115
1428         [GTK] ContextMenu and ContextMenuItem lacks an implementation
1429
1430         Add context menu support.
1431
1432         Based on a patch by Holger Freyther.
1433
1434         * platform/gtk/ContextMenuGtk.cpp:
1435         (WebCore::menuItemActivated):
1436         (WebCore::ContextMenu::ContextMenu):
1437         (WebCore::ContextMenu::~ContextMenu):
1438         (WebCore::ContextMenu::appendItem):
1439         (WebCore::ContextMenu::setPlatformDescription):
1440         (WebCore::ContextMenu::releasePlatformDescription):
1441         * platform/gtk/ContextMenuItemGtk.cpp:
1442         (WebCore::ContextMenuItem::ContextMenuItem):
1443         (WebCore::ContextMenuItem::~ContextMenuItem):
1444         (WebCore::ContextMenuItem::releasePlatformDescription):
1445         (WebCore::ContextMenuItem::type):
1446         (WebCore::ContextMenuItem::action):
1447         (WebCore::ContextMenuItem::setAction):
1448         (WebCore::ContextMenuItem::platformSubMenu):
1449         (WebCore::ContextMenuItem::setSubMenu):
1450         (WebCore::ContextMenuItem::setChecked):
1451         (WebCore::ContextMenuItem::setEnabled):
1452
1453 2008-01-02  Alp Toker  <alp@atoker.com>
1454
1455         GTK+ autotools build fix. Track changes in r29073.
1456
1457         * GNUmakefile.am:
1458
1459 2008-01-01  Darin Adler  <darin@apple.com>
1460
1461         - fix release build
1462
1463         * bindings/js/kjs_binding.cpp:
1464         (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
1465         Removed default so we get a warning if there's a missing case.
1466
1467 2008-01-01  David D. Kilzer  <ddkilzer@webkit.org>
1468
1469         Scripting MIME Types application/ecmascript, application/javascript not viewable
1470         <http://bugs.webkit.org/show_bug.cgi?id=11063>
1471
1472         Reviewed by Darin.
1473
1474         This patch consolidates the list of acceptable MIME types for JavaScript
1475         source into the MIMETypeRegistry class, and replaces checks for these
1476         types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
1477
1478         No tests added since viewing JavaScript source is not testable.
1479
1480         * dom/DOMImplementation.cpp:
1481         (WebCore::DOMImplementation::isTextMIMEType): Use
1482         MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
1483         hard-coded MIME type, "application/x-javascript".
1484
1485         * html/HTMLScriptElement.cpp:
1486         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
1487         JavaScript MIME types from here to
1488         MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
1489
1490         * platform/MIMETypeRegistry.cpp:
1491         (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
1492         MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
1493         (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
1494         hard-coded MIME type, "application/x-javascript", from the list.
1495         (WebCore::initialiseMIMETypeRegistry): Initialise
1496         supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
1497         with values in supportedJavaScriptMIMETypes.
1498         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
1499
1500         * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
1501
1502 2008-01-01  Sam Weinig  <sam@webkit.org>
1503
1504         Reviewed by Darin.
1505
1506         Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
1507         Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
1508
1509         - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
1510         - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
1511         - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
1512
1513         Tests: fast/dom/DOMException/EventException.html
1514                fast/dom/DOMException/RangeException.html
1515                fast/dom/DOMException/XPathException.html
1516                http/tests/xmlhttprequest/XMLHttpRequestException.html
1517                svg/custom/SVGException.html
1518
1519         * DerivedSources.make:
1520         * WebCore.pro:
1521         * WebCore.vcproj/WebCore.vcproj:
1522         * WebCore.xcodeproj/project.pbxproj:
1523         * WebCoreSources.bkl:
1524         * bindings/js/JSSVGMatrixCustom.cpp:
1525         (WebCore::JSSVGMatrix::inverse):
1526         (WebCore::JSSVGMatrix::rotateFromVector):
1527         * bindings/js/kjs_binding.cpp:
1528         (KJS::setDOMException):
1529         * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
1530         in the IDL as the ObjC bindings do.
1531         * bindings/scripts/CodeGeneratorObjC.pm:
1532         * dom/DOMCoreException.cpp: Removed.
1533         * dom/DOMCoreException.h:
1534         (WebCore::DOMCoreException::DOMCoreException):
1535         * dom/DOMCoreException.idl:
1536         * dom/Event.h:
1537         * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
1538         (WebCore::EventException::EventException):
1539         (WebCore::EventException::):
1540         * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1541         * dom/EventTargetNode.cpp:
1542         (WebCore::EventTargetNode::dispatchEvent):
1543         * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
1544         (WebCore::ExceptionBase::ExceptionBase):
1545         (WebCore::ExceptionBase::toString):
1546         * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
1547         (WebCore::ExceptionBase::code):
1548         * dom/ExceptionCode.cpp:
1549         (WebCore::getExceptionCodeDescription):
1550         * dom/ExceptionCode.h:
1551         (WebCore::):
1552         * dom/Range.cpp:
1553         (WebCore::Range::insertNode):
1554         (WebCore::Range::checkNodeWOffset):
1555         (WebCore::Range::checkNodeBA):
1556         (WebCore::Range::selectNode):
1557         (WebCore::Range::selectNodeContents):
1558         (WebCore::Range::surroundContents):
1559         * dom/RangeException.h:
1560         (WebCore::RangeException::RangeException):
1561         (WebCore::RangeException::):
1562         * dom/RangeException.idl:
1563         * page/DOMWindow.idl:
1564         * svg/SVGColor.cpp:
1565         (WebCore::SVGColor::setRGBColor):
1566         * svg/SVGException.h:
1567         (WebCore::SVGException::SVGException):
1568         (WebCore::SVGException::):
1569         * svg/SVGException.idl:
1570         * svg/SVGLocatable.cpp:
1571         (WebCore::SVGLocatable::getTransformToElement):
1572         * xml/XMLHttpRequest.cpp:
1573         (WebCore::XMLHttpRequest::dispatchEvent):
1574         (WebCore::XMLHttpRequest::open):
1575         (WebCore::XMLHttpRequest::send):
1576         * xml/XMLHttpRequest.h:
1577         * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
1578         (WebCore::XMLHttpRequestException::XMLHttpRequestException):
1579         (WebCore::XMLHttpRequestException::):
1580         * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1581         * xml/XPathEvaluator.h:
1582         * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
1583         (WebCore::XPathException::XPathException):
1584         (WebCore::XPathException::):
1585         * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
1586         * xml/XPathParser.cpp:
1587         (WebCore::XPath::Parser::parseStatement):
1588         * xml/XPathResult.cpp:
1589         (WebCore::XPathResult::convertTo):
1590         (WebCore::XPathResult::numberValue):
1591         (WebCore::XPathResult::stringValue):
1592         (WebCore::XPathResult::booleanValue):
1593         (WebCore::XPathResult::singleNodeValue):
1594         (WebCore::XPathResult::snapshotLength):
1595         (WebCore::XPathResult::iterateNext):
1596         (WebCore::XPathResult::snapshotItem):
1597
1598 2008-01-01  Sam Weinig  <sam@webkit.org>
1599
1600         Remove JSDomExceptionConstructor.lut.h from clean step
1601         as it no longer exists.
1602
1603         * GNUmakefile.am:
1604
1605 2008-01-01  Dan Bernstein  <mitz@apple.com>
1606
1607         - Windows build fix
1608
1609         * WebCore.vcproj/WebCore.vcproj:
1610
1611 2008-01-01  Sam Weinig  <sam@webkit.org>
1612
1613         Try again to fix the builds
1614
1615         * DerivedSources.make:
1616
1617 2008-01-01  Sam Weinig  <sam@webkit.org>
1618
1619         Fix non-mac builds.
1620
1621         * WebCore.pro:
1622         * WebCore.vcproj/WebCore.vcproj:
1623         * WebCoreSources.bkl:
1624
1625 2008-01-01  Eric Seidel  <eric@webkit.org>
1626
1627         Reviewed by Alexey.
1628
1629         Don't replace \ with / in data: urls
1630         http://bugs.webkit.org/show_bug.cgi?id=16692
1631
1632         Test: fast/loader/url-data-replace-backslash.html
1633
1634         * platform/KURL.cpp:
1635         (WebCore::KURL::init):
1636
1637 2008-01-01  Alp Toker  <alp@atoker.com>
1638
1639         GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
1640         correct parameter to AM_INIT_AUTOMAKE.
1641
1642         * GNUmakefile.am:
1643
1644 2007-12-31  Sam Weinig  <sam@webkit.org>
1645
1646         Reviewed by Darin.
1647
1648         Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
1649         Acid3 expects ExeceptionCode constants to be defined on DOMException objects
1650
1651         - Make DOMException a real JS object.
1652
1653         Test: fast/dom/DOMException/prototype-object.html
1654
1655         * DerivedSources.make:
1656         * WebCore.xcodeproj/project.pbxproj:
1657
1658         This is no longer needed as the autogenerated classes now includes the
1659         constructor.
1660         * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
1661         * bindings/js/JSDOMExceptionConstructor.h: Removed.
1662
1663         Create on demand and use the new class for DOMExceptions.
1664         * bindings/js/kjs_binding.cpp:
1665         (KJS::setDOMException):
1666
1667         Remove no longer needed custom constructor getter.
1668         * bindings/js/kjs_window.cpp:
1669         (KJS::Window::getValueProperty):
1670
1671         Don't expose DOMCoreException as the name of class by special casing
1672         the user visible class name to be DOMException.
1673         * bindings/scripts/CodeGeneratorJS.pm:
1674
1675         The DOMException class/file needs to be named DOMCoreException because there is
1676         name conflict with one of the Objective-C bindings classes.  It should be renamed
1677         to DOMException when the Objective-C bindings are moved into WebKit.
1678         * dom/DOMCoreException.cpp: Added.
1679         (WebCore::DOMCoreException::DOMCoreException):
1680         (WebCore::DOMCoreException::toString):
1681         * dom/DOMCoreException.h: Added.
1682         (WebCore::DOMCoreException::):
1683         (WebCore::DOMCoreException::code):
1684         (WebCore::DOMCoreException::name):
1685         (WebCore::DOMCoreException::message):
1686         * dom/DOMCoreException.idl: Added.
1687         * page/DOMWindow.idl:
1688
1689 2007-12-31  Sam Weinig  <sam@webkit.org>
1690
1691         Re-enable querySelector and querySelectorAll and touch the necessary files to not
1692         kill the windows build.
1693
1694         * WebCore.vcproj/build-generated-files.sh:
1695         * bindings/scripts/CodeGeneratorCOM.pm:
1696         * dom/Document.idl:
1697         * dom/Element.idl:
1698
1699 2007-12-31  Darin Adler  <darin@apple.com>
1700
1701         - fix Windows build
1702
1703         * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
1704         up as pure virtual functions. Sam can fix this later.
1705         * dom/Element.idl: Ditto.
1706
1707 2007-12-31  Dan Bernstein  <mitz@apple.com>
1708
1709         Reviewed by Darin Adler.
1710
1711         - fix http://bugs.webkit.org/show_bug.cgi?id=14134
1712           <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
1713
1714         Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
1715
1716         * dom/Node.cpp:
1717         (WebCore::Node::attach): Added code to check if this node's renderer
1718         has become the "previous renderer" of any sibling text node, and if so,
1719         ensure that that node gets a renderer if it now needs one.
1720         (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
1721         node is not attached.
1722
1723 2007-12-31  Darin Adler  <darin@apple.com>
1724
1725         Reviewed by Mitz.
1726
1727         - fix http://bugs.webkit.org/show_bug.cgi?id=16641
1728           Acid3 reveals HTMLFormElement.elements fails to update when element name changes
1729
1730         Test: fast/dom/HTMLFormElement/elements-not-in-document.html
1731
1732         This was a bug specific to forms that are not in the document tree.
1733         The fix was to change the code to increment the document version number to match
1734         up with other document change tracking. Maybe at some point we can clean these up
1735         so we don't have so many competing change notification systems.
1736
1737         * dom/ContainerNode.cpp:
1738         (WebCore::ContainerNode::replaceChild): Removed bogus comment.
1739         (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
1740         call here, since this code path bypasses the subtree-modified event code.
1741
1742         * dom/Element.cpp:
1743         (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
1744         collections are for things in the document.
1745         (WebCore::Element::setAttributeMap): Ditto.
1746
1747         * dom/EventTargetNode.cpp:
1748         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
1749         incDOMTreeVersion here; covers most cases of tree structure changes.
1750
1751         * dom/Node.cpp:
1752         (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
1753         has nothing to do with changes to the DOM tree!
1754         (WebCore::Node::detach): Ditto.
1755
1756         * html/HTMLFormElement.cpp:
1757         (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
1758         This is handled at a lower level and doesn't need to be here.
1759         (WebCore::HTMLFormElement::removeFormElement): Ditto.
1760
1761 2007-12-31  Henry Mason  <hmason@mac.com>
1762
1763         Reviewed by Darin.
1764
1765         Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
1766         Support for MessageEvent and cross-domain messaging
1767
1768         Test: http/tests/messaging/cross-domain-message-send.html
1769
1770         * DerivedSources.make:
1771         * WebCore.pro:
1772         * WebCore.vcproj/WebCore.vcproj:
1773         * WebCore.xcodeproj/project.pbxproj:
1774         * WebCoreSources.bkl:
1775         * bindings/js/JSDOMWindowCustom.cpp:
1776         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
1777         postMessage function.
1778         (WebCore::JSDOMWindow::postMessage):
1779         * bindings/js/JSEventCustom.cpp:
1780         (WebCore::toJS):
1781         * dom/Event.cpp:
1782         (WebCore::Event::isMessageEvent):
1783         * dom/Event.h:
1784         * dom/EventNames.h: New event name
1785         * dom/MessageEvent.cpp: Added.
1786         * dom/MessageEvent.h: Added.
1787         * dom/MessageEvent.idl: Added.
1788         * page/DOMWindow.cpp:
1789         (WebCore::DOMWindow::postMessage): Added.
1790         * page/DOMWindow.h:
1791         * page/DOMWindow.idl:
1792
1793 2007-12-31  Darin Adler  <darin@apple.com>
1794
1795         Suggested by Antti.
1796
1797         - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
1798
1799         * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
1800         * WebCore.vcproj/build-generated-files.sh: Ditto.
1801
1802 2007-12-30  Alp Toker  <alp@atoker.com>
1803
1804         Reviewed by Dan Bernstein.
1805
1806         Silence warning.
1807
1808         * dom/NodeList.h:
1809
1810 2007-12-30  Sam Weinig  <sam@webkit.org>
1811
1812         Reviewed by Oliver Hunt.
1813
1814         Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
1815         Variable names can be enumerated across domains
1816         <rdar://problem/5640454>
1817
1818         Test: http/tests/security/cross-frame-access-enumeration.html
1819
1820         * bindings/js/kjs_window.cpp:
1821         (KJS::Window::getPropertyNames): Override method to test same-origin policy.
1822         * bindings/js/kjs_window.h:
1823
1824 2007-12-30  Sam Weinig  <sam@webkit.org>
1825
1826         Reviewed by Oliver Hunt.
1827
1828         Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
1829         event instanceof MouseEvent throws exception
1830
1831         Add JS constructors for all the Event types.
1832
1833         Test: fast/events/event-instanceof.html
1834
1835         * WebCore.xcodeproj/project.pbxproj:
1836         * dom/KeyboardEvent.idl:
1837         * dom/MouseEvent.idl:
1838         * dom/MutationEvent.idl:
1839         * dom/OverflowEvent.idl:
1840         * dom/ProgressEvent.idl:
1841         * dom/TextEvent.idl:
1842         * dom/UIEvent.idl:
1843         * dom/WheelEvent.idl:
1844         * page/DOMWindow.idl:
1845
1846 2007-12-30  David Kilzer  <ddkilzer@webkit.org>
1847
1848         Reviewed by Darin.
1849
1850         - fix http://bugs.webkit.org/show_bug.cgi?id=15359
1851           JPEG image not shown when height is specified as percentage inside a table
1852
1853         The problem occurs when a replaced element (image, canvas, etc.) with
1854         a percent-height attribute is contained by a table cell with an auto-
1855         or percent-height attribute.  If there are no other conditions to cause
1856         the table cell's height to expand, an available height of zero will
1857         always be returned.  In these cases, the intrinsic height of the
1858         replaced element should be used if it is greater than the available
1859         height of the table cell.
1860
1861         Tests: fast/replaced/table-percent-height.html
1862                tables/mozilla/bugs/bug137388-1.html
1863                tables/mozilla/bugs/bug137388-2.html
1864
1865         * rendering/RenderBox.cpp:
1866         (WebCore::RenderBox::calcReplacedHeightUsing):
1867
1868 2007-12-30  Luca Bruno  <lethalman88@gmail.com>
1869
1870         Reviewed by Alp Toker.
1871
1872         http://bugs.webkit.org/show_bug.cgi?id=16099
1873         Crash in CURL for empty POST
1874
1875         We have to set POST even when the data is empty, otherwise cURL will
1876         hang while waiting for a response.
1877
1878         * platform/network/curl/ResourceHandleManager.cpp
1879         (ResourceHandleManager::setupPOST): allow empty POST
1880
1881 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1882
1883         Reviewed by Alp Toker.
1884
1885         Move all SVG related stuff inside SVG block. Don't include
1886         SVGNames, SVGElementFactory, and XLinkNames when SVG is not
1887         enabled
1888
1889         * GNUmakefile.am:
1890
1891 2007-12-29  Alexey Proskuryakov  <ap@webkit.org>
1892
1893         Reviewed by Darin.
1894
1895         http://bugs.webkit.org/show_bug.cgi?id=14428
1896         FCKEditor: Images disappear on drag/drop and copy/paste
1897
1898         Test: editing/pasteboard/drag-image-in-about-blank-frame.html
1899
1900         * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
1901         base URL, just like we don't use an empty one.
1902
1903 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1904
1905         Reviewed by Alp Toker.
1906
1907         http://bugs.webkit.org/show_bug.cgi?id=16669
1908         autotools update and fixes
1909
1910         Autotools update and database/icon database inclusion guard fixes
1911
1912         * GNUmakefile.am:
1913           - Update autotools config as per -r29012 changes
1914           - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
1915         * dom/Document.cpp:
1916         * loader/icon/IconDatabase.h:
1917         * page/DOMWindow.cpp:
1918         * page/InspectorController.cpp:
1919         * page/Settings.cpp:
1920         * storage/Database.h:
1921           - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
1922
1923 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1924
1925         Reviewed by Alexey.
1926
1927         Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
1928         (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
1929
1930         * svg/SVGFont.cpp:
1931         (WebCore::Font::drawGlyphsWithSVGFont):
1932
1933 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1934
1935         Reviewed by Oliver.
1936
1937         Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
1938         SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
1939
1940         * platform/graphics/FontData.cpp:
1941         (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
1942         (WebCore::FontData::ascent):
1943         (WebCore::FontData::descent):
1944         * platform/graphics/FontData.h:
1945         * svg/SVGFont.cpp:
1946         (WebCore::isVerticalWritingMode): Add helper function.
1947         (WebCore::Font::drawGlyphsWithSVGFont):
1948         * svg/SVGFontElement.cpp:
1949         (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
1950         * svg/SVGGlyphElement.cpp:
1951         (WebCore::parseArabicForm): Helper function.
1952         (WebCore::parseOrientation): Ditto.
1953         (WebCore::parsePathData): Ditto.
1954         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1955         * svg/SVGGlyphElement.h:
1956         (WebCore::SVGGlyphElement::rendererIsNeeded):
1957
1958 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1959
1960         Reviewed by Oliver.
1961
1962         Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
1963         SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
1964
1965         * svg/SVGAnimationElement.cpp:
1966         (WebCore::SVGAnimationElement::parseMappedAttribute):
1967         * svg/SVGParserUtilities.cpp:
1968         (WebCore::parseDelimitedString):
1969         * svg/SVGParserUtilities.h:
1970
1971 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
1972
1973         Reviewed by Maciej.
1974
1975         Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
1976         Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
1977
1978         To optimize for the common case ('FontData' used for HTML rendering) it feels
1979         better to hold one OwnPtr in FontData, than several floats.
1980
1981         Parse all <font> attributes in SVGFontFaceElement::createFontData.
1982
1983         * platform/graphics/FontData.cpp:
1984         (WebCore::SVGFontData::SVGFontData):
1985         (WebCore::FontData::FontData):
1986         (WebCore::FontData::ascent):
1987         (WebCore::FontData::descent):
1988         * platform/graphics/FontData.h:
1989         (WebCore::FontData::isSVGFont):
1990         (WebCore::FontData::svgFontData):
1991         * svg/SVGFont.cpp:
1992         (WebCore::Font::drawGlyphsWithSVGFont):
1993         * svg/SVGFontElement.cpp:
1994         * svg/SVGFontElement.h:
1995         (WebCore::SVGFontElement::rendererIsNeeded):
1996         * svg/SVGFontFaceElement.cpp:
1997         (WebCore::SVGFontFaceElement::unitsPerEm):
1998         (WebCore::SVGFontFaceElement::createFontData):
1999
2000 2007-12-28  Darin Adler  <darin@apple.com>
2001
2002         - try to fix Windows and WX builds (broken by SVG Fonts check-in)
2003
2004         * platform/graphics/win/FontWin.cpp:
2005         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
2006         I can't see how it can be right to require the font size for ascent and descent,
2007         but not for other metrics functions in FontData.
2008
2009         * platform/graphics/wx/FontWx.cpp:
2010         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
2011
2012 2007-12-28  Dan Bernstein  <mitz@apple.com>
2013
2014         Reviewed by Mark Rowe.
2015
2016         - fix http://bugs.webkit.org/show_bug.cgi?id=16650
2017           <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
2018
2019         Covered by existing pixel tests.
2020
2021         * platform/graphics/mac/FontMac.mm:
2022         (WebCore::Font::drawComplexText): Corrected to maintain the style
2023         information in the adjusted text run when passing it to
2024         ATSUILayoutParameters. Prior to r28298 the style was passed separately.
2025
2026 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2027
2028         Build fix, not reviewed.
2029
2030         Add wtf/OwnPtr.h include, to fix --svg-fonts build.
2031
2032         * css/SVGCSSFontFace.h:
2033
2034 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2035
2036         Reviewed by Eric.
2037
2038         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
2039
2040         Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
2041         Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
2042         are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
2043
2044         Limited to single char <-> glyph mapping, no ligatures supported yet.
2045         (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
2046
2047         Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
2048
2049         No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
2050         attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
2051
2052         * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
2053         * WebCore.pro: Updated build system.
2054         * WebCore.vcproj/WebCore.vcproj: Ditto.
2055         * WebCore.xcodeproj/project.pbxproj: Ditto.
2056         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
2057         * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
2058         (WebCore::createElementClassMap):
2059         * bindings/objc/DOMInternal.h: Ditto.
2060         * bindings/objc/DOMSVG.h: Ditto.
2061         * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
2062         * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
2063         (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
2064         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
2065         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
2066         * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
2067         (WebCore::CSSFontSelector::addFontFaceRule):
2068         * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
2069         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
2070         (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
2071         (WebCore::SVGCSSFontFace::isValid):
2072         (WebCore::SVGCSSFontFace::addSource):
2073         (WebCore::SVGCSSFontFace::getFontData):
2074         * css/SVGCSSFontFace.h: Added.
2075         * platform/graphics/cg/PathCG.cpp:
2076         (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
2077         * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
2078         (WebCore::Font::ascent): Pass font size to FontData::ascent() call
2079         (WebCore::Font::descent): Pass font size to FontData::descent() call
2080         (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
2081         (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
2082         * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
2083         (WebCore::TextRun::TextRun):
2084         (WebCore::TextRun::referencingRenderObject):
2085         (WebCore::TextRun::setReferencingRenderObject):
2086         * platform/graphics/FontData.cpp:
2087         (WebCore::FontData::FontData):
2088         (WebCore::FontData::ascent):
2089         (WebCore::FontData::descent):
2090         * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
2091         (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
2092         (WebCore::FontData::svgFontFace):
2093         * rendering/SVGInlineTextBox.cpp:
2094         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
2095         * rendering/SVGRootInlineBox.cpp:
2096         (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
2097         * svg/SVGFont.cpp: Added.
2098         (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
2099         * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
2100         (WebCore::SVGFontElement::SVGFontElement):
2101         (WebCore::SVGFontElement::~SVGFontElement):
2102         (WebCore::SVGFontElement::parseMappedAttribute):
2103         (WebCore::SVGFontElement::collectGlyphs):
2104         (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
2105         * svg/SVGFontElement.h: Added.
2106         (WebCore::GlyphHash::hash):
2107         (WebCore::GlyphHash::equal):
2108         (WebCore::GlyphHashTraits::deletedValue):
2109         (WebCore::SVGFontElement::rendererIsNeeded):
2110         (WebCore::SVGFontElement::contextElement):
2111         * svg/SVGFontElement.idl: Added.
2112         * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
2113         (WebCore::SVGFontFaceElement::unitsPerEm):
2114         (WebCore::SVGFontFaceElement::fontFamily):
2115         (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
2116         (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
2117         (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
2118         (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
2119         * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
2120         * svg/SVGFontFaceElement.idl: Ditto.
2121         * svg/SVGFontFaceFormatElement.cpp: Ditto.
2122         * svg/SVGFontFaceFormatElement.h: Ditto.
2123         * svg/SVGFontFaceFormatElement.idl: Ditto.
2124         * svg/SVGFontFaceNameElement.cpp: Ditto.
2125         * svg/SVGFontFaceNameElement.h: Ditto.
2126         * svg/SVGFontFaceNameElement.idl: Ditto.
2127         * svg/SVGFontFaceSrcElement.cpp: Ditto.
2128         * svg/SVGFontFaceSrcElement.h: Ditto.
2129         * svg/SVGFontFaceSrcElement.idl: Ditto.
2130         * svg/SVGFontFaceUriElement.cpp: Ditto.
2131         * svg/SVGFontFaceUriElement.h: Ditto.
2132         * svg/SVGFontFaceUriElement.idl: Ditto.
2133         * svg/SVGDefinitionSrcElement.cpp: Ditto.
2134         * svg/SVGDefinitionSrcElement.h: Ditto.
2135         * svg/SVGDefinitionSrcElement.idl: Ditto.
2136         * svg/SVGGlyphElement.cpp: Added.
2137         (WebCore::SVGGlyphElement::SVGGlyphElement):
2138         (WebCore::SVGGlyphElement::parseMappedAttribute):
2139         (WebCore::SVGGlyphElement::childrenChanged):
2140         * svg/SVGGlyphElement.h: Added.
2141         (WebCore::SVGGlyphElement::rendererIsNeeded):
2142         (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
2143         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
2144         * svg/SVGGlyphElement.idl: Added.
2145         * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
2146         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
2147         (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
2148         (WebCore::SVGMissingGlyphElement::childrenChanged):
2149         * svg/SVGMissingGlyphElement.h: Added.
2150         (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
2151         * svg/SVGMissingGlyphElement.idl: Added.
2152         * 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!).
2153
2154 2007-12-27  Dan Bernstein  <mitz@apple.com>
2155
2156         Reviewed by Alexey Proskuryakov.
2157
2158         - fix http://bugs.webkit.org/show_bug.cgi?id=16628
2159           ASSERTION FAILED: m_resizeLayer (running layout tests)
2160
2161         * rendering/RenderLayer.cpp:
2162         (WebCore::RenderLayer::~RenderLayer): Avoid calling
2163         EventHandler::resizeLayerDestroyed() if the document is being destroyed.
2164
2165 2007-12-27  Dan Bernstein  <mitz@apple.com>
2166
2167         Reviewed by Oliver Hunt.
2168
2169         - fix http://bugs.webkit.org/show_bug.cgi?id=16603
2170           <rdar://problem/5664199> Crash when resizing text field
2171
2172         Test: fast/layers/resize-layer-deletion-crash.html
2173
2174         The event handler has only a weak reference to the layer that is
2175         currently in resize mode, so it is the layer's responsibility to let
2176         the event handler know if it has been destroyed while in that mode.
2177
2178         * page/EventHandler.cpp:
2179         (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
2180         m_resizeLayer to 0.
2181         * page/EventHandler.h:
2182         * rendering/RenderLayer.cpp:
2183         (WebCore::RenderLayer::~RenderLayer): Added a call to
2184         EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
2185
2186 2007-12-27  Collin Jackson  <webkit@collinjackson.com>
2187
2188         Reviewed by Sam Weinig.
2189
2190         http://bugs.webkit.org/show_bug.cgi?id=16539
2191         <rdar://problem/5659269>
2192
2193         The same-origin check was missing in the implementation of 
2194         setTimeout, setInterval, addEventListener, and removeEventListener.
2195
2196         Suppose <http://www.badguy.com/> contains an iframe to 
2197         <http://www.goodguy.com/>. Now www.badguy.com can steal
2198         www.goodguy.com cookies by running this code:
2199
2200         setTimeout.call(frames[0], "alert(document.cookie)", 1000);
2201
2202         This patch changes the behavior so that setTimeout to does 
2203         nothing and returns an undefined value if the caller is not
2204         permitted to script the window whose setTimeout method is being
2205         called. The same applies to setInterval, addEventListener, and 
2206         removeEventListener.
2207
2208         Tests: http/tests/security/cross-frame-access-call.html
2209
2210         * bindings/js/kjs_window.cpp:
2211         (KJS::WindowProtoFuncSetTimeout::callAsFunction)
2212         (KJS::WindowProtoFuncSetInterval::callAsFunction)
2213         (KJS::WindowProtoFuncAddEventListener::callAsFunction)
2214         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
2215
2216 2007-12-27  Dan Bernstein  <mitz@apple.com>
2217
2218         Reviewed by Dave Hyatt and Sam Weinig.
2219
2220         - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
2221
2222         Test: fast/layers/add-layer-with-nested-stacking.html
2223         Test: fast/layers/remove-layer-with-nested-stacking.html
2224
2225         * rendering/RenderLayer.cpp:
2226         (WebCore::RenderLayer::addChild): If the new child is overflow-only
2227         but has children of its own, dirty the stacking context's z-order lists
2228         since the grandchildren might need to be in them.
2229         (WebCore::RenderLayer::removeChild): Similarly for the old child.
2230
2231 2007-12-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2232
2233         Reviewed by Alp Toker.
2234
2235         http://bugs.webkit.org/show_bug.cgi?id=16353
2236         [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
2237
2238         Added the flags mentioned in the bug only when doing 'debug'
2239         builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
2240
2241         * GNUmakefile.am:
2242         * WebCore.pro:
2243
2244 2007-12-27  Dan Bernstein  <mitz@apple.com>
2245
2246         Reviewed by Eric Seidel.
2247
2248         - fix http://bugs.webkit.org/show_bug.cgi?id=16490
2249           ASSERT in ~FrameView while viewing/reloading WICD test case
2250
2251         Test: fast/dynamic/paused-event-dispatch.html
2252
2253         * page/FrameView.cpp:
2254         (WebCore::FrameView::~FrameView):
2255         (WebCore::FrameView::layout): Changed to always pause event dispatch and
2256         always resume event dispatch, regardless of whether the post-layout
2257         task timer is active. However, if it is active, assert that event
2258         dispatch is still paused.
2259
2260 2007-12-27  Alexey Proskuryakov  <ap@webkit.org>
2261
2262         Reviewed by Maciej.
2263
2264         http://bugs.webkit.org/show_bug.cgi?id=14500
2265         need to be more generous about charset declaration with meta tag
2266         
2267         http://bugs.webkit.org/show_bug.cgi?id=12526
2268         <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
2269
2270         <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
2271
2272         <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
2273
2274         Tests: fast/encoding/ahram-org-eg.html
2275                fast/encoding/bandai-co-jp-releases.html
2276                fast/encoding/floraexpress-ru.html
2277                fast/encoding/hanarei-blog32-fc2-com.html
2278                fast/encoding/yahoo-mail.html
2279
2280         * loader/TextResourceDecoder.cpp:
2281         (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
2282         seen at least 512 bytes of input.
2283
2284 2007-12-26  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2285
2286         Reviewed by Alp Toker.
2287
2288         http://bugs.webkit.org/show_bug.cgi?id=16390
2289         Use autotools or GNU make as the build system for the GTK port
2290
2291         * GNUmakefile.am: Added.
2292
2293 2007-12-26  Alexey Proskuryakov  <ap@webkit.org>
2294
2295         Reviewed by Sam Weinig.
2296
2297         http://bugs.webkit.org/show_bug.cgi?id=16609
2298         Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
2299
2300         * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
2301
2302 2007-12-26  Mark Rowe  <mrowe@apple.com>
2303
2304         Windows build fix.
2305
2306         * platform/Threading.h:
2307
2308 2007-12-25  Rob Buis  <buis@kde.org>
2309
2310         Reviewed by Eric.
2311
2312         http://bugs.webkit.org/show_bug.cgi?id=15514
2313         <clipPath> with <use> not respected
2314         http://bugs.webkit.org/show_bug.cgi?id=16557
2315         SVG circle elements have been clipped away completely, instead of partially.
2316
2317         Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
2318
2319         * svg/SVGClipPathElement.cpp:
2320         (WebCore::SVGClipPathElement::canvasResource):
2321         * svg/SVGStyledTransformableElement.h:
2322         (WebCore::SVGStyledTransformableElement::toClipPath):
2323         * svg/SVGUseElement.cpp:
2324         (WebCore::isDirectReference):
2325         (WebCore::SVGUseElement::toClipPath):
2326         * svg/SVGUseElement.h:
2327
2328 2007-12-25  Sam Weinig  <sam@webkit.org>
2329
2330         Reviewed by Eric Seidel.
2331
2332         Clean up the files relating to NodeLists.
2333
2334         * dom/ChildNodeList.cpp:
2335         (WebCore::ChildNodeList::ChildNodeList):
2336         (WebCore::ChildNodeList::length):
2337         (WebCore::ChildNodeList::item):
2338         (WebCore::ChildNodeList::nodeMatches):
2339         * dom/ChildNodeList.h:
2340         * dom/DynamicNodeList.cpp:
2341         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
2342         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
2343         (WebCore::DynamicNodeList::itemWithName):
2344         * dom/DynamicNodeList.h:
2345         (WebCore::DynamicNodeList::needsNotifications):
2346         * dom/NameNodeList.cpp:
2347         (WebCore::NameNodeList::NameNodeList):
2348         (WebCore::NameNodeList::rootNodeAttributeChanged):
2349         (WebCore::NameNodeList::nodeMatches):
2350         * dom/NameNodeList.h:
2351         * dom/NodeList.h:
2352         * dom/SelectorNodeList.h:
2353
2354 2007-12-25  Sam Weinig  <sam@webkit.org>
2355
2356         Fix non-mac builds.
2357
2358         * WebCore.pro:
2359         * WebCore.vcproj/WebCore.vcproj:
2360         * WebCoreSources.bkl:
2361
2362 2007-12-25  Sam Weinig  <sam@webkit.org>
2363
2364         Rubber stamped by Eric Seidel.
2365
2366         Move TagNodeList into its own file.
2367
2368         * WebCore.xcodeproj/project.pbxproj:
2369         * dom/Node.cpp:
2370         * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
2371         (WebCore::TagNodeList::TagNodeList):
2372         * dom/TagNodeList.h: Copied from dom/Node.cpp.
2373
2374 2007-12-25  Sam Weinig  <sam@webkit.org>
2375
2376         Reviewed by Eric Seidel.
2377
2378         Simplify the NodeList architecture.
2379         - Rename recursiveItem() to item(), since it is not recursive.
2380         - Make recursiveLength() iterative and rename to length().
2381         - Remove now unneeded overrides of item() and length() that used 
2382           to call the recursive variants.
2383
2384         * dom/ClassNodeList.cpp:
2385         * dom/ClassNodeList.h:
2386         * dom/DynamicNodeList.cpp:
2387         (WebCore::DynamicNodeList::length):
2388         (WebCore::DynamicNodeList::item):
2389         (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation 
2390         into the .cpp file since virtual methods can't be inlined.
2391         * dom/DynamicNodeList.h:
2392         * dom/NameNodeList.cpp:
2393         * dom/NameNodeList.h:
2394         * dom/Node.cpp:
2395
2396 2007-12-25  Alp Toker  <alp@atoker.com>
2397
2398         More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
2399         r28981.
2400
2401         * WebCore.pro:
2402         * WebCore.vcproj/WebCore.vcproj:
2403         * WebCoreSources.bkl:
2404
2405 2007-12-25  Alp Toker  <alp@atoker.com>
2406
2407         Win build fix for breakage introduced in r28981.
2408
2409         * WebCore.vcproj/WebCore.vcproj:
2410
2411 2007-12-25  Alp Toker  <alp@atoker.com>
2412
2413         Wx build fix for breakage introduced in r28981.
2414
2415         * WebCoreSources.bkl:
2416
2417 2007-12-25  Alp Toker  <alp@atoker.com>
2418
2419         GTK+/Qt build fix for breakage introduced in r28981.
2420
2421         * WebCore.pro:
2422
2423 2007-12-25  David Smith  <catfish.man@gmail.com> and Sam Weinig  <sam@webkit.org>
2424
2425         Reviewed by Oliver.
2426         
2427         - http://bugs.webkit.org/show_bug.cgi?id=16587
2428         Implement the most useful part of the W3C Selectors API.
2429
2430         * WebCore.xcodeproj/project.pbxproj:
2431         * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
2432         * dom/ChildNodeList.cpp:
2433         (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
2434         * dom/ChildNodeList.h:
2435         * dom/ClassNodeList.cpp:
2436         (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
2437         * dom/ClassNodeList.h:
2438         * dom/Document.idl: Add the new functions
2439         * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
2440         (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
2441         (WebCore::DynamicNodeList::~DynamicNodeList):
2442         (WebCore::DynamicNodeList::recursiveLength):
2443         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
2444         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
2445         (WebCore::DynamicNodeList::recursiveItem):
2446         (WebCore::DynamicNodeList::itemWithName):
2447         (WebCore::DynamicNodeList::rootNodeChildrenChanged):
2448         (WebCore::DynamicNodeList::Caches::Caches):
2449         (WebCore::DynamicNodeList::Caches::reset):
2450         * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
2451         (WebCore::DynamicNodeList::rootNodeAttributeChanged):
2452         * dom/Element.idl: Add the new functions
2453         * dom/NameNodeList.cpp: Change to being a DynamicNodeList
2454         (WebCore::NameNodeList::NameNodeList):
2455         * dom/NameNodeList.h:
2456         (WebCore::NameNodeList::rootNodeAttributeChanged):
2457         * dom/Node.cpp:
2458         (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
2459         (WebCore::Node::registerDynamicNodeList):
2460         (WebCore::Node::unregisterDynamicNodeList):
2461         (WebCore::Node::getElementsByName):
2462         (WebCore::Node::getElementsByClassName):
2463         (WebCore::Node::querySelector): new
2464         (WebCore::Node::querySelectorAll): new
2465         * dom/Node.h:
2466         * dom/NodeList.cpp: Removed.
2467         * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
2468         (WebCore::NodeList::NodeList):
2469         (WebCore::NodeList::~NodeList):
2470         * dom/SelectorNodeList.cpp: Added.
2471         (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
2472         * dom/SelectorNodeList.h: Added.
2473         * dom/StaticNodeList.cpp: Added.
2474         (WebCore::StaticNodeList::length):
2475         (WebCore::StaticNodeList::item):
2476         (WebCore::StaticNodeList::itemWithName):
2477         * dom/StaticNodeList.h: Added.
2478         (WebCore::StaticNodeList::StaticNodeList):
2479         (WebCore::StaticNodeList::~StaticNodeList):
2480
2481 2007-12-25  Mark Rowe  <mrowe@apple.com>
2482
2483         Reviewed by Sam Weinig.
2484
2485         Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
2486         http://bugs.webkit.org/show_bug.cgi?id=16596
2487
2488         This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
2489         of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
2490         access to a single ThreadSafeShared object.
2491
2492         The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
2493
2494         * platform/Threading.h:
2495         (WebCore::atomicIncrement):
2496         (WebCore::atomicDecrement):
2497         (WebCore::ThreadSafeShared::ThreadSafeShared):
2498         (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
2499         (WebCore::ThreadSafeShared::deref): Ditto.
2500         (WebCore::ThreadSafeShared::hasOneRef):
2501         (WebCore::ThreadSafeShared::refCount):
2502         (WebCore::ThreadSafeShared::isThreadSafe):
2503
2504 2007-12-24  Darin Adler  <darin@apple.com>
2505
2506         * platform/text/PlatformString.h: Removed now-incorrect comment.
2507         Added a comment about copy().
2508         * platform/text/StringImpl.h: Added a comment about copy().
2509
2510 2007-12-24  Darin Adler  <darin@apple.com>
2511
2512         Reviewed by Maciej.
2513
2514         - http://bugs.webkit.org/show_bug.cgi?id=16550
2515           make StringImpl immutable
2516
2517         I tried to keep the changes to a minimum. In some cases there is
2518         room for optimization -- I didn't try to add in the "single ref count"
2519         optimizations and there might be a tiny bit more string copying than
2520         we had before.
2521
2522         * WebCore.base.exp: Updated.
2523
2524         * dom/CharacterData.cpp:
2525         (WebCore::CharacterData::appendData): Changed to use String since
2526         StringImpl doesn't have mutating functions any more.
2527         (WebCore::CharacterData::insertData): Ditto.
2528         (WebCore::CharacterData::deleteData): Ditto.
2529         (WebCore::CharacterData::replaceData): Ditto.
2530         * dom/Text.cpp:
2531         (WebCore::Text::splitText): Changed to use substring instead of
2532         remove since StringImpl does't have mutating functions any more.
2533         * editing/CompositeEditCommand.cpp:
2534         (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
2535         to use String instead of StringImpl so we can use remove.
2536
2537         * platform/text/PlatformString.h: Removed newUninitialized.
2538         Added append that takes a character pointer and length.
2539
2540         * platform/text/String.cpp:
2541         (WebCore::String::insert): Added an implementation that does not
2542         rely on an underlying StringImpl function.
2543         (WebCore::String::append): Ditto.
2544         (WebCore::String::truncate): Ditto.
2545         (WebCore::String::remove): Ditto.
2546         (WebCore::String::charactersWithNullTermination): Added an
2547         implementation that uses the new StringImpl null termination feature,
2548         which does not require modifying a string.
2549
2550         * platform/text/StringImpl.cpp:
2551         (WebCore::isSpace): Fix comment.
2552         (WebCore::StringImpl::StringImpl): Added a new constructor that makes
2553         a string with a trailing null character.
2554         (WebCore::StringImpl::substring): Marked const.
2555         (WebCore::StringImpl::replace): Marked const; had to add quite a few
2556         const_cast. Also rewrote one of these to work without modifying the
2557         existing string.
2558
2559         * platform/text/StringImpl.h: Fixed a mistake where the empty string had
2560         m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
2561         for creating strings that have a trailing null character. Added a
2562         hasTerminatingNullCharacter function. Removed newUninitialized,
2563         charactersWithNullTermination, append, insert, truncate, and remove.
2564         Marked lots of other functions const.
2565
2566         * platform/text/TextCodecLatin1.cpp:
2567         (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
2568         newUninitialized.
2569         * platform/text/TextCodecUTF16.cpp:
2570         (WebCore::TextCodecUTF16::decode): Ditto.
2571         * platform/text/TextCodecUserDefined.cpp:
2572         (WebCore::TextCodecUserDefined::decode): Ditto.
2573
2574         * rendering/RenderStyle.cpp:
2575         (WebCore::RenderStyle::setContent): Changed to use String since
2576         StringImpl doesn't have mutating functions any more.
2577
2578 2007-12-24  Alexey Proskuryakov  <ap@webkit.org>
2579
2580         Reviewed by Oliver.
2581
2582         Fix fast/events/arrow-keys-on-body.html, failing on Windows.
2583
2584         * platform/win/KeyEventWin.cpp:
2585         (WebCore::isKeypadEvent):
2586         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2587         Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
2588
2589 2007-12-23  Alexey Proskuryakov  <ap@webkit.org>
2590
2591         Fix Debug and Release QTMovieWin bulds.
2592
2593         * WebCore.vcproj/QTMovieWin.vcproj:
2594         * WebCore.vcproj/debug.vsprops:
2595         * WebCore.vcproj/debug_internal.vsprops:
2596         * WebCore.vcproj/release.vsprops:
2597         Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
2598         Build release import lib into \lib, not \bin.
2599
2600 2007-12-23  Alp Toker  <alp@atoker.com>
2601
2602         Reviewed by Holger Freyther.
2603
2604         http://bugs.webkit.org/show_bug.cgi?id=15382
2605         [CAIRO] Canvas pattern support
2606
2607         http://bugs.webkit.org/show_bug.cgi?id=16577
2608         Merge Cairo enhancements from Apollo project
2609
2610         Add support for canvas patterns.
2611
2612         Make Image::nativeImageForCurrentFrame() public.
2613
2614         Fix some typos along the way.
2615
2616         The globalAlpha canvas fixes are not included in this patch as
2617         they're slightly more intrusive and may conflict conceptually with
2618         GraphicsContext::setAlpha().
2619
2620         * html/CanvasPattern.cpp:
2621         (WebCore::CanvasPattern::CanvasPattern):
2622         (WebCore::CanvasPattern::~CanvasPattern):
2623         (WebCore::CanvasPattern::createPattern):
2624         * html/CanvasPattern.h:
2625         (WebCore::CanvasPattern::platformImage):
2626         * html/CanvasRenderingContext2D.cpp:
2627         (WebCore::CanvasRenderingContext2D::setShadow):
2628         (WebCore::CanvasRenderingContext2D::applyShadow):
2629         (WebCore::CanvasRenderingContext2D::drawImage):
2630         (WebCore::CanvasRenderingContext2D::createPattern):
2631         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
2632         (WebCore::CanvasRenderingContext2D::applyFillPattern):
2633         * platform/graphics/Image.h:
2634         (WebCore::Image::nativeImageForCurrentFrame):
2635
2636 2007-12-23  Kevin Ollivier  <kevino@theolliviers.com>
2637
2638         Reviewed by Eric Seidel.
2639
2640         Remove getWxBitmap as we have nativeImageForCurrentFrame now,
2641         and don't draw a border in fillRect.
2642
2643         * platform/graphics/BitmapImage.h:
2644         * platform/graphics/wx/GraphicsContextWx.cpp:
2645         (WebCore::GraphicsContext::fillRect):
2646         * platform/graphics/wx/ImageWx.cpp:
2647
2648 2007-12-23  Alp Toker  <alp@atoker.com>
2649
2650         Reviewed by Holger Freyther.
2651
2652         http://bugs.webkit.org/show_bug.cgi?id=16577
2653         Merge Cairo enhancements from Apollo project
2654
2655         This patch is based on initial merging work by Brent Fulgham. Adobe's
2656         code has been modified in a few places to better suit the existing
2657         coding style.
2658
2659         Implement more clipping and drawing functions.
2660
2661         Save and restore the fill rule manually when clipping.
2662
2663         Avoid image surface creation when the image buffer has height zero.
2664
2665         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2666         (WebCore::GraphicsContext::clip):
2667         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2668         (WebCore::GraphicsContext::addPath):
2669         (WebCore::GraphicsContext::clipOut):
2670         (WebCore::GraphicsContext::clipOutEllipseInRect):
2671         (WebCore::GraphicsContext::fillRoundedRect):
2672         * platform/graphics/cairo/ImageSourceCairo.cpp:
2673         (WebCore::ImageSource::createFrameAtIndex):
2674
2675 2007-12-23  Nikolas Zimmermann  <zimmermann@kde.org>
2676
2677         Reviewed by Mark.
2678
2679         Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
2680
2681         * bindings/objc/DOM.mm:
2682         (WebCore::createElementClassMap):
2683
2684 2007-12-22  Alp Toker  <alp@atoker.com>
2685
2686         GTK+ build fix
2687
2688         GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
2689         empty target flags for now.
2690
2691         Check GTK+, not GLib versions, since they are different.
2692
2693         * platform/gtk/PasteboardGtk.cpp:
2694         (WebCore::Pasteboard::documentFragment):
2695
2696 2007-12-22  Luca Bruno  <lethalman88@gmail.com>
2697
2698         Reviewed by Alp Toker.
2699
2700         http://bugs.webkit.org/show_bug.cgi?id=16311
2701         [Gtk] Copy rich text to clipboard as text/plain and text/html.
2702
2703         Hook into the WebView to get the correct clipboard object on the
2704         appropriate display. This is necessary because GTK+ does not have
2705         global clipboards.
2706
2707         * WebCore.pro:
2708         * platform/Pasteboard.h:
2709         (WebCore::Pasteboard::setHelper): added for GTK
2710         (WebCore::Pasteboard::m_helper): private added for GTK
2711         * platform/gtk/PasteboardGtk.cpp:
2712         (WebCore::PasteboardSelectionData): added to support GTK selection data callback
2713         (WebCore::clipboard_get_contents_cb): added
2714         (WebCore::clipboard_clear_contents_cb): added
2715         (WebCore::Pasteboard::~Pasteboard):
2716         (WebCore::Pasteboard::setHelper):
2717         (WebCore::Pasteboard::writeSelection): copy rich text
2718         (WebCore::Pasteboard::documentFragment): 
2719         (WebCore::Pasteboard::plainText): 
2720         * platform/gtk/PasteboardHelper.h: Added.
2721
2722 2007-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
2723
2724         Reviewed by Oliver.
2725
2726         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
2727
2728         Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
2729         SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
2730         for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
2731         in Web Inspector.
2732
2733         * rendering/InlineBox.h:
2734         (WebCore::InlineBox::isSVGRootInlineBox):
2735         * rendering/SVGInlineTextBox.cpp:
2736         (WebCore::SVGInlineTextBox::svgRootInlineBox):
2737         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2738         (WebCore::SVGInlineTextBox::selectionRect):
2739         * rendering/SVGRenderTreeAsText.cpp:
2740         (WebCore::writeSVGInlineTextBox):
2741         * rendering/SVGRootInlineBox.h:
2742         (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
2743
2744 2007-12-22  Alp Toker  <alp@atoker.com>
2745
2746         LOW_BANDWIDTH_DISPLAY build fix
2747
2748         Track recent KURL DeprecatedString changes.
2749
2750         * loader/FrameLoader.cpp:
2751         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2752
2753 2007-12-22  Dan Bernstein  <mitz@apple.com>
2754
2755         - Windows build fix
2756
2757         * WebCore.vcproj/WebCore.vcproj:
2758
2759 2007-12-22  Xan Lopez  <xan@gnome.org>
2760
2761         Reviewed by Alp Toker.
2762
2763         Add missing return 0 to fix a compile warning.
2764
2765         * page/gtk/FrameGtk.cpp:
2766         (WebCore::Frame::createScriptInstanceForWidget):
2767
2768 2007-12-21  Antti Koivisto  <antti@apple.com>
2769
2770         Reviewed by Darin, Adam and Steve.
2771
2772         Add media playback support for Windows.
2773         
2774         The implementation uses low level QuickTime API. DLL is
2775         needed to work around CF use in both WebKit and QuickTime.
2776         
2777         This makes Windows build depend on the QuickTime SDK 
2778         
2779         http://developer.apple.com/quicktime/download/
2780         
2781         but not QuickTime itself.
2782         
2783         QTMovieWinTimer contains some copy code from SharedTimerWin. It
2784         is used in the QuickTime access DLL which can't use WebCore
2785         SharedTimer due to dependency problems.
2786
2787         * WebCore.vcproj/QTMovieWin.vcproj: Added.
2788         * WebCore.vcproj/WebCore.vcproj:
2789         * WebCore.vcproj/build-generated-files.sh:
2790         * html/HTMLMediaElement.cpp:
2791         (WebCore::HTMLMediaElement::setSrc):
2792         * platform/graphics/MediaPlayer.cpp:
2793         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
2794         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2795         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2796         (WebCore::MediaPlayerPrivate::load):
2797         (WebCore::MediaPlayerPrivate::play):
2798         (WebCore::MediaPlayerPrivate::pause):
2799         (WebCore::MediaPlayerPrivate::duration):
2800         (WebCore::MediaPlayerPrivate::currentTime):
2801         (WebCore::MediaPlayerPrivate::seek):
2802         (WebCore::MediaPlayerPrivate::doSeek):
2803         (WebCore::MediaPlayerPrivate::cancelSeek):
2804         (WebCore::MediaPlayerPrivate::seekTimerFired):
2805         (WebCore::MediaPlayerPrivate::setEndTime):
2806         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
2807         (WebCore::MediaPlayerPrivate::endPointTimerFired):
2808         (WebCore::MediaPlayerPrivate::paused):
2809         (WebCore::MediaPlayerPrivate::seeking):
2810         (WebCore::MediaPlayerPrivate::naturalSize):
2811         (WebCore::MediaPlayerPrivate::hasVideo):
2812         (WebCore::MediaPlayerPrivate::setVolume):
2813         (WebCore::MediaPlayerPrivate::setMuted):
2814         (WebCore::MediaPlayerPrivate::setRate):
2815         (WebCore::MediaPlayerPrivate::dataRate):
2816         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2817         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2818         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2819         (WebCore::MediaPlayerPrivate::bytesLoaded):
2820         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2821         (WebCore::MediaPlayerPrivate::totalBytes):
2822         (WebCore::MediaPlayerPrivate::cancelLoad):
2823         (WebCore::MediaPlayerPrivate::updateStates):
2824         (WebCore::MediaPlayerPrivate::didEnd):
2825         (WebCore::MediaPlayerPrivate::setRect):
2826         (WebCore::MediaPlayerPrivate::setVisible):
2827         (WebCore::MediaPlayerPrivate::paint):
2828         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2829         (WebCore::MediaPlayerPrivate::movieEnded):
2830         (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
2831         (WebCore::MediaPlayerPrivate::movieTimeChanged):
2832         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
2833         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
2834         (WebCore::MediaPlayerPrivate::networkState):
2835         (WebCore::MediaPlayerPrivate::readyState):
2836         * platform/graphics/win/QTMovieWin.cpp: Added.
2837         (updateTaskTimer):
2838         (QTMovieWinPrivate::QTMovieWinPrivate):
2839         (QTMovieWinPrivate::~QTMovieWinPrivate):
2840         (taskTimerFired):
2841         (QTMovieWinPrivate::startTask):
2842         (QTMovieWinPrivate::endTask):
2843         (QTMovieWinPrivate::task):
2844         (QTMovieWinPrivate::registerDrawingCallback):
2845         (QTMovieWinPrivate::drawingComplete):
2846         (QTMovieWinPrivate::createGWorld):
2847         (QTMovieWinPrivate::setSize):
2848         (QTMovieWinPrivate::deleteGWorld):
2849         (QTMovieWin::QTMovieWin):
2850         (QTMovieWin::~QTMovieWin):
2851         (QTMovieWin::play):
2852         (QTMovieWin::pause):
2853         (QTMovieWin::rate):
2854         (QTMovieWin::setRate):
2855         (QTMovieWin::duration):
2856         (QTMovieWin::currentTime):
2857         (QTMovieWin::setCurrentTime):
2858         (QTMovieWin::setVolume):
2859         (QTMovieWin::setMuted):
2860         (QTMovieWin::dataSize):
2861         (QTMovieWin::maxTimeLoaded):
2862         (QTMovieWin::loadState):
2863         (QTMovieWin::getNaturalSize):
2864         (QTMovieWin::setSize):
2865         (QTMovieWin::setVisible):
2866         (QTMovieWin::paint):
2867         (QTMovieWin::load):
2868         (movieDrawingCompleteProc):
2869         (initializeSupportedTypes):
2870         (QTMovieWin::countSupportedTypes):
2871         (QTMovieWin::getSupportedType):
2872         (QTMovieWin::initializeQuickTime):
2873         (DllMain):
2874         * platform/graphics/win/QTMovieWin.h: Added.
2875         * platform/graphics/win/QTMovieWinTimer.cpp: Added.
2876         (TimerWindowWndProc):
2877         (initializeOffScreenTimerWindow):
2878         (setSharedTimerFiredFunction):
2879         (timerFired):
2880         (setSharedTimerFireDelay):
2881         (stopSharedTimer):
2882         (setSharedTimerInstanceHandle):
2883         (systemTime):
2884         * platform/graphics/win/QTMovieWinTimer.h: Added.
2885         * rendering/RenderMedia.cpp:
2886         (WebCore::MediaControlPlayButtonElement::update):
2887
2888 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
2889
2890         Reviewed by Alp Toker.
2891
2892         http://bugs.webkit.org/show_bug.cgi?id=16558
2893         Cairo WebCore Rendering Fails on arc drawing
2894
2895         Fix for bug reported (and patched) by Apollo team in which
2896         arcs were draw in reverse (resulting in inverted images).
2897         Review of the source found that the 'clockwise' term was
2898         actually meant to mean 'anticlockwise' so the IDL and
2899         supporting classes have been changed to match this. 
2900
2901         * html/CanvasRenderingContext2D.cpp:
2902         (WebCore::CanvasRenderingContext2D::arc):
2903         * html/CanvasRenderingContext2D.idl:
2904         * platform/graphics/cairo/PathCairo.cpp:
2905         (WebCore::Path::addArc):
2906         (WebCore::Path::addEllipse):
2907         * platform/graphics/Path.h:
2908
2909 2007-12-21  Alexey Proskuryakov  <ap@webkit.org>
2910
2911         Reviewed by Oliver.
2912
2913         <rdar://problem/5629995> Incorrect display of Danish characters on web site.
2914
2915         Test: http/tests/xmlhttprequest/response-encoding.html
2916
2917         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
2918         Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
2919         rules for main content and XHR responses, but this matches both IE and Firefox.
2920
2921 2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
2922
2923         Reviewed by Kevin Decker.
2924
2925         <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
2926         shockwave plugin on freshly installed OS
2927
2928         Look for Director plugin in its native directory.
2929
2930         * plugins/win/PluginDatabaseWin.cpp:
2931         (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
2932         doesn't start with "np," so special case its filename.
2933         (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
2934         directories to the plugin paths.
2935         (WebCore::PluginDatabaseWin::defaultPluginPaths):
2936
2937 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
2938
2939         Reviewed by Alp Toker.
2940
2941         http://bugs.webkit.org/show_bug.cgi?id=16508
2942         Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
2943         decoded transparent areas.
2944
2945         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2946         (WebCore::GIFImageDecoder::haveDecodedRow):
2947         * platform/image-decoders/gif/GIFImageDecoder.h:
2948         * platform/image-decoders/gif/GIFImageReader.cpp:
2949         (GIFImageReader::output_row):
2950
2951 2007-12-20  Justin Garcia  <justin.garcia@apple.com>
2952
2953         Reviewed by Oliver Hunt.
2954
2955         <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
2956         
2957         Still need to fix similar issues with the other operations that iterate 
2958         over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
2959
2960         * editing/IndentOutdentCommand.cpp:
2961         (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
2962         * editing/IndentOutdentCommand.h: Removed an unused function.
2963         * editing/InsertListCommand.cpp:
2964         (WebCore::InsertListCommand::modifyRange): 
2965         Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
2966         Call the new selectionForParagraphIteration, which a) prevents operations like this
2967         one from being performed on a table that isn't fully selected (where the selection
2968         starts just before the table and ends inside it), and b) helps prevent paragraph
2969         iteration from going past the end of the selection.
2970         Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
2971         since when v is in the last paragraph of the last cell of a table, that expression 
2972         will return the position after the table, not the start of the next paragraph.
2973         * editing/htmlediting.cpp:
2974         (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
2975         take effect inside the table cell where they are performed.
2976         (WebCore::selectionForParagraphIteration): Added, see above.
2977         (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
2978         * editing/htmlediting.h:
2979         * editing/visible_units.cpp:
2980         (WebCore::startOfNextParagraph): Added, see above.
2981         * editing/visible_units.h:
2982         * editing/TextIterator.h:
2983         (WebCore::TextIterator::exitNode): Added a FIXME.
2984
2985 2007-12-20  Alp Toker  <alp@atoker.com>
2986
2987         Rubber-stamped by Maciej.
2988
2989         http://bugs.webkit.org/show_bug.cgi?id=16542
2990         [GTK] Text is missing with old Pango version
2991
2992         Back out commits r28880, r28876, r28865, r28864 which added Pango font
2993         selection support. These changes caused a regression where no text was
2994         displayed with older Pango versions.
2995
2996         * platform/graphics/gtk/FontCacheGtk.cpp:
2997         (WebCore::FontCache::fontExists):
2998         * platform/graphics/gtk/FontDataGtk.cpp:
2999         (WebCore::FontData::platformDestroy):
3000         (WebCore::FontData::containsCharacters):
3001         * platform/graphics/gtk/FontPlatformData.h:
3002         (WebCore::FontPlatformData::FontPlatformData):
3003         (WebCore::FontPlatformData::hash):
3004         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3005         (WebCore::FontPlatformData::FontPlatformData):
3006         (WebCore::FontPlatformData::init):
3007         (WebCore::FontPlatformData::~FontPlatformData):
3008         (WebCore::FontPlatformData::isFixedPitch):
3009         (WebCore::FontPlatformData::operator==):
3010         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
3011         (WebCore::GlyphPage::fill):
3012
3013 2007-12-20  Timothy Hatcher  <timothy@apple.com>
3014
3015         Reviewed by Sam Weinig.
3016
3017         <rdar://problem/5604897> Double-clicking on JavaScript console error
3018         won't show the line where it occurred
3019
3020         Make the URLs clickable in the console, since double clicking is used for
3021         word text selection. Makes the word "line" localizable. Messages that don't
3022         have a URL will no longer print "undefined". Messages that have a line number
3023         less than or equal to 0 will no longer be printed.
3024
3025         * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)".
3026         * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created
3027           and change the click handler to look for a link with the
3028           "console-message-url" class name.
3029         * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a
3030           line row is needed. 
3031         * page/inspector/inspector.css: Update the look of the URL in the console.
3032
3033 2007-12-20  Adam Barth  <hk9565@gmail.com>
3034
3035         Reviewed and landed by Sam Weinig.
3036
3037         http://bugs.webkit.org/show_bug.cgi?id=15313
3038         <rdar://problem/5514516>
3039
3040         The same-origin check was incorrect in two cases (both fixed in this
3041         patch):
3042
3043         A) If both the source and the target have set their document.domain
3044            to the same value, the protocol must also match in order for
3045            access to be allowed.  Without this requirement, the browser is
3046            vulnerable to the following attack:
3047
3048            1) Suppose there is an HTTPS site (www.example.com) that sets
3049               document.domain = "example.com".
3050            2) A network attacker redirects the browser to http://www.example.com/
3051               a) injects script to set document.domain = "example.com", and
3052               b) opens a window to https://www.example.com/
3053            3) Now the network attacker can inject script into the HTTPS page,
3054               stealing cookies and issuing banking transactions.
3055
3056         B) If only one of the source and target has set document.domain, then
3057            access should be denied.  With this behavior, the browser is
3058            vulnerable to the following attack:
3059
3060            1) Suppose http://foo.example.com/ opens an iframe to
3061               http://foo.example.com/frame.html that
3062               a) sets document.domain = "example.com", and
3063               b) opens an iframe to http://bar.example.com/
3064               This is a common usage of document.domain for cross-domain
3065               communication, see for example:
3066                 http://www.collinjackson.com/research/papers/fp801-jackson.pdf
3067            2) The inner-most iframe, which is from bar.example.com, sets
3068               document.domain = "example.com".
3069            3) Now the inner-most iframe can inject script into the middle
3070               iframe (say via document.write).  This bar.example.com script
3071               now has access to the outer-most frame (from foo.example.com).
3072
3073         Both these changes cause WebKit to match the behavior of Firefox 2 and
3074         IE6 in these cases.  This patch includes regression tests for both
3075         issues.
3076
3077         Internet Explorer 7 and Opera 9 are more strict in that they require
3078         the port numbers to match when both pages have document.domain set.
3079         Opera 9 allows access when only one page has set document.domain, but
3080         this is a security vulnerability.
3081
3082         Tests: http/tests/security/cross-frame-access-child-explicit-domain.html
3083                http/tests/security/cross-frame-access-parent-explicit-domain.html
3084
3085         * bindings/js/kjs_window.cpp:
3086         (KJS::createWindow):
3087         (KJS::Window::allowsAccessFrom):
3088         * dom/Document.cpp:
3089         (WebCore::Document::domain):
3090         (WebCore::Document::setDomain):
3091         (WebCore::Document::initSecurityOrigin):
3092         * dom/Document.h:
3093         (WebCore::Document::securityOrigin):
3094         * loader/FrameLoader.cpp:
3095         (WebCore::FrameLoader::begin):
3096         (WebCore::FrameLoader::checkCallImplicitClose):
3097         (WebCore::FrameLoader::shouldAllowNavigation):
3098         * platform/SecurityOrigin.cpp:
3099         (WebCore::SecurityOrigin::setForURL):
3100         (WebCore::SecurityOrigin::createForFrame):
3101         (WebCore::SecurityOrigin::canAccess):
3102         * platform/SecurityOrigin.h:
3103         (WebCore::SecurityOrigin::domain):
3104         * storage/Database.cpp:
3105         (WebCore::Database::openDatabase):
3106         (WebCore::Database::Database):
3107         (WebCore::Database::securityOriginData):
3108         * storage/Database.h:
3109         (WebCore::Database::databaseDebugName):
3110         * storage/DatabaseTracker.cpp:
3111         (WebCore::DatabaseTracker::canEstablishDatabase):
3112         * storage/SQLTransaction.cpp:
3113         (WebCore::SQLTransaction::postflightAndCommit):
3114         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
3115
3116 2007-12-20  Rodney Dawes  <dobey@wayofthemonkey.com>
3117
3118         Reviewed by Darin Adler.
3119
3120         Define XP_UNIX when building with plugins on X11.
3121         Use new npruntime_internal.h instead of npruntime.h.
3122         http://bugs.webkit.org/show_bug.cgi?id=15669
3123
3124         * ForwardingHeaders/bindings/npruntime_internal.h
3125         * WebCore.pro:
3126         * html/HTMLPlugInElement.h:
3127
3128 2007-12-19  johnnyding.webkit  <johnnyding.webkit@gmail.com>
3129
3130         Reviewed by Alexey. Landed by Stephanie.
3131
3132         - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | <rdar://problem/5619399>
3133           Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error
3134           Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing 
3135           the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name.
3136
3137
3138         * html/HTMLTokenizer.cpp:
3139         (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity.
3140         (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer.
3141         * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar.
3142
3143 2007-12-20  Eric Seidel  <eric@webkit.org>
3144
3145         Reviewed by Nikolas Zimmermann.
3146
3147         WebKit claims to support SVG feature strings it shouldn't
3148         http://bugs.webkit.org/show_bug.cgi?id=15480
3149
3150         * dom/DOMImplementation.cpp:
3151         (WebCore::isSVG10Feature):
3152         (WebCore::isSVG11Feature):
3153
3154 2007-12-20  John Sullivan  <sullivan@apple.com>
3155
3156         Reviewed by Oliver and Geoff
3157         
3158         - fix <rdar://problem/5536858> Yellow highlight for find results is sometimes shorter 
3159           than white "hole" behind it
3160
3161         * rendering/RenderText.cpp:
3162         (WebCore::RenderText::addLineBoxRects):
3163         respect useSelectionHeight in all cases; we were only respecting it in one of the two cases
3164
3165 2007-12-20  Dan Bernstein  <mitz@apple.com>
3166
3167         Reviewed by Darin Adler.
3168
3169         - fix <rdar://problem/5656368> REGRESSION(3.0.4-ToT): Acid2 test fails to render anything
3170
3171         * platform/win/ScrollViewWin.cpp:
3172         (WebCore::ScrollView::maximumScroll): Changed back to return the maximum
3173         scroll offsets even if scrolling is not allowed, because navigation and
3174         scrollTo should still work.
3175         (WebCore::ScrollView::wheelEvent): Added early return if scrolling is
3176         not allowed.
3177
3178 2007-12-17  Tony Chang  <idealisms@gmail.com>
3179
3180         Reviewed by Darin.
3181
3182         - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479
3183           text selection does not always begin at mouse down point
3184           Reset the m_dragSrc object on mouse down on all platforms.
3185
3186         Test: fast/text/reset-drag-on-mouse-down.html
3187
3188         * page/EventHandler.cpp:
3189         (WebCore::EventHandler::handleMousePressEvent):
3190         * page/mac/EventHandlerMac.mm:
3191         (WebCore::EventHandler::mouseDown):
3192
3193 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
3194
3195         Reviewed by Oliver Hunt.
3196
3197         Build support:
3198         * ForwardingHeaders/kjs/SymbolTable.h: Added.
3199         * ForwardingHeaders/wtf/VectorTraits.h: Added.
3200
3201         * bindings/js/JSDOMWindowCustom.cpp:
3202         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of
3203         getDirectLocation with getOwnPropertySlot. getDirectLocation is no
3204         longer valid, since global declarations are not stored in the property
3205         map.
3206
3207         (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with
3208         JSGlobalObject::put. JSObject::put is no longer valid, since global
3209         declarations are not stored in the property map.
3210
3211         * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base::
3212         calls, since JSObject is not our base class. This was always a bug, but
3213         the bug is even more apparent after some of my changes.
3214
3215         (KJS::Window::clear): Removed call to clearProperties because
3216         JSGlobalObject::reset takes care of that now.
3217
3218         * history/CachedPage.cpp:
3219         * history/CachedPage.h: Added support for saving a symbol table and
3220         localStorage to the page cache, and restoring it.
3221
3222 2007-12-19  Dan Bernstein  <mitz@apple.com>
3223
3224         Reviewed by Darin Adler and Dave Hyatt.
3225
3226         - Substitute the user's preferred standard font for an unknown primary
3227           font before falling back on the platform's last resort font
3228
3229         Cannot be tested in DumpRenderTree because it sets the standard font to
3230         Times, which is also the hard-coded last resort font on Mac.
3231
3232         * css/CSSFontSelector.cpp:
3233         (WebCore::CSSFontSelector::getFontData): Changed the early bail out
3234         condition to allow getting generic font families from settings even if
3235         there are not @font-face rules. Fixed a typo that mapped fantasy to
3236         cursive. Added a mapping from -webkit-standard to the standard family.
3237         * css/CSSStyleSelector.cpp:
3238         (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create
3239         a font selector.
3240         (WebCore::CSSRuleSet::addRulesFromSheet):
3241         (WebCore::CSSStyleSelector::applyProperty): Changed to always use the
3242         font selector.
3243         * css/CSSStyleSelector.h:
3244         (WebCore::CSSStyleSelector::fontSelector):
3245         * platform/graphics/FontCache.cpp:
3246         (WebCore::FontCache::getFontData): Try the user's preferred standard
3247         font before the platform's last resort font.
3248
3249 2007-12-19  Sven Herzberg  <sven@imendio.com>
3250
3251         Reviewed by Alp Toker.
3252
3253         Scaled font destruction takes place in FontData::platformDestroy(). No
3254         need to do it in FontPlatformData::~FontPlatformData().
3255
3256         Destroying platform data in platformDestroy() is a convention we
3257         borrow from the Mac and Win ports.
3258
3259         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3260
3261 2007-12-19  Alice Liu  <alice.liu@apple.com>
3262
3263         build fix (Windows)
3264
3265         Changed uint to unsigned int.  uint caused Windows build breakage
3266
3267         * page/Page.cpp:
3268         (WebCore::Page::markAllMatchesForText):
3269         * page/Page.h:
3270
3271 2007-12-19  Christian Dywan  <christian@twotoasts.de> 
3272
3273         Reviewed by Alp Toker.
3274
3275         http://bugs.webkit.org/show_bug.cgi?id=16222
3276         [GTK] Implement inline search and highlighting of matching strings.
3277
3278         Implement search and highlighting logic directly in WebCore.
3279
3280         * page/Page.cpp:
3281         (WebCore::incrementFrame):
3282         (WebCore::Page::findString):
3283         (WebCore::Page::markAllMatchesForText):
3284         (WebCore::Page::unmarkAllTextMatches):
3285         * page/Page.h:
3286
3287 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
3288
3289         Reviewed by Sam Weinig, Dan Bernstein.
3290
3291         Tiger build fix: restored some graphics code still needed on Tiger.
3292
3293         * platform/graphics/GraphicsTypes.h:
3294         * platform/graphics/cg/GraphicsContextCG.cpp:
3295         * platform/graphics/mac/GraphicsContextMac.mm:
3296         (WebCore::GraphicsContext::setCompositeOperation):
3297
3298 2007-12-19  Alp Toker  <alp@atoker.com>
3299
3300         Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and
3301         the Pango backend API in these cases.
3302
3303         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3304         (WebCore::FontPlatformData::FontPlatformData):
3305         (WebCore::FontPlatformData::~FontPlatformData):
3306
3307 2007-12-19  Alice Liu  <alice.liu@apple.com>
3308
3309         Reviewed by Darin.
3310
3311         Fixed <rdar://problem/5592485> Safari crashed trying to get a motorcycle insurance quote
3312         on Geico.com WebCore::Document::inPageCache()
3313
3314         Calling Node::willRemove on the focusedNode would immediately tell the document to remove
3315         the focused node, and trigger JS events.  This means that the document is mutated while
3316         the engine is trying to tell all child nodes that it's about to removed.  To avoid
3317         crashing, we need to hold off on mutating the document until node traversal is finished.
3318
3319         * dom/ContainerNode.cpp:
3320         (WebCore::ContainerNode::removeChild):
3321         (WebCore::ContainerNode::removeChildren):
3322         * dom/Node.cpp:
3323         * dom/Node.h:
3324         (WebCore::Node::willRemove):
3325         * loader/FrameLoader.cpp:
3326         (WebCore::FrameLoader::clear):
3327
3328 2007-12-19  Andre Boule  <aboule@apple.com>
3329
3330         Reviewed by Dan Bernstein.
3331
3332         Test: fast/canvas/canvas-composite.html
3333
3334         Fix for:
3335         <rdar://problem/5640059> GraphicsContext::setCompositeOperation should use CGContextSetBlendMode
3336
3337         This fix makes setCompositeOperation consistent across all platforms that use CG.
3338
3339         The following compositing modes don't pass however that is covered by another bug:
3340         source-in
3341         source-out
3342         destination-in
3343         destination-atop
3344         copy
3345         <rdar://problem/5651783> Some canvas tag compositing modes don't render correctly
3346
3347         * platform/graphics/GraphicsTypes.h:
3348         * platform/graphics/cg/GraphicsContextCG.cpp:
3349         (WebCore::GraphicsContext::setCompositeOperation):
3350         * platform/graphics/mac/GraphicsContextMac.mm:
3351         * platform/win/GraphicsContextWin.cpp:
3352
3353 2007-12-19  Dan Bernstein  <mitz@apple.com>
3354
3355         Reviewed by Dave Hyatt.
3356
3357         - fix <rdar://problem/5650045> REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page
3358
3359         Test: fast/dynamic/subtree-boundary-percent-height.html
3360
3361         * rendering/RenderObject.cpp:
3362         (WebCore::objectIsRelayoutBoundary): Do not allow overflows with
3363         percent heights because sometimes they compute to 'auto'.
3364
3365 2007-12-19  Sam Weinig  <sam@webkit.org>
3366
3367         Reviewed by Maciej.
3368
3369         http://bugs.webkit.org/show_bug.cgi?id=16511
3370         Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList.
3371         - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/
3372
3373         * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching.
3374         (WebCore::ChildNodeList::ChildNodeList):
3375         * dom/ClassNodeList.cpp:
3376         (WebCore::ClassNodeList::ClassNodeList):
3377         * dom/ClassNodeList.h:
3378
3379         Move getElementsByName and getElementsByClassName to Node so they
3380         can use easily employ the caching already used by ChildNodeLists.  In the case of 
3381         getElementsByClassName, this reduces code duplication in Element as well
3382         * dom/Document.cpp:
3383         * dom/Document.h:
3384
3385         Move getElementsByClassName to Node.
3386         * dom/Element.cpp:
3387         * dom/Element.h:
3388
3389         * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching.
3390         (WebCore::NameNodeList::NameNodeList):
3391         (WebCore::NameNodeList::item):
3392         * dom/NameNodeList.h:
3393
3394         Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData.
3395         * dom/Node.cpp:
3396         (WebCore::TagNodeList::TagNodeList):
3397         (WebCore::Node::Node):
3398         (WebCore::Node::~Node):
3399         (WebCore::Node::childNodes):
3400         (WebCore::Node::registerNodeList):
3401         (WebCore::Node::getElementsByName):
3402         (WebCore::Node::getElementsByClassName):
3403         * dom/Node.h: Make m_nodeLists an OwnPtr.  Moved getElementsByName and getElementsByClassName here
3404
3405         Allow subclasses to choose whether they want to receive the notifications using a new bit.
3406         * dom/NodeList.cpp:
3407         (WebCore::NodeList::NodeList):
3408         * dom/NodeList.h:
3409         (WebCore::NodeList::needsNotifications):
3410
3411 2007-12-19  Dave Hyatt  <hyatt@apple.com>
3412
3413         Add support for GDI text rendering to WebKit.
3414       
3415         Reviewed by mitz
3416         
3417         * css/CSSStyleSelector.cpp:
3418         (WebCore::CSSStyleSelector::applyProperty):
3419         * dom/Document.cpp:
3420         (WebCore::Document::recalcStyle):
3421         * page/Settings.cpp:
3422         (WebCore::Settings::setFontRenderingMode):
3423         (WebCore::Settings::fontRenderingMode):
3424         * page/Settings.h:
3425         * platform/graphics/Font.h:
3426         (WebCore::Font::renderingMode):
3427         * platform/graphics/FontCache.cpp:
3428         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3429         (WebCore::FontPlatformDataCacheKey::operator==):
3430         (WebCore::computeHash):
3431         (WebCore::FontCache::getCachedFontPlatformData):
3432         * platform/graphics/FontDescription.h:
3433         (WebCore::):
3434         (WebCore::FontDescription::FontDescription):
3435         (WebCore::FontDescription::renderingMode):
3436         (WebCore::FontDescription::setRenderingMode):
3437         (WebCore::FontDescription::operator==):
3438         * platform/graphics/GraphicsContext.h:
3439         * platform/graphics/win/FontCacheWin.cpp:
3440         (WebCore::FontCache::fontExists):
3441         (WebCore::FontCache::createFontPlatformData):
3442         * platform/graphics/win/FontDataWin.cpp:
3443         (WebCore::FontData::platformInit):
3444         (WebCore::FontData::smallCapsFontData):
3445         (WebCore::FontData::containsCharacters):
3446         (WebCore::FontData::determinePitch):
3447         (WebCore::FontData::platformWidthForGlyph):
3448         * platform/graphics/win/FontPlatformData.h:
3449         (WebCore::FontPlatformData::FontPlatformData):
3450         (WebCore::FontPlatformData::useGDI):
3451         (WebCore::FontPlatformData::operator==):
3452         * platform/graphics/win/FontPlatformDataWin.cpp:
3453         (WebCore::FontPlatformData::FontPlatformData):
3454         * platform/graphics/win/FontWin.cpp:
3455         (WebCore::Font::drawGlyphs):
3456         * platform/graphics/win/IconWin.cpp:
3457         (WebCore::Icon::paint):
3458         * platform/win/GraphicsContextWin.cpp:
3459         (WebCore::GraphicsContext::getWindowsContext):
3460         (WebCore::GraphicsContext::releaseWindowsContext):
3461         * platform/win/UniscribeController.cpp:
3462         (WebCore::UniscribeController::shapeAndPlaceItem):
3463         * platform/win/UniscribeController.h:
3464         * plugins/win/PluginViewWin.cpp:
3465         (WebCore::PluginViewWin::paint):
3466
3467 2007-12-19  Sven Herzberg  <sven@imendio.com>
3468
3469         Reviewed by Alp Toker.
3470
3471         Replace the fontconfig/freetype based font management with a pango
3472         based one. Fixes:
3473         http://bugs.webkit.org/show_bug.cgi?id=15229
3474
3475         * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated
3476         the platform specific destroy code
3477         (FontData::containsCharacters()): implemented font coverage with pango
3478         * platform/gtk/FontPlatformData.h: replaced fontconfig specific
3479         members with pango-specific ones
3480         * platform/gtk/FontPlatformDataGtk.cpp: added static members for the
3481         FontPlatformData class
3482         (FontPlatformData::FontPlatformData()): implemented the font-matching
3483         with a PangoFontDescription instead of an FcPattern; initialize the
3484         scaled font by using the API for PangoCairoFont
3485         (FontPlatformData::init()): initialize the PangoFontMap and set up a
3486         hash table to translate the font family name into a font family
3487         (FontPlatformData::isFixedPitch()): implemented by querying the
3488         PangoFontFamily
3489         (FontPlatformData::operator==): compare the FontPlatformData by
3490         comparing the font pointers or the described fonts
3491         * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()):
3492         added a function to query a glyph from a PangoFont
3493         (GlyphPage::fill()): implemented the fill function with Pango instead
3494         of fontconfig/freetype
3495
3496 2007-12-19  Alp Toker  <alp@atoker.com>
3497
3498         Reviewed by Holger Freyther.
3499
3500         Improve graphics operator approximations
3501         
3502         These changes match Cairo's own CG approximations.
3503
3504         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3505         (WebCore::toCairoOperator):
3506
3507 2007-12-19  Alp Toker  <alp@atoker.com>
3508
3509         Reviewed by Holger Freyther.
3510
3511         Check the bounding box before doing a full hit test
3512
3513         * platform/graphics/cairo/PathCairo.cpp:
3514         (WebCore::Path::contains):
3515
3516 2007-12-18  Sam Weinig  <sam@webkit.org>
3517
3518         Reviewed by Geoff.
3519
3520         Fix for <rdar://problem/5646478>
3521         REGRESSION: fast/events/event-view-toString fails on Leopard
3522
3523         This fixes an issue where we were incorrectly setting the lastInPrototypeChain
3524         for the JSDOMWindow (the global object) before a call to setPrototype overwrote
3525         it. This fixes it by passing the prototype up the constructor chain so that it
3526         is set before any calls can be made.
3527
3528         * bindings/js/kjs_window.cpp:
3529         (KJS::Window::Window):
3530         * bindings/js/kjs_window.h:
3531         * bindings/scripts/CodeGeneratorJS.pm:
3532
3533 2007-12-18  Beth Dakin  <bdakin@apple.com>
3534
3535         Reviewed by Oliver.
3536
3537         Fix for <rdar://problem/5616982> SVGs with width and height 100% 
3538         fail to render when used as <img> or CSS image (16167)
3539
3540         This final part of the work fixes the <img> tag.
3541
3542         This is the real fix. 
3543         * rendering/RenderImage.cpp:
3544         (WebCore::RenderImage::calcReplacedWidth): Set the container size 
3545         on the image. Setting the container size only actually sticks if 
3546         the values are non-zero, so if the container size really was set, 
3547         use the imageSize that is calculated using the container size. If 
3548         it did not stick but the image does have relative width (meaning 
3549         that the container size is 0), set the width to 0 by hand. We want 
3550         to avoid setting the width before we have a container size or we 
3551         will end up incorrectly using the default size of 300x150.
3552         (WebCore::RenderImage::calcReplacedHeight): Same as above, but for 
3553         height.
3554
3555         A few more pieces of information have to be exposed through cached 
3556         image to make this happen.
3557         * loader/CachedImage.cpp:
3558         (WebCore::CachedImage::usesImageContainerSize): As mentioned above, 
3559         when setContainerSize() is called, the container size is only 
3560         actually set if the values are non-zero. This call tells you if it 
3561         was set.
3562         (WebCore::CachedImage::imageHasRelativeWidth):
3563         (WebCore::CachedImage::imageHasRelativeHeight):
3564         * loader/CachedImage.h:
3565         * platform/graphics/Image.h:
3566         (WebCore::Image::usesContainerSize):
3567         * svg/graphics/SVGImage.cpp:
3568         (WebCore::SVGImage::usesContainerSize):
3569         * svg/graphics/SVGImage.h:
3570
3571 2007-12-18  Mark Rowe  <mrowe@apple.com>
3572
3573         Rubber-stamped by Maciej Stachowiak.
3574
3575         Remove outdated and non-functioning project files for the Apollo port.
3576
3577         * WebCore.apolloproj: Removed.
3578
3579 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
3580
3581         <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
3582         
3583         Need to translate the char back into a key code for posting our WM_KEYDOWN.
3584         
3585         Reviewed by Ada.
3586
3587         * platform/win/PopupMenuWin.cpp:
3588         (WebCore::PopupWndProc):
3589
3590 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
3591
3592         <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
3593         
3594         Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
3595         Only create a font with the last one.
3596         
3597         Reviewed by Mitz, Darin.
3598
3599         * platform/graphics/win/FontCacheWin.cpp:
3600         (WebCore::metaFileEnumProc):
3601         (WebCore::FontCache::getFontDataForCharacters):
3602
3603 2007-12-17  Brent Fulgham  <bfulgham@gmail.com>
3604
3605         Reviewed by Darin.
3606
3607         http://bugs.webkit.org/show_bug.cgi?id=16464
3608         Modify WebCore to use win32 thread primitives
3609
3610         Updates to support native windows threading primitives
3611         rather than pthreads emulation library.
3612
3613         * WebCore.vcproj/WebCore.vcproj:
3614         * config.h:
3615         * platform/Threading.h:
3616         * platform/win/MutexWin.cpp: Added.
3617         (WebCore::Mutex::Mutex):
3618         (WebCore::Mutex::~Mutex):
3619         (WebCore::Mutex::lock):
3620         (WebCore::Mutex::tryLock):
3621         (WebCore::Mutex::unlock):
3622         * platform/win/ThreadConditionWin.cpp: Added.
3623         (WebCore::ThreadCondition::ThreadCondition):
3624         (WebCore::ThreadCondition::~ThreadCondition):
3625         (WebCore::ThreadCondition::wait):
3626         (WebCore::ThreadCondition::signal):
3627         (WebCore::ThreadCondition::broadcast):
3628         * platform/win/ThreadingWin.cpp:
3629         (WebCore::threadMapMutex):
3630         (WebCore::threadMap):
3631         (WebCore::storeThreadHandleByIdentifier):
3632         (WebCore::identifierByThreadHandle):
3633         (WebCore::threadHandleForIdentifier):
3634         (WebCore::clearThreadHandleForIdentifier):
3635         (WebCore::createThread):
3636         (WebCore::waitForThreadCompletion):
3637         (WebCore::detachThread):
3638         (WebCore::currentThread):
3639
3640 2007-12-18  Rodney Dawes  <dobey@wayofthemonkey.com>
3641
3642         Reviewed by Darin Adler.
3643
3644         Handle EINTR when set by select() and try the select() again
3645         http://bugs.webkit.org/show_bug.cgi?id=16071
3646
3647         * platform/network/curl/ResourceHandleManager.cpp:
3648         (ResourceHandleManager::downloadTimerCallback):
3649
3650 2007-12-18  Dan Bernstein  <mitz@apple.com>
3651
3652         Reviewed by Dave Hyatt.
3653
3654         - avoid the simplified Chinese font linking code for characters that are
3655           not in any Windows code page
3656
3657         * platform/graphics/win/FontCacheWin.cpp:
3658         (WebCore::FontCache::getFontDataForCharacters):
3659
3660 2007-12-18  Brady Eidson <beidson@apple.com>
3661
3662         Reviewed by Adele
3663
3664         <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
3665
3666         Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
3667         protected by authentication.  Occasionally one can view the main page of a site but the favicon
3668         is behind the iron curtain - in these cases, we should *not* prompt for a username and password
3669         solely for the favicon.
3670
3671         * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
3672
3673         * loader/SubresourceLoader.cpp:
3674         (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
3675           is virtual from ResourceLoader, SubresourceLoader can override.  First call to the 
3676           SubresourceLoaderClient.  If they cancel the resource load, return early. Otherwise, let
3677           ResourceLoader work its magic (resulting in the auth sheet coming down)
3678         * loader/SubresourceLoader.h:
3679
3680         * loader/SubresourceLoaderClient.h:
3681         (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
3682
3683         * loader/icon/IconLoader.cpp:
3684         (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
3685           never prompt the user for credentials just for a favicon.
3686         * loader/icon/IconLoader.h:
3687
3688 2007-12-18  John Sullivan  <sullivan@apple.com>
3689
3690         Reviewed by Brady
3691         
3692         - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
3693
3694         * storage/DatabaseTracker.cpp:
3695         (WebCore::DatabaseTracker::canEstablishDatabase):
3696         pass "name" instead of "displayName" if there's no displayName
3697
3698 2007-12-17  Dan Bernstein  <mitz@apple.com>
3699
3700         Reviewed by Maciej Stachowiak.
3701
3702         - restore ButtonFace and ThreeDFace to their previous values for non-Mac
3703           platforms. The Mac port also uses the same values for now instead
3704           of NSColor-based ones.
3705
3706         * rendering/RenderTheme.cpp:
3707         (WebCore::RenderTheme::systemColor):
3708
3709 2007-12-17  Rodney Dawes  <dobey@wayofthemonkey.com>
3710
3711         Reviewed by Maciej Stachowiak.
3712
3713         Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
3714         Add required Frame::createScriptInstanceForWidget to FrameGtk
3715
3716         * config.h:
3717         * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
3718
3719 2007-12-17  Alice Liu  <alice.liu@apple.com>
3720
3721         Reviewed by Adam.
3722
3723         Fixed <rdar://5566435> window with no scrollbars can be scrolled
3724
3725         * platform/win/ScrollViewWin.cpp:
3726         (WebCore::ScrollView::maximumScroll):
3727         corrected maximumScroll() to account for scrolling not allowed.
3728         (WebCore::ScrollView::wheelEvent):
3729
3730 2007-12-14  Juan A. Suarez Romero  <jasuarez@igalia.com>
3731
3732         Reviewed by Alp Toker.
3733
3734         http://bugs.webkit.org/show_bug.cgi?id=16042
3735         [GTK] Eliminate webkit_init()
3736
3737         Move webkit initialization to WebView class init.
3738
3739         * WebCore.pro:
3740
3741 2007-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
3742
3743         Reviewed by Darin.
3744
3745         <rdar://problem/5651291> REGRESSION: Flash content doesn't display
3746         (www.adobe.com)
3747
3748         We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
3749
3750         * plugins/win/PluginViewWin.cpp:
3751         (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
3752         NPEvent*
3753         (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
3754         (WebCore::PluginViewWin::handleKeyboardEvent): same
3755         (WebCore::PluginViewWin::handleMouseEvent): same
3756         * plugins/win/PluginViewWin.h:
3757
3758 2007-12-17  Alexey Proskuryakov  <ap@webkit.org>
3759
3760         Reviewed by Darin.
3761
3762         Live to the promise of never making AppKit special character codes visible via DOM.
3763
3764         Test: fast/events/arrow-keys-on-body.html
3765
3766         * page/EventHandler.cpp:
3767         (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
3768         to let quirks-aware code strip special charactrers.
3769         * platform/mac/KeyEventMac.mm:
3770         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
3771         mode, remove the text if it's a special character.
3772
3773 2007-12-17  Mark Rowe  <mrowe@apple.com>
3774
3775         Reviewed by Darin Adler.
3776
3777         Fix incorrect array size and incorrect array index in convertNSColorToColor.
3778
3779         * rendering/RenderThemeMac.mm:
3780         (WebCore::convertNSColorToColor):
3781
3782 2007-12-17  Darin Adler  <darin@apple.com>
3783
3784         Reviewed by Mark Rowe.
3785
3786         - fix http://bugs.webkit.org/show_bug.cgi?id=16468
3787           REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
3788
3789         * storage/DatabaseThread.cpp:
3790         (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
3791         because there's no guarantee it won't lose its last reference otherwise.
3792
3793 2007-12-17  Dan Bernstein  <mitz@apple.com>
3794
3795         Reviewed by Maciej Stachowiak.
3796
3797         - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
3798           and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
3799
3800         * platform/graphics/win/FontCacheWin.cpp:
3801         (WebCore::FontCache::getFontDataForCharacters): To ensure that font
3802         linking gives consistent results for characters that are exclusive to
3803         the simplified Chinese code page and characters that belong to that
3804         code page and other code pages, always ask to map to simplified Chinese
3805         alone first.
3806
3807 2007-12-17  Christian Dywan  <christian@twotoasts.de>
3808
3809         Reviewed by Alp Toker.
3810
3811         http://bugs.webkit.org/show_bug.cgi?id=16378
3812         Implement Icon for Gtk
3813
3814         Icon provides a GdkPixbuf containing a themed icon.
3815         The icon theme is probed for an icon name according to the
3816         Icon Naming Specification or conventional Gnome icon names respectively.
3817
3818         See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
3819
3820         * platform/graphics/Icon.h:
3821         * platform/graphics/gtk/IconGtk.cpp:
3822         (WebCore::Icon::~Icon):
3823         (WebCore::lookupIconName):
3824         (WebCore::Icon::newIconForFile):
3825         (WebCore::Icon::paint):
3826
3827 2007-12-16  Sam Weinig  <sam@webkit.org>
3828
3829         Reviewed by Mitz.
3830
3831         Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
3832         Move the JS Location object to its own file
3833
3834         - Move Location into its own file and rename it JSLocation.
3835
3836         * DerivedSources.make:
3837         * WebCore.pro:
3838         * WebCore.vcproj/WebCore.vcproj:
3839         * WebCore.xcodeproj/project.pbxproj:
3840         * WebCoreSources.bkl:
3841         * bindings/js/JSDocumentCustom.cpp:
3842         * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
3843         (WebCore::):
3844         (WebCore::JSLocation::JSLocation):
3845         (WebCore::JSLocation::getValueProperty):
3846         (WebCore::JSLocation::getOwnPropertySlot):
3847         (WebCore::JSLocation::put):
3848         (WebCore::JSLocationProtoFuncReplace::callAsFunction):
3849         (WebCore::JSLocationProtoFuncReload::callAsFunction):
3850         (WebCore::JSLocationProtoFuncAssign::callAsFunction):
3851         (WebCore::JSLocationProtoFuncToString::callAsFunction):
3852         * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
3853         (WebCore::JSLocation::):
3854         (WebCore::JSLocation::frame):
3855         (WebCore::JSLocation::classInfo):
3856         * bindings/js/kjs_window.cpp:
3857         (KJS::Window::location):
3858         * bindings/js/kjs_window.h:
3859         * history/CachedPage.cpp:
3860
3861 2007-12-16  Dan Bernstein  <mitz@apple.com>
3862
3863         Reviewed by Sam Weinig.
3864
3865         - make 'cursor: copy' and 'cursor: none' work.
3866
3867         Already covered by manual-tests/cursor.html
3868
3869         * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
3870         needed for the 33rd and 34th cursor values.
3871
3872 2007-12-16  Mark Rowe  <mrowe@apple.com>
3873
3874         Reviewed by Maciej Stachowiak.
3875
3876         Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
3877
3878         * WebCore.base.exp:
3879         * WebCore.xcodeproj/project.pbxproj:
3880         * loader/NetscapePlugInStreamLoader.h:
3881         * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
3882         * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
3883
3884 2007-12-16  Sam Weinig  <sam@webkit.org>
3885
3886         Reviewed by Maciej.
3887
3888         Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
3889         Cleanup kjs_window
3890
3891         - Move ScheduledAction into its own file and put it in the WebCore namespace.
3892
3893         * WebCore.pro:
3894         * WebCore.vcproj/WebCore.vcproj:
3895         * WebCore.xcodeproj/project.pbxproj:
3896         * WebCoreSources.bkl:
3897         * bindings/js/PausedTimeouts.cpp:
3898         * bindings/js/PausedTimeouts.h:
3899         * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
3900         (WebCore::ScheduledAction::ScheduledAction):
3901         (WebCore::ScheduledAction::execute):
3902         * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
3903         (WebCore::ScheduledAction::ScheduledAction):
3904         * bindings/js/kjs_window.cpp:
3905         (KJS::DOMWindowTimer::DOMWindowTimer):
3906         (KJS::DOMWindowTimer::action):
3907         (KJS::DOMWindowTimer::takeAction):
3908         (KJS::Window::installTimeout):
3909         (KJS::Window::timerFired):
3910         * bindings/js/kjs_window.h:
3911
3912 2007-12-16  Alp Toker  <alp@atoker.com>
3913
3914         Reviewed by Maciej.
3915
3916         http://bugs.webkit.org/show_bug.cgi?id=16356
3917         [GTK] Integrate GStreamer video with the graphics backend
3918
3919         Integrate the GStreamer media backend with the Cairo graphics backend.
3920         There are still some issues: Data is copied more often than necessary,
3921         and repaint() is not called, causing transformed video not to update
3922         sometimes.
3923
3924         * WebCore.pro:
3925         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3926         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3927         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3928         (WebCore::MediaPlayerPrivate::currentTime):
3929         (WebCore::MediaPlayerPrivate::setEndTime):
3930         (WebCore::MediaPlayerPrivate::seeking):
3931         (WebCore::MediaPlayerPrivate::naturalSize):
3932         (WebCore::MediaPlayerPrivate::setMuted):
3933         (WebCore::MediaPlayerPrivate::setRect):
3934         (WebCore::MediaPlayerPrivate::setVisible):
3935         (WebCore::MediaPlayerPrivate::repaint):
3936         (WebCore::MediaPlayerPrivate::paint):
3937         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
3938         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3939         * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
3940         (webkit_video_sink_base_init):
3941         (webkit_video_sink_init):
3942         (webkit_video_sink_idle_func):
3943         (webkit_video_sink_render):
3944         (webkit_video_sink_set_caps):
3945         (webkit_video_sink_dispose):
3946         (webkit_video_sink_finalize):
3947         (webkit_video_sink_set_property):
3948         (webkit_video_sink_get_property):
3949         (webkit_video_sink_stop):
3950         (webkit_video_sink_class_init):
3951         (webkit_video_sink_new):
3952         (webkit_video_sink_set_surface):
3953         (plugin_init):
3954         * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
3955
3956 2007-12-16  Mark Rowe  <mrowe@apple.com>
3957
3958         Mac build fix.
3959
3960         * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
3961         Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
3962         new shared implementation.
3963
3964 2007-12-16  Rodney Dawes  <dobey@wayofthemonkey.com>
3965
3966         Reviewed by Maciej Stachowiak.
3967
3968         http://bugs.webkit.org/show_bug.cgi?id=16389
3969         Bug 16389: Common Implementation of NetscapePlugInStreamLoader
3970
3971         * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
3972         * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
3973         * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
3974
3975 2007-12-16  Grace Kloba  <klobag@gmail.com>
3976
3977         Reviewed by Darin Adler.
3978
3979         Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
3980         Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
3981
3982         * dom/Document.cpp:
3983         (WebCore::Document::Document):
3984         * loader/FrameLoader.cpp:
3985         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
3986         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3987
3988 2007-12-16  Darin Adler  <darin@apple.com>
3989
3990         Reviewed by Maciej.
3991
3992         - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
3993
3994         Test: storage/execute-sql-args.html
3995
3996         * bindings/js/JSSQLTransactionCustom.cpp:
3997         (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
3998         exception happens, we won't try to do any more argument processing. Changed processing
3999         of the second argument so that we allow an undefined value or null, and simply omit the
4000         array. Changed processing of the second argument so that we don't require an actual
4001         JavaScript array. Instead, as with the JavaScript array operations themselves, we use
4002         the length property and corresponding numeric properties of the object, allowing other
4003         objects to act as arrays. Changed processing of the third and fourth arguments to
4004         allow the undefined value as well as null; we check the value of the argument rather
4005         than looking at the size of the passed-in arguments list.
4006
4007 2007-12-16  Sam Weinig  <sam@webkit.org>
4008
4009         Reviewed by Darin.
4010
4011         More of http://bugs.webkit.org/show_bug.cgi?id=16385
4012         Cleanup kjs_window
4013
4014         - Move PausedTimeouts into its own file and put it in the WebCore namespace.
4015
4016         * WebCore.pro:
4017         * WebCore.vcproj/WebCore.vcproj:
4018         * WebCore.xcodeproj/project.pbxproj:
4019         * WebCoreSources.bkl:
4020         * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
4021         * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
4022         * bindings/js/kjs_window.cpp:
4023         (KJS::Window::pauseTimeouts):
4024         * bindings/js/kjs_window.h:
4025         * history/CachedPage.cpp:
4026         * history/CachedPage.h:
4027         * page/Chrome.cpp:
4028
4029 2007-12-16  Beth Dakin  <bdakin@apple.com>
4030
4031         Reviewed by Geoff.
4032
4033         Make relative-size SVGs work in border-image.
4034
4035         * rendering/RenderBox.cpp:
4036         (WebCore::RenderBox::calculateBackgroundSize):
4037         * rendering/RenderObject.cpp:
4038         (WebCore::RenderObject::paintBorderImage):
4039
4040 2007-12-16  Darin Adler  <darin@apple.com>
4041
4042         - fix Tiger build (my fault it was broken)
4043
4044         * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
4045
4046 2007-12-16  Andrew Wellington  <proton@wiretapped.net>
4047
4048         Reviewed by Darin.
4049         
4050         http://bugs.webkit.org/show_bug.cgi?id=6129
4051         Incomplete implementation of CSS 2.1 system colors
4052
4053         Test: fast/css/css2-system-color.html
4054         
4055         Based on original patch by Rob Buis.
4056         
4057         System colors are retrieved from NSColor as appropriate. If the color is a pattern color
4058         (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
4059         color and sample that to get a solid color.
4060
4061         * css/CSSStyleSelector.cpp:
4062         (WebCore::):
4063         (WebCore::colorForCSSValue):
4064         * rendering/RenderTheme.cpp:
4065         (WebCore::RenderTheme::systemColor):
4066         * rendering/RenderTheme.h:
4067         * rendering/RenderThemeMac.h:
4068         * rendering/RenderThemeMac.mm:
4069         (WebCore::getSystemColor):
4070         (WebCore::RenderThemeMac::platformColorsDidChange):
4071         (WebCore::RenderThemeMac::systemColor):
4072
4073 2007-12-16  Dan Bernstein  <mitz@apple.com>
4074
4075         Reviewed by Darin Adler.
4076
4077         - fix http://bugs.webkit.org/show_bug.cgi?id=16426
4078           Divs with overflow:auto: scrollbars not correctly updated when contents change
4079
4080         Test: fast/overflow/scrollbar-position-update.html
4081
4082         * platform/mac/PlatformScrollBarMac.mm:
4083         (WebCore::PlatformScrollbar::updateThumbProportion): Update the
4084         NSScroller's value for the new proportions.
4085         * rendering/RenderLayer.cpp:
4086         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
4087         repaint(). Scrollbars repaint themselves as needed.
4088
4089 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
4090
4091         Reviewed by Darin.
4092
4093         http://bugs.webkit.org/show_bug.cgi?id=14140
4094         <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
4095
4096         * dom/KeyboardEvent.h:
4097         (WebCore::KeypressCommand::KeypressCommand):
4098         (WebCore::KeyboardEvent::keypressCommands):
4099         Change stored command class to preserve complete information about commands.
4100
4101         * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
4102         command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
4103         as a command.
4104
4105         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
4106         a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
4107
4108 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
4109
4110         Reviewed by Darin.
4111
4112         http://bugs.webkit.org/show_bug.cgi?id=16462
4113         REGRESSION: access keys broken on Windows
4114
4115         * page/EventHandler.cpp:
4116         (WebCore::EventHandler::handleAccessKey):
4117         (WebCore::EventHandler::keyEvent):
4118         * page/EventHandler.h:
4119         Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
4120
4121 2007-12-16  Xan Lopez  <xan@gnome.org>
4122
4123         Reviewed by Alexey Proskuryakov.
4124
4125         http://bugs.webkit.org/show_bug.cgi?id=16454
4126         [GTK] Text input doesn't work consistently on PPC
4127
4128         * platform/gtk/KeyEventGtk.cpp:
4129         (WebCore::singleCharacterString):
4130
4131         UChar is 2 bytes (UTF-16), so transform accordingly from
4132         gunichar (UCS-4). Fixes keyboard input on big endian systems.
4133
4134 2007-12-15  Darin Adler  <darin@apple.com>
4135
4136         Reviewed by Mark Rowe.
4137
4138         - better build fix for the problem affecting GTK and some other platforms
4139           "this time for sure"
4140
4141         * WebCore.xcodeproj/project.pbxproj:
4142         * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
4143         * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
4144         which won't work, declare the tables that are in the .lut.h file in the header.
4145
4146 2007-12-12  Kevin Watters  <kevin@dotsyntax.com>
4147
4148         Reviewed by Darin Adler.
4149
4150         Fixed the Wx port's FontPlatformData for use in HashTable.
4151         - FontPlatformData(Deleted) made unequal to FontPlatformData()
4152
4153         * platform/graphics/wx/FontPlatformData
4154
4155 2007-12-15  Dan Bernstein  <mitz@apple.com>
4156
4157         Reviewed by Darin Adler.
4158
4159         - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
4160
4161         * platform/graphics/win/FontCacheWin.cpp:
4162         (WebCore::metaFileEnumProc): Added. Called during metafile record
4163         enumeration and extracts the font from the create font record.
4164         (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
4165         let Uniscribe draw the characters and see what font it chooses.
4166
4167 2007-12-15  Darin Adler  <darin@apple.com>
4168
4169         * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
4170
4171 2007-12-15  Darin Adler  <darin@apple.com>
4172
4173         Another try at a GTK build fix.
4174
4175         * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
4176
4177 2007-12-15  Sam Weinig  <sam@webkit.org>
4178
4179         Force windows to regenerate COM DOM bindings.
4180
4181         * WebCore.vcproj/build-generated-files.sh: Add license. 
4182         * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
4183
4184 2007-12-15  Sam Weinig  <sam@webkit.org>
4185
4186         Fix Windows and wx builds.
4187
4188         * WebCore.vcproj/WebCore.vcproj:
4189         * WebCoreSources.bkl:
4190
4191 2007-12-15  Mark Rowe  <mrowe@apple.com>
4192
4193         Gtk build fix.  Add JSEventTargetBase.cpp to SOURCES.
4194
4195         * WebCore.pro:
4196
4197 2007-12-15  Sam Weinig  <sam@webkit.org>
4198
4199         Fix wx build.
4200
4201         * WebCoreSources.bkl:
4202
4203 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
4204
4205         Not reviewed. Build fix for Qt/Gtk.
4206
4207         * WebCore.pro: Include JSEventTargetBase.lut.h in generation
4208
4209 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
4210
4211         Reviewed by Eric.
4212
4213         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
4214
4215         Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
4216         in the base class. Applied the same refactorization to EventTargetNode.
4217
4218         This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
4219         to share as much code as possible with the EventTargetNode classes.
4220
4221         * DerivedSources.make:
4222         * WebCore.xcodeproj/project.pbxproj:
4223         * bindings/js/JSEventTargetBase.cpp: Added.
4224         (WebCore::retrieveEventTargetAndCorrespondingNode):
4225         (WebCore::eventNameForPropertyToken):
4226         * bindings/js/JSEventTargetBase.h: Added.
4227         (WebCore::JSEventTargetProperties::):
4228         (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
4229         (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
4230         (WebCore::):