87c634c7361ad8aec662b9f70c98c69f841d1076
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
2
3         [Windows] Unreviewed build fix after r156487.
4
5         Add explicit casting needed by MSVC to compile this code. Much
6         of this could probably be removed when we move to VS2012 or newer.
7
8         * bindings/js/JSEventListener.cpp:
9         (WebCore::JSEventListener::JSEventListener):
10         * bindings/js/JSEventListener.h:
11         (WebCore::JSEventListener::jsFunction):
12         * bridge/jsc/BridgeJSC.cpp:
13         (JSC::Bindings::Instance::createRuntimeObject):
14         * platform/graphics/filters/FEGaussianBlur.cpp:
15         (WebCore::FEGaussianBlur::platformApplyGeneric):
16         (WebCore::FEGaussianBlur::platformApply):
17         * platform/graphics/win/DIBPixelData.cpp:
18         (WebCore::DIBPixelData::DIBPixelData):
19         (WebCore::DIBPixelData::writeToFile):
20         * platform/graphics/win/DIBPixelData.h:
21
22 2013-09-26  Dean Jackson  <dino@apple.com>
23
24         Expose a setting to disable hardware accelerated animations
25         https://bugs.webkit.org/show_bug.cgi?id=121978
26         <rdar://problem/15091284>
27
28         Reviewed by Eric Carlson.
29
30         Expose acceleratedCompositedAnimationsEnabled
31         to disable CoreAnimation animations.
32
33         Test: LayoutTests/animations/transform-non-accelerated.html
34
35         * WebCore.exp.in: Export new method.
36         * page/Settings.in: Add new setting.
37         * rendering/RenderLayerBacking.cpp:
38         (WebCore::RenderLayerBacking::startAnimation): Don't go
39         to GraphicsLayer if the setting is false.
40
41 2013-09-26  Julien Brianceau  <jbriance@cisco.com>
42
43         [Qt] Fix build after r156487.
44         https://bugs.webkit.org/show_bug.cgi?id=121984
45
46         Reviewed by Anders Carlsson.
47
48         * bridge/qt/qt_runtime.cpp:
49         (JSC::Bindings::QtRuntimeMethod::jsObjectRef):
50
51 2013-09-26  Antti Koivisto  <antti@apple.com>
52
53         Don't mutate style in RenderCombineText
54         https://bugs.webkit.org/show_bug.cgi?id=121979
55
56         Reviewed by Andreas Kling.
57
58         Text renderers should always have the same style as the parent.
59
60         * rendering/InlineTextBox.cpp:
61         (WebCore::fontToUse):
62         (WebCore::InlineTextBox::localSelectionRect):
63         (WebCore::InlineTextBox::paint):
64         (WebCore::InlineTextBox::offsetForPosition):
65         (WebCore::InlineTextBox::positionForOffset):
66         
67             Select the modified font for text-combine.
68
69         * rendering/RenderCombineText.cpp:
70         (WebCore::RenderCombineText::styleDidChange):
71         (WebCore::RenderCombineText::combineText):
72         * rendering/RenderCombineText.h:
73         
74             Move the text-combine specific font style to a member of its own.
75
76 2013-09-26  Anders Carlsson  <andersca@apple.com>
77
78         Remove PassWeak.h
79         https://bugs.webkit.org/show_bug.cgi?id=121971
80
81         Reviewed by Geoffrey Garen.
82
83         * ForwardingHeaders/heap/PassWeak.h: Removed.
84
85 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
86
87         [MediaStream API] implement VideoStreamTrack and AudioStreamTrack
88         https://bugs.webkit.org/show_bug.cgi?id=121950
89
90         Reviewed by Dean Jackson.
91
92         No new tests, blocked by https://bugs.webkit.org/show_bug.cgi?id=121967
93
94         * CMakeLists.txt: Add new files.
95         * DerivedSources.make: Ditto.
96         * GNUmakefile.list.am: Ditto.
97
98         * Modules/mediastream/AudioStreamTrack.cpp: Added.
99         * Modules/mediastream/AudioStreamTrack.h: Added.
100         * Modules/mediastream/AudioStreamTrack.idl: Added.
101
102         * Modules/mediastream/MediaStream.cpp:
103         (WebCore::MediaStream::MediaStream): Create an AudioStreamTrack or a VideoStreamTrack.
104         (WebCore::MediaStream::addRemoteSource): Ditto.
105
106         * Modules/mediastream/MediaStreamTrack.cpp:
107         (WebCore::MediaStreamTrack::create): Removed.
108         * Modules/mediastream/MediaStreamTrack.h:
109
110         * Modules/mediastream/VideoStreamTrack.cpp: Added.
111         * Modules/mediastream/VideoStreamTrack.h: Added.
112         * Modules/mediastream/VideoStreamTrack.idl: Added.
113
114         * WebCore.xcodeproj/project.pbxproj: Add new files.
115
116 2013-09-26  Anders Carlsson  <andersca@apple.com>
117
118         Stop using PassWeak
119         https://bugs.webkit.org/show_bug.cgi?id=121968
120
121         Reviewed by Sam Weinig.
122
123         Update for JavaScriptCore changes.
124
125         * bindings/js/JSDOMBinding.h:
126         (WebCore::setInlineCachedWrapper):
127         (WebCore::cacheWrapper):
128         * bindings/js/JSEventListener.cpp:
129         (WebCore::JSEventListener::JSEventListener):
130         * bindings/js/JSEventListener.h:
131         (WebCore::JSEventListener::setWrapper):
132         (WebCore::JSEventListener::jsFunction):
133         * bindings/js/JSMutationCallback.cpp:
134         (WebCore::JSMutationCallback::JSMutationCallback):
135         * bindings/js/JSNodeFilterCondition.cpp:
136         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
137         * bindings/js/ScriptWrappableInlines.h:
138         (WebCore::ScriptWrappable::setWrapper):
139         * bindings/js/WebCoreTypedArrayController.cpp:
140         * bridge/jsc/BridgeJSC.cpp:
141         (JSC::Bindings::Instance::createRuntimeObject):
142         * bridge/runtime_root.cpp:
143         (JSC::Bindings::RootObject::addRuntimeObject):
144
145 2013-09-25  Sam Weinig  <sam@webkit.org>
146
147         Pass a JSC::VM& to JS bindings object creation functions, rather than a JSC::ExecState*
148         https://bugs.webkit.org/show_bug.cgi?id=121934
149
150         Reviewed by Geoffrey Garen.
151
152         Reduce unnecessary loads by passing the JSC::VM to object creation/access functions
153         that don't need the ExecState.
154
155         * WebCore.exp.in:
156         * bindings/js/JSDOMBinding.h:
157         (WebCore::getDOMStructure):
158         (WebCore::deprecatedGetDOMStructure):
159         (WebCore::getDOMPrototype):
160         (WebCore::setInlineCachedWrapper):
161         (WebCore::createWrapper):
162         * bindings/js/JSDOMGlobalObject.h:
163         (WebCore::getDOMConstructor):
164         * bindings/js/JSDOMWindowCustom.cpp:
165         (WebCore::JSDOMWindow::image):
166         * bindings/js/JSDocumentCustom.cpp:
167         (WebCore::JSDocument::location):
168         * bindings/js/JSImageConstructor.cpp:
169         (WebCore::JSImageConstructor::finishCreation):
170         * bindings/js/JSImageConstructor.h:
171         (WebCore::JSImageConstructor::create):
172         * bindings/js/ScriptWrappable.h:
173         * bindings/js/ScriptWrappableInlines.h:
174         (WebCore::ScriptWrappable::setWrapper):
175         * bindings/scripts/CodeGeneratorJS.pm:
176         (GenerateHeader):
177         (GenerateImplementation):
178         (GenerateConstructorDeclaration):
179         (GenerateConstructorHelperMethods):
180         * bridge/c/CRuntimeObject.cpp:
181         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
182         (JSC::Bindings::CRuntimeObject::finishCreation):
183         * bridge/c/CRuntimeObject.h:
184         (JSC::Bindings::CRuntimeObject::create):
185         * bridge/c/c_instance.cpp:
186         (JSC::Bindings::CInstance::newRuntimeObject):
187         * bridge/jsc/BridgeJSC.cpp:
188         (JSC::Bindings::Instance::newRuntimeObject):
189         * bridge/objc/ObjCRuntimeObject.h:
190         (JSC::Bindings::ObjCRuntimeObject::create):
191         * bridge/objc/ObjCRuntimeObject.mm:
192         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
193         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
194         * bridge/objc/objc_instance.mm:
195         (ObjcInstance::newRuntimeObject):
196         * bridge/objc/objc_runtime.h:
197         (JSC::Bindings::ObjcFallbackObjectImp::createPrototype):
198         * bridge/runtime_array.h:
199         (JSC::RuntimeArray::createPrototype):
200         * bridge/runtime_method.h:
201         (JSC::RuntimeMethod::createPrototype):
202         * bridge/runtime_object.cpp:
203         (JSC::Bindings::RuntimeObject::RuntimeObject):
204         (JSC::Bindings::RuntimeObject::finishCreation):
205         * bridge/runtime_object.h:
206         (JSC::Bindings::RuntimeObject::create):
207         (JSC::Bindings::RuntimeObject::createPrototype):
208
209 2013-09-26  Commit Queue  <commit-queue@webkit.org>
210
211         Unreviewed, rolling out r156451.
212         http://trac.webkit.org/changeset/156451
213         https://bugs.webkit.org/show_bug.cgi?id=121965
214
215         Broke two fast/multicol tests. (Requested by kling on
216         #webkit).
217
218         * rendering/FlowThreadController.cpp:
219         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
220         * rendering/RenderElement.cpp:
221         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
222         * rendering/RenderFlowThread.cpp:
223         (WebCore::RenderFlowThread::layout):
224         (WebCore::RenderFlowThread::regionForCompositedLayer):
225         (WebCore::RenderFlowThread::updateRegionForRenderLayer):
226         (WebCore::RenderFlowThread::updateLayerToRegionMappings):
227         * rendering/RenderFlowThread.h:
228         * rendering/RenderGeometryMap.cpp:
229         * rendering/RenderGeometryMap.h:
230         * rendering/RenderLayer.cpp:
231         (WebCore::RenderLayer::calculateLayerBounds):
232         * rendering/RenderLayer.h:
233         * rendering/RenderLayerBacking.cpp:
234         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
235         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
236         * rendering/RenderLayerBacking.h:
237         * rendering/RenderLayerCompositor.cpp:
238         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
239         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
240         (WebCore::RenderLayerCompositor::canBeComposited):
241         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
242         * rendering/RenderLayerCompositor.h:
243         * rendering/RenderMultiColumnSet.cpp:
244         * rendering/RenderMultiColumnSet.h:
245         * rendering/RenderRegion.cpp:
246         (WebCore::RenderRegion::setRequiresLayerForCompositing):
247         * rendering/RenderRegion.h:
248         * rendering/RenderRegionSet.h:
249         * rendering/RenderTreeAsText.cpp:
250         (WebCore::writeLayers):
251
252 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
253
254         [MediaStream] Cleanup platform interface
255         https://bugs.webkit.org/show_bug.cgi?id=121935
256
257         Reviewed by Jer Noble.
258
259         No new tests, tests will be updated in the next patch.
260
261         * CMakeLists.txt: Remove MediaStreamComponent.cpp.
262         * GNUmakefile.list.am: Remove MediaStreamComponent.h|cpp and MediaStreamSourcesQueryClient.h. 
263             Add MediaStreamConstraintsValidationClient.h and MediaStreamCreationClient.h.
264
265         * Modules/mediastream/MediaStream.cpp:
266         (WebCore::processTrack): Duplicate MediaStreamSource when necessary to work around bug 121954.
267         (WebCore::createFromSourceVectors): MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
268         (WebCore::MediaStream::MediaStream): *Components -> *Streams.
269         (WebCore::MediaStream::setEnded): New.
270         (WebCore::MediaStream::stop):  MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
271         (WebCore::MediaStream::addTrack): Append the track parameter rather than duplicating it, as per spec.
272         (WebCore::MediaStream::removeTrack): *Components -> *Streams.
273         (WebCore::MediaStream::trackDidEnd): Renamed from trackEnded.
274         (WebCore::MediaStream::streamDidEnd): Renamed from streamEnded.
275         (WebCore::MediaStream::addRemoteSource): Renamed from addRemoteTrack. *Components -> *Streams.
276         (WebCore::MediaStream::removeRemoteSource): Renamed from removeRemoteTrack. *Components -> *Streams.
277         * Modules/mediastream/MediaStream.h:
278
279         * Modules/mediastream/MediaStreamTrack.cpp:
280         (WebCore::MediaStreamTrack::create): *Component -> *Stream.
281         (WebCore::MediaStreamTrack::MediaStreamTrack): Don't assume source is valid.
282         (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
283         (WebCore::MediaStreamTrack::kind): Ditto. AtomicString -> const AtomicString&.
284         (WebCore::MediaStreamTrack::setSource): Moved from .h file.
285         (WebCore::MediaStreamTrack::id): Don't assume source is valid. Create ID when the source doesn't have one.
286         (WebCore::MediaStreamTrack::label): Don't assume source is valid.
287         (WebCore::MediaStreamTrack::enabled): 
288         (WebCore::MediaStreamTrack::setEnabled): *Component -> *Stream. MediaStreamCenter::instance -> MediaStreamCenter::shared.
289         (WebCore::MediaStreamTrack::readyState): "muted" is not a readyState, but "new" is.
290         (WebCore::MediaStreamTrack::getSources): MediaStreamCenter::instance -> MediaStreamCenter::shared.
291         (WebCore::MediaStreamTrack::ended): *Component -> *Stream.
292         (WebCore::MediaStreamTrack::sourceChangedState): Dispatch "started" and "unmuted" events.
293         (WebCore::MediaStreamTrack::trackDidEnd): Renamed from didEndTrack. m_component -> m_source.
294         * Modules/mediastream/MediaStreamTrack.h:
295
296         * Modules/mediastream/RTCDTMFSender.cpp:
297         (WebCore::RTCDTMFSender::create): track->component() -> track->source();
298
299         * Modules/mediastream/RTCPeerConnection.cpp:
300         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Ditto.
301
302         * Modules/mediastream/RTCStatsRequestImpl.cpp:
303         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Ditto.
304         (WebCore::RTCStatsRequestImpl::component): Removed, it was unused.
305         * Modules/mediastream/RTCStatsRequestImpl.h:
306
307         * Modules/mediastream/UserMediaClient.h:
308         * Modules/mediastream/UserMediaController.h:
309         (WebCore::UserMediaController::requestPermission): Renamed from requestUserMedia, get rid of source
310             vector parameters.
311         (WebCore::UserMediaController::cancelRequest): Renamed from cancelUserMediaRequest.
312
313         * Modules/mediastream/UserMediaRequest.cpp:
314         (WebCore::parseOptions): MediaConstraintsImpl -> MediaConstraints.
315         (WebCore::UserMediaRequest::create): Ditto.
316         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
317         (WebCore::UserMediaRequest::securityOrigin): New.
318         (WebCore::UserMediaRequest::start): Request constraint validation.
319         (WebCore::UserMediaRequest::constraintsValidated): New. Callback from media engine when constraints
320             can be supported.
321         (WebCore::UserMediaRequest::requestPermission): New. Ask user media client for permission to access media.
322         (WebCore::UserMediaRequest::userMediaAccessGranted): New. Access has been granted.
323         (WebCore::UserMediaRequest::createMediaStream): New. Allowed to access media, ask media engine
324             to create stream sources.
325         (WebCore::UserMediaRequest::userMediaAccessDenied): New. User media client has denied access request.
326         (WebCore::UserMediaRequest::constraintsInvalid): New. Media engine can not support constraints.
327         (WebCore::UserMediaRequest::didCreateStream): New. Media engine has created stream sources.
328         (WebCore::UserMediaRequest::callSuccessHandler): New. Create stream from sources and call success handler.
329         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Renamed from constraintFailure.
330         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Renamed from permissionFailure.
331         (WebCore::UserMediaRequest::callErrorHandler): 
332         (WebCore::UserMediaRequest::contextDestroyed): cancelUserMediaRequest -> cancelRequest.
333         * Modules/mediastream/UserMediaRequest.h:
334
335         * Modules/webaudio/AudioContext.cpp:
336         (WebCore::AudioContext::createMediaStreamSource): localAudio->component()->source() -> localAudio->source().
337
338         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
339         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): MediaStreamSource::TypeAudio ->
340             MediaStreamSource::Audio, MediaStreamSource::ReadyStateLive -> MediaStreamSource::Live.
341             MediaStreamCenter::instance -> MediaStreamCenter::shared.
342
343         * WebCore.exp.in: Export new symbols.
344
345         * WebCore.xcodeproj/project.pbxproj: Add new files and remove deleted files.
346
347         * dom/EventNames.h: Define "started" event.
348
349         * platform/mediastream/MediaStreamCenter.cpp:
350         (WebCore::mediaStreamCenterOverride): Make it possible to override the shared stream center. Will
351             be used for testing in a later patch.
352         (WebCore::MediaStreamCenter::shared): Renamed from instance. Return current stream center.
353         (WebCore::MediaStreamCenter::setSharedStreamCenter): Override current stream center.
354         (WebCore::MediaStreamCenter::endLocalMediaStream): Never call the descriptor client, always call
355             the descriptor and let it deal with the client.
356         * platform/mediastream/MediaStreamCenter.h:
357
358         * platform/mediastream/MediaStreamComponent.cpp: Removed.
359         * platform/mediastream/MediaStreamComponent.h: Removed.
360
361         * platform/mediastream/MediaStreamConstraintsValidationClient.h: Added.
362         * platform/mediastream/MediaStreamCreationClient.h: Added.
363
364         * platform/mediastream/MediaStreamDescriptor.cpp:
365         (WebCore::MediaStreamDescriptor::addSource): *Component -> *Source.
366         (WebCore::MediaStreamDescriptor::removeSource): Ditto.
367         (WebCore::MediaStreamDescriptor::addRemoteSource): Ditto.
368         (WebCore::MediaStreamDescriptor::removeRemoteSource): Ditto.
369         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
370         (WebCore::MediaStreamDescriptor::setEnded): Ditto. Set source readyStates to Ended.
371         * platform/mediastream/MediaStreamDescriptor.h:
372
373         * platform/mediastream/MediaStreamSource.cpp:
374         (WebCore::MediaStreamSource::MediaStreamSource): Initialize new member variables.
375         (WebCore::MediaStreamSource::setReadyState): Early return when the state hasn't changed.
376         (WebCore::MediaStreamSource::setStream): New.
377         (WebCore::MediaStreamSource::setMuted): New.
378         * platform/mediastream/MediaStreamSource.h:
379
380         * platform/mediastream/MediaStreamSourcesQueryClient.h: Removed.
381
382         * platform/mediastream/RTCPeerConnectionHandler.h:
383         * platform/mediastream/RTCStatsRequest.h:
384
385         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Update for new MediaStreamCenter API.
386         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
387
388         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Ditto.
389         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
390
391         * platform/mediastream/mac/MediaStreamCenterMac.cpp: Ditto.
392         * platform/mediastream/mac/MediaStreamCenterMac.h:
393
394 2013-09-26  Gurpreet Kaur  <k.gurpreet@samsung.com>
395
396         Inset box-shadows fail to round around corners when border-radius is set in vh/vw units.
397         https://bugs.webkit.org/show_bug.cgi?id=119187
398
399         Reviewed by Darin Adler.
400
401         Border-radius properties were not applied incase its values
402         were given in vh, vw, vmax, vmin units.
403
404         Tests: fast/css/border-radius-inset-box-shadow-viewportlength.html
405                fast/css/border-radius-viewport-height.html
406                fast/css/border-radius-viewport-vmax.html
407                fast/css/border-radius-viewport-vmin.html
408
409         * css/DeprecatedStyleBuilder.cpp:
410         (WebCore::ApplyPropertyBorderRadius::applyValue):
411         (WebCore::ApplyPropertyComputeLength::applyValue):
412         * css/StyleResolver.h:
413         Calculating the border-radius values which has been specified
414         in viewport units.The vh/vw units are calcultated as percent of
415         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
416         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
417
418 2013-09-26  Seokju Kwon  <seokju@webkit.org>
419
420         Fix ordered comparison warnings in BitmapImage::drawPattern
421         https://bugs.webkit.org/show_bug.cgi?id=121945
422
423         Reviewed by Darin Adler.
424
425         No new tests, no behavior change.
426
427         * platform/graphics/BitmapImage.cpp:
428         (WebCore::BitmapImage::drawPattern):
429
430 2013-09-26  Andreas Kling  <akling@apple.com>
431
432         Remove empty JSFooCustom.cpp files.
433         <https://webkit.org/b/121955>
434
435         Reviewed by Anders Carlsson.
436
437         There's no sense in slowing down build times with empty files that
438         still include a bunch of headers.
439
440         * bindings/js/JSAudioBufferCustom.cpp: Removed.
441         * bindings/js/JSCSSFontFaceRuleCustom.cpp: Removed.
442         * bindings/js/JSCSSImportRuleCustom.cpp: Removed.
443         * bindings/js/JSCSSMediaRuleCustom.cpp: Removed.
444         * bindings/js/JSCSSPageRuleCustom.cpp: Removed.
445         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed.
446         * bindings/js/JSDOMImplementationCustom.cpp: Removed.
447         * bindings/js/JSDOMTokenListCustom.cpp: Removed.
448         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed.
449         * bindings/js/JSMediaListCustom.cpp: Removed.
450         * bindings/js/JSProcessingInstructionCustom.cpp: Removed.
451         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp: Removed.
452         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp: Removed.
453         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: Removed.
454
455 2013-09-26  Mihai Maerean  <mmaerean@adobe.com>
456
457         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
458         https://bugs.webkit.org/show_bug.cgi?id=120457
459
460         Reviewed by David Hyatt.
461
462         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
463
464         The composited layers inside the named flow threads are collected as part of the regions.
465         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
466         that region too (inside RenderFlowThread::updateAllLayerToRegionMappings).
467
468         Tests: fast/regions/layers/accelerated-compositing/crash-transform-inside-region.html
469                fast/regions/layers/accelerated-compositing/floated-region-with-transformed-child.html
470                fast/regions/layers/accelerated-compositing/move-layer-from-one-region-to-another.html
471                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding.html
472                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding-for-video.html
473                fast/regions/layers/accelerated-compositing/region-as-layer-in-another-flowthread.html
474                fast/regions/layers/accelerated-compositing/transform-transparent-positioned-video-inside-region.html
475                fast/regions/layers/accelerated-compositing/transformed-layer-inside-transformed-layer.html
476                fast/regions/layers/accelerated-compositing/z-index.html: Added.
477                fast/regions/layers/accelerated-compositing/z-index-update.html: Added.
478
479         * rendering/FlowThreadController.cpp:
480         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
481         * rendering/RenderFlowThread.cpp:
482         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
483         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
484         painted.
485         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
486         (WebCore::RenderFlowThread::getLayerListForRegion):
487         (WebCore::RenderFlowThread::regionForCompositedLayer):
488         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
489         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
490         from a region to another since the last update.
491         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
492         * rendering/RenderFlowThread.h:
493         * rendering/RenderGeometryMap.cpp:
494         (WebCore::RenderGeometryMap::pushRenderFlowThread):
495         * rendering/RenderGeometryMap.h:
496         * rendering/RenderLayer.cpp:
497         (WebCore::RenderLayer::calculateLayerBounds): The RenderNamedFlowThread is ignored when we calculate the bounds
498         of the RenderView.
499         * rendering/RenderLayer.h:
500         * rendering/RenderLayerBacking.cpp:
501         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's inside an out of flow Flow Thread.
502         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
503         (WebCore::enclosingFlowThreadAncestor):
504         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
505         its borders, paddings, outlines or box-shadows to layers inside it.
506         * rendering/RenderLayerBacking.h:
507         * rendering/RenderLayerCompositor.cpp:
508         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
509         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
510         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly. We
511         are going to collect composited layers as part of regions.
512         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
513         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
514         use composited RenderRegions to render the background of the RenderFlowThread.
515         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a region.
516         * rendering/RenderLayerCompositor.h:
517         * rendering/RenderMultiColumnSet.cpp:
518         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
519         * rendering/RenderMultiColumnSet.h:
520         * rendering/RenderElement.cpp:
521         (WebCore::RenderObject::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
522         through the RenderView::styleDidChange function.
523         * rendering/RenderRegion.cpp:
524         (WebCore::RenderRegion::setRequiresLayerForCompositing):
525         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
526         * rendering/RenderRegion.h:
527         (WebCore::toRenderRegion):
528         * rendering/RenderRegionSet.h:
529         (WebCore::RenderRegionSet::requiresLayer): Never.
530         * rendering/RenderTreeAsText.cpp:
531         (WebCore::writeLayers):
532
533 2013-09-26  Mihnea Ovidenie  <mihnea@adobe.com>
534
535         [CSSRegions] Unable to collect html element in a named flow
536         https://bugs.webkit.org/show_bug.cgi?id=121878
537
538         Reviewed by Antti Koivisto.
539
540         Tests: fast/regions/collect-html-in-named-flow.html
541                fast/regions/iframe-html-collected.html
542
543         It should be possible to collect the html element in a named flow.
544         However, before we check whether adding a child is not restricted
545         by its original parent, we have to make sure that the original parent
546         is an element to safely perform the check.
547
548         * rendering/RenderNamedFlowThread.cpp:
549         (WebCore::RenderNamedFlowThread::isChildAllowed):
550
551 2013-09-25  Brady Eidson  <beidson@apple.com>
552
553         Unreviewed, blind attempt at a build fix.
554
555         * inspector/InspectorIndexedDBAgent.cpp: Don’t include the keyPathFromIDBKeyPath method for
556           PLATFORM(MAC) as it is unused.
557
558 2013-09-25  Brady Eidson  <beidson@apple.com>
559
560         Enable the IndexedDB build on Mac, but leave the feature non-functional
561         https://bugs.webkit.org/show_bug.cgi?id=121918
562
563         Reviewed by Alexey Proskuryakov.
564
565         * Configurations/FeatureDefines.xcconfig:
566
567         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
568           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
569
570         * inspector/InspectorIndexedDBAgent.cpp: Empty out DatabaseLoader::execute on Mac until the inspector
571           build gurus can figure out a 32bit-vs-64bit issue that there is no obvious solution for.
572
573         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
574           further use for it.
575
576 2013-09-25  Ryuan Choi  <ryuan.choi@samsung.com>
577
578         Unreviewed build fix for EFL port.
579
580         IDBCursorBackendImpl and IDBDatabaseBackendImpl are renamed after r156406.
581
582         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
583         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
584         (WebCore::IDBTransactionBackendLevelDB::create):
585         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
586         (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
587         (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
588         (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
589         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
590         (WebCore::IDBTransactionBackendLevelDB::database):
591
592 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
593
594         Do not reenter Document from its destructor
595         https://bugs.webkit.org/show_bug.cgi?id=121933
596
597         Reviewed by Darin Adler.
598
599         Following r156422, there are cases where we would reenter Document
600         during its destruction.
601
602         The flow was the following:
603         -Document's destructor is executed.
604         -DocumentStyleSheetCollection being part of Document, its destructor
605          is executed.
606         -DocumentStyleSheetCollection's destructor detach the owner node of all
607          its stylesheets avoid keeping stale references to a dead Document.
608         -CSSStyleSheet::clearOwnerNode() would fetch the dying document
609          and invoke Document::styleResolverChanged().
610         This would not fail because the document is detached and Document::styleResolverChanged()
611         would fail early. This is complicated and error prone so this patch attempt to clear
612         the process a bit.
613
614         With the patch, Document detach all the stylesheets early in the destruction.
615         Clearing the stylesheet is also changed to avoid re-entering the document.
616
617         * css/CSSStyleSheet.h:
618         * dom/Document.cpp:
619         (WebCore::Document::~Document):
620         * dom/DocumentStyleSheetCollection.cpp:
621         (WebCore::DocumentStyleSheetCollection::detachFromDocument):
622         * dom/DocumentStyleSheetCollection.h:
623
624 2013-09-25  Santosh Mahto  <santosh.ma@samsung.com>
625
626         htmlediting.cpp: unnecessary local variable cleanup
627         https://bugs.webkit.org/show_bug.cgi?id=121903
628
629         Reviewed by Darin Adler.
630
631         Code cleanup.
632
633         * editing/htmlediting.cpp:
634         (WebCore::lowestEditableAncestor):
635
636 2013-09-25  Commit Queue  <commit-queue@webkit.org>
637
638         Unreviewed, rolling out r156432.
639         http://trac.webkit.org/changeset/156432
640         https://bugs.webkit.org/show_bug.cgi?id=121932
641
642         some integer conversion things that need brady to fix
643         (Requested by thorton on #webkit).
644
645         * Configurations/FeatureDefines.xcconfig:
646         * Modules/indexeddb/IDBFactory.h:
647         (WebCore::IDBFactory::create):
648         * WebCore.xcodeproj/project.pbxproj:
649
650 2013-09-25  Alex Christensen  <alex.christensen@flexsim.com>
651
652         Win64 compile fix after r155226.
653         https://bugs.webkit.org/show_bug.cgi?id=120969
654
655         Reviewed by Brent Fulgham.
656
657         * WebCore.vcxproj/WebCore.vcxproj:
658         Disable building StructuredExceptionHandlerSuppressor.cpp and makesafeseh.asm on Win64.
659
660 2013-09-25  Alexey Proskuryakov  <ap@apple.com>
661
662         Flaky Test: platform/mac/fonts/han-disunification.html
663         https://bugs.webkit.org/show_bug.cgi?id=114207
664
665         Reviewed by Anders Carlsson.
666
667         This test was affected by preceding tests changing font settings.
668
669         Save original font if it's changed, and restore it in Backup::restoreTo().
670
671         * WebCore.exp.in:
672         * testing/InternalSettings.cpp:
673         (WebCore::InternalSettings::Backup::restoreTo):
674         (WebCore::InternalSettings::setStandardFontFamily):
675         (WebCore::InternalSettings::setSerifFontFamily):
676         (WebCore::InternalSettings::setSansSerifFontFamily):
677         (WebCore::InternalSettings::setFixedFontFamily):
678         (WebCore::InternalSettings::setCursiveFontFamily):
679         (WebCore::InternalSettings::setFantasyFontFamily):
680         (WebCore::InternalSettings::setPictographFontFamily):
681         * testing/InternalSettings.h:
682
683 2013-09-25  Brady Eidson  <beidson@apple.com>
684
685         Enable the IndexedDB build on Mac, but leave the feature non-functional
686         https://bugs.webkit.org/show_bug.cgi?id=121918
687
688         Reviewed by Alexey Proskuryakov.
689
690         * Configurations/FeatureDefines.xcconfig: Enable the feature.
691
692         * Modules/indexeddb/IDBFactory.h:
693         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
694           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
695
696         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
697           further use for it.
698
699 2013-09-25  Andreas Kling  <akling@apple.com>
700
701         Make EventTarget::hasEventListeners() a const method.
702
703         This class needs a lot of love in the const correctness department
704         but for now let's limit ourselves to fixing the IndexedDB build.
705
706         * dom/EventTarget.h:
707         (WebCore::EventTarget::hasEventListeners):
708
709 2013-09-25  Brent Fulgham  <bfulgham@apple.com>
710
711         [Windows] Refactor RuntimeEnabledFeatures as a Singleton
712         https://bugs.webkit.org/show_bug.cgi?id=121883
713
714         Windows is experiencing crashes when client programs (such as
715         DumpRenderTree) attemp to change settings on the RuntimeEnabledFeatures
716         object. The inlined static accessor methods are not accessing
717         memory safely (when compiled by Visual Studio) resulting in
718         crashes.
719
720         Reviewed by Jer Noble.
721
722         * WebCore.exp.in: Remove static accessors for RuntimeEnabledFeatures.
723         * bindings/generic/RuntimeEnabledFeatures.cpp: Switch methods to
724         conform to a singleton pattern.
725         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
726         (WebCore::RuntimeEnabledFeatures::sharedRuntimeEnabledFeatures):
727         (WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
728         (WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled):
729         (WebCore::RuntimeEnabledFeatures::audioEnabled):
730         (WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
731         (WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
732         (WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
733         (WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
734         (WebCore::RuntimeEnabledFeatures::mediaControllerEnabled):
735         (WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
736         (WebCore::RuntimeEnabledFeatures::timeRangesEnabled):
737         (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
738         (WebCore::RuntimeEnabledFeatures::webSocketEnabled):
739         (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
740         (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
741         * bindings/generic/RuntimeEnabledFeatures.h: Ditto.
742         (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
743         (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
744         (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
745         (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
746         (WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
747         (WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
748         (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
749         (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
750         (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
751         (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
752         (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
753         (WebCore::RuntimeEnabledFeatures::geolocationEnabled):
754         (WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled):
755         (WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled):
756         (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
757         (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
758         (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
759         (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
760         (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
761         (WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
762         (WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
763         (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
764         (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
765         (WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled):
766         (WebCore::RuntimeEnabledFeatures::cssCompositingEnabled):
767         (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
768         (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
769         (WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled):
770         (WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled):
771         (WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled):
772         (WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled):
773         (WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled):
774         (WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled):
775         (WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled):
776         (WebCore::RuntimeEnabledFeatures::webkitFullscreenEnabledEnabled):
777         (WebCore::RuntimeEnabledFeatures::webkitFullscreenElementEnabled):
778         (WebCore::RuntimeEnabledFeatures::webkitExitFullscreenEnabled):
779         (WebCore::RuntimeEnabledFeatures::webkitRequestFullscreenEnabled):
780         (WebCore::RuntimeEnabledFeatures::touchEnabled):
781         (WebCore::RuntimeEnabledFeatures::setTouchEnabled):
782         (WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled):
783         (WebCore::RuntimeEnabledFeatures::deviceMotionEnabled):
784         (WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled):
785         (WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled):
786         (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
787         (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
788         (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
789         (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
790         (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
791         (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
792         (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled):
793         (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled):
794         (WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled):
795         (WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled):
796         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled):
797         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled):
798         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
799         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled):
800         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled):
801         (WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
802         (WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled):
803         (WebCore::RuntimeEnabledFeatures::mediaStreamEnabled):
804         (WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
805         (WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
806         (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
807         (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
808         (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
809         (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
810         (WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
811         (WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
812         (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
813         (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
814         (WebCore::RuntimeEnabledFeatures::quotaEnabled):
815         (WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
816         (WebCore::RuntimeEnabledFeatures::mediaSourceEnabled):
817         (WebCore::RuntimeEnabledFeatures::setMediaSourceEnabled):
818         (WebCore::RuntimeEnabledFeatures::encryptedMediaEnabled):
819         (WebCore::RuntimeEnabledFeatures::setEncryptedMediaEnabled):
820         (WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled):
821         (WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled):
822         (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
823         (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
824         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
825         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
826         (WebCore::RuntimeEnabledFeatures::customDOMElementsEnabled):
827         (WebCore::RuntimeEnabledFeatures::setCustomDOMElements):
828         (WebCore::RuntimeEnabledFeatures::styleScopedEnabled):
829         (WebCore::RuntimeEnabledFeatures::setStyleScopedEnabled):
830         (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled):
831         (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled):
832         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled):
833         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled):
834         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled):
835         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled):
836         (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled):
837         (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled):
838         (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled):
839         (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled):
840         (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled):
841         (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled):
842         (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
843         (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
844         (WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
845         (WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
846         (WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
847         (WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
848         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
849         (WebCore::getCSSPropertyNamePrefix): Use singleton accessors.
850         (WebCore::cssPropertyIDForJSCSSPropertyName): Ditto.
851         * bindings/scripts/CodeGeneratorJS.pm:
852         (GetRuntimeEnableFunctionName): Generate singleton version of
853         accessors.
854         * css/CSSFontFace.cpp:
855         (WebCore::CSSFontFace::fontLoaded): Use singleton accessors.
856         (WebCore::CSSFontFace::getFontData): Ditto.
857         * css/CSSFontSelector.cpp:
858         (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
859         * css/CSSParser.cpp:
860         (WebCore::isSimpleLengthPropertyID): Ditto.
861         (WebCore::isValidKeywordPropertyAndValue):
862         (WebCore::CSSParser::parseValue):
863         (WebCore::CSSParser::rewriteSpecifiers):
864         * css/CSSSegmentedFontFace.cpp:
865         (WebCore::CSSSegmentedFontFace::fontLoaded): Ditto.
866         * css/StyleResolver.h:
867         (WebCore::StyleResolver::ensureScopeResolver): Ditto.
868         * dom/Document.cpp:
869         (WebCore::Document::cssRegionsEnabled): Ditto.
870         (WebCore::Document::cssCompositingEnabled):
871         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
872         (WebCore::Document::getCachedLocale):
873         * dom/Element.cpp:
874         (WebCore::Element::createShadowRoot): Ditto.
875         * dom/Position.cpp:
876         (WebCore::Position::Position): Ditto.
877         (WebCore::Position::findParent):
878         * dom/TreeScope.cpp:
879         (WebCore::TreeScope::getSelection): Ditto.
880         * dom/make_names.pl:
881         (printConstructorInterior): Generate singleton version of accessors.
882         (printWrapperFunctions): Ditto.
883         * html/HTMLInputElement.cpp:
884         (WebCore::HTMLInputElement::isSpeechEnabled): Use singleton accessors.
885         (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
886         * html/HTMLMediaElement.cpp:
887         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
888         (WebCore::HTMLMediaElement::scheduleDelayedAction):
889         (WebCore::HTMLMediaElement::loadTimerFired):
890         (WebCore::HTMLMediaElement::prepareForLoad):
891         (WebCore::HTMLMediaElement::loadInternal):
892         (WebCore::HTMLMediaElement::setReadyState):
893         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
894         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
895         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
896         (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
897         (WebCore::HTMLMediaElement::addAudioTrack):
898         (WebCore::HTMLMediaElement::addTextTrack):
899         (WebCore::HTMLMediaElement::addVideoTrack):
900         (WebCore::HTMLMediaElement::removeAudioTrack):
901         (WebCore::HTMLMediaElement::removeTextTrack):
902         (WebCore::HTMLMediaElement::removeVideoTrack):
903         (WebCore::HTMLMediaElement::audioTracks):
904         (WebCore::HTMLMediaElement::textTracks):
905         (WebCore::HTMLMediaElement::videoTracks):
906         (WebCore::HTMLMediaElement::didAddTextTrack):
907         (WebCore::HTMLMediaElement::didRemoveTextTrack):
908         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
909         (WebCore::HTMLMediaElement::userCancelledLoad):
910         (WebCore::HTMLMediaElement::hasClosedCaptions):
911         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
912         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
913         * html/HTMLStyleElement.cpp:
914         (WebCore::HTMLStyleElement::parseAttribute): Ditto.
915         (WebCore::HTMLStyleElement::scopedAttributeChanged):
916         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
917         (WebCore::HTMLStyleElement::scoped):
918         * html/HTMLTrackElement.cpp:
919         (WebCore::HTMLTrackElement::parseAttribute): Ditto.
920         (WebCore::HTMLTrackElement::scheduleLoad):
921         (WebCore::HTMLTrackElement::canLoadUrl):
922         * html/InputType.cpp:
923         (WebCore::createInputTypeFactoryMap): Ditto.
924         * page/ContentSecurityPolicy.cpp:
925         (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Ditto.
926         * page/DOMWindow.cpp:
927         (WebCore::DOMWindow::addEventListener): Ditto.
928         * page/FrameView.cpp:
929         (WebCore::FrameView::performPostLayoutTasks): Ditto.
930         * testing/InternalSettings.cpp:
931         (WebCore::InternalSettings::Backup::Backup): Ditto.
932         (WebCore::InternalSettings::Backup::restoreTo):
933         (WebCore::InternalSettings::setShadowDOMEnabled):
934         (WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled):
935         (WebCore::InternalSettings::setStyleScopedEnabled):
936         (WebCore::InternalSettings::setCSSExclusionsEnabled):
937         (WebCore::InternalSettings::setCSSShapesEnabled):
938         (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
939
940 2013-09-25  Andreas Kling  <akling@apple.com>
941
942         Unreviewed build fix for IDBDatabase.
943
944         Turns out there was a much cleaner way to express this.
945
946 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
947
948         Tie the life of DocumentStyleSheetCollection and Document together
949         https://bugs.webkit.org/show_bug.cgi?id=121892
950
951         Reviewed by Andreas Kling.
952
953         DocumentStyleSheetCollection had an odd destruction pattern for no apparent reason.
954
955         The two objects strictly depend on eachother, this patch make that explicit by making
956         DocumentStyleSheetCollection a plain object in Document's memory space.
957
958         * css/CSSStyleSheet.cpp:
959         (WebCore::CSSStyleSheet::didMutateRules):
960         * css/DocumentRuleSets.cpp:
961         (WebCore::DocumentRuleSets::initUserStyle):
962         * css/DocumentRuleSets.h:
963         * css/InspectorCSSOMWrappers.cpp:
964         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
965         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
966         * css/InspectorCSSOMWrappers.h:
967         * css/SelectorChecker.cpp:
968         (WebCore::SelectorChecker::matchRecursively):
969         (WebCore::SelectorChecker::checkOne):
970         * css/StyleResolver.cpp:
971         (WebCore::StyleResolver::StyleResolver):
972         * css/StyleSheetList.cpp:
973         (WebCore::StyleSheetList::styleSheets):
974         (WebCore::StyleSheetList::detachFromDocument):
975         * dom/Document.cpp:
976         (WebCore::Document::Document):
977         (WebCore::Document::~Document):
978         (WebCore::Document::setCompatibilityMode):
979         (WebCore::Document::recalcStyle):
980         (WebCore::Document::createStyleResolver):
981         (WebCore::Document::processHttpEquiv):
982         (WebCore::Document::preferredStylesheetSet):
983         (WebCore::Document::selectedStylesheetSet):
984         (WebCore::Document::setSelectedStylesheetSet):
985         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
986         (WebCore::Document::styleResolverChanged):
987         (WebCore::Document::haveStylesheetsLoaded):
988         * dom/Document.h:
989         (WebCore::Document::styleSheetCollection):
990         * dom/DocumentStyleSheetCollection.cpp:
991         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
992         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
993         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
994         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
995         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
996         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
997         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
998         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
999         (WebCore::DocumentStyleSheetCollection::addAuthorSheet):
1000         (WebCore::DocumentStyleSheetCollection::addUserSheet):
1001         (WebCore::DocumentStyleSheetCollection::removePendingSheet):
1002         (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
1003         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1004         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
1005         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
1006         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1007         * dom/DocumentStyleSheetCollection.h:
1008         * dom/Element.cpp:
1009         (WebCore::Element::createPseudoElementIfNeeded):
1010         * dom/InlineStyleSheetOwner.cpp:
1011         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
1012         (WebCore::InlineStyleSheetOwner::removedFromDocument):
1013         (WebCore::InlineStyleSheetOwner::clearDocumentData):
1014         (WebCore::InlineStyleSheetOwner::createSheet):
1015         (WebCore::InlineStyleSheetOwner::sheetLoaded):
1016         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
1017         * dom/ProcessingInstruction.cpp:
1018         (WebCore::ProcessingInstruction::~ProcessingInstruction):
1019         (WebCore::ProcessingInstruction::checkStyleSheet):
1020         (WebCore::ProcessingInstruction::sheetLoaded):
1021         (WebCore::ProcessingInstruction::insertedInto):
1022         (WebCore::ProcessingInstruction::removedFrom):
1023         * html/HTMLLinkElement.cpp:
1024         (WebCore::HTMLLinkElement::~HTMLLinkElement):
1025         (WebCore::HTMLLinkElement::insertedInto):
1026         (WebCore::HTMLLinkElement::removedFrom):
1027         (WebCore::HTMLLinkElement::addPendingSheet):
1028         (WebCore::HTMLLinkElement::removePendingSheet):
1029         * html/HTMLQuoteElement.cpp:
1030         (WebCore::HTMLQuoteElement::insertedInto):
1031         * html/HTMLViewSourceDocument.cpp:
1032         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1033         * inspector/InspectorCSSAgent.cpp:
1034         (WebCore::InspectorCSSAgent::willMatchRule):
1035         * inspector/InspectorCSSAgent.h:
1036         * inspector/InspectorInstrumentation.cpp:
1037         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
1038         * inspector/InspectorInstrumentation.h:
1039         (WebCore::InspectorInstrumentation::willMatchRule):
1040         * mathml/MathMLMathElement.cpp:
1041         (WebCore::MathMLMathElement::insertedInto):
1042         * page/Page.cpp:
1043         (WebCore::Page::userStyleSheetLocationChanged):
1044         * page/PageGroup.cpp:
1045         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
1046         * rendering/RenderBlock.cpp:
1047         (WebCore::RenderBlock::lineHeight):
1048         (WebCore::RenderBlock::updateFirstLetter):
1049         * rendering/RenderInline.cpp:
1050         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1051         (WebCore::RenderInline::lineHeight):
1052         * rendering/RenderLineBreak.cpp:
1053         (WebCore::RenderLineBreak::lineHeight):
1054         * rendering/RenderObject.cpp:
1055         (WebCore::RenderObject::uncachedFirstLineStyle):
1056         (WebCore::RenderObject::cachedFirstLineStyle):
1057         * rendering/RenderObject.h:
1058         (WebCore::RenderObject::firstLineStyle):
1059         * rendering/RootInlineBox.cpp:
1060         (WebCore::RootInlineBox::verticalPositionForBox):
1061         * style/StyleResolveTree.cpp:
1062         (WebCore::Style::resolveLocal):
1063         * testing/Internals.cpp:
1064         (WebCore::Internals::insertAuthorCSS):
1065         (WebCore::Internals::insertUserCSS):
1066
1067 2013-09-25  Brady Eidson  <beidson@apple.com>
1068
1069         FeatureDefine.xcconfig cleanup (They should all be identical).
1070         https://bugs.webkit.org/show_bug.cgi?id=121921
1071
1072         Reviewed by Mark Rowe.
1073
1074         * Configurations/FeatureDefines.xcconfig:
1075
1076 2013-09-25  Andreas Kling  <akling@apple.com>
1077
1078         JS wrappers should have strongly typed impl() functions.
1079         <https://webkit.org/b/121919>
1080
1081         Reviewed by Geoffrey Garen.
1082
1083         Generate strongly typed JSFoo::impl() functions for all wrappers,
1084         not just those marked with JSGenerateToNativeObject.
1085
1086         Removed 8.8 million static_casts that are no longer needed.
1087
1088 2013-09-24  Roger Fong  <roger_fong@apple.com>
1089
1090         [Windows] Overpanning occurs even when what is being panned isn't the main document.
1091         https://bugs.webkit.org/show_bug.cgi?id=121885.
1092         <rdar://problem/15072332>.
1093
1094         Reviewed by Brent Fulgham.
1095
1096         No new functionality added.
1097
1098         * rendering/RenderLayer.cpp:
1099         (WebCore::RenderLayer::scrollByRecursively):
1100         * rendering/RenderLayer.h:
1101
1102 2013-09-25  Andreas Kling  <akling@apple.com>
1103
1104         Reduce repetitive EventTarget subclassing.
1105         <https://webkit.org/b/121915>
1106
1107         Reviewed by Antti Koivisto.
1108
1109         Add a EventTargetWithInlineData helper class to EventTarget.h.
1110         It's a simple subclass with an EventTargetData member and FINAL
1111         eventTargetData()/ensureEventTargetData() overrides.
1112
1113         Turns out that this fits almost every use case except Node and
1114         SVGElementInstance.
1115
1116         Inlined most of the FINAL EventTarget overrides since they will
1117         be called on tight pointers by generated bindings code and this
1118         removes the need for virtual dispatch.
1119
1120         Spammed OVERRIDE FINAL as appropriate, we can't make the whole
1121         classes FINAL until bug 121747 is fixed, so added FIXMEs.
1122
1123 2013-09-25  Sam White  <samuel_white@apple.com>
1124
1125         AX: WebKit doesn't map aria-sort=other on OS X
1126         https://bugs.webkit.org/show_bug.cgi?id=118511
1127
1128         Reviewed by Chris Fleizach.
1129
1130         No new tests, updated existing aria-sort test to validate addition of "other"
1131         sort order per http://www.w3.org/TR/wai-aria/complete#aria-sort.
1132
1133         * accessibility/AccessibilityObject.cpp:
1134         (WebCore::AccessibilityObject::sortDirection):
1135         * accessibility/AccessibilityObject.h:
1136
1137 2013-09-24  Sam Weinig  <sam@webkit.org>
1138
1139         CTTE: More Document references please
1140         https://bugs.webkit.org/show_bug.cgi?id=121893
1141
1142         Reviewed by Anders Carlsson.
1143
1144         * Thread even more Document&s around. *
1145
1146 2013-09-25  Anders Carlsson  <andersca@apple.com>
1147
1148         HasMemoryCostMemberFunction should work for final classes
1149         https://bugs.webkit.org/show_bug.cgi?id=121747
1150
1151         Reviewed by Sam Weinig.
1152
1153         Use decltype to check for the memoryCost() member function. This doesn't check that the return type is size_t, but
1154         the build will fail anyway if that's the case (or if the return type is not convertible to size_t).
1155
1156         * bindings/js/JSDOMBinding.h:
1157
1158 2013-09-25  Brady Eidson  <beidson@apple.com>
1159
1160         More refactoring to make the LevelDB dependencies of IDB more obvious.
1161         https://bugs.webkit.org/show_bug.cgi?id=121880
1162
1163         Reviewed by Alexey Proskuryakov.
1164
1165         This patch does three things:
1166         1 - Moves some files to the indexeddb/leveldb subdirectory, renaming them in the process.
1167         2 - Renames some classes.
1168         3 - Adds "USE(LEVELDB)" guards in addition to the ENABLE(INDEXED_DATABASE) guard for those files.
1169
1170         Project file updates:
1171         * GNUmakefile.am:
1172         * GNUmakefile.list.am:
1173         * Target.pri:
1174         * WebCore.xcodeproj/project.pbxproj:
1175         * WebCore.vcxproj/WebCore.vcxproj:
1176
1177         File renames, class renames, and USE(LEVELDB) guards:
1178         * Modules/indexeddb/IDBBackingStore.cpp: Removed.
1179         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
1180         (WebCore::IDBFactoryBackendInterface::create): Add a null return if USE(LEVELDB) is disabled as a stop gap measure until
1181           there is a non-LevelDB impl.
1182         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1183         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.h.
1184         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
1185         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
1186         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
1187         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
1188         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp.
1189         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h.
1190         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1191         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
1192         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp.
1193         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h.
1194         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
1195         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
1196         * Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
1197         * Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
1198
1199
1200 2013-09-25  Antti Koivisto  <antti@apple.com>
1201
1202         REGRESSION (r156355) Links / interactive elements inside nested tables are unclickable
1203         https://bugs.webkit.org/show_bug.cgi?id=121904
1204
1205         Reviewed by Andreas Kling.
1206
1207         Test: fast/table/hittest-self-painting.html
1208         
1209         Original reduction by Philippe Wittenbergh.
1210
1211         * rendering/RenderTableRow.cpp:
1212         (WebCore::RenderTableRow::styleDidChange):
1213         
1214             Tighten a bit.
1215
1216         (WebCore::RenderTableRow::nodeAtPoint):
1217         * rendering/RenderTableSection.cpp:
1218         (WebCore::RenderTableSection::nodeAtPoint):
1219         
1220             These flipped accidentally in r156355.
1221
1222 2013-09-25  Alberto Garcia  <berto@igalia.com>
1223
1224         Fix warning in makeprop.pl
1225         https://bugs.webkit.org/show_bug.cgi?id=121900
1226
1227         Reviewed by Ryosuke Niwa.
1228
1229         %nameIsInherited and %nameToId were incorrectly initialized using
1230         references instead of lists.
1231
1232         Anyway there's no need to initialize those variables explicitly,
1233         they're already empty by default.
1234
1235         * css/makeprop.pl:
1236
1237 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1238
1239         REGRESSION(r156393): Build with !ENABLE(SVG_FONTS) broken
1240
1241         Unreviewed build-fix.
1242
1243         Protect SVG font code with #ifdef ENABLE(SVG_FONTS).
1244
1245         * platform/graphics/WidthIterator.cpp:
1246         (WebCore::applyFontTransforms):
1247
1248 2013-09-25  Commit Queue  <commit-queue@webkit.org>
1249
1250         Unreviewed, rolling out r156272.
1251         http://trac.webkit.org/changeset/156272
1252         https://bugs.webkit.org/show_bug.cgi?id=121909
1253
1254         Has no real effect (Requested by carewolf on #webkit).
1255
1256         * platform/graphics/qt/TileQt.cpp:
1257         (WebCore::TileQt::updateBackBuffer):
1258
1259 2013-09-25  Andreas Kling  <akling@apple.com>
1260
1261         Move wheel event dispatch from Node to Element.
1262         <https://webkit.org/b/121908>
1263
1264         Reviewed by Anders Carlsson.
1265
1266         Wheel events are only ever dispatched on Elements, so move the logic out of Node.
1267
1268         Had to make RenderBox::scroll() and friends return a stopElement instead of a
1269         stopNode (out argument) to make this work, though it was only ever returning
1270         Elements there anyway.
1271
1272 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1273
1274         [Qt] Fix build with !ENABLE(BLOB) after r156330
1275
1276         Unreviewed build-fix.
1277
1278         * platform/network/qt/ResourceRequestQt.cpp:
1279         (WebCore::ResourceRequest::toNetworkRequest):
1280
1281 2013-09-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1282
1283         Support kerning with SVG web fonts
1284         https://bugs.webkit.org/show_bug.cgi?id=117540
1285
1286         Reviewed by Stephen Chenney.
1287
1288         Adds the glue to WidthIterator to take advantage of kerning in SVG web fonts.
1289         To supply SVG font kerning with its required text input, the signature of
1290         applyFontTransforms has been extended.
1291
1292         Since SVG font kerning was extremely slow, it has been sped up by replacing
1293         the iteration over all possible kerning definitions with a hash-map based
1294         lookup of the leading symbol to be kerned. The new algorithm provides a
1295         roughly 100x speed-up in SVG font kerning.
1296
1297         Test: fast/text/svg-font-face-with-kerning.html
1298
1299         * platform/graphics/TextRun.h:
1300         (WebCore::TextRun::string):
1301         * platform/graphics/WidthIterator.cpp:
1302         (WebCore::applyFontTransforms):
1303         (WebCore::WidthIterator::advanceInternal):
1304         * rendering/svg/SVGTextRunRenderingContext.cpp:
1305         (WebCore::SVGTextRunRenderingContext::applySVGKerning):
1306         * rendering/svg/SVGTextRunRenderingContext.h:
1307         * svg/SVGFontElement.cpp:
1308         (WebCore::SVGFontElement::invalidateGlyphCache):
1309         (WebCore::SVGFontElement::ensureGlyphCache):
1310         (WebCore::SVGKerningMap::clear):
1311         (WebCore::SVGKerningMap::insert):
1312         (WebCore::stringMatchesUnicodeRange):
1313         (WebCore::stringMatchesGlyphName):
1314         (WebCore::stringMatchesUnicodeName):
1315         (WebCore::matches):
1316         (WebCore::kerningForPairOfStringsAndGlyphs):
1317         (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs):
1318         (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs):
1319         * svg/SVGFontElement.h:
1320         (WebCore::SVGKerning::SVGKerning):
1321         (WebCore::SVGKerningMap::isEmpty):
1322         * svg/SVGHKernElement.cpp:
1323         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
1324         * svg/SVGHKernElement.h:
1325         * svg/SVGVKernElement.cpp:
1326         (WebCore::SVGVKernElement::buildVerticalKerningPair):
1327         * svg/SVGVKernElement.h:
1328
1329 2013-09-25  Andrei Parvu  <parvu@adobe.com>
1330
1331         <https://webkit.org/b/120476> [CSS Masking] Implement luminance masking
1332
1333         Added implementation for luminance masking. A luminance mask is applied by transforming its RGB values into
1334         an alpha value, using luminance-to-alpha coefficients. Because this conversion is already implemented in
1335         the ImageBuffer class, we used it in our implementation.
1336
1337         Reviewed by Dirk Schulze.
1338
1339         Tests: css3/masking/mask-luminance-gradient.html
1340                css3/masking/mask-luminance-png.html
1341                css3/masking/mask-luminance-svg.html
1342
1343         * platform/graphics/BitmapImage.cpp: Add a drawPattern method, in which an ImageBuffer is created and converted from alpha to luminance, if there is a luminance mask.
1344         (WebCore::BitmapImage::BitmapImage):
1345         (WebCore::BitmapImage::drawPattern):
1346         * platform/graphics/BitmapImage.h:
1347         * platform/graphics/GeneratorGeneratedImage.cpp: Convert the ImageBuffer to luminance, if necessary.
1348         (WebCore::GeneratorGeneratedImage::drawPattern):
1349         * platform/graphics/GraphicsContext.cpp: Add methods which set and check if a luminance mask is drawn.
1350         (WebCore::GraphicsContext::setDrawLuminanceMask):
1351         (WebCore::GraphicsContext::drawLuminanceMask):
1352         * platform/graphics/GraphicsContext.h: Add property to ContextState for luminance drawing.
1353         (WebCore::GraphicsContextState::GraphicsContextState):
1354         * rendering/RenderBoxModelObject.cpp: Set the luminance property of the mask, if the layer has a mask source type of luminance.
1355         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1356         * svg/graphics/SVGImage.cpp: Convert the ImageBuffer to luminance, if necessary.
1357         (WebCore::SVGImage::drawPatternForContainer):
1358         * svg/graphics/SVGImageForContainer.cpp: Pass the luminance property to the SVG image.
1359         (WebCore::SVGImageForContainer::drawPattern):
1360
1361 2013-09-25  Andreas Kling  <akling@apple.com>
1362
1363         Remove EventPathWalker.
1364         <https://webkit.org/b/121890>
1365
1366         Reviewed by Antti Koivisto.
1367
1368         Purge some more leftover Shadow DOM code.
1369
1370         * dom/EventPathWalker.cpp:
1371         * dom/EventPathWalker.h:
1372
1373             Removed.
1374
1375         * dom/EventRetargeter.cpp:
1376         (WebCore::nodeOrHostIfPseudoElement):
1377         (WebCore::EventRetargeter::calculateEventPath):
1378         (WebCore::EventRetargeter::buildRelatedNodeMap):
1379
1380             If starting at a pseudo element, e.g for events originating from
1381             a transition on :before/:after, retarget to the pseudo element's
1382             host as appropriate. This was the only real "feature" we were
1383             using in EventPathWalker.
1384
1385         * page/EventHandler.cpp:
1386         (WebCore::EventHandler::handleMouseDraggedEvent):
1387         (WebCore::EventHandler::updateDragAndDrop):
1388         (WebCore::EventHandler::updateMouseEventTargetNode):
1389         (WebCore::EventHandler::handleWheelEvent):
1390         (WebCore::EventHandler::handleTouchEvent):
1391
1392             Replace use of EventPathWalker with parentOrShadowHostElement()
1393             parent chain climbing.
1394
1395 2013-09-25  Gurpreet Kaur  <k.gurpreet@samsung.com>
1396
1397         :read-write pseudo-class should not be applied on <input type="text" disabled>
1398         https://bugs.webkit.org/show_bug.cgi?id=118236
1399
1400         Reviewed by Darin Adler.
1401
1402         The :read-write pseudo-class must match any element falling into one
1403         of the following categories i.e
1404         input elements to which the readonly attribute applies, and that are mutable
1405         (i.e. that do not have the readonly attribute specified and that are not disabled)
1406         textarea elements that do not have a readonly attribute, and that are not disabled
1407         elements that are editing hosts or editable and are neither input elements nor
1408         textarea elements.
1409
1410         Test: fast/css/readwrite-pseudoclass-input.html
1411
1412         * html/HTMLInputElement.cpp:
1413         (WebCore::HTMLInputElement::matchesReadWritePseudoClass):
1414         * html/HTMLTextAreaElement.cpp:
1415         (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
1416         Checking for both readonly and disabled attribute on input ane textarea element.
1417
1418 2013-09-25  Krzysztof Czech  <k.czech@samsung.com>
1419
1420         [EFL] accessibility/loading-iframe-sends-notification.html is failing
1421         https://bugs.webkit.org/show_bug.cgi?id=112003
1422
1423         Reviewed by Mario Sanchez Prada.
1424
1425         Enabled AXLayoutComplete on EFL platform.
1426
1427         * dom/Document.cpp:
1428         (WebCore::Document::implicitClose):
1429         * page/FrameView.cpp:
1430         (WebCore::FrameView::layout):
1431
1432 2013-09-24  Commit Queue  <commit-queue@webkit.org>
1433
1434         Unreviewed, rolling out r156379.
1435         http://trac.webkit.org/changeset/156379
1436         https://bugs.webkit.org/show_bug.cgi?id=121894
1437
1438         Caused many assertion failures (Requested by ap on #webkit).
1439
1440         * css/CSSValue.cpp:
1441         (WebCore::CSSValue::destroy):
1442         * css/StyleResolver.cpp:
1443         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1444         (WebCore::StyleResolver::createFilterOperations):
1445         * css/TransformFunctions.cpp:
1446         (WebCore::transformsForValue):
1447         * css/WebKitCSSArrayFunctionValue.h:
1448         * css/WebKitCSSFilterValue.h:
1449         * css/WebKitCSSMatFunctionValue.h:
1450         * css/WebKitCSSMixFunctionValue.h:
1451         * css/WebKitCSSSVGDocumentValue.h:
1452         * css/WebKitCSSShaderValue.h:
1453         (WebCore::toWebKitCSSShaderValue):
1454         * css/WebKitCSSTransformValue.h:
1455
1456 2013-09-24  Ryosuke Niwa  <rniwa@webkit.org>
1457
1458         Crash in Document::setFocusedElement
1459         https://bugs.webkit.org/show_bug.cgi?id=121888
1460
1461         Reviewed by Andreas Kling.
1462
1463         Merge https://chromium.googlesource.com/chromium/blink/+/4a594a3de7d9761462b55fb27a6850d767419af2
1464
1465         The crash was caused by attempting to call Chrome:focusedNodeChanged() after m_page had already
1466         been cleared. This could happen when blur's event handler removes the iframe from which
1467         the focus had been moved. Fixed the bug by adding a null pointer check.
1468
1469         Test: fast/events/blur-remove-parent-crash.html
1470
1471         * dom/Document.cpp:
1472         (WebCore::Document::setFocusedElement):
1473
1474 2013-09-24  Antti Koivisto  <antti@apple.com>
1475
1476         Remove HTMLContentElement
1477         https://bugs.webkit.org/show_bug.cgi?id=121891
1478
1479         Reviewed by Andreas Kling.
1480
1481         Remove an unsused Shadow DOM type.
1482
1483         * DerivedSources.make:
1484         * WebCore.exp.in:
1485         * WebCore.xcodeproj/project.pbxproj:
1486         * html/HTMLDetailsElement.cpp:
1487         * html/HTMLSummaryElement.cpp:
1488         * html/HTMLTagNames.in:
1489         * html/shadow/ContentDistributor.cpp:
1490         * html/shadow/HTMLContentElement.cpp: Removed.
1491         * html/shadow/HTMLContentElement.h: Removed.
1492         * html/shadow/HTMLContentElement.idl: Removed.
1493         * html/shadow/InsertionPoint.h:
1494         (WebCore::InsertionPoint::matchTypeFor):
1495         * testing/Internals.cpp:
1496         * testing/Internals.h:
1497         * testing/Internals.idl:
1498
1499 2013-09-24  Benjamin Poulain  <benjamin@webkit.org>
1500
1501         Remove a contradiction from SelectorChecker
1502         https://bugs.webkit.org/show_bug.cgi?id=121881
1503
1504         Reviewed by Andreas Kling.
1505
1506         The matching code for PseudoHover and PseudoActive is done on the current
1507         selector pseudo type. The current selector match type must be CSSSelector::PseudoClass
1508         in order to reach this code. Consequently, selector->m_match == CSSSelector::Tag can
1509         never be true.
1510
1511         * css/SelectorChecker.cpp:
1512         (WebCore::SelectorChecker::checkOne):
1513
1514 2013-09-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1515
1516         Add toWebKitCSS*Value functions to cast from CSSValue
1517         https://bugs.webkit.org/show_bug.cgi?id=121776
1518
1519         Reviewed by Darin Adler.
1520
1521         CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
1522
1523         No new tests, no behavior change.
1524
1525         * css/CSSValue.cpp:
1526         (WebCore::CSSValue::destroy):
1527         * css/StyleResolver.cpp:
1528         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1529         (WebCore::StyleResolver::createFilterOperations):
1530         * css/TransformFunctions.cpp:
1531         (WebCore::transformsForValue):
1532         * css/WebKitCSSArrayFunctionValue.h:
1533         (WebCore::toWebKitCSSArrayFunctionValue):
1534         * css/WebKitCSSFilterValue.h:
1535         (WebCore::toWebKitCSSFilterValue):
1536         * css/WebKitCSSMatFunctionValue.h:
1537         (WebCore::toWebKitCSSMatFunctionValue):
1538         * css/WebKitCSSMixFunctionValue.h:
1539         (WebCore::toWebKitCSSMixFunctionValue):
1540         * css/WebKitCSSSVGDocumentValue.h:
1541         (WebCore::toWebKitCSSSVGDocumentValue):
1542         * css/WebKitCSSShaderValue.h:
1543         (WebCore::toWebKitCSSShaderValue):
1544         * css/WebKitCSSTransformValue.h:
1545         (WebCore::toWebKitCSSTransformValue):
1546
1547 2013-09-24  Antti Koivisto  <antti@apple.com>
1548
1549         Clean up some uses of first/lastChildSlow
1550         https://bugs.webkit.org/show_bug.cgi?id=121882
1551
1552         Reviewed by Andreas Kling.
1553
1554         Tighten typing and use first/lastChild instead.
1555
1556         * dom/Position.cpp:
1557         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1558         (WebCore::Position::isCandidate):
1559         (WebCore::Position::getInlineBoxAndOffset):
1560         * dom/Position.h:
1561         * dom/PositionIterator.cpp:
1562         (WebCore::PositionIterator::isCandidate):
1563         * editing/CompositeEditCommand.cpp:
1564         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1565         * rendering/RenderBlock.cpp:
1566         (WebCore::canMergeAnonymousBlock):
1567         (WebCore::canMergeContiguousAnonymousBlocks):
1568         (WebCore::RenderBlock::firstLineBlock):
1569         (WebCore::RenderBlock::updateFirstLetter):
1570         * rendering/RenderRegion.cpp:
1571         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
1572         (WebCore::RenderRegion::computeChildrenStyleInRegion):
1573         * rendering/RenderRegion.h:
1574         * rendering/RenderRuby.cpp:
1575         (WebCore::rubyBeforeBlock):
1576         (WebCore::rubyAfterBlock):
1577         (WebCore::lastRubyRun):
1578         * rendering/RenderTreeAsText.cpp:
1579         (WebCore::write):
1580         (WebCore::writeCounterValuesFromChildren):
1581         * rendering/svg/RenderSVGText.cpp:
1582         (WebCore::findPreviousAndNextAttributes):
1583         * style/StyleResolveTree.cpp:
1584         (WebCore::Style::textRendererIsNeeded):
1585
1586 2013-09-24  Mark Lam  <mark.lam@apple.com>
1587
1588         Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame.
1589         https://bugs.webkit.org/show_bug.cgi?id=121867.
1590
1591         Reviewed by Geoffrey Garen.
1592
1593         No new tests.
1594
1595         * bindings/js/ScriptDebugServer.cpp:
1596         (WebCore::ScriptDebugServer::createCallFrame):
1597         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
1598         (WebCore::ScriptDebugServer::callEvent):
1599         (WebCore::ScriptDebugServer::atStatement):
1600         (WebCore::ScriptDebugServer::returnEvent):
1601         (WebCore::ScriptDebugServer::exception):
1602         (WebCore::ScriptDebugServer::willExecuteProgram):
1603         (WebCore::ScriptDebugServer::didExecuteProgram):
1604         (WebCore::ScriptDebugServer::didReachBreakpoint):
1605         * bindings/js/ScriptDebugServer.h:
1606         * bindings/js/WorkerScriptDebugServer.cpp:
1607         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
1608         * bindings/js/WorkerScriptDebugServer.h:
1609
1610 2013-09-24  Andreas Kling  <akling@apple.com>
1611
1612         Move keyboard event dispatch from Node to Element.
1613         <https://webkit.org/b/121873>
1614
1615         Reviewed by Antti Koivisto.
1616
1617         We only dispatch keyboard events on Elements so that logic shouldn't be in Node.
1618
1619         * dom/Document.cpp:
1620         (WebCore::eventTargetElementForDocument):
1621
1622             Reworked to return Element instead of Node.
1623
1624         * dom/Document.h:
1625         * dom/Element.h:
1626         * dom/Element.cpp:
1627         (WebCore::Element::dispatchKeyEvent):
1628
1629             Moved from Node to Element.
1630
1631         * editing/AlternativeTextController.cpp:
1632         (WebCore::AlternativeTextController::insertDictatedText):
1633         * page/EventHandler.cpp:
1634         (WebCore::EventHandler::keyEvent):
1635         (WebCore::EventHandler::handleTextInputEvent):
1636
1637             Adjusted for above changes.
1638
1639 2013-09-24  Zoltan Horvath  <zoltan@webkit.org>
1640
1641         [CSS Shapes] Modify updateSegmentsForShapes function to use logical coordinates
1642         https://bugs.webkit.org/show_bug.cgi?id=121864
1643
1644         Reviewed by David Hyatt.
1645
1646         When I landed updateSegmentsForShapes in r156022, I didn't use logical coordinates. This change modifies the
1647         code to use coordinates for positioning the float and the content around the float in a shape-inside. Now I
1648         added only one writing mode tests, but I will add more later in bug #121866.
1649
1650         Test: fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content.html
1651
1652         * rendering/FloatingObjects.h:
1653         (WebCore::FloatingObject::logicalHeight):
1654         * rendering/RenderBlock.cpp:
1655         (WebCore::RenderBlock::computeLogicalLocationForFloat):
1656         * rendering/RenderBlockLineLayout.cpp:
1657         (WebCore::updateSegmentsForShapes):
1658
1659 2013-09-24  Brady Eidson  <beidson@apple.com>
1660
1661         Remove IDBTransactionCallbacks.h from the .xcodeproj, as it's gone from the repository.
1662
1663         Rubberstamped by Anders Carlsson and Alexey Proskuryakov.
1664
1665         * WebCore.xcodeproj/project.pbxproj:
1666
1667 2013-09-24  Antti Koivisto  <antti@apple.com>
1668
1669         Tighten table rendering code
1670         https://bugs.webkit.org/show_bug.cgi?id=121860
1671
1672         Reviewed by Andreas Kling.
1673
1674         Hide firstChild/lastChild/nextSibling/previousSibling in table renderers, 
1675         expose correctly typed firstRow/nextCell etc instead.
1676
1677 2013-09-24  Dean Jackson  <dino@apple.com>
1678
1679         Implement symbol name hashing for WebGL shaders
1680         https://bugs.webkit.org/show_bug.cgi?id=121849
1681
1682         Reviewed by Anders Carlsson.
1683
1684         Turn on ANGLE's symbol name mapping for shader programs.
1685         This avoids compilation failures (or worse, crashers)
1686         on some hardware that doesn't like it when shaders redefine
1687         symbols like "sin", even though that is valid.
1688
1689         The way ANGLE exposes this is via setting a pointer
1690         to a char* -> uint64_t hash function. Since we only have
1691         a 32-bit hash in WebKit, I combine the 32-bit value with
1692         a counter value that exists over the lifetime of a GC3D context.
1693         Before calling ANGLE, I point the global hash map to the local
1694         hash map, and then clean up after we're done. This introduces
1695         a memory hit, in that the symbol table will build up until
1696         the context is released.
1697
1698         Covered by Khronos WebGL tests, including
1699         conformance/glsl/misc/shader-with-non-reserved-words.html
1700
1701         * platform/graphics/GraphicsContext3D.h: Define a ShaderNameHash type,
1702         and add an OwnPtr to one as a member variable.
1703         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1704         (WebCore::nameHashForShader): Global function used for ANGLE hashing.
1705         (WebCore::GraphicsContext3D::compileShader): Set up the ANGLE properties,
1706         point to the local hash map, and call compile/translate.
1707
1708 2013-09-24  Dean Jackson  <dino@apple.com>
1709
1710         Use mapped name in attribute location binding
1711         https://bugs.webkit.org/show_bug.cgi?id=121847
1712         <rdar://problem/15067526>
1713
1714         Reviewed by Eric Carlson.
1715
1716         The shader that we send down to OpenGL to compile
1717         may have been translated by ANGLE, so we keep a
1718         table around that maps input symbols to output symbols.
1719         We used the table when binding to and looking up
1720         uniforms, and when looking up attributes, but not
1721         when actually binding to attribute locations.
1722
1723         Test: fast/canvas/webgl/gl-bind-attrib-mapped-names.html
1724
1725         * platform/graphics/ANGLEWebKitBridge.cpp:
1726         (WebCore::getSymbolInfo): Add logging of symbol mapping.
1727         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1728         (WebCore::GraphicsContext3D::bindAttribLocation): Used the mapped name.
1729         (WebCore::GraphicsContext3D::getAttribLocation): Remove comment since
1730         we do the lookup everywhere.
1731         (WebCore::GraphicsContext3D::getUniformLocation): Ditto.
1732
1733 2013-09-24  Enrica Casucci  <enrica@apple.com>
1734
1735         Upstream changes to Pasteboard implementation for iOS.
1736         https://bugs.webkit.org/show_bug.cgi?id=121818
1737
1738         Reviewed by Darin Adler.
1739
1740         * WebCore.xcodeproj/project.pbxproj:
1741         * editing/Editor.cpp:
1742         (WebCore::Editor::cut):
1743         (WebCore::Editor::copyImage):
1744         * editing/ios/EditorIOS.mm:
1745         (WebCore::attributedStringForRange):
1746         (WebCore::dataInRTFDFormat):
1747         (WebCore::dataInRTFFormat):
1748         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
1749         (WebCore::Editor::selectionInWebArchiveFormat):
1750         (WebCore::Editor::writeSelectionToPasteboard):
1751         (WebCore::getImage):
1752         (WebCore::Editor::writeImageToPasteboard):
1753         * platform/Pasteboard.h:
1754         * platform/PasteboardStrategy.h:
1755         * platform/PlatformPasteboard.h:
1756         * platform/ios/PasteboardIOS.mm:
1757         * platform/ios/PlatformPasteboardIOS.mm: Added.
1758         (WebCore::PlatformPasteboard::PlatformPasteboard):
1759         (WebCore::PlatformPasteboard::getTypes):
1760         (WebCore::PlatformPasteboard::bufferForType):
1761         (WebCore::PlatformPasteboard::getPathnamesForType):
1762         (WebCore::PlatformPasteboard::stringForType):
1763         (WebCore::PlatformPasteboard::color):
1764         (WebCore::PlatformPasteboard::url):
1765         (WebCore::PlatformPasteboard::copy):
1766         (WebCore::PlatformPasteboard::addTypes):
1767         (WebCore::PlatformPasteboard::setTypes):
1768         (WebCore::PlatformPasteboard::setBufferForType):
1769         (WebCore::PlatformPasteboard::setPathnamesForType):
1770         (WebCore::PlatformPasteboard::setStringForType):
1771         (WebCore::PlatformPasteboard::changeCount):
1772         (WebCore::PlatformPasteboard::uniqueName):
1773         (WebCore::PlatformPasteboard::write):
1774
1775 2013-09-24  Mark Rowe  <mrowe@apple.com>
1776
1777         <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
1778
1779         Reviewed by Dan Bernstein.
1780
1781         * Configurations/Base.xcconfig:
1782
1783 2013-09-24  Daniel Bates  <dabates@apple.com>
1784
1785         [iOS] Upstream -webkit-touch-callout
1786         https://bugs.webkit.org/show_bug.cgi?id=121507
1787
1788         Reviewed by Antti Koivisto.
1789
1790         * css/CSSComputedStyleDeclaration.cpp:
1791         (WebCore::ComputedStyleExtractor::propertyValue):
1792         * css/CSSParser.cpp:
1793         (WebCore::CSSParser::parseValue):
1794         * css/CSSPropertyNames.in: Added -webkit-touch-callout.
1795         * css/StyleResolver.cpp:
1796         (WebCore::StyleResolver::applyProperty):
1797         * html/HTMLImageElement.cpp:
1798         (WebCore::HTMLImageElement::willRespondToMouseClickEvents): Added.
1799         * html/HTMLImageElement.h:
1800         * rendering/style/RenderStyle.h:
1801         * rendering/style/StyleRareInheritedData.cpp:
1802         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1803         (WebCore::StyleRareInheritedData::operator==):
1804         * rendering/style/StyleRareInheritedData.h:
1805
1806 2013-09-24  Bem Jones-Bey  <bjonesbe@adobe.com>
1807
1808         Properly handle bottom margin on float with shape-outside
1809         https://bugs.webkit.org/show_bug.cgi?id=121808
1810
1811         Reviewed by David Hyatt.
1812
1813         When a float has a shape-outside, inline content must conform to the
1814         shape, not to the margin box. Thus, if a float with shape-outside has
1815         a bottom margin and the shape does not intrude into that margin, then
1816         the inline content should ignore the margin. Before this patch, inline
1817         content would drop below the margin box instead of obeying the shape.
1818         
1819         Note that content that should clear the float still clears the margin
1820         box, not the shape's contour.
1821
1822         Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html
1823                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html
1824                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html
1825
1826         * rendering/LineWidth.cpp:
1827         (WebCore::LineWidth::fitBelowFloats): Compute the logical bottom based
1828         on the shape.
1829         * rendering/RenderBlock.cpp:
1830         (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Add option to
1831         compute the logical bottom based on the shape instead of on the margin
1832         box.
1833         * rendering/RenderBlock.h:
1834
1835 2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
1836
1837         [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
1838         https://bugs.webkit.org/show_bug.cgi?id=121782
1839
1840         Reviewed by Martin Robinson.
1841
1842         Disabled drag functions.
1843
1844         * page/gtk/EventHandlerGtk.cpp:
1845         * platform/gtk/PasteboardGtk.cpp:
1846
1847 2013-09-24  Samuel White  <samuel_white@apple.com>
1848
1849         AX: Replace AXObjectCache postNotification method boolean arguments with enum values.
1850         https://bugs.webkit.org/show_bug.cgi?id=121504
1851
1852         Reviewed by Chris Fleizach.
1853
1854         No new tests, no functional changes. Changed argument type from bool
1855         to enum per "Names" rule #10 in the WebKit coding style guidelines.
1856
1857         * accessibility/AXObjectCache.cpp:
1858         (WebCore::AXObjectCache::textChanged):
1859         (WebCore::AXObjectCache::postNotification):
1860         (WebCore::AXObjectCache::checkedStateChanged):
1861         (WebCore::AXObjectCache::selectedChildrenChanged):
1862         (WebCore::AXObjectCache::handleAttributeChanged):
1863         * accessibility/AXObjectCache.h:
1864         (WebCore::AXObjectCache::postNotification):
1865         * accessibility/AccessibilityMenuList.cpp:
1866         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
1867         * accessibility/AccessibilityMenuListPopup.cpp:
1868         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
1869         * accessibility/AccessibilityNodeObject.cpp:
1870         (WebCore::AccessibilityNodeObject::childrenChanged):
1871         (WebCore::AccessibilityNodeObject::changeValueByStep):
1872         (WebCore::AccessibilityNodeObject::changeValueByPercent):
1873         * accessibility/AccessibilityRenderObject.cpp:
1874         (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
1875         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1876         (WebCore::AccessibilityRenderObject::textChanged):
1877         * dom/Document.cpp:
1878         (WebCore::Document::implicitClose):
1879         * editing/Editor.cpp:
1880         (WebCore::Editor::respondToChangedContents):
1881         (WebCore::Editor::markAndReplaceFor):
1882         * editing/mac/FrameSelectionMac.mm:
1883         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1884         * html/HTMLTextFormControlElement.cpp:
1885         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1886         * html/InputType.cpp:
1887         (WebCore::InputType::applyStep):
1888         * html/RangeInputType.cpp:
1889         (WebCore::RangeInputType::handleKeydownEvent):
1890         * page/FocusController.cpp:
1891         (WebCore::FocusController::setInitialFocus):
1892         * page/FrameView.cpp:
1893         (WebCore::FrameView::layout):
1894
1895 2013-09-24  Andreas Kling  <akling@apple.com>
1896
1897         Make hoverAncestor() a RenderElement concept.
1898         <https://webkit.org/b/121845>
1899
1900         Reviewed by Antti Koivisto.
1901
1902         The hover ancestor renderer is always a RenderElement, we only ever
1903         ask RenderElements for their hover ancestors.
1904
1905         Updated Document::updateHoverActiveState() to take advantage of the
1906         tighter typing, removing a few isElementNode() checks.
1907
1908 2013-09-24  Daniel Bates  <dabates@apple.com>
1909
1910         [iOS] Initialize settings mediaPlayback{AllowsInline, RequiresUserGesture} and
1911         shouldRespectImageOrientation as appropriate
1912         https://bugs.webkit.org/show_bug.cgi?id=121792
1913
1914         Reviewed by Darin Adler.
1915
1916         On iOS we explicitly want to disable mediaPlaybackAllowsInline, and enable
1917         mediaPlaybackRequiresUserGesture and shouldRespectImageOrientation by default.
1918         This differs from other platforms. We need to extract the initialization logic
1919         for these settings into constants whose definition is conditioned on the platform.
1920
1921         * page/Settings.cpp:
1922         * page/Settings.in:
1923
1924 2013-09-24  peavo@outlook.com  <peavo@outlook.com>
1925
1926         [WinCairo] Compile error.
1927         https://bugs.webkit.org/show_bug.cgi?id=121839
1928
1929         Reviewed by Brent Fulgham.
1930
1931         * platform/graphics/GraphicsContext3DPrivate.cpp:
1932         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): Added missing guard.
1933
1934 2013-09-24  Andreas Kling  <akling@apple.com>
1935
1936         Cache continuation() in a local to avoid repeat hash lookups.
1937         <https://webkit.org/b/121840>
1938
1939         Reviewed by Geoffrey Garen.
1940
1941         RenderBoxModelObject::continuation() does a hash lookup every time.
1942         Cache the result in a local instead of calling it repeatedly.
1943
1944         * rendering/RenderBlock.h:
1945         (WebCore::RenderBlock::isAnonymousBlockContinuation):
1946
1947             Reorder to check bitfield before hash map.
1948
1949         * rendering/RenderBlock.cpp:
1950         (WebCore::RenderBlock::updateDragState):
1951         * rendering/RenderInline.cpp:
1952         (WebCore::RenderInline::absoluteRects):
1953         (WebCore::RenderInline::absoluteQuads):
1954         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1955         (WebCore::RenderInline::updateDragState):
1956         (WebCore::RenderInline::addFocusRingRects):
1957
1958             Cache continuation() in locals where it's used more than once.
1959
1960 2013-09-24  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1961
1962         [Qt] Crash when trying to download blob url
1963         https://bugs.webkit.org/show_bug.cgi?id=121681
1964
1965         Reviewed by Simon Hausmann.
1966
1967         Resolve any blob URLs before creating a QUrl.
1968
1969         * platform/network/qt/ResourceRequestQt.cpp:
1970         (WebCore::appendBlobResolved):
1971         (WebCore::resolveBlobUrl):
1972         (WebCore::ResourceRequest::toNetworkRequest):
1973
1974 2013-09-23  Antti Koivisto  <antti@apple.com>
1975
1976         Move more style change code from RenderObject to RenderElement
1977         https://bugs.webkit.org/show_bug.cgi?id=121822
1978
1979         Reviewed by Darin Adler.
1980
1981         * rendering/RenderElement.cpp:
1982         (WebCore::RenderElement::~RenderElement):
1983         
1984             RenderTexts are no longer registered as image clients. They don't need be unregistered either.
1985
1986         (WebCore::RenderElement::adjustStyleDifference):
1987         (WebCore::RenderElement::hasImmediateNonWhitespaceTextChild):
1988         (WebCore::RenderElement::shouldRepaintForStyleDifference):
1989         (WebCore::RenderElement::updateFillImages):
1990         (WebCore::RenderElement::updateImage):
1991         (WebCore::RenderElement::updateShapeImage):
1992         (WebCore::RenderElement::setStyle):
1993         
1994             Move from RenderObject and remove the text specific bits.
1995
1996         * rendering/RenderElement.h:
1997         * rendering/RenderObject.cpp:
1998         (WebCore::RenderObject::setStyle):
1999         (WebCore::RenderObject::arenaDelete):
2000         * rendering/RenderObject.h:
2001         
2002             Remove styleWill/DidChange which move to subclasses.
2003
2004         * rendering/RenderText.cpp:
2005         (WebCore::RenderText::setStyle):
2006         
2007             Add simple text specific setStyle.
2008
2009         * rendering/RenderText.h:
2010
2011 2013-09-24  Andrei Parvu  <parvu@adobe.com>
2012
2013         [CSS Background] repeat: round should round the number of tiles to the nearest natural number
2014         https://bugs.webkit.org/show_bug.cgi?id=120668
2015
2016         Reviewed by Darin Adler.
2017
2018         Tests already available in css3/masking and css3/background
2019
2020         * rendering/RenderBoxModelObject.cpp: Rounded the number of tiles to the nearest natural number.
2021         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2022
2023 2013-09-24  Ryuan Choi  <ryuan.choi@samsung.com>
2024
2025         Remove ScrollView::platformInit() and ScrollView::platformDestroy()
2026         https://bugs.webkit.org/show_bug.cgi?id=121824
2027
2028         Reviewed by Darin Adler.
2029
2030         ScrollView::platformInit() and ScrollView::platformDestroy() are just
2031         empty functions for all ports after removed WX port at r149186.
2032
2033         * PlatformEfl.cmake: Removed ScrollViewEfl.cpp from source list.
2034         * platform/ScrollView.cpp: Removed platformInit and PlatformDestroy.
2035         (WebCore::ScrollView::ScrollView):
2036         (WebCore::ScrollView::~ScrollView):
2037         * platform/ScrollView.h: Ditto.
2038         * platform/efl/ScrollViewEfl.cpp: Removed.
2039
2040 2013-09-23  Darin Adler  <darin@apple.com>
2041
2042         Use unique_ptr instead of deleteAllValues in FloatingObject code
2043         https://bugs.webkit.org/show_bug.cgi?id=121823
2044
2045         Reviewed by Sam Weinig.
2046
2047         * rendering/FloatingObjects.cpp:
2048         (WebCore::FloatingObject::create): Return a unique_ptr instead of PassOwnPtr.
2049         Use auto and a word for the local variable instead of an abbreviation. Also
2050         changed to take a reference instead of a pointer.
2051         (WebCore::FloatingObject::copyToNewContainer): Ditto.
2052         (WebCore::FloatingObject::unsafeClone): Ditto.
2053         (WebCore::FloatingObjects::~FloatingObjects): Removed call to deleteAllValues.
2054         (WebCore::FloatingObjects::clearLineBoxTreePointers): Use auto to make this
2055         read clearly.
2056         (WebCore::FloatingObjects::clear): Removed call to deleteAllValues.
2057         (WebCore::FloatingObjects::moveAllToFloatInfoMap): Use std::move to move values
2058         out of the set, into the map. Removed code to clear the set, since it was a
2059         trick to prevent the values from being deleted when they were not moved.
2060         (WebCore::FloatingObjects::add): Changed to take a unique_ptr and to move the
2061         pointer into the set instead of using leakPtr.
2062         (WebCore::FloatingObjects::remove): Rearranged code so that the remove is at
2063         the end of the function rather than the beginning. Also had to use a hash
2064         translator and a find/remove combo since we don't have hash translator version
2065         of the remove function.
2066         (WebCore::FloatingObjects::computePlacedFloatsTree): Updated for changes to
2067         the types.
2068         (WebCore::FloatingObjects::placedFloatsTree): Moved this function here instead
2069         of having it in the header, since it's only used within the file.
2070
2071         * rendering/FloatingObjects.h: Changed functions to take references instead
2072         of pointers and return unique_ptr instead of PassOwnPtr. Also made
2073         constructors public so we can use them with make_unique. Changed types to
2074         use unique_ptr instead of raw pointers, and made the FloatingObjectHashTranslator
2075         work for both RenderBox& and FloatingObject&.
2076
2077         * rendering/LineWidth.cpp:
2078         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2079         Updated for changes to types.
2080
2081         * rendering/RenderBlock.cpp:
2082         (WebCore::RenderBlock::styleDidChange):
2083         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
2084         (WebCore::RenderBlock::addOverflowFromFloats):
2085         (WebCore::RenderBlock::repaintOverhangingFloats):
2086         (WebCore::RenderBlock::paintFloats):
2087         (WebCore::RenderBlock::selectionGaps):
2088         (WebCore::RenderBlock::insertFloatingObject):
2089         (WebCore::RenderBlock::removeFloatingObject):
2090         (WebCore::RenderBlock::removeFloatingObjectsBelow):
2091         (WebCore::RenderBlock::positionNewFloats):
2092         (WebCore::RenderBlock::nextFloatLogicalBottomBelow):
2093         (WebCore::RenderBlock::lowestFloatLogicalBottom):
2094         (WebCore::RenderBlock::addOverhangingFloats):
2095         (WebCore::RenderBlock::hasOverhangingFloat):
2096         (WebCore::RenderBlock::addIntrudingFloats):
2097         (WebCore::RenderBlock::containsFloat):
2098         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
2099         (WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer):
2100         (WebCore::RenderBlock::hitTestFloats):
2101         (WebCore::RenderBlock::adjustForBorderFit):
2102         Updated for changes to types.
2103
2104         * rendering/RenderBlockFlow.cpp:
2105         (WebCore::RenderBlockFlow::clearFloats): Updated to use take instead of
2106         a combination of remove and delete.
2107
2108         * rendering/RenderBlockLineLayout.cpp:
2109         (WebCore::RenderBlock::layoutRunsAndFloats):
2110         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2111         (WebCore::RenderBlock::linkToEndLineIfNeeded):
2112         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
2113         (WebCore::RenderBlock::positionNewFloatOnLine):
2114         Updated for changes to types.
2115
2116 2013-09-23  Gurpreet Kaur  <k.gurpreet@samsung.com>
2117
2118         CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
2119         https://bugs.webkit.org/show_bug.cgi?id=121422
2120
2121         Reviewed by Darin Adler.
2122
2123         Box-shadow properties were not applied incase its values
2124         were given in vh, vw, vmax, vmin unit.
2125
2126         Tests: fast/css/box-shadow-negative-viewportlength.html
2127                fast/css/box-shadow-viewport-height.html
2128                fast/css/box-shadow-viewport-vmax.html
2129                fast/css/box-shadow-viewport-vmin.html
2130                fast/css/box-shadow-viewport-width.html
2131
2132         * css/CSSParser.cpp:
2133         (WebCore::CSSParser::parseShadow):
2134         * css/StyleResolver.cpp:
2135         (WebCore::StyleResolver::applyProperty):
2136         (WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
2137         (WebCore::StyleResolver::viewportPercentageHeight):
2138         (WebCore::StyleResolver::viewportPercentageWidth):
2139         (WebCore::StyleResolver::viewportPercentageMax):
2140         (WebCore::StyleResolver::viewportPercentageMin):
2141         * css/StyleResolver.h:
2142         Parsing and calculating the shadow values which has been specified
2143         in viewport units.The vh/vw units are calcultated as percent of
2144         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
2145         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
2146
2147 2013-09-23  Ryuan Choi  <ryuan.choi@samsung.com>
2148
2149         Unreviewed build fix for CMake ports with INDEXED_DATABASE after r156296
2150
2151         * CMakeLists.txt: Removed IDBBackingStore.cpp from source list.
2152
2153 2013-09-23  Anders Carlsson  <andersca@apple.com>
2154
2155         Remove WTF_USE_SCROLLBAR_PAINTER #define
2156         https://bugs.webkit.org/show_bug.cgi?id=121819
2157
2158         Reviewed by Sam Weinig.
2159
2160         Remove unnecessary if checks and dead code.
2161
2162         * platform/mac/NSScrollerImpDetails.h:
2163         * platform/mac/ScrollAnimatorMac.mm:
2164         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2165         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2166         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
2167         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
2168         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
2169         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
2170         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2171         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2172         (WebCore::ScrollAnimatorMac::willStartLiveResize):
2173         (WebCore::ScrollAnimatorMac::contentsResized):
2174         (WebCore::ScrollAnimatorMac::willEndLiveResize):
2175         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
2176         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
2177         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
2178         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
2179         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
2180         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
2181         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2182         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2183         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2184         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2185         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
2186         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
2187         (WebCore::ScrollAnimatorMac::cancelAnimations):
2188         (WebCore::ScrollAnimatorMac::setIsActive):
2189         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2190         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2191         * platform/mac/ScrollViewMac.mm:
2192         (WebCore::toNSScrollerKnobStyle):
2193         (WebCore::ScrollView::platformSetScrollbarOverlayStyle):
2194         * platform/mac/ScrollbarThemeMac.mm:
2195         (WebCore::updateArrowPlacement):
2196         (WebCore::ScrollbarThemeMac::registerScrollbar):
2197         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
2198         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2199         (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
2200         (WebCore::ScrollbarThemeMac::hasThumb):
2201         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2202         (WebCore::ScrollbarThemeMac::updateEnabledState):
2203         (WebCore::ScrollbarThemeMac::paint):
2204
2205 2013-09-23  Brent Fulgham  <bfulgham@apple.com>
2206
2207         [Windows] Moving back in history from a page with <video>, then moving forward causes crash.
2208         https://bugs.webkit.org/show_bug.cgi?id=120475
2209
2210         Reviewed by Anders Carlsson.
2211
2212         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2213         (WebCore::AVFWrapper::AVFWrapper): Add assertion that creation is on main thread.
2214         (WebCore::AVFWrapper::~AVFWrapper): Add assertion that destruction is on main thread.
2215         (WebCore::destroyAVFWrapper): Helper function to dispatch on main queue.
2216         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Spawn AVFoundationCF destruction to
2217         main queue.
2218
2219 2013-09-23  Andreas Kling  <akling@apple.com>
2220
2221         RenderTextControlSingleLine::updateFromElement() override not needed.
2222         <https://webkit.org/b/121815>
2223
2224         Reviewed by Anders Carlsson.
2225
2226         * rendering/RenderTextControlSingleLine.cpp:
2227         * rendering/RenderTextControlSingleLine.h:
2228
2229 2013-09-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2230
2231         Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
2232         https://bugs.webkit.org/show_bug.cgi?id=121462
2233
2234         Reviewed by Darin Adler.
2235
2236         As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
2237         by css value type casting as well. This type cast macros will help to detect
2238         bad-cast bugs as well as improve a code readibility.
2239
2240         This patch adds the following methods,
2241
2242         - CSSFooValue* toCSSFooValue(CSSValue*)
2243         - const CSSFooValue* toCSSFooValue(const CSSValue*)
2244
2245         This patch support CSSImageSetValue and CSSReflectValue first. Other CSS*Values
2246         will use this macro step by step.
2247
2248         Besides this patch will remove unnecessary local variables.
2249
2250         No new tests, no behavior change.
2251
2252         * css/CSSCursorImageValue.cpp:
2253         (WebCore::CSSCursorImageValue::cachedImage):
2254         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
2255         * css/CSSImageSetValue.h:
2256         * css/CSSReflectValue.h:
2257         * css/CSSValue.cpp:
2258         (WebCore::CSSValue::destroy):
2259         * css/CSSValue.h:
2260         * css/StyleResolver.cpp:
2261         (WebCore::hasVariableReference):
2262         (WebCore::StyleResolver::applyProperty):
2263         (WebCore::StyleResolver::styleImage):
2264         * rendering/style/StylePendingImage.h:
2265         (WebCore::StylePendingImage::cssImageSetValue):
2266
2267 2013-09-23  Antti Koivisto  <antti@apple.com>
2268
2269         Move style change analysis code to RenderElement
2270         https://bugs.webkit.org/show_bug.cgi?id=121812
2271
2272         Reviewed by Andreas Kling.
2273
2274         Text renderers don't need this. There is no text renderer specific invalidation and text
2275         style never changes independent from the containing RenderElement.
2276
2277 2013-09-23  Commit Queue  <commit-queue@webkit.org>
2278
2279         Unreviewed, rolling out r156307.
2280         http://trac.webkit.org/changeset/156307
2281         https://bugs.webkit.org/show_bug.cgi?id=121817
2282
2283         Broke the build, and crashes the compiler (Requested by ap on
2284         #webkit).
2285
2286         * css/MediaQuery.cpp:
2287         (WebCore::expressionCompare):
2288         (WebCore::MediaQuery::MediaQuery):
2289         * dom/MutationObserver.cpp:
2290         (WebCore::MutationObserver::ObserverLessThan::operator()):
2291         (WebCore::MutationObserver::deliverAllMutations):
2292         * page/CaptionUserPreferences.cpp:
2293         (WebCore::textTrackCompare):
2294         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2295
2296 2013-09-23  Andreas Kling  <akling@apple.com>
2297
2298         Move rendererForRootBackground() to RenderElement.
2299         <http://webkit.org/b/121813>
2300
2301         Reviewed by Antti Koivisto.
2302
2303         Move this to RenderElement (and make it return one, too) since the
2304         document element renderer will always be a RenderElement.
2305
2306 2013-09-23  Brady Eidson  <beidson@apple.com>
2307
2308         Make the Mac build work with IndexedDB enabled.
2309         https://bugs.webkit.org/show_bug.cgi?id=121814
2310
2311         Reviewed by Alexey Proskuryakov.
2312
2313         This patch makes the Mac build work if one were to enable the IndexedDB feature flag.
2314         This patch does not actually enable the flag for everyone.
2315
2316         * DerivedSources.make:
2317         * WebCore.xcodeproj/project.pbxproj:
2318
2319         * Modules/indexeddb/IDBBackingStore.cpp: Added.
2320         (WebCore::IDBBackingStore::open):
2321         (WebCore::IDBBackingStore::openInMemory):
2322         (WebCore::IDBBackingStore::getObjectStores):
2323         (WebCore::IDBBackingStore::Cursor::advance):
2324         (WebCore::IDBBackingStore::Cursor::continueFunction):
2325         (WebCore::IDBBackingStore::Transaction::Transaction):
2326         (WebCore::IDBBackingStore::Transaction::begin):
2327         (WebCore::IDBBackingStore::Transaction::commit):
2328         (WebCore::IDBBackingStore::Transaction::rollback):
2329         * Modules/indexeddb/IDBBackingStore.h:
2330         (WebCore::LevelDBFactory::~LevelDBFactory):
2331         (WebCore::IDBBackingStore::Transaction::reset):
2332         (WebCore::IDBBackingStore::Transaction::levelDBTransactionFrom):
2333
2334         * Modules/indexeddb/IDBKeyPath.cpp:
2335         (WebCore::IDBIsValidKeyPath):
2336
2337         * bindings/js/IDBBindingUtilities.cpp:
2338         (WebCore::createIDBKeyFromValue):
2339
2340         * bindings/js/JSIDBAnyCustom.cpp:
2341         (WebCore::toJS):
2342
2343 2013-09-23  Andreas Kling  <akling@apple.com>
2344
2345         CTTE: RenderObject::container() should return a RenderElement*.
2346         <https://webkit.org/b/121811>
2347
2348         Reviewed by Antti Koivisto.
2349
2350         The containing renderer is always a RenderElement.
2351
2352 2013-09-23  Anders Carlsson  <andersca@apple.com>
2353
2354         Test the waters and begin using lambdas
2355         https://bugs.webkit.org/show_bug.cgi?id=121809
2356
2357         Reviewed by Andreas Kling.
2358
2359         Use lambdas instead of static functions and function objects.
2360         
2361         * css/MediaQuery.cpp:
2362         (WebCore::MediaQuery::MediaQuery):
2363         * dom/MutationObserver.cpp:
2364         (WebCore::MutationObserver::deliverAllMutations):
2365         * page/CaptionUserPreferences.cpp:
2366         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
2367
2368 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2369
2370         [WIN] Add implementation for WebCore::readFromFile()
2371         https://bugs.webkit.org/show_bug.cgi?id=119210
2372
2373         Reviewed by Brent Fulgham.
2374
2375         * platform/win/FileSystemWin.cpp:
2376         (WebCore::readFromFile):
2377
2378 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2379
2380         [WIN] Implement WebMutableURLRequest::setHTTPBody()
2381         https://bugs.webkit.org/show_bug.cgi?id=91920
2382
2383         Reviewed by Brent Fulgham.
2384
2385         Add a method to FormData for growing the internal buffer with a given size.
2386
2387         * platform/network/FormData.cpp:
2388         (WebCore::FormData::appendData):
2389         (WebCore::FormData::expandDataStore):
2390         * platform/network/FormData.h:
2391
2392 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2393
2394         use NOMINMAX instead of #define min min
2395         https://bugs.webkit.org/show_bug.cgi?id=73563
2396
2397         Reviewed by Brent Fulgham.
2398
2399         Use NOMINMAX instead of #define min/max as a cleaner
2400         way of ensuring that Windows system header files don't
2401         define min/max as macro in the first place.
2402
2403         * WebCorePrefix.h:
2404         * config.h:
2405
2406 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
2407
2408         REGRESSION (r155998): when zooming in, tiles are too small
2409         https://bugs.webkit.org/show_bug.cgi?id=121765
2410
2411         Reviewed by Dean Jackson.
2412
2413         In r155998 I made GraphicsLayerCA take root-relative transforms
2414         into account when computing contentsScale, and landed a bunch of
2415         new results which should actually have told me that I broke page
2416         scaling.
2417         
2418         We don't want to take page scale into account when computing contentsScale,
2419         because we already do so, so ignore the transform on the layer that
2420         applies page scale (the only transform it should ever has is the page scale).
2421
2422         * platform/graphics/ca/GraphicsLayerCA.cpp:
2423         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
2424
2425 2013-09-23  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2426
2427         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
2428         https://bugs.webkit.org/show_bug.cgi?id=40981
2429
2430         Reviewed by Darin Adler.
2431
2432         RenderBox::calculateAutoscrollDirection does not properly translate
2433         inner frames' coordinates in order to determine its auto-scrollability.
2434         By coincidence, if the inner frame box it placed near to page's 0, 0 position
2435         (upper left corner), it might work.
2436
2437         Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
2438         with window coordinates, taking inner frames offset and scroll position into account.
2439         The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
2440         as it is used to.
2441
2442         Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
2443
2444         * rendering/RenderBox.cpp:
2445         (WebCore::RenderBox::calculateAutoscrollDirection):
2446
2447 2013-09-23  Brady Eidson  <beidson@apple.com>
2448
2449         Move LevelDB specific IDB files into their own subdirectory.
2450         https://bugs.webkit.org/show_bug.cgi?id=121804
2451
2452         Rubberstamped by Alexey Proskuryakov.
2453
2454         * CMakeLists.txt:
2455         * GNUmakefile.list.am:
2456         * WebCore.xcodeproj/project.pbxproj:
2457
2458         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp.
2459         (WebCore::recordInternalError):
2460         (WebCore::putBool):
2461         (WebCore::getInt):
2462         (WebCore::putInt):
2463         (WebCore::getVarInt):
2464         (WebCore::putVarInt):
2465         (WebCore::getString):
2466         (WebCore::putString):
2467         (WebCore::putIDBKeyPath):
2468         (WebCore::compareKeys):
2469         (WebCore::compareIndexKeys):
2470         (WebCore::Comparator::compare):
2471         (WebCore::Comparator::name):
2472         (WebCore::isSchemaKnown):
2473         (WebCore::setUpMetadata):
2474         (WebCore::getMaxObjectStoreId):
2475         (WebCore::DefaultLevelDBFactory::openLevelDB):
2476         (WebCore::DefaultLevelDBFactory::destroyLevelDB):
2477         (WebCore::IDBBackingStore::IDBBackingStore):
2478         (WebCore::IDBBackingStore::~IDBBackingStore):
2479         (WebCore::IDBBackingStore::open):
2480         (WebCore::IDBBackingStore::openInMemory):
2481         (WebCore::IDBBackingStore::create):
2482         (WebCore::IDBBackingStore::getDatabaseNames):
2483         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
2484         (WebCore::getNewDatabaseId):
2485         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
2486         (WebCore::IDBBackingStore::updateIDBDatabaseIntVersion):
2487         (WebCore::IDBBackingStore::updateIDBDatabaseMetaData):
2488         (WebCore::deleteRange):
2489         (WebCore::IDBBackingStore::deleteDatabase):
2490         (WebCore::checkObjectStoreAndMetaDataType):
2491         (WebCore::IDBBackingStore::getObjectStores):
2492         (WebCore::setMaxObjectStoreId):
2493         (WebCore::IDBBackingStore::createObjectStore):
2494         (WebCore::IDBBackingStore::deleteObjectStore):
2495         (WebCore::IDBBackingStore::getRecord):
2496         (WebCore::getNewVersionNumber):
2497         (WebCore::IDBBackingStore::putRecord):
2498         (WebCore::IDBBackingStore::clearObjectStore):
2499         (WebCore::IDBBackingStore::deleteRecord):
2500         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2501         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2502         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2503         (WebCore::checkIndexAndMetaDataKey):
2504         (WebCore::IDBBackingStore::getIndexes):
2505         (WebCore::setMaxIndexId):
2506         (WebCore::IDBBackingStore::createIndex):
2507         (WebCore::IDBBackingStore::deleteIndex):
2508         (WebCore::IDBBackingStore::putIndexDataForRecord):
2509         (WebCore::findGreatestKeyLessThanOrEqual):
2510         (WebCore::versionExists):
2511         (WebCore::IDBBackingStore::findKeyInIndex):
2512         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
2513         (WebCore::IDBBackingStore::keyExistsInIndex):
2514         (WebCore::IDBBackingStore::Cursor::Cursor):
2515         (WebCore::IDBBackingStore::Cursor::firstSeek):
2516         (WebCore::IDBBackingStore::Cursor::advance):
2517         (WebCore::IDBBackingStore::Cursor::continueFunction):
2518         (WebCore::IDBBackingStore::Cursor::haveEnteredRange):
2519         (WebCore::IDBBackingStore::Cursor::isPastBounds):
2520         (WebCore::ObjectStoreKeyCursorImpl::create):
2521         (WebCore::ObjectStoreKeyCursorImpl::clone):
2522         (WebCore::ObjectStoreKeyCursorImpl::value):
2523         (WebCore::ObjectStoreKeyCursorImpl::encodeKey):
2524         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
2525         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
2526         (WebCore::ObjectStoreCursorImpl::create):
2527         (WebCore::ObjectStoreCursorImpl::clone):
2528         (WebCore::ObjectStoreCursorImpl::value):
2529         (WebCore::ObjectStoreCursorImpl::encodeKey):
2530         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
2531         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
2532         (WebCore::IndexKeyCursorImpl::create):
2533         (WebCore::IndexKeyCursorImpl::clone):
2534         (WebCore::IndexKeyCursorImpl::value):
2535         (WebCore::IndexKeyCursorImpl::primaryKey):
2536         (WebCore::IndexKeyCursorImpl::recordIdentifier):
2537         (WebCore::IndexKeyCursorImpl::encodeKey):
2538         (WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
2539         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
2540         (WebCore::IndexCursorImpl::create):
2541         (WebCore::IndexCursorImpl::clone):
2542         (WebCore::IndexCursorImpl::value):
2543         (WebCore::IndexCursorImpl::primaryKey):
2544         (WebCore::IndexCursorImpl::recordIdentifier):
2545         (WebCore::IndexCursorImpl::encodeKey):
2546         (WebCore::IndexCursorImpl::IndexCursorImpl):
2547         (WebCore::IndexCursorImpl::loadCurrentRow):
2548         (WebCore::objectStoreCursorOptions):
2549         (WebCore::indexCursorOptions):
2550         (WebCore::IDBBackingStore::openObjectStoreCursor):
2551         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
2552         (WebCore::IDBBackingStore::openIndexKeyCursor):
2553         (WebCore::IDBBackingStore::openIndexCursor):
2554         (WebCore::IDBBackingStore::Transaction::Transaction):
2555         (WebCore::IDBBackingStore::Transaction::begin):
2556         (WebCore::IDBBackingStore::Transaction::commit):
2557         (WebCore::IDBBackingStore::Transaction::rollback):
2558         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp.
2559         (WebCore::IDBLevelDBCoding::encodeByte):
2560         (WebCore::IDBLevelDBCoding::decodeByte):
2561         (WebCore::IDBLevelDBCoding::maxIDBKey):
2562         (WebCore::IDBLevelDBCoding::minIDBKey):
2563         (WebCore::IDBLevelDBCoding::encodeBool):
2564         (WebCore::IDBLevelDBCoding::decodeBool):
2565         (WebCore::IDBLevelDBCoding::encodeInt):
2566         (WebCore::IDBLevelDBCoding::decodeInt):
2567         (WebCore::IDBLevelDBCoding::compareInts):
2568         (WebCore::IDBLevelDBCoding::encodeVarInt):
2569         (WebCore::IDBLevelDBCoding::decodeVarInt):
2570         (WebCore::IDBLevelDBCoding::encodeString):
2571         (WebCore::IDBLevelDBCoding::decodeString):
2572         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
2573         (WebCore::IDBLevelDBCoding::decodeStringWithLength):
2574         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength):
2575         (WebCore::IDBLevelDBCoding::encodeDouble):
2576         (WebCore::IDBLevelDBCoding::decodeDouble):
2577         (WebCore::IDBLevelDBCoding::encodeIDBKey):
2578         (WebCore::IDBLevelDBCoding::decodeIDBKey):
2579         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
2580         (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType):
2581         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
2582         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
2583         (WebCore::IDBLevelDBCoding::decodeIDBKeyPath):
2584         (WebCore::IDBLevelDBCoding::compare):
2585         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
2586         (WebCore::IDBLevelDBCoding::KeyPrefix::createWithSpecialIndex):
2587         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidDatabaseId):
2588         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidObjectStoreId):
2589         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidIndexId):
2590         (WebCore::IDBLevelDBCoding::KeyPrefix::decode):
2591         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeEmpty):
2592         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
2593         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeInternal):
2594         (WebCore::IDBLevelDBCoding::KeyPrefix::compare):
2595         (WebCore::IDBLevelDBCoding::KeyPrefix::type):
2596         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
2597         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
2598         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
2599         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::DatabaseFreeListKey):
2600         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode):
2601         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
2602         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
2603         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::databaseId):
2604         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::compare):
2605         (WebCore::IDBLevelDBCoding::DatabaseNameKey::decode):
2606         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
2607         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
2608         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
2609         (WebCore::IDBLevelDBCoding::DatabaseNameKey::compare):
2610         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
2611         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::ObjectStoreMetaDataKey):
2612         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode):
2613         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
2614         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
2615         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::objectStoreId):
2616         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
2617         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
2618         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::IndexMetaDataKey):
2619         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode):
2620         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
2621         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
2622         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::compare):
2623         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::indexId):
2624         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::ObjectStoreFreeListKey):
2625         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode):
2626         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
2627         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
2628         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::objectStoreId):
2629         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::compare):
2630         (WebCore::IDBLevelDBCoding::IndexFreeListKey::IndexFreeListKey):
2631         (WebCore::IDBLevelDBCoding::IndexFreeListKey::decode):
2632         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
2633         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
2634         (WebCore::IDBLevelDBCoding::IndexFreeListKey::compare):
2635         (WebCore::IDBLevelDBCoding::IndexFreeListKey::objectStoreId):
2636         (WebCore::IDBLevelDBCoding::IndexFreeListKey::indexId):
2637         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode):
2638         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
2639         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::compare):
2640         (WebCore::IDBLevelDBCoding::IndexNamesKey::IndexNamesKey):
2641         (WebCore::IDBLevelDBCoding::IndexNamesKey::decode):
2642         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
2643         (WebCore::IDBLevelDBCoding::IndexNamesKey::compare):
2644         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode):
2645         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
2646         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare):
2647         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::userKey):
2648         (WebCore::IDBLevelDBCoding::ExistsEntryKey::decode):
2649         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
2650         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare):
2651         (WebCore::IDBLevelDBCoding::ExistsEntryKey::userKey):
2652         (WebCore::IDBLevelDBCoding::IndexDataKey::IndexDataKey):
2653         (WebCore::IDBLevelDBCoding::IndexDataKey::decode):
2654         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
2655         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMinKey):
2656         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMaxKey):
2657         (WebCore::IDBLevelDBCoding::IndexDataKey::compare):
2658         (WebCore::IDBLevelDBCoding::IndexDataKey::databaseId):
2659         (WebCore::IDBLevelDBCoding::IndexDataKey::objectStoreId):
2660         (WebCore::IDBLevelDBCoding::IndexDataKey::indexId):
2661         (WebCore::IDBLevelDBCoding::IndexDataKey::userKey):
2662         (WebCore::IDBLevelDBCoding::IndexDataKey::primaryKey):
2663         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.h.
2664         (WebCore::IDBLevelDBCoding::encodeIntSafely):
2665         (WebCore::IDBLevelDBCoding::KeyPrefix::validIds):
2666         (WebCore::IDBLevelDBCoding::DatabaseNameKey::origin):
2667         (WebCore::IDBLevelDBCoding::DatabaseNameKey::databaseName):
2668         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::metaDataType):
2669         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::objectStoreName):
2670         (WebCore::IDBLevelDBCoding::IndexNamesKey::indexName):
2671
2672 2013-09-23  Antti Koivisto  <antti@apple.com>
2673
2674         Try to fix GTK build.
2675         
2676         Not reviewed.
2677
2678         * accessibility/atk/AccessibilityObjectAtk.cpp:
2679         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2680         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2681         (textForRenderer):
2682
2683 2013-09-23  Alexandru Chiculita  <achicu@adobe.com>
2684
2685         Web Inspector: [CSS Regions] Display CSS Regions flow name in the inspector overlay
2686         https://bugs.webkit.org/show_bug.cgi?id=121794
2687
2688         Reviewed by Joseph Pecoraro.
2689
2690         No new tests, the previous test for CSS Regions highlighting covers the flow name.
2691
2692         This patch adds the "Flow" property in the inspector overlay. The region
2693         chain is already displayed with numbers, so it makes sense to have the flow 
2694         name around when a CSS region is highlighted.
2695
2696         I've consolidated the flow information into "elementInfo.flowInfo". 
2697         Flow info has two properties: "name" and "regions".
2698
2699         * inspector/InspectorOverlay.cpp:
2700         (WebCore::buildObjectForCSSRegionsHighlight):
2701         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
2702         * inspector/InspectorOverlayPage.css:
2703         (.css-property): Added the CSS property font color that the Inspector uses.
2704         * inspector/InspectorOverlayPage.html: Added a new element to be used to display the flow-from property.
2705         * inspector/InspectorOverlayPage.js:
2706         (_drawElementTitle):
2707         (drawNodeHighlight):
2708
2709 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
2710
2711         Rapidly loading pages can result in !needsLayout() assertions in FrameView::paintContents() and RenderView::paint()
2712         https://bugs.webkit.org/show_bug.cgi?id=121725
2713         <rdar://problem/13982161> ASSERT(!needsLayout()) in WebCore::RenderView::paint (121196)
2714
2715         Reviewed by Dean Jackson.
2716         
2717         Layout has to be up-to-date before we paint, and when composited we rely on a
2718         CFRunLoopObserver owned by LayerFlushScheduler to enforce this. The contract is
2719         that changes to GraphicsLayers accumulate in those layers, and are all pushed to
2720         CALayers only inside of flushCompositingState(). CALayers must not be touched
2721         directly outside of flushCompositingState(), since this may trigger a CA commit
2722         and resultant painting without us having updated layout.
2723         
2724         In addition, we rely on the CA commits only happening after our runloop observer
2725         has fired in order for LayerFlushScheduler's suspend/resume to work (these are used
2726         for freezing the layer tree during page transitions).
2727         
2728         However, TileController was violating this contract. It called revalidateTiles()
2729         at random times, and on a timer. This would result in CA commits happening when
2730         layer flushing was suspended at the LayerFlushScheduler level, and thus before
2731         we'd had a chance to do layout.
2732         
2733         Fix by only ever revalidatingTiles inside of flushCompositingState(). Calls
2734         that used to result in revalidateTiles() at other times now just set a bit
2735         on GraphicsLayerCA to indicate that revalidation is required, and this triggers
2736         a later flush like any other GraphicsLayerCA change.
2737         
2738         There is one exception to the revalidate-inside-flush rule: when purging
2739         files for background tabs on a timer, we are only dealing with an unparented
2740         layer tree, so CALayer manipulation is safe at any time.
2741
2742         Very timing dependent, so hard to test.
2743
2744         * platform/graphics/TiledBacking.h: Expose revalidateTiles()
2745         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Remove
2746         platformCALayerDidCreateTiles() override.
2747         * platform/graphics/ca/GraphicsLayerCA.h: Keep track of m_isCommittingChanges
2748         so we can assert. Add TilingAreaChanged flag.
2749         * platform/graphics/ca/GraphicsLayerCA.cpp:
2750         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2751         (WebCore::GraphicsLayerCA::recursiveCommitChanges): noteSublayersChanged() is
2752         used inside of a commit in some cases to trigger a parent layer to update
2753         children after the children have been processed. To avoid trying to pointlessly
2754         schedule the flusher inside a flush, and for strong assertions, use a new flag
2755         that indicates that flushing is not required in this situation.
2756         Set the m_isCommittingChanges flag around committing state.
2757         (WebCore::GraphicsLayerCA::platformCALayerSetNeedsToRevalidateTiles): We used
2758         to use platformCALayerDidCreateTiles() to ensure that we would flush after adding
2759         new tiles to avoid garbage flashes. Now that we only ever create tiles inside
2760         a flush, this is no longer necessary.
2761         The new platformCALayerSetNeedsToRevalidateTiles() function just sets the
2762         TilingAreaChanged flag and triggers a flush.
2763         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
2764         visible rect, we look for the TilingAreaChanged flag to tell us whether to
2765         revalidate TiledBacking tiles.
2766         (WebCore::GraphicsLayerCA::ensureStructuralLayer): Use DontScheduleFlush when 
2767         telling a parent layer that it needs to reconsider sublayers.
2768         (WebCore::GraphicsLayerCA::updateTiles): The caller of revalidateTiles().
2769         (WebCore::GraphicsLayerCA::updateContentsRects): DontScheduleFlush again.
2770         (WebCore::GraphicsLayerCA::noteSublayersChanged): Pass scheduleFlush along.
2771         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged): Handle scheduleFlush.
2772         * platform/graphics/ca/PlatformCALayerClient.h:
2773         (WebCore::PlatformCALayerClient::platformCALayerSetNeedsToRevalidateTiles): Added
2774         so that TileController can call back out to GraphicsLayerCA.
2775         (WebCore::PlatformCALayerClient::isCommittingChanges):
2776         * platform/graphics/ca/mac/TileController.h: Need to keep track of secondary
2777         coverage rects in m_secondaryTileCoverageRects.
2778         * platform/graphics/ca/mac/TileController.mm:
2779         (WebCore::TileController::tileCacheLayerBoundsChanged): Just trigger a tile revalidate,
2780         which will happen later in this same commit.
2781         (WebCore::TileController::setScale): This is called inside the commit. Does an extra
2782         revalidate, which is needed to prune tiles. This could be optimized in future.
2783         (WebCore::TileController::setVisibleRect): Assert that we're inside a commit,
2784         and trigger a revalidate.
2785         (WebCore::TileController::setExposedRect): Trigger a revalidate.
2786         (WebCore::TileController::setClipsToExposedRect): Ditto.
2787         (WebCore::TileController::prepopulateRect): Save the rect and trigger a revalidate.
2788         (WebCore::TileController::setIsInWindow): If we're in the window, trigger a revalidate
2789         otherwise schedule the timer.
2790         (WebCore::TileController::revalidateTiles): Wrapper for the real revalidateTiles().
2791         (WebCore::TileController::tileRevalidationTimerFired): If we're in the window,
2792         schedule a revalidate. Otherwise our layer tree is disconnected, and it's OK to call revalidateTiles().
2793         (WebCore::TileController::setNeedsRevalidateTiles): Call through the client to GraphicsLayerCA
2794         which will schedule a layer tree flush.
2795         (WebCore::TileController::revalidateTiles):
2796         (WebCore::TileController::ensureTilesForRect): Move code from prepopulateRect
2797         into here; ensureTilesForRect() for each secondary rect, then clear the rects.
2798         No need to call platformCALayerDidCreateTiles() at the end.
2799         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Remove
2800         platformCALayerDidCreateTiles() override.
2801         * rendering/RenderLayerCompositor.cpp:
2802         (WebCore::RenderLayerCompositor::scheduleLayerFlush): This should only be
2803         called when we're not inside a flush, otherwise it will fail to schedule
2804         another one.
2805
2806 2013-09-23  Sam Weinig  <sam@webkit.org>
2807
2808         CTTE: htmlediting.h Element creation function should take a Document&
2809         https://bugs.webkit.org/show_bug.cgi?id=121800
2810
2811         Reviewed by Antti Koivisto.
2812
2813         Thread the Document&!
2814
2815 2013-09-23  Jacky Jiang  <zhajiang@blackberry.com>
2816
2817         [BlackBerry] Poor rendering opening a Google map short link
2818         https://bugs.webkit.org/show_bug.cgi?id=121687
2819
2820         Reviewed by Yong Li.
2821         Internally reviewed by Liam Quinn and Joe Mason.
2822
2823         Fix a regression. It turns out that LayerCompositingThread already has
2824         an API named isVisible() which by default returns false. So rename the
2825         one in the LayerData to isLayerVisible().
2826
2827         * platform/graphics/blackberry/LayerData.h:
2828         (WebCore::LayerData::isLayerVisible):
2829         * platform/graphics/blackberry/LayerRenderer.cpp:
2830         (WebCore::LayerRenderer::compositeLayersRecursive):
2831
2832 2013-09-23  Antti Koivisto  <antti@apple.com>
2833
2834         Rename RenderObject::first/lastChild to RenderObject::first/lastChildSlow
2835         https://bugs.webkit.org/show_bug.cgi?id=121784
2836
2837         Reviewed by Andreas Kling.
2838
2839         This will make it obvious in code where typing should be tightened.
2840         Handled some simple cases by tightening the code instead of renaming.
2841
2842 2013-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
2843
2844         [Texmap] Reloading a webgl page doesn't work
2845         https://bugs.webkit.org/show_bug.cgi?id=120593
2846
2847         Reviewed by Noam Rosenthal.
2848
2849         Let GraphicsLayerTextureMapper know it needs to detach the platform layer when a GraphicsContext3D is destroyed.
2850
2851         Test: fast/canvas/webgl/webgl-reload-crash.html
2852
2853         * platform/graphics/GraphicsContext3DPrivate.cpp:
2854         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2855         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2856         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
2857
2858 2013-09-23  Antti Koivisto  <antti@apple.com>
2859
2860         Remove RenderObjectChildList
2861         https://bugs.webkit.org/show_bug.cgi?id=121771
2862
2863         Reviewed by Darin Adler.
2864
2865         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
2866         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
2867         
2868         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
2869
2870 2013-09-23  Andreas Kling  <akling@apple.com>
2871
2872         Document::destroyRenderTree() shouldn't do anything but.
2873         <https://webkit.org/b/121786>
2874
2875         Reviewed by Anders Carlsson.
2876
2877         Move everything in destroyRenderTree() that doesn't actually destroy
2878         render trees to prepareForDestruction() instead.
2879
2880         Destroying the render tree is now a reparable operation.
2881
2882 2013-09-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2883
2884         [Qt] Tiled backing-store causes wrong translation
2885         https://bugs.webkit.org/show_bug.cgi?id=121789
2886
2887         Reviewed by Noam Rosenthal.
2888
2889         Move the translation inside save/restore of the GraphicsContext.
2890
2891         * platform/graphics/qt/TileQt.cpp:
2892         (WebCore::TileQt::updateBackBuffer):
2893
2894 2013-09-23  Andreas Kling  <akling@apple.com>
2895
2896         Unify code paths leading to render tree teardown.
2897         <https://webkit.org/b/121785>
2898
2899         Reviewed by Antti Koivisto.
2900
2901         Make Document::prepareForDestruction() fit all the call sites that were
2902         doing destroyRenderTree() + disconnectFromFrame().
2903
2904         - disconnectDescendantFrames() is already a no-op if there are no frames.
2905         - willDetachDocumentFromFrame() will only run if there is a frame.
2906
2907         This is another step towards making tree rebuild possible.
2908
2909         Removed some age-old FIXMEs about why we aren't calling willRemove(),
2910         a long-gone function.
2911
2912 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
2913
2914         Cleanup CMake files in WebCore
2915         https://bugs.webkit.org/show_bug.cgi?id=119262
2916
2917         Reviewed by Gyuyoung Kim.
2918
2919         Sort files and unify style.
2920
2921         * CMakeLists.txt:
2922         * PlatformBlackBerry.cmake:
2923         * PlatformEfl.cmake:
2924         * PlatformGTK.cmake:
2925         * PlatformWin.cmake:
2926         * PlatformWinCE.cmake:
2927
2928 2013-09-22  Commit Queue  <commit-queue@webkit.org>
2929
2930         Unreviewed, rolling out r156254.
2931         http://trac.webkit.org/changeset/156254
2932         https://bugs.webkit.org/show_bug.cgi?id=121779
2933
2934         Caused assertions in fast/regions tests (Requested by ap on
2935         #webkit).
2936
2937         * CMakeLists.txt:
2938         * GNUmakefile.list.am:
2939         * Target.pri:
2940         * WebCore.vcxproj/WebCore.vcxproj:
2941         * WebCore.xcodeproj/project.pbxproj:
2942         * rendering/AutoTableLayout.cpp:
2943         (WebCore::AutoTableLayout::recalcColumn):
2944         * rendering/RenderBlock.cpp:
2945         (WebCore::RenderBlock::willBeDestroyed):
2946         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
2947         (WebCore::RenderBlock::splitBlocks):
2948         (WebCore::RenderBlock::splitFlow):
2949         (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks):
2950         (WebCore::RenderBlock::makeChildrenNonInline):
2951         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
2952         (WebCore::RenderBlock::collapseAnonymousBoxChild):
2953         (WebCore::RenderBlock::removeChild):
2954         (WebCore::RenderBlock::updateFirstLetterStyle):
2955         * rendering/RenderBlock.h:
2956         (WebCore::RenderBlock::firstChild):
2957         (WebCore::RenderBlock::lastChild):
2958         * rendering/RenderBox.cpp:
2959         (WebCore::RenderBox::splitAnonymousBoxesAroundChild):
2960         * rendering/RenderBoxModelObject.cpp:
2961         (WebCore::RenderBoxModelObject::moveChildTo):
2962         * rendering/RenderElement.cpp:
2963         (WebCore::RenderElement::RenderElement):
2964         (WebCore::RenderElement::addChild):
2965         (WebCore::RenderElement::removeChild):
2966         * rendering/RenderElement.h:
2967         * rendering/RenderEmbeddedObject.cpp:
2968         (WebCore::RenderEmbeddedObject::layout):
2969         * rendering/RenderEmbeddedObject.h:
2970         * rendering/RenderFrameSet.h:
2971         * rendering/RenderInline.cpp:
2972         (WebCore::RenderInline::willBeDestroyed):
2973         (WebCore::RenderInline::splitInlines):
2974         (WebCore::RenderInline::splitFlow):
2975         (WebCore::RenderInline::childBecameNonInline):
2976         * rendering/RenderInline.h:
2977         (WebCore::RenderInline::firstChild):
2978         (WebCore::RenderInline::lastChild):
2979         * rendering/RenderLayerModelObject.cpp:
2980         (WebCore::RenderLayerModelObject::willBeDestroyed):
2981         * rendering/RenderLineBreak.h:
2982         * rendering/RenderListMarker.h:
2983         * rendering/RenderMedia.cpp:
2984         (WebCore::RenderMedia::layout):
2985         * rendering/RenderMedia.h:
2986         (WebCore::RenderMedia::firstChild):
2987         (WebCore::RenderMedia::lastChild):
2988         * rendering/RenderObject.cpp:
2989         (WebCore::RenderObject::handleDynamicFloatPositionChange):
2990         (WebCore::RenderObject::willBeDestroyed):
2991         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
2992         * rendering/RenderObject.h:
2993         (WebCore::RenderObject::firstChild):
2994         (WebCore::RenderObject::lastChild):
2995         (WebCore::RenderObject::children):
2996         (WebCore::RenderObject::canHaveChildren):
2997         * rendering/RenderObjectChildList.cpp: Added.
2998         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
2999         (WebCore::RenderObjectChildList::removeChildNode):
3000         (WebCore::RenderObjectChildList::insertChildNode):
3001         * rendering/RenderObjectChildList.h: Copied from Source/WebCore/rendering/RenderMedia.h.
3002         (WebCore::RenderObjectChildList::RenderObjectChildList):
3003         (WebCore::RenderObjectChildList::firstChild):
3004         (WebCore::RenderObjectChildList::lastChild):
3005         (WebCore::RenderObjectChildList::setFirstChild):
3006         (WebCore::RenderObjectChildList::setLastChild):
3007         (WebCore::RenderObjectChildList::appendChildNode):
3008         * rendering/RenderReplaced.h:
3009         (WebCore::RenderReplaced::canHaveChildren):
3010         * rendering/RenderReplica.h:
3011         * rendering/RenderRubyBase.cpp:
3012         (WebCore::RenderRubyBase::moveInlineChildren):
3013         (WebCore::RenderRubyBase::moveBlockChildren):
3014         * rendering/RenderTableCol.h:
3015         * rendering/RenderTableRow.h:
3016         * rendering/RenderTableSection.h:
3017         * rendering/RenderText.h:
3018         * rendering/RenderingAllInOne.cpp:
3019         * rendering/mathml/RenderMathMLOperator.cpp:
3020         (WebCore::RenderMathMLOperator::updateFromElement):
3021         * rendering/svg/RenderSVGContainer.h:
3022         (WebCore::RenderSVGContainer::firstChild):
3023         (WebCore::RenderSVGContainer::lastChild):
3024         * rendering/svg/RenderSVGGradientStop.h:
3025         * rendering/svg/RenderSVGImage.h:
3026         * rendering/svg/RenderSVGModelObject.cpp:
3027         (WebCore::RenderSVGModelObject::willBeDestroyed):
3028         * rendering/svg/RenderSVGRoot.h:
3029         * rendering/svg/RenderSVGShape.h:
3030
3031 2013-09-22  Commit Queue  <commit-queue@webkit.org>
3032
3033         Unreviewed, rolling out r156253.
3034         http://trac.webkit.org/changeset/156253
3035         https://bugs.webkit.org/show_bug.cgi?id=121778
3036
3037         Caused >20 tests to crash with assertion failures (Requested
3038         by ap on #webkit).
3039
3040         * css/CSSAspectRatioValue.h:
3041         * css/CSSBorderImageSliceValue.h:
3042         * css/CSSCalculationValue.cpp:
3043         (WebCore::CSSCalcExpressionNodeParser::parseValue):
3044         * css/CSSCalculationValue.h:
3045         * css/CSSCrossfadeValue.cpp:
3046         (WebCore::subimageKnownToBeOpaque):
3047         * css/CSSCrossfadeValue.h:
3048         (WebCore::toCSSCrossfadeValue):
3049         * css/CSSCursorImageValue.cpp:
3050         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
3051         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
3052         (WebCore::CSSCursorImageValue::cachedImage):
3053         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
3054         (WebCore::CSSCursorImageValue::isSVGCursor):
3055         * css/CSSCursorImageValue.h:
3056         * css/CSSFilterImageValue.h:
3057         (WebCore::toCSSFilterImageValue):
3058         * css/CSSFontSelector.cpp:
3059         (WebCore::CSSFontSelector::addFontFaceRule):
3060         * css/CSSGradientValue.h:
3061         * css/CSSImageGeneratorValue.cpp:
3062         (WebCore::CSSImageGeneratorValue::image):
3063         (WebCore::CSSImageGeneratorValue::fixedSize):
3064         (WebCore::CSSImageGeneratorValue::loadSubimages):
3065         (WebCore::CSSImageGeneratorValue::subimageIsPending):
3066         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
3067         * css/CSSImageGeneratorValue.h:
3068         * css/CSSImageSetValue.cpp:
3069         (WebCore::CSSImageSetValue::fillImageSet):
3070         * css/CSSImageSetValue.h:
3071         * css/CSSImageValue.h:
3072         * css/CSSInheritedValue.h:
3073         * css/CSSInitialValue.h:
3074         * css/CSSLineBoxContainValue.h:
3075         * css/CSSParser.cpp:
3076         (WebCore::CSSParser::parseColor):
3077         (WebCore::CSSParser::addProperty):
3078         (WebCore::CSSParser::parse3ValuesFillPosition):
3079         (WebCore::CSSParser::parseFillPosition):
3080         (WebCore::CSSParser::parseFillRepeat):
3081         (WebCore::CSSParser::parseDeprecatedRadialGradient):
3082         (WebCore::CSSParser::parseRadialGradient):
3083         * css/CSSPrimitiveValue.h:
3084         * css/CSSReflectValue.h:
3085         * css/CSSToStyleMap.cpp:
3086         (WebCore::CSSToStyleMap::mapFillAttachment):
3087         (WebCore::CSSToStyleMap::mapFillClip):
3088         (WebCore::CSSToStyleMap::mapFillComposite):
3089         (WebCore::CSSToStyleMap::mapFillBlendMode):
3090         (WebCore::CSSToStyleMap::mapFillOrigin):
3091         (WebCore::CSSToStyleMap::mapFillRepeatX):
3092         (WebCore::CSSToStyleMap::mapFillRepeatY):
3093         (WebCore::CSSToStyleMap::mapFillSize):
3094         (WebCore::CSSToStyleMap::mapFillXPosition):
3095         (WebCore::CSSToStyleMap::mapFillYPosition):
3096         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
3097         (WebCore::CSSToStyleMap::mapAnimationDelay):
3098         (WebCore::CSSToStyleMap::mapAnimationDirection):
3099         (WebCore::CSSToStyleMap::mapAnimationDuration):
3100         (WebCore::CSSToStyleMap::mapAnimationFillMode):
3101         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
3102         (WebCore::CSSToStyleMap::mapAnimationName):
3103         (WebCore::CSSToStyleMap::mapAnimationPlayState):
3104         (WebCore::CSSToStyleMap::mapAnimationProperty):
3105         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3106         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
3107         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
3108         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
3109         * css/CSSValue.cpp:
3110         (WebCore::CSSValue::destroy):
3111         * css/CSSValue.h:
3112         (WebCore::CSSValue::isCSSLineBoxContainValue):
3113         (WebCore::CSSValue::isCalculationValue):
3114         * css/CSSValueList.h:
3115         * css/CSSVariableValue.h:
3116         * css/DeprecatedStyleBuilder.cpp:
3117         (WebCore::ApplyPropertyDefault::applyValue):
3118         (WebCore::ApplyPropertyNumber::applyValue):
3119         (WebCore::ApplyPropertyAuto::applyValue):
3120         (WebCore::ApplyPropertyClip::applyValue):
3121         (WebCore::ApplyPropertyColor::applyValue):
3122         (WebCore::ApplyPropertyLength::applyValue):
3123         (WebCore::ApplyPropertyString::applyValue):
3124         (WebCore::ApplyPropertyBorderRadius::applyValue):
3125         (WebCore::ApplyPropertyComputeLength::applyValue):
3126         (WebCore::ApplyPropertyFont::applyValue):
3127         (WebCore::ApplyPropertyFontFamily::applyValue):
3128         (WebCore::ApplyPropertyFontSize::applyValue):
3129         (WebCore::ApplyPropertyFontWeight::applyValue):
3130         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
3131         (WebCore::ApplyPropertyCounter::applyValue):
3132         (WebCore::ApplyPropertyCursor::applyValue):
3133         (WebCore::ApplyPropertyTextAlign::applyValue):
3134         (WebCore::ApplyPropertyTextDecoration::applyValue):
3135         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
3136         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
3137         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
3138         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
3139         (WebCore::ApplyPropertyLineHeight::applyValue):
3140         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
3141         (WebCore::ApplyPropertyPageSize::applyValue):
3142         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
3143         (WebCore::ApplyPropertyResize::applyValue):
3144         (WebCore::ApplyPropertyVerticalAlign::applyValue):
3145         (WebCore::ApplyPropertyAspectRatio::applyValue):
3146         (WebCore::ApplyPropertyZoom::applyValue):
3147         (WebCore::ApplyPropertyDisplay::applyValue):
3148         (WebCore::ApplyPropertyClipPath::applyValue):
3149         (WebCore::ApplyPropertyShape::applyValue):
3150         (WebCore::ApplyPropertyImageResolution::applyValue):
3151         (WebCore::ApplyPropertyTextIndent::applyValue):
3152         * css/FontFeatureValue.h:
3153         * css/FontValue.h:
3154         * css/MediaList.cpp:
3155         (WebCore::reportMediaQueryWarningIfNeeded):
3156         * css/MediaQueryEvaluator.cpp:
3157         (WebCore::compareAspectRatioValue):
3158         (WebCore::numberValue):
3159         (WebCore::orientationMediaFeatureEval):
3160         (WebCore::evalResolution):
3161         (WebCore::device_pixel_ratioMediaFeatureEval):
3162         (WebCore::resolutionMediaFeatureEval):
3163         (WebCore::computeLength):
3164         (WebCore::view_modeMediaFeatureEval):
3165         (WebCore::pointerMediaFeatureEval):
3166         * css/SVGCSSStyleSelector.cpp:
3167         (WebCore::StyleResolver::applySVGProperty):
3168         * css/ShadowValue.h:
3169         * css/StylePropertySet.cpp:
3170         (WebCore::StylePropertySet::getLayeredShorthandValue):
3171         * css/StyleResolver.cpp:
3172         (WebCore::createGridTrackSize):
3173         (WebCore::createGridTrackList):
3174         (WebCore::createGridPosition):
3175         (WebCore::hasVariableReference):
3176         (WebCore::StyleResolver::applyProperty):
3177         (WebCore::StyleResolver::styleImage):
3178         (WebCore::StyleResolver::generatedOrPendingFromValue):
3179         (WebCore::StyleResolver::styleShader):
3180         (WebCore::StyleResolver::parseCustomFilterArrayParameter):
3181         (WebCore::StyleResolver::parseCustomFilterColorParameter):
3182         (WebCore::StyleResolver::parseCustomFilterNumberParameter):
3183         (WebCore::StyleResolver::parseCustomFilterParameter):
3184         (WebCore::StyleResolver::parseCustomFilterParameterList):
3185         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
3186         (WebCore::StyleResolver::createFilterOperations):
3187         * css/TransformFunctions.cpp:
3188         (WebCore::transformsForValue):
3189         * css/ViewportStyleResolver.cpp:
3190         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
3191         * css/WebKitCSSMatrix.cpp:
3192         (WebCore::WebKitCSSMatrix::setMatrixValue):
3193         * editing/ApplyStyleCommand.cpp:
3194         (WebCore::ApplyStyleCommand::computedFontSize):
3195         * editing/EditingStyle.cpp:
3196         (WebCore::identifierForStyleProperty):
3197         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
3198         (WebCore::cssValueToRGBA):
3199         (WebCore::EditingStyle::extractFontSizeDelta):
3200         (WebCore::EditingStyle::textDirection):
3201         (WebCore::EditingStyle::prepareToApplyAt):
3202         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
3203         (WebCore::EditingStyle::legacyFontSize):
3204         (WebCore::EditingStyle::textDirectionForSelection):
3205         (WebCore::StyleChange::extractTextStyles):
3206         (WebCore::fontWeightIsBold):
3207         (WebCore::isTransparentColorValue):
3208         * editing/markup.cpp:
3209         (WebCore::propertyMissingOrEqualToNone):
3210         * page/PageSerializer.cpp:
3211         (WebCore::PageSerializer::retrieveResourcesForProperties):
3212         * rendering/style/StylePendingImage.h:
3213         (WebCore::StylePendingImage::data):
3214         (WebCore::StylePendingImage::cssImageValue):
3215         (WebCore::StylePendingImage::cssImageGeneratorValue):
3216         (WebCore::StylePendingImage::cssCursorImageValue):
3217         (WebCore::StylePendingImage::cssImageSetValue):
3218
3219 2013-09-22  Commit Queue  <commit-queue@webkit.org>
3220
3221         Unreviewed, rolling out r156257.
3222         http://trac.webkit.org/changeset/156257
3223         https://bugs.webkit.org/show_bug.cgi?id=121777
3224
3225         The test from this patch fails (Requested by ap on #webkit).
3226
3227         * rendering/RenderBox.cpp:
3228         (WebCore::RenderBox::calculateAutoscrollDirection):
3229
3230 2013-09-22  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3231
3232         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
3233         https://bugs.webkit.org/show_bug.cgi?id=40981
3234
3235         Reviewed by Darin Adler.
3236
3237         RenderBox::calculateAutoscrollDirection does not properly translate
3238         inner frames' coordinates in order to determine its auto-scrollability.
3239         By coincidence, if the inner frame box it placed near to page's 0, 0 position
3240         (upper left corner), it might work.
3241
3242         Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
3243         with window coordinates, taking inner frames offset and scroll position into account.
3244         The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
3245         as it is used to.
3246
3247         Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
3248
3249         * rendering/RenderBox.cpp:
3250         (WebCore::RenderBox::calculateAutoscrollDirection):
3251
3252 2013-09-22  Sam Weinig  <sam@webkit.org>
3253
3254         CTTE: Use references more in ContainerNode, ContainerNodeAlgorithms and related classes
3255         https://bugs.webkit.org/show_bug.cgi?id=121772
3256
3257         Reviewed by Andreas Kling.
3258
3259         Use references for never null Nodes in ContainerNode and related classes.
3260
3261 2013-09-22  Antti Koivisto  <antti@apple.com>
3262
3263         Fix functions calling to RenderObject superclass to call RenderElement instead
3264         https://bugs.webkit.org/show_bug.cgi?id=121773
3265
3266         Reviewed by Andreas Kling.
3267
3268         The class hierarchy has a new class. Superclass calls should be pointed there instead to
3269         avoid future bugs.
3270
3271         * rendering/RenderBoxModelObject.cpp:
3272         (WebCore::RenderBoxModelObject::setSelectionState):
3273         * rendering/RenderLayerModelObject.cpp:
3274         (WebCore::RenderLayerModelObject::styleWillChange):
3275         (WebCore::RenderLayerModelObject::styleDidChange):
3276         * rendering/svg/RenderSVGGradientStop.cpp:
3277         (WebCore::RenderSVGGradientStop::styleDidChange):
3278         * rendering/svg/RenderSVGModelObject.cpp:
3279         (WebCore::RenderSVGModelObject::styleWillChange):
3280         (WebCore::RenderSVGModelObject::styleDidChange):
3281
3282 2013-09-22  Antti Koivisto  <antti@apple.com>
3283
3284         Remove RenderObjectChildList
3285         https://bugs.webkit.org/show_bug.cgi?id=121771
3286
3287         Reviewed by Darin Adler.
3288
3289         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
3290         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
3291         
3292         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
3293
3294 2013-09-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3295
3296         Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
3297         https://bugs.webkit.org/show_bug.cgi?id=121462
3298
3299         Reviewed by Andreas Kling.
3300
3301         As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
3302         by css value type casting as well. This type cast macros will help to detect
3303         bad-cast bugs as well as improve a code readibility.
3304
3305         This patch adds the following methods,
3306
3307         - CSSFooValue* toCSSFooValue(CSSValue*)
3308         - const CSSFooValue* toCSSFooValue(const CSSValue*)
3309
3310         To be consistent with other is*Value() naming style, isCSSLineBoxContainValue() and isCalculationValue()
3311         are changed with isLineBoxContainValue() and isCalcValue().
3312
3313         FontValue, FontFeatureValue, ShadowValue have a manual type case function because of different
3314         class naming style. So, toFontValue(), toFontFeatureValue() and toShadowValue() are added manually.
3315
3316         This patch removes unnecessary local variables.
3317
3318         No new tests, no behavior change.
3319
3320         * css/CSSAspectRatioValue.h:
3321         * css/CSSBorderImageSliceValue.h:
3322         * css/CSSCalculationValue.cpp:
3323         (WebCore::CSSCalcExpressionNodeParser::parseValue):
3324         * css/CSSCalculationValue.h:
3325         * css/CSSCrossfadeValue.cpp:
3326         (WebCore::subimageKnownToBeOpaque):
3327         * css/CSSCrossfadeValue.h:
3328         * css/CSSCursorImageValue.cpp:
3329         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
3330         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
3331         (WebCore::CSSCursorImageValue::cachedImage):
3332         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
3333         (WebCore::CSSCursorImageValue::isSVGCursor):
3334         * css/CSSCursorImageValue.h:
3335         * css/CSSFilterImageValue.h:
3336         * css/CSSFontSelector.cpp:
3337         (WebCore::CSSFontSelector::addFontFaceRule):
3338         * css/CSSGradientValue.h:
3339         * css/CSSImageGeneratorValue.cpp:
3340         (WebCore::CSSImageGeneratorValue::image):
3341         (WebCore::CSSImageGeneratorValue::fixedSize):
3342         (WebCore::CSSImageGeneratorValue::loadSubimages):
3343         (WebCore::CSSImageGeneratorValue::subimageIsPending):
3344         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
3345         * css/CSSImageGeneratorValue.h:
3346         * css/CSSImageSetValue.cpp:
3347         (WebCore::CSSImageSetValue::fillImageSet):
3348         * css/CSSImageSetValue.h:
3349         * css/CSSImageValue.h:
3350         * css/CSSInheritedValue.h:
3351         * css/CSSInitialValue.h:
3352         * css/CSSLineBoxContainValue.h:
3353         * css/CSSParser.cpp:
3354         (WebCore::CSSParser::parseColor):
3355         (WebCore::CSSParser::addProperty):
3356         (WebCore::CSSParser::parse3ValuesFillPosition):
3357         (WebCore::CSSParser::parseFillPosition):
3358         (WebCore::CSSParser::parseFillRepeat):
3359         (WebCore::CSSParser::parseDeprecatedRadialGradient):
3360         (WebCore::CSSParser::parseRadialGradient):
3361         * css/CSSPrimitiveValue.h:
3362         * css/CSSReflectValue.h:
3363         * css/CSSToStyleMap.cpp:
3364         (WebCore::CSSToStyleMap::mapFillAttachment):
3365         (WebCore::CSSToStyleMap::mapFillClip):
3366         (WebCore::CSSToStyleMap::mapFillComposite):
3367         (WebCore::CSSToStyleMap::mapFillBlendMode):
3368         (WebCore::CSSToStyleMap::mapFillOrigin):
3369         (WebCore::CSSToStyleMap::mapFillRepeatX):
3370         (WebCore::CSSToStyleMap::mapFillRepeatY):
3371         (WebCore::CSSToStyleMap::mapFillSize):
3372         (WebCore::CSSToStyleMap::mapFillXPosition):
3373         (WebCore::CSSToStyleMap::mapFillYPosition):
3374         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
3375         (WebCore::CSSToStyleMap::mapAnimationDelay):
3376         (WebCore::CSSToStyleMap::mapAnimationDirection):
3377         (WebCore::CSSToStyleMap::mapAnimationDuration):
3378         (WebCore::CSSToStyleMap::mapAnimationFillMode):
3379         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
3380         (WebCore::CSSToStyleMap::mapAnimationName):
3381         (WebCore::CSSToStyleMap::mapAnimationPlayState):
3382         (WebCore::CSSToStyleMap::mapAnimationProperty):
3383         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3384         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
3385         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
3386         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
3387         * css/CSSValue.cpp:
3388         (WebCore::CSSValue::destroy):
3389         * css/CSSValue.h:
3390         (WebCore::CSSValue::isLineBoxContainValue):
3391         (WebCore::CSSValue::isCalcValue):
3392         * css/CSSValueList.h:
3393         * css/CSSVariableValue.h:
3394         * css/DeprecatedStyleBuilder.cpp:
3395         (WebCore::ApplyPropertyDefault::applyValue):
3396         (WebCore::ApplyPropertyNumber::applyValue):
3397         (WebCore::ApplyPropertyAuto::applyValue):
3398         (WebCore::ApplyPropertyClip::applyValue):
3399         (WebCore::ApplyPropertyColor::applyValue):
3400         (WebCore::ApplyPropertyLength::applyValue):
3401         (WebCore::ApplyPropertyString::applyValue):
3402         (WebCore::ApplyPropertyBorderRadius::applyValue):
3403         (WebCore::ApplyPropertyComputeLength::applyValue):
3404         (WebCore::ApplyPropertyFont::applyValue):
3405         (WebCore::ApplyPropertyFontFamily::applyValue):
3406         (WebCore::ApplyPropertyFontSize::applyValue):
3407         (WebCore::ApplyPropertyFontWeight::applyValue):
3408         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
3409         (WebCore::ApplyPropertyCounter::applyValue):
3410         (WebCore::ApplyPropertyCursor::applyValue):
3411         (WebCore::ApplyPropertyTextAlign::applyValue):
3412         (WebCore::ApplyPropertyTextDecoration::applyValue):
3413         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
3414         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
3415         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
3416         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
3417         (WebCore::ApplyPropertyLineHeight::applyValue):
3418         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
3419         (WebCore::ApplyPropertyPageSize::applyValue):
3420         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
3421         (WebCore::ApplyPropertyResize::applyValue):
3422         (WebCore::ApplyPropertyVerticalAlign::applyValue):
3423         (WebCore::ApplyPropertyAspectRatio::applyValue):
3424         (WebCore::ApplyPropertyZoom::applyValue):
3425         (WebCore::ApplyPropertyDisplay::applyValue):
3426         (WebCore::ApplyPropertyClipPath::applyValue):
3427         (WebCore::ApplyPropertyShape::applyValue):
3428         (WebCore::ApplyPropertyImageResolution::applyValue):
3429         (WebCore::ApplyPropertyTextIndent::applyValue):
3430         * css/FontFeatureValue.h:
3431         (WebCore::toFontFeatureValue):
3432         * css/FontValue.h:
3433         (WebCore::toFontValue):
3434         * css/MediaList.cpp:
3435         (WebCore::reportMediaQueryWarningIfNeeded):
3436         * css/MediaQueryEvaluator.cpp:
3437         (WebCore::compareAspectRatioValue):
3438         (WebCore::numberValue):
3439         (WebCore::orientationMediaFeatureEval):
3440         (WebCore::evalResolution):
3441         (WebCore::device_pixel_ratioMediaFeatureEval):
3442         (WebCore::resolutionMediaFeatureEval):
3443         (WebCore::computeLength):
3444         (WebCore::view_modeMediaFeatureEval):
3445         (WebCore::pointerMediaFeatureEval):
3446         * css/SVGCSSStyleSelector.cpp:
3447         (WebCore::StyleResolver::applySVGProperty):
3448         * css/ShadowValue.h:
3449         (WebCore::toShadowValue):
3450         * css/StylePropertySet.cpp:
3451         (WebCore::StylePropertySet::getLayeredShorthandValue):
3452         * css/StyleResolver.cpp:
3453         (WebCore::createGridTrackSize):
3454         (WebCore::createGridTrackList):
3455         (WebCore::createGridPosition):
3456         (WebCore::hasVariableReference):
3457         (WebCore::StyleResolver::applyProperty):
3458         (WebCore::StyleResolver::styleImage):
3459         (WebCore::StyleResolver::generatedOrPendingFromValue):
3460         (WebCore::StyleResolver::styleShader):
3461         (WebCore::StyleResolver::parseCustomFilterArrayParameter):
3462         (WebCore::StyleResolver::parseCustomFilterColorParameter):
3463         (WebCore::StyleResolver::parseCustomFilterNumberParameter):
3464         (WebCore::StyleResolver::parseCustomFilterParameter):
3465         (WebCore::StyleResolver::parseCustomFilterParameterList):
3466         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
3467         (WebCore::StyleResolver::createFilterOperations):
3468         * css/TransformFunctions.cpp:
3469         (WebCore::transformsForValue):
3470         * css/ViewportStyleResolver.cpp:
3471         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
3472         * css/WebKitCSSMatrix.cpp:
3473         (WebCore::WebKitCSSMatrix::setMatrixValue):
3474         * css/WebKitCSSShaderValue.h:
3475         (WebCore::toWebKitCSSShaderValue):
3476         * editing/ApplyStyleCommand.cpp:
3477         (WebCore::ApplyStyleCommand::computedFontSize):
3478         * editing/EditingStyle.cpp:
3479         (WebCore::identifierForStyleProperty):
3480         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
3481         (WebCore::cssValueToRGBA):
3482         (WebCore::EditingStyle::extractFontSizeDelta):
3483         (WebCore::EditingStyle::textDirection):
3484         (WebCore::EditingStyle::prepareToApplyAt):
3485         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
3486         (WebCore::EditingStyle::legacyFontSize):
3487         (WebCore::EditingStyle::textDirectionForSelection):
3488         (WebCore::StyleChange::extractTextStyles):
3489         (WebCore::fontWeightIsBold):
3490         (WebCore::isTransparentColorValue):
3491         * editing/markup.cpp:
3492         (WebCore::propertyMissingOrEqualToNone):
3493         * page/PageSerializer.cpp:
3494         (WebCore::PageSerializer::retrieveResourcesForProperties):
3495         * rendering/style/StylePendingImage.h:
3496         (WebCore::StylePendingImage::data):
3497         (WebCore::StylePendingImage::cssImageValue):
3498         (WebCore::StylePendingImage::cssImageGeneratorValue):
3499         (WebCore::StylePendingImage::cssCursorImageValue):
3500         (WebCore::StylePendingImage::cssImageSetValue):
3501
3502 2013-09-22  Arunprasad Rajkumar  <ararunprasad@gmail.com>
3503
3504         Hiding a focused element should unfocus it and fire a blur event
3505         https://bugs.webkit.org/show_bug.cgi?id=29241
3506
3507         Reviewed by Darin Adler.
3508
3509         Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
3510
3511         We check whether the current focus element is really focusable after
3512         the style recalculation and layout change. If it is not focusable then schedule a
3513         timer to reset it asynchronously.
3514
3515         * dom/Document.cpp:
3516         (WebCore::Document::Document):
3517         (WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
3518         style recalculation.
3519         (WebCore::Document::updateLayout): Check isFocusable() on the focus element after
3520         layout.
3521         (WebCore::Document::resetHiddenFocusElementSoon):
3522         (WebCore::Document::resetHiddenFocusElementTimer):
3523         * dom/Document.h:
3524
3525 2013-09-22  Sam Weinig  <sam@webkit.org>
3526
3527         CTTE: StaticNodeLists often contain only Elements, we shouldn't store them as Vector<RefPtr<Node>> in those cases
3528         https://bugs.webkit.org/show_bug.cgi?id=121769
3529
3530         Reviewed by Andreas Kling.
3531
3532         Introduces StaticElementList and uses it.
3533
3534         * accessibility/AccessibilityRenderObject.cpp:
3535         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
3536         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3537         (WebCore::getNamedItems):
3538         * bindings/js/JSHTMLCollectionCustom.cpp:
3539         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3540         (WebCore::getNamedItems):
3541         * bindings/js/JSHTMLFormElementCustom.cpp:
3542         (WebCore::JSHTMLFormElement::nameGetter):
3543         * dom/SelectorQuery.cpp:
3544         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
3545         (WebCore::SelectorDataList::queryAll):
3546         * dom/StaticNodeList.cpp:
3547         (WebCore::StaticElementList::length):
3548         (WebCore::StaticElementList::item):
3549         (WebCore::StaticElementList::namedItem):
3550         * dom/StaticNodeList.h:
3551         * dom/WebKitNamedFlow.cpp:
3552         (WebCore::WebKitNamedFlow::getRegionsByContent):
3553         (WebCore::WebKitNamedFlow::getRegions):
3554         (WebCore::WebKitNamedFlow::getContent):
3555         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
3556         (WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
3557         * html/HTMLCollection.cpp:
3558         (WebCore::HTMLCollection::namedItems):
3559         * html/HTMLCollection.h:
3560         * html/HTMLFormElement.cpp:
3561         (WebCore::HTMLFormElement::getNamedElements):
3562         * html/HTMLFormElement.h:
3563         * svg/SVGSVGElement.cpp:
3564         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
3565
3566 2013-09-22  Sam Weinig  <sam@webkit.org>
3567
3568         CTTE: RenderNamedFlowThread and FlowThreadController should operate on Elements, not Nodes
3569         https://bugs.webkit.org/show_bug.cgi?id=121768
3570
3571         Reviewed by Andreas Kling.
3572
3573         * dom/Element.cpp:
3574         (WebCore::Element::unregisterNamedFlowContentElement):
3575         (WebCore::Element::shouldMoveToFlowThread):
3576         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
3577         * dom/Element.h:
3578         Update to new names and to pass this as a reference to the FlowThreadController.
3579
3580         * dom/Node.cpp:
3581         * dom/Node.h:
3582         Move isRegisteredWithNamedFlow() to Element.
3583
3584         * dom/WebKitNamedFlow.cpp:
3585         (WebCore::WebKitNamedFlow::getRegionsByContent):
3586         (WebCore::WebKitNamedFlow::getRegions):
3587         (WebCore::WebKitNamedFlow::getContent):
3588         Update for contentNodes() -> contentElements() name change. Modernize the code a bit
3589         as well.
3590
3591         * rendering/FlowThreadController.cpp:
3592         (WebCore::FlowThreadController::registerNamedFlowContentElement):
3593         (WebCore::FlowThreadController::unregisterNamedFlowContentElement):
3594         (WebCore::FlowThreadController::isContentElementRegisteredWithAnyNamedFlow):
3595         * rendering/FlowThreadController.h:
3596         Change the Node* -> RenderNamedFlowThread* map to a Element* -> RenderNamedFlowThread*. Update
3597         functions taking Node*s to take Element&s.
3598
3599         * rendering/RenderNamedFlowThread.cpp:
3600         (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
3601         (WebCore::RenderNamedFlowThread::clearContentElements):
3602         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
3603         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
3604         (WebCore::RenderNamedFlowThread::hasContentElement):
3605         (WebCore::isContainedInElements):
3606         (WebCore::nextNodeInsideContentElement):
3607         (WebCore::RenderNamedFlowThread::getRanges):
3608         * rendering/RenderNamedFlowThread.h:
3609         Change the NamedFlowContent set to store Elements rather than Nodes. Like with FlowThreadController,
3610         update registration functions to take Element&s instead of Node*s, removing asserts.
3611         
3612         * rendering/RenderRegion.cpp:
3613         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
3614         Update for new names.
3615
3616         * style/StyleResolveTree.cpp:
3617         (WebCore::Style::moveToFlowThreadIfNeeded):
3618         Pass the Element and RenderNamedFlowThread as references.
3619
3620 2013-09-22  Andreas Kling  <akling@apple.com>
3621
3622         Give purity hints to compiler to avoid penalizing repeated calls to some functions.
3623         <https://webkit.org/b/121744>
3624
3625         Reviewed by Darin Adler.
3626
3627         Mark the following functions pure:
3628
3629             - gcController()
3630             - cssValuePool()
3631             - threadGlobalData()
3632
3633         I had this idea when I saw Darin's patch to cache cssValuePool() in a local.
3634         We know that this function will always return the same value, so we should just
3635         share this knowledge with the compiler and let it do the cleverness instead.
3636
3637 2013-09-21  Darin Adler  <darin@apple.com>
3638
3639         Fix too-strict type error exceptions introduced in WebGL bindings
3640         https://bugs.webkit.org/show_bug.cgi?id=121759
3641
3642         Reviewed by Alexey Proskuryakov.
3643
3644         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3645         (WebCore::JSWebGLRenderingContext::getAttachedShaders): Allow undefined
3646         or null without throwing type error.
3647         (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
3648         (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
3649         (WebCore::dataFunctionf): Ditto.
3650         (WebCore::dataFunctioni): Ditto.
3651         (WebCore::dataFunctionMatrix): Ditto.
3652
3653 2013-09-21  Sam Weinig  <sam@webkit.org>
3654
3655         Event and EventTarget interfaces don't need to be store as AtomicStrings
3656         https://bugs.webkit.org/show_bug.cgi?id=121751
3657
3658         Reviewed by Andreas Kling.
3659
3660         Convert the Event and EventTarget interface identifiers from AtomicStrings to enums. They
3661         are not extensible and not exposed as Strings anywhere.
3662
3663         * Files elided *
3664
3665 2013-09-21  Darin Adler  <darin@apple.com>
3666
3667         Add ExecState::uncheckedArgument and use where possible to shrink a bit
3668         https://bugs.webkit.org/show_bug.cgi?id=121750
3669
3670         Reviewed by Andreas Kling.
3671
3672         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3673         (WebCore::JSHTMLCanvasElement::probablySupportsContext): Already checked count.
3674         (WebCore::JSHTMLCanvasElement::toDataURL): Ditto.
3675         * bindings/js/JSHTMLDocumentCustom.cpp:
3676         (WebCore::documentWrite): In a loop.
3677         * bindings/js/JSInjectedScriptHostCustom.cpp:
3678         (WebCore::JSInjectedScriptHost::inspectedObject): Already checked count.
3679         (WebCore::JSInjectedScriptHost::internalConstructorName): Ditto.
3680         (WebCore::JSInjectedScriptHost::isHTMLAllCollection): Ditto.
3681         (WebCore::JSInjectedScriptHost::type): Ditto.
3682         (WebCore::JSInjectedScriptHost::functionDetails): Ditto.
3683         (WebCore::JSInjectedScriptHost::getEventListeners): Ditto.
3684         (WebCore::JSInjectedScriptHost::inspect): Ditto.
3685         (WebCore::JSInjectedScriptHost::databaseId): Ditto.
3686         (WebCore::JSInjectedScriptHost::storageId): Ditto.
3687         * bindings/js/JSSQLTransactionSyncCustom.cpp:
3688         (WebCore::JSSQLTransactionSync::executeSql): Ditto.
3689         * bindings/js/JSSVGLengthCustom.cpp:
3690         (WebCore::JSSVGLength::convertToSpecifiedUnits): Ditto.
3691         * bindings/js/JSSharedWorkerCustom.cpp:
3692         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Ditto.
3693
3694         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3695         (WebCore::getObjectParameter): Already checked count.
3696         (WebCore::JSWebGLRenderingContext::getAttachedShaders): Removed tortured code
3697         to triply do the checking that the toWebGLProgram function already does, including
3698         spurious exception checking in code that can't create an exception. Also count is
3699         already checked.
3700         (WebCore::JSWebGLRenderingContext::getExtension): More of the same.
3701         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
3702         (WebCore::JSWebGLRenderingContext::getParameter): Ditto.
3703         (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
3704         (WebCore::JSWebGLRenderingContext::getShaderParameter): Ditto.
3705         (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
3706         (WebCore::dataFunctionf): Ditto.
3707         (WebCore::dataFunctioni): Ditto.
3708         (WebCore::dataFunctionMatrix): Ditto.
3709
3710         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3711         (WebCore::JSWorkerGlobalScope::importScripts): In a loop.
3712         * bindings/js/JSXMLHttpRequestCustom.cpp:
3713         (WebCore::JSXMLHttpRequest::open): Already checked. Also removed some unneeded
3714         argument count checks.
3715         (WebCore::JSXMLHttpRequest::send): Removed unneeded special case for 0 argument
3716         count that does the same thing as the undefined case, since asking for an
3717         argument past the count yields undefined.
3718
3719         * bindings/js/JSXSLTProcessorCustom.cpp:
3720         (WebCore::JSXSLTProcessor::setParameter): Already checked.
3721         (WebCore::JSXSLTProcessor::getParameter): Already checked.
3722         (WebCore::JSXSLTProcessor::removeParameter): Already checked.
3723
3724         * bindings/js/ScheduledAction.cpp:
3725         (WebCore::ScheduledAction::ScheduledAction): In a loop.
3726         * bindings/js/ScriptCallStackFactory.cpp:
3727         (WebCore::createScriptArguments): Ditto.
3728
3729         * bindings/scripts/CodeGeneratorJS.pm:
3730         (GenerateParametersCheck): Removed some excess argumentCount checks.
3731         Used uncheckedArgument in a few places. More needs to be done, especially for
3732         overloaded functions.
3733
3734         * bridge/c/c_instance.cpp:
3735         (JSC::Bindings::CInstance::invokeMethod): In a loop.
3736         (JSC::Bindings::CInstance::invokeDefaultMethod): Ditto.
3737         * bridge/objc/objc_instance.mm:
3738         (ObjcInstance::invokeObjcMethod): Ditto.
3739         (ObjcInstance::invokeDefaultMethod): Ditto.
3740
3741         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3742         * bindings/scripts/test/JS/JSTestObj.cpp:
3743         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3744         Updated.
3745
3746 2013-09-21  Jon Lee  <jonlee@apple.com>
3747
3748         Fix Obj-C bindings test expectations.
3749         Unreviewed.
3750
3751         Bindings tests failed with r156232, from https://bugs.webkit.org/show_bug.cgi?id=121745.
3752
3753         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3754         (-[DOMTestObj reflectedStringAttr]): Update test expectations.
3755
3756 2013-09-21  Andreas Kling  <akling@apple.com>
3757
3758         Node: FINAL-ize EventTarget overrides.
3759         <https://webkit.org/b/121748>
3760
3761         Reviewed by Darin Adler.
3762
3763         Mark the following Node functions FINAL:
3764
3765             - scriptExecutionContext()
3766             - eventTargetData()
3767             - ensureEventTargetData()
3768
3769         This devirtualizes a myriad of generated calls in the JSC bindings.
3770
3771 2013-09-21  Andreas Kling  <akling@apple.com>
3772
3773         Don't bloat Obj-C bindings with inlined attribute retrieval.
3774         <https://webkit.org/b/121745>
3775
3776         Reviewed by Anders Carlsson.
3777
3778         Hack bindings generator to always use getAttribute() for Objective-C.
3779         Reduces WebCore binary size by 25120 bytes.
3780
3781 2013-09-20  Darin Adler  <darin@apple.com>
3782
3783         Shink attribute event listener code
3784         https://bugs.webkit.org/show_bug.cgi?id=121735
3785
3786         Reviewed by Antti Koivisto.
3787
3788         * GNUmakefile.list.am: Eliminate ScriptEventListener source files.
3789         * Target.pri: Ditto.
3790         * UseJSC.cmake: Ditto.
3791         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3792         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3793         * WebCore.xcodeproj/project.pbxproj: Ditto.
3794         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
3795
3796         * bindings/js/JSDOMGlobalObject.h: Removed unneeded forward declarations
3797         of JSEventListener and JSLazyEventListener.
3798
3799         * bindings/js/JSLazyEventListener.cpp:
3800         (WebCore::JSLazyEventListener::JSLazyEventListener): Changed type to
3801         ContainerNode because the node pointer is only ever used for elements
3802         and documents.
3803         (WebCore::eventParameterName): Moved this function here from
3804         ScriptEventListener.cpp, but also rewrote to use NeverDestroyed.
3805         (WebCore::JSLazyEventListener::createForNode): Moved this function
3806         here from ScriptEventListener.cpp, cleaned up a bit.
3807         (WebCore::JSLazyEventListener::createForDOMWindow): Ditto.
3808
3809         * bindings/js/JSLazyEventListener.h: Replaced the old create function
3810         with two new create functions we can use directly. Also used some
3811         OVERRIDE, some FINAL, and a bit of WTF_DELETED_FUNCTION so we don't
3812         accidentally call create and create a non-lazy listener.
3813
3814         * bindings/js/ScriptEventListener.cpp: Removed.
3815         * bindings/js/ScriptEventListener.h: Removed.
3816
3817         * dom/ContainerNode.cpp:
3818         (WebCore::ContainerNode::setAttributeEventListener): Added.
3819         Calls JSLazyEventListener::createForNode and then calls the other
3820         overload of setAttributeEventListener, to obviate having more code
3821         at the call site.
3822         * dom/ContainerNode.h: Added overload of setAttributeEventListener
3823         for convenient use in Document and Element implementations.
3824
3825         * dom/Document.cpp:
3826         (WebCore::Document::prepareForDestruction): Use m_domWindow instead
3827         of the domWindow() function.
3828         (WebCore::Document::removeAllEventListeners): Ditto.
3829         (WebCore::Document::errorEventTarget): Ditto.
3830         (WebCore::Document::takeDOMWindowFrom): Ditto.
3831         (WebCore::Document::setWindowAttributeEventListener): Ditto. Also
3832         added an overload that calls JSLazyEventListener::createForDOMWindow.
3833         (WebCore::Document::getWindowAttributeEventListener): Use m_domWindow.
3834         (WebCore::Document::dispatchWindowEvent): Ditto.
3835         (WebCore::Document::dispatchWindowLoadEvent): Ditto.
3836         (WebCore::Document::enqueueWindowEvent): Ditto.
3837         (WebCore::Document::enqueuePopstateEvent): Ditto.
3838         * dom/Document.h: Added overload of setWindowAttributeEventListener.
3839
3840         * html/HTMLBodyElement.cpp: Removed unnneded include.
3841         (WebCore::HTMLBodyElement::parseAttribute): Removed all the calls to
3842         createAttributeEventListener, and use the setAttributeEventListener
3843         overloads instead.
3844         * html/HTMLButtonElement.cpp: Ditto.
3845         * html/HTMLElement.cpp:
3846         (WebCore::HTMLElement::parseAttribute): Ditto.
3847         * html/HTMLFormControlElement.cpp: Ditto.
3848         * html/HTMLFormElement.cpp: Ditto.
3849         * html/HTMLFrameElementBase.cpp:
3850         (WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
3851         * html/HTMLFrameSetElement.cpp:
3852         (WebCore::HTMLFrameSetElement::parseAttribute): Ditto.
3853         * html/HTMLImageElement.cpp:
3854         (WebCore::HTMLImageElement::parseAttribute): Ditto.
3855         * html/HTMLInputElement.cpp:
3856         (WebCore::HTMLInputElement::parseAttribute): Ditto.
3857         * html/HTMLLinkElement.cpp:
3858         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
3859         * html/HTMLMediaElement.cpp:
3860         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
3861         * html/HTMLObjectElement.cpp:
3862         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
3863         * html/HTMLScriptElement.cpp:
3864         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
3865         * html/HTMLSelectElement.cpp: Ditto.
3866         * html/HTMLStyleElement.cpp: Ditto.
3867         * html/HTMLTextFormControlElement.cpp: Ditto.
3868         * html/HTMLTrackElement.cpp: Ditto.
3869         * html/track/LoadableTextTrack.cpp: Ditto.
3870         * svg/SVGElement.cpp:
3871         (WebCore::SVGElement::parseAttribute): Ditto.
3872         * svg/SVGSVGElement.cpp:
3873         (WebCore::SVGSVGElement::parseAttribute): Ditto.
3874         * svg/SVGScriptElement.cpp:
3875         (WebCore::SVGScriptElement::parseAttribute): Ditto.
3876
3877         * inspector/InspectorDOMAgent.cpp:
3878         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3879         Moved the code here to dig inside a JSEventListener for things like
3880         the source location. This used to be spread across multiple function
3881         calls in ScriptEventListener.h, which were doing and redoing the same
3882         things, so better to just get it all at once.
3883
3884         * html/parser/XSSAuditor.cpp:
3885         (WebCore::XSSAuditor::init): Fixed "minium" typo.
3886
3887 2013-09-21  Anders Carlsson  <andersca@apple.com>
3888
3889         Don't store the "processing-instruction" string for PI tokens in the XPath parser
3890         https://bugs.webkit.org/show_bug.cgi?id=121746
3891
3892         Reviewed by Antti Koivisto.
3893
3894         For PI tokens, the string is always going to be "processing-instruction", and it's never used so we don't need to save it.
3895
3896         * xml/XPathGrammar.y:
3897         * xml/XPathParser.cpp:
3898         (Parser::nextTokenInternal):
3899         (Parser::lex):
3900
3901 2013-09-21  Patrick Gansterer  <paroga@webkit.org>
3902
3903         Handle windows lineendings in makeprop.pl after r155511
3904         https://bugs.webkit.org/show_bug.cgi?id=121740
3905
3906         Reviewed by Ryosuke Niwa.
3907
3908         Check for an optinal \r at the end of a line in regular expressions
3909         to make it work again on native windows machines which use CRLF.
3910
3911         * css/makeprop.pl:
3912
3913 2013-09-21  Andreas Kling  <akling@apple.com>
3914
3915         Re-inline some hot ElementData functions.
3916         <https://webkit.org/b/121743>
3917
3918         Reviewed by Antti Koivisto.
3919
3920         Make the following functions inline again:
3921
3922             - deref()
3923             - addAttribute()
3924             - removeAttribute()
3925             - attributeAt()
3926
3927         They were out-of-lined in r154249 and perf.webkit.org reports a 1.4%
3928         regression on the html5 spec for that revision. This'll hopefully steer
3929         the graph back in the right direction.
3930
3931 2013-09-21  Tim Horton  <timothy_horton@apple.com>
3932
3933         GeneratorGeneratedImage should be called GradientImage
3934         https://bugs.webkit.org/show_bug.cgi?id=121085
3935
3936         Reviewed by Simon Fraser.
3937
3938         No new tests, just a refactor.
3939
3940         r150053 removed the concept of a Generator, making GeneratorGeneratedImage
3941         take a Gradient. This leaves GeneratorGeneratedImage's name not making a
3942         whole lot of sense, so let's rename it to GradientImage.
3943
3944         * CMakeLists.txt:
3945         * GNUmakefile.list.am:
3946         * Target.pri:
3947         * WebCore.vcxproj/WebCore.vcxproj:
3948         * WebCore.vcxproj/WebCore.vcxproj.filters:
3949         * WebCore.xcodeproj/project.pbxproj:
3950         * css/CSSGradientValue.cpp:
3951         (WebCore::CSSGradientValue::image):
3952         * platform/graphics/BitmapImage.h:
3953         * platform/graphics/GradientImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp.
3954         (WebCore::GradientImage::draw):
3955         (WebCore::GradientImage::drawPattern):
3956         * platform/graphics/GradientImage.h: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h.
3957         * platform/graphics/Image.h:
3958         * platform/graphics/ImageBuffer.h:
3959         Rename.
3960
3961         * css/CSSImageGeneratorValue.cpp:
3962         (WebCore::CSSImageGeneratorValue::cachedImageForSize):
3963         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
3964         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
3965         * css/CSSImageGeneratorValue.h:
3966         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image):
3967         Drive-by, the CSSImageGeneratorValue generated image cache should be
3968         in terms of GeneratedImage, not a random subclass, regardless
3969         of the fact that it's only used for GradientImage as of yet.
3970
3971 2013-09-21  Darin Adler  <darin@apple.com>
3972
3973         Shrink valueForBasicShape by removing repeated calls to cssValuePool()
3974         https://bugs.webkit.org/show_bug.cgi?id=121736
3975
3976         Reviewed by Sam Weinig.
3977
3978         * css/BasicShapeFunctions.cpp:
3979         (WebCore::valueForBasicShape): Put the pool into a local variable and use that.
3980
3981 2013-09-20  Darin Adler  <darin@apple.com>
3982
3983         Another CSS parser leak fix
3984         https://bugs.webkit.org/show_bug.cgi?id=121730
3985
3986         Reviewed by Alexey Proskuryakov.
3987
3988         * css/CSSGrammar.y.in: Added a missing adoptPtr.
3989
3990 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
3991
3992         Handle panning gestures messages properly on Windows
3993         https://bugs.webkit.org/show_bug.cgi?id=121711
3994
3995         Follow-up fix: five regression tests started to crash on Mac.
3996
3997         Reviewed by Anders Carlsson.
3998
3999         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollByRecursively):
4000         Added null checks, not all callers are interested in scrolled view pointer.
4001
4002 2013-09-20  Ryosuke Niwa  <rniwa@webkit.org>
4003
4004         Bad cast from CSSInitialValue to CSSValueList
4005         https://bugs.webkit.org/show_bug.cgi?id=121729
4006
4007         Reviewed by Beth Dakin.
4008
4009         Merge https://chromium.googlesource.com/chromium/blink/+/fcfaa51f9207b32cffe751c1a1380a921e464cbb
4010
4011         The issue was that we would cast to CSSValueList without checking
4012         the type of the CSSValue. After this change, we use the ASSERT'ing
4013         cast and explicitly check the type of the CSSValue before the cast.
4014
4015         Test: fast/css/crash-inherit-value-font-family.html
4016
4017         * css/CSSParser.cpp:
4018         (WebCore::CSSParser::parseFontFaceValue):
4019
4020 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
4021
4022         Remove includes from LineWidth.h
4023         https://bugs.webkit.org/show_bug.cgi?id=121716
4024
4025         Reviewed by Darin Adler.
4026
4027         In r156197 I removed logicalLineHeight from LineWidth.h, so we don't need to include RenderBlock.h
4028         and RenderRubyRun.h anymore in LineWidth.h.
4029
4030         No new tests, no behavior change.
4031
4032         * rendering/LineWidth.cpp:
4033         * rendering/LineWidth.h:
4034
4035 2013-09-20  Roger Fong  <roger_fong@apple.com>
4036
4037         Handle panning gestures messages properly on Windows.
4038         https://bugs.webkit.org/show_bug.cgi?id=121711.
4039
4040 &n