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