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