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