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