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