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