Generate toCSSCrossfadeValue() instead of using manual function
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         Generate toCSSCrossfadeValue() instead of using manual function
4         https://bugs.webkit.org/show_bug.cgi?id=122057
5
6         Reviewed by Antti Koivisto.
7
8         Generated toCSSFooValue() supports more plenty functions rather than
9         to use manual cast function.
10
11         No new tests, no behavior changes.
12
13         * css/CSSCrossfadeValue.h:
14         * css/CSSImageGeneratorValue.cpp:
15         (WebCore::CSSImageGeneratorValue::image):
16         (WebCore::CSSImageGeneratorValue::fixedSize):
17         (WebCore::CSSImageGeneratorValue::loadSubimages):
18         * css/CSSValue.cpp:
19         (WebCore::CSSValue::destroy):
20
21 2013-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
22
23         Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue
24         https://bugs.webkit.org/show_bug.cgi?id=122056
25
26         Reviewed by Antti Koivisto.
27
28         Generate toCSSFooValue() for CSSFilterImageValue and CSSInitialValue, and use it.
29         This type cast function will help to detect bad-casts.
30
31         No new tests, no behavior changes.
32
33         * css/CSSFilterImageValue.h:
34         * css/CSSImageGeneratorValue.cpp:
35         (WebCore::CSSImageGeneratorValue::image):
36         (WebCore::CSSImageGeneratorValue::fixedSize):
37         (WebCore::CSSImageGeneratorValue::loadSubimages):
38         * css/CSSInitialValue.h:
39         * css/CSSValue.cpp:
40         (WebCore::CSSValue::destroy):
41         * css/StyleResolver.cpp:
42         (WebCore::StyleResolver::generatedOrPendingFromValue):
43
44 2013-09-29  Darin Adler  <darin@apple.com>
45
46         Fix crashes caused by my recent attempt at a Windows build fix.
47
48         * bindings/js/WebCoreTypedArrayController.cpp:
49         (WebCore::WebCoreTypedArrayController::toJS): Added back the prefix for the call to
50         WebCore::toJS, otherwise this function just calls itself infinitely recursively.
51
52 2013-09-29  Sam Weinig  <sam@webkit.org>
53
54         Cleanup PageThrottler and PageConsole a bit
55         https://bugs.webkit.org/show_bug.cgi?id=122085
56
57         Reviewed by Anders Carlsson.
58
59         * html/HTMLMediaElement.h:
60         * loader/FrameLoader.cpp:
61         (WebCore::FrameLoader::completed):
62         * loader/FrameLoader.h:
63         * loader/SubresourceLoader.cpp:
64         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
65         (WebCore::SubresourceLoader::didFinishLoading):
66         (WebCore::SubresourceLoader::didFail):
67         (WebCore::SubresourceLoader::willCancel):
68         * loader/SubresourceLoader.h:
69         Store the PageActivityAssertionToken as a std::unique_ptr.
70
71         * page/Page.cpp:
72         (WebCore::Page::Page):
73         Use createOwned and pass this by reference for the PageThrottler and PageConsole.
74         (WebCore::Page::~Page):
75         Remove unnecessary clearing of an OwnPtr that is about to be destroyed.
76         * page/Page.h:
77         Make m_pageThrottler const and return it as a reference.
78
79         * page/PageActivityAssertionToken.cpp:
80         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
81         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
82         * page/PageActivityAssertionToken.h:
83         Take the PageThrottler by reference in the constructor. It is never null.
84
85         * page/PageConsole.cpp:
86         (WebCore::PageConsole::PageConsole):
87         (WebCore::PageConsole::~PageConsole):
88         (WebCore::PageConsole::addMessage):
89         * page/PageConsole.h:
90         Pass and store the Page as a reference and remove an extraneous null check. Remove
91         the create function.
92
93         * page/PageThrottler.cpp:
94         (WebCore::PageThrottler::PageThrottler):
95         (WebCore::PageThrottler::~PageThrottler):
96         (WebCore::PageThrottler::createActivityToken):
97         (WebCore::PageThrottler::throttlePage):
98         (WebCore::PageThrottler::unthrottlePage):
99         (WebCore::PageThrottler::addActivityToken):
100         (WebCore::PageThrottler::removeActivityToken):
101         * page/PageThrottler.h:
102         Pass and store the Page as a reference. Move the creation of PageActivityAssertionToken here
103         to aid encapsulation.
104
105 2013-09-29  Darin Adler  <darin@apple.com>
106
107         Try to fix Windows build.
108
109         * bindings/js/WebCoreTypedArrayController.cpp: Windows has a symbol named Handle, so we need
110         to call JSC::Handle out by name. To fix that, I removed "using namespace JSC" entirely. And
111         just for fun, sort of "rewrote" this file.
112         (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController): Removed unneeded explicit
113         initialization of m_owner.
114         (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController): Fixed formatting.
115         (WebCore::WebCoreTypedArrayController::toJS): Added lots of explicit JSC and got rid of local.
116         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): Cut
117         down on locals, used auto& for type, and called it "wrapper" since that's what JSArrayBuffer is.
118         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize): More of the same.
119
120 2013-09-29  Darin Adler  <darin@apple.com>
121
122         Use RenderElement instead of RenderObject in many places
123         https://bugs.webkit.org/show_bug.cgi?id=122078
124
125         Reviewed by Andreas Kling.
126
127         * WebCore.exp.in: Updated for name changes.
128
129         * dom/ContainerNode.h: Moved renderer() here from Element.
130         * dom/Element.h: Moved renderer() from here to ContainerNode.
131         * render/RenderElement.h: Moved renderer() from Element to ContainerNode.
132
133         * accessibility/AccessibilityImageMapLink.cpp:
134         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
135         (WebCore::AccessibilityImageMapLink::detachFromParent):
136         (WebCore::AccessibilityImageMapLink::elementPath):
137         (WebCore::AccessibilityImageMapLink::elementRect):
138         * accessibility/AccessibilityImageMapLink.h:
139         * accessibility/AccessibilityRenderObject.cpp:
140         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
141         * bindings/objc/DOM.mm:
142         (-[DOMElement image]):
143         (-[DOMElement _font]):
144         (-[DOMElement _imageTIFFRepresentation]):
145         * css/CSSCanvasValue.cpp:
146         (WebCore::CSSCanvasValue::canvasChanged):
147         (WebCore::CSSCanvasValue::canvasResized):
148         (WebCore::CSSCanvasValue::canvasDestroyed):
149         (WebCore::CSSCanvasValue::fixedSize):
150         (WebCore::CSSCanvasValue::image):
151         * css/CSSCanvasValue.h:
152         * css/CSSComputedStyleDeclaration.cpp:
153         (WebCore::computeRenderStyleForProperty):
154         * css/CSSCrossfadeValue.cpp:
155         (WebCore::subimageKnownToBeOpaque):
156         (WebCore::CSSCrossfadeValue::fixedSize):
157         (WebCore::CSSCrossfadeValue::knownToBeOpaque):
158         (WebCore::CSSCrossfadeValue::image):
159         (WebCore::CSSCrossfadeValue::crossfadeChanged):
160         * css/CSSCrossfadeValue.h:
161         * css/CSSFilterImageValue.cpp:
162         (WebCore::CSSFilterImageValue::fixedSize):
163         (WebCore::CSSFilterImageValue::knownToBeOpaque):
164         (WebCore::CSSFilterImageValue::image):
165         (WebCore::CSSFilterImageValue::filterImageChanged):
166         * css/CSSFilterImageValue.h:
167         * css/CSSFontSelector.cpp:
168         * css/CSSGradientValue.cpp:
169         (WebCore::CSSGradientValue::image):
170         (WebCore::CSSGradientValue::addStops):
171         (WebCore::CSSGradientValue::knownToBeOpaque):
172         (WebCore::CSSLinearGradientValue::createGradient):
173         (WebCore::CSSRadialGradientValue::createGradient):
174         * css/CSSGradientValue.h:
175         (WebCore::CSSGradientValue::fixedSize):
176         * css/CSSImageGeneratorValue.cpp:
177         (WebCore::CSSImageGeneratorValue::addClient):
178         (WebCore::CSSImageGeneratorValue::removeClient):
179         (WebCore::CSSImageGeneratorValue::image):
180         (WebCore::CSSImageGeneratorValue::fixedSize):
181         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
182         * css/CSSImageGeneratorValue.h:
183         (WebCore::CSSImageGeneratorValue::clients):
184         * css/CSSImageValue.cpp:
185         (WebCore::CSSImageValue::knownToBeOpaque):
186         * css/CSSImageValue.h:
187         * css/DeprecatedStyleBuilder.cpp:
188         * dom/DocumentMarkerController.cpp:
189         (WebCore::DocumentMarkerController::removeMarkersFromList):
190         (WebCore::DocumentMarkerController::repaintMarkers):
191         * dom/Element.cpp:
192         (WebCore::localZoomForRenderer):
193         (WebCore::adjustForLocalZoom):
194         (WebCore::Element::offsetParent):
195         (WebCore::Element::updateExistingPseudoElement):
196         * dom/ElementRareData.h:
197         (WebCore::ElementRareData::create):
198         (WebCore::ElementRareData::ElementRareData):
199         * dom/Node.cpp:
200         (WebCore::Node::ensureRareData):
201         * editing/DeleteButtonController.cpp:
202         (WebCore::isDeletableElement):
203         * editing/Editor.cpp:
204         (WebCore::Editor::hasBidiSelection):
205         (WebCore::Editor::baseWritingDirectionForSelectionStart):
206         * editing/EditorCommand.cpp:
207         (WebCore::verticalScrollDistance):
208         * editing/htmlediting.cpp:
209         (WebCore::directionOfEnclosingBlock):
210         * editing/ios/EditorIOS.mm:
211         (WebCore::Editor::fontForSelection):
212         (WebCore::getImage):
213         * editing/mac/EditorMac.mm:
214         (WebCore::Editor::fontForSelection):
215         (WebCore::getImage):
216         * editing/markup.cpp:
217         * html/HTMLAreaElement.cpp:
218         (WebCore::HTMLAreaElement::computePath):
219         (WebCore::HTMLAreaElement::computeRect):
220         (WebCore::HTMLAreaElement::setFocus):
221         * html/HTMLAreaElement.h:
222         * html/HTMLCanvasElement.cpp:
223         (WebCore::HTMLCanvasElement::reset):
224         * html/HTMLElement.cpp:
225         (WebCore::HTMLElement::setInnerText):
226         * html/HTMLFormControlElement.cpp:
227         (WebCore::updateFromElementCallback):
228         * html/HTMLFormElement.cpp:
229         (WebCore::HTMLFormElement::rendererIsNeeded):
230         * html/HTMLFrameOwnerElement.h:
231         * html/HTMLImageElement.cpp:
232         (WebCore::HTMLImageElement::x):
233         (WebCore::HTMLImageElement::y):
234         (WebCore::HTMLImageElement::willRespondToMouseClickEvents):
235         * html/HTMLMapElement.cpp:
236         * html/HTMLMediaElement.cpp:
237         (WebCore::HTMLMediaElement::defaultEventHandler):
238         * html/HTMLMeterElement.cpp:
239         (WebCore::HTMLMeterElement::renderMeter):
240         * html/HTMLOptionElement.cpp:
241         (WebCore::HTMLOptionElement::didRecalcStyle):
242         * html/HTMLPlugInElement.cpp:
243         (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
244         (WebCore::HTMLPlugInElement::defaultEventHandler):
245         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
246         * html/HTMLPlugInImageElement.cpp:
247         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
248         * html/HTMLProgressElement.cpp:
249         (WebCore::HTMLProgressElement::renderProgress):
250         * html/HTMLSelectElement.cpp:
251         (WebCore::HTMLSelectElement::scrollToSelection):
252         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
253         (WebCore::HTMLSelectElement::selectOption):
254         * html/HTMLTableCellElement.cpp:
255         (WebCore::HTMLTableCellElement::cellAbove):
256         * html/HTMLTextFormControlElement.cpp:
257         (WebCore::hasVisibleTextArea):
258         (WebCore::HTMLTextFormControlElement::setSelectionRange):
259         * html/InputType.h:
260         * html/parser/HTMLResourcePreloader.cpp:
261         * html/shadow/MediaControlElementTypes.cpp:
262         (WebCore::MediaControlElement::setDisplayType):
263         * html/shadow/MediaControlElements.cpp:
264         (WebCore::MediaControlPanelElement::startDrag):
265         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
266         * html/shadow/MeterShadowElement.cpp:
267         (WebCore::MeterShadowElement::rendererIsNeeded):
268         (WebCore::MeterInnerElement::rendererIsNeeded):
269         * inspector/InspectorOverlay.cpp:
270         * inspector/InspectorTimelineAgent.cpp:
271         * inspector/InspectorTimelineAgent.h:
272         * loader/ImageLoader.cpp:
273         (WebCore::ImageLoader::renderImageResource):
274         * loader/cache/CachedImage.cpp:
275         (WebCore::CachedImage::currentFrameKnownToBeOpaque):
276         * loader/cache/CachedImage.h:
277         * mathml/MathMLElement.cpp:
278         * page/ContextMenuController.cpp:
279         * page/DragController.cpp:
280         (WebCore::DragController::draggableElement):
281         * page/EventHandler.cpp:
282         (WebCore::EventHandler::EventHandler):
283         (WebCore::EventHandler::clear):
284         (WebCore::EventHandler::startPanScrolling):
285         (WebCore::EventHandler::autoscrollRenderer):
286         (WebCore::EventHandler::scrollOverflow):
287         (WebCore::EventHandler::logicalScrollOverflow):
288         (WebCore::EventHandler::subframeForTargetNode):
289         (WebCore::EventHandler::selectCursor):
290         (WebCore::layerForNode):
291         (WebCore::EventHandler::handleWheelEvent):
292         (WebCore::EventHandler::clearGestureScrollNodes):
293         * page/EventHandler.h:
294         * page/FocusController.cpp:
295         * page/Frame.cpp:
296         (WebCore::Frame::ownerRenderer):
297         (WebCore::Frame::visiblePositionForPoint):
298         (WebCore::Frame::nodeImage):
299         * page/FrameView.cpp:
300         (WebCore::FrameView::applyOverflowToViewport):
301         (WebCore::FrameView::applyPaginationToViewport):
302         (WebCore::FrameView::calculateScrollbarModesForLayout):
303         (WebCore::FrameView::isEnclosedInCompositingLayer):
304         (WebCore::FrameView::embeddedContentBox):
305         (WebCore::FrameView::addSlowRepaintObject):
306         (WebCore::FrameView::removeSlowRepaintObject):
307         (WebCore::FrameView::addViewportConstrainedObject):
308         (WebCore::FrameView::removeViewportConstrainedObject):
309         (WebCore::FrameView::scrollContentsFastPath):
310         (WebCore::FrameView::repaintSlowRepaintObjects):
311         (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
312         (WebCore::FrameView::updateOverflowStatus):
313         (WebCore::FrameView::updateScrollCorner):
314         (WebCore::FrameView::paintContents):
315         (WebCore::FrameView::convertFromRenderer):
316         (WebCore::FrameView::convertToRenderer):
317         * page/FrameView.h:
318         * page/PageSerializer.cpp:
319         (WebCore::PageSerializer::addImageToResources):
320         * page/PageSerializer.h:
321         * page/animation/AnimationBase.cpp:
322         (WebCore::AnimationBase::AnimationBase):
323         (WebCore::AnimationBase::updateStateMachine):
324         * page/animation/AnimationBase.h:
325         (WebCore::AnimationBase::renderer):
326         * page/animation/AnimationController.cpp:
327         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
328         (WebCore::AnimationControllerPrivate::clear):
329         (WebCore::AnimationControllerPrivate::updateAnimations):
330         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
331         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
332         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
333         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
334         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
335         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
336         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
337         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
338         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
339         (WebCore::AnimationController::cancelAnimations):
340         (WebCore::AnimationController::updateAnimations):
341         (WebCore::AnimationController::getAnimatedStyleForRenderer):
342         (WebCore::AnimationController::notifyAnimationStarted):
343         (WebCore::AnimationController::pauseAnimationAtTime):
344         (WebCore::AnimationController::pauseTransitionAtTime):
345         (WebCore::AnimationController::isRunningAnimationOnRenderer):
346         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
347         * page/animation/AnimationController.h:
348         * page/animation/AnimationControllerPrivate.h:
349         * page/animation/CSSPropertyAnimation.cpp:
350         (WebCore::crossfadeBlend):
351         * page/animation/CompositeAnimation.cpp:
352         (WebCore::CompositeAnimation::updateTransitions):
353         (WebCore::CompositeAnimation::updateKeyframeAnimations):
354         (WebCore::CompositeAnimation::animate):
355         * page/animation/CompositeAnimation.h:
356         * page/animation/ImplicitAnimation.cpp:
357         (WebCore::ImplicitAnimation::ImplicitAnimation):
358         (WebCore::ImplicitAnimation::animate):
359         (WebCore::ImplicitAnimation::pauseAnimation):
360         (WebCore::ImplicitAnimation::sendTransitionEvent):
361         * page/animation/ImplicitAnimation.h:
362         (WebCore::ImplicitAnimation::create):
363         * page/animation/KeyframeAnimation.cpp:
364         (WebCore::KeyframeAnimation::KeyframeAnimation):
365         (WebCore::KeyframeAnimation::animate):
366         (WebCore::KeyframeAnimation::pauseAnimation):
367         (WebCore::KeyframeAnimation::endAnimation):
368         (WebCore::KeyframeAnimation::sendAnimationEvent):
369         * page/animation/KeyframeAnimation.h:
370         * page/mac/EventHandlerMac.mm:
371         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
372         (WebCore::EventHandler::passSubframeEventToSubframe):
373         * page/mac/FrameSnapshottingMac.mm:
374         (WebCore::snapshotDragImage):
375         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
376         (WebCore::MediaPlayerPrivateQTKit::paint):
377         * rendering/CounterNode.cpp:
378         (WebCore::CounterNode::CounterNode):
379         (WebCore::CounterNode::create):
380         * rendering/CounterNode.h:
381         (WebCore::CounterNode::owner):
382         * rendering/FilterEffectRenderer.cpp:
383         (WebCore::FilterEffectRenderer::buildReferenceFilter):
384         (WebCore::FilterEffectRenderer::build):
385         * rendering/FilterEffectRenderer.h:
386         * rendering/HitTestResult.cpp:
387         (WebCore::HitTestResult::spellingToolTip):
388         (WebCore::HitTestResult::title):
389         (WebCore::HitTestResult::innerTextIfTruncated):
390         (WebCore::HitTestResult::image):
391         * rendering/LayoutRepainter.cpp:
392         (WebCore::LayoutRepainter::LayoutRepainter):
393         * rendering/LayoutRepainter.h:
394         * rendering/LayoutState.h:
395         (WebCore::LayoutState::LayoutState):
396         * rendering/LineWidth.h:
397         * rendering/LogicalSelectionOffsetCaches.h:
398         (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject):
399         (WebCore::isNonRenderBlockInline):
400         (WebCore::containingBlockForFixedPosition):
401         (WebCore::containingBlockForAbsolutePosition):
402         (WebCore::containingBlockForObjectInFlow):
403         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
404         * rendering/PaintInfo.h:
405         (WebCore::PaintInfo::PaintInfo):
406         (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
407         * rendering/RenderBox.cpp:
408         (WebCore::RenderBox::paintFillLayers):
409         (WebCore::RenderBox::paintFillLayer):
410         * rendering/RenderBox.h:
411         * rendering/RenderBoxModelObject.cpp:
412         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
413         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
414         * rendering/RenderBoxModelObject.h:
415         * rendering/RenderCounter.cpp:
416         (WebCore::nextInPreOrder):
417         (WebCore::planCounter):
418         (WebCore::makeCounterNode):
419         (WebCore::RenderCounter::originalText):
420         * rendering/RenderElement.cpp:
421         (WebCore::RenderElement::~RenderElement):
422         (WebCore::RenderElement::insertChildInternal):
423         (WebCore::RenderElement::removeChildInternal):
424         (WebCore::RenderElement::willBeDestroyed):
425         (WebCore::RenderElement::rendererForRootBackground):
426         * rendering/RenderImageResource.cpp:
427         (WebCore::RenderImageResource::initialize):
428         * rendering/RenderImageResource.h:
429         * rendering/RenderImageResourceStyleImage.cpp:
430         (WebCore::RenderImageResourceStyleImage::initialize):
431         * rendering/RenderImageResourceStyleImage.h:
432         (WebCore::RenderImageResourceStyleImage::create):
433         * rendering/RenderLayerCompositor.cpp:
434         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
435         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
436         (WebCore::RenderLayerCompositor::canBeComposited):
437         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
438         (WebCore::RenderLayerCompositor::reasonsForCompositing):
439         (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
440         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
441         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
442         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
443         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
444         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
445         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
446         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
447         (WebCore::RenderLayerCompositor::requiresCompositingForBlending):
448         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
449         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
450         * rendering/RenderLayerCompositor.h:
451         * rendering/RenderObject.cpp:
452         (WebCore::RenderObject::containingBlock):
453         (WebCore::mustRepaintFillLayers):
454         (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered):
455         (WebCore::RenderObject::willBeDestroyed):
456         * rendering/RenderScrollbarPart.cpp:
457         (WebCore::RenderScrollbarPart::rendererOwningScrollbar):
458         * rendering/RenderScrollbarPart.h:
459         * rendering/RenderTableCell.cpp:
460         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
461         * rendering/RenderTableCell.h:
462         * rendering/RenderView.cpp:
463         (WebCore::RenderView::RenderView):
464         * rendering/style/FillLayer.cpp:
465         (WebCore::FillLayer::hasOpaqueImage):
466         * rendering/style/FillLayer.h:
467         * rendering/style/KeyframeList.h:
468         (WebCore::KeyframeList::KeyframeList):
469         * rendering/style/StyleCachedImage.cpp:
470         (WebCore::StyleCachedImage::imageSize):
471         (WebCore::StyleCachedImage::computeIntrinsicDimensions):
472         (WebCore::StyleCachedImage::setContainerSizeForRenderer):
473         (WebCore::StyleCachedImage::addClient):
474         (WebCore::StyleCachedImage::removeClient):
475         (WebCore::StyleCachedImage::image):
476         (WebCore::StyleCachedImage::knownToBeOpaque):
477         * rendering/style/StyleCachedImage.h:
478         * rendering/style/StyleCachedImageSet.cpp:
479         (WebCore::StyleCachedImageSet::imageSize):
480         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
481         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
482         (WebCore::StyleCachedImageSet::addClient):
483         (WebCore::StyleCachedImageSet::removeClient):
484         (WebCore::StyleCachedImageSet::image):
485         (WebCore::StyleCachedImageSet::knownToBeOpaque):
486         * rendering/style/StyleCachedImageSet.h:
487         * rendering/style/StyleGeneratedImage.cpp:
488         (WebCore::StyleGeneratedImage::imageSize):
489         (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
490         (WebCore::StyleGeneratedImage::addClient):
491         (WebCore::StyleGeneratedImage::removeClient):
492         (WebCore::StyleGeneratedImage::image):
493         (WebCore::StyleGeneratedImage::knownToBeOpaque):
494         * rendering/style/StyleGeneratedImage.h:
495         * rendering/style/StyleImage.h:
496         (WebCore::StyleImage::imagesEquivalent):
497         * rendering/style/StylePendingImage.h:
498         (WebCore::StylePendingImage::cssImageValue):
499         (WebCore::StylePendingImage::cssImageGeneratorValue):
500         (WebCore::StylePendingImage::cssCursorImageValue):
501         (WebCore::StylePendingImage::cssImageSetValue):
502         (WebCore::StylePendingImage::computeIntrinsicDimensions):
503         * testing/Internals.cpp:
504         (WebCore::Internals::boundingBox):
505         (WebCore::Internals::isSelectPopupVisible):
506         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
507         Use RenderElement instead of RenderObject where it was easy to do so.
508         For local variables holding the return value of renderer() functions,
509         use auto instead, so the most-specific possible type will be used,
510         without having to figure out what that is in each case. Also use some
511         more OVERRIDE and FINAL and use nullptr instead of 0. And replace some
512         cryptic short local variable names with words.
513
514 2013-09-29  Philip Rogers  <pdr@google.com>
515
516         Repaint borders and outlines on pseudo content changes
517         https://bugs.webkit.org/show_bug.cgi?id=122070
518
519         Reviewed by Andreas Kling.
520
521         This patch fixes a regression from wkrev.com/150259 where pseudo content with
522         borders or outlines would fail to repaint if the color property changed.
523         The root bug is that border-color and outline-color properties use 'color' if
524         no explicit border-color or outline-color are given, and changing color should
525         repaint borders and outlines even if the text content is empty.
526
527         Relevant spec sections:
528         border: http://www.w3.org/TR/CSS1/#border-color
529         outline: http://www.w3.org/TR/CSS2/ui.html#propdef-outline-color
530
531         This patch also renames StyleDifferenceRepaintIfText to
532         StyleDifferenceRepaintIfTextOrBorderOrOutline and updates the relevant functions.
533
534         Test: fast/repaint/hover-pseudo-borders.html
535
536         * rendering/RenderElement.cpp:
537         (WebCore::RenderElement::hasImmediateNonWhitespaceTextChildOrBorderOrOutline):
538
539             This function has been renamed to reflect that it returns true for borders
540             or outlines as well.
541
542         (WebCore::RenderElement::shouldRepaintForStyleDifference):
543         * rendering/RenderElement.h:
544         * rendering/style/RenderStyle.cpp:
545         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
546         (WebCore::RenderStyle::diff):
547         * rendering/style/RenderStyle.h:
548         * rendering/style/RenderStyleConstants.h:
549         * rendering/svg/SVGResourcesCache.cpp:
550         (WebCore::SVGResourcesCache::clientStyleChanged):
551             These have also been renamed to reflect the new borders and outlines check.
552
553 2013-09-29  Antti Koivisto  <antti@apple.com>
554
555         Tighten typing in inline rendering
556         https://bugs.webkit.org/show_bug.cgi?id=122076
557
558         Reviewed by Andreas Kling.
559         
560         More RenderElement, const, &, etc.
561
562         * dom/Position.cpp:
563         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
564         * rendering/InlineFlowBox.cpp:
565         (WebCore::isLastChildForRenderer):
566         (WebCore::isAncestorAndWithinBlock):
567         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
568         (WebCore::InlineFlowBox::nodeAtPoint):
569         * rendering/InlineIterator.h:
570         (WebCore::InlineIterator::InlineIterator):
571         (WebCore::InlineIterator::root):
572         (WebCore::isEmptyInline):
573         (WebCore::bidiNextShared):
574         (WebCore::bidiNextSkippingEmptyInlines):
575         (WebCore::bidiNextIncludingEmptyInlines):
576         (WebCore::bidiFirstSkippingEmptyInlines):
577         * rendering/RenderBlockLineLayout.cpp:
578         (WebCore::inlineLogicalWidth):
579         (WebCore::alwaysRequiresLineBox):
580         (WebCore::requiresLineBox):
581         (WebCore::canBreakAtThisPosition):
582         (WebCore::LineBreaker::nextSegmentBreak):
583         * rendering/shapes/ShapeInsideInfo.h:
584         (WebCore::LineSegmentIterator::LineSegmentIterator):
585
586 2013-09-28  Sam Weinig  <sam@webkit.org>
587
588         Merge ScriptControllerBase into ScriptController
589         https://bugs.webkit.org/show_bug.cgi?id=122071
590
591         Reviewed by Antti Koivisto.
592
593         There is no need for ScriptControllerBase. Remove it.
594
595         * CMakeLists.txt:
596         * GNUmakefile.list.am:
597         * Target.pri:
598         * WebCore.vcxproj/WebCore.vcxproj:
599         * WebCore.vcxproj/WebCore.vcxproj.filters:
600         * WebCore.xcodeproj/project.pbxproj:
601         * bindings/ScriptControllerBase.cpp: Removed.
602         * bindings/ScriptControllerBase.h: Removed.
603         * bindings/js/ScriptController.cpp:
604         (WebCore::ScriptController::canExecuteScripts):
605         (WebCore::ScriptController::executeScript):
606         (WebCore::ScriptController::executeIfJavaScriptURL):
607         * bindings/js/ScriptController.h:
608
609 2013-09-28  Zan Dobersek  <zdobersek@igalia.com>
610
611         Unreviewed build fix after r156613 for ports enabling CSS3_TEXT.
612
613         * rendering/RenderBlockLineLayout.cpp:
614         (WebCore::requiresIndent): Use the RenderStyle reference.
615
616 2013-09-28  Antti Koivisto  <antti@apple.com>
617
618         Switch inline boxes to use const RenderStyle&
619         https://bugs.webkit.org/show_bug.cgi?id=122068
620
621         Reviewed by Sam Weinig.
622
623 2013-09-28  Antti Koivisto  <antti@apple.com>
624
625         Add first()/last() to ElementIteratorAdapters
626         https://bugs.webkit.org/show_bug.cgi?id=122067
627
628         Reviewed by Darin Adler.
629
630         Add a convenient way for getting the first and last element if it exists.
631         
632         Use it in some places.
633
634         * accessibility/AccessibilityNodeObject.cpp:
635         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
636         * css/CSSFontFaceSource.cpp:
637         (WebCore::CSSFontFaceSource::getFontData):
638         * dom/Document.cpp:
639         (WebCore::Document::childrenChanged):
640         (WebCore::Document::removeTitle):
641         * dom/ElementChildIterator.h:
642         (WebCore::::first):
643         (WebCore::::last):
644         * dom/ElementDescendantIterator.h:
645         (WebCore::::first):
646         (WebCore::::last):
647         * html/HTMLFieldSetElement.cpp:
648         (WebCore::HTMLFieldSetElement::legend):
649         * html/HTMLLegendElement.cpp:
650         (WebCore::HTMLLegendElement::associatedControl):
651         * html/HTMLMediaElement.cpp:
652         (WebCore::HTMLMediaElement::finishParsingChildren):
653         (WebCore::HTMLMediaElement::selectMediaResource):
654         * svg/SVGElement.cpp:
655         (WebCore::SVGElement::title):
656         * svg/SVGFontFaceElement.cpp:
657         (WebCore::SVGFontFaceElement::rebuildFontFace):
658         * svg/graphics/SVGImage.cpp:
659         (WebCore::SVGImage::hasSingleSecurityOrigin):
660
661 2013-09-28  Mark Rowe  <mrowe@apple.com>
662
663         Fix some failures with newer versions of clang.
664
665         Some CoreGraphics headers generate warnings under newer versions of clang. Since they're system headers the warnings would
666         usually be suppressed, but we're adding the frameworks to the non-system framework search path so they're no longer treated
667         as system headers. We address this by removing the system paths from FRAMEWORK_SEARCH_PATHS and using the -iframework compiler
668         flag in OTHER_CFLAGS to add the paths to the system framework search path. We have to set OTHER_CFLAGS at the target level
669         in order for it to coexist with the ASAN-related OTHER_CFLAGS that's set in DebugRelease.xcconfig.
670
671         Reviewed by Dan Bernstein.
672
673         * Configurations/WebCore.xcconfig:
674
675 2013-09-28  Mark Rowe  <mrowe@apple.com>
676
677         Take Xcode's advice and enable some extra warnings.
678
679         Reviewed by Sam Weinig.
680
681         * Configurations/Base.xcconfig:
682         * WebCore.xcodeproj/project.pbxproj:
683         * dom/NamedNodeMap.cpp:
684         (WebCore::NamedNodeMap::removeNamedItemNS): Use the correct constant.
685
686 2013-09-28  Sam Weinig  <sam@webkit.org>
687
688         CTTE: VisitedLinkState should hold a Document&
689         https://bugs.webkit.org/show_bug.cgi?id=122066
690
691         Reviewed by Antti Koivisto.
692
693         The Document can never be null, so use a reference.
694
695 2013-09-27  Antti Koivisto  <antti@apple.com>
696
697         Clean up code for getting first line style
698         https://bugs.webkit.org/show_bug.cgi?id=122037
699
700         Reviewed by Andreas Kling.
701
702         We have confusing RenderObject::style(bool firstLine). Get rid of it in favour of 
703         just using RenderObject::firstLineStyle() where appropriate.
704         
705         Also switch to RenderStyle references in many places and move first line style caching
706         code down to RenderElement.
707
708 2013-09-28  Darin Adler  <darin@apple.com>
709
710         Add Frame::mainFrame and Frame::isMainFrame
711         https://bugs.webkit.org/show_bug.cgi?id=122064
712
713         Reviewed by Andreas Kling.
714
715         * WebCore.exp.in: Removed exports of FrameView::isMainFrameView and
716         Page::frameIsMainFrame. Since the new isMainFrame function is inline, it
717         does not need to be exported.
718
719         * history/PageCache.cpp:
720         (WebCore::PageCache::markPagesForFullStyleRecalc):
721         (WebCore::PageCache::markPagesForDeviceScaleChanged):
722         These two were the only functions I found that really wanted the equivalent
723         of Page::frameIsMainFrame, so wrote it out here instead of using a function
724         call.
725
726         * inspector/InspectorAgent.cpp: Removed the unused isMainResourceLoader function.
727         * inspector/InspectorAgent.h: Removed declarations of a few nonexistent or
728         unused private member functions. Also removed the InjectedScriptForOriginMap
729         typedef: It's mor readable to use the type directly
730
731         * loader/FrameLoader.h: Removed isLoadingMainFrame. It's not better than
732         calling frame().isMainFrame() directly.
733
734         * page/Frame.cpp:
735         (WebCore::Frame::Frame): Initialize m_mainFrame and call selfOnlyRef, keeping
736         the MainFrame alive as long as any of its subframes is alive.
737         (WebCore::Frame::~Frame): Call selfOnlyDeref.
738         (WebCore::Frame::createView): Use isMainFrame.
739         (WebCore::Frame::setPageAndTextZoomFactors): Ditto.
740
741         * page/Frame.h: Added Frame::mainFrame, Frame::isMainFrame, and Frame::m_mainFrame.
742
743         * page/FrameView.h: Removed the isMainFrameView function. It's not better than
744         calling frame().isMainFrame() directly.
745
746         * page/MainFrame.cpp:
747         (WebCore::MainFrame::MainFrame): Initialize m_selfOnlyRefCount to 0.
748         (WebCore::MainFrame::selfOnlyRef): Added.
749         (WebCore::MainFrame::selfOnlyDeref): Added.
750         (WebCore::MainFrame::dropChildren): Added. Called when the self-only reference
751         count reaches 0 to avoid a reference cycle with subframes.
752
753         * page/MainFrame.h: Added new data members as mentioned above. Also, the
754         definition of the Frame::isMainFrame inline function goes here, since it can't
755         compile without the MainFrame class definition. This means that callers of
756         isMainFrame need to include MainFrame.h, which seems reasonable and is easy
757         to do.
758
759         * page/Page.cpp:
760         * page/Page.h: Added assertion to Page::mainFrame since it returns a reference.
761         Removed Page::frameIsMainFrame since it's not better than calling isMainFrame
762         on the frame.
763
764         * dom/Document.cpp:
765         (WebCore::Document::setVisualUpdatesAllowed):
766         (WebCore::Document::didBecomeCurrentDocumentInFrame):
767         (WebCore::Document::updateViewportArguments):
768         (WebCore::Document::setInPageCache):
769         (WebCore::Document::ensurePlugInsInjectedScript):
770         * history/CachedFrame.cpp:
771         (WebCore::CachedFrame::CachedFrame):
772         * history/CachedPage.cpp:
773         (WebCore::CachedPage::restore):
774         * html/HTMLPlugInImageElement.cpp:
775         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
776         * html/ImageDocument.cpp:
777         (WebCore::ImageDocument::shouldShrinkToFit):
778         * inspector/InspectorController.cpp:
779         (WebCore::InspectorController::didClearWindowObjectInWorld):
780         * inspector/InspectorInstrumentation.cpp:
781         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
782         * inspector/InspectorPageAgent.cpp:
783         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
784         (WebCore::InspectorPageAgent::frameNavigated):
785         * loader/DocumentLoader.cpp:
786         (WebCore::DocumentLoader::willSendRequest):
787         * loader/FrameLoader.cpp:
788         (WebCore::FrameLoader::transitionToCommitted):
789         (WebCore::FrameLoader::prepareForCachedPageRestore):
790         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
791         (WebCore::FrameLoader::didLayout):
792         (WebCore::FrameLoader::checkLoadComplete):
793         (WebCore::FrameLoader::addExtraFieldsToRequest):
794         (WebCore::FrameLoader::loadResourceSynchronously):
795         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
796         (WebCore::FrameLoader::dispatchDidCommitLoad):
797         (WebCore::FrameLoader::loadProgressingStatusChanged):
798         * loader/HistoryController.cpp:
799         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
800         (WebCore::HistoryController::restoreScrollPositionAndViewState):
801         (WebCore::HistoryController::updateForCommit):
802         (WebCore::HistoryController::updateForSameDocumentNavigation):
803         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
804         (WebCore::HistoryController::pushState):
805         * loader/icon/IconController.cpp:
806         (WebCore::IconController::startLoader):
807         * page/AutoscrollController.cpp:
808         (WebCore::AutoscrollController::stopAutoscrollTimer):
809         * page/ContextMenuController.cpp:
810         (WebCore::ContextMenuController::populate):
811         * page/DOMWindow.cpp:
812         (WebCore::allowsBeforeUnloadListeners):
813         (WebCore::DOMWindow::focus):
814         (WebCore::DOMWindow::blur):
815         (WebCore::DOMWindow::close):
816         (WebCore::DOMWindow::allowedToChangeWindowGeometry):
817         * page/EventHandler.cpp:
818         (WebCore::EventHandler::hitTestResultAtPoint):
819         (WebCore::EventHandler::selectCursor):
820         (WebCore::EventHandler::handleMousePressEvent):
821         (WebCore::EventHandler::keyEvent):
822         * page/FrameTree.cpp:
823         (WebCore::FrameTree::find):
824         (WebCore::FrameTree::traverseNextWithWrap):
825         * page/FrameView.cpp:
826         (WebCore::FrameView::FrameView):
827         (WebCore::FrameView::setFrameRect):
828         (WebCore::FrameView::createScrollbar):
829         (WebCore::FrameView::applyOverflowToViewport):
830         (WebCore::FrameView::setHeaderHeight):
831         (WebCore::FrameView::setFooterHeight):
832         (WebCore::FrameView::minimumScrollPosition):
833         (WebCore::FrameView::maximumScrollPosition):
834         (WebCore::FrameView::shouldUpdateFixedElementsAfterScrolling):
835         (WebCore::FrameView::beginDeferredRepaints):
836         (WebCore::FrameView::endDeferredRepaints):
837         (WebCore::FrameView::performPostLayoutTasks):
838         (WebCore::FrameView::sendResizeEventIfNeeded):
839         (WebCore::FrameView::pagination):
840         (WebCore::FrameView::visibleContentScaleFactor):
841         (WebCore::FrameView::setVisibleScrollerThumbRect):
842         (WebCore::FrameView::scrollbarStyleChanged):
843         (WebCore::FrameView::paintScrollCorner):
844         (WebCore::FrameView::paintScrollbar):
845         (WebCore::FrameView::paintOverhangAreas):
846         * page/scrolling/ScrollingCoordinator.cpp:
847         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
848         * rendering/RenderLayerBacking.cpp:
849         (WebCore::RenderLayerBacking::RenderLayerBacking):
850         Use the new functions where possible instead of Page::frameIsMainFrame,
851         Page::mainFrame, FrameLoader::isLoadingMainFrame, and FrameView::isMainFrameView.
852
853 2013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
854
855         filter: drop-shadow doesnot support viewport units
856         https://bugs.webkit.org/show_bug.cgi?id=122053
857
858         Reviewed by Darin Adler.
859
860         drop-shadow properties were not applied incase its values
861         were given in vh, vw, vmax, vmin units.
862
863         Tests: fast/css/drop-shadow-viewport-height.html
864                fast/css/drop-shadow-viewport-vmax.html
865                fast/css/drop-shadow-viewport-vmin.html
866                fast/css/drop-shadow-viewport-width.html
867
868         * css/StyleResolver.cpp:
869         (WebCore::StyleResolver::createFilterOperations):
870         Calculating the drop-shadow values which has been specified in viewport
871         units.The vh/vw units are calcultated as percent of viewport height and
872         viewport width respectively. 1vmax: 1vw or 1vh, whatever is largest.
873         1vmin: 1vw or 1vh, whatever is smallest.
874
875 2013-09-28  Gurpreet Kaur  <k.gurpreet@samsung.com>
876
877         REGRESSION (r154614): Setting the document scroll position isn't symmetric; can successfully set document.body.scrollTop, but can only read from document.documentElement.scrollTop
878         https://bugs.webkit.org/show_bug.cgi?id=121876
879
880         Reviewed by Darin Adler.
881
882         Non-Quirks mode should set/get scrolltop/scrollleft through
883         document.documentElement.scrollTop/document.documentElement.scrollLeft
884         Quirks mode should set/get scrolltop/scrollleft through
885         document.body.scrollTop/document.body.scrollLeft.
886
887         Tests: fast/dom/Element/body-scrollLeft-Quirks.html
888                fast/dom/Element/body-scrollLeft.html
889                fast/dom/Element/body-scrollTop-Quirks.html
890                fast/dom/Element/body-scrollTop.html
891                fast/dom/Element/documentElement-scrollLeft-Quirks.html
892                fast/dom/Element/documentElement-scrollLeft.html
893                fast/dom/Element/documentElement-scrollTop-Quirks.html
894                fast/dom/Element/documentElement-scrollTop.html
895
896         * dom/Element.cpp:
897         (WebCore::Element::setScrollLeft):
898         (WebCore::Element::setScrollTop):
899         * html/HTMLBodyElement.cpp:
900         (WebCore::HTMLBodyElement::setScrollLeft):
901         (WebCore::HTMLBodyElement::setScrollTop):
902         Need to set the scrollTop and scrollLeft after checking if document
903         is in quirks or non-quirks mode. Incase it is body.scrollLeft/
904         body.scrollTop set only if document is in quirks mode. If document is
905         non-quirks mode set documentElement.scrollLeft/documentElement.scrollTop.
906
907 2013-09-28  Andreas Kling  <akling@apple.com>
908
909         Pass VM instead of ExecState to JSFunction constructors.
910         <https://webkit.org/b/122014>
911
912         Reviewed by Geoffrey Garen.
913
914         Updated for new JSFunction::create() signature.
915
916 2013-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
917
918         Generate toCSSFooValue() for CSSImageValue 
919         https://bugs.webkit.org/show_bug.cgi?id=122051
920
921         Reviewed by Andreas Kling.
922
923         Clean up static_cast<CSSImageValue*> type casts. It will help to
924         detect bad cast as well as improve code readability.
925
926         Removed unnecessary local variables as well.
927
928         No new tests, no behavior changes.
929
930         * css/CSSCrossfadeValue.cpp:
931         (WebCore::subimageKnownToBeOpaque):
932         * css/CSSCursorImageValue.cpp:
933         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
934         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
935         (WebCore::CSSCursorImageValue::cachedImage):
936         (WebCore::CSSCursorImageValue::isSVGCursor):
937         * css/CSSImageGeneratorValue.cpp:
938         (WebCore::CSSImageGeneratorValue::subimageIsPending):
939         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
940         * css/CSSImageSetValue.cpp:
941         (WebCore::CSSImageSetValue::fillImageSet):
942         * css/CSSImageValue.h:
943         * css/CSSValue.cpp:
944         (WebCore::CSSValue::destroy):
945         * css/StyleResolver.cpp:
946         (WebCore::StyleResolver::applyProperty):
947         (WebCore::StyleResolver::styleImage):
948         * page/PageSerializer.cpp:
949         (WebCore::PageSerializer::retrieveResourcesForProperties):
950         * rendering/style/StylePendingImage.h:
951         (WebCore::StylePendingImage::data):
952         (WebCore::StylePendingImage::cssImageValue):
953
954 2013-09-28  Mark Rowe  <mrowe@apple.com>
955
956         WebCore fails to build with newer versions of clang.
957
958         Reviewed by Sam Weinig.
959
960         * Modules/indexeddb/IDBIndex.cpp: Remove an unused constant.
961         * Modules/indexeddb/IDBObjectStore.cpp: Ditto.
962         * Modules/webaudio/AudioContext.cpp: Ditto.
963         * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
964         * Modules/webdatabase/SQLResultSet.cpp: Ditto.
965         * Modules/webdatabase/SQLTransactionBackend.cpp: Ditto.
966         * Modules/websockets/WebSocketHandshake.cpp: Ditto.
967         * bindings/objc/DOM.mm: Disable a warning about overriding a protocol method in a cateogry around the one
968         place we do it. I don't understand why this generates a warning, nor can I see a different approach that
969         would not result in the warning being emitted.
970         * css/CSSGrammar.y.in: #if a function that's only used inside an #if.
971         * html/track/TextTrackCue.cpp: Remove an unused constant.
972         * loader/TextResourceDecoder.cpp: Remove two unused functions.
973         * page/ContentSecurityPolicy.cpp: Add #if's around constants and functions that are only used when CSP_NEXT is enabled.
974         (WebCore::CSPDirectiveList::checkSourceAndReportViolation): Reorder the ifs slightly to make the #if'ing easier.
975         * page/ContentSecurityPolicy.h: Add #if's around functions that are only used when CSP_NEXT is enabled.
976         * page/DOMSecurityPolicy.cpp: Ditto.
977         * page/DOMSecurityPolicy.h: Ditto.
978         * page/animation/CSSPropertyAnimation.cpp: Remove an unused function.
979         * platform/mac/DisplaySleepDisabler.cpp: Add an #if around a constant that's only used on iOS.
980         * platform/mac/WebCoreFullScreenWarningView.mm: Remove three unused constants.
981         * rendering/RenderLayer.cpp: Remove two unused constants.
982         * rendering/RenderLayerCompositor.cpp:
983         (WebCore::compositingLogEnabled): Move the #if around the function definition.
984         * svg/SVGAnimatedAngle.cpp: Remove an unused function.
985         * svg/SVGUseElement.cpp: #if a function that's only used inside an ASSERT.
986         * xml/XPathStep.cpp: Ditto.
987
988 2013-09-27  Brady Eidson  <beidson@apple.com>
989
990         IndexedDB IDL Refactoring.
991         https://bugs.webkit.org/show_bug.cgi?id=121996
992
993         Reviewed by Alexey Proskuryakov.
994
995         This includes:
996         1 - Leveraging EventTarget.idl inheritance
997         2 - Removing comments
998         3 - Reordering to match the spec's IDLs
999         4 - Removing nonstandard, WebKit-specific methods
1000         5 - Updating interfaces to match the spec (versions are only uint64_t's now...)
1001         6 - Updating implementation code as needed (versions are only uint64_t's now...)
1002
1003         IDL changes:
1004         * Modules/indexeddb/IDBCursor.idl:
1005         * Modules/indexeddb/IDBDatabase.idl:
1006         * Modules/indexeddb/IDBFactory.idl:
1007         * Modules/indexeddb/IDBIndex.idl:
1008         * Modules/indexeddb/IDBKeyRange.idl:
1009         * Modules/indexeddb/IDBObjectStore.idl:
1010         * Modules/indexeddb/IDBRequest.idl:
1011         * Modules/indexeddb/IDBTransaction.idl:
1012         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1013
1014         * Modules/indexeddb/IndexedDB.h: Add new enum to represent version nullness.
1015
1016         Adapt to new IDLs, and also refactor representation of initial, null versioning:
1017         * Modules/indexeddb/IDBCallbacks.h:
1018         (WebCore::IDBCallbacks::onBlocked):
1019         (WebCore::IDBCallbacks::onUpgradeNeeded):
1020
1021         * Modules/indexeddb/IDBDatabase.cpp:
1022         (WebCore::IDBDatabase::version):
1023         (WebCore::IDBDatabase::onVersionChange):
1024         * Modules/indexeddb/IDBDatabase.h:
1025
1026         * Modules/indexeddb/IDBDatabaseCallbacks.h:
1027         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
1028         (WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
1029         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
1030
1031         * Modules/indexeddb/IDBFactory.cpp:
1032         (WebCore::IDBFactory::open):
1033         (WebCore::IDBFactory::openInternal):
1034         (WebCore::IDBFactory::deleteDatabase):
1035         * Modules/indexeddb/IDBFactory.h:
1036
1037         * Modules/indexeddb/IDBMetadata.h:
1038         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
1039
1040         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1041         (WebCore::IDBOpenDBRequest::create):
1042         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
1043         (WebCore::IDBOpenDBRequest::onBlocked):
1044         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1045         * Modules/indexeddb/IDBOpenDBRequest.h:
1046
1047         * Modules/indexeddb/IDBRequest.cpp:
1048         * Modules/indexeddb/IDBRequest.h:
1049
1050         * Modules/indexeddb/IDBTransaction.cpp:
1051         * Modules/indexeddb/IDBTransaction.h:
1052
1053         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1054         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
1055         * Modules/indexeddb/IDBVersionChangeEvent.h:
1056         (WebCore::IDBVersionChangeEvent::create):
1057         (WebCore::IDBVersionChangeEvent::oldVersion):
1058         (WebCore::IDBVersionChangeEvent::newVersion):
1059
1060         Keep leveldb building with minimal adaptations to the new IDLs,
1061         but note that the LevelDB implementation is now incompatible with the spec:
1062         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1063         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
1064         (WebCore::objectStoreCursorOptions):
1065         (WebCore::indexCursorOptions):
1066
1067         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
1068         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
1069         (WebCore::IDBDatabaseBackendLevelDB::openInternal):
1070         (WebCore::IDBDatabaseBackendLevelDB::VersionChangeOperation::perform):
1071         (WebCore::IDBDatabaseBackendLevelDB::processPendingCalls):
1072         (WebCore::IDBDatabaseBackendLevelDB::openConnection):
1073         (WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
1074         (WebCore::IDBDatabaseBackendLevelDB::deleteDatabase):
1075         (WebCore::IDBDatabaseBackendLevelDB::deleteDatabaseFinal):
1076         (WebCore::IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::perform):
1077
1078         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1079         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
1080
1081         * inspector/InspectorIndexedDBAgent.cpp: Update for metadata change.
1082
1083 2013-09-27  Enrica Casucci  <enrica@apple.com>
1084
1085         Upstream changes to Pasteboard implementation for iOS.
1086         https://bugs.webkit.org/show_bug.cgi?id=121818
1087
1088         Reviewed by Benjamin Poulain.
1089
1090         * WebCore.exp.in:
1091         * editing/Editor.cpp:
1092         (WebCore::Editor::dispatchCPPEvent):
1093         * editing/ios/EditorIOS.mm:
1094         (WebCore::Editor::WebContentReader::addFragment):
1095         (WebCore::Editor::WebContentReader::readWebArchive):
1096         (WebCore::Editor::WebContentReader::readFilenames):
1097         (WebCore::Editor::WebContentReader::readHTML):
1098         (WebCore::Editor::WebContentReader::readRTFD):
1099         (WebCore::Editor::WebContentReader::readRTF):
1100         (WebCore::uniqueURLWithRelativePart):
1101         (WebCore::Editor::WebContentReader::readImage):
1102         (WebCore::Editor::WebContentReader::readURL):
1103         (WebCore::Editor::WebContentReader::readPlainText):
1104         (WebCore::Editor::webContentFromPasteboard):
1105         (WebCore::Editor::pasteWithPasteboard):
1106         (WebCore::Editor::createFragmentAndAddResources):
1107         (WebCore::Editor::createFragmentForImageResourceAndAddResource):
1108         * platform/Pasteboard.h:
1109         * platform/PasteboardStrategy.h:
1110         * platform/PlatformPasteboard.h:
1111         * platform/ios/PasteboardIOS.mm:
1112         (WebCore::PasteboardWebContent::PasteboardWebContent):
1113         (WebCore::PasteboardWebContent::~PasteboardWebContent):
1114         (WebCore::PasteboardImage::PasteboardImage):
1115         (WebCore::PasteboardImage::~PasteboardImage):
1116         (WebCore::Pasteboard::Pasteboard):
1117         (WebCore::Pasteboard::clear):
1118         (WebCore::Pasteboard::readString):
1119         (WebCore::Pasteboard::writeString):
1120         (WebCore::Pasteboard::types):
1121         * platform/ios/PlatformPasteboardIOS.mm:
1122         (WebCore::PlatformPasteboard::changeCount):
1123         (WebCore::PlatformPasteboard::write):
1124         (WebCore::PlatformPasteboard::count):
1125         (WebCore::PlatformPasteboard::readBuffer):
1126         (WebCore::PlatformPasteboard::readString):
1127         (WebCore::PlatformPasteboard::readURL):
1128         * platform/mac/PasteboardMac.mm:
1129         (WebCore::PasteboardWebContent::PasteboardWebContent):
1130         (WebCore::PasteboardWebContent::~PasteboardWebContent):
1131         (WebCore::PasteboardImage::PasteboardImage):
1132         (WebCore::PasteboardImage::~PasteboardImage):
1133         * platform/mac/PlatformPasteboardMac.mm:
1134
1135 2013-09-27  Hans Muller  <hmuller@adobe.com>
1136
1137         Crash on shape-outside when using calc()
1138         https://bugs.webkit.org/show_bug.cgi?id=121020
1139
1140         Reviewed by Dirk Schulze.
1141
1142         This change prevents a crash caused by specifying a CSS Shape geometry
1143         Length attribute with a calc() expression. It adds support for converting
1144         Lengths to CSSPrimitive Values, in large part by migrating Blink changes
1145         made to the calc classes since the split. Doing so required a few supporting
1146         changes in some related classes, notably CSSPrimitiveValue.
1147
1148         Tests: fast/shapes/shape-inside/shape-inside-calc-crash.html
1149                css3/calc/simplification.html
1150
1151         * css/BasicShapeFunctions.cpp:
1152         (WebCore::convertToCSSPrimitiveValue): Effectively use the new CSSPrimtiveValue(length,style) constructor to convert Lengths to CSSValues.
1153         (WebCore::valueForBasicShape): Use the convertToCSSPrimitiveValue() function.
1154         (WebCore::convertToLength): Added the CalculatedConversion convertToLength() flag to enable support for calc() valued Length Shape attributes.
1155         * css/BasicShapeFunctions.h:
1156         * css/CSSCalculationValue.cpp:
1157         (WebCore::hasDoubleValue):
1158         (WebCore::buildCssText):
1159         (WebCore::CSSCalcValue::clampToPermittedRange):
1160         (WebCore::CSSCalcValue::doubleValue):
1161         (WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
1162         (WebCore::CSSCalcPrimitiveValue::create):
1163         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
1164         (WebCore::CSSCalcPrimitiveValue::doubleValue):
1165         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
1166         (WebCore::CSSCalcPrimitiveValue::primitiveType):
1167         (WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
1168         (WebCore::determineCategory):
1169         (WebCore::isIntegerResult):
1170         (WebCore::CSSCalcBinaryOperation::create):
1171         (WebCore::CSSCalcBinaryOperation::createSimplified):
1172         (WebCore::CSSCalcBinaryOperation::doubleValue):
1173         (WebCore::CSSCalcBinaryOperation::buildCssText):
1174         (WebCore::CSSCalcBinaryOperation::primitiveType):
1175         (WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
1176         (WebCore::CSSCalcBinaryOperation::getNumberSide):
1177         (WebCore::CSSCalcBinaryOperation::evaluate):
1178         (WebCore::CSSCalcBinaryOperation::evaluateOperator):
1179         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1180         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
1181         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
1182         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
1183         (WebCore::CSSCalcValue::createExpressionNode):
1184         (WebCore::CSSCalcValue::create):
1185         * css/CSSCalculationValue.h:
1186         (WebCore::CSSCalcExpressionNode::category):
1187         (WebCore::CSSCalcValue::create):
1188         (WebCore::CSSCalcValue::isInt):
1189         (WebCore::CSSCalcValue::permittedValueRange):
1190         (WebCore::CSSCalcValue::expressionNode):
1191         (WebCore::CSSCalcValue::CSSCalcValue):
1192         (WebCore::toCSSCalcValue):
1193         * css/CSSComputedStyleDeclaration.cpp:
1194         (WebCore::ComputedStyleExtractor::propertyValue): Pass the style along to the new valueForBasicShape() function.
1195         * css/CSSPrimitiveValue.cpp:
1196         (WebCore::CSSPrimitiveValue::unitCategory): Made this function public so that CSSCalculationValue could use it.
1197         (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor): Ditto.
1198         (WebCore::CSSPrimitiveValue::primitiveType): Cleared trailing whitespace.
1199         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Construct a CSSPrimitiveValue from a Length and a RenderStyle*.
1200         (WebCore::CSSPrimitiveValue::init): The common part of the two Length CSSPrimitiveValue constructors.
1201         (WebCore::CSSPrimitiveValue::computeLengthDouble): Moved the case labels to the left per check-webkit-style.
1202         (WebCore::CSSPrimitiveValue::getStringValue): Ditto.
1203         (WebCore::CSSPrimitiveValue::getDoubleValue): Removed trailing whitespace.
1204         * css/CSSPrimitiveValue.h:
1205         (WebCore::CSSPrimitiveValue::create): Construct a CSSPrimitiveValue from a Length and a RenderStyle*.
1206         (WebCore::toCSSPrimitiveValue): Check the CSSValue*'s validity with ASSERT_WITH_SECURITY_IMPLICATION before casting to CSSPrimitiveValue*.
1207         * css/CSSValuePool.h:
1208         (WebCore::CSSValuePool::createValue): A new overload that delegates to the new CSSPrimitiveValue(length,style) constructor.
1209         * platform/CalculationValue.h:
1210         (WebCore::CalculationValue::operator==):
1211         (WebCore::CalculationValue::isNonNegative):
1212         (WebCore::CalculationValue::expression):
1213         (WebCore::CalcExpressionNumber::value):
1214         (WebCore::toCalcExpressionNumber):
1215         (WebCore::CalcExpressionLength::CalcExpressionLength):
1216         (WebCore::CalcExpressionLength::length):
1217         (WebCore::toCalcExpressionLength):
1218         (WebCore::CalcExpressionBinaryOperation::leftSide):
1219         (WebCore::CalcExpressionBinaryOperation::rightSide):
1220         (WebCore::CalcExpressionBinaryOperation::getOperator):
1221         (WebCore::toCalcExpressionBinaryOperation):
1222         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
1223         (WebCore::CalcExpressionBlendLength::from):
1224         (WebCore::CalcExpressionBlendLength::to):
1225         (WebCore::CalcExpressionBlendLength::progress):
1226         (WebCore::toCalcExpressionBlendLength):
1227
1228 2013-09-27  Andreas Kling  <akling@apple.com>
1229
1230         REGRESSION(r154219): 30% more malloc memory used on html5-full-render.
1231         <https://webkit.org/b/122034>
1232
1233         Reviewed by Antti Koivisto.
1234
1235         canExecuteScripts() used to rely on Frame::settings() returning null
1236         when the Frame was disconnected from its Page, and giving Frame its
1237         own handle on the Settings broke this mechanism.
1238
1239         This caused us to hold on for some objects for a bit longer than we
1240         needed to in the run-perf-tests harness, showing up as a massive 30%
1241         regression in malloc memory use.
1242
1243         Fixed it by added an explicit null check of Frame::page().
1244
1245 2013-09-27  Alexey Proskuryakov  <ap@apple.com>
1246
1247         Updating bindings test results after KURL->URL rename.
1248
1249         Includes were now in the wrong order.
1250
1251         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
1252         * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
1253         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
1254         * bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
1255         * bindings/scripts/test/CPP/WebDOMTestException.cpp:
1256         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
1257         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1258         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
1259         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1260         * bindings/scripts/test/JS/JSTestException.cpp:
1261         * bindings/scripts/test/JS/JSTestObj.cpp:
1262         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1263         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
1264         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1265         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
1266         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
1267         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
1268         * bindings/scripts/test/ObjC/DOMTestException.mm:
1269         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1270         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1271         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
1272
1273 2013-09-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1274
1275         Get MediaStreamCenterGStreamer compiling again
1276         https://bugs.webkit.org/show_bug.cgi?id=122029
1277
1278         After MediaStream cleanup commit, it was not building anymore.
1279
1280         Reviewed by Eric Carlson.
1281
1282         No new tests needed.
1283
1284         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
1285
1286 2013-09-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1287
1288         Storing a reference to MediaStreamTrack in RTCStatsRequest
1289         https://bugs.webkit.org/show_bug.cgi?id=122030
1290
1291         Reviewed by Eric Carlson.
1292
1293         The spec[1] says that the stats is related to a MediaStreamTrack object.
1294         It also says: "Evaluate the need for other selectors than MediaStreamTrack".
1295         So a MediaStreamTrack object is more suitable in this case.
1296
1297         [1]http://dev.w3.org/2011/webrtc/editor/webrtc.html#stats-selector
1298
1299         No new tests needed.
1300
1301         * Modules/mediastream/RTCStatsRequestImpl.cpp:
1302         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
1303         (WebCore::RTCStatsRequestImpl::hasSelector):
1304         (WebCore::RTCStatsRequestImpl::track):
1305         * Modules/mediastream/RTCStatsRequestImpl.h:
1306         * platform/mediastream/RTCStatsRequest.h:
1307
1308 2013-09-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1309
1310         [Nix] Updating Nix trunk files
1311         https://bugs.webkit.org/show_bug.cgi?id=121752
1312
1313         Reviewed by Benjamin Poulain.
1314
1315         No new tests needed.
1316
1317         * page/nix/EventHandlerNix.cpp:
1318         (WebCore::EventHandler::focusDocumentView):
1319         (WebCore::EventHandler::passWheelEventToWidget):
1320         (WebCore::EventHandler::passMousePressEventToSubframe):
1321         (WebCore::EventHandler::passMouseMoveEventToSubframe):
1322         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
1323         * platform/DragImage.h:
1324         * platform/graphics/GraphicsContext3D.h:
1325         * platform/nix/DragImageNix.cpp:
1326         (WebCore::createDragImageFromImage):
1327         * platform/nix/GamepadsNix.cpp:
1328         (WebCore::sampleGamepads):
1329         * platform/nix/LanguageNix.cpp:
1330         (WebCore::platformLanguage):
1331         * platform/nix/LocalizedStringsNix.cpp:
1332         (WebCore::unacceptableTLSCertificate):
1333         * platform/nix/PasteboardNix.cpp:
1334         (WebCore::Pasteboard::types):
1335         * platform/nix/RenderThemeNix.cpp:
1336         (WebCore::toColor):
1337         (WebCore::themeEngine):
1338         (WebCore::webCanvas):
1339         (WebCore::getWebThemeState):
1340         (WebCore::RenderThemeNix::paintButton):
1341         (WebCore::RenderThemeNix::paintTextField):
1342         (WebCore::RenderThemeNix::paintCheckbox):
1343         (WebCore::RenderThemeNix::paintRadio):
1344         (WebCore::RenderThemeNix::paintMenuList):
1345         (WebCore::RenderThemeNix::paintProgressBar):
1346         (WebCore::RenderThemeNix::paintInnerSpinButton):
1347         (WebCore::RenderThemeNix::paintMeter):
1348
1349 2013-09-27  Anders Carlsson  <andersca@apple.com>
1350
1351         Use std::unique_ptr for GraphicsLayer creation
1352         https://bugs.webkit.org/show_bug.cgi?id=122020
1353
1354         Reviewed by Antti Koivisto.
1355
1356         * platform/graphics/GraphicsLayer.h:
1357         * platform/graphics/GraphicsLayerFactory.h:
1358         * platform/graphics/ca/GraphicsLayerCA.cpp:
1359         (WebCore::GraphicsLayer::create):
1360         * platform/graphics/ca/GraphicsLayerCA.h:
1361         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1362         (WebCore::CompositingCoordinator::createGraphicsLayer):
1363         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
1364         * rendering/RenderLayerBacking.cpp:
1365         (WebCore::RenderLayerBacking::createGraphicsLayer):
1366         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1367         (WebCore::RenderLayerBacking::paintIntoLayer):
1368         * rendering/RenderLayerBacking.h:
1369         (WebCore::RenderLayerBacking::hasScrollingLayer):
1370         * rendering/RenderLayerCompositor.cpp:
1371         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1372         * rendering/RenderLayerCompositor.h:
1373
1374 2013-09-27  Beth Dakin  <bdakin@apple.com>
1375
1376         ScrollbarPainterController should adopt the api to lock overlay scrollbar state
1377         https://bugs.webkit.org/show_bug.cgi?id=121928
1378
1379         Reviewed by Sam Weinig.
1380
1381         ScrollbarPainterController should adopt the api to lock overlay scrollbar state. 
1382         This will allow the ScrollbarPainterController and ScrollAnimatorMac to have 
1383         control over knowing whether or not the scrollbars are currently active, which 
1384         will allow us to remove a bunch of functions previously implemented in 
1385         ScrollableArea subclasses to answer that question.
1386
1387         ScrollableArea::scrollbarsCanBeActive() is not longer virtual. It used to 
1388         implemented on ScrollableArea subclasses, but now ScrollableArea can just get the 
1389         information from the ScrollAnimator.
1390         * WebCore.exp.in:
1391
1392         When ScrollableArea subclasses implemented scrollbarsCanBeActive(), they would 
1393         check to see if the document was in the page cache. Instead of that model, this 
1394         patch adopts a model where ScrollbarPainterController is told directly whether or 
1395         not it is active via shouldLockOverlayScrollbarsToHidden(bool).
1396         * dom/Document.cpp:
1397         (WebCore::Document::setInPageCache):
1398
1399         setAnimatorsAreActive() is no longer necessary. The functionality can be bundled 
1400         into shouldLockOverlayScrollbarsToHidden(bool).
1401         (WebCore::Document::documentDidResumeFromPageCache):
1402
1403         Remove implementations of scrollbarsCanBeActive(), setAnimatorsAreActive(), and 
1404         scrollbarAnimationsAreSuppressed(). 
1405         * page/FrameView.cpp:
1406         (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
1407         * page/FrameView.h:
1408
1409         setShouldSuppressScrollbarAnimations(bool) now calls 
1410         setShouldLockOverlayScrollbars(bool). 
1411         * page/Page.cpp:
1412         (WebCore::Page::setShouldSuppressScrollbarAnimations):
1413         (WebCore::Page::setShouldLockOverlayScrollbars):
1414         * page/Page.h:
1415
1416         setIsActive() is now implemented in the ScrollAnimator instead of ScrollableArea 
1417         subclasses. finishCurrentScrollAnimations() is replaced by 
1418         lockOverlayScrollbarStateToHidden(bool).
1419         * platform/ScrollAnimator.h:
1420         (WebCore::ScrollAnimator::lockOverlayScrollbarStateToHidden):
1421         (WebCore::ScrollAnimator::scrollbarsCanBeActive):
1422
1423         New enum ScrollbarOverlayState.
1424         * platform/ScrollTypes.h:
1425
1426         Go to the animator for both of these functions.
1427         * platform/ScrollableArea.cpp:
1428         (WebCore::ScrollableArea::lockOverlayScrollbarStateToHidden):
1429         (WebCore::ScrollableArea::scrollbarsCanBeActive):
1430         * platform/ScrollableArea.h:
1431         (WebCore::ScrollableArea::setVisibleScrollerThumbRect):
1432
1433         Three new pieces of ScrollbarPainterController api.
1434         * platform/mac/NSScrollerImpDetails.h:
1435
1436         Instead of asking the ScrollableArea if scrollbars can be active, just find out if 
1437         the ScrollbarPaintController has been locked.
1438         * platform/mac/ScrollAnimatorMac.h:
1439         * platform/mac/ScrollAnimatorMac.mm:
1440         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1441         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1442         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
1443         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
1444         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
1445         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
1446         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
1447         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
1448         (WebCore::ScrollAnimatorMac::willStartLiveResize):
1449         (WebCore::ScrollAnimatorMac::contentsResized):
1450         (WebCore::ScrollAnimatorMac::willEndLiveResize):
1451         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
1452         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
1453         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
1454         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
1455         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
1456         (WebCore::ScrollAnimatorMac::lockOverlayScrollbarStateToHidden):
1457         (WebCore::ScrollAnimatorMac::scrollbarsCanBeActive):
1458         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
1459         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1460
1461         Remove implementations of scrollbarsCanBeActive() and 
1462         scrollbarAnimationsAreSuppressed().
1463         * rendering/RenderLayer.cpp:
1464         * rendering/RenderLayer.h:
1465         * rendering/RenderListBox.cpp:
1466         * rendering/RenderListBox.h:
1467
1468 2013-09-27  David Hyatt  <hyatt@apple.com>
1469
1470         Move line grid functionality from RenderBlock into RenderBlockFlow.
1471         https://bugs.webkit.org/show_bug.cgi?id=121502
1472
1473         Reviewed by Dean Jackson.
1474
1475         * rendering/LayoutState.cpp:
1476         (WebCore::LayoutState::LayoutState):
1477         (WebCore::LayoutState::establishLineGrid):
1478         * rendering/LayoutState.h:
1479         (WebCore::LayoutState::lineGrid):
1480         * rendering/RenderBlock.cpp:
1481         (WebCore::RenderBlock::willBeDestroyed):
1482         * rendering/RenderBlock.h:
1483         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
1484         * rendering/RenderBlockFlow.cpp:
1485         (WebCore::RenderBlockFlow::willBeDestroyed):
1486         (WebCore::RenderBlockFlow::layoutLineGridBox):
1487         * rendering/RenderBlockFlow.h:
1488         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
1489         (WebCore::RenderBlockFlow::lineGridBox):
1490         (WebCore::RenderBlockFlow::setLineGridBox):
1491         * rendering/RenderBlockLineLayout.cpp:
1492         * rendering/RootInlineBox.cpp:
1493         (WebCore::RootInlineBox::lineSnapAdjustment):
1494
1495 2013-09-27  Andreas Kling  <akling@apple.com>
1496
1497         Re-indent Settings.h
1498
1499         Rubber-stamped by Anders Carlsson.
1500
1501 2013-09-27  Eric Carlson  <eric.carlson@apple.com>
1502
1503         [MediaStream API] update SourceInfo object to match spec
1504         https://bugs.webkit.org/show_bug.cgi?id=121941
1505
1506         Reviewed by Dean Jackson.
1507
1508         No new tests, existing test updated.
1509
1510         * Modules/mediastream/SourceInfo.cpp:
1511         (WebCore::SourceInfo::kind): Get rid of "none".
1512         * Modules/mediastream/SourceInfo.h:
1513         (WebCore::SourceInfo::sourceId): Renamed from "id".
1514         * Modules/mediastream/SourceInfo.idl:
1515
1516         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
1517         (WebCore::TrackSourceInfo::create):
1518         (WebCore::TrackSourceInfo::kind):
1519         (WebCore::TrackSourceInfo::TrackSourceInfo):
1520
1521         * platform/mock/MockMediaStreamCenter.cpp:
1522         (WebCore::MockMediaStreamCenter::getMediaStreamTrackSources): "facing" isn't a part of sourceInfo.
1523             Return a non-NULL ID because a source must always have one.
1524
1525 2013-09-26  Dean Jackson  <dino@apple.com>
1526
1527         Provide 2D Matrix decomposition for animation
1528         https://bugs.webkit.org/show_bug.cgi?id=112824
1529         <rdar://problem/15091882>
1530
1531         Reviewed by Eric Carlson (and Ian Henderson offline).
1532
1533         Implement a new 2d matrix blend, which is triggered
1534         when animating between two affine 3d matrices. This
1535         is intended to be the official algorithm that gets
1536         put into the W3C Transforms specification.
1537
1538         The old code is renamed with a 4 prefix (indicating
1539         it is a blend between 3d matrices using quaternions),
1540         and new methods and structures for 2d blending were added.
1541
1542         I also took the opportunity to clean up a lot of
1543         bad WebKit style.
1544
1545         * platform/graphics/ca/GraphicsLayerCA.cpp:
1546         (WebCore::maxScaleFromTransform): Use 3d decomposition.
1547         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1548         (WebCore::PerspectiveTransformOperation::blend): Ditto.
1549         * platform/graphics/transforms/RotateTransformOperation.cpp:
1550         (WebCore::RotateTransformOperation::blend): Ditto.
1551
1552         * platform/graphics/transforms/TransformationMatrix.cpp:
1553         (WebCore::decompose2): New method to decompose an affine 3d matrix
1554         into X/Y scale + translate, a rotation angle, plus some extracted
1555         a,b,c,d fields from the affine section.
1556         (WebCore::decompose4): New name for the old function.
1557         (WebCore::TransformationMatrix::blend2): Perform linear interpolation
1558         between two 2d decompositions.
1559         (WebCore::TransformationMatrix::blend4): New name for the old function.
1560         (WebCore::TransformationMatrix::blend): Call blend2 or blend4 depending
1561         on the type of matrix.
1562         (WebCore::TransformationMatrix::decompose2): Calls into the decompose2
1563         method above.
1564         (WebCore::TransformationMatrix::decompose4): New name.
1565         (WebCore::TransformationMatrix::recompose2): Recomposes a 3d matrix from
1566         a 2d decomposition.
1567         (WebCore::TransformationMatrix::recompose4): New name.
1568         * platform/graphics/transforms/TransformationMatrix.h: All the changes
1569         for the new methods above.
1570
1571 2013-09-26  Darin Adler  <darin@apple.com>
1572
1573         rename KURL to URL
1574         https://bugs.webkit.org/show_bug.cgi?id=16214
1575
1576         Reviewed by Andreas Kling.
1577
1578         * many files: Renamed, using script.
1579
1580 2013-09-06  Jer Noble  <jer.noble@apple.com>
1581
1582         [Mac] Implement the media controls in JavaScript.
1583         https://bugs.webkit.org/show_bug.cgi?id=120895
1584
1585         Reviewed by Dean Jackson.
1586
1587         Re-implement the existing MediaControls constellation of classes in JavaScript
1588         and CSS. This will allow different ports to configure their controls without
1589         dependencies on the layout requirements of any other port's controls.
1590
1591         Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT:
1592         * Configurations/FeatureDefines.xcconfig:
1593
1594         Add new source files to the project:
1595         * DerivedSources.cpp:
1596         * DerivedSources.make:
1597         * WebCore.vcxproj/WebCore.vcxproj:
1598         * WebCore.vcxproj/WebCore.vcxproj.filters:
1599         * WebCore.xcodeproj/project.pbxproj:
1600
1601         Add a new class MediaControlsHost which the script controls can use to
1602         communicate with the HTMLMediaElement without exposing private interfaces
1603         to web facing scripts:
1604         * Modules/mediacontrols/MediaControlsHost.cpp: Added.
1605         (WebCore::MediaControlsHost::automaticKeyword): Static method.
1606         (WebCore::MediaControlsHost::forcedOnlyKeyword): Ditto.
1607         (WebCore::MediaControlsHost::alwaysOnKeyword): Ditto.
1608         (WebCore::MediaControlsHost::create): Simple factory.
1609         (WebCore::MediaControlsHost::MediaControlsHost): Simple constructor.
1610         (WebCore::MediaControlsHost::~MediaControlsHost): Simple destructor.
1611         (WebCore::MediaControlsHost::sortedTrackListForMenu): Pass through to CaptionUserPreferences.
1612         (WebCore::MediaControlsHost::displayNameForTrack): Ditto.
1613         (WebCore::MediaControlsHost::captionMenuOffItem): Pass through to TextTrack.
1614         (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
1615         (WebCore::MediaControlsHost::captionDisplayMode): Pass through to CaptionUserPreferences.
1616         (WebCore::MediaControlsHost::setSelectedTextTrack): Pass through to HTMLMediaElement.
1617         (WebCore::MediaControlsHost::textTrackContainer): Lazily create a MediaControlTextTrackContainerElement.
1618         (WebCore::MediaControlsHost::updateTextTrackContainer): Pass through to MediaControlTextTrackContainerElement.
1619         * Modules/mediacontrols/MediaControlsHost.h: Added.
1620         * Modules/mediacontrols/MediaControlsHost.idl: Added.
1621         * Modules/mediacontrols/mediaControlsApple.css: Added.
1622
1623         Add convenience methods for adding a MediaControlsHost to a VM.
1624         * bindings/js/ScriptObject.cpp:
1625         (WebCore::ScriptGlobalObject::set):
1626         * bindings/js/ScriptObject.h:
1627
1628         Add the new controller .js implementation:
1629         * Modules/mediacontrols/mediaControlsApple.js: Added.
1630         (createControls): Global method to create a new Controller object.
1631         (Controller): Constructor. Create and configure the default set of controls.
1632         (Controller.prototype.addListeners): Adds event listeners to the this.video object.
1633         (Controller.prototype.removeListeners): Removes listeners from same.
1634         (Controller.prototype.handleEvent): Makes Controller an EventHandler, making registration and
1635                 deregistration simpler.
1636         (Controller.prototype.createBase): Creates the base controls object and the text track container.
1637         (Controller.prototype.createControls): Creates the controls panel object and controller UI.
1638         (Controller.prototype.setControlsType): Switches between Full Screen and Inline style of controller.
1639         (Controller.prototype.disconnectControls): Disconnects all UI elements from the DOM.
1640         (Controller.prototype.configureInlineControls): Configures existing controls for Inline mode.
1641         (Controller.prototype.configureFullScreenControls): Ditto, for Full Screen Mode.
1642
1643         Add listeners for HTMLMediaElement events:
1644         (Controller.prototype.onloadstart): Update the status display.
1645         (Controller.prototype.onerror): Ditto.
1646         (Controller.prototype.onabort): Ditto.
1647         (Controller.prototype.onsuspend): Ditto.
1648         (Controller.prototype.onprogress): Ditto.
1649         (Controller.prototype.onstalled): Ditto.
1650         (Controller.prototype.onwaiting): Ditto.
1651         (Controller.prototype.onreadystatechange): Ditto.
1652         (Controller.prototype.ontimeupdate): Update the timeline and time displays.
1653         (Controller.prototype.ondurationchange): Ditto.
1654         (Controller.prototype.onplaying): Update the play button.
1655         (Controller.prototype.onplay): Ditto.
1656         (Controller.prototype.onpause): Ditto.
1657         (Controller.prototype.onratechange): Ditto.
1658         (Controller.prototype.onvolumechange): Update the volume and mute UI.
1659         (Controller.prototype.ontexttrackchange): Update the text track container and captions button.
1660         (Controller.prototype.ontexttrackadd): Ditto.
1661         (Controller.prototype.ontexttrackremove): Ditto.
1662         (Controller.prototype.ontexttrackcuechange): Ditto.
1663         (Controller.prototype.onfullscreenchange): Reconfigure the controls.
1664
1665         Add listeners for UI element events:
1666         (Controller.prototype.onwrappermousemove): Show the controls and start the hide timer.
1667         (Controller.prototype.onwrappermouseout): Hide the controls and stop the hide timer.
1668         (Controller.prototype.onrewindbuttonclicked): Rewind.
1669         (Controller.prototype.onplaybuttonclicked): Toggle pause.
1670         (Controller.prototype.ontimelinechange): Update the currentTime.
1671         (Controller.prototype.ontimelinedown):
1672         (Controller.prototype.ontimelineup):
1673         (Controller.prototype.ontimelinemouseover): Show the thumbnail view if available.
1674         (Controller.prototype.ontimelinemouseout): Hide same.
1675         (Controller.prototype.ontimelinemousemove): Move the thumbnail view.
1676         (Controller.prototype.onmutebuttonclicked): Mute audio.
1677         (Controller.prototype.onminbuttonclicked): Increase volume to max.
1678         (Controller.prototype.onmaxbuttonclicked): Decrease volume to min.
1679         (Controller.prototype.onvolumesliderchange): Update the current volume.
1680         (Controller.prototype.oncaptionbuttonclicked): Show or hide the track menu.
1681         (Controller.prototype.onfullscreenbuttonclicked): Enter or exit fullscreen.
1682         (Controller.prototype.oncontrolschange): Show or hide the controls panel.
1683         (Controller.prototype.onseekbackmousedown): Start seeking and enable the seek timer.
1684         (Controller.prototype.onseekbackmouseup): Stop seeking and disable the seek timer.
1685         (Controller.prototype.onseekforwardmousedown): Start seekind and enable the seek timer.
1686         (Controller.prototype.onseekforwardmouseup): Stop seekind and disable the seek timer.
1687
1688         Add action methods (which are mostly self explanatory):
1689         (Controller.prototype.updateDuration):
1690         (Controller.prototype.updatePlaying):
1691         (Controller.prototype.showControls): 
1692         (Controller.prototype.hideControls):
1693         (Controller.prototype.removeControls):
1694         (Controller.prototype.addControls):
1695         (Controller.prototype.updateTime):
1696         (Controller.prototype.updateReadyState):
1697         (Controller.prototype.setStatusHidden):        
1698         (Controller.prototype.updateThumbnailTrack):
1699         (Controller.prototype.updateCaptionButton):
1700         (Controller.prototype.updateCaptionContainer):
1701         (Controller.prototype.buildCaptionMenu):
1702         (Controller.prototype.captionItemSelected):
1703         (Controller.prototype.destroyCaptionMenu):
1704         (Controller.prototype.updateVolume):
1705
1706         Add utility methods:
1707         (Controller.prototype.isFullScreen):
1708         (Controller.prototype.canPlay):
1709         (Controller.prototype.nextRate):
1710         (Controller.prototype.seekBackFaster):
1711         (Controller.prototype.seekForwardFaster):
1712         (Controller.prototype.formatTime):
1713         (Controller.prototype.trackHasThumbnails):
1714
1715         Add the stylesheet for the javascript controls (which are mostly) copied from
1716         the (deleted) mediaControlsQuickTime.css and fullscreenQuickTime.css files:
1717         * Modules/mediacontrols/mediaControlsApple.css: Added.
1718         * css/fullscreenQuickTime.css: Removed.
1719         * css/mediaControlsQuickTime.css: Removed.
1720
1721         Inject new stylesheets into UA sheets:
1722         * css/CSSDefaultStyleSheets.cpp:
1723         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1724
1725         Use the new javascript controls rather than MediaControls:
1726         * html/HTMLMediaElement.cpp:
1727         (WebCore::HTMLMediaElement::childShouldCreateRenderer): Use the javascript controls if available.
1728         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Ditto.
1729         (WebCore::HTMLMediaElement::mediaControls): Ditto.
1730         (WebCore::HTMLMediaElement::hasMediaControls): Ditto.
1731         (WebCore::HTMLMediaElement::createMediaControls): Ditto.
1732         (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
1733         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
1734         (WebCore::HTMLMediaElement::ensureIsolatedWorld): Create a new VM for the controls script.
1735         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Inject the media controls script into the VM.
1736         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Inject the MediaControlsHost into the VM and call
1737                 the scripts global factory function.
1738         * html/HTMLMediaElement.h:
1739
1740         Remove most of the drawing code from RenderThemeMac and RenderThemeWin and
1741         add accessors for the new .js and .css file data:
1742         * rendering/RenderTheme.h:
1743         (WebCore::RenderTheme::mediaControlsStyleSheet): Empty virtual method.
1744         (WebCore::RenderTheme::mediaControlsScript): Ditto.
1745         * rendering/RenderThemeMac.h:
1746         * rendering/RenderThemeMac.mm:
1747         (WebCore::RenderThemeMac::mediaControlsStyleSheet): Add accessor for mediaControlsApple.css.
1748         (WebCore::RenderThemeMac::mediaControlsScript): Add accessor for mediaControlsApple.js.
1749         (WebCore::RenderThemeMac::adjustSliderThumbSize): Remove the call to adjustMediaSliderThumbSize.
1750         * rendering/RenderThemeWin.cpp:
1751         (WebCore::RenderThemeWin::mediaControlsStyleSheet):
1752         (WebCore::RenderThemeWin::mediaControlsScript):
1753         * rendering/RenderThemeWin.h:
1754
1755 2013-09-27  Bem Jones-Bey  <bjonesbe@adobe.com>
1756
1757         [css-shapes] Shapes are not resolved the same way in shape-inside and clip-path
1758         https://bugs.webkit.org/show_bug.cgi?id=121922
1759
1760         Reviewed by Andreas Kling.
1761
1762         Fix computation of a percentage radius for circle shape-outside to
1763         match the CSS Shapes spec.
1764
1765         Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-circle-001.html
1766
1767         * rendering/shapes/Shape.cpp:
1768         (WebCore::Shape::createShape):
1769
1770 2013-09-27  Darin Adler  <darin@apple.com>
1771
1772         Add empty MainFrame class
1773         https://bugs.webkit.org/show_bug.cgi?id=121770
1774
1775         Reviewed by Andreas Kling.
1776
1777         For now, MainFrame simply derives from Frame and adds nothing.
1778         Next, we will make each Frame point back to its MainFrame.
1779
1780         * CMakeLists.txt: Added MainFrame.cpp/h.
1781         * GNUmakefile.list.am: Ditto.
1782         * Target.pri: Ditto.
1783         * WebCore.exp.in: Ditto.
1784         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1785         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1786         * WebCore.xcodeproj/project.pbxproj: Ditto.
1787
1788         * page/Frame.cpp:
1789         (WebCore::Frame::Frame): Use references instead of pointers for constructor.
1790         (WebCore::Frame::create): Pass references instead of pointers to constructor.
1791         * page/Frame.h: Made constructor protected instead of private, and marked
1792         destructor virtual explicitly. Also marked virtual functions OVERRIDE and FINAL.
1793
1794         * page/MainFrame.cpp: Added.
1795         * page/MainFrame.h: Added.
1796
1797         * page/Page.cpp:
1798         (WebCore::Page::Page): Use MainFrame::create instead of Frame::create.
1799         (WebCore::Page::frameIsMainFrame): Moved here, no longer inline.
1800         (WebCore::Page::renderTreeSize): Use const Frame* instead of Frame*.
1801         (WebCore::Page::checkSubframeCountConsistency): Ditto.
1802         * page/Page.h: Changed mainFrame() to return MainFrame& and m_mainFrame to
1803         be a RefPtr<MainFrame>.
1804
1805         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1806         * bindings/js/PageScriptDebugServer.cpp:
1807         * bindings/js/ScriptProfiler.cpp:
1808         * bindings/js/ScriptState.cpp:
1809         * css/MediaQueryEvaluator.cpp:
1810         * dom/Document.cpp:
1811         * history/CachedFrame.cpp:
1812         * history/CachedPage.cpp:
1813         * history/PageCache.cpp:
1814         * html/HTMLPlugInImageElement.cpp:
1815         * inspector/InspectorAgent.cpp:
1816         * inspector/InspectorCanvasAgent.cpp:
1817         * inspector/InspectorClient.cpp:
1818         * inspector/InspectorDOMAgent.cpp:
1819         * inspector/InspectorFrontendClientLocal.cpp:
1820         * inspector/InspectorFrontendHost.cpp:
1821         * inspector/InspectorInputAgent.cpp:
1822         * inspector/InspectorInstrumentation.cpp:
1823         * inspector/InspectorOverlay.cpp:
1824         * inspector/InspectorPageAgent.cpp:
1825         * inspector/PageRuntimeAgent.cpp:
1826         * loader/FrameLoader.cpp:
1827         * loader/HistoryController.cpp:
1828         * loader/archive/mhtml/MHTMLArchive.cpp:
1829         * page/AutoscrollController.cpp:
1830         * page/Chrome.cpp:
1831         * page/ContextMenuController.cpp:
1832         * page/DOMWindow.cpp:
1833         * page/DragController.cpp:
1834         * page/EventHandler.cpp:
1835         * page/FocusController.cpp:
1836         * page/FrameTree.cpp:
1837         * page/FrameView.cpp:
1838         * page/GestureTapHighlighter.cpp:
1839         * page/PageGroup.cpp:
1840         * page/PageGroupLoadDeferrer.cpp:
1841         * page/PageSerializer.cpp:
1842         * page/PageThrottler.cpp:
1843         * page/Settings.cpp:
1844         * page/SpatialNavigation.cpp:
1845         * page/mac/DragControllerMac.mm:
1846         * page/mac/PageMac.cpp:
1847         * page/scrolling/ScrollingCoordinator.cpp:
1848         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1849         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1850         * plugins/DOMMimeType.cpp:
1851         * storage/StorageEventDispatcher.cpp:
1852         * svg/graphics/SVGImage.cpp:
1853         * testing/InternalSettings.cpp:
1854         * testing/Internals.cpp:
1855         Include MainFrame.h instead of Frame.h as needed.
1856
1857 2013-09-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1858
1859         Add toWebKitCSS*Value functions to cast from CSSValue
1860         https://bugs.webkit.org/show_bug.cgi?id=121776
1861
1862         Reviewed by Andreas Kling.
1863
1864         CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
1865
1866         No new tests, no behavior change.
1867
1868         * css/CSSValue.cpp:
1869         (WebCore::CSSValue::destroy):
1870         * css/StyleResolver.cpp:
1871         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1872         (WebCore::StyleResolver::createFilterOperations):
1873         * css/TransformFunctions.cpp:
1874         (WebCore::transformsForValue):
1875         * css/WebKitCSSArrayFunctionValue.h:
1876         (WebCore::toWebKitCSSArrayFunctionValue):
1877         * css/WebKitCSSFilterValue.h:
1878         (WebCore::toWebKitCSSFilterValue):
1879         * css/WebKitCSSMatFunctionValue.h:
1880         (WebCore::toWebKitCSSMatFunctionValue):
1881         * css/WebKitCSSMixFunctionValue.h:
1882         (WebCore::toWebKitCSSMixFunctionValue):
1883         * css/WebKitCSSSVGDocumentValue.h:
1884         (WebCore::toWebKitCSSSVGDocumentValue):
1885         * css/WebKitCSSShaderValue.h:
1886         (WebCore::toWebKitCSSShaderValue):
1887         * css/WebKitCSSTransformValue.h:
1888         (WebCore::toWebKitCSSTransformValue):
1889
1890 2013-09-27  Zalan Bujtas  <zalan@apple.com>
1891
1892         Unexpected word wrapping for wrapped content then raw content.
1893         https://bugs.webkit.org/show_bug.cgi?id=121130
1894
1895         Reviewed by Darin Adler.
1896
1897         When deciding whether a line is considered empty, we need to check if the current
1898         object is fully responsible for the currently uncommitted width. It helps differentiating
1899         <span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
1900         case when we hit the second <span> the line is still considered empty, as opposed to the
1901         second example.
1902         This patch introduces a map to keep track of the uncommitted widths.
1903
1904         Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html
1905
1906         * rendering/LineWidth.cpp:
1907         (WebCore::LineWidth::uncommittedWidthForObject):
1908         (WebCore::LineWidth::addUncommittedWidth):
1909         * rendering/LineWidth.h:
1910         * rendering/RenderBlockLineLayout.cpp:
1911         (WebCore::LineBreaker::nextSegmentBreak):
1912
1913 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
1914
1915         [ATK] Protect entry points in the ATK wrapper against outdated render trees
1916         https://bugs.webkit.org/show_bug.cgi?id=121558
1917
1918         Reviewed by Chris Fleizach.
1919
1920         Make sure that we protect every entry point in the ATK wrapper
1921         against outdated render trees, before using the WebCore's
1922         accessibility API, since that might lead to problems (and crashes)
1923         if the render and accessibility trees are not stable.
1924
1925         Thus, call AccessibilityObject::updateBackingStore() in those
1926         entry points and check whether the ATK wrapper is detached or not
1927         after that, to decide whether to continue or not.
1928
1929         Besides providing a new test to check that it WebKit does not
1930         crash in a given scenario (which actually triggered the
1931         investigation here), solving this situation also fixes other tests
1932         that were previously failing (aria-used-on-image-maps.html) or
1933         that were printing wrong results, not detected until now due to
1934         wrong platform specific expectations (file-upload-button-stringvalue
1935         and deleting-iframe-destroys-axcache).
1936
1937         Test: accessibility/heading-crash-after-hidden.html
1938
1939         * accessibility/atk/WebKitAccessibleUtil.h: Added two new macros
1940         to inject the needed code at the beginning of each entry point to
1941         allow gracefully exit those functions when the render tree is
1942         unstable. Inspired by g_return_if_fail and g_return_val_if_fail, we
1943         called them returnIfWebKitAccessibleIsInvalid and returnValIfWebKitAccessibleIsInvalid.
1944
1945         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1946         (webkitAccessibleHyperlinkActionDoAction): Protect entry point.
1947         (webkitAccessibleHyperlinkActionGetNActions): Ditto.
1948         (webkitAccessibleHyperlinkActionGetDescription): Ditto.
1949         (webkitAccessibleHyperlinkActionGetKeybinding): Ditto.
1950         (webkitAccessibleHyperlinkActionGetName): Ditto.
1951         (webkitAccessibleHyperlinkGetURI): Ditto.
1952         (webkitAccessibleHyperlinkGetObject): Ditto.
1953         (webkitAccessibleHyperlinkGetStartIndex): Ditto.
1954         (webkitAccessibleHyperlinkGetEndIndex): Ditto.
1955         (webkitAccessibleHyperlinkIsValid): Ditto.
1956         (webkitAccessibleHyperlinkGetNAnchors): Ditto.
1957         (webkitAccessibleHyperlinkIsSelectedLink): Ditto.
1958         * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
1959         (webkitAccessibleActionDoAction): Ditto.
1960         (webkitAccessibleActionGetNActions): Ditto.
1961         (webkitAccessibleActionGetDescription): Ditto.
1962         (webkitAccessibleActionGetKeybinding): Ditto.
1963         (webkitAccessibleActionGetName): Ditto.
1964         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1965         (webkitAccessibleComponentRefAccessibleAtPoint): Ditto.
1966         (webkitAccessibleComponentGetExtents): Ditto.
1967         (webkitAccessibleComponentGrabFocus): Ditto.
1968         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
1969         (webkitAccessibleDocumentGetAttributeValue): Ditto.
1970         (webkitAccessibleDocumentGetAttributes): Ditto.
1971         (webkitAccessibleDocumentGetLocale): Ditto.
1972         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
1973         (webkitAccessibleEditableTextSetRunAttributes): Ditto.
1974         (webkitAccessibleEditableTextSetTextContents): Ditto.
1975         (webkitAccessibleEditableTextInsertText): Ditto.
1976         (webkitAccessibleEditableTextCopyText): Ditto.
1977         (webkitAccessibleEditableTextCutText): Ditto.
1978         (webkitAccessibleEditableTextDeleteText): Ditto.
1979         (webkitAccessibleEditableTextPasteText): Ditto.
1980         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
1981         (webkitAccessibleHypertextGetLink): Ditto.
1982         (webkitAccessibleHypertextGetNLinks): Ditto.
1983         (webkitAccessibleHypertextGetLinkIndex): Ditto.
1984         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
1985         (webkitAccessibleImageGetImagePosition): Ditto.
1986         (webkitAccessibleImageGetImageDescription): Ditto.
1987         (webkitAccessibleImageGetImageSize): Ditto.
1988         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1989         (webkitAccessibleSelectionAddSelection): Ditto.
1990         (webkitAccessibleSelectionClearSelection): Ditto.
1991         (webkitAccessibleSelectionRefSelection): Ditto.
1992         (webkitAccessibleSelectionGetSelectionCount): Ditto.
1993         (webkitAccessibleSelectionIsChildSelected): Ditto.
1994         (webkitAccessibleSelectionRemoveSelection): Ditto.
1995         (webkitAccessibleSelectionSelectAllSelection): Ditto.
1996         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1997         (webkitAccessibleTableRefAt): Ditto.
1998         (webkitAccessibleTableGetIndexAt): Ditto.
1999         (webkitAccessibleTableGetColumnAtIndex): Ditto.
2000         (webkitAccessibleTableGetRowAtIndex): Ditto.
2001         (webkitAccessibleTableGetNColumns): Ditto.
2002         (webkitAccessibleTableGetNRows): Ditto.
2003         (webkitAccessibleTableGetColumnExtentAt): Ditto.
2004         (webkitAccessibleTableGetRowExtentAt): Ditto.
2005         (webkitAccessibleTableGetColumnHeader): Ditto.
2006         (webkitAccessibleTableGetRowHeader): Ditto.
2007         (webkitAccessibleTableGetCaption): Ditto.
2008         (webkitAccessibleTableGetColumnDescription): Ditto.
2009         (webkitAccessibleTableGetRowDescription): Ditto.
2010         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2011         (webkitAccessibleTextGetText): Ditto.
2012         (webkitAccessibleTextGetTextAfterOffset): Ditto.
2013         (webkitAccessibleTextGetTextAtOffset): Ditto.
2014         (webkitAccessibleTextGetTextBeforeOffset): Ditto.
2015         (webkitAccessibleTextGetCharacterAtOffset): Ditto.
2016         (webkitAccessibleTextGetCaretOffset): Ditto.
2017         (webkitAccessibleTextGetRunAttributes): Ditto.
2018         (webkitAccessibleTextGetDefaultAttributes): Ditto.
2019         (webkitAccessibleTextGetCharacterExtents): Ditto.
2020         (webkitAccessibleTextGetRangeExtents): Ditto.
2021         (webkitAccessibleTextGetCharacterCount): Ditto.
2022         (webkitAccessibleTextGetOffsetAtPoint): Ditto.
2023         (webkitAccessibleTextGetNSelections): Ditto.
2024         (webkitAccessibleTextGetSelection): Ditto.
2025         (webkitAccessibleTextAddSelection): Ditto.
2026         (webkitAccessibleTextSetSelection): Ditto.
2027         (webkitAccessibleTextRemoveSelection): Ditto.
2028         (webkitAccessibleTextSetCaretOffset): Ditto.
2029         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
2030         (webkitAccessibleValueGetCurrentValue): Ditto.
2031         (webkitAccessibleValueGetMaximumValue): Ditto.
2032         (webkitAccessibleValueGetMinimumValue): Ditto.
2033         (webkitAccessibleValueSetCurrentValue): Ditto.
2034         (webkitAccessibleValueGetMinimumIncrement): Ditto.
2035         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2036         (core): Removed, as it's not actually needed.
2037         (webkitAccessibleGetName):  Protect entry point.
2038         (webkitAccessibleGetDescription): Ditto.
2039         (webkitAccessibleGetParent): Ditto.
2040         (webkitAccessibleGetNChildren): Ditto.
2041         (webkitAccessibleRefChild): Ditto.
2042         (webkitAccessibleGetIndexInParent): Ditto.
2043         (webkitAccessibleGetAttributes): Ditto.
2044         (webkitAccessibleGetRole): Ditto.
2045         (webkitAccessibleRefStateSet): Ditto.
2046         (webkitAccessibleRefRelationSet): Ditto.
2047         (webkitAccessibleGetObjectLocale): Ditto.
2048         (webkitAccessibleDetach): Ditto.
2049         (webkitAccessibleIsDetached): New helper function, to be used from
2050         the newly added macros. We need to check whether the wrapper is
2051         detached and not just the wrapper AccessibilityObject since once
2052         the detachment happens we can't trust anything but the AtkObject
2053         from the wrapper (the AccessibilityObject might be invalid).
2054         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
2055
2056         Assert that the render tree is neither being updated nor in need
2057         of being updated before trying to compute the text under a given
2058         element, since that might lead to crashes due to the constructor
2059         of TextIterator calling updateLayoutIgnorePendingStylesheets().
2060
2061         * accessibility/AccessibilityNodeObject.cpp:
2062         (WebCore::AccessibilityNodeObject::textUnderElement): Assert that
2063         the render tree is neither being updated nor needing updating.
2064
2065 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
2066
2067         [ATK] accessibility/aria-sort.html is failing after r156409
2068         https://bugs.webkit.org/show_bug.cgi?id=121947
2069
2070         Reviewed by Chris Fleizach.
2071
2072         The WAI-ARIA spec says to translate the value as is from the
2073         attribute, so do just that instead of mapping values from the
2074         AccessibilitySortDirection enumeration into strings.
2075         http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
2076
2077         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2078         (webkitAccessibleGetAttributes): Do the right mapping for aria-sort.
2079
2080 2013-09-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2081
2082         Sync toWebKitCSSShaderValue() behavior with other toCSSFooValue()
2083         https://bugs.webkit.org/show_bug.cgi?id=121886
2084
2085         Reviewed by Darin Adler.
2086
2087         toWebKitCSSShaderValue() behavior is different from other to CSSFooValue().
2088         It shouldn't return null. The type checking should be done before doing type cast.
2089
2090         * css/StyleResolver.cpp:
2091         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2092         * css/WebKitCSSShaderValue.h:
2093         (WebCore::toWebKitCSSShaderValue):
2094
2095 2013-09-26  Antti Koivisto  <antti@apple.com>
2096
2097         Move m_style to RenderElement
2098         https://bugs.webkit.org/show_bug.cgi?id=121936
2099
2100         Reviewed by Andreas Kling.
2101
2102         Text renderers always have the same style as their parent. They can get their style via the parent pointer
2103         rather than having a member of their own.
2104         
2105         This shrinks RenderText by a pointer.
2106
2107         * dom/PseudoElement.cpp:
2108         (WebCore::PseudoElement::didRecalcStyle):
2109         
2110             Text renderers have no independent style. No need to set it.
2111
2112         * editing/ApplyBlockElementCommand.cpp:
2113         * rendering/RenderBlock.cpp:
2114         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
2115         
2116             Avoid getting style from text child before it is added to tree.
2117
2118         (WebCore::RenderBlock::updateFirstLetterStyle):
2119         (WebCore::RenderBlock::createFirstLetterRenderer):
2120         * rendering/RenderButton.cpp:
2121         (WebCore::RenderButton::styleDidChange):
2122         (WebCore::RenderButton::setText):
2123         * rendering/RenderCombineText.cpp:
2124         (WebCore::RenderCombineText::styleDidChange):
2125                 
2126             Don't set text style anymore.
2127
2128         * rendering/RenderElement.cpp:
2129         (WebCore::RenderElement::RenderElement):
2130         (WebCore::RenderElement::setStyle):
2131         
2132             Notify child text renderers of style change.
2133
2134         (WebCore::RenderElement::setAnimatableStyle):
2135         (WebCore::RenderElement::setPseudoStyle):
2136         
2137             Push down to RenderElement, remove text branches.
2138
2139         (WebCore::RenderElement::addChild):
2140         
2141             Notify text renderers of style change when added to tree.
2142
2143         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
2144         * rendering/RenderElement.h:
2145         (WebCore::RenderElement::style):
2146         (WebCore::RenderElement::setStyleInternal):
2147         
2148             Move m_style from RenderObject.
2149
2150         (WebCore::RenderObject::style):
2151         
2152             Inline this in RenderElement.h instead of making it virtual.
2153
2154         * rendering/RenderInline.cpp:
2155         (WebCore::updateStyleOfAnonymousBlockContinuations):
2156         (WebCore::RenderInline::styleDidChange):
2157         
2158             Tighten typing to call RenderElement::setStyle.
2159
2160         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2161         
2162             Change assert. This can get legitimately called during layout for the first letter renderers.
2163             This was previously avoided by luck.
2164
2165         * rendering/RenderMenuList.cpp:
2166         (WebCore::RenderMenuList::styleDidChange):
2167         (WebCore::RenderMenuList::setText):
2168         
2169             Don't set text style anymore.
2170
2171         * rendering/RenderObject.cpp:
2172         (WebCore::RenderObject::RenderObject):
2173         (WebCore::RenderObject::containingBlock):
2174         (WebCore::RenderObject::drawLineForBoxSide):
2175         (WebCore::RenderObject::hasEntirelyFixedBackground):
2176         (WebCore::RenderObject::container):
2177         (WebCore::RenderObject::cachedFirstLineStyle):
2178
2179             Switch to style(), avoid unnecessary repetition.
2180             Move code out.
2181
2182         * rendering/RenderObject.h:
2183         
2184             Move functions to RenderElement.
2185
2186         (WebCore::RenderObject::isBeforeContent):
2187         (WebCore::RenderObject::isAfterContent):
2188         
2189             Avoid accessing style for text renderers as these are called before the renderer
2190             is added to tree.
2191
2192         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2193         * rendering/RenderRegion.cpp:
2194         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
2195         (WebCore::RenderRegion::setObjectStyleInRegion):
2196         * rendering/RenderSearchField.cpp:
2197         (WebCore::RenderSearchField::updateCancelButtonVisibility):
2198         * rendering/RenderText.cpp:
2199         * rendering/RenderText.h:
2200         
2201             Remove setStyle.
2202
2203         (WebCore::RenderText::style):
2204         
2205             Get style from parent.
2206
2207         * rendering/mathml/RenderMathMLOperator.cpp:
2208         (WebCore::RenderMathMLOperator::updateFromElement):
2209         (WebCore::RenderMathMLOperator::createGlyph):
2210         * rendering/style/ContentData.cpp:
2211         (WebCore::TextContentData::createRenderer):
2212         (WebCore::CounterContentData::createRenderer):
2213         (WebCore::QuoteContentData::createRenderer):
2214         
2215             Pseudo style for RenderText subclasses comes from parent without any explicit setting.
2216
2217         * style/StyleResolveTree.cpp:
2218         (WebCore::Style::createTextRendererIfNeeded):
2219         (WebCore::Style::resolveLocal):
2220         (WebCore::Style::updateTextStyle):
2221         (WebCore::Style::resolveShadowTree):
2222         (WebCore::Style::resolveTree):
2223         
2224             No need to set or update text renderer style separately.
2225
2226 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2227
2228         [MediaStream] make MediaStream testable
2229         https://bugs.webkit.org/show_bug.cgi?id=121967
2230
2231         Reviewed by Dean Jackson.
2232
2233         No new tests, existing tests updated.
2234
2235         * CMakeLists.txt: Add MockMediaStreamCenter.
2236         * GNUmakefile.list.am: Ditto.
2237
2238         * Modules/mediastream/MediaStreamTrack.idl: Add SkipVTableValidation.
2239         * Modules/mediastream/NavigatorUserMediaError.idl: Add JSGenerateToJSObject.
2240         * WebCore.exp.in: Export MockMediaStreamCenter::registerMockMediaStreamCenter.
2241
2242         * WebCore.xcodeproj/project.pbxproj: Add MockMediaStreamCenter.
2243         * dom/DOMError.h: Make the destructor virtual because it has a derived class.
2244         * dom/DOMError.idl:
2245
2246         * platform/mock/MockMediaStreamCenter.cpp: Added.
2247         * platform/mock/MockMediaStreamCenter.h: Added.
2248
2249         * testing/Internals.cpp: Register the mock stream center.
2250
2251 2013-09-26  Benjamin Poulain  <benjamin@webkit.org>
2252
2253         Move CSS MatchRequest from StyleResolver to a private definition in ElementRuleCollector
2254         https://bugs.webkit.org/show_bug.cgi?id=121986
2255
2256         Reviewed by Andreas Kling.
2257
2258         MatchRequest is an internal type of ElementRuleCollector now, move the definition
2259         to ElementRuleCollector.
2260
2261         * css/DocumentRuleSets.h:
2262         * css/ElementRuleCollector.h:
2263         (WebCore::ElementRuleCollector::MatchRequest::MatchRequest):
2264         * css/StyleResolver.h:
2265
2266 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
2267
2268         [Windows] Unreviewed build fix after r156487.
2269
2270         Add explicit casting needed by MSVC to compile this code. Much
2271         of this could probably be removed when we move to VS2012 or newer.
2272
2273         * bindings/js/JSEventListener.cpp:
2274         (WebCore::JSEventListener::JSEventListener):
2275         * bindings/js/JSEventListener.h:
2276         (WebCore::JSEventListener::jsFunction):
2277         * bridge/jsc/BridgeJSC.cpp:
2278         (JSC::Bindings::Instance::createRuntimeObject):
2279
2280 2013-09-26  Commit Queue  <commit-queue@webkit.org>
2281
2282         Unreviewed, rolling out r156510.
2283         http://trac.webkit.org/changeset/156510
2284         https://bugs.webkit.org/show_bug.cgi?id=121989
2285
2286         Landed in-progress code along with build fix. (Requested by
2287         bfulgham on #webkit).
2288
2289         * bindings/js/JSEventListener.cpp:
2290         (WebCore::JSEventListener::JSEventListener):
2291         * bindings/js/JSEventListener.h:
2292         (WebCore::JSEventListener::jsFunction):
2293         * bridge/jsc/BridgeJSC.cpp:
2294         (JSC::Bindings::Instance::createRuntimeObject):
2295         * platform/graphics/filters/FEGaussianBlur.cpp:
2296         (WebCore::FEGaussianBlur::platformApplyGeneric):
2297         (WebCore::FEGaussianBlur::platformApply):
2298         * platform/graphics/win/DIBPixelData.cpp:
2299         (WebCore::DIBPixelData::writeToFile):
2300         * platform/graphics/win/DIBPixelData.h:
2301
2302 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
2303
2304         [Windows] Unreviewed build fix after r156487.
2305
2306         Add explicit casting needed by MSVC to compile this code. Much
2307         of this could probably be removed when we move to VS2012 or newer.
2308
2309         * bindings/js/JSEventListener.cpp:
2310         (WebCore::JSEventListener::JSEventListener):
2311         * bindings/js/JSEventListener.h:
2312         (WebCore::JSEventListener::jsFunction):
2313         * bridge/jsc/BridgeJSC.cpp:
2314         (JSC::Bindings::Instance::createRuntimeObject):
2315         * platform/graphics/filters/FEGaussianBlur.cpp:
2316         (WebCore::FEGaussianBlur::platformApplyGeneric):
2317         (WebCore::FEGaussianBlur::platformApply):
2318         * platform/graphics/win/DIBPixelData.cpp:
2319         (WebCore::DIBPixelData::DIBPixelData):
2320         (WebCore::DIBPixelData::writeToFile):
2321         * platform/graphics/win/DIBPixelData.h:
2322
2323 2013-09-26  Dean Jackson  <dino@apple.com>
2324
2325         Expose a setting to disable hardware accelerated animations
2326         https://bugs.webkit.org/show_bug.cgi?id=121978
2327         <rdar://problem/15091284>
2328
2329         Reviewed by Eric Carlson.
2330
2331         Expose acceleratedCompositedAnimationsEnabled
2332         to disable CoreAnimation animations.
2333
2334         Test: LayoutTests/animations/transform-non-accelerated.html
2335
2336         * WebCore.exp.in: Export new method.
2337         * page/Settings.in: Add new setting.
2338         * rendering/RenderLayerBacking.cpp:
2339         (WebCore::RenderLayerBacking::startAnimation): Don't go
2340         to GraphicsLayer if the setting is false.
2341
2342 2013-09-26  Julien Brianceau  <jbriance@cisco.com>
2343
2344         [Qt] Fix build after r156487.
2345         https://bugs.webkit.org/show_bug.cgi?id=121984
2346
2347         Reviewed by Anders Carlsson.
2348
2349         * bridge/qt/qt_runtime.cpp:
2350         (JSC::Bindings::QtRuntimeMethod::jsObjectRef):
2351
2352 2013-09-26  Antti Koivisto  <antti@apple.com>
2353
2354         Don't mutate style in RenderCombineText
2355         https://bugs.webkit.org/show_bug.cgi?id=121979
2356
2357         Reviewed by Andreas Kling.
2358
2359         Text renderers should always have the same style as the parent.
2360
2361         * rendering/InlineTextBox.cpp:
2362         (WebCore::fontToUse):
2363         (WebCore::InlineTextBox::localSelectionRect):
2364         (WebCore::InlineTextBox::paint):
2365         (WebCore::InlineTextBox::offsetForPosition):
2366         (WebCore::InlineTextBox::positionForOffset):
2367         
2368             Select the modified font for text-combine.
2369
2370         * rendering/RenderCombineText.cpp:
2371         (WebCore::RenderCombineText::styleDidChange):
2372         (WebCore::RenderCombineText::combineText):
2373         * rendering/RenderCombineText.h:
2374         
2375             Move the text-combine specific font style to a member of its own.
2376
2377 2013-09-26  Anders Carlsson  <andersca@apple.com>
2378
2379         Remove PassWeak.h
2380         https://bugs.webkit.org/show_bug.cgi?id=121971
2381
2382         Reviewed by Geoffrey Garen.
2383
2384         * ForwardingHeaders/heap/PassWeak.h: Removed.
2385
2386 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2387
2388         [MediaStream API] implement VideoStreamTrack and AudioStreamTrack
2389         https://bugs.webkit.org/show_bug.cgi?id=121950
2390
2391         Reviewed by Dean Jackson.
2392
2393         No new tests, blocked by https://bugs.webkit.org/show_bug.cgi?id=121967
2394
2395         * CMakeLists.txt: Add new files.
2396         * DerivedSources.make: Ditto.
2397         * GNUmakefile.list.am: Ditto.
2398
2399         * Modules/mediastream/AudioStreamTrack.cpp: Added.
2400         * Modules/mediastream/AudioStreamTrack.h: Added.
2401         * Modules/mediastream/AudioStreamTrack.idl: Added.
2402
2403         * Modules/mediastream/MediaStream.cpp:
2404         (WebCore::MediaStream::MediaStream): Create an AudioStreamTrack or a VideoStreamTrack.
2405         (WebCore::MediaStream::addRemoteSource): Ditto.
2406
2407         * Modules/mediastream/MediaStreamTrack.cpp:
2408         (WebCore::MediaStreamTrack::create): Removed.
2409         * Modules/mediastream/MediaStreamTrack.h:
2410
2411         * Modules/mediastream/VideoStreamTrack.cpp: Added.
2412         * Modules/mediastream/VideoStreamTrack.h: Added.
2413         * Modules/mediastream/VideoStreamTrack.idl: Added.
2414
2415         * WebCore.xcodeproj/project.pbxproj: Add new files.
2416
2417 2013-09-26  Anders Carlsson  <andersca@apple.com>
2418
2419         Stop using PassWeak
2420         https://bugs.webkit.org/show_bug.cgi?id=121968
2421
2422         Reviewed by Sam Weinig.
2423
2424         Update for JavaScriptCore changes.
2425
2426         * bindings/js/JSDOMBinding.h:
2427         (WebCore::setInlineCachedWrapper):
2428         (WebCore::cacheWrapper):
2429         * bindings/js/JSEventListener.cpp:
2430         (WebCore::JSEventListener::JSEventListener):
2431         * bindings/js/JSEventListener.h:
2432         (WebCore::JSEventListener::setWrapper):
2433         (WebCore::JSEventListener::jsFunction):
2434         * bindings/js/JSMutationCallback.cpp:
2435         (WebCore::JSMutationCallback::JSMutationCallback):
2436         * bindings/js/JSNodeFilterCondition.cpp:
2437         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
2438         * bindings/js/ScriptWrappableInlines.h:
2439         (WebCore::ScriptWrappable::setWrapper):
2440         * bindings/js/WebCoreTypedArrayController.cpp:
2441         * bridge/jsc/BridgeJSC.cpp:
2442         (JSC::Bindings::Instance::createRuntimeObject):
2443         * bridge/runtime_root.cpp:
2444         (JSC::Bindings::RootObject::addRuntimeObject):
2445
2446 2013-09-25  Sam Weinig  <sam@webkit.org>
2447
2448         Pass a JSC::VM& to JS bindings object creation functions, rather than a JSC::ExecState*
2449         https://bugs.webkit.org/show_bug.cgi?id=121934
2450
2451         Reviewed by Geoffrey Garen.
2452
2453         Reduce unnecessary loads by passing the JSC::VM to object creation/access functions
2454         that don't need the ExecState.
2455
2456         * WebCore.exp.in:
2457         * bindings/js/JSDOMBinding.h:
2458         (WebCore::getDOMStructure):
2459         (WebCore::deprecatedGetDOMStructure):
2460         (WebCore::getDOMPrototype):
2461         (WebCore::setInlineCachedWrapper):
2462         (WebCore::createWrapper):
2463         * bindings/js/JSDOMGlobalObject.h:
2464         (WebCore::getDOMConstructor):
2465         * bindings/js/JSDOMWindowCustom.cpp:
2466         (WebCore::JSDOMWindow::image):
2467         * bindings/js/JSDocumentCustom.cpp:
2468         (WebCore::JSDocument::location):
2469         * bindings/js/JSImageConstructor.cpp:
2470         (WebCore::JSImageConstructor::finishCreation):
2471         * bindings/js/JSImageConstructor.h:
2472         (WebCore::JSImageConstructor::create):
2473         * bindings/js/ScriptWrappable.h:
2474         * bindings/js/ScriptWrappableInlines.h:
2475         (WebCore::ScriptWrappable::setWrapper):
2476         * bindings/scripts/CodeGeneratorJS.pm:
2477         (GenerateHeader):
2478         (GenerateImplementation):
2479         (GenerateConstructorDeclaration):
2480         (GenerateConstructorHelperMethods):
2481         * bridge/c/CRuntimeObject.cpp:
2482         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
2483         (JSC::Bindings::CRuntimeObject::finishCreation):
2484         * bridge/c/CRuntimeObject.h:
2485         (JSC::Bindings::CRuntimeObject::create):
2486         * bridge/c/c_instance.cpp:
2487         (JSC::Bindings::CInstance::newRuntimeObject):
2488         * bridge/jsc/BridgeJSC.cpp:
2489         (JSC::Bindings::Instance::newRuntimeObject):
2490         * bridge/objc/ObjCRuntimeObject.h:
2491         (JSC::Bindings::ObjCRuntimeObject::create):
2492         * bridge/objc/ObjCRuntimeObject.mm:
2493         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
2494         (JSC::Bindings::ObjCRuntimeObject::finishCreation):
2495         * bridge/objc/objc_instance.mm:
2496         (ObjcInstance::newRuntimeObject):
2497         * bridge/objc/objc_runtime.h:
2498         (JSC::Bindings::ObjcFallbackObjectImp::createPrototype):
2499         * bridge/runtime_array.h:
2500         (JSC::RuntimeArray::createPrototype):
2501         * bridge/runtime_method.h:
2502         (JSC::RuntimeMethod::createPrototype):
2503         * bridge/runtime_object.cpp:
2504         (JSC::Bindings::RuntimeObject::RuntimeObject):
2505         (JSC::Bindings::RuntimeObject::finishCreation):
2506         * bridge/runtime_object.h:
2507         (JSC::Bindings::RuntimeObject::create):
2508         (JSC::Bindings::RuntimeObject::createPrototype):
2509
2510 2013-09-26  Commit Queue  <commit-queue@webkit.org>
2511
2512         Unreviewed, rolling out r156451.
2513         http://trac.webkit.org/changeset/156451
2514         https://bugs.webkit.org/show_bug.cgi?id=121965
2515
2516         Broke two fast/multicol tests. (Requested by kling on
2517         #webkit).
2518
2519         * rendering/FlowThreadController.cpp:
2520         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
2521         * rendering/RenderElement.cpp:
2522         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
2523         * rendering/RenderFlowThread.cpp:
2524         (WebCore::RenderFlowThread::layout):
2525         (WebCore::RenderFlowThread::regionForCompositedLayer):
2526         (WebCore::RenderFlowThread::updateRegionForRenderLayer):
2527         (WebCore::RenderFlowThread::updateLayerToRegionMappings):
2528         * rendering/RenderFlowThread.h:
2529         * rendering/RenderGeometryMap.cpp:
2530         * rendering/RenderGeometryMap.h:
2531         * rendering/RenderLayer.cpp:
2532         (WebCore::RenderLayer::calculateLayerBounds):
2533         * rendering/RenderLayer.h:
2534         * rendering/RenderLayerBacking.cpp:
2535         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
2536         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2537         * rendering/RenderLayerBacking.h:
2538         * rendering/RenderLayerCompositor.cpp:
2539         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2540         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2541         (WebCore::RenderLayerCompositor::canBeComposited):
2542         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
2543         * rendering/RenderLayerCompositor.h:
2544         * rendering/RenderMultiColumnSet.cpp:
2545         * rendering/RenderMultiColumnSet.h:
2546         * rendering/RenderRegion.cpp:
2547         (WebCore::RenderRegion::setRequiresLayerForCompositing):
2548         * rendering/RenderRegion.h:
2549         * rendering/RenderRegionSet.h:
2550         * rendering/RenderTreeAsText.cpp:
2551         (WebCore::writeLayers):
2552
2553 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2554
2555         [MediaStream] Cleanup platform interface
2556         https://bugs.webkit.org/show_bug.cgi?id=121935
2557
2558         Reviewed by Jer Noble.
2559
2560         No new tests, tests will be updated in the next patch.
2561
2562         * CMakeLists.txt: Remove MediaStreamComponent.cpp.
2563         * GNUmakefile.list.am: Remove MediaStreamComponent.h|cpp and MediaStreamSourcesQueryClient.h. 
2564             Add MediaStreamConstraintsValidationClient.h and MediaStreamCreationClient.h.
2565
2566         * Modules/mediastream/MediaStream.cpp:
2567         (WebCore::processTrack): Duplicate MediaStreamSource when necessary to work around bug 121954.
2568         (WebCore::createFromSourceVectors): MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
2569         (WebCore::MediaStream::MediaStream): *Components -> *Streams.
2570         (WebCore::MediaStream::setEnded): New.
2571         (WebCore::MediaStream::stop):  MediaStreamCenter::instance -> MediaStream::sharedStreamCenter.
2572         (WebCore::MediaStream::addTrack): Append the track parameter rather than duplicating it, as per spec.
2573         (WebCore::MediaStream::removeTrack): *Components -> *Streams.
2574         (WebCore::MediaStream::trackDidEnd): Renamed from trackEnded.
2575         (WebCore::MediaStream::streamDidEnd): Renamed from streamEnded.
2576         (WebCore::MediaStream::addRemoteSource): Renamed from addRemoteTrack. *Components -> *Streams.
2577         (WebCore::MediaStream::removeRemoteSource): Renamed from removeRemoteTrack. *Components -> *Streams.
2578         * Modules/mediastream/MediaStream.h:
2579
2580         * Modules/mediastream/MediaStreamTrack.cpp:
2581         (WebCore::MediaStreamTrack::create): *Component -> *Stream.
2582         (WebCore::MediaStreamTrack::MediaStreamTrack): Don't assume source is valid.
2583         (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
2584         (WebCore::MediaStreamTrack::kind): Ditto. AtomicString -> const AtomicString&.
2585         (WebCore::MediaStreamTrack::setSource): Moved from .h file.
2586         (WebCore::MediaStreamTrack::id): Don't assume source is valid. Create ID when the source doesn't have one.
2587         (WebCore::MediaStreamTrack::label): Don't assume source is valid.
2588         (WebCore::MediaStreamTrack::enabled): 
2589         (WebCore::MediaStreamTrack::setEnabled): *Component -> *Stream. MediaStreamCenter::instance -> MediaStreamCenter::shared.
2590         (WebCore::MediaStreamTrack::readyState): "muted" is not a readyState, but "new" is.
2591         (WebCore::MediaStreamTrack::getSources): MediaStreamCenter::instance -> MediaStreamCenter::shared.
2592         (WebCore::MediaStreamTrack::ended): *Component -> *Stream.
2593         (WebCore::MediaStreamTrack::sourceChangedState): Dispatch "started" and "unmuted" events.
2594         (WebCore::MediaStreamTrack::trackDidEnd): Renamed from didEndTrack. m_component -> m_source.
2595         * Modules/mediastream/MediaStreamTrack.h:
2596
2597         * Modules/mediastream/RTCDTMFSender.cpp:
2598         (WebCore::RTCDTMFSender::create): track->component() -> track->source();
2599
2600         * Modules/mediastream/RTCPeerConnection.cpp:
2601         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Ditto.
2602
2603         * Modules/mediastream/RTCStatsRequestImpl.cpp:
2604         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl): Ditto.
2605         (WebCore::RTCStatsRequestImpl::component): Removed, it was unused.
2606         * Modules/mediastream/RTCStatsRequestImpl.h:
2607
2608         * Modules/mediastream/UserMediaClient.h:
2609         * Modules/mediastream/UserMediaController.h:
2610         (WebCore::UserMediaController::requestPermission): Renamed from requestUserMedia, get rid of source
2611             vector parameters.
2612         (WebCore::UserMediaController::cancelRequest): Renamed from cancelUserMediaRequest.
2613
2614         * Modules/mediastream/UserMediaRequest.cpp:
2615         (WebCore::parseOptions): MediaConstraintsImpl -> MediaConstraints.
2616         (WebCore::UserMediaRequest::create): Ditto.
2617         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
2618         (WebCore::UserMediaRequest::securityOrigin): New.
2619         (WebCore::UserMediaRequest::start): Request constraint validation.
2620         (WebCore::UserMediaRequest::constraintsValidated): New. Callback from media engine when constraints
2621             can be supported.
2622         (WebCore::UserMediaRequest::requestPermission): New. Ask user media client for permission to access media.
2623         (WebCore::UserMediaRequest::userMediaAccessGranted): New. Access has been granted.
2624         (WebCore::UserMediaRequest::createMediaStream): New. Allowed to access media, ask media engine
2625             to create stream sources.
2626         (WebCore::UserMediaRequest::userMediaAccessDenied): New. User media client has denied access request.
2627         (WebCore::UserMediaRequest::constraintsInvalid): New. Media engine can not support constraints.
2628         (WebCore::UserMediaRequest::didCreateStream): New. Media engine has created stream sources.
2629         (WebCore::UserMediaRequest::callSuccessHandler): New. Create stream from sources and call success handler.
2630         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Renamed from constraintFailure.
2631         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Renamed from permissionFailure.
2632         (WebCore::UserMediaRequest::callErrorHandler): 
2633         (WebCore::UserMediaRequest::contextDestroyed): cancelUserMediaRequest -> cancelRequest.
2634         * Modules/mediastream/UserMediaRequest.h:
2635
2636         * Modules/webaudio/AudioContext.cpp:
2637         (WebCore::AudioContext::createMediaStreamSource): localAudio->component()->source() -> localAudio->source().
2638
2639         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2640         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): MediaStreamSource::TypeAudio ->
2641             MediaStreamSource::Audio, MediaStreamSource::ReadyStateLive -> MediaStreamSource::Live.
2642             MediaStreamCenter::instance -> MediaStreamCenter::shared.
2643
2644         * WebCore.exp.in: Export new symbols.
2645
2646         * WebCore.xcodeproj/project.pbxproj: Add new files and remove deleted files.
2647
2648         * dom/EventNames.h: Define "started" event.
2649
2650         * platform/mediastream/MediaStreamCenter.cpp:
2651         (WebCore::mediaStreamCenterOverride): Make it possible to override the shared stream center. Will
2652             be used for testing in a later patch.
2653         (WebCore::MediaStreamCenter::shared): Renamed from instance. Return current stream center.
2654         (WebCore::MediaStreamCenter::setSharedStreamCenter): Override current stream center.
2655         (WebCore::MediaStreamCenter::endLocalMediaStream): Never call the descriptor client, always call
2656             the descriptor and let it deal with the client.
2657         * platform/mediastream/MediaStreamCenter.h:
2658
2659         * platform/mediastream/MediaStreamComponent.cpp: Removed.
2660         * platform/mediastream/MediaStreamComponent.h: Removed.
2661
2662         * platform/mediastream/MediaStreamConstraintsValidationClient.h: Added.
2663         * platform/mediastream/MediaStreamCreationClient.h: Added.
2664
2665         * platform/mediastream/MediaStreamDescriptor.cpp:
2666         (WebCore::MediaStreamDescriptor::addSource): *Component -> *Source.
2667         (WebCore::MediaStreamDescriptor::removeSource): Ditto.
2668         (WebCore::MediaStreamDescriptor::addRemoteSource): Ditto.
2669         (WebCore::MediaStreamDescriptor::removeRemoteSource): Ditto.
2670         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
2671         (WebCore::MediaStreamDescriptor::setEnded): Ditto. Set source readyStates to Ended.
2672         * platform/mediastream/MediaStreamDescriptor.h:
2673
2674         * platform/mediastream/MediaStreamSource.cpp:
2675         (WebCore::MediaStreamSource::MediaStreamSource): Initialize new member variables.
2676         (WebCore::MediaStreamSource::setReadyState): Early return when the state hasn't changed.
2677         (WebCore::MediaStreamSource::setStream): New.
2678         (WebCore::MediaStreamSource::setMuted): New.
2679         * platform/mediastream/MediaStreamSource.h:
2680
2681         * platform/mediastream/MediaStreamSourcesQueryClient.h: Removed.
2682
2683         * platform/mediastream/RTCPeerConnectionHandler.h:
2684         * platform/mediastream/RTCStatsRequest.h:
2685
2686         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Update for new MediaStreamCenter API.
2687         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
2688
2689         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Ditto.
2690         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
2691
2692         * platform/mediastream/mac/MediaStreamCenterMac.cpp: Ditto.
2693         * platform/mediastream/mac/MediaStreamCenterMac.h:
2694
2695 2013-09-26  Gurpreet Kaur  <k.gurpreet@samsung.com>
2696
2697         Inset box-shadows fail to round around corners when border-radius is set in vh/vw units.
2698         https://bugs.webkit.org/show_bug.cgi?id=119187
2699
2700         Reviewed by Darin Adler.
2701
2702         Border-radius properties were not applied incase its values
2703         were given in vh, vw, vmax, vmin units.
2704
2705         Tests: fast/css/border-radius-inset-box-shadow-viewportlength.html
2706                fast/css/border-radius-viewport-height.html
2707                fast/css/border-radius-viewport-vmax.html
2708                fast/css/border-radius-viewport-vmin.html
2709
2710         * css/DeprecatedStyleBuilder.cpp:
2711         (WebCore::ApplyPropertyBorderRadius::applyValue):
2712         (WebCore::ApplyPropertyComputeLength::applyValue):
2713         * css/StyleResolver.h:
2714         Calculating the border-radius values which has been specified
2715         in viewport units.The vh/vw units are calcultated as percent of
2716         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
2717         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
2718
2719 2013-09-26  Seokju Kwon  <seokju@webkit.org>
2720
2721         Fix ordered comparison warnings in BitmapImage::drawPattern
2722         https://bugs.webkit.org/show_bug.cgi?id=121945
2723
2724         Reviewed by Darin Adler.
2725
2726         No new tests, no behavior change.
2727
2728         * platform/graphics/BitmapImage.cpp:
2729         (WebCore::BitmapImage::drawPattern):
2730
2731 2013-09-26  Andreas Kling  <akling@apple.com>
2732
2733         Remove empty JSFooCustom.cpp files.
2734         <https://webkit.org/b/121955>
2735
2736         Reviewed by Anders Carlsson.
2737
2738         There's no sense in slowing down build times with empty files that
2739         still include a bunch of headers.
2740
2741         * bindings/js/JSAudioBufferCustom.cpp: Removed.
2742         * bindings/js/JSCSSFontFaceRuleCustom.cpp: Removed.
2743         * bindings/js/JSCSSImportRuleCustom.cpp: Removed.
2744         * bindings/js/JSCSSMediaRuleCustom.cpp: Removed.
2745         * bindings/js/JSCSSPageRuleCustom.cpp: Removed.
2746         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed.
2747         * bindings/js/JSDOMImplementationCustom.cpp: Removed.
2748         * bindings/js/JSDOMTokenListCustom.cpp: Removed.
2749         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed.
2750         * bindings/js/JSMediaListCustom.cpp: Removed.
2751         * bindings/js/JSProcessingInstructionCustom.cpp: Removed.
2752         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp: Removed.
2753         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp: Removed.
2754         * bindings/js/JSXMLHttpRequestUploadCustom.cpp: Removed.
2755
2756 2013-09-26  Mihai Maerean  <mmaerean@adobe.com>
2757
2758         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
2759         https://bugs.webkit.org/show_bug.cgi?id=120457
2760
2761         Reviewed by David Hyatt.
2762
2763         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
2764
2765         The composited layers inside the named flow threads are collected as part of the regions.
2766         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
2767         that region too (inside RenderFlowThread::updateAllLayerToRegionMappings).
2768
2769         Tests: fast/regions/layers/accelerated-compositing/crash-transform-inside-region.html
2770                fast/regions/layers/accelerated-compositing/floated-region-with-transformed-child.html
2771                fast/regions/layers/accelerated-compositing/move-layer-from-one-region-to-another.html
2772                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding.html
2773                fast/regions/layers/accelerated-compositing/propagate-region-box-shadow-border-padding-for-video.html
2774                fast/regions/layers/accelerated-compositing/region-as-layer-in-another-flowthread.html
2775                fast/regions/layers/accelerated-compositing/transform-transparent-positioned-video-inside-region.html
2776                fast/regions/layers/accelerated-compositing/transformed-layer-inside-transformed-layer.html
2777                fast/regions/layers/accelerated-compositing/z-index.html: Added.
2778                fast/regions/layers/accelerated-compositing/z-index-update.html: Added.
2779
2780         * rendering/FlowThreadController.cpp:
2781         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
2782         * rendering/RenderFlowThread.cpp:
2783         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
2784         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
2785         painted.
2786         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
2787         (WebCore::RenderFlowThread::getLayerListForRegion):
2788         (WebCore::RenderFlowThread::regionForCompositedLayer):
2789         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
2790         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
2791         from a region to another since the last update.
2792         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
2793         * rendering/RenderFlowThread.h:
2794         * rendering/RenderGeometryMap.cpp:
2795         (WebCore::RenderGeometryMap::pushRenderFlowThread):
2796         * rendering/RenderGeometryMap.h:
2797         * rendering/RenderLayer.cpp:
2798         (WebCore::RenderLayer::calculateLayerBounds): The RenderNamedFlowThread is ignored when we calculate the bounds
2799         of the RenderView.
2800         * rendering/RenderLayer.h:
2801         * rendering/RenderLayerBacking.cpp:
2802         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's inside an out of flow Flow Thread.
2803         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
2804         (WebCore::enclosingFlowThreadAncestor):
2805         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
2806         its borders, paddings, outlines or box-shadows to layers inside it.
2807         * rendering/RenderLayerBacking.h:
2808         * rendering/RenderLayerCompositor.cpp:
2809         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
2810         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2811         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly. We
2812         are going to collect composited layers as part of regions.
2813         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
2814         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
2815         use composited RenderRegions to render the background of the RenderFlowThread.
2816         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a region.
2817         * rendering/RenderLayerCompositor.h:
2818         * rendering/RenderMultiColumnSet.cpp:
2819         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
2820         * rendering/RenderMultiColumnSet.h:
2821         * rendering/RenderElement.cpp:
2822         (WebCore::RenderObject::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
2823         through the RenderView::styleDidChange function.
2824         * rendering/RenderRegion.cpp:
2825         (WebCore::RenderRegion::setRequiresLayerForCompositing):
2826         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
2827         * rendering/RenderRegion.h:
2828         (WebCore::toRenderRegion):
2829         * rendering/RenderRegionSet.h:
2830         (WebCore::RenderRegionSet::requiresLayer): Never.
2831         * rendering/RenderTreeAsText.cpp:
2832         (WebCore::writeLayers):
2833
2834 2013-09-26  Mihnea Ovidenie  <mihnea@adobe.com>
2835
2836         [CSSRegions] Unable to collect html element in a named flow
2837         https://bugs.webkit.org/show_bug.cgi?id=121878
2838
2839         Reviewed by Antti Koivisto.
2840
2841         Tests: fast/regions/collect-html-in-named-flow.html
2842                fast/regions/iframe-html-collected.html
2843
2844         It should be possible to collect the html element in a named flow.
2845         However, before we check whether adding a child is not restricted
2846         by its original parent, we have to make sure that the original parent
2847         is an element to safely perform the check.
2848
2849         * rendering/RenderNamedFlowThread.cpp:
2850         (WebCore::RenderNamedFlowThread::isChildAllowed):
2851
2852 2013-09-25  Brady Eidson  <beidson@apple.com>
2853
2854         Unreviewed, blind attempt at a build fix.
2855
2856         * inspector/InspectorIndexedDBAgent.cpp: Don’t include the keyPathFromIDBKeyPath method for
2857           PLATFORM(MAC) as it is unused.
2858
2859 2013-09-25  Brady Eidson  <beidson@apple.com>
2860
2861         Enable the IndexedDB build on Mac, but leave the feature non-functional
2862         https://bugs.webkit.org/show_bug.cgi?id=121918
2863
2864         Reviewed by Alexey Proskuryakov.
2865
2866         * Configurations/FeatureDefines.xcconfig:
2867
2868         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
2869           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
2870
2871         * inspector/InspectorIndexedDBAgent.cpp: Empty out DatabaseLoader::execute on Mac until the inspector
2872           build gurus can figure out a 32bit-vs-64bit issue that there is no obvious solution for.
2873
2874         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
2875           further use for it.
2876
2877 2013-09-25  Ryuan Choi  <ryuan.choi@samsung.com>
2878
2879         Unreviewed build fix for EFL port.
2880
2881         IDBCursorBackendImpl and IDBDatabaseBackendImpl are renamed after r156406.
2882
2883         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
2884         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2885         (WebCore::IDBTransactionBackendLevelDB::create):
2886         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
2887         (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
2888         (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
2889         (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
2890         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2891         (WebCore::IDBTransactionBackendLevelDB::database):
2892
2893 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
2894
2895         Do not reenter Document from its destructor
2896         https://bugs.webkit.org/show_bug.cgi?id=121933
2897
2898         Reviewed by Darin Adler.
2899
2900         Following r156422, there are cases where we would reenter Document
2901         during its destruction.
2902
2903         The flow was the following:
2904         -Document's destructor is executed.
2905         -DocumentStyleSheetCollection being part of Document, its destructor
2906          is executed.
2907         -DocumentStyleSheetCollection's destructor detach the owner node of all
2908          its stylesheets avoid keeping stale references to a dead Document.
2909         -CSSStyleSheet::clearOwnerNode() would fetch the dying document
2910          and invoke Document::styleResolverChanged().
2911         This would not fail because the document is detached and Document::styleResolverChanged()
2912         would fail early. This is complicated and error prone so this patch attempt to clear
2913         the process a bit.
2914
2915         With the patch, Document detach all the stylesheets early in the destruction.
2916         Clearing the stylesheet is also changed to avoid re-entering the document.
2917
2918         * css/CSSStyleSheet.h:
2919         * dom/Document.cpp:
2920         (WebCore::Document::~Document):
2921         * dom/DocumentStyleSheetCollection.cpp:
2922         (WebCore::DocumentStyleSheetCollection::detachFromDocument):
2923         * dom/DocumentStyleSheetCollection.h:
2924
2925 2013-09-25  Santosh Mahto  <santosh.ma@samsung.com>
2926
2927         htmlediting.cpp: unnecessary local variable cleanup
2928         https://bugs.webkit.org/show_bug.cgi?id=121903
2929
2930         Reviewed by Darin Adler.
2931
2932         Code cleanup.
2933
2934         * editing/htmlediting.cpp:
2935         (WebCore::lowestEditableAncestor):
2936
2937 2013-09-25  Commit Queue  <commit-queue@webkit.org>
2938
2939         Unreviewed, rolling out r156432.
2940         http://trac.webkit.org/changeset/156432
2941         https://bugs.webkit.org/show_bug.cgi?id=121932
2942
2943         some integer conversion things that need brady to fix
2944         (Requested by thorton on #webkit).
2945
2946         * Configurations/FeatureDefines.xcconfig:
2947         * Modules/indexeddb/IDBFactory.h:
2948         (WebCore::IDBFactory::create):
2949         * WebCore.xcodeproj/project.pbxproj:
2950
2951 2013-09-25  Alex Christensen  <alex.christensen@flexsim.com>
2952
2953         Win64 compile fix after r155226.
2954         https://bugs.webkit.org/show_bug.cgi?id=120969
2955
2956         Reviewed by Brent Fulgham.
2957
2958         * WebCore.vcxproj/WebCore.vcxproj:
2959         Disable building StructuredExceptionHandlerSuppressor.cpp and makesafeseh.asm on Win64.
2960
2961 2013-09-25  Alexey Proskuryakov  <ap@apple.com>
2962
2963         Flaky Test: platform/mac/fonts/han-disunification.html
2964         https://bugs.webkit.org/show_bug.cgi?id=114207
2965
2966         Reviewed by Anders Carlsson.
2967
2968         This test was affected by preceding tests changing font settings.
2969
2970         Save original font if it's changed, and restore it in Backup::restoreTo().
2971
2972         * WebCore.exp.in:
2973         * testing/InternalSettings.cpp:
2974         (WebCore::InternalSettings::Backup::restoreTo):
2975         (WebCore::InternalSettings::setStandardFontFamily):
2976         (WebCore::InternalSettings::setSerifFontFamily):
2977         (WebCore::InternalSettings::setSansSerifFontFamily):
2978         (WebCore::InternalSettings::setFixedFontFamily):
2979         (WebCore::InternalSettings::setCursiveFontFamily):
2980         (WebCore::InternalSettings::setFantasyFontFamily):
2981         (WebCore::InternalSettings::setPictographFontFamily):
2982         * testing/InternalSettings.h:
2983
2984 2013-09-25  Brady Eidson  <beidson@apple.com>
2985
2986         Enable the IndexedDB build on Mac, but leave the feature non-functional
2987         https://bugs.webkit.org/show_bug.cgi?id=121918
2988
2989         Reviewed by Alexey Proskuryakov.
2990
2991         * Configurations/FeatureDefines.xcconfig: Enable the feature.
2992
2993         * Modules/indexeddb/IDBFactory.h:
2994         (WebCore::IDBFactory::create): If the IDBFactoryBackend is null (which it is for on-levelDB platforms),
2995           don't create an IDBFactory. This hides the feature from javascript even though upport code is in the build.
2996
2997         * WebCore.xcodeproj/project.pbxproj: Remove the Modules/indexedDB/leveldb directory now that Mac has no
2998           further use for it.
2999
3000 2013-09-25  Andreas Kling  <akling@apple.com>
3001
3002         Make EventTarget::hasEventListeners() a const method.
3003
3004         This class needs a lot of love in the const correctness department
3005         but for now let's limit ourselves to fixing the IndexedDB build.
3006
3007         * dom/EventTarget.h:
3008         (WebCore::EventTarget::hasEventListeners):
3009
3010 2013-09-25  Brent Fulgham  <bfulgham@apple.com>
3011
3012         [Windows] Refactor RuntimeEnabledFeatures as a Singleton
3013         https://bugs.webkit.org/show_bug.cgi?id=121883
3014
3015         Windows is experiencing crashes when client programs (such as
3016         DumpRenderTree) attemp to change settings on the RuntimeEnabledFeatures
3017         object. The inlined static accessor methods are not accessing
3018         memory safely (when compiled by Visual Studio) resulting in
3019         crashes.
3020
3021         Reviewed by Jer Noble.
3022
3023         * WebCore.exp.in: Remove static accessors for RuntimeEnabledFeatures.
3024         * bindings/generic/RuntimeEnabledFeatures.cpp: Switch methods to
3025         conform to a singleton pattern.
3026         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
3027         (WebCore::RuntimeEnabledFeatures::sharedRuntimeEnabledFeatures):
3028         (WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
3029         (WebCore::RuntimeEnabledFeatures::javaScriptI18NAPIEnabled):
3030         (WebCore::RuntimeEnabledFeatures::audioEnabled):
3031         (WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
3032         (WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
3033         (WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
3034         (WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled):
3035         (WebCore::RuntimeEnabledFeatures::mediaControllerEnabled):
3036         (WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
3037         (WebCore::RuntimeEnabledFeatures::timeRangesEnabled):
3038         (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
3039         (WebCore::RuntimeEnabledFeatures::webSocketEnabled):
3040         (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
3041         (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
3042         * bindings/generic/RuntimeEnabledFeatures.h: Ditto.
3043         (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
3044         (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
3045         (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
3046         (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
3047         (WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
3048         (WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
3049         (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
3050         (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
3051         (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
3052         (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
3053         (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
3054         (WebCore::RuntimeEnabledFeatures::geolocationEnabled):
3055         (WebCore::RuntimeEnabledFeatures::setWebkitIndexedDBEnabled):
3056         (WebCore::RuntimeEnabledFeatures::webkitIndexedDBEnabled):
3057         (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
3058         (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
3059         (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
3060         (WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
3061         (WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
3062         (WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
3063         (WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
3064         (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
3065         (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
3066         (WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled):
3067         (WebCore::RuntimeEnabledFeatures::cssCompositingEnabled):
3068         (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
3069         (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
3070         (WebCore::RuntimeEnabledFeatures::webkitFullScreenAPIEnabled):
3071         (WebCore::RuntimeEnabledFeatures::setWebkitFullScreenAPIEnabled):
3072         (WebCore::RuntimeEnabledFeatures::webkitRequestFullScreenEnabled):
3073         (WebCore::RuntimeEnabledFeatures::webkitIsFullScreenEnabled):
3074         (WebCore::RuntimeEnabledFeatures::webkitFullScreenKeyboardInputAllowedEnabled):
3075         (WebCore::RuntimeEnabledFeatures::webkitCurrentFullScreenElementEnabled):
3076         (WebCore::RuntimeEnabledFeatures::webkitCancelFullScreenEnabled):
3077         (WebCore::RuntimeEnabledFeatures::webkitFullscreenEnabledEnabled):
3078         (WebCore::RuntimeEnabledFeatures::webkitFullscreenElementEnabled):
3079         (WebCore::RuntimeEnabledFeatures::webkitExitFullscreenEnabled):
3080         (WebCore::RuntimeEnabledFeatures::webkitRequestFullscreenEnabled):
3081         (WebCore::RuntimeEnabledFeatures::touchEnabled):
3082         (WebCore::RuntimeEnabledFeatures::setTouchEnabled):
3083         (WebCore::RuntimeEnabledFeatures::setDeviceMotionEnabled):
3084         (WebCore::RuntimeEnabledFeatures::deviceMotionEnabled):
3085         (WebCore::RuntimeEnabledFeatures::deviceMotionEventEnabled):
3086         (WebCore::RuntimeEnabledFeatures::ondevicemotionEnabled):
3087         (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
3088         (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
3089         (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
3090         (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
3091         (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
3092         (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
3093         (WebCore::RuntimeEnabledFeatures::webkitSpeechEnabled):
3094         (WebCore::RuntimeEnabledFeatures::webkitGrammarEnabled):
3095         (WebCore::RuntimeEnabledFeatures::setScriptedSpeechEnabled):
3096         (WebCore::RuntimeEnabledFeatures::scriptedSpeechEnabled):
3097         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEnabled):
3098         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionErrorEnabled):
3099         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
3100         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarEnabled):
3101         (WebCore::RuntimeEnabledFeatures::webkitSpeechGrammarListEnabled):
3102         (WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
3103         (WebCore::RuntimeEnabledFeatures::setJavaScriptI18NAPIEnabled):
3104         (WebCore::RuntimeEnabledFeatures::mediaStreamEnabled):
3105         (WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
3106         (WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
3107         (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
3108         (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
3109         (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
3110         (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
3111         (WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
3112         (WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
3113         (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
3114         (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
3115         (WebCore::RuntimeEnabledFeatures::quotaEnabled):
3116         (WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
3117         (WebCore::RuntimeEnabledFeatures::mediaSourceEnabled):
3118         (WebCore::RuntimeEnabledFeatures::setMediaSourceEnabled):
3119         (WebCore::RuntimeEnabledFeatures::encryptedMediaEnabled):
3120         (WebCore::RuntimeEnabledFeatures::setEncryptedMediaEnabled):
3121         (WebCore::RuntimeEnabledFeatures::webkitVideoTrackEnabled):
3122         (WebCore::RuntimeEnabledFeatures::setWebkitVideoTrackEnabled):
3123         (WebCore::RuntimeEnabledFeatures::shadowDOMEnabled):
3124         (WebCore::RuntimeEnabledFeatures::setShadowDOMEnabled):
3125         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
3126         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
3127         (WebCore::RuntimeEnabledFeatures::customDOMElementsEnabled):
3128         (WebCore::RuntimeEnabledFeatures::setCustomDOMElements):
3129         (WebCore::RuntimeEnabledFeatures::styleScopedEnabled):
3130         (WebCore::RuntimeEnabledFeatures::setStyleScopedEnabled):
3131         (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled):
3132         (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled):
3133         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled):
3134         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled):
3135         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled):
3136         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled):
3137         (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled):
3138         (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled):
3139         (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled):
3140         (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled):
3141         (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled):
3142         (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled):
3143         (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
3144         (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
3145         (WebCore::RuntimeEnabledFeatures::seamlessIFramesEnabled):
3146         (WebCore::RuntimeEnabledFeatures::setSeamlessIFramesEnabled):
3147         (WebCore::RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled):
3148         (WebCore::RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled):
3149         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3150         (WebCore::getCSSPropertyNamePrefix): Use singleton accessors.
3151         (WebCore::cssPropertyIDForJSCSSPropertyName): Ditto.
3152         * bindings/scripts/CodeGeneratorJS.pm:
3153         (GetRuntimeEnableFunctionName): Generate singleton version of
3154         accessors.
3155         * css/CSSFontFace.cpp:
3156         (WebCore::CSSFontFace::fontLoaded): Use singleton accessors.
3157         (WebCore::CSSFontFace::getFontData): Ditto.
3158         * css/CSSFontSelector.cpp:
3159         (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
3160         * css/CSSParser.cpp:
3161         (WebCore::isSimpleLengthPropertyID): Ditto.
3162         (WebCore::isValidKeywordPropertyAndValue):
3163         (WebCore::CSSParser::parseValue):
3164         (WebCore::CSSParser::rewriteSpecifiers):
3165         * css/CSSSegmentedFontFace.cpp:
3166         (WebCore::CSSSegmentedFontFace::fontLoaded): Ditto.
3167         * css/StyleResolver.h:
3168         (WebCore::StyleResolver::ensureScopeResolver): Ditto.
3169         * dom/Document.cpp:
3170         (WebCore::Document::cssRegionsEnabled): Ditto.
3171         (WebCore::Document::cssCompositingEnabled):
3172         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
3173         (WebCore::Document::getCachedLocale):
3174         * dom/Element.cpp:
3175         (WebCore::Element::createShadowRoot): Ditto.
3176         * dom/Position.cpp:
3177         (WebCore::Position::Position): Ditto.
3178         (WebCore::Position::findParent):
3179         * dom/TreeScope.cpp:
3180         (WebCore::TreeScope::getSelection): Ditto.
3181         * dom/make_names.pl:
3182         (printConstructorInterior): Generate singleton version of accessors.
3183         (printWrapperFunctions): Ditto.
3184         * html/HTMLInputElement.cpp:
3185         (WebCore::HTMLInputElement::isSpeechEnabled): Use singleton accessors.
3186         (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
3187         * html/HTMLMediaElement.cpp:
3188         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
3189         (WebCore::HTMLMediaElement::scheduleDelayedAction):
3190         (WebCore::HTMLMediaElement::loadTimerFired):
3191         (WebCore::HTMLMediaElement::prepareForLoad):
3192         (WebCore::HTMLMediaElement::loadInternal):
3193         (WebCore::HTMLMediaElement::setReadyState):
3194         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
3195         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
3196         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
3197         (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
3198         (WebCore::HTMLMediaElement::addAudioTrack):
3199         (WebCore::HTMLMediaElement::addTextTrack):
3200         (WebCore::HTMLMediaElement::addVideoTrack):
3201         (WebCore::HTMLMediaElement::removeAudioTrack):
3202         (WebCore::HTMLMediaElement::removeTextTrack):
3203         (WebCore::HTMLMediaElement::removeVideoTrack):
3204         (WebCore::HTMLMediaElement::audioTracks):
3205         (WebCore::HTMLMediaElement::textTracks):
3206         (WebCore::HTMLMediaElement::videoTracks):
3207         (WebCore::HTMLMediaElement::didAddTextTrack):
3208         (WebCore::HTMLMediaElement::didRemoveTextTrack):
3209         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
3210         (WebCore::HTMLMediaElement::userCancelledLoad):
3211         (WebCore::HTMLMediaElement::hasClosedCaptions):
3212         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
3213         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
3214         * html/HTMLStyleElement.cpp:
3215         (WebCore::HTMLStyleElement::parseAttribute): Ditto.
3216         (WebCore::HTMLStyleElement::scopedAttributeChanged):
3217         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
3218         (WebCore::HTMLStyleElement::scoped):
3219         * html/HTMLTrackElement.cpp:
3220         (WebCore::HTMLTrackElement::parseAttribute): Ditto.
3221         (WebCore::HTMLTrackElement::scheduleLoad):
3222         (WebCore::HTMLTrackElement::canLoadUrl):
3223         * html/InputType.cpp:
3224         (WebCore::createInputTypeFactoryMap): Ditto.
3225         * page/ContentSecurityPolicy.cpp:
3226         (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled): Ditto.
3227         * page/DOMWindow.cpp:
3228         (WebCore::DOMWindow::addEventListener): Ditto.
3229         * page/FrameView.cpp:
3230         (WebCore::FrameView::performPostLayoutTasks): Ditto.
3231         * testing/InternalSettings.cpp:
3232         (WebCore::InternalSettings::Backup::Backup): Ditto.
3233         (WebCore::InternalSettings::Backup::restoreTo):
3234         (WebCore::InternalSettings::setShadowDOMEnabled):
3235         (WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled):
3236         (WebCore::InternalSettings::setStyleScopedEnabled):
3237         (WebCore::InternalSettings::setCSSExclusionsEnabled):
3238         (WebCore::InternalSettings::setCSSShapesEnabled):
3239         (WebCore::InternalSettings::setLangAttributeAwareFormControlUIEnabled):
3240
3241 2013-09-25  Andreas Kling  <akling@apple.com>
3242
3243         Unreviewed build fix for IDBDatabase.
3244
3245         Turns out there was a much cleaner way to express this.
3246
3247 2013-09-25  Benjamin Poulain  <benjamin@webkit.org>
3248
3249         Tie the life of DocumentStyleSheetCollection and Document together
3250         https://bugs.webkit.org/show_bug.cgi?id=121892
3251
3252         Reviewed by Andreas Kling.
3253
3254         DocumentStyleSheetCollection had an odd destruction pattern for no apparent reason.
3255
3256         The two objects strictly depend on eachother, this patch make that explicit by making
3257         DocumentStyleSheetCollection a plain object in Document's memory space.
3258
3259         * css/CSSStyleSheet.cpp:
3260         (WebCore::CSSStyleSheet::didMutateRules):
3261         * css/DocumentRuleSets.cpp:
3262         (WebCore::DocumentRuleSets::initUserStyle):
3263         * css/DocumentRuleSets.h:
3264         * css/InspectorCSSOMWrappers.cpp:
3265         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection):
3266         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
3267         * css/InspectorCSSOMWrappers.h:
3268         * css/SelectorChecker.cpp:
3269         (WebCore::SelectorChecker::matchRecursively):
3270         (WebCore::SelectorChecker::checkOne):
3271         * css/StyleResolver.cpp:
3272         (WebCore::StyleResolver::StyleResolver):
3273         * css/StyleSheetList.cpp:
3274         (WebCore::StyleSheetList::styleSheets):
3275         (WebCore::StyleSheetList::detachFromDocument):
3276         * dom/Document.cpp:
3277         (WebCore::Document::Document):
3278         (WebCore::Document::~Document):
3279         (WebCore::Document::setCompatibilityMode):
3280         (WebCore::Document::recalcStyle):
3281         (WebCore::Document::createStyleResolver):
3282         (WebCore::Document::processHttpEquiv):
3283         (WebCore::Document::preferredStylesheetSet):
3284         (WebCore::Document::selectedStylesheetSet):
3285         (WebCore::Document::setSelectedStylesheetSet):
3286         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
3287         (WebCore::Document::styleResolverChanged):
3288         (WebCore::Document::haveStylesheetsLoaded):
3289         * dom/Document.h:
3290         (WebCore::Document::styleSheetCollection):
3291         * dom/DocumentStyleSheetCollection.cpp:
3292         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
3293         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
3294         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
3295         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
3296         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
3297         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
3298         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
3299         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
3300         (WebCore::DocumentStyleSheetCollection::addAuthorSheet):
3301         (WebCore::DocumentStyleSheetCollection::addUserSheet):
3302         (WebCore::DocumentStyleSheetCollection::removePendingSheet):
3303         (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
3304         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
3305         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
3306         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
3307         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3308         * dom/DocumentStyleSheetCollection.h:
3309         * dom/Element.cpp:
3310         (WebCore::Element::createPseudoElementIfNeeded):
3311         * dom/InlineStyleSheetOwner.cpp:
3312         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
3313         (WebCore::InlineStyleSheetOwner::removedFromDocument):
3314         (WebCore::InlineStyleSheetOwner::clearDocumentData):
3315         (WebCore::InlineStyleSheetOwner::createSheet):
3316         (WebCore::InlineStyleSheetOwner::sheetLoaded):
3317         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
3318         * dom/ProcessingInstruction.cpp:
3319         (WebCore::ProcessingInstruction::~ProcessingInstruction):
3320         (WebCore::ProcessingInstruction::checkStyleSheet):
3321         (WebCore::ProcessingInstruction::sheetLoaded):
3322         (WebCore::ProcessingInstruction::insertedInto):
3323         (WebCore::ProcessingInstruction::removedFrom):
3324         * html/HTMLLinkElement.cpp:
3325         (WebCore::HTMLLinkElement::~HTMLLinkElement):
3326         (WebCore::HTMLLinkElement::insertedInto):
3327         (WebCore::HTMLLinkElement::removedFrom):
3328         (WebCore::HTMLLinkElement::addPendingSheet):
3329         (WebCore::HTMLLinkElement::removePendingSheet):
3330         * html/HTMLQuoteElement.cpp:
3331         (WebCore::HTMLQuoteElement::insertedInto):
3332         * html/HTMLViewSourceDocument.cpp:
3333         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
3334         * inspector/InspectorCSSAgent.cpp:
3335         (WebCore::InspectorCSSAgent::willMatchRule):
3336         * inspector/InspectorCSSAgent.h:
3337         * inspector/InspectorInstrumentation.cpp:
3338         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3339         * inspector/InspectorInstrumentation.h:
3340         (WebCore::InspectorInstrumentation::willMatchRule):
3341         * mathml/MathMLMathElement.cpp:
3342         (WebCore::MathMLMathElement::insertedInto):
3343         * page/Page.cpp:
3344         (WebCore::Page::userStyleSheetLocationChanged):
3345         * page/PageGroup.cpp:
3346         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
3347         * rendering/RenderBlock.cpp:
3348         (WebCore::RenderBlock::lineHeight):
3349         (WebCore::RenderBlock::updateFirstLetter):
3350         * rendering/RenderInline.cpp:
3351         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
3352         (WebCore::RenderInline::lineHeight):
3353         * rendering/RenderLineBreak.cpp:
3354         (WebCore::RenderLineBreak::lineHeight):
3355         * rendering/RenderObject.cpp:
3356         (WebCore::RenderObject::uncachedFirstLineStyle):
3357         (WebCore::RenderObject::cachedFirstLineStyle):
3358         * rendering/RenderObject.h:
3359         (WebCore::RenderObject::firstLineStyle):
3360         * rendering/RootInlineBox.cpp:
3361         (WebCore::RootInlineBox::verticalPositionForBox):
3362         * style/StyleResolveTree.cpp:
3363         (WebCore::Style::resolveLocal):
3364         * testing/Internals.cpp:
3365         (WebCore::Internals::insertAuthorCSS):
3366         (WebCore::Internals::insertUserCSS):
3367
3368 2013-09-25  Brady Eidson  <beidson@apple.com>
3369
3370         FeatureDefine.xcconfig cleanup (They should all be identical).
3371         https://bugs.webkit.org/show_bug.cgi?id=121921
3372
3373         Reviewed by Mark Rowe.
3374
3375         * Configurations/FeatureDefines.xcconfig:
3376
3377 2013-09-25  Andreas Kling  <akling@apple.com>
3378
3379         JS wrappers should have strongly typed impl() functions.
3380         <https://webkit.org/b/121919>
3381
3382         Reviewed by Geoffrey Garen.
3383
3384         Generate strongly typed JSFoo::impl() functions for all wrappers,
3385         not just those marked with JSGenerateToNativeObject.
3386
3387         Removed 8.8 million static_casts that are no longer needed.
3388
3389 2013-09-24  Roger Fong  <roger_fong@apple.com>
3390
3391         [Windows] Overpanning occurs even when what is being panned isn't the main document.
3392         https://bugs.webkit.org/show_bug.cgi?id=121885.
3393         <rdar://problem/15072332>.
3394
3395         Reviewed by Brent Fulgham.
3396
3397         No new functionality added.
3398
3399         * rendering/RenderLayer.cpp:
3400         (WebCore::RenderLayer::scrollByRecursively):
3401         * rendering/RenderLayer.h:
3402
3403 2013-09-25  Andreas Kling  <akling@apple.com>
3404
3405         Reduce repetitive EventTarget subclassing.
3406         <https://webkit.org/b/121915>
3407
3408         Reviewed by Antti Koivisto.
3409
3410         Add a EventTargetWithInlineData helper class to EventTarget.h.
3411         It's a simple subclass with an EventTargetData member and FINAL
3412         eventTargetData()/ensureEventTargetData() overrides.
3413
3414         Turns out that this fits almost every use case except Node and