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