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