Clarify the behavior of composited canvases
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-19  Simon Fraser  <simon.fraser@apple.com>
2
3         Clarify the behavior of composited canvases
4         https://bugs.webkit.org/show_bug.cgi?id=126042
5
6         Reviewed by Tim Horton.
7
8         Different platforms composite 2D and 3D canvases in different ways.
9         
10         "Accelerated 2D" canvases, and WebGL are always set as GraphicsLayer
11         contents.
12         
13         "IOSurface" canvases (Mac and iOS-only) get a compositing layer, but
14         paint into it (because this is fast, and a convenient way to get
15         synchronization).
16         
17         So make these behaviors explicit in RenderLayerBacking and RenderLayerCompositor.
18         No behavior changes on OS X, bug fix on iOS.
19
20         * rendering/RenderLayerBacking.cpp:
21         (WebCore::canvasCompositingStrategy):
22         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
23         (WebCore::RenderLayerBacking::containsPaintedContent):
24         (WebCore::RenderLayerBacking::contentChanged):
25         * rendering/RenderLayerBacking.h:
26         * rendering/RenderLayerCompositor.cpp:
27         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
28
29 2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>
30
31         Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
32         https://bugs.webkit.org/show_bug.cgi?id=126016
33
34         Reviewed by Timothy Hatcher.
35
36         * inspector/InspectorFrontendHost.cpp:
37         (WebCore::InspectorFrontendHost::debuggableType):
38         * inspector/InspectorFrontendHost.h:
39         * inspector/InspectorFrontendHost.idl:
40         Expose the debuggableType to the frontend. In WebCore it is always a "web" type.
41
42 2013-12-19  Benjamin Poulain  <benjamin@webkit.org>
43
44         Add an utility class to simplify generating function calls
45         https://bugs.webkit.org/show_bug.cgi?id=125972
46
47         Reviewed by Geoffrey Garen.
48
49         FunctionCall is a little helper class to make function calls from the JIT
50         in 3 or 4 lines.
51
52         FunctionCall takes a StackAllocator, a RegisterAllocator and a function pointer.
53         When the call is generated, the helper saves the registers as necessary, aligns
54         the stack, does the call, restores the stack, and restore the registers.
55
56         * cssjit/FunctionCall.h: Added.
57         (WebCore::FunctionCall::FunctionCall):
58         (WebCore::FunctionCall::setFunctionAddress):
59         (WebCore::FunctionCall::setFirstArgument):
60         (WebCore::FunctionCall::call):
61
62         (WebCore::FunctionCall::callAndBranchOnCondition): Most test functions used
63         with FunctionCall return a boolean. When the boolean is the sole purpose of the function
64         call, this provides an easy way to branch on the boolean without worrying about registers.
65
66         The return register is tested first, then all the saved registers are restored from the stack
67         (which can include the return register), finally the flags are used for a jump.
68
69         (WebCore::FunctionCall::prepareAndCall):
70         (WebCore::FunctionCall::cleanupPostCall):
71         (WebCore::FunctionCall::saveAllocatedRegisters):
72         (WebCore::FunctionCall::restoreAllocatedRegisters):
73         * WebCore.xcodeproj/project.pbxproj:
74         * cssjit/FunctionCall.h: Added.
75         (WebCore::FunctionCall::FunctionCall):
76         (WebCore::FunctionCall::setFunctionAddress):
77         (WebCore::FunctionCall::setFirstArgument):
78         (WebCore::FunctionCall::call):
79         (WebCore::FunctionCall::callAndBranchOnCondition):
80         (WebCore::FunctionCall::prepareAndCall):
81         (WebCore::FunctionCall::cleanupPostCall):
82         (WebCore::FunctionCall::saveAllocatedRegisters):
83         (WebCore::FunctionCall::restoreAllocatedRegisters):
84
85 2013-12-19  Anders Carlsson  <andersca@apple.com>
86
87         Begin stubbing out the KeyedDecoder class
88         https://bugs.webkit.org/show_bug.cgi?id=126031
89
90         Reviewed by Andreas Kling.
91
92         KeyedDecoder is going to be the new way to decode back forward trees.
93
94         * history/HistoryItem.cpp:
95         (WebCore::HistoryItem::decodeBackForwardTree):
96         * history/HistoryItem.h:
97         * platform/KeyedCoding.h:
98         (WebCore::KeyedDecoder::~KeyedDecoder):
99
100 2013-12-19  Oliver Hunt  <oliver@apple.com>
101
102         DOM bindings should use thisValue for attributes
103         https://bugs.webkit.org/show_bug.cgi?id=126011
104
105         Reviewed by Antti Koivisto.
106
107         Make all standard DOM attributes use the thisValue instead
108         of the slot object.  This requires using a dynamic cast in
109         the attribute getters. Happily for normal uses this a single
110         indirect load and pointer compare, and we were already doing
111         it for many attributes.
112
113         Alas it's too expensive to do this on the window object still
114         due to the proxy indirection that intercepts global variable
115         access.  I'll correct this in a follow on patch (bug 126013).
116
117         A number of custom getters have also been updated to use the
118         thisValue and full type checks.
119
120         This patch still leaves the index and generic named getters
121         on the slot based model as fixing these cases requires more
122         complicated changes.
123
124         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
125         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
126         (WebCore::cssPropertyGetterCallback):
127         * bindings/js/JSPluginElementFunctions.cpp:
128         (WebCore::pluginElementPropertyGetter):
129         * bindings/scripts/CodeGeneratorJS.pm:
130         (GenerateImplementation):
131         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
132         (WebCore::jsTestActiveDOMObjectExcitingAttr):
133         (WebCore::jsTestActiveDOMObjectConstructor):
134         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
135         (WebCore::jsTestCustomNamedGetterConstructor):
136         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
137         (WebCore::jsTestEventConstructorAttr1):
138         (WebCore::jsTestEventConstructorAttr2):
139         (WebCore::jsTestEventConstructorConstructor):
140         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
141         (WebCore::jsTestEventTargetConstructor):
142         * bindings/scripts/test/JS/JSTestException.cpp:
143         (WebCore::jsTestExceptionName):
144         (WebCore::jsTestExceptionConstructor):
145         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
146         (WebCore::jsTestGenerateIsReachableConstructor):
147         * bindings/scripts/test/JS/JSTestInterface.cpp:
148         (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
149         (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
150         (WebCore::jsTestInterfaceImplementsStr1):
151         (WebCore::jsTestInterfaceImplementsStr2):
152         (WebCore::jsTestInterfaceImplementsStr3):
153         (WebCore::jsTestInterfaceImplementsNode):
154         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
155         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
156         (WebCore::jsTestInterfaceSupplementalStr1):
157         (WebCore::jsTestInterfaceSupplementalStr2):
158         (WebCore::jsTestInterfaceSupplementalStr3):
159         (WebCore::jsTestInterfaceSupplementalNode):
160         (WebCore::jsTestInterfaceConstructor):
161         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
162         (WebCore::jsTestMediaQueryListListenerConstructor):
163         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
164         (WebCore::jsTestNamedConstructorConstructor):
165         * bindings/scripts/test/JS/JSTestNode.cpp:
166         (WebCore::jsTestNodeConstructor):
167         * bindings/scripts/test/JS/JSTestObj.cpp:
168         (WebCore::jsTestObjReadOnlyLongAttr):
169         (WebCore::jsTestObjReadOnlyStringAttr):
170         (WebCore::jsTestObjReadOnlyTestObjAttr):
171         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
172         (WebCore::jsTestObjConstructorStaticStringAttr):
173         (WebCore::jsTestObjConstructorTestSubObj):
174         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
175         (WebCore::jsTestObjEnumAttr):
176         (WebCore::jsTestObjByteAttr):
177         (WebCore::jsTestObjOctetAttr):
178         (WebCore::jsTestObjShortAttr):
179         (WebCore::jsTestObjUnsignedShortAttr):
180         (WebCore::jsTestObjLongAttr):
181         (WebCore::jsTestObjLongLongAttr):
182         (WebCore::jsTestObjUnsignedLongLongAttr):
183         (WebCore::jsTestObjStringAttr):
184         (WebCore::jsTestObjTestObjAttr):
185         (WebCore::jsTestObjXMLObjAttr):
186         (WebCore::jsTestObjCreate):
187         (WebCore::jsTestObjReflectedStringAttr):
188         (WebCore::jsTestObjReflectedIntegralAttr):
189         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
190         (WebCore::jsTestObjReflectedBooleanAttr):
191         (WebCore::jsTestObjReflectedURLAttr):
192         (WebCore::jsTestObjReflectedCustomIntegralAttr):
193         (WebCore::jsTestObjReflectedCustomBooleanAttr):
194         (WebCore::jsTestObjReflectedCustomURLAttr):
195         (WebCore::jsTestObjTypedArrayAttr):
196         (WebCore::jsTestObjAttrWithGetterException):
197         (WebCore::jsTestObjAttrWithSetterException):
198         (WebCore::jsTestObjStringAttrWithGetterException):
199         (WebCore::jsTestObjStringAttrWithSetterException):
200         (WebCore::jsTestObjCustomAttr):
201         (WebCore::jsTestObjWithScriptStateAttribute):
202         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
203         (WebCore::jsTestObjWithScriptStateAttributeRaises):
204         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
205         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
206         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
207         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
208         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
209         (WebCore::jsTestObjConditionalAttr1):
210         (WebCore::jsTestObjConditionalAttr2):
211         (WebCore::jsTestObjConditionalAttr3):
212         (WebCore::jsTestObjConditionalAttr4Constructor):
213         (WebCore::jsTestObjConditionalAttr5Constructor):
214         (WebCore::jsTestObjConditionalAttr6Constructor):
215         (WebCore::jsTestObjCachedAttribute1):
216         (WebCore::jsTestObjCachedAttribute2):
217         (WebCore::jsTestObjAnyAttribute):
218         (WebCore::jsTestObjContentDocument):
219         (WebCore::jsTestObjMutablePoint):
220         (WebCore::jsTestObjImmutablePoint):
221         (WebCore::jsTestObjStrawberry):
222         (WebCore::jsTestObjStrictFloat):
223         (WebCore::jsTestObjDescription):
224         (WebCore::jsTestObjId):
225         (WebCore::jsTestObjHash):
226         (WebCore::jsTestObjReplaceableAttribute):
227         (WebCore::jsTestObjNullableDoubleAttribute):
228         (WebCore::jsTestObjNullableLongAttribute):
229         (WebCore::jsTestObjNullableBooleanAttribute):
230         (WebCore::jsTestObjNullableStringAttribute):
231         (WebCore::jsTestObjNullableLongSettableAttribute):
232         (WebCore::jsTestObjNullableStringValue):
233         (WebCore::jsTestObjAttribute):
234         (WebCore::jsTestObjAttributeWithReservedEnumType):
235         (WebCore::jsTestObjConstructor):
236         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
237         (WebCore::jsTestOverloadedConstructorsConstructor):
238         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
239         (WebCore::jsTestSerializedScriptValueInterfaceValue):
240         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
241         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
242         (WebCore::jsTestSerializedScriptValueInterfacePorts):
243         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
244         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
245         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
246         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
247         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
248         (WebCore::jsTestTypedefsConstructorTestSubObj):
249         (WebCore::jsTestTypedefsAttrWithGetterException):
250         (WebCore::jsTestTypedefsAttrWithSetterException):
251         (WebCore::jsTestTypedefsStringAttrWithGetterException):
252         (WebCore::jsTestTypedefsStringAttrWithSetterException):
253         (WebCore::jsTestTypedefsConstructor):
254         * bindings/scripts/test/JS/JSattribute.cpp:
255         (WebCore::jsattributeReadonly):
256         (WebCore::jsattributeConstructor):
257         * bindings/scripts/test/JS/JSreadonly.cpp:
258         (WebCore::jsreadonlyConstructor):
259         * bridge/runtime_array.cpp:
260         (JSC::RuntimeArray::lengthGetter):
261         * bridge/runtime_method.cpp:
262         (JSC::RuntimeMethod::lengthGetter):
263
264 2013-12-19  Andy Estes  <aestes@apple.com>
265
266         Remove WebFilterEvaluator wrappers from WebKitSystemInterface
267         https://bugs.webkit.org/show_bug.cgi?id=126028
268
269         Reviewed by Anders Carlsson.
270
271         It's overkill to pipe access to WebFilterEvaluator through
272         WebKitSystemInterface. Instead, include WebFilterEvaluator.h when it
273         exists and re-declare WebFilterEvaluator when it doesn't.
274         
275         WebKitSystemInterface used to soft-link WebContentAnalysis.framework
276         since OS X 10.7 didn't contain this framework. Since we no longer
277         support 10.7, we can now directly link against the framework.
278
279         * Configurations/WebCore.xcconfig: Add /System/Library/PrivateHeaders
280         to the system framework search path at both compile and link time so
281         that we can find WebContentAnalysis.framework.
282         * WebCore.exp.in: Don't export removed symbols.
283         * WebCore.xcodeproj/project.pbxproj: Added WebContentAnalysis.framework
284         to the 'Link Binary With Libraries' build phase.
285         * platform/mac/ContentFilterMac.mm: Included WebFilterEvaluator.h when
286         it exists and re-declared WebFilterEvaluator when it doesn't.
287         (WebCore::ContentFilter::ContentFilter): Directly called a method on
288         m_platformContentFilter rather than going through WKSI.
289         (WebCore::ContentFilter::isEnabled): Ditto.
290         (WebCore::ContentFilter::addData): Ditto.
291         (WebCore::ContentFilter::finishedAddingData): Ditto.
292         (WebCore::ContentFilter::needsMoreData): Ditto.
293         (WebCore::ContentFilter::didBlockData): Ditto.
294         * platform/mac/WebCoreSystemInterface.h: Removed function pointers for
295         calling into WKSI.
296         * platform/mac/WebCoreSystemInterface.mm: Ditto.
297
298 2013-12-19  Andreas Kling  <akling@apple.com>
299
300         Use CascadedProperties for page and keyframe style resolution as well.
301         <https://webkit.org/b/125997>
302
303         Port StyleResolver's styleForKeyframe() and styleForPage() over to
304         the new property cascading code. Neither of them care about !important
305         or matched properties caches, so the code is very simple.
306
307         Removed the old applyMatchedProperties and applyProperties code with
308         low/high priority passes.
309
310         Reviewed by Antti Koivisto.
311
312 2013-12-19  Eric Carlson  <eric.carlson@apple.com>
313
314         tryAddEventListener uses local PassRefPtr<>
315         https://bugs.webkit.org/show_bug.cgi?id=126001
316
317         Reviewed by Daniel Bates.
318
319         * dom/Node.cpp:
320         (WebCore::tryAddEventListener): Put PassRefPtr<EventListener> parameter into a local RefPtr
321             because it is sometimes used twice.
322
323 2013-12-19  Ryosuke Niwa  <rniwa@webkit.org>
324
325         overflowchanged event could cause a crash
326         https://bugs.webkit.org/show_bug.cgi?id=125978
327
328         Reviewed by Tim Horton.
329
330         Made the event asynchrnous by re-using Document's event queuing ability. Also removed
331         the infrastructure to queue up events in FrameView.
332
333         Test: fast/events/overflowchanged-inside-selection-collapse-crash.html
334
335         * dom/Document.cpp:
336         (WebCore::Document::recalcStyle):
337         (WebCore::Document::enqueueOverflowEvent):
338         * dom/Document.h:
339         * page/FrameView.cpp:
340         (WebCore::FrameView::FrameView):
341         (WebCore::FrameView::~FrameView):
342         (WebCore::FrameView::layout):
343         (WebCore::FrameView::performPostLayoutTasks):
344         (WebCore::FrameView::updateOverflowStatus):
345         * page/FrameView.h:
346         * rendering/RenderBlock.cpp:
347         (WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
348         * rendering/RenderLayer.cpp:
349         (WebCore::RenderLayer::scrollRectToVisible):
350         * rendering/RenderMarquee.cpp:
351         (WebCore::RenderMarquee::start):
352
353 2013-12-19  Daniel Bates  <dabates@apple.com>
354
355         Fix the Windows build after <http://trac.webkit.org/changeset/160841>
356         (https://bugs.webkit.org/show_bug.cgi?id=125879)
357
358         Add ENABLE(CACHE_PARTITIONING)-guard around call to ResourceRequest::setCachePartition()
359         as this function is only compiled when building with cache partitioning enabled.
360
361         * loader/cache/MemoryCache.cpp:
362         (WebCore::MemoryCache::addImageToCache):
363
364 2013-12-19  Daniel Bates  <dabates@apple.com>
365
366         [iOS] Upstream WebCore/accessibility changes
367         https://bugs.webkit.org/show_bug.cgi?id=125925
368
369         Reviewed by Chris Fleizach.
370
371         * accessibility/AccessibilityRenderObject.cpp:
372         (WebCore::AccessibilityRenderObject::visiblePositionForPoint): Opt out of code when building for iOS.
373
374 2013-12-19  Alex Christensen  <achristensen@webkit.org>
375
376         [WinCairo] Compile fix for VS2013 when using ACCELERATED_COMPOSITING.
377         https://bugs.webkit.org/show_bug.cgi?id=124866
378
379         Reviewed by Darin Adler.
380
381         * platform/graphics/TiledBackingStore.cpp:
382         (WebCore::TiledBackingStore::TiledBackingStore):
383         * platform/graphics/TiledBackingStore.h:
384         Added constructor overload to avoid compile errors
385         from using MSVC's make_unique as a default parameter.
386
387 2013-12-19  Daniel Bates  <dabates@apple.com>
388
389         [iOS] Upstream WebCore/loader changes
390         https://bugs.webkit.org/show_bug.cgi?id=125879
391
392         Reviewed by Darin Adler.
393
394         * WebCore.exp.in: Added symbols for MemoryCache::{addImageToCache, removeImageFromCache}().
395         * loader/DocumentLoader.cpp:
396         (WebCore::areAllLoadersPageCacheAcceptable): Added.
397         (WebCore::DocumentLoader::DocumentLoader): Initialize m_subresourceLoadersArePageCacheAcceptable.
398         (WebCore::DocumentLoader::stopLoading): Modified to conditionally call areAllLoadersPageCacheAcceptable().
399         (WebCore::DocumentLoader::handleSubstituteDataLoadSoon): Modified to query FrameLoader::loadsSynchronously()
400         whether to load substitute data immediately or to schedule a load.
401         (WebCore::DocumentLoader::responseReceived): Modified to create a content filer when the response protocol
402         is either HTTP or HTTPS, assuming content filtering is enabled.
403         (WebCore::DocumentLoader::dataReceived): Modified to call DocumentLoader::setContentFilterForBlockedLoad()
404         as appropriate.
405         (WebCore::DocumentLoader::clearMainResourceLoader): Added PLATFORM(IOS)-guarded code. Also added a
406         FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h.
407         (WebCore::DocumentLoader::setResponseMIMEType): Added; guard by PLATFORM(IOS). Also added FIXME comment.
408         (WebCore::DocumentLoader::startLoadingMainResource): Added PLATFORM(IOS)-guarded code. Also added a
409         FIXME comment to remove the PLATFORM(IOS)-guard once we upstream the iOS changes to ResourceRequest.h.
410         I also substituted static NeverDestroyed<> for DEFINE_STATIC_LOCAL.
411         (WebCore::DocumentLoader::setContentFilterForBlockedLoad): Added; guarded by USE(CONTENT_FILTERING).
412         (WebCore::DocumentLoader::handleContentFilterRequest): Added; guarded by USE(CONTENT_FILTERING) and PLATFORM(IOS).
413         Also added a FIXME comment to remove the PLATFORM(IOS) guard inside its function body once we upstream
414         file ContentFilterIOS.mm and implement ContentFilter::requestUnblockAndDispatchIfSuccessful() for Mac.
415         * loader/DocumentLoader.h:
416         (WebCore::DocumentLoader::setResponse): Added; guard by PLATFORM(IOS). Also added a FIXME comment as
417         this method seems to violate the encapsulation of DocumentLoader.
418         (WebCore::DocumentLoader::subresourceLoadersArePageCacheAcceptable): Added.
419         (WebCore::DocumentLoader::documentURL): Added; returns the URL of the document resulting from the DocumentLoader.
420         * loader/DocumentWriter.cpp:
421         (WebCore::DocumentWriter::createDocument): Added iOS-specific code to create a PDF document.
422         * loader/EmptyClients.cpp:
423         (WebCore::EmptyChromeClient::openDateTimeChooser): Opt out of compiling this code for iOS. Also substituted
424         nullptr for 0.
425         * loader/EmptyClients.h:
426         * loader/FrameLoader.cpp:
427         (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
428         (WebCore::FrameLoader::FrameLoader): Initialize m_loadsSynchronously.
429         (WebCore::FrameLoader::initForSynthesizedDocument): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
430         (WebCore::FrameLoader::checkCompleted): Added iOS-specific code with FIXME comment.
431         (WebCore::FrameLoader::willLoadMediaElementURL): Added iOS-specific code.
432         (WebCore::FrameLoader::stopForUserCancel): Added iOS-specific code and FIXME comment.
433         (WebCore::FrameLoader::commitProvisionalLoad): Added iOS-specific code and FIXME comment.
434         (WebCore::FrameLoader::transitionToCommitted): Opt out of ENABLE(TOUCH_EVENTS) logic when building for iOS.
435         (WebCore::FrameLoader::didFirstLayout): Added iOS-specific code.
436         (WebCore::FrameLoader::connectionProperties): Added; guarded by PLATFORM(IOS).
437         (WebCore::createWindow): Added iOS-specific code and FIXME comment.
438         * loader/FrameLoader.h:
439         (WebCore::FrameLoader::setLoadsSynchronously): Added.
440         (WebCore::FrameLoader::loadsSynchronously): Added.
441         * loader/FrameLoaderClient.h:
442         * loader/HistoryController.cpp:
443         (WebCore::HistoryController::restoreScrollPositionAndViewState): Opt out of scroll position logic when building for iOS.
444         (WebCore::HistoryController::replaceCurrentItem): Added.
445         * loader/HistoryController.h:
446         * loader/PlaceholderDocument.h: Changed access control of constructor from private to protected and removed the FINAL
447         keyword from the class so that we can subclass PlaceholderDocument on iOS.
448         * loader/PolicyChecker.cpp:
449         (WebCore::PolicyChecker::checkNavigationPolicy): Added USE(QUICK_LOOK)- and USE(CONTENT_FILTERING)-guarded code.
450         * loader/ResourceBuffer.cpp:
451         (WebCore::ResourceBuffer::shouldUsePurgeableMemory): Added; guarded by PLATFORM(IOS).
452         * loader/ResourceBuffer.h:
453         * loader/ResourceLoadNotifier.cpp:
454         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): Added USE(QUICK_LOOK)-guarded code.
455         * loader/ResourceLoadScheduler.cpp:
456         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Added iOS-specific code.
457         (WebCore::ResourceLoadScheduler::scheduleLoad): Ditto.
458         (WebCore::ResourceLoadScheduler::remove): Added iOS-specific code with FIXME comment.
459         (WebCore::ResourceLoadScheduler::crossOriginRedirectReceived): Added null-check for variable oldHost. Also added
460         iOS-specific code.
461         (WebCore::ResourceLoadScheduler::servePendingRequests): Added iOS-specific code.
462         * loader/ResourceLoader.cpp:
463         (WebCore::ResourceLoader::init): Ditto.
464         (WebCore::ResourceLoader::willSendRequest): Ditto.
465         (WebCore::ResourceLoader::connectionProperties): Added; guarded by PLATFORM(IOS).
466         * loader/ResourceLoader.h:
467         (WebCore::ResourceLoader::startLoading): Added; guarded by PLATFORM(IOS).
468         (WebCore::ResourceLoader::iOSOriginalRequest): Added; iOS-specific.
469         * loader/SubframeLoader.cpp:
470         (WebCore::SubframeLoader::loadPlugin): Added iOS-specific code.
471         * loader/SubresourceLoader.cpp:
472         (WebCore::SubresourceLoader::create): Ditto.
473         (WebCore::SubresourceLoader::startLoading): Added; guarded by PLATFORM(IOS).
474         (WebCore::SubresourceLoader::didFinishLoading): Added iOS-specific code.
475         (WebCore::SubresourceLoader::willCancel): Ditto.
476         (WebCore::SubresourceLoader::notifyDone): Ditto.
477         (WebCore::SubresourceLoader::releaseResources): Ditto.
478         * loader/SubresourceLoader.h:
479         * loader/appcache/ApplicationCacheStorage.cpp:
480         (WebCore::ApplicationCacheStorage::loadCacheGroup): Added iOS-specific code.
481         (WebCore::ApplicationCacheStorage::loadManifestHostHashes): Ditto.
482         (WebCore::ApplicationCacheStorage::cacheGroupForURL): Ditto.
483         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): Ditto.
484         (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin): Ditto.
485         (WebCore::ApplicationCacheStorage::calculateUsageForOrigin): Ditto.
486         (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache): Ditto.
487         (WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): Ditto.
488         (WebCore::ApplicationCacheStorage::executeSQLCommand): Ditto.
489         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Ditto.
490         (WebCore::ApplicationCacheStorage::openDatabase): Ditto.
491         (WebCore::ApplicationCacheStorage::executeStatement): Ditto.
492         (WebCore::ApplicationCacheStorage::store): Ditto.
493         (WebCore::ApplicationCacheStorage::storeUpdatedType): Ditto.
494         (WebCore::ApplicationCacheStorage::ensureOriginRecord): Ditto.
495         (WebCore::ApplicationCacheStorage::loadCache): Ditto.
496         (WebCore::ApplicationCacheStorage::remove): Ditto.
497         (WebCore::ApplicationCacheStorage::empty): Ditto.
498         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
499         (WebCore::ApplicationCacheStorage::manifestURLs): Ditto.
500         (WebCore::ApplicationCacheStorage::cacheGroupSize): Ditto.
501         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto.
502         (WebCore::ApplicationCacheStorage::vacuumDatabaseFile): Ditto.
503         * loader/cache/CachedImage.cpp:
504         (WebCore::CachedImage::CachedImage): Added.
505         (WebCore::CachedImage::imageSizeForRenderer): Added iOS-specific code.
506         (WebCore::CachedImageManual::CachedImageManual): Added; guarded by USE(CF). Also added FIXME comment to incorporate
507         the functionality of this class into CachedImage and to remove the USE(CF)-guard once we make MemoryCache::addImageToCache()
508         platform-independent.
509         (WebCore::CachedImageManual::mustRevalidateDueToCacheHeaders): Added; guarded by USE(CF).
510         * loader/cache/CachedImage.h: Removed FINAL keyword from class so that we can define derived class CachedImageManual.
511         (WebCore::CachedImage::isManual): Added; guarded by USE(CF). Also added FIXME comment.
512         (WebCore::CachedImageManual::addFakeClient): Added; guarded by USE(CF).
513         (WebCore::CachedImageManual::removeFakeClient): Added; guarded by USE(CF).
514         * loader/cache/CachedResource.cpp:
515         (WebCore::CachedResource::load): Added iOS-specific code.
516         * loader/cache/CachedResource.h:
517         * loader/cache/CachedResourceLoader.cpp:
518         (WebCore::CachedResourceLoader::loadDone): Added argument shouldPerformPostLoadActions, defaults to true. Modified
519         to conditionally call performPostLoadActions() with respect to the argument shouldPerformPostLoadActions.
520         (WebCore::CachedResourceLoader::preload): Added iOS-specific code.
521         (WebCore::CachedResourceLoader::checkForPendingPreloads): Ditto.
522         * loader/cache/CachedResourceLoader.h:
523         * loader/cache/MemoryCache.cpp:
524         (WebCore::memoryCache):
525         (WebCore::MemoryCache::add): Added iOS-specific code.
526         (WebCore::MemoryCache::revalidationFailed): Ditto.
527         (WebCore::MemoryCache::resourceForRequest): Ditto.
528         (WebCore::MemoryCache::addImageToCache): Added; guarded by USE(CF). Also added FIXME comment.
529         (WebCore::MemoryCache::removeImageFromCache): Added; guarded by USE(CF). Also added FIXME comment.
530         (WebCore::MemoryCache::pruneLiveResources): Modified to take argument shouldDestroyDecodedDataForAllLiveResources.
531         (WebCore::MemoryCache::pruneLiveResourcesToSize): Modified to take argument shouldDestroyDecodedDataForAllLiveResources,
532         defaults to false. When this argument is true we destroy the decoded data for all live resources from the memory cache.
533         Such functionality is useful when the system is running low on memory.
534         (WebCore::MemoryCache::evict): Added iOS-specific code.
535         * loader/cache/MemoryCache.h:
536         * loader/cf/SubresourceLoaderCF.cpp:
537         (WebCore::SubresourceLoader::didReceiveDataArray): Actually make this code compile. In particular, there is no
538         method called sendDataToResource on SubresourceLoader or in its class hierarchy.
539         * loader/mac/DocumentLoaderMac.cpp:
540         (WebCore::DocumentLoader::schedule): This method has an empty implementation when building for iOS.
541         (WebCore::DocumentLoader::unschedule): Ditto.
542         * platform/graphics/BitmapImage.h: Exposed decodedSize() to access the decoded size of the bitmap image.
543         This functionality is used in MemoryCache::addImageToCache().
544
545 2013-12-19  Jer Noble  <jer.noble@apple.com>
546
547         Build fix for platforms which do not define -[AVSampleBufferAudioRenderer muted].
548         Rubber-stamped by Eric Carlson.
549
550         To work around platforms with broken AVSampleBufferAudioRenderer headers, just
551         declare only those functions we need, and update isAvalable to bail out early if
552         those methods are not present.
553
554         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
555
556 2013-12-16  Darin Adler  <darin@apple.com>
557
558         Improve "bad parent" and "bad child list" assertions in line boxes
559         https://bugs.webkit.org/show_bug.cgi?id=125656
560
561         Reviewed by Sam Weinig.
562
563         * rendering/InlineBox.cpp:
564         (WebCore::InlineBox::root): Use parent() function with assertions rather than
565         using m_parent function, which skips the assertions.
566         * rendering/RenderText.cpp:
567         (WebCore::RenderText::removeAndDestroyTextBoxes): Call invalidateParentChildLists
568         if we are in the optimized document-destruction code path and destroying children
569         without removing them from their parents.
570         * rendering/RenderTextLineBoxes.cpp:
571         (WebCore::RenderTextLineBoxes::invalidateParentChildLists): Added.
572         * rendering/RenderTextLineBoxes.h: Added invalidateParentChildLists.
573
574 2013-12-19  Dan Bernstein  <mitz@apple.com>
575
576         <rdar://problem/15696824> [CFNetwork] Loading stops at server redirects
577         https://bugs.webkit.org/show_bug.cgi?id=125984
578
579         Reviewed by Anders Carlsson.
580
581         * platform/network/cf/ResourceHandleCFNet.cpp:
582         (WebCore::ResourceHandle::willSendRequest): If the client uses async callbacks, call its
583         willSendRequestAsync callback instead if willSendRequest.
584
585 2013-12-19  Andreas Kling  <akling@apple.com>
586
587         CascadedProperties: Deferred properties should have inline capacity.
588         <https://webkit.org/b/125994>
589
590         Give CascadedProperties::m_deferredProperties an inline capacity
591         of 8 to sidestep malloc churn (0.2% of HTML5-8266 profile.)
592
593         Reviewed by Antti Koivisto.
594
595 2013-12-19  Andreas Kling  <akling@apple.com>
596
597         Two small refinements to matched properties cache.
598         <https://webkit.org/b/125992>
599
600         - Avoid computing the matched properties hash if we're banned from
601           using the cache anyway.
602
603         - When adding a new entry to the cache, use move semantics to avoid
604           creating a transient copy of all the data.
605
606         Reviewed by Antti Koivisto.
607
608 2013-12-19  Andreas Kling  <akling@apple.com>
609
610         CascadedProperties should use a bitset to track property presence.
611         <https://webkit.org/b/125991>
612
613         Avoid zeroing out a bunch of memory in the CascadedProperties ctor
614         by using a bitset to track whether each property is present in the
615         cascaded set.
616
617         Reviewed by Antti Koivisto.
618
619 2013-12-19  Seokju Kwon  <seokju@webkit.org>
620
621         Web Inspector: Fix description of parameters in Page.setGeolocationOverride
622         https://bugs.webkit.org/show_bug.cgi?id=125983
623
624         Reviewed by Joseph Pecoraro.
625
626         No new tests, no changes in behavior.
627
628         * inspector/protocol/Page.json:
629
630 2013-12-18  Jer Noble  <jer.noble@apple.com>
631
632         [MSE][Mac] Add AVSampleBufferRendererSynchronizer support.
633         https://bugs.webkit.org/show_bug.cgi?id=125954
634
635         Reviewed by Eric Carlson.
636
637         Instead of slaving all the various renderer's CMTimebases to one master timebase,
638         use AVSampleBufferRenderSynchronizer, which essentially does the same thing.
639
640         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
641         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
642         (WebCore::CMTimebaseEffectiveRateChangedCallback): Added; call effectiveRateChanged().
643         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Set up
644             the synchronizer and all the observers.
645         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Tear down
646             the same.
647         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Require the
648             AVSampleBufferRenderSynchronizer class.
649         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Convert Clock -> Synchronizer.
650         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): Ditto.
651         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused): Ditto.
652         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Ditto.
653         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Ditto.
654         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Ditto.
655         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): Ditto.
656         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer): Ditto.
657         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::effectiveRateChanged): Ditto.
658         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Ditto.
659         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Ditto.
660         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Ditto.
661         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer): Ditto.
662
663         Drive-by fix; audio samples can't be subdivided, and video samples are
664         rarely combined, so remove the call to CMSampleBufferCallForEachSample:
665         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
666         (WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
667
668 2013-12-18  Andreas Kling  <akling@apple.com>
669
670         CSS: Fall back to cache-less cascade when encountering explicitly inherited value.
671         <https://webkit.org/b/125968>
672
673         When encountering an explicitly inherited value for a property that's not
674         "statically inherited", drop out of the matched properties cache path
675         immediately instead of waiting for some coincidence to trigger it later on.
676
677         Fixes 3 asserting table tests:
678
679         - fast/table/border-collapsing/cached-69296.html
680         - tables/mozilla/bugs/bug27038-3.html
681         - tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html
682
683         Reviewed by Antti Koivisto.
684
685 2013-12-18  Ryosuke Niwa  <rniwa@webkit.org>
686
687         Crash in WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches
688         https://bugs.webkit.org/show_bug.cgi?id=125970
689
690         Reviewed by Antti Koivisto.
691
692         The bug was caused by containingBlockForAbsolutePosition returning a non-RenderBlock render object.
693         Fixed the bug by obtaining its containg block.
694
695         Also changed the return type of containingBlockForFixedPosition, containingBlockForAbsolutePosition,
696         containingBlockForObjectInFlow from RenderElement to RenderBlock as all callers of these functions
697         had assumed the return value to be an instance of RenderBlock.
698
699         Test: svg/text/select-text-inside-non-static-position.html
700
701         * rendering/LogicalSelectionOffsetCaches.h:
702         (WebCore::containingBlockForFixedPosition):
703         (WebCore::containingBlockForAbsolutePosition):
704         (WebCore::containingBlockForObjectInFlow):
705         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
706
707 2013-12-18  Andreas Kling  <akling@apple.com>
708
709         Don't waste cycles on zeroing every CascadedProperties::Property.
710         <https://webkit.org/b/125966>
711
712         The CascadedProperties constructor already zeroes out the whole
713         property array. Move the memset() to setDeferred() which is the only
714         other place we create a Property.
715
716         Brought to you by Instruments.app. Profile your code today!
717
718         Reviewed by Antti Koivisto.
719
720 2013-12-18  Hans Muller  <hmuller@adobe.com>
721
722         [CSS Shapes] Simplify the BoxShape implementation
723         https://bugs.webkit.org/show_bug.cgi?id=125548
724
725         Reviewed by Andreas Kling.
726
727         Reduce BoxShape's footprint by about 2/3rds. Instead of caching the
728         FloatRoundedRects which represent a BoxShape's shape-padding and shape-margin
729         boundaries, compute them as needed.
730
731         No new tests, this is just an internal refactoring.
732
733         * rendering/shapes/BoxShape.cpp:
734         (WebCore::BoxShape::shapeMarginLogicalBoundingBox): Now just computes the bounding box rect.
735         (WebCore::BoxShape::shapePaddingLogicalBoundingBox): Ditto.
736         (WebCore::BoxShape::shapeMarginBounds): Removed the caching logic.
737         (WebCore::BoxShape::shapePaddingBounds): Ditto.
738         (WebCore::BoxShape::getExcludedIntervals): Use the computed margin bounds, instead of the cached one.
739         (WebCore::BoxShape::getIncludedIntervals): Ditto (padding bounds).
740         * rendering/shapes/BoxShape.h:
741         (WebCore::BoxShape::BoxShape): Simplified the constructor.
742         * rendering/shapes/Shape.cpp:
743         (WebCore::createBoxShape):
744         (WebCore::Shape::createShape):
745
746 2013-12-17  Jer Noble  <jer.noble@apple.com>
747
748         [MSE][Mac] Add AVSampleBufferAudioRenderer support.
749         https://bugs.webkit.org/show_bug.cgi?id=125905
750
751         Reviewed by Eric Carlson.
752
753         On platforms which support AVSampleBufferAudioRenderer, add support
754         for playback of audio CMSampleBufferRefs generated by AVStreamDataParser.
755
756         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
757         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
758         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable): Require AVSampleBufferAudioRenderer.
759         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume): Pass through to every audio renderer.
760         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted): Ditto.
761         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Slave the renderer's
762             timebase to the master clock.
763         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
764         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
765         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
766         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Drive by fix; initialize
767             m_enabledVideoTrackID.
768         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): Call destroyRenderers().
769         (WebCore::callProcessCodedFrameForEachSample): Drive by fix; convert the bool return to an OSErr.
770         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): Added; flush and destroy the audio
771             renderers.  
772         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Call destroyRenderers().
773         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Enable or disable the audio
774             renderer in response.
775         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Added audio
776             specific version.
777         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
778         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
779         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
780         (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
781
782 2013-12-18  Seokju Kwon  <seokju@webkit.org>
783
784         Web Inspector: Remove leftover code from InspectorController after r108965
785         https://bugs.webkit.org/show_bug.cgi?id=125956
786
787         Reviewed by Joseph Pecoraro.
788
789         No new tests, no changes in behavior.
790
791         * inspector/InspectorController.h: PostWorkerNotificationToFrontendTask was removed in r108965.
792
793 2013-12-18  Andreas Kling  <akling@apple.com>
794
795         CSS: Add a property cascading pass to style application.
796         <https://webkit.org/b/125213>
797
798         Add an intermediate pass to style application where we cascade all
799         style properties to figure out their final values before starting
800         to build RenderStyles.
801
802         This opens up various opportunities for further optimization.
803
804         Reviewed by Antti Koivisto.
805
806         * css/StyleResolver.cpp:
807         (WebCore::StyleResolver::CascadedProperties::Property::Property):
808         (WebCore::StyleResolver::CascadedProperties::CascadedProperties):
809         (WebCore::StyleResolver::CascadedProperties::property):
810         (WebCore::StyleResolver::CascadedProperties::set):
811         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
812         (WebCore::StyleResolver::CascadedProperties::addMatches):
813         (WebCore::StyleResolver::CascadedProperties::Property::apply):
814
815             Added. CascadedProperties is something of a container class
816             that takes CSS property/value/linkMatchType as input and boils
817             them down to the final values that will actually be used.
818
819             Most properties are poked into an unfancy array where latest
820             is greatest (unless !important, of course.) Some properties are
821             queued up to be applied in parse order, more on that below.
822
823         (WebCore::StyleResolver::applyCascadedProperties):
824         (WebCore::StyleResolver::applyMatchedProperties):
825
826             The brains of this patch. applyMatchedProperties() now creates
827             a CascadedProperties and uses it to figure out the final values
828             and uses applyCascadedProperties() to apply them. Deferred
829             properties (parse order) are applied last.
830
831             We may discover during property application that we won't be
832             able to use a matched properties cache item. This happens if
833             the effective zoom or font changes. If that happens, we start
834             the process over, now with the cache disabled. This may need
835             some optimization work.
836
837         (WebCore::extractDirectionAndWritingMode):
838
839             Directional properties ending in e.g -before or -after depend on
840             the direction and writing mode in effect, so we must begin with
841             resolving those properties before doing the full cascade.
842
843             This is done by simply walking the set of matched properties and
844             manually applying '-webkit-writing-mode' and 'direction'.
845
846             If this starts showing up in profiles, we can easily cache some
847             of the information in e.g RuleData to avoid the traversal here.
848
849         (WebCore::elementTypeHasAppearanceFromUAStyle):
850
851             To determine whether a form element is styled beyond the default
852             UA style sheet, StyleResolver caches the border and background
853             values from RenderStyle after applying the UA style sheet.
854
855             Those values are then compared against after all style is applied
856             and if some (platform-dependent) values differ, the element is
857             considered "styled."
858
859             This really only affects elements with -webkit-appearance values
860             in the default UA style sheet, so this function determines if an
861             element should take the goofy slow path for this.
862
863         (WebCore::shouldApplyPropertyInParseOrder):
864         (WebCore::StyleResolver::CascadedProperties::setDeferred):
865         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
866
867             Some CSS properties will write to the same RenderStyle fields when
868             applied, so in order to maintain previous behavior, we must apply
869             them in the order they were parsed.
870
871             We accomplish this by keeping an ordered queue of such properties
872             to apply separately after all the other properties.
873
874         (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
875
876             Helper for poking values into a CascadedProperties::Property.
877
878         * css/StyleResolver.h:
879         (WebCore::StyleResolver::state):
880
881             Expose the StyleResolver::State so CascadedProperties can access it.
882
883 2013-12-16  Martin Robinson  <mrobinson@igalia.com>
884
885         [GTK] [CMake] Add support for building WebKit1
886         https://bugs.webkit.org/show_bug.cgi?id=116377
887
888         Reviewed by Gustavo Noronha Silva.
889
890         * PlatformGTK.cmake: Add a missing source required by WebKit1 to
891         the WebCore build.
892
893 2013-12-18  Hans Muller  <hmuller@adobe.com>
894
895         [CSS Shapes] Simplify RectangleShape implementation
896         https://bugs.webkit.org/show_bug.cgi?id=125536
897
898         Reviewed by Andreas Kling.
899
900         Instead of caching an instance of a private FloatRoundedRect (ish) class for
901         RectangleShape's shape-margin and shape-padding bounds, we just compute
902         the FloatRect and radii as needed. This reduces the classes footprint a little
903         and it simplifies the implementation.
904
905         Removed the private RectangleShape::ShapeBounds class and made its
906         cornerInterceptForWidth() method a static function. Added members for
907         the RectangleShape constructor args, and private getters for their properties.
908
909         There are no new tests because this is just an internal refactoring.
910
911         * rendering/shapes/RectangleShape.cpp:
912         (WebCore::RectangleShape::shapePaddingBounds):
913         (WebCore::RectangleShape::shapeMarginBounds):
914         (WebCore::ellipseXIntercept):
915         (WebCore::ellipseYIntercept):
916         (WebCore::RectangleShape::getExcludedIntervals):
917         (WebCore::RectangleShape::getIncludedIntervals):
918         (WebCore::cornerInterceptForWidth):
919         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
920         (WebCore::RectangleShape::buildPath):
921         * rendering/shapes/RectangleShape.h:
922         (WebCore::RectangleShape::RectangleShape):
923         (WebCore::RectangleShape::rx):
924         (WebCore::RectangleShape::ry):
925         (WebCore::RectangleShape::x):
926         (WebCore::RectangleShape::y):
927         (WebCore::RectangleShape::width):
928         (WebCore::RectangleShape::height):
929         * rendering/shapes/Shape.cpp:
930         (WebCore::createCircleShape): Renamed this internal function (it was createShapeCircle) because it was inconsistent.
931         (WebCore::createEllipseShape): Ditto.
932         (WebCore::Shape::createShape):
933
934 2013-12-18  Benjamin Poulain  <benjamin@webkit.org>
935
936         Add a simple stack abstraction for x86_64
937         https://bugs.webkit.org/show_bug.cgi?id=125908
938
939         Reviewed by Geoffrey Garen.
940
941         StackAllocator provides an abstraction to make it hard to make mistakes and protects from obvious
942         issues at runtime.
943
944         The key roles of StackAllocators are:
945         -Provide the necessary stack alignment for function calls (only x86_64 stack for now).
946         -Provide ways to save registers on the stack, restore or discard them as needed.
947         -Crash at runtime if an operation would obviously cause a stack inconsistency.
948
949         The way simple inconsistencies are detected is through the StackReference object
950         returned whenever something is added on the stack.
951         The object keeps a reference to the offset of what has been pushed. When the StackReference
952         is used to recover the register, if the offset is different, there is a missmatch between
953         push() and pop() after the object was pushed.
954
955         * cssjit/StackAllocator.h: Added.
956         (WebCore::StackAllocator::StackReference::StackReference):
957         (WebCore::StackAllocator::StackReference::operator unsigned):
958         (WebCore::StackAllocator::StackAllocator):
959         (WebCore::StackAllocator::~StackAllocator):
960         (WebCore::StackAllocator::push):
961         (WebCore::StackAllocator::pop):
962
963         (WebCore::StackAllocator::alignStackPreFunctionCall):
964         (WebCore::StackAllocator::unalignStackPostFunctionCall):
965         Those helpers provide a simple way to have a valid stack prior to a function call.
966         Since StackAllocator knows the offset and the platform rules, it can adjust the stack
967         if needed for x86_64.
968
969         (WebCore::StackAllocator::discard): Discard a single register or the full stack.
970
971         (WebCore::StackAllocator::combine): combining stacks is the way to solve branches
972         where the stack is used differently in each case.
973         To do that, the stack is first copied to A and B. Each branch works on its own
974         StackAllocator copy, then the two copies are linked together to the original stack.
975
976         The copies ensure the local consistency in each branch, linking the copies ensure global
977         consistencies and that both branches end in the same stack state.
978
979         (WebCore::StackAllocator::offsetToStackReference): Helper function to access the stack by address
980         through its StackReference.
981
982         (WebCore::StackAllocator::reset):
983
984 2013-12-18  Alex Christensen  <achristensen@webkit.org>
985
986         [WinCairo] Preparation for GStreamer on Windows.
987         https://bugs.webkit.org/show_bug.cgi?id=125946
988
989         Reviewed by Brent Fulgham.
990
991         * WebCore.vcxproj/WebCore.vcxproj:
992         Use new GStreamer property sheets for WinCairo.
993         * WebCore.vcxproj/WebCoreCairo.props:
994         Include GStreamer directory.
995
996 2013-12-18  Oliver Hunt  <oliver@apple.com>
997
998         Refactor CodeGeneratorJS - Move attribute function creation out of getOwnPropertyName guard
999         https://bugs.webkit.org/show_bug.cgi?id=125940
1000
1001         Reviewed by Simon Fraser.
1002
1003         This is just a huge block move of code out from behind the
1004         ImplementationOverridesGetOwnProperty guard.
1005
1006         * bindings/scripts/CodeGeneratorJS.pm:
1007         (GenerateImplementation):
1008
1009 2013-12-18  Tim Horton  <timothy_horton@apple.com>
1010
1011         [iOS] Frequent ASSERT(hasOneRef()) in SharedBuffer::releasePurgeableBuffer
1012         https://bugs.webkit.org/show_bug.cgi?id=125939
1013
1014         Reviewed by Simon Fraser.
1015
1016         r146082 fixed these assertions by not making a purgeable buffer if a SharedBuffer
1017         has multiple refs, but the check was put in ResourceBuffer::createPurgeableBuffer
1018         instead of down in SharedBuffer::createPurgeableBuffer.
1019
1020         This is fine for most WebKit ports, because ResourceBuffer::createPurgeableBuffer
1021         is the only caller of SharedBuffer::createPurgeableBuffer, but causes trouble for
1022         not-quite-yet-upstreamed iOS SharedBuffer code, which adds another caller
1023         of SharedBuffer::createPurgeableBuffer.
1024
1025         Push the early-return down into SharedBuffer::createPurgeableBuffer to ensure
1026         that all callers are protected from creating a purgeable buffer if the SharedBuffer
1027         has previously been vended elsewhere.
1028
1029         No new tests, has no effect on the current Open Source tree.
1030
1031         * loader/ResourceBuffer.cpp:
1032         (WebCore::ResourceBuffer::createPurgeableBuffer):
1033         * platform/SharedBuffer.cpp:
1034         (WebCore::SharedBuffer::createPurgeableBuffer):
1035
1036 2013-12-18  Beth Dakin  <bdakin@apple.com>
1037
1038         Starting a momentum scroll while rubber banding can cause scrolling to jump back 
1039         when the rubberband snaps
1040         https://bugs.webkit.org/show_bug.cgi?id=119507
1041         -and corresponding-
1042         <rdar://problem/14655893>
1043
1044         Reviewed by Simon Fraser.
1045
1046         This line of code was added with the very first implementation of rubber-banding. 
1047         As far as I can tell, it was always a belt-and-suspenders line of code that is a 
1048         no-op in all normal rubber-banding. In this J-shaped scrolling case, this line of 
1049         code is what causes the bug to occur because this line of code assumes that your 
1050         rubber-band is always trying to take you back to the origin. 
1051         * platform/mac/ScrollElasticityController.mm:
1052         (WebCore::ScrollElasticityController::snapRubberBandTimerFired):
1053
1054 2013-12-18  Chris Fleizach  <cfleizach@apple.com>
1055
1056         AX: make aria-hidden=false work with subtrees
1057         https://bugs.webkit.org/show_bug.cgi?id=125592
1058
1059         Reviewed by Mario Sanchez Prada.
1060
1061         When a hidden object uses aria-hidden=false, that needs to apply to
1062         the entire sub-tree (not just the object with aria-hidden on it as it does now).
1063
1064         Enabling this had the side effect of exposing non-rendered text nodes, so there's
1065         some extra checks to ensure we don't include those elements in this cases.
1066
1067         Test: accessibility/aria-hidden-false-works-in-subtrees.html
1068
1069         * accessibility/AXObjectCache.cpp:
1070         (WebCore::isNodeAriaVisible):
1071         * accessibility/AccessibilityNodeObject.cpp:
1072         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
1073
1074 2013-12-18  Oliver Hunt  <oliver@apple.com>
1075
1076         Simplify bindings codegen for adding getOwnPropertySlot overrides
1077         https://bugs.webkit.org/show_bug.cgi?id=125934
1078
1079         Reviewed by Alexey Proskuryakov.
1080
1081         Simple refactoring no change in behavior.
1082
1083         * bindings/scripts/CodeGeneratorJS.pm:
1084         (InstanceOverridesGetOwnPropertySlot):
1085         (PrototypeOverridesGetOwnPropertySlot):
1086         (GenerateHeader):
1087         (GenerateImplementation):
1088
1089 2013-12-18  Conrad Shultz  <conrad_shultz@apple.com>
1090
1091         AudioSessionManagerMac.cpp: kLowPowerVideoBufferSize unused before OS X 10.9
1092         https://bugs.webkit.org/show_bug.cgi?id=125935
1093
1094         Reviewed by Jer Noble.
1095
1096         * platform/audio/mac/AudioSessionManagerMac.cpp:
1097         Add __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 guard.
1098
1099 2013-12-18  Joseph Pecoraro  <pecoraro@apple.com>
1100
1101         Web Inspector: Some basic DebuggerAgent cleanup
1102         https://bugs.webkit.org/show_bug.cgi?id=125901
1103
1104         Reviewed by Timothy Hatcher.
1105
1106         * inspector/InspectorDebuggerAgent.h:
1107         Remove virtual from not really virtual method.
1108
1109         * inspector/InspectorDebuggerAgent.cpp:
1110         (WebCore::InspectorDebuggerAgent::enable):
1111         (WebCore::InspectorDebuggerAgent::disable):
1112         Use member variable instead of private function.
1113
1114         (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
1115         Inline the three lines from the private function.
1116
1117 2013-12-18  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
1118
1119         REGRESSION (r155536): Broken error recovery in @media at-rule
1120         https://bugs.webkit.org/show_bug.cgi?id=125637
1121
1122         Reviewed by Darin Adler.
1123
1124         Error recovery in @media is broken if any of its rules misses the opening '{'.
1125         The problem is that when the parser recognises the mistake it removes only the last
1126         WHITESPACE token instead of the whole selector and tries to recover the selector again.
1127         it swallows everything until it finds the next opening bracket. thats why the '}' brackets
1128         of both subrules and even the @media rule are ignored, and the whole @media will be
1129         considered invalid. By joining the selector and its trailing whitespace the error recovery
1130         ignores the bad selector only and keep the @media rule.
1131
1132         Test: fast/css/media-error-recovery.html
1133
1134         * css/CSSGrammar.y.in:
1135
1136 2013-12-18  Chris Fleizach  <cfleizach@apple.com>
1137
1138         AX: WebKit not sending AXMenuClosed notification
1139         https://bugs.webkit.org/show_bug.cgi?id=125783
1140
1141         Reviewed by Mario Sanchez Prada.
1142
1143         When an object with a role=menu is removed, we need to send out a notification informing that the menu has closed.
1144         This means detecting the right kind of destruction event for an element, because we do not want to 
1145         send this notification when the entire cache is being torn down.
1146
1147         Test: platform/mac/accessibility/aria-menu-closed-notification.html
1148
1149         * accessibility/AXObjectCache.cpp:
1150         (WebCore::AXObjectCache::~AXObjectCache):
1151         (WebCore::AXObjectCache::remove):
1152         * accessibility/AXObjectCache.h:
1153         (WebCore::AXObjectCache::document):
1154         * accessibility/AccessibilityNodeObject.cpp:
1155         (WebCore::AccessibilityNodeObject::detach):
1156         * accessibility/AccessibilityNodeObject.h:
1157         * accessibility/AccessibilityObject.cpp:
1158         (WebCore::AccessibilityObject::detach):
1159         * accessibility/AccessibilityObject.h:
1160         * accessibility/AccessibilityRenderObject.cpp:
1161         (WebCore::AccessibilityRenderObject::detach):
1162         * accessibility/AccessibilityRenderObject.h:
1163         * accessibility/AccessibilityScrollView.cpp:
1164         (WebCore::AccessibilityScrollView::detach):
1165         * accessibility/AccessibilityScrollView.h:
1166         * accessibility/mac/AXObjectCacheMac.mm:
1167         (WebCore::AXObjectCache::postPlatformNotification):
1168
1169 2013-12-18  Eric Carlson  <eric.carlson@apple.com>
1170
1171         Do not create cue subtree just to delete it
1172         https://bugs.webkit.org/show_bug.cgi?id=125904
1173
1174         Reviewed by Jer Noble.
1175
1176         No new tests, covered by existing tests.
1177
1178         * html/track/TextTrackCue.cpp:
1179         (WebCore::TextTrackCue::setIsActive): Return early if display tree is NULL.
1180         (WebCore::TextTrackCue::removeDisplayTree): Ditto.
1181
1182 2013-12-17  Oliver Hunt  <oliver@apple.com>
1183
1184         Remove JSInlineGetOwnPropertySlot attribute as it is no longer necessary
1185         https://bugs.webkit.org/show_bug.cgi?id=125875
1186
1187         Reviewed by Brady Eidson.
1188
1189         Tested this on dromaeo and acid3 (the original reason for this attribute)
1190         and it no longer provided any benefit. This makes it easier to reason about
1191         creation of getOwnPropertySlot during binding generation.
1192
1193         * bindings/scripts/CodeGeneratorJS.pm:
1194         (GenerateHeader):
1195         (GenerateImplementation):
1196         * bindings/scripts/IDLAttributes.txt:
1197         * dom/Document.idl:
1198         * dom/Element.idl:
1199         * dom/Node.idl:
1200
1201 2013-12-18  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
1202
1203         Fix ASSERTION FAILED in WebCore::SVGLengthContext::determineViewport
1204         https://bugs.webkit.org/show_bug.cgi?id=120284
1205
1206         Reviewed by Philip Rogers.
1207
1208         Added handling of root <svg> elements.
1209         Blink merge: https://chromium.googlesource.com/chromium/blink/+/a7dedf81eb7008276bb6854f0e46465e039788f8
1210
1211         SVGLengthContext::determineViewport() currently asserts that we're not
1212         resolving lengths for the topmost element, but there's nothing to
1213         prevent such calls.
1214
1215         The patch updates determineViewport() to handle root elements geracefully
1216         (using their current viewport). It also changes the signature slightly
1217         to operate directly on a FloatSize, reducing some of the boiler-plate
1218         client code.
1219
1220         Tests: svg/custom/svg-length-value-handled.svg
1221                svg/dom/svg-root-lengths.html
1222
1223         * svg/SVGLengthContext.cpp:
1224         (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage):
1225         (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits):
1226         (WebCore::SVGLengthContext::determineViewport):
1227         * svg/SVGLengthContext.h:
1228         * svg/graphics/filters/SVGFEImage.cpp:
1229         (WebCore::FEImage::platformApplySoftware):
1230
1231 2013-12-18  Darin Adler  <darin@apple.com>
1232
1233         Additional refinement in MathMLSelectElement toggle implementation
1234         https://bugs.webkit.org/show_bug.cgi?id=125785
1235
1236         Reviewed by Andreas Kling.
1237
1238         * mathml/MathMLSelectElement.cpp:
1239         (WebCore::MathMLSelectElement::defaultEventHandler): Call setDefaultHandled
1240         so this will be handled by only one element.
1241         (WebCore::MathMLSelectElement::willRespondToMouseClickEvents): Return true
1242         only when action is set to toggle, since other select elements will not
1243         respond to mouse click events.
1244         (WebCore::MathMLSelectElement::toggle): Simplified code a bit and gave
1245         local a clearer variable name.
1246
1247 2013-12-18  Rob Buis  <rob.buis@samsung.com>
1248
1249         [CSS Shapes] Implement interpolation between keywords in basic shapes
1250         https://bugs.webkit.org/show_bug.cgi?id=125108
1251
1252         Reviewed by Simon Fraser.
1253
1254         Allow blending for all center coordinates since top/left and bottom/right default to correct
1255         Length values of 0% and 100%. For mixed keyword and value positions compute the length's used
1256         for blending to percentages. This is possible since we compute the reference box bounds given the
1257         renderer.
1258
1259         * page/animation/CSSPropertyAnimation.cpp:
1260         (WebCore::blendFunc): Pass additional RenderBox parameter.
1261         * rendering/style/BasicShapes.cpp:
1262         (WebCore::BasicShape::canBlend): Don't check circle/ellipse center anymore, but do check that both
1263         shapes use the same reference box.
1264         (WebCore::BasicShape::referenceBoxSize): Compute box dimension depending on reference box.
1265         (WebCore::BasicShapeCenterCoordinate::lengthForBlending): Convert to percentage for Bottom/Right.
1266         (WebCore::BasicShapeRectangle::blend):
1267         (WebCore::DeprecatedBasicShapeCircle::blend):
1268         (WebCore::BasicShapeCircle::blend):
1269         (WebCore::DeprecatedBasicShapeEllipse::blend):
1270         (WebCore::BasicShapeEllipse::blend):
1271         (WebCore::BasicShapePolygon::blend):
1272         (WebCore::BasicShapeInsetRectangle::blend):
1273         (WebCore::BasicShapeInset::blend):
1274         * rendering/style/BasicShapes.h:
1275         (WebCore::BasicShapeCenterCoordinate::blend): Use new lengthForBlending.
1276
1277 2013-12-18  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
1278
1279         CSS: Null-pointer dereference with negative 'orphans' value.
1280         https://bugs.webkit.org/show_bug.cgi?id=125924
1281
1282         Reviewed by Andreas Kling.
1283
1284         orphans and widows should be positive integer.
1285
1286         spec link:
1287         http://www.w3.org/TR/CSS2/page.html#propdef-orphans
1288
1289         Backported from Blink: https://codereview.chromium.org/108663009
1290
1291         Test: fast/css/negative-orphans-crash.html
1292
1293         * css/CSSParser.cpp:
1294         (WebCore::CSSParser::parseValue):
1295
1296 2013-12-18  Andreas Kling  <akling@apple.com>
1297
1298         Make more computed style helpers return values by PassRef.
1299         <https://webkit.org/b/125923>
1300
1301         Tighten yet another handful of CSS computed style helper functions
1302         to return their CSSValues by PassRef where we never return null.
1303
1304         Reviewed by Antti Koivisto.
1305
1306 2013-12-18  Andreas Kling  <akling@apple.com>
1307
1308         Use range for syntax in Frame and FrameView.
1309         <https://webkit.org/b/125922>
1310
1311         Convert code in Frame and FrameView to use C++11's range for syntax.
1312
1313         Reviewed by Antti Koivisto.
1314
1315 2013-12-18  Andreas Kling  <akling@apple.com>
1316
1317         RenderElement-ize adjustForAbsoluteZoom() and friends.
1318         <https://webkit.org/b/125921>
1319
1320         Make adjustForAbsoluteZoom() take a const RenderElement& instead
1321         of a RenderObject* so we can avoid the extra branch in style().
1322         All call sites already had RenderElements.
1323
1324         Reviewed by Antti Koivisto.
1325
1326 2013-12-18  Chris Fleizach  <cfleizach@apple.com>
1327
1328         AX: HTML spec change indicates @aria-required should trump @required on any element
1329         https://bugs.webkit.org/show_bug.cgi?id=122145
1330
1331         Reviewed by Mario Sanchez Prada.
1332
1333         aria-required should win over the native "required" attribute.
1334
1335         Updated tests: accessibility/aria-required.html
1336
1337         * accessibility/AccessibilityNodeObject.cpp:
1338         (WebCore::AccessibilityNodeObject::isRequired):
1339
1340 2013-12-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1341
1342         Unreviewed. Fix make distcheck.
1343
1344         * GNUmakefile.am:
1345         * GNUmakefile.list.am:
1346
1347 2013-12-18  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
1348
1349         [soup] Fix unused parameter warnings in ResourceHandleSoup.
1350         https://bugs.webkit.org/show_bug.cgi?id=125918
1351
1352         Reviewed by Martin Robinson.
1353
1354         Comment out the method parameters to avoid the warnings.
1355
1356         No tests required.
1357
1358         * platform/network/soup/ResourceHandleSoup.cpp:
1359         (WebCore::WebCoreSynchronousLoader::didReceiveData):
1360
1361 2013-12-17  Jer Noble  <jer.noble@apple.com>
1362
1363         [MSE] Periodically monitor source buffers.
1364         https://bugs.webkit.org/show_bug.cgi?id=125898
1365
1366         Reviewed by Eric Carlson.
1367
1368         Test: media/media-source/media-source-monitor-source-buffers.html
1369
1370         The MSE spec requires that the SourceBuffer Monitoring step is run
1371         periodically during playback. No specific update interval is specified
1372         so we will re-use the existing HTMLMediaElement playback progress
1373         timer to signal the media source monitoring.
1374
1375         * html/HTMLMediaElement.cpp:
1376         (HTMLMediaElement::playbackProgressTimerFired):
1377
1378 2013-12-17  Jer Noble  <jer.noble@apple.com>
1379
1380         [MSE] Add per-track signalling between SourceBuffer and SourceBufferPrivate.
1381         https://bugs.webkit.org/show_bug.cgi?id=125899
1382
1383         Reviewed by Eric Carlson.
1384
1385         To accommodate the future addition of audio support to MSE in the Mac
1386         port, add the concept of trackIDs to the communication between
1387         SourceBuffer and SourceBufferPrivate.
1388
1389         The following virtual methods  now take a trackID parameter:
1390         * platform/graphics/SourceBufferPrivate.h:
1391         (WebCore::SourceBufferPrivate::isReadyForMoreSamples):
1392         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples):
1393         (WebCore::SourceBufferPrivate::notifyClientWhenReadyForMoreSamples):
1394         * platform/graphics/SourceBufferPrivateClient.h:
1395         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateDidBecomeReadyForMoreSamples):
1396
1397         Update overridden methods in subclasses:
1398         * Modules/mediasource/SourceBuffer.cpp:
1399         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
1400         * Modules/mediasource/SourceBuffer.h:
1401         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1402         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1403         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1404         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
1405         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1406
1407         Change the logic in provideMediaData to update a single TrackBuffer
1408         rather than iterating over all of them:
1409         * Modules/mediasource/SourceBuffer.cpp:
1410         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
1411         (WebCore::SourceBuffer::appendBufferTimerFired):
1412         (WebCore::SourceBuffer::provideMediaData):
1413
1414 2013-12-17  Joseph Pecoraro  <pecoraro@apple.com>
1415
1416         Web Inspector: Remove InspectorAgent::hasFrontend
1417         https://bugs.webkit.org/show_bug.cgi?id=125907
1418
1419         Reviewed by Timothy Hatcher.
1420
1421         Remove InspectorAgent::hasFrontend only used by
1422         InspectorInstrumentation::collectingHTMLParseErrors. However,
1423         following the single callers of that, the result is unused
1424         in the HTMLDocumentParser and HTMLTreeBuilder. So remove
1425         more stale / unused code.
1426
1427         * html/FTPDirectoryDocument.cpp:
1428         (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
1429         * html/HTMLDocument.cpp:
1430         (WebCore::HTMLDocument::createParser):
1431         * html/parser/HTMLDocumentParser.cpp:
1432         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
1433         * html/parser/HTMLDocumentParser.h:
1434         (WebCore::HTMLDocumentParser::create):
1435         * html/parser/HTMLTreeBuilder.cpp:
1436         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1437         * html/parser/HTMLTreeBuilder.h:
1438         (WebCore::HTMLTreeBuilder::create):
1439         * html/parser/TextDocumentParser.cpp:
1440         (WebCore::TextDocumentParser::TextDocumentParser):
1441         * inspector/DOMPatchSupport.cpp:
1442         (WebCore::DOMPatchSupport::patchDocument):
1443         * inspector/InspectorAgent.h:
1444         * inspector/InspectorInstrumentation.cpp:
1445         * inspector/InspectorInstrumentation.h:
1446
1447 2013-12-17  Joseph Pecoraro  <pecoraro@apple.com>
1448
1449         Web Inspector: Some basic InjectedScriptHost cleanup
1450         https://bugs.webkit.org/show_bug.cgi?id=125902
1451
1452         Reviewed by Timothy Hatcher.
1453
1454         Remove InjectedScriptHost::scriptDebugServer. Nobody accesses
1455         the ScriptDebugServer through the injected script host. This
1456         also lets us remove the reference to the DebuggerAgent.
1457
1458         * inspector/InjectedScriptHost.cpp:
1459         * inspector/InjectedScriptHost.h:
1460         (WebCore::InjectedScriptHost::init):
1461         * inspector/InspectorController.cpp:
1462         (WebCore::InspectorController::InspectorController):
1463         * inspector/WorkerInspectorController.cpp:
1464         (WebCore::WorkerInspectorController::WorkerInspectorController):
1465
1466 2013-12-17  Joseph Pecoraro  <pecoraro@apple.com>
1467
1468         Web Inspector: Remove InspectorFrontendHost.setInjectedScriptForOrigin
1469         https://bugs.webkit.org/show_bug.cgi?id=125906
1470
1471         Reviewed by Timothy Hatcher.
1472
1473         Remove stale code related to a since removed feature,
1474         Inspector extensions. This allows us to remove a number
1475         of entry points into InspectorAgent.
1476
1477         * inspector/InspectorAgent.cpp:
1478         (WebCore::InspectorAgent::InspectorAgent):
1479         (WebCore::InspectorAgent::willDestroyFrontendAndBackend):
1480         * inspector/InspectorAgent.h:
1481         (WebCore::InspectorAgent::create):
1482         Remove setInjectedScriptForOrigin and InjectedScript management.
1483
1484         * inspector/InspectorController.cpp:
1485         (WebCore::InspectorController::InspectorController):
1486         * inspector/InspectorController.h:
1487         * inspector/InspectorFrontendHost.cpp:
1488         * inspector/InspectorFrontendHost.h:
1489         * inspector/InspectorFrontendHost.idl:
1490         Remove the API and calling through InspectorController.
1491
1492         * inspector/InspectorInstrumentation.cpp:
1493         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1494         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
1495         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1496         Remove now unnecessary calls into InspectorAgent.
1497
1498 2013-12-17  Jer Noble  <jer.noble@apple.com>
1499
1500         Fix TimeRanges::intersectWith
1501         https://bugs.webkit.org/show_bug.cgi?id=118802
1502
1503         Test: TestWebKitAPI/Tests/WebCore/TimeRanges.cpp.
1504
1505         Reviewed by Eric Carlson.
1506
1507         * WebCore.exp.in:
1508         * WebCore.xcodeproj/project.pbxproj:
1509         * html/TimeRanges.cpp:
1510         (TimeRanges::invert):
1511         (TimeRanges::intersectWith):
1512
1513         Merge
1514         https://chromium.googlesource.com/chromium/blink/+/f557582b6c6283a8b165514f52d01cfd98130e85        
1515
1516 2013-12-17  Eric Carlson  <eric.carlson@apple.com>
1517
1518         ASSERT setting pseudoID with registered DOMSubtreeModified listener
1519         https://bugs.webkit.org/show_bug.cgi?id=125900
1520
1521         Reviewed by Ryosuke Niwa.
1522
1523         Test: fast/dom/attribute-set-before-element-in-tree.html
1524
1525         * dom/Node.cpp:
1526         (WebCore::Node::dispatchSubtreeModifiedEvent): Return early if the node does not have a
1527             parent and does not have a DOMSubtreeModified listener.
1528
1529 2013-12-17  Ryosuke Niwa  <rniwa@webkit.org>
1530
1531         Remove dead code for reflected attributes from audio, video, and track elements
1532         https://bugs.webkit.org/show_bug.cgi?id=125838
1533
1534         Reviewed by Eric Carlson.
1535
1536         Merge https://chromium.googlesource.com/chromium/blink/+/310514e2f0fd934975b841d463bad0cd62e6fd64
1537
1538         Where [Reflect] is used in the IDL, the getters and setters in C++ are
1539         only for internal convenience, and these were unused.
1540
1541         * html/HTMLMediaElement.cpp:
1542         * html/HTMLMediaElement.h:
1543         * html/HTMLTrackElement.cpp:
1544         * html/HTMLTrackElement.h:
1545         * html/HTMLVideoElement.cpp:
1546         * html/HTMLVideoElement.h:
1547
1548 2013-12-17  Simon Fraser  <simon.fraser@apple.com>
1549
1550         Rename "canRubberBands" to "canRubberBand"
1551         https://bugs.webkit.org/show_bug.cgi?id=125897
1552
1553         Reviewed by Anders Carlsson.
1554
1555         Rename "canRubberBands" to "canRubberBand" in various places.
1556
1557         * page/scrolling/ScrollingTree.cpp:
1558         (WebCore::ScrollingTree::setCanRubberBandState):
1559         * page/scrolling/ScrollingTree.h:
1560
1561 2013-12-17  Jer Noble  <jer.noble@apple.com>
1562
1563         [MSE] Update duration after appending samples, per spec.
1564         https://bugs.webkit.org/show_bug.cgi?id=125703
1565
1566         Reviewed by Eric Carlson.
1567
1568         Test: media/media-source/media-source-duration-after-append.html
1569
1570         After appending a sample, update the MediaSource duration if the sample's
1571         presentation end time is greater than the existing duration.
1572
1573         * Modules/mediasource/SourceBuffer.cpp:
1574         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1575         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1576         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1577         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Notify the MediaPlayer.
1578
1579 2013-12-17  Jer Noble  <jer.noble@apple.com>
1580
1581         [MSE][Mac] Null-deref in CMSampleBufferIsRandomAccess().
1582         https://bugs.webkit.org/show_bug.cgi?id=125698
1583
1584         Reviewed by Sam Weinig.
1585
1586         If a given CMSampleBufferRef does not have a sample attachments array (which is unlikely, but
1587         possible), CMSampleBufferGetAttachmentsArray() will return a null value.
1588
1589         Additionally, the CMSampleBuffer documentation states that "samples are assumed to be sync
1590         samples by default", so the absence of an attachment array (or the absense of a
1591         kCMSampleAttachmentKey_NotSync entry in any of the attachment dictionaries) indicates the
1592         sample is sync.
1593
1594         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1595         (WebCore::CMSampleBufferIsRandomAccess):
1596
1597 2013-12-17  Ryosuke Niwa  <rniwa@webkit.org>
1598
1599         Video element's width and height content attributes should not influence intrinsic width and height
1600         https://bugs.webkit.org/show_bug.cgi?id=125822
1601
1602         Reviewed by Darin Adler.
1603
1604         Merge https://chromium.googlesource.com/chromium/blink/+/022ce34efb5b70cb964c3ca29f23c8980ffaef05
1605
1606         The width/height content attributes already influence specified style via
1607         HTMLVideoElement::collectStyleForPresentationAttribute, to also influence the intrinsic size has never
1608         been part of the spec: http://www.w3.org/TR/2013/WD-html51-20130528/embedded-content-0.html#dom-dim-width
1609
1610         The test case passes in Firefox Nightly and IE11 Release Preview, but fails in Opera Presto, which has
1611         no default intrinsic size.
1612
1613         Test: media/video-intrinsic-width-height.html
1614
1615         * rendering/RenderVideo.cpp:
1616         (WebCore::RenderVideo::calculateIntrinsicSize):
1617
1618 2013-12-16  Daniel Bates  <dabates@apple.com>
1619
1620         [iOS] Upstream WebCore/html changes
1621         https://bugs.webkit.org/show_bug.cgi?id=125765
1622
1623         Reviewed by Darin Adler.
1624
1625         * WebCore.xcodeproj/project.pbxproj:
1626         * html/Autocapitalize.cpp: Added.
1627         * html/Autocapitalize.h: Added. Also, added FIXME comment to forward declare AtomicString once we upstream
1628         more of the iOS port.
1629         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1630         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent): Opt out of code when building for iOS.
1631         * html/BaseDateAndTimeInputType.cpp:
1632         (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable): Added; iOS-specific.
1633         * html/BaseDateAndTimeInputType.h:
1634         * html/FileInputType.cpp:
1635         (WebCore::FileInputType::FileInputType): Added iOS-specific code.
1636         (WebCore::FileInputType::~FileInputType): Opt out of code when building for iOS. Also, added FIXME comment.
1637         (WebCore::FileInputType::requestIcon): Ditto.
1638         (WebCore::FileInputType::filesChosen): Added; iOS-specific.
1639         (WebCore::FileInputType::displayString): Added; iOS-specific.
1640         (WebCore::FileInputType::receiveDroppedFiles): Guarded code with ENABLE(DRAG_SUPPORT).
1641         * html/FileInputType.h:
1642         * html/FormController.cpp:
1643         (WebCore::FormController::formElementsCharacterCount): Added.
1644         * html/FormController.h:
1645         * html/HTMLAppletElement.cpp:
1646         (WebCore::HTMLAppletElement::updateWidget): Opt out of code when building for iOS.
1647         * html/HTMLAreaElement.cpp:
1648         (WebCore::HTMLAreaElement::computePath): Changed argument datatype from RenderElement* to RenderObject*.
1649         Also, added FIXME comment to fix this up once we upstream iOS's DOMUIKitExtensions.{h, mm}.
1650         (WebCore::HTMLAreaElement::computeRect): Ditto.
1651         * html/HTMLAreaElement.h:
1652         * html/HTMLAttributeNames.in: Added attributes ongesture{start, change, end}, autocorrect, autocapitalize,
1653         data-youtube-id, onwebkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}, webkit-playsinline,
1654         x-webkit-airplay, and x-webkit-wirelessvideoplaybackdisabled.
1655         * html/HTMLBodyElement.cpp:
1656         (WebCore::HTMLBodyElement::scrollLeft): Added iOS-specific code.
1657         (WebCore::HTMLBodyElement::scrollTop): Ditto.
1658         * html/HTMLCanvasElement.cpp:
1659         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Added iOS-specific code and FIXME comment.
1660         (WebCore::HTMLCanvasElement::createImageBuffer): Added iOS-specific code.
1661         * html/HTMLCanvasElement.h: Added iOS-specific code and FIXME comment.
1662         * html/HTMLDocument.cpp:
1663         (WebCore::HTMLDocument::HTMLDocument): Added argument isSynthesized (default to false), which is
1664         passed through to Document::Document(), to create a synthesized document.
1665         * html/HTMLDocument.h:
1666         (WebCore::HTMLDocument::createSynthesizedDocument): Added.
1667         * html/HTMLElement.cpp:
1668         (WebCore::HTMLElement::collectStyleForPresentationAttribute): Added iOS-specific code.
1669         (WebCore::populateEventNameForAttributeLocalNameMap): Ditto.
1670         (WebCore::HTMLElement::willRespondToMouseMoveEvents): Added; iOS-specific.
1671         (WebCore::HTMLElement::willRespondToMouseWheelEvents): Added; iOS-specific.
1672         (WebCore::HTMLElement::willRespondToMouseClickEvents): Added; iOS-specific.
1673         * html/HTMLElement.h:
1674         * html/HTMLFormControlElement.cpp: Added FIXME comment to share more code with class HTMLFormElement.
1675         (WebCore::HTMLFormControlElement::autocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1676         (WebCore::HTMLFormControlElement::setAutocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1677         (WebCore::HTMLFormControlElement::autocapitalizeType): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1678         (WebCore::HTMLFormControlElement::autocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1679         (WebCore::HTMLFormControlElement::setAutocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1680         * html/HTMLFormControlElement.h:
1681         * html/HTMLFormElement.cpp: Added FIXME comment to share more code with class HTMLFormControlElement.
1682         (WebCore::HTMLFormElement::submitImplicitly): Modified to code to allow implicit submission of multi-input
1683         forms only if Settings::allowMultiElementImplicitSubmission() returns true. Such behavior is expected by older
1684         iOS apps. Also, changed datatype of variable submissionTriggerCount from int to unsigned because it represents
1685         a non-negative value.
1686         (WebCore::HTMLFormElement::autocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1687         (WebCore::HTMLFormElement::setAutocorrect): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1688         (WebCore::HTMLFormElement::autocapitalizeType): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1689         (WebCore::HTMLFormElement::autocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1690         (WebCore::HTMLFormElement::setAutocapitalize): Added; guarded by PLATFORM(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).
1691         * html/HTMLFormElement.h:
1692         * html/HTMLFormElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize.
1693         * html/HTMLIFrameElement.h:
1694         * html/HTMLInputElement.cpp:
1695         (WebCore::HTMLInputElement::displayString): Added; guarded by PLATFORM(IOS).
1696         (WebCore::HTMLInputElement::dateType): Added; guarded by PLATFORM(IOS).
1697         * html/HTMLInputElement.h:
1698         * html/HTMLInputElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize.
1699         * html/HTMLLabelElement.cpp:
1700         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents): Added iOS-specific code.
1701         * html/HTMLMediaElement.cpp:
1702         (WebCore::HTMLMediaElement::HTMLMediaElement): Added iOS-specific code and FIXME comment.
1703         (WebCore::HTMLMediaElement::~HTMLMediaElement): Added iOS-specific code.
1704         (WebCore::HTMLMediaElement::parseMediaPlayerAttribute): Added; iOS-specific.
1705         (WebCore::HTMLMediaElement::parseAttribute): Added iOS-specific code.
1706         (WebCore::HTMLMediaElement::insertedInto): Ditto.
1707         (WebCore::HTMLMediaElement::load): Ditto.
1708         (WebCore::HTMLMediaElement::prepareForLoad): Ditto.
1709         (WebCore::HTMLMediaElement::autoplay): Ditto.
1710         (WebCore::HTMLMediaElement::play): Ditto.
1711         (WebCore::HTMLMediaElement::playInternal): Ditto.
1712         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
1713         (WebCore::HTMLMediaElement::setVolumne): Opt out of code when building for iOS.
1714         (WebCore::HTMLMediaElement::setMuted): Ditto.
1715         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Added iOS-specific code.
1716         (WebCore::HTMLMediaElement::updateVolume): Ditto.
1717         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
1718         (WebCore::HTMLMediaElement::userCancelledLoad): Added iOS-specific code and FIXME comment.
1719         (WebCore::HTMLMediaElement::resume): Added iOS-specific comment. See <rdar://problem/9751303>.
1720         (WebCore::HTMLMediaElement::deliverNotification): Added iOS-specific code.
1721         (WebCore::HTMLMediaElement::getPluginProxyParams): Added iOS-specific code. Also, changed src() to getNonEmptyURLAttribute()
1722         in the non-iOS code as their doesn't exist a method called src in this class or its superclasses.
1723         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Added; guarded by ENABLE(IOS_AIRPLAY).
1724         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Added; guarded by ENABLE(IOS_AIRPLAY).
1725         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Added; guarded by ENABLE(IOS_AIRPLAY).
1726         (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Added; guarded by ENABLE(IOS_AIRPLAY).
1727         (WebCore::HTMLMediaElement::addEventListener): Added; guarded by ENABLE(IOS_AIRPLAY).
1728         (WebCore::HTMLMediaElement::removeEventListener): Added; guarded by ENABLE(IOS_AIRPLAY).
1729         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Added; guarded by ENABLE(IOS_AIRPLAY).
1730         (WebCore::HTMLMediaElement::enterFullscreen): Added iOS-specific code.
1731         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
1732         (WebCore::HTMLMediaElement::createMediaPlayer): Added ENABLE(IOS_AIRPLAY)-guarded code.
1733         (WebCore::HTMLMediaElement::userRequestsMediaLoading): Added; guarded by PLATFORM(IOS).
1734         (WebCore::HTMLMediaElement::shouldUseVideoPluginProxy): Use dot operator instead of dereference operator (->)
1735         when accessing Document::settings().
1736         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added ENABLE(PLUGIN_PROXY_FOR_VIDEO)-guarded code.
1737         * html/HTMLMediaElement.h:
1738         (WebCore::HTMLMediaElement::userGestureRequiredToShowPlaybackTargetPicker): Added; guarded by ENABLE(IOS_AIRPLAY).
1739         * html/HTMLMediaElement.idl: Added ENABLE_IOS_AIRPLAY-guarded attributes and functions:webkitCurrentPlaybackTargetIsWireless,
1740         onwebkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}, and webkitShowPlaybackTargetPicker().
1741         * html/HTMLMetaElement.cpp:
1742         (WebCore::HTMLMetaElement::process): Added iOS-specific code.
1743         * html/HTMLObjectElement.cpp:
1744         (WebCore::shouldNotPerformURLAdjustment): Added; iOS-specific.
1745         (WebCore::HTMLObjectElement::parametersForPlugin): Modified to call shouldNotPerformURLAdjustment() when
1746         building for iOS.
1747         * html/HTMLPlugInElement.h:
1748         * html/HTMLPlugInImageElement.cpp:
1749         (WebCore::HTMLPlugInImageElement::createRenderer): Added iOS-specific code.
1750         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): Added; iOS-specific.
1751         * html/HTMLPlugInImageElement.h:
1752         * html/HTMLSelectElement.cpp:
1753         (WebCore::HTMLSelectElement::usesMenuList): Added iOS-specific code.
1754         (WebCore::HTMLSelectElement::createRenderer): Ditto.
1755         (WebCore::HTMLSelectElement::childShouldCreateRenderer): Ditto.
1756         (WebCore::HTMLSelectElement::willRespondToMouseClickEvents): Added; iOS-specific.
1757         (WebCore::HTMLSelectElement::updateListBoxSelection): Added iOS-specific code.
1758         (WebCore::HTMLSelectElement::scrollToSelection): Ditto.
1759         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer): Ditto.
1760         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Opt out of code when building for iOS.
1761         (WebCore::HTMLSelectElement::defaultEventHandler): Added iOS-specific code.
1762         * html/HTMLSelectElement.h:
1763         * html/HTMLTextAreaElement.cpp:
1764         (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents): Added; iOS-specific.
1765         * html/HTMLTextAreaElement.h:
1766         * html/HTMLTextAreaElement.idl: Added iOS-specific attributes: autocorrect and autocapitalize.
1767         * html/HTMLTextFormControlElement.cpp:
1768         (WebCore::HTMLTextFormControlElement::select): Added iOS-specific code and FIXME comment.
1769         (WebCore::HTMLTextFormControlElement::setSelectionRange): Opt out of code when building for iOS.
1770         (WebCore::HTMLTextFormControlElement::hidePlaceholder): Added; guarded by PLATFORM(IOS).
1771         (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary): Added; guarded by PLATFORM(IOS).
1772         * html/HTMLTextFormControlElement.h:
1773         * html/HTMLVideoElement.cpp:
1774         (WebCore::HTMLVideoElement::createRenderer): Fix up call to HTMLMediaElement::createRenderer().
1775         (WebCore::HTMLVideoElement::parseAttribute): Added iOS-specific code.
1776         (WebCore::HTMLVideoElement::supportsFullscreen): Ditto.
1777         (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Added; guarded by ENABLE(IOS_AIRPLAY).
1778         (WebCore::HTMLVideoElement::setWebkitWirelessVideoPlaybackDisabled): Added; guarded by ENABLE(IOS_AIRPLAY).
1779         * html/HTMLVideoElement.h:
1780         * html/HTMLVideoElement.idl: Added ENABLE_IOS_AIRPLAY-guarded attribute: webkitWirelessVideoPlaybackDisabled.
1781         * html/ImageDocument.cpp:
1782         (WebCore::ImageDocument::createDocumentStructure): Added iOS-specific code.
1783         (WebCore::ImageDocument::scale): Ditto.
1784         (WebCore::ImageDocument::resizeImageToFit): Ditto.
1785         (WebCore::ImageDocument::imageClicked): Ditto.
1786         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
1787         (WebCore::ImageDocument::windowSizeChanged): Ditto.
1788         * html/InputType.cpp:
1789         (WebCore::InputType::dateType): Added; guarded by PLATFORM(IOS).
1790         (WebCore::InputType::isKeyboardFocusable): Added iOS-specific code.
1791         (WebCore::InputType::displayString): Added; guarded by PLATFORM(IOS).
1792         * html/InputType.h:
1793         * html/PluginDocument.cpp:
1794         (WebCore::PluginDocumentParser::createDocumentStructure): Added iOS-specific code.
1795         * html/RangeInputType.cpp:
1796         (WebCore::RangeInputType::handleTouchEvent): Ditto.
1797         (WebCore::RangeInputType::disabledAttributeChanged): Added; iOS-specific.
1798         * html/RangeInputType.h:
1799         * html/SearchInputType.cpp:
1800         (WebCore::SearchInputType::addSearchResult): Opt out of code when building for iOS.
1801         * html/TextFieldInputType.cpp:
1802         (WebCore::TextFieldInputType::isKeyboardFocusable): Added iOS-specific code.
1803         * html/TextFieldInputType.h:
1804         * html/WebAutocapitalize.h: Added.
1805         * html/canvas/CanvasRenderingContext2D.cpp:
1806         (WebCore::CanvasRenderingContext2D::createImageData): Added iOS-specific code.
1807         (WebCore::CanvasRenderingContext2D::getImageData): Ditto.
1808         * html/parser/HTMLConstructionSite.h:
1809         (WebCore::HTMLConstructionSite::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
1810         * html/parser/HTMLParserScheduler.h:
1811         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken): Added iOS-specific code.
1812         * html/parser/HTMLTreeBuilder.cpp:
1813         (WebCore::HTMLTreeBuilder::insertPhoneNumberLink): Added; guarded by PLATFORM(IOS).
1814         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers): Added; guarded by PLATFORM(IOS).
1815         (WebCore::disallowTelephoneNumberParsing): Added; guarded by PLATFORM(IOS).
1816         (WebCore::shouldParseTelephoneNumbersInNode): Added; guarded by PLATFORM(IOS).
1817         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Added iOS-specific code.
1818         * html/parser/HTMLTreeBuilder.h:
1819         * html/shadow/MediaControlElements.cpp:
1820         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Guarded member initialization of m_controls with ENABLE(VIDEO_TRACK). Also added UNUSED_PARAM(event) when building with
1821         VIDEO_TRACK disabled.
1822         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Added UNUSED_PARAM(event) when
1823         building with VIDEO_TRACK disabled.
1824         * html/shadow/MediaControls.h:
1825         * html/shadow/SliderThumbElement.cpp:
1826         (WebCore::SliderThumbElement::SliderThumbElement): Added iOS-specific code.
1827         (WebCore::SliderThumbElement::dragFrom): Opt out of code when building for iOS.
1828         (WebCore::SliderThumbElement::willDetachRenderers):  Added iOS-specific code.
1829         (WebCore::SliderThumbElement::exclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1830         (WebCore::SliderThumbElement::setExclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1831         (WebCore::SliderThumbElement::clearExclusiveTouchIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1832         (WebCore::findTouchWithIdentifier): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1833         (WebCore::SliderThumbElement::handleTouchStart): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1834         (WebCore::SliderThumbElement::handleTouchMove): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1835         (WebCore::SliderThumbElement::handleTouchEndAndCancel): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1836         (WebCore::SliderThumbElement::didAttachRenderers): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1837         (WebCore::SliderThumbElement::handleTouchEvent): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1838         (WebCore::SliderThumbElement::shouldAcceptTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1839         (WebCore::SliderThumbElement::registerForTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1840         (WebCore::SliderThumbElement::unregisterForTouchEvents): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1841         (WebCore::SliderThumbElement::disabledAttributeChanged): Added; guarded by ENABLE(TOUCH_EVENTS) && PLATFORM(IOS).
1842         * html/shadow/SliderThumbElement.h:
1843         * html/shadow/TextControlInnerElements.cpp:
1844         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Opt out of code when building for iOS.
1845         * html/shadow/TextControlInnerElements.h:
1846         * page/Settings.in: Added setting allowMultiElementImplicitSubmission to enable/disable multi-input implicit form
1847         submission (disabled by default). Also added FIXME comment to rename this setting to allowMultiElementImplicitFormSubmission
1848         once we upstream the iOS changes to WebView.mm.
1849
1850 2013-12-17  Brady Eidson  <beidson@apple.com>
1851
1852         DatabaseProcess: Pipe through object store IDs and transaction mode for "openTransaction"
1853         https://bugs.webkit.org/show_bug.cgi?id=125872
1854
1855         Reviewed by Alexey Proskuryakov.
1856
1857         Make these enums into enum classes.
1858         Add const maximums for each enum class that might be serialized to allow for conversion later:
1859         * Modules/indexeddb/IndexedDB.h:
1860
1861         Add cross-thread copying for these new enum classes.
1862         * platform/CrossThreadCopier.cpp:
1863         (WebCore::::copy):
1864         * platform/CrossThreadCopier.h:
1865
1866         Adopt the new enum classes throughout the rest of WebCore:
1867         * Modules/indexeddb/IDBCursor.cpp:
1868         (WebCore::IDBCursor::continueFunction):
1869         (WebCore::IDBCursor::stringToDirection):
1870         (WebCore::IDBCursor::directionToString):
1871         * Modules/indexeddb/IDBCursor.h:
1872         * Modules/indexeddb/IDBCursorBackend.cpp:
1873         (WebCore::IDBCursorBackend::deleteFunction):
1874         * Modules/indexeddb/IDBCursorBackend.h:
1875         (WebCore::IDBCursorBackend::value):
1876         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1877         (WebCore::IDBDatabaseBackend::createObjectStore):
1878         (WebCore::IDBDatabaseBackend::deleteObjectStore):
1879         (WebCore::IDBDatabaseBackend::createIndex):
1880         (WebCore::IDBDatabaseBackend::deleteIndex):
1881         (WebCore::IDBDatabaseBackend::get):
1882         (WebCore::IDBDatabaseBackend::put):
1883         (WebCore::IDBDatabaseBackend::setIndexKeys):
1884         (WebCore::IDBDatabaseBackend::openCursor):
1885         (WebCore::IDBDatabaseBackend::deleteRange):
1886         (WebCore::IDBDatabaseBackend::clearObjectStore):
1887         (WebCore::IDBDatabaseBackend::transactionStarted):
1888         (WebCore::IDBDatabaseBackend::transactionFinished):
1889         (WebCore::IDBDatabaseBackend::transactionFinishedAndAbortFired):
1890         (WebCore::IDBDatabaseBackend::transactionFinishedAndCompleteFired):
1891         (WebCore::IDBDatabaseBackend::createTransaction):
1892         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
1893         (WebCore::IDBDatabaseBackend::deleteDatabase):
1894         * Modules/indexeddb/IDBDatabaseBackend.h:
1895         * Modules/indexeddb/IDBFactory.cpp:
1896         (WebCore::IDBFactory::open):
1897         (WebCore::IDBFactory::openInternal):
1898         (WebCore::IDBFactory::deleteDatabase):
1899         * Modules/indexeddb/IDBIndex.cpp:
1900         (WebCore::IDBIndex::openCursor):
1901         (WebCore::IDBIndex::openKeyCursor):
1902         * Modules/indexeddb/IDBObjectStore.cpp:
1903         (WebCore::IDBObjectStore::openCursor):
1904         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1905         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1906         * Modules/indexeddb/IDBRequest.cpp:
1907         (WebCore::IDBRequest::IDBRequest):
1908         (WebCore::IDBRequest::setResultCursor):
1909         (WebCore::IDBRequest::onSuccess):
1910         * Modules/indexeddb/IDBTransaction.cpp:
1911         (WebCore::IDBTransaction::create):
1912         (WebCore::IDBTransaction::IDBTransaction):
1913         (WebCore::IDBTransaction::stringToMode):
1914         (WebCore::IDBTransaction::modeToString):
1915         * Modules/indexeddb/IDBTransaction.h:
1916         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1917         (WebCore::PutOperation::perform):
1918         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1919         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
1920         (WebCore::IDBTransactionCoordinator::canRunTransaction):
1921         * Modules/indexeddb/IDBVersionChangeEvent.h:
1922         (WebCore::IDBVersionChangeEvent::create):
1923         (WebCore::IDBVersionChangeEvent::newVersion):
1924         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1925         (WebCore::objectStoreCursorOptions):
1926         (WebCore::indexCursorOptions):
1927         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1928         (WebCore::IDBServerConnectionLevelDB::get):
1929         (WebCore::IDBServerConnectionLevelDB::openCursor):
1930         (WebCore::IDBServerConnectionLevelDB::count):
1931         (WebCore::IDBServerConnectionLevelDB::deleteRange):
1932         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
1933
1934         * WebCore.exp.in:
1935
1936 2013-12-17  Gavin Barraclough  <barraclough@apple.com>
1937
1938         Remove PageVisibilityStateUnloaded
1939         https://bugs.webkit.org/show_bug.cgi?id=125869
1940
1941         Reviewed by Anders Carlsson.
1942
1943         This is not currently supported by WebKit, remove this enum value.
1944         We can always add this back later if/when we add support for this state.
1945
1946         * page/PageVisibilityState.cpp:
1947         (WebCore::pageVisibilityStateString):
1948         * page/PageVisibilityState.h:
1949             - removed PageVisibilityStateUnloaded
1950
1951 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
1952
1953         [GTK] [CMake] Build the plugin process against GTK+ 2
1954         https://bugs.webkit.org/show_bug.cgi?id=116374
1955
1956         Reviewed by Gustavo Noronha Silva.
1957
1958         * PlatformGTK.cmake: Split off the GTK+-dependent sources into
1959         libWebCorePlatformGTK and compile libWebCorePlatformGTK2 when
1960         WebKit2 is enabled.
1961
1962 2013-12-17  Alex Christensen  <achristensen@webkit.org>
1963
1964         Compile fix for WebGL on Windows without GRAPHICS_SURFACE.
1965         https://bugs.webkit.org/show_bug.cgi?id=125867
1966
1967         Reviewed by Martin Robinson.
1968
1969         * platform/graphics/opengl/GLPlatformSurface.cpp:
1970         (WebCore::GLPlatformSurface::createOffScreenSurface):
1971         Protect reference to EGLOffScreenSurface with USE(GRAPHICS_SURFACE).
1972
1973 2013-12-17  Radu Stavila  <stavila@adobe.com>
1974
1975         [CSS Regions] Positioned elements in regions get clipped if they fall outside the region
1976         https://bugs.webkit.org/show_bug.cgi?id=117120
1977
1978         Reviewed by Mihnea Ovidenie.
1979
1980         Fixed the computing of the box decorations clip rect when having statically positioned
1981         elements inside positioned elements. The existing algorithm computed the rect in a loop
1982         running up the containing block chain and only checked for positioned elements before 
1983         starting the loop. If a positioned elements was found in the middle of a loop (as would
1984         be the case with a positioned element parenting a non-positioned element), it was not 
1985         correctly handled.
1986         Also changed it so the clip is only performed in the fragmentation direction as that was 
1987         the original purpose of this method.
1988
1989         Tests: fast/regions/absolute-in-relative-overflow.html
1990                fast/regions/static-in-relative-overflow.html
1991                fast/regions/sticky-border-overflow.html
1992
1993         * rendering/RenderFlowThread.cpp:
1994         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
1995
1996 2013-12-17  Commit Queue  <commit-queue@webkit.org>
1997
1998         Unreviewed, rolling out r160717.
1999         http://trac.webkit.org/changeset/160717
2000         https://bugs.webkit.org/show_bug.cgi?id=125863
2001
2002         New tests are failing, and possibly broke an existing test
2003         (Requested by ap on #webkit).
2004
2005         * rendering/FlowThreadController.cpp:
2006         (WebCore::FlowThreadController::collectFixedPositionedLayers):
2007         * rendering/RenderLayer.cpp:
2008         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
2009         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2010
2011 2013-12-17  Ryosuke Niwa  <rniwa@webkit.org>
2012
2013         Invalid dir attributes should resolve to ltr
2014         https://bugs.webkit.org/show_bug.cgi?id=125830
2015
2016         Reviewed by Darin Adler.
2017         
2018         Merge https://chromium.googlesource.com/chromium/blink/+/2d592d1c998bec9438e421e1ce1ee6caba05a884
2019
2020         The dir attribute should resolve to direction: ltr by default when the attribute value is
2021         "not in a defined state": http://www.w3.org/TR/2013/WD-html51-20130528/dom.html#the-directionality
2022
2023         Test: fast/dom/HTMLElement/set-and-clear-dir-attribute.html
2024
2025         * html/HTMLElement.cpp:
2026         (WebCore::isLTROrRTLIgnoringCase): Extracted from HTMLElement::directionality.
2027         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
2028         (WebCore::HTMLElement::directionality):
2029
2030 2013-12-17  Mihnea Ovidenie  <mihnea@adobe.com>
2031
2032         [CSSRegions] Incorrect repaint of fixed element with transformed parent
2033         https://bugs.webkit.org/show_bug.cgi?id=125756
2034
2035         Reviewed by Darin Adler.
2036
2037         When collecting the layers for fixed positioned elements with named flow
2038         as a containing block, use layers collection at named flow layer level
2039         instead of relying on the positioned elements collection.
2040
2041         Modified also FlowThreadController::collectFixedPositionedLayers function
2042         to always return the layers sorted by z-index, as this operation was always
2043         done at the call sites.
2044
2045         Tests: fast/regions/repaint/fixed-in-named-flow-cb-changed.html
2046                fast/regions/repaint/fixed-in-named-flow-cb-changed2.html
2047
2048         * rendering/FlowThreadController.cpp:
2049         (WebCore::compareZIndex):
2050         (WebCore::FlowThreadController::collectFixedPositionedLayers):
2051         * rendering/RenderLayer.cpp:
2052         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
2053         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2054
2055 2013-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
2056
2057         REGRESSION(r159166?): fast/block/float/float-with-fractional-height-vertical-lr.html, fast/block/float/float-with-fractional-height.html are failing
2058         https://bugs.webkit.org/show_bug.cgi?id=124506
2059
2060         Reviewed by Dirk Schulze.
2061
2062         Floor the endpoints of the floating object interval to keep the old
2063         behavior until a better fix can be created.
2064
2065         No new tests, fixes regression in existing tests.
2066
2067         * rendering/FloatingObjects.cpp:
2068         (WebCore::FloatingObjects::intervalForFloatingObject):
2069
2070 2013-12-17  Alex Christensen  <achristensen@webkit.org>
2071
2072         [Win] Visual Studio workaround for compiling WebGL.
2073         https://bugs.webkit.org/show_bug.cgi?id=125808
2074
2075         Reviewed by Darin Adler.
2076
2077         * platform/graphics/GraphicsContext3D.cpp:
2078         Don't inline outermost function to prevent Visual Studio crash.
2079
2080 2013-12-17  Mario Sanchez Prada  <mario.prada@samsung.com>
2081
2082         [ATK] Expose accessibility objects for <dl>, <dt> and <dd>
2083         https://bugs.webkit.org/show_bug.cgi?id=125857
2084
2085         Reviewed by Chris Fleizach.
2086
2087         Map description lists to the newly introduced ATK roles
2088         ATK_ROLE_DESCRIPTION_LIST, ATK_ROLE_DESCRIPTION_TERM and
2089         ATK_ROLE_DESCRIPTION_VALUE, introduced in ATK 2.11.4.
2090
2091         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2092         (atkRole): Do the right mapping.
2093         (webkitAccessibleGetRole): Update call to atkRole, now that it
2094         receives an AccessibilityObject* as parameter.
2095
2096 2013-12-17  Frédéric Wang  <fred.wang@free.fr>
2097
2098         Ensure inferred mrows for msqrt, mstyle, merror, mphantom and math.
2099         https://bugs.webkit.org/show_bug.cgi?id=124841
2100
2101         Reviewed by Darin Adler.
2102
2103         Tests: mathml/presentation/inferred-mrow-baseline.html
2104                mathml/presentation/inferred-mrow-stretchy.html
2105
2106         * css/mathml.css: make merror, mphantom and mstyle behave like an mrow.
2107         (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle):
2108         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle):
2109         * mathml/MathMLInlineContainerElement.cpp: ditto
2110         (WebCore::MathMLInlineContainerElement::createRenderer):
2111         * mathml/mathtags.in: ditto
2112         * rendering/mathml/RenderMathMLOperator.cpp:
2113         (WebCore::RenderMathMLOperator::paint): fix failure in mathml/presentation/phantom.html now that phantom can stretch operators.
2114
2115 2013-12-17  Simon Pena  <simon.pena@samsung.com>
2116
2117         [NIX] Enable full debug builds by having ar creating thin archives
2118         https://bugs.webkit.org/show_bug.cgi?id=125850
2119
2120         Reviewed by Csaba Osztrogonác.
2121
2122         By default, CMake uses ar to generate libWebCore.a with cr parameters
2123         (do not warn if the library has to be created, and replace existing
2124         files in the archive). That results in a very large file, and ar fails
2125         with sizes over 4GB.
2126
2127         By using thin archives (the T option of ar), the generated
2128         libWebCore.a is much smaller, and can be successfully archived. As a
2129         result, we can generate a full debug build. This patch is based on Xan
2130         López's webkit.org/b/110580.
2131
2132         * PlatformNix.cmake: Instruct cmake to invoke ar with T option.
2133
2134 2013-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2135
2136         Unreviewed. Update GObject DOM symbols file after r160336.
2137
2138         * bindings/gobject/webkitdom.symbols: Add new methods exposed for
2139         VideoPlaybackQuality.
2140
2141 2013-12-17  Mihai Maerean  <mmaerean@adobe.com>
2142
2143         Fix hit testing for divs with a hierarchy of css transformed and non-transformed elements
2144         https://bugs.webkit.org/show_bug.cgi?id=124777
2145
2146         Reviewed by Darin Adler.
2147
2148         After bug #124647, the hit test will still behave incorrectly for transformed divs with non
2149         transformed siblings that are all inside a transformed element (tested by the
2150         hover-rotated-with-children-negative-z.html layout test).
2151
2152         The fix is to not take zOffset into account during hit-testing when child layers are in the
2153         same 3D rendering context. Only when preserve3d is true, should hit-testing compute the
2154         zOffset of the layers with transformations and, when two layers overlap, to return the layer
2155         with the highest zOffset.
2156
2157         The patch includes the work of a.renevier from https://codereview.chromium.org/79943002/
2158
2159         Tests: transforms/3d/hit-testing/hover-rotated-with-children-negative-z.html
2160                transforms/3d/hit-testing/negative-zoffset-hit-test.html
2161                transforms/3d/hit-testing/overlapping-layers-hit-test.html
2162
2163         * rendering/RenderLayer.cpp:
2164         (WebCore::computeZOffset):
2165         (WebCore::RenderLayer::hitTestLayer):
2166
2167 2013-12-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2168
2169         Remove a few more guards mistakenly added in r160367
2170
2171         Reviewed by Martin Robinson.
2172
2173         r160367 was too liberal in hiding APIs from the GObject DOM bindings.
2174
2175         * Modules/battery/NavigatorBattery.idl: Expose NavigatorBattery.
2176
2177 2013-12-17  Benjamin Poulain  <benjamin@webkit.org>
2178
2179         Add a simple register allocator to WebCore for x86_64
2180         https://bugs.webkit.org/show_bug.cgi?id=125771
2181
2182         Reviewed by Geoffrey Garen.
2183
2184         Add a brain dead register allocator to simplify the use of registers
2185         when writting code generators.
2186
2187         RegisterAllocator has two purposes:
2188         -make it easy to name registers properly.
2189         -make it hard to reuse a register accidentally.
2190
2191         A helper class LocalRegister is also defined to provide an easy
2192         way to work with registers within a C++ scope. For example:
2193             LocalRegister elementPointer(allocator);
2194             assembler.load(address, elementPointer);
2195
2196         RegisterAllocator makes no attempt at optimizing register allocations, but it reduces
2197         implicit dependencies by returning used register at the end of the queue, making it less
2198         likely they will be reused before their last instruction is executed.
2199
2200         The current implementation only support unix x86_64, it only uses caller saved registers.
2201
2202         * WebCore.xcodeproj/project.pbxproj:
2203         * cssjit/RegisterAllocator.h: Added.
2204         (WebCore::RegisterAllocator::allocateRegister): Provides any available register.
2205         To restrict runtime exploitation of compiler bugs, the method crashes in release
2206         if the register pool is empty.
2207
2208         (WebCore::RegisterAllocator::reserveRegister): Reserve a particular register.
2209         (WebCore::RegisterAllocator::returnRegister): Return a previously allocated or reserved register.
2210
2211         (WebCore::RegisterAllocator::allocatedRegisters):
2212         (WebCore::LocalRegister::LocalRegister):
2213         (WebCore::LocalRegister::~LocalRegister):
2214         (WebCore::LocalRegister::operator JSC::MacroAssembler::RegisterID):
2215         (WebCore::RegisterAllocator::RegisterAllocator):
2216
2217 2013-12-16  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2218
2219         Checking RTCPeerConnection signalingState before setting local/remoteDescription
2220         https://bugs.webkit.org/show_bug.cgi?id=125655
2221
2222         Reviewed by Eric Carlson.
2223
2224         Before setting a session description RTCPeerConnection must check if it is in valid state for that SDP type.
2225
2226         New tests: fast/mediastream/RTCPeerConnection-have-local-answer.html
2227                fast/mediastream/RTCPeerConnection-have-local-offer.html
2228                fast/mediastream/RTCPeerConnection-have-local-pranswer.html
2229                fast/mediastream/RTCPeerConnection-have-remote-offer.html
2230                fast/mediastream/RTCPeerConnection-have-remote-pranswer.html
2231                fast/mediastream/RTCPeerConnection-stable.html
2232
2233         Modified: fast/mediastream/RTCPeerConnection-remoteDescription.html
2234
2235         * Modules/mediastream/RTCPeerConnection.cpp:
2236         (WebCore::RTCPeerConnection::checkStateForLocalDescription): Checks if the current state of RTCPeerConnection is
2237         valid for the local SDP that is being set.
2238         (WebCore::RTCPeerConnection::checkStateForRemoteDescription): Checks if the current state of RTCPeerConnection
2239         is valid for the remote SDP that is being set.
2240         (WebCore::RTCPeerConnection::setLocalDescription): Now calls checkStateForLocalDescription prior to set the
2241         local SDP.
2242         (WebCore::RTCPeerConnection::setRemoteDescription): Now Calls checkStateForRemoteDescription prior to set the
2243         remote SDP.
2244         * Modules/mediastream/RTCPeerConnection.h:
2245         * platform/mock/RTCNotifiersMock.cpp: Adding new class to notify RTCPeerConnection about a signaling state
2246         change: SignalingStateNotifier.
2247         (WebCore::SignalingStateNotifier::SignalingStateNotifier):
2248         (WebCore::SignalingStateNotifier::fire):
2249         * platform/mock/RTCNotifiersMock.h:
2250         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2251         (WebCore::RTCPeerConnectionHandlerMock::signalingStateFromSDP): Defines the new state that RTCPeerConnection
2252         should be, according the SDP that is being set.
2253         (WebCore::RTCPeerConnectionHandlerMock::setLocalDescription): Calls signalingStateFromSDP, in order to get the
2254         new signaling state and notify RTCPeerConnection object.
2255         (WebCore::RTCPeerConnectionHandlerMock::setRemoteDescription): Ditto.
2256         * platform/mock/RTCPeerConnectionHandlerMock.h:
2257
2258 2013-12-16  Tim Horton  <timothy_horton@apple.com>
2259
2260         Revert a mysterious and inexplicable part of http://trac.webkit.org/changeset/160685
2261
2262         * platform/KeyedCoding.h:
2263         (WebCore::KeyedEncoder::encodeEnum):
2264         (WebCore::KeyedEncoder::encodeObject):
2265         (WebCore::KeyedEncoder::encodeConditionalObject):
2266         (WebCore::KeyedEncoder::encodeObjects):
2267
2268 2013-12-16  Anders Carlsson  <andersca@apple.com>
2269
2270         Remove EnumClass.h from WTF
2271         https://bugs.webkit.org/show_bug.cgi?id=125820
2272
2273         Reviewed by Darin Adler.
2274
2275         Replace uses of ENUM_CLASS with real enum class declarations.
2276
2277         * Modules/webdatabase/DatabaseBasicTypes.h:
2278         * Modules/webdatabase/DatabaseError.h:
2279         * Modules/webdatabase/SQLTransactionState.h:
2280         * bindings/js/JSSubtleCryptoCustom.cpp:
2281         * bindings/js/SerializedScriptValue.cpp:
2282         * crypto/CryptoAlgorithmIdentifier.h:
2283         * crypto/CryptoAlgorithmParameters.h:
2284         * crypto/CryptoKey.h:
2285         * crypto/CryptoKeyData.h:
2286         * crypto/CryptoKeyType.h:
2287         * crypto/keys/CryptoKeyDataRSAComponents.h:
2288         * inspector/InspectorTimelineAgent.h:
2289
2290 2013-12-16  Tim Horton  <timothy_horton@apple.com>
2291
2292         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
2293         https://bugs.webkit.org/show_bug.cgi?id=125750
2294
2295         Reviewed by Simon Fraser.
2296
2297         * WebCore.exp.in:
2298         Export a few things so WebKit2 can use them.
2299
2300 2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>
2301
2302         Fix some whitespace issues in inspector code
2303         https://bugs.webkit.org/show_bug.cgi?id=125814
2304
2305         Reviewed by Darin Adler.
2306
2307         * inspector/protocol/DOM.json:
2308         * inspector/protocol/DOMStorage.json:
2309         * inspector/protocol/Timeline.json:
2310
2311 2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>
2312
2313         Web Inspector: Use JSC::SourceID and JSC::BreakpointID instead of WebCore dups
2314         https://bugs.webkit.org/show_bug.cgi?id=125818
2315
2316         Reviewed by Mark Lam.
2317
2318         Remove the WebCore typedefs of JSC types. Prefer JSC namespace
2319         prefixed types throughout WebCore's Inspector code.
2320
2321         * GNUmakefile.list.am:
2322         * WebCore.vcxproj/WebCore.vcxproj:
2323         * WebCore.vcxproj/WebCore.vcxproj.filters:
2324         * WebCore.xcodeproj/project.pbxproj:
2325         * bindings/js/BreakpointID.h: Removed.
2326         * bindings/js/ScriptDebugServer.cpp:
2327         (WebCore::ScriptDebugServer::setBreakpoint):
2328         (WebCore::ScriptDebugServer::removeBreakpoint):
2329         (WebCore::ScriptDebugServer::dispatchDidParseSource):
2330         * bindings/js/ScriptDebugServer.h:
2331         * bindings/js/SourceID.h: Removed.
2332         * inspector/InspectorDebuggerAgent.cpp:
2333         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2334         (WebCore::parseLocation):
2335         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2336         (WebCore::InspectorDebuggerAgent::continueToLocation):
2337         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2338         (WebCore::InspectorDebuggerAgent::searchInContent):
2339         (WebCore::InspectorDebuggerAgent::getScriptSource):
2340         (WebCore::InspectorDebuggerAgent::didParseSource):
2341         (WebCore::InspectorDebuggerAgent::didPause):
2342         (WebCore::InspectorDebuggerAgent::clear):
2343         * inspector/InspectorDebuggerAgent.h:
2344         * inspector/ScriptDebugListener.h:
2345
2346 2013-12-16  Daniel Bates  <dabates@apple.com>
2347
2348         [iOS] Upstream WebCore/dom changes
2349         https://bugs.webkit.org/show_bug.cgi?id=125646
2350
2351         Reviewed by David Kilzer.
2352
2353         * WebCore.exp.in: Added symbol __ZN7WebCore8Settings17setLayoutIntervalEi and removed symbol
2354         __ZN7WebCore24cLayoutScheduleThresholdE.
2355         * dom/ActiveDOMObject.h: Add suspension reason DocumentWillBePaused.
2356         * dom/DOMImplementation.cpp:
2357         (WebCore::DOMImplementation::createDocument): Opt-out of ENABLE(VIDEO) logic when
2358         building for iOS.
2359         * dom/DeviceMotionClient.h: Made class non-copyable.
2360         (WebCore::DeviceMotionClient::DeviceMotionClient): Added;
2361         * dom/DeviceMotionController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences.
2362         (WebCore::DeviceMotionController::suspendUpdates): Added; guarded by PLATFORM(IOS).
2363         (WebCore::DeviceMotionController::resumeUpdates): Added; guarded by PLATFORM(IOS).
2364         * dom/DeviceMotionController.h: Added FIXME comment to reconcile iOS and OpenSource differences.
2365         * dom/DeviceOrientationClient.h: Made class non-copyable.
2366         (WebCore::DeviceOrientationClient::DeviceOrientationClient): Added.
2367         * dom/DeviceOrientationController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences.
2368         (WebCore::DeviceOrientationController::DeviceOrientationController):
2369         (WebCore::DeviceOrientationController::suspendUpdates): Added; guarded by PLATFORM(IOS).
2370         (WebCore::DeviceOrientationController::resumeUpdates): Added; guarded by PLATFORM(IOS).
2371         * dom/DeviceOrientationController.h: Added FIXME comment to reconcile iOS and OpenSource differences.
2372         * dom/DeviceOrientationData.cpp:
2373         (WebCore::DeviceOrientationData::create): Added; iOS-specific. Added FIXME comment.
2374         (WebCore::DeviceOrientationData::DeviceOrientationData): Added iOS-specific code.
2375         (WebCore::DeviceOrientationData::compassHeading): Added; guarded by PLATFORM(IOS).
2376         (WebCore::DeviceOrientationData::compassAccuracy): Added; guarded by PLATFORM(IOS).
2377         (WebCore::DeviceOrientationData::canProvideCompassHeading): Added; guarded by PLATFORM(IOS).
2378         (WebCore::DeviceOrientationData::canProvideCompassAccuracy): Added; guarded by PLATFORM(IOS).
2379         * dom/DeviceOrientationData.h:
2380         * dom/DeviceOrientationEvent.idl: Added iOS-specific code.
2381         * dom/Document.cpp: Moved constant cLayoutScheduleThreshold to Settings.cpp and renamed it
2382         layoutScheduleThreshold towards allowing a port to configure the layout interval.
2383         (WebCore::Document::Document): Added optional argument isSynthesized, defaults false.
2384         (WebCore::Document::~Document): Added iOS-specific code to destroy the device motion
2385         and device orientation controllers.
2386         (WebCore::Document::didBecomeCurrentDocumentInFrame): Added iOS-specific code with FIXME comment.
2387         (WebCore::Document::prepareForDestruction): Added iOS-specific touch event code.
2388         (WebCore::Document::removeAllEventListeners): Ditto.
2389         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added; compiles to an empty function on
2390         non-iOS port.
2391         (WebCore::Document::suspendActiveDOMObjects): Modified to call platformSuspendOrStopActiveDOMObjects().
2392         (WebCore::Document::resumeActiveDOMObjects): Ditto.
2393         (WebCore::Document::stopActiveDOMObjects): Added.
2394         (WebCore::Document::implicitClose): Modified to query Settings::layoutInterval().
2395         (WebCore::Document::minimumLayoutDelay): Ditto.
2396         (WebCore::Document::processViewport): Added iOS-specific code.
2397         (WebCore::Document::updateViewportArguments): Ditto.
2398         (WebCore::setParserFeature): Added; guarded by PLATFORM(IOS).
2399         (WebCore::Document::processFormatDetection): Added; guarded by PLATFORM(IOS).
2400         (WebCore::Document::processWebAppOrientations): Added; guarded by PLATFORM(IOS).
2401         (WebCore::Document::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
2402         (WebCore::Document::setIsTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS).
2403         (WebCore::Document::isTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS).
2404         (WebCore::Document::initSecurityContext): Added iOS-specific code.
2405         (WebCore::Document::suspendScheduledTasks): Added; guarded by PLATFORM(IOS).
2406         (WebCore::Document::deviceMotionController): Added; iOS-specific.
2407         (WebCore::Document::deviceOrientationController): Added; iOS-specific.
2408         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code.
2409         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code.
2410         * dom/Document.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS).
2411         (WebCore::Document::isSynthesized): Added.
2412         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added.
2413         * dom/Document.idl:
2414         * dom/DocumentMarker.h: Added iOS-specific changes. We should look to reconcile the differences between
2415         iOS and OpenSource. See <rdar://problem/11306422>.
2416         (WebCore::DocumentMarker::AllMarkers::AllMarkers):
2417         (WebCore::DocumentMarker::DocumentMarker): Added; iOS-specific.
2418         (WebCore::DocumentMarker::alternatives): Added; iOS-specific.
2419         (WebCore::DocumentMarker::setAlternative): Added; iOS-specific.
2420         (WebCore::DocumentMarker::metadata): Added; iOS-specific.
2421         (WebCore::DocumentMarker::setMetadata): Added; iOS-specific.
2422         * dom/DocumentMarkerController.cpp:
2423         (WebCore::DocumentMarkerController::addMarker):
2424         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
2425         (WebCore::DocumentMarkerController::addDictationResultMarker):
2426         (WebCore::DocumentMarkerController::shiftMarkers):
2427         * dom/DocumentMarkerController.h:
2428         * dom/Element.cpp:
2429         (WebCore::Element::focus): Add iOS-specific workaround for <rdar://problem/6699741>.
2430         * dom/Element.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS).
2431         * dom/EventContext.cpp: Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port.
2432         * dom/EventContext.h: Ditto.
2433         * dom/EventDispatcher.cpp:
2434         (WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Ditto.
2435         (WebCore::EventDispatcher::dispatchEvent): Ditto.
2436         (WebCore::EventPath::EventPath): Ditto.
2437         * dom/EventNames.h: Added events webkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}
2438         and gesture{change, end, start}.
2439         * dom/EventNames.in: Added event names GestureEvent and WebKitPlaybackTargetAvailabilityEvent conditioned on
2440         the macro defines ENABLE_IOS_GESTURE_EVENTS and ENABLE_IOS_AIRPLAY.
2441         * dom/MouseRelatedEvent.cpp:
2442         (WebCore::contentsScrollOffset): Added iOS-specific code.
2443         (WebCore::MouseRelatedEvent::MouseRelatedEvent): Ditto.
2444         * dom/Node.cpp:
2445         (WebCore::Node::willBeDeletedFrom): Ditto.
2446         (WebCore::Node::isDescendantOf): Fixed style issue in function prototype; moved '*' to the left side.
2447         (WebCore::Node::isDescendantOrShadowDescendantOf): Added.
2448         (WebCore::tryAddEventListener): Added iOS-specific code; also added FIXME comment.
2449         (WebCore::tryRemoveEventListener): Ditto.
2450         (WebCore::Node::dispatchEvent): Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port.
2451         (WebCore::Node::defaultEventHandler): Added iOS-specific code.
2452         (WebCore::Node::willRespondToMouseMoveEvents): Added iOS-specific code; also added FIXME comment.
2453         (WebCore::Node::willRespondToMouseClickEvents): Added iOS-specific code; also added FIXME comment.
2454         (WebCore::Node::willRespondToMouseWheelEvents): Added.
2455         * dom/Node.h:
2456         * dom/Position.h:
2457         (WebCore::operator<): Added.
2458         (WebCore::operator>): Added.
2459         (WebCore::operator>=): Added.
2460         (WebCore::operator<=): Added.
2461         * dom/Range.cpp:
2462         (WebCore::Range::create): Added iOS-specific code; also added FIXME comment.
2463         (WebCore::intervalsSufficientlyOverlap): Added; guarded by PLATFORM(IOS).
2464         (WebCore::printRects): Added; guarded by PLATFORM(IOS).
2465         (WebCore::adjustLineHeightOfSelectionRects): Added; guarded by PLATFORM(IOS).
2466         (WebCore::coalesceSelectionRects): Added; guarded by PLATFORM(IOS).
2467         (WebCore::Range::collectSelectionRects): Added; guarded by PLATFORM(IOS).
2468         * dom/Range.h:
2469         * dom/ScriptExecutionContext.cpp:
2470         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Added iOS-specific code.
2471         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Ditto.
2472         * dom/TreeScope.cpp:
2473         (WebCore::nodeFromPoint): Ditto.
2474         * dom/ViewportArguments.cpp:
2475         (WebCore::computeViewportAttributes): Ditto.
2476         (WebCore::setViewportFeature): Added iOS-specific code.
2477         (WebCore::finalizeViewportArguments): Added; iOS-specific.
2478         * dom/ViewportArguments.h:
2479         * dom/make_names.pl: Added support to find the path to gcc with respect to the environment
2480         variable SDKROOT.
2481         * html/HTMLMediaElement.cpp:
2482         (HTMLMediaElement::suspend):
2483         * page/Settings.cpp:
2484         (WebCore::Settings::Settings): Initialize setting m_layoutInterval to layoutScheduleThreshold.
2485         (WebCore::Settings::setLayoutInterval): Added.
2486         * page/Settings.h:
2487         (WebCore::Settings::layoutInterval): Added.
2488
2489 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
2490
2491         Attempt to fix the Windows build after r160672.
2492         
2493         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2494         (PlatformCALayerWin::PlatformCALayerWin):
2495         * platform/graphics/ca/win/PlatformCALayerWin.h:
2496
2497 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
2498
2499         Apply overhang shadow and linen to UI-side layers
2500         https://bugs.webkit.org/show_bug.cgi?id=125807
2501
2502         Reviewed by Tim Horton.
2503         
2504         With UI-side compositing, we need to apply the overhang shadow and linen
2505         background to layers in the UI process. Achieve this by setting a "custom
2506         appearance" flag on layers that need a shadow or linen background, and
2507         migrating this flag to the UI process. Static functions on ScrollbarThemeMac
2508         are exposed to do the actual setting.
2509
2510         * WebCore.exp.in: Export ScrollbarThemeMac and GraphicsLayerCA functions.
2511         * WebCore.xcodeproj/project.pbxproj: ScrollbarThemeMac.h and ScrollbarThemeComposite.h
2512         need to be Private.
2513         * platform/graphics/GraphicsLayer.cpp: Initialize m_customAppearance.
2514         (WebCore::GraphicsLayer::GraphicsLayer):
2515         * platform/graphics/GraphicsLayer.h: Getter/setter for CustomAppearance.
2516         (WebCore::GraphicsLayer::setCustomAppearance):
2517         (WebCore::GraphicsLayer::customAppearance):
2518         * platform/graphics/ca/GraphicsLayerCA.cpp: Update CustomAppearanceChanged as
2519         we do other properties.
2520         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2521         (WebCore::GraphicsLayerCA::updateCustomAppearance):
2522         (WebCore::GraphicsLayerCA::setCustomAppearance):
2523         * platform/graphics/ca/GraphicsLayerCA.h:
2524         * platform/graphics/ca/PlatformCALayer.h:
2525         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2526         * platform/graphics/ca/mac/PlatformCALayerMac.mm: When we have a custom
2527         appearance, use ScrollbarThemeMac functions to update the layer. Ensure
2528         that if the bounds change, we update the shadow (whose path depends on the bounds).
2529         (PlatformCALayerMac::PlatformCALayerMac):
2530         (PlatformCALayerMac::clone):
2531         (PlatformCALayerMac::setBounds):
2532         (PlatformCALayerMac::requiresCustomAppearanceUpdateOnBoundsChange):
2533         (PlatformCALayerMac::updateCustomAppearance):
2534         * platform/mac/ScrollbarThemeMac.h: Export some static functions.
2535         * platform/mac/ScrollbarThemeMac.mm: Change code to use static functions.
2536         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
2537         (WebCore::ScrollbarThemeMac::removeOverhangAreaBackground):
2538         (WebCore::ScrollbarThemeMac::setUpOverhangAreaShadow):
2539         (WebCore::ScrollbarThemeMac::removeOverhangAreaShadow):
2540         (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents):
2541         (WebCore::ScrollbarThemeMac::setUpContentShadowLayer):
2542         * rendering/RenderLayerCompositor.cpp:
2543         (WebCore::RenderLayerCompositor::updateRootLayerPosition): No need to call
2544         setUpContentShadowLayer() now when size changes; PlatformCALayer takes
2545         care of that.
2546         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Now set
2547         custom appearance via GraphicsLayer.
2548
2549 2013-12-16  Brent Fulgham  <bfulgham@apple.com>
2550
2551         [Win] Remove dead code after converstion to VS2013
2552         https://bugs.webkit.org/show_bug.cgi?id=125795
2553
2554         Reviewed by Darin Adler.
2555
2556         * WebCorePrefix.h: Remove VS2012 include kludge.
2557         * loader/FTPDirectoryParser.cpp: Remove gmtime workaround code.
2558         * page/DOMWindow.cpp: Remove older pointer-based open implementation.
2559         * page/DOMWindow.h: Ditto
2560         * platform/text/TextEncodingRegistry.cpp:
2561         (WebCore::TextEncodingNameHash::equal): Remove optimization bug workaround
2562         * testing/Internals.cpp:
2563         (WebCore::Internals::openDummyInspectorFrontend): Remove compiler workaround
2564
2565 2013-12-16  Daniel Bates  <dabates@apple.com>
2566
2567         [iOS] Upstream WebCore/history changes
2568         https://bugs.webkit.org/show_bug.cgi?id=125769
2569
2570         Reviewed by Darin Adler.
2571
2572         * history/BackForwardClient.h:
2573         * history/BackForwardList.cpp:
2574         (WebCore::BackForwardList::current): Added; guard by PLATFORM(IOS). Also added FIXME comment.
2575         (WebCore::BackForwardList::setCurrent): Added; guard by PLATFORM(IOS). Also added FIXME comment.
2576         (WebCore::BackForwardList::clearAllPageCaches): Added; guarded by PLATFORM(IOS).
2577         * history/BackForwardList.h:
2578         * history/CachedFrame.cpp:
2579         (WebCore::CachedFrameBase::restore): Added iOS-specific code.
2580         (WebCore::CachedFrame::CachedFrame): Ditto.
2581         * history/CachedPage.cpp:
2582         (WebCore::CachedPage::restore): Ditto.
2583         * history/HistoryItem.cpp:
2584         (WebCore::HistoryItem::HistoryItem): Ditto.
2585         * history/HistoryItem.h:
2586         (WebCore::HistoryItem::scale): Added; guarded by PLATFORM(IOS).
2587         (WebCore::HistoryItem::scaleIsInitial): Added; guarded by PLATFORM(IOS).
2588         (WebCore::HistoryItem::setScale): Added; guarded by PLATFORM(IOS).
2589         (WebCore::HistoryItem::viewportArguments): Added; guarded by PLATFORM(IOS).
2590         (WebCore::HistoryItem::setViewportArguments): Added; guarded by PLATFORM(IOS).
2591         (WebCore::HistoryItem::bookmarkID): Added; guarded by PLATFORM(IOS).
2592         (WebCore::HistoryItem::setBookmarkID): Added; guarded by PLATFORM(IOS).
2593         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
2594         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
2595         * history/PageCache.cpp:
2596         (WebCore::logCanCacheFrameDecision): Added iOS-specific code.
2597         (WebCore::logCanCachePageDecision): Ditto.
2598         (WebCore::PageCache::canCachePageContainingThisFrame): Ditto.
2599         (WebCore::PageCache::canCache): Ditto.
2600         (WebCore::PageCache::pruneToCapacityNow): Added.
2601         * history/PageCache.h:
2602
2603 2013-12-16  Daniel Bates  <dabates@apple.com>
2604
2605         [iOS] Upstream WebCore/svg changes
2606         https://bugs.webkit.org/show_bug.cgi?id=125784
2607
2608         Reviewed by Darin Adler.
2609
2610         * svg/SVGAElement.cpp:
2611         (WebCore::SVGAElement::willRespondToMouseClickEvents): Added.
2612         * svg/SVGAElement.h:
2613         * svg/SVGElement.cpp:
2614         (WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start},
2615         and gesture{change, end, start}.
2616
2617 2013-12-13  Jeffrey Pfau  <jpfau@apple.com>
2618
2619         [Mac] Cache partitioning asserts when associated NSURLRequest is nil
2620         https://bugs.webkit.org/show_bug.cgi?id=125716
2621
2622         Reviewed by Darin Adler.
2623
2624         * platform/network/mac/ResourceRequestMac.mm:
2625         (WebCore::ResourceRequest::doUpdateResourceRequest):
2626
2627 2013-12-16  Brady Eidson  <beidson@apple.com>
2628
2629         DatabaseProcess: Fix a few bugs with opening an IDB connection
2630         https://bugs.webkit.org/show_bug.cgi?id=125798
2631
2632         Reviewed by Alexey Proskuryakov.
2633
2634         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2635         (WebCore::IDBDatabaseBackend::processPendingCalls): As the comment says, we should only
2636           early return when there *are* pending delete calls. The logic here was backwards,
2637           preventing the backend from ever getting to processPendingOpenCalls().
2638
2639 2013-12-16  Alex Christensen  <achristensen@webkit.org>
2640
2641         Fixed Win64 build on VS2013.
2642         https://bugs.webkit.org/show_bug.cgi?id=125753
2643
2644         Reviewed by Brent Fulgham.
2645
2646         * WebCore.vcxproj/WebCore.vcxproj:
2647         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2648         Added correct PlatformToolset for 64-bit builds.
2649
2650 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
2651
2652         Package up some data about scrollability into a struct for use in the scrolling tree
2653         https://bugs.webkit.org/show_bug.cgi?id=125792
2654
2655         Reviewed by Beth Dakin.
2656
2657         Both scrolling state nodes and scrolling nodes share a set of parameters
2658         relating to scrollability and rubberbanding, so package them into a struct
2659         for re-use. Send the struct wholesale to the scrolling thread.
2660
2661         * page/scrolling/ScrollingCoordinator.h:
2662         (WebCore::ScrollableAreaParameters::ScrollableAreaParameters): New struct.
2663         (WebCore::ScrollableAreaParameters::operator==):
2664         * page/scrolling/ScrollingStateScrollingNode.cpp:
2665         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Reordering.
2666         (WebCore::ScrollingStateScrollingNode::setScrollOrigin): Moved.
2667         (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): Set the parameters all at once.
2668         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
2669         * page/scrolling/ScrollingStateScrollingNode.h: Getters access the struct. Reorder member variables.
2670         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2671         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2672         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2673         * page/scrolling/ScrollingTreeScrollingNode.h:
2674         (WebCore::ScrollingTreeScrollingNode::scrollOrigin):
2675         (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
2676         (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
2677         (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
2678         (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
2679         (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
2680         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2681         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Removed setScrollParametersForNode().
2682         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated): Set the params in this
2683         function. Reordering.
2684
2685 2013-12-16  Sam Weinig  <sam@webkit.org>
2686
2687         CTTE: Convert more of SVG to use references
2688         https://bugs.webkit.org/show_bug.cgi?id=125762
2689
2690         Reviewed by Darin Adler.
2691
2692         * rendering/svg/RenderSVGImage.cpp:
2693         (WebCore::RenderSVGImage::imageChanged):
2694         * rendering/svg/RenderSVGResource.cpp:
2695         (WebCore::removeFromCacheAndInvalidateDependencies):
2696         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
2697         * rendering/svg/RenderSVGResource.h:
2698         * rendering/svg/RenderSVGResourceClipper.cpp:
2699         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
2700         * rendering/svg/RenderSVGResourceClipper.h:
2701         * rendering/svg/RenderSVGResourceContainer.cpp:
2702         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
2703         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
2704         (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
2705         (WebCore::RenderSVGResourceContainer::removeClient):
2706         * rendering/svg/RenderSVGResourceContainer.h:
2707         * rendering/svg/RenderSVGResourceFilter.cpp:
2708         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
2709         (WebCore::RenderSVGResourceFilter::postApplyResource):
2710         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
2711         * rendering/svg/RenderSVGResourceFilter.h:
2712         * rendering/svg/RenderSVGResourceGradient.cpp:
2713         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
2714         * rendering/svg/RenderSVGResourceGradient.h:
2715         * rendering/svg/RenderSVGResourceMarker.cpp:
2716         (WebCore::RenderSVGResourceMarker::removeClientFromCache):
2717         * rendering/svg/RenderSVGResourceMarker.h:
2718         * rendering/svg/RenderSVGResourceMasker.cpp:
2719         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
2720         * rendering/svg/RenderSVGResourceMasker.h:
2721         * rendering/svg/RenderSVGResourcePattern.cpp:
2722         (WebCore::RenderSVGResourcePattern::removeClientFromCache):
2723         * rendering/svg/RenderSVGResourcePattern.h:
2724         * rendering/svg/RenderSVGResourceSolidColor.h:
2725         (WebCore::RenderSVGResourceSolidColor::removeClientFromCache):
2726         * rendering/svg/SVGRenderSupport.cpp:
2727         (WebCore::invalidateResourcesOfChildren):
2728         * rendering/svg/SVGResources.cpp:
2729         (WebCore::SVGResources::removeClientFromCache):
2730         * rendering/svg/SVGResources.h:
2731         * rendering/svg/SVGResourcesCache.cpp:
2732         (WebCore::SVGResourcesCache::clientLayoutChanged):
2733         (WebCore::SVGResourcesCache::clientStyleChanged):
2734         (WebCore::SVGResourcesCache::clientWasAddedToTree):
2735         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
2736         (WebCore::SVGResourcesCache::clientDestroyed):
2737         * svg/SVGAnimateMotionElement.cpp:
2738         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
2739         * svg/SVGCircleElement.cpp:
2740         (WebCore::SVGCircleElement::svgAttributeChanged):
2741         * svg/SVGEllipseElement.cpp:
2742         (WebCore::SVGEllipseElement::svgAttributeChanged):
2743         * svg/SVGFEImageElement.cpp:
2744         (WebCore::SVGFEImageElement::notifyFinished):
2745         * svg/SVGFELightElement.cpp:
2746         (WebCore::SVGFELightElement::childrenChanged):
2747         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2748         (WebCore::invalidateFilterPrimitiveParent):
2749         * svg/SVGFilterPrimitiveStandardAttributes.h:
2750         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
2751         (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged):
2752         * svg/SVGForeignObjectElement.cpp:
2753         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
2754         * svg/SVGGElement.cpp:
2755         (WebCore::SVGGElement::svgAttributeChanged):
2756         * svg/SVGGraphicsElement.cpp:
2757         (WebCore::SVGGraphicsElement::svgAttributeChanged):
2758         * svg/SVGImageElement.cpp:
2759         (WebCore::SVGImageElement::svgAttributeChanged):
2760         * svg/SVGLineElement.cpp:
2761         (WebCore::SVGLineElement::svgAttributeChanged):
2762         * svg/SVGPathElement.cpp:
2763         (WebCore::SVGPathElement::svgAttributeChanged):
2764         (WebCore::SVGPathElement::invalidateMPathDependencies):
2765         (WebCore::SVGPathElement::pathSegListChanged):
2766         * svg/SVGPolyElement.cpp:
2767         (WebCore::SVGPolyElement::svgAttributeChanged):
2768         * svg/SVGRectElement.cpp:
2769         (WebCore::SVGRectElement::svgAttributeChanged):
2770         * svg/SVGSVGElement.cpp:
2771         (WebCore::SVGSVGElement::svgAttributeChanged):
2772         (WebCore::SVGSVGElement::setupInitialView):
2773         * svg/SVGStopElement.cpp:
2774         (WebCore::SVGStopElement::svgAttributeChanged):
2775         * svg/SVGTRefElement.cpp:
2776         (WebCore::SVGTRefElement::svgAttributeChanged):
2777         * svg/SVGTextContentElement.cpp:
2778         (WebCore::SVGTextContentElement::svgAttributeChanged):
2779         * svg/SVGTextPathElement.cpp:
2780         (WebCore::SVGTextPathElement::svgAttributeChanged):
2781         * svg/SVGTextPositioningElement.cpp:
2782         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
2783         * svg/SVGUseElement.cpp:
2784         (WebCore::SVGUseElement::svgAttributeChanged):
2785
2786 2013-12-16  Hans Muller  <hmuller@adobe.com>
2787
2788         [CSS Shapes] Add support for the computing the included intervals for a BoxShape
2789         https://bugs.webkit.org/show_bug.cgi?id=124605
2790
2791         Reviewed by Andreas Kling.
2792
2793         Setting shape-inside to content-box now works.
2794
2795         Changed FloatRoundedRect::xInterceptsAtY() to include the bottom edge of
2796         the rectangle and to check for the special cases where any or all of the
2797         corner radii are empty.
2798
2799         Test: fast/shapes/shape-inside/shape-inside-content-box.html
2800
2801         * platform/graphics/FloatRoundedRect.cpp:
2802         (WebCore::FloatRoundedRect::xInterceptsAtY):
2803         * rendering/shapes/BoxShape.cpp:
2804         (WebCore::BoxShape::getIncludedIntervals): Replaced the stub implementation with logic that's similar to getExcludedIntervals().
2805         * rendering/shapes/ShapeInfo.cpp:
2806         (WebCore::::computedShape): Removed a meaningless assert.
2807         * rendering/shapes/ShapeInsideInfo.cpp:
2808         (WebCore::ShapeInsideInfo::isEnabledFor):
2809
2810 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
2811
2812         [ATK] Expose accessibility objects for more WAI-ARIA roles
2813         https://bugs.webkit.org/show_bug.cgi?id=125596
2814
2815         Reviewed by Chris Fleizach.
2816
2817         Exposed accessibility objects with the proper AtkRoles, some of
2818         them to be provided by the next stable release of ATK.
2819
2820         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2821         (atkRole):
2822
2823 2013-12-16  Eric Carlson  <eric.carlson@apple.com>
2824
2825         Fix QuickTime plug-in replacement scripting bugs
2826         https://bugs.webkit.org/show_bug.cgi?id=125717
2827
2828         Reviewed by Sam Weinig.
2829
2830         No new tests, existing test updated.
2831
2832         * Modules/plugins/QuickTimePluginReplacement.js:
2833         (Replacement): Change '' to "" to avoid "Empty character constant" warning when creating
2834             Derived Sources.
2835         (Replacement.prototype.createVideoElement): Handle qtsrc attribute. Remember base url.
2836         (Replacement.prototype.setURL): Resolve urls relative to base.
2837
2838 2013-12-15  Darin Adler  <darin@apple.com>
2839
2840         Catch callers who forget to use initializeStyle
2841         https://bugs.webkit.org/show_bug.cgi?id=125763
2842
2843         Reviewed by Andreas Kling.
2844
2845         A recent fix was because a caller used setStyle first rather than using
2846         initializeStyle. This patch adds an assertion to catch cases where we do
2847         that so we see the mistake right away instead of indirectly later.
2848
2849         * rendering/RenderElement.cpp:
2850         (WebCore::RenderElement::initializeStyle): Simplified an assertion.
2851         (WebCore::RenderElement::setStyle): Added an assertion that m_hasInitializedStyle
2852         is true, with an exception for RenderView, which needs to be created before we
2853         have the correct style computed for it (at least for now). Also broke out an
2854         assertion that was using &&, since we would prefer to know which clause failed,
2855         making separate assertions more useful than a combined assertion.
2856
2857 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
2858
2859         [ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM
2860         https://bugs.webkit.org/show_bug.cgi?id=125594
2861
2862         Reviewed by Chris Fleizach.
2863
2864         Exposed accessibility objects with checkmenuitem role with the
2865         proper AtkRole, to be provided by the next stable release of ATK.
2866
2867         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2868         (atkRole):
2869
2870 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
2871
2872         [ATK] Expose accessibility objects with ATK_ROLE_ARTICLE
2873         https://bugs.webkit.org/show_bug.cgi?id=125587
2874
2875         Reviewed by Chris Fleizach.
2876
2877         Exposed accessibility objects with article role with the proper
2878         AtkRole, to be provided by the next stable release of ATK.
2879
2880         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2881         (atkRole):
2882
2883 2013-11-27  Sergio Villar Senin  <svillar@igalia.com>
2884
2885         [CSS Grid Layout] Fix the preferred logical widths code to work with spanning grid items
2886         https://bugs.webkit.org/show_bug.cgi?id=123994
2887
2888         Reviewed by Andreas Kling.
2889
2890         From Blink r159189 by <jchaffraix@chromium.org>
2891
2892         There was no definition in the specs for the intrinsic / preferred
2893         logical widths on the grid element. The following was proposed to
2894         the WG and later accepted:
2895         - The sum of the grid tracks' UsedBreadth is the minimum logical width
2896         - The sum of the grid tracks' MaxBreadth is the maximum logical width
2897
2898         http://lists.w3.org/Archives/Public/www-style/2013Oct/0054.html
2899         for more information.
2900
2901         * rendering/RenderGrid.cpp:
2902         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2903         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
2904         (WebCore::RenderGrid::minContentForChild):
2905         (WebCore::RenderGrid::maxContentForChild):
2906         * rendering/RenderGrid.h:
2907
2908 2013-12-15  Frédéric Wang  <fred.wang@free.fr>
2909
2910         Add support for maction@toggle
2911         https://bugs.webkit.org/show_bug.cgi?id=120059
2912
2913         Reviewed by Chris Fleizach.
2914
2915         Test: mathml/presentation/maction-toggle.html
2916
2917         * mathml/MathMLSelectElement.cpp:
2918         (WebCore::MathMLSelectElement::getSelectedChildAndIndex):
2919         (WebCore::MathMLSelectElement::updateSelectedChild):
2920         (WebCore::MathMLSelectElement::defaultEventHandler):
2921         (WebCore::MathMLSelectElement::willRespondToMouseClickEvents):
2922         (WebCore::MathMLSelectElement::toggle):
2923         * mathml/MathMLSelectElement.h:
2924
2925 2013-12-15  Darin Adler  <darin@apple.com>
2926
2927         More nullptr in RenderElement
2928         https://bugs.webkit.org/show_bug.cgi?id=125764
2929
2930         Reviewed by Andreas Kling.
2931
2932         * rendering/RenderElement.cpp:
2933         (WebCore::RenderElement::uncachedFirstLineStyle):
2934         (WebCore::RenderElement::updateShapeImage):
2935         (WebCore::RenderElement::destroyLeftoverChildren):
2936         (WebCore::RenderElement::findNextLayer):
2937         Use nullptr in a few more places.
2938
2939 2013-12-15  Ryosuke Niwa  <rniwa@webkit.org>
2940
2941         REGRESSION: 2x regression on Dromaeo DOM query tests
2942         https://bugs.webkit.org/show_bug.cgi?id=125377
2943
2944         Reviewed by Filip Pizlo.
2945
2946         The bug was caused by JSC not JIT'ing property accesses on document because of its having
2947         custom named getter (named properties).  This resulted in resolution of methods on document
2948         such as getElementById to happen inside the interpreter.
2949
2950         Fixed the bug by using the new JSC type info flag which tells JSC to JIT property access on
2951         document, and then notifying JSC whenever a new named property appeared on document.
2952
2953         Tests: js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
2954                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
2955                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
2956                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
2957                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
2958                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
2959
2960         * bindings/js/JSDOMBinding.cpp:
2961         (WebCore::addImpureProperty): Wraps VM::addImpureProperty.
2962         * bindings/js/JSDOMBinding.h:
2963         * bindings/scripts/CodeGeneratorJS.pm:
2964         (GenerateHeader): Added the support for NewImpurePropertyFiresWatchpoints.
2965         * bindings/scripts/IDLAttributes.txt: Ditto.
2966         * html/HTMLDocument.cpp:
2967         (WebCore::HTMLDocument::addDocumentNamedItem): Calls addImpureProperty.
2968         * html/HTMLDocument.idl: Added NewImpurePropertyFiresWatchpoints.
2969
2970 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
2971
2972         [WIn] Unreviewed build fix after r160599
2973
2974         * rendering/RenderMediaControls.cpp:
2975         (WebCore::determineState): RenderObject::theme now returns
2976         a reference.
2977
2978 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
2979
2980         [Win] Unreviewed build fix
2981
2982         The build system continues to attempt to build QTMovieWin, even
2983         though it is excluded from the build solution. I'm actually
2984         removing the project files to prevent this.
2985
2986         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Removed.
2987         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Removed.
2988
2989 2013-12-15  Rob Buis  <rob.buis@samsung.com>
2990
2991         [CSS Shapes] shape-outside animation does not handle 'auto' well
2992         https://bugs.webkit.org/show_bug.cgi?id=125700
2993
2994         Reviewed by Dirk Schulze.
2995
2996         Handle the case where we are blending/animating with a null ShapeValue due to 'auto'.
2997
2998         Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this.
2999
3000         * page/animation/CSSPropertyAnimation.cpp:
3001         (WebCore::blendFunc):
3002
3003 2013-12-15  Andy Estes  <aestes@apple.com>
3004
3005         [iOS] Upstream changes to FeatureDefines.xcconfig
3006         https://bugs.webkit.org/show_bug.cgi?id=125742
3007
3008         Reviewed by Dan Bernstein.
3009
3010         * Configurations/FeatureDefines.xcconfig:
3011
3012 2013-12-14  Darin Adler  <darin@apple.com>
3013
3014         Crash in CSSImageGeneratorValue and RenderScrollbar
3015         https://bugs.webkit.org/show_bug.cgi?id=125702
3016
3017         Reviewed by Alexey Proskuryakov.
3018
3019         This crash had two causes at two different levels. The crash fixes both.
3020
3021         At the RenderScrollbar level, we were setting up a new renderer, a
3022         RenderScrollbarPart, and never calling initializeStyle. This meant that
3023         we did not do proper style setup, which meant we did not end up calling
3024         CSSImageGeneratorValue::addClient and so had a removeClient that was not
3025         properly balanced by an addClient. This is the primary bug.
3026
3027         At the CSSImageGeneratorValue level, the addClient and removeClient
3028         functions were not properly handling possibly-mismatched calls. It was
3029         easy to fix the functions to work even if the calls are not perfectly
3030         matched up, which makes the consequences of a missed addClient call
3031         much less dire, no longer messing up reference counting. Fixing this
3032         mitigates the risk if we made this same mistake elsewhere, although I
3033         could not find any other places with some quick searches.
3034
3035         Test: fast/css/scrollbar-image-crash.html
3036
3037         * css/CSSImageGeneratorValue.cpp:
3038         (WebCore::CSSImageGeneratorValue::addClient): Only call ref if this will
3039         add the first client.
3040         (WebCore::CSSImageGeneratorValue::removeClient): Only call deref if this
3041         removes the last client. Also added an assertion that can fire if we call
3042         removeClient without first calling addClient, which is illegal. However,
3043         the function handles that case without over-deref'ing itself.
3044
3045         * rendering/RenderScrollbar.cpp:
3046         (WebCore::RenderScrollbar::updateScrollbarPart): Simplify the logic for
3047         needRenderer a bit. Use initializeStyle rather than setStyle when first
3048         creating the RenderScrollbarPart. Also use add and take properly so we
3049         don't do extra hash lookups the old code did with get/set and get/remove.
3050
3051 2013-12-14  Sam Weinig  <sam@webkit.org>
3052
3053         CTTE: SVGResourcesCache::cachedResourcesForRenderObject() should take a reference
3054         https://bugs.webkit.org/show_bug.cgi?id=125743
3055
3056         Reviewed by Dan Bernstein.
3057
3058         * rendering/svg/RenderSVGContainer.cpp:
3059         (WebCore::RenderSVGContainer::selfWillPaint):
3060         * rendering/svg/RenderSVGImage.cpp:
3061         (WebCore::RenderSVGImage::imageChanged):
3062         * rendering/svg/RenderSVGResource.cpp:
3063         (WebCore::requestPaintingResource):
3064         (WebCore::removeFromCacheAndInvalidateDependencies):
3065         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
3066         * rendering/svg/RenderSVGResourceClipper.cpp:
3067         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3068         * rendering/svg/RenderSVGRoot.cpp:
3069         (WebCore::RenderSVGRoot::paintReplaced):
3070         * rendering/svg/RenderSVGShape.cpp:
3071         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
3072         (WebCore::RenderSVGShape::markerRect):
3073         (WebCore::RenderSVGShape::drawMarkers):
3074         * rendering/svg/SVGRenderSupport.cpp:
3075         (WebCore::invalidateResourcesOfChildren):
3076         (WebCore::SVGRenderSupport::layoutChildren):
3077         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
3078         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
3079         (WebCore::SVGRenderSupport::pointInClippingArea):
3080         * rendering/svg/SVGRenderingContext.cpp:
3081         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3082         * rendering/svg/SVGResourcesCache.cpp:
3083         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
3084         (WebCore::SVGResourcesCache::clientLayoutChanged):
3085         (WebCore::SVGResourcesCache::clientDestroyed):
3086         * rendering/svg/SVGResourcesCache.h:
3087         * rendering/svg/SVGResourcesCycleSolver.cpp:
3088         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
3089
3090 2013-12-14  Dan Bernstein  <mitz@apple.com>
3091
3092         Clean up the project after r160487
3093
3094         * WebCore.xcodeproj/project.pbxproj: Moved reference to Security.framework from the top
3095         level of the project to the Frameworks group, and made it SDK-relative.
3096
3097 2013-12-14  Andreas Kling  <akling@apple.com>
3098
3099         Page::theme() should return a reference.
3100         <https://webkit.org/b/125737>
3101
3102         There's always a RenderTheme, and not a single call site was checking
3103         for null pointers anyway. Updated RenderObject::theme() as well.
3104
3105         Reviewed by Antti Koivisto.
3106
3107 2013-12-13  Sam Weinig  <sam@webkit.org>
3108
3109         CTTE: Convert Element and RenderObject iterator usage to use range-based for loops
3110         https://bugs.webkit.org/show_bug.cgi?id=125731
3111
3112         Reviewed by Andreas Kling.
3113
3114         Perform straight forward conversions. A few stragglers that do odd things remain.
3115
3116 2013-12-14  Joseph Pecoraro  <pecoraro@apple.com>
3117
3118         Small string improvements to JSInjectedScriptHost::type and other bindings
3119         https://bugs.webkit.org/show_bug.cgi?id=125722
3120
3121         Reviewed by Timothy Hatcher.
3122
3123         * bindings/js/JSInjectedScriptHostCustom.cpp:
3124         (WebCore::JSInjectedScriptHost::type):
3125         Use SmallStrings, jsNontrivialString and ASCIILiteral.
3126
3127         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
3128         (WebCore::JSJavaScriptCallFrame::type):
3129         Use jsNontrivialString.
3130
3131         * bridge/c/c_instance.cpp:
3132         (JSC::Bindings::CInstance::stringValue):
3133         Use jsNontrivialString and ASCIILiteral.
3134
3135 2013-12-14  Andreas Kling  <akling@apple.com>
3136
3137         Move a couple of inlines from RenderObject to RenderElement.
3138         <https://webkit.org/b/125734>
3139
3140         Take most of the inline functions on RenderObject that call style()
3141         and move them over to RenderElement where style() is branchless.
3142
3143         Reviewed by Antti Koivisto.
3144
3145 2013-12-14  Andreas Kling  <akling@apple.com>
3146
3147         RenderElement::rendererForRootBackground() should return a reference.
3148         <https://webkit.org/b/125735>
3149
3150         This function always finds a renderer to return.
3151
3152         Reviewed by Antti Koivisto.
3153
3154 2013-12-14  Mark Rowe  <mrowe@apple.com>
3155
3156         Build fix after r160557.
3157
3158         * Configurations/WebCore.xcconfig: Find JavaScriptCore.framework below SDKROOT so that we'll pick
3159         up the built version in production builds rather than the system version.
3160
3161 2013-12-14  Brendan Long  <b.long@cablelabs.com>
3162
3163         [GStreamer] Use GMutexLocker instead of g_mutex_lock
3164         https://bugs.webkit.org/show_bug.cgi?id=125588
3165
3166         Reviewed by Philippe Normand.
3167
3168         No new tests because this is just code simplification.
3169
3170         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3171         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
3172         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
3173         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3174         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3175         (webkitVideoSinkTimeoutCallback):
3176         (webkitVideoSinkRender):
3177         (unlockBufferMutex):
3178         (webkitVideoSinkUnlockStop):
3179         (webkitVideoSinkStart):
3180
3181 2013-12-13  Andreas Kling  <akling@apple.com>
3182
3183         Move RenderObject::repaintAfterLayoutIfNeeded() to RenderElement.
3184         <https://webkit.org/b/125712>
3185
3186         This function is only ever called on RenderElements, so move it there.
3187         Removes some RenderObject::style() branchiness.
3188
3189         Reviewed by Darin Adler.
3190
3191 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
3192
3193         Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore
3194         https://bugs.webkit.org/show_bug.cgi?id=125707
3195
3196         Reviewed by Timothy Hatcher.
3197
3198           - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch
3199             which comes from InspectorJSTypeBuilders.
3200           - Remove domains that moved to JavaScriptCore.
3201
3202         No new tests, this only moves code around. There are no functional changes.
3203
3204         * CMakeLists.txt:
3205         * DerivedSources.make:
3206         * GNUmakefile.am:
3207         Add new files.
3208
3209         * inspector/ContentSearchUtils.cpp:
3210         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
3211         (WebCore::ContentSearchUtils::searchInTextByLines):
3212         * inspector/ContentSearchUtils.h:
3213         * inspector/InspectorAgent.cpp:
3214         * inspector/InspectorAgent.h:
3215         * inspector/InspectorDebuggerAgent.h:
3216         * inspector/InspectorPageAgent.cpp:
3217         (WebCore::InspectorPageAgent::searchInResource):
3218         * inspector/InspectorPageAgent.h:
3219         * inspector/protocol/Page.json:
3220         Update includes and type builder type names.
3221
3222         * inspector/InspectorDebuggerAgent.cpp:
3223         (WebCore::breakpointActionTypeForString):
3224         (WebCore::InspectorDebuggerAgent::searchInContent):
3225         * inspector/InspectorTimelineAgent.cpp:
3226         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
3227         Use the new getEnum function names.
3228
3229 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
3230
3231         [Win] Remove pre-VS2013 support code.
3232         https://bugs.webkit.org/show_bug.cgi?id=125693
3233
3234         Reviewed by Darin Adler.
3235
3236         * Modules/webdatabase/DatabaseTracker.cpp:
3237         (WebCore::DatabaseTracker::setQuota): Use C99 format arguments
3238         * loader/FTPDirectoryParser.cpp:
3239         (WebCore::parseOneFTPLine): Ditto
3240         * loader/icon/IconDatabase.cpp:
3241         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto 
3242         * platform/sql/SQLiteDatabase.cpp:
3243         (WebCore::SQLiteDatabase::setMaximumSize): Ditto
3244
3245 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
3246
3247         SVG bindings are improperly being generated with "fastGetAttribute"
3248         https://bugs.webkit.org/show_bug.cgi?id=125670
3249
3250         Reviewed by Darin Adler.
3251
3252         A bug was introduced in r152845 that improperly called the
3253         IsSVGAnimatedType using the $attribute hash, rather than the
3254         expected $attribute->signature->type.
3255
3256         * bindings/scripts/CodeGenerator.pm:
3257         (GetterExpression): Clean up attribute type confusion.
3258
3259 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
3260
3261         [Win] Unreviewed build fix after r160548
3262
3263         * WebCore.vcxproj/WebCore.vcxproj: Exclude MediaPlayerPrivateQuickTimeVisualContext from
3264         Windows build.
3265         * platform/graphics/MediaPlayer.cpp: Don't use QuickTime as the PlatformMediaEngine.
3266
3267 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
3268
3269         [GTK] Remove Warnings in building about duplicate INSPECTOR variables
3270         https://bugs.webkit.org/show_bug.cgi?id=125710
3271
3272         Reviewed by Tim Horton.
3273
3274         * GNUmakefile.am:
3275
3276 2013-12-13  Roger Fong  <roger_fong@apple.com>
3277
3278         [WebGL] Check for global variable precision mismatch between vertex and fragment shaders.
3279         https://bugs.webkit.org/show_bug.cgi?id=125546.
3280         <rdar://problem/15203364>
3281
3282         Reviewed by Brent Fulgham.
3283
3284         Covered Khronos conformances tests:
3285         webgl/1.0.2/glsl/misc/shader-with-global-variable-precision-mismatch.html
3286
3287         * html/canvas/WebGLRenderingContext.cpp:
3288         (WebCore::WebGLRenderingContext::linkProgram):
3289         * platform/graphics/GraphicsContext3D.h: Rename areProgramSymbolsValid since it currently only serves one purpose.
3290         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3291         (WebCore::GraphicsContext3D::precisionsMatch):
3292
3293 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
3294
3295         [Win] Unreviewed build fix after r160548
3296
3297         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are
3298         using the vs120_xp build target for Makefile-based projects.
3299
3300 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
3301
3302         Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
3303         https://bugs.webkit.org/show_bug.cgi?id=125595
3304
3305         Reviewed by Timothy Hatcher.
3306
3307           - CodeGeneration changed to output Frontend and Backend dispatchers
3308             in namespace Inspector. So update all the agent's appropriately.
3309           - Update Derived Sources code generation to use the Scripts that had
3310             moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
3311             directly, but others have to use the Scripts exported by JSC
3312             in JavaScriptCore's PrivateHeaders.
3313           - Add ForwardingHeaders for the files generated in JavaScriptCore.
3314           - Update the names of Inspector DerivedSources files, since they
3315             were renamed to InspectorWeb*.
3316
3317         No new tests, this only moves code around. There are no functional changes.
3318
3319         * CMakeLists.txt:
3320         * DerivedSources.make:
3321         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
3322         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
3323         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
3324         * GNUmakefile.am:
3325         * GNUmakefile.list.am:
3326         * WebCore.vcxproj/WebCore.vcxproj:
3327         * WebCore.vcxproj/WebCore.vcxproj.filters:
3328         * WebCore.vcxproj/build-generated-files.sh:
3329         * WebCore.xcodeproj/project.pbxproj:
3330         Remove files, rename files, update code generation.
3331
3332         * make-generated-sources.sh:
3333         Update this standalone developer script to fill in the new InspectorScripts variable.
3334
3335         * inspector/ConsoleMessage.h:
3336         * inspector/InjectedScriptHost.cpp:
3337         * inspector/InspectorAgent.cpp:
3338         * inspector/InspectorAgent.h:
3339         * inspector/InspectorApplicationCacheAgent.cpp:
3340         * inspector/InspectorApplicationCacheAgent.h:
3341         * inspector/InspectorCSSAgent.h:
3342         * inspector/InspectorCanvasAgent.cpp:
3343         * inspector/InspectorCanvasAgent.h:
3344         * inspector/InspectorConsoleAgent.cpp:
3345         * inspector/InspectorConsoleAgent.h:
3346         * inspector/InspectorController.cpp:
3347         * inspector/InspectorDOMAgent.cpp:
3348         * inspector/InspectorDOMAgent.h:
3349         * inspector/InspectorDOMDebuggerAgent.cpp:
3350         * inspector/InspectorDOMDebuggerAgent.h:
3351         * inspector/InspectorDOMStorageAgent.cpp:
3352         * inspector/InspectorDOMStorageAgent.h:
3353         * inspector/InspectorDatabaseAgent.cpp:
3354         * inspector/InspectorDatabaseAgent.h:
3355         * inspector/InspectorDatabaseResource.cpp:
3356         * inspector/InspectorDatabaseResource.h:
3357         * inspector/InspectorDebuggerAgent.cpp:
3358         * inspector/InspectorDebuggerAgent.h:
3359         * inspector/InspectorFrontendClientLocal.cpp:
3360         * inspector/InspectorHeapProfilerAgent.h:
3361         * inspector/InspectorIndexedDBAgent.cpp:
3362         * inspector/InspectorIndexedDBAgent.h:
3363         * inspector/InspectorInputAgent.h:
3364         * inspector/InspectorLayerTreeAgent.cpp:
3365         * inspector/InspectorLayerTreeAgent.h:
3366         * inspector/InspectorMemoryAgent.cpp:
3367         * inspector/InspectorMemoryAgent.h:
3368         * inspector/InspectorPageAgent.cpp:
3369         * inspector/InspectorPageAgent.h:
3370         * inspector/InspectorProfilerAgent.cpp:
3371         * inspector/InspectorProfilerAgent.h:
3372         * inspector/InspectorResourceAgent.cpp:
3373         * inspector/InspectorResourceAgent.h:
3374         * inspector/InspectorRuntimeAgent.h:
3375         * inspector/InspectorTimelineAgent.cpp:
3376         * inspector/InspectorTimelineAgent.h:
3377         * inspector/InspectorWorkerAgent.cpp:
3378         * inspector/InspectorWorkerAgent.h:
3379         * inspector/PageRuntimeAgent.h:
3380         * inspector/ScriptCallFrame.cpp:
3381         * inspector/WorkerInspectorController.cpp:
3382         * inspector/WorkerRuntimeAgent.h:
3383         Updates header names and class namespace changes.
3384
3385 2013-12-13  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3386
3387         Adding RTCPeerConnectionErrorCallback
3388         https://bugs.w