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