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