[Skia] Remove use of deprecated Skia constant and struct field names
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-26  Brian Salomon  <bsalomon@google.com>
2
3         [Skia] Remove use of deprecated Skia constant and struct field names
4         https://bugs.webkit.org/show_bug.cgi?id=81034
5
6         Reviewed by James Robinson.
7
8         No behavior change, so no tests. The modified code is executed by many existing tests.
9
10         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
11         (WebCore::createAcceleratedCanvas):
12         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
13         (WebCore::CCRenderSurfaceFilters::apply):
14         * platform/graphics/skia/ImageBufferSkia.cpp:
15         (WebCore::createAcceleratedCanvas):
16
17 2012-03-26  Nat Duca  <nduca@chromium.org>
18
19         [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
20         https://bugs.webkit.org/show_bug.cgi?id=82265
21
22         In threaded compositing mode, the WebWidget is self-scheduled,
23         receiving damage and processing it without forwarding that damage
24         up to the embedding WebWidgetClient. In Chromium's case, the
25         client uses the presence of damage to perform input flow
26         control. This patch exposes the need for input flow control to the
27         embedder, while keeping the actual logic about what exactly
28         warrants input flow control inside the implementation.
29
30         Reviewed by James Robinson.
31
32         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
33         (WebCore::CCLayerTreeHost::commitComplete):
34         (WebCore::CCLayerTreeHost::commitRequested):
35         (WebCore):
36         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
37         (CCLayerTreeHostClient):
38         (CCLayerTreeHost):
39         * platform/graphics/chromium/cc/CCProxy.h:
40         (CCProxy):
41         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
42         (WebCore::CCSingleThreadProxy::commitRequested):
43         (WebCore):
44         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
45         (CCSingleThreadProxy):
46         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
47         (WebCore::CCThreadProxy::commitRequested):
48         (WebCore):
49         * platform/graphics/chromium/cc/CCThreadProxy.h:
50         (CCThreadProxy):
51
52 2012-03-26  Adam Barth  <abarth@webkit.org>
53
54         When <img crossorigin> fails the CORS check, we should fire the error event
55         https://bugs.webkit.org/show_bug.cgi?id=81998
56
57         Reviewed by Nate Chapin.
58
59         The spec says we're supposed to fire the error event when the CORS
60         check fails, but we haven't been.  This patch is larger than it might
61         otherwise be because we're firing the event asynchronously, but that
62         seems like the right thing to do.
63
64         Tests: http/tests/security/img-with-failed-cors-check-fails-to-load.html
65
66         * dom/Document.cpp:
67         (WebCore::Document::implicitClose):
68         * loader/ImageLoader.cpp:
69         (WebCore::errorEventSender):
70         (WebCore):
71         (WebCore::ImageLoader::ImageLoader):
72         (WebCore::ImageLoader::~ImageLoader):
73         (WebCore::ImageLoader::setImage):
74         (WebCore::ImageLoader::updateFromElement):
75         (WebCore::ImageLoader::notifyFinished):
76         (WebCore::ImageLoader::dispatchPendingEvent):
77         (WebCore::ImageLoader::dispatchPendingErrorEvent):
78         (WebCore::ImageLoader::dispatchPendingErrorEvents):
79         * loader/ImageLoader.h:
80         (ImageLoader):
81
82 2012-03-26  Stephen White  <senorblanco@chromium.org>
83
84         Make filters and the threaded compositor play well together.
85         https://bugs.webkit.org/show_bug.cgi?id=78139
86         
87         Use a dedicated GraphicsContext3D instance for all filters calls in
88         the threaded case.  Clone all FilterOperations for thread safety
89         in the threaded case.
90
91         Reviewed by James Robinson.
92         
93         Covered by tests in LayoutTests/css3/filters.
94
95         * platform/graphics/chromium/LayerChromium.cpp:
96         (WebCore::LayerChromium::setFilters):
97         Set a global flag if we've seen content with filters, so we know
98         we need to create the filter context.
99         (WebCore::LayerChromium::pushPropertiesTo):
100         Clone all filter operations if we're in the threaded case.
101         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
102         (WebCore):
103         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
104         (WebCore::CCLayerTreeHost::needsFilterContext):
105         (WebCore::CCLayerTreeHost::setNeedsFilterContext):
106         (CCLayerTreeHost):
107         Add flag and accessors for needsFilterContext.
108         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
109         (WebCore::CCRenderSurface::applyFilters):
110         Pick up the appropriate context from SharedGraphicsContext3D,
111         depending if we're in the threaded case or not.
112         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
113         (WebCore::CCThreadProxy::recreateContext):
114         For the threaded compositor re-create the filter context
115         alongside the main compositor context on lost context, if requested.
116         (WebCore::CCThreadProxy::beginFrame):
117         Create the filter context in beginFrame, if it was resquested and is
118         NULL.  This handles the first-use case.
119         * platform/graphics/filters/CustomFilterOperation.h:
120         (WebCore::CustomFilterOperation::clone):
121         Assert if trying to clone the custom filter operation (it has
122         non-threadsafe members).
123         * platform/graphics/filters/FilterOperation.h:
124         (WebCore::DefaultFilterOperation::clone):
125         (WebCore::PassthroughFilterOperation::clone):
126         (WebCore::ReferenceFilterOperation::clone):
127         (WebCore::BasicColorMatrixFilterOperation::clone):
128         (WebCore::BasicComponentTransferFilterOperation::clone):
129         (WebCore::GammaFilterOperation::clone):
130         (WebCore::BlurFilterOperation::clone):
131         (WebCore::DropShadowFilterOperation::clone):
132         Add clone methods for all FilterOperations.
133         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
134         (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
135         (WebCore::SharedGraphicsContext3DImpl::getContext):
136         (WebCore::SharedGraphicsContext3DImpl::createContext):
137         (WebCore::SharedGraphicsContext3D::get):
138         (WebCore::getOrCreateContextForImplThread):
139         (WebCore::SharedGraphicsContext3D::getForImplThread):
140         (WebCore::SharedGraphicsContext3D::haveForImplThread):
141         (WebCore::SharedGraphicsContext3D::createForImplThread):
142         Split out context creation, lost context recovery, and retrieval
143         into separate functions, so the impl thread can use only the parts
144         it wants on the threads it wants (create and have on main, get on impl).
145         Add asserts to ensure that's how they're called.
146         * platform/graphics/gpu/SharedGraphicsContext3D.h:
147         (SharedGraphicsContext3D):
148         Reuse the SharedGraphicsContext infrastructure to create a new
149         context singleton for filter use in the threaded compositor.
150
151 2012-03-26  Adam Barth  <abarth@webkit.org>
152
153         FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
154         https://bugs.webkit.org/show_bug.cgi?id=81020
155
156         Reviewed by Eric Seidel.
157
158         The vast majority of security checks in the browser should use a
159         ScriptExecutionContext (aka a Document) to designate "who" is
160         attempting to perform a given action.  Unfortunately,
161         shouldAllowNavigation was using a Frame to designate "who" is
162         attempting the navigation.
163
164         In cases when the executing script is "inactive" (i.e., belongs to a
165         document that is not currently displayed in a Frame), using the Frame
166         can cause us to grant the script the privileges of the document that's
167         currently displayed in the Frame rather than the one that contains the
168         script.
169
170         This patch moves shouldAllowNavigation from FrameLoader to Document
171         (and renames it to canNavigate), effectively change the context object
172         from a Frame to a Document.
173
174         Test: http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html
175
176         * bindings/generic/BindingSecurity.h:
177         (BindingSecurity):
178         (WebCore):
179         * bindings/v8/V8Utilities.cpp:
180         (WebCore):
181         * bindings/v8/V8Utilities.h:
182         (WebCore):
183             - Deletes unused code.
184         * dom/Document.cpp:
185         (WebCore::canAccessAncestor):
186         (WebCore):
187         (WebCore::Document::canNavigate):
188             - canNavigate is copied from FrameLoader::shouldAllowNavigation.
189               I've added a null-check bailout if the document is inactive.
190         * dom/Document.h:
191         (Document):
192         * loader/FormState.cpp:
193         (WebCore::FormState::FormState):
194         (WebCore::FormState::create):
195         * loader/FormState.h:
196         (WebCore):
197         (FormState):
198         (WebCore::FormState::sourceDocument):
199         * loader/FormSubmission.cpp:
200         (WebCore::FormSubmission::create):
201             - Changes the context object from Frame to Document.
202         * loader/FrameLoader.cpp:
203         (WebCore::FrameLoader::submitForm):
204         (WebCore::FrameLoader::loadFrameRequest):
205         (WebCore):
206         (WebCore::FrameLoader::findFrameForNavigation):
207             - FrameLoader::findFrameForNavigation still incorrectly uses Frame
208               as the context object, but that's a bug for another patch.
209         (WebCore::createWindow):
210         * loader/FrameLoader.h:
211         (FrameLoader):
212         * loader/NavigationScheduler.cpp:
213         (WebCore::ScheduledFormSubmission::fire):
214         * page/DOMWindow.cpp:
215         (WebCore::DOMWindow::close):
216         (WebCore::DOMWindow::setLocation):
217         (WebCore::DOMWindow::open):
218         * page/History.cpp:
219         (WebCore::History::go):
220
221 2012-03-26  Vangelis Kokkevis  <vangelis@chromium.org>
222
223         [chromium] Simplify and fix CCLayerSorter
224         https://bugs.webkit.org/show_bug.cgi?id=82114
225
226         A significant cleanup, simplification and improvement of the CCLayerSorter code.
227         Simplified the LayerShape structure to use WebCore's FloatQuad for all overlap tests.
228         By treating every layer as two triangles, the old overlap code did a lot of redundant work
229         including testing two of the vertices of the layer and its diagonal twice. The new overlap
230         tests check:
231         1. The four corners of each of the two layers against the other layer.
232         2. The four edges of each layer against the edges of the other layer.
233         Unlike the old code, the new code has no early-outs in the overlap tests as those where causing
234         us to miss legitimate overlaps.
235         A new technique for breaking dependency cycles introduced by intersecting layers is implemented.
236         Instead of arbitrarily breaking cycles by choosing the node in the graph with the smallest number of
237         incoming edges (i.e. layers that need to be drawn before it) we chose the one with the smallest sum
238         of graph edge weights (defined as the max depth difference between two layers). Layers that intersect
239         have their respective graph edge weight set to zero, making them more likely to be picked for breaking
240         the cycles (it's not a perfect solution but it seems to perform much better than the previous one).
241
242         In addition to being overly complex and doing reduntant work, the old code was missing a
243         perspective divide when computing the coordinates of the layer's corners in the projected plane
244         which was the source of a lot of mis-sorted results.
245
246         In all, these improvements, fix a lot of outstanding issues with layer sorting, on pages such as:
247         http://www.keithclark.co.uk/labs/3dcss/demo/
248         http://2012.beercamp.com
249         https://developer.mozilla.org/fr/demos/detail/the-box/launch
250
251         Tests: CCLayerSorter unit tests.
252
253         Reviewed by Kenneth Russell.
254
255         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
256         (WebCore):
257         (WebCore::perpProduct):
258         (WebCore::edgeEdgeTest):
259         (WebCore::CCLayerSorter::checkOverlap):
260         (WebCore::CCLayerSorter::LayerShape::LayerShape):
261         (WebCore::CCLayerSorter::LayerShape::layerZFromProjectedPoint):
262         (WebCore::CCLayerSorter::createGraphNodes):
263         (WebCore::CCLayerSorter::createGraphEdges):
264         (WebCore::CCLayerSorter::sort):
265         * platform/graphics/chromium/cc/CCLayerSorter.h:
266         (WebCore::CCLayerSorter::CCLayerSorter):
267         (CCLayerSorter):
268         (LayerShape):
269         (WebCore::CCLayerSorter::GraphNode::GraphNode):
270         (GraphNode):
271         (WebCore::CCLayerSorter::GraphEdge::GraphEdge):
272         (GraphEdge):
273
274 2012-03-26  Fady Samuel  <fsamuel@chromium.org>
275
276         [Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to fail
277         https://bugs.webkit.org/show_bug.cgi?id=81954
278
279         Reviewed by James Robinson.
280
281         A static variable s_inPaintContents is set when painting, and it ensures
282         that we don't delete GraphicsLayers or create GraphicsLayers while painting.
283
284         However, because this variable is static, it does not permit the existence
285         of multiple WebViews in different stages (one laying out and one painting).
286
287         This manifests itself if one attempts to use the --force-compositing-mode
288         in Chromium and attempts to navigate to a page with a missing or old plugin
289         or a browser plugin (which uses a WebViewPlugin as a placeholder until it's
290         done loading).
291
292         The solution to simplify debugging is to make this flag per-Page.
293         We can access Page from RenderLayerBacking which is a GraphicsLayerClient.
294         We add a new method GraphicsLayerClient::verifyNotPainting with a default
295         (do nothing) implementation and override it in RenderLayerBacking to
296         test the flag set in Page.
297
298         * page/Page.cpp:
299         (WebCore::Page::Page):
300         * page/Page.h:
301         (Page):
302         (WebCore::Page::setIsPainting):
303         (WebCore::Page::isPainting):
304         * platform/graphics/GraphicsLayer.cpp:
305         (WebCore::GraphicsLayer::GraphicsLayer):
306         (WebCore::GraphicsLayer::~GraphicsLayer):
307         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
308         * platform/graphics/GraphicsLayerClient.h:
309         (GraphicsLayerClient):
310         (WebCore::GraphicsLayerClient::verifyNotPainting):
311         * rendering/RenderLayerBacking.cpp:
312         (WebCore::RenderLayerBacking::paintContents):
313         (WebCore):
314         (WebCore::RenderLayerBacking::verifyNotPainting):
315         * rendering/RenderLayerBacking.h:
316         (RenderLayerBacking):
317
318 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
319
320         cssText should use shorthand notations
321         https://bugs.webkit.org/show_bug.cgi?id=81737
322
323         Reviewed by Enrica Casucci.
324
325         Use shorthand properties to serialize style properties for cssText.
326
327         The overall algorithm is to look for any property that has a shorthand, and then check if
328         the shorthand value could be obtained (the condition is quite complicated for border properties).
329         If it could, then append that value to the string builder, and set the corresponding entries in
330         shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in
331         shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties
332         that use the same shorthand property when we cannot use the shorthand.
333
334         Test: fast/css/cssText-shorthand.html
335
336         * css/StylePropertySet.cpp:
337         (WebCore::StylePropertySet::asText):
338
339 2012-03-26  Bolin Hsu  <bhsu@google.com>
340
341         [Chromium] Add Android keycodes
342         https://bugs.webkit.org/show_bug.cgi?id=81950
343
344         Add the missing Android keycodes listed in the bug.
345
346         Reviewed by Adam Barth.
347
348         * platform/chromium/KeyCodeConversionAndroid.cpp:
349         (WebCore::windowsKeyCodeForKeyEvent):
350         * platform/chromium/KeyboardCodes.h:
351
352 2012-03-26  Levi Weintraub  <leviw@chromium.org>
353
354         Switch ColumnInfo::addForcedBreak to LayoutUnits
355         https://bugs.webkit.org/show_bug.cgi?id=82210
356
357         Reviewed by Eric Seidel.
358
359         Forced breaks are added by local offsets, which should be in LayoutUnits.
360
361         No new tests. No change in behavior.
362
363         * rendering/ColumnInfo.h:
364         (WebCore::ColumnInfo::addForcedBreak):
365
366 2012-03-26  Levi Weintraub  <leviw@chromium.org>
367
368         Update LayoutUnit usage in ContainerNode, Element, and ElementRareData
369         https://bugs.webkit.org/show_bug.cgi?id=82219
370
371         Reviewed by Eric Seidel.
372
373         No new tests. No change in behavior.
374
375         * dom/ContainerNode.cpp:
376         (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect
377         of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped.
378         * dom/Element.cpp:
379         (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute
380         coordinates, which are always expressed in integers.
381         * dom/Element.h:
382         (Element):
383         * dom/ElementRareData.h:
384         (WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of
385         INT_MAX to avoid overflowing when LayoutUnits are sub-pixel.
386
387 2012-03-26  Adam Klein  <adamk@chromium.org>
388
389         Update binding test output for V8 after r112163.
390
391         * bindings/scripts/test/V8/V8TestInterface.cpp:
392         (WebCore::V8TestInterface::constructorCallback):
393         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
394         (WebCore::V8TestNamedConstructorConstructorCallback):
395         * bindings/scripts/test/V8/V8TestObj.cpp:
396         (WebCore::V8TestObj::constructorCallback):
397         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
398         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
399
400 2012-03-26  Levi Weintraub  <leviw@chromium.org>
401
402         Update localSelectionRect to return a LayoutRect
403         https://bugs.webkit.org/show_bug.cgi?id=82183
404
405         Reviewed by Eric Seidel.
406
407         localSelectionRect returns a rectangle in the coordinate space of its renderer,
408         and therefor should remain LayoutUnits until being promoted to absolute
409         coordinates or painted. Also fixing an incorrect conversion of startPos and
410         endPos in selectionRectForRepaint.
411
412         No new tests. No change in behavior.
413
414         * rendering/InlineTextBox.cpp:
415         (WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect
416         for the value being returned from the font engine since these floating point
417         values should not be pixel snapped.
418         * rendering/InlineTextBox.h:
419         (InlineTextBox):
420         * rendering/RenderReplaced.cpp:
421         (WebCore::RenderReplaced::localSelectionRect):
422         * rendering/RenderReplaced.h:
423         (RenderReplaced):
424         * rendering/RenderText.cpp:
425         (WebCore::localQuadForTextBox):
426         (WebCore::RenderText::absoluteRectsForRange):
427         (WebCore::RenderText::absoluteQuadsForRange):
428         (WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of
429         start/endPos to LayoutUnits. These values represent a range of selected characters,
430         not layout values!
431         * rendering/svg/RenderSVGInlineText.cpp:
432         (WebCore::RenderSVGInlineText::localCaretRect):
433         * rendering/svg/SVGInlineTextBox.cpp:
434         (WebCore::SVGInlineTextBox::localSelectionRect):
435         * rendering/svg/SVGInlineTextBox.h:
436         (SVGInlineTextBox):
437
438 2012-03-26  Justin Novosad  <junov@chromium.org>
439
440         [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
441         https://bugs.webkit.org/show_bug.cgi?id=82243
442
443         Reviewed by James Robinson.
444
445         Adding null pointer check to prevent crash and texture object
446         validity check to prevent potential graphics glitch
447
448         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
449         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
450
451 2012-03-26  Adam Klein  <adamk@chromium.org>
452
453         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
454         https://bugs.webkit.org/show_bug.cgi?id=82238
455
456         Reviewed by Adam Barth.
457
458         The setJSWrapper* methods previously featured a comment that asked
459         callers to ref the objects before passing them in. This change makes
460         that contract explicit (and allows the removal of the comment).
461
462         In addition, for ConstructorCallbacks, this change slightly reduces
463         refcount churn by passing on the initial ref via RefPtr::release().
464
465         No new tests, no change in behavior.
466
467         * bindings/scripts/CodeGeneratorV8.pm:
468         (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
469         (GenerateNamedConstructorCallback): ditto.
470         * bindings/v8/V8DOMWindowShell.cpp:
471         (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
472         * bindings/v8/V8DOMWrapper.cpp:
473         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
474         * bindings/v8/V8DOMWrapper.h:
475         (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
476         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
477         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
478         * bindings/v8/V8Proxy.h:
479         (WebCore::toV8): Remove explicit ref.
480         * bindings/v8/WorkerContextExecutionProxy.cpp:
481         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
482         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
483         (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
484         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
485         (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
486         * bindings/v8/custom/V8WebSocketCustom.cpp:
487         (WebCore::V8WebSocket::constructorCallback): ditto.
488         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
489         (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
490
491 2012-03-26  Alexey Proskuryakov  <ap@apple.com>
492
493         Remove obsolete FormDataStreamMac code
494         https://bugs.webkit.org/show_bug.cgi?id=82244
495
496         Reviewed by Brady Eidson.
497
498         * platform/network/ResourceHandle.h:
499         Removed ResourceHandle::didSendBodyDataDelegateExists().
500
501         * platform/network/mac/FormDataStreamMac.h:
502         * platform/network/mac/FormDataStreamMac.mm:
503         Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation
504         added support for it.
505
506         * platform/network/mac/ResourceHandleMac.mm:
507         (WebCore::ResourceHandle::start):
508         (WebCore::ResourceHandle::cancel):
509         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
510         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
511         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
512         We no longer need to associate streams with ResourceHandles!
513
514 2012-03-26  Adam Klein  <adamk@chromium.org>
515
516         V8RecursionScope should not hold a raw pointer to ScriptExecutionContext
517         https://bugs.webkit.org/show_bug.cgi?id=82222
518
519         Reviewed by Eric Seidel.
520
521         Instead of holding onto ScriptExecutionContext, cache the boolean value we
522         care about (context->isDocument()). This avoids problems if the
523         context goes away as a result of the script we just ran.
524
525         Test: fast/frames/subframe-load-js-url-crash.html
526
527         * bindings/v8/V8RecursionScope.cpp:
528         (WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached
529         bool instead of calling into the context.
530         * bindings/v8/V8RecursionScope.h:
531         (WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from
532         the constructor and cache the result.
533         (WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass
534         anything to didLeaveScriptContext since it's now a member.
535         (V8RecursionScope): Make didLeaveScriptContext a member function and
536         remove its argument. Add member bool to hold the value of isDocument.
537
538 2012-03-26  Dana Jansens  <danakj@chromium.org>
539
540         [chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
541         https://bugs.webkit.org/show_bug.cgi?id=82239
542
543         Reviewed by Adrienne Walker.
544
545         The assert is incorrect and should check the animation state on
546         the surface, not the owning layer.
547
548         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
549         (WebCore::CCLayerTreeHost::updateCompositorResources):
550
551 2012-03-26  Levi Weintraub  <leviw@chromium.org>
552
553         Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem
554         https://bugs.webkit.org/show_bug.cgi?id=82179
555
556         Reviewed by Julien Chaffraix.
557
558         Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also
559         adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details.
560
561         No new tests. No change in behavior.
562
563         * rendering/RenderFieldset.cpp:
564         (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror
565         the actual coordinates we paint.
566         (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the
567         sub-pixel build.
568         * rendering/RenderMenuList.cpp:
569         (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect.
570         (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header.
571         (WebCore::RenderMenuList::clientPaddingRight): Ditto.
572
573 2012-03-26  Dan Bernstein  <mitz@apple.com>
574
575         Tried to fix an unused parameter warning after r112154.
576
577         * rendering/RenderFlexibleBox.cpp:
578         (WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to
579         layoutFlexItems.
580         (WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter.
581         * rendering/RenderFlexibleBox.h:
582
583 2012-03-26  Rob Arnold  <robarnold@fb.com>
584
585         SyntheticStyleCalc on an element should not force recalculation on its children
586         https://bugs.webkit.org/show_bug.cgi?id=79389
587
588         Reviewed by Simon Fraser.
589
590         No new tests. Existing tests cover correctness, not sure how to test for performance.
591
592         * dom/Element.cpp:
593         (WebCore::Element::recalcStyle):
594
595 2012-03-26  Tony Chang  <tony@chromium.org>
596
597         apply cross axis constraints before aligning children in flexbox
598         https://bugs.webkit.org/show_bug.cgi?id=82240
599
600         Reviewed by Ojan Vafai.
601
602         We weren't applying max-height constraints before aligning children.
603         This would cause center, end, stretch alignment to be wrong if we hit
604         a max-height on a flexbox.
605
606         This patch also moves the repositioning logic to happen after
607         computeLogicalHeight, which will be useful for flex-line-pack.
608
609         New test case in css3/flexbox/flex-align.html
610
611         * rendering/RenderFlexibleBox.cpp:
612         (WebCore::RenderFlexibleBox::layoutBlock):
613         (WebCore::RenderFlexibleBox::layoutFlexItems):
614         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
615         * rendering/RenderFlexibleBox.h:
616
617 2012-03-26  Anders Carlsson  <andersca@apple.com>
618
619         Find in page overlay and bouncy are not always positioned correctly
620         https://bugs.webkit.org/show_bug.cgi?id=82247
621         <rdar://problem/10866139>
622
623         Reviewed by Sam Weinig.
624
625         In WebCore, a lot of code depends on scroll position updates to happen synchronously, so
626         update the frame view scroll position before asking the scrolling thread to scroll.
627
628         * page/scrolling/ScrollingCoordinator.cpp:
629         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
630
631 2012-03-26  Nate Chapin  <japhet@chromium.org>
632
633         Simplify setting loading state in DocumentLoader
634         https://bugs.webkit.org/show_bug.cgi?id=82099
635
636         Reviewed by Adam Barth.
637
638         The logic for deciding what to return for DocumentLoader::isLoading()
639         is crazy. It's indirectly based on the ResourceLoaders that have
640         registered themselves with the DocumentLoader, but we can make that
641         relationship more direct.
642
643         * loader/DocumentLoader.cpp:
644         (WebCore::DocumentLoader::checkLoadComplete): Renamed from updateLoading, since it's not actually
645             updating anything anymore. It now calls DOMWindow::finishedLoading() if loading is in fact done.
646         (WebCore::DocumentLoader::startLoadingMainResource): The only reason this had a return value was to call
647             updateLoading() if loading failed. Just call checkLoadComplete() directly (this allows it to
648             be private, whereas updateLoading() was public).
649         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
650         * loader/DocumentLoader.h:
651         (WebCore::DocumentLoader::isLoading): Rather than holding a separate bool, return based on the presence
652             of non-multipart ResourceLoaders directly.
653         * loader/FrameLoader.cpp:
654         (WebCore::FrameLoader::isLoading): Depend on DocumentLoader::isLoading() for the activeDocumentLoader(),
655             rather than indirectly the other way around.
656         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Remove several assertions that should now be
657             absolutely identical to the remaining !pdl->isLoading().
658         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
659
660 2012-03-26  James Robinson  <jamesr@chromium.org>
661
662         Scrollable plugins not registered properly in ScrollingCoordinator
663         https://bugs.webkit.org/show_bug.cgi?id=82163
664
665         Reviewed by Anders Carlsson.
666
667         Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.
668
669         * page/scrolling/ScrollingCoordinator.cpp:
670         (WebCore::computeNonFastScrollableRegion):
671         (WebCore::ScrollingCoordinator::nonFastScrollableRegion):
672         (WebCore):
673         * page/scrolling/ScrollingCoordinator.h:
674         (ScrollingCoordinator):
675         * plugins/PluginViewBase.h:
676         (WebCore::PluginViewBase::scrollable):
677         (PluginViewBase):
678
679 2012-03-26  Joone Hur  <joone.hur@collabora.co.uk>
680
681         [GTK] Build fix for Accelerated Compositing with Clutter
682         https://bugs.webkit.org/show_bug.cgi?id=81785
683
684         Reviewed by Martin Robinson.
685
686         AcceleratedCompositingContext was introduced to isolate different accelerated 
687         compositing implementations(r104194), but the Clutter implementation doesn't 
688         build with it. This includes an initial implementation of GraphicsContext3D 
689         and fixes the build error.
690
691         * GNUmakefile.list.am:
692         * platform/graphics/clutter/DrawingBufferClutter.cpp: Added.
693         (WebCore):
694         (WebCore::DrawingBuffer::DrawingBuffer):
695         (WebCore::DrawingBuffer::~DrawingBuffer):
696         (WebCore::DrawingBuffer::platformColorBuffer):
697         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
698         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Added.
699         (WebCore):
700         (WebCore::GraphicsContext3D::create):
701         (WebCore::GraphicsContext3D::GraphicsContext3D):
702         (WebCore::GraphicsContext3D::~GraphicsContext3D):
703         (WebCore::GraphicsContext3D::getImageData):
704         (WebCore::GraphicsContext3D::paintToCanvas):
705         (WebCore::GraphicsContext3D::setContextLostCallback):
706         (WebCore::GraphicsContext3D::setErrorMessageCallback):
707         (WebCore::GraphicsContext3D::makeContextCurrent):
708         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
709         (WebCore::GraphicsContext3D::isGLES2Compliant):
710         (WebCore::GraphicsContext3D::platformLayer):
711         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Added.
712         (WebCore):
713         (WebCore::GraphicsContext3DPrivate::create):
714         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
715         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
716         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
717         (WebCore::GraphicsContext3DPrivate::platformContext):
718         (WebCore::GraphicsContext3DPrivate::paintToGraphicsLayerActor):
719         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Added.
720         (WebCore):
721         (GraphicsContext3DPrivate):
722         (WebCore::GraphicsContext3DPrivate::platformLayer):
723
724 2012-03-26  Peter Rybin  <prybin@chromium.org>
725
726         Web Inspector: Expose InspectorTypeBuilder.h to other components
727         https://bugs.webkit.org/show_bug.cgi?id=82226
728
729         Reviewed by Vsevolod Vlasov.
730
731         This is a provisional commit that simplifies passing ealy warning system
732         for the main patch https://bugs.webkit.org/show_bug.cgi?id=81558
733
734         * WebCore.xcodeproj/project.pbxproj: config file is changed in Xcode UI.
735
736 2012-03-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
737
738         An <area> element remains focusable even though its associated <img> is not rendered.
739         https://bugs.webkit.org/show_bug.cgi?id=71788
740
741         Reviewed by Andy Estes.
742
743         HTMLAreaElement::isFocusable() needs to consider the display and
744         visibility state.
745
746         Test: fast/events/tab-test-not-visible-imagemap.html
747
748         * html/HTMLAreaElement.cpp:
749         (WebCore::HTMLAreaElement::imageElement):
750         (WebCore::HTMLAreaElement::isFocusable):
751         * html/HTMLAreaElement.h: Make imageElement() const.
752         (HTMLAreaElement):
753
754 2012-03-26  Anton Muhin  <antonm@chromium.org>
755
756         Fix a typo in IDL
757         https://bugs.webkit.org/show_bug.cgi?id=82215
758
759         Reviewed by Adam Barth.
760
761         No new tests, just a typo fix.
762
763         * notifications/WorkerContextNotifications.idl:
764
765 2012-03-26  W. James MacLean  <wjmaclean@chromium.org>
766
767         [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.
768         https://bugs.webkit.org/show_bug.cgi?id=82133
769
770         Reviewed by James Robinson.
771
772         Covered by existing unit tests.
773
774         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
775         (WebCore::CCLayerTreeHostImpl::scrollBegin):
776
777 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
778
779         CSS3 calc: mixed percent/absolute for box-reflect
780         https://bugs.webkit.org/show_bug.cgi?id=82161
781
782         Reviewed by Ojan Vafai.
783
784         Tests: css3/calc/box-reflect-expected.html
785                css3/calc/box-reflect.html
786
787         * css/CSSStyleSelector.cpp:
788         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
789
790 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
791
792         CSS3 calc: mixed percent/absolute support for vertical-align
793         https://bugs.webkit.org/show_bug.cgi?id=82152
794
795         Reviewed by Ojan Vafai.
796
797         Tests: css3/calc/vertical-align-expected.html
798                css3/calc/vertical-align.html
799
800         * css/CSSStyleApplyProperty.cpp:
801         (WebCore::ApplyPropertyVerticalAlign::applyValue):
802
803 2012-03-26  Filip Spacek  <fspacek@rim.com>
804
805         [BlackBerry] Accelerated compositing updates
806         https://bugs.webkit.org/show_bug.cgi?id=82058
807
808         Reviewed by Rob Buis.
809
810         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
811         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
812         (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
813         (WebCore::CanvasLayerWebKitThread::setDevice):
814         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
815         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
816         (WebCore::CanvasLayerWebKitThread::create):
817         (CanvasLayerWebKitThread):
818         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
819         (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
820         (WebCore::InstrumentedPlatformCanvas::save):
821         (WebCore::InstrumentedPlatformCanvas::saveLayer):
822         (WebCore::InstrumentedPlatformCanvas::restore):
823         (WebCore::InstrumentedPlatformCanvas::translate):
824         (WebCore::InstrumentedPlatformCanvas::scale):
825         (WebCore::InstrumentedPlatformCanvas::rotate):
826         (WebCore::InstrumentedPlatformCanvas::skew):
827         (WebCore::InstrumentedPlatformCanvas::concat):
828         (WebCore::InstrumentedPlatformCanvas::setMatrix):
829         (WebCore::InstrumentedPlatformCanvas::clipRect):
830         (WebCore::InstrumentedPlatformCanvas::clipPath):
831         (WebCore::InstrumentedPlatformCanvas::clipRegion):
832         (WebCore::InstrumentedPlatformCanvas::clear):
833         (WebCore::InstrumentedPlatformCanvas::drawPaint):
834         (WebCore::InstrumentedPlatformCanvas::drawPoints):
835         (WebCore::InstrumentedPlatformCanvas::drawRect):
836         (WebCore::InstrumentedPlatformCanvas::drawPath):
837         (WebCore::InstrumentedPlatformCanvas::drawBitmap):
838         (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
839         (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
840         (WebCore::InstrumentedPlatformCanvas::drawSprite):
841         (WebCore::InstrumentedPlatformCanvas::drawText):
842         (WebCore::InstrumentedPlatformCanvas::drawPosText):
843         (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
844         (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
845         (WebCore::InstrumentedPlatformCanvas::drawPicture):
846         (WebCore::InstrumentedPlatformCanvas::drawVertices):
847         (WebCore::InstrumentedPlatformCanvas::drawData):
848         * platform/graphics/blackberry/LayerData.h:
849         (WebCore::LayerData::LayerData):
850         (WebCore::LayerData::needsTexture):
851         (LayerData):
852         * platform/graphics/blackberry/LayerTiler.cpp:
853         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
854         * platform/graphics/blackberry/LayerWebKitThread.cpp:
855         (WebCore::LayerWebKitThread::paintContents):
856         (WebCore::LayerWebKitThread::setDrawable):
857         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
858         (WebCore::loadBufferingImageData):
859         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
860         (WebCore):
861         (ImageBufferData):
862
863 2012-03-26  Stephen Chenney  <schenney@chromium.org>
864
865         Failure to invalidate text position attributes when DOM changes
866         https://bugs.webkit.org/show_bug.cgi?id=81464
867
868         Reviewed by Nikolas Zimmermann.
869
870         The text positioning elements data structure in RenderSVGText must be
871         updated when either the children of the corresponding element are
872         modified, or the length of the text inside the elements changes.
873         Previously, the call to clear the text positioning elements (to force
874         recomputation) was guarded by a flag. If code tried to invalidate when
875         the flag was not set, then something set the flag, the elements would
876         be invalid at use time.
877
878         This patch modifies the method that invalidates the positining
879         attributes so that the action always happens. It also renames the
880         method to more accurately reflect its function.
881
882         Test: svg/custom/delete-modified-text-in-defs-crash.svg
883
884         * rendering/svg/RenderSVGInlineText.cpp:
885         (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements
886         * rendering/svg/RenderSVGText.cpp:
887         (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename
888         textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag.
889         * rendering/svg/RenderSVGText.h:
890         (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements
891         * svg/SVGAElement.cpp:
892         (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
893         * svg/SVGTextContentElement.cpp:
894         (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
895
896 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
897
898         REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
899         https://bugs.webkit.org/show_bug.cgi?id=81802
900
901         Reviewed by Dan Bernstein.
902
903         Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
904
905         Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
906
907         This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
908         the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
909
910         * rendering/RenderTextControlSingleLine.cpp:
911         (WebCore::RenderTextControlSingleLine::layout):
912         For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
913         on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
914
915 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
916
917         REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
918         https://bugs.webkit.org/show_bug.cgi?id=80531
919
920         Reviewed by Ojan Vafai.
921
922         Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
923
924         The existing code would happily query layout information before calling layout (FTW!).
925         The solution is to properly layout our object, then modify some dimensions as needed while
926         marking ourself as needing layout and then layouting again.
927
928         * rendering/RenderTextControlSingleLine.cpp:
929         (WebCore::RenderTextControlSingleLine::layout):
930         Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
931         - layoutBlock handles automatically logical height changes.
932         - we were not modifying the logical width between layouts so we don't need to force a
933         child relayout in this case.
934
935 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
936
937         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
938         https://bugs.webkit.org/show_bug.cgi?id=79873
939
940         Reviewed by Rob Buis.
941
942         Initial upstream, no new tests.
943
944         * platform/graphics/blackberry/LayerCompositingThread.cpp: Added.
945         (WebCore):
946         (WebCore::LayerCompositingThread::create):
947         (WebCore::LayerCompositingThread::LayerCompositingThread):
948         (WebCore::LayerCompositingThread::~LayerCompositingThread):
949         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
950         (WebCore::LayerCompositingThread::setLayerRenderer):
951         (WebCore::LayerCompositingThread::deleteTextures):
952         (WebCore::LayerCompositingThread::setDrawTransform):
953         (WebCore::getTransformedRect):
954         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
955         (WebCore::LayerCompositingThread::drawTextures):
956         (WebCore::LayerCompositingThread::drawSurface):
957         (WebCore::LayerCompositingThread::drawMissingTextures):
958         (WebCore::LayerCompositingThread::releaseTextureResources):
959         (WebCore::LayerCompositingThread::setPluginView):
960         (WebCore::LayerCompositingThread::setMediaPlayer):
961         (WebCore::LayerCompositingThread::clearAnimations):
962         (WebCore::LayerCompositingThread::removeSublayer):
963         (WebCore::LayerCompositingThread::indexOfSublayer):
964         (WebCore::LayerCompositingThread::rootLayer):
965         (WebCore::LayerCompositingThread::removeFromSuperlayer):
966         (WebCore::LayerCompositingThread::setSublayers):
967         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
968         (WebCore::LayerCompositingThread::setVisible):
969         (WebCore::LayerCompositingThread::setNeedsCommit):
970         (WebCore::LayerCompositingThread::scheduleCommit):
971         (WebCore::LayerCompositingThread::updateAnimations):
972         (WebCore::LayerCompositingThread::hasVisibleHolePunchRect):
973         (WebCore::LayerCompositingThread::createLayerRendererSurface):
974         * platform/graphics/blackberry/LayerCompositingThread.h: Added.
975         (Graphics):
976         (WebCore):
977         (LayerCompositingThread):
978         (WebCore::LayerCompositingThread::bindContentsTexture):
979         (WebCore::LayerCompositingThread::getSublayers):
980         (WebCore::LayerCompositingThread::setSuperlayer):
981         (WebCore::LayerCompositingThread::superlayer):
982         (WebCore::LayerCompositingThread::drawTransform):
983         (WebCore::LayerCompositingThread::setDrawOpacity):
984         (WebCore::LayerCompositingThread::drawOpacity):
985         (WebCore::LayerCompositingThread::layerRendererSurface):
986         (WebCore::LayerCompositingThread::clearLayerRendererSurface):
987         (WebCore::LayerCompositingThread::setMaskLayer):
988         (WebCore::LayerCompositingThread::maskLayer):
989         (WebCore::LayerCompositingThread::setReplicaLayer):
990         (WebCore::LayerCompositingThread::replicaLayer):
991         (WebCore::LayerCompositingThread::getDrawRect):
992         (WebCore::LayerCompositingThread::getTransformedBounds):
993         (WebCore::LayerCompositingThread::hasMissingTextures):
994         (WebCore::LayerCompositingThread::isDirty):
995         (WebCore::LayerCompositingThread::isVisible):
996         (WebCore::LayerCompositingThread::setOpacity):
997         (WebCore::LayerCompositingThread::setTransform):
998         (WebCore::LayerCompositingThread::hasRunningAnimations):
999         (WebCore::LayerCompositingThread::numSublayers):
1000
1001 2012-03-26  Kent Tamura  <tkent@chromium.org>
1002
1003         Add a notification function for detaching to TextFieldDecorator
1004         https://bugs.webkit.org/show_bug.cgi?id=82142
1005
1006         Reviewed by Dimitri Glazkov.
1007
1008         Add willDetach() functio to TextFieldDecorator. This will be
1009         needed if a decorator opens a popup UI on handleClick(), and the
1010         popup UI should be closed when the attaching text field is
1011         detached.
1012
1013         No new tests because of no behavior changes in any platforms.
1014
1015         * html/shadow/TextFieldDecorationElement.cpp:
1016         (WebCore::TextFieldDecorationElement::hostInput):
1017         Added. A utilify function to get an HTMLInputElement*.
1018         (WebCore::TextFieldDecorationElement::updateImage): Use hostInput().
1019         (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto.
1020         (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach().
1021         (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput().
1022         * html/shadow/TextFieldDecorationElement.h:
1023         (TextFieldDecorator):
1024         (TextFieldDecorationElement):
1025
1026 2012-03-26  Dan Bernstein  <mitz@apple.com>
1027
1028         Tried to fix the 32-bit build after r112021.
1029
1030         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1031         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1032
1033 2012-03-26  Leo Yang  <leo.yang@torchmobile.com.cn>
1034
1035         [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
1036         https://bugs.webkit.org/show_bug.cgi?id=82157
1037
1038         Reviewed by Rob Buis.
1039
1040         AsyncFileSystemBlackBerry is responsible for asynchronous operating
1041         on file system for the blackberry porting. It's just skeleton code
1042         containing no implementation yet.
1043
1044         No new tests because of skeleton code.
1045
1046         * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
1047         * platform/AsyncFileSystem.cpp:
1048         (WebCore):
1049         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
1050         (WebCore):
1051         (WebCore::AsyncFileSystem::isAvailable):
1052         (WebCore::AsyncFileSystem::isValidType):
1053         (WebCore::AsyncFileSystem::create):
1054         (WebCore::AsyncFileSystem::openFileSystem):
1055         (WebCore::AsyncFileSystem::crackFileSystemURL):
1056         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
1057         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
1058         (WebCore::AsyncFileSystemBlackBerry::toURL):
1059         (WebCore::AsyncFileSystemBlackBerry::move):
1060         (WebCore::AsyncFileSystemBlackBerry::copy):
1061         (WebCore::AsyncFileSystemBlackBerry::remove):
1062         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
1063         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
1064         (WebCore::AsyncFileSystemBlackBerry::createFile):
1065         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
1066         (WebCore::AsyncFileSystemBlackBerry::fileExists):
1067         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
1068         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
1069         (WebCore::AsyncFileSystemBlackBerry::createWriter):
1070         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
1071         * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
1072         (WebCore):
1073         (AsyncFileSystemBlackBerry):
1074
1075 2012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1076
1077         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
1078         https://bugs.webkit.org/show_bug.cgi?id=82204
1079
1080         Reviewed by Rob Buis.
1081
1082         Implemented encryptedString() and decryptedString() in class CredentialBackingStore
1083         by calling BlackBerry::Platform::Encryptor::encryptString() and
1084         BlackBerry::Platform::Encryptor::encryptString() respectively.
1085
1086         No new tests.
1087
1088         * platform/network/blackberry/CredentialBackingStore.cpp:
1089         (WebCore::CredentialBackingStore::encryptedString):
1090         (WebCore::CredentialBackingStore::decryptedString):
1091
1092 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
1093
1094         Web Inspector: 'use strict' exceptions stop in inspector code
1095         https://bugs.webkit.org/show_bug.cgi?id=82199
1096
1097         Reviewed by Yury Semikhatsky.
1098
1099         Accessing callee from within InjectedScript made inspector stop on handled exceptions.
1100         I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
1101
1102         * inspector/InjectedScriptSource.js:
1103
1104 2012-03-26  Mihai Balan  <mibalan@adobe.com>
1105
1106         [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
1107         https://bugs.webkit.org/show_bug.cgi?id=81901
1108
1109         Reviewed by Antti Koivisto.
1110
1111         Right now CSS rules position does not take into account rules that are inside a @-webkit-region
1112         declaration, leading to buggy behavior where rules that appear later in the document are superseded
1113         by rules that appear earlier in the document (opposite as how things should be). The fix updates
1114         the "global" rules counter once the rules in a @-webkit-region declaration have been added.
1115
1116         Tests: fast/regions/region-style-rule-position-expected.html
1117                fast/regions/region-style-rule-position.html
1118
1119         * css/CSSStyleSelector.cpp:
1120         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1121
1122 2012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
1123
1124         [Qt] Disable focus ring in the mobile theme.
1125         https://bugs.webkit.org/show_bug.cgi?id=81934
1126
1127         For mobile devices intended to be used only through
1128         touch, the focus rings makes little sense and feels
1129         awkward.
1130
1131         Reviewed by Kenneth Rohde Christiansen.
1132
1133         No new tests. This is merely a cosmetic touch.
1134
1135         * platform/qt/RenderThemeQtMobile.h:
1136         (RenderThemeQtMobile):
1137         (WebCore::RenderThemeQtMobile::platformFocusRingColor):
1138
1139 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1140
1141         [BlackBerry] Clean up networking code and remove WML support.
1142         https://bugs.webkit.org/show_bug.cgi?id=82170
1143
1144         Reviewed by Rob Buis.
1145
1146         This just removes the WML support of BlackBerry porting, which is already 
1147         removed from WebCore. No new tests needed.
1148
1149         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
1150         (WebCore):
1151         * platform/network/blackberry/DeferredData.cpp:
1152         (WebCore::DeferredData::DeferredData):
1153         (WebCore::DeferredData::processDeferredData):
1154         * platform/network/blackberry/DeferredData.h:
1155         (DeferredData):
1156         (WebCore::DeferredData::hasDeferredData):
1157         * platform/network/blackberry/NetworkJob.cpp:
1158         * platform/network/blackberry/NetworkJob.h:
1159         (NetworkJob):
1160         * platform/network/blackberry/ResourceResponse.h:
1161         (WebCore::ResourceResponse::ResourceResponse):
1162         (ResourceResponse):
1163         * platform/network/blackberry/ResourceResponseBlackBerry.cpp:
1164         (WebCore::ResourceResponse::doPlatformCopyData):
1165         (WebCore::ResourceResponse::doPlatformAdopt):
1166
1167 2012-03-26  Philip Rogers  <pdr@google.com>
1168
1169         Add invalid bounding box concept to SVG containers
1170         https://bugs.webkit.org/show_bug.cgi?id=81104
1171
1172         Reviewed by Nikolas Zimmermann.
1173
1174         An empty <g> element needs to use an invalid bounding box because
1175         an empty bounding box isn't the default state. This change
1176         introduces the concept of an invalid object bounding box for
1177         both RenderSVGContainer and RenderSVGRoot. Code that
1178         does not explicitly check that the bounding box is valid
1179         should be unaffected by this change. We use this new invalid
1180         flag in computeContainerBoundingBoxes so that we do not
1181         include invalid bounding boxes.
1182
1183         This change also contains a small fix in
1184         RenderSVGContainer::toRenderSVGContainer which depended on
1185         RenderSVGViewportContainer not inheriting from RenderSVGContainer,
1186         which it now does.
1187
1188         Test: svg/custom/getBBox-empty-container.html
1189
1190         * rendering/svg/RenderSVGContainer.cpp:
1191         (WebCore::RenderSVGContainer::RenderSVGContainer):
1192         (WebCore::RenderSVGContainer::updateCachedBoundaries):
1193         * rendering/svg/RenderSVGContainer.h:
1194         (WebCore::RenderSVGContainer::isObjectBoundingBoxValid):
1195         (RenderSVGContainer):
1196         (WebCore::toRenderSVGContainer):
1197         * rendering/svg/RenderSVGRoot.cpp:
1198         (WebCore::RenderSVGRoot::RenderSVGRoot):
1199         (WebCore::RenderSVGRoot::updateCachedBoundaries):
1200         * rendering/svg/RenderSVGRoot.h:
1201         (RenderSVGRoot):
1202         * rendering/svg/SVGRenderSupport.cpp:
1203         (WebCore):
1204         (WebCore::updateObjectBoundingBox):
1205         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
1206         * rendering/svg/SVGRenderSupport.h:
1207         (SVGRenderSupport):
1208
1209 2012-03-26  Alexei Filippov  <alexeif@chromium.org>
1210
1211         Web Inspector: Speed up the retainers build phase.
1212         https://bugs.webkit.org/show_bug.cgi?id=81763
1213
1214         Replacing the edge iterator in retainers building phase
1215         makes it run 10 times faster (400 ms vs. 4 sec).
1216
1217         Reviewed by Yury Semikhatsky.
1218
1219         * inspector/front-end/HeapSnapshot.js:
1220         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1221
1222 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
1223
1224         Web Inspector: Migrate InspectorCSSAgent to strict protocol types
1225         https://bugs.webkit.org/show_bug.cgi?id=81923
1226
1227         Reviewed by Pavel Feldman.
1228
1229         No new tests, as this is a refactoring.
1230
1231         * inspector/CodeGeneratorInspector.py:
1232         * inspector/InspectorCSSAgent.cpp:
1233         (SelectorProfile):
1234         (WebCore::SelectorProfile::toInspectorObject):
1235         (WebCore::InspectorCSSAgent::clearFrontend):
1236         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1237         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1238         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1239         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1240         (WebCore::InspectorCSSAgent::getStyleSheet):
1241         (WebCore::InspectorCSSAgent::setPropertyText):
1242         (WebCore::InspectorCSSAgent::toggleProperty):
1243         (WebCore::InspectorCSSAgent::setRuleSelector):
1244         (WebCore::InspectorCSSAgent::addRule):
1245         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1246         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
1247         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
1248         (WebCore::InspectorCSSAgent::collectStyleSheets):
1249         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1250         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
1251         * inspector/InspectorCSSAgent.h:
1252         (InspectorCSSAgent):
1253         * inspector/InspectorStyleSheet.cpp:
1254         (WebCore::buildSourceRangeObject):
1255         (WebCore::buildMediaObject):
1256         (WebCore::fillMediaListChain):
1257         (WebCore::InspectorStyle::buildObjectForStyle):
1258         (WebCore::InspectorStyle::buildArrayForComputedStyle):
1259         (WebCore::InspectorStyle::styleWithProperties):
1260         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1261         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
1262         (WebCore::InspectorStyleSheet::buildObjectForRule):
1263         (WebCore::InspectorStyleSheet::buildObjectForStyle):
1264         * inspector/InspectorStyleSheet.h:
1265         (WebCore::InspectorCSSId::asProtocolValue):
1266         (InspectorStyle):
1267         (InspectorStyleSheet):
1268
1269 2012-03-26  Alexander Pavlov  <apavlov@chromium.org>
1270
1271         Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken
1272         https://bugs.webkit.org/show_bug.cgi?id=82191
1273
1274         Reviewed by Vsevolod Vlasov.
1275
1276         Test: http/tests/inspector/modify-cross-domain-rule.html
1277
1278         * inspector/InspectorStyleSheet.cpp:
1279         (WebCore::asCSSRuleList):
1280         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1281
1282 2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1283
1284         Unreviewed. Fix make distcheck.
1285
1286         * GNUmakefile.list.am: Add missing files.
1287
1288 2012-03-26  Jason Liu  <jason.liu@torchmobile.com.cn>
1289
1290         [BlackBerry] Cookies mismatch when login to gmail.
1291         https://bugs.webkit.org/show_bug.cgi?id=82165
1292
1293         Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
1294         in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
1295         for redirection loading.
1296
1297         This issue didn't happen before because we used m_cookieData not the cookie header.
1298         Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
1299
1300         Reviewed by George Staikos.
1301
1302         No new tests. It is a refactoring issue.
1303
1304         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
1305         (WebCore::ResourceRequest::initializePlatformRequest):
1306
1307 2012-03-26  Alexis Menard  <alexis.menard@openbossa.org>
1308
1309         Increase code sharing between StylePropertySet and CSSPropertyLonghand.
1310         https://bugs.webkit.org/show_bug.cgi?id=81960
1311
1312         Reviewed by Antti Koivisto.
1313
1314         Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order
1315         to avoid code duplication.
1316
1317         No new tests : refactoring only, we shouldn't have any behavior difference.
1318
1319         * css/CSSPropertyLonghand.cpp:
1320         (WebCore::backgroundLonghand):
1321         Re-order the array to match the spec default order.
1322         (WebCore::webkitMaskLonghand):
1323         Re-order to match the original order.
1324         (WebCore::webkitTransformOriginLonghand):
1325         A LayoutTest shows that a property was missing.
1326         * css/StylePropertySet.cpp:
1327         (WebCore::StylePropertySet::getPropertyValue):
1328         (WebCore::StylePropertySet::borderSpacingValue):
1329         (WebCore::StylePropertySet::get4Values):
1330         (WebCore::StylePropertySet::getLayeredShorthandValue):
1331         (WebCore::StylePropertySet::getShorthandValue):
1332         (WebCore::StylePropertySet::getCommonValue):
1333         (WebCore::StylePropertySet::asText):
1334         * css/StylePropertySet.h:
1335         (WebCore):
1336         (StylePropertySet):
1337
1338 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1339
1340         [Qt] Assert in GestureTapHighlighter.
1341         https://bugs.webkit.org/show_bug.cgi?id=82187
1342
1343         Reviewed by Kenneth Rohde Christiansen.
1344
1345         Adjust the boundaries of the center-rect before performing the intersection test,
1346         since adjusting the boundary may cause a new intersection.
1347
1348         * page/GestureTapHighlighter.cpp:
1349
1350 2012-03-26  Antti Koivisto  <antti@apple.com>
1351
1352         Split MediaList into internal and CSSOM types
1353         https://bugs.webkit.org/show_bug.cgi?id=82149
1354
1355         Reviewed by Andread Kling.
1356
1357         MediaList is a CSSOM type and should not be used internally.
1358         
1359         - Use new type MediaQuerySet internally to represent a collection of media queries.
1360         - Create MediaList wrapper on-demand for CSSOM purposes only.
1361         
1362         This moves us forward in separating CSSOM from the internal stylesheet implementation.
1363         
1364         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
1365         
1366         * css/CSSGrammar.y:
1367         * css/CSSImportRule.cpp:
1368         (WebCore::CSSImportRule::create):
1369         (WebCore):
1370         (WebCore::CSSImportRule::CSSImportRule):
1371         (WebCore::CSSImportRule::~CSSImportRule):
1372         (WebCore::CSSImportRule::media):
1373         (WebCore::CSSImportRule::cssText):
1374         * css/CSSImportRule.h:
1375         (WebCore):
1376         (CSSImportRule):
1377         (WebCore::CSSImportRule::mediaQueries):
1378         * css/CSSMediaRule.cpp:
1379         (WebCore::CSSMediaRule::CSSMediaRule):
1380         (WebCore::CSSMediaRule::~CSSMediaRule):
1381         (WebCore::CSSMediaRule::cssText):
1382         * css/CSSMediaRule.h:
1383         (WebCore::CSSMediaRule::create):
1384         (WebCore::CSSMediaRule::media):
1385         (WebCore::CSSMediaRule::mediaQueries):
1386         (CSSMediaRule):
1387         * css/CSSParser.cpp:
1388         (WebCore::CSSParser::parseMediaQuery):
1389         (WebCore::CSSParser::createMediaQuerySet):
1390         (WebCore::CSSParser::createImportRule):
1391         (WebCore::CSSParser::createMediaRule):
1392         (WebCore::CSSParser::updateLastMediaLine):
1393         * css/CSSParser.h:
1394         (WebCore):
1395         (CSSParser):
1396         * css/CSSStyleSelector.cpp:
1397         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1398         * css/CSSStyleSheet.cpp:
1399         (WebCore):
1400         (WebCore::CSSStyleSheet::media):
1401         (WebCore::CSSStyleSheet::setMediaQueries):
1402         * css/CSSStyleSheet.h:
1403         (WebCore):
1404         (CSSStyleSheet):
1405         (WebCore::CSSStyleSheet::mediaQueries):
1406         * css/MediaList.cpp:
1407         (WebCore):
1408         (WebCore::MediaQuerySet::MediaQuerySet):
1409         (WebCore::MediaQuerySet::~MediaQuerySet):
1410         (WebCore::parseMediaDescriptor):
1411         (WebCore::MediaQuerySet::parse):
1412         (WebCore::MediaQuerySet::add):
1413         (WebCore::MediaQuerySet::remove):
1414         (WebCore::MediaQuerySet::addMediaQuery):
1415         (WebCore::MediaQuerySet::mediaText):
1416         (WebCore::MediaQuerySet::ensureMediaList):
1417         
1418             - Use OwnPtr<> for MediaQuery ownership.
1419             - Move the appropriate functions to MediaQuerySet.
1420             - Clean up a bit to make this more readable and better aligned to WebKit style.
1421         
1422         (WebCore::MediaList::MediaList):
1423         (WebCore::MediaList::~MediaList):
1424         (WebCore::MediaList::setMediaText):
1425         (WebCore::MediaList::item):
1426         (WebCore::MediaList::deleteMedium):
1427         (WebCore::MediaList::appendMedium):
1428         * css/MediaList.h:
1429         (WebCore):
1430         (WebCore::MediaQuerySet::create):
1431         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
1432         (MediaQuerySet):
1433         (WebCore::MediaQuerySet::queryVector):
1434         (WebCore::MediaQuerySet::lastLine):
1435         (WebCore::MediaQuerySet::setLastLine):
1436         (MediaList):
1437         (WebCore::MediaList::ref):
1438         (WebCore::MediaList::deref):
1439         (WebCore::MediaList::length):
1440         (WebCore::MediaList::mediaText):
1441         (WebCore::MediaList::queries):
1442         * css/MediaQueryEvaluator.cpp:
1443         (WebCore::MediaQueryEvaluator::eval):
1444         * css/MediaQueryEvaluator.h:
1445         (WebCore):
1446         (MediaQueryEvaluator):
1447         * css/MediaQueryList.cpp:
1448         (WebCore::MediaQueryList::create):
1449         (WebCore::MediaQueryList::MediaQueryList):
1450         * css/MediaQueryList.h:
1451         (WebCore):
1452         (MediaQueryList):
1453         * css/MediaQueryMatcher.cpp:
1454         (WebCore::MediaQueryMatcher::evaluate):
1455         (WebCore::MediaQueryMatcher::matchMedia):
1456         * css/MediaQueryMatcher.h:
1457         (WebCore):
1458         (MediaQueryMatcher):
1459         * css/StyleMedia.cpp:
1460         (WebCore::StyleMedia::matchMedium):
1461         * css/StyleSheet.cpp:
1462         (WebCore::StyleSheet::~StyleSheet):
1463         
1464             Move the media query ownership to CSSStyleSheet where it belongs.
1465         
1466         (WebCore):
1467         * css/StyleSheet.h:
1468         (WebCore::StyleSheet::media):
1469         (StyleSheet):
1470         * dom/DOMImplementation.cpp:
1471         (WebCore::DOMImplementation::createCSSStyleSheet):
1472         * dom/ProcessingInstruction.cpp:
1473         (WebCore::ProcessingInstruction::setCSSStyleSheet):
1474         * dom/StyleElement.cpp:
1475         (WebCore::StyleElement::createSheet):
1476         * html/HTMLLinkElement.cpp:
1477         (WebCore::HTMLLinkElement::process):
1478         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1479         * html/HTMLMediaElement.cpp:
1480         (WebCore::HTMLMediaElement::selectNextSourceChild):
1481         * html/parser/HTMLPreloadScanner.cpp:
1482         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
1483         * inspector/InspectorStyleSheet.cpp:
1484         (WebCore::buildMediaObject):
1485
1486 2012-03-26  Zeno Albisser  <zeno@webkit.org>
1487
1488         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
1489         https://bugs.webkit.org/show_bug.cgi?id=82178
1490
1491         If TextureMapperShaderManager already has a reference to an instance of the
1492         requested shader program type, this instance should be reused instead of
1493         creating a new one.
1494
1495         Reviewed by Noam Rosenthal.
1496
1497         * platform/graphics/texmap/TextureMapperShaderManager.h:
1498         (WebCore::TextureMapperShaderManager::getShaderProgram):
1499
1500 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
1501
1502         [Chromium] Web Inspector: dedicated worker inspector is empty
1503         https://bugs.webkit.org/show_bug.cgi?id=82181
1504
1505         "beforeunload" event for worker inspector front-end is ingnored if the
1506         window url is "about:blank" as it is just unload of the default content
1507         before the front-end page load.
1508
1509         Reviewed by Pavel Feldman.
1510
1511         * inspector/front-end/WorkerManager.js:
1512         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
1513
1514 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
1515
1516         Web Inspector: split nodes and containment edges into two different arrays
1517         https://bugs.webkit.org/show_bug.cgi?id=81930
1518
1519         Extract heap profile nodes and edges into two separate arrays. This
1520         way we will have a continuous array of the heap graph nodes and can
1521         aviod additional mapping between node index and its position in the
1522         heap snapshot.
1523
1524         Reviewed by Pavel Feldman.
1525
1526         * inspector/front-end/HeapSnapshot.js:
1527         (WebInspector.HeapSnapshot.prototype._init):
1528         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
1529         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
1530         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
1531         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
1532         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
1533         * inspector/front-end/HeapSnapshotProxy.js:
1534         (WebInspector.HeapSnapshotWorker):
1535
1536 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
1537
1538         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
1539         https://bugs.webkit.org/show_bug.cgi?id=81897
1540
1541         Reviewed by Vsevolod Vlasov.
1542
1543         SourceMapParser should only deal with payload parsing.
1544
1545         * inspector/front-end/CompilerScriptMapping.js:
1546         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
1547         (WebInspector.CompilerScriptMapping.prototype.addScript):
1548         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
1549         (WebInspector.SourceMapPayload):
1550         (WebInspector.SourceMapParser):
1551         (WebInspector.SourceMapParser.prototype.sourceContent):
1552         (WebInspector.SourceMapParser.prototype.findEntry):
1553         (WebInspector.SourceMapParser.prototype.findEntryReversed):
1554         * inspector/front-end/ContentProviders.js:
1555         (WebInspector.CompilerSourceMappingContentProvider):
1556         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
1557
1558 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
1559
1560         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
1561         https://bugs.webkit.org/show_bug.cgi?id=82175
1562
1563         We were using aString.indexOf("Window") but it is not effective from performance point of view.
1564         I'm replaced it with RegExp.
1565
1566         Reviewed by Yury Semikhatsky.
1567
1568         * inspector/front-end/HeapSnapshot.js:
1569         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
1570         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
1571
1572 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
1573
1574         Web Inspector: breakpoints should be disabled while live editing JavaScript.
1575         https://bugs.webkit.org/show_bug.cgi?id=81947
1576
1577         Reviewed by Yury Semikhatsky.
1578
1579         This change disables (removes from the backend) the breakpoints while editing script.
1580         Undoing or committing the change restores the breakpoints. Main logic is implemented within
1581         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
1582         undo/redo wrapper and better detection of the noop opterations.
1583
1584         * inspector/front-end/JavaScriptSourceFrame.js:
1585         (WebInspector.JavaScriptSourceFrame):
1586         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1587         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1588         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
1589         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
1590         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
1591         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
1592         * inspector/front-end/TextEditorModel.js:
1593         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1594         * inspector/front-end/TextViewer.js:
1595         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
1596         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
1597         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
1598         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1599
1600 2012-03-25  Nat Duca  <nduca@chromium.org>
1601
1602         [chromium] Route willBeginFrame from compositor to WebWidget
1603         https://bugs.webkit.org/show_bug.cgi?id=82171
1604
1605         Reviewed by Darin Fisher.
1606
1607         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1608         (CCLayerTreeHostClient):
1609         (WebCore::CCLayerTreeHost::willBeginFrame):
1610         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1611         (WebCore::CCThreadProxy::beginFrame):
1612
1613 2012-03-25  Hayato Ito  <hayato@chromium.org>
1614
1615         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
1616         https://bugs.webkit.org/show_bug.cgi?id=79197
1617
1618         Reviewed by Dimitri Glazkov.
1619
1620         Add internal APIs which can be used to traverse Reified DOM tree, which is
1621         a result of node distribution algorithm explained in Shadow DOM spec.
1622         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
1623
1624         Every public functions defined in ReifiedTreeTraversal are static
1625         functions and are named in a similar way to ones defined in WebCore::Node class.
1626         The only difference is that ReifiedTreeTraversal APIs consider shadow
1627         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
1628         transparently.
1629
1630         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
1631         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
1632
1633         Test: fast/dom/shadow/reified-tree-traversal.html
1634
1635         * CMakeLists.txt:
1636         * GNUmakefile.list.am:
1637         * Target.pri:
1638         * WebCore.exp.in:
1639         * WebCore.gypi:
1640         * WebCore.vcproj/WebCore.vcproj:
1641         * WebCore.xcodeproj/project.pbxproj:
1642         * dom/ReifiedTreeTraversal.cpp: Added.
1643         (WebCore):
1644         (WebCore::isShadowHost):
1645         (WebCore::shadowTreeFor):
1646         (WebCore::shadowTreeOfParent):
1647         (WebCore::ReifiedTreeTraversal::firstChild):
1648         (WebCore::ReifiedTreeTraversal::lastChild):
1649         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
1650         (WebCore::ReifiedTreeTraversal::traverseChild):
1651         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
1652         (WebCore::ReifiedTreeTraversal::traverseNode):
1653         (WebCore::ReifiedTreeTraversal::nextSibling):
1654         (WebCore::ReifiedTreeTraversal::previousSibling):
1655         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
1656         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
1657         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
1658         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
1659         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
1660         (WebCore::ReifiedTreeTraversal::parentNode):
1661         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
1662         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
1663         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
1664         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
1665         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
1666         (WebCore::ReifiedTreeTraversal::traverseNextNode):
1667         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
1668         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
1669         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
1670         * dom/ReifiedTreeTraversal.h: Added.
1671         (WebCore):
1672         (ReifiedTreeTraversal):
1673         * dom/ShadowTree.cpp:
1674         (WebCore::ShadowTree::insertionPointFor):
1675         (WebCore::ShadowTree::selectionFor):
1676         (WebCore):
1677         * dom/ShadowTree.h:
1678         (WebCore):
1679         (ShadowTree):
1680         * html/shadow/HTMLContentSelector.cpp:
1681         (WebCore::HTMLContentSelector::findFor):
1682         * html/shadow/HTMLContentSelector.h:
1683         (HTMLContentSelectionSet):
1684         (WebCore::HTMLContentSelectionSet::find):
1685         (HTMLContentSelector):
1686         * html/shadow/InsertionPoint.h:
1687         (WebCore::isInsertionPoint):
1688         (WebCore::toInsertionPoint):
1689         (WebCore):
1690         * testing/Internals.cpp:
1691         (WebCore::Internals::nextSiblingInReifiedTree):
1692         (WebCore):
1693         (WebCore::Internals::firstChildInReifiedTree):
1694         (WebCore::Internals::lastChildInReifiedTree):
1695         (WebCore::Internals::traverseNextNodeInReifiedTree):
1696         (WebCore::Internals::traversePreviousNodeInReifiedTree):
1697         * testing/Internals.h:
1698         (Internals):
1699         * testing/Internals.idl:
1700
1701 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
1702
1703         Web Inspector: Indenting fully selected line should not indent the line next to it
1704         https://bugs.webkit.org/show_bug.cgi?id=81758
1705
1706         In the editor, you can select a whole line by moving caret at 0 column
1707         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
1708         indents 2 lines: fully selected one and the line next to it. The patch
1709         changes this behaviour to indent only fully selected line since that is
1710         what pretty-match all the other code editors do.
1711
1712         Reviewed by Pavel Feldman.
1713
1714         Test: inspector/editor/indentation.html
1715
1716         * inspector/front-end/TextViewer.js:
1717         (WebInspector.TextEditorMainPanel.prototype._indentLines):
1718             Do not insert indent at the begging of the last line if a selection
1719             ends on its 0 column.
1720         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
1721             Do not remove indent at the begging of the last line if a selection
1722             ends on its 0 column.
1723
1724 2012-03-25  Abhishek Arya  <inferno@chromium.org>
1725
1726         Crash in ContainerNode::resumePostAttachCallbacks.
1727         https://bugs.webkit.org/show_bug.cgi?id=82159
1728
1729         Reviewed by Hajime Morita.
1730
1731         Test: plugins/object-onfocus-mutation-crash.html
1732
1733         * dom/ContainerNode.cpp:
1734         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
1735         callbacks when our attach depth is 1 can fire mutation events such as onfocus
1736         which can blow away |this|. Need to protect it with a RefPtr.
1737         * html/HTMLPlugInImageElement.cpp:
1738         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
1739         until the function completes.
1740
1741 2012-03-25  Dana Jansens  <danakj@chromium.org>
1742
1743         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
1744         https://bugs.webkit.org/show_bug.cgi?id=82117
1745
1746         Reviewed by Adrienne Walker.
1747
1748         For animating transforms, instead of early-outing when the layer's
1749         visible rect is empty, let it prepaint regardless.
1750
1751         For now, we just only paint the outermost tiles, and only for small
1752         layers, with at most 9 tiles.
1753
1754         This changes the behaviour of ContentLayerChromium's
1755         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
1756         prepainting functions that it calls to ensure the old behaviour holds
1757         without animations, and the new behaviour works with them.
1758
1759         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
1760                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
1761                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
1762                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
1763
1764         * platform/graphics/chromium/ContentLayerChromium.cpp:
1765         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
1766         * platform/graphics/chromium/TiledLayerChromium.cpp:
1767         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
1768         (WebCore::TiledLayerChromium::needsIdlePaint):
1769         (WebCore::TiledLayerChromium::idlePaintRect):
1770         * platform/graphics/chromium/TiledLayerChromium.h:
1771         (WebCore::TiledLayerChromium::numPaintedTiles):
1772         (TiledLayerChromium):
1773
1774 2012-03-25  Antti Koivisto  <antti@apple.com>
1775
1776         Don't use CSSRuleList for child rule ownership
1777         https://bugs.webkit.org/show_bug.cgi?id=82127
1778
1779         Reviewed by Andreas Kling.
1780
1781         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
1782         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
1783         instantiated on-demand for API purposes only.
1784         
1785         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
1786           and WebKitRegionRule.
1787         - Add direct accessors, use internally instead of CSSRuleList.
1788         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
1789         - Instantiate CSSRuleLists on-demand.
1790         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
1791           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
1792           
1793         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
1794         indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead).
1795
1796         * css/CSSGrammar.y:
1797         * css/CSSMediaRule.cpp:
1798         (WebCore::CSSMediaRule::CSSMediaRule):
1799         (WebCore::CSSMediaRule::~CSSMediaRule):
1800         (WebCore::CSSMediaRule::append):
1801         (WebCore::CSSMediaRule::insertRule):
1802         (WebCore::CSSMediaRule::deleteRule):
1803         (WebCore::CSSMediaRule::cssText):
1804         (WebCore::CSSMediaRule::cssRules):
1805         * css/CSSMediaRule.h:
1806         (WebCore::CSSMediaRule::create):
1807         (CSSMediaRule):
1808         (WebCore::CSSMediaRule::ruleCount):
1809         (WebCore::CSSMediaRule::ruleAt):
1810         * css/CSSParser.cpp:
1811         (WebCore::CSSParser::createMediaRule):
1812         (WebCore::CSSParser::createRuleList):
1813         (WebCore::CSSParser::createRegionRule):
1814         * css/CSSParser.h:
1815         (WebCore):
1816         * css/CSSRuleList.cpp:
1817         (WebCore):
1818         (WebCore::StaticCSSRuleList::StaticCSSRuleList):
1819         (WebCore::StaticCSSRuleList::~StaticCSSRuleList):
1820         (WebCore::StaticCSSRuleList::deref):
1821         (WebCore::StaticCSSRuleList::item):        
1822         * css/CSSRuleList.h:
1823         (CSSRuleList):
1824
1825             Turn CSSRuleList into abstract interface.
1826                     
1827         (StaticCSSRuleList):
1828         (WebCore::StaticCSSRuleList::create):
1829         (WebCore::StaticCSSRuleList::ref):
1830         (WebCore::StaticCSSRuleList::rules):
1831         (WebCore::StaticCSSRuleList::styleSheet):
1832         (WebCore::StaticCSSRuleList::length):
1833         
1834             Concrete implementation for fixed list of rules.
1835     
1836         (WebCore):
1837         (LiveCSSRuleList):
1838         (WebCore::LiveCSSRuleList::LiveCSSRuleList):
1839         (WebCore::LiveCSSRuleList::ref):
1840         (WebCore::LiveCSSRuleList::deref):
1841         (WebCore::LiveCSSRuleList::length):
1842         (WebCore::LiveCSSRuleList::item):
1843         (WebCore::LiveCSSRuleList::styleSheet):
1844         
1845             Concrete implemenation for live list backed by the underlying container rule.
1846             LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. 
1847         
1848         * css/CSSStyleSelector.cpp:
1849         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
1850         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1851         * css/CSSStyleSelector.h:
1852         (CSSStyleSelector):
1853         * css/CSSStyleSheet.cpp:
1854         
1855             The same scheme for CSSStyleSheet.cssRule as with container rules.
1856         
1857         (StyleSheetCSSRuleList):
1858         (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList):
1859         (WebCore::StyleSheetCSSRuleList::ref):
1860         (WebCore::StyleSheetCSSRuleList::deref):
1861         (WebCore::StyleSheetCSSRuleList::length):
1862         (WebCore::StyleSheetCSSRuleList::item):
1863         (WebCore::StyleSheetCSSRuleList::styleSheet):
1864         (WebCore):
1865         (WebCore::CSSStyleSheet::rules):
1866         (WebCore::CSSStyleSheet::cssRules):
1867         * css/CSSStyleSheet.h:
1868         (CSSStyleSheet):
1869         * css/WebKitCSSKeyframesRule.cpp:
1870         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
1871         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1872         (WebCore):
1873         (WebCore::WebKitCSSKeyframesRule::append):
1874         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1875         (WebCore::WebKitCSSKeyframesRule::findRule):
1876         (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
1877         (WebCore::WebKitCSSKeyframesRule::cssText):
1878         (WebCore::WebKitCSSKeyframesRule::cssRules):
1879         * css/WebKitCSSKeyframesRule.h:
1880         (WebKitCSSKeyframesRule):
1881         (WebCore::WebKitCSSKeyframesRule::ruleCount):
1882         (WebCore::WebKitCSSKeyframesRule::ruleAt):
1883         (WebCore::WebKitCSSKeyframesRule::length):
1884         (WebCore::WebKitCSSKeyframesRule::item):
1885         * css/WebKitCSSRegionRule.cpp:
1886         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
1887         (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
1888         (WebCore::WebKitCSSRegionRule::cssText):
1889         (WebCore::WebKitCSSRegionRule::cssRules):
1890         * css/WebKitCSSRegionRule.h:
1891         * inspector/InspectorStyleSheet.cpp:
1892         (WebCore::asCSSRuleList):
1893         (WebCore::InspectorStyleSheet::addRule):
1894         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1895
1896 2012-03-25  Kentaro Hara  <haraken@chromium.org>
1897
1898         Remove duplicated GenerateConditionalString() from code generators
1899         https://bugs.webkit.org/show_bug.cgi?id=82148
1900
1901         Reviewed by Adam Barth.
1902
1903         Previously GenerateConditionalString()s were defined in each code generator,
1904         and they were doing the same thing. This patch puts GenerateConditionalString()
1905         in CodeGenerator.pm and removes duplicated GenerateConditionalString()s.
1906
1907         No tests. No change in the generated code.
1908
1909         * bindings/scripts/CodeGenerator.pm:
1910         (GenerateConditionalString):
1911         * bindings/scripts/CodeGeneratorCPP.pm:
1912         (GenerateHeader):
1913         (GenerateImplementation):
1914         * bindings/scripts/CodeGeneratorGObject.pm:
1915         (GenerateProperty):
1916         (GenerateProperties):
1917         (GenerateFunction):
1918         (WriteData):
1919         * bindings/scripts/CodeGeneratorJS.pm:
1920         (GenerateHeaderContentHeader):
1921         (GenerateImplementationContentHeader):
1922         (GenerateHeader):
1923         (GenerateImplementation):
1924         (GenerateCallbackHeader):
1925         (GenerateCallbackImplementation):
1926         * bindings/scripts/CodeGeneratorObjC.pm:
1927         (GenerateHeader):
1928         (GenerateImplementation):
1929         * bindings/scripts/CodeGeneratorV8.pm:
1930         (GenerateHeader):
1931         (GenerateNormalAttrGetter):
1932         (GenerateNormalAttrSetter):
1933         (GenerateOverloadedFunctionCallback):
1934         (GenerateFunctionCallback):
1935         (GenerateBatchedAttributeData):
1936         (GenerateImplementation):
1937         (GenerateHeaderContentHeader):
1938         (GenerateImplementationContentHeader):
1939         (GenerateCallbackHeader):
1940         (GenerateCallbackImplementation):
1941
1942 2012-03-25  Kentaro Hara  <haraken@chromium.org>
1943
1944         Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*
1945         https://bugs.webkit.org/show_bug.cgi?id=82146
1946
1947         Reviewed by Adam Barth.
1948
1949         Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/).
1950         We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*,
1951         and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*.
1952         We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch.
1953
1954         No tests. No change in behavior.
1955
1956         * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp.
1957         (WebCore):
1958         (WebCore::DOMWindowWebDatabase::openDatabase):
1959         * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h.
1960         (WebCore):
1961         (DOMWindowWebDatabase):
1962         (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase):
1963         (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase):
1964         * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl.
1965         * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp.
1966         (WebCore):
1967         (WebCore::WorkerContextWebDatabase::openDatabase):
1968         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
1969         * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h.
1970         (WebCore):
1971         (WorkerContextWebDatabase):
1972         (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase):
1973         (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase):
1974         * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl.
1975
1976         * DerivedSources.make:
1977         * DerivedSources.pri:
1978         * GNUmakefile.list.am:
1979         * Target.pri:
1980         * WebCore.gypi:
1981         * WebCore.vcproj/WebCore.vcproj:
1982         * WebCore.xcodeproj/project.pbxproj:
1983
1984 2012-03-25  Philip Rogers  <pdr@google.com>
1985
1986         Avoid race condition when iterating over pending resources
1987         https://bugs.webkit.org/show_bug.cgi?id=82115
1988
1989         Reviewed by Nikolas Zimmermann.
1990
1991         We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded
1992         where pending elements can become non-pending while we iterate over them.
1993
1994         This patch cleans up buildPendingResourcesIfNeeded and re-works how pending
1995         resources are removed. Because pending resources can be modified while
1996         iterating over them, we introduce m_pendingResourcesForRemoval that
1997         holds pending resources that are marked for removal. Instead of iterating
1998         over this list we simply remove each pending resource from
1999         m_pendingResourcesForRemoval; if a pending resource is modified or removed
2000         during the processing of another pending resource this list is updated before
2001         the next element can be accessed.
2002
2003         This change also removes removePendingResourceForElement which is no longer
2004         referenced.
2005
2006         Test: http/tests/svg/change-id-with-pending-resources.html
2007
2008         * svg/SVGDocumentExtensions.cpp:
2009         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
2010         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
2011         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
2012         (WebCore):
2013         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
2014         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
2015         * svg/SVGDocumentExtensions.h:
2016         (SVGDocumentExtensions):
2017         * svg/SVGStyledElement.cpp:
2018         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
2019
2020 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
2021
2022         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
2023         https://bugs.webkit.org/show_bug.cgi?id=82104
2024         RIM PR: 145963
2025
2026         Reviewed by Rob Buis.
2027
2028         The embedder may use vertex buffers, which affected the interpretation
2029         our vertex array pointers from memory pointers to offsets into a vertex
2030         buffer. The resulting geometry often resulted in no visible layers on
2031         screen.
2032
2033         Fixed by getting rid of any bound buffer when we enter
2034         LayerRenderer::drawLayers().
2035
2036         * platform/graphics/blackberry/LayerRenderer.cpp:
2037         (WebCore::LayerRenderer::drawLayers):
2038
2039 2012-03-24  Nat Duca  <nduca@chromium.org>
2040
2041         [chromium] Instrument gesture animations with async traces
2042         https://bugs.webkit.org/show_bug.cgi?id=82076
2043
2044         Reviewed by Adrienne Walker.
2045
2046         * platform/ActivePlatformGestureAnimation.cpp:
2047         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
2048         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
2049         * platform/PlatformGestureCurve.h:
2050         (PlatformGestureCurve):
2051         * platform/TouchpadFlingPlatformGestureCurve.h:
2052         (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
2053         * platform/WheelFlingPlatformGestureCurve.h:
2054         (WebCore::WheelFlingPlatformGestureCurve::debugName):
2055         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
2056         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
2057         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
2058         * platform/graphics/chromium/cc/CCGestureCurve.h:
2059         (CCGestureCurve):
2060
2061 2012-03-24  Jeffrey Pfau  <jpfau@apple.com>
2062
2063         XML error document creation should not fire mutation events
2064         https://bugs.webkit.org/show_bug.cgi?id=80765
2065
2066         Reviewed by Adam Barth.
2067
2068         Broke two tests that expected the old behavior, which have now been updated.
2069
2070         * xml/XMLErrors.cpp:
2071         (WebCore::createXHTMLParserErrorHeader):
2072         (WebCore::XMLErrors::insertErrorMessageBlock):
2073
2074 2012-03-24  Florin Malita  <fmalita@google.com>
2075
2076         ForeignObject content is zoomed two times
2077         https://bugs.webkit.org/show_bug.cgi?id=76282
2078
2079         Reviewed by Nikolas Zimmermann.
2080
2081         Test: svg/zoom/page/zoom-foreign-content.svg
2082
2083         Reset the effective zoom property for FO-nested content to avoid
2084         having the zoom factor applied multiple times (zooming is handled by
2085         the top level SVG root element).
2086
2087         * css/CSSStyleSelector.cpp:
2088         (WebCore::CSSStyleSelector::adjustRenderStyle):
2089
2090 2012-03-24  Chris Fleizach  <cfleizach@apple.com>
2091
2092         AX: Support solution to handle invalid ax text marker
2093         https://bugs.webkit.org/show_bug.cgi?id=82023
2094
2095         Reviewed by Oliver Hunt.
2096
2097         This provides methods to better use text markers so that assistive technologies
2098         can know when they are valid, and can convert them to and from absolute positions.
2099
2100         Test: platform/mac/accessibility/textmarker-routines.html
2101
2102         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2103         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2104         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2105         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
2106         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
2107         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2108
2109 2012-03-24  Victor Carbune  <vcarbune@adobe.com>
2110
2111         Quick fix for rendering controls regression.
2112         https://bugs.webkit.org/show_bug.cgi?id=82125
2113
2114         Reviewed by Eric Carlson.
2115
2116         Only temporary fix. Tests to cover the problem should be added
2117
2118         * html/shadow/MediaControlElements.cpp:
2119         (WebCore::MediaControlPanelElement::makeOpaque): The display:none
2120         property should be toggled only by the media element now.
2121         (WebCore::MediaControlPanelElement::makeTransparent): The timer
2122         that toggles the dispalay:none shouldn't be used now.
2123
2124 2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>
2125
2126         [wx] Unreviewed. Add header needed for compilation.
2127
2128         * html/shadow/TextFieldDecorationElement.cpp:
2129
2130 2012-03-24  Abhishek Arya  <inferno@chromium.org>
2131
2132         Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
2133         https://bugs.webkit.org/show_bug.cgi?id=81959
2134
2135         Reviewed by Ryosuke Niwa.
2136
2137         Test: editing/execCommand/apply-style-command-crash.html
2138
2139         * editing/ApplyStyleCommand.cpp:
2140         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
2141         node iterator |node|.
2142         * editing/ApplyStyleCommand.h:
2143         (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.
2144
2145 2012-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2146
2147         Unreviewed, build fix since we use "-Werror=unused-but-set-variable".
2148
2149         The variable 'it' was set at TextureMapperShaderManager.h:110 but never used.
2150
2151         * platform/graphics/texmap/TextureMapperShaderManager.h:
2152         (WebCore::TextureMapperShaderManager::getShaderProgram):
2153
2154 2012-03-24  Zeno Albisser  <zeno@webkit.org>
2155
2156         [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template.
2157         https://bugs.webkit.org/show_bug.cgi?id=82049
2158
2159         Change the getShaderProgram() function to not be a template.
2160         This is a workaround for a compiler bug that leads to an assert
2161         when compiling in debug mode on mac.
2162
2163         Reviewed by Noam Rosenthal.
2164
2165         * platform/graphics/texmap/TextureMapperGL.cpp:
2166         (WebCore::TextureMapperGL::drawTexture):
2167         (WebCore::TextureMapperGL::beginClip):
2168         * platform/graphics/texmap/TextureMapperShaderManager.h:
2169         (TextureMapperShaderProgram):
2170         (WebCore::TextureMapperShaderManager::getShaderProgram):
2171         (TextureMapperShaderManager):
2172
2173 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
2174
2175         [chromium] Incorrect replica originTransform used in CCDamageTracker
2176         https://bugs.webkit.org/show_bug.cgi?id=82118
2177
2178         Reviewed by Adrienne Walker.
2179
2180         Unit test added to CCDamageTrackerTest.cpp
2181
2182         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
2183         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
2184
2185 2012-03-23  Dana Jansens  <danakj@chromium.org>
2186
2187         [chromium] When prepainting fails, tiles dirty rects may be cleared
2188         https://bugs.webkit.org/show_bug.cgi?id=82107
2189
2190         Reviewed by Adrienne Walker.
2191
2192         When prepainting, if a tile is unable to be reserved due to memory
2193         limits, we bail out of prepareToUpdateTiles. But we would have
2194         cleared the dirty rect of any previous tiles. This leaves them
2195         in a bad state where their textures are reserved, but their textureIds
2196         are set to 0, and they are not marked dirty. This means that they will
2197         not be updated and displayed if they become visible, since it is
2198         assumed that valid textures with zero textureId must have a dirty
2199         region.
2200
2201         We fix this by not clearing the dirty rects until we know we are
2202         going to update the layer.
2203
2204         Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed
2205
2206         * platform/graphics/chromium/TiledLayerChromium.cpp:
2207         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2208         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2209         (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt):
2210         (WebCore):
2211         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2212         (CCTiledLayerImpl):
2213
2214 2012-03-23  Stephanie Lewis  <slewis@apple.com>
2215
2216         https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals.
2217         <rdar://problem/11094830> WebProcess appears to get stuck in its GC handler (81963).
2218         Remove the call to garbage collect  in low memory signal handler.  Did some testing with hitting the low memory handler
2219         during Membuster and we would get back at most 100k - 200k.  That isn't enough to help the system, and in 
2220         that state the GC collection can take a substantial amount of time.
2221
2222         Reviewed by Geoff Garen.
2223
2224         Performance Change, no change in behavior.
2225
2226         * platform/mac/MemoryPressureHandlerMac.mm:
2227         (WebCore::MemoryPressureHandler::releaseMemory):
2228
2229 2012-03-23  W. James MacLean  <wjmaclean@chromium.org>
2230
2231         [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
2232         https://bugs.webkit.org/show_bug.cgi?id=82106
2233
2234         Reviewed by Adrienne Walker.
2235
2236         Existing unit tests updated.
2237
2238         With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
2239         wheel handlers are present.
2240
2241         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2242         (WebCore::CCLayerTreeHostImpl::scrollBegin):
2243
2244 2012-03-23  Adam Barth  <abarth@webkit.org>
2245
2246         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl
2247         https://bugs.webkit.org/show_bug.cgi?id=79635
2248
2249         Reviewed by Kentaro Hara.
2250
2251         This patch moves the NotificationCenter from WorkerContext to
2252         WorkerContextNotificiations, reducing clutter in WorkerContext.  After
2253         this patch, Notifications are almost entirely contained in the
2254         notifications directory.
2255
2256         * CMakeLists.txt:
2257         * DerivedSources.make:
2258         * DerivedSources.pri:
2259         * GNUmakefile.list.am:
2260         * Target.pri:
2261         * WebCore.gypi:
2262         * WebCore.vcproj/WebCore.vcproj:
2263         * WebCore.xcodeproj/project.pbxproj:
2264         * workers/WorkerContext.cpp:
2265         (WebCore::WorkerContext::~WorkerContext):
2266         * workers/WorkerContext.h:
2267         (WebCore):
2268         (WorkerContext):
2269         * workers/WorkerContext.idl:
2270
2271 2012-03-23  Michal Mocny  <mmocny@google.com>
2272
2273         [chromium] RootLayer was not being checked for null causing segfaults very rarely.
2274         https://bugs.webkit.org/show_bug.cgi?id=82111
2275
2276         Reviewed by Adrienne Walker.
2277
2278         * platform/graphics/chromium/LayerRendererChromium.cpp:
2279         (WebCore::LayerRendererChromium::beginDrawingFrame):
2280         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2281         (WebCore::CCLayerTreeHostImpl::drawLayers):
2282
2283 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
2284
2285         [chromium] Fix race bug that clobbers CCLayerImpl updateRect
2286         https://bugs.webkit.org/show_bug.cgi?id=82109
2287
2288         Reviewed by Dirk Pranke.
2289
2290         If the main thread commits twice before the impl thread actually
2291         draws, then the updateRect of the first frame gets lost forever,
2292         and not propagated to the damage tracker.
2293
2294         The solution is to accumulate the updateRect. The CCLayerImpl
2295         updateRect is already being correctly cleared at the appropriate
2296         time after drawing.
2297
2298         Unit test added to LayerChromiumTest.cpp.
2299
2300         * platform/graphics/chromium/LayerChromium.cpp:
2301         (WebCore::LayerChromium::pushPropertiesTo):
2302
2303 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
2304
2305         [MutationObservers] attributeFilter should be case sensitive at all times
2306         https://bugs.webkit.org/show_bug.cgi?id=81822
2307
2308         Reviewed by Ryosuke Niwa.
2309
2310         This removes the behavior in MutationObserverRegistration which treats
2311         attributeFilter as case insensitive for HTML elements in HTML documents.
2312
2313         Relevant tests have been updated.
2314
2315         * dom/MutationObserverRegistration.cpp:
2316         (WebCore::MutationObserverRegistration::resetObservation):
2317         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
2318         * dom/MutationObserverRegistration.h:
2319         (MutationObserverRegistration):
2320
2321 2012-03-23  Kentaro Hara  <haraken@chromium.org>
2322
2323         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
2324         https://bugs.webkit.org/show_bug.cgi?id=79663
2325
2326         Reviewed by Adam Barth.
2327
2328         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
2329         to WorkerContextWebSocket.idl.
2330
2331         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
2332
2333         * CMakeLists.txt:
2334         * DerivedSources.make:
2335         * DerivedSources.pri:
2336         * GNUmakefile.list.am:
2337         * Modules/websockets/WorkerContextWebSocket.idl: Added.
2338         * WebCore.gypi:
2339         * WebCore.xcodeproj/project.xcodeproj:
2340         * workers/WorkerContext.idl:
2341
2342 2012-03-23  Parag Radke  <parag@motorola.com>
2343
2344         REGRESSION: can select text of an input button
2345         https://bugs.webkit.org/show_bug.cgi?id=13624
2346
2347         Reviewed by Ryosuke Niwa.
2348
2349         Text in a button should never have a selection background of its own painted
2350         but if the button is inside an editable area, then the whole button should
2351         have it's selection background painted.
2352
2353         Test: editing/selection/selection-button-text.html
2354
2355         * rendering/RenderButton.h:
2356         Added implementation for the virtual function canBeSelectionLeaf()
2357         which returns true if the button renderer is editable, false other wise.
2358         * rendering/RenderTextFragment.h:
2359         Added implementation for the virtual function canBeSelectionLeaf()
2360         which returns true if the text fragment renderer is editable, false other wise.
2361
2362 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2363
2364         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
2365         https://bugs.webkit.org/show_bug.cgi?id=82095
2366
2367         Reviewed by Dan Bernstein.
2368
2369         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
2370
2371         * html/track/LoadableTextTrack.cpp:
2372         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
2373
2374 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2375
2376         Layout Test media/video-source-load.html is failing
2377         https://bugs.webkit.org/show_bug.cgi?id=82094
2378
2379         Reviewed by Alexey Proskuryakov.
2380
2381         No new tests, tested by media/video-source-load.html.
2382
2383         * html/HTMLMediaElement.cpp:
2384         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
2385             with networkState == NETWORK_EMPTY because the resource selection algorithm has
2386             not started yet.
2387
2388 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
2389
2390         [Mac] No need for platform-specific ENABLE_BLOB values
2391         https://bugs.webkit.org/show_bug.cgi?id=82102
2392
2393         Reviewed by David Kilzer.
2394
2395         * Configurations/FeatureDefines.xcconfig:
2396
2397 2012-03-23  Kent Tamura  <tkent@chromium.org>
2398
2399         Add TextFieldDecorator and TextFieldDecorationElement
2400         https://bugs.webkit.org/show_bug.cgi?id=80580
2401
2402         Reviewed by Dimitri Glazkov.
2403
2404         These classes will be used to add a decoration icon to a text field
2405         <input> from outside of WebCore. We have a plan to use them in Chromium
2406         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
2407         non-Chromium build files.
2408
2409         How it works:
2410         When a shadow subtree for a text field is created, we ask ChromeClient
2411         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
2412         existing shadow subtree or another shadow tree. A TextFieldDecorator is
2413         associated to a TextFieldDecorationElement, and it provides decoration
2414         icon images and a click handler.
2415
2416         No new tests. This patch won't make any behavior change for now.
2417
2418         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
2419         * dom/Element.h:
2420         (WebCore::Element::isTextFieldDecoration):
2421         * html/TextFieldInputType.cpp:
2422         (WebCore::TextFieldInputType::createShadowSubtree):
2423         Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo().
2424         * html/shadow/TextFieldDecorationElement.cpp: Added.
2425         (WebCore::TextFieldDecorator::~TextFieldDecorator):
2426         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
2427         (WebCore::TextFieldDecorationElement::create):
2428         (WebCore::TextFieldDecorationElement::isTextFieldDecoration):
2429         (WebCore::TextFieldDecorationElement::updateImage):
2430         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
2431         Sets the size to a square of the font-size.
2432         (WebCore::TextFieldDecorationElement::createRenderer):
2433         Always creates a RenderImage.
2434         (WebCore::TextFieldDecorationElement::attach):
2435         Sets an image for appropriate state.
2436         (WebCore::TextFieldDecorationElement::isMouseFocusable):
2437         (WebCore::TextFieldDecorationElement::defaultEventHandler):
2438         Delegate a click event to the corresponding function of TextFieldDecorator.
2439         * html/shadow/TextFieldDecorationElement.h: Added.
2440         (TextFieldDecorator): Added.
2441         (TextFieldDecorationElement): Added.
2442         (WebCore::toTextFieldDecorationElement): Added.
2443         * page/ChromeClient.h:
2444         (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation.
2445         (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto.
2446
2447 2012-03-23  Adam Klein  <adamk@chromium.org>
2448
2449         Match DOM4 spec with respect to DocumentFragment insertion
2450         https://bugs.webkit.org/show_bug.cgi?id=82089
2451
2452         Reviewed by Ryosuke Niwa.
2453
2454         DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild
2455         in terms of "mutation algorithms":
2456
2457         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms
2458
2459         This change updates WebKit to match, in particular with regard to DocumentFragments.
2460         Previously, ContainerNode would remove nodes one at a time, then add them to the new parent.
2461         When combined with MutationObservers, this results in overly-verbose mutation records.
2462         Now we create as few records as possible, matching the spec as well as Gecko's implementation
2463         of MutationObservers.
2464
2465         Note that we still need to check validity each time through the loop,
2466         since inserting a node may dispatch events. In a future change, I hope
2467         to move these events so that they fire only after all nodes are inserted,
2468         but that's too much to tackle all in one.
2469
2470         Tests: fast/mutation/document-fragment-insertion.html
2471
2472         * dom/ContainerNode.cpp:
2473         (WebCore::collectChildrenAndRemoveFromOldParent): New helper method
2474         combining collectTargetNodes() with the removal of the collected nodes from
2475         their old parent, if any.
2476         (WebCore::ContainerNode::insertBefore): Use new helper method instead
2477         of removing nodes one at a time from the fragment.
2478         (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts
2479         and moved the "do nothing" check out of the loop.
2480         (WebCore::ContainerNode::appendChild): Use new helper method.
2481
2482 2012-03-23  Stephen White  <senorblanco@chromium.org>
2483
2484         [skia] Switch to Skia's implementation of the feMorphology filter.
2485         https://bugs.webkit.org/show_bug.cgi?id=82085
2486
2487         Reviewed by Dirk Schulze.
2488
2489         Covered by existing tests in svg/filters/.
2490
2491         * WebCore.gypi:
2492         * platform/graphics/filters/FEMorphology.h:
2493         (FEMorphology):
2494         * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added.
2495         (WebCore):
2496         (WebCore::FEMorphology::platformApplySkia):
2497
2498 2012-03-23  Adam Barth  <abarth@webkit.org>
2499
2500         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3)
2501         https://bugs.webkit.org/show_bug.cgi?id=82027
2502
2503         Reviewed by Kentaro Hara.
2504
2505         Rather than watching for willDetachPage, NotificationCenter can just
2506         override ActiveDOMObject::stop directly to be notified when it needs to
2507         stop.
2508
2509         Switching NotificationCenter over to using ActiveDOMObject callbacks
2510         frees DOMWindowNotification to implement reconnectFrame.  However, this
2511         is only really a victory in princple because NotificationCenter always
2512         returns false for canSuspend(), which means we'll never actually use
2513         the reconnectFrame functionality.  However, this patch does move us
2514         closer to the time when NotificationCenter can implement
2515         ActiveDOMObject::suspend/resume to play nice with the PageCache.
2516
2517         * notifications/DOMWindowNotifications.cpp:
2518         (WebCore::DOMWindowNotifications::disconnectFrame):
2519         (WebCore::DOMWindowNotifications::reconnectFrame):
2520         * notifications/DOMWindowNotifications.h:
2521         (DOMWindowNotifications):
2522         * notifications/NotificationCenter.cpp:
2523         (WebCore::NotificationCenter::NotificationCenter):
2524         (WebCore::NotificationCenter::stop):
2525         * notifications/NotificationCenter.h:
2526         (NotificationCenter):
2527
2528 2012-03-23  Daniel Cheng  <dcheng@chromium.org>
2529
2530         [chromium] Support file drag out using DataTransferItemList::add(File)
2531         https://bugs.webkit.org/show_bug.cgi?id=81261
2532
2533         Reviewed by Tony Chang.
2534
2535         Original patch by Varun Jain <varunjain@chromium.org>.
2536         I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
2537         is it necessary for File objects, since File objects correspond to a native filesystem path.
2538
2539         Test: fast/events/drag-dataTransferItemList-file-handling.html
2540
2541         * platform/chromium/DataTransferItemListChromium.cpp:
2542         (WebCore::DataTransferItemListChromium::add):
2543
2544 2012-03-23  Zan Dobersek  <zandobersek@gmail.com>
2545
2546         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
2547         https://bugs.webkit.org/show_bug.cgi?id=80030
2548
2549         Reviewed by Martin Robinson.
2550
2551         Changes in CodeGeneratorGObject.pm:
2552         - group implementation of private helpers and guard them inside
2553         an ifdef if a root conditional attribute is present.
2554         - always define the type of a GObject binding, even if the root
2555         conditional feature is not enabled
2556         - the methods are generated as well, but are simply stubs if the
2557         feature is not enabled, throwing a warning upon interaction.
2558         - if the method itself is guarded by a conditional attribute,
2559         the stub implementation gains one more level of depth, throwing
2560         a warning if the method's conditional feature is not enabled
2561         but the root conditional feature is.
2562         - small style fixes in random places.
2563
2564         Also changed are GObject baselines for binding tests.
2565
2566         No new tests - no new testable functionality.
2567
2568         * bindings/gobject/GNUmakefile.am:
2569         * bindings/scripts/CodeGeneratorGObject.pm:
2570         (HumanReadableConditional):
2571         (GenerateConditionalWarn):
2572         (GenerateProperty):
2573         (GenerateProperties):
2574         (GenerateFunction):
2575         (GenerateFunctions):
2576         (GenerateCFile):
2577         (GenerateEventTargetIface):
2578         (Generate):
2579         (WriteData):
2580         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2581         (WebKit):
2582         (WebKit::kit):
2583         (WebKit::wrapFloat64Array):
2584         (webkit_dom_float64array_finalize):
2585         (webkit_dom_float64array_foo):
2586         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
2587         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
2588         (WebKit):
2589         (WebKit::kit):
2590         (WebKit::wrapTestActiveDOMObject):
2591         (webkit_dom_test_active_dom_object_finalize):
2592         (webkit_dom_test_active_dom_object_exciting_function):
2593         (webkit_dom_test_active_dom_object_post_message):
2594         (webkit_dom_test_active_dom_object_get_exciting_attr):
2595         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
2596         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2597         (WebKit):
2598         (WebKit::kit):
2599         (WebKit::core):
2600         (WebKit::wrapTestCallback):
2601         (webkit_dom_test_callback_finalize):
2602         (webkit_dom_test_callback_callback_with_no_param):
2603         (webkit_dom_test_callback_callback_with_class1param):
2604         (webkit_dom_test_callback_callback_with_class2param):
2605         (webkit_dom_test_callback_callback_with_non_bool_return_type):
2606         (webkit_dom_test_callback_callback_with_string_list):
2607         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
2608         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
2609         (WebKit):
2610         (WebKit::kit):
2611         (WebKit::wrapTestCustomNamedGetter):
2612         (webkit_dom_test_custom_named_getter_finalize):
2613         (webkit_dom_test_custom_named_getter_another_function):
2614         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
2615         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2616         (WebKit):
2617         (WebKit::kit):
2618         (WebKit::wrapTestEventConstructor):
2619         (webkit_dom_test_event_constructor_finalize):
2620         (webkit_dom_test_event_constructor_get_attr1):
2621         (webkit_dom_test_event_constructor_get_attr2):
2622         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
2623         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2624         (WebKit):
2625         (WebKit::core):
2626         (WebKit::wrapTestEventTarget):
2627         (webkit_dom_test_event_target_finalize):
2628         (webkit_dom_test_event_target_item):
2629         (webkit_dom_test_event_target_dispatch_event):
2630         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
2631         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2632         (WebKit):
2633         (WebKit::kit):
2634         (WebKit::core):
2635         (WebKit::wrapTestInterface):
2636         (webkit_dom_test_interface_finalize):
2637         (webkit_dom_test_interface_supplemental_method1):
2638         (webkit_dom_test_interface_supplemental_method2):
2639         (webkit_dom_test_interface_supplemental_method4):
2640         (webkit_dom_test_interface_get_supplemental_str1):
2641         (webkit_dom_test_interface_get_supplemental_str2):
2642         (webkit_dom_test_interface_set_supplemental_str2):
2643         (webkit_dom_test_interface_get_supplemental_node):
2644         (webkit_dom_test_interface_set_supplemental_node):
2645         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
2646         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
2647         (WebKit):
2648         (WebKit::kit):
2649         (WebKit::wrapTestMediaQueryListListener):
2650         (webkit_dom_test_media_query_list_listener_finalize):
2651         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
2652         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
2653         (WebKit):
2654         (WebKit::kit):
2655         (WebKit::wrapTestNamedConstructor):
2656         (webkit_dom_test_named_constructor_finalize):
2657         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
2658         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2659         (WebKit):
2660         (WebKit::kit):
2661         (WebKit::core):
2662         (WebKit::wrapTestObj):
2663         (webkit_dom_test_obj_finalize):
2664         (webkit_dom_test_obj_set_property):
2665         (webkit_dom_test_obj_get_property):
2666         (webkit_dom_test_obj_constructed):
2667         (webkit_dom_test_obj_class_init):
2668         (webkit_dom_test_obj_init):
2669         (webkit_dom_test_obj_void_method):
2670         (webkit_dom_test_obj_void_method_with_args):
2671         (webkit_dom_test_obj_int_method):
2672         (webkit_dom_test_obj_int_method_with_args):
2673         (webkit_dom_test_obj_obj_method):
2674         (webkit_dom_test_obj_obj_method_with_args):
2675         (webkit_dom_test_obj_method_with_sequence_arg):
2676         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
2677         (webkit_dom_test_obj_serialized_value):
2678         (webkit_dom_test_obj_idb_key):
2679         (webkit_dom_test_obj_options_object):
2680         (webkit_dom_test_obj_method_with_exception):
2681         (webkit_dom_test_obj_with_script_state_void):
2682         (webkit_dom_test_obj_with_script_state_obj):
2683         (webkit_dom_test_obj_with_script_state_void_exception):
2684         (webkit_dom_test_obj_with_script_state_obj_exception):
2685         (webkit_dom_test_obj_with_script_execution_context):
2686         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
2687         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
2688         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
2689         (webkit_dom_test_obj_method_with_optional_arg):
2690         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
2691         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
2692         (webkit_dom_test_obj_method_with_optional_string):
2693         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
2694         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
2695         (webkit_dom_test_obj_conditional_method1):
2696         (webkit_dom_test_obj_conditional_method2):
2697         (webkit_dom_test_obj_conditional_method3):
2698         (webkit_dom_test_obj_class_method):
2699         (webkit_dom_test_obj_class_method_with_optional):
2700         (webkit_dom_test_obj_overloaded_method1):
2701         (webkit_dom_test_obj_convert1):
2702         (webkit_dom_test_obj_convert2):
2703         (webkit_dom_test_obj_convert3):
2704         (webkit_dom_test_obj_convert4):
2705         (webkit_dom_test_obj_convert5):
2706         (webkit_dom_test_obj_mutable_point_function):
2707         (webkit_dom_test_obj_immutable_point_function):
2708         (webkit_dom_test_obj_orange):
2709         (webkit_dom_test_obj_strict_function):
2710         (webkit_dom_test_obj_get_read_only_int_attr):
2711         (webkit_dom_test_obj_get_read_only_string_attr):
2712         (webkit_dom_test_obj_get_read_only_test_obj_attr):
2713         (webkit_dom_test_obj_get_short_attr):
2714         (webkit_dom_test_obj_set_short_attr):
2715         (webkit_dom_test_obj_get_unsigned_short_attr):
2716         (webkit_dom_test_obj_set_unsigned_short_attr):
2717         (webkit_dom_test_obj_get_int_attr):
2718         (webkit_dom_test_obj_set_int_attr):
2719         (webkit_dom_test_obj_get_long_long_attr):
2720         (webkit_dom_test_obj_set_long_long_attr):
2721         (webkit_dom_test_obj_get_unsigned_long_long_attr):
2722         (webkit_dom_test_obj_set_unsigned_long_long_attr):
2723         (webkit_dom_test_obj_get_string_attr):
2724         (webkit_dom_test_obj_set_string_attr):
2725         (webkit_dom_test_obj_get_test_obj_attr):
2726         (webkit_dom_test_obj_set_test_obj_attr):
2727         (webkit_dom_test_obj_get_xml_obj_attr):
2728         (webkit_dom_test_obj_set_xml_obj_attr):
2729         (webkit_dom_test_obj_get_create):
2730         (webkit_dom_test_obj_set_create):
2731         (webkit_dom_test_obj_get_reflected_string_attr):
2732         (webkit_dom_test_obj_set_reflected_string_attr):
2733         (webkit_dom_test_obj_get_reflected_integral_attr):
2734         (webkit_dom_test_obj_set_reflected_integral_attr):
2735         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
2736         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
2737         (webkit_dom_test_obj_get_reflected_boolean_attr):
2738         (webkit_dom_test_obj_set_reflected_boolean_attr):
2739         (webkit_dom_test_obj_get_reflected_url_attr):
2740         (webkit_dom_test_obj_set_reflected_url_attr):
2741         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
2742         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
2743         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
2744         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
2745         (webkit_dom_test_obj_get_reflected_custom_url_attr):
2746         (webkit_dom_test_obj_set_reflected_custom_url_attr):
2747         (webkit_dom_test_obj_get_attr_with_getter_exception):
2748         (webkit_dom_test_obj_set_attr_with_getter_exception):
2749         (webkit_dom_test_obj_get_attr_with_setter_exception):
2750         (webkit_dom_test_obj_set_attr_with_setter_exception):
2751         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
2752         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
2753         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
2754         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
2755         (webkit_dom_test_obj_get_with_script_state_attribute):
2756         (webkit_dom_test_obj_set_with_script_state_attribute):
2757         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
2758         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
2759         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
2760         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
2761         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
2762         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
2763         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
2764         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
2765         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
2766         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
2767         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
2768         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
2769         (webkit_dom_test_obj_get_conditional_attr1):
2770         (webkit_dom_test_obj_set_conditional_attr1):
2771         (webkit_dom_test_obj_get_conditional_attr2):
2772         (webkit_dom_test_obj_set_conditional_attr2):
2773         (webkit_dom_test_obj_get_conditional_attr3):
2774         (webkit_dom_test_obj_set_conditional_attr3):
2775         (webkit_dom_test_obj_get_content_document):
2776         (webkit_dom_test_obj_get_mutable_point):
2777         (webkit_dom_test_obj_set_mutable_point):
2778         (webkit_dom_test_obj_get_immutable_point):
2779         (webkit_dom_test_obj_set_immutable_point):
2780         (webkit_dom_test_obj_get_strict_float):
2781         (webkit_dom_test_obj_set_strict_float):
2782         (webkit_dom_test_obj_get_description):
2783         (webkit_dom_test_obj_get_id):
2784         (webkit_dom_test_obj_set_id):
2785         (webkit_dom_test_obj_get_hash):
2786         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
2787         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2788         (WebKit):
2789         (WebKit::kit):
2790         (WebKit::core):
2791         (WebKit::wrapTestSerializedScriptValueInterface):
2792         (webkit_dom_test_serialized_script_value_interface_finalize):
2793         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
2794         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
2795         (webkit_dom_test_serialized_script_value_interface_get_value):
2796         (webkit_dom_test_serialized_script_value_interface_set_value):
2797         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
2798         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
2799         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
2800         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
2801         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
2802
2803 2012-03-23  Dana Jansens  <danakj@chromium.org>
2804
2805         [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
2806         https://bugs.webkit.org/show_bug.cgi?id=82057
2807
2808         Reviewed by Adrienne Walker.
2809
2810         Adds painted pixel metrics to CCOverdrawMetrics class, and calls in
2811         to report painted areas when updating tiles in the TiledLayerChromium
2812         class.
2813
2814         Unit test: TiledLayerChromiumTest.opaqueContentsRegion
2815                    TiledLayerChromiumTest.pixelsPaintedMetrics
2816
2817         * platform/graphics/chromium/TiledLayerChromium.cpp:
2818         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2819         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
2820         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
2821         (WebCore::CCOverdrawMetrics::didPaint):
2822         (WebCore):
2823         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
2824         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
2825         (CCOverdrawMetrics):
2826         (WebCore::CCOverdrawMetrics::pixelsPainted):
2827
2828 2012-03-23  Abhishek Arya  <inferno@chromium.org>
2829
2830         Crash in RenderBlock::splitBlocks.
2831         https://bugs.webkit.org/show_bug.cgi?id=81926
2832
2833         Reviewed by Julien Chaffraix.
2834
2835         We are updating the :after content before calling splitFlow. The :after content
2836         gets blown away since it will go to the continuation. beforeChild was earlier
2837         set to the first child. Being the last anonymous block, its children gets pulled
2838         up in collapseAnonymousBoxChild and it gets destroyed. So, we need to update
2839         beforeChild value. 
2840
2841         Test: fast/multicol/span/update-after-content-before-child-crash.html
2842
2843         * rendering/RenderBlock.cpp:
2844         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2845
2846 2012-03-23  Dana Jansens  <danakj@chromium.org>
2847
2848         [chromium] Improved composited debug borders
2849         https://bugs.webkit.org/show_bug.cgi?id=82071
2850
2851         Reviewed by Adrienne Walker.
2852
2853         Fix the problem with missing debug borders. Since we append quads
2854         to the list front to back now, we draw the quads in the list from
2855         back to front of the list. Which means if the debug quad is added
2856         after the layer it is drawing around, the layer can draw over top
2857         of its debug quad. Reverse the ordering when appending to fix it.
2858
2859         Make the border red around tiles that are checkerboarded. Missing
2860         tiles in non-root layers are drawn clear, so this makes them more
2861         visible.
2862
2863         Put a blue border around each render surface, and a purple border
2864         on their replicas.
2865
2866         No new tests.
2867
2868         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2869         (WebCore):
2870         (WebCore::CCRenderPass::appendQuadsForLayer):
2871         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2872         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2873         (WebCore::CCRenderSurface::hasReplica):
2874         (WebCore):
2875         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
2876         * platform/graphics/chromium/cc/CCRenderSurface.h:
2877         (CCRenderSurface):
2878         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2879         (WebCore):
2880         (WebCore::CCTiledLayerImpl::appendQuads):
2881
2882 2012-03-23  Simon Fraser  <simon.fraser@apple.com>
2883
2884         Move code that calls setAcceleratesDrawing() on GraphicsLayers into RenderLayerBacking
2885         https://bugs.webkit.org/show_bug.cgi?id=82092
2886
2887         Reviewed by Dean Jackson.
2888
2889         A RenderLayerBacking manages several GraphicsLayers, but RenderLayerCompositor
2890         was only calling setAcceleratesDrawing() on the one it knows about. Fix by moving
2891         this setting code down into RenderLayerBacking.
2892         
2893         RenderLayerCompositor now caches the setAcceleratesDrawing setting, as it does
2894         for other compositing-related settings, so that RenderLayerBacking doesn't have
2895         to grovel for Settings every time.
2896
2897         * rendering/RenderLayerBacking.cpp:
2898         (WebCore::RenderLayerBacking::createGraphicsLayer):
2899         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2900         * rendering/RenderLayerCompositor.cpp:
2901         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2902         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2903         (WebCore::RenderLayerCompositor::updateBacking):
2904         * rendering/RenderLayerCompositor.h:
2905         (WebCore::RenderLayerCompositor::acceleratedDrawingEnabled):
2906         (RenderLayerCompositor):
2907
2908 2012-03-23  Beth Dakin  <bdakin@apple.com>
2909
2910         https://bugs.webkit.org/show_bug.cgi?id=82083
2911
2912         Rubber-stamped by Simon Fraser.
2913
2914         This patch is just a name change. getExistingScrollAnimator() (which was 
2915         added earlier today) is now existingScrollAnimator().
2916         * loader/FrameLoader.cpp:
2917         (WebCore::FrameLoader::transitionToCommitted):
2918         * page/EventHandler.cpp:
2919         (WebCore::EventHandler::handleGestureTapDown):
2920         * page/FrameView.cpp:
2921         (WebCore::FrameView::setAnimatorsAreActive):
2922         * platform/ScrollView.cpp:
2923         (WebCore::ScrollView::updateScrollbars):
2924         * platform/ScrollableArea.cpp:
2925         (WebCore::ScrollableArea::willStartLiveResize):
2926         (WebCore::ScrollableArea::willEndLiveResize):
2927         (WebCore::ScrollableArea::contentAreaWillPaint):
2928         (WebCore::ScrollableArea::mouseEnteredContentArea):
2929         (WebCore::ScrollableArea::mouseExitedContentArea):
2930         (WebCore::ScrollableArea::mouseMovedInContentArea):
2931         (WebCore::ScrollableArea::contentAreaDidShow):
2932         (WebCore::ScrollableArea::contentAreaDidHide):
2933         (WebCore::ScrollableArea::contentsResized):
2934         (WebCore::ScrollableArea::serviceScrollAnimations):
2935         * platform/ScrollableArea.h:
2936         (WebCore::ScrollableArea::existingScrollAnimator):
2937
2938 2012-03-23  Abhishek Arya  <inferno@chromium.org>
2939
2940         Crash due to accessing removed parent lineboxes when clearing selection.
2941         https://bugs.webkit.org/show_bug.cgi?id=81359
2942
2943         Reviewed by Eric Seidel.
2944
2945         Similar to r110323, adds the canUpdateSelectionOnRootLineBoxes
2946         check to more places.
2947
2948         Test: editing/selection/clear-selection-crash.html
2949
2950         * rendering/RenderObject.cpp:
2951         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
2952         * rendering/RenderSelectionInfo.h:
2953         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
2954         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
2955
2956 2012-03-23  Beth Dakin  <bdakin@apple.com>
2957
2958         https://bugs.webkit.org/show_bug.cgi?id=82083
2959         Too many ScrollAnimators are allocated on pages with frames
2960
2961         Reviewed by Geoffrey Garen.
2962
2963         This patch adds a new getter to ScrollableArea called 
2964         getExistingScrollAnimator() unlike scrollAnimator() this new function will 
2965         just return null if there is not already a ScrollAnimator. Callers should use 
2966         this new function when they have business with ScrollAnimator that does not 
2967         need to do anything when there are no scrollbars.
2968         * loader/FrameLoader.cpp:
2969         (WebCore::FrameLoader::transitionToCommitted):
2970         * page/EventHandler.cpp:
2971         (WebCore::EventHandler::handleGestureTapDown):
2972         * page/FrameView.cpp:
2973         (WebCore::FrameView::setAnimatorsAreActive):
2974         * platform/ScrollView.cpp:
2975         (WebCore::ScrollView::updateScrollbars):
2976         * platform/ScrollableArea.cpp:
2977         (WebCore::ScrollableArea::willStartLiveResize):
2978         (WebCore::ScrollableArea::willEndLiveResize):
2979         (WebCore::ScrollableArea::contentAreaWillPaint):
2980         (WebCore::ScrollableArea::mouseEnteredContentArea):
2981         (WebCore::ScrollableArea::mouseExitedContentArea):
2982         (WebCore::ScrollableArea::mouseMovedInContentArea):
2983         (WebCore::ScrollableArea::contentAreaDidShow):
2984         (WebCore::ScrollableArea::contentAreaDidHide):
2985         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
2986         (WebCore::ScrollableArea::contentsResized):
2987         (WebCore::ScrollableArea::serviceScrollAnimations):
2988         * platform/ScrollableArea.h:
2989         (ScrollableArea):
2990         (WebCore::ScrollableArea::getExistingScrollAnimator):
2991
2992 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2993
2994         Deal with DOM modifications when evaluating source elements.
2995         https://bugs.webkit.org/show_bug.cgi?id=81163
2996
2997         Reviewed by Alexey Proskuryakov.
2998
2999         Test: media/video-beforeload-remove-source.html
3000
3001         * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes.
3002         (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes.
3003         (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes.
3004         (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes.
3005         (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes.
3006         (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes.
3007         * dom/ContainerNode.h:
3008         (WebCore::getChildNodes):
3009
3010         * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration.
3011
3012         * html/HTMLMediaElement.cpp:
3013         (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode
3014             are now RefPtrs.
3015         (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during
3016             a DOM modification during an event callback.
3017         (WebCore::HTMLMediaElement::load): Ditto.
3018         (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first
3019             child node, it will be the first node considered.
3020         (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode
3021             are now RefPtrs.
3022         (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before
3023             looking for <source> nodes because 'beforeload' event handlers can mutate the DOM. Don't
3024             use a <source> that is no longer a child node after 'beforeload'. Use 0 to represent the end
3025             of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous 
3026             sentinel, "this", would cause a retain cycle.
3027         (WebCore::HTMLMediaElement::sourceWasAdded):  m_nextChildNodeToConsider and m_currentSourceNode
3028             are now RefPtrs.
3029         (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto.
3030         (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during
3031             a DOM modification during an event callback.
3032         * html/HTMLMediaElement.h:
3033
3034 2012-03-23  Dean Jackson  <dino@apple.com>
3035
3036         Disable CSS_SHADERS in Apple builds
3037         https://bugs.webkit.org/show_bug.cgi?id=81996
3038
3039         Reviewed by Simon Fraser.
3040
3041         Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
3042
3043         * Configurations/FeatureDefines.xcconfig:
3044
3045 2012-03-23  Dave Michael  <dmichael@chromium.org>
3046
3047         Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
3048         https://bugs.webkit.org/show_bug.cgi?id=80428
3049
3050         Reviewed by Eric Seidel and Ryosuke Niwa.
3051
3052         Make HTMLPluginElement release its m_NPObject in detach() to break a
3053         reference-counting cycle that happens on reload or navigation. With this
3054         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
3055         was removed. Note that Releasing m_NPObject does not result in a call to
3056         the plugin; it simply releases a reference count on the wrapper object
3057         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
3058         when the render tree is destroyed, when PluginView calls
3059         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
3060         detach, because it can not result in layout or style changes.
3061
3062         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
3063         window.internals to enable testing.
3064
3065         Test: plugins/netscape-dom-access-and-reload.html
3066
3067         * WebCore.exp.in:
3068         * html/HTMLPlugInElement.cpp:
3069         (WebCore::HTMLPlugInElement::detach):
3070         * html/HTMLPlugInElement.h:
3071         (HTMLPlugInElement):
3072         * testing/Internals.cpp:
3073         (WebCore):
3074         (WebCore::Internals::numberOfLiveNodes):
3075         (WebCore::Internals::numberOfLiveDocuments):
3076         * testing/Internals.h:
3077         (Internals):
3078         * testing/Internals.idl:
3079
3080 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
3081
3082         CSSParser doesn't set border-*-width/style/color to initial by border shorthand property
3083         https://bugs.webkit.org/show_bug.cgi?id=82040
3084
3085         Reviewed by Antti Koivisto.
3086
3087         The border shorthand property sets values for border-width, border-style, and border-color shorthand properties.
3088         While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties
3089         such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the
3090         initialization in parseShorthand fails for the border property.
3091
3092         Fixed the bug by explicitly initializing longhand properties.
3093
3094         Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox
3095         and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor".
3096         This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078.
3097
3098         Test: fast/css/border-shorthand-initialize-longhands.html
3099
3100         * css/CSSParser.cpp:
3101         (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand.
3102         (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available.
3103         This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set.
3104         * css/CSSPropertyLonghand.cpp:
3105         (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is
3106         "abridged" in the sense that they're still shorthands.
3107         * css/CSSPropertyLonghand.h:
3108         (WebCore::CSSPropertyLonghand::CSSPropertyLonghand):
3109         (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes.
3110         (WebCore::CSSPropertyLonghand::longhandsForInitialization):
3111
3112 2012-03-23  Tony Chang  <tony@chromium.org>
3113
3114         [chromium] rename newwtf target back to wtf
3115         https://bugs.webkit.org/show_bug.cgi?id=82064
3116
3117         Reviewed by Adam Barth.
3118
3119         No new tests, only renaming a build target.
3120
3121         * WebCore.gyp/WebCore.gyp:
3122
3123 2012-03-23  Adrienne Walker  <enne@google.com>
3124
3125         [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
3126         https://bugs.webkit.org/show_bug.cgi?id=82066
3127
3128         Reviewed by James Robinson.
3129
3130         With threaded compositing, OSX will crash and Windows will have black
3131         scrollbars. Fix that by reverting to the previosu behavior of updating
3132         scrollbars on the main thread instead.
3133
3134         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
3135         (WebCore::scrollbarLayerDidChange):
3136
3137 2012-03-23  Dan Bernstein  <mitz@apple.com>
3138
3139         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
3140         https://bugs.webkit.org/show_bug.cgi?id=81351
3141
3142         Rubber-stamped by Jessie Berlin.
3143
3144         * page/animation/AnimationBase.cpp:
3145         (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that
3146         the issue is still noticeable, but it does not automatically make the debug bots red.
3147
3148 2012-03-23  Mike Lawther  <mikelawther@chromium.org>
3149
3150         CSS3 calc: image sizing works with mixed percentage/absolute
3151         https://bugs.webkit.org/show_bug.cgi?id=82017
3152
3153         Reviewed by Ojan Vafai.
3154
3155         Test: css3/calc/img-size-expected.html
3156
3157         * rendering/RenderBox.cpp:
3158         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3159         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3160
3161 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
3162
3163         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
3164         https://bugs.webkit.org/show_bug.cgi?id=81826
3165
3166         Reviewed by Tony Chang.
3167
3168         Covered by tables/mozilla/bugs/bug27038-{1|2}.html.
3169
3170         This partly reverts r107971: the extra logical height distribution change was not needed
3171         to fix the bug (it is needed by the test though). We revert to giving all the extra height
3172         to the first tbody and not the first section.
3173
3174         This is broken but unfortunately some websites are relying on that. Getting a real
3175         distribution algorithm is covered by bug 81824. However this is super tricky to get
3176         right and I did not want to add more compatibility risks until I have something solid.
3177
3178         * rendering/RenderTable.cpp:
3179         (WebCore::RenderTable::distributeExtraLogicalHeight):
3180
3181 2012-03-23  Xingnan Wang  <xingnan.wang@intel.com>
3182
3183         Optimize for IPP in DirectConvolver::process()
3184         https://bugs.webkit.org/show_bug.cgi?id=80255
3185
3186         Reviewed by Chris Rogers.
3187
3188         Increase ~2X performance by conv() in IPP.
3189
3190         * platform/audio/DirectConvolver.cpp:
3191         (WebCore::DirectConvolver::DirectConvolver):
3192         (WebCore::DirectConvolver::process):
3193         * platform/audio/DirectConvolver.h:
3194         (DirectConvolver):
3195
3196 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
3197
3198         MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback
3199         https://bugs.webkit.org/show_bug.cgi?id=81657
3200
3201         Reviewed by Adam Barth.
3202
3203         Last major WebCore patch for the JSEP PeerConnection, together with the associated
3204         IceCallback (they both depend on each other and IceCallback has very few lines of real code).
3205
3206         My next patch after this one will do a major overhaul of the existing layout tests
3207         and add a few new ones.
3208
3209         * GNUmakefile.list.am:
3210         * Modules/mediastream/DOMWindowMediaStream.idl:
3211         * Modules/mediastream/IceCallback.h: Added.
3212         (WebCore):
3213         (IceCallback):
3214         (WebCore::IceCallback::~IceCallback):
3215         * Modules/mediastream/IceCallback.idl: Added.
3216         * Modules/mediastream/PeerConnection00.cpp: Added.
3217         (WebCore):
3218         (WebCore::PeerConnection00::create):
3219         (WebCore::PeerConnection00::PeerConnection00):
3220         (WebCore::PeerConnection00::~PeerConnection00):
3221         (WebCore::PeerConnection00::hasLocalAudioTrack):
3222         (WebCore::PeerConnection00::hasLocalVideoTrack):
3223         (WebCore::PeerConnection00::parseMediaHints):
3224         (WebCore::PeerConnection00::createOffer):
3225         (WebCore::PeerConnection00::createAnswer):
3226         (WebCore::PeerConnection00::setLocalDescription):
3227         (WebCore::PeerConnection00::setRemoteDescription):
3228         (WebCore::PeerConnection00::localDescription):
3229         (WebCore::PeerConnection00::remoteDescription):
3230         (WebCore::PeerConnection00::startIce):
3231         (WebCore::PeerConnection00::processIceMessage):
3232         (WebCore::PeerConnection00::readyState):
3233         (WebCore::PeerConnection00::iceState):
3234         (WebCore::PeerConnection00::addStream):
3235         (WebCore::PeerConnection00::removeStream):
3236         (WebCore::PeerConnection00::localStreams):
3237         (WebCore::PeerConnection00::remoteStreams):
3238         (WebCore::PeerConnection00::close):
3239         (WebCore::PeerConnection00::didGenerateIceCandidate):
3240         (WebCore::PeerConnection00::didChangeReadyState):
3241         (WebCore::PeerConnection00::didChangeIceState):
3242         (WebCore::PeerConnection00::didAddRemoteStream):
3243         (WebCore::PeerConnection00::didRemoveRemoteStream):
3244         (WebCore::PeerConnection00::interfaceName):
3245         (WebCore::PeerConnection00::scriptExecutionContext):
3246         (WebCore::PeerConnection00::stop):
3247         (WebCore::PeerConnection00::eventTargetData):
3248         (WebCore::PeerConnection00::ensureEventTargetData):
3249         (WebCore::PeerConnection00::changeReadyState):
3250         (WebCore::PeerConnection00::changeIceState):
3251         * Modules/mediastream/PeerConnection00.h: Added.
3252         (WebCore):
3253         (PeerConnection00):
3254         (WebCore::PeerConnection00::refEventTarget):
3255         (WebCore::PeerConnection00::derefEventTarget):
3256         * Modules/mediastream/PeerConnection00.idl: Added.
3257         * WebCore.gypi:
3258         * bindings/generic/RuntimeEnabledFeatures.h:
3259         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
3260         * bindings/js/JSPeerConnection00Custom.cpp: Added.
3261         (WebCore):
3262         (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00):
3263         * dom/EventTargetFactory.in:
3264
3265 2012-03-23  Adrienne Walker  <enne@google.com>
3266
3267         [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
3268         https://bugs.webkit.org/show_bug.cgi?id=82062
3269
3270         Reviewed by James Robinson.
3271
3272         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3273         (CCScrollbarLayerImpl):
3274
3275 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
3276
3277         [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
3278         https://bugs.webkit.org/show_bug.cgi?id=81924
3279
3280         Reviewed by Adam Barth.
3281
3282         Nothing to test, just moving methods.
3283
3284         * platform/mediastream/MediaStreamCenter.cpp:
3285         (WebCore::MediaStreamCenter::constructSDP):
3286         (WebCore):
3287
3288 2012-03-23  Sami Kyostila  <skyostil@chromium.org>
3289
3290         Reuse buffer allocation if canvas size does not change
3291         https://bugs.webkit.org/show_bug.cgi?id=80871
3292
3293         Reviewed by Stephen White.
3294
3295         If the user changes the width or height attributes of a canvas element,
3296         the contents of the canvas should be cleared and the context state
3297         should be reset. This has become a common idiom to clear the canvas
3298         "efficiently" at the start of a frame.
3299
3300         Previously, this code path triggered a full reallocation of the image
3301         buffer backing the canvas, leading to reduced performance. This patch
3302         implements an optimization where we reuse the previous image buffer
3303         allocation if the size of the canvas did not change. Also, instead of
3304         clearing the canvas every time its dimensions are touched, we only clear
3305         if anything has been drawn into the canvas since it was previously
3306         cleared.
3307
3308         Note that for now this optimization only applies for 2D canvases,
3309         since it is not entirely clear how touching the dimensions of a WebGL
3310         canvas should work.
3311
3312         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
3313               existing layout tests for canvas resetting.
3314
3315         * html/HTMLCanvasElement.cpp:
3316         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3317         (WebCore::HTMLCanvasElement::reset):
3318         (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial
3319         graphics context state so we can restore it without creating a new
3320         context.
3321         (WebCore::HTMLCanvasElement::clearImageBuffer):
3322         (WebCore):
3323         (WebCore::HTMLCanvasElement::clearCopiedImage):
3324         * html/HTMLCanvasElement.h:
3325         (HTMLCanvasElement):
3326         * html/canvas/CanvasRenderingContext2D.cpp:
3327         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
3328         compositor when the context is reset, because clearing the image buffer
3329         does the same thing. We can also skip the notification if we did not
3330         have an image buffer at the time of the reset, because the reset will
3331         not have any visual impact in this case. Finally, if the canvas size
3332         did change, the notification is also unnecessary because of the call
3333         to RenderObject::repaint() from HTMLCanvasElement::reset().
3334
3335 2012-03-22  Martin Robinson  <mrobinson@igalia.com>
3336
3337         Fix some code generation warnings on GTK+.
3338
3339         Reviewed by Gustavo Noronha Silva.
3340
3341         No new tests. This just fixes warnings.
3342
3343         * GNUmakefile.am: Remove nonexistent directories from the list IDL directories.
3344
3345 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3346
3347         Unreviewed, rolling out r111751.
3348         http://trac.webkit.org/changeset/111751
3349         https://bugs.webkit.org/show_bug.cgi?id=82060
3350
3351         caused 15% page cycler regression for chromium-linux
3352         (Requested by eae on #webkit).
3353
3354         * css/CSSStyleSelector.cpp:
3355         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3356
3357 2012-03-23  Kentaro Hara  <haraken@chromium.org>
3358
3359         Support [ImplementedAs] for attributes
3360         https://bugs.webkit.org/show_bug.cgi?id=81605
3361
3362         Reviewed by Adam Barth.
3363
3364         [ImplementedAs] just supports methods. [ImplementedAs] should support
3365         attributes too.
3366
3367         Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs
3368
3369         Test: bindings/scripts/test/TestObj.idl
3370
3371         * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes.
3372         (AttributeNameForGetterAndSetter):
3373
3374         * bindings/scripts/test/TestObj.idl: Added a test case.
3375
3376         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
3377         (WebDOMTestObj::strawberry):
3378         (WebDOMTestObj::setStrawberry):
3379         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3380         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3381         (webkit_dom_test_obj_get_strawberry):
3382         (webkit_dom_test_obj_set_strawberry):
3383         (webkit_dom_test_obj_get_property):
3384         (webkit_dom_test_obj_class_init):
3385         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3386         * bindings/scripts/test/JS/JSTestObj.cpp:
3387         (WebCore):
3388         (WebCore::jsTestObjStrawberry):
3389         (WebCore::setJSTestObjStrawberry):
3390         * bindings/scripts/test/JS/JSTestObj.h:
3391         (WebCore):
3392         * bindings/scripts/test/ObjC/DOMTestObj.h:
3393         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3394         (-[DOMTestObj strawberry]):
3395         (-[DOMTestObj setStrawberry:]):
3396         * bindings/scripts/test/V8/V8TestObj.cpp:
3397         (WebCore::TestObjInternal::strawberryAttrGetter):
3398         (TestObjInternal):
3399         (WebCore::TestObjInternal::strawberryAttrSetter):
3400         (WebCore):
3401
3402 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
3403
3404         The JSC code generator doesn't generate correct code for Constructors
3405         https://bugs.webkit.org/show_bug.cgi?id=82046
3406
3407         Reviewed by Kentaro Hara.
3408
3409         The main bulk of generated code for constructors uses the name jsConstructor
3410         for the created object, and then calls GenerateParametersCheck which generates
3411         code that uses the name castedThis.
3412
3413         * bindings/scripts/CodeGeneratorJS.pm:
3414         (GenerateConstructorDefinition):
3415         * bindings/scripts/test/JS/JSTestInterface.cpp:
3416         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
3417         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3418         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
3419         * bindings/scripts/test/JS/JSTestObj.cpp:
3420         (WebCore::JSTestObjConstructor::finishCreation):
3421         (WebCore::JSTestObjConstructor::constructJSTestObj):
3422         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3423         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3424         * bindings/scripts/test/TestObj.idl:
3425         * bindings/scripts/test/V8/V8TestObj.cpp:
3426         (WebCore::V8TestObj::constructorCallback):
3427
3428 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
3429
3430         The JSC code generator can't handle boolean arguments for Callbacks
3431         https://bugs.webkit.org/show_bug.cgi?id=82045
3432
3433         Reviewed by Kentaro Hara.
3434
3435         CodeGeneratorJS.pm only handles DOMStrings and objects as arguments
3436         for a Callback, so I added support for boolean values as well.
3437
3438         * bindings/scripts/CodeGeneratorJS.pm:
3439         (GenerateCallbackImplementation):
3440         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
3441         (WebDOMTestCallback::callbackWithBoolean):
3442         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
3443         (WebDOMTestCallback):
3444         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
3445         (webkit_dom_test_callback_callback_with_boolean):
3446         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
3447         * bindings/scripts/test/JS/JSTestCallback.cpp:
3448         (WebCore::JSTestCallback::callbackWithBoolean):
3449 &n