685e913b46d9960f6973212f5fadb1001ec0892d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-06-03  Chris Rogers  <crogers@google.com>
2
3         Unreviewed build fix.
4
5         Fix clang build - take 2
6         https://bugs.webkit.org/show_bug.cgi?id=62081
7
8         * webaudio/AudioParamTimeline.cpp:
9         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
10
11 2011-06-03  Chris Rogers  <crogers@google.com>
12
13         Unreviewed clang build fix.
14
15         Fix clang build
16         https://bugs.webkit.org/show_bug.cgi?id=62080
17
18         * webaudio/AudioParamTimeline.cpp:
19         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
20
21 2011-06-03  Levi Weintraub  <leviw@chromium.org>
22
23         Reviewed by Eric Seidel.
24
25         Switch paintMask and paintObject to use IntPoint
26         https://bugs.webkit.org/show_bug.cgi?id=62077
27
28         Switching paintMask and paintObject to use IntPoint for their paint offset instead of
29         a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize
30         passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&.
31
32         No new tests since this is simple refactoring.
33
34         * rendering/RenderBlock.cpp:
35         (WebCore::RenderBlock::paint):
36         (WebCore::RenderBlock::paintObject):
37         * rendering/RenderBlock.h:
38         * rendering/RenderBox.cpp:
39         (WebCore::RenderBox::paintMask):
40         (WebCore::RenderBox::pushContentsClip):
41         (WebCore::RenderBox::popContentsClip):
42         * rendering/RenderBox.h:
43         (WebCore::RenderBox::paintObject):
44         * rendering/RenderFieldset.cpp:
45         (WebCore::RenderFieldset::paintMask):
46         * rendering/RenderFieldset.h:
47         * rendering/RenderFileUploadControl.cpp:
48         (WebCore::RenderFileUploadControl::paintObject):
49         * rendering/RenderFileUploadControl.h:
50         * rendering/RenderListBox.cpp:
51         (WebCore::RenderListBox::paintObject):
52         * rendering/RenderListBox.h:
53         * rendering/RenderReplaced.cpp:
54         (WebCore::RenderReplaced::paint):
55         * rendering/RenderReplica.cpp:
56         (WebCore::RenderReplica::paint):
57         * rendering/RenderTable.cpp:
58         (WebCore::RenderTable::paint):
59         (WebCore::RenderTable::paintObject):
60         (WebCore::RenderTable::paintMask):
61         * rendering/RenderTable.h:
62         * rendering/RenderTableSection.cpp:
63         (WebCore::RenderTableSection::paint):
64         (WebCore::RenderTableSection::paintObject):
65         * rendering/RenderTableSection.h:
66         * rendering/RenderTextControl.cpp:
67         (WebCore::RenderTextControl::paintPlaceholder):
68         (WebCore::RenderTextControl::paintObject):
69         * rendering/RenderTextControl.h:
70         * rendering/RenderView.cpp:
71         (WebCore::RenderView::paint):
72         * rendering/RenderWidget.cpp:
73         (WebCore::RenderWidget::paint):
74
75 2011-06-03  Cary Clark  <caryclark@google.com>
76
77         Reviewed by Eric Seidel.
78
79         Support FontCustomPlatformData on Skia-Mac-Chrome variant
80         https://bugs.webkit.org/show_bug.cgi?id=62040
81
82         Canvas text is only recognized by Skia if it is registered
83         by creating a new SkTypeface. Skia uses CGFont to measure
84         and render the glyphs, then takes care of managing the glyph
85         cache.
86
87         Skia on Mac Chrome is not yet enabled, so this change
88         does not affect existing code, and requires no new tests.
89
90         * platform/graphics/mac/FontCustomPlatformData.cpp:
91         (WebCore::RemoteFontStream::RemoteFontStream):
92         (WebCore::RemoteFontStream::~RemoteFontStream):
93         (WebCore::RemoteFontStream::rewind):
94         (WebCore::RemoteFontStream::read):
95         Turn the buffer into a stream. This is identical to
96         the implementation in skia/FontCustomPlatformData.cpp.
97         While that file could be modified instead of this one,
98         it was simpler to add SkTypeface streaming to this instead
99         of adding all CGFont support to the skia platform file.
100
101         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
102         Release the SkTypeface reference.
103
104         (WebCore::createFontCustomPlatformData):
105         Associate the buffer stream with a SkTypeface so Skia
106         can find the custom font data.
107
108         * platform/graphics/mac/FontCustomPlatformData.h:
109         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
110         Add a slot to hold the SkTypeface.
111
112 2011-06-03  Steve Falkenburg  <sfalken@apple.com>
113
114         Reviewed by Brian Weinstein.
115
116         HistoryItem children persist across page loads
117         https://bugs.webkit.org/show_bug.cgi?id=62071
118         <rdar://problem/9552129>
119         
120         Not testable since there's no way to check for the presence/absence
121         of children for a HistoryItem.
122
123         * history/HistoryItem.cpp:
124         (WebCore::HistoryItem::reset): Call clearChildren when we're reusing a HistoryItem.
125
126 2011-06-03  Chris Rogers  <crogers@google.com>
127
128         Reviewed by Kenneth Russell.
129
130         Allow existing AudioParams to use scheduled parameter changes
131         https://bugs.webkit.org/show_bug.cgi?id=62046
132
133         No new tests since audio API is not yet implemented.
134
135         * platform/audio/AudioBus.cpp:
136         (WebCore::AudioBus::processWithGainFrom):
137         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
138         * platform/audio/AudioBus.h:
139         * webaudio/AudioBufferSourceNode.cpp:
140         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
141         * webaudio/AudioGainNode.cpp:
142         (WebCore::AudioGainNode::AudioGainNode):
143         (WebCore::AudioGainNode::process):
144         * webaudio/AudioGainNode.h:
145         * webaudio/HighPass2FilterNode.cpp:
146         (WebCore::HighPass2FilterNode::HighPass2FilterNode):
147         * webaudio/LowPass2FilterNode.cpp:
148         (WebCore::LowPass2FilterNode::LowPass2FilterNode):
149
150 2011-06-03  Chris Rogers  <crogers@google.com>
151
152         Reviewed by Kenneth Russell.
153
154         Biquad filter coefficient naming is incorrect
155         https://bugs.webkit.org/show_bug.cgi?id=62053
156
157         No new tests since audio API is not yet implemented.
158
159         * platform/audio/Biquad.cpp:
160         (WebCore::Biquad::Biquad):
161         (WebCore::Biquad::process):
162         (WebCore::Biquad::processFast):
163         (WebCore::Biquad::setLowpassParams):
164         (WebCore::Biquad::setHighpassParams):
165         (WebCore::Biquad::setLowShelfParams):
166         (WebCore::Biquad::setZeroPolePairs):
167         * platform/audio/Biquad.h:
168
169 2011-06-03  Adam Barth  <abarth@webkit.org>
170
171         Reviewed by Eric Seidel.
172
173         DOMWindow::setLocation doesn't understand that DOMWindow can be inactive
174         https://bugs.webkit.org/show_bug.cgi?id=62057
175
176         This code gets confused when dealing with inactive DOMWindows.  We
177         should just block inactive DOMWindows because there's no compatibility
178         reason to support them in this code path.
179
180         Test: http/tests/security/xss-DENIED-contentWindow-eval.html
181
182         * page/DOMWindow.cpp:
183         (WebCore::DOMWindow::isInsecureScriptAccess):
184
185 2011-05-31  Martin Robinson  <mrobinson@igalia.com>
186
187         Reviewed by Ryosuke Niwa.
188
189         [GTK] Support smart replace for the pasteboard
190         https://bugs.webkit.org/show_bug.cgi?id=61734
191
192         Add smart replace support to WebCore and add hooks for it in WebKit
193         via DumpRenderTreeSupportGtk. When a platform supports smart replace,
194         WebCore will remove extra spaces that appear when pasting text. Eventually
195         WebKitGTK+ may want to expose this in the public API.
196
197         * platform/gtk/PasteboardGtk.cpp:
198         (WebCore::Pasteboard::writeSelection): Now pass whether or not to use smart replace
199         when calling writeSelection.
200         (WebCore::Pasteboard::canSmartReplace): Added an implementation that checks the clipboard
201         for whether or not it supports smart paste.
202         * platform/gtk/PasteboardHelper.cpp:
203         (WebCore::initGdkAtoms): Added initialization for smart replace atom.
204         (WebCore::PasteboardHelper::fillSelectionData): Added no-op handler for smart replace atom.
205         (WebCore::PasteboardHelper::targetListForDataObject): Properly handle new smart replace parameter.
206         (WebCore::PasteboardHelper::writeClipboardContents): Properly handle new smart replace parameter.
207         (WebCore::PasteboardHelper::clipboardContentSupportsSmartReplace): Added helper for Pasteboard.
208         * platform/gtk/PasteboardHelper.h: Add new method definition.
209
210 2011-06-03  Levi Weintraub  <leviw@chromium.org>
211
212         Reviewed by Eric Seidel.
213
214         Switch paintCell to use IntPoint
215         https://bugs.webkit.org/show_bug.cgi?id=62033
216
217         Switching paintCell to take an IntPoint representing the paint offset
218         instead of a pair of ints.
219
220         No new tests since this is simple refactoring.
221
222         * rendering/RenderTableSection.cpp:
223         (WebCore::RenderTableSection::paintCell):
224         (WebCore::RenderTableSection::paintObject):
225         * rendering/RenderTableSection.h:
226
227 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
228
229         Reviewed by Dimitri Glazkov.
230
231         Teach Gtk build about window.internals
232         https://bugs.webkit.org/show_bug.cgi?id=61071
233
234         * GNUmakefile.am: Add new internals directories to the VPATH
235         (for idl processing) and the include list.
236
237 2011-06-03  Levi Weintraub  <leviw@chromium.org>
238
239         Reviewed by Eric Seidel.
240
241         Switch paintBackgroundsBehindCell to use IntPoint
242         https://bugs.webkit.org/show_bug.cgi?id=62031
243
244         Switching paintBackgroundsBehindCell to take an IntPoint representing
245         the paint offset instead of a pair of ints.
246
247         No new tests as this is simple refactoring.
248
249         * rendering/RenderTableCell.cpp:
250         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
251         (WebCore::RenderTableCell::paintBoxDecorations):
252         * rendering/RenderTableCell.h:
253         * rendering/RenderTableRow.cpp:
254         (WebCore::RenderTableRow::paint):
255         * rendering/RenderTableSection.cpp:
256         (WebCore::RenderTableSection::paintCell):
257
258 2011-06-03  Levi Weintraub  <leviw@chromium.org>
259
260         Reviewed by Eric Seidel.
261
262         Switch paintCaret and paintDragCaret to use IntPoint
263         https://bugs.webkit.org/show_bug.cgi?id=62037
264
265         Switching paintCaret and paintDragCaret to use an IntPoint representing
266         the paint offset instead of a pair of ints.
267
268         No new tests since this is simple refactoring.
269
270         * editing/FrameSelection.cpp:
271         (WebCore::FrameSelection::paintCaret):
272         (WebCore::CaretBase::paintCaret):
273         (WebCore::DragCaretController::paintDragCaret):
274         * editing/FrameSelection.h:
275         * rendering/RenderBlock.cpp:
276         (WebCore::RenderBlock::paintCaret):
277         (WebCore::RenderBlock::paintObject):
278         (WebCore::RenderBlock::positionForPoint):
279         (WebCore::RenderBlock::offsetForContents):
280         * rendering/RenderBlock.h:
281
282 2011-06-03  Levi Weintraub  <leviw@chromium.org>
283
284         Reviewed by Eric Seidel.
285
286         Switch paintItemForeground and paintItemForeground to use IntPoint
287         https://bugs.webkit.org/show_bug.cgi?id=62035
288
289         Switching paintItemFore/Background to use IntPoint instead of a pair of ints.
290
291         No new tests since this is simple refactoring.
292
293         * rendering/RenderListBox.cpp:
294         (WebCore::RenderListBox::paintObject):
295         (WebCore::RenderListBox::paintItemForeground):
296         (WebCore::RenderListBox::paintItemBackground):
297         * rendering/RenderListBox.h:
298
299 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
300
301         Reviewed by Andreas Kling.
302
303         To support building namespaced Qt, we require that forward-declarations
304         of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE.
305
306         * platform/network/qt/QtMIMETypeSniffer.h:
307
308 2011-06-03  Rob Buis  <rbuis@rim.com>
309
310         Reviewed by Nikolas Zimmermann.
311
312         Cleanup member variable usage in svg/animation classes
313         https://bugs.webkit.org/show_bug.cgi?id=62029
314
315         Cleanup member variables.
316
317         * svg/animation/SMILTimeContainer.cpp:
318         (WebCore::SMILTimeContainer::SMILTimeContainer):
319         (WebCore::SMILTimeContainer::sampleAnimationAtTime):
320         (WebCore::SMILTimeContainer::updateAnimations):
321         * svg/animation/SMILTimeContainer.h:
322         * svg/animation/SVGSMILElement.cpp:
323         (WebCore::SVGSMILElement::SVGSMILElement):
324         * svg/animation/SVGSMILElement.h:
325
326 2011-06-03  Chris Rogers  <crogers@google.com>
327
328         Reviewed by Kenneth Russell.
329
330         Add AudioParam parameter scheduling implementation
331         https://bugs.webkit.org/show_bug.cgi?id=61830
332
333         No new tests since audio API is not yet implemented.
334
335         * WebCore.gypi:
336         * WebCore.xcodeproj/project.pbxproj:
337         * webaudio/AudioParam.cpp:
338         (WebCore::AudioParam::value):
339         (WebCore::AudioParam::smoothedValue):
340         (WebCore::AudioParam::smooth):
341         (WebCore::AudioParam::calculateSampleAccurateValues):
342         * webaudio/AudioParam.h:
343         (WebCore::AudioParam::setContext):
344         (WebCore::AudioParam::context):
345         (WebCore::AudioParam::setValueAtTime):
346         (WebCore::AudioParam::linearRampToValueAtTime):
347         (WebCore::AudioParam::exponentialRampToValueAtTime):
348         (WebCore::AudioParam::setTargetValueAtTime):
349         (WebCore::AudioParam::setValueCurveAtTime):
350         (WebCore::AudioParam::cancelScheduledValues):
351         (WebCore::AudioParam::hasTimelineValues):
352         * webaudio/AudioParam.idl:
353         * webaudio/AudioParamTimeline.cpp: Added.
354         (WebCore::AudioParamTimeline::setValueAtTime):
355         (WebCore::AudioParamTimeline::linearRampToValueAtTime):
356         (WebCore::AudioParamTimeline::exponentialRampToValueAtTime):
357         (WebCore::AudioParamTimeline::setTargetValueAtTime):
358         (WebCore::AudioParamTimeline::setValueCurveAtTime):
359         (WebCore::isValidNumber):
360         (WebCore::AudioParamTimeline::insertEvent):
361         (WebCore::AudioParamTimeline::cancelScheduledValues):
362         (WebCore::AudioParamTimeline::valueForContextTime):
363         (WebCore::AudioParamTimeline::valuesForTimeRange):
364         (WebCore::timeToSampleFrame):
365         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
366         * webaudio/AudioParamTimeline.h: Added.
367         (WebCore::AudioParamTimeline::AudioParamTimeline):
368         (WebCore::AudioParamTimeline::hasValues):
369         (WebCore::AudioParamTimeline::ParamEvent::ParamEvent):
370         (WebCore::AudioParamTimeline::ParamEvent::type):
371         (WebCore::AudioParamTimeline::ParamEvent::value):
372         (WebCore::AudioParamTimeline::ParamEvent::time):
373         (WebCore::AudioParamTimeline::ParamEvent::timeConstant):
374         (WebCore::AudioParamTimeline::ParamEvent::duration):
375         (WebCore::AudioParamTimeline::ParamEvent::curve):
376
377 2011-06-01  Jer Noble  <jer.noble@apple.com>
378
379         Reviewed by Simon Fraser.
380
381         Flash of broken page when exiting full screen at jerryseinfeld.com
382         https://bugs.webkit.org/show_bug.cgi?id=61897
383         <rdar://problem/9522985>
384
385         Test: fullscreen/full-screen-placeholder.html
386
387         Entering full-screen mode is causing the page layout to change because the full-screen
388         element is taken out of the normal flow.  To counteract this effect, insert a placeholder
389         block as a parent of the full-screen renderer with the same size and style as the full-screen
390         element pre-full-screen.
391
392         Only create a placeholder for block-level elements; the technique required for inline elements
393         would be vastly more complicated.
394
395         * dom/Document.cpp:
396         (WebCore::Document::webkitWillEnterFullScreenForElement): Create a placeholder
397             based on the size and style of the full-screen element.
398         (WebCore::Document::setFullScreenRenderer): Persist the placeholder size and 
399             style across new renderers.
400         * rendering/RenderFullScreen.cpp:
401         (RenderFullScreen::RenderFullScreen): Added ivar.
402         (RenderFullScreen::destroy): Make sure to safely destroy our placeholder.
403         (RenderFullScreen::createPlaceholder): Added.
404         * rendering/RenderFullScreen.h:
405         (WebCore::RenderFullScreen::placeholder): Ivar accessor.
406
407 2011-06-03  Levi Weintraub  <leviw@chromium.org>
408
409         Reviewed by Eric Seidel.
410
411         Switch paintBoxDecorations to IntPoint
412         https://bugs.webkit.org/show_bug.cgi?id=61968
413
414         Switching paintBoxDecorations to take an IntPoint representing
415         the paint offset instead of a pair of ints. Also cleaning up
416         some duplicated code in InlineFlowBox related to constraining
417         the paint rect to the linetop and linebottom.
418
419         No new tests since this is just refactoring.
420
421         * rendering/InlineFlowBox.cpp:
422         (WebCore::InlineFlowBox::paint):
423         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded): Added
424         to remove duplicate code in paintBoxDecorations and paintMask.
425         (WebCore::InlineFlowBox::paintBoxDecorations):
426         (WebCore::InlineFlowBox::paintMask):
427         * rendering/InlineFlowBox.h:
428         * rendering/RenderBlock.cpp:
429         (WebCore::RenderBlock::paintObject):
430         * rendering/RenderBox.cpp:
431         (WebCore::RenderBox::paintBoxDecorations):
432         * rendering/RenderBox.h:
433         * rendering/RenderFieldset.cpp:
434         (WebCore::RenderFieldset::paintBoxDecorations):
435         * rendering/RenderFieldset.h:
436         * rendering/RenderReplaced.cpp:
437         (WebCore::RenderReplaced::paint):
438         * rendering/RenderTable.cpp:
439         (WebCore::RenderTable::paintObject):
440         (WebCore::RenderTable::paintBoxDecorations):
441         * rendering/RenderTable.h:
442         * rendering/RenderTableCell.cpp:
443         (WebCore::RenderTableCell::paintBoxDecorations):
444         * rendering/RenderTableCell.h:
445         * rendering/RenderView.cpp:
446         (WebCore::RenderView::paintBoxDecorations):
447         * rendering/RenderView.h:
448         * rendering/RenderWidget.cpp:
449         (WebCore::RenderWidget::paint):
450         * rendering/svg/RenderSVGRoot.cpp:
451         (WebCore::RenderSVGRoot::paint):
452
453 2011-06-03  Doreen Jiang  <doreen.jiang@nokia.com>
454
455         Reviewed by Benjamin Poulain.
456
457         [Qt]The minimum size of the select menu list is incorrect for qtwebkit
458         https://bugs.webkit.org/show_bug.cgi?id=56752
459
460         The minimum width of the select-box is calculated to be as small as possible 
461         instead of hardcoded value (width of 7 characters) in minimumMenuListSize() function
462         This will avoid overapping the select lists in popular websites.
463
464         Test: fast/forms/selectlist-minsize.html
465
466         * platform/qt/RenderThemeQt.cpp:
467         (WebCore::RenderThemeQt::minimumMenuListSize):
468
469 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
470
471         Reviewed by Darin Adler.
472
473         Prevent event dispatch for events with related target when host is the target.
474         https://bugs.webkit.org/show_bug.cgi?id=61979
475
476         Turns out, even if we trim the ancestor chain to 0, the event is still dispatched during AT_TARGET.
477         So might as well be explicit about what we are trying to do and add a flag to prevent dispatch in these cases.
478
479         * dom/EventDispatcher.cpp:
480         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added preventing dispatch when the ancestor chain is trimmed to nothing.
481         (WebCore::EventDispatcher::EventDispatcher): Added initializer.
482         (WebCore::EventDispatcher::dispatchEvent): Added a check to prevent dispatch.
483         * dom/EventDispatcher.h: Added a def.
484
485 2011-06-03  Dan Bernstein  <mitz@apple.com>
486
487         Mac build fix.
488
489         * WebCore.xcodeproj/project.pbxproj:
490
491 2011-06-03  Naoki Takano  <takano.naoki@gmail.com>
492
493         Reviewed by Eric Seidel.
494
495         [Chromium] Call setToolTipText() in WebPopupMenuImpl mouse move handler to show tool tip in select popup window.
496         https://bugs.webkit.org/show_bug.cgi?id=61260
497         http://code.google.com/p/chromium/issues/detail?id=12721
498
499         Manual test: select-popup-tooltip-test.html
500
501         * manual-tests/select-popup-tooltip-test.html: Added.
502         * platform/chromium/PopupMenuChromium.cpp:
503         (WebCore::PopupContainer::getSelectedItemToolTip): Get selected item tooltip string according to hovering mouse position.
504         * platform/chromium/PopupMenuChromium.h: Add getSelectedItemToolTip() declaration.
505
506 2011-06-03  Rob Buis  <rbuis@rim.com>
507
508         Reviewed by Nikolas Zimmermann.
509
510         Creating <animateMotion> elements via javascript do not execute
511         https://bugs.webkit.org/show_bug.cgi?id=34301
512
513         Enable constructors for SVGMPathElement and SVGAnimateMotionElement.
514
515         * DerivedSources.cpp:
516         * DerivedSources.make:
517         * GNUmakefile.list.am:
518         * WebCore.gypi:
519         * WebCore.vcproj/WebCore.vcproj:
520         * WebCore.xcodeproj/project.pbxproj:
521         * page/DOMWindow.idl:
522
523 2011-06-03  Hans Wennborg  <hans@chromium.org>
524
525         Reviewed by Steve Block.
526
527         IndexedDB: Clean-up use of INT64_MAX in LevelDB back-end
528         https://bugs.webkit.org/show_bug.cgi?id=62009
529
530         This constant should only be needed inside IDBLevelDBCoding.cpp.
531
532         No new functionality, no new tests.
533
534         * storage/IDBLevelDBBackingStore.cpp:
535         (WebCore::getNewDatabaseId):
536         (WebCore::IDBLevelDBBackingStore::getObjectStores):
537         (WebCore::getNewObjectStoreId):
538         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
539         (WebCore::getNewIndexId):
540         * storage/IDBLevelDBCoding.cpp:
541         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
542         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
543         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
544         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
545         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
546         * storage/IDBLevelDBCoding.h:
547
548 2011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
549
550         Reviewed by Benjamin Poulain.
551
552         [Qt] Build flag for experimental ICU library support
553         https://bugs.webkit.org/show_bug.cgi?id=60786
554
555         Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental 
556         ICU powered Unicode support. 
557
558         No new tests as no new features added.
559
560         * WebCore.pri: Removed text_breaking_with_icu CONFIG flag. 
561         * WebCore.pro: Added TextCodecICU.cpp and qt/TextBreakIteratorInternalICUQt.cpp.
562         * editing/qt/SmartReplaceQt.cpp:
563         * features.pri: Support for use_system_icu CONFIG flag.
564         * platform/text/TextCodecICU.cpp: Guard with USE(ICU_UNICODE). 
565         * platform/text/qt/TextBreakIteratorInternalICUQt.cpp: Added.
566         (WebCore::Q_GLOBAL_STATIC_WITH_INITIALIZER):
567         (WebCore::currentSearchLocaleID):
568         (WebCore::currentTextBreakLocaleID):
569         * platform/text/qt/TextBreakIteratorQt.cpp: Moved out currentTextBreakLocaleID(). 
570         (WebCore::isTextBreak):
571         * platform/text/qt/TextCodecQt.cpp: Guard with USE(QT4_UNICODE). 
572         (WebCore::TextCodecQt::registerEncodingNames):
573         (WebCore::TextCodecQt::registerCodecs):
574
575 2011-06-03  Yael Aharon  <yael.aharon@nokia.com>
576
577         Reviewed by Kenneth Rohde Christiansen.
578
579         Frame flattening is broken with nested frames
580         https://bugs.webkit.org/show_bug.cgi?id=61491
581
582         Do not flatten offscreen iframes during frame flattening, as flattening might make them visible.
583
584         Test: fast/frames/flattening/iframe-flattening-out-of-view.html
585               fast/frames/flattening/iframe-flattening-out-of-view-and-scroll.html
586               fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout.html
587
588         * rendering/RenderIFrame.cpp:
589         (WebCore::RenderIFrame::flattenFrame):
590
591 2011-06-03  Nikolas Zimmermann  <nzimmermann@rim.com>
592
593         Reviewed by Andreas Kling.
594
595         Incorrect embedded document replaced size calculation for box-sizing: border-box
596         https://bugs.webkit.org/show_bug.cgi?id=62007
597
598         When using <object style="box-sizing: border-box" data="foo.svg"/> to embed foo.svg
599         which has an intrinsic width/height, the embedded document intrinsic size is incorrect.
600
601         RenderPart::computeEmbeddedDocumentReplacedWidth/Height has to ask the content renderer for the replaced width/height not ourselves.
602
603         Tests: svg/as-image/img-preserveAspectRatio-support-2.html
604                svg/as-object/object-box-sizing-no-width-height.html
605
606         * rendering/RenderPart.cpp:
607         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
608         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
609
610 2011-06-03  Sheriff Bot  <webkit.review.bot@gmail.com>
611
612         Unreviewed, rolling out r88004.
613         http://trac.webkit.org/changeset/88004
614         https://bugs.webkit.org/show_bug.cgi?id=62008
615
616         This patch broke 4 tests in the GTK bots (Requested by
617         msanchez on #webkit).
618
619         * accessibility/gtk/AXObjectCacheAtk.cpp:
620         (WebCore::AXObjectCache::handleScrolledToAnchor):
621
622 2011-06-03  Nikolas Zimmermann  <nzimmermann@rim.com>
623
624         Reviewed by Andreas Kling.
625
626         Zooming <object style="width/height: auto" data="foo.svg"/> doesn't work as expected
627         https://bugs.webkit.org/show_bug.cgi?id=62005
628
629         Zooming an object with auto size, that references a svg with fixed size was broken. The svg size stayed the same.
630         Get rid of the dependency between RenderSVGRoot and SVGSVGElement::currentScale(), always ask for the effective
631         zoom in the RenderStyle instead of asking SVGSVGElement.
632
633         The SVGSVGElement::currentScale()/setCurrentScale() methods are now only used when called from the bindings (eg. JS).
634         They only take effect on the outermost <svg> element in standalone documents, otherwhise they are no-ops.
635
636         Test: svg/zoom/page/zoom-svg-through-object-with-auto-size.html
637
638         * rendering/svg/RenderSVGRoot.cpp:
639         (WebCore::RenderSVGRoot::computeIntrinsicWidth):
640         (WebCore::RenderSVGRoot::computeIntrinsicHeight):
641         (WebCore::RenderSVGRoot::localToBorderBoxTransform):
642         * svg/SVGSVGElement.cpp:
643         (WebCore::SVGSVGElement::SVGSVGElement):
644         (WebCore::SVGSVGElement::currentScale):
645         (WebCore::SVGSVGElement::setCurrentScale):
646         * svg/SVGSVGElement.h:
647
648 2011-06-03  Mario Sanchez Prada  <msanchez@igalia.com>
649
650         Reviewed by Martin Robinson.
651
652         Focus and caret position should be updated when same-page links are followed
653         https://bugs.webkit.org/show_bug.cgi?id=59737
654
655         Update the caret position to the anchor's position after scrolling.
656
657         This behavior is specific to the Gtk port and requested because of
658         accessibility needs, that's why it's implemented in AXObjectCache.
659
660         Test: platform/gtk/accessibility/caret-browsing-anchor-followed.html
661
662         * accessibility/gtk/AXObjectCacheAtk.cpp:
663         (WebCore::AXObjectCache::handleScrolledToAnchor): Make sure the
664         caret is updated to be in the anchor's position after scrolling.
665
666 2011-06-03  Dominic Cooney  <dominicc@chromium.org>
667
668         Reviewed by Kent Tamura.
669
670         Cloned keygen shadows should have -webkit-keygen-select pseudoclass.
671         https://bugs.webkit.org/show_bug.cgi?id=61984
672
673         When cloneNode's tag name-based cloning algorithm clones the
674         KeygenSelectElements of a keygen shadow as select elements. These
675         lack the -webkit-keygen-select pseudoclass.
676
677         Test: fast/html/clone-keygen.html
678
679         * html/HTMLKeygenElement.cpp:
680         (WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Create a KeygenSelectElement when being cloned.
681
682 2011-06-02  MORITA Hajime  <morrita@google.com>
683         
684         Unreviewed ChangeLog fix.
685         
686 2011-06-03  Peter Varga  <pvarga@webkit.org>
687
688         Rubber-stamped by Csaba Osztrogonác.
689         
690         [Qt][V8] Buildfix after r87988.
691
692         No new tests needed.
693
694         * bindings/v8/ScheduledAction.cpp: Add missing guards.
695         (WebCore::ScheduledAction::execute):
696         * bindings/v8/V8EventListener.cpp: Ditto.
697         (WebCore::V8EventListener::callListenerFunction):
698
699 2011-06-03  Dominic Cooney  <dominicc@chromium.org>
700
701         Reviewed by Kent Tamura.
702
703         Cloned range input sliders should be SliderThumbElements, not divs.
704         https://bugs.webkit.org/show_bug.cgi?id=61982
705
706         Test: fast/html/clone-range.html
707
708         * html/shadow/SliderThumbElement.h:
709         (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Create a SliderThumbElement when being cloned.
710
711 2011-06-02  Yury Semikhatsky  <yurys@chromium.org>
712
713         Reviewed by Pavel Feldman.
714
715         Web Inspector: add an option for automatically attaching to new workers
716         https://bugs.webkit.org/show_bug.cgi?id=61930
717
718         Worker list is extended with a checkbox that makes inspector attach to each
719         new worker. Whenever a new worker context starts a new inspector window will
720         be opened for it.
721
722         Also worker agent and worker list will be updated when worker context is terminated.
723
724         * inspector/Inspector.json:
725         * inspector/InspectorController.cpp:
726         (WebCore::InspectorController::InspectorController):
727         * inspector/InspectorInstrumentation.cpp:
728         (WebCore::InspectorInstrumentation::workerContextTerminatedImpl):
729         * inspector/InspectorInstrumentation.h:
730         (WebCore::InspectorInstrumentation::workerContextTerminated):
731         * inspector/InspectorWorkerAgent.cpp:
732         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
733         (WebCore::InspectorWorkerAgent::create):
734         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
735         (WebCore::InspectorWorkerAgent::clearFrontend):
736         (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
737         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
738         (WebCore::InspectorWorkerAgent::workerContextTerminated):
739         * inspector/InspectorWorkerAgent.h:
740         * inspector/front-end/WorkerManager.js:
741         (WebInspector.WorkerManager.prototype._workerCreated):
742         (WebInspector.WorkerManager.prototype._workerTerminated):
743         (WebInspector.WorkerManager.prototype.openWorkerInspector):
744         (WebInspector.WorkerManager.prototype._openInspectorWindow):
745         (WebInspector.WorkerManager.prototype.reset):
746         (WebInspector.WorkerMessageForwarder.prototype.workerCreated):
747         (WebInspector.WorkerMessageForwarder.prototype.workerTerminated):
748         * inspector/front-end/WorkersSidebarPane.js:
749         (WebInspector.WorkerListSidebarPane):
750         (WebInspector.WorkerListSidebarPane.prototype._workerAdded):
751         (WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
752         (WebInspector.WorkerListSidebarPane.prototype._workersCleared):
753         (WebInspector.WorkerListSidebarPane.prototype._addWorker):
754         (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
755         (WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked):
756         * inspector/front-end/inspector.js:
757         (WebInspector.reset):
758
759 2011-06-02  Hayato Ito  <hayato@chromium.org>
760
761         Reviewed by Ryosuke Niwa.
762
763         Show a shadow root node itself in Node::traverseNextNodeAcrossFrame.
764         https://bugs.webkit.org/show_bug.cgi?id=61992
765
766         It's better to show a shadow root node itself for debugging.
767         Skipping it didn't add any values.
768
769         No new tests since the function is only available in debug builds.
770
771         * dom/Node.cpp:
772         (WebCore::traverseNextNodeAcrossFrame):
773
774 2011-06-02  James Robinson  <jamesr@chromium.org>
775
776         Unreviewed, rolling out r87901.
777         http://trac.webkit.org/changeset/87901
778         https://bugs.webkit.org/show_bug.cgi?id=61894
779
780         Might be responsible for performance regression on Chromium page cyclers, reverting to see...
781
782         * loader/DocumentLoader.h:
783         (WebCore::DocumentLoader::didTellClientAboutLoad):
784         (WebCore::DocumentLoader::haveToldClientAboutLoad):
785         * loader/FrameLoader.cpp:
786         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
787         * loader/ResourceLoadNotifier.cpp:
788         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
789
790 2011-06-02  Levi Weintraub  <leviw@chromium.org>
791
792         Reviewed by Eric Seidel.
793
794         Switch paintReplaced to use IntPoint
795         https://bugs.webkit.org/show_bug.cgi?id=61891
796
797         Switching paintReplaced to use IntPoint to represent the paint offset instead
798         of a pair of ints.
799
800         Also renaming the IntPoint flavor of IntRect::move to moveBy to clear up the
801         fact that the IntPoint is added as an offset as opposed to being relocated
802         to that point.
803
804         No tests because this is just a refactoring.
805
806         * page/FrameView.cpp:
807         (WebCore::FrameView::invalidateScrollbarRect):
808         (WebCore::FrameView::convertFromRenderer):
809         (WebCore::FrameView::convertToRenderer):
810         * platform/ScrollView.cpp:
811         (WebCore::ScrollView::wheelEvent):
812         * platform/ScrollbarThemeComposite.cpp:
813         (WebCore::ScrollbarThemeComposite::invalidatePart):
814         * platform/graphics/gpu/Texture.cpp
815         (WebCore::Texture::updateSubRect)
816         * platform/graphics/IntRect.h:
817         (WebCore::IntRect::moveBy):
818         * platform/mac/WidgetMac.mm:
819         (WebCore::Widget::paint):
820         * rendering/InlineFlowBox.cpp:
821         (WebCore::InlineFlowBox::paint):
822         * rendering/RenderBlock.cpp:
823         (WebCore::RenderBlock::logicalRectToPhysicalRect):
824         (WebCore::RenderBlock::selectionGaps):
825         * rendering/RenderBox.cpp:
826         (WebCore::RenderBox::offsetFromContainer):
827         (WebCore::RenderBox::computeRectForRepaint):
828         (WebCore::RenderBox::localCaretRect):
829         * rendering/RenderDetailsMarker.cpp:
830         (WebCore::RenderDetailsMarker::paint):
831         * rendering/RenderEmbeddedObject.cpp:
832         (WebCore::RenderEmbeddedObject::paintReplaced):
833         * rendering/RenderEmbeddedObject.h:
834         * rendering/RenderHTMLCanvas.cpp:
835         (WebCore::RenderHTMLCanvas::paintReplaced):
836         * rendering/RenderHTMLCanvas.h:
837         * rendering/RenderImage.cpp:
838         (WebCore::RenderImage::paintReplaced):
839         * rendering/RenderImage.h:
840         * rendering/RenderInline.cpp:
841         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
842         * rendering/RenderLayer.cpp:
843         (WebCore::expandClipRectForDescendantsAndReflection):
844         (WebCore::RenderLayer::paintScrollCorner):
845         (WebCore::RenderLayer::paintResizer):
846         (WebCore::RenderLayer::paintChildLayerIntoColumns):
847         (WebCore::RenderLayer::hitTestChildLayerColumns):
848         (WebCore::RenderLayer::boundingBox):
849         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
850         * rendering/RenderLayerBacking.cpp:
851         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
852         (WebCore::paintScrollbar):
853         (WebCore::RenderLayerBacking::paintContents):
854         * rendering/RenderLayerCompositor.cpp:
855         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
856         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
857         (WebCore::paintScrollbar):
858         (WebCore::RenderLayerCompositor::paintContents):
859         * rendering/RenderListBox.cpp:
860         (WebCore::RenderListBox::controlClipRect):
861         * rendering/RenderListItem.cpp:
862         (WebCore::RenderListItem::positionListMarker):
863         * rendering/RenderListMarker.cpp:
864         (WebCore::RenderListMarker::paint):
865         * rendering/RenderReplaced.cpp:
866         (WebCore::RenderReplaced::paint):
867         * rendering/RenderReplaced.h:
868         (WebCore::RenderReplaced::paintReplaced):
869         * rendering/RenderTableCell.cpp:
870         (WebCore::RenderTableCell::computeRectForRepaint):
871         * rendering/RenderTextControlSingleLine.cpp:
872         (WebCore::RenderTextControlSingleLine::controlClipRect):
873         * rendering/RenderVideo.cpp:
874         (WebCore::RenderVideo::paintReplaced):
875         * rendering/RenderVideo.h:
876         * rendering/RenderView.cpp:
877         (WebCore::RenderView::repaintViewRectangle):
878
879 2011-06-02  James Robinson  <jamesr@chromium.org>
880
881         Reviewed by Dimitri Glazkov.
882
883         [chromium][V8] Add trace events for timer fires and event listener dispatches
884         https://bugs.webkit.org/show_bug.cgi?id=61977
885
886         Adds TRACE_EVENT macro around timer and event listener dispatches.  When tracing (a chromium feature) is
887         enabled, this allows correlating these events with painting, compositing, and everything else in chromium that
888         is traced.  When tracing is disabled, this macro does nothing useful.  Trace points are very cheap when tracing
889         is disabled so this should have no performance impact for non-developers.
890
891         * bindings/v8/ScheduledAction.cpp:
892         (WebCore::ScheduledAction::execute):
893         * bindings/v8/V8EventListener.cpp:
894         (WebCore::V8EventListener::callListenerFunction):
895
896 2011-06-02  John Bates  <jbates@google.com>
897
898         Reviewed by James Robinson.
899
900         DrawingBufferChromium cleanup:
901         - Correct FIXME comment about synchronization.
902         - Remove unnecessary DrawingBufferInternal indirection struct
903           and its unused offscreenColorTexture member.
904         https://bugs.webkit.org/show_bug.cgi?id=61953
905
906         * platform/graphics/chromium/DrawingBufferChromium.cpp:
907         (WebCore::DrawingBuffer::DrawingBuffer):
908         (WebCore::DrawingBuffer::~DrawingBuffer):
909         (WebCore::DrawingBuffer::publishToPlatformLayer):
910         (WebCore::DrawingBuffer::didReset):
911         (WebCore::DrawingBuffer::platformLayer):
912         * platform/graphics/gpu/DrawingBuffer.h:
913
914 2011-06-02  Andrey Kosyakov  <caseq@chromium.org>
915
916         Reviewed by Pavel Feldman.
917
918         Web Inspector: ResourceCookiesView.resize() is missing
919         https://bugs.webkit.org/show_bug.cgi?id=61868
920
921         * inspector/front-end/ResourceCookiesView.js:
922         (WebInspector.ResourceCookiesView.prototype.resize):
923
924 2011-06-02  Kent Tamura  <tkent@chromium.org>
925
926         Reviewed by Dimitri Glazkov.
927
928         REGRESSION(r87014): Cloned text <input> doesn't work well.
929         https://bugs.webkit.org/show_bug.cgi?id=61909
930
931         The default implementation of Element::cloneNode() creates a clone
932         node by Document::createElement(). So, if a customized class is used for
933         shadow nodes, cloneNode() doesn't create a node of the correct class.
934         Such custom classes need to override Element::
935         cloneElementWithoutAttributesAndChildren().
936
937         TextFieldInputType and SearchInputType had references to shadow nodes
938         initialized in createShadowSubtree(). However createShadowSubtree() is
939         not called if the host node is cloned. The accessors for shadow nodes
940         should search a shadow tree.
941
942         Test: fast/forms/textfield-clone.html
943
944         * html/SearchInputType.cpp:
945           Remove data members for shadow nodes, and the accessors search the
946           shadow tree for the requested node by TreeScope::getElementById().
947         (WebCore::SearchInputType::SearchInputType):
948         (WebCore::innerBlockId):
949         (WebCore::resultButtonId):
950         (WebCore::cancelButtonId):
951         (WebCore::SearchInputType::createShadowSubtree):
952         (WebCore::SearchInputType::innerBlockElement):
953         (WebCore::SearchInputType::resultsButtonElement):
954         (WebCore::SearchInputType::cancelButtonElement):
955         * html/SearchInputType.h:
956         * html/TextFieldInputType.cpp: ditto.
957         (WebCore::TextFieldInputType::TextFieldInputType):
958         (WebCore::TextFieldInputType::innerTextId):
959         (WebCore::spinButtonId):
960         (WebCore::TextFieldInputType::speechButtonId):
961         (WebCore::TextFieldInputType::appendChildAndSetId):
962         (WebCore::TextFieldInputType::createShadowSubtree):
963         (WebCore::TextFieldInputType::getShadowElementById):
964         (WebCore::TextFieldInputType::innerTextElement):
965         (WebCore::TextFieldInputType::innerSpinButtonElement):
966         (WebCore::TextFieldInputType::speechButtonElement):
967         * html/TextFieldInputType.h:
968         * html/shadow/TextControlInnerElements.cpp:
969           Overrides cloneElementWithoutAttributesAndChildren() in order that cloneNode()
970           produces an instance of the correct class.
971         (WebCore::TextControlInnerElement::cloneElementWithoutAttributesAndChildren):
972         (WebCore::TextControlInnerTextElement::cloneElementWithoutAttributesAndChildren):
973         (WebCore::SearchFieldResultsButtonElement::cloneElementWithoutAttributesAndChildren):
974         (WebCore::SearchFieldCancelButtonElement::cloneElementWithoutAttributesAndChildren):
975         (WebCore::SpinButtonElement::cloneElementWithoutAttributesAndChildren):
976         (WebCore::InputFieldSpeechButtonElement::cloneElementWithoutAttributesAndChildren):
977         * html/shadow/TextControlInnerElements.h:
978
979 2011-05-28  Martin Robinson  <mrobinson@igalia.com>
980
981         Reviewed by Gustavo Noronha Silva.
982
983         [GTK] Remove PasteboardHelperGtk
984         https://bugs.webkit.org/show_bug.cgi?id=61690
985
986         Remove the virtual methods from PasteboardHelper, so that PasteboardHelperGtk
987         can be removed. Since the GtkClipboard IDs are verified to be the same between
988         WebKit and WebCore we no longer need to communicate from WebCore to WebKit to
989         get them.
990
991         No new tests. This is just a code refactor.
992
993         * platform/Pasteboard.h: Remove GTK+ specific methods. They are no longer needed.
994         * platform/gtk/ClipboardGtk.cpp: Remove the m_helper member and access the
995         PasteboardHelper singleton directly.
996         * platform/gtk/ClipboardGtk.h: Ditto.
997         * platform/gtk/PasteboardGtk.cpp: Ditto.
998         * platform/gtk/PasteboardHelper.cpp:
999         (WebCore::removeMarkupPrefix): Remove an extra line.
1000         (WebCore::PasteboardHelper::defaultPasteboardHelper): Added this static getter
1001         for the singleton.
1002         (WebCore::PasteboardHelper::PasteboardHelper): Moved the contents of initTargetList here.
1003         (WebCore::PasteboardHelper::getCurrentClipboard): Instead of talking with WebKit to determine
1004         whether or not to use the primary selection clipboard, just use our new member.
1005         (WebCore::PasteboardHelper::fillSelectionData): Use our local enum to get the ID.
1006         (WebCore::PasteboardHelper::targetListForDataObject): Ditto.
1007         (WebCore::PasteboardHelper::dropAtomsForContext): Ditto.
1008         (WebCore::getClipboardContentsCallback): Ditto.
1009         * platform/gtk/PasteboardHelper.h: PasteboardHelper now keeps track of whether or
1010         not to use the primary selection clipboard internally.
1011         (WebCore::PasteboardHelper::setUsePrimarySelectionClipboard): Added.
1012         (WebCore::PasteboardHelper::usePrimarySelectionClipboard): Added.
1013
1014 2011-06-02  Levi Weintraub  <leviw@chromium.org>
1015
1016         Reviewed by Eric Seidel.
1017
1018         Teach InlineBox about FloatPoint
1019         https://bugs.webkit.org/show_bug.cgi?id=44412
1020
1021         Original patch by Eric Seidel. Updated by me.
1022
1023         This is another step towards more point/size
1024         usage throughout the rendering tree.
1025
1026         Added left(), right(), top(), and bottom() methods
1027         to InlineBox. Removed m_x, and m_y and replaced them
1028         with a single m_topLeft member.
1029
1030         No new tests since this is just a refactoring.
1031
1032         * rendering/EllipsisBox.cpp:
1033         (WebCore::EllipsisBox::paint):
1034         (WebCore::EllipsisBox::selectionRect):
1035         (WebCore::EllipsisBox::paintSelection):
1036         (WebCore::EllipsisBox::nodeAtPoint):
1037         * rendering/EllipsisBox.h:
1038         (WebCore::EllipsisBox::EllipsisBox):
1039         * rendering/InlineBox.cpp:
1040         (WebCore::InlineBox::adjustPosition):
1041         (WebCore::InlineBox::canAccommodateEllipsis):
1042         * rendering/InlineBox.h:
1043         (WebCore::InlineBox::InlineBox):
1044         (WebCore::InlineBox::setX):
1045         (WebCore::InlineBox::x):
1046         (WebCore::InlineBox::left):
1047         (WebCore::InlineBox::setY):
1048         (WebCore::InlineBox::y):
1049         (WebCore::InlineBox::top):
1050         (WebCore::InlineBox::topLeft):
1051         (WebCore::InlineBox::right):
1052         (WebCore::InlineBox::bottom):
1053         (WebCore::InlineBox::logicalLeft):
1054         (WebCore::InlineBox::setLogicalLeft):
1055         (WebCore::InlineBox::logicalTop):
1056         (WebCore::InlineBox::setLogicalTop):
1057         (WebCore::InlineBox::logicalFrameRect):
1058         * rendering/InlineFlowBox.h:
1059         (WebCore::InlineFlowBox::frameRectIncludingLineHeight):
1060         * rendering/InlineTextBox.cpp:
1061         (WebCore::InlineTextBox::placeEllipsisBox):
1062         (WebCore::InlineTextBox::paintTextMatchMarker):
1063         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1064         * rendering/RenderText.cpp:
1065         (WebCore::RenderText::firstRunX):
1066         (WebCore::RenderText::firstRunY):
1067         * rendering/RenderTreeAsText.cpp:
1068         (WebCore::writeTextRun):
1069         * rendering/RootInlineBox.cpp:
1070         (WebCore::RootInlineBox::placeEllipsis):
1071         * rendering/svg/RenderSVGText.cpp:
1072         (WebCore::RenderSVGText::positionForPoint):
1073         * rendering/svg/SVGInlineTextBox.h:
1074         (WebCore::SVGInlineTextBox::selectionTop):
1075         * rendering/svg/SVGRootInlineBox.cpp:
1076         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
1077
1078 2011-06-02  Jian Li  <jianli@chromium.org>
1079
1080         Reviewed by David Levin.
1081
1082         Update the behavior of multiple reads for FileReader
1083         https://bugs.webkit.org/show_bug.cgi?id=61793
1084
1085         Changed to throw an OperationNotAllowedException with the NOT_ALLOWED_ERR
1086         status code on any of the read methods that occur when readyState = LOADING.
1087         Otherwise, calling any of the read methods should work. 
1088
1089         Test: fast/files/read-file-async.html
1090
1091         * CodeGenerators.pri:
1092         * DerivedSources.cpp:
1093         * DerivedSources.make:
1094         * GNUmakefile.list.am:
1095         * WebCore.gypi:
1096         * WebCore.pro:
1097         * WebCore.vcproj/WebCore.vcproj:
1098         * WebCore.xcodeproj/project.pbxproj:
1099         * bindings/js/JSDOMBinding.cpp:
1100         (WebCore::setDOMException):
1101         * bindings/v8/V8Proxy.cpp:
1102         (WebCore::V8Proxy::setDOMException):
1103         * dom/ExceptionCode.cpp:
1104         (WebCore::getExceptionCodeDescription):
1105         * dom/ExceptionCode.h:
1106         * fileapi/FileReader.cpp:
1107         (WebCore::FileReader::FileReader):
1108         (WebCore::FileReader::hasPendingActivity):
1109         (WebCore::FileReader::readAsArrayBuffer):
1110         (WebCore::FileReader::readAsBinaryString):
1111         (WebCore::FileReader::readAsText):
1112         (WebCore::FileReader::readAsDataURL):
1113         (WebCore::FileReader::readInternal):
1114         (WebCore::FileReader::abort):
1115         (WebCore::FileReader::doAbort):
1116         (WebCore::FileReader::terminate):
1117         (WebCore::FileReader::start):
1118         (WebCore::FileReader::didStartLoading):
1119         (WebCore::FileReader::didFinishLoading):
1120         (WebCore::FileReader::didFail):
1121         * fileapi/FileReader.h:
1122         (WebCore::FileReader::readyState):
1123         * fileapi/FileReader.idl:
1124         * fileapi/OperationNotAllowedException.h: Added.
1125         (WebCore::OperationNotAllowedException::create):
1126         (WebCore::OperationNotAllowedException::OperationNotAllowedException):
1127         * fileapi/OperationNotAllowedException.idl: Added.
1128
1129 2011-06-02  Adrienne Walker  <enne@google.com>
1130
1131         Reviewed by James Robinson.
1132
1133         [chromium] Compositor HUD should respect mapTexSubImage2D returning NULL
1134         https://bugs.webkit.org/show_bug.cgi?id=61954
1135
1136         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1137         (WebCore::CCHeadsUpDisplay::draw):
1138
1139 2011-06-02  Brady Eidson  <beidson@apple.com>
1140
1141         Reviewed by Oliver Hunt.
1142
1143         <rdar://problem/9539920> and https://bugs.webkit.org/show_bug.cgi?id=61950
1144         Repro crash loading certain webarchives after r87566.
1145
1146         Test: webarchive/loading/javascript-url-iframe-crash.html
1147
1148         * bindings/ScriptControllerBase.cpp:
1149         (WebCore::ScriptController::executeIfJavaScriptURL): DocumentWriter::replaceDocument can
1150           cause the DocumentLoader to be destroyed, so protect it with a Ref here.
1151
1152 2011-06-02  Jay Civelli  <jcivelli@chromium.org>
1153
1154         Reviewed by Adam Barth.
1155
1156         Adding MHTML generation support to MHTMLArchive.
1157         https://bugs.webkit.org/show_bug.cgi?id=7169
1158
1159         * loader/archive/mhtml/MHTMLArchive.cpp:
1160         (WebCore::generateRandomBoundary):
1161         (WebCore::replaceNonPrintableCharacters):
1162         (WebCore::MHTMLArchive::generateMHTMLData):
1163         * loader/archive/mhtml/MHTMLArchive.h:
1164         * page/PageSerializer.cpp:
1165         (WebCore::PageSerializer::serializeFrame):
1166         (WebCore::PageSerializer::serializeCSSStyleSheet):
1167         * platform/SharedBuffer.cpp:
1168         (WebCore::SharedBuffer::append):
1169         * platform/SharedBuffer.h:
1170
1171 2011-06-02  Simon Fraser  <simon.fraser@apple.com>
1172
1173         Reviewed by Andreas Kling.
1174
1175         Share Path code that uses beziers to construct a rounded rect
1176         https://bugs.webkit.org/show_bug.cgi?id=61960
1177
1178         Have two methods in Path that construct beziers for rounded
1179         rects to share the same code.
1180         
1181         Make gCircleControlPoint a little more precise, and add
1182         a comment describing its derivation.
1183         
1184         Make use of FloatRect::maxX() and maxY().
1185
1186         * platform/graphics/Path.cpp:
1187         (WebCore::Path::addRoundedRect):
1188         (WebCore::Path::addBeziersForRoundedRect):
1189         * platform/graphics/Path.h:
1190
1191 2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>
1192
1193         Reviewed by Enrica Casucci.
1194
1195         ApplyStyleCommand shouldn't call collapseTextDecorationProperties
1196         https://bugs.webkit.org/show_bug.cgi?id=61887
1197
1198         Removed the call to collapseTextDecorationProperties in ApplyStyleCommand::applyInlineStyle.
1199
1200         No new tests because this is a code refactoring.
1201
1202         * editing/ApplyStyleCommand.cpp:
1203         (WebCore::ApplyStyleCommand::applyInlineStyle): No loner calls collapseTextDecorationProperties.
1204         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Updated comment.
1205         * editing/EditingStyle.cpp:
1206         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Added to check both text-decoration
1207         and -webkit-text-decorations-in-effect.
1208         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): Added a comment.
1209         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Checks both text-decoration
1210         and -webkit-text-decorations-in-effect.
1211         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Checks if a text decoration
1212         is present in -webkit-text-decorations-in-effect or text-decoration preferring the former.
1213         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Merged loops for when conflictingProperties
1214         is false and true. Added a support for -webkit-text-decorations-in-effect.
1215
1216 2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>
1217
1218         Reviewed by Eric Seidel.
1219
1220         Make more functions static local in EventHandlers.cpp
1221         https://bugs.webkit.org/show_bug.cgi?id=58503
1222
1223         Removed canHandleDragAndDropForTarget and made focusDirectionForKey local to EventHandler.cpp.
1224
1225         * page/EventHandler.cpp:
1226         (WebCore::targetIsFrame): Extracted from canHandleDragAndDropForTarget.
1227         (WebCore::EventHandler::updateDragAndDrop): Calls contentFrameForTarget instead of canHandleDragAndDropForTarget.
1228         (WebCore::EventHandler::cancelDragAndDrop): Ditto.
1229         (WebCore::EventHandler::performDragAndDrop): Ditto.
1230         (WebCore::focusDirectionForKey): No longer a member function of EventHandler class.
1231         (WebCore::handleKeyboardSelectionMovement): No longer a member function of EventHandler class; also calls
1232         focusDirectionForKey instead of manually comparing.
1233         * page/EventHandler.h:
1234
1235 2011-06-02  Alok Priyadarshi  <alokp@chromium.org>
1236
1237         Reviewed by James Robinson.
1238
1239         [chromium] Things jump around when selecting anything on the page
1240         https://bugs.webkit.org/show_bug.cgi?id=61639
1241
1242         WebCore::LayerTextureUpdaterSkPicture::updateTextureRect was not updating a tile sub-region properly.
1243         It did not consider dest-rect when selecting the clip and translation required to draw the content-rect into dest-rect.
1244         Also removed clearing of framebuffer because it used to clear the whole tile not just dest-rect.
1245         An appropriate viewport could be set to just clear the dest-rect, but it was debug only code and I did not want to mess
1246         with the viewport set by skia.
1247
1248         No new tests. This case should be covered by most of the layout tests (pixel) targeting selection or hovering when chromium is run in compositing mode.
1249         Here is a non-exhaustive list of existing tests covering this case.
1250         Test: editing/selection/14971.html (existing)
1251               editing/selection/3690703-2.html (existing)
1252               editing/selection/4402375.html (existing)
1253               editing/selection/4818145.html (existing)
1254
1255         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1256         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
1257         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
1258         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1259
1260 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
1261
1262         Reviewed by Darin Adler.
1263
1264         Add build logistics and plumbing for window.internals object.
1265         https://bugs.webkit.org/show_bug.cgi?id=60313
1266
1267         Test: fast/harness/internals-object.html
1268
1269         * Configurations/WebCoreTestSupport.xcconfig: Added.
1270         * DerivedSources.make: Added support for generating from Internals.idl.
1271         * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
1272         * WebCore.gypi: Ditto.
1273         * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
1274         * testing/Internals.cpp: Added.
1275         * testing/Internals.h: Added.
1276         * testing/Internals.idl: Added.
1277         * testing/js/WebCoreTestSupport.cpp: Added.
1278         * testing/js/WebCoreTestSupport.h: Added.
1279         * testing/v8/WebCoreTestSupport.cpp: Added.
1280         * testing/v8/WebCoreTestSupport.h: Added.
1281
1282 2011-06-01  Adrienne Walker  <enne@google.com>
1283
1284         Reviewed by Eric Seidel.
1285
1286         [chromium] LayerChromium should use a RefPtr for replica layer
1287         https://bugs.webkit.org/show_bug.cgi?id=61898
1288
1289         Having this member variable be a raw pointer is brittle and assumes
1290         that the GraphicsLayer tree keeps this in sync.  There aren't any
1291         known bugs caused by this, but it seems like good sense to do this.
1292
1293         * platform/graphics/chromium/LayerChromium.h:
1294         (WebCore::LayerChromium::replicaLayer):
1295
1296 2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>
1297
1298         Reviewed by Eric Seidel.
1299
1300         REGRESSION: inline style is lost when deleting line break between paragraphs with same style
1301         https://bugs.webkit.org/show_bug.cgi?id=61899
1302
1303         The bug was caused by ReplaceSelectionCommand::doApply's calling handleStyleSpansBeforeInsertion
1304         before insertionPos is adjusted by positionAvoidingPrecedingNodes and positionOutsideTabSpan.
1305
1306         Fixed the bug by calling handleStyleSpansBeforeInsertion after the calls to these two functions.
1307
1308         Test: editing/deleting/delete-line-break-between-paragraphs-with-same-style.html
1309
1310         * editing/ReplaceSelectionCommand.cpp:
1311         (WebCore::ReplaceSelectionCommand::doApply):
1312
1313 2011-06-01  Ryosuke Niwa  <rniwa@webkit.org>
1314
1315         Reviewed by Simon Fraser.
1316
1317         REGRESSION: Text selection broken for text with line-height applied
1318         https://bugs.webkit.org/show_bug.cgi?id=54929
1319
1320         The bug was caused by RenderText::positionForPoint's not considering the case where a point is
1321         above selectionTop and below lineTop of the first root inline box. Fixed the bug by considering
1322         any point between selectionTop and lineTop to be inside a root inline box. This condition is
1323         consistent with the condition we use to determine the bottom of a line.
1324
1325         Test: editing/selection/hit-test-on-text-with-line-height.html
1326
1327         * rendering/RenderBlock.cpp:
1328         (WebCore::RenderBlock::positionForPointWithInlineChildren): Fixed a condition to determine whether
1329         or not a point is above the first root line box. We need to check both selectionTop and logicalTop
1330         for the same reason explained above.
1331         * rendering/RenderText.cpp:
1332         (WebCore::RenderText::positionForPoint): See above.
1333
1334 2011-06-02  Andreas Kling  <kling@webkit.org>
1335
1336         Reviewed by James Robinson.
1337
1338         Canvas/V8: Fix setting strokeStyle or fillStyle to a CSS system color.
1339         https://bugs.webkit.org/show_bug.cgi?id=61944
1340
1341         Call setFillColor/setStrokeColor (instead of setFillStyle/setStrokeStyle)
1342         for string styles. This ensures that system color resolution is performed,
1343         and matches what the JSC bindings do.
1344
1345         Test: canvas/philip/tests/2d.fillStyle.parse.system.html
1346
1347         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1348         (WebCore::toCanvasStyle):
1349         (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter):
1350         (WebCore::V8CanvasRenderingContext2D::fillStyleAccessorSetter):
1351
1352 2011-06-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1353
1354         Unreviewed, rolling out r87920.
1355         http://trac.webkit.org/changeset/87920
1356         https://bugs.webkit.org/show_bug.cgi?id=61943
1357
1358         This patch does not build in Win Builder (dbg)(shared)
1359         downstream (Requested by abarth|gardener on #webkit).
1360
1361         * platform/chromium/PopupMenuChromium.cpp:
1362         (WebCore::PopupContainer::showPopup):
1363         (WebCore::PopupListBox::handleMouseReleaseEvent):
1364         (WebCore::PopupListBox::acceptIndex):
1365
1366 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
1367
1368         Unreviewed, rolling out r87926.
1369         http://trac.webkit.org/changeset/87926
1370         https://bugs.webkit.org/show_bug.cgi?id=60313
1371
1372         Fails to find WebCoreTestSupport.dylib on bots.
1373
1374         * Configurations/WebCore.xcconfig:
1375         * Configurations/WebCoreTestSupport.xcconfig: Removed.
1376         * DerivedSources.make:
1377         * WebCore.exp.in:
1378         * WebCore.gyp/WebCore.gyp:
1379         * WebCore.gypi:
1380         * WebCore.xcodeproj/project.pbxproj:
1381         * bindings/js/JSDOMWrapper.cpp:
1382         (WebCore::JSDOMWrapper::~JSDOMWrapper):
1383         * bindings/js/JSDOMWrapper.h:
1384         * testing/Internals.cpp: Removed.
1385         * testing/Internals.h: Removed.
1386         * testing/Internals.idl: Removed.
1387         * testing/js/WebCoreTestSupport.cpp: Removed.
1388         * testing/js/WebCoreTestSupport.h: Removed.
1389         * testing/v8/WebCoreTestSupport.cpp: Removed.
1390         * testing/v8/WebCoreTestSupport.h: Removed.
1391
1392 2011-06-02  Carlos Garcia Campos  <cgarcia@igalia.com>
1393
1394         Reviewed by Martin Robinson.
1395
1396         [GTK] Implement popup menus in Webkit2
1397         https://bugs.webkit.org/show_bug.cgi?id=61854
1398
1399         Move common code into a new class to be used by both WebKit1 and
1400         WebKit2.
1401
1402         * GNUmakefile.list.am: Add new files to compilation.
1403         * platform/gtk/GtkPopupMenu.cpp: Copied from Source/WebCore/platform/gtk/PopupMenuGtk.cpp.
1404         (WebCore::GtkPopupMenu::GtkPopupMenu):
1405         (WebCore::GtkPopupMenu::~GtkPopupMenu):
1406         (WebCore::GtkPopupMenu::clear): Remove all menu items.
1407         (WebCore::GtkPopupMenu::appendSeparator): Add a new separator
1408         item to the menu.
1409         (WebCore::GtkPopupMenu::appendItem): Add a new item to the menu for
1410         the given action.
1411         (WebCore::GtkPopupMenu::popUp): Show the menu.
1412         (WebCore::GtkPopupMenu::popDown): Hide the menu.
1413         (WebCore::GtkPopupMenu::menuRemoveItem):
1414         (WebCore::GtkPopupMenu::menuPositionFunction):
1415         (WebCore::GtkPopupMenu::resetTypeAheadFindState):
1416         (WebCore::GtkPopupMenu::typeAheadFind):
1417         (WebCore::GtkPopupMenu::selectItemCallback):
1418         (WebCore::GtkPopupMenu::keyPressEventCallback):
1419         * platform/gtk/GtkPopupMenu.h: Copied from Source/WebCore/platform/gtk/PopupMenuGtk.h.
1420         (WebCore::GtkPopupMenu::create):
1421         (WebCore::GtkPopupMenu::platformMenu):
1422         * platform/gtk/PopupMenuGtk.cpp:
1423         (WebCore::PopupMenuGtk::PopupMenuGtk):
1424         (WebCore::PopupMenuGtk::~PopupMenuGtk):
1425         (WebCore::PopupMenuGtk::show): Use GtkPopupMenu.
1426         (WebCore::PopupMenuGtk::hide): Ditto.
1427         (WebCore::PopupMenuGtk::menuItemActivated):
1428         (WebCore::PopupMenuGtk::menuUnmapped):
1429         * platform/gtk/PopupMenuGtk.h:
1430
1431 2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>
1432
1433         Reviewed by Darin Adler.
1434
1435         Add build logistics and plumbing for window.internals object.
1436         https://bugs.webkit.org/show_bug.cgi?id=60313
1437
1438         Test: fast/harness/internals-object.html
1439
1440         * Configurations/WebCoreTestSupport.xcconfig: Added.
1441         * DerivedSources.make: Added support for generating from Internals.idl.
1442         * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
1443         * WebCore.gypi: Ditto.
1444         * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
1445         * testing/Internals.cpp: Added.
1446         * testing/Internals.h: Added.
1447         * testing/Internals.idl: Added.
1448         * testing/js/WebCoreTestSupport.cpp: Added.
1449         * testing/js/WebCoreTestSupport.h: Added.
1450         * testing/v8/WebCoreTestSupport.cpp: Added.
1451         * testing/v8/WebCoreTestSupport.h: Added.
1452
1453 2011-06-02  Naoki Takano  <takano.naoki@gmail.com>
1454
1455         Reviewed by Dimitri Glazkov.
1456
1457         [Chromium] Click event is not fired for a menulist <select>
1458         https://bugs.webkit.org/show_bug.cgi?id=60563
1459
1460         Tests: SelectItemEventFire, SelectItemKeyEvent, SelectItemRemoveSelectOnChange and SelectItemRemoveSelectOnChange in webkit_unit_tests.
1461
1462         * platform/chromium/PopupMenuChromium.cpp:
1463         (WebCore::PopupContainer::showPopup): Set m_focusedNode from m_frameView.
1464         (WebCore::PopupListBox::handleMouseReleaseEvent): Call dispatchMouseEvent to forward the event only if select popup.
1465         (WebCore::PopupListBox::acceptIndex): Change to return accepted or not.
1466
1467 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
1468
1469         Reviewed by Darin Adler.
1470
1471         Stop event propagation for cases where relatedTarget is both ancestor of the target and at shadow boundary.
1472         https://bugs.webkit.org/show_bug.cgi?id=61892
1473
1474         In the cases where the relatedTarget of an event is an ancestor of the target, and the relatedTarget is
1475         a shadow host, we should not allow events to escape out of the hosted shadow DOM subtree.
1476
1477         * dom/EventDispatcher.cpp:
1478         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added a check that is valid for both new and old shadow DOM.
1479
1480 2011-06-02  Hans Wennborg  <hans@chromium.org>
1481
1482         Reviewed by Tony Gentilcore.
1483
1484         Fix LevelDBTransaction::clearTree()
1485         https://bugs.webkit.org/show_bug.cgi?id=61917
1486
1487         This was broken in the code I copied it from; we can't delete and walk
1488         the tree at the same time.
1489
1490         No new functionality, no new tests.
1491
1492         * platform/leveldb/LevelDBTransaction.cpp:
1493         (WebCore::LevelDBTransaction::clearTree):
1494
1495 2011-06-02  Andreas Kling  <kling@webkit.org>
1496
1497         Rubber-stamped by Simon Hausmann.
1498
1499         Remove Qt's precompiled header hack as it was broken, and was not even
1500         used unless building WebKit inside a Qt tree.
1501
1502         * WebCore.pri:
1503
1504 2011-06-02  James Robinson  <jamesr@chromium.org>
1505
1506         Reviewed by Brady Eidson.
1507
1508         DocumentLoader keeps a reference to all URL strings ever loaded leading to lots of memory waste
1509         https://bugs.webkit.org/show_bug.cgi?id=61894
1510
1511         DocumentLoader::m_resourcesClientKnowsAbout is a set of all the URLs that have passed through
1512         FrameLoader::dispatchWillSendRequest() and is used by FrameLoader::loadedResourceFromMemoryCached to decide
1513         whether to inform the FrameLoader's m_client about this load.  Unfortunately, this set holds a reference to the
1514         URL string for every resource loaded, so on pages that use data URLs to "load" large amounts of data this leaks
1515         lots of memory.
1516
1517         This set only has an effect on the Mac port, as the only two ports that implement
1518         FrameLoaderClient::dispatchDidLoadResourceFromMemoryCache() are Chromium and Mac and the Chromium implementation
1519         can correctly handle receiving multiple callbacks.  This patch limits the set to only PLATFORM(MAC) so other
1520         ports do not have to pay this memory cost.  It's possible that a better fix exists specifically for the Mac port
1521         implementation, but that would have to determined by someone who works on that port specifically.
1522
1523         * loader/DocumentLoader.h:
1524         (WebCore::DocumentLoader::didTellClientAboutLoad):
1525         (WebCore::DocumentLoader::haveToldClientAboutLoad):
1526
1527 2011-06-02  Aparna Nandyal  <aparna.nand@wipro.com>
1528
1529         Reviewed by Andreas Kling.
1530
1531         [Qt] Multiple drop events when doing DnD of images.
1532         https://bugs.webkit.org/show_bug.cgi?id=61504
1533
1534         Duplicate entries of the url were getting added into drag data
1535         which is removed. The duplicate entries were causing the same image
1536         url to be copied twice. The code changes now match other webkit ports.
1537
1538         * platform/qt/ClipboardQt.cpp:
1539         (WebCore::ClipboardQt::declareAndWriteDragImage):
1540
1541 2011-06-02  Naiem Shaik  <naiem.shaik@gmail.com>
1542
1543         Reviewed by Kent Tamura.
1544         
1545         Fixing invalid value being returned for default checkbox and radio state
1546         https://bugs.webkit.org/show_bug.cgi?id=61674
1547
1548         As per http://www.w3.org/TR/html5/number-state.html#checkbox-state and
1549         http://www.w3.org/TR/html5/number-state.html#radio-button-state:
1550         The value IDL attribute is in mode default/on: 
1551         If the element has a value attribute, it must return that attribute's 
1552         value; otherwise, it must return the string "on".  
1553         Currently default value is empty string;Default value of Radio button 
1554         and checkbox should be "on".Changed fallbackValue function to return the same
1555         This works as per spec in IE9,Firefox and Opera
1556
1557         Tests: fast/forms/checkbox-default-value.html
1558                fast/forms/radio-default-value.html
1559
1560         * html/BaseCheckableInputType.cpp:
1561         (WebCore::BaseCheckableInputType::fallbackValue):
1562
1563 2011-06-02  Kent Tamura  <tkent@chromium.org>
1564
1565         [Chromium/Mac] Fix a wrong merge for r87881
1566         https://bugs.webkit.org/show_bug.cgi?id=61845
1567
1568         * platform/chromium/ThemeChromiumMac.mm:
1569         (WebCore::paintStepper):
1570
1571 2011-06-02  Ian Henderson  <ianh@apple.com>
1572
1573         Reviewed by Simon Fraser.
1574
1575         [CG] GraphicsContext::fillRoundedRect() ignores the gradient fill the CGContextFillEllipseInRect() code path
1576         https://bugs.webkit.org/show_bug.cgi?id=61882
1577
1578         If we have a gradient or pattern fill set, take the slow path, which
1579         handles these cases properly.
1580
1581         No new tests, since we never try to fill a rounded rect with a
1582         gradient or pattern.
1583
1584         * platform/graphics/cg/GraphicsContextCG.cpp:
1585         (WebCore::GraphicsContext::fillRoundedRect):
1586
1587 2011-06-02  MORITA Hajime  <morrita@google.com>
1588
1589         Reviewed by Kent Tamura.
1590
1591         [Refactoring] Node::nextRenderer() and previousRenderer() should be part of NodeRenderingContext
1592         https://bugs.webkit.org/show_bug.cgi?id=61912
1593
1594         Inlined Node::nextRenderer() and previousRenderer() into NodeRenderingContext and
1595         removed original definitions.
1596
1597         No test, no behavioral change.
1598         
1599         * dom/Node.cpp:
1600         * dom/Node.h:
1601         * dom/NodeRenderingContext.cpp:
1602         (WebCore::NodeRenderingContext::nextRenderer):
1603         (WebCore::NodeRenderingContext::previousRenderer):
1604
1605 2011-06-02  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
1606
1607         Rubber-stamped by Gabor Loki.
1608
1609         Trivial buildfix for the ParallelJobs part of FEConvolveMatrix.
1610
1611         * platform/graphics/filters/FEConvolveMatrix.cpp:
1612         (WebCore::FEConvolveMatrix::apply): Rename variable i to job
1613
1614 2011-06-02  Yuta Kitamura  <yutak@chromium.org>
1615
1616         Reviewed by Kent Tamura.
1617
1618         WebSocket: Call WebSocketChannel::fail() when WebSocketHandshake has failed
1619         https://bugs.webkit.org/show_bug.cgi?id=61841
1620
1621         There is no change in behavior except that capitalization of a few error messages
1622         has been changed. No new tests are added.
1623
1624         * websockets/WebSocketChannel.cpp:
1625         (WebCore::WebSocketChannel::processBuffer):
1626         Pass m_handshake.failureReason() to fail() if the handshake has failed.
1627         * websockets/WebSocketHandshake.cpp:
1628         Replace occurrences of m_handle->addMessage() with assignments to m_failureReason.
1629         Change capitalization of a few messages so that all messages start with a capital letter.
1630         (WebCore::WebSocketHandshake::readServerHandshake):
1631         (WebCore::WebSocketHandshake::failureReason):
1632         (WebCore::WebSocketHandshake::readStatusLine):
1633         (WebCore::WebSocketHandshake::readHTTPHeaders):
1634         (WebCore::WebSocketHandshake::checkResponseHeaders):
1635         * websockets/WebSocketHandshake.h:
1636         Add failureReason(), which returns a string that describes why WebSocket handshake
1637         has failed.
1638
1639 2011-06-01  Dan Bernstein  <mitz@apple.com>
1640
1641         Reviewed by Anders Carlsson.
1642
1643         Incorrect UA style when printing a simple document
1644         https://bugs.webkit.org/show_bug.cgi?id=61900
1645
1646         This is not testable in run-webkit-tests because unless the test is the first to run in an instance
1647         of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
1648
1649         * css/CSSStyleSelector.cpp:
1650         (WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
1651         simple default style, with a new RuleSet before adding the style rules from the full default sheet.
1652         (WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
1653         equal in the simple case.
1654
1655 2011-06-01  Kent Tamura  <tkent@chromium.org>
1656
1657         Reviewed by Dimitri Glazkov.
1658
1659         Remove outer-spin-button
1660         https://bugs.webkit.org/show_bug.cgi?id=61845
1661
1662         Remove outer-spin-button, and render steppers as inner-spin-button.
1663         Outer-spin-button have never worked well with padding and border of
1664         <input>, and the layout code is very tricky and very hard to maintain it.
1665
1666         * css/CSSPrimitiveValueMappings.h:
1667         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1668         * css/CSSValueKeywords.in:
1669         * css/html.css:
1670         * html/HTMLInputElement.cpp:
1671         (WebCore::HTMLInputElement::innerSpinButtonElement):
1672         * html/HTMLInputElement.h:
1673         * html/InputType.h:
1674         * html/TextFieldInputType.cpp:
1675         (WebCore::TextFieldInputType::TextFieldInputType):
1676         (WebCore::TextFieldInputType::createShadowSubtree):
1677         (WebCore::TextFieldInputType::destroyShadowSubtree):
1678         * html/TextFieldInputType.h:
1679         * html/shadow/TextControlInnerElements.cpp:
1680         (WebCore::SpinButtonElement::SpinButtonElement):
1681         (WebCore::SpinButtonElement::create):
1682         (WebCore::SpinButtonElement::shadowPseudoId):
1683         * html/shadow/TextControlInnerElements.h:
1684         * platform/ThemeTypes.h:
1685         * platform/chromium/ThemeChromiumMac.mm:
1686         (WebCore::paintStepper):
1687          Center the stepper drawing area because the specified area can be
1688          larger than the NSStepper sizes.
1689         (WebCore::ThemeChromiumMac::controlSize):
1690         (WebCore::ThemeChromiumMac::minimumControlSize):
1691         (WebCore::ThemeChromiumMac::inflateControlPaintRect):
1692         (WebCore::ThemeChromiumMac::paint):
1693         * platform/mac/ThemeMac.mm:
1694         (WebCore::paintStepper):
1695          Center the stepper drawing area because the specified area can be
1696          larger than the NSStepper sizes.
1697         (WebCore::ThemeMac::controlSize):
1698         (WebCore::ThemeMac::minimumControlSize):
1699         (WebCore::ThemeMac::inflateControlPaintRect):
1700         (WebCore::ThemeMac::paint):
1701         * rendering/RenderBox.cpp:
1702         (WebCore::RenderBox::paintBoxDecorations):
1703         * rendering/RenderBox.h:
1704         * rendering/RenderTextControlSingleLine.cpp:
1705         (WebCore::RenderTextControlSingleLine::layout):
1706         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1707         (WebCore::RenderTextControlSingleLine::textBlockWidth):
1708         * rendering/RenderTextControlSingleLine.h:
1709         * rendering/RenderTheme.cpp:
1710         (WebCore::RenderTheme::adjustStyle):
1711         (WebCore::RenderTheme::paint):
1712         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
1713         * rendering/RenderTheme.h:
1714         * rendering/RenderThemeMac.mm:
1715         (WebCore::RenderThemeMac::adjustRepaintRect):
1716
1717 2011-06-01  Emil A Eklund  <eae@chromium.org>
1718
1719         Reviewed by Eric Seidel.
1720
1721         Switch RenderLayer::convertToLayerCoords to use IntPoint
1722         https://bugs.webkit.org/show_bug.cgi?id=61818
1723
1724         Covered by existing tests.
1725
1726         * platform/graphics/FloatPoint.h:
1727         (WebCore::flooredIntSize):
1728         * rendering/RenderLayer.cpp:
1729         (WebCore::RenderLayer::updateLayerPositions):
1730         (WebCore::expandClipRectForDescendantsAndReflection):
1731         (WebCore::transparencyClipBox):
1732         (WebCore::RenderLayer::convertToLayerCoords):
1733         (WebCore::RenderLayer::paintLayer):
1734         (WebCore::RenderLayer::paintChildLayerIntoColumns):
1735         (WebCore::RenderLayer::createLocalTransformState):
1736         (WebCore::RenderLayer::hitTestChildLayerColumns):
1737         (WebCore::RenderLayer::calculateClipRects):
1738         (WebCore::RenderLayer::calculateRects):
1739         (WebCore::RenderLayer::boundingBox):
1740         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
1741         * rendering/RenderLayer.h:
1742         * rendering/RenderLayerBacking.cpp:
1743         (WebCore::RenderLayerBacking::updateCompositedBounds):
1744         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1745         * rendering/RenderLayerCompositor.cpp:
1746         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1747         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1748         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
1749
1750 2011-06-01  Roland Steiner  <rolandsteiner@chromium.org>
1751
1752         Reviewed by Kent Tamura.
1753
1754         Remove superfluous renderer() test
1755         https://bugs.webkit.org/show_bug.cgi?id=61907
1756
1757         No new tests. (trivial)
1758
1759         * dom/Document.cpp:
1760         (WebCore::Document::recalcStyle):
1761
1762 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1763
1764         Reviewed by Hajime Morita.
1765
1766         Add IntPoint + IntPoint operator
1767         https://bugs.webkit.org/show_bug.cgi?id=61876
1768
1769         Adding an operator+ convenience method to IntPoint that sums two points
1770         and returns the result as an IntPoint. Changing doImageDrag to use it
1771         as a proof of concept.
1772
1773         No new tests since there is no change in behavior.
1774
1775         * page/DragController.cpp:
1776         (WebCore::DragController::doImageDrag):
1777         * platform/graphics/IntPoint.h:
1778         (WebCore::operator+):
1779
1780 2011-06-01  Jaehun Lim  <ljaehun.lim@samsung.com>
1781
1782         Reviewed by Eric Seidel.
1783
1784         [EFL] Add adjustMenuListButtonStyle and paintMenuListButton functions
1785         https://bugs.webkit.org/show_bug.cgi?id=61836
1786
1787         Add functions for rendering drop-down list when style attributes are applied.
1788
1789         * platform/efl/RenderThemeEfl.cpp:
1790         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
1791         (WebCore::RenderThemeEfl::paintMenuListButton):
1792         * platform/efl/RenderThemeEfl.h:
1793
1794 2011-06-01  Yuta Kitamura  <yutak@chromium.org>
1795
1796         Reviewed by Kent Tamura.
1797
1798         WebSocket: WebSocketChannel::fail() should close the connection immediately
1799         https://bugs.webkit.org/show_bug.cgi?id=61851
1800
1801         The effect of this change is almost unobservable. The difference between m_handle->close() and
1802         m_handle->disconnect() is that the former does not close the connection if the handle has
1803         unsent data while the latter immediately closes the connection regardless of unsent data.
1804         Usually a socket stream handle does not have unsent data, and even if it has any, it is hard
1805         for user scripts to observe the difference between close() and disconnect() (it should take some time
1806         for onclose() to be called if there are any unsent data, but there ought to be no other difference
1807         in user scripts' perspective).
1808
1809         No new tests are added, because writing a test for this issue is not feasible due to the above reason.
1810
1811         * websockets/WebSocketChannel.cpp:
1812         (WebCore::WebSocketChannel::fail): Use m_handle->disconnect() instead of m_handle->close().
1813
1814 2011-06-01  Abhishek Arya  <inferno@chromium.org>
1815
1816         Unreviewed.
1817
1818         Coding style nit. Move ec=0 initialization, change
1819         recommended by Alexey in bug.
1820         https://bugs.webkit.org/show_bug.cgi?id=60831
1821
1822         * dom/Document.cpp:
1823         (WebCore::Document::setBody):
1824
1825 2011-06-01  Hayato Ito  <hayato@chromium.org>
1826
1827         Reviewed by Kent Tamura.
1828
1829         Move {Next,Previous}FocusableNode functions from Document to FocusController.
1830         https://bugs.webkit.org/show_bug.cgi?id=61839
1831
1832         There are some member functions in Document which use 'this'
1833         pointer, but we should use TreeScope instead of Document in some
1834         places to handle focus issues nicely. We have to move these
1835         functions out of Document class so that we can give the TreeScope
1836         as a parameter.
1837
1838         No new tests since no functionality was changed.
1839
1840         * dom/Document.cpp:
1841         * dom/Document.h:
1842         * page/FocusController.cpp:
1843         (WebCore::FocusController::deepFocusableNode):
1844         (WebCore::FocusController::advanceFocusInDocumentOrder):
1845         (WebCore::nextNodeWithExactTabIndex):
1846         (WebCore::previousNodeWithExactTabIndex):
1847         (WebCore::nextNodeWithGreaterTabIndex):
1848         (WebCore::previousNodeWithLowerTabIndex):
1849         (WebCore::FocusController::nextFocusableNode):
1850         (WebCore::FocusController::previousFocusableNode):
1851         * page/FocusController.h:
1852
1853 2011-06-01  Adrienne Walker  <enne@google.com>
1854
1855         Reviewed by James Robinson.
1856
1857         [chromium] Fix syncing of removed mask and replica layers
1858         https://bugs.webkit.org/show_bug.cgi?id=61895
1859
1860         * platform/graphics/chromium/TreeSynchronizer.cpp:
1861         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
1862
1863 2011-06-01  Julien Chaffraix  <jchaffraix@codeaurora.org>
1864
1865         Reviewed by Simon Fraser.
1866
1867         CSSStyleSheet#insertRule doesn't work well with imported stylesheets
1868         https://bugs.webkit.org/show_bug.cgi?id=56981
1869
1870         Test: fast/css/import-and-insert-rule-no-update.html
1871
1872         The bug arises from the fact that <link> element did not know about a programmatically
1873         loading sheet (using insertRule and @import) and would thus never call removePendingSheet.
1874         This is needed to make sure our style selector contains an up-to-date list of stylesheets.
1875
1876         The gist of the patch adds a way for style sheet owner element to know if we are
1877         programmatically loading a style sheet. This is needed as <link> keeps the information
1878         about that last loaded stylesheet.
1879
1880         * css/CSSImportRule.cpp:
1881         (WebCore::CSSImportRule::insertedIntoParent): Call startLoadingDynamicSheet
1882         on our parent style sheet instead of directly adding a pending style sheet.
1883
1884         * css/CSSStyleSheet.cpp:
1885         (WebCore::CSSStyleSheet::startLoadingDynamicSheet): Call startLoadingDynamicSheet
1886         on our owner element if we have one.
1887
1888         * css/CSSStyleSheet.h:
1889         * dom/Node.h:
1890         (WebCore::Node::startLoadingDynamicSheet): Added common implementation of
1891         startLoadingDynamicSheet, which should never be called.
1892
1893         * dom/StyleElement.cpp:
1894         (WebCore::StyleElement::startLoadingDynamicSheet):
1895         * dom/StyleElement.h:
1896         Common implementation of startLoadingDynamicSheet for style elements.
1897
1898         * html/HTMLLinkElement.cpp:
1899         (WebCore::HTMLLinkElement::startLoadingDynamicSheet):
1900         * html/HTMLLinkElement.h:
1901         Use the HTMLLinkElement plumbing to make sure we call addRemovePendingSheet.
1902
1903         * html/HTMLStyleElement.h:
1904         (WebCore::HTMLStyleElement::startLoadingDynamicSheet):
1905         * svg/SVGStyleElement.h:
1906         (WebCore::SVGStyleElement::startLoadingDynamicSheet):
1907         Forward the call to StyleElement.
1908
1909 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1910
1911         Reviewed by Eric Seidel.
1912
1913         Switch paintCustomHighlight to use IntPoint
1914         https://bugs.webkit.org/show_bug.cgi?id=61562
1915
1916         Switching paintCustomHighlight to use an IntPoint for
1917         its paint offset instead of a pair of ints.
1918
1919         No new tests since this is refactoring.
1920
1921         * rendering/InlineTextBox.cpp:
1922         (WebCore::InlineTextBox::paint):
1923         (WebCore::InlineTextBox::paintCustomHighlight):
1924         * rendering/InlineTextBox.h:
1925         * rendering/RenderBox.cpp:
1926         (WebCore::RenderBox::paintCustomHighlight):
1927         * rendering/RenderBox.h:
1928         * rendering/RenderImage.cpp:
1929         (WebCore::RenderImage::paintReplaced):
1930         * rendering/RenderListMarker.cpp:
1931         (WebCore::RenderListMarker::paint):
1932         * rendering/RenderWidget.cpp:
1933         (WebCore::RenderWidget::paint):
1934         * rendering/RootInlineBox.cpp:
1935         (WebCore::RootInlineBox::paintCustomHighlight):
1936         (WebCore::RootInlineBox::paint):
1937         * rendering/RootInlineBox.h:
1938
1939 2011-06-01  Emil A Eklund  <eae@chromium.org>
1940
1941         Reviewed by Eric Seidel.
1942
1943         Switch MouseRelatedEvent to use IntPoint
1944         https://bugs.webkit.org/show_bug.cgi?id=61574
1945
1946         Covered by existing tests.
1947
1948         * dom/MouseEvent.cpp:
1949         (WebCore::MouseEvent::MouseEvent):
1950         (WebCore::MouseEvent::initMouseEvent):
1951         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1952         * dom/MouseRelatedEvent.cpp:
1953         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1954         (WebCore::contentsScrollOffset):
1955         (WebCore::MouseRelatedEvent::initCoordinates):
1956         (WebCore::MouseRelatedEvent::computeRelativePosition):
1957         (WebCore::MouseRelatedEvent::layerX):
1958         (WebCore::MouseRelatedEvent::layerY):
1959         (WebCore::MouseRelatedEvent::offsetX):
1960         (WebCore::MouseRelatedEvent::offsetY):
1961         (WebCore::MouseRelatedEvent::pageX):
1962         (WebCore::MouseRelatedEvent::pageY):
1963         (WebCore::MouseRelatedEvent::pageLocation):
1964         (WebCore::MouseRelatedEvent::x):
1965         (WebCore::MouseRelatedEvent::y):
1966         * dom/MouseRelatedEvent.h:
1967         (WebCore::MouseRelatedEvent::screenX):
1968         (WebCore::MouseRelatedEvent::screenY):
1969         (WebCore::MouseRelatedEvent::screenLocation):
1970         (WebCore::MouseRelatedEvent::clientX):
1971         (WebCore::MouseRelatedEvent::clientY):
1972         (WebCore::MouseRelatedEvent::clientLocation):
1973         (WebCore::MouseRelatedEvent::absoluteLocation):
1974         * dom/TouchEvent.cpp:
1975         (WebCore::TouchEvent::TouchEvent):
1976         (WebCore::TouchEvent::initTouchEvent):
1977         * dom/WheelEvent.cpp:
1978         (WebCore::WheelEvent::WheelEvent):
1979         (WebCore::WheelEvent::initWheelEvent):
1980         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
1981         * dom/WheelEvent.h:
1982         (WebCore::WheelEvent::create):
1983         (WebCore::WheelEvent::wheelDelta):
1984         (WebCore::WheelEvent::wheelDeltaX):
1985         (WebCore::WheelEvent::wheelDeltaY):
1986         (WebCore::WheelEvent::rawDeltaX):
1987         (WebCore::WheelEvent::rawDeltaY):
1988         (WebCore::WheelEvent::isHorizontal):
1989         * platform/graphics/IntPoint.h:
1990         (WebCore::IntPoint::scale):
1991
1992 2011-06-01  Levi Weintraub  <leviw@chromium.org>
1993
1994         Reviewed by Eric Seidel.
1995
1996         Switch paintOverflowControls to use IntPoint
1997         https://bugs.webkit.org/show_bug.cgi?id=61884
1998
1999         Switching paintOverflowControls to use an IntPoint instead of a pair of ints.
2000
2001         No new tests since this is simple refactoring.
2002
2003         * rendering/RenderBlock.cpp:
2004         (WebCore::RenderBlock::paint):
2005         * rendering/RenderLayer.cpp:
2006         (WebCore::RenderLayer::paintOverflowControls):
2007         (WebCore::RenderLayer::paintLayer):
2008         * rendering/RenderLayer.h:
2009         * rendering/RenderLayerBacking.cpp:
2010         (WebCore::RenderLayerBacking::paintIntoLayer):
2011
2012 2011-06-01  Abhishek Arya  <inferno@chromium.org>
2013
2014         Reviewed by Alexey Proskuryakov.
2015
2016         Fix setting of document.body
2017         https://bugs.webkit.org/show_bug.cgi?id=60831
2018
2019         1. Only allowing setting to an element if it has a body tag.
2020         2. If element is from another document, import it.
2021
2022         Test: fast/dom/document-set-body.html
2023
2024         * dom/Document.cpp:
2025         (WebCore::Document::setBody):
2026
2027 2011-06-01  Chris Fleizach  <cfleizach@apple.com>
2028
2029         Reviewed by Darin Adler.
2030
2031         Safari always crashes on http://bbc.co.uk when VoiceOver enabled
2032         https://bugs.webkit.org/show_bug.cgi?id=61886
2033
2034         This crash can happen on webpages that remove an element from the DOM when the element receives focus.
2035         When AppKit goes to post a notification to inform VoiceOver the focus has changed, it asks for the AXFocusedUIElement.
2036         However by posting that notification, a render tree update is performed. This causes the element to disappear, but
2037         AppKit still has a handle to it and continues to try to reference it. When the autorelease pool pops, the reference goes bad.
2038
2039         To fix, the root element, the AccessibilityScrollView, needs to implement updateBackingStore(), otherwise this method 
2040         will not be called in time.
2041
2042         No test could be created because to cause it depends on an internal AppKit mechanism
2043         that is only triggered remotely through the accessibility runtime.
2044
2045         * accessibility/AccessibilityObject.cpp:
2046         (WebCore::AccessibilityObject::updateBackingStore):
2047         * accessibility/AccessibilityObject.h:
2048         * accessibility/AccessibilityRenderObject.cpp:
2049         * accessibility/AccessibilityRenderObject.h:
2050
2051 2011-06-01  David Carson  <dacarson@apple.com>
2052
2053         Reviewed by Antti Koivisto.
2054
2055         https://bugs.webkit.org/show_bug.cgi?id=61831
2056         If width and height of an iframe is fixed and should not be visible, then
2057         it shouldn't be flattened.
2058
2059         Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-zero-size.html
2060
2061         * rendering/RenderIFrame.cpp:
2062         (WebCore::RenderIFrame::flattenFrame): add a check for a zero width or height
2063
2064 2011-06-01  Daniel Cheng  <dcheng@chromium.org>
2065
2066         Reviewed by Tony Chang.
2067
2068         [chromium] Use correct file name for dragging out images.
2069         https://bugs.webkit.org/show_bug.cgi?id=24887
2070
2071         We try to guess an appropriate filename when dragging out images. In order, we try to use:
2072         - The filename suggested in the HTTP header.
2073         - The last path component of the source URL.
2074         - The alt text.
2075         This matches the behavior of the other WebKit ports.
2076
2077         Test: fast/events/drag-image-filename.html
2078
2079         * platform/chromium/ClipboardChromium.cpp:
2080         (WebCore::writeImageToDataObject):
2081         * platform/chromium/ClipboardChromiumMac.cpp:
2082         (WebCore::isInvalidFileCharacter):
2083         (WebCore::ClipboardChromium::validateFileName):
2084
2085 2011-06-01  Levi Weintraub  <leviw@chromium.org>
2086
2087         Reviewed by Eric Seidel.
2088
2089         Text is scaled in a stair-step pattern
2090         https://bugs.webkit.org/show_bug.cgi?id=60317
2091
2092         Stop scaling the specified font to the actual on-screen value when font-rendering: 
2093         geometricPrecision is specified, but instead scale the graphics context. This allows
2094         us to scale text up and down smoothly.
2095
2096         Test: svg/text/scaling-font-with-geometric-precision.html
2097
2098         * rendering/svg/RenderSVGInlineText.cpp:
2099         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2100
2101 2011-06-01  Levi Weintraub  <leviw@chromium.org>
2102
2103         Reviewed by Eric Seidel.
2104
2105         Switch paintResizer to use IntPoint
2106         https://bugs.webkit.org/show_bug.cgi?id=61883
2107
2108         Switch paintResizer to take an IntPoint instead of a pair of ints.
2109
2110         No new tests as this is simple refactoring.
2111
2112         * rendering/RenderLayer.cpp:
2113         (WebCore::RenderLayer::paintOverflowControls):
2114         (WebCore::RenderLayer::paintResizer):
2115         * rendering/RenderLayer.h:
2116         * rendering/RenderLayerBacking.cpp:
2117         (WebCore::RenderLayerBacking::paintContents):
2118
2119 2011-06-01  Jer Noble  <jer.noble@apple.com>
2120
2121         Reviewed by Darin Adler.
2122
2123         Page layout messed up after exiting full screen at Apple trailers page
2124         https://bugs.webkit.org/show_bug.cgi?id=61755
2125         <rdar://problem/9525277>
2126
2127         Test: fullscreen/full-screen-zIndex-after.html
2128
2129         Fix the incomplete implementation of r87660. Make parameters to
2130         setContainsFullScreenElementRecursively() in webkitWillExitFullScreenForElement() match those
2131         in webkitWillEnterFullScreenForElement(), so the ancestors' flags do not become
2132         inconsistent..
2133
2134         * dom/Document.cpp:
2135         (WebCore::Document::webkitWillExitFullScreenForElement):
2136
2137 2011-06-01  Levi Weintraub  <leviw@chromium.org>
2138
2139         Reviewed by Eric Seidel.
2140
2141         Switch paintScrollCorner to use IntPoint
2142         https://bugs.webkit.org/show_bug.cgi?id=61874
2143
2144         Changing paintScrollCorner to take an IntPoint representing the paint
2145         offset instead of a pair of ints.
2146
2147         No new tests as this is simple refactoring.
2148
2149         * rendering/RenderLayer.cpp:
2150         (WebCore::RenderLayer::paintOverflowControls):
2151         (WebCore::RenderLayer::paintScrollCorner):
2152         * rendering/RenderLayer.h:
2153         * rendering/RenderLayerBacking.cpp:
2154         (WebCore::RenderLayerBacking::paintContents):
2155
2156 2011-06-01  Kenneth Russell  <kbr@google.com>
2157
2158         Reviewed by Nate Chapin.
2159
2160         [V8] Optimize fetches of indexed properties in custom bindings
2161         https://bugs.webkit.org/show_bug.cgi?id=61821
2162
2163         Avoid allocating garbage in affected custom bindings. This speeds
2164         up one test case by at least a factor of two. No new tests;
2165         covered by existing layout tests (typed array and otherwise).
2166
2167         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2168         (WebCore::constructWebGLArray):
2169         (WebCore::setWebGLArrayHelper):
2170         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2171         (WebCore::V8InspectorFrontendHost::showContextMenuCallback):
2172         * bindings/v8/custom/V8MessagePortCustom.cpp:
2173         (WebCore::getMessagePortArray):
2174         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2175         (WebCore::jsArrayToFloatArray):
2176         (WebCore::jsArrayToIntArray):
2177
2178 2011-06-01  Andras Becsi  <abecsi@webkit.org>
2179
2180         Reviewed by Csaba Osztrogonác.
2181
2182         [Qt] Fix the Phonon build when logging is disabled
2183         https://bugs.webkit.org/show_bug.cgi?id=61869
2184
2185         No new tests needed.
2186
2187         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Add missing guards.
2188         (WebCore::MediaPlayerPrivatePhonon::networkState):
2189         (WebCore::MediaPlayerPrivatePhonon::readyState):
2190         (WebCore::MediaPlayerPrivatePhonon::updateStates):
2191         (WebCore::MediaPlayerPrivatePhonon::stateChanged):
2192
2193 2011-06-01  Abhishek Arya  <inferno@chromium.org>
2194
2195         Reviewed by Antti Koivisto.
2196
2197         Do not use the pushed style selector if it is not equal to the
2198         parent document's style selector. It usually means that it is
2199         in a bad state, e.g. already cleared.
2200         https://bugs.webkit.org/show_bug.cgi?id=61737
2201
2202         * dom/Element.cpp:
2203         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
2204
2205 2011-06-01  Levi Weintraub  <leviw@chromium.org>
2206
2207         Reviewed by Eric Seidel.
2208
2209         Switch RenderLineBoxList intersection functions to use IntPoint
2210         https://bugs.webkit.org/show_bug.cgi?id=61794
2211
2212         Switching rangeIntersectsRect, anyLineIntersectsRect, and lineIntersectsDirtyRect
2213         to take IntPoint instead of a tx/ty to represent the offset to be applied match
2214         the rect and lines' coordinates.
2215
2216         No new tests since this is merely refactoring.
2217
2218         * rendering/RenderLineBoxList.cpp:
2219         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2220         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
2221         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2222         (WebCore::RenderLineBoxList::paint):
2223         (WebCore::RenderLineBoxList::hitTest):
2224         * rendering/RenderLineBoxList.h:
2225
2226 2011-05-19  Adrienne Walker  <enne@google.com>
2227
2228         Reviewed by James Robinson.
2229
2230         [chromium] Don't split long, narrow layers into multiple tiles.
2231         https://bugs.webkit.org/show_bug.cgi?id=60821
2232
2233         This changes the heuristic for when we tile layers to be less bad
2234         about wasting texture space.  Long, narrow layers that are tiled with
2235         a large tile size waste texture space.  Now layers are only tiled if
2236         they are above 512px in one dimension and extend into a second tile in
2237         the other.  If they are not tiled, their layer texture will exactly
2238         fit their layer bounds.  In particular, this will help scrollbars.
2239
2240         * platform/graphics/chromium/ContentLayerChromium.cpp:
2241         (WebCore::ContentLayerChromium::updateLayerSize):
2242         * platform/graphics/chromium/LayerRendererChromium.h:
2243         (WebCore::LayerRendererChromium::maxTextureSize):
2244
2245 2011-06-01  Cary Clark  <caryclark@google.com>
2246
2247         Reviewed by Eric Seidel.
2248
2249         Ready Chromium port for Skia on Mac
2250         https://bugs.webkit.org/show_bug.cgi?id=61800
2251
2252         Skia on Mac is not enabled. The executing
2253         code is unchanged, so there are no new tests.
2254
2255         * platform/chromium/DragImageRef.h:
2256         Use Skia for DragImageRef instead of CG.
2257
2258         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2259         (WebCore::ScrollbarThemeChromiumMac::paint):
2260         Get the total matrix from Skia for the scrollbar.
2261         Convert the SkCanvas into a CGContext to draw.
2262
2263         * platform/chromium/ThemeChromiumMac.mm:
2264         (WebCore::paintStepper):
2265         Ditto.
2266
2267 2011-06-01  Yury Semikhatsky  <yurys@chromium.org>
2268
2269         Reviewed by Pavel Feldman.
2270
2271         Web Inspector: allow opening inspector for existing workers
2272         https://bugs.webkit.org/show_bug.cgi?id=61853
2273
2274         Added sidebar pane with a list of all workers. Each worker has a check box
2275         that allows opening inspector for the worker.
2276
2277         * inspector/Inspector.json:
2278         * inspector/InspectorInstrumentation.cpp:
2279         (WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
2280         * inspector/InspectorInstrumentation.h:
2281         (WebCore::InspectorInstrumentation::didStartWorkerContext):
2282         * inspector/InspectorWorkerAgent.cpp:
2283         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
2284         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
2285         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerContext):
2286         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerContext):
2287         (WebCore::InspectorWorkerAgent::clearFrontend):
2288         (WebCore::InspectorWorkerAgent::connectToWorker):
2289         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
2290         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
2291         * inspector/InspectorWorkerAgent.h:
2292         * inspector/front-end/ScriptsPanel.js:
2293         (WebInspector.ScriptsPanel):
2294         * inspector/front-end/Settings.js:
2295         * inspector/front-end/WorkerManager.js:
2296         (WebInspector.WorkerManager):
2297         (WebInspector.WorkerManager.prototype._workerCreated):
2298         (WebInspector.WorkerManager.prototype._sendMessageToWorkerInspector):
2299         (WebInspector.WorkerManager.prototype.openWorkerInspector):
2300         (WebInspector.WorkerManager.prototype.closeWorkerInspector):
2301         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
2302         (WebInspector.WorkerMessageForwarder):
2303         (WebInspector.WorkerMessageForwarder.prototype.workerCreated):
2304         (WebInspector.WorkerMessageForwarder.prototype.dispatchMessageFromWorker):
2305         * inspector/front-end/WorkersSidebarPane.js:
2306         (WebInspector.WorkersSidebarPane):
2307         (WebInspector.WorkersSidebarPane.prototype.addWorker):
2308         (WebInspector.WorkerListSidebarPane):
2309         (WebInspector.WorkerListSidebarPane.prototype._workerAdded):
2310         (WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
2311         (WebInspector.WorkerListSidebarPane.prototype._workerInspectorClosed):
2312         (WebInspector.WorkerListSidebarPane.prototype._addWorker):
2313         (WebInspector.WorkerListSidebarPane.prototype._createCheckbox):
2314         (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
2315         * workers/Worker.cpp:
2316         (WebCore::Worker::notifyFinished):
2317
2318 2011-06-01  Shishir Agrawal  <shishir@chromium.org>
2319
2320         Reviewed by Tony Gentilcore.
2321
2322         Renaming the Page Visibility attributes as per the modified spec draft.
2323         https://bugs.webkit.org/show_bug.cgi?id=61825
2324
2325         Spec draft:
2326         http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html
2327
2328         - Event needs to be webkitVisibilityChange from webkitVisibilityStateChange
2329         - The attribute webkitIsVisible needs to change to webkitHidden
2330
2331         * dom/Document.cpp:
2332         (WebCore::Document::webkitHidden):
2333         (WebCore::Document::dispatchVisibilityStateChangeEvent):
2334         * dom/Document.h:
2335         * dom/Document.idl:
2336         * dom/EventNames.h:
2337
2338 2011-06-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2339
2340         Reviewed by Rob Buis.
2341
2342         Remove duplicated code in various computeReplacedLogical*() functions
2343         https://bugs.webkit.org/show_bug.cgi?id=61860
2344
2345         Centralize this calculation in RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth:
2346         int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth());
2347         int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth());
2348         return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
2349
2350         Centralize this calculation in RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight:
2351         int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight());
2352         int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight());
2353         return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
2354
2355         Use the new helper methods where possible, deduplicating lots of code.
2356
2357         * rendering/RenderBox.cpp:
2358         (WebCore::RenderBox::computeReplacedLogicalWidth):
2359         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
2360         (WebCore::RenderBox::computeReplacedLogicalHeight):
2361         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
2362         * rendering/RenderBox.h:
2363         * rendering/RenderImage.cpp:
2364         (WebCore::RenderImage::computeReplacedLogicalWidth):
2365         (WebCore::RenderImage::computeReplacedLogicalHeight):
2366         * rendering/RenderPart.cpp:
2367         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
2368         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
2369         (WebCore::RenderPart::computeReplacedLogicalWidth):
2370         (WebCore::RenderPart::computeReplacedLogicalHeight):
2371         * rendering/RenderPart.h:
2372         * rendering/RenderReplaced.cpp:
2373         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2374         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2375         * rendering/svg/RenderSVGRoot.cpp:
2376         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2377         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2378
2379 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2380
2381         Unreviewed, rolling out r87788.
2382         http://trac.webkit.org/changeset/87788
2383         https://bugs.webkit.org/show_bug.cgi?id=61856
2384
2385         breaks windows chromium canary (Requested by jknotten on
2386         #webkit).
2387
2388         * loader/archive/mhtml/MHTMLArchive.cpp:
2389         * loader/archive/mhtml/MHTMLArchive.h:
2390         * page/PageSerializer.cpp:
2391         (WebCore::PageSerializer::serializeFrame):
2392         (WebCore::PageSerializer::serializeCSSStyleSheet):
2393         * platform/SharedBuffer.cpp:
2394         * platform/SharedBuffer.h:
2395
2396 2011-06-01  Joseph Pecoraro  <joepeck@webkit.org>
2397
2398         Reviewed by Pavel Feldman.
2399
2400         Web Inspector: [JSC] JSLock ASSERTs Seen Under eventListenerHandlerBody
2401         https://bugs.webkit.org/show_bug.cgi?id=61835
2402
2403         Add a JSLock call before possible allocations in jsFunction and toString.
2404
2405         * bindings/js/ScriptEventListener.cpp:
2406         (WebCore::eventListenerHandlerBody):
2407
2408 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
2409
2410         Reviewed by Adam Barth.
2411
2412         Adding MHTML generation support to MHTMLArchive.
2413         https://bugs.webkit.org/show_bug.cgi?id=7169
2414
2415         * loader/archive/mhtml/MHTMLArchive.cpp:
2416         (WebCore::generateRandomBoundary):
2417         (WebCore::replaceNonPrintableCharacters):
2418         (WebCore::MHTMLArchive::generateMHTMLData):
2419         * loader/archive/mhtml/MHTMLArchive.h:
2420         * page/PageSerializer.cpp:
2421         (WebCore::PageSerializer::serializeFrame):
2422         (WebCore::PageSerializer::serializeCSSStyleSheet):
2423         * platform/SharedBuffer.cpp:
2424         (WebCore::SharedBuffer::append):
2425         * platform/SharedBuffer.h:
2426
2427 2011-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2428
2429         Reviewed by Kent Tamura.
2430
2431         Remove ShadowElement and compact remaining used bits into RenderFileUploadControl.
2432         https://bugs.webkit.org/show_bug.cgi?id=61816
2433
2434         This is a near-mechanical move-and-rename of ShadowElement, which is now only
2435         used by input[type=file]. Next step -- switch it over to new shadow DOM.
2436
2437         Refactoring, no change in behavior.
2438
2439         * CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h.
2440         * GNUmakefile.list.am: Ditto.
2441         * WebCore.gypi: Ditto.
2442         * WebCore.pro: Ditto.
2443         * WebCore/WebCore.vcproj/WebCore.vcproj: Ditto.
2444         * WebCore.xcodeproj/project.pbxproj: Ditto.
2445         * WebCore/rendering/RenderingAllInOne.cpp: Ditto.
2446         * rendering/RenderFileUploadControl.cpp:
2447         (WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton.
2448         (WebCore::UploadButton::detach): Ditto.
2449         (WebCore::UploadButton::UploadButton): Ditto.
2450         (WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton.
2451         * rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used.
2452         * rendering/RenderProgress.cpp: Ditto.
2453         * rendering/ShadowElement.cpp: Removed.
2454         * rendering/ShadowElement.h: Removed.
2455
2456 2011-06-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2457
2458         Reviewed by Rob Buis.
2459
2460         SVG fails all 3 of Hixie's CSS intrinsic sizing tests
2461         https://bugs.webkit.org/show_bug.cgi?id=15473
2462
2463         Hixies CSS intrinsic sizing tests cover percentage sizes specified on the target SVG document as width/height attributes
2464         and using width: auto / height: auto on the <object> that hosts the SVG document. Take percentage sizes of the outermost
2465         SVGs width/height attributes into account when determining the intrinsic size of the <object>.
2466
2467         Added several other testcases demonstrating several scenarios. All tests work exactly the same in WebKit and Firefox now.
2468         The *on-target-svg-absolute.xhtml tests look equal to WebKit/FF but Opera fails them, likely a relict of the different
2469         interpretation of the intrinsic size of a SVG document in SVG Tiny 1.2.
2470
2471         Tests: svg/custom/object-sizing-height-50p-on-target-svg-absolute.xhtml
2472                svg/custom/object-sizing-height-50p-on-target-svg.xhtml
2473                svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml
2474                svg/custom/object-sizing-width-50p-height-50p-on-target-svg.xhtml
2475                svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml
2476                svg/custom/object-sizing-width-50p-height-75p-on-target-svg.xhtml
2477                svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml
2478                svg/custom/object-sizing-width-50p-on-target-svg.xhtml
2479                svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml
2480                svg/custom/object-sizing-width-75p-height-50p-on-target-svg.xhtml
2481                svg/hixie/intrinsic/001.html
2482                svg/hixie/intrinsic/002.html
2483                svg/hixie/intrinsic/003.html
2484
2485         * rendering/RenderPart.cpp:
2486         (WebCore::RenderPart::computeReplacedLogicalWidth):
2487         (WebCore::RenderPart::computeReplacedLogicalHeight):
2488         * rendering/svg/RenderSVGRoot.cpp:
2489         (WebCore::RenderSVGRoot::computeIntrinsicRatio):
2490         * rendering/svg/RenderSVGRoot.h:
2491
2492 2011-05-31  Tonis Tiigi  <tonistiigi@gmail.com>
2493
2494         Reviewed by Pavel Feldman.
2495
2496         Web Inspector: Timeline panel improvements for managing current selection
2497         https://bugs.webkit.org/show_bug.cgi?id=61468
2498
2499         Enables X-axis dragging of the selected area.
2500         Double click zoom-out.
2501         Fixes slightly wrong selection area position.
2502
2503         * inspector/front-end/TimelineOverviewPane.js:
2504         (WebInspector.TimelineOverviewPane):
2505         (WebInspector.TimelineOverviewPane.prototype._dragWindow):
2506         (WebInspector.TimelineOverviewPane.prototype._endWindowSelectorDragging):
2507         (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
2508         (WebInspector.TimelineOverviewPane.prototype._resizeWindowMaximum):
2509         (WebInspector.TimelineOverviewPane.prototype.scrollWindow):
2510         (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox):
2511         * inspector/front-end/TimelinePanel.js:
2512         (WebInspector.TimelinePanel):
2513
2514 2011-05-31  Keishi Hattori  <keishi@webkit.org>
2515
2516         Reviewed by Kent Tamura.
2517
2518         Fix to enable page scroll of select element
2519         https://bugs.webkit.org/show_bug.cgi?id=53628
2520
2521         Manual test: select-page-scroll.html
2522
2523         * manual-tests/select-page-scroll.html: Added.
2524         * rendering/RenderListBox.cpp:
2525         (WebCore::RenderListBox::computeLogicalHeight): Fix min to max.
2526
2527 2011-05-31  Yong Li  <yoli@rim.com>
2528
2529         Reviewed by Eric Seidel.
2530
2531         https://bugs.webkit.org/show_bug.cgi?id=54807
2532         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
2533         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
2534         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
2535         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
2536         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
2537         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
2538         rule we should have in order to make our code independent from compilers and compiler flags.
2539
2540         No new test added because this change is not known to fix any issue.
2541
2542         * css/CSSPrimitiveValue.h:
2543         * css/CSSProperty.h:
2544         * rendering/InlineBox.h:
2545         * rendering/RenderBlock.h:
2546
2547 2011-05-31  Hironori Bono  <hbono@chromium.org>
2548
2549         Reviewed by Eric Seidel.
2550
2551         Send an input event when we change the text direction.
2552         https://bugs.webkit.org/show_bug.cgi?id=50952
2553
2554         Both Safari and Chrome call Editor::setBaseWritingDirection() to change
2555         the text direction of an editable element with their UIs. This change
2556         calls dispatchInputEvent() to send an input event when the function
2557         actually changes the "dir" attribute so we can send an input event as
2558         written in the HTML5 spec.
2559
2560         Test: fast/html/set-text-direction.html
2561
2562         * editing/Editor.cpp:
2563         (WebCore::Editor::setBaseWritingDirection):
2564
2565 2011-05-31  Jer Noble  <jer.noble@apple.com>
2566
2567         Reviewed by Darin Adler.
2568
2569         Flash of black at the end of full screen transition at apple.com product videos
2570         https://bugs.webkit.org/show_bug.cgi?id=61756
2571
2572         Added two new entries to the WebCore exports list.
2573
2574         * WebCore.exp.in:
2575
2576 2011-05-31  Rafael Brandao  <rafael.lobo@openbossa.org>
2577
2578         Reviewed by Andreas Kling.
2579
2580         [Qt] tst_QWebFrame::render() failing
2581         https://bugs.webkit.org/show_bug.cgi?id=60893
2582
2583         Due a problem on QPicture (http://bugreports.qt.nokia.com/browse/QTBUG-19496),
2584         this test was calculating the final geometry incorrectly. As the order between
2585         a translate and a draw operation could be relevant for it, but not for the
2586         final rendered result, they were changed on ScrollbarThemeQt::paint.
2587
2588         * platform/qt/ScrollbarThemeQt.cpp:
2589         (WebCore::ScrollbarThemeQt::paint):
2590
2591 2011-05-27  Adrienne Walker  <enne@google.com>
2592
2593         Reviewed by James Robinson.
2594
2595         [chromium] Fix crash from empty reflections with masks
2596         https://bugs.webkit.org/show_bug.cgi?id=61654
2597
2598         Change the iteration for updateCompositorResources to match that being
2599         done in the paint and draw steps.  This mismatch of iteration style
2600         was causing layers with replica masks to correctly get skipped while
2601         painting but not get skipped during texture upload.
2602
2603         Test: compositing/reflections/empty-reflection-with-mask.html
2604
2605         * platform/graphics/chromium/LayerRendererChromium.cpp:
2606         (WebCore::LayerRendererChromium::updateLayers):
2607         (WebCore::LayerRendererChromium::updateCompositorResources):
2608         * platform/graphics/chromium/LayerRendererChromium.h:
2609
2610 2011-05-31  B.J. Wever  <skylined@chromium.org>
2611
2612         Reviewed by Adam Barth.
2613
2614         requestFileSystem and resolveLocalFileSystemURI are not checking if
2615         errorCallback is NULL before scheduling a callback on error.
2616         https://bugs.webkit.org/show_bug.cgi?id=49539
2617
2618         Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html
2619
2620         * fileapi/DOMFileSystem.cpp:
2621         (WebCore::DOMFileSystem::scheduleCallback): Only call callback if
2622           one is supplied.
2623
2624 2011-05-31  Brady Eidson  <beidson@apple.com>
2625
2626         Reviewed by Darin Adler.
2627
2628         Another swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
2629         
2630         Re-land http://trac.webkit.org/changeset/87566 with invalid ASSERTs removed.
2631
2632         No new tests. No change in behavior.
2633
2634         Instead of storing the DocumentLoader at construction and never changing it,
2635         always calculate it based on the FrameLoader's current DocumentLoader:
2636         * dom/Document.cpp:
2637         (WebCore::Document::Document):
2638         (WebCore::Document::suggestedMIMEType):
2639         (WebCore::Document::lastModified):
2640         (WebCore::Document::initSecurityContext):
2641         (WebCore::Document::updateURLForPushOrReplaceState):
2642         (WebCore::Document::loader):
2643         * dom/Document.h:
2644
2645         Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
2646         * bindings/ScriptControllerBase.cpp:
2647         (WebCore::ScriptController::executeIfJavaScriptURL):
2648         * html/MediaDocument.cpp:
2649         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2650         * html/PluginDocument.cpp:
2651         (WebCore::PluginDocumentParser::createDocumentStructure):
2652         * platform/mac/HTMLConverter.mm:
2653         (fileWrapperForElement):
2654
2655         * WebCore.exp.in:
2656
2657 2011-05-31  Levi Weintraub  <leviw@chromium.org>
2658
2659         Reviewed by Simon Fraser.
2660
2661         Change InlineBox::paint and its overloaded variants to use IntPoint
2662         https://bugs.webkit.org/show_bug.cgi?id=61804
2663
2664         Changing InlineBox::paint, its 7 overloaded variants, and RootInlineBox::paintEllipsisBox
2665         to use IntPoint for their paint offset instead of a pair of ints.
2666
2667         No new tests since this is just a refactoring.
2668
2669         * rendering/EllipsisBox.cpp:
2670         (WebCore::EllipsisBox::paint):
2671         * rendering/EllipsisBox.h:
2672         * rendering/InlineBox.cpp:
2673         (WebCore::InlineBox::paint):
2674         * rendering/InlineBox.h:
2675         * rendering/InlineFlowBox.cpp:
2676         (WebCore::InlineFlowBox::paint):
2677         * rendering/InlineFlowBox.h:
2678         * rendering/InlineTextBox.cpp:
2679         (WebCore::InlineTextBox::paint):
2680         * rendering/InlineTextBox.h:
2681         * rendering/RenderBlock.cpp:
2682         (WebCore::RenderBlock::paintEllipsisBoxes):
2683         * rendering/RenderBoxModelObject.cpp:
2684         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2685         * rendering/RenderLineBoxList.cpp:
2686         (WebCore::RenderLineBoxList::paint):
2687         * rendering/RootInlineBox.cpp:
2688         (WebCore::RootInlineBox::paintEllipsisBox):
2689         (WebCore::RootInlineBox::paint):
2690         * rendering/RootInlineBox.h:
2691         * rendering/svg/SVGInlineFlowBox.cpp:
2692         (WebCore::SVGInlineFlowBox::paint):
2693         * rendering/svg/SVGInlineFlowBox.h:
2694         * rendering/svg/SVGInlineTextBox.cpp:
2695         (WebCore::SVGInlineTextBox::paint):
2696         * rendering/svg/SVGInlineTextBox.h:
2697         * rendering/svg/SVGRootInlineBox.cpp:
2698         (WebCore::SVGRootInlineBox::paint):
2699         * rendering/svg/SVGRootInlineBox.h:
2700
2701 2011-05-31  James Robinson  <jamesr@chromium.org>
2702
2703         Reviewed by Kenneth Russell.
2704
2705         [chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction
2706         https://bugs.webkit.org/show_bug.cgi?id=61593
2707
2708         Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer.
2709         This is extremely defensive and not strictly necessary, but not harmful either.
2710
2711         * platform/graphics/chromium/LayerChromium.h:
2712         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2713         (WebCore::CCLayerImpl::~CCLayerImpl):
2714
2715 2011-05-31  Stephen White  <senorblanco@chromium.org>
2716
2717         Unreviewed; build fix.
2718
2719         Silence some warnings on the Safari/Mac release build.
2720
2721         * platform/graphics/gpu/TilingData.h:
2722         (WebCore::TilingData::assertTile):
2723
2724 2011-05-31  Justin Novosad  <junov@chromium.org>
2725
2726         Reviewed by Stephen White.
2727
2728         [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
2729         https://bugs.webkit.org/show_bug.cgi?id=61790
2730         Changing the build guards in these two files that are required
2731         by the accelerated compositing feature.
2732
2733         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2734         * platform/graphics/gpu/TilingData.cpp:
2735
2736 2011-05-31  Justin Novosad  <junov@chromium.org>
2737
2738         Reviewed by Stephen White.
2739
2740         [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
2741         https://bugs.webkit.org/show_bug.cgi?id=61790
2742         Changing the build guards in these two files that are required
2743         by the accelerated compositing feature.
2744
2745         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2746         * platform/graphics/gpu/TilingData.cpp:
2747
2748 2011-05-31  Rob Buis  <rbuis@rim.com>
2749
2750         Reviewed by Dirk Schulze.
2751
2752         https://bugs.webkit.org/show_bug.cgi?id=34301
2753         Creating <animateMotion> elements via javascript do not execute
2754
2755         https://bugs.webkit.org/show_bug.cgi?id=17043
2756         SVG missing some .idl files
2757
2758         Add missing idl files.
2759
2760         Test: svg/animations/animate-mpath-insert.html
2761
2762         * CMakeLists.txt:
2763         * CodeGenerators.pri:
2764         * WebCore.gypi:
2765         * WebCore.xcodeproj/project.pbxproj:
2766         * svg/SVGAnimateMotionElement.idl: Added.
2767         * svg/SVGMPathElement.idl: Added.
2768
2769 2011-05-31  Robin Dunn  <robin@alldunn.com>
2770
2771         Reviewed by Kevin Ollivier.
2772
2773         [wx] Implement printing support for wxWidgets 2.9.x and above.
2774         
2775         https://bugs.webkit.org/show_bug.cgi?id=61796
2776
2777         * platform/graphics/GraphicsContext.h:
2778         * platform/graphics/wx/FontWx.cpp:
2779         (WebCore::Font::drawGlyphs):
2780         * platform/graphics/wx/GraphicsContextWx.cpp:
2781         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2782         (WebCore::GraphicsContext::drawRect):
2783         (WebCore::GraphicsContext::drawLine):
2784         (WebCore::GraphicsContext::drawEllipse):
2785         (WebCore::GraphicsContext::strokeArc):
2786         (WebCore::GraphicsContext::drawConvexPolygon):
2787         (WebCore::GraphicsContext::fillRect):
2788         (WebCore::GraphicsContext::drawLineForText):
2789         (WebCore::GraphicsContext::scale):
2790         (WebCore::GraphicsContext::currentScale):
2791         * platform/wx/wxcode/win/non-kerned-drawing.cpp:
2792         (WebCore::drawTextWithSpacing):
2793
2794 2011-05-31  Joseph Pecoraro  <joepeck@webkit.org>
2795
2796         Reviewed by Pavel Feldman.
2797
2798         Web Inspector: Missing InspectorFrontendHost.saveSessionSetting function
2799         https://bugs.webkit.org/show_bug.cgi?id=61751
2800
2801         Add missing stub function causing an error on load.
2802
2803         * inspector/front-end/InspectorFrontendHostStub.js:
2804         (.WebInspector.InspectorFrontendHostStub.prototype.saveSessionSetting):
2805
2806 2011-05-31  Abhishek Arya  <inferno@chromium.org>
2807
2808         Reviewed by Dimitri Glazkov.
2809
2810         Improve hasMediaControls logic to check that node has
2811         media controls. This can be false when cloning nodes.
2812         https://bugs.webkit.org/show_bug.cgi?id=61765
2813
2814         Test: media/media-controls-clone-crash.html
2815
2816         * dom/Node.h:
2817         (WebCore::Node::isMediaControls):
2818         * html/HTMLMediaElement.cpp:
2819         (WebCore::HTMLMediaElement::mediaControls):
2820         (WebCore::HTMLMediaElement::hasMediaControls):
2821         * html/shadow/MediaControls.h:
2822         (WebCore::MediaControls::isMediaControls):
2823         (WebCore::toMediaControls):
2824
2825 2011-05-31  Xan Lopez  <xlopez@igalia.com>
2826
2827         Reviewed by Martin Robinson.
2828
2829         [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
2830         https://bugs.webkit.org/show_bug.cgi?id=61791
2831
2832         * bindings/gobject/GNUmakefile.am: add new files.
2833         * bindings/gobject/WebKitDOMCustom.cpp: Added.
2834         (webkit_dom_html_text_area_element_is_edited):
2835         (webkit_dom_html_input_element_is_edited):
2836         * bindings/gobject/WebKitDOMCustom.h: Added.
2837
2838 2011-05-31  Noam Rosenthal  <noam.rosenthal@nokia.com>
2839
2840         Unreviewed build fix for Symbian.
2841         Opt-out Symbian for TextureMapper.
2842
2843         No new tests: build fix.
2844
2845         * WebCore.pri:
2846
2847 2011-05-31  Levi Weintraub  <leviw@chromium.org>
2848
2849         Reviewed by Eric Seidel.
2850
2851         Switch paintFocusRing to IntPoint
2852         https://bugs.webkit.org/show_bug.cgi?id=61580
2853
2854         Switching paintFocusRing to take an IntPoint representing the paint offset
2855         instead of a pair of ints.
2856
2857         No new tests as this is just refactoring.
2858
2859         * rendering/RenderInline.cpp:
2860         (WebCore::RenderInline::paintOutline):
2861         * rendering/RenderObject.cpp:
2862         (WebCore::RenderObject::paintFocusRing):
2863         (WebCore::RenderObject::paintOutline):
2864         * rendering/RenderObject.h:
2865
2866 2011-05-31  Abhishek Arya  <inferno@chromium.org>
2867
2868         Reviewed by Dimitri Glazkov.
2869
2870         Convert raw ptr to RefPtr for documentElement.
2871         https://bugs.webkit.org/show_bug.cgi?id=61688
2872
2873         Test: fast/dom/xml-parser-error-message-crash.svg
2874
2875         * dom/XMLDocumentParser.cpp:
2876         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
2877
2878 2011-05-31  Andreas Kling  <kling@webkit.org>
2879
2880         Reviewed by Antti Koivisto.
2881
2882         Canvas/JSC: Auto-generate overloads for setShadow()
2883         https://bugs.webkit.org/show_bug.cgi?id=61786
2884
2885         Move CanvasRenderingContext2D.setShadow() to auto-generated JSC bindings.
2886
2887         There is a subtle difference to the previous behavior: invalid numbers of
2888         arguments now raise TypeError instead of SyntaxError. This is in accordance
2889         with Web IDL, and matches the existing V8 bindings.
2890
2891         Test: fast/canvas/canvas-overloads-setShadow.html
2892
2893         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2894         * html/canvas/CanvasRenderingContext2D.idl:
2895
2896 2011-05-31  Andreas Kling  <kling@webkit.org>
2897
2898         Reviewed by Antti Koivisto.
2899
2900         Canvas/JSC: Auto-generate overloads for drawImageFromRect()
2901         https://bugs.webkit.org/show_bug.cgi?id=61709
2902
2903         Move CanvasRenderingContext2D.drawImageFromRect() to auto-generated JSC bindings.
2904         Make it [RequiresAllArguments=Raise] to match the old behavior.
2905         Side effect: calling drawImageFromRect() with zero arguments will now raise
2906         SyntaxError instead of TypeError.
2907
2908         Test: fast/canvas/canvas-overloads-drawImageFromRect.html
2909
2910         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2911         * html/canvas/CanvasRenderingContext2D.h:
2912         * html/canvas/CanvasRenderingContext2D.idl:
2913
2914 2011-05-31  Andreas Kling  <kling@webkit.org>
2915
2916         Reviewed by Antti Koivisto.
2917
2918         Canvas/JSC: Auto-generate overloads for drawImage()
2919         https://bugs.webkit.org/show_bug.cgi?id=61703
2920
2921         Move CanvasRenderingContext2D.drawImage() to auto-generated JSC bindings.
2922
2923         There is a subtle difference to the previous behavior: invalid numbers of
2924         arguments now raise TypeError instead of SyntaxError. This is in accordance
2925         with Web IDL, and matches the existing V8 bindings.
2926
2927         Test: fast/canvas/canvas-overloads-drawImage.html
2928
2929         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2930         * html/canvas/CanvasRenderingContext2D.idl:
2931
2932 2011-05-31  Andreas Kling  <kling@webkit.org>
2933
2934         Reviewed by Antti Koivisto.
2935
2936         Canvas/JSC: Auto-generate overloads for strokeRect()
2937         https://bugs.webkit.org/show_bug.cgi?id=61641
2938
2939         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
2940
2941         No behavioral change.
2942
2943         Test: fast/canvas/canvas-overloads-strokeRect.html
2944
2945         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2946         * html/canvas/CanvasRenderingContext2D.idl:
2947
2948 2011-05-31  Andreas Kling  <kling@webkit.org>
2949
2950         Reviewed by Antti Koivisto.
2951
2952         Canvas/JSC: Auto-generate overloads for setFillColor()
2953         https://bugs.webkit.org/show_bug.cgi?id=61635
2954
2955         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
2956
2957         There is a subtle difference to the previous behavior: invalid numbers of
2958         arguments now raise TypeError instead of SyntaxError. This is in accordance
2959         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
2960
2961         Test: fast/canvas/canvas-overloads-setFillColor.html
2962
2963         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2964         * html/canvas/CanvasRenderingContext2D.idl:
2965
2966 2011-05-31  Andreas Kling  <kling@webkit.org>
2967
2968         Reviewed by Antti Koivisto.
2969
2970         Canvas/JSC: Auto-generate overloads for setStrokeColor()
2971         https://bugs.webkit.org/show_bug.cgi?id=61629
2972
2973         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
2974
2975         There is a subtle difference to the previous behavior: invalid numbers of
2976         arguments now raise TypeError instead of SyntaxError. This is in accordance
2977         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
2978
2979         Test: fast/canvas/canvas-overloads-setStrokeColor.html
2980
2981         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2982         * html/canvas/CanvasRenderingContext2D.idl:
2983
2984 2011-05-31  Andreas Kling  <kling@webkit.org>
2985
2986         Reviewed by Antti Koivisto.
2987
2988         Canvas/JSC: Auto-generate overloads for strokeText()
2989         https://bugs.webkit.org/show_bug.cgi?id=61626
2990
2991         Move CanvasRenderingContext2D.strokeText() to auto-generated JSC bindings.
2992         Make it [RequiresAllArguments=Raise] to match the old behavior.
2993         This has the side-effect of aligning the behaviors of JSC and V8.
2994
2995         Test: fast/canvas/canvas-overloads-strokeText.html
2996
2997         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2998         * html/canvas/CanvasRenderingContext2D.idl:
2999
3000 2011-05-31  Andreas Kling  <kling@webkit.org>
3001
3002         Reviewed by Antti Koivisto.
3003
3004         Canvas/JSC: Auto-generate overloads for fillText()
3005         https://bugs.webkit.org/show_bug.cgi?id=61623
3006
3007         Move CanvasRenderingContext2D.fillText() to auto-generated JSC bindings.
3008         Make it [RequiresAllArguments=Raise] to match the old behavior.
3009         This has the side-effect of aligning the behaviors of JSC and V8.
3010
3011         Test: fast/canvas/canvas-overloads-fillText.html
3012
3013         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3014         * html/canvas/CanvasRenderingContext2D.idl:
3015
3016 2011-05-31  Yael Aharon  <yael.aharon@nokia.com>
3017
3018         Reviewed by Kenneth Rohde Christiansen.
3019
3020         Frame flattening is broken with nested frames
3021         https://bugs.webkit.org/show_bug.cgi?id=61491
3022
3023         After r77988, when frame flattening is enabled, performPostLayoutTasks() is called on a timer for iframes.
3024         This causes layout of nested iframes to sometimes happen asynchronously, but WebCore expects layout to always finish synchronously.
3025         Added a call to updateWidgetPosition() for cases that performPostLayoutTasks() is now happening asynchronously.
3026
3027         Test: fast/frames/flattening/iframe-flattening-nested.html
3028
3029         * page/FrameView.cpp:
3030         (WebCore::FrameView::layout):
3031
3032 2011-05-31  Tommy Widenflycht  <tommyw@google.com>
3033
3034         Reviewed by Tony Gentilcore.
3035
3036         Fix getUserMedia callback bindings for JSC.
3037         https://bugs.webkit.org/show_bug.cgi?id=60174
3038
3039         This patch initializes the exception code variable to 0.
3040
3041         Test: fast/dom/MediaStream/argument-types.html
3042
3043         * bindings/js/JSNavigatorCustom.cpp:
3044         (WebCore::JSNavigator::webkitGetUserMedia):
3045
3046 2011-05-31  Oleg Romashin  <oleg.romashin@nokia.com>
3047
3048         Reviewed by Benjamin Poulain.
3049
3050         Fix compilation with debug enabled, m_lightSource.type is not valid anymore
3051         https://bugs.webkit.org/show_bug.cgi?id=61719
3052
3053         * platform/graphics/filters/arm/FELightingNEON.h:
3054         (WebCore::FELighting::platformApplyNeon):
3055
3056 2011-05-31  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
3057
3058         Reviewed by Nikolas Zimmermann.
3059
3060         Invalid color handling is broken for SVG
3061         https://bugs.webkit.org/show_bug.cgi?id=58531
3062
3063         Fix invalid color fallback handling. If the fill/stroke attributes computed
3064         value leads to a an invalid color, inherit the desired color from the parent
3065         style instead. Matches Opera/FF and SVG 1.1 Second Edition (http://www.w3.org/TR/SVG/).
3066
3067         Tests: svg/custom/invalid-stroke-hex.svg
3068                svg/custom/invalid-uri-stroke.svg
3069
3070         * rendering/svg/RenderSVGResource.cpp:
3071         (WebCore::inheritColorFromParentStyleIfNeeded):
3072         (WebCore::requestPaintingResource):
3073
3074 2011-05-31  Vangelis Kokkevis  <vangelis@chromium.org>
3075
3076         Reviewed by Kent Tamura.
3077
3078         [chromium] Avoid double deletion of DrawingBuffer's color buffer
3079         texture.
3080         https://bugs.webkit.org/show_bug.cgi?id=61761
3081
3082         Test: Verified that the DCHECK in GraphicsContext3D implementation
3083         doesn't trigger.
3084
3085         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3086         (WebCore::DrawingBuffer::~DrawingBuffer):
3087
3088 2011-05-30  Hayato Ito  <hayato@chromium.org>
3089
3090         Reviewed by Ryosuke Niwa.
3091
3092         Add a utility function for dumping a tree for the Node, including a document of a frame.
3093         https://bugs.webkit.org/show_bug.cgi?id=61727
3094
3095         No new tests since added functions are only available in debug builds.
3096
3097         * dom/Node.cpp:
3098         (WebCore::parentOrHostOrFrameOwner):
3099         (WebCore::traverseNextNodeAcrossFrame):
3100         (WebCore::Node::showTreeForThisAcrossFrame):
3101         * dom/Node.h:
3102
3103 2011-05-30  James Kozianski  <koz@chromium.org>
3104
3105         Reviewed by Kent Tamura.
3106
3107         [Chromium] Make isValidProtocol() accept protocols with '+'.
3108         https://bugs.webkit.org/show_bug.cgi?id=61759
3109
3110         Also, detect syntax errors before security errors; some syntax errors
3111         will also trigger a security error, but it's more helpful to the
3112         programmer to know if they have a syntax error, which are well-defined
3113         in the spec, rather than a security error, which aren't.
3114
3115         * page/Navigator.cpp:
3116         (WebCore::Navigator::registerProtocolHandler):
3117         Detect syntax errors before security errors.
3118         * platform/KURLGoogle.cpp:
3119         (WebCore::isSchemeChar):
3120         Include '+' in the list of valid characters.
3121
3122 2011-05-30  Andrey Petrov  <andrey.petrov@gmail.com>
3123
3124         Reviewed by Hajime Morita.
3125
3126         Using jQuery to show/hide IMG elements crashes WebKit
3127         https://bugs.webkit.org/show_bug.cgi?id=31721
3128
3129         For platform code, do not assert nodes always have renderer at
3130         the time context menu action is invoked.
3131         Renderer can actually be empty for a given node if it was hidden
3132         or removed from domtree by some non-user generated event (e.g timeout) 
3133         after the popup menu had been created.
3134
3135         Changing Chromium, Gtk, Mac, Qt, Win and WinCE.
3136
3137         Test: editing/pasteboard/copy-standalone-image-crash.html
3138
3139         * platform/chromium/PasteboardChromium.cpp:
3140         (WebCore::Pasteboard::writeImage):
3141         * platform/gtk/PasteboardGtk.cpp:
3142         (WebCore::Pasteboard::writeImage):
3143         * platform/mac/PasteboardMac.mm:
3144         (WebCore::Pasteboard::writeImage):
3145         * platform/qt/PasteboardQt.cpp:
3146         (WebCore::Pasteboard::writeImage):
3147         * platform/win/PasteboardWin.cpp:
3148         (WebCore::Pasteboard::writeImage):
3149         * platform/wince/PasteboardWinCE.cpp:
3150         (WebCore::Pasteboard::writeImage):
3151
3152 2011-05-30  Daniel Bates  <dbates@webkit.org>
3153
3154         Reviewed by Adam Barth.
3155
3156         Rename XSSFilter to XSSAuditor
3157         https://bugs.webkit.org/show_bug.cgi?id=61718
3158
3159         Currently we use the names XSSFilter and XSSAuditor throughout the project.
3160         Instead, we should choose one name for consistency.
3161
3162         No functionality was changed. So, no new tests.
3163
3164         * CMakeLists.txt:
3165         * GNUmakefile.list.am:
3166         * WebCore.gypi:
3167         * WebCore.pro:
3168         * WebCore.vcproj/WebCore.vcproj:
3169         * WebCore.xcodeproj/project.pbxproj:
3170         * html/parser/HTMLDocumentParser.cpp:
3171         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3172         (WebCore::HTMLDocumentParser::pumpTokenizer):
3173         * html/parser/HTMLDocumentParser.h:
3174         * html/parser/XSSAuditor.cpp: Copied from Source/WebCore/html/parser/XSSFilter.cpp.
3175         (WebCore::XSSAuditor::XSSAuditor):
3176         (WebCore::XSSAuditor::init):
3177         (WebCore::XSSAuditor::filterToken):
3178         (WebCore::XSSAuditor::filterTokenInitial):
3179         (WebCore::XSSAuditor::filterTokenAfterScriptStartTag):
3180         (WebCore::XSSAuditor::filterScriptToken):
3181         (WebCore::XSSAuditor::filterObjectToken):
3182         (WebCore::XSSAuditor::filterParamToken):
3183         (WebCore::XSSAuditor::filterEmbedToken):
3184         (WebCore::XSSAuditor::filterAppletToken):
3185         (WebCore::XSSAuditor::filterIframeToken):
3186         (WebCore::XSSAuditor::filterMetaToken):
3187         (WebCore::XSSAuditor::filterBaseToken):
3188         (WebCore::XSSAuditor::filterFormToken):
3189         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3190         (WebCore::XSSAuditor::eraseAttributeIfInjected):
3191         (WebCore::XSSAuditor::snippetForRange):
3192         (WebCore::XSSAuditor::snippetForAttribute):
3193         (WebCore::XSSAuditor::isContainedInRequest):
3194         (WebCore::XSSAuditor::isSameOriginResource):
3195         * html/parser/XSSAuditor.h: Copied from Source/WebCore/html/parser/XSSFilter.h.
3196         * html/parser/XSSFilter.cpp: Removed.
3197         * html/parser/XSSFilter.h: Removed.
3198
3199 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3200
3201         Reviewed by Simon Hausmann.
3202
3203         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
3204         https://bugs.webkit.org/show_bug.cgi?id=61694
3205
3206         Expose a public clearAll() function to reset WebCore::Animation.
3207
3208         No new functionality, so no new tests.
3209
3210         * platform/animation/Animation.h:
3211         (WebCore::Animation::clearAll):
3212
3213 2011-05-30  Eric Carlson  <eric.carlson@apple.com>
3214
3215         Reviewed by Alexey Proskuryakov.
3216
3217         Audio and video files saved to the Application Cache should preserve the original file extension
3218         https://bugs.webkit.org/show_bug.cgi?id=61750
3219         <rdar://9524922>
3220
3221         No new tests, it isn't possible to check the name of the file in the cache from within
3222         DRT. Changes verified manually.
3223
3224         * loader/appcache/ApplicationCacheStorage.cpp:
3225         (WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache
3226             file name.
3227         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter.
3228         * loader/appcache/ApplicationCacheStorage.h:
3229
3230 2011-05-30  Jer Noble  <jer.noble@apple.com>
3231
3232         Reviewed by Dan Bernstein.
3233
3234         Play/Pause button in wrong state when entering full screen on Vimeo
3235         https://bugs.webkit.org/show_bug.cgi?id=61754
3236
3237         Update the play/pause button inside reset().  This ensures the button is in
3238         the correct state when the controls are created after playback has already
3239         started.
3240
3241         * html/shadow/MediaControlRootElement.cpp:
3242         (WebCore::MediaControlRootElement::reset):
3243
3244 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3245
3246         Reviewed by Simon Hausmann.
3247
3248         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
3249         https://bugs.webkit.org/show_bug.cgi?id=61694
3250
3251         Added a public TimingFunction::type() method.
3252
3253         No new functionality, so no new tests.
3254
3255         * platform/animation/TimingFunction.h:
3256         (WebCore::TimingFunction::type):
3257
3258 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
3259
3260         BUILD FIX for r87697 on Windows/Symbian
3261
3262         For now enabling TextureMapper for Mac/Linux only.
3263
3264         * WebCore.pri:
3265
3266 2011-05-30  David Kilzer  <ddkilzer@apple.com>
3267
3268         BUILD FIX for r87692 with !ENABLE(FULLSCREEN_API)
3269
3270         * dom/EventDispatcher.cpp:
3271         (WebCore::EventDispatcher::determineDispatchBehavior): Mark
3272         shadowRoot as an unused parameter with !ENABLE(FULLSCREEN_API).
3273
3274 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3275
3276         Reviewed by Andreas Kling.
3277
3278         [Texmap][Qt] Enable TextureMapper by default
3279         https://bugs.webkit.org/show_bug.cgi?id=61740
3280
3281         Make CONFIG+=texmap an opt-out instead of an opt-in.
3282
3283         No new functionality so no new tests.
3284
3285         * WebCore.pri:
3286
3287 2011-05-30  Martin Robinson  <mrobinson@igalia.com>
3288
3289         Reviewed by Xan Lopez.
3290
3291         [GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots
3292         https://bugs.webkit.org/show_bug.cgi?id=61693
3293
3294         Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is
3295         null. A recent change fixing 0-pixel-size fonts means that m_scaledFont
3296         may now be null.
3297
3298         No new tests. This change should cause fast/css/font-face-zero-hash-key.html
3299         to stop crashing.
3300
3301         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3302         (WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing
3303         m_scaledFont.
3304
3305 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
3306
3307         Reviewed by Kenneth Rohde Christiansen.
3308
3309         [Texmap][Qt] Disable accelerated plugins/media until they're working.
3310         https://bugs.webkit.org/show_bug.cgi?id=61687
3311
3312         Until this works properly, we should indicate that our media implementation
3313         in texture mapper doesn't support accelerated compositing.
3314
3315         This makes LayoutTests/compositing/video/* work again.
3316
3317         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3318         (WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering):
3319         (WebCore::MediaPlayerPrivateQt::platformLayer):
3320
3321 2011-05-30  Mikhail Naganov  <mnaganov@chromium.org>
3322
3323         Reviewed by Adam Barth.
3324
3325         [Chromium] Fix regression after r87628.
3326         https://bugs.webkit.org/show_bug.cgi?id=61733
3327
3328         Having r87628 in place, Chrome reliability bot crashes in
3329         WebCore::HTMLLinkElement::onloadTimerFired.
3330
3331         This is because the change makes WebCore::CachedResource::setRequest to
3332         call checkNotify on request reset.  HTMLLinkElement registers itself as
3333         CachedResource client via m_cachedSheet, which can happen even if
3334         m_cachedLinkResource wasn't set.  As a result,
3335         WebCore::HTMLLinkElement::notifyFinished is got called with unset
3336         m_cachedLinkResource, which causes a crash in
3337         HTMLLinkElement::onloadTimerFired
3338
3339         * html/HTMLLinkElement.cpp:
3340         (WebCore::HTMLLinkElement::notifyFinished):
3341
3342 2011-05-30  Jer Noble  <jer.noble@apple.com>
3343
3344         Reviewed by Darin Adler and Simon Fraser.
3345
3346         REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again
3347         https://bugs.webkit.org/show_bug.cgi?id=61717
3348         rdar://problem/9522272
3349
3350         May be some good way to test this later. No immediate idea about the best way.
3351
3352         When a media element is taken into full-screen mode, stop events from propagating
3353         outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior()
3354         has been changed to take a shadow root node. In our full screen media element check,
3355         we check to see if the passed shadow root is the shadow root of the full screen media
3356         element, and if so, specify events should StayInsideShadowDOM. The end result is that
3357         inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the
3358         way from the SliderThumb to the video element's shadow root, but no further.
3359
3360         * dom/EventDispatcher.cpp:
3361         (WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the
3362         shadow DOM when showing a full screen video.
3363
3364         * html/HTMLMediaElement.cpp:
3365         (WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls.
3366         The events telling us about activity in the shadow DOM no longer bubble out so we need to
3367         handle this inside the shadow DOM on the root element.
3368         (WebCore::HTMLMediaElement::play): Ditto.
3369         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
3370         (WebCore::HTMLMediaElement::defaultEventHandler): Ditto.
3371         (WebCore::HTMLMediaElement::enterFullscreen): Ditto.
3372         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
3373         * html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element.
3374
3375         * html/shadow/MediaControlElements.cpp:
3376         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out
3377         changes that tried to make special rules for events using preDispatchEventHandler and such.
3378         This rolls out both r87622 and r87655.
3379         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto.
3380         (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto.
3381         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto.
3382         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
3383         (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
3384         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
3385         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto.
3386         (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
3387         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
3388         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto.
3389         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
3390         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
3391         * html/shadow/MediaControlElements.h: Ditto.
3392
3393         * html/shadow/MediaControlRootElement.cpp:
3394         (WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members.
3395         (WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider
3396         hiding the controls later.
3397         (WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse
3398         is no longer over the controls.
3399         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide
3400         automatically if we're playing.
3401         (WebCore::MediaControlRootElement::enteredFullscreen): Start the timer.
3402         (WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care
3403         if we are full screen.
3404         (WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function.
3405         (WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions
3406         as the mouse is moved in and out.
3407         (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if
3408         needed.
3409         (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions
3410         are met.
3411         (WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer.
3412
3413         * html/shadow/MediaControlRootElement.h: Added new functions and data members.
3414
3415
3416 2011-05-30  Gavin Peters  <gavinp@chromium.org>
3417
3418         Reviewed by Adam Barth.
3419
3420         prevent HTMLLinkElement from watching multiple CachedResources
3421         https://bugs.webkit.org/show_bug.cgi?id=61686
3422
3423         If we modify an existing link element, stop listening to the previous
3424         cached resource, to prevent double notifications (which crash).
3425
3426         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
3427
3428         * html/HTMLLinkElement.cpp:
3429         (WebCore::HTMLLinkElement::process):
3430
3431 2011-05-30  Peter Varga  <pvarga@webkit.org>
3432
3433         Unreviewed build fix.
3434
3435         [Qt][V8] Fix debug build.
3436
3437         No new tests needed.
3438
3439         * css/CSSStyleDeclaration.cpp: Add missing header.
3440         * dom/Text.cpp: Ditto.
3441         * rendering/InlineTextBox.cpp: Ditto.
3442
3443 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3444
3445         Unreviewed, rolling out r87683.
3446         http://trac.webkit.org/changeset/87683
3447         https://bugs.webkit.org/show_bug.cgi?id=61729
3448
3449         Breaks inspector tests on Chromium (Requested by apavlov on
3450         #webkit).
3451
3452         * inspector/front-end/StylesSidebarPane.js:
3453         (WebInspector.StylesSidebarPane.prototype.update):
3454
3455 2011-05-25  Alexander Pavlov  <apavlov@chromium.org>
3456
3457         Reviewed by Yury Semikhatsky.
3458
3459         Web Inspector: node selection is slow in the Elements panel.
3460         https://bugs.webkit.org/show_bug.cgi?id=60813
3461
3462         Schedule full style updates rather than request all node styles from the backend up front.
3463
3464         * inspector/front-end/StylesSidebarPane.js:
3465         (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles):
3466         (WebInspector.StylesSidebarPane.prototype.update):
3467
3468 2011-05-30  Andrey Kosyakov  <caseq@chromium.org>
3469
3470         Reviewed by Pavel Feldman.
3471
3472         Web Inspector: do not issue frontendReused for reload or navigation.
3473         https://bugs.webkit.org/show_bug.cgi?id=61192
3474
3475        - only issue frontendReused when inspector is attached after main resource committed load
3476        - upon committing loading main resource, reset agents before sending FrameNavigated to page agent
3477        - Ensure main resource is set early so that abbreviations of URLs in resource tree are consistent after reload
3478        - do not enable agents explicitly in frontendReused (this is done by backend when resotring state from cookie)
3479
3480         * inspector/InspectorAgent.cpp:
3481         (WebCore::InspectorAgent::InspectorAgent):
3482         (WebCore::InspectorAgent::restore):
3483         (WebCore::InspectorAgent::clearFrontend):
3484         (WebCore::InspectorAgent::didCommitLoad):
3485         * inspector/InspectorAgent.h:
3486         * inspector/InspectorInstrumentation.cpp:
3487         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3488         * inspector/front-end/NetworkManager.js:
3489         * inspector/front-end/ResourceTreeModel.js:
3490         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
3491         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
3492         (WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation):
3493         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
3494         * inspector/front-end/ResourcesPanel.js:
3495         (WebInspector.ResourcesPanel.prototype.reset):
3496         (WebInspector.ResourcesPanel.prototype._resetResourcesTree):
3497         (WebInspector.DatabaseTreeElement.prototype.onpopulate):
3498         (WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement):
3499         * inspector/front-end/inspector.js:
3500         (WebInspector.reset):
3501         (WebInspector.frontendReused):
3502
3503 2011-05-30  Ryan Sleevi  <rsleevi@chromium.org>
3504
3505         Reviewed by Darin Adler.
3506
3507         FEConvolveMatrix::getPixelValue() fails to properly check if y is within bounds, causing it to fail to correctly apply the kernel and edge mode to the first targetY pixels
3508         https://bugs.webkit.org/show_bug.cgi?id=61603
3509
3510         Test: svg/filters/feConvolveFilter-y-bounds.svg
3511
3512         * platform/graphics/filters/FEConvolveMatrix.cpp:
3513         (WebCore::FEConvolveMatrix::getPixelValue):
3514
3515 2011-05-30  Nate Chapin  <japhet@chromium.org>
3516
3517         Reviewed by Antti Koivisto.
3518
3519         Refactor the CachedResourceLoader -> CachedResource -> CachedResourceRequest
3520         flow so it's a little less circular.
3521         https://bugs.webkit.org/show_bug.cgi?id=61666
3522
3523         * loader/cache/CachedFont.cpp:
3524         (WebCore::CachedFont::beginLoadIfNeeded):
3525         * loader/cache/CachedResource.cpp:
3526         (WebCore::CachedResource::load):
3527         * loader/cache/CachedResourceLoader.cpp:
3528         (WebCore::CachedResourceLoader::requestImage):
3529         (WebCore::CachedResourceLoader::setAutoLoadImages):
3530         (WebCore::CachedResourceLoader::loadStarted):
3531         * loader/cache/CachedResourceLoader.h:
3532         * loader/cache/CachedResourceRequest.cpp:
3533         (WebCore::CachedResourceRequest::load):
3534
3535 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3536
3537         Unreviewed, rolling out r87618.
3538         http://trac.webkit.org/changeset/87618
3539         https://bugs.webkit.org/show_bug.cgi?id=61720
3540
3541         Causes BrowserFocusTest.FocusOnReload to fail (Requested by
3542         abarth|gardener on #webkit).
3543
3544         * html/HTMLLinkElement.cpp:
3545         (WebCore::HTMLLinkElement::process):
3546
3547 2011-05-29  Yuta Kitamura  <yutak@chromium.org>
3548
3549         Reviewed by Kent Tamura.
3550
3551         WebSocket closing handshake
3552         https://bugs.webkit.org/show_bug.cgi?id=35721
3553
3554         Implement WebSocket closing handshake based on Ian Hickson's
3555         WebSocket protocol draft 76.
3556
3557         Tests: http/tests/websocket/tests/client-close.html
3558                http/tests/websocket/tests/server-close.html
3559
3560         * platform/network/SocketStreamHandleBase.cpp:
3561         (WebCore::SocketStreamHandleBase::send):
3562         Do not send a message if we are in Closing state.
3563         (WebCore::SocketStreamHandleBase::close):
3564         Do not disconnect if we have pending data which have not been sent yet.
3565         In this case, the actual disconnection will happen in sendPendingData().
3566         (WebCore::SocketStreamHandleBase::disconnect):
3567         Renamed from close(). Disconnect the connection immediately.
3568         (WebCore::SocketStreamHandleBase::sendPendingData):
3569         * platform/network/SocketStreamHandleBase.h:
3570         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3571         Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
3572         to didClose().
3573         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3574         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3575         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
3576         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
3577         * websockets/ThreadableWebSocketChannelClientWrapper.h:
3578         * websockets/WebSocket.cpp:
3579         (WebCore::WebSocket::send):
3580         (WebCore::WebSocket::close):
3581         Fail if close() is attempted before the connection is established.
3582         Otherwise, set the state to CLOSING and start the closing handshake.
3583         (WebCore::WebSocket::bufferedAmount):
3584         If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
3585         (WebCore::WebSocket::didConnect):
3586         (WebCore::WebSocket::didReceiveMessage):
3587         We need to invoke message event in CLOSING state as well as OPEN state.
3588         (WebCore::WebSocket::didReceiveMessageError):
3589         (WebCore::WebSocket::didStartClosingHandshake):
3590         (WebCore::WebSocket::didClose):
3591         * websockets/WebSocket.h:
3592         * websockets/WebSocketChannel.cpp:
3593         (WebCore::WebSocketChannel::WebSocketChannel):
3594         (WebCore::WebSocketChannel::close):
3595         Start the closing handshake.
3596         (WebCore::WebSocketChannel::disconnect):
3597         Disconnect the socket stream, instead of close.
3598         (WebCore::WebSocketChannel::didClose):
3599         (WebCore::WebSocketChannel::didReceiveData): Ditto.
3600         (WebCore::WebSocketChannel::didFail): Ditto.
3601         (WebCore::WebSocketChannel::processBuffer):
3602         Ditto.
3603         Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
3604         (WebCore::WebSocketChannel::startClosingHandshake):
3605         Send 0xFF 0x00 byte sequence.
3606         (WebCore::WebSocketChannel::closingTimerFired):
3607         Disconnect the socket stream if the closing handshake has timed out.
3608         * websockets/WebSocketChannel.h:
3609         m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
3610         specification).
3611         * websockets/WebSocketChannelClient.h:
3612         (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
3613         (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
3614         * websockets/WorkerThreadableWebSocketChannel.cpp:
3615         Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
3616         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
3617         (WebCore::workerContextDidStartClosingHandshake):
3618         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3619         (WebCore::workerContextDidClose):
3620         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3621         * websockets/WorkerThreadableWebSocketChannel.h:
3622
3623 2011-05-29  Adam Barth  <abarth@webkit.org>
3624
3625         Attempt to fix build by implementing pure virtual function.
3626
3627         * html/shadow/MediaControlRootElementChromium.cpp:
3628         (WebCore::MediaControlRootElementChromium::shouldHideControls):
3629         * html/shadow/MediaControlRootElementChromium.h:
3630
3631 2011-05-29  Brian Weinstein  <bweinstein@apple.com>
3632
3633         Reviewed by Darin Adler.
3634
3635         Controls never hide in full screen after user stops moving mouse
3636         https://bugs.webkit.org/show_bug.cgi?id=61715
3637         <rdar://problem/9522182>
3638         
3639         When we get a mouse move event in HTMLMediaElement::defaultEventHandler, and we are in full screen,
3640         show the media controls, and then start a timer.
3641         
3642         The timer fires 3 seconds after the user's last mouse movement (timer is restarted on every mouse
3643         move), and hides the controls.
3644
3645         * html/HTMLMediaElement.cpp:
3646         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize our new timer.
3647         (WebCore::HTMLMediaElement::play): If we are in full screen mode, start our timer to hide the full screen
3648             controls. We don't want the user to have to move the mouse to hide them when they use the spacebar
3649             to play.
3650         (WebCore::HTMLMediaElement::startHideFullscreenControlsTimer): Starts a oneshot timer 3 seconds in the future
3651             if we are in full screen.
3652         (WebCore::HTMLMediaElement::hideFullscreenControlsTimerFired): Make sure that we are currently playing, and
3653             we are in full screen, and hide the controls. We don't want to hide the controls if we are paused.
3654         (WebCore::HTMLMediaElement::stopHideFullscreenControlsTimer): Stops the timer.
3655         (WebCore::HTMLMediaElement::defaultEventHandler): If we get a mouse move event and are in full screen, show the
3656             controls and start a timer to hide them.
3657         (WebCore::HTMLMediaElement::enterFullscreen): Start a timer to hide the full screen controls. The user shouldn't
3658             have the move the mouse once they enter full screen to hide the controls.
3659         (WebCore::HTMLMediaElement::exitFullscreen): Stop the timer to hide the full screen controls.
3660         * html/HTMLMediaElement.h:
3661         * html/shadow/MediaControls.h: Added pure virtual shouldHideControls() method.
3662         * html/shadow/MediaControlRootElement.cpp:
3663         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer to hide the full screen controls.
3664         (WebCore::MediaControlRootElement::shouldHideControls): Added, only report that
3665             the caller should hide the controls if the panel is not hovered.
3666         * html/shadow/MediaControlRootElement.h:
3667
3668 2011-05-29  Jer Noble  <jer.noble@apple.com>
3669
3670         Reviewed by Simon Fraser.
3671
3672         Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
3673         https://bugs.webkit.org/show_bug.cgi?id=61712
3674
3675         Tests: fullscreen/full-screen-iframe-zIndex.html
3676
3677         Walk up the ancestor chain for the full-screen element, marking them as full-screen
3678         ancestors. Then, we apply a pseudo-class to those elements, which disable all their
3679         stacking-context-creating styles.  Set the z-index of all full-screen elements (and
3680         the iframes which contain them) to a large value, ensuring they appear above other
3681         sibling elements.
3682
3683         This new behavior replaces the previous "-webkit-full-screen-media-document" behavior
3684         and pesudo-class, so remove it and replace it with the new pseudo-class.
3685
3686         * css/CSSSelector.cpp:
3687         (WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove
3688             -webkit-full-screen-media-document.
3689         (WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove
3690             PseudoFullScreenMediaDocument
3691         (WebCore::CSSSelector::extractPseudoType): Ditto.
3692         * css/CSSSelector.h: Ditto.
3693         * css/CSSStyleSelector.cpp:
3694         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the
3695             PseudoFullScreenMediaDocument implementation and replace it with
3696             PseudoFullScreenAncestor.
3697         * css/fullscreen.css:
3698         (:-webkit-full-screen): Add a z-index property.
3699         (:-webkit-full-screen-ancestor:not(iframe)): Added.  Reset the z-index to
3700             auto, and reset other stacking-context creating properties.
3701         * dom/Document.cpp:
3702         (WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element
3703             instead of just the iframe elements.
3704         (WebCore::Document::webkitWillEnterFullScreenForElement): Ditto.
3705         * dom/Element.cpp:
3706         (WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property.
3707         (WebCore::Element::insertedIntoTree): Ditto.
3708         (WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase.
3709         (WebCore::Element::setContainsFullScreenElement): Ditto.
3710         * dom/Element.h:
3711         * dom/ElementRareData.h:
3712         (WebCore::ElementRareData::ElementRareData): Added ivar and initializer for 
3713             m_containsFullScreenElement.
3714         * html/HTMLFrameElementBase.cpp:
3715         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer.
3716         (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element.
3717         * html/HTMLFrameElementBase.h:
3718         * rendering/style/RenderStyleConstants.h:
3719
3720 2011-05-29  Dan Bernstein  <mitz@apple.com>
3721
3722         Reviewed by Darin Adler.
3723
3724         <rdar://problem/9515650> 30 second rewind button obscured in fullscreen controller when video uses custom inline controls
3725         https://bugs.webkit.org/show_bug.cgi?id=61714
3726
3727         * dom/Document.cpp:
3728         (WebCore::Document::webkitDidEnterFullScreenForElement): Call didBecomeFullscreenElement() on the
3729         new full screen element.
3730         (WebCore::Document::webkitWillExitFullScreenForElement): Call willStopBeingFullscreenElement() on
3731         the full screen element.
3732         * dom/Element.h:
3733         (WebCore::Element::didBecomeFullscreenElement): Added with a default implementation that does nothing.
3734         (WebCore::Element::willStopBeingFullscreenElement): Ditto.
3735         * html/HTMLMediaElement.cpp:
3736         (WebCore::HTMLMediaElement::didBecomeFullscreenElement): Added this override, which calls
3737         MediaControls::enteredFullscreen().
3738         (WebCore::HTMLMediaElement::willStopBeingFullscreenElement): Added this override, which calls
3739         MediaControls::exitedFullscreen().
3740         * html/HTMLMediaElement.h:
3741         * html/shadow/MediaControlElements.cpp:
3742         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Removed calls to
3743         enteredFullscreen() and exitedFullscreen() from here, since they are now called in response to
3744         changes to the fullscreen-ness of the element.
3745
3746 2011-05-29  Darin Adler  <darin@apple.com>
3747
3748         Reviewed by Kevin Decker.
3749
3750         REGRESSION (r87622): In media documents, clicking the full screen button and the play button pauses the video
3751         https://bugs.webkit.org/show_bug.cgi?id=61713
3752
3753         We need to come up with a way to regression-test these changes. Nothing at the moment.
3754
3755         The bug is that we removed calls to preventDefault, but we still do need to prevent
3756         default handling of this event.
3757
3758         * html/shadow/MediaControlElements.cpp:
3759         (WebCore::MediaControlElement::preDispatchEventHandler): Add back the preventDefault
3760         that was in here before r87622 as well as the stopPropagation that was added in r87622.
3761         (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
3762         (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
3763         (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
3764         (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
3765         (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
3766         (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
3767         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
3768         (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
3769         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
3770
3771 2011-05-29  Andreas Kling  <kling@webkit.org>
3772
3773         Reviewed by Kenneth Rohde Christiansen.
3774
3775         Element: Micro-cleanup of scroll methods.
3776         https://bugs.webkit.org/show_bug.cgi?id=61705
3777
3778         Do an early return without calculating element boundaries when asked
3779         to scroll an element without a renderer().
3780
3781         * dom/Element.cpp:
3782         (WebCore::Element::scrollIntoView):
3783         (WebCore::Element::scrollIntoViewIfNeeded):
3784         (WebCore::Element::scrollByUnits):
3785
3786 2011-05-29  Darin Adler  <darin@apple.com>
3787
3788         Reviewed by Dan Bernstein.
3789
3790         Fix assertion seen when entering full screen mode for standalone video
3791         https://bugs.webkit.org/show_bug.cgi?id=61708
3792
3793         We don't currently have a way to make a regression test for this.
3794
3795         * dom/Document.cpp:
3796         (WebCore::Document::setAnimatingFullScreen): Call scheduleForcedStyleRecalc,
3797         because scheduleStyleRecalc is intended to only be called when the style
3798         system itself detects recalc is needed.
3799
3800 2011-05-27  Andreas Kling  <kling@webkit.org>
3801
3802         Reviewed by James Robinson.
3803
3804         [Qt] Add area check to ImageBufferData::getImageData()
3805         https://bugs.webkit.org/show_bug.cgi?id=61375
3806
3807         No change in behavior, just a sanity check.
3808
3809         * platform/graphics/qt/ImageBufferQt.cpp:
3810         (WebCore::getImageData):
3811
3812 2011-05-29  Beth Dakin  <bdakin@apple.com>
3813
3814         Reviewed by Darin Adler.
3815
3816         https://bugs.webkit.org/show_bug.cgi?id=61700
3817         Need WebKit2 API to get the size of the render tree
3818         -and corresponding-
3819         <rdar://problem/9512733>
3820
3821         New member variable on RenderArena keeps track of the current amount of memory 
3822         allocated in the arena. The new client function sends this piece of data to 
3823         WebKit.
3824         * page/ChromeClient.h:
3825         (WebCore::ChromeClient::setRenderTreeSize):
3826         * page/FrameView.cpp:
3827         (WebCore::FrameView::performPostLayoutTasks):
3828         * rendering/RenderArena.cpp:
3829         (WebCore::RenderArena::RenderArena):
3830         (WebCore::RenderArena::allocate):
3831         (WebCore::RenderArena::free):
3832         * rendering/RenderArena.h:
3833         (WebCore::RenderArena::totalRenderArenaSize):
3834
3835 2011-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3836
3837         Unreviewed, rolling out r87566.
3838         http://trac.webkit.org/changeset/87566
3839         https://bugs.webkit.org/show_bug.cgi?id=61702
3840
3841         It made all tests assert on Qt in debug mode (Requested by
3842         Ossy_weekend on #webkit).
3843
3844         * WebCore.exp.in:
3845         * bindings/ScriptControllerBase.cpp:
3846         (WebCore::ScriptController::executeIfJavaScriptURL):
3847         * dom/Document.cpp:
3848         (WebCore::Document::Document):
3849         (WebCore::Document::suggestedMIMEType):
3850         (WebCore::Document::lastModified):
3851         (WebCore::Document::initSecurityContext):
3852         (WebCore::Document::updateURLForPushOrReplaceState):
3853         * dom/Document.h:
3854         (WebCore::Document::setDocumentLoader):
3855         (WebCore::Document::loader):
3856         * html/MediaDocument.cpp:
3857         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3858         * html/PluginDocument.cpp:
3859         (WebCore::PluginDocumentParser::createDocumentStructure):
3860         * platform/mac/HTMLConverter.mm:
3861         (fileWrapperForElement):
3862
3863 2011-05-28  Steve Falkenburg  <sfalken@apple.com>
3864
3865         Reviewed by Dan Bernstein.
3866
3867         Don't add sub-frames to global history when navigating via back/forward
3868         https://bugs.webkit.org/show_bug.cgi?id=61701
3869         <rdar://problem/9521222>
3870
3871         Instead of just checking whether the load is the first in the frame, we also need to
3872         check to make sure we're loading in the main frame.
3873
3874         Not testable due to lack of global history infrastructure in DRT.
3875
3876         * loader/FrameLoader.cpp:
3877         (WebCore::FrameLoader::transitionToCommitted):
3878
3879 2011-05-28  Alexey Proskuryakov  <ap@apple.com>
3880
3881         Suggested by Simon Fraser.
3882
3883         REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
3884         https://bugs.webkit.org/show_bug.cgi?id=61692
3885         <rdar://problem/9488628>
3886
3887         * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): There was no need to use
3888         ASSERT_UNUSED here.
3889
3890 2011-05-28  Alexey Proskuryakov  <ap@apple.com>
3891
3892         Reviewed by Geoff Garen.
3893
3894         REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
3895         https://bugs.webkit.org/show_bug.cgi?id=61692
3896         <rdar://problem/9488628>
3897
3898         Test: fast/dom/gc-image-element-2.html
3899
3900         Manually verified that tests from bug 59604 and from bug 40926 still pass.
3901
3902         The problem here was that HTMLImageElement::hasPendingActivity() could return false when
3903         a load (or error) event was still expected to fire.
3904
3905         * loader/cache/CachedResource.cpp:
3906         (WebCore::CachedResource::setRequest):
3907         * loader/cache/CachedResource.h:
3908         (WebCore::CachedResource::wasCanceled):
3909         (WebCore::CachedResource::errorOccurred):
3910         Track whether the load was canceled. We want to always notify clients of load outcome,
3911         as that's the only way they could make intelligent decisions.
3912
3913         * dom/ScriptElement.cpp: (WebCore::ScriptElement::execute): Cached resource clients now
3914         get a notifyFinished call on cancellation. Handle this case, where we don't need the
3915         execute the script, but also don't need to fire an error event.
3916
3917         * html/HTMLImageElement.cpp: Moved hasPendingActivity() to header, since it's just a single
3918         function call now.
3919
3920         * html/HTMLImageElement.h: (WebCore::HTMLImageElement::hasPendingActivity): There is a large
3921         window between when CachedResource::isLoading() becomes false and events are queued.
3922         ImageLoader::haveFiredLoadEvent() is a much better indication of whether we are expecting
3923         an event to fire.
3924
3925         * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::onloadTimerFired): Again, don't do
3926         anything on cancellation.
3927
3928         * loader/ImageLoader.cpp:
3929         (WebCore::ImageEventSender::hasPendingEvents): Made it debug-only again, and fixed to
3930         give an accurate result while looping over the list of events to dispatch.
3931         (WebCore::ImageLoader::notifyFinished): Don't do anything when cancelled. We don't want to
3932         switch to a broken image icon, or to dispatch events.
3933         (WebCore::ImageEventSender::dispatchPendingEvents): Clear the current loader from dispatching
3934         list, as the event is no longer pending when it's being dispatched.
3935
3936         * loader/ImageLoader.h: Removed unnecessary hasPendingLoadEvent(). We don't care whether one
3937         is already pending, we only care if one is expected at some time in the future, and
3938         !haveFiredLoadEvent() is our best idea of that.
3939
3940         * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::notifyFinished): Another place to
3941         handle cancellation.
3942
3943 2011-05-28  Adam Barth  <abarth@webkit.org>
3944
3945         Reviewed by Alexey Proskuryakov.
3946
3947         Audit all uses of KURL::prettyURL
3948         https://bugs.webkit.org/show_bug.cgi?id=61201
3949
3950         As far as I can tell, all the callers of this API are confused.  There
3951         seems to be a cargo cult of using the "pretty" version of a URL, but in
3952         reality folks just want the URL itself.  The only case I'm unsure about
3953         is location.href, which could have some compatibility constraints.
3954         I've renamed prettyURL to deprecatedString to discourage folks from
3955         further cargo-culting.
3956
3957         * WebCore.exp.in:
3958         * page/Location.cpp:
3959         (WebCore::Location::href):
3960         (WebCore::Location::toString):
3961         * platform/KURL.cpp:
3962         (WebCore::KURL::deprecatedString):
3963         * platform/KURL.h:
3964         * platform/KURLGoogle.cpp:
3965         (WebCore::KURL::deprecatedString):
3966         * platform/network/soup/ResourceHandleSoup.cpp:
3967         (WebCore::ResourceHandle::prepareForURL):
3968         * workers/WorkerLocation.cpp:
3969         (WebCore::WorkerLocation::href):
3970         (WebCore::WorkerLocation::toString):
3971
3972 2011-05-28  Jer Noble  <jer.noble@apple.com>
3973
3974         Reviewed by Maciej Stachowiak.
3975
3976         Mouse clicks propagate outside full-screen media controls.
3977         https://bugs.webkit.org/show_bug.cgi?id=61689
3978
3979         Mouse click events are propagating out of the media controls, so mouse click
3980         listeners registered on the video element are getting fired when the user
3981         clicks on media controller buttons.  By default, block propagation of click 
3982         events from MediaControlElements by overriding preDispatchEventHandler, and
3983         convert all instances of defaultEventHandler -> preDispatchEventHandler.  Change
3984         all calls of event->setDefaultHandled() to event->stopPropagation().
3985
3986         * html/shadow/MediaControlElements.cpp:
3987         (WebCore::MediaControlElement::preDispatchEventHandler): Added.  Block 
3988             propagation of all mouse click events.
3989         (WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler):
3990             Renamed from setDefaultHandled.
3991         (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
3992         (WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto.
3993         (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
3994         (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
3995         (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
3996         (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
3997         (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
3998         (WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto.
3999         (WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto.
4000         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
4001         (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
4002         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
4003         * html/shadow/MediaControlElements.h:
4004
4005 2011-05-28  Gavin Peters  <gavinp@chromium.org>
4006
4007         Reviewed by Adam Barth.
4008
4009         prevent HTMLLinkElement from watching multiple CachedResources
4010         https://bugs.webkit.org/show_bug.cgi?id=61686
4011
4012         If we modify an existing link element, stop listening to the previous
4013         cached resource, to prevent double notifications (which crash).
4014
4015         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
4016
4017         * html/HTMLLinkElement.cpp:
4018         (WebCore::HTMLLinkElement::process):
4019
4020 2011-05-28  Tonis Tiigi  <tonistiigi@gmail.com>
4021
4022         Reviewed by Pavel Feldman.
4023
4024         Web Inspector: there is a problem with computed style properties with wrong values
4025         https://bugs.webkit.org/show_bug.cgi?id=60535
4026
4027         * inspector/front-end/StylesSidebarPane.js:
4028         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
4029         (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
4030
4031 2011-05-26  Antonio Gomes  <agomes@rim.com>
4032
4033         Reviewed by Andreas Kling.
4034
4035         Logic error in WebCore/Page/SpatialNavigation.cpp::areRectsPartiallyAligned
4036         https://bugs.webkit.org/show_bug.cgi?id=61606
4037
4038         Removed duplicated statement within if condition.
4039
4040         No new tests. Obvious clean up patch.
4041
4042         * page/SpatialNavigation.cpp:
4043         (WebCore::areRectsPartiallyAligned):
4044
4045 2011-05-27  Simon Fraser  <simon.fraser@apple.com>
4046
4047         Reviewed by Dan Bernstein.
4048
4049         CG BitmapImage needs to check for valid CGImage in a couple of places
4050         https://bugs.webkit.org/show_bug.cgi?id=61684
4051         <rdar://problem/9519348>
4052
4053         BitmapImage::getCGImageArray() can throw an exception if frameAtIndex()
4054         returns null, which it may do if the image is corrupted or still
4055         loading. Protect against that here and in getFirstCGImageRefOfSize().
4056
4057         * platform/graphics/cg/ImageCG.cpp:
4058         (WebCore::BitmapImage::getFirstCGImageRefOfSize):
4059         (WebCore::BitmapImage::getCGImageArray):
4060
4061 2011-05-27  Jochen Eisinger  <jochen@chromium.org>
4062
4063         Reviewed by Adam Barth.
4064
4065         Add Frame parameter to all StorageArea methods. The chromium
4066         embedder uses the Frame as context to decide whether or not
4067         to allow usage of the storage API.
4068         https://bugs.webkit.org/show_bug.cgi?id=61581
4069
4070         Test: platform/chromium/permissionclient/storage-permission.html
4071
4072         * storage/Storage.cpp:
4073         (WebCore::Storage::length):
4074         (WebCore::Storage::key):
4075         (WebCore::Storage::getItem):
4076         (WebCore::Storage::contains):
4077         * storage/StorageArea.h:
4078         * storage/StorageAreaImpl.cpp:
4079         (WebCore::StorageAreaImpl::length):
4080         (WebCore::StorageAreaImpl::key):
4081         (WebCore::StorageAreaImpl::getItem):
4082         (WebCore::StorageAreaImpl::contains):
4083         * storage/StorageAreaImpl.h:
4084
4085 2011-05-27  Nate Chapin  <japhet@chromium.org>
4086
4087         Reviewed by Jian Li.
4088
4089         Keep a reference to BlobResourceHandle before calling doNotifyFinish()
4090         asynchronously to ensure it's still safe in the main thread.
4091
4092         https://bugs.webkit.org/show_bug.cgi?id=61669
4093
4094         I triggered this crash in fast/files/file-reader-abort.html during a
4095         refactor that changed timings slightly.
4096
4097         * platform/network/BlobResourceHandle.cpp:
4098         (WebCore::doNotifyFinish):
4099         (WebCore::BlobResourceHandle::notifyFinish):
4100         * platform/network/BlobResourceHandle.h:
4101         (WebCore::BlobResourceHandle::aborted):
4102
4103 2011-05-27  Stephanie Lewis  <slewis@apple.com>
4104
4105         Unreviewed.