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