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