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