c2bf3c0c40658377ca033a5a6a3300608a1eece1
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-11  Tim Horton  <timothy_horton@apple.com>
2
3         FrameView->m_lastPaintTime is not updated in the tiled drawing case
4         https://bugs.webkit.org/show_bug.cgi?id=86246
5         <rdar://problem/11248475>
6
7         Reviewed by Simon Fraser.
8
9         Update FrameView's m_lastPaintTime from RenderLayerBacking::paintContents
10         if the RenderLayerBacking is backing a tiled drawing layer.
11
12         In the future we might want to consider updating m_lastPaintTime when any
13         compositing layer is painted into, but this change gets us on par with the
14         non-tiled-drawing case as it stands now.
15
16         No new tests.
17
18         * page/FrameView.h:
19         (WebCore::FrameView::setLastPaintTime):
20         * rendering/RenderLayerBacking.cpp:
21         (WebCore::RenderLayerBacking::paintContents):
22
23 2012-05-11  Shezan Baig  <shezbaig.wk@gmail.com>
24
25         Add helper function for node()->rootEditableElement() == node()
26         https://bugs.webkit.org/show_bug.cgi?id=86217
27
28         Reviewed by Ryosuke Niwa.
29
30         Added Node::isRootEditableElement and updated existing code that did
31         (node->rootEditableElement() == node) to use isRootEditableElement
32         instead.
33
34         No new tests. No change in behavior.
35
36         * dom/Node.cpp:
37         (WebCore::Node::isRootEditableElement):
38         (WebCore):
39         * dom/Node.h:
40         (Node):
41         Added new helper function.
42
43         * dom/Document.cpp:
44         (WebCore::Document::setFocusedNode):
45         * dom/Element.cpp:
46         (WebCore::Element::updateFocusAppearance):
47         * editing/CompositeEditCommand.cpp:
48         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
49         * editing/DeleteSelectionCommand.cpp:
50         (WebCore::DeleteSelectionCommand::removeNode):
51         * editing/InsertParagraphSeparatorCommand.cpp:
52         (WebCore::InsertParagraphSeparatorCommand::doApply):
53         * page/FocusController.cpp:
54         (WebCore::FocusController::setFocusedNode):
55         * rendering/RenderBlock.cpp:
56         (WebCore::RenderBlock::hasLineIfEmpty):
57         * rendering/RenderBlockLineLayout.cpp:
58         (WebCore::RenderBlock::addOverflowFromInlineChildren):
59         Updates to existing code to use the new helper function.
60
61 2012-05-11  Shawn Singh  <shawnsingh@chromium.org>
62
63         [chromium] Create WebTransformationMatrix interface for chromium platform
64         https://bugs.webkit.org/show_bug.cgi?id=86049
65
66         Reviewed by James Robinson.
67
68         This patch creates a WebTransformationMatrix interface. It will
69         remain unused at the moment, until (a) unit tests are created
70         and (b) when we are ready to make a brief transition of all other
71         chromium code to use it.
72
73         * WebCore.gypi:
74         * platform/chromium/support/WebTransformationMatrix.cpp: Added.
75         (WebKit):
76         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
77         (WebKit::WebTransformationMatrix::operator=):
78         (WebKit::WebTransformationMatrix::operator==):
79         (WebKit::WebTransformationMatrix::operator*):
80         (WebKit::WebTransformationMatrix::inverse):
81         (WebKit::WebTransformationMatrix::to2dTransform):
82         (WebKit::WebTransformationMatrix::multiply):
83         (WebKit::WebTransformationMatrix::makeIdentity):
84         (WebKit::WebTransformationMatrix::translate):
85         (WebKit::WebTransformationMatrix::translate3d):
86         (WebKit::WebTransformationMatrix::translateRight3d):
87         (WebKit::WebTransformationMatrix::scale):
88         (WebKit::WebTransformationMatrix::scaleNonUniform):
89         (WebKit::WebTransformationMatrix::scale3d):
90         (WebKit::WebTransformationMatrix::rotate):
91         (WebKit::WebTransformationMatrix::rotate3d):
92         (WebKit::WebTransformationMatrix::skewX):
93         (WebKit::WebTransformationMatrix::skewY):
94         (WebKit::WebTransformationMatrix::applyPerspective):
95         (WebKit::WebTransformationMatrix::blend):
96         (WebKit::WebTransformationMatrix::hasPerspective):
97         (WebKit::WebTransformationMatrix::isInvertible):
98         (WebKit::WebTransformationMatrix::isBackFaceVisible):
99         (WebKit::WebTransformationMatrix::isIdentity):
100         (WebKit::WebTransformationMatrix::isIdentityOrTranslation):
101         (WebKit::WebTransformationMatrix::isIntegerTranslation):
102         (WebKit::WebTransformationMatrix::m11):
103         (WebKit::WebTransformationMatrix::setM11):
104         (WebKit::WebTransformationMatrix::m12):
105         (WebKit::WebTransformationMatrix::setM12):
106         (WebKit::WebTransformationMatrix::m13):
107         (WebKit::WebTransformationMatrix::setM13):
108         (WebKit::WebTransformationMatrix::m14):
109         (WebKit::WebTransformationMatrix::setM14):
110         (WebKit::WebTransformationMatrix::m21):
111         (WebKit::WebTransformationMatrix::setM21):
112         (WebKit::WebTransformationMatrix::m22):
113         (WebKit::WebTransformationMatrix::setM22):
114         (WebKit::WebTransformationMatrix::m23):
115         (WebKit::WebTransformationMatrix::setM23):
116         (WebKit::WebTransformationMatrix::m24):
117         (WebKit::WebTransformationMatrix::setM24):
118         (WebKit::WebTransformationMatrix::m31):
119         (WebKit::WebTransformationMatrix::setM31):
120         (WebKit::WebTransformationMatrix::m32):
121         (WebKit::WebTransformationMatrix::setM32):
122         (WebKit::WebTransformationMatrix::m33):
123         (WebKit::WebTransformationMatrix::setM33):
124         (WebKit::WebTransformationMatrix::m34):
125         (WebKit::WebTransformationMatrix::setM34):
126         (WebKit::WebTransformationMatrix::m41):
127         (WebKit::WebTransformationMatrix::setM41):
128         (WebKit::WebTransformationMatrix::m42):
129         (WebKit::WebTransformationMatrix::setM42):
130         (WebKit::WebTransformationMatrix::m43):
131         (WebKit::WebTransformationMatrix::setM43):
132         (WebKit::WebTransformationMatrix::m44):
133         (WebKit::WebTransformationMatrix::setM44):
134         (WebKit::WebTransformationMatrix::a):
135         (WebKit::WebTransformationMatrix::setA):
136         (WebKit::WebTransformationMatrix::b):
137         (WebKit::WebTransformationMatrix::setB):
138         (WebKit::WebTransformationMatrix::c):
139         (WebKit::WebTransformationMatrix::setC):
140         (WebKit::WebTransformationMatrix::d):
141         (WebKit::WebTransformationMatrix::setD):
142         (WebKit::WebTransformationMatrix::e):
143         (WebKit::WebTransformationMatrix::setE):
144         (WebKit::WebTransformationMatrix::f):
145         (WebKit::WebTransformationMatrix::setF):
146         (WebKit::WebTransformationMatrix::toWebCoreTransform):
147         (WebKit::WebTransformationMatrix::mapRect):
148         (WebKit::WebTransformationMatrix::mapPoint):
149         (WebKit::WebTransformationMatrix::mapQuad):
150         (WebKit::WebTransformationMatrix::projectPoint):
151
152 2012-05-11  Alexandru Chiculita  <achicu@adobe.com>
153
154         [CSS Shaders] Make CSS Shaders render to texture framebuffers
155         https://bugs.webkit.org/show_bug.cgi?id=85113
156
157         Reviewed by Dean Jackson.
158
159         Added the required members to store the framebuffer, the texture and the depth buffer. Also removed the m_drawingBuffer
160         because context->readPixels doesn't require one anymore.
161
162         ReadPixels is not flipping the result, so I've also removed the flipping projection matrix that was specific only to Chromium.
163
164         Added a test to check that colors are not switched and the resulting image is not mirrored.
165
166         Test: css3/filters/custom/effect-color-check.html
167
168         * platform/graphics/filters/FECustomFilter.cpp:
169         (WebCore::FECustomFilter::FECustomFilter):
170         (WebCore::FECustomFilter::~FECustomFilter):
171         (WebCore):
172         (WebCore::FECustomFilter::deleteRenderBuffers):
173         (WebCore::FECustomFilter::platformApplySoftware):
174         (WebCore::FECustomFilter::initializeContext):
175         (WebCore::FECustomFilter::resizeContext):
176         (WebCore::FECustomFilter::bindProgramAndBuffers):
177         * platform/graphics/filters/FECustomFilter.h:
178         (FECustomFilter):
179
180 2012-05-11  Anders Carlsson  <andersca@apple.com>
181
182         REGRESSION(r116687): [Chromium] plugins/embed-attributes-style.html shows a garbled string
183         https://bugs.webkit.org/show_bug.cgi?id=86170
184
185         Reviewed by Andreas Kling.
186
187         The string we are passing to the TextRun constructor needs to stay alive for longer so revert back to the old
188         behavior where we store it as a member variable.
189
190         * rendering/RenderEmbeddedObject.cpp:
191         (WebCore::unavailablePluginReplacementText):
192         (WebCore):
193         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
194         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
195         * rendering/RenderEmbeddedObject.h:
196         (RenderEmbeddedObject):
197
198 2012-05-11  Simon Fraser  <simon.fraser@apple.com>
199
200         CVDisplayLink keeps running after a single requestAnimationFrame
201         https://bugs.webkit.org/show_bug.cgi?id=86174
202         
203         Reviewed by Sam Weinig.
204         
205         A DisplayRefreshMonitor would keep its CVDisplayLink alive for as long
206         as it had clients, and the client is the ScriptedAnimationController, which
207         lives on the document. So a single requestAnimationFrame call would kick
208         off a CVDisplayLink which lived until the document was destroyed.
209         
210         Fix by having the DisplayRefreshMonitor kill itself if the CVDisplayLink
211         fires for 10 times with no scheduled callbacks (to avoid creation/deletion
212         thrash on pages that call requestAnimationFrames with short setTimeouts,
213         as some do).
214         
215         Use a HashMap in DisplayRefreshMonitorManager for the set of DisplayRefreshMonitor,
216         with the displayID as the key (using UnsignedWithZeroKeyHashTraits<uint64_t> since
217         we want to allow for 0 to be a valid displayID).
218         
219         Use a HashSet in DisplayRefreshMonitor for the client set, so that we don't have to
220         worry about adding clients twice.
221         
222         Also fix a possible crash when the only client of a DisplayRefreshMonitor
223         was removed from inside the callback by making DisplayRefreshMonitor ref-counted,
224         with a protector.
225
226         Test: fast/animation/request-animation-frame-detach-element2.html
227
228         * platform/graphics/DisplayRefreshMonitor.cpp:
229         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): Initialize m_unscheduledFireCount
230         (WebCore::DisplayRefreshMonitor::handleDisplayRefreshedNotificationOnMainThread): Renamed
231         from refreshDisplayOnMainThread, since it doesn't just refresh the display.
232         (WebCore::DisplayRefreshMonitor::addClient): No longer inline.
233         (WebCore::DisplayRefreshMonitor::removeClient): No longer inline.
234         (WebCore::DisplayRefreshMonitor::displayDidRefresh): Keep track of m_unscheduledFireCount,
235         which we used to kill this monitor if it has been idle for a while.
236         Use a RefPtr<DisplayRefreshMonitor> to prevent deletion while running the callback.
237         Copy the clients to a vector to protect against mutating the set while enumerating it.
238         Notify the DisplayRefreshMonitorManager when we're done, so that it can decide
239         to delete inactive monitors.
240         
241         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient): find or allocate
242         a DisplayRefreshMonitor for a given client.
243         (WebCore::DisplayRefreshMonitorManager::registerClient): Simplified by use of HashMap.
244         (WebCore::DisplayRefreshMonitorManager::unregisterClient): Ditto.
245         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation): Ditto. Uses
246         ensureMonitorForClient() since an earlier inactive monitor may have been removed.
247         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Remove inactive
248         monitors.
249         * platform/graphics/DisplayRefreshMonitor.h: Make DisplayRefreshMonitor
250         ref-counted, to make it easier to avoid deletion while it's on the stack.
251         (WebCore::DisplayRefreshMonitor::create):
252         (DisplayRefreshMonitor):
253         (WebCore::DisplayRefreshMonitor::shouldBeTerminated):
254         (DisplayRefreshMonitorManager):
255         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: Attempt to
256         keep things building.
257         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
258         (WebCore::DisplayRefreshMonitor::displayLinkFired):
259         to give the manager a chance to kill this monitor.
260         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
261         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
262         (WebCore::DisplayRefreshMonitor::displayLinkFired): Don't bail early
263         if not scheduled; we want to call handleDisplayRefreshedNotificationOnMainThread(),
264
265 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
266
267         Web Inspector: move canEditScriptSource and setScriptSource from DebuggerPresentationModel into ResourceBinding
268         https://bugs.webkit.org/show_bug.cgi?id=86234
269
270         Reviewed by Vsevolod Vlasov.
271
272         Simple move refactoring.
273
274         * inspector/front-end/DebuggerPresentationModel.js:
275         (WebInspector.DebuggerPresentationModel):
276         (WebInspector.DebuggerResourceBinding):
277         (WebInspector.DebuggerResourceBinding.canEditScriptSource):
278         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
279         (WebInspector.DebuggerResourceBinding.setScriptSource):
280         (WebInspector.DebuggerResourceBinding.prototype.canSetContent):
281         (WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource):
282         (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent):
283         * inspector/front-end/JavaScriptSourceFrame.js:
284         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
285         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
286
287 2012-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
288
289         Remove RenderLayer::m_scrollOverflow
290         https://bugs.webkit.org/show_bug.cgi?id=86226
291
292         Reviewed by Simon Fraser.
293
294         No expected change in behavior.
295
296         * rendering/RenderLayer.cpp:
297         (WebCore::RenderLayer::computeScrollDimensions):
298         Added 2 local variables to compute the left / top scrollable overflows.
299
300         * rendering/RenderLayer.h:
301         (WebCore::RenderLayer::scrolledContentOffset):
302         Returned m_scrollOffset directly as this is what the old code was doing by adding
303         m_scrollOrigin then adding m_scrollOverflow (which was set to -m_scrollOrigin in
304         computeScrollDimensions).
305
306         (RenderLayer::m_scrollOffset): Improved the comment about what m_scrollOffset is.
307
308 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
309
310         Web Inspector: extract PresentationConsoleMessageHelper from DebuggerPresentationModel.
311         https://bugs.webkit.org/show_bug.cgi?id=86229
312
313         Reviewed by Vsevolod Vlasov.
314
315         This change also starts tracking messages along with the live location changes.
316
317         Tested with script-formatter-console.html.
318
319         * inspector/front-end/BreakpointManager.js:
320         * inspector/front-end/DebuggerPresentationModel.js:
321         (WebInspector.DebuggerPresentationModel):
322         (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource):
323         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
324         (WebInspector.PresentationConsoleMessageHelper):
325         (WebInspector.PresentationConsoleMessageHelper.prototype._addPendingConsoleMessage):
326         (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource):
327         (WebInspector.PresentationConsoleMessageHelper.prototype._debuggerReset):
328         (WebInspector.PresentationConsoleMessage):
329         * inspector/front-end/JavaScriptSourceFrame.js:
330         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
331         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageAdded):
332         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
333
334 2012-05-11  Emil A Eklund  <eae@chromium.org>
335
336         Simplify FloatingObject by removing unnecessary convenience methods.
337         https://bugs.webkit.org/show_bug.cgi?id=86163
338
339         Reviewed by Eric Seidel.
340
341         Simplify the pixel snapping in FloatingObject by getting rid of a bunch
342         of convenience methods.
343
344         No new tests, no change in functionality.
345
346         * rendering/RenderBlock.cpp:
347         (WebCore::RenderBlock::addOverhangingFloats):
348         (WebCore::RenderBlock::addIntrudingFloats):
349         (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
350         (WebCore::::string):
351         * rendering/RenderBlock.h:
352         (FloatingObject):
353         (WebCore::RenderBlock::pixelSnappedLogicalTopForFloat):
354         (WebCore::RenderBlock::pixelSnappedLogicalBottomForFloat):
355         (WebCore::RenderBlock::pixelSnappedLogicalLeftForFloat):
356         (WebCore::RenderBlock::pixelSnappedLogicalRightForFloat):
357
358 2012-05-11  Ian Vollick  <vollick@chromium.org>
359
360         [chromium] Ensure that animations continue to run when transform-style is changed
361         https://bugs.webkit.org/show_bug.cgi?id=83283
362
363         Make sure that we transfer animations when changing layers due to a transform-style change.
364         Unit tested in GraphicsLayerChromiumTest.updateLayerPreserves3DWithAnimations
365
366         Reviewed by James Robinson.
367
368         Test: animations/change-transform-style-during-animation.html
369
370         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
371         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
372         * platform/graphics/chromium/LayerChromium.cpp:
373         (WebCore::LayerChromium::setLayerAnimationController):
374         (WebCore::LayerChromium::releaseLayerAnimationController):
375         (WebCore):
376         (WebCore::LayerChromium::notifyAnimationStarted):
377         * platform/graphics/chromium/LayerChromium.h:
378         (LayerChromium):
379         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
380         (WebCore::CCLayerAnimationController::CCLayerAnimationController):
381         (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo):
382         (WebCore::CCLayerAnimationController::notifyAnimationStarted):
383         (WebCore::CCLayerAnimationController::setClient):
384         (WebCore):
385         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
386         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
387         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
388         (CCLayerAnimationController):
389         (WebCore::CCLayerAnimationController::setForceSync):
390
391 2012-05-11  Tommy Widenflycht  <tommyw@google.com>
392
393         MediaStream API: Fix a reference counting issue in UserMediaRequest
394         https://bugs.webkit.org/show_bug.cgi?id=86210
395
396         Reviewed by Abhishek Arya.
397
398         When contextDestroyed() is called on UserMediaRequest it does a callback to the
399         page client. If the receiving code clears their stored copy the UserMediaRequest
400         object is destroyed in the middle of the call.
401
402         Currently only testable manually against chrome, preferably with asan turned on.
403         I have added a manual test that verifies the fix, but I have started work
404         to make DumpRenderTree able to test this and many other things. The first patch is here:
405         https://bugs.webkit.org/show_bug.cgi?id=86215
406
407         * Modules/mediastream/UserMediaRequest.cpp:
408         (WebCore::UserMediaRequest::contextDestroyed):
409
410 2012-05-11  Min Qin  <qinmin@google.com>
411
412         split MediaPlayer::enterFullscreen into 2 seperate functions
413         https://bugs.webkit.org/show_bug.cgi?id=86052
414
415         Reviewed by Adam Barth.
416
417         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
418         not do the same. And ios does not need the return value.
419         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
420         function for android.
421         No tests as there are no behavior change, just refactoring.
422
423         * platform/graphics/MediaPlayer.cpp:
424         (WebCore::MediaPlayer::enterFullscreen):
425         (WebCore):
426         (WebCore::MediaPlayer::canEnterFullscreen):
427         * platform/graphics/MediaPlayer.h:
428         (MediaPlayer):
429         * platform/graphics/MediaPlayerPrivate.h:
430         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
431         (MediaPlayerPrivateInterface):
432         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
433
434 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
435
436         Web Inspector: move breakpoint manager from debuggerPresentationModel to WebInspector.
437         https://bugs.webkit.org/show_bug.cgi?id=86220
438
439         Reviewed by Yury Semikhatsky.
440
441         Now that breakpoint manager does not depend on the source mapping instance from the
442         debugger presentation model, it can be moved out.
443
444         * inspector/front-end/DebuggerPresentationModel.js:
445         (WebInspector.DebuggerPresentationModel):
446         * inspector/front-end/JavaScriptSource.js:
447         (WebInspector.JavaScriptSource):
448         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
449         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
450         (WebInspector.JavaScriptSource.prototype.setFormatted):
451         * inspector/front-end/JavaScriptSourceFrame.js:
452         (WebInspector.JavaScriptSourceFrame):
453         * inspector/front-end/ScriptsPanel.js:
454         * inspector/front-end/inspector.js:
455
456 2012-05-11  David Reveman  <reveman@chromium.org>
457
458         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
459         https://bugs.webkit.org/show_bug.cgi?id=85893
460
461         Reviewed by Adrienne Walker.
462
463         Move instantiation of texture uploader to LayerRendererChromium and
464         allow CCProxy to decide between a throttled or unthrottled uploader
465         using a flag passed to the LayerRendererChromium constructor.
466
467         * platform/graphics/chromium/LayerRendererChromium.cpp:
468         (WebCore::LayerRendererChromium::create):
469         (WebCore::LayerRendererChromium::LayerRendererChromium):
470         (WebCore::LayerRendererChromium::initializeSharedObjects):
471         * platform/graphics/chromium/LayerRendererChromium.h:
472         (LayerRendererChromium):
473         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
474         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
475         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
476         (CCLayerTreeHostImpl):
477         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
478         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
479         (WebCore::CCSingleThreadProxy::recreateContext):
480         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
481         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
482         (WebCore::CCThreadProxy::recreateContextOnImplThread):
483
484 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
485
486         Web Inspector: pass source mapping into UISourceCode's constructor; move formatting outside mapping.
487         https://bugs.webkit.org/show_bug.cgi?id=86099
488
489         Reviewed by Vsevolod Vlasov.
490
491         This changes moves formatting out of the source mapping machinery.
492         As a result, it removes most of the DebuggerPresentation's mapping-related code as well
493         as most of the raw source code's code.
494
495         * inspector/front-end/BreakpointManager.js:
496         (WebInspector.BreakpointManager):
497         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
498         (WebInspector.BreakpointManager.Breakpoint):
499         * inspector/front-end/CallStackSidebarPane.js:
500         (WebInspector.CallStackSidebarPane.prototype.setStatus):
501         * inspector/front-end/CompilerScriptMapping.js:
502         * inspector/front-end/DebuggerPresentationModel.js:
503         (WebInspector.DebuggerPresentationModel):
504         (WebInspector.DebuggerPresentationModel.prototype._callFrameSelected):
505         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
506         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
507         * inspector/front-end/JavaScriptSource.js:
508         (WebInspector.JavaScriptSource):
509         (WebInspector.JavaScriptSource.prototype.fireContentAvailable):
510         (WebInspector.JavaScriptSource.prototype.setFormatted.if):
511         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
512         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
513         (WebInspector.JavaScriptSource.prototype.setFormatted):
514         (WebInspector.JavaScriptSource.prototype.togglingFormatter):
515         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
516         (WebInspector.JavaScriptSource.prototype.overrideLocation):
517         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
518         (WebInspector):
519         * inspector/front-end/JavaScriptSourceFrame.js:
520         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
521         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
522         * inspector/front-end/RawSourceCode.js:
523         (WebInspector.RawSourceCode):
524         (WebInspector.RawSourceCode.prototype.addScript):
525         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
526         (WebInspector.RawSourceCode.prototype._createUISourceCode):
527         (WebInspector.RawSourceCode.prototype.uiLocationToRawLocation):
528         (WebInspector.RawSourceCode.prototype.uiSourceCode):
529         (WebInspector.RawSourceCode.prototype._finishedLoading):
530         * inspector/front-end/ResourceScriptMapping.js:
531         (WebInspector.ResourceScriptMapping):
532         (WebInspector.ResourceScriptMapping.prototype.addScript):
533         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
534         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
535         * inspector/front-end/Script.js:
536         (WebInspector.Script.prototype.rawLocationToUILocation):
537         * inspector/front-end/ScriptFormatter.js:
538         (WebInspector.ScriptFormatter.prototype._didFormatContent):
539         (WebInspector.FormatterSourceMapping):
540         (WebInspector.FormatterSourceMapping.prototype.originalToFormatted):
541         (WebInspector.FormatterSourceMapping.prototype.formattedToOriginal):
542         (WebInspector.IdentityFormatterSourceMapping):
543         (WebInspector.IdentityFormatterSourceMapping.prototype.originalToFormatted):
544         (WebInspector.IdentityFormatterSourceMapping.prototype.formattedToOriginal):
545         (WebInspector.FormatterSourceMappingImpl):
546         (WebInspector.FormatterSourceMappingImpl.prototype.originalToFormatted):
547         (WebInspector.FormatterSourceMappingImpl.prototype.formattedToOriginal):
548         * inspector/front-end/ScriptMapping.js:
549         (WebInspector.MainScriptMapping):
550         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
551         (WebInspector.MainScriptMapping.prototype.reset):
552         * inspector/front-end/ScriptsPanel.js:
553         (WebInspector.ScriptsPanel.prototype._handleUISourceCodeAdded):
554         (WebInspector.ScriptsPanel.prototype.showFunctionDefinition):
555         (WebInspector.ScriptsPanel.prototype._showFile):
556         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
557         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
558         * inspector/front-end/ScriptsSearchScope.js:
559         (WebInspector.ScriptsSearchResultsPane.prototype.createAnchor):
560         * inspector/front-end/SnippetsModel.js:
561         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
562         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
563         * inspector/front-end/UISourceCode.js:
564         (WebInspector.UISourceCode):
565         (WebInspector.UISourceCode.prototype.requestContent):
566         (WebInspector.UISourceCode.prototype.mimeType):
567         (WebInspector.UISourceCode.prototype.content):
568         (WebInspector.UISourceCode.prototype.fireContentAvailable):
569         (WebInspector.UISourceCode.prototype.contentLoaded):
570         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
571
572 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
573
574         [EFL][DRT] Input Attribute Placeholder RefTests failing
575         https://bugs.webkit.org/show_bug.cgi?id=85603
576
577         Unreviewed, build fix for EFL.
578
579         * platform/efl/RenderThemeEfl.cpp:
580
581 2012-05-11  Alexei Filippov  <alexeif@chromium.org>
582
583         Web Inspector: Remove support of combined nodes and edges serialization schema.
584         https://bugs.webkit.org/show_bug.cgi?id=86209
585
586         Reviewed by Yury Semikhatsky.
587
588         * inspector/front-end/HeapSnapshot.js:
589         (WebInspector.HeapSnapshotNode.prototype.get _nodes):
590         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
591         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
592         (WebInspector.HeapSnapshot):
593         (WebInspector.HeapSnapshot.prototype._init):
594         (WebInspector.HeapSnapshot.prototype._buildRetainers):
595         (WebInspector.HeapSnapshot.prototype._bfs):
596         (WebInspector.HeapSnapshot.prototype._buildAggregates):
597         (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
598         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
599         * inspector/front-end/HeapSnapshotLoader.js:
600         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
601
602 2012-05-11  Yury Semikhatsky  <yurys@chromium.org>
603
604         Web Inspector: add Profiler.getHeapObjectId command
605         https://bugs.webkit.org/show_bug.cgi?id=86211
606
607         Reviewed by Pavel Feldman.
608
609         Added Profiler.getHeapObjectId command to the protocol which allows to convert remote
610         object id to heap snapshot object id.
611
612         * bindings/js/ScriptProfiler.cpp:
613         (WebCore::ScriptProfiler::getHeapObjectId):
614         (WebCore):
615         * bindings/js/ScriptProfiler.h:
616         (WebCore):
617         (ScriptProfiler):
618         * bindings/v8/ScriptProfiler.cpp:
619         (WebCore::ScriptProfiler::getHeapObjectId):
620         (WebCore):
621         * bindings/v8/ScriptProfiler.h:
622         (WebCore):
623         (ScriptProfiler):
624         * inspector/InjectedScript.cpp:
625         (WebCore::InjectedScript::findObjectById):
626         (WebCore):
627         * inspector/InjectedScript.h:
628         (InjectedScript):
629         * inspector/InjectedScriptSource.js:
630         (.):
631         * inspector/Inspector.json:
632         * inspector/InspectorProfilerAgent.cpp:
633         (WebCore::InspectorProfilerAgent::getHeapObjectId):
634         (WebCore):
635         * inspector/InspectorProfilerAgent.h:
636         (InspectorProfilerAgent):
637
638 2012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
639
640         Qt support for new layout types.
641         https://bugs.webkit.org/show_bug.cgi?id=85607
642
643         Reviewed by Simon Hausmann.
644
645         Adds similar Qt support to FractionalLayout classes as Qt has for
646         FloatSomething and IntSomething classes. This means Qt code can stay
647         unchanged from after the redefinition of Layout classes.
648
649         No new functionality. No new tests.
650
651         * Target.pri:
652         * platform/FractionalLayoutUnit.h:
653         (WebCore::operator<<):
654         (WebCore::operator>>):
655         * platform/graphics/FractionalLayoutPoint.h:
656         (FractionalLayoutPoint):
657         * platform/graphics/FractionalLayoutRect.h:
658         (FractionalLayoutRect):
659         * platform/graphics/FractionalLayoutSize.h:
660         (FractionalLayoutSize):
661         * platform/graphics/qt/FractionalLayoutPointQt.cpp: Added.
662         (WebCore::FractionalLayoutPoint::FractionalLayoutPoint):
663         (WebCore::FractionalLayoutPoint::operator QPointF):
664         * platform/graphics/qt/FractionalLayoutRectQt.cpp: Added.
665         (WebCore::FractionalLayoutRect::FractionalLayoutRect):
666         (WebCore::FractionalLayoutRect::operator QRectF):
667         * platform/graphics/qt/FractionalLayoutSizeQt.cpp: Added.
668         (WebCore::FractionalLayoutSize::FractionalLayoutSize):
669         (WebCore::FractionalLayoutSize::operator QSizeF):
670
671 2012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
672
673         Internals::touchPositionAdjustedToBestClickableNode adjust twice for scroll-offset
674         https://bugs.webkit.org/show_bug.cgi?id=86205
675
676         Reviewed by Simon Hausmann.
677
678         Remove the redundant conversion from document to window coords.
679
680         Test: touchadjustment/scroll-offset.html
681
682         * testing/Internals.cpp:
683         (WebCore::Internals::touchPositionAdjustedToBestClickableNode):
684         (WebCore::Internals::bestZoomableAreaForTouchPoint):
685
686 2012-05-11  Ilya Tikhonovsky  <loislo@chromium.org>
687
688         Web Inspector: load heap snapshot implementation.
689         https://bugs.webkit.org/show_bug.cgi?id=86097
690
691         The idea is to have a hidden file selector control.
692         When the user select a context menu item or click a button
693         we redirect this user-action to file selector.
694         As result we see the standard file selector dialog.
695         When the user selects a file we load it's chunks and push the chunks to the worker.
696         The loaded snapshot can be completely unrelated to the current page.
697         Thats why we have to skip range selection options in Summary tab.
698
699         Reviewed by Yury Semikhatsky.
700
701         * English.lproj/localizedStrings.js:
702         * inspector/front-end/CSSSelectorProfileView.js:
703         (WebInspector.CSSSelectorProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
704         * inspector/front-end/HeapSnapshotView.js:
705         (WebInspector.HeapSnapshotView.prototype._updateFilterOptions): we have to skip the profiles loaded from file because there is no guaranty t
706         (WebInspector.HeapSnapshotProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
707         (WebInspector.HeapSnapshotProfileType.prototype.createProfile): cosmetic changes.
708         (WebInspector.HeapProfileHeader):
709         (WebInspector.HeapProfileHeader.prototype._setupWorker): a common part was extracted from load method and reused in loadFromFile.
710         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate): cosmetic changes.
711         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
712         (WebInspector.HeapProfileHeader.prototype.canSaveToFile): cosmetic rename for better consistency with 'load' part.
713         (WebInspector.HeapProfileHeader.prototype.saveToFile): cosmetic rename for better consistency with 'load' part.
714         (WebInspector.HeapProfileHeader.prototype.canLoadFromFile): cosmetic rename for better consistency with 'load' part.
715         (WebInspector.HeapProfileHeader.prototype.loadFromFile): chunk based file loader.
716         (WebInspector.HeapProfileHeader.prototype.loadFromFile.loadNextChunk):
717         (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
718         * inspector/front-end/ProfileView.js:
719         (WebInspector.CPUProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
720         * inspector/front-end/ProfilesPanel.js:
721         (WebInspector.ProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
722         (WebInspector.ProfileHeader.prototype.canSaveToFile): cosmetic rename for better consistency with 'load' part.
723         (WebInspector.ProfileHeader.prototype.saveToFile): cosmetic rename for better consistency with 'load' part.
724         (WebInspector.ProfileHeader.prototype.canLoadFromFile): default implementation for 'load' part.
725         (WebInspector.ProfileHeader.prototype.loadFromFile): default implementation for 'load' part.
726         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
727         (WebInspector.ProfilesPanel.prototype._loadFromFile):
728         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
729
730 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
731
732         [EFL][DRT] Input Attribute Placeholder RefTests failing
733         https://bugs.webkit.org/show_bug.cgi?id=85603
734
735         Reviewed by Hajime Morita.
736
737         Refrain from overriding style coloring by theme coloring.
738         RenderThemeEfl was always overriding colors and whitespace
739         handling leading to failures in reftests that verify placeholder styling
740         which expect the user agent stylesheet to be applied correctly
741         without any color overrides. Also, leave whitespace handling untouched.
742
743         No new tests, covered by existing tests. See also
744         the LayoutTests/ChangeLog in this commit for the required
745         rebaselining.
746
747         * platform/efl/RenderThemeEfl.cpp:
748         (WebCore::RenderThemeEfl::createEdje):
749         (WebCore::RenderThemeEfl::applyEdjeColors):
750         (WebCore::RenderThemeEfl::RenderThemeEfl):
751         (WebCore::RenderThemeEfl::adjustButtonStyle):
752         (WebCore::RenderThemeEfl::adjustMenuListStyle):
753         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
754         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
755         * platform/efl/RenderThemeEfl.h:
756         (RenderThemeEfl):
757
758 2012-05-11  Christophe Dumez  <christophe.dumez@intel.com>
759
760         Web Intents code only supports V8
761         https://bugs.webkit.org/show_bug.cgi?id=85954
762
763         Reviewed by Adam Barth.
764
765         Add necessary abstraction for js Dictionary and ScriptValue so that
766         the Web Intents code in WebCore compiles with JSC, not just V8.
767
768         This required changes in the JSC bindings generator to pass
769         callback arguments of type SerializedScriptValue as raw pointers
770         instead of RefPtr. This matches the change made to the V8 bindings
771         generator in r104531.
772
773         * CMakeLists.txt:
774         * Modules/intents/Intent.cpp:
775         * Modules/intents/Intent.h:
776         * bindings/js/Dictionary.cpp:
777         (WebCore::Dictionary::Dictionary):
778         (WebCore):
779         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
780         * bindings/js/Dictionary.h:
781         (Dictionary):
782         * bindings/js/JSBindingsAllInOne.cpp:
783         * bindings/js/JSDictionary.cpp:
784         (WebCore::JSDictionary::convertValue):
785         (WebCore):
786         * bindings/js/JSDictionary.h:
787         (WebCore):
788         (WebCore::JSDictionary::initializerObject):
789         * bindings/js/ScriptValue.cpp:
790         (WebCore::ScriptValue::serialize):
791         (WebCore):
792         * bindings/js/ScriptValue.h:
793         (ScriptValue):
794         * bindings/scripts/CodeGeneratorJS.pm:
795         (AddIncludesForType):
796         (GenerateCallbackHeader):
797         (GenerateCallbackImplementation):
798         (GetNativeTypeForCallbacks):
799
800 2012-05-11  Alexander Pavlov  <apavlov@chromium.org>
801
802         Web Inspector: Can't type spaces in "Override User Agent" field
803         https://bugs.webkit.org/show_bug.cgi?id=86202
804
805         Reviewed by Yury Semikhatsky.
806
807         * inspector/front-end/HelpScreen.js:
808         (WebInspector.HelpScreen.prototype.isClosingKey):
809         (WebInspector.HelpScreen.prototype._onKeyDown):
810         * inspector/front-end/SettingsScreen.js:
811         (WebInspector.SettingsScreen.prototype.isClosingKey):
812
813 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
814
815         [EFL][DRT] Input Attribute Placeholder RefTests failing
816         https://bugs.webkit.org/show_bug.cgi?id=85603
817
818         Reviewed by Hajime Morita.
819
820         Refrain from overriding style coloring by theme coloring.
821         RenderThemeEfl was always overriding colors and whitespace
822         handling leading to failures in reftests that verify placeholder styling
823         which expect the user agent stylesheet to be applied correctly
824         without any color overrides. Also, leave whitespace handling untouched.
825
826         No new tests, covered by existing tests. See also
827         the LayoutTests/ChangeLog in this commit for the required
828         rebaselining.
829
830         * platform/efl/RenderThemeEfl.cpp:
831         (WebCore::RenderThemeEfl::createEdje):
832         (WebCore::RenderThemeEfl::applyEdjeColors):
833         (WebCore::RenderThemeEfl::RenderThemeEfl):
834         (WebCore::RenderThemeEfl::adjustButtonStyle):
835         (WebCore::RenderThemeEfl::adjustMenuListStyle):
836         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
837         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
838         * platform/efl/RenderThemeEfl.h:
839         (RenderThemeEfl):
840
841 2012-05-11  Gustavo Noronha Silva  <gns@gnome.org>
842
843         REGRESSION(r116205): [GTK]: build no longer supports thin archives
844         https://bugs.webkit.org/show_bug.cgi?id=86207
845
846         * GNUmakefile.am: go back to not linking libWebCoreModules into
847         libWebCore; when linking 2 convenience libraries libtools tries to
848         extract the object files from one of them to add to the other, breaking
849         thin archive builds
850
851 2012-05-11  Keishi Hattori  <keishi@webkit.org>
852
853         Sanitization algorithm for input type=email should strip whitespaces
854         https://bugs.webkit.org/show_bug.cgi?id=86177
855
856         Reviewed by Kent Tamura.
857
858         No new tests. Covered by: fast/forms/ValidityState-typeMismatch-email.html
859
860         The spec says that the value sanitization algorithm should
861         > Strip line breaks from the value, then strip leading and trailing whitespace from the value.
862
863         * html/EmailInputType.cpp:
864         (WebCore::EmailInputType::sanitizeValue):
865
866 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
867
868         Unreviewed, rolling out r116752.
869         http://trac.webkit.org/changeset/116752
870         https://bugs.webkit.org/show_bug.cgi?id=86201
871
872         Build failure on Chromium-mac (Requested by tkent on #webkit).
873
874         * html/FormAssociatedElement.cpp:
875         * html/FormAssociatedElement.h:
876         (FormAssociatedElement):
877         * html/HTMLFormControlElement.cpp:
878         (WebCore::HTMLFormControlElement::setCustomValidity):
879         * html/HTMLFormControlElement.h:
880         (HTMLFormControlElement):
881         * html/HTMLInputElement.cpp:
882         (WebCore::HTMLInputElement::isValidValue):
883         (WebCore::HTMLInputElement::typeMismatch):
884         (WebCore::HTMLInputElement::valueMissing):
885         (WebCore::HTMLInputElement::patternMismatch):
886         (WebCore::HTMLInputElement::rangeUnderflow):
887         (WebCore::HTMLInputElement::rangeOverflow):
888         (WebCore::HTMLInputElement::minimum):
889         (WebCore::HTMLInputElement::maximum):
890         (WebCore::HTMLInputElement::stepMismatch):
891         (WebCore::HTMLInputElement::minimumString):
892         (WebCore::HTMLInputElement::maximumString):
893         (WebCore):
894         (WebCore::HTMLInputElement::stepBaseString):
895         (WebCore::HTMLInputElement::stepString):
896         (WebCore::HTMLInputElement::typeMismatchText):
897         (WebCore::HTMLInputElement::valueMissingText):
898         (WebCore::HTMLInputElement::isInRange):
899         (WebCore::HTMLInputElement::isOutOfRange):
900         * html/HTMLInputElement.h:
901         (HTMLInputElement):
902         * html/HTMLObjectElement.h:
903         (WebCore::HTMLObjectElement::setCustomValidity):
904         * html/HTMLSelectElement.cpp:
905         (WebCore::HTMLSelectElement::valueMissing):
906         * html/HTMLSelectElement.h:
907         (HTMLSelectElement):
908         * html/HTMLTextAreaElement.cpp:
909         * html/HTMLTextAreaElement.h:
910         (WebCore::HTMLTextAreaElement::valueMissing):
911         (HTMLTextAreaElement):
912         * html/InputType.cpp:
913         (WebCore::InputType::alignValueForStep):
914         (WebCore::InputType::stepUpFromRenderer):
915         * html/InputType.h:
916         (InputType):
917         * html/ValidityState.cpp:
918         (WebCore::ValidityState::validationMessage):
919         (WebCore):
920         (WebCore::ValidityState::setCustomErrorMessage):
921         (WebCore::ValidityState::valueMissing):
922         (WebCore::ValidityState::typeMismatch):
923         (WebCore::ValidityState::patternMismatch):
924         (WebCore::ValidityState::tooLong):
925         (WebCore::ValidityState::rangeUnderflow):
926         (WebCore::ValidityState::rangeOverflow):
927         (WebCore::ValidityState::stepMismatch):
928         (WebCore::ValidityState::customError):
929         (WebCore::ValidityState::valid):
930         * html/ValidityState.h:
931         (ValidityState):
932
933 2012-05-11  Alexander Pavlov  <apavlov@chromium.org>
934
935         Web Inspector: Search box doesn't allow CSS selectors anymore
936         https://bugs.webkit.org/show_bug.cgi?id=86196
937
938         Reviewed by Pavel Feldman.
939
940         Refactoring in http://trac.webkit.org/changeset/99983 inadvertently removed the selector matching during
941         node search in the InspectorDOMAgent. This change re-introduces the Document::querySelectorAll() evaluation
942         for the user query.
943
944         * inspector/InspectorDOMAgent.cpp:
945         (WebCore::InspectorDOMAgent::performSearch):
946
947 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
948
949         Unreviewed, rolling out r116527.
950         http://trac.webkit.org/changeset/116527
951         https://bugs.webkit.org/show_bug.cgi?id=86199
952
953         Causing crashes on ClusterFuzz (Requested by inferno-sec on
954         #webkit).
955
956         * rendering/RenderScrollbar.cpp:
957         (WebCore::RenderScrollbar::updateScrollbarPart):
958         * rendering/RenderScrollbarPart.h:
959
960 2012-05-11  Yoshifumi Inoue  <yosin@chromium.org>
961
962         [Forms] Move ValidityState methods implementation to another place
963         https://bugs.webkit.org/show_bug.cgi?id=86058
964
965         Reviewed by Kent Tamura.
966
967         This patch changes ValidityState class for limiting scope of
968         number/range input type related methods for introducing decimal
969         arithmetic.
970
971         Methods related to validation are moved from ValidateState to
972         input, select and textarea elements with virtual method based
973         dispatching via FormAssociateElement instead of tag name
974         dispatching so far for code simplification.
975
976         No new tests. This patch doesn't change behavior.
977
978         * html/FormAssociatedElement.cpp:
979         (WebCore::FormAssociatedElement::customError): Added. Called from ValidateState. Returns custom error mssage in member variable.
980         (WebCore::FormAssociatedElement::patternMismatch): Added.  Called from ValidateState. This is default implementation.
981         (WebCore::FormAssociatedElement::rangeOverflow): Added.  Called from ValidateState. This is default implementation.
982         (WebCore::FormAssociatedElement::rangeUnderflow): Added.  Called from ValidateState. This is default implementation.
983         (WebCore::FormAssociatedElement::stepMismatch): Added.  Called from ValidateState. This is default implementation.
984         (WebCore::FormAssociatedElement::tooLong): Added.  Called from ValidateState. This is default implementation.
985         (WebCore::FormAssociatedElement::typeMismatch): Added.  Called from ValidateState. This is default implementation.
986         (WebCore::FormAssociatedElement::valid): Added.  Called from ValidateState. This is default implementation.
987         (WebCore::FormAssociatedElement::valueMissing): Added.  Called from ValidateState. This is default implementation.
988         (WebCore::FormAssociatedElement::customValidationMessage): Added.  Called from ValidateState. This is default implementation.
989         (WebCore::FormAssociatedElement::validationMessage): Added.  Called from ValidateState. This is default implementation.
990         (WebCore::FormAssociatedElement::setCustomValidity): Added.  set custom error message.
991         * html/FormAssociatedElement.h:
992         (FormAssociatedElement): Added new instance value m_customValidationMessage.
993         * html/HTMLFormControlElement.cpp:
994         (WebCore::HTMLFormControlElement::setCustomValidity): Changed. Calls base class setCustomValidity.
995         * html/HTMLFormControlElement.h:
996         (HTMLFormControlElement):
997         * html/HTMLInputElement.cpp:
998         (WebCore::HTMLInputElement::isValidValue): Call m_inputType methods instead of HTMLInputElement's.
999         (WebCore::HTMLInputElement::tooLong): Call m_inputType methods instead of HTMLInputElement's.
1000         (WebCore):
1001         (WebCore::HTMLInputElement::typeMismatch): Move implementation to InputType.
1002         (WebCore::HTMLInputElement::valueMissing):  Move implementation to InputType.
1003         (WebCore::HTMLInputElement::patternMismatch): Move implementation to InputType.
1004         (WebCore::HTMLInputElement::rangeUnderflow): Move implementation to InputType.
1005         (WebCore::HTMLInputElement::rangeOverflow): Move implementation to InputType.
1006         (WebCore::HTMLInputElement::validationMessage): Move implementation to InputType.
1007         (WebCore::HTMLInputElement::stepMismatch): Move implementation to InputType.
1008         (WebCore::HTMLInputElement::isInRange): Call m_inputType methods instead of HTMLInputElement's.
1009         (WebCore::HTMLInputElement::isOutOfRange): Call m_inputType methods instead of HTMLInputElement's.
1010         * html/HTMLInputElement.h:
1011         (HTMLInputElement): Make tooLong method private.
1012         * html/HTMLObjectElement.h: Add "virtual" and "OVERRIDE".
1013         * html/HTMLSelectElement.cpp:
1014         (WebCore::HTMLSelectElement::validationMessage): Added. Implementation for HTMLSelectElement.
1015         (WebCore::HTMLSelectElement::valueMissing): Added. Implementation for HTMLSelectElement.
1016         * html/HTMLSelectElement.h:
1017         (HTMLSelectElement):  Added entries for newly added methods.
1018         * html/HTMLTextAreaElement.cpp:
1019         (WebCore::HTMLTextAreaElement::validationMessage): Added. Implementation for HTMLTextAreaElement.
1020         (WebCore::HTMLTextAreaElement::valueMissing): Added. Implementation for HTMLTextAreaElement.
1021         (WebCore::HTMLTextAreaElement::tooLong): Added. Implementation for HTMLTextAreaElement.
1022         * html/HTMLTextAreaElement.h:
1023         (HTMLTextAreaElement): Added entries for newly added methods. Change tooLong and valueMissing private.
1024         * html/InputType.cpp:
1025         (WebCore::InputType::stepMismatch): Change method signature.
1026         (WebCore::InputType::alignValueForStep):  Changed for calling InputClass instead of HTMLINputElement.
1027         (WebCore::InputType::stepUpFromRenderer):  Added. Moved from HTMLInputElement.
1028         (WebCore::InputType::validationMessage): Added.  Moved from HTMLInputElement.
1029         * html/InputType.h:
1030         (InputType): Added entries for newly added methods and update methods signature.
1031         * html/ValidityState.cpp: Move actual implementation to FormAssociatedElement and derived classes for localizing implementation change of elements and input types.
1032         (WebCore::ValidityState::validationMessage): Changed to call FormAssociatedElement's method.
1033         (WebCore::ValidityState::valueMissing): Changed to call FormAssociatedElement's method.
1034         (WebCore::ValidityState::typeMismatch): Changed to call FormAssociatedElement's method.
1035         (WebCore::ValidityState::patternMismatch): Changed to call FormAssociatedElement's method.
1036         (WebCore::ValidityState::tooLong): Changed to call FormAssociatedElement's method.
1037         (WebCore::ValidityState::rangeUnderflow): Changed to call FormAssociatedElement's method.
1038         (WebCore::ValidityState::rangeOverflow): Changed to call FormAssociatedElement's method.
1039         (WebCore::ValidityState::stepMismatch): Changed to call FormAssociatedElement's method.
1040         (WebCore::ValidityState::customError): Changed to call FormAssociatedElement's method.
1041         (WebCore::ValidityState::valid):
1042         * html/ValidityState.h:
1043         (ValidityState): Remove custom validation message related things.
1044
1045 2012-05-11  Kent Tamura  <tkent@chromium.org>
1046
1047         Fix a build error without SVG, introduced by tab-size support.
1048
1049         * css/StyleResolver.cpp:
1050         (WebCore::StyleResolver::collectMatchingRulesForList):
1051
1052 2012-05-11  Shinya Kawanaka  <shinyak@chromium.org>
1053
1054         [Refactoring] Move Selection from DOMWindow to TreeScope.
1055         https://bugs.webkit.org/show_bug.cgi?id=82699
1056
1057         Reviewed by Ryosuke Niwa.
1058
1059         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
1060         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
1061         so that ShadowRoot can also use it.
1062
1063         No new tests, should covered by existing tests.
1064
1065         * dom/Document.cpp:
1066         (WebCore::Document::updateFocusAppearanceTimerFired):
1067         * dom/Document.h:
1068         (Document):
1069         * dom/ShadowRoot.cpp:
1070         (WebCore::ShadowRoot::selection):
1071         * dom/TreeScope.cpp:
1072         (WebCore::TreeScope::~TreeScope):
1073         (WebCore::TreeScope::getSelection):
1074         (WebCore):
1075         * dom/TreeScope.h:
1076         (WebCore):
1077         (TreeScope):
1078         * page/DOMSelection.cpp:
1079         (WebCore::DOMSelection::DOMSelection):
1080         (WebCore::DOMSelection::clearTreeScope):
1081         (WebCore):
1082         * page/DOMSelection.h:
1083         (WebCore):
1084         (WebCore::DOMSelection::create):
1085         (DOMSelection):
1086         * page/DOMWindow.cpp:
1087         (WebCore::DOMWindow::~DOMWindow):
1088         (WebCore::DOMWindow::clearDOMWindowProperties):
1089         (WebCore::DOMWindow::getSelection):
1090         * page/DOMWindow.h:
1091         (DOMWindow):
1092
1093 2012-05-04  Yury Semikhatsky  <yurys@chromium.org>
1094
1095         Web Inspector: console should allow JS execution in the context of an isolated world
1096         https://bugs.webkit.org/show_bug.cgi?id=85612
1097
1098         Reviewed by Pavel Feldman.
1099
1100         Added an option to select not only a frame but also isolated world in which
1101         to perform evaluation of the code typed into the console.
1102
1103         Each execution context can be identified using it injected script id. We call it
1104         execution context id in the protocol. Runtime agent is extended with an event that
1105         is sent when new ExecutionContext is created. The event tracking can be enabled/disabled
1106         using setReportExecutionContextCreation command.
1107
1108         * bindings/js/ScriptController.cpp:
1109         (WebCore):
1110         (WebCore::isolatedWorldToSecurityOriginMap):
1111         * bindings/js/ScriptController.h:
1112         (ScriptController):
1113         * bindings/js/ScriptState.cpp:
1114         (WebCore::isolatedWorldScriptState):
1115         (WebCore):
1116         * bindings/js/ScriptState.h:
1117         (WebCore):
1118         * bindings/v8/ScriptController.cpp:
1119         (WebCore):
1120         (WebCore::ScriptController::isolatedWorldToSecurityOriginMap):
1121         * bindings/v8/ScriptController.h:
1122         (ScriptController):
1123         * bindings/v8/ScriptState.cpp:
1124         (WebCore::isolatedWorldScriptState):
1125         (WebCore):
1126         * bindings/v8/ScriptState.h:
1127         (WebCore):
1128         * bindings/v8/V8IsolatedContext.cpp:
1129         (WebCore::V8IsolatedContext::setSecurityOrigin):
1130         * bindings/v8/V8Proxy.cpp:
1131         (WebCore::V8Proxy::setIsolatedWorldSecurityOrigin):
1132         (WebCore::V8Proxy::isolatedWorldContext):
1133         (WebCore):
1134         (WebCore::V8Proxy::isolatedWorldToSecurityOriginMap):
1135         * bindings/v8/V8Proxy.h:
1136         (V8Proxy):
1137         * inspector/CodeGeneratorInspector.py:
1138         (DomainNameFixes):
1139         * inspector/Inspector.json:
1140         * inspector/InspectorInstrumentation.cpp:
1141         (WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl):
1142         (WebCore):
1143         * inspector/InspectorInstrumentation.h:
1144         (WebCore):
1145         (InspectorInstrumentation):
1146         (WebCore::InspectorInstrumentation::didCreateIsolatedContext):
1147         * inspector/InspectorRuntimeAgent.cpp:
1148         (WebCore::InspectorRuntimeAgent::evaluate):
1149         * inspector/InspectorRuntimeAgent.h:
1150         (InspectorRuntimeAgent):
1151         * inspector/InstrumentingAgents.h:
1152         (WebCore):
1153         (WebCore::InstrumentingAgents::InstrumentingAgents):
1154         (WebCore::InstrumentingAgents::pageRuntimeAgent):
1155         (WebCore::InstrumentingAgents::setPageRuntimeAgent):
1156         (InstrumentingAgents):
1157         * inspector/PageRuntimeAgent.cpp:
1158         (PageRuntimeAgentState):
1159         (WebCore):
1160         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
1161         (WebCore::PageRuntimeAgent::setFrontend):
1162         (WebCore::PageRuntimeAgent::clearFrontend):
1163         (WebCore::PageRuntimeAgent::restore):
1164         (WebCore::PageRuntimeAgent::setReportExecutionContextCreation):
1165         (WebCore::PageRuntimeAgent::didCreateExecutionContext):
1166         (WebCore::PageRuntimeAgent::getScriptStateForEval):
1167         * inspector/PageRuntimeAgent.h:
1168         (WebCore):
1169         (PageRuntimeAgent):
1170         * inspector/WorkerRuntimeAgent.cpp:
1171         (WebCore::WorkerRuntimeAgent::setReportExecutionContextCreation):
1172         (WebCore::WorkerRuntimeAgent::getScriptStateForEval):
1173         * inspector/WorkerRuntimeAgent.h:
1174         (WorkerRuntimeAgent):
1175         * inspector/front-end/ConsoleView.js:
1176         (WebInspector.ConsoleView.prototype.get statusBarItems):
1177         (WebInspector.ConsoleView.prototype.addContext):
1178         (WebInspector.ConsoleView.prototype.removeContext):
1179         (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
1180         (WebInspector.ConsoleView.prototype._contextUpdated):
1181         (WebInspector.ConsoleView.prototype._addedExecutionContext):
1182         (WebInspector.ConsoleView.prototype._currentEvaluationContextId):
1183         (WebInspector.ConsoleView.prototype._currentEvaluationContext):
1184         (WebInspector.ConsoleView.prototype._currentIsolatedWorldId):
1185         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
1186         * inspector/front-end/ExtensionPanel.js:
1187         (WebInspector.ExtensionSidebarPane.prototype.setExpression):
1188         * inspector/front-end/ExtensionServer.js:
1189         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1190         * inspector/front-end/JavaScriptContextManager.js:
1191         (WebInspector.JavaScriptContextManager):
1192         (WebInspector.JavaScriptContextManager.prototype._didLoadCachedResources):
1193         (WebInspector.JavaScriptContextManager.prototype.isolatedContextCreated):
1194         (WebInspector.RuntimeDispatcher):
1195         (WebInspector.RuntimeDispatcher.prototype.isolatedContextCreated):
1196         (WebInspector.ExecutionContext):
1197         (WebInspector.ExecutionContext.comparator):
1198         (WebInspector.FrameEvaluationContext):
1199         (WebInspector.FrameEvaluationContext.prototype._frameNavigated):
1200         (WebInspector.FrameEvaluationContext.prototype._addExecutionContext):
1201         (WebInspector.FrameEvaluationContext.prototype._ensureMainWorldContextAdded):
1202         (WebInspector.FrameEvaluationContext.prototype.isolatedContexts):
1203
1204 2012-05-11  Andrey Kosyakov  <caseq@chromium.org>
1205
1206         Web Inspector: use div, not span as a parent element for ElementsTreeOutline in Audits panel
1207         https://bugs.webkit.org/show_bug.cgi?id=86188
1208
1209         Reviewed by Yury Semikhatsky.
1210
1211         We need to use <div>, not <span> as a container for ElementsTreeOutline, as latter accesses its parent offsetWidth
1212         within _treeElementFromEvent(), which returns 0 for inline elements.
1213
1214         * inspector/front-end/AuditFormatters.js:
1215         (WebInspector.AuditFormatters.node.onNodeAvailable):
1216         (WebInspector.AuditFormatters.node):
1217
1218 2012-05-11  Antti Koivisto  <antti@apple.com>
1219
1220         Inline Node::traverseNextNode
1221         https://bugs.webkit.org/show_bug.cgi?id=85844
1222
1223         Reviewed by Ryosuke Niwa.
1224         
1225         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
1226         for many hot loops.
1227
1228         In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.
1229         
1230         Performance bots will tell if this was worthwhile.
1231
1232         * dom/ContainerNode.h:
1233         (WebCore::Node::traverseNextNode):
1234         (WebCore):
1235         (WebCore::Node::traverseNextSibling):
1236         * dom/Node.cpp:
1237         (WebCore::Node::traverseNextAncestorSibling):
1238         * dom/Node.h:
1239         (Node):
1240         * bindings/v8/RetainedDOMInfo.cpp:
1241
1242 2012-05-07  Yury Semikhatsky  <yurys@chromium.org>
1243
1244         Web Inspector: get rid of InspectorAgent::emitCommitLoadIfNeeded method
1245         https://bugs.webkit.org/show_bug.cgi?id=85708
1246
1247         Reviewed by Pavel Feldman.
1248
1249         Instead of calling emitCommitLoadIfNeeded after all agents are restored
1250         required actions are performed directly in the restore() methods.
1251
1252         * inspector/InspectorAgent.cpp:
1253         * inspector/InspectorAgent.h:
1254         (WebCore::InspectorAgent::didCommitLoadFired):
1255         * inspector/InspectorController.cpp:
1256         (WebCore::InspectorController::InspectorController):
1257         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1258         * inspector/InspectorDatabaseAgent.cpp:
1259         (WebCore::InspectorDatabaseAgent::restore):
1260         * inspector/InspectorPageAgent.cpp:
1261         (WebCore::InspectorPageAgent::create):
1262         (WebCore::InspectorPageAgent::InspectorPageAgent):
1263         (WebCore::InspectorPageAgent::restore):
1264         * inspector/InspectorPageAgent.h:
1265         (WebCore):
1266         * inspector/InspectorResourceAgent.cpp:
1267         (WebCore::InspectorResourceAgent::restore):
1268
1269 2012-05-10  Andrey Kosyakov  <caseq@chromium.org>
1270
1271         Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
1272         https://bugs.webkit.org/show_bug.cgi?id=86108
1273
1274         Reviewed by Pavel Feldman.
1275
1276        - added two new formatters to AuditResults object of webInspector.audits API;
1277
1278         * inspector/front-end/AuditFormatters.js:
1279         (WebInspector.AuditFormatters.resourceLink):
1280         (WebInspector.AuditFormatters.object.onEvaluate):
1281         (WebInspector.AuditFormatters.object): format as a remote object property list;
1282         (WebInspector.AuditFormatters.node.onNodeAvailable):
1283         (WebInspector.AuditFormatters.node.onEvaluate):
1284         (WebInspector.AuditFormatters.node): format as a DOM elements sub-tree;
1285         (WebInspector.AuditFormatters.Utilities.evaluate): common expression evaluation logic for both new formatters;
1286         * inspector/front-end/ExtensionAPI.js:
1287         (injectedExtensionAPI.AuditResultImpl):
1288         * inspector/front-end/auditsPanel.css:
1289         (.audit-result-tree ol.outline-disclosure):
1290         (.audit-result-tree .section .header):
1291         (.audit-result-tree .section .header::before):
1292
1293 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1294
1295         Unreviewed, rolling out r116727.
1296         http://trac.webkit.org/changeset/116727
1297         https://bugs.webkit.org/show_bug.cgi?id=86181
1298
1299         Build error on Chromium-Android (Requested by tkent on
1300         #webkit).
1301
1302         * platform/graphics/MediaPlayer.cpp:
1303         (WebCore::MediaPlayer::enterFullscreen):
1304         (WebCore):
1305         * platform/graphics/MediaPlayer.h:
1306         (MediaPlayer):
1307         * platform/graphics/MediaPlayerPrivate.h:
1308         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
1309         (MediaPlayerPrivateInterface):
1310
1311 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1312
1313         Unreviewed, rolling out r116731.
1314         http://trac.webkit.org/changeset/116731
1315         https://bugs.webkit.org/show_bug.cgi?id=86178
1316
1317         Build failure on Chromium-mac (Requested by tkent on #webkit).
1318
1319         * platform/graphics/chromium/LayerRendererChromium.cpp:
1320         (WebCore::LayerRendererChromium::create):
1321         (WebCore::LayerRendererChromium::LayerRendererChromium):
1322         (WebCore::LayerRendererChromium::initializeSharedObjects):
1323         * platform/graphics/chromium/LayerRendererChromium.h:
1324         (LayerRendererChromium):
1325         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1326         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1327         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1328         (CCLayerTreeHostImpl):
1329         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1330         (UnthrottledTextureUploader):
1331         (WebCore::UnthrottledTextureUploader::create):
1332         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
1333         (WebCore::UnthrottledTextureUploader::isBusy):
1334         (WebCore::UnthrottledTextureUploader::beginUploads):
1335         (WebCore::UnthrottledTextureUploader::endUploads):
1336         (WebCore::UnthrottledTextureUploader::uploadTexture):
1337         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
1338         (WebCore):
1339         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
1340         (WebCore::CCSingleThreadProxy::recreateContext):
1341         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1342         (WebCore):
1343         (UnthrottledTextureUploader):
1344         (WebCore::UnthrottledTextureUploader::create):
1345         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
1346         (WebCore::UnthrottledTextureUploader::isBusy):
1347         (WebCore::UnthrottledTextureUploader::beginUploads):
1348         (WebCore::UnthrottledTextureUploader::endUploads):
1349         (WebCore::UnthrottledTextureUploader::uploadTexture):
1350         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
1351         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
1352         (WebCore::CCThreadProxy::recreateContextOnImplThread):
1353
1354 2012-05-10  David Reveman  <reveman@chromium.org>
1355
1356         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
1357         https://bugs.webkit.org/show_bug.cgi?id=85893
1358
1359         Reviewed by Adrienne Walker.
1360
1361         Move instantiation of texture uploader to LayerRendererChromium and
1362         allow CCProxy to decide between a throttled or unthrottled uploader
1363         using a flag passed to the LayerRendererChromium constructor.
1364
1365         * platform/graphics/chromium/LayerRendererChromium.cpp:
1366         (WebCore::LayerRendererChromium::create):
1367         (WebCore::LayerRendererChromium::LayerRendererChromium):
1368         (WebCore::LayerRendererChromium::initializeSharedObjects):
1369         * platform/graphics/chromium/LayerRendererChromium.h:
1370         (LayerRendererChromium):
1371         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1372         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1373         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1374         (CCLayerTreeHostImpl):
1375         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1376         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
1377         (WebCore::CCSingleThreadProxy::recreateContext):
1378         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1379         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
1380         (WebCore::CCThreadProxy::recreateContextOnImplThread):
1381
1382 2012-05-10  MORITA Hajime  <morrita@google.com>
1383
1384         ElementShadow should minimize the usage of "ShadowRoot" name
1385         https://bugs.webkit.org/show_bug.cgi?id=85970
1386
1387         Reviewed by Dimitri Glazkov.
1388
1389         This change cleans two out dated assumptions which brought in at
1390         early stage of Shadow DOM implementation.
1391
1392         - Removed Element::hasShadowRoot(): shadow existence can be checked by Element::shadow().
1393         - Made ElementShadow::removeAllShadowRoots() private: we no longer allow ShadowRoot removal.
1394           It can only happens at the ElementShadow destruction.
1395
1396         Most of changes in element implementations are basically simple
1397         replacement from hasShadowRoot() to shadow().
1398
1399         No new tests. Covered by existing tests.
1400
1401         * WebCore.exp.in:
1402         * dom/ContainerNodeAlgorithms.h:
1403         (WebCore::ChildFrameDisconnector::collectDescendant):
1404         * dom/ComposedShadowTreeWalker.cpp:
1405         (WebCore::ComposedShadowTreeWalker::traverseChild):
1406         * dom/Document.cpp:
1407         (WebCore::Document::buildAccessKeyMap):
1408         * dom/Element.cpp:
1409         (WebCore::Element::recalcStyle):
1410         (WebCore::Element::ensureShadowRoot):
1411         (WebCore::Element::childrenChanged):
1412         * dom/Element.h:
1413         (Element):
1414         (WebCore::isShadowHost):
1415         (WebCore):
1416         * dom/ElementShadow.cpp:
1417         (WebCore::ElementShadow::~ElementShadow):
1418         (WebCore::ElementShadow::removeAllShadowRoots):
1419         * dom/ElementShadow.h:
1420         (ElementShadow):
1421         (WebCore::ElementShadow::host):
1422         * dom/EventDispatcher.cpp:
1423         * dom/Node.cpp:
1424         (WebCore::oldestShadowRootFor):
1425         * dom/NodeRenderingContext.cpp:
1426         (WebCore::NodeRenderingContext::NodeRenderingContext):
1427         * dom/ShadowRoot.cpp:
1428         (WebCore::ShadowRoot::create):
1429         * html/ColorInputType.cpp:
1430         (WebCore::ColorInputType::createShadowSubtree):
1431         * html/FileInputType.cpp:
1432         (WebCore::FileInputType::createShadowSubtree):
1433         (WebCore::FileInputType::multipleAttributeChanged):
1434         * html/HTMLDetailsElement.cpp:
1435         (WebCore::HTMLDetailsElement::createShadowSubtree):
1436         * html/HTMLInputElement.cpp:
1437         (WebCore::HTMLInputElement::createShadowSubtree):
1438         * html/HTMLKeygenElement.cpp:
1439         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1440         (WebCore::HTMLKeygenElement::shadowSelect):
1441         * html/HTMLMediaElement.cpp:
1442         (WebCore::HTMLMediaElement::hasMediaControls):
1443         * html/HTMLMeterElement.cpp:
1444         (WebCore::HTMLMeterElement::createShadowSubtree):
1445         * html/HTMLProgressElement.cpp:
1446         (WebCore::HTMLProgressElement::createShadowSubtree):
1447         * html/HTMLSummaryElement.cpp:
1448         (WebCore::HTMLSummaryElement::createShadowSubtree):
1449         * html/HTMLTextAreaElement.cpp:
1450         (WebCore::HTMLTextAreaElement::createShadowSubtree):
1451         * html/InputType.cpp:
1452         (WebCore::InputType::destroyShadowSubtree):
1453         * html/RangeInputType.cpp:
1454         (WebCore::RangeInputType::handleMouseDownEvent):
1455         (WebCore::RangeInputType::createShadowSubtree):
1456         * html/TextFieldInputType.cpp:
1457         (WebCore::TextFieldInputType::createShadowSubtree):
1458         * html/shadow/SliderThumbElement.cpp:
1459         (WebCore::trackLimiterElementOf):
1460         * inspector/InspectorDOMAgent.cpp:
1461         (WebCore::InspectorDOMAgent::unbind):
1462         (WebCore::InspectorDOMAgent::buildObjectForNode):
1463         * page/FocusController.cpp:
1464         (WebCore):
1465         * rendering/RenderFileUploadControl.cpp:
1466         (WebCore::RenderFileUploadControl::uploadButton):
1467         * svg/SVGTRefElement.cpp:
1468         (WebCore::SVGTRefElement::updateReferencedText):
1469         (WebCore::SVGTRefElement::detachTarget):
1470         * testing/Internals.cpp:
1471         (WebCore::Internals::ensureShadowRoot):
1472         (WebCore::Internals::youngestShadowRoot):
1473         (WebCore::Internals::oldestShadowRoot):
1474         * testing/Internals.h:
1475         (Internals):
1476         * testing/Internals.idl:
1477
1478 2012-05-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1479
1480         Move resumeAnimations to use Internals interface
1481         https://bugs.webkit.org/show_bug.cgi?id=86063
1482
1483         Reviewed by Alexey Proskuryakov.
1484
1485         Add resumeAnimations functions, because it is able to work in the
1486         cross-port way through the Internals interface.
1487
1488         No new tests, since we are improving here the infra-structure for testing
1489         a specific method.
1490
1491         * testing/Internals.cpp:
1492         (WebCore::Internals::resumeAnimations):
1493         (WebCore):
1494         * testing/Internals.h:
1495         (Internals):
1496         * testing/Internals.idl:
1497
1498 2012-05-10  Min Qin  <qinmin@google.com>
1499
1500         split MediaPlayer::enterFullscreen into 2 seperate functions
1501         https://bugs.webkit.org/show_bug.cgi?id=86052
1502
1503         Reviewed by Benjamin Poulain.
1504
1505         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
1506         not do the same. And ios does not need the return value.
1507         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
1508         function for android.
1509         No tests as there are no behavior change, just refactoring.
1510
1511         * platform/graphics/MediaPlayer.cpp:
1512         (WebCore::MediaPlayer::enterFullscreen):
1513         (WebCore):
1514         (WebCore::MediaPlayer::canEnterFullscreen):
1515         * platform/graphics/MediaPlayer.h:
1516         (MediaPlayer):
1517         * platform/graphics/MediaPlayerPrivate.h:
1518         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
1519         (MediaPlayerPrivateInterface):
1520         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
1521
1522 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1523
1524         Unreviewed, rolling out r116715.
1525         http://trac.webkit.org/changeset/116715
1526         https://bugs.webkit.org/show_bug.cgi?id=86172
1527
1528         Broke http/tests/security/cross-frame-access-selection.html
1529         (Requested by tkent on #webkit).
1530
1531         * dom/Document.cpp:
1532         (WebCore):
1533         (WebCore::Document::getSelection):
1534         * dom/Document.h:
1535         (Document):
1536         * dom/ShadowRoot.cpp:
1537         (WebCore::ShadowRoot::selection):
1538         * dom/TreeScope.cpp:
1539         (WebCore::TreeScope::~TreeScope):
1540         * dom/TreeScope.h:
1541         (WebCore):
1542         (TreeScope):
1543         * page/DOMSelection.cpp:
1544         (WebCore::DOMSelection::DOMSelection):
1545         * page/DOMSelection.h:
1546         (WebCore):
1547         (WebCore::DOMSelection::create):
1548         (DOMSelection):
1549         * page/DOMWindow.cpp:
1550         (WebCore::DOMWindow::~DOMWindow):
1551         (WebCore::DOMWindow::clearDOMWindowProperties):
1552         (WebCore::DOMWindow::getSelection):
1553         * page/DOMWindow.h:
1554         (DOMWindow):
1555
1556 2012-05-10  Hajime Morrita  <morrita@google.com>
1557
1558         WebKit should support tab-size.
1559         https://bugs.webkit.org/show_bug.cgi?id=52994
1560
1561         - Added boilerplate for "tab-size" CSS property.
1562         - Added RenderStye::tabSize() as a RareInheritedData.
1563         - Replaced TextRun::m_allowTabs into TextRun::m_tabSize.
1564
1565         Reviewed by Simon Fraser.
1566
1567         Tests: fast/css/tab-size-expected.html
1568                fast/css/tab-size.html
1569
1570         * css/CSSComputedStyleDeclaration.cpp:
1571         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1572         * css/CSSParser.cpp:
1573         (WebCore::CSSParser::parseValue):
1574         * css/CSSProperty.cpp:
1575         (WebCore::CSSProperty::isInheritedProperty):
1576         * css/CSSPropertyNames.in:
1577         * css/CSSStyleSelector.cpp:
1578         (WebCore::CSSStyleSelector::applyProperty):
1579         * html/canvas/CanvasRenderingContext2D.cpp:
1580         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1581         * platform/chromium/PopupListBox.cpp:
1582         (WebCore::PopupListBox::paintRow):
1583         * platform/graphics/Font.h:
1584         (WebCore::Font::tabWidth):
1585         * platform/graphics/TextRun.h:
1586         (WebCore::TextRun::TextRun):
1587         (WebCore::TextRun::allowTabs):
1588         (WebCore::TextRun::tabSize):
1589         (WebCore::TextRun::setTabSize):
1590         * platform/graphics/WidthIterator.cpp:
1591         (WebCore::WidthIterator::advance):
1592         * platform/graphics/mac/ComplexTextController.cpp:
1593         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1594         * platform/win/PopupMenuWin.cpp:
1595         (WebCore::PopupMenuWin::paint):
1596         * rendering/InlineTextBox.cpp:
1597         (WebCore::InlineTextBox::constructTextRun):
1598         * rendering/RenderBlock.cpp:
1599         (WebCore::RenderBlock::constructTextRun):
1600         * rendering/RenderBlockLineLayout.cpp:
1601         (WebCore::textWidth):
1602         (WebCore::tryHyphenating):
1603         * rendering/RenderText.cpp:
1604         (WebCore::RenderText::widthFromCache):
1605         (WebCore::RenderText::computePreferredLogicalWidths):
1606         (WebCore::RenderText::width):
1607         * rendering/RenderText.h:
1608         * rendering/style/RenderStyle.cpp:
1609         (WebCore::RenderStyle::diff):
1610         * rendering/style/RenderStyle.h:
1611         (WebCore::RenderStyleBitfields::tabSize):
1612         (WebCore::RenderStyleBitfields::collapsedTabSize):
1613         (WebCore::RenderStyleBitfields::setTabSize):
1614         (WebCore::RenderStyleBitfields::initialTabSize):
1615         * rendering/style/StyleRareInheritedData.cpp:
1616         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1617         (WebCore::StyleRareInheritedData::operator==):
1618         * rendering/style/StyleRareInheritedData.h:
1619         * rendering/svg/SVGInlineTextBox.cpp:
1620         (WebCore::SVGInlineTextBox::constructTextRun):
1621         * rendering/svg/SVGTextMetrics.cpp:
1622         (WebCore::constructTextRun):
1623
1624 2012-05-10  Antoine Labour  <piman@chromium.org>
1625
1626         Sync with impl thread when removing references to external textures
1627         https://bugs.webkit.org/show_bug.cgi?id=86054
1628
1629         We want to ensure the client side is safe to release textures, so we
1630         sync with the impl thread when:
1631         - we change the texture (and we had one)
1632         - the layer is removed from the tree (and we had a texture)
1633         - the layer is destroyed (and we had a texture)
1634
1635         Reviewed by James Robinson.
1636
1637         Test: TextureLayerChromiumTest.
1638
1639         * platform/graphics/chromium/TextureLayerChromium.cpp:
1640         (WebCore::TextureLayerChromium::~TextureLayerChromium):
1641         (WebCore::TextureLayerChromium::setTextureId):
1642         (WebCore::TextureLayerChromium::setLayerTreeHost):
1643         (WebCore):
1644         * platform/graphics/chromium/TextureLayerChromium.h:
1645         (TextureLayerChromium):
1646
1647 2012-05-10  Kent Tamura  <tkent@chromium.org>
1648
1649         [Chromium] attempt to build fix for Chromium-mac.
1650         r116697 introduced an override of a system function. It's intentional
1651         and WebCoreTextFieldCell should be in the whitelist.
1652
1653         * WebCore.gyp/WebCore.gyp:
1654
1655 2012-05-10  Anders Carlsson  <andersca@apple.com>
1656
1657         PDF files won't scroll in Safari when using Adobe plug-in
1658         https://bugs.webkit.org/show_bug.cgi?id=86167
1659         <rdar://problem/11389719>
1660
1661         Reviewed by Sam Weinig.
1662
1663         * page/scrolling/ScrollingCoordinator.cpp:
1664         (WebCore::computeNonFastScrollableRegion):
1665         Loop over the frame view children looking for plug-in views that want wheel events
1666         and add them to the non-fast scrollable region. Ideally, the plug-ins should be added
1667         to the set of scrollable areas, but PluginView in WebKit2 is not a ScrollableArea yet.
1668
1669         * plugins/PluginViewBase.h:
1670         (PluginViewBase):
1671         (WebCore::PluginViewBase::wantsWheelEvents):
1672
1673 2012-05-10  Alexey Proskuryakov  <ap@apple.com>
1674
1675         Crash in 3rd party WebKit apps that disable cache at a wrong time
1676         https://bugs.webkit.org/show_bug.cgi?id=86027
1677         <rdar://problem/10615880>
1678
1679         Reviewed by Antti Koivisto.
1680
1681         Added an API test.
1682
1683         The fix is to use CachedResourceHandle throughout MemoryCache, which will certainly
1684         keep the resource alive. Also removed earlier fixes.
1685
1686         * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::cachedImageSet):
1687         * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage):
1688         * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::cachedShader):
1689         * history/PageCache.cpp: (WebCore::PageCache::releaseAutoreleasedPagesNow):
1690         * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement):
1691         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::load):
1692         * loader/cache/CachedResourceLoader.cpp:
1693         (WebCore::CachedResourceLoader::requestImage):
1694         (WebCore::CachedResourceLoader::requestFont):
1695         (WebCore::CachedResourceLoader::requestTextTrack):
1696         (WebCore::CachedResourceLoader::requestShader):
1697         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1698         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1699         (WebCore::CachedResourceLoader::requestScript):
1700         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
1701         (WebCore::CachedResourceLoader::requestSVGDocument):
1702         (WebCore::CachedResourceLoader::requestLinkResource):
1703         (WebCore::CachedResourceLoader::requestRawResource):
1704         (WebCore::CachedResourceLoader::requestResource):
1705         (WebCore::CachedResourceLoader::revalidateResource):
1706         (WebCore::CachedResourceLoader::loadResource):
1707         (WebCore::CachedResourceLoader::requestPreload):
1708         * loader/cache/CachedResourceLoader.h: (CachedResourceLoader):
1709         * loader/cache/MemoryCache.h: (WebCore::MemoryCache::setPruneEnabled):
1710
1711         * loader/cache/CachedResourceHandle.h:
1712         (WebCore::CachedResourceHandle::CachedResourceHandle):
1713         (WebCore::CachedResourceHandle::operator=):
1714         Teach CachedResourceHandle how to make CachedResourceHandle<CachedResource> from
1715         a handle to subclass.
1716
1717 2012-05-10  Tien-Ren Chen  <trchen@chromium.org>
1718
1719         Eliminate duplicated code for culled line box in RenderInline
1720         https://bugs.webkit.org/show_bug.cgi?id=85725
1721
1722         This patch extracts the common part of culledInlineBoundingBox() /
1723         culledInlineAbsoluteRects() / culledInlineAbsoluteQuads() to become a
1724         template function generateCulledLineBoxRects(). The template function
1725         accepts a new parameter, GeneratorContext functor, which will be
1726         invoked everytime a new line box rect has been generated. The generated
1727         rect will be in local coordinate. The functor will be responsible for
1728         appropriate transformation, then appending to vector or union with
1729         existing bounding box.
1730
1731         Reviewed by Eric Seidel.
1732
1733         No new tests. No change in behavior.
1734
1735         * rendering/RenderInline.cpp:
1736         (WebCore):
1737         (WebCore::RenderInline::generateLineBoxRects):
1738         (WebCore::RenderInline::generateCulledLineBoxRects):
1739         (WebCore::RenderInline::absoluteRects):
1740         (WebCore::RenderInline::absoluteQuads):
1741         (WebCore::RenderInline::linesBoundingBox):
1742         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1743         (WebCore::RenderInline::addFocusRingRects):
1744         * rendering/RenderInline.h:
1745         (RenderInline):
1746
1747 2012-05-10  Abhishek Arya  <inferno@chromium.org>
1748
1749         Crash in swapInNodePreservingAttributesAndChildren.
1750         https://bugs.webkit.org/show_bug.cgi?id=85197
1751  
1752         Reviewed by Ryosuke Niwa.
1753  
1754         Keep the children in a ref vector before adding them to newNode.
1755         They can get destroyed due to mutation events.
1756
1757         No new tests because we don't have a reduction.
1758
1759         * editing/ReplaceNodeWithSpanCommand.cpp:
1760         (WebCore::swapInNodePreservingAttributesAndChildren):
1761
1762 2012-05-10  Shinya Kawanaka  <shinyak@chromium.org>
1763
1764         [Refactoring] Move Selection from DOMWindow to TreeScope.
1765         https://bugs.webkit.org/show_bug.cgi?id=82699
1766
1767         Reviewed by Ryosuke Niwa.
1768
1769         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
1770         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
1771         so that ShadowRoot can also use it.
1772
1773         No new tests, should covered by existing tests.
1774
1775         * dom/Document.cpp:
1776         (WebCore::Document::updateFocusAppearanceTimerFired):
1777         * dom/Document.h:
1778         (Document):
1779         * dom/ShadowRoot.cpp:
1780         (WebCore::ShadowRoot::selection):
1781         * do/mTreeScope.cpp:
1782         (WebCore::TreeScope::~TreeScope):
1783         (WebCore::TreeScope::getSelection):
1784         (WebCore):
1785         * dom/TreeScope.h:
1786         (WebCore):
1787         (TreeScope):
1788         * page/DOMSelection.cpp:
1789         (WebCore::DOMSelection::DOMSelection):
1790         (WebCore::DOMSelection::clearTreeScope):
1791         (WebCore):
1792         * page/DOMSelection.h:
1793         (WebCore):
1794         (WebCore::DOMSelection::create):
1795         (DOMSelection):
1796         (WebCore::DOMSelection::frame):
1797         * page/DOMWindow.cpp:
1798         (WebCore::DOMWindow::~DOMWindow):
1799         (WebCore::DOMWindow::clearDOMWindowProperties):
1800         (WebCore::DOMWindow::getSelection):
1801         * page/DOMWindow.h:
1802         (DOMWindow):
1803
1804 2012-05-10  Kent Tamura  <tkent@chromium.org>
1805
1806         Unreviewed, rolling out r116594.
1807         http://trac.webkit.org/changeset/116594
1808         https://bugs.webkit.org/show_bug.cgi?id=86013
1809
1810         r116594 might have made some composition tests flaky.
1811
1812         * platform/graphics/chromium/LayerChromium.cpp:
1813         (WebCore::LayerChromium::addAnimation):
1814         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1815         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
1816         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1817         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1818         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
1819         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1820         (CCLayerTreeHost):
1821         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1822         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1823         * platform/graphics/chromium/cc/CCProxy.h:
1824         (CCProxy):
1825         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1826         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
1827         (WebCore::CCSingleThreadProxy::doComposite):
1828         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1829         (WebCore):
1830         * platform/graphics/chromium/cc/CCThreadProxy.h:
1831         (CCThreadProxy):
1832
1833 2012-05-10  Michael Nordman  <michaeln@google.com>
1834
1835         [chromium] DomStorage events handling needs TLC (2)
1836         https://bugs.webkit.org/show_bug.cgi?id=85221
1837         Alter the StorageArea virtual interface such that the mutators no longer
1838         return old values. This is to allow implementations of the interface to operate
1839         more asynchronously.
1840
1841         Reviewed by Adam Barth.
1842
1843         No new tests. Existing tests cover this.
1844
1845         * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values
1846         * storage/StorageAreaImpl.cpp:
1847         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):  removed an unneeded PLATFORM(CHROMIUM) guard
1848         (WebCore::StorageAreaImpl::setItem): no longer return the old value
1849         (WebCore::StorageAreaImpl::removeItem): no longer return the old value
1850         (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared
1851         * storage/StorageAreaImpl.h: match StorageArea's virtual interface
1852
1853 2012-05-10  Beth Dakin  <bdakin@apple.com>
1854
1855         https://bugs.webkit.org/show_bug.cgi?id=86158
1856         Overlay scrollbars without layers never paint in overflow regions in 
1857         tiled drawing mode
1858         -and corresponding-
1859         <rdar://problem/11289546>
1860
1861         Reviewed by Darin Adler.
1862
1863         RenderLayers paint scrollbars that do not have their own layers by 
1864         running a second pass through the layer tree after the layer tree has 
1865         painted. This ensures that the scrollbars always paint on top of 
1866         content. However, this mechanism was relying on 
1867         FrameView::paintContents() as a choke-point for all painting to 
1868         trigger the second painting pass. That is not a reasonable choke-point 
1869         in tiled drawing, so this patch adds similar code to 
1870         RenderLayerBacking.
1871
1872         Only opt into the second painting pass for scrollbars that do not have 
1873         their own layers.
1874         * rendering/RenderLayer.cpp:
1875         (WebCore::RenderLayer::paintOverflowControls):
1876         
1877         A layer that paints into its backing cannot return early here if it 
1878         has overlay scrollbars to paint.
1879         (WebCore::RenderLayer::paintLayer):
1880         
1881         This replicates code in FrameView::paintContents(). After painting the 
1882         owning layer, do a second pass if there are overlay scrollbars to 
1883         paint.
1884         * rendering/RenderLayerBacking.cpp:
1885         (WebCore::RenderLayerBacking::paintIntoLayer):
1886
1887 2012-05-10  Anders Carlsson  <andersca@apple.com>
1888
1889         Well, at least fixing the GTK+ build is something!
1890
1891         * platform/gtk/LocalizedStringsGtk.cpp:
1892         (WebCore::insecurePluginVersionText):
1893         (WebCore):
1894
1895 2012-05-10  Anders Carlsson  <andersca@apple.com>
1896
1897         Add insecurePluginVersionText stubs.
1898
1899         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1900         (WebCore::insecurePluginVersionText):
1901         (WebCore):
1902         * platform/efl/LocalizedStringsEfl.cpp:
1903         (WebCore::insecurePluginVersionText):
1904         (WebCore):
1905         * platform/qt/LocalizedStringsQt.cpp:
1906         (WebCore::insecurePluginVersionText):
1907         (WebCore):
1908
1909 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1910
1911         Unreviewed, rolling out r116677.
1912         http://trac.webkit.org/changeset/116677
1913         https://bugs.webkit.org/show_bug.cgi?id=86159
1914
1915         This patch causes linker error to some mac bots (Requested by
1916         jianli_ on #webkit).
1917
1918         * WebCore.exp.in:
1919         * dom/ContainerNode.h:
1920         * dom/Node.cpp:
1921         (WebCore::Node::traverseNextNode):
1922         (WebCore::Node::traverseNextSibling):
1923         * dom/Node.h:
1924         (Node):
1925
1926 2012-05-10  Abhishek Arya  <inferno@chromium.org>
1927
1928         Crash in FontCache::releaseFontData due to infinite float size.
1929         https://bugs.webkit.org/show_bug.cgi?id=86110
1930
1931         Reviewed by Andreas Kling.
1932
1933         New callers always forget to clamp the font size, which overflows
1934         to infinity on multiplication. It is best to clamp it at the end
1935         to avoid getting greater than std::numeric_limits<float>::max().
1936
1937         Test: fast/css/large-font-size-crash.html
1938
1939         * platform/graphics/FontDescription.h:
1940         (WebCore::FontDescription::setComputedSize):
1941         (WebCore::FontDescription::setSpecifiedSize):
1942
1943 2012-05-10  Beth Dakin  <bdakin@apple.com>
1944
1945         https://bugs.webkit.org/show_bug.cgi?id=82131
1946         [Mac] REGRESSION (r110480): Text field that specifies background-color 
1947         (or is auto-filled) gets un-themed border
1948         -and corresponding-
1949         <rdar://problem/11115221>
1950
1951         Reviewed by Maciej Stachowiak.
1952
1953         This change rolls out r110480 which is what caused styled text fields 
1954         to get the un-themed border, and it does a bunch of work to make sure 
1955         we get the pretty, new version of the NSTextField art whenever 
1956         possible. We do this differently for post-Lion OS's since there is now 
1957         a way to opt into it all the time. Lion and SnowLeopard can only use 
1958         the new art in HiDPI mode when the background color of the text field 
1959         is just white.
1960
1961         RenderThemeMac::textField() takes a boolean paramter used to determine 
1962         if the new gradient will be used.
1963         * rendering/RenderThemeMac.h:
1964         (RenderThemeMac):
1965         
1966         This is the post-Lion workaround. This code has no effect on Lion and 
1967         SnowLeopard. This allows up to opt into a version of [NSTextField drawWithFrame:] that will only draw the frame of the text field; without this, it will draw the frame and the background, which creates a number of problems with styled text fields and text fields in HiDPI. There is a less comprehesive workaround for Lion and SnowLeopard in place in RenderThemeMac::textField().
1968         * rendering/RenderThemeMac.mm:
1969         (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
1970         
1971         This is the roll-out of r110480.
1972         (WebCore::RenderThemeMac::isControlStyled):
1973         
1974         See the comments for a full explanation, but this is mostly code for 
1975         Lion and SnowLeopard to determine if we can opt into the new artwork.
1976         (WebCore::RenderThemeMac::paintTextField):
1977         (WebCore::RenderThemeMac::textField):
1978
1979 2012-05-10  Anders Carlsson  <andersca@apple.com>
1980
1981         WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
1982         https://bugs.webkit.org/show_bug.cgi?id=86150
1983         <rdar://problem/9551196>
1984
1985         Reviewed by Sam Weinig.
1986
1987         * English.lproj/Localizable.strings:
1988         Update.
1989
1990         * loader/SubframeLoader.cpp:
1991         (WebCore::SubframeLoader::loadPlugin):
1992         It is possible that the client has already set the unavailability reason so don't try to set it twice.
1993
1994         * platform/LocalizedStrings.cpp:
1995         (WebCore::insecurePluginVersionText):
1996         * platform/LocalizedStrings.h:
1997         Add insecure plug-in version text.
1998
1999         * rendering/RenderEmbeddedObject.cpp:
2000         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
2001         * rendering/RenderEmbeddedObject.h:
2002         Add InsecurePluginVersion unavailability reason.
2003
2004 2012-05-10  Eric Seidel  <eric@webkit.org>
2005
2006         Make IFRAME_SEAMLESS child documents inherit styles from their parent iframe element
2007         https://bugs.webkit.org/show_bug.cgi?id=85940
2008
2009         Reviewed by Ojan Vafai.
2010
2011         The HTML5 <iframe seamless> spec says:
2012         In a CSS-supporting user agent: the user agent must, for the purpose of CSS property
2013         inheritance only, treat the root element of the active document of the iframe
2014         element's nested browsing context as being a child of the iframe element.
2015         (Thus inherited properties on the root element of the document in the
2016         iframe will inherit the computed values of those properties on the iframe
2017         element instead of taking their initial values.)
2018
2019         Initially I implemented this support to the letter of the spec. However, doing so I learned
2020         that WebKit has a RenderStyle for the Document Node, not just the root element of the document.
2021         In this RenderStyle on the Document, we add a bunch of per-document styles from settings
2022         including designMode.
2023
2024         This change makes StyleResolver::styleForDocument inherit style from the parent iframe's
2025         style, before applying any of these per-document styles.  This may or may not be correct
2026         depending on what behavior we want for rtl-ordering, page-zoom, locale, design mode, etc.
2027         For now, we continue to treat the iframe's document as independent in these regards, and
2028         the settings on that document override those inherited from the iframe.
2029
2030         Also, intially when making this work, I added redirects in recalcStyle and scheduleStyleRecalc
2031         from the child document to the parent document in the case of seamless (since the parent
2032         document effectively manages the style resolve and layout of the child in seamless mode).
2033         However, I was not able to find a test which depended on this code change, so in this final patch
2034         I have removed both of these modifications and replaced them with FIXMEs.  Based on discussions
2035         with Ojan and James Robinson, I believe both of those changes may eventually be wanted.
2036
2037         This change basically does 3 things:
2038         1.  Makes StyleResolver::styleForDocument inherit from the parent iframe.
2039         2.  Makes any recalcStyle calls on the iframe propogate down into the child document (HTMLIFrameElement::didRecalcStyle).
2040         3.  Makes Document::recalcStyle aware of the fact that the Document's style *can* change
2041             for reasons other than recalcStyle(Force).
2042
2043         I'm open to more testing suggestions, if reviewers have settings on the Document's style
2044         that you want to make sure we inherit from the parent iframe, or don't inherit, etc.
2045         I view this as a complete solution to this aspect of the current <iframe seamless> spec,
2046         but likely not the last code we will write for this aspect of the seamless feature. :)
2047
2048         Tested by fast/frames/seamlesss/seamless-css-cascade.html and seamless-designMode.html
2049
2050         * css/StyleResolver.cpp:
2051         (WebCore::StyleResolver::collectMatchingRulesForList):
2052         * dom/Document.cpp:
2053         (WebCore::Document::scheduleStyleRecalc):
2054         (WebCore::Document::recalcStyle):
2055         * html/HTMLIFrameElement.cpp:
2056         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2057         (WebCore::HTMLIFrameElement::didRecalcStyle):
2058         (WebCore):
2059         * html/HTMLIFrameElement.h:
2060         (HTMLIFrameElement):
2061
2062 2012-05-10  Julien Chaffraix  <jchaffraix@webkit.org>
2063
2064         Crash in computedCSSPadding* functions due to RenderImage::imageDimensionsChanged called during attachment
2065         https://bugs.webkit.org/show_bug.cgi?id=85912
2066
2067         Reviewed by Eric Seidel.
2068
2069         Tests: fast/images/link-body-content-imageDimensionChanged-crash.html
2070                fast/images/script-counter-imageDimensionChanged-crash.html
2071
2072         The bug comes from CSS generated images that could end up calling imageDimensionsChanged during attachment. As the
2073         rest of the code (e.g. computedCSSPadding*) would assumes that we are already inserted in the tree, we would crash.
2074
2075         The solution is to bail out in this case as newly inserted RenderObject will trigger layout later on and properly
2076         handle what we would be doing as part of imageDimensionChanged (the only exception being updating our intrinsic
2077         size which should be done as part of imageDimensionsChanged).
2078
2079         * rendering/RenderImage.cpp:
2080         (WebCore::RenderImage::imageDimensionsChanged):
2081
2082 2012-05-10  Adam Barth  <abarth@webkit.org>
2083
2084         ASSERT in BidiResolver<Iterator, Run>::commitExplicitEmbedding makes running debug builds annoying
2085         https://bugs.webkit.org/show_bug.cgi?id=86140
2086
2087         Reviewed by Eric Seidel.
2088
2089         The correct fix here is to resolve
2090         https://bugs.webkit.org/show_bug.cgi?id=76574, but in the mean time,
2091         this ASSERT is annoying.
2092
2093         * platform/text/BidiResolver.h:
2094         (WebCore::::commitExplicitEmbedding):
2095
2096 2012-05-10  Mark Pilgrim  <pilgrim@chromium.org>
2097
2098         [Chromium] Call addTraceEvent and getTraceCategoryEnabledFlag directly
2099         https://bugs.webkit.org/show_bug.cgi?id=85399
2100
2101         Reviewed by Adam Barth.
2102
2103         Part of a refactoring series. See tracking bug 82948.
2104
2105         * CMakeLists.txt:
2106         * GNUmakefile.list.am:
2107         * Target.pri:
2108         * WebCore.gypi:
2109         * WebCore.vcproj/WebCore.vcproj:
2110         * WebCore.xcodeproj/project.pbxproj:
2111         * platform/EventTracer.cpp: Added.
2112         (WebCore):
2113         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
2114         (WebCore::EventTracer::addTraceEvent):
2115         * platform/EventTracer.h: Added.
2116         (WebCore):
2117         (EventTracer):
2118         * platform/chromium/EventTracerChromium.cpp: Added.
2119         (WebCore):
2120         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
2121         (WebCore::EventTracer::addTraceEvent):
2122         * platform/chromium/PlatformSupport.h:
2123         * platform/chromium/TraceEvent.h:
2124
2125 2012-05-10  Adam Barth  <abarth@webkit.org>
2126
2127         ScrollView::fixedVisibleContentRect should be public
2128         https://bugs.webkit.org/show_bug.cgi?id=86147
2129
2130         Reviewed by Eric Seidel.
2131
2132         Some code in the WebKit layer of OS(ANDROID) uses this function. That
2133         could will be upstreamed in a later patch. For now, this patch just
2134         makes this function public so that we remove the diff to this file.
2135
2136         * platform/ScrollView.h:
2137         (WebCore::ScrollView::fixedVisibleContentRect):
2138         (WebCore::ScrollView::delegatesScrollingDidChange):
2139
2140 2012-05-10  Anders Carlsson  <andersca@apple.com>
2141
2142         Rename the missing plug-in indicator to the unavailable plug-in indicator
2143         https://bugs.webkit.org/show_bug.cgi?id=86136
2144
2145         Reviewed by Sam Weinig.
2146
2147         Since the indicator is shown for more than just missing plug-ins, generalize it and use a plug-in unavailability
2148         reason enum to make it easier to extend. Also, pass the unavailability reason to the ChromeClient member functions.
2149
2150         * WebCore.exp.in:
2151         * html/HTMLEmbedElement.cpp:
2152         (WebCore::HTMLEmbedElement::updateWidget):
2153         * html/HTMLObjectElement.cpp:
2154         (WebCore::HTMLObjectElement::updateWidget):
2155         * html/HTMLPlugInElement.cpp:
2156         (WebCore::HTMLPlugInElement::defaultEventHandler):
2157         * html/HTMLPlugInImageElement.cpp:
2158         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
2159         * loader/SubframeLoader.cpp:
2160         (WebCore::SubframeLoader::loadPlugin):
2161         * page/ChromeClient.h:
2162         (WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
2163         (WebCore::ChromeClient::unavailablePluginButtonClicked):
2164         * page/FrameView.cpp:
2165         (WebCore::FrameView::updateWidget):
2166         * rendering/RenderEmbeddedObject.cpp:
2167         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
2168         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
2169         (WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
2170         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
2171         (WebCore::RenderEmbeddedObject::paint):
2172         (WebCore::RenderEmbeddedObject::paintReplaced):
2173         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2174         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
2175         (WebCore):
2176         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2177         (WebCore::shouldUnavailablePluginMessageBeButton):
2178         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2179         (WebCore::RenderEmbeddedObject::getCursor):
2180         * rendering/RenderEmbeddedObject.h:
2181         (RenderEmbeddedObject):
2182
2183 2012-05-10  Brady Eidson  <beidson@apple.com>
2184
2185         <rdar://problem/10972577> and https://bugs.webkit.org/show_bug.cgi?id=80170
2186         Contents of noscript elements turned into strings in WebArchives
2187
2188         Reviewed by Andy Estes.
2189
2190         There's a much deeper question about how innerHTML of <noscript> is expected to work in 
2191         both a scripting and non-scripting environment that we should pursue separately.
2192
2193         But for webarchives, we can solve this by filtering out the <noscript> elements completely 
2194         if scripting is enabled.
2195
2196         Test: webarchive/ignore-noscript-if-scripting-enabled.html
2197
2198         * WebCore.exp.in:
2199
2200         Add arguments to createMarkup and MarkupAccumulator methods to pass a Vector of QualifiedNames
2201         that should be filtered from the resulting markup:
2202         * editing/MarkupAccumulator.cpp:
2203         (WebCore::MarkupAccumulator::serializeNodes):
2204         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
2205         * editing/MarkupAccumulator.h:
2206         * editing/markup.cpp:
2207         (WebCore::createMarkup):
2208         * editing/markup.h:
2209
2210         If scripting is enabled, add the noscriptTag to the tag names to filter:
2211         * loader/archive/cf/LegacyWebArchive.cpp:
2212         (WebCore::LegacyWebArchive::create):
2213
2214 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2215
2216         Crash due to floats not removed from first-letter element.
2217         https://bugs.webkit.org/show_bug.cgi?id=86019
2218
2219         Reviewed by Julien Chaffraix.
2220
2221         Move clearing logic of a floating/positioned object from removeChild
2222         to removeChildNode. There are lot of places which use removeChildNode
2223         directly and hence the object is not removed from the floating or
2224         positioned objects list.
2225
2226         Test: fast/block/float/float-not-removed-from-first-letter.html
2227
2228         * rendering/RenderObject.cpp:
2229         (WebCore::RenderObject::removeChild):
2230         * rendering/RenderObjectChildList.cpp:
2231         (WebCore::RenderObjectChildList::removeChildNode):
2232
2233 2012-05-10  Andreas Kling  <kling@webkit.org>
2234
2235         Remove empty ElementAttributeData destructor.
2236         <http://webkit.org/b/86126>
2237
2238         Reviewed by Antti Koivisto.
2239
2240         * dom/ElementAttributeData.cpp:
2241         * dom/ElementAttributeData.h:
2242
2243 2012-05-10  Yury Semikhatsky  <yurys@chromium.org>
2244
2245         Web Inspector: heap snapshot comparison view is broken
2246         https://bugs.webkit.org/show_bug.cgi?id=86102
2247
2248         Reviewed by Pavel Feldman.
2249
2250         Pass HeapSnapshotProxy instead of undefined to the profile load callback. Added
2251         compiler annotations to avoid such errors in the future.
2252
2253         * inspector/front-end/HeapSnapshotView.js:
2254
2255 2012-05-10  Zan Dobersek  <zandobersek@gmail.com>
2256
2257         [GTK] ENABLE_IFRAME_SEAMLESS support
2258         https://bugs.webkit.org/show_bug.cgi?id=85843
2259
2260         Reviewed by Eric Seidel.
2261
2262         Export the ENABLE_IFRAME_SEAMLESS feature define when the feature is
2263         enabled.
2264
2265         No new tests - all the related tests should now be passing.
2266
2267         * GNUmakefile.am:
2268
2269 2012-05-10  Antti Koivisto  <antti@apple.com>
2270
2271         Inline Node::traverseNextNode
2272         https://bugs.webkit.org/show_bug.cgi?id=85844
2273
2274         Reviewed by Ryosuke Niwa.
2275         
2276         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
2277         for many hot loops.
2278
2279         In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.
2280         
2281         Performance bots will tell if this was worthwhile.
2282
2283         * dom/ContainerNode.h:
2284         (WebCore::Node::traverseNextNode):
2285         (WebCore):
2286         (WebCore::Node::traverseNextSibling):
2287         * dom/Node.cpp:
2288         (WebCore::Node::traverseNextAncestorSibling):
2289         * dom/Node.h:
2290         (Node):
2291
2292 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
2293
2294         MediaStream API: Fix MediaHints parsing
2295         https://bugs.webkit.org/show_bug.cgi?id=86098
2296
2297         Reviewed by Adam Barth.
2298
2299         Not currently testable. Working on a series of patches that will fix that.
2300
2301         * Modules/mediastream/PeerConnection00.cpp:
2302         (WebCore::PeerConnection00::createMediaHints):
2303
2304 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
2305
2306         [chromium] MediaStream API: Fix the ExtraData functionality in WebMediaStreamDescriptor
2307         https://bugs.webkit.org/show_bug.cgi?id=86087
2308
2309         Reviewed by Adam Barth.
2310
2311         Not easy to test but I have added code that excercises this to WebUserMediaClientMock (in DumpRenderTree).
2312
2313         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2314         (WebKit::WebMediaStreamDescriptor::setExtraData):
2315
2316 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
2317
2318         Web Inspector: search title is shown beside the search field (not under) in the vertical mode.
2319         https://bugs.webkit.org/show_bug.cgi?id=86120
2320
2321         Reviewed by Yury Semikhatsky.
2322
2323         This change makes search title render as placeholder at all times.
2324         It also adjusts the size of the search field when navigation arrows appear.
2325
2326         * inspector/front-end/SearchController.js:
2327         (WebInspector.SearchController):
2328         (WebInspector.SearchController.prototype.updateSearchLabel):
2329         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
2330         (WebInspector.SearchController.prototype._createSearchNavigationButton):
2331         * inspector/front-end/inspector.css:
2332         (#toolbar-search-item):
2333         (.with-navigation-buttons #search):
2334         (.toolbar-search-navigation-label):
2335         (.with-navigation-buttons .toolbar-search-navigation-label):
2336         * inspector/front-end/inspector.html:
2337
2338 2012-05-10  Varun Jain  <varunjain@google.com>
2339
2340         [chromium] Trigger context menu for long press gesture
2341         https://bugs.webkit.org/show_bug.cgi?id=85919
2342
2343         Reviewed by Adam Barth.
2344
2345         Test: fast/events/touch/gesture/context-menu-on-long-press.html
2346
2347         * page/EventHandler.cpp:
2348         (WebCore):
2349         (WebCore::EventHandler::sendContextMenuEventForGesture):
2350         * page/EventHandler.h:
2351         (EventHandler):
2352
2353 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2354
2355         Crash in ApplyStyleCommand::joinChildTextNodes.
2356         https://bugs.webkit.org/show_bug.cgi?id=85939
2357
2358         Reviewed by Ryosuke Niwa.
2359
2360         Test: editing/style/apply-style-join-child-text-nodes-crash.html
2361
2362         * editing/ApplyStyleCommand.cpp:
2363         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): add conditions
2364         to bail out if our start and end position nodes are removed due to 
2365         mutation events in joinChildTextNodes.
2366         (WebCore::ApplyStyleCommand::applyInlineStyle): this executes after
2367         applyRelativeFontStyleChange in ApplyStyleCommand::doApply. So, need
2368         to bail out if our start and end position nodes are removed due to
2369         mutation events.
2370         (WebCore::ApplyStyleCommand::joinChildTextNodes): hold all the children
2371         in a ref vector to prevent them from getting destroyed due to mutation events.
2372
2373 2012-05-10  Erik Arvidsson  <arv@chromium.org>
2374
2375         Unreviewed, rebaselined run-bindings-tests results.
2376
2377         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2378         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
2379         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
2380         * bindings/scripts/test/JS/JSTestObj.cpp:
2381         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
2382         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
2383         * bindings/scripts/test/V8/V8TestException.cpp:
2384         (WebCore::V8TestException::wrapSlow):
2385         * bindings/scripts/test/V8/V8TestException.h:
2386         (WebCore::V8TestException::wrap):
2387
2388 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2389
2390         Crash in InsertParagraphSeparatorCommand::doApply.
2391         https://bugs.webkit.org/show_bug.cgi?id=84995
2392
2393         Reviewed by Ryosuke Niwa.
2394
2395         Test: editing/inserting/insert-paragraph-seperator-crash.html
2396
2397         * editing/DeleteSelectionCommand.cpp:
2398         (WebCore::DeleteSelectionCommand::mergeParagraphs): no need of static cast, since
2399         type of enclosingBlock returned is already Element*.
2400         * editing/IndentOutdentCommand.cpp:
2401         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): no need of static cast, since
2402         type of enclosingBlock returned is already Element*.
2403         * editing/InsertParagraphSeparatorCommand.cpp:
2404         (WebCore::InsertParagraphSeparatorCommand::doApply): RefPtr startBlock to guard against
2405         mutation events.
2406         * editing/htmlediting.cpp:
2407         (WebCore::enclosingBlock): make sure type of enclosingNode is an element before doing
2408         the static cast. This was already failing in a couple of layout tests. Also, isBlock
2409         check already exists in the function call to enclosingNodeOfType, so don't need it
2410         again on enclosingNode's renderer.
2411         * editing/htmlediting.h: 
2412         (WebCore):
2413
2414 2012-05-10  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2415
2416         TouchAdjustment doesn't correct for scroll-offsets.
2417         https://bugs.webkit.org/show_bug.cgi?id=86083
2418
2419         Reviewed by Kenneth Rohde Christiansen.
2420
2421         Already tested by: touchadjustment/scroll-delegation
2422
2423         * page/EventHandler.cpp:
2424         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
2425         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
2426         * page/TouchAdjustment.cpp:
2427         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
2428         * testing/Internals.cpp:
2429         (WebCore::Internals::bestZoomableAreaForTouchPoint):
2430
2431 2012-05-10  Konrad Piascik  <kpiascik@rim.com>
2432
2433         Fix typo in filename
2434         https://bugs.webkit.org/show_bug.cgi?id=86095
2435
2436         Reviewed by Andreas Kling.
2437
2438         * UseJSC.cmake:
2439
2440 2012-05-10  Stephen Chenney  <schenney@chromium.org>
2441
2442         SVG Filters allow invalid elements as children
2443         https://bugs.webkit.org/show_bug.cgi?id=83979
2444
2445         Reviewed by Nikolas Zimmermann.
2446
2447         According to the SVG spec, there are numerous restrictions on the
2448         content of nodes (that is, their children). Specific to this problem,
2449         SVGFilter elements may only contain SVGFilterPrimitive elements, and
2450         those may only contain animation related elements. This patch enforces
2451         the restriction on filters in the render tree, thus preventing us from
2452         having (for instance) content that is inside a filter yet filtered by
2453         the filter.
2454
2455         Manual test: ManualTests/bugzilla-83979.svg
2456
2457         * svg/SVGFilterElement.cpp:
2458         (WebCore::SVGFilterElement::childShouldCreateRenderer): Added to only allow renderers for fe* children
2459         (WebCore):
2460         * svg/SVGFilterElement.h:
2461         (SVGFilterElement):
2462         * svg/SVGFilterPrimitiveStandardAttributes.h: Do not allow any children at all for fe* elements.
2463         (SVGFilterPrimitiveStandardAttributes):
2464
2465 2012-05-10  Joe Thomas  <joethomas@motorola.com>
2466
2467         [CSS3 Backgrounds and Borders] Add background-size to the background shorthand
2468         https://bugs.webkit.org/show_bug.cgi?id=27577
2469
2470         Reviewed by Alexis Menard.
2471
2472         Added CSSPropertyBackgroundSize to the background shorthand propery. Added the logic for parsing background-size.
2473         bakground-size appears after background-position followed by a '/'.
2474         The specification related to this change is http://www.w3.org/TR/css3-background/#the-background
2475
2476         Tests: fast/backgrounds/background-shorthand-with-backgroundSize-style.html
2477                fast/backgrounds/size/backgroundSize-in-background-shorthand.html
2478
2479         * css/CSSComputedStyleDeclaration.cpp:
2480         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2481         (WebCore::CSSComputedStyleDeclaration::getBackgroundShorthandValue):
2482         (WebCore):
2483         * css/CSSComputedStyleDeclaration.h:
2484         (CSSComputedStyleDeclaration):
2485         * css/CSSParser.cpp:
2486         (WebCore::CSSParser::parseValue):
2487         (WebCore::CSSParser::parseFillShorthand):
2488         * css/StylePropertySet.cpp:
2489         (WebCore::StylePropertySet::getLayeredShorthandValue):
2490         * css/StylePropertyShorthand.cpp:
2491         (WebCore):
2492         (WebCore::backgroundShorthand):
2493
2494 2012-05-10  MORITA Hajime <morrita@google.com>
2495
2496         Node::InDetachFlag could be removed.
2497         https://bugs.webkit.org/show_bug.cgi?id=85963
2498
2499         Reviewed by Antti Koivisto.
2500
2501         Removed Node::inDetach() since it can never true
2502         on the only call site setFocusedNode().
2503
2504         No new test. Covered by existing tests.
2505
2506         * dom/Document.cpp:
2507         (WebCore::Document::setFocusedNode):
2508         * dom/Node.cpp:
2509         (WebCore::Node::detach):
2510         * dom/Node.h:
2511         (WebCore):
2512         (Node):
2513
2514 2012-05-10  Keishi Hattori  <keishi@webkit.org>
2515
2516         Crash in HTMLFormControlElement::m_fieldSetAncestor
2517         https://bugs.webkit.org/show_bug.cgi?id=86070
2518
2519         Reviewed by Kent Tamura.
2520
2521         No new tests.
2522
2523         The previous patch r115990 didn't completely resolve the crash (Bug 85453)
2524         We don't have a reproducible test case, so we are reverting to the old code for setting m_fieldSetAncestor.
2525
2526         * html/HTMLFormControlElement.cpp:
2527         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2528         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
2529         (WebCore::HTMLFormControlElement::insertedInto): Set m_dataListAncestorState to Unknown because ancestor has changed. Call setNeedsWillValidateCheck because style might need to be updated.
2530         (WebCore::HTMLFormControlElement::removedFrom):
2531         (WebCore::HTMLFormControlElement::disabled):
2532         (WebCore::HTMLFormControlElement::recalcWillValidate):
2533         (WebCore::HTMLFormControlElement::willValidate):
2534         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
2535         * html/HTMLFormControlElement.h:
2536         (HTMLFormControlElement): Added m_dataListAncestorState.
2537
2538 2012-05-10  Sam D  <dsam2912@gmail.com>
2539
2540         Web Inspector: rename InspectorBackendStub.js to InspectorBackendCommands.js
2541         https://bugs.webkit.org/show_bug.cgi?id=72306
2542
2543         Changed name for InspectorBackendStub.js to
2544         InspectorBackendCommands.js
2545
2546         Reviewed by Yury Semikhatsky.
2547
2548         No new tests required. File name is changed.
2549
2550         * DerivedSources.pri:
2551         * GNUmakefile.am:
2552         * Target.pri:
2553         * WebCore.gyp/WebCore.gyp:
2554         * WebCore.gypi:
2555         * WebCore.vcproj/copyWebCoreResourceFiles.cmd:
2556         * WebCore.xcodeproj/project.pbxproj:
2557         * gyp/copy-inspector-resources.sh:
2558         * inspector/CodeGeneratorInspector.py:
2559         * inspector/front-end/InspectorBackendCommands.qrc: Added.
2560         * inspector/front-end/InspectorBackendStub.qrc: Removed.
2561         * inspector/front-end/inspector.html:
2562
2563 2012-05-10  Alexis Menard  <alexis.menard@openbossa.org>
2564
2565         [Qt] Avoid string conversions to construct a QUrl when using Qt5.
2566         https://bugs.webkit.org/show_bug.cgi?id=86006
2567
2568         Reviewed by Kenneth Rohde Christiansen.
2569
2570         In Qt5, the QUrl constructor can handle the string directly, even in UTF-16 because the
2571         constructor QUrl(QString) has been fixed. Unfortunately we still need to use the old
2572         code path when building with Qt4.
2573
2574         No new tests : it's a performance improvement which should be covered by tests.
2575
2576         * platform/qt/KURLQt.cpp:
2577         (WebCore::KURL::operator QUrl):
2578
2579 2012-05-10  Noel Gordon  <noel.gordon@gmail.com>
2580
2581         [chromium] REGRESSION(r107389) Visible line artifacts on some JPEG images
2582         https://bugs.webkit.org/show_bug.cgi?id=85772
2583
2584         Reviewed by Kent Tamura.
2585
2586         On some JPEG images, vertical and horizontal lines artifacts might appear in image
2587         regions with very high frequency color variation when using DCT_IFAST decodes. Use
2588         DCT_IFAST on small screen devices only (Chromium Android).
2589
2590         No new tests. Covered by existing tests.
2591
2592         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2593         (dctMethod): Permit DCT_IFAST decoding for Chromium Android only.
2594
2595 2012-05-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2596
2597         [Qt] Implement fit-to-width behaviour
2598         https://bugs.webkit.org/show_bug.cgi?id=86085
2599
2600         Reviewed by Simon Hausmann.
2601
2602         Add a method to get the minimum scale factor that contains the content
2603         without showing any chrome background.
2604
2605         * dom/ViewportArguments.cpp:
2606         (WebCore::computeMinimumScaleFactorForContentContained):
2607         (WebCore):
2608         * dom/ViewportArguments.h:
2609         (WebCore):
2610
2611 2012-05-10  MORITA Hajime  <morrita@google.com>
2612
2613         Remove support for Node::willRemove()
2614         https://bugs.webkit.org/show_bug.cgi?id=55209
2615
2616         Reviewed by Ryosuke Niwa.
2617
2618         This change de-virtualizes Node::willRemove(), gains
2619         5% speedup on Dromaeo dom-modify.
2620
2621         Originally there were 5 willRemove() overrides:
2622         - Element
2623         - HTMLStyleElement
2624         - HTMLSourceElement
2625         - HTMLTrackElement
2626         - HTMLFrameOwnerElement
2627
2628         For first 4 items, this change moves their implementations to
2629         Node::removedFrom() overrides.
2630
2631         Then HTMLFrameOwnerElement is the only class which needs the
2632         notification.  Because it emits the "unload" event, it needs some
2633         notification _before_ its removal. To handle that, this change
2634         introduces ChildFrameDisconnector which collects
2635         corresponding decendant elements and disconnect their content frame.
2636
2637         Even though this approach doesn't kill pre-removal tree traversal
2638         completely, it's a bit more efficient due to the de-virtualization.
2639
2640         No new tests. Covered by existing test.
2641
2642         * dom/ContainerNode.cpp:
2643         (WebCore::willRemoveChild): Replaced willRemove() call with ChildFrameDisconnector.
2644         (WebCore::willRemoveChildren): Ditto.
2645         (WebCore::ContainerNode::disconnectDescendantFrames): Added. Used from FrameLoader to replace Document::willRemove() call.
2646         (WebCore):
2647         * dom/ContainerNode.h:
2648         (ContainerNode):
2649         * dom/ContainerNodeAlgorithms.cpp:
2650         (WebCore::ChildFrameDisconnector::collectDescendant):
2651         (WebCore):
2652         (WebCore::ChildFrameDisconnector::Target::disconnect):
2653         * dom/ContainerNodeAlgorithms.h:
2654         (ChildFrameDisconnector):
2655         (Target):
2656         (WebCore::ChildFrameDisconnector::Target::Target):
2657         (WebCore::ChildFrameDisconnector::Target::isValid):
2658         (WebCore):
2659         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
2660         (WebCore::ChildFrameDisconnector::collectDescendant):
2661         (WebCore::ChildFrameDisconnector::disconnect):
2662         * dom/Element.cpp:
2663         (WebCore::Element::removedFrom):
2664         * dom/Element.h:
2665         * dom/ElementShadow.cpp:
2666         * dom/ElementShadow.h:
2667         (ElementShadow):
2668         * dom/Node.cpp:
2669         * dom/Node.h: Added IsFrameOwnerElement flag to de-virtualize IsFrameOwnerElement().
2670         (WebCore::Node::isFrameOwnerElement): De-virtualized.
2671         (Node):
2672         * html/HTMLElement.h:
2673         (HTMLElement):
2674         (WebCore::HTMLElement::HTMLElement):
2675         * html/HTMLFrameOwnerElement.cpp:
2676         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
2677         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Extracted from original willRemove().
2678         * html/HTMLFrameOwnerElement.h:
2679         (HTMLFrameOwnerElement):
2680         (WebCore::toFrameOwnerElement):
2681         (WebCore):
2682         * html/HTMLMediaElement.cpp:
2683         (WebCore::HTMLMediaElement::sourceWasRemoved): Renamed from sourceWillBeRemoved(), dealing with the timing change.
2684         * html/HTMLMediaElement.h:
2685         (HTMLMediaElement):
2686         (WebCore::isMediaElement):
2687         (WebCore):
2688         (WebCore::toMediaElement):
2689         * html/HTMLSourceElement.cpp:
2690         (WebCore::HTMLSourceElement::removedFrom): Moved some code from willRemove().
2691         * html/HTMLSourceElement.h:
2692         (HTMLSourceElement):
2693         * html/HTMLStyleElement.cpp:
2694         (WebCore::HTMLStyleElement::removedFrom):
2695         (WebCore):
2696         * html/HTMLStyleElement.h:
2697         (HTMLStyleElement):
2698         * html/HTMLTrackElement.cpp:
2699         (WebCore::HTMLTrackElement::removedFrom): Moved some code from willRemove().
2700         * html/HTMLTrackElement.h:
2701         (HTMLTrackElement):
2702         * loader/FrameLoader.cpp:
2703         (WebCore::FrameLoader::clear):
2704
2705 2012-05-10  Kinuko Yasuda  <kinuko@chromium.org>
2706
2707         Change the return type of Entry.toURL() back to String from KURL
2708         https://bugs.webkit.org/show_bug.cgi?id=85858
2709
2710         Reviewed by Ryosuke Niwa.
2711
2712         I once changed it from String to KURL in r116273 but it turned out that
2713         it involves implicit conversion and may incur extra overhead.
2714         This partly reverts r116273 while keeping some internal functions
2715         returning KURL as it's what we initially create as and is more
2716         convenient to operate on.
2717
2718         No new tests; no functional or visible changes.
2719
2720         * Modules/filesystem/EntryBase.cpp:
2721         (WebCore::EntryBase::toURL):
2722         * Modules/filesystem/EntryBase.h:
2723         (EntryBase):
2724
2725 2012-05-10  Alexander Pavlov  <apavlov@chromium.org>
2726
2727         Web Inspector: Autocomplete for CSS property values in the Styles pane behaving incorrectly
2728         https://bugs.webkit.org/show_bug.cgi?id=85784
2729
2730         Reviewed by Vsevolod Vlasov.
2731
2732         Before executing the number increment/decrement within CSS property value, the current word is checked
2733         for being a valid suggestion for the current property, and if it is, the numeric change is skipped
2734         in favor of the suggested property value switch by a suggest box.
2735
2736         * inspector/front-end/StylesSidebarPane.js:
2737
2738 2012-05-10  Abhishek Arya  <inferno@chromium.org>
2739
2740         Make DOMCharacterDataModified a scoped event (similar to r73690).
2741         https://bugs.webkit.org/show_bug.cgi?id=85920
2742
2743         Reviewed by Ryosuke Niwa.
2744
2745         DOMCharacterDataModified was missing in the list of already scoped
2746         DOM mutation events like DOMSubtreeModified, DOMNodeInserted, etc.
2747         It helps to delay event dispatches until the completion of each call
2748         of EditCommand::doApply. This has been useful in the past and helped to 
2749         prevent unexpected DOM tree mutations while the editing command is executing.
2750
2751         * dom/CharacterData.cpp:
2752         (WebCore::CharacterData::dispatchModifiedEvent):
2753
2754 2012-05-10  Alexandre Elias  <aelias@google.com>
2755
2756         Default to null value for HistoryItem::m_pageScaleFactor
2757         https://bugs.webkit.org/show_bug.cgi?id=84385
2758
2759         Reviewed by Adam Barth.
2760
2761         Previously, HistoryItem::m_pageScaleFactor defaulted to a value
2762         of 1, making it impossible to determine whether this value was never
2763         set, or intentionally set to 1.  This patch introduces a default value
2764         of 0 and makes restoreScrollPositionAndViewState not touch the page
2765         scale factor if this value is still present at time of reload.
2766
2767         This is a no-op change for common navigation scenarios.  The
2768         motivation for this change is the corner case of syncing history items
2769         from a desktop browser to a mobile device.  In that case, we need a
2770         way to specify that the history item does not contain a
2771         pageScaleFactor so that the mobile device does not display the page
2772         overly zoomed in.
2773
2774         No new tests.
2775
2776         * history/HistoryItem.cpp:
2777         (WebCore::HistoryItem::HistoryItem):
2778         * loader/HistoryController.cpp:
2779         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2780
2781 2012-05-10  Csaba Osztrogonác  <ossy@webkit.org>
2782
2783         Use suitable viewport values when a Mobile DTD is used.
2784         https://bugs.webkit.org/show_bug.cgi?id=85425
2785
2786         Unreviewed debug buildfix after r116571.
2787
2788         * dom/Document.cpp:
2789         (WebCore::Document::setDocType):
2790
2791 2012-05-10  Yoshifumi Inoue  <yosin@chromium.org>
2792
2793         [Forms] Move step related methods to InputType class from HTMLInputElement class
2794         https://bugs.webkit.org/show_bug.cgi?id=85978
2795
2796         Reviewed by Kent Tamura.
2797
2798         This patch is part of re-factoring of HTMLInputElement.cpp for numeric input type.
2799         In this patch, we move implementation of getAllowedValueStep and stepUp/stepUpFromRenderer
2800         to InputType class because of these are for DateTime/Number/Range.
2801
2802         Following patches will change implementation of getAllowedValueStep to use StepRange and
2803         remove step related methods, defaultStep, stepScaleFactor, and so on.
2804
2805         No new tests. This patch should not change behavior.
2806
2807         * html/HTMLInputElement.cpp:
2808         (WebCore):
2809         (WebCore::HTMLInputElement::getAllowedValueStep):
2810         (WebCore::HTMLInputElement::stepUp):
2811         (WebCore::HTMLInputElement::stepDown):
2812         (WebCore::HTMLInputElement::stepUpFromRenderer):
2813         * html/HTMLInputElement.h:
2814         (HTMLInputElement):
2815         * html/InputType.cpp:
2816         (WebCore::InputType::applyStep):
2817         (WebCore):
2818         (WebCore::InputType::alignValueForStep):
2819         (WebCore::InputType::getAllowedValueStep):
2820         (WebCore::InputType::getAllowedValueStepWithDecimalPlaces):
2821         (WebCore::InputType::stepUp):
2822         (WebCore::InputType::stepUpFromRenderer):
2823         * html/InputType.h:
2824         (InputType):
2825
2826 2012-05-09  Kent Tamura  <tkent@chromium.org>
2827
2828         Calendar Picker: Fix a crash by changing input type.
2829         https://bugs.webkit.org/show_bug.cgi?id=86007
2830
2831         Reviewed by Hajime Morita.
2832
2833         Manual test: forms/calendar-picker-crash-by-type-change.html
2834
2835         * html/shadow/CalendarPickerElement.cpp:
2836         (WebCore::CalendarPickerElement::~CalendarPickerElement):
2837         Added. Make sure the popup is closed.
2838         * html/shadow/CalendarPickerElement.h:
2839         (CalendarPickerElement): Add declaration of the destructor.
2840
2841 2012-05-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2842
2843         Move suspendAnimations to use Internals interface.
2844         https://bugs.webkit.org/show_bug.cgi?id=85986
2845
2846         Reviewed by Ryosuke Niwa.
2847
2848         Add suspendAnimations functions, because it is able to work in the
2849         cross-port way through the Internals interface.
2850
2851         No new tests, since we are improving here the infra-structure for testing
2852         a specific method.
2853
2854         * testing/Internals.cpp:
2855         (WebCore::Internals::suspendAnimations):
2856         (WebCore):
2857         * testing/Internals.h:
2858         (Internals):
2859         * testing/Internals.idl:
2860
2861 2012-05-09  Charlie Reis  <creis@chromium.org>
2862
2863         Add dispatchMessageEventWithOriginCheck to DOMWindow
2864         https://bugs.webkit.org/show_bug.cgi?id=85815
2865
2866         Reviewed by Adam Barth.
2867
2868         Useful for ports that support cross-process postMessage.
2869         No new tests, since covered by existing postMessage tests.
2870
2871         * page/DOMWindow.cpp:
2872         (WebCore::DOMWindow::postMessageTimerFired):
2873         (WebCore):
2874         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2875         * page/DOMWindow.h:
2876         (WebCore):
2877         (DOMWindow):
2878
2879 2012-05-09  Jason Liu  <jason.liu@torchmobile.com.cn>
2880
2881         [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead.
2882         https://bugs.webkit.org/show_bug.cgi?id=85775
2883
2884         Reviewed by Rob Buis.
2885
2886         Make CookieParser::parseOneCookie handle (cookiename="cookievalue;expires=xxxx) correctly.
2887         This cookie's value is "cookievalue not "cookievalue;expires=xxxx.
2888
2889         Test: http/tests/cookies/single-quoted-value.html
2890
2891         * platform/blackberry/CookieParser.cpp:
2892         (WebCore::CookieParser::parseOneCookie):
2893
2894 2012-05-09  Raymond Liu  <raymond.liu@intel.com>
2895
2896         Add multi-channels support for CopyWithGainFrom in AudioBus
2897         https://bugs.webkit.org/show_bug.cgi?id=80675
2898
2899         Reviewed by Chris Rogers.
2900
2901         * platform/audio/AudioBus.cpp:
2902         (WebCore):
2903         (WebCore::AudioBus::AudioBus):
2904         (WebCore::AudioBus::copyWithGainFrom):
2905         * platform/audio/AudioBus.h:
2906         (AudioBus):
2907
2908 2012-05-09  Jessie Berlin  <jberlin@apple.com>
2909
2910         Crash using the new WKBundleDOMWindowExtensions APIs.
2911         https://bugs.webkit.org/show_bug.cgi?id=85888
2912
2913         Reviewed by Brady Eidson.
2914
2915         WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback was only being invoked when
2916         the WKPage was destroyed, and then only for the child frames. In addition, the
2917         DOMWindowExtension was holding onto a destroyed DOMWindow and attempting to unregister from
2918         when the WK2 wrapper object was attempting to destroy the DOMWindowExtension.
2919
2920         The underlying issue here was that the DOMWindowProperties were getting disconnectFrame
2921         and willDetachPage called on them at the wrong times.
2922
2923         Rename DOMWindowProperty::disconnectFrame and reconnectFrame to disconnectFrameForPageCache
2924         and reconnectFrameFromPageCache for clarity.
2925
2926         Only invoke DOMWindowProperty::disconnectFrameForPageCache when the frame is going into the
2927         page cache.
2928
2929         In the cases where the DOMWindow is getting destroyed, the frame is being destroyed, or the
2930         DOMWindow is getting cleared because the frame is being navigated, invoke
2931         DOMWindowProperty::willDestroyGlobalObjectInFrame instead of disconnectFrame.
2932
2933         Invoke DOMWindowProperty::willDetachGlobalObjectFromFrame when a document is being detached
2934         because the frame has been detached (e.g. fast/storage/storage-detached-iframe.html) and
2935         won't be immediately destroyed.
2936
2937         Invoke DOMWindowProperty::willDestroyGlobalObjectInCachedFrame when a cached frame is
2938         being destroyed.
2939
2940         New WK2 API Test: DOMWindowExtensionNoCache.
2941
2942         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2943         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache):
2944         Updated for disconnectFrame rename.
2945         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache):
2946         Updated for reconnectFrame rename.
2947         (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInCachedFrame):
2948         Get rid of the suspended IDBFactory.
2949         (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInFrame):
2950         Get rid of the IDBFactory.
2951         (WebCore::DOMWindowIndexedDatabase::willDetachGlobalObjectFromFrame):
2952         Ditto.
2953         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
2954
2955         * dom/Document.cpp:
2956         (WebCore::Document::prepareForDestruction):
2957         Tell the DOMWindow before detaching the Document.
2958         * dom/Document.h:
2959
2960         * history/CachedFrame.cpp:
2961         (WebCore::CachedFrame::destroy):
2962         Tell the DOMWindow.
2963
2964         * loader/FrameLoader.cpp:
2965         (WebCore::FrameLoader::clear):
2966         Use Document::prepareForDestruction so that the DOMWindow is told about the main frame
2967         navigation before detaching the Document.
2968
2969         * loader/appcache/DOMApplicationCache.cpp:
2970         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
2971         Updated for the disconnectFrame rename.
2972         (WebCore::DOMApplicationCache::reconnectFrameFromPageCache):
2973         Updated for the reconnectFrame rename.
2974         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
2975         Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
2976         called when the frame was destroyed).
2977         * loader/appcache/DOMApplicationCache.h:
2978
2979         * notifications/DOMWindowNotifications.cpp:
2980         (WebCore::DOMWindowNotifications::disconnectFrameForPageCache):
2981         Updated for the disconnectFrame rename.
2982         (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache):
2983         Updated for the reconnectFrame rename.
2984         (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInCachedFrame):
2985         Get rid of the suspended notification center.
2986         (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInFrame):
2987         Get rid of the notification center.
2988         (WebCore::DOMWindowNotifications::willDetachGlobalObjectFromFrame):
2989         Do not allow use of the notification center by detached frames.
2990         * notifications/DOMWindowNotifications.h:
2991
2992         * page/DOMWindow.cpp:
2993         (WebCore::DOMWindow::clearDOMWindowProperties):
2994         Do not call disconnectDOMWindowProperties. It is now the responsibility of the callers to
2995         tell the DOMWindowProperties the correct cause of being cleared.
2996         (WebCore::DOMWindow::~DOMWindow):
2997         Make sure the DOMWindowProperties still know that the DOMWindow is going away.
2998         (WebCore::DOMWindow::frameDestroyed):
2999         Invoke willDestroyGlobalObjectInFrame on the DOMWindowProperties.
3000         (WebCore::DOMWindow::willDetachPage):
3001         It is no longer necessary to tell the DOMWindowProperties anything here.
3002         (WebCore::DOMWindow::willDestroyCachedFrame):
3003         Tell the DOMWindowProperties.
3004         (WebCore::DOMWindow::willDestroyDocumentInFrame):
3005         Ditto.
3006         (WebCore::DOMWindow::willDetachDocumentFromFrame):
3007         Ditto.
3008         (WebCore::DOMWindow::clear):
3009         Ditto.
3010         (WebCore::DOMWindow::disconnectDOMWindowProperties):
3011         Updated for the disconnectFrame rename.
3012         (WebCore::DOMWindow::reconnectDOMWindowProperties):
3013         Ditto.
3014         * page/DOMWindow.h:
3015
3016         * page/DOMWindowExtension.cpp:
3017         (WebCore::DOMWindowExtension::DOMWindowExtension):
3018         Move the responsibility for tracking the disconnected DOMWindow to DOMWindowProperty, since
3019         DOMWindowProperty will need it to unregister the property when a cached frame is destroyed.
3020         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
3021         Remove the code to check for disconnectFrame being called twice - it is now only called when
3022         a frame goes into the page cache.
3023         Let the DOMWindowProperty keep track of the disconnected DOMWindow.
3024         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
3025         Let the DOMWindowProperty keep track of the disconnected DOMWindow.
3026         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
3027         Dispatch the willDestroyGlobalObjectForDOMWindowExtension callback.
3028         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
3029         Ditto, but only if the callback hasn't already been sent because the frame has been detached.
3030         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
3031         Send the callback because nothing interesting can be done in the frame once it has been
3032         detached.
3033         * page/DOMWindowExtension.h:
3034
3035         * page/DOMWindowProperty.cpp:
3036         (WebCore::DOMWindowProperty::DOMWindowProperty):
3037         Keep track of the disconnected DOMWindow so it can be used to unregister the property when a
3038         cached frame is destroyed.
3039         (WebCore::DOMWindowProperty::~DOMWindowProperty):
3040         Also unregister the property when a DOMWindowProperty for a cached frame is destroyed.
3041         (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
3042         Keep track of the disconnected DOMWindow.
3043         (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
3044         Ditto.
3045         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
3046         Unregister the property from the disconnected DOMWindow.
3047         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
3048         Unregister the property from the DOMWindow and stop keeping track of the frame.
3049         (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
3050         Do not set m_frame to 0 because detached frames still have access to the DOMWindow, even if
3051         they can't do anything meaningful with it.
3052         * page/DOMWindowProperty.h:
3053
3054         * page/Frame.cpp:
3055         (WebCore::Frame::setView):
3056         Tell the DOMWindow that the Document is being detached so it can tell the
3057         DOMWindowProperties.
3058
3059         * page/PointerLock.cpp:
3060         (WebCore::PointerLock::disconnectFrameForPageCache):
3061         Updated for disconnectFrame rename.
3062         (WebCore::PointerLock::willDestroyGlobalObjectInFrame):
3063         Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
3064         called when the frame was destroyed).
3065         * page/PointerLock.h:
3066
3067 2012-05-09  Ian Vollick  <vollick@chromium.org>
3068
3069         [chromium] Ensure animations get ticked at least once when added.
3070         https://bugs.webkit.org/show_bug.cgi?id=86013
3071
3072         Reviewed by James Robinson.
3073
3074         Tested in
3075           CCLayerTreeHostTestTickAnimationWhileBackgrounded.runSingleThreaded
3076           CCLayerTreeHostTestAddAnimationWithTimingFunction.runSingleThreaded
3077           CCLayerTreeHostTestSynchronizeAnimationStartTimes.runSingleThreaded
3078           CCLayerTreeHostTestAnimationFinishedEvents.runSingleThreaded
3079
3080         * platform/graphics/chromium/LayerChromium.cpp:
3081         (WebCore::LayerChromium::addAnimation):
3082         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3083         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
3084         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3085         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3086         (WebCore::CCLayerTreeHost::didAddAnimation):
3087         (WebCore):
3088         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3089         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3090         (CCLayerTreeHost):
3091         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3092         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3093         * platform/graphics/chromium/cc/CCProxy.h:
3094         (CCProxy):
3095         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3096         (CCSingleThreadProxyAnimationTimer):
3097         (WebCore::CCSingleThreadProxyAnimationTimer::create):
3098         (WebCore::CCSingleThreadProxyAnimationTimer::CCSingleThreadProxyAnimationTimer):
3099         (WebCore):
3100         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
3101         (WebCore::CCSingleThreadProxy::didAddAnimation):
3102         (WebCore::CCSingleThreadProxy::doComposite):
3103         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3104         (WebCore):
3105         * platform/graphics/chromium/cc/CCThreadProxy.h:
3106
3107 2012-05-09  Adam Barth  <abarth@webkit.org>
3108
3109         Implement HTML Media Capture
3110         https://bugs.webkit.org/show_bug.cgi?id=85958
3111
3112         Reviewed by Eric Seidel.
3113
3114         This patch begins the implementation of
3115         http://www.w3.org/TR/html-media-capture/ by adding the capture
3116         attribute to HTMLInputElement.
3117
3118         Test: fast/forms/file/file-input-capture.html
3119
3120         * html/FileInputType.cpp:
3121         (WebCore::FileInputType::handleDOMActivateEvent):
3122         * html/HTMLAttributeNames.in:
3123         * html/HTMLInputElement.cpp:
3124         (WebCore):
3125         (WebCore::HTMLInputElement::capture):
3126         (WebCore::HTMLInputElement::setCapture):
3127         * html/HTMLInputElement.h:
3128         (HTMLInputElement):
3129         * html/HTMLInputElement.idl:
3130         * platform/FileChooser.h:
3131         (FileChooserSettings):
3132
3133 2012-05-09  Charles Wei  <charles.wei@torchmobile.com.cn>
3134
3135         [BlackBerry]  Refactor data scheme support
3136         https://bugs.webkit.org/show_bug.cgi?id=85938
3137
3138         Reviewed by Rob Buis.
3139
3140         We will create a DataStream in our platform repository,
3141         so that can be wrapped up by NetworkJob for webkit rendering,
3142         and by DownloadStream for downloading.
3143
3144         Refactor, no new tests.
3145
3146         * platform/network/blackberry/NetworkJob.cpp:
3147         (WebCore::NetworkJob::NetworkJob):
3148         (WebCore::NetworkJob::initialize):
3149         (WebCore::NetworkJob::cancelJob):
3150         (WebCore::NetworkJob::sendResponseIfNeeded):
3151         * platform/network/blackberry/NetworkJob.h:
3152         (NetworkJob):
3153         * platform/network/blackberry/NetworkManager.cpp:
3154         (WebCore::NetworkManager::startJob):
3155
3156 2012-05-09  Dana Jansens  <danakj@chromium.org>
3157
3158         [chromium] Don't draw when canDraw() is false
3159         https://bugs.webkit.org/show_bug.cgi?id=85829
3160
3161         Reviewed by Adrienne Walker.
3162
3163         This is based on the work of Daniel Sievers in bug
3164         https://bugs.webkit.org/show_bug.cgi?id=82680. When canDraw() is false,
3165         we should not call drawLayers() or prepareToDraw() in both Single- and
3166         Multi-Threaded mode.
3167
3168         drawLayers() is crashing in single threaded mode, and this attempts to
3169         prevent it from being called with invalid state. While making it behave
3170         properly in single-threaded mode, it seems appropriate to unrevert the
3171         parts of 82680 that made threaded mode behave similarly appropriately.
3172
3173         A single-threaded test is not included since LTHTests is unable to run
3174         in single-threaded mode at this time (pending work from Ian Vollick). So
3175         we test in threaded mode only with a note to include a single thread
3176         version.
3177
3178         Tests: CCLayerTreeHostTestCanDrawBlocksDrawing.runMultiThread
3179
3180         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3181         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3182         (WebCore::CCLayerTreeHostImpl::drawLayers):
3183         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3184         (WebCore::CCSingleThreadProxy::doComposite):
3185         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3186         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3187
3188 2012-05-09  Martin Robinson  <mrobinson@igalia.com>
3189
3190         [Cairo] GLContextGLX releases the context with an uninitialized display
3191         https://bugs.webkit.org/show_bug.cgi?id=86039
3192
3193         Reviewed by Philippe Normand.
3194
3195         No new tests. This does not change behavior on most machines, but has
3196         the potential to prevent a pretty nasty crash on others.
3197
3198         Use the shared display to release GLX contexts instead of the uninitialized
3199         m_display member.
3200
3201         * platform/graphics/glx/GLContextGLX.cpp:
3202         (WebCore::GLContextGLX::~GLContextGLX): Release the display with the shared
3203         display.
3204         * platform/graphics/glx/GLContextGLX.h:
3205         (GLContextGLX): Remove the m_display member.
3206
3207 2012-05-09  Tony Gentilcore  <tonyg@chromium.org>
3208
3209         Subresources loaded after a reload completes shouldn't be revalidated.
3210         https://bugs.webkit.org/show_bug.cgi?id=84614
3211
3212         Based on patch by Darin Fisher.
3213
3214         Reviewed by Darin Fisher.
3215
3216         Tests: http/tests/cache/loaded-from-cache-after-reload-within-iframe.html
3217                http/tests/cache/loaded-from-cache-after-reload.html
3218
3219         * loader/FrameLoader.cpp:
3220         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Reset m_loadType after the load completes.
3221
3222 2012-05-09  Erik Arvidsson  <arv@chromium.org>
3223
3224         [V8] Fix issue where V8BindingPerContextData could keep the context object alive
3225         https://bugs.webkit.org/show_bug.cgi?id=86036
3226
3227         Reviewed by Kentaro Hara.
3228
3229         This is a partial revert of http://trac.webkit.org/changeset/114320/. This keeps
3230         the layout tests that were introduced since it turns out that
3231         http://trac.webkit.org/changeset/114989 fixes the tests too.
3232
3233         Covered by: http/tests/security/isolatedWorld/context-destroy.html
3234
3235         * bindings/v8/V8IsolatedContext.cpp:
3236         (WebCore::V8IsolatedContext::destroy):
3237
3238 2012-05-09  Anders Carlsson  <andersca@apple.com>
3239
3240         Speed up some parts of TileCache drawing
3241         https://bugs.webkit.org/show_bug.cgi?id=86033
3242         <rdar://problem/10919373>
3243
3244         Reviewed by Sam Weinig.
3245
3246         * platform/graphics/ca/mac/TileCache.mm:
3247         (WebCore::TileCache::tileCoverageRect):
3248         If we can't have scrollbars, there's not much need to extend the tile coverage rect outside of the visible rect, since it's
3249         unlikely that we'll do any form of scrolling here.
3250
3251         (WebCore::TileCache::revalidateTiles):
3252         Don't update the tile layer frame if it's big enough to contain the tile size. Also, if there are no new tiles created,
3253         don't call platformCALayerDidCreateTiles since that will trigger an extra layer flush.
3254
3255 2012-05-09  Alexandre Elias  <aelias@google.com>
3256
3257         setPageScaleFactor should setScrollPosition if scale is unchanged
3258         https://bugs.webkit.org/show_bug.cgi?id=84400
3259
3260         Reviewed by Adam Barth.
3261
3262         Previously, setPageScaleFactor forgot about its "origin" argument if
3263         the page scale factor is unchanged.  This has proven undesirable in
3264         practice because, for example, a single pinch gesture may zoom in and
3265         back out to the original page scale factor, but at a different scroll
3266         offset.
3267
3268         New test case added to scale-and-scroll-body-expected.txt
3269
3270         * page/Page.cpp:
3271         (WebCore::Page::setPageScaleFactor):
3272
3273 2012-05-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
3274
3275         Use suitable viewport values on XHTML-MP pages.
3276         https://bugs.webkit.org/show_bug.cgi?id=85425
3277
3278         Reviewed by Kenneth Rohde Christiansen.
3279
3280         Tests: fast/viewport/viewport-legacy-xhtmlmp-misplaced-doctype.html
3281                fast/viewport/viewport-legacy-xhtmlmp-ordering.html
3282                fast/viewport/viewport-legacy-xhtmlmp.html
3283
3284         Use device-width and device-height as viewport size on
3285         XHTML-MP pages if the use feature LEGACY_VIEWPORT_ADAPTION
3286         is set according as the non normative section of
3287         http://www.w3.org/TR/css-device-adapt/
3288
3289         * dom/Document.cpp:
3290         (WebCore::Document::setDocType):
3291
3292 2012-05-09  Beth Dakin  <bdakin@apple.com>
3293
3294         https://bugs.webkit.org/show_bug.cgi?id=86025
3295         RTL and vertical text documents do no scroll properly with the new 
3296         tiled scrolling model
3297         -and corresponding-
3298         <rdar://problem/11077589>
3299
3300         Reviewed by Dan Bernstein.
3301         
3302         Most of the fix here is just to teach the scrolling tree about the 
3303         scroll origin.
3304         * page/scrolling/ScrollingCoordinator.cpp:
3305         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
3306         (WebCore::ScrollingCoordinator::setScrollParameters):
3307         * page/scrolling/ScrollingCoordinator.h:
3308         (ScrollParameters):
3309         * page/scrolling/ScrollingTreeNode.cpp:
3310         (WebCore::ScrollingTreeNode::update):
3311         * page/scrolling/ScrollingTreeNode.h:
3312         (WebCore::ScrollingTreeNode::scrollOrigin):
3313         (ScrollingTreeNode):
3314         * page/scrolling/ScrollingTreeState.cpp:
3315         (WebCore::ScrollingTreeState::setScrollOrigin):
3316         (WebCore):
3317         * page/scrolling/ScrollingTreeState.h:
3318         (WebCore::ScrollingTreeState::scrollOrigin):
3319         (ScrollingTreeState):
3320         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
3321         (WebCore::ScrollingTreeNodeMac::scrollPosition):
3322         (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
3323         (WebCore::ScrollingTreeNodeMac::minimumScrollPosition):
3324         (WebCore::ScrollingTreeNodeMac::maximumScrollPosition):
3325         * rendering/RenderLayerCompositor.cpp:
3326         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3327
3328         Teaching the scrolling tree about the scroll origin revealed this pre-
3329         existing bug. layoutOverflowRect() is not the right rect to use since 
3330         it is not writing-mode savvy. unscaledDocumentRect() is the right rect 
3331         for the view's bounds.
3332         * rendering/RenderLayerBacking.cpp:
3333         (WebCore::RenderLayerBacking::updateCompositedBounds):
3334
3335 2012-05-09  Rob Buis  <rwlbuis@webkit.org>
3336
3337         Cleanup SVGElement.cpp
3338         https://bugs.webkit.org/show_bug.cgi?id=86004
3339
3340         Reviewed by Eric Seidel.
3341
3342         Remove unneeded includes. We do not need to check attr in SVGElement::attributeChanged,
3343         lower layers assume it is non-null and we do not call attributeChanged in SVG.
3344
3345         * svg/SVGElement.cpp:
3346         (WebCore::SVGElement::attributeChanged):
3347         (WebCore::SVGElement::isAnimatableAttribute):
3348
3349 2012-05-09  Jochen Eisinger  <jochen@chromium.org>
3350
3351         When creating a new page during a navigation, prime the initial document with the correct referrer policy
3352         https://bugs.webkit.org/show_bug.cgi?id=86001
3353
3354         Reviewed by Adam Barth.
3355
3356         Test: http/tests/security/referrer-policy-redirect-link.html
3357
3358         * dom/Document.h:
3359         (WebCore::Document::setReferrerPolicy):
3360         * loader/FrameLoader.cpp:
3361         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3362
3363 2012-05-09  Alec Flett  <alecflett@chromium.org>
3364
3365         IndexedDB: call abort handler when there are problems committing
3366         https://bugs.webkit.org/show_bug.cgi?id=85841
3367
3368         Reviewed by Ojan Vafai.
3369
3370         No new tests. Every existing test that calls commit() is testing
3371         the success side of this, and this only throws when there are
3372         LevelDB errors, which is exactly what we're trying to diagnose
3373         with this patch.
3374
3375         * Modules/indexeddb/IDBBackingStore.h:
3376         (Transaction):
3377         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
3378         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
3379         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
3380         * Modules/indexeddb/IDBLevelDBBackingStore.h:
3381         (Transaction):
3382         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3383         (WebCore::IDBTransactionBackendImpl::commit):
3384
3385 2012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
3386
3387         [Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
3388         https://bugs.webkit.org/show_bug.cgi?id=84417
3389
3390         Reviewed by Adam Barth.
3391
3392         Part of a refactoring series. See tracking bug 82948.
3393
3394         * WebCore.gyp/WebCore.gyp:
3395         * WebCore.gypi:
3396         * platform/chromium/PlatformSupport.h:
3397         (PlatformSupport):
3398         * platform/graphics/chromium/ImageChromium.cpp:
3399         (WebCore::Image::loadPlatformResource):
3400         * platform/graphics/chromium/ImageChromiumMac.mm: Removed.
3401
3402 2012-05-09  Rob Buis  <rbuis@rim.com>
3403
3404         Remove some isSVGFoo methods
3405         https://bugs.webkit.org/show_bug.cgi?id=86009
3406
3407         Reviewed by Eric Seidel.
3408
3409         These are not used at the moment and were probably just copy and pasted from
3410         isSVGFoo methods in RenderObject.h.
3411
3412         * rendering/RenderObject.h:
3413         * rendering/svg/RenderSVGEllipse.h:
3414         (RenderSVGEllipse):
3415         * rendering/svg/RenderSVGRect.h:
3416         (RenderSVGRect):
3417         * rendering/svg/RenderSVGShape.h:
3418
3419 2012-05-09  Ian Vollick  <vollick@chromium.org>
3420
3421         [chromium] Add impl-thread support for fill-mode and direction css animation properties
3422         https://bugs.webkit.org/show_bug.cgi?id=77662
3423
3424         Reviewed by James Robinson.
3425
3426         Adds support for accelerating css animations with -webkit-animation-fill-mode,
3427         and -webkit-animation-direction properties.
3428
3429         Tested in:
3430           CCActiveAnimationTest.TrimTimeAlternating
3431           CCLayerAnimationControllerTest.createReversedAnimation
3432           CCLayerAnimationControllerTest.createAlternatingAnimation
3433           CCLayerAnimationControllerTest.createReversedAlternatingAnimation
3434
3435         * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
3436         (WebCore::CCActiveAnimation::CCActiveAnimation):
3437         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
3438         (WebCore::CCActiveAnimation::cloneForImplThread):
3439         * platform/graphics/chromium/cc/CCActiveAnimation.h:
3440         (CCActiveAnimation):
3441         (WebCore::CCActiveAnimation::alternatesDirection):
3442         (WebCore::CCActiveAnimation::setAlternatesDirection):
3443         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3444
3445 2012-05-09  Ken Buchanan  <kenrb@chromium.org>
3446
3447         Crash from removal of a line break object
3448         https://bugs.webkit.org/show_bug.cgi?id=85997
3449
3450         Reviewed by David Hyatt.
3451
3452         Regression from r115343. That replaced a call to setNeedsLayout()
3453         with a separate call that used a different bit during linebox
3454         invalidation after renderer child removal. There are special cases
3455         where layout isn't marked on parent nodes just from the removal, so
3456         line dirtying needs to explicitly mark ancestors for layout.
3457
3458         * rendering/RenderObject.h:
3459         (WebCore::RenderObject::setAncestorLineBoxDirty):
3460
3461 2012-05-09  Levi Weintraub  <leviw@chromium.org>
3462
3463         Fix performance regression for floats caused by LayoutUnit change
3464         https://bugs.webkit.org/show_bug.cgi?id=85834
3465
3466         Reviewed by Ojan Vafai.
3467
3468         Refactoring FractionalLayout types to alleviate performance issues. Explicitly
3469         inlining constructor and operator functions in FractionalLayoutUnit, as well as
3470         pixelSnappedIntSize and pixelSnappedIntRect (particularly hot code paths). Also
3471         further simplifying round and ceil functions when sub-pixel layout is not enabled.
3472
3473         pixelSnappedIntSize was the only function defined in FractionalLayoutSize.cpp,
3474         so it is removed.
3475
3476         No new tests. No change in functionality.
3477
3478         * CMakeLists.txt:
3479         * GNUmakefile.list.am:
3480         * Target.pri:
3481         * WebCore.gypi:
3482         * WebCore.vcproj/WebCore.vcproj:
3483         * WebCore.xcodeproj/project.pbxproj:
3484         * platform/FractionalLayoutUnit.h:
3485         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
3486         (FractionalLayoutUnit):
3487         (WebCore::FractionalLayoutUnit::toInt):
3488         (WebCore::FractionalLayoutUnit::toFloat):
3489         (WebCore::FractionalLayoutUnit::toDouble):
3490         (WebCore::FractionalLayoutUnit::toUnsigned):
3491         (WebCore::FractionalLayoutUnit::operator int):
3492         (WebCore::FractionalLayoutUnit::operator unsigned):
3493         (WebCore::FractionalLayoutUnit::operator float):
3494         (WebCore::FractionalLayoutUnit::operator double):
3495         (WebCore::FractionalLayoutUnit::operator bool):
3496         (WebCore::FractionalLayoutUnit::ceil):
3497         (WebCore::FractionalLayoutUnit::round):
3498         * platform/graphics/FractionalLayoutRect.cpp:
3499         (WebCore):
3500         * platform/graphics/FractionalLayoutRect.h:
3501         (WebCore::FractionalLayoutRect::pixelSnappedSize):
3502         (WebCore::pixelSnappedIntRect):
3503         (WebCore):
3504         * platform/graphics/FractionalLayoutSize.cpp: Removed.
3505         * platform/graphics/FractionalLayoutSize.h:
3506         (WebCore):
3507         * rendering/LayoutTypes.h:
3508         (WebCore::pixelSnappedIntSize):
3509         (WebCore):
3510
3511 2012-05-09  Abhishek Arya  <inferno@chromium.org>
3512
3513         Crash in ReplaceSelectionCommand::performTrivialReplace
3514         https://bugs.webkit.org/show_bug.cgi?id=85943
3515
3516         Reviewed by Ryosuke Niwa.
3517
3518         RefPtr nodeAfterInsertionPos to guard against mutation events.
3519
3520         Test: editing/inserting/insert-html-crash.html
3521
3522         * editing/ReplaceSelectionCommand.cpp:
3523         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
3524
3525 2012-05-03  Shawn Singh  <shawnsingh@chromium.org>
3526
3527         Hit testing is incorrect in some cases with perspective transforms
3528         https://bugs.webkit.org/show_bug.cgi?id=79136
3529
3530         Reviewed by Simon Fraser.
3531
3532         Tests: transforms/3d/hit-testing/coplanar-with-camera.html
3533                transforms/3d/hit-testing/perspective-clipped.html
3534
3535         * platform/graphics/transforms/TransformationMatrix.cpp:
3536         (WebCore::TransformationMatrix::projectPoint): Fix a
3537         divide-by-zero error so that values do not become Inf or Nan. Also
3538         fix an overflow error by using a large, but not-too-large constant
3539         to represent infinity.
3540
3541         (WebCore::TransformationMatrix::projectQuad): Fix an error where
3542         incorrect quads were being returned. Incorrect quads can occur
3543         when projectPoint clamped==true after returning.
3544
3545 2012-05-09  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3546
3547         Simplify CSSParser::parseSimpleLengthValue()
3548         https://bugs.webkit.org/show_bug.cgi?id=85910
3549
3550         Reviewed by Alexis Menard.
3551
3552         Various small improvements to this function, mainly:
3553         - Move the check if the property ID accepts a simple length as early as possible;
3554         - Remove the check for the characters{8,16} pointers since they'll be valid (we ASSERT that);
3555         - Use a template to avoid duplicate code for 8 and 16 bit characters.
3556
3557         * css/CSSParser.cpp:
3558         (WebCore):
3559         (WebCore::parseSimpleLength):
3560         (WebCore::parseSimpleLengthValue):
3561
3562 2012-05-09  Ami Fischman  <fischman@chromium.org>
3563
3564         [chromium] Support multiple buffered time ranges
3565         https://bugs.webkit.org/show_bug.cgi?id=85926
3566
3567         Reviewed by Eric Carlson.
3568
3569         Preserve existing rendering of a single rect even in the presence of multiple buffered regions.
3570
3571         No new tests as this change has no functional effects.
3572
3573         * rendering/RenderMediaControlsChromium.cpp:
3574         (WebCore::paintMediaSlider):
3575
3576 2012-05-09  Dana Jansens  <danakj@chromium.org>
3577
3578         Early-out and avoid any copying when possible for Region operations
3579         https://bugs.webkit.org/show_bug.cgi?id=85260
3580
3581         Reviewed by Anders Carlsson.
3582
3583         For an empty region, any intersection or subtraction will not modify
3584         the region, so we can simply return instead of creating a new Shape
3585         and replacing the current empty Shape.
3586
3587         When a region is united with a region it contains, the orignal
3588         containing region is the result. So, if A.unite(B) and A.contains(B)
3589         then A does not need to change at all and we can return without making
3590         a copy of A's shape. When A is a rect, we can do this test even more
3591         simply.
3592
3593         We also remove redundant checks from trySimpleOperation() methods, where
3594         the test is already done in the Region calling site.
3595
3596         This change improves the performance of the Region overlap testing for
3597         composited layers, and allows us to avoid unnecessary copies of the
3598         Region during unite. With a layout test (attached to bug #81087), that
3599         creates a Region from the union of 225 composited layers, as well as
3600         600 overlapping layers above them, this change decreases the running
3601         time of the test by 3.2% by avoiding a copy of the entire Region for
3602         each insertion that does not change the resulting Region.
3603
3604         Unit tests: RegionTest.unite
3605
3606         * platform/graphics/Region.cpp:
3607         (WebCore::Region::Shape::UnionOperation::trySimpleOperation):
3608         (WebCore::Region::Shape::IntersectOperation::trySimpleOperation):
3609         (WebCore::Region::Shape::SubtractOperation::trySimpleOperation):
3610         (WebCore::Region::intersect):
3611         (WebCore::Region::unite):
3612         (WebCore::Region::subtract):
3613         * platform/graphics/Region.h:
3614         (WebCore::Region::isRect):
3615         (WebCore::Region::Shape::isRect):
3616
3617 2012-05-09  Tommy Widenflycht  <tommyw@google.com>
3618
3619         MediaStream API: SessionDescription::addCandidate should not crash for malformed input
3620         https://bugs.webkit.org/show_bug.cgi?id=85988
3621
3622         Reviewed by Adam Barth.
3623
3624         Sending null would crash the browser. Added safeguards in both the bindings and the native code.
3625
3626         Test: fast/mediastream/SessionDescription.html
3627
3628         * Modules/mediastream/SessionDescription.cpp:
3629         (WebCore::SessionDescription::addCandidate):
3630         * Modules/mediastream/SessionDescription.h:
3631         (SessionDescription):
3632         * Modules/mediastream/SessionDescription.idl:
3633
3634 2012-05-09  Tommy Widenflycht  <tommyw@google.com>
3635
3636         MediaStream API: Adding the possibility of port specific information in MediaStreamDescriptor
3637         https://bugs.webkit.org/show_bug.cgi?id=85794
3638
3639         Reviewed by Adam Barth.
3640
3641         To facilitate for ports I have added an ExtraData field that can be used for whatever purpose is needed.
3642
3643         No behavioral changes.
3644
3645         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
3646         (ExtraDataContainer):
3647         (WebKit::ExtraDataContainer::ExtraDataContainer):
3648         (WebKit::ExtraDataContainer::extraData):
3649         (WebKit):
3650         (WebKit::WebMediaStreamDescriptor::extraData):
3651         (WebKit::WebMediaStreamDescriptor::setExtraData):
3652         * platform/mediastream/MediaStreamDescriptor.h:
3653         (ExtraData):
3654         (WebCore::MediaStreamDescriptor::ExtraData::~ExtraData):
3655         (MediaStreamDescriptor):
3656         (WebCore::MediaStreamDescriptor::extraData):
3657         (WebCore::MediaStreamDescriptor::setExtraData):
3658
3659 2012-05-09  Takashi Sakamoto  <tasak@google.com>
3660
3661         Crash in WebCore::RenderBoxModelObject::paddingLeft
3662         https://bugs.webkit.org/show_bug.cgi?id=83889
3663
3664         Reviewed by Abhishek Arya.
3665
3666         RenderScrollbar creates RenderScrollbarPart without any parent
3667         renderers. However, if the scrollbar has percent padding styles,
3668         non-null parent renderer is required. So after creating/destroying
3669         RenderScrollbarPart instances, set owningRenderer(creating)/0
3670         (destroying) as its parent renderer.
3671
3672         Test: scrollbars/scrollbar-percent-padding-crash.html
3673               scrollbars/scrollbar-percent-padding-crash-expected.txt
3674
3675         * rendering/RenderScrollbar.cpp:
3676         (WebCore::RenderScrollbar::updateScrollbarPart):
3677         Added setParent after creating/destroying RenderScrollbarPart.
3678         * rendering/RenderScrollbarPart.cpp:
3679         Made RenderScollbar friend, because setParent is protected and
3680         RenderScrollbar is not inherited from class RenderObject.
3681
3682 2012-05-09  Takashi Sakamoto  <tasak@google.com>
3683
3684         ShadowRoot needs applyAuthorStyles
3685         https://bugs.webkit.org/show_bug.cgi?id=78472
3686
3687         Reviewed by Hajime Morita.
3688
3689         Implemented applyAuthorStyles attribute defined in the following spec:
3690         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-attributes
3691         Since applyAuthorSheets attribute has been already implemented,
3692         renamed all applyAuthorSheets to applyAuthorStyles and
3693         added applyAuthorStyles to ShadowRoot.idl.
3694         Currently, changing dynamically applyAuthorStyles doesn't work. I will fix this isse in bugs:84215: https://bugs.webkit.org/show_bug.cgi?id=84251
3695
3696         Test: fast/dom/shadow/shadow-root-applyAuthorStyles.html
3697               fast/dom/shadow/shadow-root-applyAuthorStyles-expected.html
3698
3699         * css/StyleResolver.cpp:
3700         (WebCore::StyleResolver::collectMatchingRulesForList):
3701         * dom/ShadowRoot.cpp:
3702         (WebCore::ShadowRoot::ShadowRoot):
3703         (WebCore::ShadowRoot::applyAuthorStyles):
3704         (WebCore::ShadowRoot::setApplyAuthorStyles):
3705         * dom/ShadowRoot.h:
3706         * dom/TreeScope.cpp:
3707         (WebCore::TreeScope::applyAuthorStyles):
3708         * dom/TreeScope.h:
3709         (TreeScope):
3710         Changed all applyAuthorSheets to applyAuthorSytles.
3711         (ShadowRoot):
3712         * dom/ShadowRoot.idl:
3713         Added a new attribute, boolean applyAuthorStyles.
3714
3715 2012-05-09  Yoshifumi Inoue  <yosin@chromium.org>
3716
3717         [Chromium][Forms] HTMLOptionsCollection doesn't have indexed properties on property enumeration
3718         https://bugs.webkit.org/show_bug.cgi?id=85937
3719
3720         Reviewed by Kentaro Hara.
3721
3722         This patch adds numeric indices to properties in enumeration to HTMLOptionsCollection V8 binding
3723         to changes Objects.keys in ECMAScript5 and for-in statement behavior for compatibility with
3724         Firefox 12, IE9, Opera 11, and Safari 5.
3725
3726         Test: fast/forms/select/options-indexed-properties.html
3727
3728         * bindings/scripts/CodeGeneratorV8.pm:
3729         (GenerateImplementationIndexer): Set $hasEnumerator true for interface HTMLOptionsCollection
3730
3731 2012-05-09  Shinya Kawanaka  <shinyak@chromium.org>
3732
3733         Position should be able to have ShadowRoot as a container.
3734         https://bugs.webkit.org/show_bug.cgi?id=82021
3735
3736         Reviewed by Ryosuke Niwa.
3737
3738         Since Position could not take a shadow root as a container node, pointing the direct children
3739         of a shadow root was difficult.
3740
3741         This patch makes it enabled, and fixes a lot of crashes caused by that limitation.
3742         Also, we confirm that ShadowRoot is not exposed to JavaScript layer.
3743
3744         Currently this change is only enabled if shadow dom flag is enabled, since we cannot
3745         prove this change does not destroy the existing behavior. However, this change is really required
3746         to fix other editing bugs in Shadow DOM. A bunch of patches and tests will be added to
3747         fix other editing bugs and they will check this patch does not break editing.
3748         We will also add a fuzzer to check the stability of editing in Shadow DOM later, and it will
3749         also help to confirm the patch will not break the editing.
3750
3751         Tests: editing/shadow/doubleclick-on-meter-in-shadow-crash.html
3752                editing/shadow/rightclick-on-meter-in-shadow-crash.html
3753                editing/shadow/shadow-selection-not-exported.html
3754
3755         * dom/Position.cpp:
3756         (WebCore::Position::Position):
3757         (WebCore::Position::containerNode):
3758         (WebCore::Position::parentAnchoredEquivalent):
3759         (WebCore::Position::previous):
3760         (WebCore::Position::next):
3761         (WebCore::Position::atStartOfTree):
3762         (WebCore::Position::atEndOfTree):
3763         (WebCore::Position::findParent):
3764         * dom/Position.h:
3765         (WebCore):
3766         (WebCore::positionInParentBeforeNode):
3767         (WebCore::positionInParentAfterNode):
3768
3769 2012-05-09  Zoltan Horvath  <zoltan@webkit.org>
3770
3771         [Qt] Build fix when using libpng version != 1.2
3772         https://bugs.webkit.org/show_bug.cgi?id=85614
3773
3774         Reviewed by Eric Seidel.
3775
3776         Don't enforce the version of libpng when passing the option to the linker.
3777
3778         No new tests, no intended functionality change.
3779
3780         * WebCore.pri:
3781
3782 2012-05-09  Oli Lan  <olilan@chromium.org>
3783
3784         Add identifying methods for date/time input types.
3785
3786         This patch adds methods isDateField(), isDateTimeField(), isDateTimeLocalField(),
3787         isMonthField(), isTimeField() and isWeekField() to InputType and the appropriate
3788         HTMLInputElement classes, to allow date/time input types to be identified.
3789
3790         The new methods match the existing methods for types such as email, search and number.
3791
3792         https://bugs.webkit.org/show_bug.cgi?id=78746
3793
3794         Reviewed by Kent Tamura.
3795
3796         A new test WebViewTest.TextInputType has been added in WebKit/chromium/tests that calls
3797         through to these methods via WebViewImpl.textInputType().
3798
3799         * html/DateInputType.cpp:
3800         (WebCore::DateInputType::isDateField):
3801         (WebCore):
3802         * html/DateInputType.h:
3803         (DateInputType):
3804         * html/DateTimeInputType.cpp:
3805         (WebCore::DateTimeInputType::isDateTimeField):
3806         (WebCore):
3807         * html/DateTimeInputType.h:
3808         (DateTimeInputType):
3809         * html/DateTimeLocalInputType.cpp:
3810         (WebCore::DateTimeLocalInputType::isDateTimeLocalField):
3811         (WebCore):
3812         * html/DateTimeLocalInputType.h:
3813         (DateTimeLocalInputType):
3814         * html/HTMLInputElement.cpp:
3815         (WebCore::HTMLInputElement::isDateField):
3816         (WebCore):
3817         (WebCore::HTMLInputElement::isDateTimeField):
3818         (WebCore::HTMLInputElement::isDateTimeLocalField):
3819         (WebCore::HTMLInputElement::isMonthField):
3820         (WebCore::HTMLInputElement::isTimeField):
3821         (WebCore::HTMLInputElement::isWeekField):
3822         * html/HTMLInputElement.h:
3823         (HTMLInputElement):
3824         * html/InputType.cpp:
3825         (WebCore::InputType::isDateField):
3826         (WebCore):
3827         (WebCore::InputType::isDateTimeField):
3828         (WebCore::InputType::isDateTimeLocalField):
3829         (WebCore::InputType::isMonthField):
3830         (WebCore::InputType::isTimeField):
3831         (WebCore::InputType::isWeekField):
3832         * html/InputType.h:
3833         (InputType):
3834         * html/MonthInputType.cpp:
3835         (WebCore::MonthInputType::isMonthField):
3836         (WebCore):
3837         * html/MonthInputType.h:
3838         (MonthInputType):
3839         * html/TimeInputType.cpp:
3840         (WebCore::TimeInputType::isTimeField):
3841         (WebCore):
3842         * html/TimeInputType.h:
3843         (TimeInputType):
3844         * html/WeekInputType.cpp:
3845         (WebCore::WeekInputType::isWeekField):
3846         (WebCore):
3847         * html/WeekInputType.h:
3848         (WeekInputType):
3849
3850 2012-05-09  Nikolas Zimmermann  <nzimmermann@rim.com>
3851
3852         REGRESSION(r105057): Infinite loop inside SVGTextLayoutEngine::currentLogicalCharacterMetrics
3853         https://bugs.webkit.org/show_bug.cgi?id=83405
3854
3855         Reviewed by Darin Adler.
3856
3857         Dynamically adding tspans carrying position information in the x/y/dx/dy/rotate lists is broken.
3858         To avoid mistakes like this in future, simplify the calling code in RenderSVGInlineText and centralize
3859         the managment of all caches (text positioning element cache / metrics map / layout attributes) in
3860         RenderSVGText. This avoids the hack in SVGRootInlineBox::computePerCharacterLayoutInformation() which
3861         called textRoot->rebuildLayoutAttributes(), which was used to fix previous security issues with this code.
3862         Instead correctly handle destruction of RenderSVGInlineText in RenderSVGText, keeping the m_layoutAttributes
3863         synchronized with the current state of the render tree. Fixes highcharts problems.
3864
3865         Tests: svg/text/add-tspan-position-bug.html
3866                svg/text/modify-tspan-position-bug.html
3867
3868         * rendering/svg/RenderSVGInline.cpp:
3869         (WebCore::RenderSVGInline::addChild):
3870         * rendering/svg/RenderSVGInlineText.cpp:
3871         (WebCore::RenderSVGInlineText::willBeDestroyed):
3872         (WebCore::RenderSVGInlineText::setTextInternal):
3873         (WebCore::RenderSVGInlineText::styleDidChange):
3874         * rendering/svg/RenderSVGText.cpp:
3875         (WebCore::recursiveUpdateMetrics):
3876         (WebCore::RenderSVGText::subtreeChildAdded):
3877         (WebCore::RenderSVGText::subtreeChildWillBeDestroyed):
3878         (WebCore::recursiveCollectLayoutAttributes):
3879         (WebCore::checkLayoutAttributesConsistency):
3880         (WebCore::RenderSVGText::subtreeChildWasDestroyed):
3881         (WebCore::RenderSVGText::subtreeStyleChanged):
3882         (WebCore::RenderSVGText::subtreeTextChanged):
3883         (WebCore::RenderSVGText::layout):
3884         (WebCore::RenderSVGText::addChild):
3885         (WebCore::RenderSVGText::rebuildAllLayoutAttributes):
3886         (WebCore::RenderSVGText::rebuildLayoutAttributes):
3887         * rendering/svg/RenderSVGText.h:
3888         (WebCore::RenderSVGText::layoutAttributes):
3889         * rendering/svg/SVGRootInlineBox.cpp:
3890         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3891         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3892         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributes):
3893
3894 2012-05-08  Dongwoo Im  <dw.im@samsung.com>
3895
3896         NavigatorRegisterProtocolHandler can call ChromeClient directly.
3897         https://bugs.webkit.org/show_bug.cgi?id=85944
3898
3899         Reviewed by Adam Barth.
3900
3901         Covered by fast/dom/register-protocol-handler.html
3902
3903         * page/Chrome.cpp: Remove registerProtocolHandler function.
3904         * page/Chrome.h: Remove registerProtocolHandler prototype.
3905         (Chrome):
3906         * page/NavigatorRegisterProtocolHandler.cpp: Call ChromeClient::registerProtocolHandler directly.
3907         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
3908
3909 2012-05-08  Mario Sanchez Prada  <msanchez@igalia.com>
3910
3911         Coding style issues present in RenderFrameSet.cpp
3912         https://bugs.webkit.org/show_bug.cgi?id=85955
3913
3914         Reviewed by Eric Seidel.
3915
3916         Just fixed those coding style issues.
3917
3918         * rendering/RenderFrameSet.cpp:
3919         (WebCore::RenderFrameSet::GridAxis::resize):
3920         (WebCore::RenderFrameSet::layOutAxis):
3921         (WebCore::RenderFrameSet::continueResizing):
3922
3923 2012-05-08  Jon Lee  <jonlee@apple.com>
3924
3925         Unreviewed build fix.
3926
3927         * platform/mac/WebCoreSystemInterface.h:
3928
3929 2012-05-08  Jason Liu  <jason.liu@torchmobile.com.cn>
3930
3931         [BlackBerry] Auth credentials set in private mode are reused in public mode.
3932         https://bugs.webkit.org/show_bug.cgi?id=84697
3933
3934         Reviewed by Rob Buis.
3935
3936         Add setPrivateMode function for CredentialStorage.
3937
3938         Now, we only save credentials in memory and CredentialBackingStore isn't enabled.
3939         When we set private mode from on to off, we clear all these temporary credentials.
3940
3941         We have to change Private Browsing to test, so have to write a manual test case.
3942         Test: ManualTests/blackberry/http-auth-private-mode-changed.html
3943
3944         * network/CredentialStorage.cpp:
3945         (WebCore::CredentialStorage::setPrivateMode):
3946         (WebCore):
3947         * platform/network/CredentialStorage.h:
3948         (CredentialStorage):
3949
3950 2012-05-08  Rakesh KN  <rakesh.kn@motorola.com>
3951
3952         RadioNodeList support in HTMLFormElement::elements
3953         https://bugs.webkit.org/show_bug.cgi?id=81854
3954
3955         Reviewed by Ryosuke Niwa.
3956
3957         Implement RadioNodeList support spec'ed at
3958         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#radionodelist
3959
3960         Test: fast/forms/form-collection-radio-node-list.html
3961
3962         * CMakeLists.txt:
3963         Added entries for new files.
3964         * DerivedSources.cpp: Ditto.
3965         * DerivedSources.make: Ditto.
3966         * DerivedSources.pri: Ditto.
3967         * GNUmakefile.list.am: Ditto.
3968         * Target.pri: Ditto.
3969         * WebCore.gypi: Ditto.
3970         * WebCore.vcproj/WebCore.vcproj: Ditto.
3971         * WebCore.xcodeproj/project.pbxproj: Ditto.
3972         * bindings/js/JSHTMLCollectionCustom.cpp:
3973         (WebCore::getNamedItems):
3974         Modified to create RadioNodeList object when FormControlCollection has more than
3975         one element of same name/id.
3976         * bindings/scripts/CodeGeneratorJS.pm:
3977         (GenerateImplementation):
3978         Added code to include Node.h and JSNode.h in JSRadioNodeElement.cpp.
3979         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
3980         (WebCore::getNamedItems):
3981         Modified to create RadioNodeList object when FormControlCollection has more than
3982         one element of same name/id.
3983         * dom/Node.cpp:
3984         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
3985         Invalidate lists even for change in id, type, checked attributes.
3986         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
3987         Invalidate radioNodeList cache.
3988         (WebCore::NodeListsNodeData::isEmpty):
3989         Changes for radioNodeList.
3990         (WebCore::Node::radioNodeList):
3991         Creates if needed a RadioNodeList and adds it to the cache.
3992         (WebCore::Node::removeCachedRadioNodeList):
3993         Removes a cached radioNodeList.
3994         * dom/Node.h: Ditto
3995         * dom/NodeRareData.h:
3996         (WebCore):
3997         (NodeListsNodeData):
3998         Added radioNodeList list.
3999         * html/CollectionType.h:
4000         Added new FormControls type.
4001         * html/HTMLCollection.cpp:
4002         (WebCore::HTMLCollection::shouldIncludeChildren):
4003         (WebCore::HTMLCollection::isAcceptableElement):
4004         Handle FormControls collection type.
4005         * html/HTMLFormCollection.cpp:
4006         (WebCore::HTMLFormCollection::HTMLFormCollection):
4007         Contruct collection of FormControls type.
4008         * html/RadioNodeList.cpp: Added.
4009         (WebCore):
4010         (WebCore::RadioNodeList::RadioNodeList):
4011         (WebCore::RadioNodeList::~RadioNodeList):
4012         (WebCore::toRadioButtonInputElement):
4013         (WebCore::RadioNodeList::value):
4014         (WebCore::RadioNodeList::setValue):
4015         (WebCore::RadioNodeList::nodeMatches):
4016         * html/RadioNodeList.h: Added.
4017         (WebCore):
4018         (RadioNodeList):
4019         (WebCore::RadioNodeList::create):
4020         RadioNodeList implementation.
4021         * html/RadioNodeList.idl: Added.
4022         Idl for generating RadioNodeList JS/V8 bindings.
4023
4024 2012-05-08  Benjamin Poulain  <bpoulain@apple.com>
4025
4026         [JSC] Regression: addEventListener() and removeEventListener() raise an exception on missing args
4027         https://bugs.webkit.org/show_bug.cgi?id=85928
4028
4029         Reviewed by Geoffrey Garen.
4030
4031         The functions addEventListener() and removeEventListener() raise an exception if there are missin arguments.
4032         This behavior breaks existing content.
4033
4034         This patch change the code generator of JavaScript core to have an exception for addEventListener() and removeEventListener().
4035         For those function, we do not raise an exception on missin argument.
4036
4037         This patch does not modify the V8 code generator because such exceptions are already in place there.
4038
4039         Tests: fast/dom/Window/window-legacy-event-listener.html
4040                fast/dom/XMLHttpRequest-legacy-event-listener.html
4041                fast/dom/node-legacy-event-listener.html
4042
4043         * bindings/scripts/CodeGeneratorJS.pm:
4044         (GenerateImplementation):
4045
4046 2012-05-08  Chris Rogers  <crogers@google.com>
4047
4048         AudioParam should directly be given context in create() method
4049         https://bugs.webkit.org/show_bug.cgi?id=85905
4050
4051         Reviewed by James Robinson.
4052
4053         No new tests.  This is a low-level re-factoring and is covered by existing tests.
4054
4055         * Modules/webaudio/AudioBufferSourceNode.cpp:
4056         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
4057         * Modules/webaudio/AudioGain.h:
4058         (WebCore::AudioGai