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