66d40850b8a6f0f6ee924d814df4278b481f5a96
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
2
3         Reviewed by George Staikos.
4
5         Fix ambiguous else cases by adding braces to nested if()s with elses.
6
7         * loader/MainResourceLoader.cpp:
8         (WebCore::MainResourceLoader::continueAfterContentPolicy):
9         * page/EventHandler.cpp:
10         (WebCore::EventHandler::updateDragAndDrop):
11         * rendering/RenderListMarker.cpp:
12         (WebCore::toArmenianUnder10000):
13         * rendering/TextControlInnerElements.cpp:
14         (WebCore::TextControlInnerTextElement::defaultEventHandler):
15
16 2009-03-24  Eli Fidler  <eli.fidler@torchmobile.com>
17
18         Reviewed by George Staikos.
19
20         Move variable into proper platform block to quiet warning.
21
22         * html/CanvasRenderingContext2D.cpp:
23         (WebCore::CanvasRenderingContext2D::drawTextInternal):
24
25 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
26
27         Reviewed by Antti Koivisto.
28
29         Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
30
31         *  WebCore/html/HTMLMediaElement.cpp:
32         (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
33         network state of NETWORK_NO_SOURCE.
34
35         *  WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
36         (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since
37         some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK
38         corresponds to HaveFutureData, not HaveEnoughData.
39
40 2009-03-24  Adele Peterson  <adele@apple.com>
41
42         Reviewed by Darin Adler.
43
44         Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
45         <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
46
47         * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
48         After breaking out of an empty mail blockquote, we still want continue with the deletion
49         so actual content will get deleted, and not just the quote style.
50
51 2009-03-24  Darin Adler  <darin@apple.com>
52
53         Reviewed by Brady Eidson.
54
55         <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
56
57         * loader/archive/cf/LegacyWebArchive.cpp:
58         (WebCore::LegacyWebArchive::create): Added a null check.
59
60 2009-03-24  Adam Langley  <agl@google.com>
61
62         Reviewed by Darin Fisher.
63
64         https://bugs.webkit.org/show_bug.cgi?id=24685
65
66         The Skia drawLine function takes subpixel values and attempts to draw
67         a line with subpixel precision. This is complex and slow for drawing
68         scrollbars which use only vertical and horizontal lines.
69
70         This changes the Chromium Linux scrollbar code to use drawIRect.
71
72         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
73         (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
74         (WebCore::drawVertLine):
75         (WebCore::drawHorizLine):
76         (WebCore::drawBox):
77         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
78         (WebCore::ScrollbarThemeChromium::paintThumb):
79
80 2009-03-24  David Kilzer  <ddkilzer@apple.com>
81
82         Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
83
84         <https://bugs.webkit.org/show_bug.cgi?id=23310>
85
86         Reviewed by Darin Adler.
87
88         Test: fast/frames/iframe-no-src-set-location.html
89
90         * dom/Document.cpp:
91         (WebCore::Document::completeURL): If m_baseURL is empty or is
92         about:blank and we have a parent document, use the parent
93         document's URL for the base when completing a new URL.
94
95 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
96
97         Reviewed by Dave Hyatt
98         
99         https://bugs.webkit.org/show_bug.cgi?id=24659
100         
101         When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect
102         into the coordinate space of the layer, and doing so can result in pathalogical quads
103         that break hit testing. In that case, simply use the same bounds as used for painting,
104         which are the composited bounds for this layer.
105
106         Test: transforms/3d/hit-testing/rotated-hit-test.html
107
108         * rendering/RenderLayer.cpp:
109         (WebCore::RenderLayer::hitTestLayer):
110
111 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
112
113         Reviewed by Dave Hyatt
114
115         https://bugs.webkit.org/show_bug.cgi?id=24436
116         
117         When compositing is enabled, painting and hit testing end up using different
118         clipping roots, because, for painting, every composited layer is a clipping root,
119         but for hit testing only layers with transforms are. To fix this, we use
120         temporary clip rects for hit testing, if the page is in compositing mode.
121
122         * rendering/RenderLayer.cpp:
123         (WebCore::RenderLayer::paintLayer):
124         (WebCore::RenderLayer::hitTestLayer):
125         (WebCore::RenderLayer::parentClipRects):
126         (WebCore::RenderLayer::calculateRects):
127         * rendering/RenderLayer.h:
128
129 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
130
131         Reviewed by Dan Bernstein
132         
133         https://bugs.webkit.org/show_bug.cgi?id=24782
134
135         Fix regression with CSS clip rects with non-length values, by reverting to
136         the original code, but passing the zoom multiplier through convertToLength().
137         
138         Also make stylistic change in createTransformOperations(), renaming 'inStyle'
139         to 'style.
140         
141         Tested by existing tests.
142
143         * css/CSSStyleSelector.cpp:
144         (WebCore::convertToLength):
145         (WebCore::CSSStyleSelector::applyProperty):
146         (WebCore::CSSStyleSelector::createTransformOperations):
147
148 2009-03-24  David Hyatt  <hyatt@apple.com>
149
150         Reviewed by Simon Fraser
151
152         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
153         to a border-radius.
154
155         This patch makes non-self-painting overflow layers and control clips work with border-radius.  RenderLayers
156         that should be clipped by overflow ancestors with border-radius are still broken.
157
158         Added fast/clip/overflow-border-radius-clip.html
159
160         * rendering/RenderBox.cpp:
161         (WebCore::RenderBox::pushContentsClip):
162
163 2009-03-24  David Hyatt  <hyatt@apple.com>
164
165         Reviewed by Simon Fraser
166
167         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
168         
169         This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements.  Common
170         replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be
171         done).
172     
173         Added fast/replaced/border-radius-clip.html
174
175         * css/html4.css:
176         * rendering/RenderReplaced.cpp:
177         (WebCore::RenderReplaced::paint):
178         * rendering/RenderWidget.cpp:
179         (WebCore::RenderWidget::paint):
180
181 2009-03-24  Adele Peterson  <adele@apple.com>
182
183         RS by Mark Rowe.
184
185         Only build these Mail quirks checks in on the Mac.
186
187         * dom/Document.cpp: (WebCore::disableRangeMutation):
188         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
189
190 2009-03-24  Brent Fulgham  <bfulgham@webkit.org>
191
192         Build fix, no review.
193
194         Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
195         and Debug targets.
196
197         * WebCore.vcproj/WebCore.vcproj:
198
199 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
200
201         Fix layout tests broken by r41907.
202
203         * html/HTMLMediaElement.cpp:
204         (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
205
206 2009-03-24  Dmitry Titov  <dimich@chromium.org>
207
208         Reviewed by Dimitri Glazkov.
209
210         https://bugs.webkit.org/show_bug.cgi?id=24689
211         Fix Chromium compilation errors.
212
213         * bindings/v8/WorkerContextExecutionProxy.cpp:
214         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
215         (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
216
217 2009-03-24  Yury Semikhatsky  <yurys@chromium.org>
218
219         Reviewed by Darin Adler.
220
221         https://bugs.webkit.org/show_bug.cgi?id=24759
222         Add missing methods Element.prototype.removeMatchingStyleClasses and
223         Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content
224         iframe. These methods are called by Element.prototype.removeStyleClass and
225         Node.prototype.enclosingNodeOrSelfWithNodeName.
226
227         * inspector/front-end/SourceFrame.js:
228         (WebInspector.SourceFrame.prototype._loaded):
229
230 2009-03-24  Mark Mentovai  <mark@chromium.org>
231
232         Reviewed by Mark Rowe.
233
234         https://bugs.webkit.org/show_bug.cgi?id=24653
235         WebKit should be buildable without prefix header injection.
236         Adds missing #includes and forward declarations as needed.
237
238         * editing/SmartReplaceCF.cpp:
239         * platform/graphics/mac/ColorMac.mm:
240         * platform/graphics/mac/FontCacheMac.mm:
241         * platform/graphics/mac/FontCustomPlatformData.h:
242         * platform/graphics/mac/FontMac.mm:
243         * platform/graphics/mac/FontMacATSUI.mm:
244         * platform/graphics/mac/FontPlatformData.h:
245         * platform/graphics/mac/FontPlatformDataMac.mm:
246         * platform/graphics/mac/GraphicsContextMac.mm:
247         * platform/graphics/mac/SimpleFontDataMac.mm:
248         * platform/mac/FoundationExtras.h:
249         * platform/mac/LocalCurrentGraphicsContext.h:
250         * platform/mac/WebCoreSystemInterface.h:
251         * platform/mac/WebCoreSystemInterface.mm:
252         * platform/mac/WebCoreTextRenderer.h:
253         * platform/mac/WebCoreTextRenderer.mm:
254         * platform/mac/WebFontCache.h:
255         * platform/mac/WebFontCache.mm:
256         * platform/text/PlatformString.h:
257         * platform/text/mac/ShapeArabic.c:
258         * platform/text/mac/StringMac.mm:
259         * rendering/RenderThemeChromiumMac.h:
260
261 2009-03-24  Dan Bernstein  <mitz@apple.com>
262
263         Reviewed by Darin Adler.
264
265         - fix <rdar://problem/6107874> by capping the nesting depth of
266           "block-level" elements generated by the parser
267
268         Test: fast/parser/block-nesting-cap.html
269
270         * html/HTMLParser.cpp:
271         (WebCore::HTMLParser::HTMLParser):
272         (WebCore::HTMLParser::insertNode):
273         (WebCore::HTMLParser::pushBlock):
274         (WebCore::HTMLParser::popOneBlockCommon):
275         (WebCore::HTMLParser::freeBlock):
276         * html/HTMLParser.h:
277
278 2009-03-23  Greg Bolsinga  <bolsinga@apple.com>
279
280         Reviewed by David Kilzer.
281
282         https://bugs.webkit.org/show_bug.cgi?id=24771
283         
284         DOMTimeStamps are based upon 1970.
285
286         * platform/mac/GeolocationServiceMac.mm:
287         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
288
289 2009-03-23  Eric Seidel  <eric@webkit.org>
290
291         Build fix, no review.
292
293         * rendering/RenderObject.cpp:
294         (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
295
296 2009-03-23  Eric Seidel  <eric@webkit.org>
297
298         Reviewed by Darin Adler.
299
300         Rename Position::container to m_anchorNode and make it private
301         https://bugs.webkit.org/show_bug.cgi?id=24760
302
303         More code cleanup for Position.
304
305         Change all uses of m_container to node()
306         Eventually most uses of node() should change to anchorNode() to designate
307         that it's the node the Position is anchored to, but not necessarily the
308         container of the position (it could be the before/after neighbor).
309
310         Remove any code which sets m_container, and change it to use a new
311         Position::moveToPosition function which takes a node and offset.
312         It never makes sense to change the node and leave the offset.
313
314         * dom/Position.h:
315         (WebCore::Position::Position):
316         (WebCore::Position::clear):
317         (WebCore::Position::anchorNode):
318         (WebCore::Position::node):
319         (WebCore::Position::moveToPosition):
320         (WebCore::Position::moveToOffset):
321         (WebCore::Position::isNull):
322         (WebCore::Position::isNotNull):
323         (WebCore::operator==):
324         * dom/Range.cpp:
325         (WebCore::Range::create):
326         (WebCore::Range::compareBoundaryPoints):
327         * dom/RangeBoundaryPoint.h:
328         (WebCore::RangeBoundaryPoint::container):
329         (WebCore::RangeBoundaryPoint::set):
330         (WebCore::RangeBoundaryPoint::setOffset):
331         (WebCore::RangeBoundaryPoint::setToChild):
332         (WebCore::RangeBoundaryPoint::setToStart):
333         (WebCore::RangeBoundaryPoint::setToEnd):
334
335 2009-03-17  Eric Seidel  <eric@webkit.org>
336
337         Reviewed by David Hyatt.
338
339         document.write() should be able to make a document strict mode
340         https://bugs.webkit.org/show_bug.cgi?id=24336
341
342         Remove an implicit write of "<html>" on the first document.write call
343         this was added as part of a KDE import http://trac.webkit.org/changeset/798
344         with no layout test or explanation.  I can't think of any reason why
345         an implicit <html> write is necessary (or correct), so I'm removing it and
346         adding a test for the correct behavior.  The parser will add any necessary
347         HTMLHTMLElements during the write() anyway.
348
349         Our behavior is now tested by fast/dom/Document/document-write-doctype
350         and matches IE, FF fails this new test.  Mozilla bug filed:
351         https://bugzilla.mozilla.org/show_bug.cgi?id=483908
352
353         * dom/Document.cpp:
354         (WebCore::Document::write):
355
356 2009-03-23  Sam Weinig  <sam@webkit.org>
357
358         Reviewed by Dan Bernstein.
359
360         Fix for <rdar://problem/6140966>
361         Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
362
363         * WebCore.base.exp:
364         * WebCore.xcodeproj/project.pbxproj:
365         * loader/CrossOriginPreflightResultCache.cpp:
366         (WebCore::CrossOriginPreflightResultCache::empty):
367         * loader/CrossOriginPreflightResultCache.h:
368
369 2009-03-23  Darin Adler  <darin@apple.com>
370
371         Reviewed by Adele Peterson.
372
373         Bug 24726: hit testing doesn't work right when the click is on anonymous content
374         https://bugs.webkit.org/show_bug.cgi?id=24726
375         rdar://problem/6696992
376
377         Test: editing/selection/hit-test-anonymous.html
378
379         * rendering/RenderBR.cpp:
380         (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
381         creating a VisiblePosition directly. It will handle finding non-anonymous
382         content nearby if node() is 0.
383         * rendering/RenderBlock.cpp:
384         (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
385         (WebCore::positionForPointWithInlineChildren): Ditto.
386         (WebCore::RenderBlock::positionForPoint): Ditto.
387         * rendering/RenderBox.cpp:
388         (WebCore::RenderBox::positionForPoint): Ditto.
389         * rendering/RenderObject.cpp:
390         (WebCore::RenderObject::positionForPoint): Ditto.
391         (WebCore::RenderObject::createVisiblePosition): Added.
392         * rendering/RenderObject.h: Added createVisiblePosition.
393         * rendering/RenderReplaced.cpp:
394         (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
395         * rendering/RenderSVGInlineText.cpp:
396         (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
397         * rendering/RenderText.cpp:
398         (WebCore::RenderText::positionForPoint): Ditto.
399
400 2009-03-23  Adele Peterson  <adele@apple.com>
401
402         Reviewed by Darin Adler & Dave Hyatt.
403
404         Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
405
406         Leopard Mail doesn't expect <style> to be in the body.  This change reverts back to the old behavior of
407         moving <style> to <head> for that version of Mail.
408
409         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
410
411 2009-03-23  Adele Peterson  <adele@apple.com>
412
413         Reviewed by Mark Rowe & Dave Hyatt.
414
415         Merge some of the individual Mail quirks into two settings that we can check for future quirks.
416
417         * WebCore.base.exp:
418         * dom/Document.cpp:
419         (WebCore::disableRangeMutation):
420         (WebCore::Document::nodeChildrenChanged):
421         (WebCore::Document::nodeWillBeRemoved):
422         (WebCore::Document::textInserted):
423         (WebCore::Document::textRemoved):
424         (WebCore::Document::textNodesMerged):
425         (WebCore::Document::textNodeSplit):
426         * page/Settings.cpp:
427         (WebCore::Settings::Settings):
428         (WebCore::Settings::setNeedsLeopardMailQuirks):
429         (WebCore::Settings::setNeedsTigerMailQuirks):
430         * page/Settings.h:
431         (WebCore::Settings::needsLeopardMailQuirks):
432         (WebCore::Settings::needsTigerMailQuirks):
433
434 2009-03-23  Ada Chan  <adachan@apple.com>
435
436         https://bugs.webkit.org/show_bug.cgi?id=24762
437         Support text-indent in <option> elements on windows platform.
438
439         Reviewed by Adele Peterson.
440
441         * css/themeWin.css:
442         * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now.  Make this
443         explicit via windows themed default stylesheet.
444         (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
445         (WebCore::PopupMenuStyle::textIndent):
446         (WebCore::PopupMenuStyle::textDirection):
447         * platform/win/PopupMenuWin.cpp:
448         (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and 
449         text-indent is specified with LTR direction.
450         * rendering/RenderMenuList.cpp:
451         (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
452         (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
453         (WebCore::RenderMenuList::menuStyle): Ditto.
454         * rendering/RenderTextControlSingleLine.cpp:
455         (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
456         * rendering/RenderTheme.h:
457         (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added.  Default is false since we are only supporting it in windows for now.
458         * rendering/RenderThemeWin.h:
459         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.
460
461 2009-03-23  Sam Weinig  <sam@webkit.org>
462
463         Reviewed by Anders Carlsson.
464
465         Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
466         REGRESSION: Java Applets broken
467         <rdar://problem/6707494>
468
469         Fix loading Java applets without a codeBase. Only pass the base (up to the
470         the last path component) of the baseURL to the plug-in.
471
472         * html/HTMLAppletElement.cpp:
473         (WebCore::HTMLAppletElement::createRenderer):
474         * platform/KURL.cpp:
475         (WebCore::KURL::baseAsString):
476         * platform/KURL.h:
477
478 2009-03-23  Darin Adler  <darin@apple.com>
479
480         Reviewed by Sam Weinig.
481
482         * platform/KURL.h: Removed now-incorrect comments.
483         None of the parts include the separator characters any more, now that
484         query doesn't include the "?", so the comments explaining which do and do
485         not are no-longer helpful.
486
487 2009-03-23  David Levin  <levin@chromium.org>
488
489         Reviewed by Dimitri Glazkov.
490
491         https://bugs.webkit.org/show_bug.cgi?id=24764
492
493         Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
494         class names.  Also fixed some headers that got mangled in search/replace
495         operations.
496
497         No change in behavior, so no test.
498
499         * bindings/v8/V8NodeFilter.h: Removed.
500         * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
501         * bindings/v8/V8NodeFilterCondition.h: Added.
502         * bindings/v8/custom/V8ClipboardCustom.cpp:
503         * bindings/v8/custom/V8DocumentCustom.cpp:
504         * bindings/v8/custom/V8ElementCustom.cpp:
505         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
506         * bindings/v8/custom/V8NavigatorCustom.cpp:
507
508 2009-03-23  Darin Fisher  <darin@chromium.org>
509
510         Reviewed by Antti Koivisto.
511
512         https://bugs.webkit.org/show_bug.cgi?id=24741
513
514         Adds a unique across-browser-sessions identifier to FormData, which may
515         be used by ResourceHandle as a secondary cache key to enable cached
516         form submissions.
517
518         At issue: two otherwise identical form submissions may result in
519         completely independent responses, which may each be appropriate to
520         store and reuse from cache.
521
522         * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
523         we only enable cached form submissions for those generated by HTML.  This
524         way we do not bother with POSTs generated by XMLHttpRequest.
525         (WebCore::generateFormDataIdentifier):
526         (WebCore::HTMLFormElement::createFormData):
527         * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
528         the unspecified identifier.  So by default there is no identifier and
529         nothing changes.
530         (WebCore::FormData::FormData):
531         * platform/network/FormData.h: Added m_identifier with setter and getter.
532         (WebCore::FormData::setIdentifier):
533         (WebCore::FormData::identifier):
534
535 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
536
537         Reviewed by Antti Koivisto
538         
539         https://bugs.webkit.org/show_bug.cgi?id=24733
540         
541         Fix media controller with full-page zoom. Previously, the media controller
542         shadow nodes never saw style changes on the RenderMedia, so did not respond
543         to zooming at all. Now, we update the style on the shadow renderers
544         whenever RenderMedia gets a style change. Also fix the video thumb in
545         the theme to be scaled properly.
546
547         Test: media/video-controls-zoomed.html
548
549         * rendering/MediaControlElements.cpp:
550         (WebCore::MediaControlShadowRootElement::updateStyle):
551         (WebCore::MediaTextDisplayElement::MediaTextDisplayElement):
552         (WebCore::MediaTextDisplayElement::updateStyle):
553         (WebCore::MediaControlInputElement::MediaControlInputElement):
554         (WebCore::MediaControlInputElement::updateStyle):
555         * rendering/MediaControlElements.h:
556         * rendering/RenderMedia.cpp:
557         (WebCore::RenderMedia::styleDidChange):
558         * rendering/RenderMedia.h:
559         * rendering/RenderThemeMac.mm:
560         (WebCore::RenderThemeMac::adjustSliderThumbSize):
561
562 2009-03-23  Mike Belshe  <mike@belshe.com>
563
564         Reviewed by Darin Adler.
565
566         https://bugs.webkit.org/show_bug.cgi?id=24739
567
568         Rework StringImpl::create methods to try to allocate a single buffer
569         rather than allocating both the StringImpl class and a separate data
570         buffer.
571
572         * platform/text/StringImpl.cpp:
573         * platform/text/StringImpl.h:
574
575 2009-03-23  Darin Adler  <darin@apple.com>
576
577         Reviewed by Antti Koivisto.
578
579         Based on a patch by Nico Weber <nicolasweber@gmx.de>
580
581         Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
582         https://bugs.webkit.org/show_bug.cgi?id=24755
583
584         * platform/text/TextEncoding.cpp:
585         (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding
586         is UTF7 without loading extended codecs.
587         (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead
588         of comparing with UTF7Encoding(). Eliminate the explicit check of
589         noExtendedTextEncodingNameUsed() because that's now handled by the functions
590         that this function calls instead.
591
592         * platform/text/TextEncoding.h: Added isUTF7Encoding function.
593         Also tweaked formatting a bit.
594
595 2009-03-20  Peter Kasting  <pkasting@google.com>
596
597         Reviewed by Darin Fisher.
598
599         https://bugs.webkit.org/show_bug.cgi?id=24720
600         RenderThemeChromium should draw something for Slider parts instead of
601         dropping them on the floor.
602
603         * platform/chromium/ChromiumBridge.h:
604         * rendering/RenderThemeChromiumWin.cpp:
605         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
606         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
607         (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
608         (WebCore::RenderThemeChromiumWin::getThemeData):
609         * rendering/RenderThemeChromiumWin.h:
610         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
611
612 2009-03-23  Glen Murphy  <glen@chromium.org>
613
614         Reviewed by Darin Fisher.
615
616         https://bugs.webkit.org/show_bug.cgi?id=24657
617
618         Fix Skia drawing of highly scaled bitmaps; the conversion to
619         IntRect produced visible layout test failures in highly scaled 
620         coordinate systems.
621
622         Test: svg/custom/image-small-width-height.svg
623
624         * WebCore\platform\graphics\skia\ImageSkia.cpp:
625
626 2009-03-23  David Kilzer  <ddkilzer@apple.com>
627
628         Provide JavaScript exception information after slow script timeout
629
630         Reviewed by Oliver Hunt.
631
632         * bindings/js/ScriptController.cpp:
633         (WebCore::ScriptController::evaluate): Changed to report
634         exceptions for the Interrupted completion type as well.
635
636 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
637
638         Reviewed by Darin Adler
639
640         https://bugs.webkit.org/show_bug.cgi?id=24736
641         
642         Fix three mostly-unrelated problems with full-page zoom:
643         
644         * dom/Document.cpp:
645         (WebCore::Document::elementFromPoint):
646         Document::elementFromPoint() needs to take full-page zoom into account.
647         
648         * dom/MouseRelatedEvent.cpp:
649         (WebCore::MouseRelatedEvent::receivedTarget):
650         Take full-page zoom into account when computing offsetX/offsetY.
651         
652         * html/HTMLSelectElement.cpp:
653         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
654         Don't use offsetX/offsetY when hit testing list boxes; offsets were broken
655         with full-page zoom, and using pageX/pageY is easier because we don't
656         have to worry about the event target, and we already have a point in
657         absolute coordinates.
658
659         Tests: fast/forms/listbox-hit-test-zoomed.html
660                fast/forms/search-zoomed.html
661                fast/forms/slider-zoomed.html
662
663 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
664
665         Reviewed by Dan Bernstein
666
667         https://bugs.webkit.org/show_bug.cgi?id=24753
668         
669         The rect for CSS 'clip' needs to have zooming applied to it.
670
671         Test: fast/css/clip-zooming.html
672
673         * css/CSSStyleSelector.cpp:
674         (WebCore::CSSStyleSelector::applyProperty):
675
676 2009-03-23  Eric Carlson  <eric.carlson@apple.com>
677
678         Reviewed by Adam Roben.
679
680         <rdar://problem/6704282>
681         https://bugs.webkit.org/show_bug.cgi?id=24719
682         QTMovieWinTimer logic inversion
683
684         Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always
685         use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of
686         this was that a movie timer would sometimes be blocked for significant amounts of time 
687         because WM_TIMER messages are not processed when the thread's message queue has any
688         higher priority messages, and WebCore/Win's timer uses PostMessage for low interval
689         timers. Also change SetTimer call to use HWND and custom message instead of 
690         timer function since the timer already has an HWND for processing PostMessage.
691
692         Not possible to make a test for this because it is so timing dependant.
693
694         * platform/graphics/win/QTMovieWinTimer.cpp:
695         (TimerWindowWndProc):
696         (setSharedTimerFireDelay):
697
698 2009-03-23  Eric Carlson  <eric.carlson@apple.com>
699
700         Reviewed by Adele Peterson.
701
702         https://bugs.webkit.org/show_bug.cgi?id=24588
703         
704         Update media element implementation to current HTML5 spec
705
706         New tests: 
707                media/media-constants.html
708                media/video-seek-no-src-exception.html
709                media/video-source-add-src.html
710                media/video-src-invalid-remove.html
711                media/video-src-plus-source.html
712                media/video-timeupdate-during-playback.html
713
714         * dom/EventNames.h: Remove obsolute events, add new ones.
715         * html/HTMLMediaElement.cpp:
716         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars.
717         (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't
718         have a source.
719         (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes.
720         (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and 
721         add it to the event queue to be dispatch when the timer fires.
722         (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add
723         it to the event queue to be dispatch when the timer fires.
724         (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the 
725         asynch event timer.
726         (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events.
727         (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or
728         try to load the next <source> url.
729         (WebCore::HTMLMediaElement::load): Minor style change.
730         (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup
731         the current load (if any) and set up state for a new load.
732         (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart'
733         event, and initiate load from 'src' if present.
734         (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger
735         noneSupported() if no more to consider.
736         (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url.
737         (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer.
738         (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid 
739         media url was found.
740         (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid 
741         media engine failed with a decode error or a network error.
742         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
743         (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states.
744         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
745         (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state.
746         (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active.
747         (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or
748         if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag
749         we use to guard against sending 'ended' more than once.
750         (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata.
751         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an
752         invalid rate. 
753         (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an
754         invalid rate. Cache rate being set so we can use it later if media engine isn't ready now.
755         (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just
756         starts loading asynchronously.
757         (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing'
758         event depending on current state.
759         (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just
760         starts loading asynchronously.
761         (WebCore::HTMLMediaElement::pauseInternal): Remove exception param.
762         (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent
763         (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent
764         (WebCore::HTMLMediaElement::togglePlayState): Remove exception param.
765         (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param.
766         (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per
767         second when the movie is playing to timeupdate so we can post 'timeupdate' events.
768         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc.
769         (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate'
770         event because we both fire them them when the spec says we should and when the media engine
771         says that time has jumped, but we don't want to fire more than one at a given movie time. We also
772         use this bottleneck to keep track of the last time one was posted so we won't fire too often
773         during playback.
774         (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata.
775         (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source>
776         element with a 'src' attribute that we have not tried to load yet.
777         (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next
778         <source> element that we haven't tried to load.
779         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes.
780         Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since
781         some media engines call this proc more than once when playback reaches the end and stops, but we
782         don't want to post 'ended' more than once.
783         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform
784         when the movie duration changes and we can post 'durationchanged' event.
785         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when
786         the rate changed and we can updated our cached rate. This is useful because we only want to know
787         post periodic 'timeupdate' events when the movie is actually playing, and because we want to know
788         the actual playback rate when it differs from what we tried to set.
789         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when
790         a movie's intrinsic size changes and we can inform the renderer.
791         (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now
792         uses "actively playing" for this concept. Update logic for new state names and un-comment calls
793         to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons
794         are part of the answer.
795         (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names. 
796         (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of
797         the determination of "potentially playing".
798         (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user
799         agent supports this spec concept.
800         (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate' 
801         events when we pauses the movie. Set the media engine rate before calling play() in case it
802         wasn't set up when the rate was changed.
803         (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate'
804         event timers.
805         (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive
806         and updated for the current spec.
807         (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad.
808         (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments.
809         (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the 
810         initial url.
811         * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
812         update for changes in .cpp.
813         (WebCore::HTMLMediaElement::):
814
815         * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
816         defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.
817
818         * html/HTMLSourceElement.cpp:
819         (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.
820
821         * html/HTMLVideoElement.cpp:
822         (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.
823
824         * html/MediaError.h:
825         (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.
826
827         * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.
828
829         * loader/MediaDocument.cpp:
830         (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.
831
832         * platform/graphics/MediaPlayer.cpp:
833         (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes.
834         (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes.
835         (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes.
836         (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes.
837         * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec
838         states.
839         (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
840         (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
841         (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
842         (WebCore::MediaPlayer::):
843
844         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
845         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
846         (WebCore::MediaPlayerPrivate::load): Ditto.
847         (WebCore::MediaPlayerPrivate::updateStates): Ditto.
848         (WebCore::MediaPlayerPrivate::loadingFailed): Ditto.
849
850         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes.
851         Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration.
852         (WebCore::MediaPlayerPrivate::metaDataAvailable):
853         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
854         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize
855         m_enabledTrackCount and m_duration. Update for network/ready state name changes.
856         (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes.
857         (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
858         (WebCore::MediaPlayerPrivate::pause): Ditto.
859         (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime.
860         (WebCore::MediaPlayerPrivate::seek): Ditto.
861         (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is
862         already zero.
863         (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime.
864         (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return
865         different errors depending on what causes a failure. Watch for and report duration changes.
866         (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes.
867         (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes.
868         (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer.
869         (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes.
870         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported
871         tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure.
872
873         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
874         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
875         (WebCore::MediaPlayerPrivate::load): Ditto.
876         (WebCore::MediaPlayerPrivate::duration): Ditto.
877         (WebCore::MediaPlayerPrivate::updateStates): Ditto.
878         (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
879
880         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
881         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for 
882         network/ready state name changes.
883         (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more
884         m_endPointTimer.
885         (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
886         (WebCore::MediaPlayerPrivate::pause): Ditto. 
887         (WebCore::MediaPlayerPrivate::setEndTime): Ditto.
888         (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes.
889         (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer.
890         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
891
892         * rendering/MediaControlElements.cpp:
893         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state 
894         name changes.
895         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
896
897 2009-03-22  Kevin Ollivier  <kevino@theolliviers.com>
898
899         wxGTK build fix. Add missing header.
900
901         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
902
903 2009-03-22  Simon Fraser  <simon.fraser@apple.com>
904
905         Reviewed by Dan Bernstein
906         
907         https://bugs.webkit.org/show_bug.cgi?id=24665
908         
909         Image-map code in RenderImage could result in RenderImage::nodeAtPoint()
910         setting HitTestResult::innerNode(), but returning false, which violates
911         hit testing rules. Use a temporary HitTestResult so that we only fill in
912         result when we know we've hit.
913
914         * rendering/RenderImage.cpp:
915         (WebCore::RenderImage::nodeAtPoint):
916
917 2009-03-22  Simon Fraser  <simon.fraser@apple.com>
918
919         Reviewed by Dan Bernstein
920         
921         https://bugs.webkit.org/show_bug.cgi?id=24743
922         
923         Fix hit testing regression from r41840. We need to pass the temporary
924         HitTestResult when testing sublayers, then only copy to 'result' when
925         the layer is known to have been hit.
926
927         Test: fast/layers/zindex-hit-test.html
928
929         * rendering/RenderLayer.cpp:
930         (WebCore::RenderLayer::hitTestLayer):
931
932 2009-03-20  Simon Fraser  <simon.fraser@apple.com>
933
934         Reviewed by Darin Adler
935
936         https://bugs.webkit.org/show_bug.cgi?id=24733
937         
938         Fix hit testing on video controls after full page zoom by fixing wider issue
939         with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be
940         invariant under zooming (for JavaScript), so we keep an actual page point around
941         in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere.
942
943         * dom/MouseRelatedEvent.cpp:
944         (WebCore::MouseRelatedEvent::initCoordinates):
945         (WebCore::MouseRelatedEvent::computePageLocation):
946         * dom/MouseRelatedEvent.h:
947         (WebCore::MouseRelatedEvent::absoluteLocation):
948         (WebCore::MouseRelatedEvent::setAbsoluteLocation):
949         Member var, and getter and setter for absoluteLocation.
950         New method, computePageLocation(), to compute the actual page point,
951         and call it when creating and initting mouse-related events.
952
953         * dom/Node.cpp:
954         (WebCore::Node::dispatchMouseEvent):
955         (WebCore::Node::dispatchWheelEvent):
956         Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation()
957         on the event to replace a potentially rounded point.
958         
959         * html/HTMLInputElement.cpp:
960         (WebCore::HTMLInputElement::defaultEventHandler):
961         Clean up slider handling code.
962         
963         * html/HTMLSelectElement.cpp:
964         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
965         Add FIXME comment for use of offsetX/offsetY.
966         
967         * page/ContextMenuController.cpp:
968         (WebCore::ContextMenuController::handleContextMenuEvent):
969         Use absoluteLocation() when hit testing for context menus.
970         
971         * rendering/RenderFrameSet.cpp:
972         (WebCore::RenderFrameSet::userResize):
973         Use absoluteLocation() when resizing frames.
974         
975         * rendering/RenderMedia.cpp:
976         (WebCore::RenderMedia::forwardEvent):
977         Use absoluteLocation() when hit testing media controls.
978
979         * rendering/RenderSlider.cpp:
980         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
981         (WebCore::RenderSlider::mouseEventIsInThumb):
982         Use absoluteLocation() when handling slider events.
983
984         (WebCore::RenderSlider::forwardEvent):
985         Factor some code out of HTMLInputElement::defaultEventHandler().
986         
987         * rendering/RenderTextControlSingleLine.cpp:
988         (WebCore::RenderTextControlSingleLine::forwardEvent):
989         Use absoluteLocation() when hit testing search field buttons, which fixees
990         bugs in the search field with zooming.
991
992 2009-03-21  David Levin  <levin@chromium.org>
993
994         Reviewed by Dimitri Glazkov.
995
996         https://bugs.webkit.org/show_bug.cgi?id=24727
997         Add V8XMLHttpRequest*.
998
999         * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added.
1000         * bindings/v8/V8XMLHttpRequestUtilities.h: Added.
1001         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added.
1002         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added.
1003         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added.
1004
1005 2009-03-21  David Levin  <levin@chromium.org>
1006
1007         Reviewed by Dimitri Glazkov.
1008
1009         https://bugs.webkit.org/show_bug.cgi?id=24725
1010         Add V8NodeFilter.
1011
1012         * bindings/v8/V8NodeFilter.cpp: Added.
1013         * bindings/v8/V8NodeFilter.h: Added.
1014
1015 2009-03-21  Dan Bernstein  <mitz@apple.com>
1016
1017         Rubber-stamped by Kevin Decker
1018
1019         - remove some redundant #include statements
1020
1021         * bindings/js/JSDOMWindowBase.cpp:
1022
1023 2009-03-20  Dan Bernstein  <mitz@apple.com>
1024
1025         Reviewed by Mark Rowe.
1026
1027         - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code
1028
1029         * platform/graphics/win/FontCGWin.cpp:
1030         (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each
1031         glyph as a separate path, instead of all glyphs as a single path. This
1032         matches what CGContextShowGlyphsWithAdvances() does, and has comparable
1033         performance.
1034
1035 2009-03-20  Dean Jackson  <dino@apple.com>
1036
1037         Reviewed by Simon Fraser
1038
1039         Build fix for ENABLE(3D_RENDERING)
1040
1041         * rendering/RenderObject.h:
1042         (WebCore::makeMatrixRenderable):
1043
1044 2009-03-20  Dave Moore  <davemoore@google.com>
1045
1046         Reviewed by Dimitri Glazkov.
1047
1048         https://bugs.webkit.org/show_bug.cgi?id=24705
1049
1050         A bug in the V8 bindings is preventing chromium from setting the href on the
1051         location object...any attempt throws a security error, not just for javascript
1052         protocol
1053
1054         * page/Location.idl:
1055
1056 2009-03-20  Craig Schlenter  <craig.schlenter@gmail.com>
1057
1058         Reviewed by Dimitri Glazkov.
1059
1060         https://bugs.webkit.org/show_bug.cgi?id=24608
1061
1062         Include stdio.h needed for printf on gcc 4.4.0
1063
1064         * platform/KURLGoogle.cpp:
1065
1066 2009-03-20  Mike Belshe <mike@belshe.com>
1067
1068         Reviewed by Darin Fisher.
1069
1070         https://bugs.webkit.org/show_bug.cgi?id=24577
1071
1072         Don't let comments at the end of an event handler
1073         break the event handler.
1074
1075         No change in behavior, so no test.
1076
1077         * bindings/v8/V8LazyEventListener.cpp:
1078         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
1079
1080 2009-03-20  Norbert Leser  <norbert.leser@nokia.com>
1081
1082         Reviewed by Darin Adler.
1083
1084         https://bugs.webkit.org/show_bug.cgi?id=24535
1085
1086         Fixes missing line terminator character (;) after macro call.
1087         It is common practice to add the trailing ";" where macros are substituted
1088         and not where they are defined with #define.
1089         This change is consistent with other macro declarations across webkit,
1090         and it also solves compilation failure with symbian compilers. 
1091  
1092         No change in behavior, so no test.
1093
1094         * bindings/js/JSDOMWindowShell.cpp:
1095         * bindings/js/JSEventListener.cpp:
1096         * bindings/js/JSImageConstructor.cpp:
1097         * bindings/js/JSInspectedObjectWrapper.cpp:
1098         * bindings/js/JSInspectorCallbackWrapper.cpp:
1099         * bindings/js/JSNamedNodesCollection.cpp:
1100         * bindings/js/JSNodeFilterCondition.cpp:
1101         * bindings/js/JSOptionConstructor.cpp:
1102         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1103         * bindings/js/JSRGBColor.cpp:
1104         * bindings/js/JSWorkerContextBase.cpp:
1105         * bindings/js/JSXMLHttpRequestConstructor.cpp:
1106         * bindings/js/JSXSLTProcessorConstructor.cpp:
1107         * bindings/scripts/CodeGeneratorJS.pm:
1108
1109 2009-03-20  Mike Belshe  <mike@belshe.com>
1110
1111         Reviewed by Dimitri Glazkov and Dave Hyatt.
1112
1113         https://bugs.webkit.org/show_bug.cgi?id=24324
1114
1115         Make the minimum timer configurable for different platforms.
1116
1117         * page/DOMTimer.cpp:
1118         (WebCore::DOMTimer::DOMTimer):
1119         (WebCore::DOMTimer::fired):
1120         * page/DOMTimer.h:
1121         (WebCore::DOMTimer::minTimerInterval):
1122         (WebCore::DOMTimer::setMinTimerInterval):
1123
1124 2009-03-20  Dean McNamee  <deanm@chromium.org>
1125
1126         Reviewed by Darin Adler.
1127
1128         https://bugs.webkit.org/show_bug.cgi?id=22834
1129
1130         Make sure to consistently match new/delete and fastMalloc/fastFree.
1131
1132         * css/CSSSelectorList.cpp:
1133         (WebCore::CSSSelectorList::adoptSelectorVector):
1134         (WebCore::CSSSelectorList::deleteSelectors):
1135
1136 2009-03-20  Dan Bernstein  <mitz@apple.com>
1137
1138         Reviewed by Dave Hyatt.
1139
1140         - fix https://bugs.webkit.org/show_bug.cgi?id=23739
1141           <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load
1142
1143         * rendering/RenderBlock.cpp:
1144         (WebCore::RenderBlock::percentHeightDescendants): Added this accessor.
1145         * rendering/RenderBlock.h:
1146         * rendering/RenderTableSection.cpp:
1147         (WebCore::RenderTableSection::layoutRows): Extended the check for
1148         children that flex to include other descendants with percent height
1149         which is relative to the cell.
1150
1151 2009-03-20  Dmitry Titov  <dimich@chromium.org>
1152
1153         Reviewed by Alexey Proskuryakov.
1154
1155         https://bugs.webkit.org/show_bug.cgi?id=24706
1156         Remove ScriptExecutionContext::encoding() since Workers do not need it.
1157         WorkerContext::encoding() is simply removed, while Document::encoding()
1158         made non-virtual and private. Workers use UTF-8 now except when instructed
1159         otherwise by http header. Also updated test.
1160
1161         * dom/Document.h: Made encoding() non-virtual and private.
1162         * dom/ScriptExecutionContext.h: removed encoding().
1163
1164         * workers/Worker.cpp:
1165         (WebCore::Worker::Worker):
1166         (WebCore::Worker::notifyFinished):
1167         * workers/WorkerContext.cpp: removed encoding() implementation.
1168         (WebCore::WorkerContext::WorkerContext):
1169         (WebCore::WorkerContext::completeURL):
1170         * workers/WorkerContext.h: removed encoding()
1171         (WebCore::WorkerContext::create):
1172         * workers/WorkerContextProxy.h:
1173         * workers/WorkerImportScriptsClient.cpp:
1174         (WebCore::WorkerImportScriptsClient::didReceiveData):
1175         * workers/WorkerMessagingProxy.cpp:
1176         (WebCore::WorkerMessagingProxy::startWorkerContext):
1177         * workers/WorkerMessagingProxy.h:
1178         * workers/WorkerThread.cpp:
1179         (WebCore::WorkerThreadStartupData::create):
1180         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1181         (WebCore::WorkerThread::create):
1182         (WebCore::WorkerThread::WorkerThread):
1183         (WebCore::WorkerThread::workerThread):
1184         * workers/WorkerThread.h:
1185         In all these, removed storing encoding and 'inheriting' it from the parent.
1186         Instead, they are all using UTF-8 now.
1187
1188 2009-03-20  Timothy Hatcher  <timothy@apple.com>
1189
1190         Change how threading exceptions are checked so they are reported
1191         by what round they were added. That way WebKit can decided the
1192         behavior per-round based on linked-on-or-after checks.
1193
1194         <rdar://problem/6626741&6648478&6635474&6674079>
1195
1196         Reviewed by Darin Adler.
1197
1198         * WebCore.base.exp: Export the new symbols.
1199         * bindings/objc/DOMAbstractView.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
1200         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
1201         * platform/ThreadCheck.h:
1202         * platform/mac/ThreadCheck.mm:
1203         (WebCore::readThreadViolationBehaviorFromUserDefaults): Refactor how the default is read.
1204         (WebCore::setDefaultThreadViolationBehavior): Take a round argument.
1205         (WebCore::reportThreadViolation): Ditto.
1206         (WebCoreReportThreadViolation): Ditto.
1207
1208 2009-03-20  Geoffrey Garen  <ggaren@apple.com>
1209
1210         Reviewed by Sam Weinig.
1211
1212         Fixed up an out-of-date comment.
1213
1214         * bindings/js/JSDOMWindowCustom.h:
1215         (WebCore::JSDOMWindow::customPut):
1216
1217 2009-03-20  Beth Dakin  <bdakin@apple.com>
1218
1219         Reviewed by Dave Hyatt.
1220
1221         Fix for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION 
1222         (r35318): A press release at pfizer.com does not display correctly
1223         - and corresponding -
1224         <rdar://problem/6680073>
1225
1226         * rendering/RenderObject.cpp:
1227         (WebCore::RenderObject::invalidateContainerPrefWidths):
1228         * rendering/RenderObject.h:
1229         (WebCore::RenderObject::markContainingBlocksForLayout):
1230
1231 2009-03-20  Eric Seidel  <eric@webkit.org>
1232
1233         Reviewed by Justin Garcia.
1234
1235         maxDeepOffset is confusing and should be removed
1236         https://bugs.webkit.org/show_bug.cgi?id=24586
1237
1238         Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
1239         Add first/lastDeepEditingPositionForNode Position creation functions
1240         and deploy them to places we used to call maxDeepOffset.
1241
1242         Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
1243         Add a new Position::atFirst/atLastEditingPositionForNode() and use these
1244         to replace a few more callers for maxDeepOffset()
1245         
1246         Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
1247
1248         "Editing positions" are confusing because they have one
1249         of two behaviors, depending on if the container node is ignored
1250         by editing (if editingIgnoresContent(node) returns true) or not.
1251         Positions referring to nodes ignored by editing are
1252         neighbor-relative (they are before or after the node) where as
1253         positions reffering to other nodes are container-relative
1254         (they are between two child nodes of the container, identified
1255         by the offset() member).  I will be fixing this confusion in
1256         future patches.  These renames hopefully make the current behavior clearer.
1257
1258         * dom/Position.cpp:
1259         (WebCore::Position::previous):
1260         (WebCore::Position::next):
1261         (WebCore::Position::atFirstEditingPositionForNode):
1262         (WebCore::Position::atLastEditingPositionForNode):
1263         (WebCore::Position::atStartOfTree):
1264         (WebCore::Position::atEndOfTree):
1265         (WebCore::Position::previousCharacterPosition):
1266         (WebCore::Position::nextCharacterPosition):
1267         (WebCore::Position::upstream):
1268         (WebCore::Position::isCandidate):
1269         (WebCore::firstDeepEditingPositionForNode):
1270         (WebCore::lastDeepEditingPositionForNode):
1271         * dom/Position.h:
1272         * dom/PositionIterator.cpp:
1273         (WebCore::PositionIterator::operator Position):
1274         (WebCore::PositionIterator::increment):
1275         (WebCore::PositionIterator::decrement):
1276         (WebCore::PositionIterator::atEnd):
1277         (WebCore::PositionIterator::atEndOfNode):
1278         * editing/CompositeEditCommand.cpp:
1279         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
1280         * editing/DeleteSelectionCommand.cpp:
1281         (WebCore::isTableCellEmpty):
1282         (WebCore::DeleteSelectionCommand::removeNode):
1283         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1284         * editing/Editor.cpp:
1285         (WebCore::Editor::advanceToNextMisspelling):
1286         * editing/InsertLineBreakCommand.cpp:
1287         (WebCore::InsertLineBreakCommand::doApply):
1288         * editing/InsertListCommand.cpp:
1289         (WebCore::InsertListCommand::doApply):
1290         * editing/ReplaceSelectionCommand.cpp:
1291         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
1292         * editing/TypingCommand.cpp:
1293         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1294         * editing/VisiblePosition.cpp:
1295         (WebCore::VisiblePosition::previous):
1296         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
1297         (WebCore::VisiblePosition::left):
1298         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
1299         (WebCore::VisiblePosition::right):
1300         * editing/VisibleSelection.cpp:
1301         (WebCore::VisibleSelection::selectionFromContentsOfNode):
1302         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
1303         * editing/htmlediting.cpp:
1304         (WebCore::nextVisuallyDistinctCandidate):
1305         (WebCore::previousVisuallyDistinctCandidate):
1306         (WebCore::firstEditablePositionAfterPositionInRoot):
1307         (WebCore::lastEditablePositionBeforePositionInRoot):
1308         (WebCore::lastOffsetForEditing):
1309         (WebCore::isFirstPositionAfterTable):
1310         (WebCore::isLastPositionBeforeTable):
1311         (WebCore::positionBeforeNode):
1312         (WebCore::positionAfterNode):
1313         (WebCore::enclosingEmptyListItem):
1314         (WebCore::caretMaxOffset):
1315         * editing/htmlediting.h:
1316         * editing/visible_units.cpp:
1317         (WebCore::renderedAsNonInlineTableOrHR):
1318         (WebCore::startOfParagraph):
1319         (WebCore::endOfParagraph):
1320         (WebCore::startOfEditableContent):
1321         (WebCore::endOfEditableContent):
1322         * page/AccessibilityObject.cpp:
1323         (WebCore::endOfStyleRange):
1324         * page/AccessibilityRenderObject.cpp:
1325         (WebCore::AccessibilityRenderObject::visiblePositionRange):
1326         * rendering/RenderBox.cpp:
1327         (WebCore::RenderBox::positionForPoint):
1328
1329 2009-03-20  Dmitry Titov  <dimich@chromium.org>
1330
1331         Reviewed by Dimitri Glazkov.
1332
1333         https://bugs.webkit.org/show_bug.cgi?id=24689
1334         Add (upstream) V8 bindings for Workers. Mostly style cleaning.
1335
1336         * bindings/v8/WorkerContextExecutionProxy.cpp: Added.
1337         * bindings/v8/WorkerContextExecutionProxy.h: Added.
1338         * bindings/v8/WorkerScriptController.cpp: Added.
1339         * bindings/v8/WorkerScriptController.h: Added.
1340         * bindings/v8/V8Index.h: Added. This is just a wrapper for v8_index.h, like V8Proxy.h
1341         * bindings/v8/V8Proxy.h: Added domObjectMap() function that wraps GetDOMObjectMap().
1342         * bindings/v8/V8WorkerContextEventListener.cpp:
1343         (WebCore::V8WorkerContextEventListener::callListenerFunction): TrackEvent() renamed trackEvent()
1344
1345 2009-03-20  Stephen White  <senorblanco@chromium.org>
1346
1347         Reviewed by Eric Seidel.
1348
1349         Fix for LayoutTests/fast/canvas/canvas-text-alignment.html
1350         on chromium/skia.  The problem was that the gradient matrix
1351         for text was being applied twice.  Fixed by reverting some of
1352         https://bugs.webkit.org/show_bug.cgi?id=23957, so that skiaDrawText
1353         is no longer responsible for measuring the text and scaling up
1354         the gradient matrix.  Instead, the text bounding box is passed
1355         in from SVGPaintServerGradient.  I didn't make this change for CG,
1356         since it uses a different method (the gradient is drawn using the
1357         text as a pre-rendered mask).
1358         https://bugs.webkit.org/show_bug.cgi?id=24687
1359
1360         * platform/graphics/skia/SkiaFontWin.cpp:
1361         (WebCore::skiaDrawText):
1362         * svg/graphics/SVGPaintServerGradient.cpp:
1363         (WebCore::SVGPaintServerGradient::setup):
1364
1365 2009-03-20  Xan Lopez  <xlopez@igalia.com>
1366
1367         Rubber-stamped by Holger Freyther.
1368
1369         There seems to be some rounding error in cairo (or in how we use
1370         cairo) with some fonts, like DejaVu Sans Mono, which makes cairo
1371         report a height smaller than ascent + descent, which is wrong and
1372         confuses WebCore's layout system. Workaround this while we figure
1373         out what's going on.
1374
1375         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
1376         (WebCore::SimpleFontData::platformInit):
1377         * platform/graphics/gtk/SimpleFontDataPango.cpp:
1378         (WebCore::SimpleFontData::platformInit):
1379
1380 2009-03-19  Alexey Proskuryakov  <ap@webkit.org>
1381
1382         Reviewed by Darin Adler.
1383
1384         https://bugs.webkit.org/show_bug.cgi?id=24122
1385         <rdar://problem/6674179>
1386         REGRESSION: DOM Range extractContents/deleteContents failures seen on Moxiecode tests
1387
1388         Test: fast/dom/Range/deleted-range-endpoints.html
1389
1390         * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
1391         to the specification.
1392
1393 2009-03-19  Anders Carlsson  <andersca@apple.com>
1394
1395         Reviewed by Dan Bernstein.
1396
1397         <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)
1398         
1399         If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
1400         that object would never be updated.
1401         
1402         * page/FrameView.cpp:
1403         (WebCore::FrameView::updateWidgets):
1404         Factor the widget updating code out into this method. Return true if the update set is empty.
1405         
1406         (WebCore::FrameView::performPostLayoutTasks):
1407         Loop over the update set multiple times until all widgets have been updated or until we reach the cap.
1408         
1409         * page/FrameView.h:
1410
1411 2009-03-18  Timothy Hatcher  <timothy@apple.com>
1412
1413         Make the defered data loading timer honor the Page's scheduled runloop pairs.
1414         Introduces a new RunLoopTimer class that has an API mimicking Timer but
1415         allows it to be scheduled with one or more SchedulePairs.
1416
1417         <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers
1418
1419         Reviewed by Darin Adler.
1420
1421         * WebCore.xcodeproj/project.pbxproj: Adds the new RunLoopTimer.{cpp,h} files.
1422         * loader/MainResourceLoader.cpp:
1423         (WebCore::MainResourceLoader::handleDataLoadNow): Use the MainResourceLoaderTimer typedef.
1424         (WebCore::MainResourceLoader::startDataLoadTimer): Added. Start the timer and on
1425         Mac platforms also schedule with the Page's SchedulePairs.
1426         (WebCore::MainResourceLoader::handleDataLoadSoon): Call startDataLoadTimer().
1427         (WebCore::MainResourceLoader::setDefersLoading): Ditto.
1428         * loader/MainResourceLoader.h:
1429         * platform/cf/RunLoopTimerCF.cpp: Added.
1430         (WebCore::RunLoopTimerBase::~RunLoopTimerBase):
1431         (WebCore::timerFired):
1432         (WebCore::RunLoopTimerBase::start):
1433         (WebCore::RunLoopTimerBase::schedule):
1434         (WebCore::RunLoopTimerBase::stop):
1435         (WebCore::RunLoopTimerBase::isActive):
1436         * platform/RunLoopTimer.h: Added.
1437         (WebCore::RunLoopTimerBase::RunLoopTimerBase):
1438         (WebCore::RunLoopTimerBase::startRepeating):
1439         (WebCore::RunLoopTimerBase::startOneShot):
1440         (WebCore::RunLoopTimer::RunLoopTimer):
1441         (WebCore::RunLoopTimer::fired):
1442
1443 2009-03-19  Dimitri Glazkov  <dglazkov@chromium.org>
1444
1445         Reviewed by Darin Fisher.
1446
1447         https://bugs.webkit.org/show_bug.cgi?id=24702
1448         Upstream miscellaneous bindings changes.
1449
1450         * bindings/v8/ScheduledAction.cpp:
1451         (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
1452         * bindings/v8/ScriptCallStack.h: Added an extra include.
1453
1454 2009-03-19  Simon Fraser  <simon.fraser@apple.com>
1455
1456         Reviewed by Dave Hyatt
1457
1458         https://bugs.webkit.org/show_bug.cgi?id=24686
1459         
1460         When hit testing a RenderLayer whose parent lives in a preserves-3D hierarchy,
1461         we need to compare the computed z-offset with the depth-test z-offset before
1462         deciding that such a RenderLayer was hit. This fixes an issue, tested by the
1463         3d-point-mapping-overlapping.html test, where the child of a transformed element
1464         is found by hit testing, even when some other element with greater Z overlaps
1465         them both.
1466         
1467         Improved the code by adding a utility method, isHitCandidate(), which computes and tests
1468         z-depth when necessary.
1469
1470         Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html
1471                transforms/3d/point-mapping/3d-point-mapping-overlapping.html
1472
1473         * rendering/RenderLayer.cpp:
1474         (WebCore::isHitCandidate):
1475         (WebCore::RenderLayer::hitTestLayer):
1476
1477 2009-03-19  Jeremy Moskovich  <jeremy@chromium.org>
1478
1479         Reviewed by Dimitri Glazkov.
1480
1481         https://bugs.webkit.org/show_bug.cgi?id=24456
1482         Split ColorChromium.cpp into Mac & Windows variants.
1483         Remove Chromium Dependency on platform/graphics/mac/ColorMac.mm since we
1484         ultimately need to take a different approach.  For now, createCGColor()
1485         is copied from ColorMac.mm.
1486
1487         No observable change in behavior, so no test.
1488
1489         * platform/graphics/chromium/ColorChromium.cpp:
1490         (WebCore::focusRingColor):
1491         * platform/graphics/chromium/ColorChromiumMac.mm: Added.
1492
1493 2009-03-19  Pavel Feldman  <pfeldman@chromium.org>
1494
1495         Reviewed by Dimitri Glazkov.
1496
1497         https://bugs.webkit.org/show_bug.cgi?id=24675
1498         Unforking frontend: add custom InspectorController methods
1499         implementation.
1500
1501         * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.
1502
1503 2009-03-19  Jay Campan  <jcampan@google.com>
1504
1505         Reviewed by Dimitri Glazkov.
1506
1507         https://bugs.webkit.org/show_bug.cgi?id=24625
1508         Adding an accessor to the currently selected index in the PopupMenuChromium.
1509         This is required for implementing the deletion of an autocomplete entry in Chromium.
1510
1511         * platform/chromium/PopupMenuChromium.cpp:
1512         (WebCore::PopupContainer::selectedIndex):
1513         * platform/chromium/PopupMenuChromium.h:
1514
1515 2009-03-19  Evan Stade  <estade@chromium.org>
1516
1517         Reviewed by Dimitri Glazkov.
1518
1519         https://bugs.webkit.org/show_bug.cgi?id=24526
1520         Improve windows skia text stroking.
1521
1522         Test: LayoutTests/svg/custom/struct-use-09-b.svg
1523
1524         * platform/graphics/skia/SkiaFontWin.cpp: Close the path representing
1525         each font glyph polygon, rather than only closing the path once per
1526         letter. This fixes stroking for letters with multiple polygons, such
1527         as 'A' or 'D'.
1528         (WebCore::getPathForGlyph):
1529         (WebCore::skiaDrawText):
1530
1531 2009-03-19  Simon Hausmann  <simon.hausmann@nokia.com>
1532
1533         Reviewed by Tor Arne Vestbø.
1534
1535         Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.
1536
1537         Removed dead code for distinguishing between Widget and PluginView in the Qt port.
1538
1539         * bindings/js/ScriptControllerQt.cpp:
1540         (WebCore::ScriptController::createScriptInstanceForWidget): Removed incorrect isNPAPI check.
1541         * plugins/PluginView.cpp:
1542         (WebCore::PluginView::PluginView): Removed m_isNPAPIPlugin variable.
1543         * plugins/PluginView.h: Removed setter/getter.
1544         * plugins/mac/PluginViewMac.cpp:
1545         (WebCore::PluginView::init): Removed call to setIsNPAPIPlugin.
1546         * plugins/qt/PluginViewQt.cpp:
1547         (WebCore::PluginView::init): Ditto.
1548
1549 2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1550
1551         Reviewed by Oliver Hunt.
1552
1553         Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage
1554         <https://bugs.webkit.org/show_bug.cgi?id=24596>
1555         <rdar://problem/6686493>
1556
1557         JSDOMWindow::customGetOwnPropertySlot() does an access check after calling
1558         JSGlobalObject::getOwnPropertySlot(). This causes the PropertySlot to be
1559         set twice, once to the value that is illegal to access, and then to undefined
1560         This causes an assertion failure in property access caching code.
1561
1562         The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().
1563
1564         * bindings/js/JSDOMWindowCustom.h:
1565         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1566
1567 2009-03-18  Alexey Proskuryakov  <ap@webkit.org>
1568
1569         Reviewed by Sam Weinig.
1570
1571         https://bugs.webkit.org/show_bug.cgi?id=24676
1572         Simple cross-origin requests shouldn't dispatch upload progress events
1573
1574         Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
1575
1576         * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
1577         explaining the somewhat unexpected behavior of this function.
1578
1579         * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
1580         * xml/XMLHttpRequestUpload.h:
1581         Report whether there are any event listeners registered.
1582
1583         * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.
1584
1585         * xml/XMLHttpRequest.cpp:
1586         (WebCore::XMLHttpRequest::createRequest): Set m_uploadEventsAllowed flag.
1587         (WebCore::XMLHttpRequest::makeSameOriginRequest): Ditto.
1588         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest): Ditto.
1589         (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Set request body - it can be
1590         non-empty for POST requests.
1591         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight): Set m_uploadEventsAllowed flag.
1592         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): Ditto.
1593         (WebCore::XMLHttpRequest::abort): Only dispatch upload progress events if allowed.
1594         (WebCore::XMLHttpRequest::networkError): Ditto.
1595         (WebCore::XMLHttpRequest::abortError): Ditto.
1596         (WebCore::XMLHttpRequest::didSendData): Ditto.
1597
1598 2009-03-18  Marc-Antoine Ruel  <maruel@chromium.org>
1599
1600         Reviewed by Darin Fisher.
1601
1602         https://bugs.webkit.org/show_bug.cgi?id=24398
1603         Fix a crash when loading a svg file in Chromium's test_shell and
1604         then reloading the page.
1605
1606         * history/BackForwardListChromium.cpp:
1607         (WebCore::BackForwardList::BackForwardList):
1608         (WebCore::BackForwardList::close):
1609
1610 2009-03-18  Eric Carlson  <eric.carlson@apple.com>
1611
1612         Reviewed by Simon Fraser.
1613
1614         Fix for <rdar://problem/6685235>
1615         <video> element poster cannot be set dynamically if not originally set up in HTML
1616         
1617         Allocate the media engine immediately so the plug-in proxy is available for
1618         scripting right away.
1619
1620         * platform/graphics/MediaPlayer.cpp:
1621         (WebCore::MediaPlayer::MediaPlayer):
1622
1623 2009-03-18  Beth Dakin  <bdakin@apple.com>
1624
1625         Reviewed by Dave Hyatt.
1626
1627         Fix for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326): 
1628         Popup menu appears at the wrong location on page at http://
1629         www.signonsandiego.com/
1630
1631         This was a regression from http://trac.webkit.org/changeset/40769, 
1632         which changed the base class of RenderInline to 
1633         RenderBoxModelObject rather than RenderBox.
1634
1635         * rendering/RenderObject.cpp:
1636         (WebCore::RenderObject::offsetParent): offsetParent should return a 
1637         RenderBoxModelObject rather than just a RenderBox, which is more 
1638         restrictive. 
1639
1640 2009-03-18  Anders Carlsson  <andersca@apple.com>
1641
1642         Reviewed by Darin Adler.
1643
1644         <rdar://problem/6504776> 
1645         CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
1646
1647         Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.
1648         
1649         * loader/NetscapePlugInStreamLoader.cpp:
1650         (WebCore::NetscapePlugInStreamLoader::didCancel):
1651
1652 2009-03-18  David Levin  <levin@chromium.org>
1653
1654         Reviewed by Dimitri Glazkov.
1655
1656         https://bugs.webkit.org/show_bug.cgi?id=24664
1657         Upstreaming v8 collection.h
1658
1659         No change in behavior, so no test.
1660
1661         * bindings/v8/V8Collection.h: Added.
1662
1663 2009-03-18  Sam Weinig  <sam@webkit.org>
1664
1665         Reviewed by Simon Fraser.
1666
1667         Fix for https://bugs.webkit.org/show_bug.cgi?id=23966
1668         REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net
1669         <rdar://problem/6589657>
1670
1671         Match the CSSOM spec for getClientRects and getBoundingClientRect by
1672         returning a 0x0 rect at the correct top/left position for empty inline
1673         boxes.
1674
1675         * rendering/RenderInline.cpp:
1676         (WebCore::RenderInline::absoluteRects):
1677         (WebCore::RenderInline::absoluteQuads):
1678
1679 2009-03-18  David Levin  <levin@chromium.org>
1680
1681         Reviewed by Eric Seidel.
1682
1683         Match the changes done for windows in the bug
1684         https://bugs.webkit.org/show_bug.cgi?id=24530.
1685
1686         No change in behavior, so no test.
1687
1688         * rendering/RenderThemeChromiumLinux.cpp:
1689         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
1690
1691 2009-03-18  Dirk Schulze  <krit@webkit.org>
1692
1693         Reviewed by Holger Freyther.
1694
1695         Added support for SVG's stroked texts to Qt.
1696
1697         [Qt] SVGs stroked text support missing
1698         https://bugs.webkit.org/show_bug.cgi?id=24262
1699
1700         * platform/graphics/qt/FontQt.cpp:
1701         (WebCore::Font::drawComplexText):
1702
1703 2009-03-18  Mark Rowe  <mrowe@apple.com>
1704
1705         Reviewed by Alexey Proskuryakov.
1706
1707         Fix fast/encoding/char-decoding.html with recent ICU.
1708
1709         * platform/text/TextCodecICU.cpp:
1710         (WebCore::TextCodecICU::decode): Look for gb18030 case-insensitively,
1711         as newer versions of ICU use GB18030 as the canonical name.
1712
1713 2009-03-17  David Levin  <levin@chromium.org>
1714
1715         Reviewed by Dimitri Glazkov.
1716
1717         https://bugs.webkit.org/show_bug.cgi?id=24662
1718         Chromium build fixes.
1719
1720         Bug https://bugs.webkit.org/show_bug.cgi?id=24663 tracks
1721         the invalid implementation of ScriptCallStack.
1722
1723         No change in behavior, so no test.
1724
1725         * bindings/v8/ScriptCallStack.h:
1726         (WebCore::ScriptCallStack::state):
1727         * platform/graphics/skia/PlatformContextSkia.cpp:
1728         (PlatformContextSkia::drawRect):
1729
1730 2009-03-17  David Carson  <dacarson@apple.com>
1731
1732         Reviewed by David Hyatt.
1733
1734         Add anchor elements to the simple style sheet so that applications that 
1735         are using WebKit just for simple text and links will also take advantage
1736         of the fast path.
1737
1738         * css/CSSStyleSelector.cpp:
1739         (WebCore::elementCanUseSimpleDefaultStyle):
1740
1741 2009-03-17  Darin Adler  <darin@apple.com>
1742
1743         Reviewed by Adele Peterson.
1744
1745         <rdar://problem/6687005> Need support for new move-left/right selectors.
1746
1747         * editing/EditorCommand.cpp:
1748         (WebCore::executeMoveToLeftEndOfLine): Added.
1749         (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Added.
1750         (WebCore::executeMoveToRightEndOfLine): Added.
1751         (WebCore::executeMoveToRightEndOfLineAndModifySelection): Added.
1752         Added command entries for the functions above.
1753
1754 2009-03-17  Ojan Vafai  <ojan@chromium.org>
1755
1756         Reviewed by Adele Peterson.
1757
1758         Put the padding inside scrollbars on textareas.
1759         https://bugs.webkit.org/show_bug.cgi?id=24370
1760         
1761         Put the padding inside the scrollbars on textareas. This is done by moving the
1762         overflow from the shadowNode to the RenderTextControlMultiline. As a result,
1763         all of the scroll handing methods that RenderTextControl overrides can be moved
1764         down into RenderTextControlSingleLine since RenderTextControlMultiline can now
1765         just use RenderBlock's versions. This also allows RenderTextControlMultiLine to
1766         no longer need a custom layout method since the shadowNode can now just size
1767         like a regular DIV.
1768
1769         * css/CSSStyleSelector.cpp:
1770         (WebCore::CSSStyleSelector::adjustRenderStyle):
1771         * rendering/RenderTextControl.cpp:
1772         (WebCore::RenderTextControl::styleDidChange):
1773         (WebCore::RenderTextControl::selection):
1774         (WebCore::RenderTextControl::calcHeight):
1775         (WebCore::RenderTextControl::hitInnerTextElement):
1776         * rendering/RenderTextControl.h:
1777         * rendering/RenderTextControlMultiLine.cpp:
1778         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
1779         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
1780         * rendering/RenderTextControlMultiLine.h:
1781         * rendering/RenderTextControlSingleLine.cpp:
1782         (WebCore::RenderTextControlSingleLine::styleDidChange):
1783         (WebCore::RenderTextControlSingleLine::autoscroll):
1784         (WebCore::RenderTextControlSingleLine::scrollWidth):
1785         (WebCore::RenderTextControlSingleLine::scrollHeight):
1786         (WebCore::RenderTextControlSingleLine::scrollLeft):
1787         (WebCore::RenderTextControlSingleLine::scrollTop):
1788         (WebCore::RenderTextControlSingleLine::setScrollLeft):
1789         (WebCore::RenderTextControlSingleLine::setScrollTop):
1790         (WebCore::RenderTextControlSingleLine::scroll):
1791         * rendering/RenderTextControlSingleLine.h:
1792         * rendering/TextControlInnerElements.cpp:
1793         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
1794         (WebCore::RenderTextControlInnerBlock::positionForPoint):
1795         (WebCore::TextControlInnerTextElement::createRenderer):
1796
1797 2009-03-17  Darin Adler  <darin@apple.com>
1798
1799         Reviewed by David Hyatt.
1800
1801         Bug 24517: REGRESSION (r41552): innerHTML does an updateLayout -- unneeded and can be slow
1802         https://bugs.webkit.org/show_bug.cgi?id=24517
1803
1804         * editing/DeleteButtonController.cpp:
1805         (WebCore::DeleteButtonController::enable): Added a call to updateRendering, since
1806         determining whether to display the delete button involves style and updateRendering
1807         also updates style (should probably be named updateStyle, in fact). Not needed to fix
1808         this bug, but would have prevented the crash that led to this bug in the first place.
1809
1810         * editing/EditCommand.cpp:
1811         (WebCore::EditCommand::EditCommand): Get rid of unneeded null check. All frames have
1812         delete button controllers.
1813         * editing/Editor.cpp:
1814         (WebCore::Editor::rangeForPoint): Ditto.
1815
1816         * editing/markup.cpp:
1817         (WebCore::appendStartMarkup): Changed a "&" to a "&&" so that generating markup
1818         doesn't depend on renderers at all when the convertBlocksToInlines boolean is false.
1819         This allows us to omit the call to updateLayoutIgnorePendingStylesheets in the
1820         createMarkup function that's called by innerHTML.
1821         (WebCore::MarkupAccumulator::appendMarkup): Turned this into a class with a member
1822         function. Added a feature where the accumulator will skip a node. Moved arguments
1823         that don't change during recursion into an object. This function still is a bit
1824         inefficient, since it creates a new HashMap at every level as it recurses, but for now
1825         I did not tackle that. Also replaced the onlyIncludeChildren boolean with EChildrenOnly
1826         for consistency and clarity.
1827         (WebCore::createMarkup): Removed the call to updateLayoutIgnorePendingStylesheets.
1828         Instead of calling disable/enable on the delete button controller's container element,
1829         pass it in to the markup accumulator as a node to skip.
1830
1831 2009-03-17  Scott Violet  <sky@google.com>
1832
1833         Reviewed by Eric Seidel.
1834
1835         https://bugs.webkit.org/show_bug.cgi?id=24651
1836         Skia does not always render text fill/stroke pattern/gradient/color correctly
1837
1838         Changes Skia's font rendering to only render gradient/pattern if current
1839         color space indicates the gradient/pattern should be used.
1840         This is covered by LayoutTests/fast/canvas/canvas-text-alignment.html .
1841     
1842         * platform/graphics/GraphicsContext.cpp:
1843         (WebCore::GraphicsContext::strokeColorSpace):
1844         (WebCore::GraphicsContext::fillColorSpace):
1845         * platform/graphics/GraphicsContext.h:
1846         (WebCore::):
1847         * platform/graphics/GraphicsContextPrivate.h:
1848         * platform/graphics/skia/SkiaFontWin.cpp:
1849         (WebCore::paintSkiaText):
1850
1851 2009-03-17  Adele Peterson  <adele@apple.com>
1852
1853         Reviewed by Darin Adler.
1854
1855         Fix for https://bugs.webkit.org/show_bug.cgi?id=24655
1856         <rdar://problem/6633727> Hitting return at the end of a line with an anchor jumps me to the bottom of the message
1857
1858         Test: editing/inserting/6633727.html
1859
1860         This changes does a few things:
1861         1) Renames pos to insertionPosition.
1862         2) Eliminates "startNode".  It doesn't work well to consider the node separately from the insertionPosition.  
1863            The insertionPosition gets updated at various times, and it seems likely that startNode can get out of sync.
1864         3) Before building up a list of ancestors to move around when we insert the new block, make sure to use the deepest
1865            representation of the insertionPosition, so all ancestor nodes are correctly included.
1866
1867         * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
1868
1869 2009-03-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1870
1871         Reviewed by Kevin Ollivier.
1872
1873         https://bugs.webkit.org/show_bug.cgi?id=24115
1874         Introduce platform independent stubs for plugins.
1875
1876         * plugins/PluginDataNone.cpp: Copied from WebCore/plugins/wx/PluginDataWx.cpp.
1877         * plugins/PluginPackageNone.cpp: Copied from WebCore/plugins/wx/PluginPackageWx.cpp.
1878         * plugins/PluginViewNone.cpp: Copied from WebCore/plugins/wx/PluginViewWx.cpp.
1879         * plugins/wx/PluginDataWx.cpp: Removed.
1880         * plugins/wx/PluginPackageWx.cpp: Removed.
1881         * plugins/wx/PluginViewWx.cpp: Removed.
1882         * webcore-wx.bkl:
1883
1884 2009-03-17  Darin Adler  <darin@apple.com>
1885
1886         Earlier version reviewed by Adele Peterson.
1887
1888         Bug 24304: REGRESSION (r39864): Hitting the space bar to select an <input type=radio>
1889         or push an <input type=button> or <button> causes the page to scroll down.
1890
1891         Would be best to add a regression test for Windows eventually; tested that this has
1892         no effect on the Mac OS X platform.
1893
1894         * html/HTMLInputElement.cpp:
1895         (WebCore::HTMLInputElement::defaultEventHandler): Added FIXMEs and tweaked formatting.
1896         Use the code that calls the base class's defaultEventHandler early only in the cases
1897         where it's needed: keydown and keypress events in text fields. In other cases, do the
1898         more typical thing and call the default handler only at the end of the function.
1899         This function already had code to make sure the keypress event for space never gets
1900         through, but it was running too late since the scrolling code was moved into the
1901         base class default event handler.
1902
1903 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
1904
1905         Reviewed by Dave Hyatt
1906
1907         https://bugs.webkit.org/show_bug.cgi?id=24632
1908
1909         Fix repaint issues when composited layers come and go (only applies
1910         when ACCELERATED_COMPOSITING is turned on).
1911         
1912         * rendering/RenderLayer.cpp:
1913         (WebCore::RenderLayer::RenderLayer):
1914         * rendering/RenderLayer.h:
1915         (WebCore::RenderLayer::mustOverlayCompositedLayers):
1916         (WebCore::RenderLayer::setMustOverlayCompositedLayers):
1917         * rendering/RenderLayerBacking.cpp:
1918         (WebCore::RenderLayerBacking::RenderLayerBacking):
1919         * rendering/RenderLayerBacking.h:
1920
1921         Move what used to be the 'forceCompositingLayer' flag from RenderLayerBacking
1922         to RenderLayer, because we don't want the side-effects of creating RenderLayerBacking
1923         when setting this flag.
1924         
1925         * rendering/RenderLayerCompositor.cpp:
1926         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
1927         When a RenderLayer flips into or out of compositing mode, compute a repaint
1928         rect relative to the containerForRepaint, and repaint it.
1929         
1930         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1931         Call layer->setMustOverlayCompositedLayers() rather than setForcedCompositingLayer().
1932         
1933         (WebCore::RenderLayerCompositor::needsToBeComposited):
1934         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1935         (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
1936         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1937         * rendering/RenderLayerCompositor.h:
1938         
1939         Rename requiresCompositingLayerForTransform() to requiresCompositingForTransform()
1940         and make it a class static method to match requiresCompositingForAnimation(). Both
1941         now take RenderObjects, rathern than RenderLayers.
1942         
1943         * rendering/style/RenderStyle.h:
1944         (WebCore::InheritedFlags::hasTransformRelatedProperty):
1945         Minor tidyup using convenience methods added in an earlier commit.
1946
1947 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
1948
1949         Reviewed by Darin Adler
1950
1951         https://bugs.webkit.org/show_bug.cgi?id=24396
1952
1953         * config.h:
1954         Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
1955         comments to make the #ifdefs more readable.
1956
1957         * css/CSSComputedStyleDeclaration.cpp:
1958         (WebCore::computedTransform):
1959         Add a comment to mention that we don't flatten the matrix.
1960         
1961         * css/MediaQueryEvaluator.cpp:
1962         (WebCore::transform_3dMediaFeatureEval):
1963         Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
1964         is supported.
1965         
1966         * platform/graphics/mac/GraphicsLayerCA.mm:
1967         (WebCore::GraphicsLayerCA::animateTransform):
1968         No need for the #ifdef here. If we don't support 3d, we will have already flattened
1969         the matrix.
1970         
1971         * platform/graphics/transforms/TransformationMatrix.cpp:
1972         (WebCore::TransformationMatrix::makeAffine):
1973         * platform/graphics/transforms/TransformationMatrix.h:
1974         New method to convert the matrix to an affine matrix by throwing a way the non-affine
1975         parts.
1976         
1977         * rendering/RenderLayer.cpp:
1978         (WebCore::RenderLayer::updateTransform):
1979         (WebCore::RenderLayer::currentTransform):
1980         * rendering/RenderLayerBacking.cpp:
1981         (WebCore::RenderLayerBacking::updateLayerTransform):
1982         If 3d rendering is not supported, convert the matrix to an affine matrix
1983         which can be rendered, and used for hit testing.
1984         
1985         * rendering/RenderLayerCompositor.cpp:
1986         Change the name of the exported symbol that webkitdirs.pm uses to know if
1987         3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff.
1988         
1989         * rendering/RenderObject.cpp:
1990         (WebCore::RenderObject::transformFromContainer):
1991         Only take perspective into account if 3d rendering is supported.
1992
1993         * rendering/RenderObject.h:
1994         (WebCore::makeMatrixRenderable):
1995         Utility method that flattens a matrix if 3d rendering is not supported.
1996
1997 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
1998
1999         wx build fix. Fix typo after mouse wheel changes.
2000
2001         * platform/wx/MouseWheelEventWx.cpp:
2002         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2003
2004 2009-03-17  Darin Adler  <darin@apple.com>
2005
2006         * inspector/ConsoleMessage.cpp:
2007         (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
2008
2009 2009-03-17  Darin Adler  <darin@apple.com>
2010
2011         Fix crash seen right away when running run-webkit-tests.
2012
2013         * inspector/ConsoleMessage.cpp:
2014         (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
2015         Also tweaked formatting a bit.
2016
2017 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
2018
2019         Reviewed by Darin Adler.
2020
2021         HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so 
2022         it doesn't need to zero it out before calling.
2023
2024         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
2025
2026 2009-03-17  Dan Bernstein  <mitz@apple.com>
2027
2028         Reviewed by Adam Roben.
2029
2030         - WebCore part of adding a mechanism for controlling the caching of
2031           responses through WebFrameLoaderClient
2032
2033         Mac already has such a mechanism, and this adds one for CFNetwork ports.
2034
2035         * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
2036         and ResourceLoaderCFNet.cpp.
2037
2038         * loader/EmptyClients.h:
2039         (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
2040         implementation that always returns true.
2041
2042         * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
2043
2044         * loader/ResourceLoader.h: Ditto.
2045
2046         * loader/cf/ResourceLoaderCFNet.cpp: Added.
2047         (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
2048         FrameLoaderClient::shouldCacheResponse().
2049
2050         * platform/network/ResourceHandleClient.h:
2051         (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
2052         implementation that always returns true.
2053
2054         * platform/network/cf/ResourceHandleCFNet.cpp:
2055         (WebCore::willCacheResponse): Added a call to
2056         ResourceHandleClient::shouldCacheResponse(). If the client returns
2057         false, return 0, which will prevent CFNetwork from caching the response.
2058
2059 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
2060
2061         Reviewed by Darin Adler.
2062
2063         https://bugs.webkit.org/show_bug.cgi?id=13287
2064         Cannot change SELECT to a dynamically created option
2065
2066         Tests: fast/forms/add-and-remove-option.html
2067                fast/forms/add-remove-option-modification-event.html
2068                fast/forms/add-selected-option.html
2069                fast/forms/select-cache-desynchronization.html
2070
2071         * dom/ContainerNode.cpp:
2072         (WebCore::dispatchChildInsertionEvents): Increment DOM tree version. This will happen when
2073         dispatching DOMSubtreeModified again, but the version should be incremented for event
2074         listeners to have an up to date view of the DOM.
2075         (WebCore::dispatchChildRemovalEvents): Ditto.
2076
2077         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
2078         Make sure that the select element knows about its new selected option.
2079
2080         * html/HTMLOptionElement.h: Use insertedIntoTree() instead of insertedIntoDocument(),
2081         because DOM also needs to be updated for forms that are not in document yet. Similar
2082         problems exist for node removing, but removedFromTree() is called at a wrong time, so
2083         those problems cannot be fixed without deeper refactoring.
2084
2085         * html/HTMLSelectElement.cpp:
2086         (WebCore::HTMLSelectElement::setRecalcListItems): Reset m_activeSelectionAnchorIndex - it
2087         doesn't make sense to keep the anchor after programmatically changing the selection, and
2088         keeping it was causing a failure in fast/forms/listbox-selection.html.
2089
2090         * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
2091         base class versions.
2092
2093 2009-03-17  Steve Falkenburg  <sfalken@apple.com>
2094
2095         <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
2096         
2097         Reviewed by Darin Adler.
2098
2099         * loader/FTPDirectoryDocument.cpp:
2100         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
2101
2102 2009-03-16  David Hyatt  <hyatt@apple.com>
2103
2104         <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
2105
2106         Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
2107         layers that don't paint themselves.  This is done by adding a new enclosingSelfPaintingLayer method
2108         so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
2109         themselves.
2110
2111         Reviewed by Darin Adler.
2112
2113         Added fast/block/float/overlapping-floats-with-overflow-hidden.html
2114
2115         * WebCore.base.exp:
2116         * rendering/RenderBlock.cpp:
2117         (WebCore::RenderBlock::addOverhangingFloats):
2118         * rendering/RenderObject.cpp:
2119         (WebCore::RenderObject::enclosingSelfPaintingLayer):
2120         * rendering/RenderObject.h:
2121
2122 2009-03-17  Xan Lopez  <xlopez@igalia.com>
2123
2124         Reviewed by Holger Freyther.
2125
2126         https://bugs.webkit.org/show_bug.cgi?id=24592
2127         [GTK] Crash in FcPatternHash
2128
2129         Style fixes.
2130
2131         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2132         (WebCore::FontPlatformData::operator=):
2133         * platform/graphics/gtk/FontPlatformDataPango.cpp:
2134
2135 2009-03-17  Xan Lopez  <xlopez@igalia.com>
2136
2137         Reviewed by Holger Freyther.
2138
2139         https://bugs.webkit.org/show_bug.cgi?id=24592
2140         [GTK] Crash in FcPatternHash
2141
2142         Sanitize memory management in pango fonts.
2143
2144         Release memory allocated by FontPlatformDataPango in its own
2145         destructor instead of doing it from other classes, and add copy
2146         constructor and '=' operator to be able to track referenced
2147         objects properly.
2148
2149         * platform/graphics/gtk/FontPlatformDataPango.cpp:
2150         (WebCore::FontPlatformData::~FontPlatformData):
2151         (WebCore::FontPlatformData::operator=):
2152         (WebCore::FontPlatformData::FontPlatformData):
2153         * platform/graphics/gtk/SimpleFontDataPango.cpp:
2154
2155 2009-03-17  Darin Adler  <darin@apple.com>
2156
2157         Reviewed by Alexey Proskuryakov.
2158
2159         Bug 24624: Crash in imageLoadEventTimerFired after adoptNode used on <img>,
2160         seen with inspector, which uses adoptNode
2161         https://bugs.webkit.org/show_bug.cgi?id=24624
2162         rdar://problem/6422850
2163
2164         Test: fast/dom/HTMLImageElement/image-load-cross-document.html
2165
2166         * dom/Document.cpp:
2167         (WebCore::Document::Document): Removed m_imageLoadEventTimer.
2168         (WebCore::Document::detach): Removed m_imageLoadEventDispatchSoonList and
2169         m_imageLoadEventDispatchingList.
2170         (WebCore::Document::implicitClose): Called ImageLoader::dispatchPendingLoadEvents
2171         instead of dispatchImageLoadEventsNow.
2172
2173         * dom/Document.h: Removed ImageLoader, dispatchImageLoadEventSoon,
2174         dispatchImageLoadEventsNow, removeImage, m_imageLoadEventDispatchSoonList,
2175         m_imageLoadEventDispatchingList, m_imageLoadEventTimer, and imageLoadEventTimerFired.
2176
2177         * loader/ImageLoader.cpp:
2178         (WebCore::loadEventSender): Added. Returns the single global ImageLoadEventSender
2179         object used privately as the target of the load event timer.
2180         (WebCore::ImageLoader::~ImageLoader): Call ImageLoadEventSender::cancelLoadEvent
2181         rather than Document::removeImage.
2182         (WebCore::ImageLoader::setImage): Use m_element directly, not element().
2183         (WebCore::ImageLoader::updateFromElement): Ditto. Also name the local variable
2184         document instead of doc.
2185         (WebCore::ImageLoader::notifyFinished): Call ImageLoadEventSender::dispatchLoadEventSoon
2186         rather than Document::dispatchImageLoadEventSoon.
2187         (WebCore::ImageLoader::dispatchPendingLoadEvent): Added. Handles the common logic
2188         about when load events can be dispatched so that dispatchLoadEvent only has to
2189         have the specific part for each derived class. This includes a check that the
2190         document is attached, which used to be handled by having documents empty out the
2191         image load event vectors in the detach function.
2192         (WebCore::ImageLoader::dispatchPendingLoadEvents): Added. Calls the appropriate
2193         function on the ImageLoadEventSender, which avoids the need to have that class be
2194         public in the ImageLoader header.
2195         (WebCore::ImageLoadEventSender::ImageLoadEventSender): Added. Has the code that
2196         was previously in the Document constructor.
2197         (WebCore::ImageLoadEventSender::dispatchLoadEventSoon): Added. Has the code that
2198         was previously in Document::dispatchImageLoadEventSoon.
2199         (WebCore::ImageLoadEventSender::cancelLoadEvent): Added. Has the code that was
2200         previously in Document::removeImage.
2201         (WebCore::ImageLoadEventSender::dispatchPendingLoadEvents): Added. Has the code
2202         that was previously in Document::dispatchImageLoadEventsNow.
2203         (WebCore::ImageLoadEventSender::timerFired): Added. Calls dispatchPendingLoadEvents.
2204
2205         * loader/ImageLoader.h: Improved comments. Made the virtual functions private
2206         or protected rather than public. Added static dispatchPendingLoadEvents function
2207         for use by Document and private dispatchPendingLoadEvent function for use by
2208         ImageLoadEventSender. Made setLoadingImage private and eliminated
2209         setHaveFiredLoadEvent since that can all be done inside the class without any
2210         member functions.
2211
2212         * html/HTMLImageLoader.cpp:
2213         (WebCore::HTMLImageLoader::dispatchLoadEvent): Removed logic to check whether a
2214         load event already fired and whether image() is 0. These are now both base class
2215         responsibilities.
2216         * svg/SVGImageLoader.cpp:
2217         (WebCore::SVGImageLoader::dispatchLoadEvent): Ditto.
2218         * wml/WMLImageLoader.cpp:
2219         (WebCore::WMLImageLoader::dispatchLoadEvent): Ditto.
2220
2221 2009-03-17  Dimitri Glazkov  <dglazkov@chromium.org>
2222
2223         Reviewed by Timothy Hatcher.
2224
2225         https://bugs.webkit.org/show_bug.cgi?id=24623
2226         Refactor ConsoleMessage to use ScriptFuncitonCall and eliminate JSC
2227         dependencies.
2228
2229         * bindings/js/ScriptFunctionCall.cpp:
2230         (WebCore::ScriptFunctionCall::appendArgument): Added uint and ScriptString-taking methods.
2231         * bindings/js/ScriptFunctionCall.h:
2232         * bindings/js/ScriptObjectQuarantine.cpp:
2233         (WebCore::quarantineValue): Added generic ScriptValue quarantine helper.
2234         * bindings/js/ScriptObjectQuarantine.h:
2235         * bindings/js/ScriptValue.cpp:
2236         (WebCore::ScriptValue::isEqual): Added.
2237         * bindings/js/ScriptValue.h:
2238         * inspector/ConsoleMessage.cpp:
2239         (WebCore::ConsoleMessage::ConsoleMessage):
2240         (WebCore::ConsoleMessage::addToConsole): Added.
2241         (WebCore::ConsoleMessage::isEqual): Changed to use ScriptValue::isEqual.
2242         * inspector/ConsoleMessage.h:
2243         (WebCore::ConsoleMessage::incrementCount): Added.
2244         * inspector/InspectorController.cpp:
2245         (WebCore::InspectorController::addConsoleMessage): Changed to use ConsoleMessage::addToConsole.
2246         (WebCore::InspectorController::populateScriptObjects): Ditto.
2247         * inspector/InspectorController.h:
2248
2249 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
2250
2251         Reviewed by Mark Rowe.
2252
2253         Get BUILDING_ON_* defines from Platform.h.
2254         
2255         https://bugs.webkit.org/show_bug.cgi?id=24630
2256
2257         * WebCorePrefix.h:
2258
2259 2009-03-16  Xan Lopez  <xlopez@igalia.com>
2260
2261         Reviewed by Holger Freyther.
2262
2263         https://bugs.webkit.org/show_bug.cgi?id=24592
2264         [GTK] Crash in FcPatternHash
2265
2266         Sanitize memory management in gtk fonts.
2267
2268         Release memory allocated by FontPlatformDataGtk in its own
2269         destructor instead of doing it from other classes, and add copy
2270         constructor and '=' operator to be able to track referenced
2271         objects properly.
2272
2273         * platform/graphics/gtk/FontPlatformData.h:
2274         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2275         (WebCore::FontPlatformData::operator=):
2276         (WebCore::FontPlatformData::FontPlatformData):
2277         (WebCore::FontPlatformData::~FontPlatformData):
2278         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2279         (WebCore::SimpleFontData::platformDestroy):
2280
2281 2009-03-17  Ariya Hidayat  <ariya.hidayat@nokia.com>
2282
2283         Build fix for Qt < 4.5.
2284
2285         As reported by Yael Aharon  <yael.aharon@nokia.com>
2286
2287         * platform/graphics/qt/GraphicsContextQt.cpp:
2288         (WebCore::GraphicsContext::drawLine):
2289
2290 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
2291
2292         Reviewed by Sam Weinig.
2293
2294         https://bugs.webkit.org/show_bug.cgi?id=24614
2295         Access control checks are different in cached and uncached cases
2296
2297         Test: http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached.html
2298
2299         * loader/CrossOriginAccessControl.cpp:
2300         (WebCore::isOnAccessControlSimpleRequestMethodWhitelist): Factored out simple method
2301         check for use in both cached and uncached cases. In cached case, an old definition that
2302         omitted HEAD was still used.
2303         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Check that content type has an
2304         allowed value. This is needed in all call sites. Also changed to compare MIME type, not
2305         content type.
2306         (WebCore::isSimpleCrossOriginAccessRequest): Use the above methods.
2307
2308         * loader/CrossOriginAccessControl.h: Expose isOnAccessControlSimpleRequestMethodWhitelist.
2309
2310         * loader/CrossOriginPreflightResultCache.cpp:
2311         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
2312         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
2313         Use the new checks for simple method and header.
2314
2315 2009-03-16  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
2316
2317         Reviewed by Mark Rowe.
2318
2319         https://bugs.webkit.org/show_bug.cgi?id=24638
2320         [GTK] HTML5 media tags do not work
2321
2322         Add a repaint-requested signal to the video sink, and use it to
2323         call MediaPlayerPrivate::repaint, so that the video actually
2324         plays.
2325
2326         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2327         (WebCore::mediaPlayerPrivateRepaintCallback):
2328         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2329         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
2330         (webkit_video_sink_idle_func):
2331         (webkit_video_sink_render):
2332         (webkit_video_sink_class_init):
2333
2334 2009-03-16  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
2335
2336         Reviewed by Holger Freyther.
2337
2338         https://bugs.webkit.org/show_bug.cgi?id=24638
2339         [GTK] HTML5 media tags do not work
2340
2341         Work-around the fact that gst_element_query_duration returns true even
2342         though it is unable to figure out the duration when in stream (push)
2343         mode.
2344
2345         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2346         (WebCore::MediaPlayerPrivate::duration):
2347
2348 2009-03-16  Darin Adler  <darin@apple.com>
2349
2350         Reviewed by Kevin Decker.
2351
2352         <rdar://problem/6642742> Top Sites malfunction when switching text zoom mode
2353
2354         * page/Frame.cpp:
2355         (WebCore::Frame::setNeedsReapplyStyles): Don’t do anything if the frame is
2356         currently showing a non-HTML view.
2357
2358 2009-03-16  Darin Adler  <darin@apple.com>
2359
2360         Reviewed by Adele Peterson.
2361
2362         Bug 24629: moving forward or backward a paragraph fails at edge of document
2363         https://bugs.webkit.org/show_bug.cgi?id=24629
2364         rdar://problem/6544413
2365
2366         Test: editing/selection/move-paragraph-document-edges.html
2367
2368         * editing/visible_units.cpp:
2369         (WebCore::previousParagraphPosition): Use the last result from
2370         previousLinePosition rather than going all the way back to what was originally
2371         passed in when we hit exception cases like null or not moving. This correctly
2372         inherits the behavior of previousLinePosition when we are in a paragraph at the
2373         edge of a document.
2374         (WebCore::nextParagraphPosition): Ditto.
2375
2376 2009-03-16  Darin Adler  <darin@apple.com>
2377
2378         Reviewed by Adele Peterson.
2379
2380         Bug 24619: RenderObject::selectionStartEnd does not need to be a virtual function
2381         https://bugs.webkit.org/show_bug.cgi?id=24619
2382
2383         * rendering/RenderObject.h: Remove virtual keyword from selectionStartEnd declaration.
2384         * rendering/RenderView.h: Ditto.
2385
2386 2009-03-16  Peter Kasting  <pkasting@google.com>
2387
2388         Reviewed by David Hyatt.
2389
2390         https://bugs.webkit.org/show_bug.cgi?id=24368
2391         DOM scroll events should be based off the actual number of wheel
2392         ticks, not off the number of lines scrolled.  This matches IE.
2393
2394         * dom/Node.cpp:
2395         (WebCore::Node::dispatchWheelEvent):
2396         * dom/WheelEvent.cpp:
2397         (WebCore::WheelEvent::WheelEvent):
2398         * dom/WheelEvent.h:
2399         (WebCore::WheelEvent::create):
2400         * platform/PlatformWheelEvent.h:
2401         (WebCore::PlatformWheelEvent::wheelTicksX):
2402         (WebCore::PlatformWheelEvent::wheelTicksY):
2403         * platform/gtk/WheelEventGtk.cpp:
2404         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2405         * platform/mac/WheelEventMac.mm:
2406         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2407         * platform/qt/WheelEventQt.cpp:
2408         * platform/win/WheelEventWin.cpp:
2409         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2410         * platform/wx/MouseWheelEventWx.cpp:
2411         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2412
2413 2009-03-16  Simon Fraser  <simon.fraser@apple.com>
2414
2415         Reviewed by Eric Seidel
2416         
2417         Clean up a few issues in the Animation code:
2418
2419         * page/animation/AnimationBase.cpp:
2420         (WebCore::AnimationBase::updateStateMachine):
2421         Whitespace
2422         
2423         (WebCore::AnimationBase::willNeedService):
2424         Don't round to float, use std::max
2425
2426         * page/animation/AnimationController.cpp:
2427         (WebCore::AnimationControllerPrivate::startTimeResponse):
2428         Fix erroneously copied line to null out m_lastResponseWaiter.
2429
2430 2009-03-12  David Hyatt  <hyatt@apple.com>
2431
2432         Reviewed by Eric Seidel
2433
2434         https://bugs.webkit.org/show_bug.cgi?id=13632
2435
2436         Overflow scrolling needs to account for the bottom/right padding on the object itself as well
2437         as for bottom/right margins on children.
2438
2439         Existing tests cover this.
2440
2441         * rendering/RenderBlock.cpp:
2442         (WebCore::RenderBlock::lowestPosition):
2443         (WebCore::RenderBlock::rightmostPosition):
2444
2445 2009-03-16  Sam Weinig  <sam@webkit.org>
2446
2447         Reviewed by Anders Carlsson.
2448
2449         Fix for <rdar://problem/6320555>
2450         Add an upper limit for setting HTMLSelectElement.length.
2451
2452         Test: fast/forms/select-max-length.html
2453
2454         * html/HTMLSelectElement.cpp:
2455         (WebCore::HTMLSelectElement::setOption):
2456         (WebCore::HTMLSelectElement::setLength):
2457
2458 2009-03-16  Eric Carlson  <eric.carlson@apple.com>
2459
2460         Reviewed by Simon Fraser.
2461
2462         <rdar://problem/6686721> Media document crash in 64-bit WebKit
2463
2464         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2465         (WebCore::MediaPlayerPrivate::createQTMovieView): QTMovieContentViewClass is only used when
2466         rendering inline with old versions of QuickTime, so don't look for it when we are in a 
2467         media document.
2468
2469 2009-03-16  Dimitri Glazkov  <dglazkov@chromium.org>
2470
2471         Reviewed by Timothy Hatcher.
2472
2473         https://bugs.webkit.org/show_bug.cgi?id=24590
2474         Refactor InspectorDOMStorageResource to use ScriptFunctionCall.
2475
2476         * bindings/js/ScriptFunctionCall.cpp:
2477         (WebCore::ScriptFunctionCall::appendArgument): Added method for bool argument.
2478         * bindings/js/ScriptFunctionCall.h: Ditto, also cleaned up.
2479         * bindings/js/ScriptObjectQuarantine.cpp:
2480         (WebCore::getQuarantinedScriptObject): Added Storage helper.
2481         * bindings/js/ScriptObjectQuarantine.h: Ditto.
2482         * inspector/InspectorController.cpp:
2483         (WebCore::InspectorController::populateScriptObjects): Changed to use bind method.
2484         (WebCore::InspectorController::resetScriptObjects): Changed to use unbind method.
2485         (WebCore::InspectorController::didUseDOMStorage): Changed to use isSameHostAndType and bind methods.
2486         * inspector/InspectorController.h: Removed add/remove methods for DOM storage.
2487         * inspector/InspectorDOMStorageResource.cpp:
2488         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
2489         (WebCore::InspectorDOMStorageResource::isSameHostAndType): Added.
2490         (WebCore::InspectorDOMStorageResource::bind): Added.
2491         (WebCore::InspectorDOMStorageResource::unbind): Added.
2492         * inspector/InspectorDOMStorageResource.h:
2493
2494 2009-03-16   Mike Belshe  <mike@belse.com>
2495
2496         Reviewed by Dimitri Glazkov.
2497
2498         https://bugs.webkit.org/show_bug.cgi?id=24580
2499         Fix query() to match KURL behavior, this time with the code that
2500         compiles.
2501
2502         * platform/KURLGoogle.cpp:
2503         (WebCore::KURL::query): Fix copy/paste mistake.
2504
2505 2009-03-16  Alexey Proskuryakov  <ap@webkit.org>
2506
2507         Reviewed by Darin Adler.
2508
2509         https://bugs.webkit.org/show_bug.cgi?id=21752
2510         REGRESSION: referencing XHR constructor for a not yet loaded frame permanently breaks it
2511
2512         Test: fast/dom/Window/window-early-properties-xhr.html
2513
2514         For some transitions, the Window object is not replaced, but Document is. When this happened,
2515         window.document property was updated, but references to Document kept in cached constructors
2516         were not.
2517
2518         * bindings/js/JSAudioConstructor.cpp:
2519         (WebCore::JSAudioConstructor::JSAudioConstructor):
2520         (WebCore::JSAudioConstructor::document):
2521         (WebCore::JSAudioConstructor::mark):
2522         * bindings/js/JSAudioConstructor.h:
2523         * bindings/js/JSImageConstructor.cpp:
2524         (WebCore::JSImageConstructor::JSImageConstructor):
2525         (WebCore::JSImageConstructor::document):
2526         (WebCore::JSImageConstructor::mark):
2527         * bindings/js/JSImageConstructor.h:
2528         * bindings/js/JSMessageChannelConstructor.cpp:
2529         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
2530         (WebCore::JSMessageChannelConstructor::scriptExecutionContext):
2531         (WebCore::JSMessageChannelConstructor::mark):
2532         * bindings/js/JSMessageChannelConstructor.h:
2533         * bindings/js/JSOptionConstructor.cpp:
2534         (WebCore::JSOptionConstructor::JSOptionConstructor):
2535         (WebCore::JSOptionConstructor::document):
2536         (WebCore::JSOptionConstructor::mark):
2537         * bindings/js/JSOptionConstructor.h:
2538         * bindings/js/JSXMLHttpRequestConstructor.cpp:
2539         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
2540         (WebCore::JSXMLHttpRequestConstructor::scriptExecutionContext):
2541         (WebCore::JSXMLHttpRequestConstructor::mark):
2542         * bindings/js/JSXMLHttpRequestConstructor.h:
2543         Changed cached constructors to keep a reference to Window, not Document.
2544
2545 2009-03-15  Alexey Proskuryakov  <ap@webkit.org>
2546
2547         Reviewed by Darin Adler.
2548
2549         https://bugs.webkit.org/show_bug.cgi?id=24549
2550         Impose a limit on Access-Control-Max-Age value
2551
2552         * loader/CrossOriginPreflightResultCache.cpp:
2553         (WebCore::CrossOriginPreflightResultCacheItem::parse):
2554
2555 2009-03-15  Greg Bolsinga  <bolsinga@apple.com>
2556
2557         Reviewed by David Kilzer.
2558
2559         <rdar://problem/6668875> Normalize Geolocation results
2560
2561         * platform/mac/GeolocationServiceMac.mm:
2562         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
2563
2564 2009-03-15  Greg Bolsinga  <bolsinga@apple.com>
2565
2566         Reviewed by David Kilzer.
2567
2568         Update ::toString format as suggested by Darin Adler.
2569
2570         * page/Geoposition.cpp:
2571         (WebCore::Geoposition::toString):
2572
2573 2009-03-15  David Kilzer  <ddkilzer@apple.com>
2574
2575         <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
2576
2577         Reviewed by Darin Adler.
2578
2579         Yet another case where we would trigger extended encoding loading needlessly.
2580
2581         * platform/text/TextEncoding.cpp:
2582         (WebCore::TextEncoding::encodingForFormSubmission):
2583
2584 2009-03-15  Simon Fraser  <simon.fraser@apple.com>
2585
2586         Build fix: no review.
2587
2588         * rendering/style/ContentData.h:
2589
2590 2009-03-15  David Kilzer  <ddkilzer@apple.com>
2591
2592         Bug 24542: Improve ContentData encapsulation
2593
2594         <https://bugs.webkit.org/show_bug.cgi?id=24542>
2595
2596         Reviewed by Simon Fraser.
2597
2598         No tests since there is no change in behavior.
2599
2600         * rendering/RenderObject.cpp:
2601         (WebCore::RenderObject::createObject): Used getter methods
2602         instead of data members on ContentData class.  Used isImage()
2603         convenience method.
2604         * rendering/RenderObjectChildList.cpp:
2605         (WebCore::RenderObjectChildList::updateBeforeAfterContent): Ditto.
2606
2607         * rendering/style/ContentData.cpp:
2608         (WebCore::ContentData::clear): Extracted code into
2609         deleteContent() method.
2610         (WebCore::ContentData::dataEquivalent): Added.  Extracted code
2611         from StyleRareNonInheritedData::contentDataEquivalent().
2612         (WebCore::ContentData::deleteContent): Added.  Used by setter
2613         methods.
2614         * rendering/style/ContentData.h: Made m_type, m_content and
2615         m_next private.
2616         (WebCore::ContentData::isCounter): Added.
2617         (WebCore::ContentData::isImage): Added.
2618         (WebCore::ContentData::isNone): Added.
2619         (WebCore::ContentData::isText): Added.
2620         (WebCore::ContentData::type): Added.
2621         (WebCore::ContentData::dataEquivalent): Added.
2622         (WebCore::ContentData::image): Added.
2623         (WebCore::ContentData::setImage): Added.
2624         (WebCore::ContentData::text): Added.
2625         (WebCore::ContentData::setText): Added.
2626         (WebCore::ContentData::counter): Added.
2627         (WebCore::ContentData::setCounter): Added.
2628         (WebCore::ContentData::next): Added.
2629         (WebCore::ContentData::setNext): Added.
2630
2631         * rendering/style/CounterContent.h:
2632         (WebCore::operator!=): Removed.
2633         (WebCore::operator==): Renamed operator!=() and reversed its
2634         logic after extracting code from
2635         StyleRareNonInheritedData::contentDataEquivalent() to create
2636         ContentData::dataEquivalent().
2637
2638         * rendering/style/RenderStyle.cpp:
2639         (WebCore::RenderStyle::setContent): Used new getters and setters
2640         on ContentData class.  Changed first argument from a StringImpl*
2641         to a PassRefPtr<StrimgImpl>.  Used isText() convenience method.
2642         * rendering/style/RenderStyle.h:
2643         (WebCore::RenderStyle::setContent): Updated declaration.
2644         * rendering/style/StyleRareNonInheritedData.cpp:
2645         (WebCore::StyleRareNonInheritedData::contentDataEquivalent):
2646         Extracted most logic in while() loop into
2647         ContentData::dataEquivalent().
2648
2649 2009-03-15  Gustavo Noronha Silva  <gns@gnome.org>
2650
2651         Reviewed by Anders Carlsson.
2652
2653         https://bugs.webkit.org/show_bug.cgi?id=24602
2654         [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
2655
2656         Reintroduce the URI into the soup message after having set it in
2657         the KURL, on redirects, to make sure it is properly encoded. This
2658         fixes bad request problems when servers give bad URIs on their
2659         response's Location header.
2660
2661         * platform/network/soup/ResourceHandleSoup.cpp:
2662         (WebCore::restartedCallback):
2663
2664 2009-03-15  Alexey Proskuryakov  <ap@webkit.org>
2665
2666         Reviewed by Darin Adler.
2667
2668         https://bugs.webkit.org/show_bug.cgi?id=19737
2669         No cursor and paste not enabled right clicking text field/area
2670
2671         Test: fast/events/right-click-focus.html
2672
2673         * page/EventHandler.cpp:
2674         (WebCore::EventHandler::handleMousePressEventSingleClick):
2675         (WebCore::EventHandler::handleMousePressEvent):
2676         Take normal code path for right clicks (we were taking it for Ctrl-clicks anyway).
2677
2678 2009-03-15  Alexey Proskuryakov  <ap@webkit.org>
2679
2680         Reviewed by Adele Peterson.
2681
2682         https://bugs.webkit.org/show_bug.cgi?id=23949
2683         HTMLSelectElement is in inconsistent state when handling mutation events
2684
2685         Test: fast/forms/mutation-event-recalc.html
2686
2687         * dom/ContainerNode.cpp:
2688         (WebCore::ContainerNode::insertBefore):
2689         (WebCore::ContainerNode::appendChild):
2690         Call childrenChanged() before dispatching modification events, not after.
2691
2692         * html/HTMLOptGroupElement.cpp:
2693         (WebCore::HTMLOptGroupElement::insertBefore):
2694         (WebCore::HTMLOptGroupElement::replaceChild):
2695         (WebCore::HTMLOptGroupElement::removeChild):
2696         (WebCore::HTMLOptGroupElement::appendChild):
2697         (WebCore::HTMLOptGroupElement::removeChildren):
2698         * html/HTMLSelectElement.cpp:
2699         (WebCore::HTMLSelectElement::add):
2700         (WebCore::HTMLSelectElement::remove):
2701         (WebCore::HTMLSelectElement::insertBefore):
2702         (WebCore::HTMLSelectElement::replaceChild):
2703         (WebCore::HTMLSelectElement::removeChild):
2704         (WebCore::HTMLSelectElement::appendChild):
2705         (WebCore::HTMLSelectElement::removeChildren):
2706         Remove calls to recalcSelectOptions(). It is too late to recalc now, after mutation events
2707         were already dispatched.
2708
2709 2009-03-14  Greg Bolsinga  <bolsinga@apple.com>
2710
2711         <rdar://problem/6683465>
2712
2713         Geolocation has to be able to handle NULL Frames.
2714
2715         Reviewed by Mark Rowe
2716     
2717 2009-03-14  Greg Bolsinga  <bolsinga@apple.com>
2718
2719         Reviewed by David Kilzer.
2720
2721         Geoposition::toString was missing the Coordinates after the update.
2722
2723         * page/Geoposition.cpp:
2724         (WebCore::Geoposition::toString):
2725
2726 2009-03-14  Jan Michael Alonzo  <jmalonzo@webkit.org>
2727
2728         Reviewed by Mark Rowe.
2729
2730         [Gtk] Build fix - pass a Coordinate to Geoposition::create
2731         https://bugs.webkit.org/show_bug.cgi?id=24603
2732
2733         Gtk build fix per r41650
2734         https://bugs.webkit.org/show_bug.cgi?id=24506
2735         Geolocation in Safari differs from the spec, no Coordinates attribute on Position
2736
2737         Pass a Coordinate to Geoposition::create.
2738
2739         * platform/gtk/GeolocationServiceGtk.cpp:
2740         (WebCore::GeolocationServiceGtk::updatePosition):
2741
2742 2009-03-14  Alexey Proskuryakov  <ap@webkit.org>
2743
2744         Reviewed by Darin Adler.
2745
2746         https://bugs.webkit.org/show_bug.cgi?id=24545
2747         Make cross-site XHR simple request definition match current spec draft
2748
2749         Tests: http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type.html
2750                http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html
2751
2752         * loader/CrossOriginAccessControl.cpp:
2753         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Added Content-Language.
2754         (WebCore::isSimpleCrossOriginAccessRequest): Added HEAD. Restricted content types to those
2755         that could be sent via form submission.
2756
2757 2009-03-14  Alexey Proskuryakov  <ap@webkit.org>
2758
2759         Reviewed by Darin Adler.
2760
2761         https://bugs.webkit.org/show_bug.cgi?id=15172
2762         object fallback - empty string for first argument of setAttributeNS does not work like null
2763
2764         https://bugs.webkit.org/show_bug.cgi?id=24548
2765         createElementNS("", name) should create an element in null namespace
2766
2767         Tests: fast/dom/createElementNS-empty-namespace.html
2768                fast/dom/setAttributeNS-empty-namespace.html
2769
2770         * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2771         Convert empty namespaces to null.
2772
2773 2009-03-13  Mark Rowe  <mrowe@apple.com>
2774
2775         Rubber-stamped by Dan Bernstein.
2776
2777         Take advantage of the ability of recent versions of Xcode to easily switch the active
2778         architecture.
2779
2780         * Configurations/DebugRelease.xcconfig:
2781
2782 2009-03-13  John Abd-El-Malek  <jam@google.com>
2783
2784         Reviewed by Darin Fisher.
2785
2786         https://bugs.webkit.org/show_bug.cgi?id=24593
2787         Added requestorID so we can track the request to its WebView without using frame (which was removed).
2788
2789         * platform/network/chromium/ResourceRequest.h:
2790         (WebCore::ResourceRequest::ResourceRequest):
2791         (WebCore::ResourceRequest::requestorID):
2792         (WebCore::ResourceRequest::setRequestorID):
2793         (WebCore::ResourceRequest::setTargetType):
2794         (WebCore::ResourceRequest::policyURL):
2795         (WebCore::ResourceRequest::setPolicyURL):
2796         (WebCore::ResourceRequest::requestorPid):
2797         (WebCore::ResourceRequest::setRequestorPid):
2798
2799 2009-03-13  Mike Belshe  <mike@belshe.com>
2800
2801         Reviewed by Dimitri Glazkov.
2802
2803         https://bugs.webkit.org/show_bug.cgi?id=24561
2804         Add custom V8 bindings for HTMLElementCanvas, Location.
2805
2806         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Added.
2807         * bindings/v8/custom/V8LocationCustom.cpp: Added.
2808
2809 2009-03-13  Stephen White  <senorblanco@chromium.org>
2810
2811         Reviewed by Eric Seidel.
2812
2813         https://bugs.webkit.org/show_bug.cgi?id=24584
2814
2815         Fix transparent text rendering on Chromium.  FontChromiumWin
2816         was calling beginTransparencyLayer()/endTransparencyLayer(), with
2817         a TransparencyWin inside to do GDI ClearType rendering over an
2818         opaque background.  TransparencyWin does its special sauce
2819         in the destructor, but it was being called too late to be used
2820         correctly in the layer.  Put the special sauce into a new function,
2821         composite(), and call that explicitly instead.
2822
2823         * platform/graphics/chromium/FontChromiumWin.cpp:
2824         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
2825         * platform/graphics/chromium/TransparencyWin.cpp:
2826         (WebCore::TransparencyWin::~TransparencyWin):
2827         (WebCore::TransparencyWin::composite):
2828         (WebCore::TransparencyWin::init):
2829         * platform/graphics/chromium/TransparencyWin.h:
2830         * rendering/RenderThemeChromiumWin.cpp:
2831         (WebCore::):
2832
2833 2009-03-13  Mike Belshe  <mike@belshe.com>
2834
2835         Reviewed by Dimitri Glazkov.
2836
2837         https://bugs.webkit.org/show_bug.cgi?id=24562
2838         Add custom implementation for getCSSCanvasContext to V8 bindings.
2839
2840         * bindings/v8/custom/V8DocumentCustom.cpp: Added new method.
2841
2842 2009-03-13  Mike Belshe  <mike@belse.com>
2843
2844         Reviewed by Dimitri Glazkov.
2845
2846         https://bugs.webkit.org/show_bug.cgi?id=24580
2847         Fix query() to match KURL behavior.
2848
2849         * platform/KURLGoogle.cpp:
2850         (WebCore::KURL::query): remove extra logic around question mark.
2851
2852 2009-03-13  Chris Fleizach  <cfleizach@apple.com>
2853
2854         Reviewed by Beth Dakin.
2855
2856         Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
2857         https://bugs.webkit.org/show_bug.cgi?id=24474
2858
2859         Test: platform/mac-snowleopard/accessibility/table-multi-bodies.html
2860
2861         * page/AccessibilityTable.cpp:
2862         (WebCore::AccessibilityTable::cellForColumnAndRow):
2863
2864 2009-03-13  Jian Li  <jianli@chromium.org>
2865
2866         Reviewed by Dimitri Glazkov.
2867
2868         https://bugs.webkit.org/show_bug.cgi?id=24589
2869         Upstream changes to V8 event listeners (Chromium r11133) in order to
2870         fix worker functionality break in Chromium.
2871
2872         * bindings/v8/V8AbstractEventListener.cpp:
2873         (WebCore::V8AbstractEventListener::invokeEventHandler):
2874         (WebCore::V8AbstractEventListener::handleEvent):
2875         * bindings/v8/V8AbstractEventListener.h:
2876         * bindings/v8/V8WorkerContextEventListener.cpp:
2877         (WebCore::V8WorkerContextEventListener::handleEvent):
2878
2879 2009-03-13  Dimitri Glazkov  <dglazkov@chromium.org>
2880
2881         Reviewed by Timothy Hatcher.
2882
2883         https://bugs.webkit.org/show_bug.cgi?id=24524
2884         Introduce ScriptObject and ScriptFunctionCall abstractions.
2885
2886         * GNUmakefile.am: Added ScriptObject and ScriptFunctionCall to project.
2887         * WebCore.pro: Ditto.
2888         * WebCore.vcproj/WebCore.vcproj: Ditto.
2889         * WebCore.xcodeproj/project.pbxproj: Ditto.
2890         * WebCoreSources.bkl: Ditto.
2891         * bindings/js/ScriptFunctionCall.cpp: Added.
2892         * bindings/js/ScriptFunctionCall.h: Added.
2893         * bindings/js/ScriptObject.cpp: Added.
2894         * bindings/js/ScriptObject.h: Added.
2895         * bindings/js/ScriptObjectQuarantine.cpp: Added.
2896         * bindings/js/ScriptObjectQuarantine.h: Added.
2897         * inspector/InspectorController.cpp:
2898         (WebCore::InspectorController::populateScriptObjects): Changed to use InspectorDatabaseResource::bind.
2899         (WebCore::InspectorController::resetScriptObjects): Changed to use InspectorDatabaseResource::unbind.
2900         (WebCore::InspectorController::didOpenDatabase): Changed to use InspectorDatabaseResource::unbind.
2901         * inspector/InspectorController.h: Removed addScriptDatabaseResource and
2902         removeScriptDatabaseResource declarations.
2903         * inspector/InspectorDatabaseResource.cpp:
2904         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2905         (WebCore::InspectorDatabaseResource::bind): Added.
2906         (WebCore::InspectorDatabaseResource::unbind): Added.
2907         * inspector/InspectorDatabaseResource.h: Added bind and unbind declarations.
2908
2909 2009-03-13  Peter Kasting  <pkasting@google.com>
2910
2911         Reviewed by Eric Seidel.
2912
2913         https://bugs.webkit.org/show_bug.cgi?id=24467
2914         Make Skia drawRect() and stroke behavior match CG.
2915
2916         This makes drawRect() ignore the stroke width (like CG does), and
2917         adds a warning comment about that to the appropriate header.
2918
2919         It also eliminates some hacky code in Skia's stroke preparation,
2920         which tried to adjust odd-width strokes to fall on pixel boundaries.
2921         Not only did this not match CG, it wouldn't necessarily work right,
2922         because there could be other transforms (e.g. full-page zoom) that
2923         would affect the stroke before it reached the device pixel level.
2924
2925         * platform/graphics/GraphicsContext.h:
2926         * platform/graphics/skia/GraphicsContextSkia.cpp:
2927         (WebCore::GraphicsContext::drawRect):
2928         (WebCore::GraphicsContext::fillRect):
2929         * platform/graphics/skia/PlatformContextSkia.cpp:
2930         (PlatformContextSkia::drawRect):
2931         (PlatformContextSkia::setupPaintForStroking):
2932
2933 2009-03-13  Jian Li  <jianli@chromium.org>
2934
2935         Reviewed by Dimitri Glazkov.
2936
2937         https://bugs.webkit.org/show_bug.cgi?id=24583
2938         Need to change scope of constructor and destructor of V8ObjectEventListener from private
2939         to protected so that they could be used in its derived class V8WorkerContextEventListener.
2940
2941         * bindings/v8/V8ObjectEventListener.h:
2942
2943 2009-03-13  David Levin  <levin@chromium.org>
2944
2945         Reviewed by Dimitri Glazkov.
2946
2947         https://bugs.webkit.org/show_bug.cgi?id=24579
2948         Many V8*Event* files are misplaced.
2949
2950         This code is infrastructure for supporting the bindings and thus should
2951         be in the bindings/v8 directory.
2952
2953         * bindings/v8/V8AbstractEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.cpp.
2954         * bindings/v8/V8AbstractEventListener.h: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.h.
2955         * bindings/v8/V8LazyEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.cpp.
2956         * bindings/v8/V8LazyEventListener.h: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.h.
2957         * bindings/v8/V8ObjectEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.cpp.
2958         * bindings/v8/V8ObjectEventListener.h: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.h.
2959         * bindings/v8/V8WorkerContextEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.cpp.
2960         * bindings/v8/V8WorkerContextEventListener.h: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.h.
2961
2962 2009-03-13  Adele Peterson  <adele@apple.com>
2963
2964         Reviewed by Justin Garcia.
2965
2966         Fix for <rdar://problem/5089327> Color of quoted content is wrong when pasted inside other quoted content
2967
2968         Test: editing/pasteboard/5089327.html
2969
2970         Handle spans being pasted within a quoted region in the same way we handle "paste as quotation" content.
2971
2972         * editing/ReplaceSelectionCommand.cpp:
2973         (WebCore::handleStyleSpansBeforeInsertion):
2974         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
2975
2976 2009-03-13  Greg Bolsinga  <bolsinga@apple.com>
2977
2978         Reviewed by Simon Fraser.
2979
2980         Update Geolocation perimission dialogs to be asynchronous.
2981         https://bugs.webkit.org/show_bug.cgi?id=24505
2982
2983         Geolocation now requests permission from the Chrome asynchronously.
2984         The Chrome is passed the Geolocation object, and the Chrome sets the permission
2985         on the Geolocation. Geolocation also tracks if the Chrome should clear its cache
2986         of SecurityOrigins with geolocation permission. This is so that the GeolocationService
2987         can inform the Chrome of its request, and the Chrome is also free to implement its
2988         own policy.
2989         
2990         * WebCore.base.exp:
2991         * WebCore.xcodeproj/project.pbxproj:
2992         * page/Chrome.cpp:
2993         (WebCore::Chrome::requestGeolocationPermissionForFrame):
2994         * page/Chrome.h:
2995         * page/ChromeClient.h:
2996         (WebCore::ChromeClient::requestGeolocationPermissionForFrame):
2997         * page/Geolocation.cpp:
2998         (WebCore::Geolocation::Geolocation):
2999         (WebCore::Geolocation::getCurrentPosition):
3000         (WebCore::Geolocation::watchPosition):
3001         (WebCore::Geolocation::setIsAllowed):
3002         (WebCore::Geolocation::displayChallengeIfNecessary):
3003         (WebCore::Geolocation::geolocationServicePositionChanged):
3004         * page/Geolocation.h:
3005         (WebCore::Geolocation::isAllowed):
3006         (WebCore::Geolocation::setShouldClearCache):
3007         (WebCore::Geolocation::shouldClearCache):
3008         (WebCore::Geolocation::):
3009
3010 2009-03-13  Anders Carlsson  <andersca@apple.com>
3011
3012         Reviewed by Dan Bernstein.
3013
3014         <rdar://problem/6610666> Revise the Cocoa event model text API
3015         
3016         Add a NPCocoaEventTextInput event type. Remove the text input variables.
3017         
3018         * bridge/npapi.h:
3019         (_NPCocoaEvent::):
3020
3021 2009-03-13  Kevin Decker  <kdecker@apple.com>
3022
3023         Reviewed by Anders.
3024
3025         <rdar://problem/6630340> REGRESSION (39114-39115): Unity Web Player no longer works if Flip4Mac is also installed
3026         
3027         The code assumed if we have a plug-in that supports "application/x-oleobject" we should always prefer the object tag
3028         over of an embed tag. That assumption can cause the Mac platform to load the wrong plug-in, as Flip4Mac claims supports
3029         for x-oleobject.
3030         
3031         * rendering/RenderPartObject.cpp:
3032         (WebCore::shouldUseEmbedDescendant): Made the Mac platform always return true here. 
3033
3034 2009-03-13  Jian Li  <jianli@chromium.org>
3035
3036         Reviewed by Dimitri Glazkov.
3037
3038         https://bugs.webkit.org/show_bug.cgi?id=24559
3039         Need to port JSC fix (r41565) to V8 in order to fix layout test onload-single-line-comment.html.
3040
3041         * bindings/v8/custom/V8LazyEventListener.cpp:
3042         (WebCore::V8LazyEventListener::getListenerFunction):
3043         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
3044
3045 2009-03-13  Jian Li  <jianli@chromium.org>
3046
3047         Reviewed by Dimitri Glazkov.
3048
3049         https://bugs.webkit.org/show_bug.cgi?id=24557
3050         This is to support running multiple workers in a single worker process in chromium.
3051
3052         * bindings/v8/custom/V8WorkerContextEventListener.cpp:
3053         (WebCore::V8WorkerContextEventListener::handleEvent):
3054         Add locker to v8 event listener of worker context.
3055
3056 2009-03-13  Alexey Proskuryakov  <ap@webkit.org>
3057
3058         Reviewed by Sam Weinig.
3059
3060         https://bugs.webkit.org/show_bug.cgi?id=24575
3061         XHR response is incorrect after a network error.
3062
3063         Tests: http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
3064                http/tests/xmlhttprequest/cross-site-denied-response-sync.html
3065                http/tests/xmlhttprequest/cross-site-denied-response.html
3066
3067         * xml/XMLHttpRequest.cpp:
3068         (WebCore::XMLHttpRequest::networkError): Call internalAbort() to fully reset the request.
3069         (WebCore::XMLHttpRequest::didFailRedirectCheck): No need to call internalAbort() here. Note
3070         that since internalAbort() can drop GC protection, it is not safe to use the object after
3071         this call.
3072         (WebCore::XMLHttpRequest::didReceiveData): Check that the request wasn't aborted, and
3073         return early if it was. This can happen during sync requests, as the loader does not know
3074         that it was aborted, and just synthesizes all callbacks.
3075
3076 2009-03-13  Adam Bergkvist <adam.bergkvist@ericsson.com>
3077
3078         Reviewed by Alexey Proskuryakov.
3079
3080         https://bugs.webkit.org/show_bug.cgi?id=3547
3081         XMLHttpRequest.statusText returns always "OK"
3082
3083         Covered by existing tests (which now pass on all platforms but Mac).
3084
3085         * xml/XMLHttpRequest.cpp:
3086         (WebCore::XMLHttpRequest::statusText): Return ResourceResponse status text. It is now up
3087         to each platform to correctly set the status text or set it to "OK" to retain current
3088         behavior.
3089
3090 2009-03-13  Adam Bergkvist <adam.bergkvist@ericsson.com>
3091
3092         Reviewed by Alexey Proskuryakov.
3093
3094         https://bugs.webkit.org/show_bug.cgi?id=24349
3095         [QT] HTTP status text is never set
3096
3097         Set HTTP status text to the reason phrase attribute of QNetworkReply.
3098
3099         * platform/network/qt/QNetworkReplyHandler.cpp:
3100         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3101
3102 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
3103
3104         Reviewed by Mark Rowe
3105
3106         <rdar://problem/6622300>: Reproducible crash on
3107         <http://www.editgrid.com/explore/tnc/dave/FusionChart%3A_Candlestick>
3108         
3109         Prevent CSSStyleSheet::checkLoaded() writing to freed memory when it gets
3110         deleted from under itself. The sheetLoaded() notification can allow scripts
3111         to run via HTMLTokenizer::executeScriptsWaitingForStylesheets(),
3112         which can cause the last ref to the CSSStyleSheet to be released.
3113
3114         * css/CSSStyleSheet.cpp:
3115         (WebCore::CSSStyleSheet::checkLoaded):
3116
3117 2009-03-12  Kevin Ollivier  <kevino@theolliviers.com>
3118
3119         wx build fix. Allow make-generated-sources.sh to pass args down to DerivedSources.make
3120
3121         * make-generated-sources.sh:
3122
3123 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
3124
3125         Reviewed by Oliver Hunt.
3126
3127         https://bugs.webkit.org/show_bug.cgi?id=24498
3128         Fix the Qt port to use the same algorithm for drawing dashed and dotted
3129         borders as the other ports.  This makes the Qt port pixel-for-pixel perfect
3130         compared to border drawing with Apple's canonical mac port and much closer
3131         to konqueror and firefox behavior.
3132
3133         * platform/graphics/qt/GraphicsContextQt.cpp:
3134         (WebCore::GraphicsContext::drawLine):
3135
3136 2009-02-26  Eric Seidel  <eric@webkit.org>
3137
3138         Reviewed by Justin Garcia.
3139
3140         Clean up DOMSelection to use some helper functions
3141         making the code smaller, and less error-prone.
3142         https://bugs.webkit.org/show_bug.cgi?id=19221
3143
3144         I tried moving DOMSelection off of rangeCompliantEquivalent
3145         but failed.  VisibleSelection holds positions like (table, 1) to mean
3146         "after the table".
3147
3148         * page/DOMSelection.cpp:
3149         (WebCore::DOMSelection::visibleSelection):
3150         (WebCore::anchorPosition):
3151         (WebCore::focusPosition):
3152         (WebCore::basePosition):
3153         (WebCore::extentPosition):
3154         (WebCore::DOMSelection::anchorNode):
3155         (WebCore::DOMSelection::anchorOffset):
3156         (WebCore::DOMSelection::focusNode):
3157         (WebCore::DOMSelection::focusOffset):
3158         (WebCore::DOMSelection::baseNode):
3159         (WebCore::DOMSelection::baseOffset):
3160         (WebCore::DOMSelection::extentNode):
3161         (WebCore::DOMSelection::extentOffset):
3162         * page/DOMSelection.h:
3163
3164 2009-03-12  Dmitry Titov  <dimich@chromium.org>
3165
3166         Reviewed by Dimitri Glazkov.
3167
3168         https://bugs.webkit.org/show_bug.cgi?id=24563
3169         Change ResourceRequest to be a struct rather then a class to match other declarations.
3170
3171         * platform/network/chromium/ResourceRequest.h:
3172
3173 2009-03-12  David Levin  <levin@chromium.org>
3174
3175         Reviewed by Darin Fisher.
3176
3177         Bug 24530: width100percent-searchfield.html should be fixed for chromium.
3178         <https://bugs.webkit.org/show_bug.cgi?id=24530>
3179
3180         Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
3181
3182         * css/themeChromiumWin.css: Added.
3183         Overrides the changes to start supporting input[type="search"] on Windows (since
3184         Chromium doesn't do anything special for this).
3185
3186         * rendering/RenderThemeChromiumWin.cpp:
3187         (WebCore::supportsFocus):
3188         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
3189         (WebCore::RenderThemeChromiumWin::determineState):
3190         (WebCore::RenderThemeChromiumWin::getThemeData):
3191
3192 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
3193
3194         Reviewed by Antti Koivisto.
3195
3196         https://bugs.webkit.org/show_bug.cgi?id=24506
3197         Geolocation in Safari differs from the spec, no Coordinates attribute on Position
3198         
3199         Get up to date.
3200
3201         * DerivedSources.make:
3202         * GNUmakefile.am:
3203         * WebCore.pro:
3204         * WebCore.scons:
3205         * WebCore.vcproj/WebCore.vcproj:
3206         * WebCore.xcodeproj/project.pbxproj:
3207         * WebCoreSources.bkl:
3208         * bindings/js/JSGeolocationCustom.cpp:
3209         (WebCore::createPositionOptions):
3210         * page/Coordinates.cpp: Added.
3211         (WebCore::Coordinates::toString):
3212         * page/Coordinates.h: Added.
3213         (WebCore::Coordinates::create):
3214         (WebCore::Coordinates::latitude):
3215         (WebCore::Coordinates::longitude):
3216         (WebCore::Coordinates::altitude):
3217         (WebCore::Coordinates::accuracy):
3218         (WebCore::Coordinates::altitudeAccuracy):
3219         (WebCore::Coordinates::heading):
3220         (WebCore::Coordinates::speed):
3221         (WebCore::Coordinates::Coordinates):
3222         * page/Coordinates.idl: Added.
3223         * page/Geoposition.cpp:
3224         (WebCore::Geoposition::toString):
3225         * page/Geoposition.h:
3226         (WebCore::Geoposition::create):
3227         (WebCore::Geoposition::coords):
3228         (WebCore::Geoposition::Geoposition):
3229         * page/Geoposition.idl:
3230         * page/PositionOptions.h:
3231         (WebCore::PositionOptions::create):
3232         (WebCore::PositionOptions::maximumAge):
3233         (WebCore::PositionOptions::setMaximumAge):
3234         (WebCore::PositionOptions::PositionOptions):
3235         * platform/mac/GeolocationServiceMac.mm:
3236         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3237
3238 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
3239
3240         Reviewed by Darin Fisher.
3241
3242         https://bugs.webkit.org/show_bug.cgi?id=24496
3243         Fix console logging of non-string values by coercing the argument to
3244         a string, for V8 bindings.
3245
3246         Test: fast/js/console-non-string-values.html
3247
3248         * bindings/v8/ScriptValue.cpp: Added toString method.
3249         (WebCore::ScriptValue::toString):
3250         * bindings/v8/ScriptValue.h: Added PlatformString, ScriptState includes
3251             and toString declaration.
3252
3253 2009-03-12  Darin Fisher  <darin@chromium.org>
3254
3255         Reviewed by Dimitri Glazkov.
3256
3257         Eliminate ChromiumBridge::uiResourceProtocol
3258         https://bugs.webkit.org/show_bug.cgi?id=24558
3259
3260         * platform/chromium/ChromiumBridge.h:
3261
3262 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
3263
3264         Reviewed by Simon Fraser.
3265
3266         Missing breaks in switch statement
3267         https://bugs.webkit.org/show_bug.cgi?id=24556
3268
3269         * platform/mac/GeolocationServiceMac.mm:
3270         (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
3271
3272 2009-03-12  Darin Fisher  <darin@chromium.org>
3273
3274         Reviewed by Dimitri Glazkov.
3275
3276         https://bugs.webkit.org/show_bug.cgi?id=24554
3277         Remove some unused functions from ChromiumBridge.
3278
3279         * platform/chromium/ChromiumBridge.h:
3280
3281 2009-03-02  Eric Seidel  <eric@webkit.org>
3282
3283         Reviewed by Darin Fisher and Justin Garcia.
3284
3285         Safari crashes during drag and drop in Google presentations
3286         due to mutation event handlers removing DOM content during insertNode
3287         https://bugs.webkit.org/show_bug.cgi?id=22634
3288
3289         Added a bunch of "null" checks to make sure nodes are still
3290         in the document before we operate on them.  This is an
3291         inelegant solution, but it's the best we have for now.
3292         
3293         Test: editing/selection/crash-on-drag-with-mutation-events.html
3294
3295         * editing/CompositeEditCommand.cpp:
3296         (WebCore::CompositeEditCommand::insertNodeAt):
3297         * editing/ReplaceSelectionCommand.cpp:
3298         (WebCore::ReplaceSelectionCommand::doApply):
3299
3300 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
3301
3302         Reviewed by Adam Treat.
3303
3304         https://bugs.webkit.org/show_bug.cgi?id=24525
3305         REGRESSION: Inspector window doesn't close when inspected page is
3306         destroyed. This is a revert of r41158, which became unnecessary when
3307         InspectorController became ref-counted in r41462.
3308
3309         * inspector/InspectorController.cpp:
3310         (WebCore::InspectorController::inspectedPageDestroyed): Reset m_inspectedPage
3311             after calling close().
3312         (WebCore::InspectorController::stopUserInitiatedProfiling): Remove
3313             m_inspectedPage check guard around profile logic.
3314
3315 2009-03-12  Peter Kasting  <pkasting@google.com>
3316
3317         Reviewed by Darin Fisher.
3318
3319         https://bugs.webkit.org/show_bug.cgi?id=24502
3320         Make horizontal scrolling on Windows always go the correct direction.
3321
3322         * platform/PlatformWheelEvent.h:
3323         * platform/win/WheelEventWin.cpp:
3324         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3325
3326 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
3327
3328         Reviewed by Simon Fraser.
3329
3330         https://bugs.webkit.org/show_bug.cgi?id=24496
3331         Fix console logging of non-string values by coercing the argument to
3332         a string.
3333
3334         Test: fast/js/console-non-string-values.html
3335
3336         * bindings/js/ScriptValue.cpp: Removed PlatformString include.
3337         * bindings/js/ScriptValue.h: Added toString method.
3338         (WebCore::ScriptValue::toString):
3339         * page/Console.cpp:
3340         (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
3341             ScriptValue::toString.
3342         (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
3343         (WebCore::Console::count): Ditto.
3344
3345 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
3346
3347         Reviewed by Adele Peterson.
3348         
3349         https://bugs.webkit.org/show_bug.cgi?id=24508
3350         
3351         Fix updating of text field with placeholder text when value is set
3352         by ensuring that updatePlaceholderVisibility() is called after
3353         the value has been updated, not before.
3354
3355         Test: fast/forms/placeholder-set-value.html
3356
3357         * html/HTMLInputElement.cpp:
3358         (WebCore::HTMLInputElement::setValue):
3359
3360 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
3361
3362         Reviewed by Dave Hyatt
3363         
3364         https://bugs.webkit.org/show_bug.cgi?id=24552
3365         
3366         Hit testing involving normal flow, self-painting layers (e.g. reflections)
3367         was broken because it was not null-testing the result of hitTestLayer(),
3368         so bailing early with a nil hit layer.
3369
3370         Test: fast/layers/normal-flow-hit-test.html
3371
3372         * rendering/RenderLayer.cpp:
3373         (WebCore::RenderLayer::hitTestLayer):
3374
3375 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
3376
3377         Reviewed by Cameron Zwarich.
3378
3379         Removed zero-sized files, left over from improperly applied patch.
3380
3381         * platform/graphics/chromium/ThemeHelperChromiumWin.cpp: Removed.
3382         * platform/graphics/chromium/ThemeHelperChromiumWin.h: Removed.
3383
3384 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
3385
3386         Reviewed by George Staikos.
3387
3388         Do not ignore alpha color in optimization.  Hard to believe, but there
3389         are websites that fill the entire page with a tiled image consisting of
3390         nothing but a 100% transparent 1x1 image. <cough>orbitz.com</cough>
3391
3392         * platform/graphics/qt/ImageQt.cpp:
3393         (WebCore::BitmapImage::checkForSolidColor):
3394
3395 2009-03-12  Julien Chaffraix  <jchaffraix@webkit.org>
3396
3397         Reviewed by Darin Adler.
3398
3399         Bug 24110: cloneNode should call cloneElement and not the reverse
3400
3401         - Splitted the code from cloneNode into cloneElementWithChildren and cloneElementWithChildren.
3402           Now cloneNode calls one of the 2 previous methods.
3403
3404         - Renamed cloneElement to cloneElementWithoutChildren as it was the previous behaviour.
3405
3406         - Moved cloneNode to the Element private section so that WebCore callers cannot use it.
3407
3408         - Removed Element::cloneNode usage through WebCore.
3409
3410         * dom/Element.cpp:
3411         (WebCore::Element::cloneNode): Moved to Element's private section and it
3412         now calls the two next methods.
3413         (WebCore::Element::cloneElementWithChildren): Added.
3414         (WebCore::Element::cloneElementWithoutChildren): Renamed from cloneElement
3415         to avoid ambiguity.
3416         * dom/Element.h:
3417
3418         * editing/ApplyStyleCommand.cpp:
3419         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Changed call to cloneElement
3420         to call to cloneElementWithoutChildren.
3421         * editing/BreakBlockquoteCommand.cpp:
3422         (WebCore::BreakBlockquoteCommand::doApply): Ditto.
3423         * editing/IndentOutdentCommand.cpp:
3424         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
3425         * editing/InsertParagraphSeparatorCommand.cpp:
3426         (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
3427         * editing/ModifySelectionListLevel.cpp:
3428         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
3429         * editing/SplitElementCommand.cpp:
3430         (WebCore::SplitElementCommand::doApply): Ditto.
3431         * editing/markup.cpp:
3432         (WebCore::createFragmentFromText): Ditto.
3433         * svg/SVGUseElement.cpp:
3434         (WebCore::SVGUseElement::buildShadowTree): Ditto.
3435         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
3436
3437 2009-03-12  Dirk Schulze  <krit@webkit.org>
3438
3439         Reviewed by Oliver Hunt.
3440
3441         Fixed a crash on the 1x1 pixel check for background image in gtk.
3442         We need to load the image first and need to be sure that the image
3443         is not null before checking the type. 
3444
3445         * platform/graphics/cairo/ImageCairo.cpp:
3446         (WebCore::BitmapImage::checkForSolidColor):
3447
3448 2009-03-12  Xan Lopez  <xlopez@igalia.com>
3449
3450         Reviewed by Alexey Proskuryakov.
3451
3452         https://bugs.webkit.org/show_bug.cgi?id=24544
3453         Rename setUrl to setURL
3454
3455         Use proper case for setUrl method, rename it to setURL.
3456
3457         * platform/network/ResourceResponseBase.cpp:
3458         (WebCore::ResourceResponseBase::adopt):
3459         * platform/network/ResourceResponseBase.h:
3460         * platform/network/curl/ResourceHandleManager.cpp:
3461         (WebCore::writeCallback):
3462         (WebCore::headerCallback):
3463         * platform/network/soup/ResourceHandleSoup.cpp:
3464         (WebCore::fillResponseFromMessage):
3465         (WebCore::queryInfoCallback):
3466
3467 2009-03-12  Xan Lopez  <xlopez@igalia.com>
3468
3469         Reviewed by Alexey Proskuryakov.
3470
3471         https://bugs.webkit.org/show_bug.cgi?id=24519
3472         [GTK] Use two argument KURL ctor in ResourceHandleSoup
3473
3474         Use two argument KURL ctor, the single argument ctor expects its
3475         input to be the output of a previous KURL::parse call, which is
3476         not the case here.
3477
3478         * platform/network/soup/ResourceHandleSoup.cpp:
3479         (WebCore::fillResponseFromMessage):
3480         (WebCore::queryInfoCallback):
3481
3482 2009-03-11  Jon Honeycutt  <jhoneycutt@apple.com>
3483
3484         Fix for <rdar://6418681>
3485         https://bugs.webkit.org/show_bug.cgi?id=22644
3486
3487         Reviewed by Steve Falkenburg.
3488
3489         * plugins/win/PluginPackageWin.cpp:
3490         (WebCore::PluginPackage::isPluginBlacklisted): Add the Citrix ICA
3491         Client plug-in to the blacklist; it requires a Mozilla-based browser.
3492
3493 2009-03-12  Oliver Hunt  <oliver@apple.com>
3494
3495         Reviewed by NOBODY (build fix).
3496
3497         build fix.
3498
3499         * html/CanvasRenderingContext2D.h:
3500
3501 2009-03-11  Oliver Hunt  <oliver@apple.com>
3502
3503         Reviewed by Adele Peterson.
3504
3505         <rdar://problem/6673852> Widget "Simple World Clock" does not display with Safari 4
3506
3507         A number of dashboard widgets rely on canvas failing silently when given invalid
3508         colors for gradient stops, but both the spec and firefox throw exceptions here.
3509         So we work around this by creating a dashboard quirk that will only suppress the
3510         exception in dashboard compatibility mode.
3511
3512         Test: fast/canvas/canvas-gradient-addStop-error.html
3513
3514         * html/CanvasGradient.cpp:
3515         (WebCore::CanvasGradient::CanvasGradient):
3516         (WebCore::CanvasGradient::addColorStop):
3517         * html/CanvasGradient.h:
3518         (WebCore::CanvasGradient::setDashboardCompatibilityMode):
3519         * html/CanvasRenderingContext2D.cpp:
3520         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
3521         (WebCore::CanvasRenderingContext2D::createLinearGradient):
3522         (WebCore::CanvasRenderingContext2D::createRadialGradient):
3523         * html/CanvasRenderingContext2D.h:
3524
3525 2009-03-11  David Kilzer  <ddkilzer@apple.com>
3526
3527         Clarify comments regarding order of FEATURE_DEFINES
3528
3529         Rubber-stamped by Mark Rowe.
3530
3531         * Configurations/WebCore.xcconfig: Added warning about the
3532         consequences when FEATURE_DEFINES are not kept in sync.
3533
3534 2009-03-11  Gustavo Noronha Silva  <gns@gnome.org>
3535
3536         Reviewed by Holger Freyther.
3537
3538         https://bugs.webkit.org/show_bug.cgi?id=24515
3539         [GTK] soup backend should use GMappedFile instead of mmap directly
3540
3541         Rewrite mmap code used to upload files to use GMappedFile, so that
3542         it is platform-independent.
3543
3544         * platform/network/soup/ResourceHandleSoup.cpp:
3545         (WebCore::ResourceHandle::startHttp):
3546
3547 2009-03-11  Dan Bernstein  <mitz@apple.com>
3548
3549         Reviewed by Darin Adler.
3550
3551         - WebCore part of fixing <rdar://problem/3919124> Thai text selection
3552           in Safari is incorrect
3553
3554         Test: platform/mac/editing/selection/word-thai.html
3555
3556         Tested on Mac, but should work on all ICU platforms (or more precisely
3557         on all platforms that implement
3558         WTF::Unicode::hasLineBreakingPropertyComplexContext() correctly).
3559
3560         * editing/TextIterator.cpp:
3561         (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator):
3562         Added.
3563         (WebCore::BackwardsCharacterIterator::range): Added.
3564         (WebCore::BackwardsCharacterIterator::advance): Added.
3565
3566         * editing/TextIterator.h: Added BackwardsCharacterIterator with the
3567         minimal functionality required for this patch.
3568         (WebCore::BackwardsCharacterIterator::atEnd): Added.
3569
3570         * editing/visible_units.cpp:
3571         (WebCore::firstNonComplexContextLineBreak): Added this helper function
3572         that returns the index of the first character in the string whose
3573         Unicode line breaking property value is not SA ("Complex Context"), or
3574         the length of the string if there is no such character.