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