Generalize DocumentWeakReference into WTF::WeakPtr
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-15  Adam Barth  <abarth@webkit.org>
2
3         Generalize DocumentWeakReference into WTF::WeakPtr
4         https://bugs.webkit.org/show_bug.cgi?id=106854
5
6         Reviewed by Darin Adler.
7
8         This patch replaces DocumentWeakReference with WeakPtr. There should be
9         no change in behavior.
10
11         * dom/Document.cpp:
12         (WebCore):
13         (WebCore::Document::Document):
14         (WebCore::Document::~Document):
15         (WebCore::PerformTaskContext::PerformTaskContext):
16         (PerformTaskContext):
17         (WebCore::Document::didReceiveTask):
18         (WebCore::Document::postTask):
19         (WebCore::Document::reportMemoryUsage):
20         * dom/Document.h:
21         (WebCore):
22         (Document):
23
24 2013-01-15  James Simonsen  <simonjam@chromium.org>
25
26         [User Timing] INVALID_ACCESS_ERR should be thrown if measuring from a 0 Nav Timing value
27         https://bugs.webkit.org/show_bug.cgi?id=106935
28
29         Reviewed by Tony Gentilcore.
30
31         Test: http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_measure_exception.html
32
33         * page/PerformanceUserTiming.cpp:
34         (WebCore::UserTiming::findExistingMarkStartTime):
35
36 2013-01-15  Tommy Widenflycht  <tommyw@google.com>
37
38         MediaStream API: Rename the [add|remove]Track callbacks to [add|remove]RemoteTrack for clarity
39         https://bugs.webkit.org/show_bug.cgi?id=106791
40
41         Reviewed by Adam Barth.
42
43         No tests needed.
44
45         * Modules/mediastream/MediaStream.cpp:
46         (WebCore::MediaStream::addRemoteTrack):
47         (WebCore::MediaStream::removeRemoteTrack):
48         * Modules/mediastream/MediaStream.h:
49         * platform/mediastream/MediaStreamCenter.cpp:
50         (WebCore::MediaStreamCenter::addMediaStreamTrack):
51         (WebCore::MediaStreamCenter::removeMediaStreamTrack):
52         * platform/mediastream/MediaStreamDescriptor.h:
53         (MediaStreamDescriptorClient):
54
55 2013-01-15  Mark Pilgrim  <pilgrim@chromium.org>
56
57         [Chromium] Move SocketStreamHandle and SocketStreamHandleInternal to WebCore/platform
58         https://bugs.webkit.org/show_bug.cgi?id=106899
59
60         Reviewed by Adam Barth.
61
62         Part of a larger refactoring series; see tracking bug 106829.
63
64         * WebCore.gypi:
65         * platform/network/chromium/SocketStreamHandle.cpp: Copied from Source/WebKit/chromium/src/SocketStreamHandle.cpp.
66         (WebCore::SocketStreamHandleInternal::send):
67         (WebCore::SocketStreamHandleInternal::didOpenStream):
68         (WebCore::SocketStreamHandleInternal::didSendData):
69         (WebCore::SocketStreamHandleInternal::didReceiveData):
70         (WebCore::SocketStreamHandleInternal::didClose):
71         (WebCore::SocketStreamHandleInternal::didFail):
72         * platform/network/chromium/SocketStreamHandleInternal.h: Copied from Source/WebKit/chromium/src/SocketStreamHandleInternal.h.
73
74 2013-01-15  Ojan Vafai  <ojan@chromium.org>
75
76         RenderText::computePreferredLogicalWidths does not need to be public
77         https://bugs.webkit.org/show_bug.cgi?id=106934
78
79         Reviewed by Levi Weintraub.
80
81         * rendering/RenderCounter.h:
82         Add OVERRIDE keyword.
83         * rendering/RenderText.h:
84         Make protected.
85
86 2013-01-15  Ojan Vafai  <ojan@chromium.org>
87
88         Cleanup visibility of some computePreferredLogicalWidths calls
89         https://bugs.webkit.org/show_bug.cgi?id=106933
90
91         Reviewed by Levi Weintraub.
92
93         No need for these to be public.
94
95         * rendering/RenderBox.h:
96         (WebCore::RenderBox::computePreferredLogicalWidths):
97         This should never get called in practice. Add an assert to that effect.
98
99         * rendering/RenderGrid.h:
100         (RenderGrid):
101         * rendering/RenderReplica.h:
102         (RenderReplica):
103         * rendering/RenderScrollbarPart.h:
104         (RenderScrollbarPart):
105
106 2013-01-13  Dirk Schulze  <dschulze@adobe.com>
107
108         [CSS Filters] brightness() function doesn't work as specified
109         https://bugs.webkit.org/show_bug.cgi?id=106674
110
111         Reviewed by Dean Jackson.
112
113         The brightness filter implementation modified the intercept instead of the slope on
114         the feComponentTransfer function. The passed amount acts as multiplier for each
115         color chanel now.
116
117         Existing tests cover the changes and were updated.
118
119         * css/CSSParser.cpp:
120         (WebCore::CSSParser::parseBuiltinFilterArguments):
121         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
122         (PlatformCALayer::setFilters):
123         * rendering/FilterEffectRenderer.cpp:
124         (WebCore::FilterEffectRenderer::build):
125
126 2013-01-15  Zan Dobersek  <zandobersek@gmail.com>
127
128         [GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
129         https://bugs.webkit.org/show_bug.cgi?id=106197
130
131         Reviewed by Martin Robinson.
132
133         No new tests - existing layout tests are being unskipped, only a few fail
134         (but their failures are of cross-platform nature).
135
136         * GNUmakefile.features.am.in: Add feature defines for all three features.
137         They are disabled by default for now.
138         * GNUmakefile.list.am: Add missing build targets.
139         * bindings/gobject/GNUmakefile.am: Ditto.
140         * bindings/js/JSPerformanceEntryCustom.cpp: Added the necessary custom bindings.
141         Mimics the custom V8 bindings.
142         (WebCore):
143         (WebCore::toJS):
144
145 2013-01-15  Alexis Menard  <alexis@webkit.org>
146
147         Unprefixed transitionend event doesn't seem to be implemented, which breaks many sites
148         https://bugs.webkit.org/show_bug.cgi?id=105647
149
150         Reviewed by Julien Chaffraix.
151
152         Add support for transitionend event delivery as part as the unprefixing
153         work on CSS Transitions. This patch adds some code in EventTarget to
154         figure out if the current event to dispatch has a prefixed version or
155         not. Then from the list of listeners we deduce which event should be delivered
156         (prefixed or unprefixed).
157
158         In the case of the CSS Transitions, WebKit will now behave as follow :
159         if an event listener is attached to the prefixed version of the
160         transition end event then only the prefixed event will be send.
161         If an event listener is attached to the unprefixed version
162         of the transition end event then only the unprefixed event will be
163         send. If there are event listeners on both unprefixed and prefixed
164         events then only the unprefixed event will be send.
165
166         The behavior was discussed here :
167         http://lists.webkit.org/pipermail/webkit-dev/2013-January/023301.html.
168
169         Tests: transitions/transition-end-event-unprefixed-01.html
170                transitions/transition-end-event-unprefixed-02.html
171
172         * dom/Document.cpp:
173         (WebCore::Document::addListenerTypeIfNeeded): Register the prefixed
174         listener too as transitionend listeners so that we properly dispatch
175         events for them.
176         * dom/EventNames.h:
177         (WebCore): Add the new transitionend name.
178         * dom/EventTarget.cpp:
179         (WebCore::createMatchingPrefixedEvent):
180         (WebCore::prefixedType):
181         (WebCore::EventTarget::fireEventListeners): Find out if somebody is
182         listening for unprefixed events, if so we always send the unprefixed
183         event, if not then we create a prefixed event and send it.
184         * page/animation/AnimationController.cpp:
185         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
186         * page/animation/ImplicitAnimation.cpp:
187         (WebCore::ImplicitAnimation::sendTransitionEvent): Always create by
188         default unprefixed events.
189
190 2013-01-15  Tony Gentilcore  <tonyg@chromium.org>
191
192         Make AtomicMarkupTokenBase use a bare UChar* for external characters
193         https://bugs.webkit.org/show_bug.cgi?id=106919
194
195         Reviewed by Eric Seidel.
196
197         This allows an arbitrary backing for external characters which is necessary for the threaded HTML parser.
198
199         No new tests because no new functionality.
200
201         * html/parser/HTMLTreeBuilder.cpp:
202         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
203         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
204         * xml/parser/MarkupTokenBase.h:
205         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
206         (WebCore::AtomicMarkupTokenBase::characters):
207         (AtomicMarkupTokenBase):
208         (WebCore::AtomicMarkupTokenBase::charactersLength):
209         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
210         * xml/parser/XMLTreeBuilder.cpp:
211         (WebCore::XMLTreeBuilder::processCharacter):
212
213 2013-01-15  Arko Saha  <arko@motorola.com>
214
215         Microdata: propertiesCollection[name] should return undefined if item doesn't have a property named 'name'
216         https://bugs.webkit.org/show_bug.cgi?id=106849
217
218         Reviewed by Kentaro Hara.
219
220         We should return undefined if hasNamedItem() is false.
221
222         Test: fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
223
224         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
225         (WebCore::V8HTMLCollection::namedPropertyGetter):
226
227 2013-01-15  Michael Pruett  <michael@68k.org>
228
229         [GTK] Fix build after r139665
230         https://bugs.webkit.org/show_bug.cgi?id=106917
231
232         Reviewed by Dean Jackson.
233
234         * GNUmakefile.list.am:
235
236 2013-01-15  Antti Koivisto  <antti@apple.com>
237
238         Move parent pointer from TreeShared to subclass
239         https://bugs.webkit.org/show_bug.cgi?id=106910
240
241         Reviewed by Darin Adler.
242
243         This simplifies both TreeShared and clients, and makes code dealing with parents more understandable in general.
244
245         * dom/Document.h:
246         (WebCore::Node::Node):
247         * dom/Node.cpp:
248         (WebCore::Node::reportMemoryUsage):
249         * dom/Node.h:
250     
251             Add m_parentOrHostNode variable (matching the accessor names).
252
253         (Node):
254         (WebCore::Node::hasTreeSharedParent):
255         (WebCore::Node::parentNode):
256         (WebCore::Node::setParentOrHostNode):
257         (WebCore::Node::parentOrHostNode):
258         * platform/TreeShared.h:
259         (WebCore):
260         (WebCore::TreeShared::TreeShared):
261         (WebCore::TreeShared::deref):
262         
263             Call subclass hasTreeSharedParent() to figure out if it is time to delete.
264
265         (TreeShared):
266
267             Remove parent pointer and accessors.
268             Remove ParentNodeType template parameter.
269             Remove now unnecessay reportMemoryUsage().
270
271         (WebCore::adopted):
272         * svg/SVGElementInstance.cpp:
273         (WebCore::SVGElementInstance::SVGElementInstance):
274         * svg/SVGElementInstance.h:
275         
276             Add m_parentInstance variable.
277
278         (WebCore::SVGElementInstance::setParentOrHostNode):
279         (WebCore::SVGElementInstance::parentNode):
280         (SVGElementInstance):
281         (WebCore::SVGElementInstance::hasTreeSharedParent):
282
283 2013-01-15  Simon Fraser  <simon.fraser@apple.com>
284
285         Allow tiled WKViews to have transparent backgrounds
286         https://bugs.webkit.org/show_bug.cgi?id=106400
287
288         Reviewed by Anders Carlsson.
289         
290         When WKViews were set to have transparent backgrounds, they still
291         obscured content behind the view, for several reasons.
292         
293         First, when in tiled scrolling mode, WKView set the background
294         of its layer to opaque white. Fix by using the clearColor (effectively
295         removing the background color) if the view has a non-opaque background.
296         
297         Second, RenderLayerBacking just looked at FrameViews's isTransparent()
298         when deciding to make TileCache tiles non-opaque, but it also needs to
299         consider FrameViews with a non-opaque base background color. The
300         same logic was necessary to avoid setting an opaque white background
301         color on the TileCache layer.
302         
303         Finally, for views with non-opaque backgrounds, we don't want to display
304         linen, so RenderLayerCompositor::requiresOverhangAreasLayer() was changed
305         to return false in that case.
306         
307         View transparency is not testable in layout tests.
308
309         * page/FrameView.cpp:
310         (WebCore::FrameView::hasOpaqueBackground):
311         * page/FrameView.h:
312         * rendering/RenderLayerBacking.cpp:
313         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
314         (WebCore::RenderLayerBacking::updateBackgroundColor):
315         * rendering/RenderLayerCompositor.cpp:
316         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
317
318 2013-01-15  Ojan Vafai  <ojan@chromium.org>
319
320         RenderView does not need to override computePreferredLogicalWidth
321         https://bugs.webkit.org/show_bug.cgi?id=106852
322
323         Reviewed by Levi Weintraub.
324
325         Calling minPreferredLogicalWidth calls computePreferredLogicalWidth,
326         which happens a few lines later in layoutWithFlattening. No need
327         to call it explicitly.
328
329         * rendering/RenderFrameBase.cpp:
330         (WebCore::RenderFrameBase::layoutWithFlattening):
331         * rendering/RenderView.cpp:
332         * rendering/RenderView.h:
333
334 2013-01-15  Vsevolod Vlasov  <vsevik@chromium.org>
335
336         Unreviewed, remove file that was accidentally added to the wrong patch.
337
338         * inspector/front-end/FileSystemWorkspaceProvider.js: Removed.
339
340 2013-01-15  Florin Malita  <fmalita@chromium.org>
341
342         [Chromium] Incorrect opaque region tracking for PlatformContextSkia::drawRRect
343         https://bugs.webkit.org/show_bug.cgi?id=106898
344
345         Reviewed by Stephen White.
346
347         Since drawRRect() doesn't cover the whole bounding rect, it needs to pass a didDrawBounded
348         notification down to the opaque region tracker (instead of didDrawRect as it currently
349         does).
350
351         Test: platform/chromium/compositing/rounded-corners.html
352
353         * platform/graphics/skia/PlatformContextSkia.h:
354         (WebCore::PlatformContextSkia::drawRRect):
355
356 2013-01-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
357
358         [Qt] WebGL does not require accelerated compositing
359         https://bugs.webkit.org/show_bug.cgi?id=106892
360
361         Reviewed by Jocelyn Turcotte.
362
363         Allow the creation of WebGL canvas even when accelerated compositing is not enabled.
364
365         * html/HTMLCanvasElement.cpp:
366         (WebCore::HTMLCanvasElement::getContext):
367
368 2013-01-15  Andrey Lushnikov  <lushnikov@chromium.org>
369
370         Web Inspector: refactor DefaultTextEditor's paintLine method
371         https://bugs.webkit.org/show_bug.cgi?id=106893
372
373         Reviewed by Pavel Feldman.
374
375         Move render ranges functionality out of paintLine method into separate subroutine.
376
377         No new tests: no change in behaviour.
378
379         * inspector/front-end/DefaultTextEditor.js:
380         (WebInspector.TextEditorMainPanel.prototype._renderRanges): Added.
381         (WebInspector.TextEditorMainPanel.prototype._paintLine):
382         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
383
384 2013-01-15  Elliott Sprehn  <esprehn@gmail.com>
385
386         display:inline's hover behavior is not applied to ::before and ::after pseudo elements
387         https://bugs.webkit.org/show_bug.cgi?id=91723
388
389         Reviewed by Eric Seidel.
390
391         When hovering over the anonymous text renderers inside :before and :after
392         we would correctly detect a hit in InlineTextBox::nodeAtPoint, but would
393         then fail to set the correct node for the hit test because in
394         RenderObject::updateHitTestResult node() is null. Instead we should walk
395         up the render tree to the PseudoElement and treat it as if we hit that.
396
397         Test: fast/css-generated-content/hover-inline.html
398
399         * rendering/RenderObject.cpp:
400         (WebCore::RenderObject::updateHitTestResult):
401
402 2013-01-15  Zeno Albisser  <zeno@webkit.org>
403
404         GraphicsSurface: Canvas with WebGL content is painted off by one pixel
405         https://bugs.webkit.org/show_bug.cgi?id=106446
406
407         When painting to TextureMapper the provided targetRect is in contents
408         coordinate system. This leads to an off by one pixel error when painting
409         outlines of 1px.
410         This needs to be taken into account in the transformation matrix
411         and in the TextureMapperGL::drawTexture call.
412
413         Test: fast/canvas/webgl/webgl-composite-modes.html
414
415         Reviewed by Noam Rosenthal.
416
417         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
418         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
419         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
420         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
421         * platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:
422         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
423
424 2013-01-14  Kentaro Hara  <haraken@chromium.org>
425
426         [V8] Make an Isolate parameter mandatory in SerializedScriptValue methods
427         https://bugs.webkit.org/show_bug.cgi?id=106800
428
429         Reviewed by Adam Barth.
430
431         SerializedScriptValue methods are used by both V8 bindings
432         and WebCore. So they should support both an Isolate-version
433         method and an non-Isolate version method.
434
435         There are two ways to accomplish that:
436
437         [1] Use an optional Isolate parameter.
438
439         [2] Implement two versions and delegate the non-Isolate
440         version method to the Isolate version method.
441
442         I would prefer the approach [2], because I'd like to statically
443         make sure that we never pass a 0 Isolate. If we take the approach
444         [1], we need to insert ASSERT(isolate) here and there.
445
446         This patch implements the approach [2].
447
448         No tests. No change in behavior.
449
450         * bindings/v8/SerializedScriptValue.cpp:
451         (WebCore::SerializedScriptValue::create):
452         (WebCore):
453         (WebCore::SerializedScriptValue::nullValue):
454         (WebCore::SerializedScriptValue::undefinedValue):
455         (WebCore::SerializedScriptValue::booleanValue):
456         (WebCore::SerializedScriptValue::numberValue):
457         (WebCore::SerializedScriptValue::SerializedScriptValue):
458         * bindings/v8/SerializedScriptValue.h:
459         (SerializedScriptValue):
460
461 2013-01-15  Dongwoo Joshua Im  <dw.im@samsung.com>
462
463         [CSS] Rename the enum, from "ETextAlignLast" to "TextAlignLast"
464         https://bugs.webkit.org/show_bug.cgi?id=106887
465
466         Reviewed by Alexis Menard.
467
468         No new tests are added since there is no behavior changes.
469
470         * css/CSSPrimitiveValueMappings.h:
471         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
472         (WebCore::CSSPrimitiveValue::operator TextAlignLast):
473         * css/StyleBuilder.cpp:
474         (WebCore::StyleBuilder::StyleBuilder):
475         * rendering/style/RenderStyle.h:
476         * rendering/style/RenderStyleConstants.h:
477         * rendering/style/StyleRareInheritedData.h:
478         (StyleRareInheritedData):
479
480 2013-01-15  Tommy Widenflycht  <tommyw@google.com>
481
482         MediaStream API: Fixing crashing bug in MediaStream
483         https://bugs.webkit.org/show_bug.cgi?id=106886
484
485         Reviewed by Eric Seidel.
486
487         Fixing crashing bug during destruction.
488
489         No new tests needed.
490
491         * Modules/mediastream/MediaStream.cpp:
492         (WebCore::MediaStream::contextDestroyed):
493
494 2013-01-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
495
496         [Qt][CSS Shaders] Make custom filter render in Wk1 mode
497         https://bugs.webkit.org/show_bug.cgi?id=101532
498
499         Reviewed by Noam Rosenthal.
500
501         Handle ValidatedCustomFilterOperations which are used by WebKit1. To keep the cache of compiled programs working, 
502         the cache has been updated to use CustomFilterProgramInfo as a hash key. CustomFilterProgramInfo is an existing
503         class specifically designed for this purpose.
504
505         * platform/graphics/texmap/TextureMapperGL.cpp:
506         (WebCore::getPassesRequiredForFilter):
507         (WebCore::TextureMapperGL::removeCachedCustomFilterProgram):
508         (WebCore::TextureMapperGL::drawUsingCustomFilter):
509         (WebCore::BitmapTextureGL::applyFilters):
510         * platform/graphics/texmap/TextureMapperGL.h:
511         (TextureMapperGL):
512
513 2013-01-15  Andrey Adaikin  <aandrey@chromium.org>
514
515         Web Inspector: [Canvas] introduce CallArgument type into the protocol
516         https://bugs.webkit.org/show_bug.cgi?id=106640
517
518         Reviewed by Yury Semikhatsky.
519
520         CallArgument type abstraction to describe arguments of a canvas context call.
521         Drive-by: Introduce a CanvasContext to fix the wrong contextId value in the protocol.
522         The contextId should point to the Resource that represents a context (2D or 3D canvas).
523
524         * inspector/InjectedScriptCanvasModuleSource.js:
525         (.):
526         * inspector/Inspector.json:
527         * inspector/front-end/CanvasProfileView.js:
528
529 2012-12-28  Vsevolod Vlasov  <vsevik@chromium.org>
530
531         Web Inspector: Support inspector file system access with isolated file system through InspectorFrontendHost.
532         https://bugs.webkit.org/show_bug.cgi?id=105727
533
534         Reviewed by Pavel Feldman.
535
536         File system access through isolated file system is implemented in inspector.
537         File system access requests are sent through InspectorFrontendHost.
538         Introduced IsolatedFileSystemModel encapsulating file system access logic. 
539         Introduced FileSystemMapping that provides mapping between workspace uris and file system pathes.
540         DOMFileSystem.createIsolatedFileSystem modified to accept optional registeredName parameter.
541
542         * Modules/filesystem/DOMFileSystem.cpp:
543         (WebCore::DOMFileSystem::createIsolatedFileSystem):
544         * Modules/filesystem/DOMFileSystem.h:
545         (DOMFileSystem):
546         * WebCore.gypi:
547         * WebCore.vcproj/WebCore.vcproj:
548         * inspector/InspectorFrontendClient.h:
549         (InspectorFrontendClient):
550         * inspector/InspectorFrontendClientLocal.h:
551         (WebCore::InspectorFrontendClientLocal::supportsFileSystems):
552         (WebCore::InspectorFrontendClientLocal::requestFileSystems):
553         (WebCore::InspectorFrontendClientLocal::addFileSystem):
554         (WebCore::InspectorFrontendClientLocal::removeFileSystem):
555         (InspectorFrontendClientLocal):
556         * inspector/InspectorFrontendHost.cpp:
557         (WebCore::InspectorFrontendHost::supportsFileSystems):
558         (WebCore):
559         (WebCore::InspectorFrontendHost::requestFileSystems):
560         (WebCore::InspectorFrontendHost::addFileSystem):
561         (WebCore::InspectorFrontendHost::removeFileSystem):
562         (WebCore::InspectorFrontendHost::isolatedFileSystem):
563         * inspector/InspectorFrontendHost.h:
564         (WebCore):
565         (InspectorFrontendHost):
566         * inspector/InspectorFrontendHost.idl:
567         * inspector/compile-front-end.py:
568         * inspector/front-end/FileSystemMapping.js: Added.
569         * inspector/front-end/InspectorFrontendAPI.js:
570         (InspectorFrontendAPI.fileSystemsLoaded):
571         (InspectorFrontendAPI.fileSystemRemoved):
572         (InspectorFrontendAPI.fileSystemAdded):
573         * inspector/front-end/InspectorFrontendHostStub.js:
574         (.WebInspector.InspectorFrontendHostStub.prototype.supportsFileSystems):
575         (.WebInspector.InspectorFrontendHostStub.prototype.requestFileSystems):
576         (.WebInspector.InspectorFrontendHostStub.prototype.addFileSystem):
577         (.WebInspector.InspectorFrontendHostStub.prototype.removeFileSystem):
578         (.WebInspector.InspectorFrontendHostStub.prototype.isolatedFileSystem):
579         * inspector/front-end/IsolatedFileSystemModel.js: Added.
580         * inspector/front-end/WebKit.qrc:
581         * inspector/front-end/externs.js:
582         (DOMFileSystem):
583         (InspectorFrontendHostAPI.prototype.supportsFileSystems):
584         (InspectorFrontendHostAPI.prototype.requestFileSystems):
585         (InspectorFrontendHostAPI.prototype.addFileSystem):
586         (InspectorFrontendHostAPI.prototype.removeFileSystem):
587         (InspectorFrontendHostAPI.prototype.isolatedFileSystem):
588         * inspector/front-end/inspector.html:
589         * inspector/front-end/inspector.js:
590
591 2013-01-15  Kondapally Kalyan  <kalyan.kondapally@intel.com>
592
593         [EFL][WebGL] Add error handling to carefully manage Window backing pixmaps.
594         https://bugs.webkit.org/show_bug.cgi?id=106582
595
596         Reviewed by Kenneth Rohde Christiansen.
597
598         We use XCompositeNameWindowPixmap to create a pixmap that serves as a reference to
599         the off-screen storage for a Window Handle. We expect the Window to be valid and
600         the created glx pixmap to be a valid drawable. This may not be true always.
601         This patch adds support for X Error checks and handles the generated errors.
602
603         Covered by existing WebGL layout tests.
604
605         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
606         (WebCore):
607         (WebCore::handleXPixmapCreationError):
608         (ScopedXPixmapCreationErrorHandler):
609         (WebCore::ScopedXPixmapCreationErrorHandler::ScopedXPixmapCreationErrorHandler):
610         (WebCore::ScopedXPixmapCreationErrorHandler::~ScopedXPixmapCreationErrorHandler):
611         (WebCore::ScopedXPixmapCreationErrorHandler::isValidOperation):
612         Helper Class to catch XErrors.
613
614         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
615         (WebCore::GraphicsSurfacePrivate::createPixmap): Added support to check and handle generated XErrors.
616         (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
617         (WebCore::GraphicsSurfacePrivate::clear): Destroys GL Resources.
618         (GraphicsSurfacePrivate):
619
620 2013-01-15  Kondapally Kalyan  <kalyan.kondapally@intel.com>
621
622         [EFL] [WebGL] Minor cleanup in PlatformContext.
623         https://bugs.webkit.org/show_bug.cgi?id=106758
624
625         Reviewed by Kenneth Rohde Christiansen.
626
627         We currently have different implementations of CurrentContextWrapper for EGL and GLX.
628         This patch cleans up the code to use same implementation for both the backends.
629
630         * platform/graphics/opengl/GLPlatformContext.cpp:
631         (GLCurrentContextWrapper):
632         (WebCore::GLCurrentContextWrapper::GLCurrentContextWrapper):
633         (WebCore::GLCurrentContextWrapper::~GLCurrentContextWrapper):
634
635         Common implementation for both EGL and GLX.
636         (WebCore::createOffScreenContext):
637         (WebCore::GLPlatformContext::createContext):
638         * platform/graphics/surfaces/egl/EGLContext.cpp:
639         * platform/graphics/surfaces/egl/EGLContext.h:
640         * platform/graphics/surfaces/glx/GLXContext.h:
641
642         Removed code related to CurrentContextWrapper.
643
644 2013-01-14  Ryosuke Niwa  <rniwa@webkit.org>
645
646         platform/mac/accessibility/progressbar.html fails on Mac WK1 and WK2
647         https://bugs.webkit.org/show_bug.cgi?id=106850
648
649         Reviewed by Chris Fleizach.
650
651         The bug was caused by some callers of supportsFocus directly calling that of Node.
652         Fixed the bug by calling HTMLElement's so that the virtual function on Element gets
653         called as needed.
654
655         * html/HTMLMeterElement.cpp:
656         (WebCore::HTMLMeterElement::supportsFocus):
657         * html/HTMLOutputElement.cpp:
658         (WebCore::HTMLOutputElement::supportsFocus):
659         * html/HTMLProgressElement.cpp:
660         (WebCore::HTMLProgressElement::supportsFocus):
661
662 2013-01-14  Dima Gorbik  <dgorbik@apple.com>
663
664         Implement ID selector matching for the WebVTT ::cue pseudo element
665         https://bugs.webkit.org/show_bug.cgi?id=105481
666
667         Reviewed by Eric Carlson.
668
669         Implemented matching cue WebVTT elements by an identifier. Identifiers of all WebVTT nodes in the rendering tree for 
670         a given cue are set to match the cue identifier.
671
672         Existing tests were modified to cover this case.
673
674         * html/track/TextTrackCue.cpp:
675         (WebCore::TextTrackCue::markFutureAndPastNodes):
676
677 2013-01-14  Mark Pilgrim  <pilgrim@chromium.org>
678
679         [Chromium] Use explicit WebKit prefixes in BlobRegistryProxy
680         https://bugs.webkit.org/show_bug.cgi?id=106859
681
682         Reviewed by Adam Barth.
683
684         As requested in https://bugs.webkit.org/show_bug.cgi?id=106831#c2
685
686         * platform/network/chromium/BlobRegistryProxy.cpp:
687         (WebCore::BlobRegistryProxy::registerBlobURL):
688
689 2013-01-14  Max Vujovic  <mvujovic@adobe.com>
690
691         [ANGLE] Update ANGLE in WebKit
692         https://bugs.webkit.org/show_bug.cgi?id=106274
693
694         Unreviewed build fix for GTK after http://trac.webkit.org/changeset/139702
695
696         * GNUmakefile.am:
697
698 2013-01-14  Dean Jackson  <dino@apple.com>
699
700         Yet another unreviewed attempted QT build fix, this time because
701         it's falling over on Filters.
702
703         * rendering/RenderSnapshottedPlugIn.cpp:
704         (WebCore):
705         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
706
707 2013-01-14  Dean Jackson  <dino@apple.com>
708
709         Unreviewed EFL build fix.
710
711         * CMakeLists.txt:
712
713 2013-01-14  Dean Jackson  <dino@apple.com>
714
715         Blur the label background of a snapshotted plugin
716         https://bugs.webkit.org/show_bug.cgi?id=106630
717
718         Reviewed by Simon Fraser.
719
720         When we are showing a label indicating the plugin has been snapshotted,
721         slightly blur the snapshot behind the label so that it is more clear. I expect
722         that if/when other ports pick up this code, we'll need to separate the
723         UI treatment somewhat, but this is ok for a first step.
724
725         * rendering/RenderSnapshottedPlugIn.cpp:
726         (RenderSnapshottedPlugInBlurFilter): Private class to use FEGaussianBlur to blur an image.
727         (WebCore::RenderSnapshottedPlugInBlurFilter::create):
728         (WebCore::RenderSnapshottedPlugInBlurFilter::setSourceImageRect):
729         (WebCore::RenderSnapshottedPlugInBlurFilter::sourceImageRect):
730         (WebCore::RenderSnapshottedPlugInBlurFilter::filterRegion):
731         (WebCore::RenderSnapshottedPlugInBlurFilter::output):
732         (WebCore::RenderSnapshottedPlugInBlurFilter::RenderSnapshottedPlugInBlurFilter):
733         (WebCore::RenderSnapshottedPlugInBlurFilter::apply):
734         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New member variable to hold a cached version of a preblurred snapshot.
735         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn): Remember to remove the preblurred image from the cache.
736         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Zero the preblurred version if it exists.
737         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Either paint snapshot or blurred snapshot with label.
738         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): New method to paint a full sized snapshot.
739         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
740         (WebCore::snapshottedPluginImageForLabelDisplay): Static function to produce the blurred snapshot.
741         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel): Calls paintSnapshot with the blurred snapshot on Mac.
742         * rendering/RenderSnapshottedPlugIn.h:
743
744 2013-01-14  Mark Pilgrim  <pilgrim@chromium.org>
745
746         [Chromium] Move BlobRegistryProxy into WebCore
747         https://bugs.webkit.org/show_bug.cgi?id=106831
748
749         Reviewed by Adam Barth.
750
751         Part of a larger refactoring series to remove layering violations
752         in Chromium. See tracking bug 106829.
753
754         * WebCore.gypi:
755         * platform/network/chromium/BlobRegistryProxy.cpp: Added.
756         (WebCore):
757         (WebCore::blobRegistry):
758         (WebCore::BlobRegistryProxy::BlobRegistryProxy):
759         (WebCore::BlobRegistryProxy::registerBlobURL):
760         (WebCore::BlobRegistryProxy::unregisterBlobURL):
761         * platform/network/chromium/BlobRegistryProxy.h: Added.
762         (WebCore):
763         (BlobRegistryProxy):
764         (WebCore::BlobRegistryProxy::loadResourceSynchronously):
765         (WebCore::BlobRegistryProxy::~BlobRegistryProxy):
766
767 2013-01-14  Levi Weintraub  <leviw@chromium.org>
768
769         Rolling out r139618. Appears to be causing sporadic crashes on Debug bots.
770
771         * Modules/mediastream/MediaStream.cpp:
772         (WebCore::processTrack):
773         * Modules/mediastream/MediaStreamTrack.cpp:
774         (WebCore::MediaStreamTrack::readyState):
775         * Modules/mediastream/MediaStreamTrack.h:
776         * Modules/mediastream/MediaStreamTrack.idl:
777
778 2013-01-14  Levi Weintraub  <leviw@chromium.org>
779
780         Rolling out r139678. This triggered a number of WebAudio crashes on Debug bots.
781
782         * platform/audio/chromium/AudioDestinationChromium.cpp:
783         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
784
785 2013-01-09  Levi Weintraub <leviw@chromium.org>
786
787         Rolling out r139683. It broke a bunch of webkit_unit_tests.
788
789 2013-01-14  Ojan Vafai  <ojan@chromium.org>
790
791         RenderListItem does not need to override computePreferredLogicalWidth
792         https://bugs.webkit.org/show_bug.cgi?id=106839
793
794         Reviewed by Levi Weintraub.
795
796         Apparently there was a time when the list marker was considered part of
797         the list item's preferred width, but that is no longer the case.
798         This code was added in r3421. The code around preferred widths has change
799         a lot since then.
800
801         * rendering/RenderListItem.cpp:
802         * rendering/RenderListItem.h:
803
804 2013-01-13  Dima Gorbik  <dgorbik@apple.com>
805
806         Implement element type selectors for the WebVTT ::cue pseudo class
807         https://bugs.webkit.org/show_bug.cgi?id=105480
808
809         Reviewed by Antti Koivisto.
810
811         Implemented tag matching for the WebVTT specific tags "c" and "v". All common html tags like "b" and "i" are 
812         handled without any changes to the code. Creating a rendering tree and DOM tree now use different code paths. 
813         They both are made by cloning and modifying the tree produced by the parser. Voice tags now use spans for both 
814         rendering and DOM trees to conform to specs. Since this changes a lot of code little refactoring has been
815         done. Removed m_hasInnerTimestamps since it is no longer needed, it doesn't affect anything. m_documentFragment 
816         was renamed to m_webVTTNodeTree.
817
818         Existing tests were modified to cover this case.
819
820         * html/track/TextTrackCue.cpp:
821         (WebCore::TextTrackCue::TextTrackCue):
822         (WebCore::TextTrackCue::setText): rename m_documentFragment to m_webVTTNodeTree
823         (WebCore::TextTrackCue::createWebVTTNodeTree): parse the cue if it hasn't been parsed before.
824         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): clone and prepare a node for using in the DOM tree according to specs.
825         (WebCore::TextTrackCue::getCueAsHTML): get a DOM tree for the cue.
826         (WebCore::TextTrackCue::createCueRenderingTree): create a rendering tree (main tree is just being cloned for now).
827         (WebCore::TextTrackCue::markFutureAndPastNodes): tightening the argument type.
828         (WebCore::TextTrackCue::updateDisplayTree):
829         (WebCore::TextTrackCue::getDisplayTree): code cleanup, removed m_hasInnerTimeStamps.
830         * html/track/TextTrackCue.h:
831         (WebCore::TextTrackCue::voiceElementTagName):
832         (TextTrackCue):
833         (WebCore::TextTrackCue::classElementTagName):
834         * html/track/WebVTTParser.cpp:
835         (WebCore::WebVTTParser::constructTreeFromToken): type of the newly created elements was changed to Element to avoid hitting 
836         an assertion when cloning because a cloned element will not have HTMLElement type for elements with "v" and "c" tag.
837
838 2013-01-14  Xianzhu Wang  <wangxianzhu@chromium.org>
839
840         Sometimes RenderLayer::updateNeedsCompositedScrolling is not called
841         https://bugs.webkit.org/show_bug.cgi?id=106271
842
843         Reviewed by Simon Fraser.
844
845         1. If a layer has no out-of-flow descendant, m_hasOutOfFlowPositionedDescendant won't change and won't trigger updateNeedsCompositedScrolling in updateDescendantDependentFlags. Set m_hasOutOfFlowPositionedDescendantDirty to true and call updateNeedsCompositedScrolling when the dirty flag becomes false from true.
846         2. When the content size changes causing change of scrollable status, updateNeedsCompositedScrolling should also be called.
847
848         Test: compositing/overflow/dynamic-composited-scrolling-status.html
849
850         * page/FrameView.cpp:
851         (WebCore::FrameView::addScrollableArea): Returns whether the scrollable area has just been newly added.
852         (WebCore::FrameView::removeScrollableArea): Returns whether the scrollable area has just been removed.
853         * page/FrameView.h:
854         (FrameView):
855         * rendering/RenderLayer.cpp:
856         (WebCore::RenderLayer::RenderLayer): Changed the initial value of m_hasOutOfFlowPositionedDescendantDirty to true to make sure m_hasOutOfFlowPositionedDescendant will be updated initially.
857         (WebCore::RenderLayer::updateDescendantDependentFlags): Call updateNeedsCompositedScrolling when m_hasOutOfFlowPositionedDescendantDirty is true.
858         (RenderLayer::updateScrollableAreaSet): Calls updateNeedsCompositedScrolling() when scrollable status changes.
859         * rendering/RenderLayer.h:
860         (RenderLayer):
861
862 2013-01-14  Ryosuke Niwa  <rniwa@webkit.org>
863
864         EFL build fix after r139681.
865
866         * dom/NodeRareData.h:
867         (WebCore::NodeMicroDataTokenLists::NodeMicroDataTokenLists):
868
869 2013-01-14  Tien-Ren Chen  <trchen@chromium.org>
870
871         Correct FrameView::scrollableAreaBoundingBox() calculation in the presence of transforms
872         https://bugs.webkit.org/show_bug.cgi?id=105075
873
874         Reviewed by Simon Fraser.
875
876         As mentioned by the FIXME comment, we need to ask the renderer for the
877         absolute bounding box of a frame for correct transformation.
878         This fixes the bug that iframe cannot be scrolled properly when it is
879         transformed.
880
881         Tests: scrollingcoordinator/non-fast-scrollable-region-scaled-iframe.html
882                scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
883
884         * page/FrameView.cpp:
885         (WebCore::FrameView::scrollableAreaBoundingBox):
886
887 2013-01-14  Nate Chapin  <japhet@chromium.org>
888
889         Enable reuse of cached main resources
890         https://bugs.webkit.org/show_bug.cgi?id=105667
891
892         Reviewed by Antti Koivisto.
893
894         Test: http/tests/cache/cached-main-resource.html
895
896         * WebCore.exp.in:
897         * dom/Document.cpp:
898         (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
899         * dom/Document.h:
900         (Document):
901         * loader/FrameLoader.cpp:
902         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
903             MainResourceLoader will take care of it.
904         * loader/MainResourceLoader.cpp:
905         (WebCore::MainResourceLoader::MainResourceLoader):
906         (WebCore::MainResourceLoader::receivedError):
907         (WebCore::MainResourceLoader::willSendRequest):
908         (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
909         (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
910         (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
911             ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
912         (WebCore::MainResourceLoader::identifier):
913         * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
914             to better describe when it is used.
915         * loader/cache/CachedRawResource.cpp:
916         (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
917         (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
918         (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
919         * loader/cache/CachedRawResource.h:
920         (CachedRawResource):
921         (RedirectPair):
922         (WebCore::CachedRawResource::RedirectPair::RedirectPair):
923         * loader/cache/CachedResource.cpp:
924         (WebCore::CachedResource::addClientToSet):: Don't return cached data for a main resource synchronously
925         * loader/cache/CachedResource.h:
926         (WebCore::CachedResource::canReuse):
927         (CachedResource):
928         * loader/cache/CachedResourceLoader.cpp:
929         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
930         * testing/Internals.cpp:
931         (WebCore::Internals::isLoadingFromMemoryCache):
932         (WebCore):
933         * testing/Internals.h:
934         (Internals):
935         * testing/Internals.idl:
936
937 2013-01-11  Ryosuke Niwa  <rniwa@webkit.org>
938
939         Move functions from NodeRareData to ElementRareData and other classes
940         https://bugs.webkit.org/show_bug.cgi?id=106679
941
942         Reviewed by Benjamin Poulain.
943
944         Moved tab index related functions from NodeRareData to ElementRareData since only
945         HTMLElement uses them, and moved related functions on Node to Element accordingly.
946
947         Also replaced transientMutationObserverRegistry and ensureTransientMutationObserverRegistry
948         by ensureMutationObserverData, and moved micro-data related member functions into
949         NodeMicroDataTokenLists, and moved NodeMutationObserverData and NodeMicroDataTokenLists
950         out of NodeRareData as they're used outside of NodeRareData now.
951
952         The intention is to move more code into NodeMutationObserverData and NodeMicroDataTokenLists
953         in the follow up patches so that they can detect the removability of NodeRareData.
954
955         No new tests are added since there should be no behavior changes.
956
957         * dom/Element.cpp:
958         (WebCore::Element::clearTabIndexExplicitlyIfNeeded):
959         (WebCore::Element::setTabIndexExplicitly):
960         (WebCore::Element::tabIndex):
961         (WebCore::Element::supportsFocus):
962         * dom/Element.h:
963         (Element):
964         * dom/ElementRareData.h:
965         (ElementRareData):
966         (WebCore::ElementRareData::tabIndex):
967         (WebCore::ElementRareData::setTabIndexExplicitly):
968         (WebCore::ElementRareData::tabIndexSetExplicitly):
969         (WebCore::ElementRareData::clearTabIndexExplicitly):
970         * dom/Node.cpp:
971         (WebCore::Node::tabIndex):
972         (WebCore::Node::supportsFocus):
973         (WebCore::Node::mutationObserverRegistry):
974         (WebCore::Node::transientMutationObserverRegistry):
975         (WebCore::Node::registerMutationObserver):
976         (WebCore::Node::registerTransientMutationObserver):
977         (WebCore::Node::itemProp):
978         (WebCore::Node::setItemProp):
979         (WebCore::Node::itemRef):
980         (WebCore::Node::setItemRef):
981         (WebCore::Node::itemType):
982         (WebCore::Node::setItemType):
983         * dom/Node.h:
984         (Node):
985         * dom/NodeRareData.h:
986         (NodeMutationObserverData):
987         (WebCore::NodeMutationObserverData::create):
988         (NodeMicroDataTokenLists):
989         (WebCore::NodeMicroDataTokenLists::create):
990         (WebCore::NodeMicroDataTokenLists::itemProp):
991         (WebCore::NodeMicroDataTokenLists::itemRef):
992         (WebCore::NodeMicroDataTokenLists::itemType):
993         (NodeRareData):
994         (WebCore::NodeRareData::mutationObserverData):
995         (WebCore::NodeRareData::ensureMutationObserverData):
996         (WebCore::NodeRareData::ensureMicroDataTokenLists):
997         * html/HTMLElement.cpp:
998         (WebCore::HTMLElement::parseAttribute):
999
1000 2013-01-14  Ojan Vafai  <ojan@chromium.org>
1001
1002         Remove unnecessary setNeedsLayoutAndPrefWidthsRecalc from RenderTable
1003         https://bugs.webkit.org/show_bug.cgi?id=106832
1004
1005         Reviewed by Levi Weintraub.
1006
1007         These are both called from locations that either set these bits themselves
1008         or clearly don't need these bits set (e.g. computePreferredLogicalWidths).
1009
1010         * rendering/RenderTable.cpp:
1011         (WebCore::RenderTable::splitColumn):
1012         (WebCore::RenderTable::appendColumn):
1013
1014 2013-01-14  Chris Rogers  <crogers@google.com>
1015
1016         Switch AudioDestinationChromium over to new createAudioDevice() method
1017         https://bugs.webkit.org/show_bug.cgi?id=106816
1018
1019         Reviewed by James Robinson.
1020
1021         * platform/audio/chromium/AudioDestinationChromium.cpp:
1022         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
1023
1024 2013-01-14  Huang Dongsung  <luxtella@company100.net>
1025
1026         [TexMap] Use a premuliplied color in TextureMapperGL.
1027         https://bugs.webkit.org/show_bug.cgi?id=105786
1028
1029         Reviewed by Noam Rosenthal.
1030
1031         TextureMapperGL always uses a premultiplied color, so we must convert
1032         an unmultiplied color to a premultiplied color before setting the uniform value of
1033         colorLocation.
1034
1035         Test: compositing/background-color/background-color-alpha-with-opacity.html
1036
1037         * platform/graphics/texmap/TextureMapperGL.cpp:
1038         (WebCore::TextureMapperGL::drawBorder):
1039         (WebCore::TextureMapperGL::drawSolidColor):
1040         (WebCore::prepareFilterProgram):
1041         * platform/graphics/texmap/TextureMapperLayer.cpp:
1042         (WebCore::blendWithOpacity):
1043         (WebCore):
1044         (WebCore::TextureMapperLayer::paintSelf):
1045             TextureMapperLayer must not convert solidColor to premultiplied
1046             color, because TextureMapperImageBuffer expects unmultiplied color.
1047
1048 2013-01-14  Arko Saha  <arko@motorola.com>
1049
1050         Microdata: REGRESSION(r138725): Causes crash in chromium port
1051         https://bugs.webkit.org/show_bug.cgi?id=106828
1052
1053         Reviewed by Ryosuke Niwa.
1054
1055         We should hold PropertyNodeList in RefPtr<PropertyNodeList>.
1056
1057         Test: fast/dom/MicroData/propertiescollection-crash.html
1058
1059         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1060         (WebCore::V8HTMLCollection::namedPropertyGetter):
1061
1062 2013-01-14  Tien-Ren Chen  <trchen@chromium.org>
1063
1064         Positioned children of an overflow:visible container should ignore scroll offset when updating layer position
1065         https://bugs.webkit.org/show_bug.cgi?id=106814
1066
1067         Reviewed by Simon Fraser.
1068
1069         This patch fixes a bug in RenderLayer::updateLayerPosition that
1070         scrollLeft / scrollTop of a block should only be effective when the
1071         block has overflow clipping. The bug results in rendering artifacts
1072         and triggers a RenderGeometryMap assertion falure.
1073
1074         Fixes http://crbug.com/167985
1075
1076         Test: fast/overflow/overflow-visible-should-ignore-scroll.html
1077
1078         * rendering/RenderLayer.cpp:
1079         (WebCore::RenderLayer::updateLayerPosition):
1080
1081 2013-01-14  Alec Flett  <alecflett@chromium.org>
1082
1083         IndexedDB: Remove IDBObjectStore/IndexBackendImpl and support functions
1084         https://bugs.webkit.org/show_bug.cgi?id=106605
1085
1086         Remove all uses of IDBObjectStoreBackendInterface and IDBIndexBackend*,
1087         as they are no longer used after recent refactoring.
1088
1089         Reviewed by Darin Fisher.
1090
1091         * GNUmakefile.list.am:
1092         * Modules/indexeddb/IDBCallbacks.h:
1093         (WebCore):
1094         * Modules/indexeddb/IDBCursor.cpp:
1095         (WebCore::IDBCursor::update):
1096         * Modules/indexeddb/IDBDatabase.cpp:
1097         (WebCore::IDBDatabase::createObjectStore):
1098         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1099         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1100         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1101         (IDBDatabaseBackendImpl):
1102         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1103         (WebCore):
1104         (IDBDatabaseBackendInterface):
1105         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1106         (IDBFactoryBackendImpl):
1107         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1108         (IDBFactoryBackendInterface):
1109         * Modules/indexeddb/IDBIndex.cpp:
1110         * Modules/indexeddb/IDBIndexBackendInterface.h: Removed.
1111         * Modules/indexeddb/IDBObjectStore.cpp:
1112         (WebCore::IDBObjectStore::add):
1113         (WebCore::IDBObjectStore::put):
1114         * Modules/indexeddb/IDBObjectStore.h:
1115         (IDBObjectStore):
1116         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1117         (WebCore::IDBObjectStoreBackendImpl::makeIndexWriters):
1118         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1119         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::IndexWriter):
1120         (IndexWriter):
1121         (IDBObjectStoreBackendImpl):
1122         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Removed.
1123         * Modules/indexeddb/IDBTransaction.cpp:
1124         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1125         (IDBTransactionBackendImpl):
1126         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1127         (WebCore):
1128         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1129         * Target.pri:
1130         * WebCore.gypi:
1131         * WebCore.vcproj/WebCore.vcproj:
1132         * WebCore.xcodeproj/project.pbxproj:
1133
1134 2013-01-14  Max Vujovic  <mvujovic@adobe.com>
1135
1136         [ANGLE] Update ANGLE in WebKit
1137         https://bugs.webkit.org/show_bug.cgi?id=106274
1138
1139         Reviewed by Dean Jackson.
1140
1141         Update ANGLE to r1641.
1142
1143         Update the files used in the EFL and GTK builds.
1144
1145         No new tests. No change in behavior.
1146
1147         * CMakeLists.txt:
1148         * GNUmakefile.list.am:
1149
1150 2013-01-14  Julien Chaffraix  <jchaffraix@webkit.org>
1151
1152         REGRESSION (r132591): Underpainting @ uofmchildrenshospital.org
1153         https://bugs.webkit.org/show_bug.cgi?id=105861
1154
1155         Reviewed by David Hyatt.
1156
1157         Test: fast/repaint/overhanging-float-detach-repaint.html
1158
1159         The issue comes from overhanging float not contributing to their containing block's
1160         overflow. This meant that repaint() would ignore them leading to an under-repaint.
1161         The fix is simple: force all the overhanging floats to repaint themselves.
1162
1163         * rendering/RenderObject.cpp:
1164         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
1165
1166 2013-01-14  Dominic Mazzoni  <dmazzoni@google.com>
1167
1168         AX: Need to implement ColorWellRole
1169         https://bugs.webkit.org/show_bug.cgi?id=106756
1170
1171         Reviewed by Chris Fleizach.
1172
1173         Maps input type=color to the accessible role ColorWellRole.
1174         Adds a new accessor to AccessibilityObject to get the color
1175         value in a cross-platform way that doesn't require parsing.
1176
1177         Test: accessibility/color-well.html
1178
1179         * accessibility/AccessibilityNodeObject.cpp:
1180         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1181         (WebCore::AccessibilityNodeObject::colorValue):
1182         (WebCore):
1183         * accessibility/AccessibilityNodeObject.h:
1184         (AccessibilityNodeObject):
1185         * accessibility/AccessibilityObject.h:
1186         (WebCore::AccessibilityObject::isColorWell):
1187         (AccessibilityObject):
1188         (WebCore::AccessibilityObject::colorValue):
1189         * accessibility/AccessibilityRenderObject.cpp:
1190         (WebCore::AccessibilityRenderObject::stringValue):
1191         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1192         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1193         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1194         * html/HTMLInputElement.cpp:
1195         (WebCore):
1196         (WebCore::HTMLInputElement::isColorControl):
1197         * html/HTMLInputElement.h:
1198         (HTMLInputElement):
1199
1200 2013-01-11  Emil A Eklund  <eae@chromium.org>
1201
1202         offsetWidth/height incorrect for images when zoomed
1203         https://bugs.webkit.org/show_bug.cgi?id=106624
1204
1205         Reviewed by Levi Weintraub.
1206         
1207         offsetWidth and height are incorrect for images at certain zoom
1208         levels due to flooring the values ones adjusted for zoom.
1209         By rounding the value instead we avoid the problem and return
1210         the right size.
1211
1212         Test: fast/images/zoomed-offset-size.html
1213
1214         * dom/Element.cpp:
1215         (WebCore::Element::offsetWidth):
1216         (WebCore::Element::offsetHeight):
1217         (WebCore::Element::clientWidth):
1218         (WebCore::Element::clientHeight):
1219         Change to round (as opposed to floor) the zoom adjusted value.
1220         
1221         * rendering/RenderObject.h:
1222         (WebCore::adjustLayoutUnitForAbsoluteZoom):
1223         * rendering/style/RenderStyle.h:
1224         (WebCore::adjustLayoutUnitForAbsoluteZoom):
1225         Add LayoutUnit version of adjustForAbsoluteZoom to avoid float
1226         conversion.
1227
1228 2013-01-14  Mark Pilgrim  <pilgrim@chromium.org>
1229
1230         [Chromium] Move AudioDestinationChromium into WebCore
1231         https://bugs.webkit.org/show_bug.cgi?id=106803
1232
1233         Reviewed by Adam Barth.
1234
1235         This doesn't really belong in WebKit/chromium/src since it defines
1236         things directly in the WebCore namespace.
1237
1238         * WebCore.gypi:
1239         * platform/audio/chromium/AudioDestinationChromium.cpp: Added.
1240         (WebCore):
1241         (WebCore::AudioDestination::create):
1242         (WebCore::AudioDestinationChromium::AudioDestinationChromium):
1243         (WebCore::AudioDestinationChromium::~AudioDestinationChromium):
1244         (WebCore::AudioDestinationChromium::start):
1245         (WebCore::AudioDestinationChromium::stop):
1246         (WebCore::AudioDestination::hardwareSampleRate):
1247         (WebCore::AudioDestinationChromium::render):
1248         (WebCore::AudioDestinationChromium::provideInput):
1249         * platform/audio/chromium/AudioDestinationChromium.h: Added.
1250         (WebCore):
1251         (AudioDestinationChromium):
1252         (WebCore::AudioDestinationChromium::isPlaying):
1253         (WebCore::AudioDestinationChromium::sampleRate):
1254
1255 2013-01-14  Adrian Perez de Castro  <aperez@igalia.com>
1256
1257         [GTK] Fix indentation for GStreamer supported MIME types list
1258         https://bugs.webkit.org/show_bug.cgi?id=106812
1259
1260         Reviewed by Philippe Normand.
1261
1262         No tests. No change in behavior.
1263
1264         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1265
1266 2013-01-14  John Bauman  <jbauman@chromium.org>
1267
1268         Use correct size for DrawingBuffer readback
1269         https://bugs.webkit.org/show_bug.cgi?id=106744
1270
1271         Reviewed by Kenneth Russell.
1272
1273         The value getInternalFramebufferSize is bogus if there's a
1274         DrawingBuffer, so use size() instead.
1275
1276         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1277         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
1278
1279 2013-01-14  Joshua Bell  <jsbell@chromium.org>
1280
1281         Bindings: Remove special cases for DOMString[]
1282         https://bugs.webkit.org/show_bug.cgi?id=106506
1283
1284         Remove special in binding code generators that map DOMString[] to DOMStringList.
1285         Array (T[]) and sequence (sequence<T>) are supported enough now that to be used
1286         for Internals, which is the only IDL that needed updating.
1287
1288         Reviewed by Adam Barth.
1289
1290         Tests: fast/forms/file/selected-files-from-history-state.html
1291                fast/forms/state-restore-broken-state.html
1292                fast/forms/state-restore-skip-stateless.html
1293
1294         Bindings test results updated for JS/V8.
1295
1296         * bindings/scripts/CodeGenerator.pm: Remove redundant IsArrayType (use GetArrayType instead)
1297         (IsRefPtrType): Array and Sequence types are not RefPtr types.
1298         * bindings/scripts/CodeGeneratorJS.pm:
1299         (IndexGetterReturnsStrings): Remove special case for DOMString[].
1300         (AddIncludesForType): Skip Array types, just like Sequence types. (Should probably recurse
1301         for the base type, but not needed for now.)
1302         (GenerateParametersCheckExpression): s/IsArrayType/GetArrayType/
1303         (GetNativeType): Remove special case for DOMString[].
1304         (GetNativeTypeForCallbacks): Ditto.
1305         (JSValueToNative): Ditto.
1306         * bindings/scripts/CodeGeneratorV8.pm:
1307         (GenerateParametersCheckExpression): s/IsArrayType/GetArrayType/
1308         (GetNativeType): Remove special case for DOMString[].
1309         (JSValueToNative): Ditto.
1310         (GetV8HeaderName): Ditto.
1311         (IsWrapperType):
1312         * bindings/scripts/test/JS/JSTestObj.cpp:
1313         (WebCore):
1314         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1315         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1316         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1317         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1318         * bindings/scripts/test/JS/JSTestObj.h:
1319         (WebCore):
1320         * bindings/scripts/test/TestObj.idl: Added explicit new cases for DOMStringList
1321         * bindings/scripts/test/V8/V8TestObj.cpp:
1322         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
1323         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
1324         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
1325         (TestObjV8Internal):
1326         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
1327         (WebCore):
1328         (WebCore::ConfigureV8TestObjTemplate):
1329         * testing/Internals.cpp:
1330         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
1331         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
1332         (WebCore::Internals::iconURLs):
1333         (WebCore::Internals::getReferencedFilePaths):
1334         * testing/Internals.h:
1335         (Internals):
1336         * testing/Internals.idl: Produce DOMString[], consume sequence<DOMString> to match tests.
1337
1338 2013-01-14  Elliott Sprehn  <esprehn@chromium.org>
1339
1340         Clean up WebVTTNodeType code
1341         https://bugs.webkit.org/show_bug.cgi?id=106714
1342
1343         Reviewed by Tony Chang.
1344
1345         There's no reason for so many methods just to compare some enums.
1346         The existing code can also be simplified quite a bit.
1347
1348         No new tests, just refactoring.
1349
1350         * css/SelectorChecker.cpp:
1351         (WebCore::SelectorChecker::checkOne):
1352         * css/StyleResolver.cpp:
1353         (WebCore::StyleResolver::collectMatchingRules):
1354         (WebCore::StyleResolver::canShareStyleWithElement):
1355         * dom/Element.cpp:
1356         (WebCore::Element::webVTTNodeType):
1357         (WebCore::Element::setWebVTTNodeType):
1358         * dom/Element.h:
1359         (Element):
1360         * dom/ElementRareData.h:
1361         (WebCore::ElementRareData::setWebVTTNodeType):
1362         (WebCore::ElementRareData::webVTTNodeType):
1363         (ElementRareData):
1364         * dom/NodeRareData.h:
1365         (WebCore::NodeRareData::NodeRareData):
1366         (NodeRareData):
1367         * html/track/TextTrack.h:
1368         * html/track/TextTrackCue.cpp:
1369         (WebCore::TextTrackCue::markFutureAndPastNodes):
1370
1371 2013-01-14  Antti Koivisto  <antti@apple.com>
1372
1373         REGRESSION (r139218): Flaky assertion in WebCore::StorageTask::StorageTask releasing memory
1374         https://bugs.webkit.org/show_bug.cgi?id=106718
1375
1376         Reviewed by Andreas Kling.
1377
1378         Type assertion was missing a new type.
1379
1380         * storage/StorageTask.cpp:
1381         (WebCore::StorageTask::StorageTask):
1382
1383 2013-01-14  Yury Semikhatsky  <yurys@chromium.org>
1384
1385         [REGRESSION] Dev Tools popup for Workers forgets sizes/shows tiny in top left
1386         https://bugs.webkit.org/show_bug.cgi?id=106807
1387
1388         Reviewed by Pavel Feldman.
1389
1390         Open dedicated worker inspector 600x600 by default and remember its size
1391         after resizing.
1392
1393         * inspector/front-end/Settings.js:
1394         * inspector/front-end/WorkerManager.js:
1395
1396 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1397
1398         [V8] Make an Isolate parameter mandatory in associateObjectWithWrapper()
1399         https://bugs.webkit.org/show_bug.cgi?id=106784
1400
1401         Reviewed by Adam Barth.
1402
1403         No tests. No change in behavior.
1404
1405         * bindings/v8/V8DOMWrapper.h:
1406         (V8DOMWrapper):
1407
1408 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1409
1410         [V8] Make an Isolate parameter mandatory in ScriptDebugServer::interruptAndRun()
1411         https://bugs.webkit.org/show_bug.cgi?id=106779
1412
1413         Reviewed by Adam Barth.
1414
1415         This is one of steps to make an Isolate parameter mandatory.
1416
1417         No tests. No change in behavior.
1418
1419         * bindings/v8/ScriptDebugServer.h:
1420         (ScriptDebugServer):
1421
1422 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1423
1424         [V8] Make an Isolate parameter mandatory in wrap()
1425         https://bugs.webkit.org/show_bug.cgi?id=106783
1426
1427         Reviewed by Adam Barth.
1428
1429         Now it's safe to make an Isolate parameter in wrap().
1430
1431         No tests. No change in behavior.
1432
1433         * bindings/scripts/CodeGeneratorV8.pm:
1434         (GenerateHeader):
1435         * bindings/scripts/test/V8/V8Float64Array.h:
1436         (WebCore):
1437         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1438         (WebCore::wrap):
1439         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1440         (WebCore::wrap):
1441         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1442         (WebCore::wrap):
1443         * bindings/scripts/test/V8/V8TestEventTarget.h:
1444         (WebCore::wrap):
1445         * bindings/scripts/test/V8/V8TestException.h:
1446         (WebCore::wrap):
1447         * bindings/scripts/test/V8/V8TestInterface.h:
1448         (WebCore::wrap):
1449         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1450         (WebCore::wrap):
1451         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1452         (WebCore::wrap):
1453         * bindings/scripts/test/V8/V8TestNode.h:
1454         (WebCore::wrap):
1455         * bindings/scripts/test/V8/V8TestObj.h:
1456         (WebCore::wrap):
1457         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1458         (WebCore::wrap):
1459         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1460         (WebCore::wrap):
1461
1462 2013-01-14  Tommy Widenflycht  <tommyw@google.com>
1463
1464         MediaStream API: Update MediaStreamTrack::readyState to match specification
1465         https://bugs.webkit.org/show_bug.cgi?id=106781
1466
1467         Reviewed by Adam Barth.
1468
1469         MediaStreamTrack::readyState now returns a string like the rest of the RTC classes.
1470
1471         Existing tests expanded to cover patch.
1472
1473         * Modules/mediastream/MediaStream.cpp:
1474         (WebCore::processTrack):
1475         * Modules/mediastream/MediaStreamTrack.cpp:
1476         (WebCore::MediaStreamTrack::readyState):
1477         (WebCore::MediaStreamTrack::ended):
1478         (WebCore):
1479         * Modules/mediastream/MediaStreamTrack.h:
1480         (MediaStreamTrack):
1481         * Modules/mediastream/MediaStreamTrack.idl:
1482
1483 2013-01-14  Vsevolod Vlasov  <vsevik@chromium.org>
1484
1485         Web Inspector: Audit Tool's False Positive on Set-Cookie header
1486         https://bugs.webkit.org/show_bug.cgi?id=106794
1487
1488         Reviewed by Pavel Feldman.
1489
1490         Header value is now returned as undefined if there is no such header as it was before regression.
1491
1492         Test: http/tests/inspector/audits/set-cookie-header-audit-no-false-positive.html
1493
1494         * inspector/front-end/AuditRules.js:
1495         (WebInspector.AuditRules.CSSRuleBase.prototype.sheetsCallback): Drive-by fix, callback should be called even when there is no headers. 
1496         * inspector/front-end/NetworkRequest.js:
1497         (WebInspector.NetworkRequest.prototype._headerValue):
1498
1499 2013-01-14  Eric Carlson  <eric.carlson@apple.com>
1500
1501         Do not pass nil when initializing legible output
1502         https://bugs.webkit.org/show_bug.cgi?id=106799
1503
1504         Reviewed by Jessie Berlin.
1505
1506         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1507         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): -[AVPlayerItemLegibleOutput initWithDependencyFactory:mediaSubtypesForNativeRepresentation:]
1508             wants an empty NSArray rather than nil.
1509
1510 2013-01-14  Andrey Adaikin  <aandrey@chromium.org>
1511
1512         Web Inspector: [Canvas] UI: add control buttons for doing the replay steps
1513         https://bugs.webkit.org/show_bug.cgi?id=106788
1514
1515         Reviewed by Pavel Feldman.
1516
1517         Adding UI control buttons for doing the Canvas replay steps.
1518         Drive-by: fixed a bug in DataGrid (found by the JSCompiler).
1519
1520         * inspector/front-end/CanvasProfileView.js:
1521         (WebInspector.CanvasProfileView):
1522         (WebInspector.CanvasProfileView.prototype._createControlButton):
1523         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
1524         (WebInspector.CanvasProfileView.prototype._onReplayFirstStepClick):
1525         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
1526         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
1527         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
1528         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
1529         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
1530         (WebInspector.CanvasProfileType.prototype._updateDecorationElement):
1531         * inspector/front-end/DOMExtension.js:
1532         (Element.prototype.enableStyleClass):
1533         * inspector/front-end/DataGrid.js:
1534         (WebInspector.DataGrid.prototype.setRootNode):
1535         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
1536         (WebInspector.DataGrid.prototype.moveToNextIfNeeded):
1537         (WebInspector.DataGrid.prototype._editingCommitted):
1538         (WebInspector.DataGridNode):
1539         * inspector/front-end/canvasProfiler.css:
1540         (.canvas-replay-image):
1541         (.canvas-replay-image.wait):
1542         (.canvas-replay-controls):
1543         (.canvas-replay-log):
1544         (.canvas-control-button):
1545         (.canvas-control-button:active):
1546         (.canvas-control-button:disabled):
1547         (.canvas-control-button img):
1548         (.canvas-replay-first-step img):
1549         (.canvas-replay-next-step img):
1550         (.canvas-replay-prev-step img):
1551         (.canvas-replay-last-step img):
1552
1553 2013-01-14  Tommy Widenflycht  <tommyw@google.com>
1554
1555         MediaStream API: Update the track accessors on MediaStream to match the latest specification
1556         https://bugs.webkit.org/show_bug.cgi?id=106660
1557
1558         Reviewed by Adam Barth.
1559
1560         The spec has significantly changed how tracks are accessed from a MediaStream:
1561         http://dev.w3.org/2011/webrtc/editor/getusermedia.html
1562
1563         In short: the attributes audioTrack/videoTrack that returned special MediaStreamTrackLists have been
1564         replaced by the functions getAudioTracks()/getVideoTracks that return standard sequences of
1565         MediaStreamTracks.
1566
1567         Existing tests updated and expanded to cover patch.
1568
1569         * CMakeLists.txt:
1570         * GNUmakefile.list.am:
1571         * Modules/mediastream/MediaStream.cpp:
1572         (WebCore::MediaStream::create):
1573         (WebCore::MediaStream::MediaStream):
1574         (WebCore::MediaStream::~MediaStream):
1575         (WebCore::MediaStream::readyState):
1576         (WebCore):
1577         (WebCore::MediaStream::addTrack):
1578         (WebCore::MediaStream::removeTrack):
1579         (WebCore::MediaStream::getTrackById):
1580         (WebCore::MediaStream::streamEnded):
1581         (WebCore::MediaStream::contextDestroyed):
1582         (WebCore::MediaStream::scheduleDispatchEvent):
1583         (WebCore::MediaStream::scheduledEventTimerFired):
1584         * Modules/mediastream/MediaStream.h:
1585         (MediaStream):
1586         (WebCore::MediaStream::getAudioTracks):
1587         (WebCore::MediaStream::getVideoTracks):
1588         * Modules/mediastream/MediaStream.idl:
1589         * Modules/mediastream/MediaStreamTrackList.cpp: Removed.
1590         * Modules/mediastream/MediaStreamTrackList.h: Removed.
1591         * Modules/mediastream/MediaStreamTrackList.idl: Removed.
1592         * Modules/webaudio/AudioContext.cpp:
1593         (WebCore::AudioContext::createMediaStreamSource):
1594         * WebCore.gypi:
1595         * dom/EventTargetFactory.in:
1596         * platform/mediastream/MediaStreamDescriptor.h:
1597         (WebCore::MediaStreamDescriptor::addAudioComponent):
1598         (WebCore::MediaStreamDescriptor::removeAudioComponent):
1599         (WebCore::MediaStreamDescriptor::addVideoComponent):
1600         (WebCore::MediaStreamDescriptor::removeVideoComponent):
1601
1602 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1603
1604         [V8] Add m_isolate to ScriptController, WorkerScriptController and V8DOMWindowShell
1605         https://bugs.webkit.org/show_bug.cgi?id=106771
1606
1607         Reviewed by Adam Barth.
1608
1609         This is one of the steps to pass an Isolate everywhere.
1610
1611         No tests. No change in behavior.
1612
1613         * bindings/v8/ScriptController.cpp:
1614         (WebCore::ScriptController::ScriptController):
1615         (WebCore::ScriptController::windowShell):
1616         * bindings/v8/ScriptController.h:
1617         (ScriptController):
1618         * bindings/v8/V8DOMWindowShell.cpp:
1619         (WebCore::V8DOMWindowShell::create):
1620         (WebCore::V8DOMWindowShell::V8DOMWindowShell):
1621         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1622         (WebCore::V8DOMWindowShell::installDOMWindow):
1623         * bindings/v8/V8DOMWindowShell.h:
1624         (V8DOMWindowShell):
1625         * bindings/v8/V8Initializer.cpp:
1626         (WebCore::V8Initializer::initializeMainThreadIfNeeded):
1627         (WebCore::V8Initializer::initializeWorker):
1628         * bindings/v8/V8Initializer.h:
1629         (V8Initializer):
1630         * bindings/v8/WorkerScriptController.cpp:
1631         (WebCore::WorkerScriptController::WorkerScriptController):
1632         (WebCore::WorkerScriptController::initializeContextIfNeeded):
1633
1634 2013-01-14  Alexander Pavlov  <apavlov@chromium.org>
1635
1636         Web Inspector: [Styles] Color names parsed inside "background-image" values
1637         https://bugs.webkit.org/show_bug.cgi?id=106770
1638
1639         Reviewed by Pavel Feldman.
1640
1641         Test: inspector/styles/url-color-swatch.html
1642
1643         Spaces were not allowed in url(...) CSS property values.
1644
1645         * inspector/front-end/StylesSidebarPane.js:
1646
1647 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1648
1649         [V8] Pass an Isolate to associateObjectWithWrapper()
1650         https://bugs.webkit.org/show_bug.cgi?id=106773
1651
1652         Reviewed by Adam Barth.
1653
1654         In preparation for making an Isolate parameter mandatory
1655         in associateObjectWithWrapper(), this patch passes an
1656         Isolate to associateObjectWithWrapper().
1657
1658         No tests. No change in behavior.
1659
1660         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
1661         (WebCore::V8ArrayBuffer::constructorCallbackCustom):
1662         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1663         (WebCore::wrapArrayBufferView):
1664         (WebCore::constructWebGLArray):
1665         * bindings/v8/custom/V8AudioContextCustom.cpp:
1666         (WebCore::V8AudioContext::constructorCallbackCustom):
1667         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1668         (WebCore::V8DOMFormData::constructorCallbackCustom):
1669         * bindings/v8/custom/V8DataViewCustom.cpp:
1670         (WebCore::V8DataView::constructorCallbackCustom):
1671         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1672         (WebCore::v8HTMLImageElementConstructorCallback):
1673         * bindings/v8/custom/V8IntentCustom.cpp:
1674         (WebCore::V8Intent::constructorCallbackCustom):
1675         * bindings/v8/custom/V8MessageChannelCustom.cpp:
1676         (WebCore::V8MessageChannel::constructorCallbackCustom):
1677         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1678         (WebCore::V8MutationObserver::constructorCallbackCustom):
1679         * bindings/v8/custom/V8WebKitPointCustom.cpp:
1680         (WebCore::V8WebKitPoint::constructorCallbackCustom):
1681         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1682         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
1683
1684 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1685
1686         [V8] Call Isolate::GetCurrent() in a callback from WebCore
1687         https://bugs.webkit.org/show_bug.cgi?id=106766
1688
1689         Reviewed by Adam Barth.
1690
1691         The objective is to pass an Isolate everywhere.
1692         Given that a callback from WebCore is an entry point to V8,
1693         we can call Isolate::GetCurrent() at the head of the callback
1694         and pass it to other places. (In practice, handleEvent() is
1695         the only callback used in the current WebKit.)
1696
1697         No tests. No change in behavior.
1698
1699         * bindings/scripts/CodeGeneratorV8.pm:
1700         (GenerateCallbackImplementation):
1701         (NativeToJSValue):
1702         * bindings/scripts/test/V8/V8TestCallback.cpp:
1703         (WebCore::V8TestCallback::callbackWithNoParam):
1704         (WebCore::V8TestCallback::callbackWithClass1Param):
1705         (WebCore::V8TestCallback::callbackWithClass2Param):
1706         (WebCore::V8TestCallback::callbackWithStringList):
1707         (WebCore::V8TestCallback::callbackWithBoolean):
1708         (WebCore::V8TestCallback::callbackRequiresThisToPass):
1709
1710 2013-01-14  Tommy Widenflycht  <tommyw@google.com>
1711
1712         MediaStream API: Change MediaStream::readyState to an boolean attribute called ended.
1713         https://bugs.webkit.org/show_bug.cgi?id=106568
1714
1715         Reviewed by Adam Barth.
1716
1717         See specification: http://dev.w3.org/2011/webrtc/editor/getusermedia.html
1718
1719         Existings tests updated to cover patch.
1720
1721         * Modules/mediastream/LocalMediaStream.cpp:
1722         (WebCore::LocalMediaStream::stop):
1723         * Modules/mediastream/MediaStream.cpp:
1724         (WebCore::MediaStream::ended):
1725         (WebCore::MediaStream::streamEnded):
1726         * Modules/mediastream/MediaStream.h:
1727         (MediaStream):
1728         (WebCore::MediaStream::isLocal):
1729         * Modules/mediastream/MediaStream.idl:
1730         * Modules/mediastream/MediaStreamTrackList.cpp:
1731         (WebCore::MediaStreamTrackList::add):
1732         (WebCore::MediaStreamTrackList::remove):
1733
1734 2013-01-14  Alexander Pavlov  <apavlov@chromium.org>
1735
1736         Web Inspector: [Styles] HTML color names not converted to RGB/HEX/HSL when "Color format" feature used
1737         https://bugs.webkit.org/show_bug.cgi?id=106767
1738
1739         Reviewed by Vsevolod Vlasov.
1740
1741         We used to render named colors as names regardless of the selected color format option.
1742
1743         * inspector/front-end/StylesSidebarPane.js:
1744         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
1745
1746 2013-01-14  Andrei Bucur  <abucur@adobe.com>
1747
1748         Crash caused by incomplete cleanup of regions information for anonymous block
1749         https://bugs.webkit.org/show_bug.cgi?id=106191
1750
1751         Reviewed by Abhishek Arya.
1752
1753         When an anonymous block is no longer required it is removed from the render tree and deleted. For example, this can happen when an anonymous block children change
1754         from inlines to blocks. The patch updates the removeLeftoverAnonymousBlock function to delete the flow thread information attached to the obsolete anonymous block.
1755         The removeFromRenderFlowThread() function is recursive and it needs to be called after the anonymous block children were reparented and the child list cleared.
1756         I've also placed the children reset operation before clearing the parent because the latter also deletes the inRenderFlowThread flag from the object and it makes
1757         flow thread ownership detection impossible.
1758
1759         Tests: fast/regions/remove-leftover-anon-block-crash.html
1760
1761         * rendering/RenderBlock.cpp:
1762         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
1763
1764 2013-01-14  Kentaro Hara  <haraken@chromium.org>
1765
1766         [V8] Make an Isolate parameter mandatory in v8DateOrNull()
1767         https://bugs.webkit.org/show_bug.cgi?id=106765
1768
1769         Reviewed by Adam Barth.
1770
1771         This is one of the efforts to kill all optional Isolate parameters.
1772
1773         No tests. No change in behavior.
1774
1775         * bindings/v8/V8Binding.h:
1776         (WebCore::v8DateOrNull):
1777
1778 2013-01-14  Pablo Flouret  <pablof@motorola.com>
1779
1780         Allow nesting of at-rules
1781         https://bugs.webkit.org/show_bug.cgi?id=106696
1782
1783         Reviewed by Allan Sandfeld Jensen.
1784
1785         http://dev.w3.org/csswg/css3-conditional/ introduces the
1786         concept of grouping rules, and allows for them to be nested. In
1787         particular, this change affects @media (and is needed for @supports as
1788         well).
1789
1790         Test: fast/css/nested-at-rules.html
1791
1792         * css/CSSGrammar.y.in:
1793             Move media to the block_valid_rule list.
1794
1795         * css/RuleSet.cpp:
1796         (WebCore::RuleSet::addRegionRule):
1797         (WebCore::RuleSet::addChildRules):
1798         (WebCore::RuleSet::addRulesFromSheet):
1799         * css/RuleSet.h:
1800             Rip out the rule-adding loop into a new method, for added
1801             cleanliness and recursing.
1802
1803 2013-01-14  Eugene Klyuchnikov  <eustas@chromium.org>
1804
1805         Web Inspector: [Network] Add domain column
1806         https://bugs.webkit.org/show_bug.cgi?id=106757
1807
1808         Reviewed by Pavel Feldman.
1809
1810         Adding new column will ease domain tracking / sorting.
1811
1812         * inspector/front-end/NetworkPanel.js: Added column.
1813         * inspector/front-end/NetworkRequest.js:
1814         (WebInspector.NetworkRequest.prototype.get domain): Added getter.
1815
1816 2013-01-14  Qiankun Miao  <qiankun.miao@intel.com>
1817
1818         Fix a typo error in the comments in PlatformContextSkia.h
1819         https://bugs.webkit.org/show_bug.cgi?id=105612
1820
1821         Reviewed by Stephen White.
1822
1823         "If false we're rendering to a GraphicsContext for a web page, if false
1824         we're not (as is the case when rendering to a canvas object)." is
1825         self-contradictory. The second "flase" in the comments should be
1826         "true". If true, we're rendering to an ImageBuffer which has a canvas
1827         object.
1828
1829         * platform/graphics/skia/PlatformContextSkia.h:
1830         (PlatformContextSkia):
1831
1832 2013-01-14  Ilya Tikhonovsky  <loislo@chromium.org>
1833
1834         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 3/3
1835         https://bugs.webkit.org/show_bug.cgi?id=106764
1836
1837         Reviewed by Vsevolod Vlasov.
1838
1839         Last three classes with not instrumented members were fixed.
1840
1841         * css/CSSGroupingRule.cpp:
1842         (WebCore::CSSGroupingRule::reportMemoryUsage):
1843         * css/StyleScopeResolver.cpp:
1844         (WebCore::StyleScopeResolver::reportMemoryUsage):
1845         * loader/cache/CachedResourceLoader.cpp:
1846         (WebCore::CachedResourceLoader::reportMemoryUsage):
1847
1848 2013-01-10  Ilya Tikhonovsky  <loislo@chromium.org>
1849
1850         Web Inspector: Native Memory Instrumentation: fix instrumentation for already instrumented classes 2/N
1851         https://bugs.webkit.org/show_bug.cgi?id=106546
1852
1853         Reviewed by Vsevolod Vlasov.
1854
1855         Many nontrivial class members were added into reportMemoryUsage methods.
1856
1857         * bindings/v8/V8PerIsolateData.cpp:
1858         (WebCore::V8PerIsolateData::reportMemoryUsage):
1859         * css/CSSMediaRule.cpp:
1860         (WebCore::CSSMediaRule::reportMemoryUsage):
1861         * css/CSSProperty.cpp:
1862         (WebCore::CSSProperty::reportMemoryUsage):
1863         * css/CSSStyleSheet.cpp:
1864         (WebCore::CSSStyleSheet::reportMemoryUsage):
1865         * css/MediaList.cpp:
1866         (WebCore::MediaList::reportMemoryUsage):
1867         * css/RuleSet.cpp:
1868         (WebCore::RuleData::reportMemoryUsage):
1869         (WebCore::RuleSet::reportMemoryUsage):
1870         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
1871         * css/StyleResolver.cpp:
1872         (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
1873         (WebCore::StyleResolver::reportMemoryUsage):
1874         * css/StyleSheetContents.cpp:
1875         (WebCore::StyleSheetContents::reportMemoryUsage):
1876         * dom/TreeScope.cpp:
1877         (WebCore::TreeScope::reportMemoryUsage):
1878         * inspector/HeapGraphSerializer.cpp:
1879         (WebCore::HeapGraphSerializer::reportMemoryUsage):
1880         * inspector/InspectorMemoryAgent.cpp:
1881         * inspector/InspectorProfilerAgent.cpp:
1882         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
1883         * inspector/MemoryInstrumentationImpl.cpp:
1884         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
1885         * loader/DocumentLoader.cpp:
1886         (WebCore::DocumentLoader::reportMemoryUsage):
1887         * loader/FrameLoader.cpp:
1888         (WebCore::FrameLoader::reportMemoryUsage):
1889         * loader/MainResourceLoader.cpp:
1890         (WebCore::MainResourceLoader::reportMemoryUsage):
1891         * loader/Prerenderer.cpp:
1892         (WebCore::Prerenderer::reportMemoryUsage):
1893         * loader/ResourceLoader.cpp:
1894         (WebCore::ResourceLoader::reportMemoryUsage):
1895         * loader/cache/CachedImage.cpp:
1896         (WebCore::CachedImage::reportMemoryUsage):
1897         * page/Page.cpp:
1898         (WebCore::Page::reportMemoryUsage):
1899
1900 2013-01-13  Levi Weintraub  <leviw@chromium.org>
1901
1902         Unreviewed gardening. Rolling out r139537. It broke platforms without sub-pixel layout.
1903
1904         * dom/Element.cpp:
1905         (WebCore::Element::offsetWidth):
1906         (WebCore::Element::offsetHeight):
1907         (WebCore::Element::clientWidth):
1908         (WebCore::Element::clientHeight):
1909         * rendering/RenderObject.h:
1910         (WebCore::adjustLayoutUnitForAbsoluteZoom):
1911         * rendering/style/RenderStyle.h:
1912         (WebCore::adjustLayoutUnitForAbsoluteZoom):
1913
1914 2013-01-13  Dima Gorbik  <dgorbik@apple.com>
1915
1916         Styling disappears from the cue that's being styled by ::cue pseudo element
1917         https://bugs.webkit.org/show_bug.cgi?id=106723
1918
1919         Reviewed by Antti Koivisto.
1920
1921         Fixes a regression caused by r138966. Setting a pseudoId in TextTrackCue::updateDisplayTree for m_allDocumentNodes
1922         was triggering recalculating styles the next run loop. Now when this was removed we append the WebVTT tree after its children have
1923         been marked by markFutureAndPastNodes so that correct styles are set within this append call.
1924
1925         Test: media/track/track-css-cue-lifetime.html
1926
1927         * html/track/TextTrackCue.cpp:
1928         (WebCore::TextTrackCue::markFutureAndPastNodes): changing the type of the first argument because DocumentFragment is not a subclass
1929         of Element.
1930         (WebCore::TextTrackCue::updateDisplayTree): appending the WebVTT rendering tree after its children have been marked properly.
1931         * html/track/TextTrackCue.h:
1932         (TextTrackCue):
1933
1934 2013-01-12  David Grogan  <dgrogan@chromium.org>
1935
1936         IndexedDB: Provide LevelDB with IDBEnv instead of Env::Default
1937         https://bugs.webkit.org/show_bug.cgi?id=106135
1938
1939         Reviewed by Tony Chang.
1940
1941         IDBEnv only changes the name of the histogram where errors are logged.
1942
1943         * platform/leveldb/LevelDBDatabase.cpp:
1944         (WebCore::LevelDBDatabase::destroy):
1945         (WebCore::LevelDBDatabase::open):
1946         (WebCore::LevelDBDatabase::openInMemory):
1947
1948 2013-01-12  Gavin Peters  <gavinp@chromium.org>
1949
1950         Regression(r119759): Heap-use-after-free in webkit_glue::WebURLLoaderImpl::Context::OnReceivedResponse
1951         https://bugs.webkit.org/show_bug.cgi?id=103563
1952
1953         A subresource could receive a body on a 404 if its call to CachedResource::error() resulted in a nested message loop.
1954         That caused a crash when data was received, as the Subresource was in the Finished state already. Now when receiving
1955         data we ignore these bodies, avoiding the crash.
1956
1957         Reviewed by Nate Chapin.
1958
1959         No new tests in WebKit, since it required a nested message loop which isn't present in chromium DumpRender tree.
1960         There's a Chrome side browser test, see https://codereview.chromium.org/11778083/
1961
1962         * loader/SubresourceLoader.cpp:
1963         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
1964
1965 2013-01-12  Robert Hogan  <robert@webkit.org>
1966
1967         Available height should respect min and max height
1968         https://bugs.webkit.org/show_bug.cgi?id=106479
1969
1970         Reviewed by Ojan Vafai.
1971         
1972         When calculating a relative positioned block's offset as a percentage of its container, respect the min
1973         and max height set on the container
1974
1975         Tests: fast/block/percent-top-respects-max-height.html
1976                fast/block/percent-top-respects-min-height.html
1977
1978         * rendering/RenderBox.cpp:
1979         (WebCore::RenderBox::availableLogicalHeight):
1980
1981 2013-01-12  Victor Carbune  <victor@rosedu.org>
1982
1983         CC Button doesn't always show up
1984         https://bugs.webkit.org/show_bug.cgi?id=106653
1985
1986         Reviewed by Eric Carlson.
1987
1988         Added extra checks to existing test.
1989
1990         * html/shadow/MediaControls.cpp:
1991         (WebCore::MediaControls::closedCaptionTracksChanged):
1992         Enforced visibility of captions button whenever the track list changes.
1993         (WebCore):
1994         * html/shadow/MediaControls.h:
1995         (MediaControls):
1996
1997 2013-01-11  Dan Beam  <dbeam@chromium.org>
1998
1999         [clean up] Remove HTMLFormElement::AutocompleteResultError in favor of more specific Error reasons
2000         https://bugs.webkit.org/show_bug.cgi?id=106610
2001
2002         Reviewed by Darin Fisher.
2003
2004         No new tests (none needed).
2005
2006         * html/HTMLFormElement.cpp: 
2007         (WebCore::HTMLFormElement::finishRequestAutocomplete): Removed handling of AutocompleteResultError.
2008         * html/HTMLFormElement.h: Removed HTMLFormElement::AutocompleteResultError in favor of more specific errors.
2009
2010 2013-01-10  Filip Pizlo  <fpizlo@apple.com>
2011
2012         JITThunks should not compile only because of luck
2013         https://bugs.webkit.org/show_bug.cgi?id=105696
2014
2015         Rubber stamped by Sam Weinig.
2016
2017         All .cpp files that use the JSC internal API must now transitively include
2018         Operations.h, and none of the major JSC headers do it for you to avoid
2019         circularity. WebCore doesn't have to worry about circularity with JSC, so
2020         this changes all of the major WebCore JSC base headers to include
2021         Operations.h.
2022
2023         * bindings/js/BindingState.h:
2024         * bindings/js/JSArrayBufferViewHelper.h:
2025         * bindings/js/JSCustomXPathNSResolver.h:
2026         * bindings/js/JSDOMBinding.h:
2027         * bindings/js/JSDOMGlobalObject.h:
2028         * bindings/js/JSDictionary.h:
2029         * bindings/js/JSMessagePortCustom.h:
2030         * bindings/js/JSNodeFilterCondition.h:
2031         * bindings/js/ScriptValue.h:
2032         * bindings/js/ScriptWrappable.h:
2033         * bindings/js/SerializedScriptValue.cpp:
2034         * bridge/c/c_utility.h:
2035         * bridge/jsc/BridgeJSC.h:
2036         * dom/Node.cpp:
2037         * html/HTMLCanvasElement.cpp:
2038         * html/HTMLImageLoader.cpp:
2039         * plugins/efl/PluginViewEfl.cpp:
2040         * xml/XMLHttpRequest.cpp:
2041
2042 2013-01-11  Emil A Eklund  <eae@chromium.org>
2043
2044         offsetWidth/height incorrect for images when zoomed
2045         https://bugs.webkit.org/show_bug.cgi?id=106624
2046
2047         Reviewed by Levi Weintraub.
2048         
2049         offsetWidth and height are incorrect for images at certain zoom
2050         levels due to flooring the values ones adjusted for zoom.
2051         By rounding the value instead we avoid the problem and return
2052         the right size.
2053
2054         Test: fast/images/zoomed-offset-size.html
2055
2056         * dom/Element.cpp:
2057         (WebCore::Element::offsetWidth):
2058         (WebCore::Element::offsetHeight):
2059         (WebCore::Element::clientWidth):
2060         (WebCore::Element::clientHeight):
2061         Change to round (as opposed to floor) the zoom adjusted value.
2062         
2063         * rendering/RenderObject.h:
2064         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2065         * rendering/style/RenderStyle.h:
2066         (WebCore::adjustLayoutUnitForAbsoluteZoom):
2067         Add LayoutUnit version of adjustForAbsoluteZoom to avoid float
2068         conversion.
2069
2070 2013-01-11  Ojan Vafai  <ojan@chromium.org>
2071
2072         Fixed width overrides intrinsic min-width/max-width for text inputs and listboxes
2073         https://bugs.webkit.org/show_bug.cgi?id=106675
2074
2075         Reviewed by Emil A Eklund.
2076
2077         Implement computeIntrinsicLogicalWidths so that RenderBox::computeLogicalWidthInRegionUsing
2078         can get the correct intrinsic sizes instead of the preferred sizes.
2079
2080         Test: fast/forms/select/listbox-intrinsic-min-width-applies-with-fixed-width.html
2081
2082         * rendering/RenderListBox.cpp:
2083         (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
2084         (WebCore):
2085         (WebCore::RenderListBox::computePreferredLogicalWidths):
2086         * rendering/RenderListBox.h:
2087         (RenderListBox):
2088         * rendering/RenderTextControl.cpp:
2089         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
2090         (WebCore):
2091         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2092         * rendering/RenderTextControl.h:
2093         (RenderTextControl):
2094
2095 2013-01-10  Ojan Vafai  <ojan@chromium.org>
2096
2097         Setting width overrides intrinsic min-width/max-width on flexboxes and their subclasses
2098         https://bugs.webkit.org/show_bug.cgi?id=106617
2099
2100         Reviewed by Tony Chang.
2101
2102         Override computeIntrinsicLogicalWidths for all RenderFlexibleBox and RenderDeprecatedFlexibleBox
2103         classes that override computePreferredLogicalWidths so that RenderBox can use
2104         computeIntrinsicLogicalWidths in order to get the correct intrinsic values.
2105
2106         Tests: css3/flexbox/intrinsic-min-width-applies-with-fixed-width.html
2107                fast/flexbox/intrinsic-min-width-applies-with-fixed-width.html
2108                fast/forms/select/intrinsic-min-width-applies-with-fixed-width.html
2109
2110         * rendering/RenderBox.cpp:
2111         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2112         fit-content needs to use the intrinsic sizes not the preferred sizes
2113         since a fixed width overrides the preferred size.
2114         As best I can tell, the sizesLogicalWidthToFitContent codepath can keep
2115         using preferred widths, which are considerably faster, since that's only used
2116         computing width values. Added a clause to that if-statement to make this more
2117         explicit.
2118
2119         * rendering/RenderDeprecatedFlexibleBox.cpp:
2120         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
2121         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
2122         * rendering/RenderDeprecatedFlexibleBox.h:
2123         (RenderDeprecatedFlexibleBox):
2124         * rendering/RenderFlexibleBox.cpp:
2125         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
2126         (WebCore):
2127         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
2128         * rendering/RenderFlexibleBox.h:
2129         * rendering/RenderMenuList.cpp:
2130         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
2131         (WebCore):
2132         (WebCore::RenderMenuList::computePreferredLogicalWidths):
2133         * rendering/RenderMenuList.h:
2134         (RenderMenuList):
2135         * rendering/RenderSlider.cpp:
2136         (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
2137         (WebCore):
2138         (WebCore::RenderSlider::computePreferredLogicalWidths):
2139         * rendering/RenderSlider.h:
2140         (RenderSlider):
2141         No logic changes in any of these computeIntrinsic methods. Just moving
2142         the code over from the computePreferred methods.
2143
2144 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
2145
2146         Move HTMLTokenTypes to its own file
2147         https://bugs.webkit.org/show_bug.cgi?id=106722
2148
2149         Reviewed by Levi Weintraub.
2150
2151         Also mark AtomicHTMLToken ctor as explicit.
2152
2153         No new tests because no new functionality.
2154
2155         * GNUmakefile.list.am:
2156         * Target.pri:
2157         * WebCore.gypi:
2158         * WebCore.vcproj/WebCore.vcproj:
2159         * WebCore.xcodeproj/project.pbxproj:
2160         * html/parser/HTMLToken.h:
2161         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2162         * html/parser/HTMLTokenTypes.h: Added.
2163         (WebCore):
2164         (HTMLTokenTypes):
2165         (DoctypeData):
2166         (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData):
2167
2168 2013-01-11  Elliott Sprehn  <esprehn@chromium.org>
2169
2170         No need to initialize RefPtrs to 0 in ElementRareData
2171         https://bugs.webkit.org/show_bug.cgi?id=106717
2172
2173         Reviewed by Ryosuke Niwa.
2174
2175         RefPtrs initialize themself to null, so there's no reason
2176         to do it manually. This was code leftover from when
2177         PseudoElements were stored in bare ptrs instead of in
2178         RefPtrs.
2179
2180         No new tests, just refactoring.
2181
2182         * dom/ElementRareData.h:
2183         (WebCore::ElementRareData::ElementRareData):
2184
2185 2013-01-11  Huang Dongsung  <luxtella@company100.net>
2186
2187         [TexMap] Rename current[Transform|Opacity|Filters] in TextureMapperLayer.
2188         https://bugs.webkit.org/show_bug.cgi?id=105760
2189
2190         Reviewed by Noam Rosenthal.
2191
2192         TextureMapperLayer has two transform members: an original value and a
2193         changeable value. The changeable value would be changed by animations.
2194         This patch puts 'current' prefix on the changeable value to clarify
2195         its purpose. Opacity and filters ditto.
2196
2197         No new tests. Refactoring only.
2198
2199         * platform/graphics/texmap/TextureMapperLayer.cpp:
2200         (WebCore::TextureMapperLayer::computeTransformsRecursive):
2201         (WebCore::TextureMapperLayer::paintSelf):
2202         (WebCore::TextureMapperLayer::paintSelfAndChildren):
2203         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
2204         (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface):
2205         (WebCore::TextureMapperLayer::isVisible):
2206         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
2207         (WebCore::TextureMapperLayer::paintRecursive):
2208         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
2209         (WebCore::TextureMapperLayer::syncAnimations):
2210         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
2211         * platform/graphics/texmap/TextureMapperLayer.h:
2212         (WebCore::TextureMapperLayer::TextureMapperLayer):
2213         (TextureMapperLayer):
2214         (WebCore::TextureMapperLayer::State::State):
2215
2216 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
2217
2218         Move constructTreeFromHTMLToken into HTMLDocumentParser
2219         https://bugs.webkit.org/show_bug.cgi?id=106694
2220
2221         Reviewed by Adam Barth.
2222
2223         This way it will sit parallel to a new constructTreeFromCompactHTMLToken method.
2224
2225         No new tests because no new functionality.
2226
2227         * html/parser/HTMLDocumentParser.cpp:
2228         (WebCore::HTMLDocumentParser::pumpTokenizer):
2229         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
2230         (WebCore):
2231         * html/parser/HTMLDocumentParser.h:
2232         * html/parser/HTMLTreeBuilder.cpp:
2233         * html/parser/HTMLTreeBuilder.h:
2234         (HTMLTreeBuilder):
2235
2236 2013-01-11  Robert Iannucci  <iannucci@chromium.org>
2237
2238         Explicitly set msvs_cygwin_shell to true for actions in WebKit
2239         https://bugs.webkit.org/show_bug.cgi?id=106706
2240
2241         Reviewed by Tony Chang.
2242
2243         Currently, msvs_cygwin_shell is set to 1 by default. This patch
2244         explicitly sets it on the actions which will break if msvs_cygwin_shell
2245         were set to 0. This is in preparation for changing the default value of
2246         msvs_cygwin_shell, which in turn is in preparation of the removal of
2247         cygwin as a buld-system requirement.
2248
2249         Since this change will have no semantic effect, no new tests are
2250         required.
2251
2252         * WebCore.gyp/WebCore.gyp:
2253
2254 2013-01-11  Joshua Bell  <jsbell@chromium.org>
2255
2256         IndexedDB: IDBTransaction should manage lifetime of IDBRequests
2257         https://bugs.webkit.org/show_bug.cgi?id=106678
2258
2259         Reviewed by Tony Chang.
2260
2261         Ensure reference count of IDBRequests don't bounce off zero if there are no script
2262         references are while the events are arriving.
2263
2264         No new tests - no detectable behavior changes.
2265
2266         * Modules/indexeddb/IDBRequest.cpp:
2267         (WebCore::IDBRequest::create): Register with transaction (which now takes a ref) here to...
2268         (WebCore::IDBRequest::IDBRequest): ...avoid having to relax adoption requirements here.
2269         * Modules/indexeddb/IDBTransaction.cpp: Keep RefPtr<>s to outstanding requests.
2270         (WebCore::IDBTransaction::~IDBTransaction):
2271         (WebCore::IDBTransaction::abort):
2272         (WebCore::IDBTransaction::onAbort):
2273         * Modules/indexeddb/IDBTransaction.h:
2274
2275 2013-01-11  James Simonsen  <simonjam@chromium.org>
2276
2277         [Resource Timing] XMLHttpRequests should have initiator type 'xmlhttprequest'
2278         https://bugs.webkit.org/show_bug.cgi?id=106409
2279
2280         Reviewed by Nate Chapin.
2281
2282         The initiator is passed through ThreadableLoaderOptions to the CachedResourceRequest. This is
2283         optional, so other users of ThreadableLoader will have the default initiator of 'request'. Note
2284         that synchronous XHRs don't show up in the Resource Timing buffer yet.
2285
2286         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html
2287
2288         * loader/DocumentThreadableLoader.cpp:
2289         (WebCore::DocumentThreadableLoader::loadRequest):
2290         * loader/ThreadableLoader.h:
2291         (ThreadableLoaderOptions):
2292         * loader/cache/CachedResourceRequestInitiators.cpp:
2293         (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
2294         * loader/cache/CachedResourceRequestInitiators.h:
2295         (CachedResourceRequestInitiators):
2296         * xml/XMLHttpRequest.cpp:
2297         (WebCore::XMLHttpRequest::createRequest):
2298
2299 2013-01-11  James Simonsen  <simonjam@chromium.org>
2300
2301         Restore old semantics to webkitRequestAnimationFrame callbacks
2302         https://bugs.webkit.org/show_bug.cgi?id=106697
2303
2304         Reviewed by James Robinson.
2305
2306         Sites that use GWT <= 2.4 are buggy and rely on Date.now()-like callback values.
2307         We'll restore that behavior to the prefixed version of webkitRequestAnimationFrame.
2308         requestAnimationFrame will continue to follow the spec.
2309
2310         Test: fast/animation/request-animation-frame-prefix.html
2311
2312         * dom/RequestAnimationFrameCallback.h:
2313         (RequestAnimationFrameCallback):
2314         * dom/ScriptedAnimationController.cpp:
2315         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2316         * page/DOMWindow.cpp:
2317         (WebCore::DOMWindow::requestAnimationFrame):
2318         (WebCore):
2319         (WebCore::DOMWindow::webkitRequestAnimationFrame):
2320         * page/DOMWindow.h:
2321         (DOMWindow):
2322         * page/DOMWindow.idl:
2323
2324 2013-01-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2325
2326         Unreviewed, rolling out r139044.
2327         http://trac.webkit.org/changeset/139044
2328         https://bugs.webkit.org/show_bug.cgi?id=106702
2329
2330         Caused various scrolling anomolies on Mac with drag and drop
2331         (Requested by smfr on #webkit).
2332
2333         * page/AutoscrollController.cpp:
2334         (WebCore::AutoscrollController::AutoscrollController):
2335         (WebCore::AutoscrollController::autoscrollTimerFired):
2336         * page/AutoscrollController.h:
2337         (WebCore):
2338         (AutoscrollController):
2339         * page/EventHandler.cpp:
2340         (WebCore::EventHandler::updateDragAndDrop):
2341         * rendering/RenderBox.cpp:
2342         (WebCore):
2343         (WebCore::RenderBox::autoscroll):
2344         * rendering/RenderBox.h:
2345         (RenderBox):
2346         * rendering/RenderLayer.cpp:
2347         (WebCore::RenderLayer::autoscroll):
2348         * rendering/RenderLayer.h:
2349         (RenderLayer):
2350         * rendering/RenderListBox.cpp:
2351         (WebCore::RenderListBox::autoscroll):
2352         * rendering/RenderListBox.h:
2353         (RenderListBox):
2354         * rendering/RenderTextControlSingleLine.cpp:
2355         (WebCore::RenderTextControlSingleLine::autoscroll):
2356         * rendering/RenderTextControlSingleLine.h:
2357         (RenderTextControlSingleLine):
2358
2359 2013-01-11  Rafael Weinstein  <rafaelw@chromium.org>
2360
2361         Prevent HTMLPreloadScanner from fetching resources inside <template>
2362         https://bugs.webkit.org/show_bug.cgi?id=106687
2363
2364         Reviewed by Adam Barth.
2365
2366         This patch adds a simple counter to the preload scanner which increments on template start
2367         tag and decrements on template element. It only fetchs resources when the counter is at zero
2368         (i.e. for elements not contained by a template element).
2369
2370         Test re-enabled within fast/dom/HTMLTemplateElement/inertContents.html
2371
2372         * html/parser/HTMLPreloadScanner.cpp:
2373         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2374         (WebCore::HTMLPreloadScanner::processToken):
2375         * html/parser/HTMLPreloadScanner.h:
2376         (HTMLPreloadScanner):
2377
2378 2013-01-11  Tony Gentilcore  <tonyg@chromium.org>
2379
2380         We should be able to checkpoint and restore the HTMLTokenizer across threads
2381         https://bugs.webkit.org/show_bug.cgi?id=106597
2382
2383         Based on patch by Adam Barth.
2384
2385         This has the ability to create a checkpoint any time the parser is blocked on a script.
2386         We clear m_appropriateEndTagName after each end tag is flushed so that the ASSERT in
2387         canCreateCheckpoint() will pass.
2388
2389         Reviewed by Adam Barth.
2390
2391         No new tests because no new functionality.
2392
2393         * html/parser/HTMLDocumentParser.cpp:
2394         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2395         (WebCore::HTMLDocumentParser::pumpTokenizer):
2396         * html/parser/HTMLDocumentParser.h:
2397         (WebCore):
2398         (HTMLDocumentParser):
2399         * html/parser/HTMLTokenizer.cpp:
2400         (WebCore):
2401         (WebCore::HTMLTokenizer::canCreateCheckpoint):
2402         (WebCore::HTMLTokenizer::createCheckpoint):
2403         (WebCore::HTMLTokenizer::restoreFromCheckpoint):
2404         * html/parser/HTMLTokenizer.h:
2405         (HTMLTokenizer):
2406         (Checkpoint):
2407         (WebCore::HTMLTokenizer::Checkpoint::Checkpoint):
2408         * xml/parser/MarkupTokenizerBase.h:
2409         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::InputStreamPreprocessor):
2410         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::skipNextNewLine):
2411         (InputStreamPreprocessor):
2412         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::reset):
2413
2414 2013-01-11  Tony Chang  <tony@chromium.org>
2415
2416         [chromium] Don't regenerate all bindings when any idl file changes
2417         https://bugs.webkit.org/show_bug.cgi?id=106604
2418
2419         Reviewed by Kentaro Hara.
2420
2421         Currently, every idl file is a dependency of generating the supplemental dependency map
2422         and generating bindings is a dependency of the map. This means that touching any idl file
2423         causes us to regenerate all the bindings.
2424
2425         Change it so that generating bindings only depends on the idl files that have Supplemental= in them.
2426         We only have 24 idl files with Supplemental (3.7% of the 638 idl files in WebCore) so modifying
2427         any of those will cause all bindings to be regenerated.
2428
2429         If you add or remove a new idl file, you have to rerun gyp which will fix up any dependencies.
2430         If you edit an existing file and add Supplemental= to it, you will now need to rerun gyp_{webkit,chromium}.
2431         I think that's a reasonable tradeoff since it seems highly unlikely that you would adding Supplemental=
2432         to an existing file without renaming it. The bots will always be fine because they always run
2433         gyp after updating.
2434
2435         No new tests, this is a build only change.
2436
2437         * WebCore.gyp/WebCore.gyp: Remove <(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp, which was causing
2438         the full rebuild. The step to generate this file is still a hard dependency so it will still be generated and
2439         used by generate-bindings.pl. Also remove <@(webcore_test_support_idl_files). This was saying we should regenerate
2440         all bindings if a test idl file changed. That doesn't make sense.
2441         * WebCore.gyp/scripts/supplemental_idl_files.py: Added.
2442         (DoMain):
2443
2444 2013-01-11  Alexandru Chiculita  <achicu@adobe.com>
2445
2446         Element is displayed behind a composited layer when clipping is used on a previous element
2447         https://bugs.webkit.org/show_bug.cgi?id=104981
2448
2449         Reviewed by Simon Fraser.
2450
2451         RenderLayerCompositor::computeCompositingRequirements uses the local bounding box of the layers to optimize the number of composited 
2452         layers that are created. That's needed in order to make sure that composited layers that are displayed behind non-composited
2453         layers are correctly promoting the layers in front to be composited. Otherwise the non-composited layers are rendered
2454         in the parent composited layer, displaying behind the other composited layers. That might be wrong as the correct paint order might not be
2455         preserved.
2456
2457         In order to make animations work, there's a flag that will disable that optimization. That's because the animations run in the platform
2458         layer and the platform layer doesn't know about the layers that are not promoted to composited layers. When the overlapping of the layers
2459         is computed it just uses the start or the stop state, but no intermediate states. For that reason, all the 'top' layers in front of animated 
2460         elements will become composited.
2461
2462         When an animation has a clipping rectangle, then we know for sure that the animation is going to be contained inside the clip area, so WebKit 
2463         uses the bounding box of the clipping area to detect the overlapping layers, so there's no need to disable the optimization in that case.
2464
2465         However, if there is a different animation displaying behind the clipping container, we cannot safely disable that optimization anymore. That's
2466         because we still don't know what are the intermediate states of that particular animated layer. The bug was that the optimization was re-enabled
2467         anyway, even in this particular case.
2468
2469         In order to fix it, I changed the logic, so that instead of re-enabling the optimization after a clipping container, it will just avoid to propagate 
2470         the internal state to the following layers when there's no need to so.
2471
2472         Note that 3D transforms behave like animations for now and disable the optimization. Because of that some of the existing tests ended up
2473         creating more layers than needed. That's because the tests had an overflow area that recreated the issue that this patch fixes, but with
2474         3D transforms instead of animations. 3D transforms will be treated in a separate patch.
2475
2476         Tests: compositing/layer-creation/overlap-animation-clipping.html
2477                compositing/layer-creation/overlap-animation-container.html
2478
2479         * rendering/RenderLayerCompositor.cpp:
2480         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2481
2482 2013-01-11  Philip Rogers  <pdr@google.com>
2483
2484         Skip CachedImage::CreateImage if we don't have image data
2485         https://bugs.webkit.org/show_bug.cgi?id=106156
2486
2487         Reviewed by Nate Chapin.
2488
2489         This patch skips image creation if we do not have image data. This can occur during
2490         cache revalidation when the revalidation request (304 not modified) comes back without
2491         any content. In this revalidation case, the http spec requires that a mimetype not be set
2492         on the response to prevent a cached resource from having a different mimetype
2493         from the revalidated resource. Because revalidation requests do not have a mimetype,
2494         CachedImage::CreateImage() will fail on SVG images. This patch prevents
2495         CachedImage::CreateImage() from being called during revalidation.
2496
2497         No new tests as there are no observable changes from this patch.
2498
2499         * loader/cache/CachedImage.cpp:
2500         (WebCore::CachedImage::data):
2501
2502 2013-01-11  Kentaro Hara  <haraken@chromium.org>
2503
2504         Unreviewed. Rebaselined run-bindings-tests.
2505
2506         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2507         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
2508         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
2509         * bindings/scripts/test/V8/V8TestException.cpp:
2510         (WebCore::TestExceptionV8Internal::nameAttrGetter):
2511         * bindings/scripts/test/V8/V8TestInterface.cpp:
2512         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
2513         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
2514         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
2515         * bindings/scripts/test/V8/V8TestObj.cpp:
2516         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
2517         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
2518         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
2519         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
2520         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
2521         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
2522         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
2523         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
2524         (WebCore::TestObjV8Internal::hashAttrGetter):
2525         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
2526
2527 2013-01-11  Levi Weintraub  <leviw@chromium.org>
2528
2529         RenderGeometryMap and TransformState disagree with sub-pixel layout and translations
2530         https://bugs.webkit.org/show_bug.cgi?id=106047
2531
2532         Reviewed by Simon Fraser.
2533
2534         Mirror RenderGeometryMap's optimization for integer-translated transforms in TransformState.
2535         This avoids the current behavior where the two can disagree on mappings, since RenderGeometryMap
2536         pixel-snapped later when a translation occurred between two sub-pixel containers.
2537
2538         Test: fast/layers/geometry-map-transform-state-translation-mismatch.html
2539
2540         * platform/graphics/transforms/TransformState.h:
2541         (WebCore::TransformState::setQuad): Clear accumulatedOffset when setting a new quad. Note: this
2542         implementation only works properly when only tracking a quad.
2543         * platform/graphics/transforms/TransformState.cpp:
2544         (WebCore::TransformState::applyTransform): apply integral translations to the accumulatedOffset
2545         for performance and consistency with RenderGeometryMap.
2546
2547 2013-01-11  Abhishek Arya  <inferno@chromium.org>
2548
2549         Heap-use-after-free in WebCore::RenderText::computePreferredLogicalWidths
2550         https://bugs.webkit.org/show_bug.cgi?id=95901
2551
2552         Reviewed by Simon Fraser.
2553
2554         Prevent re-entrancy of view layout. Loading of SVG document during font load
2555         causes it to re-enter layout and blowing the style away from underneath.
2556         
2557         Test: Go to http://www.speckproducts.com and make sure crash does not happen.
2558
2559         * dom/Document.cpp:
2560         (WebCore::Document::updateLayout):
2561
2562 2013-01-11  Kentaro Hara  <haraken@chromium.org>
2563
2564         [V8] Do not create a local handle for a cached v8 string that is returned to V8 immediately
2565         https://bugs.webkit.org/show_bug.cgi?id=106557
2566
2567         Reviewed by Adam Barth.
2568
2569         Currently we are always creating a local handle for a cached
2570         V8 string returned to V8:
2571
2572           Handle<Value> v8String(StringImpl* impl, Isolate* isolate) {
2573             ...;
2574             return Local<String>::New(isolate, m_cachedString);
2575           }
2576
2577         However, we don't need to create a local handle in a case
2578         where it is guaranteed that no V8 object allocation is conducted
2579         before a control flow returns back to V8. In particular, in a case
2580         where a cached V8 string is immediately returned to V8, we don't
2581         need to create a local handle:
2582
2583           Handle<Value> xxxxAttrGetter() {
2584             ...;
2585             return v8String(imp->xxxx(), isolate);  // This can return a persistent handle safely.
2586           }
2587
2588         This patch improves performance of div.id by 9.2%.
2589
2590         No tests. No change in behavior.
2591
2592         * bindings/scripts/CodeGeneratorV8.pm:
2593         (GenerateNormalAttrGetter):
2594         (GenerateCallbackImplementation):
2595         (GenerateFunctionCallString):
2596         (NativeToJSValue):
2597         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2598         (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
2599         (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
2600         * bindings/scripts/test/V8/V8TestException.cpp:
2601         (WebCore::TestExceptionV8Internal::nameAttrGetter):
2602         * bindings/scripts/test/V8/V8TestInterface.cpp:
2603         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
2604         (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
2605         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
2606         * bindings/scripts/test/V8/V8TestObj.cpp:
2607         (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
2608         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
2609         (WebCore::TestObjV8Internal::stringAttrAttrGetter):
2610         (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
2611         (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
2612         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
2613         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
2614         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
2615         (WebCore::TestObjV8Internal::hashAttrGetter):
2616         (WebCore::TestObjV8Internal::conditionalMethod1Callback):
2617         * bindings/v8/V8Binding.h:
2618         (WebCore::v8String):
2619         (WebCore::v8StringOrNull):
2620         (WebCore::v8StringOrUndefined):
2621         * bindings/v8/V8ValueCache.cpp:
2622         (WebCore::StringCache::v8ExternalStringSlow):
2623         * bindings/v8/V8ValueCache.h:
2624         (WebCore::StringCache::v8ExternalString):
2625         (StringCache):
2626
2627 2013-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2628
2629         Unreviewed. Fix make distcheck.
2630
2631         * GNUmakefile.list.am: Add missing header files.
2632
2633 2013-01-11  Xianzhu Wang  <wangxianzhu@chromium.org>
2634
2635         RenderLayerCompositor should let ScrollingCoordinator update main thread scrolling reasons after change of layers
2636         https://bugs.webkit.org/show_bug.cgi?id=105652
2637
2638         Reviewed by Simon Fraser.
2639
2640         Let ScrollingCoordinator know the change of ViewportConstrainedNotCompositedReason in time.
2641         By the way moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to RenderLayer::ViewportConstrainedNotCompositedReason.
2642
2643         Tests: compositing/layer-creation/fixed-position-in-view-dynamic.html
2644                compositing/layer-creation/fixed-position-out-of-view-dynamic.html
2645
2646         * page/scrolling/ScrollingCoordinator.cpp:
2647         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
2648         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
2649         (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText):
2650         * page/scrolling/ScrollingCoordinator.h:
2651         (ScrollingCoordinator):
2652         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2653         (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintViewportConstrainedObjects):
2654         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2655         (WebCore::logThreadedScrollingMode):
2656         * rendering/RenderLayer.cpp:
2657         (WebCore::RenderLayer::RenderLayer):
2658         (WebCore::RenderLayer::paintLayer):
2659         * rendering/RenderLayer.h:
2660         (RenderLayer): Moved RenderLayerCompositor::FixedPositionLayerNotCompositedReason to here and renamed it to ViewportConstrainedNotCompositedReason.
2661         (WebCore::RenderLayer::setViewportConstrainedNotCompositedReason):
2662         (WebCore::RenderLayer::viewportConstrainedNotCompositedReason):
2663         * rendering/RenderLayerCompositor.cpp:
2664         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2665         (WebCore::RenderLayerCompositor::updateBacking): Now updates ViewportConstrainedNotCompositedReason here instead of in computeCompositingRequirements before so that the reason is updated in time.
2666         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2667         (WebCore::RenderLayerCompositor::needsToBeComposited):
2668         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
2669         (WebCore::RenderLayerCompositor::reasonForCompositing):
2670         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2671         (WebCore::RenderLayerCompositor::reportMemoryUsage):
2672         * rendering/RenderLayerCompositor.h:
2673         (RenderLayerCompositor):
2674
2675 2013-01-11  Kenneth Russell  <kbr@google.com>
2676
2677         [Chromium] WebGL typed array constructor crashes on exception
2678         https://bugs.webkit.org/show_bug.cgi?id=106308
2679
2680         Reviewed by Kentaro Hara.
2681
2682         Check for empty handles (indicating exception thrown) after calls
2683         into V8 VM.
2684
2685         Added new case from Khronos typed array conformance tests to
2686         fast/canvas/webgl/array-unit-tests.html.
2687
2688         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2689         (WebCore::constructWebGLArray):
2690             Check for empty handles after calls into V8 VM.
2691
2692 2013-01-11  Kentaro Hara  <haraken@chromium.org>
2693
2694         [V8] Slightly optimize getWrapperFast()
2695         https://bugs.webkit.org/show_bug.cgi?id=106667
2696
2697         Reviewed by Adam Barth.
2698
2699         This patch improves an if condition in getWrapperFast(),
2700         as commented in DOMDataStore.h.
2701
2702         This patch improves performance of div.firstChild from
2703         15.1 ns to 14.0 ns (+7.8%), although I couldn't observe
2704         performance improvement in Dromaeo/dom-traverse.
2705
2706         No tests. No change in behavior.
2707
2708         * bindings/v8/DOMDataStore.h:
2709         (WebCore::DOMDataStore::getWrapperFast):
2710
2711 2013-01-11  Florin Malita  <fmalita@chromium.org>
2712
2713         [SVG] Suppress resource rebuilding for unattached and shadow elements
2714         https://bugs.webkit.org/show_bug.cgi?id=106664
2715
2716         Reviewed by Dirk Schulze.
2717
2718         SVGStyledElement::buildPendingResourcesIfNeeded() can be called while cloning a subtree
2719         (as nodes are inserted into the clone, while still detached) or when elements are inserted
2720         into the shadow tree. Both of these cases are problematic for SVGUseElement and can trigger
2721         indirect recursion in SVGUseElement::buildPendingResource.
2722
2723         Since shadow and !inDocument() nodes are of no interest to ID dependents (they cannot be
2724         found by ID in the document), the patch short-circuits buildPendingResource() for these
2725         cases.
2726
2727         Test: svg/custom/use-rebuild-resources-crash.svg
2728
2729         * svg/SVGStyledElement.cpp:
2730         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
2731
2732 2013-01-11  Dominic Mazzoni  <dmazzoni@google.com>
2733
2734         AX: Computed hierarchical level is not consistent with aria-level
2735         https://bugs.webkit.org/show_bug.cgi?id=106638
2736
2737         Reviewed by Chris Fleizach.
2738
2739         Make hierarchicalLevel computation 1-based to match the aria-level spec.
2740
2741         Extends an existing test: platform/mac/accessibility/aria-tree.html.
2742
2743         * accessibility/AccessibilityNodeObject.cpp:
2744         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
2745         * accessibility/AccessibilityObject.h:
2746         (AccessibilityObject):
2747         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2748         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2749
2750 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
2751
2752         Web Inspector: Workspace should support several projects and should not have temporary UISourceCodes.
2753         https://bugs.webkit.org/show_bug.cgi?id=105856
2754
2755         Reviewed by Pavel Feldman.
2756
2757         Workspace now supports several projects with the networkProject being a main one.
2758         Replaced temporary UISourceCodes with specific projects (debugger and liveedit).
2759         The concept of workspace reset on navigation is now replaced with project reset concept instead.
2760         Introduced snippets project (that is not reset on navigation).
2761         Script mappings are now reset on GlobalObjectCleared event.
2762
2763         * inspector/front-end/BreakpointManager.js:
2764         (WebInspector.BreakpointManager):
2765         (WebInspector.BreakpointManager.prototype._innerSetBreakpoint):
2766         (WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
2767         (WebInspector.BreakpointManager.prototype.toggleAllBreakpoints):
2768         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
2769         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
2770         (WebInspector.BreakpointManager.prototype._projectWillReset):
2771         * inspector/front-end/CSSStyleModel.js:
2772         (WebInspector.CSSStyleModel):
2773         (WebInspector.CSSStyleModel.prototype._inspectedURLChanged):
2774         (WebInspector.CSSStyleModel.prototype._resetSourceMappings):
2775         (WebInspector.CSSStyleModelResourceBinding):
2776         (WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResourceURL):
2777         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
2778         * inspector/front-end/CompilerScriptMapping.js:
2779         (WebInspector.CompilerScriptMapping):
2780         (WebInspector.CompilerScriptMapping.prototype._debuggerReset):
2781         * inspector/front-end/DebuggerScriptMapping.js:
2782         * inspector/front-end/DefaultScriptMapping.js:
2783         (WebInspector.DefaultScriptMapping):
2784         (WebInspector.DefaultScriptMapping.prototype.addScript):
2785         (WebInspector.DefaultScriptMapping.prototype._debuggerReset):
2786         * inspector/front-end/ExtensionServer.js:
2787         (WebInspector.ExtensionServer.prototype._onGetPageResources):
2788         * inspector/front-end/FilteredItemSelectionDialog.js:
2789         (WebInspector.OpenResourceDialog.show):
2790         * inspector/front-end/LiveEditSupport.js:
2791         (WebInspector.LiveEditSupport):
2792         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
2793         (WebInspector.LiveEditSupport.prototype._debuggerReset):
2794         * inspector/front-end/NetworkUISourceCodeProvider.js:
2795         (WebInspector.NetworkUISourceCodeProvider):
2796         (WebInspector.NetworkUISourceCodeProvider.prototype._mainFrameNavigated):
2797         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
2798         (WebInspector.NetworkUISourceCodeProvider.prototype._reset):
2799         * inspector/front-end/ResourceScriptMapping.js:
2800         (WebInspector.ResourceScriptMapping):
2801         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
2802         (WebInspector.ResourceScriptMapping.prototype._debuggerReset):
2803         * inspector/front-end/RevisionHistoryView.js:
2804         (WebInspector.RevisionHistoryView):
2805         (WebInspector.RevisionHistoryView.prototype._projectWillReset):
2806         * inspector/front-end/SASSSourceMapping.js:
2807         (_bindUISourceCode):
2808         * inspector/front-end/ScriptSnippetModel.js:
2809         (WebInspector.ScriptSnippetModel):
2810         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2811         (WebInspector.ScriptSnippetModel.prototype.reset):
2812         * inspector/front-end/ScriptsNavigator.js:
2813         * inspector/front-end/ScriptsPanel.js:
2814         (WebInspector.ScriptsPanel):
2815         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
2816         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
2817         (WebInspector.ScriptsPanel.prototype._removeUISourceCodes):
2818         (WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):
2819         (WebInspector.ScriptsPanel.prototype._debuggerReset):
2820         (WebInspector.ScriptsPanel.prototype._projectWillReset):
2821         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
2822         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
2823         (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog):
2824         * inspector/front-end/SimpleWorkspaceProvider.js:
2825         (WebInspector.SimpleWorkspaceProvider):
2826         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
2827         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
2828         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2829         * inspector/front-end/StylesSourceMapping.js:
2830         (WebInspector.StylesSourceMapping):
2831         (WebInspector.StylesSourceMapping.prototype._projectWillReset):
2832         * inspector/front-end/TabbedEditorContainer.js:
2833         (WebInspector.TabbedEditorContainer.prototype.reset):
2834         * inspector/front-end/UISourceCode.js:
2835         (WebInspector.UISourceCode.prototype.project):
2836         * inspector/front-end/Workspace.js:
2837         (WebInspector.WorkspaceController):
2838         (WebInspector.WorkspaceController.prototype._inspectedURLChanged):
2839         (WebInspector.Project):
2840         (WebInspector.Project.prototype.name):
2841         (WebInspector.Project.prototype.isServiceProject):
2842         (WebInspector.Project.prototype._reset):
2843         (WebInspector.Workspace):
2844         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
2845         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
2846         (WebInspector.Workspace.prototype.addProject):
2847         (WebInspector.Workspace.prototype.project):
2848         (WebInspector.Workspace.prototype.projects):
2849         (WebInspector.Workspace.prototype.uiSourceCodes):
2850         (WebInspector.Workspace.prototype.projectForUISourceCode):
2851         (WebInspector.Workspace.prototype.requestFileContent):
2852         (WebInspector.Workspace.prototype.setFileContent):
2853         (WebInspector.Workspace.prototype.searchInFileContent):
2854         * inspector/front-end/inspector.js:
2855         * inspector/front-end/utilities.js:
2856
2857 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
2858
2859         Web Inspector: [Resources] Make grid columns set configurable.
2860         https://bugs.webkit.org/show_bug.cgi?id=105739
2861
2862         Reviewed by Pavel Feldman.
2863
2864         Added context menu on grid header to hide/show grid columns.
2865         Hidden columns set is persisted.
2866
2867         * inspector/front-end/DataGrid.js:
2868         Fixed show/hide behavior, introduced weight control.
2869         * inspector/front-end/NetworkPanel.js:
2870         Added member to track visibility of columns in detailerd mode. Added
2871         context menu for grid header.
2872
2873 2013-01-11  Andras Becsi  <andras.becsi@digia.com>
2874
2875         [Qt] Fix the build if libxslt is not available but libxml2 is
2876         https://bugs.webkit.org/show_bug.cgi?id=106661
2877
2878         Reviewed by Simon Hausmann.
2879
2880         On Linux building the xml parser sources fails if the needed libxslt
2881         dependencies are not installed but libxml2 is.
2882
2883         * WebCore.pri: add libxml2 to pkg-config if not on mac.
2884
2885 2013-01-11  Stephen Chenney  <schenney@chromium.org>
2886         Objects can be re-added to the AXObjectCache during removal
2887         https://bugs.webkit.org/show_bug.cgi?id=104171
2888
2889         The problem occurs when a label's corresponding element is a sibling
2890         that precedes it in the render tree, and the corresponding element is
2891         removed. The corresponding element's AX render object is removed, but
2892         then recreated when accessibilityIsIgnored() invokes correspondingControl()
2893         on the label. The corresponding renderer then has an AX render object
2894         that survives beyond the deleted renderer, leading to invalid memory
2895         accesses.
2896
2897         The solution is to rearrange the calls to delete the renderer's AX
2898         render object only when we are sure it will no longer be required.
2899
2900         Reviewed by Simon Fraser.
2901
2902         Test: accessibility/corresponding-control-deleted-crash.html
2903
2904         * rendering/RenderObject.cpp:
2905         (WebCore::RenderObject::willBeDestroyed): Move the call to remove the
2906         renderer from the AXCache to after the renderer is removed from the
2907         render tree. This means that the AXObject still exists during renderer
2908         removal, as we require.
2909
2910 2013-01-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2911
2912         [Qt][WK1] Web Audio support
2913         https://bugs.webkit.org/show_bug.cgi?id=106651
2914
2915         Reviewed by Jocelyn Turcotte.
2916
2917         Convert JavaScript Uint8Array to QByteArray. This conversion is necessary to support testRunner.setAudioData().
2918
2919         * bridge/qt/qt_runtime.cpp:
2920         (JSC::Bindings::isJSUint8Array):
2921         (Bindings):
2922         (JSC::Bindings::valueRealType):
2923         (JSC::Bindings::convertValueToQVariant):
2924
2925 2013-01-11  Anton Vayvod  <avayvod@chromium.org>
2926
2927         Text Autosizing - elements much narrower than its parent autosizing clusters should be autosized separately.
2928         https://bugs.webkit.org/show_bug.cgi?id=105188
2929
2930         Reviewed by Kenneth Rohde Christiansen.
2931
2932         Some blocks of text might be narrower than their parent clusters and should be autosized separately.
2933         This helps with autosizing for the pages implementing the sidebars as a narrow blocks of text with wide margins and
2934         the main content being positioned atop this margin (or vice versa).
2935
2936         * rendering/TextAutosizer.cpp:
2937         (WebCore::TextAutosizer::isContainerAutosizingCluster):
2938
2939             Returns true if the container is more than 200 pixels narrower than its parent cluster's lowest common
2940             ancestor of all the text nodes.
2941
2942 2013-01-11  Andreas Kling  <akling@apple.com>
2943
2944         Remove unused CSSSelector(QualifiedName) constructor.
2945         <http://webkit.org/b/106652>
2946
2947         Reviewed by Antti Koivisto.
2948
2949         * css/CSSSelector.h:
2950         (CSSSelector):
2951
2952 2013-01-11  Zan Dobersek  <zandobersek@gmail.com>
2953
2954         [GTK] Disable the ENABLE_LEGACY_WEB_AUDIO feature define in release builds
2955         https://bugs.webkit.org/show_bug.cgi?id=106577
2956
2957         Reviewed by Philippe Normand.
2958
2959         The Web Audio feature is not enabled in the release builds, so there's
2960         no need to enable the legacy Web Audio API either.
2961
2962         No new tests - no new functionality.
2963
2964         * GNUmakefile.features.am.in:
2965
2966 2013-01-11  Antoine Quint  <graouts@apple.com>
2967
2968         Web Inspector: Option+Click on Node Expander Doesn't Work the First Time
2969         https://bugs.webkit.org/show_bug.cgi?id=66868
2970
2971         Up to now, the TreeElement.prototype.expandRecursively() method would correctly
2972         expand children recursively based on the provided depth, but would not wait to
2973         perform this task until all child nodes had been populated, which means that this
2974         would only work incrementally with one additional level of child nodes being shown
2975         expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.
2976         
2977         In order to fix this, this patch adds a new optional argument to the DOMAgent's
2978         requestChildNodes() methods to provide the depth at which we want to retrieve children
2979         of a given node. The DOMAgent provides a new .getSubtree() method that calls
2980         requestChildNodes() with the provided depth.
2981
2982         Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's
2983         new .getSubtree() method and then call the default implementation when all nodes
2984         have been retrieved from the backend.
2985
2986         Reviewed by Pavel Feldman.
2987
2988         Tests: inspector-protocol/dom-request-child-nodes-depth.html
2989                inspector/elements/expand-recursively.html
2990
2991         * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes().
2992         * inspector/InspectorDOMAgent.cpp:
2993         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter
2994         which defaults to 1.
2995         (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter
2996         which defaults to 1 and allows -1 as an unbound value.
2997         * inspector/InspectorDOMAgent.h:
2998         (InspectorDOMAgent):
2999         * inspector/front-end/DOMAgent.js:
3000         (WebInspector.DOMNode.prototype.):
3001         (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth
3002         we want to retrieve children of a given node from the backend.
3003         * inspector/front-end/ElementsTreeOutline.js:
3004         (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation
3005         to first obtain the deepest subtree for the current node so that deep expansion happens as expected.
3006
3007 2013-01-11  Alexander Pavlov  <apavlov@chromium.org>
3008
3009         Web Inspector: [Elements] Search in the DOM tree does not scroll horizontally
3010         https://bugs.webkit.org/show_bug.cgi?id=106648
3011
3012         Reviewed by Vsevolod Vlasov.
3013
3014         Scroll into view the first match in every tree element, if needed.
3015
3016         * inspector/front-end/ElementsPanel.js:
3017         (WebInspector.ElementsPanel.prototype._highlightCurrentSearchResult):
3018
3019 2013-01-11  Andrey Adaikin  <aandrey@chromium.org>
3020
3021         Web Inspector: [Canvas] a minor follow-up to r137262
3022         https://bugs.webkit.org/show_bug.cgi?id=106644
3023
3024         Reviewed by Pavel Feldman.
3025
3026         * inspector/InjectedScriptCanvasModuleSource.js:
3027         (.):
3028
3029 2013-01-11  Kent Tamura  <tkent@chromium.org>
3030
3031         BaseDateAndTimeInputType should not inherit from TextFieldInputType
3032         https://bugs.webkit.org/show_bug.cgi?id=106306
3033
3034         Reviewed by Hajime Morita.
3035
3036         Date/time input types don't need text-field features at all.
3037
3038         No new tests. This should not make any behavior changes except reduction
3039         of memory usage.
3040
3041         * html/BaseDateAndTimeInputType.h:
3042         Inherit InputType instead of TextFieldInputType.
3043         (WebCore::BaseDateAndTimeInputType::BaseDateAndTimeInputType):
3044         (BaseDateAndTimeInputType): Update function declarations.
3045         * html/BaseDateAndTimeInputType.cpp:
3046         Remove handleKeydownEvent and convertFromVisibleValue, which are for
3047         TextFieldInputType.
3048         (WebCore::BaseDateAndTimeInputType::shouldRespectListAttribute):
3049         Added. This is necessary for <datalist> support. TextFieldInputType has
3050         the same code.
3051         (WebCore::BaseDateAndTimeInputType::valueMissing):
3052         Added. This is necessary for validity.valueMissing. TextFieldInputType
3053         has the same code.
3054
3055         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
3056         Remove unnecessary functions which cancel TextFieldInputType behavior.
3057         * html/BaseChooserOnlyDateAndTimeInputType.h:
3058         (BaseChooserOnlyDateAndTimeInputType): Remove declarations for them.
3059
3060         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3061         Remove unnecessary functions which cancel TextFieldInputType behavior.
3062         * html/BaseMultipleFieldsDateAndTimeInputType.h:
3063         (BaseMultipleFieldsDateAndTimeInputType):
3064         Add SpinButtonOwner interface. We didn't need it because
3065         TextFieldInputType implements it.
3066
3067 2013-01-11  Mary Wu  <mary.wu@torchmobile.com.cn>
3068
3069         [BlackBerry] Enable concatenating headers with same field name
3070         https://bugs.webkit.org/show_bug.cgi?id=106625
3071
3072         Reviewed by Rob Buis.
3073
3074         RFC 2616 specifies that headers could concatenate with comma if they have
3075         same field name. We should enable this if the header allows multiple values.
3076
3077         RIM PR# 275508, internally reviewed by Joe Mason
3078
3079         (WebCore):
3080         (WebCore::isAppendableHeader):
3081         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3082
3083 2013-01-11  Jochen Eisinger  <jochen@chromium.org>
3084
3085         Connect UserGestureIndicator for mousedown and mouseup events
3086         https://bugs.webkit.org/show_bug.cgi?id=105138
3087
3088         Reviewed by Adam Barth.
3089
3090         Ports that consume user gestures to prevent certain types of pop-ups
3091         need to be able to connect mousedown and mouseup events, otherwise, a
3092         single mouse click will allow for opening multiple pop-ups.
3093
3094         Note that a mousedown is not always followed by a mouseup and vice
3095         versa, e.g. when the mousedown results in a context menu being shown, or
3096         something is dragged into the page.
3097
3098         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-two-events.html
3099
3100         * page/EventHandler.cpp:
3101         (WebCore::EventHandler::clear):
3102         (WebCore::EventHandler::handleMousePressEvent):
3103         (WebCore::EventHandler::handleMouseReleaseEvent):
3104         * page/EventHandler.h:
3105
3106 2013-01-11  Eugene Klyuchnikov  <eustas@chromium.org>
3107
3108         Web Inspector: [Resources] "Delete" cookie deletes all cookies with matching name.
3109         https://bugs.webkit.org/show_bug.cgi?id=105633
3110
3111         Reviewed by Pavel Feldman.
3112
3113         "Delete" cookie deletes all cookies with matching name,
3114         ignoring domain and path.
3115
3116         * inspector/Inspector.json: Change argument "domain" to "url"
3117         * inspector/InspectorPageAgent.cpp:
3118         (WebCore::InspectorPageAgent::deleteCookie): Use url to delte cookies.
3119         * inspector/InspectorPageAgent.h: Adopt new signature.
3120         * inspector/front-end/CookieItemsView.js:
3121         (WebInspector.CookieItemsView.prototype._deleteCookie): Ditto.
3122
3123 2013-01-11  KwangYong Choi  <ky0.choi@samsung.com>
3124
3125         [EFL] Fix unused parameter build error
3126         https://bugs.webkit.org/show_bug.cgi?id=106639
3127
3128         Reviewed by Kentaro Hara.
3129
3130         Use UNUSED_PARAM macro to fix build error.
3131
3132         No new tests, no behavior change.
3133
3134         * platform/efl/EflScreenUtilities.cpp:
3135         (WebCore::isUsingEcoreX):
3136         * platform/efl/RenderThemeEfl.cpp:
3137         (WebCore::RenderThemeEfl::supportsDataListUI):
3138
3139 2013-01-11  Pavel Feldman  <pfeldman@chromium.org>
3140
3141         Web Inspector [chromium]: Debugger.globalObjectCleared is not dispatched on reload after renderer swap
3142         https://bugs.webkit.org/show_bug.cgi?id=106555
3143
3144         Reviewed by Vsevolod Vlasov.
3145
3146         Wrong ::enable was made virtual in the InspectorDebuggerAgent.
3147
3148         Test: inspector/debugger/debugger-scripts-reload.html
3149
3150         * inspector/InspectorDebuggerAgent.h:
3151         (InspectorDebuggerAgent):
3152         * inspector/PageDebuggerAgent.cpp:
3153         (WebCore::PageDebuggerAgent::enable):
3154         (WebCore::PageDebuggerAgent::disable):
3155         * inspector/PageDebuggerAgent.h:
3156         (PageDebuggerAgent):
3157
3158 2013-01-11  Vsevolod Vlasov  <vsevik@chromium.org>
3159
3160         Web Inspector: Refactoring, move NetworkWorkspaceProvider to NetworkUISourceCodeProvider.js and rename its parent to SimpleWorkspaceProvider.
3161         https://bugs.webkit.org/show_bug.cgi?id=106635
3162
3163         Reviewed by Pavel Feldman.
3164
3165         * WebCore.gypi:
3166         * WebCore.vcproj/WebCore.vcproj:
3167         * inspector/compile-front-end.py:
3168         * inspector/front-end/DebuggerScriptMapping.js:
3169         (WebInspector.DebuggerScriptMapping):
3170         * inspector/front-end/DefaultScriptMapping.js:
3171         (WebInspector.DefaultScriptMapping):
3172         (WebInspector.DefaultScriptMapping.prototype.addScript):
3173         (WebInspector.DebuggerWorkspaceProvider):
3174         (WebInspector.DebuggerWorkspaceProvider.prototype.addDebuggerFile):
3175         * inspector/front-end/LiveEditSupport.js:
3176         (WebInspector.LiveEditSupport):
3177         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
3178         (WebInspector.LiveEditWorkspaceProvider):
3179         (WebInspector.LiveEditWorkspaceProvider.prototype.addLiveEditFile):
3180         * inspector/front-end/NetworkUISourceCodeProvider.js:
3181         (WebInspector.NetworkWorkspaceProvider):
3182         (WebInspector.NetworkWorkspaceProvider.prototype.addNetworkFile):
3183         * inspector/front-end/SimpleWorkspaceProvider.js: Renamed from Source/WebCore/inspector/front-end/NetworkWorkspaceProvider.js.
3184         (WebInspector.SimpleWorkspaceProvider):
3185         (WebInspector.SimpleWorkspaceProvider.uriForURL):
3186         (WebInspector.SimpleWorkspaceProvider.prototype.requestFileContent):
3187         (WebInspector.SimpleWorkspaceProvider.prototype.setFileContent):
3188         (WebInspector.SimpleWorkspaceProvider.prototype.searchInFileContent):
3189         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
3190         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
3191         (WebInspector.SimpleWorkspaceProvider.prototype.uniqueURI):
3192         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
3193         * inspector/front-end/WebKit.qrc:
3194         * inspector/front-end/inspector.html:
3195         * inspector/front-end/inspector.js:
3196
3197 2013-01-10  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3198
3199         On Linux, should be able to get spelling suggestions without selecting the misspelled word
3200         https://bugs.webkit.org/show_bug.cgi?id=103520
3201
3202         Reviewed by Ryosuke Niwa.
3203
3204         Allow to get/insert spelling suggestions without selecting the misspelled word for
3205         Linux WebKit ports. WebCore assumes that the misspelled word has to be selected
3206         to get its suggestions.
3207
3208         In compliance with native application behaviour a new editing policy is introduced,
3209         to do not highlight the misspelled word to just get its guesses.
3210
3211         No new tests, covered by context-menu-suggestions.html.
3212
3213         * WebCore.exp.in:
3214         Remove _ZN7WebCore6Editor21isSelectionMisspelledEv symbol as Mac port doesn't
3215         need it any longer.
3216
3217         * editing/EditingBehavior.h:
3218         (EditingBehavior):
3219         (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
3220         Add a new behavior for Linux, to allow spelling suggestions without selecting
3221         the misspelled word.
3222
3223         * editing/Editor.cpp:
3224         (WebCore::Editor::isContinuousSpellCheckingEnabled):
3225         Add missing const modifier, to use this method in 'misspelledWordAtCaretOrRange() const'.
3226
3227         (WebCore::Editor::misspelledWordAtCaretOrRange):
3228         Allow to check spelling under the caret or selected word.
3229         Does nothing for selection made on the multiple words.
3230
3231         (WebCore::Editor::misspelledSelectionString):
3232         Return the misspelled selection.
3233
3234         (WebCore::Editor::guessesForMisspelledWord):
3235         Remove 'Selection' from method name as it may return guesses without selection.
3236
3237         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
3238         Ditto.
3239
3240         * page/ContextMenuController.cpp:
3241         (WebCore::ContextMenuController::contextMenuItemSelected):
3242         Select the word under caret to meet the conditions from misspelledWordAtCaretOrRange.
3243
3244         (WebCore::ContextMenuController::populate):
3245         Update guessesForMisspelledOrUngrammatical call.
3246
3247 2013-01-10  Hajime Morrita  <morrita@google.com>
3248
3249         https://bugs.webkit.org/show_bug.cgi?id=106283
3250         [Shadow DOM] HTMLContentElement and HTMLShadowElement should be behind SHADOW_DOM
3251
3252         Reviewed by Kentaro Hara.
3253
3254         No new tests. Covered by existing tests.
3255
3256         This change moves <content> and <shadow> behind
3257         ENABLE(SHADOW_DOM). Note that empty stub definitions are remaining
3258         even after this change. They are for minimizing #if/#endif usage
3259         and won't hurt code size.
3260
3261         * WebCore.exp.in:
3262         * html/InputType.cpp:
3263         (WebCore::InputType::destroyShadowSubtree):
3264         * html/shadow/ContentDistributor.cpp:
3265         (WebCore::ContentDistributor::distribute):
3266         * html/shadow/HTMLContentElement.cpp:
3267         (WebCore):
3268         (WebCore::HTMLContentElement::create):
3269         (WebCore::HTMLContentElement::HTMLContentElement):
3270         * html/shadow/HTMLContentElement.h:
3271         (WebCore):
3272         (HTMLContentElement):
3273         * html/shadow/HTMLShadowElement.cpp:
3274         * html/shadow/HTMLShadowElement.h:
3275         (WebCore):
3276         (WebCore::isHTMLShadowElement):
3277         (WebCore::toHTMLShadowElement):
3278         * html/shadow/TextFieldDecorationElement.cpp:
3279         (WebCore::TextFieldDecorationElement::decorate):
3280         * testing/Internals.cpp:
3281         (WebCore::Internals::createContentElement):
3282         (WebCore::Internals::isValidContentSelect):
3283
3284 2013-01-10  Takashi Sakamoto  <tasak@google.com>
3285
3286         Implement CSSGroupingRule for @host @-rules and @supports.
3287         https://bugs.webkit.org/show_bug.cgi?id=106418
3288
3289         Reviewed by Antti Koivisto.
3290
3291         CSSGroupingRule is to share code between CSSMediaRule, CSSSupportsRule
3292         and CSSHostRule. @supports and @host @-rules are dervied from
3293         CSSGroupingRule:
3294         http://www.w3.org/TR/2012/WD-css3-conditional/#the-cssgroupingrule-interface
3295         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface
3296         Since @media is also derived from CSSGroupingRule and @region has the
3297         same interface as CSSGroupingRule, modify to use CSSGroupingRule:
3298         http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule
3299
3300         No new tests, because no new feature is implemented.
3301
3302         * CMakeLists.txt:
3303         * GNUmakefile.list.am:
3304         * Target.pri:
3305         * WebCore.gypi:
3306         * WebCore.vcproj/WebCore.vcproj:
3307         * WebCore.xcodeproj/project.pbxproj:
3308         Added CSSGroupingRule.h and CSSGroupingRule.cpp.
3309         * css/CSSAllInOne.cpp:
3310         Modified to include CSSGroupingRule.cpp.
3311         * css/CSSGroupingRule.cpp: Added.
3312         (WebCore):
3313         (WebCore::CSSGroupingRule::CSSGroupingRule):
3314         (WebCore::CSSGroupingRule::~CSSGroupingRule):
3315         (WebCore::CSSGroupingRule::insertRule):
3316         (WebCore::CSSGroupingRule::deleteRule):
3317         (WebCore::CSSGroupingRule::appendCssTextForItems):
3318         (WebCore::CSSGroupingRule::length):
3319         (WebCore::CSSGroupingRule::item):
3320         (WebCore::CSSGroupingRule::cssRules):
3321         (WebCore::CSSGroupingRule::reattach):
3322         (WebCore::CSSGroupingRule::reportMemoryUsage):
3323         These codes are moved from CSSMediaRule and WebKitCSSRegionRule.
3324         * css/CSSGroupingRule.h:
3325         (WebCore):
3326         (CSSGroupingRule):
3327         * css/CSSMediaRule.cpp:
3328         (WebCore::CSSMediaRule::CSSMediaRule):
3329         (WebCore::CSSMediaRule::~CSSMediaRule):
3330         Make CSSMediaRule inherit CSSGroupingRule.
3331         (WebCore::CSSMediaRule::media):
3332         (WebCore::CSSMediaRule::reattach):
3333         Keep the code for updating media queries' CSSOMWrapper.
3334         (WebCore::CSSMediaRule::reportMemoryUsage):
3335         We need to report media queries' CSSOMWrapper memory usage.
3336         (WebCore::CSSMediaRule::mediaQueries):
3337         (WebCore::CSSMediaRule::cssText):
3338         * css/CSSMediaRule.h:
3339         * css/WebKitCSSRegionRule.cpp:
3340         Make WebKitCSSRegionRule inherit CSSGroupingRule.
3341         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
3342         (WebCore::WebKitCSSRegionRule::cssText):
3343         * css/WebKitCSSRegionRule.h:
3344         * css/StyleRule.h:
3345         Added inlined accessor to obtain StyleRuleMedia* and StyleRuleRegion*
3346         from StyleRuleBlock*.
3347
3348 2012-12-28  Andrey Adaikin  <aandrey@chromium.org>
3349
3350         Web Inspector: [Canvas] add an option to reload the page if there is an uninstrumented canvas
3351         https://bugs.webkit.org/show_bug.cgi?id=105822
3352
3353         Reviewed by Pavel Feldman.
3354
3355         Show in the front-end an option to reload the page if there is an uninstrumented canvas.
3356
3357         * inspector/front-end/CanvasProfileView.js:
3358         (WebInspector.CanvasProfileType):
3359         (WebInspector.CanvasProfileType.prototype.decorationElement):
3360         (WebInspector.CanvasProfileType.prototype._updateDecorationElement):
3361         (WebInspector.CanvasProfileType.prototype._onReloadPageButtonClick):
3362         * inspector/front-end/ProfileLauncherView.js:
3363         (WebInspector.ProfileLauncherView.prototype.addProfileType):
3364         * inspector/front-end/ProfilesPanel.js:
3365         (WebInspector.ProfileType.prototype.decorationElement):
3366
3367 2013-01-10  Dimitri Glazkov  <dglazkov@chromium.org>
3368
3369         The word "selector" is somewhat redundant redundantly used in SelectorChecker.
3370         https://bugs.webkit.org/show_bug.cgi?id=106413
3371
3372         In https://bugs.webkit.org/show_bug.cgi?id=105864, Antti suggested reducing some of the redundant uses of the word
3373         "selector" in SelectorChecker. Here's a start.
3374
3375         Reviewed by Antti Koivisto.
3376
3377         Simple renames, no change in behavior.
3378
3379         * css/SelectorChecker.cpp:
3380         (WebCore::SelectorChecker::match): Renamed.
3381         (WebCore):
3382         (WebCore::SelectorChecker::fastCheck): Ditto,
3383         (WebCore::SelectorChecker::checkOne): Ditto.
3384         * css/SelectorChecker.h:
3385         (SelectorChecker):
3386         * css/StyleResolver.cpp:
3387         (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use new name.
3388         (WebCore::StyleResolver::ruleMatches): Renamed from checkSelector to better match argument and return value.
3389         (WebCore::StyleResolver::checkRegionSelector): Changed to use new names.
3390         * css/StyleResolver.h:
3391         (StyleResolver):
3392         * dom/SelectorQuery.cpp:
3393         (WebCore::SelectorDataList::matches): Ditto.
3394         (WebCore::SelectorDataList::execute): Ditto.
3395         * html/shadow/ContentSelectorQuery.cpp:
3396         (WebCore::ContentSelectorChecker::checkContentSelector): Ditto.
3397
3398 2013-01-10  John J. Barton  <johnjbarton@chromium.org>
3399
3400         Web Inspector: Pass the script url to the script-preprocessor script
3401         https://bugs.webkit.org/show_bug.cgi?id=104384
3402
3403         Reviewed by Pavel Feldman.
3404
3405         Add url argument to the script-preprocessor script in PageAgent.reload()
3406
3407         Test: inspector/debugger/debugger-script-preprocessor.html
3408
3409         * bindings/v8/DebuggerScript.js:
3410         * bindings/v8/ScriptDebugServer.cpp:
3411         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
3412         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
3413         (WebCore::ScriptDebugServer::handleV8DebugEvent):
3414         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3415         (WebCore::InjectedScriptManager::createInjectedScript):
3416
3417 2013-01-10  Eugene Klyuchnikov  <eustas@chromium.org>
3418
3419         Web Inspector: DataGrid refactoring: make cell editing more generic.
3420         https://bugs.webkit.org/show_bug.cgi?id=105849
3421
3422         Reviewed by Pavel Feldman.
3423
3424         Editing feature has been added to DataGrid to edit localStorage.
3425         Column numbers (0 and 1) are hardcoded.
3426
3427         This patch makes column editing feature more generic: remove hardcoded
3428         colums, take "editable" column property into account.
3429
3430         This patch is a prerequisite for cookie editing.
3431
3432         * inspector/front-end/DOMStorageItemsView.js:
3433         Use meaningful column names.
3434         * inspector/front-end/DataGrid.js:
3435         (WebInspector.DataGrid.prototype._ondblclick): Check column editability.
3436         (WebInspector.DataGrid.prototype._contextMenuInDataTable): Ditto.
3437         (WebInspector.DataGridNode.prototype.createCell):
3438         Supply cell element with column id.
3439         (WebInspector.DataGrid.prototype.columnIdentifierFromNode):
3440         Added utility method.
3441         (WebInspector.DataGrid.prototype._nextEditableColumn): Ditto.
3442         (WebInspector.DataGrid.prototype._keyDown): Calculate editable column.
3443         (WebInspector.DataGrid.prototype._editingCommitted): Ditto.
3444         (WebInspector.DataGrid.prototype._startEditing): Ditto.
3445         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
3446         Refined parameter type / name.
3447         (WebInspector.DataGrid.prototype._resizerDragging):
3448         Fix resizer index property names.
3449         (WebInspector.DataGrid.prototype._startResizerDragging): Ditto.
3450         (WebInspector.DataGrid.prototype._positionResizers): Ditto.
3451         * inspector/front-end/NetworkPanel.js:
3452         (WebInspector.NetworkLogView.prototype._updateDividersIfNeeded): Ditto.
3453
3454 2013-01-10  Matt Falkenhagen  <falken@chromium.org>
3455
3456         Elements must be reattached when inserted/removed from top layer
3457         https://bugs.webkit.org/show_bug.cgi?id=105489
3458
3459         Reviewed by Julien Chaffraix.
3460
3461         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
3462         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
3463
3464         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
3465         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
3466         followed immediately by show() results in no style change.
3467
3468         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
3469                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
3470
3471         * dom/Element.cpp:
3472         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
3473         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
3474         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
3475
3476 2013-01-10  Shinya Kawanaka  <shinyak@chromium.org>
3477
3478         When a selected node in ne