Add typesafe casts for ScrollingTreeNode classes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
2
3         Add typesafe casts for ScrollingTreeNode classes
4         https://bugs.webkit.org/show_bug.cgi?id=127597
5
6         Reviewed by Tim Horton.
7
8         Add a ScrollingNodeType member to ScrollingTreeNodes and
9         use it for type-safe casting.
10
11         * page/scrolling/ScrollingTreeNode.cpp:
12         (WebCore::ScrollingTreeNode::ScrollingTreeNode):
13         * page/scrolling/ScrollingTreeNode.h:
14         (WebCore::ScrollingTreeNode::nodeType):
15         (WebCore::ScrollingTreeNode::scrollingNodeID):
16         * page/scrolling/ScrollingTreeScrollingNode.cpp:
17         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
18         * page/scrolling/ScrollingTreeScrollingNode.h:
19         * page/scrolling/mac/ScrollingTreeFixedNode.h:
20         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
21         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
22         * page/scrolling/mac/ScrollingTreeStickyNode.h:
23         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
24         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
25
26 2014-01-24  Anders Carlsson  <andersca@apple.com>
27
28         Remove back/forward list related functions from Page
29         https://bugs.webkit.org/show_bug.cgi?id=127596
30
31         Reviewed by Andreas Kling.
32
33         * WebCore.exp.in:
34         * history/BackForwardController.cpp:
35         (WebCore::BackForwardController::canGoBackOrForward):
36         (WebCore::BackForwardController::goBackOrForward):
37         (WebCore::BackForwardController::goBack):
38         (WebCore::BackForwardController::goForward):
39         (WebCore::BackForwardController::count):
40         * page/EventHandler.cpp:
41         (WebCore::EventHandler::defaultBackspaceEventHandler):
42         * page/Page.cpp:
43         * page/Page.h:
44
45 2014-01-24  Antti Koivisto  <antti@apple.com>
46
47         Update style asynchronously after style sheet load
48         https://bugs.webkit.org/show_bug.cgi?id=127563
49
50         Reviewed by Andreas Kling.
51         
52         Since we don't attach synchronously we don't need to recalc style synchronously either.
53
54         * dom/Document.cpp:
55         (WebCore::Document::didRemoveAllPendingStylesheet):
56
57 2014-01-24  Zalan Bujtas  <zalan@apple.com>
58
59         Subpixel layout: Default style of input type=checkbox/radio (0.5ex) adds 1px extra margin on both left and right.
60         https://bugs.webkit.org/show_bug.cgi?id=125728
61
62         Reviewed by Simon Fraser.
63
64         Using the 0.5ex value to set checkbox/radio left and right margins is a long-standing
65         (khtml) behavior. While it indicates dynamic behavior, in order to get the margins changed,
66         the widget's font size needs to be set, which is rather rare for such input types.
67         It also results in odd layout, where the checkbox's indentation may seem to change randomly.
68
69         '<input style="font-size: 30px;" type="checkbox">foo' changes neither the checkbox
70         nor the text size, but it indents the line by about 15px.
71
72         Other browsers (FF, Opera with Presto) disagree and they set static margins values.
73         2px is the current default computed value.
74
75         * css/html.css:
76         (input[type="radio"], input[type="checkbox"]):
77
78 2014-01-24  Oliver Hunt  <oliver@apple.com>
79
80         Put functions need to take a base object and a this value, and perform type checks on |this|
81         https://bugs.webkit.org/show_bug.cgi?id=127594
82
83         Reviewed by Geoffrey Garen.
84
85         Update bindings generator to emit setters with correct type, and perform
86         type checks on |this|, instead of the baseObject.
87
88         Test: js/dom/dom-as-prototype-assignment-exception.html
89
90         * bindings/scripts/CodeGeneratorJS.pm:
91         (GenerateHeader):
92         (GenerateImplementation):
93         (GenerateHashTable):
94         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
95         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
96         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
97         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
98         * bindings/scripts/test/JS/JSTestException.cpp:
99         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
100         * bindings/scripts/test/JS/JSTestInterface.cpp:
101         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
102         (WebCore::setJSTestInterfaceImplementsStr2):
103         (WebCore::setJSTestInterfaceImplementsStr3):
104         (WebCore::setJSTestInterfaceImplementsNode):
105         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
106         (WebCore::setJSTestInterfaceSupplementalStr2):
107         (WebCore::setJSTestInterfaceSupplementalStr3):
108         (WebCore::setJSTestInterfaceSupplementalNode):
109         * bindings/scripts/test/JS/JSTestInterface.h:
110         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
111         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
112         * bindings/scripts/test/JS/JSTestNode.cpp:
113         * bindings/scripts/test/JS/JSTestObj.cpp:
114         (WebCore::setJSTestObjConstructorStaticStringAttr):
115         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
116         (WebCore::setJSTestObjEnumAttr):
117         (WebCore::setJSTestObjByteAttr):
118         (WebCore::setJSTestObjOctetAttr):
119         (WebCore::setJSTestObjShortAttr):
120         (WebCore::setJSTestObjUnsignedShortAttr):
121         (WebCore::setJSTestObjLongAttr):
122         (WebCore::setJSTestObjLongLongAttr):
123         (WebCore::setJSTestObjUnsignedLongLongAttr):
124         (WebCore::setJSTestObjStringAttr):
125         (WebCore::setJSTestObjTestObjAttr):
126         (WebCore::setJSTestObjXMLObjAttr):
127         (WebCore::setJSTestObjCreate):
128         (WebCore::setJSTestObjReflectedStringAttr):
129         (WebCore::setJSTestObjReflectedIntegralAttr):
130         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
131         (WebCore::setJSTestObjReflectedBooleanAttr):
132         (WebCore::setJSTestObjReflectedURLAttr):
133         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
134         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
135         (WebCore::setJSTestObjReflectedCustomURLAttr):
136         (WebCore::setJSTestObjTypedArrayAttr):
137         (WebCore::setJSTestObjAttrWithGetterException):
138         (WebCore::setJSTestObjAttrWithSetterException):
139         (WebCore::setJSTestObjStringAttrWithGetterException):
140         (WebCore::setJSTestObjStringAttrWithSetterException):
141         (WebCore::setJSTestObjCustomAttr):
142         (WebCore::setJSTestObjWithScriptStateAttribute):
143         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
144         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
145         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
146         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
147         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
148         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
149         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
150         (WebCore::setJSTestObjConditionalAttr1):
151         (WebCore::setJSTestObjConditionalAttr2):
152         (WebCore::setJSTestObjConditionalAttr3):
153         (WebCore::setJSTestObjConditionalAttr4Constructor):
154         (WebCore::setJSTestObjConditionalAttr5Constructor):
155         (WebCore::setJSTestObjConditionalAttr6Constructor):
156         (WebCore::setJSTestObjAnyAttribute):
157         (WebCore::setJSTestObjMutablePoint):
158         (WebCore::setJSTestObjImmutablePoint):
159         (WebCore::setJSTestObjStrawberry):
160         (WebCore::setJSTestObjStrictFloat):
161         (WebCore::setJSTestObjId):
162         (WebCore::setJSTestObjReplaceableAttribute):
163         (WebCore::setJSTestObjNullableLongSettableAttribute):
164         (WebCore::setJSTestObjNullableStringValue):
165         (WebCore::setJSTestObjAttributeWithReservedEnumType):
166         * bindings/scripts/test/JS/JSTestObj.h:
167         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
168         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
169         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
170         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
171         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
172         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
173         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
174         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
175         (WebCore::setJSTestTypedefsAttrWithGetterException):
176         (WebCore::setJSTestTypedefsAttrWithSetterException):
177         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
178         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
179         * bindings/scripts/test/JS/JSTestTypedefs.h:
180         * bindings/scripts/test/JS/JSattribute.cpp:
181         * bindings/scripts/test/JS/JSreadonly.cpp:
182
183 2014-01-24  Oliver Hunt  <oliver@apple.com>
184
185         Generic JSObject::put should handle static properties in the classinfo hierarchy
186         https://bugs.webkit.org/show_bug.cgi?id=127523
187
188         Reviewed by Geoffrey Garen.
189
190         Update the bindings generator to emit the flag indicating the presence
191         of setters, and remove the many (now unnecessary) put overrides.
192         Tested with run-jsc-benchmarks and shows neutral performance. A few of the
193         micro benchmarks actually get a significant performance increase which
194         is nice.
195
196         * bindings/js/JSDOMWindowCustom.cpp:
197         (WebCore::JSDOMWindow::put):
198             We still need a custom call to lookupPut here in order
199             to get the magic security semantics of the window object.
200         * bindings/scripts/CodeGeneratorJS.pm:
201         (hashTableAccessor):
202         (prototypeHashTableAccessor):
203         (constructorHashTableAccessor):
204         (GenerateImplementation):
205         (GenerateHashTable):
206         (GenerateConstructorHelperMethods):
207
208         * bindings/js/JSDOMWindowCustom.cpp:
209         (WebCore::JSDOMWindow::put):
210         * bindings/scripts/CodeGeneratorJS.pm:
211         (hashTableAccessor):
212         (prototypeHashTableAccessor):
213         (constructorHashTableAccessor):
214         (InstanceOverridesPutImplementation):
215         (InstanceOverridesPutDeclaration):
216         (GenerateHeader):
217         (GenerateImplementation):
218         (GenerateHashTable):
219         (GenerateConstructorHelperMethods):
220         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
221         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
222         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
223         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
224         * bindings/scripts/test/JS/JSTestException.cpp:
225         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
226         * bindings/scripts/test/JS/JSTestInterface.cpp:
227         (WebCore::JSTestInterface::put):
228         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
229         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
230         * bindings/scripts/test/JS/JSTestNode.cpp:
231         * bindings/scripts/test/JS/JSTestObj.cpp:
232         * bindings/scripts/test/JS/JSTestObj.h:
233         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
234         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
235         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
236         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
237         * bindings/scripts/test/JS/JSTestTypedefs.h:
238         * bindings/scripts/test/JS/JSattribute.cpp:
239         * bindings/scripts/test/JS/JSreadonly.cpp:
240         * html/canvas/WebGLRenderingContext.idl:
241           Remove bogus attribute, as it has never been in the spec and should not
242           have been added.
243
244 2014-01-24  Commit Queue  <commit-queue@webkit.org>
245
246         Unreviewed, rolling out r162713.
247         http://trac.webkit.org/changeset/162713
248         https://bugs.webkit.org/show_bug.cgi?id=127593
249
250         broke media/network-no-source-const-shadow (Requested by
251         thorton on #webkit).
252
253         * bindings/js/JSDOMWindowCustom.cpp:
254         (WebCore::JSDOMWindow::put):
255         * bindings/scripts/CodeGeneratorJS.pm:
256         (hashTableAccessor):
257         (prototypeHashTableAccessor):
258         (constructorHashTableAccessor):
259         (GenerateHeader):
260         (GenerateImplementation):
261         (GenerateHashTable):
262         (GenerateConstructorHelperMethods):
263         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
264         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
265         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
266         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
267         * bindings/scripts/test/JS/JSTestException.cpp:
268         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
269         * bindings/scripts/test/JS/JSTestInterface.cpp:
270         (WebCore::JSTestInterface::put):
271         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
272         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
273         * bindings/scripts/test/JS/JSTestNode.cpp:
274         * bindings/scripts/test/JS/JSTestObj.cpp:
275         (WebCore::JSTestObj::put):
276         * bindings/scripts/test/JS/JSTestObj.h:
277         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
278         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
279         (WebCore::JSTestSerializedScriptValueInterface::put):
280         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
281         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
282         (WebCore::JSTestTypedefs::put):
283         * bindings/scripts/test/JS/JSTestTypedefs.h:
284         * bindings/scripts/test/JS/JSattribute.cpp:
285         * bindings/scripts/test/JS/JSreadonly.cpp:
286         * html/canvas/WebGLRenderingContext.idl:
287
288 2014-01-24  Zalan Bujtas  <zalan@apple.com>
289
290         Replace LayoutUnit() calls to a more descriptive LayoutUnit::fromPixel(int).
291         https://bugs.webkit.org/show_bug.cgi?id=127580
292
293         Reviewed by Simon Fraser.
294
295         LayoutUnit(1) statement is ambiguous. While it is intended to set one (CSS) pixel, it
296         could be interpreted as 1 layout unit (1/64th of a CSS pixel atm).
297
298         No change in behavior.
299
300         * inspector/InspectorOverlay.cpp:
301         (WebCore::buildObjectForRegionHighlight):
302         * rendering/FloatingObjects.cpp:
303         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
304         * rendering/RenderBlock.cpp:
305         (WebCore::RenderBlock::layoutShapeInsideInfo):
306         * rendering/RenderBlockFlow.cpp:
307         (WebCore::RenderBlockFlow::collapseMargins):
308         * rendering/RenderFlexibleBox.cpp:
309         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
310         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
311         (WebCore::RenderFlexibleBox::alignChildren):
312         * rendering/RenderMultiColumnFlowThread.cpp:
313         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
314         * rendering/RenderMultiColumnSet.cpp:
315         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
316         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
317
318 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
319
320         Prepare scrolling tree to handle > 1 scrolling node
321         https://bugs.webkit.org/show_bug.cgi?id=127590
322
323         Reviewed by Tim Horton.
324
325         Clean up the code path called after the ScrollingTree has scrolled a node,
326         to prepare for multiple scrolling nodes.
327         
328         Change "updateMainFrameScrollPosition" terminology to "updateScrollPositionAfterAsyncScroll",
329         and pass along the ScrollingNodeID that scrolled.
330         
331         Move updateMainFrameScrollPosition-related code from ScrollingCoordinator to
332         AsyncScrollingCoordinator, since this sync-up is only necessary when doing
333         async scrolling.
334
335         * WebCore.exp.in:
336         * page/scrolling/AsyncScrollingCoordinator.cpp:
337         (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
338         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
339         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
340         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
341         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
342         * page/scrolling/AsyncScrollingCoordinator.h:
343         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
344         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::matchesUpdateType):
345         Package up the data related to a scheduled scroll into a ScheduledScrollUpdate struct,
346         for easier comparison and cleaner code.
347         * page/scrolling/ScrollingCoordinator.cpp:
348         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
349         * page/scrolling/ScrollingCoordinator.h:
350         * page/scrolling/ScrollingTree.h:
351         * page/scrolling/ThreadedScrollingTree.cpp:
352         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
353         * page/scrolling/ThreadedScrollingTree.h:
354         * page/scrolling/ios/ScrollingTreeIOS.cpp:
355         (WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
356         * page/scrolling/ios/ScrollingTreeIOS.h:
357         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
358         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
359         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
360         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
361
362 2014-01-24  Mark Lam  <mark.lam@apple.com>
363
364         ASSERT(!m_markedSpace.m_currentDelayedReleaseScope) reloading page in inspector.
365         <https://webkit.org/b/127582>
366
367         Reviewed by Mark Hahnenberg.
368
369         No new tests.
370
371         * bindings/js/ScriptController.cpp:
372         (WebCore::ScriptController::attachDebugger):
373         * bindings/js/WorkerScriptController.cpp:
374         (WebCore::WorkerScriptController::detachDebugger):
375         - Adding reasons for detaching a globalObject from the debugger.
376
377 2014-01-24  Zalan Bujtas  <zalan@apple.com>
378
379         Subpixel rendering: Make PaintInfo layout unit aware.
380         https://bugs.webkit.org/show_bug.cgi?id=127562
381
382         Reviewed by Simon Fraser.
383
384         Replace PaintInfo's IntRect with LayoutRect to be able to render to
385         subpixel positions.
386
387         No functional changes.
388
389         * platform/graphics/LayoutRect.h:
390         * rendering/PaintInfo.h:
391         (WebCore::PaintInfo::PaintInfo):
392         (WebCore::PaintInfo::applyTransform):
393         * rendering/RenderBlock.cpp:
394         (WebCore::RenderBlock::paint):
395         * rendering/RenderBoxModelObject.cpp:
396         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
397         * rendering/RenderLayer.cpp:
398         (WebCore::cornerRect):
399         (WebCore::RenderLayer::scrollCornerRect):
400         (WebCore::resizerCornerRect):
401         (WebCore::RenderLayer::scrollCornerAndResizerRect):
402         (WebCore::RenderLayer::horizontalScrollbarStart):
403         (WebCore::RenderLayer::drawPlatformResizerImage):
404         (WebCore::RenderLayer::paintResizer):
405         (WebCore::RenderLayer::hitTestOverflowControls):
406         * rendering/RenderLayer.h:
407         * rendering/RenderLayerBacking.cpp:
408         (WebCore::RenderLayerBacking::paintContents):
409         * rendering/RenderListBox.cpp:
410         (WebCore::RenderListBox::paintScrollbar):
411         * rendering/RenderWidget.cpp:
412         (WebCore::RenderWidget::paintContents):
413         * rendering/mathml/RenderMathMLOperator.cpp:
414         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph):
415         * rendering/svg/SVGRenderingContext.h:
416
417 2014-01-24  Simon Fraser  <simon.fraser@apple.com>
418
419         #ifdef out handleWheelEventPhase for iOS
420         https://bugs.webkit.org/show_bug.cgi?id=127583
421
422         Reviewed by Tim Horton.
423
424         handleWheelEventPhase() doesn't make any sense for iOS, which
425         has no wheel events.
426
427         * page/scrolling/ScrollingTree.h:
428         * page/scrolling/ThreadedScrollingTree.cpp:
429         * page/scrolling/ThreadedScrollingTree.h:
430         * page/scrolling/ios/ScrollingTreeIOS.h:
431
432 2014-01-24  David Hyatt  <hyatt@apple.com>
433
434         [New Multicolumn] Don't destroy all the renderers when a multi-column block stops being multi-column (and vice versa)
435         https://bugs.webkit.org/show_bug.cgi?id=127584
436
437         Make the logic for when you need columns and when you don't shared between the
438         old multi-column code and the new multi-column code. Make sure that the flow thread
439         and sets get created lazily and destroyed on-demand when whether or not we should
440         have multiple columns changes.
441
442         Reviewed by Beth Dakin.
443
444         * rendering/RenderBlock.cpp:
445         (WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
446         No longer virtual. The new column code now uses this function too.
447
448         (WebCore::RenderBlock::availableLogicalWidth):
449         Renamed desiredColumnWidth() to computedColumnWidth().
450
451         (WebCore::RenderBlock::computeColumnCountAndWidth):
452         Renamed calcColumnWidth to computeColumnCountAndWidth.
453
454         (WebCore::RenderBlock::setComputedColumnCountAndWidth):
455         Rename setDesiredColumnCountAndWidth to computed.
456
457         (WebCore::RenderBlock::computedColumnWidth):
458         (WebCore::RenderBlock::computedColumnCount):
459         Renamed desiredColumnWidth/Count to computedColumnWidth/Count and made them virtual.
460
461         (WebCore::RenderBlock::updateFirstLetterStyle):
462         desired -> computed rename.
463
464         * rendering/RenderBlock.h:
465         Renames and made a few functions virtual so that RenderBlockFlow can override.
466
467         * rendering/RenderBlockFlow.cpp:
468         (WebCore::RenderBlockFlow::RenderBlockFlow):
469         Don't create the flow thread at construction time any longer.
470
471         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
472         (WebCore::RenderBlockFlow::destroyMultiColumnFlowThread):
473         The methods to create and destroy flow threads. These work at any time now and will
474         fix up the render tree accordingly.
475
476         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
477         Virtual override that creates/destroys the new multi-column information as needed.
478
479         (WebCore::RenderBlockFlow::computedColumnWidth):
480         (WebCore::RenderBlockFlow::computedColumnCount):
481         Overrides to return the cached column width and count from the flow thread.
482
483         * rendering/RenderBlockFlow.h:
484         Has overrides of the virtual functions needed to turn multi-column state on/off and
485         to hand back computed count/width information.
486
487         * rendering/RenderMultiColumnFlowThread.cpp:
488         * rendering/RenderMultiColumnFlowThread.h:
489         Removed the algorithm to compute column count and width, since this has been combined
490         with the old multi-column layout code.
491
492         * rendering/RenderView.cpp:
493         (WebCore::RenderView::computeColumnCountAndWidth):
494         Renamed desired -> computed.
495
496         * rendering/RenderView.h:
497         Renamed desired -> computed.
498
499         * style/StyleResolveTree.cpp:
500         (WebCore::Style::determineChange):
501         (WebCore::Style::resolveLocal):
502         (WebCore::Style::resolveTree):
503         * style/StyleResolveTree.h:
504         The Settings argument is no longer needed now that we don't destroy and re-create
505         the renderer for a block flow if it stops being (or becomes) multi-column.
506
507 2014-01-24  Anders Carlsson  <andersca@apple.com>
508
509         Fix 32-bit build.
510
511         * WebCore.exp.in:
512
513 2014-01-24  Brent Fulgham  <bfulgham@apple.com>
514
515         [Win] Convert some NMake files to MSBuild project files
516         https://bugs.webkit.org/show_bug.cgi?id=127579
517
518         Reviewed by Tim Horton.
519
520         * WebCore.vcxproj/WebCore.make: Removed.
521         * WebCore.vcxproj/WebCore.proj: Added.
522
523 2014-01-24  Joseph Pecoraro  <pecoraro@apple.com>
524
525         fast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
526         https://bugs.webkit.org/show_bug.cgi?id=127566
527
528         Reviewed by Oliver Hunt.
529
530         Covered by existing tests.
531
532         * testing/Internals.cpp:
533         (WebCore::Internals::closeDummyInspectorFrontend):
534         Now that we don't have to fake that this is a page being destroyed to
535         avoid recompilation. Use the InspectorDestroyed reason.
536
537 2014-01-24  Anders Carlsson  <andersca@apple.com>
538
539         Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
540         https://bugs.webkit.org/show_bug.cgi?id=127571
541
542         Reviewed by Antti Koivisto.
543
544         WebCore.exp.in:
545         Update symbols.
546
547         * dom/Document.cpp:
548         (WebCore::Document::Document):
549         (WebCore::Document::implicitClose):
550         (WebCore::Document::setParsing):
551         (WebCore::Document::isLayoutTimerActive):
552         (WebCore::Document::minimumLayoutDelay):
553         (WebCore::Document::elapsedTime):
554         (WebCore::Document::write):
555         (WebCore::Document::styleResolverChanged):
556         * dom/Document.h:
557         Use std::chrono instead of doubles for the times and durations.
558
559         * fileapi/FileReader.cpp:
560         (WebCore::FileReader::FileReader):
561         (WebCore::FileReader::didReceiveData):
562         * fileapi/FileReader.h:
563         Switch over to std::chrono.
564
565         * page/FrameView.cpp:
566         (WebCore::FrameView::layout):
567         (WebCore::FrameView::layoutTimerFired):
568         (WebCore::FrameView::scheduleRelayout):
569         (WebCore::FrameView::scheduleRelayoutOfSubtree):
570         Update for Document::elapsedTime() changes.
571
572         * page/Settings.cpp:
573         (WebCore::Settings::setLayoutInterval):
574         * page/Settings.h:
575         (WebCore::Settings::layoutInterval):
576         Change layoutInterval to be std::chrono::milliseconds instead of int.
577
578         * platform/Timer.h:
579         (WebCore::TimerBase::startOneShot):
580         Add an overload that takes std::chrono::milliseconds.
581
582 2014-01-24  Oliver Hunt  <oliver@apple.com>
583
584         Generic JSObject::put should handle static properties in the classinfo hierarchy
585         https://bugs.webkit.org/show_bug.cgi?id=127523
586
587         Reviewed by Geoffrey Garen.
588
589         Update the bindings generator to emit the flag indicating the presence
590         of setters, and remove the many (now unnecessary) put overrides.
591         Tested with run-jsc-benchmarks and shows neutral performance. A few of the
592         micro benchmarks actually get a significant performance increase which
593         is nice.
594
595         * bindings/js/JSDOMWindowCustom.cpp:
596         (WebCore::JSDOMWindow::put):
597             We still need a custom call to lookupPut here in order
598             to get the magic security semantics of the window object.
599         * bindings/scripts/CodeGeneratorJS.pm:
600         (hashTableAccessor):
601         (prototypeHashTableAccessor):
602         (constructorHashTableAccessor):
603         (GenerateImplementation):
604         (GenerateHashTable):
605         (GenerateConstructorHelperMethods):
606
607         * bindings/js/JSDOMWindowCustom.cpp:
608         (WebCore::JSDOMWindow::put):
609         * bindings/scripts/CodeGeneratorJS.pm:
610         (hashTableAccessor):
611         (prototypeHashTableAccessor):
612         (constructorHashTableAccessor):
613         (InstanceOverridesPutImplementation):
614         (InstanceOverridesPutDeclaration):
615         (GenerateHeader):
616         (GenerateImplementation):
617         (GenerateHashTable):
618         (GenerateConstructorHelperMethods):
619         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
620         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
621         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
622         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
623         * bindings/scripts/test/JS/JSTestException.cpp:
624         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
625         * bindings/scripts/test/JS/JSTestInterface.cpp:
626         (WebCore::JSTestInterface::put):
627         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
628         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
629         * bindings/scripts/test/JS/JSTestNode.cpp:
630         * bindings/scripts/test/JS/JSTestObj.cpp:
631         * bindings/scripts/test/JS/JSTestObj.h:
632         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
633         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
634         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
635         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
636         * bindings/scripts/test/JS/JSTestTypedefs.h:
637         * bindings/scripts/test/JS/JSattribute.cpp:
638         * bindings/scripts/test/JS/JSreadonly.cpp:
639         * html/canvas/WebGLRenderingContext.idl:
640           Remove bogus attribute, as it has never been in the spec and should not
641           have been added.
642
643 2014-01-24  David Hyatt  <hyatt@apple.com>
644
645         [New Multicolumn] Eliminate RenderMultiColumnBlock
646         https://bugs.webkit.org/show_bug.cgi?id=127565
647
648         Reviewed by Antti Koivisto.
649
650         This patch eliminates RenderMultiColumnBlock and folds all of its remaining code
651         back into RenderBlockFlow. This allows all block flows to support multi-column
652         layout, including table cells, list items, and the RenderView itself.
653
654         * CMakeLists.txt:
655         * WebCore.order:
656         * WebCore.vcxproj/WebCore.vcxproj:
657         * WebCore.vcxproj/WebCore.vcxproj.filters:
658         * WebCore.xcodeproj/project.pbxproj:
659         Remove RenderMultiColumnBlock from the makefiles.
660
661         * rendering/RenderBlock.cpp:
662         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
663         Tweak the comment, since it was no longer accurate.
664
665         * rendering/RenderBlock.h:
666         Move some functions down into RenderBlockFlow.
667
668         * rendering/RenderBlockFlow.cpp:
669         (WebCore::RenderBlockFlow::RenderBlockFlow):
670         (WebCore::RenderBlockFlow::createMultiColumnFlowThreadIfNeeded):
671         (WebCore::RenderBlockFlow::styleDidChange):
672         (WebCore::RenderBlockFlow::relayoutForPagination):
673         (WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
674         (WebCore::RenderBlockFlow::updateLogicalWidthAndColumnWidth):
675         (WebCore::RenderBlockFlow::addChild):
676         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
677          * rendering/RenderBlockFlow.h:
678          Move a bunch of functions from RenderMultiColumnBlock up into RenderBlockFlow.
679
680         * rendering/RenderBox.cpp:
681         (WebCore::RenderBox::isUnsplittableForPagination):
682         Calls isMultiColumnBlockFlow() now instead of testing for a specific renderer type.
683
684         * rendering/RenderElement.cpp:
685         (WebCore::RenderElement::createFor):
686         Remove the multicolumn block creation code, since we always make a block flow now.
687
688         * rendering/RenderMultiColumnBlock.cpp: Removed.
689         * rendering/RenderMultiColumnBlock.h: Removed.
690         Nuke the files.
691
692         * rendering/RenderMultiColumnFlowThread.cpp:
693         (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
694         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
695         * rendering/RenderMultiColumnSet.cpp:
696         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
697         (WebCore::RenderMultiColumnSet::addForcedBreak):
698         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
699         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
700         (WebCore::RenderMultiColumnSet::prepareForLayout):
701         (WebCore::RenderMultiColumnSet::columnGap):
702         (WebCore::RenderMultiColumnSet::paintColumnRules):
703         Change all of the functions in the multicolumnset and multicolumnflowthread classes
704         to cast the parent to a RenderBlockFlow now instead of a RenderMultiColumnBlock.
705         Change the code to call through to multiColumnFlowThread() for column-specific information
706         for that parent block.
707
708         * rendering/RenderObject.h:
709         (WebCore::RenderObject::isMultiColumnBlockFlow):
710         Remove isRenderMultiColumnBlock() and replace with isMultiColumnBlockFlow().
711
712         * rendering/RenderingAllInOne.cpp:
713         Remove RenderMultiColumnBlock include.
714         
715 2014-01-24  Brady Eidson  <beidson@apple.com>
716
717         IDB: support createIndex/deleteIndex messaging
718         https://bugs.webkit.org/show_bug.cgi?id=127546
719
720         Reviewed by Tim Horton.
721
722         * WebCore.exp.in: Export a needed CrossThreadCopier
723
724 2014-01-24  Daniel Bates  <dabates@apple.com>
725
726         Fix the Windows build after <http://trac.webkit.org/changeset/162704>
727         (https://bugs.webkit.org/show_bug.cgi?id=127293)
728
729         Only include TargetConditionals.h when building on a Darwin-based OS.
730         Also, check that TARGET_OS_IPHONE is defined before referencing its value
731         since it will be undefined when building on Windows.
732
733         * bindings/objc/PublicDOMInterfaces.h:
734
735 2014-01-24  Daniel Bates  <dabates@apple.com>
736
737         Bindings generation tests hit an error trying to include wtf/Platform.h after r161638
738         https://bugs.webkit.org/show_bug.cgi?id=127293
739
740         Reviewed by Alexey Proskuryakov.
741
742         Include TargetConditionals.h instead of wtf/Platform.h as the latter isn't available
743         in the public SDK.
744
745         As a side effect of this change, replace usage of PLATFORM(IOS) with TARGET_OS_IPHONE.
746
747         * bindings/objc/PublicDOMInterfaces.h:
748
749 2014-01-21  David Hyatt  <hyatt@apple.com>
750
751         [New Multicolumn] Table cells and list items need to work as multicolumn blocks.
752         https://bugs.webkit.org/show_bug.cgi?id=127365
753         
754         This patch is a first step towards eliminating RenderMultiColumnBlock and moving
755         all its functionality into RenderBlockFlow. Doing so will allow table cells, list
756         items and the RenderView to use the new multi-column layout.
757         
758         Reviewed by Simon Fraser.
759
760         * rendering/RenderBlockFlow.cpp:
761         (WebCore::RenderBlockFlow::setMultiColumnFlowThread):
762         * rendering/RenderBlockFlow.h:
763         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
764         (WebCore::RenderBlockFlow::multiColumnFlowThread):
765         Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
766         rare data. This lets us use only one pointer in the rare data to point to an object
767         that can hold all of the rest of the multi-column info.
768
769         * rendering/RenderMultiColumnBlock.cpp:
770         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
771         Move the construction of the flow thread to the constructor. This ensures we
772         never have a null flow thread and lets us avoid having to null check it for
773         empty multi-column blocks.
774
775         (WebCore::RenderMultiColumnBlock::columnHeightAvailable):
776         (WebCore::RenderMultiColumnBlock::columnWidth):
777         (WebCore::RenderMultiColumnBlock::columnCount):
778         (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
779         The above functions now call through to the multi-column flow thread for results.
780
781         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
782          Set the column height available on the flow thread.
783
784         (WebCore::RenderMultiColumnBlock::relayoutForPagination):
785         The balancing pass and guard is in the multi-column flow thread now.
786
787         (WebCore::RenderMultiColumnBlock::addChild):
788         Don't have to create the flow thread here any longer, since we do it up front
789         in the constructor of RenderMultiColumnBlock.
790
791         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
792         Don't need the null check of the flow thread any more.
793
794         * rendering/RenderMultiColumnBlock.h:
795         Change the inlined functions to not be inlined, since they need to call
796         RenderMultiColumnFlowThread functions now.
797
798         * rendering/RenderMultiColumnFlowThread.cpp:
799         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
800         Init the new member variables we moved here from RenderMultiColumnBlock.
801
802         (WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
803         Moved from RenderMultiColumnBlock.
804
805         * rendering/RenderMultiColumnFlowThread.h:
806         Add public getters/setters to the member variables so that RenderMultiColumnBlock can
807         still see them. Move the member variables here from RenderMultiColumnBlock.
808
809         * rendering/RenderMultiColumnSet.cpp:
810         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
811         (WebCore::RenderMultiColumnSet::prepareForLayout):
812         (WebCore::RenderMultiColumnSet::columnCount):
813         Call through to the flow thread instead.
814
815 2014-01-24  Zan Dobersek  <zdobersek@igalia.com>
816
817         Unreviewed GTK build fix after r162663.
818
819         * platform/gtk/ScrollViewGtk.cpp:
820         (WebCore::ScrollView::visibleContentRectInternal): Renamed from visibleContentRect.
821
822 2014-01-24  Zan Dobersek  <zdobersek@igalia.com>
823
824         Move HistoryItem to std::unique_ptr
825         https://bugs.webkit.org/show_bug.cgi?id=127275
826
827         Reviewed by Darin Adler.
828
829         Replace the uses of OwnPtr and PassOwnPtr in the HistoryItem class with std::unique_ptr.
830
831         * history/HistoryItem.cpp:
832         (WebCore::HistoryItem::HistoryItem):
833         (WebCore::HistoryItem::reset):
834         (WebCore::HistoryItem::addRedirectURL):
835         (WebCore::HistoryItem::setRedirectURLs):
836         * history/HistoryItem.h:
837         * history/mac/HistoryItemMac.mm:
838         (WebCore::HistoryItem::setTransientProperty):
839         WebCore.exp.in: Update the symbol.
840
841 2014-01-23  Morten Stenshorne  <mstensho@opera.com>
842
843         Region based multicol: unresolvable percent height results in 1px tall multicol
844         https://bugs.webkit.org/show_bug.cgi?id=122826
845
846         Reviewed by David Hyatt.
847
848         If a box has a percentage height, but the computed height of its
849         containing block is auto, the computed height of the box also becomes
850         auto. computeContentLogicalHeight() returns -1 if the height isn't
851         resolvable, and we need to make sure that such a value doesn't
852         constrain the height of the multicol container.
853
854         Tests: fast/multicol/newmulticol/unresolvable-percent-height-2.html
855                fast/multicol/newmulticol/unresolvable-percent-height.html
856                fast/multicol/newmulticol/unresolvable-percent-max-height-2.html
857                fast/multicol/newmulticol/unresolvable-percent-max-height.html
858
859         * rendering/RenderMultiColumnSet.cpp:
860         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
861         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
862         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
863         (WebCore::RenderMultiColumnSet::prepareForLayout):
864
865 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
866
867         Move ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCore for inspector
868         https://bugs.webkit.org/show_bug.cgi?id=127537
869
870         Reviewed by Timothy Hatcher.
871
872           - Rename ContentSearchUtils => ContentSearchUtilities and move to JavaScriptCore.
873           - Move ScriptBreakpoint and ScriptDebugListener to JavaScriptCore.
874           - Move them all to namespace Inspector.
875           - Update build files and users to the new names.
876
877         No change in functionality, just moving code.
878
879         * CMakeLists.txt:
880         * ForwardingHeaders/inspector/ContentSearchUtilities.h: Added.
881         * ForwardingHeaders/inspector/ScriptBreakpoint.h: Added.
882         * ForwardingHeaders/inspector/ScriptDebugListener.h: Added.
883         * GNUmakefile.list.am:
884         * WebCore.vcxproj/WebCore.vcxproj:
885         * WebCore.vcxproj/WebCore.vcxproj.filters:
886         * WebCore.xcodeproj/project.pbxproj:
887         * bindings/js/PageScriptDebugServer.cpp:
888         * bindings/js/PageScriptDebugServer.h:
889         * bindings/js/ScriptDebugServer.cpp:
890         * bindings/js/ScriptDebugServer.h:
891         * bindings/js/WorkerScriptDebugServer.cpp:
892         * bindings/js/WorkerScriptDebugServer.h:
893         * inspector/InspectorAllInOne.cpp:
894         * inspector/InspectorDebuggerAgent.cpp:
895         (WebCore::InspectorDebuggerAgent::searchInContent):
896         (WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
897         (WebCore::InspectorDebuggerAgent::didParseSource):
898         * inspector/InspectorDebuggerAgent.h:
899         * inspector/InspectorPageAgent.cpp:
900         (WebCore::InspectorPageAgent::sourceMapURLForResource):
901         (WebCore::InspectorPageAgent::searchInResource):
902         (WebCore::InspectorPageAgent::searchInResources):
903         * inspector/InspectorStyleSheet.cpp:
904         (WebCore::buildSourceRangeObject):
905         (WebCore::InspectorStyleSheet::lineEndings):
906         (WebCore::InspectorStyleSheetForInlineStyle::lineEndings):
907
908 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
909
910         Move RegularExpression into JavaScriptCore for inspector
911         https://bugs.webkit.org/show_bug.cgi?id=127526
912
913         Reviewed by Geoffrey Garen.
914
915         Update as appropriate for the moved file and namespace
916         change for class RegularExpression.
917
918         * CMakeLists.txt:
919         * ForwardingHeaders/yarr/RegularExpression.h: Added.
920         * GNUmakefile.list.am:
921         * WebCore.exp.in:
922         * WebCore.vcxproj/WebCore.vcxproj:
923         * WebCore.vcxproj/WebCore.vcxproj.filters:
924         * WebCore.xcodeproj/project.pbxproj:
925         * dom/DOMImplementation.h:
926         * html/BaseCheckableInputType.cpp:
927         * html/BaseTextInputType.cpp:
928         (WebCore::BaseTextInputType::patternMismatch):
929         * html/EmailInputType.cpp:
930         (WebCore::isValidEmailAddress):
931         * html/InputType.cpp:
932         * inspector/ContentSearchUtils.cpp:
933         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
934         (WebCore::ContentSearchUtils::createSearchRegex):
935         (WebCore::ContentSearchUtils::countRegularExpressionMatches):
936         (WebCore::ContentSearchUtils::searchInTextByLines):
937         * inspector/ContentSearchUtils.h:
938         * inspector/InspectorDebuggerAgent.cpp:
939         (WebCore::matches):
940         (WebCore::InspectorDebuggerAgent::breakpointActionLog):
941         (WebCore::InspectorDebuggerAgent::breakpointActionSound):
942         * inspector/InspectorDebuggerAgent.h:
943         * inspector/InspectorPageAgent.cpp:
944         (WebCore::InspectorPageAgent::searchInResources):
945         * inspector/InspectorPageAgent.h:
946         * inspector/InspectorRuntimeAgent.cpp:
947         * inspector/InspectorRuntimeAgent.h:
948         * inspector/InspectorStyleSheet.cpp:
949         (WebCore::selectorsFromSource):
950         * inspector/WorkerDebuggerAgent.cpp:
951         * page/Frame.cpp:
952         (WebCore::createRegExpForLabels):
953         (WebCore::Frame::searchForLabelsAboveCell):
954         (WebCore::Frame::searchForLabelsBeforeElement):
955         (WebCore::matchLabelsAgainstString):
956         * page/Frame.h:
957         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
958         (WebCore::GraphicsContext3D::getUnmangledInfoLog):
959
960 2014-01-23  Brady Eidson  <beidson@apple.com>
961
962         IDB: Support IDBObjectStore.clear()
963         https://bugs.webkit.org/show_bug.cgi?id=127541
964         
965         Reviewed by Anders Carlsson.
966
967         The backing store should never be performing callbacks directly:
968         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
969         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
970
971         Instead, the transaction operations should do that themselves:
972         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
973         (WebCore::ClearObjectStoreOperation::perform):
974         * Modules/indexeddb/IDBTransactionBackendOperations.h:
975         (WebCore::ClearObjectStoreOperation::transaction):
976
977 2014-01-23  Dan Bernstein  <mitz@apple.com>
978
979         <rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be reached) in CSSPreloadScanner::tokenize()
980         https://bugs.webkit.org/show_bug.cgi?id=127540
981
982         Reviewed by Anders Carlsson.
983
984         No new tests, because I could not reproduce the bug reliably and I don’t know how to trigger
985         it.
986
987         * html/parser/CSSPreloadScanner.cpp:
988         (WebCore::CSSPreloadScanner::scan): Check for the DoneParsingImportRules before tokenizing
989         a character, not after. This restores the logic from before r162257.
990
991 2014-01-23  Jer Noble  <jer.noble@apple.com>
992
993         [iOS] Protect against possbile deadlock by delaying video layer creation
994         https://bugs.webkit.org/show_bug.cgi?id=127505
995
996         Reviewed by Eric Carlson.
997
998         Work around a possible deadlock on iOS when creating a media element
999         backed by AVFoundation by delaying creation of the AVPlayerLayer.
1000         The deadlock can occur when the web thread is doing CALayer layout
1001         while taking the web thread lock, while CoreMedia is doing property
1002         access on an async thread while taking the CM lock, and each is waiting
1003         for the other's lock to be released.
1004
1005         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1006         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
1007
1008 2014-01-23  Jer Noble  <jer.noble@apple.com>
1009
1010         [MSE][Mac] Crash when reloading a page during playback
1011         https://bugs.webkit.org/show_bug.cgi?id=126903
1012
1013         Reviewed by Eric Carlson.
1014
1015         Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
1016         callback block even after being removed with -removeTimeObserver:, which is tracked by
1017         <rdar://problem/15798050>. Work around this problem by passing a WeakPtr into the block
1018         and bail early if the owning media player has been destroyed.
1019
1020         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1021         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
1022         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1023         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1024
1025 2014-01-23  ChangSeok Oh  <changseok.oh@collabora.com>
1026
1027         Dragging from inner side of video to outside causes a crash
1028         https://bugs.webkit.org/show_bug.cgi?id=126338
1029
1030         Reviewed by Jer Noble.
1031
1032         The crash happens while dragging mouse cursor through timeline control to outside
1033         of video region. This is beacause media controls are selected with the drag.
1034         The media controls disappear when mouse cursor goes outside of video though
1035         the dragging/selection proceeds. If once media controls are hidden, related element
1036         lose their renderers. However the drag is still under going. it requires shadowPseudoId
1037         of the selected controls. Untorntunately, SliderThumbElement/SliderContainerElement
1038         don't return a static value for the shadowPseudoId unlike other media controls,
1039         but they need a renderer to determine it. This is the reason of crash.
1040
1041         Test: media/media-controller-drag-crash.html
1042
1043         * html/shadow/SliderThumbElement.cpp:
1044         (WebCore::SliderThumbElement::shadowPseudoId):
1045         (WebCore::SliderContainerElement::shadowPseudoId):
1046
1047 2014-01-23  Brady Eidson  <beidson@apple.com>
1048
1049         IDB: Implement SQLite backing store 'get' support
1050         https://bugs.webkit.org/show_bug.cgi?id=127502
1051
1052         Reviewed by Tim Horton.
1053
1054         Get a KeyRange from a KeyRangeData:
1055         * Modules/indexeddb/IDBKeyRangeData.cpp:
1056         (WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
1057         * Modules/indexeddb/IDBKeyRangeData.h:
1058
1059         Add collation function support to SQLiteDatabase:
1060         * platform/sql/SQLiteDatabase.cpp:
1061         (WebCore::destroyCollationFunction):
1062         (WebCore::callCollationFunction):
1063         (WebCore::SQLiteDatabase::setCollationFunction):
1064         (WebCore::SQLiteDatabase::removeCollationFunction):
1065         * platform/sql/SQLiteDatabase.h:
1066
1067         * WebCore.exp.in:
1068
1069 2014-01-23  Jon Honeycutt  <jhoneycutt@apple.com>
1070
1071         Assertion failure in WebCore::PseudoElement::didRecalcStyle()
1072         <https://bugs.webkit.org/show_bug.cgi?id=126761>
1073         <rdar://problem/15793540>
1074
1075         Reviewed by Andy Estes.
1076
1077         Test: fast/images/animate-list-item-image-assertion.html
1078
1079         * dom/PseudoElement.cpp:
1080         (WebCore::PseudoElement::didRecalcStyle):
1081         Check isRenderImage() rather than isImage() before casting to
1082         RenderImage.
1083
1084         * editing/ios/EditorIOS.mm:
1085         (WebCore::getImage):
1086         Ditto.
1087
1088         * editing/mac/EditorMac.mm:
1089         (WebCore::getImage):
1090         Ditto.
1091
1092         * html/HTMLImageElement.cpp:
1093         (WebCore::HTMLImageElement::parseAttribute):
1094         (WebCore::HTMLImageElement::didAttachRenderers):
1095         Ditto.
1096
1097         * loader/ImageLoader.cpp:
1098         (WebCore::ImageLoader::renderImageResource):
1099         Ditto.
1100
1101         * page/DragController.cpp:
1102         (WebCore::getCachedImage):
1103         Ditto.
1104
1105         * rendering/RenderLayerBacking.cpp:
1106         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
1107         (WebCore::RenderLayerBacking::updateImageContents):
1108         Ditto.
1109
1110 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1111
1112         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
1113         https://bugs.webkit.org/show_bug.cgi?id=127409
1114
1115         Reviewed by Geoffrey Garen.
1116
1117         Covered by existing tests.
1118
1119         * bindings/js/ScriptDebugServer.h:
1120         * bindings/js/ScriptDebugServer.cpp:
1121         (WebCore::ScriptDebugServer::ScriptDebugServer):
1122         Remove m_recompileTimer and the recompile soon function.
1123         We can just recompile immediately in all existing cases.
1124
1125         * bindings/js/PageScriptDebugServer.h:
1126         * bindings/js/PageScriptDebugServer.cpp:
1127         (WebCore::PageScriptDebugServer::addListener):
1128         (WebCore::PageScriptDebugServer::removeListener):
1129         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1130         (WebCore::PageScriptDebugServer::didAddFirstListener):
1131         (WebCore::PageScriptDebugServer::didRemoveLastListener):
1132         Add a "didAddFirstListener" to match "didRemoveLastListener".
1133         Only recompile functions when we attach the debugger and when
1134         we detach the last listener.
1135
1136         * bindings/js/WorkerScriptDebugServer.cpp:
1137         (WebCore::WorkerScriptDebugServer::addListener):
1138         (WebCore::WorkerScriptDebugServer::removeListener):
1139         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1140         Same thing. Also rearrange the functions to read better.
1141
1142         * inspector/InspectorProfilerAgent.cpp:
1143         Use the direct recompile function instead of the removed "soon" version.
1144
1145         * WebCore.exp.in:
1146         Update disconnectFrontend symbol.
1147
1148         * page/PageDebuggable.cpp:
1149         (WebCore::PageDebuggable::disconnect):
1150         * testing/Internals.cpp:
1151         (WebCore::Internals::closeDummyInspectorFrontend):
1152         * workers/WorkerMessagingProxy.cpp:
1153         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
1154         Include an InspectorDisconnectReason when calling disconnectFrontend.
1155
1156         * inspector/InspectorDatabaseAgent.h:
1157         * inspector/InspectorDebuggerAgent.cpp:
1158         (WebCore::InspectorDebuggerAgent::disable):
1159         (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
1160         If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
1161
1162         * inspector/InspectorProfilerAgent.h:
1163         * inspector/InspectorProfilerAgent.cpp:
1164         (WebCore::InspectorProfilerAgent::enable):
1165         (WebCore::InspectorProfilerAgent::disable):
1166         (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
1167         If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
1168
1169         * inspector/InspectorController.h:
1170         * inspector/InspectorController.cpp:
1171         (WebCore::InspectorController::inspectedPageDestroyed):
1172         (WebCore::InspectorController::disconnectFrontend):
1173         (WebCore::InspectorController::close):
1174         Pass different reasons for the different disconnect reasons.
1175
1176         * inspector/WorkerInspectorController.h:
1177         * inspector/WorkerInspectorController.cpp:
1178         (WebCore::WorkerInspectorController::~WorkerInspectorController):
1179         (WebCore::WorkerInspectorController::disconnectFrontend):
1180         Pass different reasons for the different disconnect reasons.
1181
1182         * inspector/InspectorApplicationCacheAgent.cpp:
1183         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
1184         * inspector/InspectorApplicationCacheAgent.h:
1185         * inspector/InspectorCSSAgent.cpp:
1186         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
1187         * inspector/InspectorCSSAgent.h:
1188         * inspector/InspectorCanvasAgent.cpp:
1189         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
1190         * inspector/InspectorCanvasAgent.h:
1191         * inspector/InspectorConsoleAgent.cpp:
1192         (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
1193         * inspector/InspectorConsoleAgent.h:
1194         * inspector/InspectorDOMAgent.cpp:
1195         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
1196         * inspector/InspectorDOMAgent.h:
1197         * inspector/InspectorDOMDebuggerAgent.cpp:
1198         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
1199         * inspector/InspectorDOMDebuggerAgent.h:
1200         * inspector/InspectorDOMStorageAgent.cpp:
1201         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
1202         * inspector/InspectorDOMStorageAgent.h:
1203         * inspector/InspectorDatabaseAgent.cpp:
1204         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
1205         * inspector/InspectorDebuggerAgent.h:
1206         * inspector/InspectorHeapProfilerAgent.cpp:
1207         (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
1208         * inspector/InspectorHeapProfilerAgent.h:
1209         * inspector/InspectorIndexedDBAgent.cpp:
1210         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
1211         * inspector/InspectorIndexedDBAgent.h:
1212         * inspector/InspectorInputAgent.cpp:
1213         (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
1214         * inspector/InspectorInputAgent.h:
1215         * inspector/InspectorLayerTreeAgent.cpp:
1216         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
1217         * inspector/InspectorLayerTreeAgent.h:
1218         * inspector/InspectorMemoryAgent.cpp:
1219         (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
1220         * inspector/InspectorMemoryAgent.h:
1221         * inspector/InspectorPageAgent.cpp:
1222         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
1223         * inspector/InspectorPageAgent.h:
1224         * inspector/InspectorResourceAgent.cpp:
1225         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
1226         * inspector/InspectorResourceAgent.h:
1227         * inspector/InspectorTimelineAgent.cpp:
1228         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1229         * inspector/InspectorTimelineAgent.h:
1230         * inspector/InspectorWorkerAgent.cpp:
1231         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
1232         * inspector/InspectorWorkerAgent.h:
1233         * inspector/PageDebuggerAgent.cpp:
1234         (WebCore::PageDebuggerAgent::disable):
1235         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
1236         * inspector/PageDebuggerAgent.h:
1237         * inspector/PageRuntimeAgent.cpp:
1238         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
1239         * inspector/PageRuntimeAgent.h:
1240         * inspector/WorkerDebuggerAgent.cpp:
1241         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
1242         * inspector/WorkerDebuggerAgent.h:
1243         * inspector/WorkerRuntimeAgent.cpp:
1244         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
1245         * inspector/WorkerRuntimeAgent.h:
1246         Include InspectorDisconnectReason param.
1247
1248 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1249
1250         Another Windows fix: include <algorithm> for std::min and std::max.
1251         
1252         * platform/graphics/IntSize.h:
1253
1254 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1255
1256         Try to fix Windows build.
1257
1258         * platform/win/PopupMenuWin.cpp:
1259         (WebCore::PopupMenuWin::visibleSize):
1260         * platform/win/PopupMenuWin.h:
1261
1262 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
1263
1264         Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
1265         https://bugs.webkit.org/show_bug.cgi?id=127456
1266         
1267         Reviewed by Antti Koivisto.
1268         
1269         On iOS, visibleContentRect() returns the entire document rect for historical
1270         reasons, and actualVisibleContentRect() returns what visibleContentRect()
1271         returns on other platforms.
1272         
1273         In addition, actualVisibleContentRect() was returning an empty rect in WK2.
1274         
1275         Reduce the confusion of #ifdefs by making visibleContentRect() behave like
1276         actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
1277         an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
1278         
1279         Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
1280         which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
1281         
1282         Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
1283         with non-virtual visibleHeight() and visibleWidth().
1284         
1285         ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
1286         
1287         Mechanically change all the call sites of actualVisibleContentRect() to
1288         use visibleContentRect(), and the call sites of visibleContentRect()
1289         to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
1290         where this may not be appropriate.
1291         
1292         Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
1293         
1294         Also add actualScrollPosition(), and clean up some actualScroll* call sites.
1295         
1296         No behavior change.
1297
1298         * WebCore.exp.in:
1299         * accessibility/AccessibilityObject.cpp:
1300         (WebCore::AccessibilityObject::isOnscreen):
1301         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
1302         * accessibility/AccessibilityRenderObject.cpp:
1303         (WebCore::AccessibilityRenderObject::isOffScreen):
1304         * dom/Document.cpp:
1305         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
1306         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
1307         * dom/MouseRelatedEvent.cpp:
1308         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1309         * editing/Editor.cpp:
1310         (WebCore::Editor::countMatchesForText):
1311         * editing/FrameSelection.cpp:
1312         (WebCore::FrameSelection::bounds):
1313         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
1314         * html/HTMLBodyElement.cpp:
1315         (WebCore::HTMLBodyElement::scrollLeft):
1316         (WebCore::HTMLBodyElement::scrollTop):
1317         * html/ImageDocument.cpp:
1318         (WebCore::ImageDocument::imageFitsInWindow):
1319         (WebCore::ImageDocument::windowSizeChanged):
1320         * inspector/InspectorOverlay.cpp:
1321         (WebCore::InspectorOverlay::update):
1322         * page/DOMWindow.cpp:
1323         (WebCore::DOMWindow::innerHeight):
1324         (WebCore::DOMWindow::innerWidth):
1325         (WebCore::DOMWindow::scrollX):
1326         (WebCore::DOMWindow::scrollY):
1327         (WebCore::DOMWindow::scrollBy):
1328         * page/FrameView.cpp:
1329         (WebCore::FrameView::calculateScrollbarModesForLayout):
1330         (WebCore::FrameView::layout):
1331         (WebCore::FrameView::scrollContentsSlowPath):
1332         (WebCore::FrameView::repaintContentRectangle):
1333         (WebCore::FrameView::sendResizeEventIfNeeded):
1334         (WebCore::FrameView::windowClipRect):
1335         (WebCore::FrameView::isScrollable):
1336         (WebCore::FrameView::paintControlTints):
1337         * page/SpatialNavigation.cpp:
1338         (WebCore::canScrollInDirection):
1339         * platform/ScrollView.cpp:
1340         (WebCore::ScrollView::unscaledVisibleContentSize):
1341         (WebCore::ScrollView::visibleContentRectInternal):
1342         (WebCore::ScrollView::updateScrollbars):
1343         (WebCore::ScrollView::paint):
1344         * platform/ScrollView.h:
1345         (WebCore::ScrollView::scrollOffset):
1346         (WebCore::ScrollView::actualScrollX):
1347         (WebCore::ScrollView::actualScrollY):
1348         (WebCore::ScrollView::actualScrollPosition):
1349         * platform/ScrollableArea.cpp:
1350         (WebCore::ScrollableArea::visibleContentRect):
1351         (WebCore::ScrollableArea::visibleContentRectIncludingScrollbars):
1352         (WebCore::ScrollableArea::visibleContentRectInternal):
1353         * platform/ScrollableArea.h:
1354         (WebCore::ScrollableArea::visibleWidth):
1355         (WebCore::ScrollableArea::visibleHeight):
1356         * platform/graphics/IntSize.h:
1357         (WebCore::IntSize::expandedTo): Drive-by cleanup.
1358         (WebCore::IntSize::shrunkTo):
1359         * platform/gtk/ScrollViewGtk.cpp:
1360         (WebCore::ScrollView::visibleContentRect):
1361         * rendering/RenderLayer.cpp:
1362         (WebCore::RenderLayer::scrollRectToVisible):
1363         (WebCore::RenderLayer::maximumScrollPosition):
1364         (WebCore::RenderLayer::visibleContentRectInternal):
1365         (WebCore::RenderLayer::hitTest):
1366         * rendering/RenderLayer.h:
1367         * rendering/RenderLayerBacking.cpp:
1368         (WebCore::RenderLayerBacking::updateCompositedBounds):
1369         * rendering/RenderListBox.cpp:
1370         * rendering/RenderListBox.h:
1371         * rendering/RenderView.cpp:
1372         (WebCore::RenderView::viewRect):
1373         (WebCore::RenderView::viewportSize):
1374
1375 2014-01-20  Myles C. Maxfield  <mmaxfield@apple.com>
1376
1377        Turn text-decoration-skip: ink on for all underlines
1378        https://bugs.webkit.org/show_bug.cgi?id=127331
1379
1380        Reviewed by Antti Koivisto.
1381
1382        No new tests are necessary because tests already exist
1383
1384        * rendering/style/RenderStyle.h:
1385
1386 2014-01-23  Hans Muller  <hmuller@adobe.com>
1387
1388         [CSS Shapes] Image valued shape size and position should conform to the spec
1389         https://bugs.webkit.org/show_bug.cgi?id=123295
1390
1391         Reviewed by Andreas Kling.
1392
1393         Implement image valued shape-outside scaling and translation per the spec,
1394         http://dev.w3.org/csswg/css-shapes/#shapes-from-image:
1395
1396         "The image is sized and positioned as if it were a replaced element whose
1397         specified width and height are the same as the element’s used content box size."
1398
1399         This change doesn't completely fulfill the spec, it's limited to image elements
1400         and shape-outside.
1401
1402         Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-001.html
1403                fast/shapes/shape-outside-floats/shape-outside-image-fit-002.html
1404                fast/shapes/shape-outside-floats/shape-outside-image-fit-003.html
1405                fast/shapes/shape-outside-floats/shape-outside-image-fit-004.html
1406
1407         * rendering/shapes/Shape.h:
1408         * rendering/shapes/Shape.cpp:
1409         (WebCore::Shape::createRasterShape):
1410         Added an imageRect parameter which specifies where the shape image is to
1411         appear relative to the content box. The imageRect implies both scaling and
1412         translation of the shape image.
1413
1414         * rendering/shapes/ShapeInfo.cpp:
1415         (WebCore::ShapeInfo<RenderType>::computedShape):
1416         (WebCore::getShapeImageRect):
1417         For replaced elements, compute the shape's imageRect with
1418         RenderReplaced::replacedContentRect().
1419
1420
1421 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
1422
1423         Remove CSS Custom Filters code and tests
1424         https://bugs.webkit.org/show_bug.cgi?id=127382
1425
1426         Reviewed by Simon Fraser.
1427
1428         No new tests. Removing functionality.
1429
1430         * CMakeLists.txt:
1431         * Configurations/FeatureDefines.xcconfig:
1432         * DerivedSources.cpp:
1433         * DerivedSources.make:
1434         * GNUmakefile.list.am:
1435         * WebCore.order:
1436         * WebCore.vcxproj/WebCore.vcxproj:
1437         * WebCore.vcxproj/WebCore.vcxproj.filters:
1438         * WebCore.xcodeproj/project.pbxproj:
1439         * bindings/js/JSCSSRuleCustom.cpp:
1440         (WebCore::toJS):
1441         * bindings/js/JSCSSValueCustom.cpp:
1442         (WebCore::toJS):
1443         * bindings/objc/DOMCSS.mm:
1444         (kitClass):
1445         * css/CSSComputedStyleDeclaration.cpp:
1446         (WebCore::ComputedStyleExtractor::valueForFilter):
1447         (WebCore::ComputedStyleExtractor::propertyValue):
1448         * css/CSSComputedStyleDeclaration.h:
1449         * css/CSSGrammar.y.in:
1450         * css/CSSParser.cpp:
1451         (WebCore::CSSParserContext::CSSParserContext):
1452         (WebCore::operator==):
1453         (WebCore::CSSParser::CSSParser):
1454         (WebCore::CSSParser::parseValue):
1455         (WebCore::filterInfoForName):
1456         (WebCore::CSSParser::parseFilter):
1457         (WebCore::CSSParser::detectAtToken):
1458         * css/CSSParser.h:
1459         * css/CSSParserMode.h:
1460         * css/CSSPropertyNames.in:
1461         * css/CSSPropertySourceData.h:
1462         * css/CSSRule.h:
1463         * css/CSSRule.idl:
1464         * css/CSSValue.cpp:
1465         (WebCore::CSSValue::equals):
1466         (WebCore::CSSValue::cssText):
1467         (WebCore::CSSValue::destroy):
1468         (WebCore::CSSValue::cloneForCSSOM):
1469         * css/CSSValue.h:
1470         * css/CSSValueKeywords.in:
1471         * css/StyleResolver.cpp:
1472         (WebCore::StyleResolver::State::clear):
1473         (WebCore::StyleResolver::applyProperty):
1474         (WebCore::filterOperationForType):
1475         (WebCore::StyleResolver::createFilterOperations):
1476         (WebCore::StyleResolver::loadPendingResources):
1477         * css/StyleResolver.h:
1478         (WebCore::StyleResolver::State::State):
1479         * css/StyleRule.cpp:
1480         (WebCore::StyleRuleBase::destroy):
1481         (WebCore::StyleRuleBase::copy):
1482         (WebCore::StyleRuleBase::createCSSOMWrapper):
1483         * css/StyleRule.h:
1484         * css/StyleSheetContents.cpp:
1485         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1486         * css/WebKitCSSArrayFunctionValue.cpp: Removed.
1487         * css/WebKitCSSArrayFunctionValue.h: Removed.
1488         * css/WebKitCSSFilterRule.cpp: Removed.
1489         * css/WebKitCSSFilterRule.h: Removed.
1490         * css/WebKitCSSFilterRule.idl: Removed.
1491         * css/WebKitCSSFilterValue.cpp:
1492         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
1493         (WebCore::WebKitCSSFilterValue::customCSSText):
1494         * css/WebKitCSSFilterValue.h:
1495         * css/WebKitCSSFilterValue.idl:
1496         * css/WebKitCSSMatFunctionValue.cpp: Removed.
1497         * css/WebKitCSSMatFunctionValue.h: Removed.
1498         * css/WebKitCSSMixFunctionValue.cpp: Removed.
1499         * css/WebKitCSSMixFunctionValue.h: Removed.
1500         * css/WebKitCSSMixFunctionValue.idl: Removed.
1501         * css/WebKitCSSShaderValue.cpp: Removed.
1502         * css/WebKitCSSShaderValue.h: Removed.
1503         * loader/cache/CachedResource.cpp:
1504         (WebCore::defaultPriorityForResourceType):
1505         * loader/cache/CachedResource.h:
1506         * loader/cache/CachedResourceLoader.cpp:
1507         (WebCore::createResource):
1508         (WebCore::CachedResourceLoader::checkInsecureContent):
1509         (WebCore::CachedResourceLoader::canRequest):
1510         * loader/cache/CachedResourceLoader.h:
1511         * loader/cache/CachedShader.cpp: Removed.
1512         * loader/cache/CachedShader.h: Removed.
1513         * page/Settings.cpp:
1514         (WebCore::Settings::Settings):
1515         * page/Settings.h:
1516         * page/animation/CSSPropertyAnimation.cpp:
1517         (WebCore::blendFilter):
1518         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1519         (PlatformCALayerMac::filtersCanBeComposited):
1520         * platform/graphics/filters/CustomFilterArrayParameter.h: Removed.
1521         * platform/graphics/filters/CustomFilterColorParameter.h: Removed.
1522         * platform/graphics/filters/CustomFilterCompiledProgram.cpp: Removed.
1523         * platform/graphics/filters/CustomFilterCompiledProgram.h: Removed.
1524         * platform/graphics/filters/CustomFilterConstants.h: Removed.
1525         * platform/graphics/filters/CustomFilterGlobalContext.cpp: Removed.
1526         * platform/graphics/filters/CustomFilterGlobalContext.h: Removed.
1527         * platform/graphics/filters/CustomFilterMesh.cpp: Removed.
1528         * platform/graphics/filters/CustomFilterMesh.h: Removed.
1529         * platform/graphics/filters/CustomFilterMeshGenerator.cpp: Removed.
1530         * platform/graphics/filters/CustomFilterMeshGenerator.h: Removed.
1531         * platform/graphics/filters/CustomFilterNumberParameter.h: Removed.
1532         * platform/graphics/filters/CustomFilterOperation.cpp: Removed.
1533         * platform/graphics/filters/CustomFilterOperation.h: Removed.
1534         * platform/graphics/filters/CustomFilterParameter.h: Removed.
1535         * platform/graphics/filters/CustomFilterParameterList.cpp: Removed.
1536         * platform/graphics/filters/CustomFilterParameterList.h: Removed.
1537         * platform/graphics/filters/CustomFilterProgram.cpp: Removed.
1538         * platform/graphics/filters/CustomFilterProgram.h: Removed.
1539         * platform/graphics/filters/CustomFilterProgramClient.h: Removed.
1540         * platform/graphics/filters/CustomFilterProgramInfo.cpp: Removed.
1541         * platform/graphics/filters/CustomFilterProgramInfo.h: Removed.
1542         * platform/graphics/filters/CustomFilterRenderer.cpp: Removed.
1543         * platform/graphics/filters/CustomFilterRenderer.h: Removed.
1544         * platform/graphics/filters/CustomFilterTransformParameter.h: Removed.
1545         * platform/graphics/filters/CustomFilterValidatedProgram.cpp: Removed.
1546         * platform/graphics/filters/CustomFilterValidatedProgram.h: Removed.
1547         * platform/graphics/filters/FECustomFilter.cpp: Removed.
1548         * platform/graphics/filters/FECustomFilter.h: Removed.
1549         * platform/graphics/filters/FilterOperation.h:
1550         * platform/graphics/filters/FilterOperations.cpp:
1551         (WebCore::FilterOperations::outsets):
1552         * platform/graphics/filters/FilterOperations.h:
1553         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Removed.
1554         * platform/graphics/filters/ValidatedCustomFilterOperation.h: Removed.
1555         * platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp: Removed.
1556         * platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h: Removed.
1557         * platform/graphics/gpu/Texture.cpp:
1558         * platform/graphics/texmap/TextureMapper.h:
1559         * platform/graphics/texmap/TextureMapperGL.cpp:
1560         (WebCore::getPassesRequiredForFilter):
1561         (WebCore::BitmapTextureGL::applyFilters):
1562         * platform/graphics/texmap/TextureMapperGL.h:
1563         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1564         (WebCore::CompositingCoordinator::clearPendingStateChanges):
1565         (WebCore::CompositingCoordinator::syncLayerState):
1566         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
1567         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h: Removed.
1568         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h: Removed.
1569         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1570         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
1571         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1572         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
1573         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1574         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1575         * rendering/FilterEffectRenderer.cpp:
1576         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1577         (WebCore::FilterEffectRenderer::build):
1578         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
1579         * rendering/FilterEffectRenderer.h:
1580         * rendering/RenderLayer.cpp:
1581         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1582         (WebCore::RenderLayer::calculateClipRects):
1583         * rendering/RenderLayer.h:
1584         * rendering/RenderLayerBacking.cpp:
1585         (WebCore::RenderLayerBacking::updateFilters):
1586         * rendering/RenderLayerFilterInfo.cpp:
1587         (WebCore::RenderLayer::FilterInfo::~FilterInfo):
1588         * rendering/RenderLayerFilterInfo.h:
1589         * rendering/RenderView.cpp:
1590         * rendering/RenderView.h:
1591         * rendering/style/StyleCachedShader.cpp: Removed.
1592         * rendering/style/StyleCachedShader.h: Removed.
1593         * rendering/style/StyleCustomFilterProgram.cpp: Removed.
1594         * rendering/style/StyleCustomFilterProgram.h: Removed.
1595         * rendering/style/StyleCustomFilterProgramCache.cpp: Removed.
1596         * rendering/style/StyleCustomFilterProgramCache.h: Removed.
1597         * rendering/style/StylePendingShader.h: Removed.
1598         * rendering/style/StyleShader.h: Removed.
1599
1600 2014-01-22  Jon Honeycutt  <jhoneycutt@apple.com>
1601
1602         REGRESSION(r161967): Crash in WebCore::CachedSVGDocumentReference::load
1603         <https://webkit.org/b/127151>
1604         <rdar://problem/15840760>
1605
1606         There were two issues introduced here; the first is a use-after-free of
1607         CachedSVGDocumentReference objects.
1608
1609         The previous code kept a map from FilterOperation ->
1610         RefPtr<WebKitCSSSVGDocumentValue>, which retained the
1611         CachedSVGDocument. In r161967, this was changed to use a weak HashSet,
1612         which allows stale CachedSVGDocumentReferences in the pending document
1613         set if the owning FilterOperation is deleted. To fix this, we'll keep a
1614         vector of RefPtr<FilterOperation> with pending SVG documents.
1615
1616         The second issue is a null deref in CachedSVGDocumentReference::load();
1617         CachedResourceLoader::requestSVGDocument() can return 0 if (for
1618         example) an invalid URL is passed. r161967 removed a null check as part
1619         of the refactoring.
1620
1621         Reviewed by Dirk Schulze.
1622
1623         Tests: css3/filters/crash-filter-animation-invalid-url.html
1624                css3/filters/crash-invalid-url.html
1625
1626         * css/StyleResolver.cpp:
1627         (WebCore::StyleResolver::State::clear):
1628         Use new member var name.
1629         (WebCore::StyleResolver::loadPendingSVGDocuments):
1630         For each FilterOperation with a pending SVG document, get or create a
1631         CachedSVGDocumentReference, and tell it to load. Changed to use new
1632         function names.
1633         (WebCore::StyleResolver::createFilterOperations):
1634         Append the FilterOperation to the list of FilterOperations with
1635         unloaded SVG documents.
1636
1637         * css/StyleResolver.h:
1638         Changed from using PendingSVGDocumentSet, a weak set, to
1639         a Vector<RefPtr<ReferenceFilterOperation>>.
1640         (WebCore::StyleResolver::State::filtersWithPendingSVGDocuments):
1641         Return the vector.
1642
1643         * loader/cache/CachedSVGDocumentReference.cpp:
1644         (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
1645         Null check m_document rather than checking m_loadRequested.
1646         m_loadRequested may be true when m_document is 0.
1647         (WebCore::CachedSVGDocumentReference::load):
1648         Null check the result of CachedResourceLoader::requestSVGDocument().
1649
1650         * platform/graphics/filters/FilterOperation.cpp:
1651         (WebCore::ReferenceFilterOperation::getOrCreateCachedSVGDocumentReference):
1652         Create, if necessary, and return the CachedSVGDocumentReference.
1653
1654         * platform/graphics/filters/FilterOperation.h:
1655         Replaced createCachedSVGDocumentReference() with
1656         getOrCreateCachedSVGDocumentReference(), which makes for slightly
1657         cleaner code.
1658
1659 2014-01-23  Antti Koivisto  <antti@apple.com>
1660
1661         Don't enable speculative tiles immediately after main load stops progressing
1662         https://bugs.webkit.org/show_bug.cgi?id=127507
1663
1664         Reviewed by Andreas Kling.
1665
1666         It is common for timers and events to trigger more loading after the initial main frame loading
1667         has completed. We should delay a bit before enabling speculative tiles and keep them disabled 
1668         if loading still continues.
1669
1670         * page/FrameView.cpp:
1671         (WebCore::FrameView::FrameView):
1672         (WebCore::FrameView::adjustTiledBackingCoverage):
1673         (WebCore::shouldEnableSpeculativeTilingDuringLoading):
1674         (WebCore::FrameView::enableSpeculativeTilingIfNeeded):
1675         
1676             When load progression stops wait 0.5s before enabling speculative tiles.
1677
1678         (WebCore::FrameView::speculativeTilingEnableTimerFired):
1679         
1680             Don't enable speculative tiles if the progression has started again. Instead restart the timer.
1681
1682         * page/FrameView.h:
1683         * rendering/RenderLayerBacking.cpp:
1684         (WebCore::RenderLayerBacking::RenderLayerBacking):
1685         (WebCore::computeTileCoverage):
1686         
1687             Move the FrameView level code to FrameView (so we don't need to add a timer to every RenderLayerBacking).
1688
1689         * rendering/RenderLayerBacking.h:
1690
1691 2014-01-23  Antti Koivisto  <antti@apple.com>
1692
1693         Loads started soon after main frame completion should be considered part of the main load
1694         https://bugs.webkit.org/show_bug.cgi?id=127504
1695
1696         Reviewed by Andreas Kling.
1697
1698         ProgressTracker currently decides that main load is complete when the main frame stops loading. 
1699         However it is common that timers and onload events trigger more loads immediately (for example 
1700         by inserting iframes) and loading continues visually. These should be considered as part of the
1701         main load for paint throttling and speculative tiling coverage purposes.
1702
1703         * loader/ProgressTracker.cpp:
1704         (WebCore::ProgressTracker::ProgressTracker):
1705         (WebCore::ProgressTracker::progressStarted):
1706         
1707             Track whether this is considered part of the main load or not with a boolean. 
1708             It is set for subframe loads too if they start loading soon (within 1s) after the main frame load completes.
1709
1710         (WebCore::ProgressTracker::finalProgressComplete):
1711         
1712             Get a timestamp.
1713
1714         (WebCore::ProgressTracker::isMainLoadProgressing):
1715
1716             New definition of "main load".
1717
1718         * loader/ProgressTracker.h:
1719
1720 2014-01-23  peavo@outlook.com  <peavo@outlook.com>
1721
1722         [WinCairo] Compile error.
1723         https://bugs.webkit.org/show_bug.cgi?id=127499
1724
1725         Reviewed by Brent Fulgham.
1726
1727         * platform/network/curl/ResourceError.h: Include <winsock2.h> before <curl/curl.h>.
1728
1729 2014-01-23  Brady Eidson  <beidson@apple.com>
1730
1731         IDB: Implement cross-thread and IPC plumbing for 'get' support
1732         https://bugs.webkit.org/show_bug.cgi?id=127501
1733
1734         Reviewed by Anders Carlsson.
1735
1736         Add isolatedCopy to the IDBGetResult object:
1737         * Modules/indexeddb/IDBGetResult.h:
1738         (WebCore::IDBGetResult::isolatedCopy):
1739
1740         Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
1741         * Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
1742         (WebCore::IDBKeyRangeData::isolatedCopy):
1743         * Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
1744         (WebCore::IDBKeyRangeData::IDBKeyRangeData):
1745
1746         Add a few more cross-thread copiers:
1747         * platform/CrossThreadCopier.cpp:
1748         (WebCore::IDBGetResult>::copy):
1749         (WebCore::IDBKeyRangeData>::copy):
1750         * platform/CrossThreadCopier.h:
1751
1752         Project file gunk:
1753         * CMakeLists.txt:
1754         * GNUmakefile.list.am:
1755         * WebCore.exp.in:
1756         * WebCore.xcodeproj/project.pbxproj:
1757
1758 2014-01-23  Jer Noble  <jer.noble@apple.com>
1759
1760         [MSE][Mac] Adopt new AVStreamDataParser delegate API
1761         https://bugs.webkit.org/show_bug.cgi?id=127498
1762
1763         Reviewed by Eric Carlson.
1764
1765         Adopt a new delegate API which passes in whether or not the new AVAsset
1766         is discontinuous, implying the AVAsset is entirely new rather than
1767         just updated with new information.
1768
1769         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1770         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
1771
1772 2014-01-23  Tim Horton  <timothy_horton@apple.com>
1773
1774         PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
1775         https://bugs.webkit.org/show_bug.cgi?id=127415
1776         <rdar://problem/12482452>
1777
1778         Reviewed by Sam Weinig.
1779
1780         * English.lproj/Localizable.strings:
1781         * WebCore.exp.in:
1782         * platform/LocalizedStrings.cpp:
1783         (WebCore::useBlockedPlugInContextMenuTitle):
1784         * platform/LocalizedStrings.h:
1785         Add a localizable string for the generic case, where the client
1786         didn't provide a more specific string for the context menu item.
1787
1788 2014-01-23  peavo@outlook.com  <peavo@outlook.com>
1789
1790         [Curl] There is no way to specify cache folder.
1791         https://bugs.webkit.org/show_bug.cgi?id=125028
1792
1793         Reviewed by Brent Fulgham.
1794
1795         Fixed logical test, disc cache should be disabled if creating cache folder fails.
1796
1797         * platform/network/curl/CurlCacheManager.cpp:
1798         (WebCore::CurlCacheManager::setCacheDirectory):
1799
1800 2014-01-23  Brady Eidson  <beidson@apple.com>
1801
1802         Unreviewed build fix.
1803
1804         * WebCore.xcodeproj/project.pbxproj: Export the new header so WebKit can see it
1805
1806 2014-01-22  Brent Fulgham  <bfulgham@apple.com>
1807
1808         [Win] Update project and solution files for 64-bit builds
1809         https://bugs.webkit.org/show_bug.cgi?id=127457
1810
1811         Reviewed by Eric Carlson.
1812
1813         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Update for VS2013
1814         * WebCore.vcxproj/WebCore.submit.sln: Add x64 targets
1815         * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013. Also exclude 32-bit specific
1816         assembly when building 64-bit target.
1817         * WebCore.vcxproj/WebCore.vcxproj.filters: Update for VS2013
1818         * config.h: Handle 64-bit type definitions.
1819         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1820         (PlatformCAAnimation::setFromValue): Use CGFloat to support 64-bit builds
1821         (PlatformCAAnimation::setToValue): Ditto
1822         (PlatformCAAnimation::setValues): Ditto
1823         * platform/graphics/win/FontCustomPlatformData.cpp:
1824         (WebCore::FontCustomPlatformData::fontPlatformData): Add cast to
1825         support 32- and 64-bit targets.
1826         * platform/graphics/win/GraphicsContextCGWin.cpp:
1827         (WebCore::GraphicsContext::drawLineForDocumentMarker): Use CGFloat to
1828         support 64-bit builds.
1829         * platform/win/PasteboardWin.cpp:
1830         (WebCore::Pasteboard::writeURLToDataObject): Specialize std::min to
1831         work on 32- and 64-bit code.
1832         (WebCore::createGlobalImageFileDescriptor): Ditto
1833         * platform/win/StructuredExceptionHandlerSuppressor.cpp:
1834         (WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor):
1835         Comment out 32-bit inline assembly.
1836         (WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor):
1837         Ditto
1838
1839 2014-01-23  Brady Eidson  <beidson@apple.com>
1840
1841         Make IDBGetResult work with IDBKeyData instead of IDBKey.
1842         https://bugs.webkit.org/show_bug.cgi?id=127493
1843
1844         Reviewed by Eric Carlson.
1845
1846         Also break it into its own header to work better with IPC messages.
1847
1848         * Modules/indexeddb/IDBGetResult.h: Added.
1849         (WebCore::IDBGetResult::IDBGetResult):
1850
1851         * Modules/indexeddb/IDBServerConnection.h:
1852
1853         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1854         (WebCore::GetOperation::perform):
1855
1856         * WebCore.xcodeproj/project.pbxproj:
1857
1858 2014-01-23  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
1859
1860         [curl] Add storage limit to cache manager
1861         https://bugs.webkit.org/show_bug.cgi?id=125779
1862
1863         Reviewed by Brent Fulgham.
1864
1865         Sets a local disc storage size limit for the cache manager
1866         used by the curl network backend.
1867
1868         * platform/network/curl/CurlCacheEntry.cpp:
1869         (WebCore::CurlCacheEntry::CurlCacheEntry):
1870         (WebCore::CurlCacheEntry::isCached):
1871         (WebCore::CurlCacheEntry::saveCachedData):
1872         (WebCore::CurlCacheEntry::readCachedData):
1873         (WebCore::CurlCacheEntry::didFail):
1874         (WebCore::CurlCacheEntry::didFinishLoading):
1875         (WebCore::CurlCacheEntry::loadFileToBuffer):
1876         (WebCore::CurlCacheEntry::parseResponseHeaders):
1877         (WebCore::CurlCacheEntry::entrySize):
1878         * platform/network/curl/CurlCacheEntry.h:
1879         (WebCore::CurlCacheEntry::requestHeaders):
1880         * platform/network/curl/CurlCacheManager.cpp:
1881         (WebCore::CurlCacheManager::CurlCacheManager):
1882         (WebCore::CurlCacheManager::setStorageSizeLimit):
1883         (WebCore::CurlCacheManager::loadIndex):
1884         (WebCore::CurlCacheManager::saveIndex):
1885         (WebCore::CurlCacheManager::makeRoomForNewEntry):
1886         (WebCore::CurlCacheManager::didReceiveResponse):
1887         (WebCore::CurlCacheManager::didReceiveData):
1888         (WebCore::CurlCacheManager::invalidateCacheEntry):
1889         (WebCore::CurlCacheManager::readCachedData):
1890         * platform/network/curl/CurlCacheManager.h:
1891         (WebCore::CurlCacheManager::cacheDirectory):
1892
1893 2014-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1894
1895         Unreviewed. Fix automake warning.
1896
1897         * GNUmakefile.list.am: Remove trailing whitespaces.
1898
1899 2014-01-23  Mihai Maerean  <mmaerean@adobe.com>
1900
1901         [CSS Regions] Fix positioning composited layers when the region has overflow:hidden
1902         https://bugs.webkit.org/show_bug.cgi?id=124042
1903
1904         Reviewed by Mihnea Ovidenie.
1905
1906         If there's a clipping GraphicsLayer on the hierarchy, substract its offset, since it's its
1907         parent that positions us.
1908
1909         Tests: compositing/regions/position-layer-inside-region-overflow-hidden.html
1910                compositing/regions/position-layer-inside-overflow-hidden.html
1911                compositing/regions/position-layers-inside-region-overflow-hidden.html
1912                compositing/regions/position-layers-inside-regions-overflow-hidden.html
1913
1914         * rendering/RenderLayerBacking.cpp:
1915         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): The position
1916         must also be correct when the region has box-shadow that inflates the region's layer. The
1917         composited layers from the flow thread should be rendered in the same position whether the
1918         associated region has clipping or not.
1919         Using the position of the clipping layer instead of the location of the clipbox makes it
1920         also work with box-shadow that inflates the region's graphics layer.
1921
1922 2014-01-23  Andrei Bucur  <abucur@adobe.com>
1923
1924         [CSS Regions] Convert regions iterator loops to range-based loops
1925         https://bugs.webkit.org/show_bug.cgi?id=127464
1926
1927         Reviewed by Antti Koivisto.
1928
1929         Replace most of the iterator loops in the region implementation with
1930         range based for loops. The for loops that iterate only over subsets
1931         of collections have not been changed.
1932
1933         Tests: no new tests, this is a refactoring patch.
1934
1935         * dom/WebKitNamedFlow.cpp:
1936         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
1937         (WebCore::WebKitNamedFlow::getRegionsByContent):
1938         (WebCore::WebKitNamedFlow::getRegions):
1939         (WebCore::WebKitNamedFlow::getContent):
1940         * inspector/InspectorOverlay.cpp:
1941         (WebCore::buildObjectForCSSRegionsHighlight):
1942         * rendering/RenderFlowThread.cpp:
1943         (WebCore::RenderFlowThread::validateRegions):
1944         (WebCore::RenderFlowThread::updateLogicalWidth):
1945         (WebCore::RenderFlowThread::computeLogicalHeight):
1946         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1947         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1948         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1949         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1950         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
1951         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
1952         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
1953         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1954         (WebCore::RenderFlowThread::collectLayerFragments):
1955         (WebCore::RenderFlowThread::fragmentsBoundingBox):
1956         * rendering/RenderNamedFlowFragment.cpp:
1957         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
1958         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
1959         * rendering/RenderNamedFlowThread.cpp:
1960         (WebCore::RenderNamedFlowThread::clearContentElements):
1961         (WebCore::RenderNamedFlowThread::nextRendererForNode):
1962         (WebCore::RenderNamedFlowThread::dependsOn):
1963         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
1964         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
1965         (WebCore::RenderNamedFlowThread::pushDependencies):
1966         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
1967         (WebCore::isContainedInElements):
1968         (WebCore::RenderNamedFlowThread::getRanges):
1969         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
1970         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
1971         * rendering/RenderTreeAsText.cpp:
1972         (WebCore::writeRenderRegionList):
1973
1974 2014-01-23  László Langó  <llango.u-szeged@partner.samsung.com>
1975
1976         Range should be constructable.
1977         https://bugs.webkit.org/show_bug.cgi?id=115639
1978
1979         Reviewed by Ryosuke Niwa.
1980
1981         http://www.w3.org/TR/2013/WD-dom-20131107/#interface-range
1982         Now we can do `new Range()` instead of `document.createRange()`.
1983
1984         Backported from Blink: https://chromium.googlesource.com/chromium/blink/+/47ca40efdf58a4787aa33aa75a35778899b1c002%5E%21
1985
1986         Test: fast/dom/Range/range-constructor.html
1987
1988         * dom/Range.cpp:
1989         (WebCore::Range::create):
1990         * dom/Range.h:
1991         * dom/Range.idl:
1992
1993 2014-01-23  ChangSeok Oh  <changseok.oh@collabora.com>
1994
1995         Unreviewed build fix for gles after r162565. Add missing definitions.
1996
1997         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1998         (WebCore::GraphicsContext3D::drawArraysInstanced):
1999         (WebCore::GraphicsContext3D::drawElementsInstanced):
2000         (WebCore::GraphicsContext3D::vertexAttribDivisor):
2001
2002 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2003
2004         [GLIB] Use GUniquePtr instead of GOwnPtr
2005         https://bugs.webkit.org/show_bug.cgi?id=127431
2006
2007         Reviewed by Martin Robinson.
2008
2009         GUniquePtr is a template alias of std::unique_ptr with a custom
2010         deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
2011         where the output pointer is needed, but it will also be replaced soon.
2012
2013         * GNUmakefile.list.am:
2014         * PlatformGTK.cmake:
2015         * accessibility/atk/AXObjectCacheAtk.cpp:
2016         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2017         (getAttributeSetForAccessibilityObject):
2018         (accessibilityObjectLength):
2019         (textExtents):
2020         (webkitAccessibleTextGetChar):
2021         (numberOfReplacedElementsBeforeOffset):
2022         * page/ContextMenuController.cpp:
2023         * platform/SharedBuffer.h:
2024         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2025         (webKitWebAudioSrcConstructed):
2026         (webKitWebAudioSrcLoop):
2027         * platform/audio/gtk/AudioBusGtk.cpp:
2028         (WebCore::AudioBus::loadPlatformResource):
2029         * platform/geoclue/GeolocationProviderGeoclue.cpp:
2030         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
2031         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2032         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
2033         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2034         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
2035         (webKitMediaSrcAddSrc):
2036         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2037         (webKitWebSrcStart):
2038         (ResourceHandleStreamingClient::wasBlocked):
2039         (ResourceHandleStreamingClient::cannotShowURL):
2040         * platform/graphics/gtk/ImageBufferGtk.cpp:
2041         (WebCore::encodeImage):
2042         (WebCore::ImageBuffer::toDataURL):
2043         * platform/graphics/gtk/ImageGtk.cpp:
2044         (WebCore::getThemeIconFileName):
2045         (WebCore::Image::loadPlatformResource):
2046         * platform/gtk/ContextMenuGtk.cpp:
2047         (WebCore::ContextMenu::itemCount):
2048         (WebCore::contextMenuItemVector):
2049         * platform/gtk/ContextMenuItemGtk.cpp:
2050         (WebCore::createPlatformMenuItemDescription):
2051         * platform/gtk/DataObjectGtk.cpp:
2052         (WebCore::DataObjectGtk::setURIList):
2053         (WebCore::DataObjectGtk::setURL):
2054         * platform/gtk/FileSystemGtk.cpp:
2055         (WebCore::filenameToString):
2056         (WebCore::fileSystemRepresentation):
2057         (WebCore::filenameForDisplay):
2058         (WebCore::pathGetFileName):
2059         (WebCore::applicationDirectoryPath):
2060         (WebCore::sharedResourcesPath):
2061         (WebCore::directoryName):
2062         (WebCore::listDirectory):
2063         (WebCore::openTemporaryFile):
2064         * platform/gtk/GOwnPtrGtk.cpp: Removed.
2065         * platform/gtk/GOwnPtrGtk.h: Removed.
2066         * platform/gtk/GUniquePtrGtk.h: Added.
2067         * platform/gtk/GamepadsGtk.cpp:
2068         (WebCore::GamepadsGtk::GamepadsGtk):
2069         * platform/gtk/GtkClickCounter.cpp:
2070         (WebCore::GtkClickCounter::shouldProcessButtonEvent):
2071         * platform/gtk/GtkInputMethodFilter.cpp:
2072         (WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
2073         * platform/gtk/GtkPopupMenu.cpp:
2074         (WebCore::GtkPopupMenu::popUp):
2075         (WebCore::GtkPopupMenu::typeAheadFind):
2076         * platform/gtk/LanguageGtk.cpp:
2077         (WebCore::platformLanguage):
2078         * platform/gtk/LocalizedStringsGtk.cpp:
2079         (WebCore::imageTitle):
2080         (WebCore::localizedMediaTimeDescription):
2081         * platform/gtk/PasteboardHelper.cpp:
2082         (WebCore::selectionDataToUTF8String):
2083         (WebCore::PasteboardHelper::getClipboardContents):
2084         (WebCore::PasteboardHelper::fillSelectionData):
2085         * platform/gtk/PopupMenuGtk.cpp:
2086         (WebCore::PopupMenuGtk::createGtkActionForMenuItem):
2087         (WebCore::PopupMenuGtk::show):
2088         * platform/gtk/WebKitAuthenticationWidget.cpp:
2089         (webkitAuthenticationWidgetInitialize):
2090         * platform/network/ResourceHandleInternal.h:
2091         * platform/network/gtk/CredentialBackingStore.cpp:
2092         (WebCore::credentialForChallengeAsyncReadyCallback):
2093         * platform/network/soup/CookieJarSoup.cpp:
2094         (WebCore::setCookiesFromDOM):
2095         (WebCore::cookiesForSession):
2096         (WebCore::getRawCookies):
2097         (WebCore::deleteCookie):
2098         (WebCore::getHostnamesWithCookies):
2099         (WebCore::deleteCookiesForHostname):
2100         (WebCore::deleteAllCookies):
2101         * platform/network/soup/DNSSoup.cpp:
2102         * platform/network/soup/GUniquePtrSoup.h: Added.
2103         * platform/network/soup/ResourceErrorSoup.cpp:
2104         (WebCore::failingURI):
2105         * platform/network/soup/ResourceHandleSoup.cpp:
2106         (WebCore::ResourceHandle::ensureReadBuffer):
2107         (WebCore::cleanupSoupRequestOperation):
2108         (WebCore::createSoupRequestAndMessageForHandle):
2109         * platform/network/soup/ResourceRequestSoup.cpp:
2110         (WebCore::ResourceRequest::updateSoupMessageMembers):
2111         (WebCore::ResourceRequest::updateSoupMessage):
2112         * platform/network/soup/ResourceResponseSoup.cpp:
2113         * platform/network/soup/SoupURIUtils.cpp:
2114         (WebCore::soupURIToKURL):
2115         * platform/soup/SharedBufferSoup.cpp:
2116         (WebCore::SharedBuffer::SharedBuffer):
2117         (WebCore::SharedBuffer::clearPlatformData):
2118         (WebCore::SharedBuffer::maybeTransferPlatformData):
2119         (WebCore::SharedBuffer::hasPlatformData):
2120         * plugins/gtk/PluginPackageGtk.cpp:
2121         (WebCore::PluginPackage::fetchInfo):
2122         (WebCore::PluginPackage::load):
2123
2124 2014-01-22  Simon Fraser  <simon.fraser@apple.com>
2125
2126         Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
2127         https://bugs.webkit.org/show_bug.cgi?id=127461
2128
2129         Reviewed by Andreas Kling.
2130
2131         The "fixedVisibleContentRect" code path is only used by platforms
2132         which enabled TILED_BACKING_STORE, so to reduce confusion, surround
2133         this code with #if USE(TILED_BACKING_STORE).
2134
2135         * page/Frame.cpp:
2136         (WebCore::Frame::createView):
2137         * page/FrameView.cpp:
2138         * page/FrameView.h:
2139         * platform/ScrollView.cpp:
2140         (WebCore::ScrollView::unscaledVisibleContentSize):
2141         (WebCore::ScrollView::visibleContentRect):
2142         * platform/ScrollView.h:
2143         (WebCore::ScrollView::visibleSize):
2144
2145 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
2146
2147         ASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing
2148         https://bugs.webkit.org/show_bug.cgi?id=126987
2149
2150         Reviewed by Simon Fraser.
2151
2152         When "inherit" is specified and there is no parent, Length values have an "Auto" type
2153
2154         Test: fast/css3-text/css3-word-spacing-percentage/word-spacing-crash.html
2155
2156         * rendering/style/RenderStyle.cpp:
2157         (WebCore::RenderStyle::setWordSpacing):
2158
2159 2014-01-22  Samuel White  <samuel_white@apple.com>
2160
2161         AX: Can't always increment web sliders.
2162         https://bugs.webkit.org/show_bug.cgi?id=127451
2163
2164         Reviewed by Chris Fleizach.
2165
2166         Clamping the decrement/increment amount to one when necessary (if a percent change would result in a change of less than one).
2167
2168         Test: accessibility/range-alter-by-percent.html
2169
2170         * accessibility/AccessibilityNodeObject.cpp:
2171         (WebCore::AccessibilityNodeObject::changeValueByPercent):
2172
2173 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
2174
2175         Remove CSS3_TEXT_DECORATION define
2176         https://bugs.webkit.org/show_bug.cgi?id=127333
2177
2178         Reviewed by Simon Fraser.
2179
2180         This is required for unprefixing the text-decoration-* CSS properties.
2181
2182         No new tests are necessary becase the flag was already on by default.
2183
2184         * Configurations/FeatureDefines.xcconfig:
2185         * css/CSSComputedStyleDeclaration.cpp:
2186         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
2187         (WebCore::ComputedStyleExtractor::propertyValue):
2188         * css/CSSParser.cpp:
2189         (WebCore::isColorPropertyID):
2190         (WebCore::CSSParser::parseValue):
2191         (WebCore::CSSParser::addTextDecorationProperty):
2192         (WebCore::CSSParser::parseTextUnderlinePosition):
2193         * css/CSSParser.h:
2194         * css/CSSPrimitiveValueMappings.h:
2195         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
2196         * css/CSSPropertyNames.in:
2197         * css/CSSValueKeywords.in:
2198         * css/DeprecatedStyleBuilder.cpp:
2199         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2200         * css/StylePropertyShorthand.cpp:
2201         (WebCore::webkitTextDecorationShorthand):
2202         (WebCore::shorthandForProperty):
2203         (WebCore::matchingShorthandsForLonghand):
2204         * css/StylePropertyShorthand.h:
2205         * css/StyleResolver.cpp:
2206         (WebCore::shouldApplyPropertyInParseOrder):
2207         (WebCore::isValidVisitedLinkProperty):
2208         (WebCore::StyleResolver::applyProperty):
2209         * platform/graphics/GraphicsContext.h:
2210         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2211         (WebCore::GraphicsContext::setPlatformStrokeStyle):
2212         * platform/graphics/cg/GraphicsContextCG.cpp:
2213         (WebCore::GraphicsContext::platformInit):
2214         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2215         (WebCore::createPen):
2216         * rendering/InlineFlowBox.cpp:
2217         (WebCore::InlineFlowBox::computeMaxLogicalTop):
2218         * rendering/InlineFlowBox.h:
2219         * rendering/InlineTextBox.cpp:
2220         (WebCore::textDecorationStyleToStrokeStyle):
2221         (WebCore::boundingBoxForAllActiveDecorations):
2222         (WebCore::InlineTextBox::paintDecoration):
2223         * rendering/RenderObject.cpp:
2224         (WebCore::decorationColor):
2225         * rendering/RootInlineBox.cpp:
2226         (WebCore::RootInlineBox::maxLogicalTop):
2227         * rendering/RootInlineBox.h:
2228         * rendering/style/RenderStyle.cpp:
2229         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
2230         (WebCore::RenderStyle::colorIncludingFallback):
2231         (WebCore::RenderStyle::visitedDependentColor):
2232         * rendering/style/RenderStyle.h:
2233         * rendering/style/RenderStyleConstants.h:
2234         * rendering/style/StyleRareInheritedData.cpp:
2235         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2236         (WebCore::StyleRareInheritedData::operator==):
2237         * rendering/style/StyleRareInheritedData.h:
2238         * rendering/style/StyleRareNonInheritedData.cpp:
2239         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2240         (WebCore::StyleRareNonInheritedData::operator==):
2241         * rendering/style/StyleRareNonInheritedData.h:
2242
2243 2014-01-22  Chris Fleizach  <cfleizach@apple.com>
2244
2245         AX: Do not return an accessible name for an object just because it has tabindex=0
2246         https://bugs.webkit.org/show_bug.cgi?id=126914
2247
2248         Reviewed by Mario Sanchez Prada.
2249
2250         WebKit has code to return an accessible name for any object that is "generically" focusable (ie. tabindex=0).
2251         This behavior, which is not supported in ARIA, has caused many problems for VoiceOver. Often VoiceOver will
2252         speak all the text underneath any type of group.
2253
2254         I think we need to revert this behavior and follow the ARIA spec more closely.
2255
2256         Test: accessibility/aria-describedby-ensures-visibility.html
2257
2258         * accessibility/AccessibilityNodeObject.cpp:
2259         (WebCore::AccessibilityNodeObject::visibleText):
2260         (WebCore::AccessibilityNodeObject::title):
2261
2262 2014-01-22  Brady Eidson  <beidson@apple.com>
2263
2264         The IDB backing store get() method shouldn't call IDB callbacks directly
2265         https://bugs.webkit.org/show_bug.cgi?id=127453
2266
2267         Reviewed by Beth Dakin.
2268
2269         * Modules/indexeddb/IDBServerConnection.h:
2270         (WebCore::IDBGetResult::IDBGetResult): Add a new structure to hold all of the
2271           possible results of a get() call.
2272
2273         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2274         (WebCore::IDBServerConnectionLevelDB::get): Don't call IDBCallbacks directly.
2275           Instead, return the GetResult to the GetOperation which will make IDBCallbacks.
2276         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2277
2278         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2279         (WebCore::GetOperation::perform): Get all of the IDBGetResults in the completion callback
2280           make the appropriate IDBCallback.
2281         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2282
2283 2014-01-22  Dean Jackson  <dino@apple.com>
2284
2285         Unreviewed attempt to fix 32-bit builds.
2286
2287         Use long long rather than GC3Dintptr.
2288
2289         * html/canvas/ANGLEInstancedArrays.cpp:
2290         (WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE):
2291         * html/canvas/ANGLEInstancedArrays.h:
2292         * html/canvas/WebGLRenderingContext.cpp:
2293         (WebCore::WebGLRenderingContext::drawElementsInstanced):
2294         * html/canvas/WebGLRenderingContext.h:
2295
2296 2014-01-21  Brady Eidson  <beidson@apple.com>
2297
2298         IDB: "Put" support
2299         <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
2300
2301         Reviewed by Alexey Proskuryakov.
2302
2303         Add persistent encode/decode for storage to the database:
2304         * Modules/indexeddb/IDBKey.cpp:
2305         (WebCore::IDBKey::encode):
2306         (WebCore::IDBKey::decode):
2307         * Modules/indexeddb/IDBKey.h:
2308
2309         Add a data class to represent IDBKey suitable for crossing IPC:
2310         * Modules/indexeddb/IDBKeyData.cpp: Added.
2311         (WebCore::IDBKeyData::IDBKeyData):
2312         (WebCore::IDBKeyData::maybeCreateIDBKey):
2313         (WebCore::IDBKeyData::isolatedCopy):
2314         * Modules/indexeddb/IDBKeyData.h: Added.
2315         (WebCore::IDBKeyData::IDBKeyData):
2316
2317         * platform/CrossThreadCopier.cpp:
2318         (WebCore::IDBKeyData>::copy):
2319         * platform/CrossThreadCopier.h:
2320
2321         * WebCore.exp.in:
2322         * WebCore.xcodeproj/project.pbxproj:
2323
2324 2014-01-22  Dean Jackson  <dino@apple.com>
2325
2326         [WebGL] Implement ANGLE_instanced_arrays
2327         https://bugs.webkit.org/show_bug.cgi?id=127257
2328
2329         Reviewed by Brent Fulgham.
2330
2331         Implement the instanced drawing WebGL extension,
2332         ANGLE_instanced_arrays. This is currently Mac-only,
2333         but should be portable to other platforms if their
2334         OpenGL exposes the functions. It's also done in a way
2335         that will make exposing it to WebGL2 simple.
2336
2337         Test: fast/canvas/webgl/angle-instanced-arrays.html
2338
2339         * CMakeLists.txt:
2340         * DerivedSources.cpp:
2341         * DerivedSources.make:
2342         * GNUmakefile.list.am:
2343         * WebCore.vcxproj/WebCore.vcxproj:
2344         * WebCore.vcxproj/WebCore.vcxproj.filters:
2345         * WebCore.xcodeproj/project.pbxproj:
2346         Add the new files to all the build systems.
2347
2348         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2349         (WebCore::toJS): Link JS side to C++ side.
2350
2351         * html/canvas/ANGLEInstancedArrays.cpp: Added.
2352         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2353         * html/canvas/ANGLEInstancedArrays.h: Added.
2354         * html/canvas/ANGLEInstancedArrays.idl: Added.
2355         New boilerplate files that expose the extension methods.
2356
2357         * html/canvas/WebGLExtension.h: New extension enum.
2358
2359         * html/canvas/WebGLRenderingContext.cpp:
2360         (WebCore::WebGLRenderingContext::validateVertexAttributes): Add an optional
2361         parameter representing the number of instance primitives we are asked
2362         to draw. Use that for the draw count if looking at an instanced attribute.
2363         Also make sure we see at least one non-instanced attribute.
2364         (WebCore::WebGLRenderingContext::validateDrawArrays): Update this so it could
2365         be used from either drawArrays or drawArraysInstanced.
2366         (WebCore::WebGLRenderingContext::drawArrays):
2367         (WebCore::WebGLRenderingContext::validateDrawElements): Same here, now can be
2368         used by the instanced and non-instanced versions.
2369         (WebCore::WebGLRenderingContext::drawElements):
2370         (WebCore::WebGLRenderingContext::getExtension): Create and return the new extension.
2371         (WebCore::WebGLRenderingContext::getSupportedExtensions): Add new extension to the list.
2372         (WebCore::WebGLRenderingContext::getVertexAttrib): Intercept a query to the divisor
2373         attribute and return the value we kept in the state.
2374         (WebCore::WebGLRenderingContext::drawArraysInstanced): Call the GC3D method.
2375         (WebCore::WebGLRenderingContext::drawElementsInstanced): Ditto.
2376         (WebCore::WebGLRenderingContext::vertexAttribDivisor): Ditto.
2377
2378         * html/canvas/WebGLRenderingContext.h: Define the new methods and parameters.
2379
2380         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2381         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Keep a record of the
2382         divisor if we set it.
2383         * html/canvas/WebGLVertexArrayObjectOES.h:
2384         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::VertexAttribState):
2385
2386         * platform/graphics/GraphicsContext3D.h: New enum.
2387         * platform/graphics/mac/GraphicsContext3DMac.mm:
2388         (WebCore::GraphicsContext3D::drawArraysInstanced): The actual calls into OpenGL.
2389         (WebCore::GraphicsContext3D::drawElementsInstanced): Ditto.
2390         (WebCore::GraphicsContext3D::vertexAttribDivisor): Ditto.
2391
2392         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Empty implementations
2393         for non-mac platforms.
2394
2395         * platform/graphics/ios/GraphicsContext3DIOS.h: Define the iOS names for the
2396         functions.
2397
2398 2014-01-22  Zalan Bujtas  <zalan@apple.com>
2399
2400         [CSS Shapes] shape-inside rectangle layout can fail
2401         https://bugs.webkit.org/show_bug.cgi?id=124784
2402
2403         Reviewed by Darin Adler.
2404
2405         Early subpixel rounding/flooring/ceiling can have unwanted
2406         side effect on the final pixel value. Delay pixel
2407         conversions as much as possible.
2408
2409         Existing test is changed to reflect subpixel functionality.
2410
2411         * rendering/shapes/RectangleShape.cpp:
2412         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
2413
2414 2014-01-22  Jochen Eisinger  <jochen@chromium.org>
2415
2416         Add protocolIsInHTTPFamily for strings and use it where appropriate
2417         https://bugs.webkit.org/show_bug.cgi?id=127336
2418
2419         Reviewed by Alexey Proskuryakov.
2420
2421         * html/HTMLAnchorElement.cpp:
2422         (WebCore::HTMLAnchorElement::parseAttribute):
2423         * page/ContentSecurityPolicy.cpp:
2424         (WebCore::CSPSource::schemeMatches):
2425         * page/SecurityPolicy.cpp:
2426         (WebCore::SecurityPolicy::generateReferrerHeader):
2427         * platform/URL.cpp:
2428         (WebCore::protocolIsInHTTPFamily):
2429         * platform/URL.h:
2430
2431 2014-01-22  Zalan Bujtas  <zalan@apple.com>
2432
2433         Subpixel Layout: SimpleLineLayout needs more position rounding to match InlineFlowBox layout.
2434         https://bugs.webkit.org/show_bug.cgi?id=127404
2435
2436         Reviewed by Antti Koivisto.
2437
2438         In order to produce a CSS pixel perfect layout, SimpleLineLayout needs to
2439         round line positions to CSS (integral) position similarly to InlineFlowBox.
2440
2441         Existing tests cover it.
2442
2443         * rendering/SimpleLineLayoutResolver.h:
2444         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2445         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
2446
2447 2014-01-22  Joseph Pecoraro  <pecoraro@apple.com>
2448
2449         Unreviewed rollout of r162534, this caused inspector test failures.
2450
2451         * bindings/js/PageScriptDebugServer.cpp:
2452         (WebCore::PageScriptDebugServer::addListener):
2453         (WebCore::PageScriptDebugServer::removeListener):
2454         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2455         (WebCore::PageScriptDebugServer::didRemoveLastListener):
2456         * bindings/js/PageScriptDebugServer.h:
2457         * bindings/js/ScriptDebugServer.cpp:
2458         (WebCore::ScriptDebugServer::ScriptDebugServer):
2459         (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
2460         (WebCore::ScriptDebugServer::recompileAllJSFunctionsTimerFired):
2461         * bindings/js/ScriptDebugServer.h:
2462         * bindings/js/WorkerScriptDebugServer.cpp:
2463         (WebCore::WorkerScriptDebugServer::addListener):
2464         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2465         (WebCore::WorkerScriptDebugServer::removeListener):
2466         * inspector/InspectorProfilerAgent.cpp:
2467
2468 2014-01-22  peavo@outlook.com  <peavo@outlook.com>
2469
2470         Crashes in setTextForIterator
2471         https://bugs.webkit.org/show_bug.cgi?id=127424
2472
2473         Reviewed by Brent Fulgham.
2474
2475         * platform/text/icu/UTextProviderLatin1.cpp:
2476         (WebCore::uTextLatin1Clone): Provide correct buffer size in utext_setup function call.
2477         (WebCore::uTextLatin1Access): Give correct buffer size to memset call.
2478         (WebCore::openLatin1UTextProvider): Ditto.
2479
2480 2014-01-22  Jer Noble  <jer.noble@apple.com>
2481
2482         [Mac] MediaPlayerPrivateMediaSourceAVFObjC::load ASSERTs on lots of tests
2483         https://bugs.webkit.org/show_bug.cgi?id=127430
2484
2485         Reviewed by Eric Carlson.
2486
2487         When other registered media engines cannot load a URL, the engine selection
2488         will eventually pick MediaPlayerPrivateMediaSourceAVFObjC and ask it to load
2489         the URL. Instead of ASSERTing here, simply reject the URL by setting the
2490         network state to FormatError.
2491
2492         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2493         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
2494
2495 2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2496
2497         [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
2498         https://bugs.webkit.org/show_bug.cgi?id=127119
2499
2500         Reviewed by Mario Sanchez Prada.
2501
2502         At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
2503         ACCESSIBILITY is not enabled, fixing that.
2504         Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.
2505
2506         * accessibility/AXObjectCache.h:
2507         (WebCore::AXObjectCache::AXObjectCache):
2508         * accessibility/AccessibilityObject.h:
2509
2510 2014-01-22  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2511
2512         Refactor calculation of hasRx and hasRy values in SVGPathData
2513         https://bugs.webkit.org/show_bug.cgi?id=127423
2514
2515         Reviewed by Darin Adler.
2516
2517         This is a follow-up on https://bugs.webkit.org/show_bug.cgi?id=127337
2518
2519         * rendering/svg/SVGPathData.cpp:
2520         (WebCore::updatePathFromRectElement):
2521
2522 2014-01-21  Joseph Pecoraro  <pecoraro@apple.com>
2523
2524         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
2525         https://bugs.webkit.org/show_bug.cgi?id=127409
2526
2527         Reviewed by Timothy Hatcher.
2528
2529         * bindings/js/ScriptDebugServer.h:
2530         * bindings/js/ScriptDebugServer.cpp:
2531         (WebCore::ScriptDebugServer::ScriptDebugServer):
2532         Remove m_recompileTimer and the recompile soon function.
2533         We can just recompile immediately in all existing cases.
2534
2535         * bindings/js/PageScriptDebugServer.h:
2536         * bindings/js/PageScriptDebugServer.cpp:
2537         (WebCore::PageScriptDebugServer::addListener):
2538         (WebCore::PageScriptDebugServer::removeListener):
2539         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2540         (WebCore::PageScriptDebugServer::didAddFirstListener):
2541         (WebCore::PageScriptDebugServer::didRemoveLastListener):
2542         Add a "didAddFirstListener" to match "didRemoveLastListener".
2543         Only recompile functions when we attach the debugger and when
2544         we detach the last listener.
2545
2546         * bindings/js/WorkerScriptDebugServer.cpp:
2547         (WebCore::WorkerScriptDebugServer::addListener):
2548         (WebCore::WorkerScriptDebugServer::removeListener):
2549         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2550         Same thing. Also rearrange the functions to read better.
2551
2552         * inspector/InspectorProfilerAgent.cpp:
2553         Use the direct recompile function instead of the removed "soon" version.
2554
2555 2014-01-22  Robert Sipka  <sipka@inf.u-szeged.hu>
2556
2557         [curl] Improve detecting and handling of SSL client certificate
2558         https://bugs.webkit.org/show_bug.cgi?id=125006
2559
2560         Reviewed by Brent Fulgham.
2561
2562         Add client certificate handling.
2563
2564         * platform/network/ResourceHandle.h:
2565         * platform/network/curl/ResourceError.h:
2566         (WebCore::ResourceError::hasSSLConnectError):
2567         * platform/network/curl/ResourceHandleCurl.cpp:
2568         (WebCore::ResourceHandle::setClientCertificateInfo):
2569         * platform/network/curl/ResourceHandleManager.cpp:
2570         (WebCore::ResourceHandleManager::initializeHandle):
2571         * platform/network/curl/SSLHandle.cpp:
2572         (WebCore::addAllowedClientCertificate):
2573         (WebCore::setSSLClientCertificate):
2574         * platform/network/curl/SSLHandle.h:
2575
2576 2014-01-22  Mihai Maerean  <mmaerean@adobe.com>
2577
2578         [CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
2579         https://bugs.webkit.org/show_bug.cgi?id=127343
2580
2581         Reviewed by Sam Weinig.
2582
2583         RenderNamedFlowFragment::layerOwner cannot return null because regions create stacking
2584         contexts which create layers.
2585
2586         No new tests, no functional change.
2587
2588         * rendering/RenderFlowThread.cpp:
2589         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
2590         * rendering/RenderLayer.cpp:
2591         (WebCore::RenderLayer::calculateClipRects):
2592         * rendering/RenderLayerBacking.cpp:
2593         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
2594         * rendering/RenderLayerCompositor.cpp:
2595         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2596         * rendering/RenderNamedFlowFragment.h:
2597
2598 2014-01-22  Antti Koivisto  <antti@apple.com>
2599
2600         Avoid unthrottled layer flushes triggered by RenderLayerCompositor::ensureRootLayer
2601         https://bugs.webkit.org/show_bug.cgi?id=127426
2602
2603         Reviewed by Anders Carlsson.
2604         
2605         * rendering/RenderLayerCompositor.cpp:
2606         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
2607         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2608
2609             Factor scroll layer position update to a function.
2610
2611         (WebCore::RenderLayerCompositor::ensureRootLayer):
2612         
2613             Stop calling frameViewDidChangeSize/frameViewDidScroll. Instead call the relevent functions
2614             directly. This avoid unthrottled layer flush that is done when the view actually scrolls.
2615
2616         * rendering/RenderLayerCompositor.h:
2617
2618 2014-01-22  Mihai Tica  <mitica@adobe.com>
2619
2620         [CSS Background Blending] -webkit-background-blend-mode fails for certain SVG files
2621         https://bugs.webkit.org/show_bug.cgi?id=127350
2622
2623         Reviewed by Dirk Schulze.
2624
2625         The graphics context of the SVG inherits the blend mode set
2626         on the background layer. Fix consists in drawing the SVG
2627         in a transparency layer.
2628
2629         Test: css3/compositing/background-blend-mode-svg.html
2630
2631         * svg/graphics/SVGImage.cpp:
2632         (WebCore::SVGImage::draw): Begin a transparency layer if a blend mode is set.
2633
2634 2014-01-22  Antti Koivisto  <antti@apple.com>
2635
2636         Update overlay scrollbars in single pass
2637         https://bugs.webkit.org/show_bug.cgi?id=127289
2638
2639         Reviewed by Anders Carlsson.
2640
2641         * platform/ScrollView.cpp:
2642         (WebCore::ScrollView::updateScrollbars):
2643         
2644             Multi-pass scrollbar resolution is only needed for traditional scrollbars. Overlay scrollbars don't affect layout.
2645
2646 2014-01-22  Mihnea Ovidenie  <mihnea@adobe.com>
2647
2648         [CSSRegions] Incorrect layout of a region pseudo children
2649         https://bugs.webkit.org/show_bug.cgi?id=126146
2650
2651         Reviewed by David Hyatt.
2652
2653         Test: fast/regions/collapse-anonymous-region.html
2654
2655         A region behaviour, styled using -webkit-flow-from, is modeled using an anonymous
2656         block created to fragment the named flow content inside the region. We have to prevent
2657         the behaviour of anonymous children collapsing for this block to make sure that the
2658         region element children are still laid out properly when the region element becomes an ordinary
2659         element.
2660
2661         * rendering/RenderBlockFlow.h:
2662
2663 2014-01-21  Ryuan Choi  <ryuan.choi@samsung.com>
2664
2665         Remove unused "acceleratedCompositingForScrollableFramesEnabled" setting
2666         https://bugs.webkit.org/show_bug.cgi?id=127402
2667
2668         Reviewed by Anders Carlsson.
2669
2670         compositing/iframes/iframe-composited-scrolling.html is updated because
2671         there are no usages in WebCore.
2672
2673         * page/Settings.in:
2674
2675 2014-01-21  Alex Christensen  <achristensen@webkit.org>
2676
2677         Compile fix for using libsoup on Windows.
2678         https://bugs.webkit.org/show_bug.cgi?id=127377
2679
2680         Reviewed by Daniel Bates.
2681
2682         * platform/network/soup/ProxyResolverSoup.cpp:
2683         (soupProxyResolverWkSetProperty):
2684         (soupProxyResolverWkGetProperty):
2685         (soupProxyResolverWkGetProxyURISync):
2686         Replaced uint with unsigned.
2687
2688 2014-01-21  Daniel Bates  <dabates@apple.com>
2689
2690         Break up single assertion into two assertions in HTMLMediaElement::returnPlatformLayer()
2691
2692         Following up after <http://trac.webkit.org/changeset/162473>, we should break up
2693         the assertion into two assertions as suggested by Darin Adler. Separating the single
2694         assertion into two assertions makes it straightforward to determine the conjunct that
2695         failed among other benefits.
2696
2697         * html/HTMLMediaElement.cpp:
2698         (WebCore::HTMLMediaElement::parseAttribute):
2699
2700 2014-01-21  Brady Eidson  <beidson@apple.com>
2701
2702         The IDB backing store put() method shouldn't call IDB callbacks directly
2703         https://bugs.webkit.org/show_bug.cgi?id=127399
2704
2705         Reviewed by Beth Dakin.
2706
2707         Refactor the put() callback to take a resulting key or an error.
2708         * Modules/indexeddb/IDBServerConnection.h:
2709
2710         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2711         (WebCore::PutOperation::perform): Call to the backing store, then perform the
2712           appropriate IDB callback whether a key or an error was returned.
2713         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2714
2715         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2716         (WebCore::IDBServerConnectionLevelDB::put): Don’t call IDB callbacks directly.
2717           Instead, pass the resulting key/error back to the PutOperation.
2718         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2719
2720 2014-01-21  Jae Hyun Park  <jae.park@company100.net>
2721
2722         Use nullptr in HTMLCanvasElement
2723         https://bugs.webkit.org/show_bug.cgi?id=127388
2724
2725         Reviewed by Gyuyoung Kim.
2726
2727         * html/HTMLCanvasElement.cpp:
2728         (WebCore::HTMLCanvasElement::getContext):
2729         (WebCore::HTMLCanvasElement::drawingContext):
2730         (WebCore::HTMLCanvasElement::existingDrawingContext):
2731
2732 2014-01-21  László Langó  <llango.u-szeged@partner.samsung.com>
2733
2734         Assertion failure in Range::nodeWillBeRemoved
2735         https://bugs.webkit.org/show_bug.cgi?id=121694
2736
2737         Reviewed by Ryosuke Niwa.
2738
2739         Based on Blink a change: https://chromium.googlesource.com/chromium/blink/+/407c1d7b2c45974aa614b3f847ffe9e8fce205fa
2740
2741         This patch fix an assertion failure. Range::nodeWillBeRemoved() might
2742         be called with removed node in ContainerNode, when DOMNodeRemovedFromDocument
2743         event handler calls removeChild(), for node being removed.
2744
2745         Test: fast/dom/Range/remove-twice-crash.html
2746
2747         * dom/ContainerNode.cpp:
2748         (WebCore::ContainerNode::willRemoveChild):
2749         * dom/ContainerNode.h:
2750
2751 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2752
2753         REGRESSION (r161580): Some PDFs render outside their <img>
2754         https://bugs.webkit.org/show_bug.cgi?id=127381
2755         <rdar://problem/15872168>
2756
2757         Reviewed by Simon Fraser.
2758
2759         * platform/graphics/cg/PDFDocumentImage.cpp:
2760         (WebCore::transformContextForPainting):
2761         Only try to make the scale uniform if it isn't already, and use the minimum
2762         of the two original scales when doing so, so that it is absolutely certain
2763         to fit inside space allocated for the image during layout.
2764
2765 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2766
2767         Remove #if PLATFORM(IOS) in various places around customFixedPositionLayoutRect() code
2768         https://bugs.webkit.org/show_bug.cgi?id=127373
2769
2770         Reviewed by Beth Dakin.
2771
2772         Instead of PLATFORM(IOS) #idefs at every call site for viewportConstrainedVisibleContentRect(),
2773         move the #ifdef inside viewportConstrainedVisibleContentRect().
2774         
2775         The one call site that needs special handling is RenderLayerBacking::updateCompositedBounds(),
2776         which needs to avoid clipping fixed layers to the custom fixed position rect, but instead to
2777         visibleContentRect() (which is really the document bounds on iOS). This ensures that the
2778         fixed layers aren't clipped when zooming out.
2779
2780         * page/FrameView.cpp:
2781         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
2782         * rendering/RenderBoxModelObject.cpp:
2783         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2784         * rendering/RenderLayerBacking.cpp:
2785         (WebCore::RenderLayerBacking::updateCompositedBounds):
2786         * rendering/RenderLayerCompositor.cpp:
2787         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2788         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2789         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2790
2791 2014-01-21  Andy Estes  <aestes@apple.com>
2792
2793         [iOS] Allow all clients to link against WebCore
2794         https://bugs.webkit.org/show_bug.cgi?id=127372
2795         
2796         Reviewed by Dan Bernstein.
2797
2798         * Configurations/WebCore.xcconfig:
2799
2800 2014-01-21  Bear Travis  <betravis@adobe.com>
2801
2802         [CSS Shapes] Preserve box-shape order when serializing shape values
2803         https://bugs.webkit.org/show_bug.cgi?id=127200
2804
2805         Reviewed by Dirk Schulze.
2806
2807         Convert the parsed shape-box pair to a CSSValueList rather than directly
2808         adding the box value to BasicShape. The CSSValueList preserves the
2809         shape-box ordering, and cleans up a little bit of the code shared between
2810         clip and shape values.
2811
2812         Modifying existing parsing tests.
2813
2814         * css/CSSComputedStyleDeclaration.cpp:
2815         (WebCore::shapePropertyValue): Factor out code common to generating shape
2816         values.
2817         (WebCore::ComputedStyleExtractor::propertyValue): Generate a CSSValueList when
2818         you have both a shape and a box.
2819         * css/CSSParser.cpp:
2820         (WebCore::CSSParser::parseBasicShapeAndOrBox): Factor out code common to clip
2821         paths and shape properties that parses the [basic-shape || box] syntax from
2822         the CSS Shapes spec.
2823         (WebCore::CSSParser::parseShapeProperty): Parse shape-box pairs as a CSSValueList.
2824         * css/DeprecatedStyleBuilder.cpp:
2825         (WebCore::ApplyPropertyShape::applyValue): Use the CSSValueList for shape-box pairs.
2826         * css/CSSValueList.h:
2827         (WebCore::CSSValueList::itemWithoutBoundsCheck): Add a const version.
2828         * page/animation/CSSPropertyAnimation.cpp:
2829         (WebCore::blendFunc): Specify a box when blending.
2830         * rendering/style/ShapeValue.h:
2831         (WebCore::ShapeValue::createShapeValue): Add a box parameter.
2832         (WebCore::ShapeValue::ShapeValue): Ditto.
2833
2834 2014-01-21  Daniel Bates  <dabates@apple.com>
2835
2836         Fix the iOS Simulator release build
2837
2838         Substitute ASSERT_UNUSED() for ASSERT() to resolve a compiler warning
2839         that the argument platformLayer is unused. The argument platformLayer
2840         is only used in the asserted condition, which isn't compiled in a
2841         release build; => the argument is unused in a release build.
2842
2843         * html/HTMLMediaElement.cpp:
2844         (WebCore::HTMLMediaElement::parseAttribute):
2845
2846 2014-01-21  Zoltan Horvath  <zoltan@webkit.org>
2847
2848         Since MidpointState is a class, it should behave like a class
2849         https://bugs.webkit.org/show_bug.cgi?id=127154
2850
2851         Reviewed by David Hyatt.
2852
2853         I modified MidpointState to behave like a class, updated the call sites also.
2854
2855         No new tests, no behavior change.
2856
2857         * platform/text/BidiResolver.h:
2858         (WebCore::MidpointState::reset):
2859         (WebCore::MidpointState::startIgnoringSpaces):
2860         (WebCore::MidpointState::stopIgnoringSpaces):
2861         (WebCore::MidpointState::midpoints):
2862         (WebCore::MidpointState::numMidpoints):
2863         (WebCore::MidpointState::currentMidpoint):
2864         (WebCore::MidpointState::incrementCurrentMidpoint):
2865         (WebCore::MidpointState::decreaseNumMidpoints):
2866         (WebCore::MidpointState::betweenMidpoints):
2867         (WebCore::MidpointState::setBetweenMidpoints):
2868         (WebCore::MidpointState::addMidpoint): Renamed from deprecatedAddMidpoint, since now
2869         its private, we no longer need to discourage callers from using it.
2870         * rendering/InlineIterator.h:
2871         (WebCore::IsolateTracker::addFakeRunIfNecessary):
2872         * rendering/RenderBlockLineLayout.cpp:
2873         (WebCore::RenderBlockFlow::appendRunsForObject):
2874         (WebCore::constructBidiRunsForLine):
2875         * rendering/line/BreakingContextInlineHeaders.h:
2876         (WebCore::checkMidpoints):
2877         * rendering/line/TrailingObjects.cpp:
2878         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
2879
2880 2014-01-21  Commit Queue  <commit-queue@webkit.org>
2881
2882         Unreviewed, rolling out r162452.
2883         http://trac.webkit.org/changeset/162452
2884         https://bugs.webkit.org/show_bug.cgi?id=127366
2885
2886         broke a few tests on all Mac WebKit1 bots (Requested by
2887         thorton on #webkit).
2888
2889         * WebCore.exp.in:
2890         * page/FocusController.cpp:
2891         (WebCore::FocusController::FocusController):
2892         (WebCore::FocusController::setFocused):
2893         (WebCore::FocusController::setActive):
2894         (WebCore::FocusController::setContentIsVisible):
2895         * page/FocusController.h:
2896         (WebCore::FocusController::isActive):
2897         (WebCore::FocusController::isFocused):
2898         * page/Page.cpp:
2899         (WebCore::Page::Page):
2900         (WebCore::Page::setIsInWindow):
2901         (WebCore::Page::setIsVisuallyIdle):
2902         (WebCore::Page::setIsVisible):
2903         (WebCore::Page::visibilityState):
2904         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
2905         * page/Page.h:
2906         (WebCore::Page::isVisible):
2907         (WebCore::Page::isInWindow):
2908
2909 2014-01-21  Chris Fleizach  <cfleizach@apple.com>
2910
2911         AX: Mac: Expose the visible text of a password field to AX
2912         https://bugs.webkit.org/show_bug.cgi?id=127353
2913
2914         Reviewed by Brent Fulgham.
2915
2916         The Mac platform should now expose the rendered value of password fields through AX.
2917
2918         Test: accessibility/password-field-value.html
2919
2920         * accessibility/AccessibilityRenderObject.cpp:
2921         (WebCore::AccessibilityRenderObject::textLength):
2922         (WebCore::AccessibilityRenderObject::passwordFieldValue):
2923
2924 2014-01-21  Robert Sipka  <sipka@inf.u-szeged.hu>
2925
2926         Support SSL error handling in case of synchronous job.
2927         https://bugs.webkit.org/show_bug.cgi?id=125301
2928
2929         Reviewed by Brent Fulgham.
2930
2931         Set ssl error informations for the users.
2932
2933         * platform/network/curl/ResourceHandleManager.cpp:
2934         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2935
2936 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2937
2938         Export systemTotalMemory() and systemMemoryLevel() for MobileSafari
2939         https://bugs.webkit.org/show_bug.cgi?id=127360
2940
2941         Reviewed by Andy Estes.
2942         
2943         MobileSafari inappropriately calls these WebCore functions directly,
2944         so export them.
2945
2946         * WebCore.exp.in:
2947
2948 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2949
2950         Clean up PLATFORM(IOS) code related to the custom fixed position layout rect
2951         https://bugs.webkit.org/show_bug.cgi?id=127362
2952
2953         Reviewed by Dave Hyatt.
2954
2955         Various platforms customize the rect used to layout position:fixed elements,
2956         and each modified RenderBox::availableLogicalHeight/WidthUsing() in different
2957         ways.
2958         
2959         Clean this up by adding RenderView::clientLogicalWidth/HeightForFixedPosition(),
2960         and moving the platform hacks into it.
2961
2962         * rendering/RenderBox.cpp:
2963         (WebCore::RenderBox::availableLogicalHeightUsing):
2964         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2965         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2966         * rendering/RenderView.cpp:
2967         (WebCore::RenderView::clientLogicalWidthForFixedPosition):
2968         (WebCore::RenderView::clientLogicalHeightForFixedPosition):
2969         * rendering/RenderView.h:
2970
2971 2014-01-21  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2972
2973         ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
2974         <https://webkit.org/b/108184>
2975
2976         Reviewed by Philip Rogers.
2977
2978         In the case a SMILElement timing had a syncbase dependency on an indefinite value
2979         the assert were raised. The assert has been removed and a check has been added
2980         instead that prevents the addition of indefinite times to the time list.
2981
2982         Test: svg/animations/smil-syncbase-self-dependency.svg
2983
2984         * svg/animation/SVGSMILElement.cpp:
2985         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
2986           ASSERT removed.
2987
2988 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2989
2990         Address late review naming comments after r162453.
2991
2992         * WebCore.xcodeproj/project.pbxproj:
2993         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2994         * platform/graphics/mac/CALayerWebAdditions.h: Removed.
2995         * platform/graphics/mac/CALayerWebAdditions.mm: Removed.
2996         * platform/graphics/mac/WebCoreCALayerExtras.h: Added.
2997         * platform/graphics/mac/WebCoreCALayerExtras.mm: Added.
2998         (-[CALayer web_disableAllActions]):
2999
3000 2014-01-21  Tim Horton  <timothy_horton@apple.com>
3001
3002         Keep CALayer implicit animation disabling code in a single place
3003         https://bugs.webkit.org/show_bug.cgi?id=127355
3004
3005         Reviewed by Simon Fraser.
3006
3007         * WebCore.xcodeproj/project.pbxproj:
3008         Add CALayerWebAdditions.{h,mm}.
3009
3010         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3011         (PlatformCALayerMac::commonInit):
3012         Remove nullActionsDictionary() and use [CALayer(WebAdditions) web_disableAllActions] instead.
3013
3014         * platform/graphics/mac/CALayerWebAdditions.h: Added.
3015         * platform/graphics/mac/CALayerWebAdditions.mm: Added.
3016         (-[CALayer web_disableAllActions]):
3017         Added. Disable all implicit actions on the layer.
3018
3019 2014-01-21  Gavin Barraclough  <barraclough@apple.com>
3020
3021         Change Page, FocusController to use ViewState
3022         https://bugs.webkit.org/show_bug.cgi?id=126533
3023
3024         Reviewed by Tim Horton.
3025
3026         These classes currently maintain a set of separate fields to represent the view state;
3027         combine these into a single field, and allow WebPage to send the combined update rather
3028         than individual changes.
3029
3030         Maintain existing interface for WebKit1 clients.
3031
3032         * WebCore.exp.in:
3033             - Added WebCore::setViewState, removed WebCore::setIsVisuallyIdle.
3034         * page/FocusController.cpp:
3035         (WebCore::FocusController::FocusController):
3036             - Initialize combined m_viewState.
3037         (WebCore::FocusController::setFocused):
3038             - Calls setViewState.
3039         (WebCore::FocusController::setFocusedInternal):
3040             - setFocused -> setFocusedInternal.
3041         (WebCore::FocusController::setViewState):
3042             - Added, update all ViewState flags.
3043         (WebCore::FocusController::setActive):
3044             - Calls setViewState.
3045         (WebCore::FocusController::setActiveInternal):
3046             - setActive -> setActiveInternal.
3047         (WebCore::FocusController::setContentIsVisible):
3048             - Calls setViewState.
3049         (WebCore::FocusController::setContentIsVisibleInternal):
3050             - setContentIsVisible -> setContentIsVisibleInternal.
3051         * page/FocusController.h:
3052         (WebCore::FocusController::isActive):
3053         (WebCore::FocusController::isFocused):
3054         (WebCore::FocusController::contentIsVisible):
3055             - Implemented in terms of ViewState.
3056         * page/Page.cpp:
3057         (WebCore::Page::Page):
3058             - Initialize using PageInitialViewState.
3059         (WebCore::Page::setIsInWindow):
3060             - Calls setViewState.
3061         (WebCore::Page::setIsInWindowInternal):
3062             - setIsInWindow -> setIsInWindowInternal.
3063         (WebCore::Page::setIsVisuallyIdleInternal):
3064             - setIsVisuallyIdle -> setIsVisuallyIdleInternal.
3065         (WebCore::Page::setViewState):
3066             - Added, update all ViewState flags, including FocusController.
3067         (WebCore::Page::setIsVisible):
3068             - Calls setViewState.
3069         (WebCore::Page::setIsVisibleInternal):
3070             - setIsVisible -> setIsVisibleInternal.
3071         (WebCore::Page::visibilityState):
3072             - m_isVisible -> isVisible()
3073         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
3074             - m_isVisible -> isVisible()
3075         * page/Page.h:
3076         (WebCore::Page::isVisible):
3077         (WebCore::Page::isInWindow):
3078             - Implemented in terms of ViewState.
3079         (WebCore::Page::scriptedAnimationsSuspended):
3080             - Combined member fields into ViewState::Flags.
3081
3082 2014-01-21  Lauro Neto  <lauro.neto@openbossa.org>
3083
3084         Remove PLATFORM(NIX) from WebCore
3085         https://bugs.webkit.org/show_bug.cgi?id=127299
3086
3087         Reviewed by Anders Carlsson.
3088
3089         * editing/Editor.cpp:
3090         (WebCore::Editor::cut):
3091         (WebCore::Editor::copy):
3092         (WebCore::Editor::copyImage):
3093         * editing/Editor.h:
3094         * html/HTMLCanvasElement.h:
3095         * loader/EmptyClients.h:
3096         * loader/FrameLoader.cpp:
3097         (WebCore::FrameLoader::defaultObjectContentType):
3098         * page/ChromeClient.h:
3099         * page/DragController.cpp:
3100         (WebCore::DragController::startDrag):
3101         * platform/Cursor.h:
3102         * platform/DragData.h:
3103         * platform/DragImage.h:
3104         * platform/FileSystem.h:
3105         * platform/LocalizedStrings.h:
3106         * platform/Widget.h:
3107         * platform/audio/FFTFrame.h:
3108         * platform/audio/HRTFElevation.cpp:
3109         * platform/cairo/WidgetBackingStore.h:
3110         * platform/graphics/ANGLEWebKitBridge.h:
3111         * platform/graphics/FontPlatformData.h:
3112         * platform/graphics/GLContext.cpp:
3113         (WebCore::GLContext::createContextForWindow):
3114         * platform/graphics/GLContext.h:
3115         * platform/graphics/GraphicsContext3D.h:
3116         * platform/graphics/GraphicsContext3DPrivate.cpp:
3117         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3118         * platform/graphics/OpenGLESShims.h:
3119         * platform/graphics/OpenGLShims.cpp:
3120         (WebCore::getProcAddress):
3121         * platform/graphics/OpenGLShims.h:
3122         * platform/graphics/PlatformLayer.h:
3123         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3124         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3125         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
3126         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
3127         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
3128         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
3129         (WebCore::Extensions3DOpenGL::supportsExtension):
3130         * platform/graphics/opengl/Extensions3DOpenGL.h:
3131         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3132         * platform/graphics/opengl/Extensions3DOpenGLES.h:
3133         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3134         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3135         (WebCore::GraphicsContext3D::reshape):
3136         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
3137         * platform/graphics/texmap/TextureMapper.h:
3138         * platform/network/ResourceHandle.h:
3139         * plugins/PluginPackage.cpp:
3140         * plugins/PluginView.cpp:
3141         (WebCore::PluginView::PluginView):
3142         * plugins/PluginView.h:
3143         * plugins/PluginViewNone.cpp:
3144         * rendering/SimpleLineLayout.cpp:
3145         (WebCore::SimpleLineLayout::canUseFor):
3146
3147 2014-01-21  Eric Carlson  <eric.carlson@apple.com>
3148
3149         Add &lrm; &rlm; and &nbsp; to WebVTT parser
3150         https://bugs.webkit.org/show_bug.cgi?id=85112
3151
3152         Reviewed by Jer Noble.
3153
3154         No new tests, track-webvtt-tc022-entities.html was updated to test this.
3155
3156         * html/track/WebVTTTokenizer.cpp:
3157         (WebCore::WebVTTTokenizer::nextToken): Support RLM, LRM, and NBSP entities.
3158
3159 2014-01-21  Commit Queue  <commit-queue@webkit.org>
3160
3161         Unreviewed, rolling out r162354.
3162         http://trac.webkit.org/changeset/162354
3163         https://bugs.webkit.org/show_bug.cgi?id=127354
3164
3165         Appears to have broken accessibility in a non-trivial way
3166         (Requested by ap on #webkit).
3167
3168         * platform/ScrollView.cpp:
3169         (WebCore::ScrollView::updateScrollbars):
3170
3171 2014-01-21  Commit Queue  <commit-queue@webkit.org>
3172
3173         Unreviewed, rolling out r162445.
3174         http://trac.webkit.org/changeset/162445
3175         https://bugs.webkit.org/show_bug.cgi?id=127351
3176
3177         It broke the 32 bit GTK build (Requested by Ossy on #webkit).
3178
3179         * rendering/style/StyleRareInheritedData.cpp:
3180
3181 2014-01-21  László Langó  <llango.u-szeged@partner.samsung.com>
3182
3183         Wrong struct size when CSS_IMAGE_ORIENTATION and CSS3_TEXT_DECORATION are enabled.
3184         https://bugs.webkit.org/show_bug.cgi?id=127346
3185
3186         Efl build fix.
3187
3188         Reviewed by Csaba Osztrogonác.
3189
3190         * rendering/style/StyleRareInheritedData.cpp:
3191
3192 2014-01-21  Antti Koivisto  <antti@apple.com>
3193
3194         Delay initial layer flush during loading on all platforms
3195         https://bugs.webkit.org/show_bug.cgi?id=127347
3196
3197         Reviewed by Andreas Kling.
3198
3199         To reduce unnecessary repaints enable the same behaviour as iOS already has.
3200
3201         * rendering/RenderLayerCompositor.cpp:
3202         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3203         
3204             Set the initial state of m_layerFlushThrottlingEnabled correctly.
3205
3206         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
3207         (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded):
3208         * rendering/RenderLayerCompositor.h:
3209         
3210             Enable initial layer flush delay on all platforms.
3211
3212 2014-01-21  Mihai Tica  <mitica@adobe.com>
3213
3214         If you set a tiled cross-faded-image or a tiled gradient as
3215         a background layer, -webkit-background-blend-mode doesn't work.
3216         The problem consists in the blendMode parameter not being set
3217         for these specific drawing paths.
3218
3219         https://bugs.webkit.org/show_bug.cgi?id=126888
3220         Reviewed by Dirk Schulze.
3221
3222         Test: css3/compositing/background-blend-mode-tiled-layers.html
3223
3224         * platform/graphics/CrossfadeGeneratedImage.cpp:
3225         (WebCore::CrossfadeGeneratedImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern.
3226         * platform/graphics/GradientImage.cpp:
3227         (WebCore::GradientImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern.
3228         * platform/graphics/ImageBuffer.h: Add a BlendMode parameter to the drawPattern method.
3229         * platform/graphics/cairo/ImageBufferCairo.cpp:
3230         (WebCore::ImageBuffer::drawPattern): Add the default BlendMode parameter to the method declaration.
3231         * platform/graphics/cg/ImageBufferCG.cpp:
3232         (WebCore::ImageBuffer::drawPattern): Add and use the blendMode parameter for all the code paths.
3233         * platform/graphics/wince/ImageBufferWinCE.cpp:
3234         (WebCore::BufferedImage::drawPattern): Add the default BlendMode parameter to the method declaration.
3235
3236 2014-01-21  Gurpreet Kaur  <k.gurpreet@samsung.com>
3237
3238         The WebCore.vcxproj.filters doesnot apply
3239         https://bugs.webkit.org/show_bug.cgi?id=127338
3240
3241         Reviewed by Csaba Osztrogonác.
3242
3243         * WebCore.vcxproj/WebCore.vcxproj.filters:
3244         Modified the WebCore.vcxproj.filters so that it is applied when loading
3245         WebCore.vcxproj file.
3246
3247 2014-01-21  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3248
3249         Fix SVG animations which set rx or ry attributes
3250         https://bugs.webkit.org/show_bug.cgi?id=127337
3251
3252         Reviewed by Dirk Schulze.
3253
3254         Test: svg/stroke/animated-non-scaling-rxry.html
3255
3256         Merged from Blink: https://src.chromium.org/viewvc/blink?revision=152376&view=revision
3257
3258         * rendering/svg/RenderSVGRect.cpp:
3259         (WebCore::RenderSVGRect::updateShapeFromElement):
3260         * rendering/svg/SVGPathData.cpp:
3261         (WebCore::updatePathFromRectElement):
3262
3263 2014-01-21  Krzysztof Czech  <k.czech@samsung.com>
3264
3265         [ATK] Expose aria-flowto through ATK_RELATION_FLOWS_TO
3266         https://bugs.webkit.org/show_bug.cgi?id=127291
3267
3268         Reviewed by Mario Sanchez Prada.
3269
3270         Test: accessibility/aria-flowto.html
3271
3272         Expose aria-flowto through ATK_RELATION_FLOWS_TO according to
3273         http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
3274
3275         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3276         (setAtkRelationSetFromCoreObject):
3277
3278 2014-01-20  Ryuan Choi  <ryuan.choi@samsung.com>
3279
3280         [CMAKE] Remove Nix from CMake scripts
3281         https://bugs.webkit.org/show_bug.cgi?id=127264
3282
3283         Reviewed by Anders Carlsson.
3284
3285         * CMakeLists.txt:
3286
3287 2014-01-20  Anders Carlsson  <andersca@apple.com>
3288
3289         Remove an unused PageGroup function
3290         https://bugs.webkit.org/show_bug.cgi?id=127327
3291
3292         Reviewed by Andreas Kling.
3293
3294         * WebCore.exp.in:
3295         * page/PageGroup.cpp:
3296         * page/PageGroup.h:
3297
3298 2014-01-20  Anders Carlsson  <andersca@apple.com>
3299
3300         Move user style sheet handling to UserContentController
3301         https://bugs.webkit.org/show_bug.cgi?id=127322
3302         <rdar://problem/15861296>
3303
3304         Reviewed by Andreas Kling.
3305
3306         * dom/DocumentStyleSheetCollection.cpp:
3307         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
3308         * page/PageGroup.cpp:
3309         (WebCore::PageGroup::addUserStyleSheetToWorld):
3310         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
3311         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
3312         (WebCore::PageGroup::removeAllUserContent):
3313         * page/PageGroup.h:
3314         * page/UserContentController.cpp:
3315         (WebCore::UserContentController::addUserStyleSheet):
3316         (WebCore::UserContentController::removeUserStyleSheet):
3317         (WebCore::UserContentController::removeUserStyleSheets):
3318         (WebCore::UserContentController::removeAllUserContent):
3319         (WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFrames):
3320         * page/UserContentController.h:
3321         (WebCore::UserContentController::userStyleSheets):
3322
3323 2014-01-20  Benjamin Poulain  <benjamin@webkit.org>
3324
3325         Add a nicer way to iterate over all the attributes of an element
3326         https://bugs.webkit.org/show_bug.cgi?id=127266
3327
3328         Reviewed by Geoffrey Garen.
3329
3330         When using Element::attributeAt() in a loop, the compiler had to generate two kinds of
3331         accessor:
3332         -If the element data is unique, the length and data comes from the attribute Vector.
3333         -If the element data is shared, the data comes from the tail of elementData itself.
3334
3335         The choice was done for every access, which caused the assembly to be a little
3336         hard to follow.
3337         This patch unify the data access by doing everything as a array pointer with offset (getting
3338         that data from Vector when necessary).
3339
3340         To make it easier to do the right thing, a new iterator was added so that range-based loops
3341         can replace all the faulty cases.
3342
3343         * css/SelectorChecker.cpp:
3344         (WebCore::anyAttributeMatches):
3345         * css/SelectorChecker.h:
3346         (WebCore::SelectorChecker::checkExactAttribute):
3347         * dom/DatasetDOMStringMap.cpp:
3348         (WebCore::DatasetDOMStringMap::getNames):
3349         (WebCore::DatasetDOMStringMap::item):
3350         (WebCore::DatasetDOMStringMap::contains):
3351         * dom/Element.cpp:
3352         (WebCore::Element::normalizeAttributes):
3353         (WebCore::Element::detachAllAttrNodesFromElement):
3354         (WebCore::Element::cloneAttributesFromElement):
3355         * dom/Element.h:
3356         (WebCore::Element::attributesIterator):
3357         * dom/ElementData.cpp:
3358         (WebCore::ElementData::isEquivalent):
3359         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
3360         * dom/ElementData.h:
3361         (WebCore::AttributeConstIterator::AttributeConstIterator):
3362         (WebCore::AttributeConstIterator::operator*):
3363         (WebCore::AttributeConstIterator::operator->):
3364         (WebCore::AttributeConstIterator::operator++):
3365         (WebCore::AttributeConstIterator::operator==):
3366         (WebCore::AttributeConstIterator::operator!=):
3367         (WebCore::AttributeIteratorAccessor::AttributeIteratorAccessor):
3368         (WebCore::AttributeIteratorAccessor::begin):
3369         (WebCore::AttributeIteratorAccessor::end):
3370         (WebCore::ElementData::attributesIterator):
3371         * dom/Node.cpp:
3372         (WebCore::Node::isDefaultNamespace):
3373         (WebCore::Node::lookupNamespaceURI):
3374         (WebCore::Node::lookupNamespacePrefix):
3375         (WebCore::Node::compareDocumentPosition):
3376         * dom/StyledElement.cpp:
3377         (WebCore::StyledElement::makePresentationAttributeCacheKey):
3378         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
3379         * editing/MarkupAccumulator.cpp:
3380         (WebCore::MarkupAccumulator::appendElement):
3381         * editing/markup.cpp:
3382         (WebCore::completeURLs):
3383         (WebCore::StyledMarkupAccumulator::appendElement):
3384         * html/HTMLEmbedElement.cpp:
3385         (WebCore::HTMLEmbedElement::parametersForPlugin):
3386         * html/HTMLObjectElement.cpp:
3387         (WebCore::HTMLObjectElement::parametersForPlugin):
3388         * inspector/DOMPatchSupport.cpp:
3389         (WebCore::DOMPatchSupport::innerPatchNode):
3390         (WebCore::DOMPatchSupport::createDigest):
3391         * inspector/InspectorDOMAgent.cpp:
3392         (WebCore::InspectorDOMAgent::setAttributesAsText):
3393         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
3394         * inspector/InspectorNodeFinder.cpp:
3395         (WebCore::InspectorNodeFinder::matchesElement):
3396         * page/PageSerializer.cpp:
3397         (WebCore::isCharsetSpecifyingNode):
3398         * xml/XPathNodeSet.cpp:
3399         (WebCore::XPath::NodeSet::traversalSort):
3400         * xml/XPathStep.cpp:
3401         (WebCore::XPath::Step::nodesInAxis):
3402         * xml/parser/XMLDocumentParserLibxml2.cpp:
3403         (WebCore::XMLDocumentParser::XMLDocumentParser):
3404
3405 2014-01-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3406
3407         Do refactor in collectGradientAttributes() and renderStyleForLengthResolve()
3408         https://bugs.webkit.org/show_bug.cgi?id=126869
3409
3410         Reviewed by Dirk Schulze.
3411
3412         Some SVG functions have done a first iteration by using a boolean flag. This is
3413         one of poor implementations. This patch fix it by extracting a logic into a new method.
3414         Additionally it would be good to use do-while() loop instead of using while() in
3415         renderStyleForLengthResolving() because a first condition is always true.
3416
3417         Merge r165358 from blink.
3418
3419         * svg/SVGLengthContext.cpp:
3420         (WebCore::renderStyleForLengthResolving):
3421         * svg/SVGLinearGradientElement.cpp:
3422         (WebCore::setGradientAttributes):
3423         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
3424         * svg/SVGRadialGradientElement.cpp:
3425         (WebCore::setGradientAttributes):
3426         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
3427
3428 2014-01-20  Anders Carlsson  <andersca@apple.com>
3429
3430         UserContentController should keep track of user scripts
3431         https://bugs.webkit.org/show_bug.cgi?id=127317
3432         <rdar://problem/15861296>
3433
3434         Reviewed by Andreas Kling.
3435
3436         Move handling of user scripts from PageGroup to UserContentController.
3437
3438         * page/Frame.cpp:
3439         (WebCore::Frame::injectUserScripts):
3440         * page/PageGroup.cpp:
3441         (WebCore::PageGroup::addUserScriptToWorld):
3442         (WebCore::PageGroup::removeUserScriptFromWorld):
3443         (WebCore::PageGroup::removeUserScriptsFromWorld):
3444         (WebCore::PageGroup::removeAllUserContent):
3445         * page/PageGroup.h:
3446         * page/UserContentController.cpp:
3447         (WebCore::UserContentController::addUserScript):
3448         (WebCore::UserContentController::removeUserScript):
3449         (WebCore::UserContentController::removeUserScripts):
3450         (WebCore::UserContentController::removeAllUserContent):
3451         * page/UserContentController.h:
3452         (WebCore::UserContentController::userScripts):
3453
3454 2014-01-20  Anders Carlsson  <andersca@apple.com>
3455
3456         Give each page a UserContentController
3457         https://bugs.webkit.org/show_bug.cgi?id=127315
3458         <rdar://problem/15861296>
3459
3460         Reviewed by Andreas Kling.
3461
3462         Add a UserContentController object to PageGroup and have the page group set it on any
3463         pages that are added to the page group.
3464
3465         This is another step towards moving handling of user content away from PageGroup and make it
3466         possible for each page to have different user content.
3467
3468         * page/Page.cpp:
3469         (WebCore::Page::~Page):
3470         (WebCore::Page::setUserContentController):
3471         * page/Page.h:
3472         (WebCore::Page::userContentController):
3473         * page/PageGroup.cpp:
3474         (WebCore::PageGroup::PageGroup):
3475         (WebCore::PageGroup::addPage):
3476         (WebCore::PageGroup::removePage):
3477         * page/PageGroup.h:
3478         * page/UserContentController.cpp:
3479         (WebCore::UserContentController::addPage):
3480         (WebCore::UserContentController::removePage):
3481         * page/UserContentController.h:
3482
3483 2014-01-20  Jeremy Jones  <jeremyj@apple.com>
3484
3485         Add AVKit fullscreen video interface.
3486         https://bugs.webkit.org/show_bug.cgi?id=126818
3487
3488         Reviewed by Eric Carlson.
3489
3490         No new tests, no observable change in functionality.
3491
3492         * WebCore.exp.in:
3493         * WebCore.xcodeproj/project.pbxproj:
3494         * html/HTMLMediaElement.cpp:
3495         (WebCore::HTMLMediaElement::parseAttribute):
3496         * html/HTMLMediaElement.h:
3497         Add ability for fullscreen to borrow the AVPlayerLayer.
3498         * page/Settings.cpp:
3499         * page/Settings.h:
3500         (WebCore::Settings::setMediaPlaybackFullscreenAVKit):
3501         (WebCore::Settings::mediaPlaybackFullscreenAVKit):
3502         Add a disabled setting.
3503         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3504         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
3505         Enabled fullscreen for iOS.
3506         * platform/ios/WebVideoFullscreenControllerAVKit.h: Added.
3507         * platform/ios/WebVideoFullscreenControllerAVKit.mm: Added.
3508         (-[WebAVPlayerController init]):
3509         (-[WebAVPlayerController dealloc]):
3510         (-[WebAVPlayerController forwardingTargetForSelector:]):
3511         (-[WebAVPlayerController shouldDismissForDone]):
3512         (-[WebAVPlayerController play:]):
3513         (-[WebAVPlayerController pause:]):
3514         (-[WebAVPlayerController togglePlayback:]):
3515         (-[WebAVPlayerController isPlaying]):
3516         (-[WebAVPlayerController setPlaying:]):
3517         (+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
3518         (-[WebAVPlayerController seekToTime:]):
3519         (-[WebAVPlayerController updateTimingWithCurrentTime:]):
3520         (-[WebAVPlayerController effectiveRate]):
3521         (-[WebAVPlayerController setMediaElement:]):
3522         (-[WebAVPlayerController handleEvent:]):
3523         (-[WebVideoFullscreenController init]):
3524         (-[WebVideoFullscreenController dealloc]):
3525         (-[WebVideoFullscreenController setMediaElement:]):
3526         (-[WebVideoFullscreenController mediaElement]):
3527         (-[WebVideoFullscreenController enterFullscreen:]):
3528         (-[WebVideoFullscreenController exitFullscreen]):
3529         Add WebAVPlayerController for HTMLMediaElememt to interface with AVPlayerViewController.
3530
3531 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3532
3533         Replace uses of std::forward<T>(), std::unique_ptr<T>::clear() that landed in r162368
3534         https://bugs.webkit.org/show_bug.cgi?id=127306
3535
3536         Reviewed by Darin Adler.
3537
3538         Address the post-landing reviews of the r162368 commit that moved WebAudio source code to using std::unique_ptr.
3539         std::move() should be used instead of std::forward<T>() in HRTFKernel::create().
3540         Instead of calling std::unique_ptr<T>::reset(), nullptr should be assigned to that smart pointer to reset it.
3541
3542         * Modules/webaudio/ConvolverNode.cpp:
3543         (WebCore::ConvolverNode::uninitialize):
3544         * Modules/webaudio/DynamicsCompressorNode.cpp:
3545         (WebCore::DynamicsCompressorNode::uninitialize):
3546         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3547         (WebCore::MediaElementAudioSourceNode::setFormat):
3548         * Modules/webaudio/PannerNode.cpp:
3549         (WebCore::PannerNode::uninitialize):
3550         * platform/audio/AudioChannel.h:
3551         (WebCore::AudioChannel::set):
3552         * platform/audio/HRTFDatabaseLoader.cpp:
3553         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3554         * platform/audio/HRTFKernel.h:
3555         (WebCore::HRTFKernel::create):
3556
3557 2014-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3558
3559         Modernize WebCore/inspector with nullptr
3560         https://bugs.webkit.org/show_bug.cgi?id=127303
3561
3562         Reviewed by Anders Carlsson.
3563
3564         Ran clang-modernize -use-nullptr over WebCore/inspector.
3565
3566         * inspector/ConsoleMessage.cpp:
3567         (WebCore::ConsoleMessage::ConsoleMessage):
3568         * inspector/ConsoleMessage.h:
3569         * inspector/ContentSearchUtils.cpp:
3570         (WebCore::ContentSearchUtils::findMagicComment):
3571         * inspector/DOMEditor.cpp:
3572         (WebCore::DOMEditor::SetOuterHTMLAction::SetOuterHTMLAction):
3573         * inspector/DOMPatchSupport.cpp:
3574         (WebCore::DOMPatchSupport::patchDocument):
3575         (WebCore::DOMPatchSupport::patchNode):
3576         (WebCore::DOMPatchSupport::diff):
3577         (WebCore::DOMPatchSupport::innerPatchChildren):
3578         * inspector/InspectorApplicationCacheAgent.cpp:
3579         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
3580         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
3581         * inspector/InspectorCanvasAgent.cpp:
3582         (WebCore::InspectorCanvasAgent::disable):
3583         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
3584         (WebCore::InspectorCanvasAgent::frameNavigated):
3585         * inspector/InspectorConsoleAgent.cpp:
3586         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
3587         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
3588         (WebCore::InspectorConsoleAgent::clearMessages):
3589         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
3590         (WebCore::InspectorConsoleAgent::didReceiveResponse):
3591         (WebCore::InspectorConsoleAgent::didFailLoading):
3592         * inspector/InspectorConsoleAgent.h:
3593         * inspector/InspectorController.cpp:
3594         (WebCore::InspectorController::inspectedPageDestroyed):
3595         * inspector/InspectorDOMDebuggerAgent.cpp:
3596         (WebCore::InspectorDOMDebuggerAgent::disable):
3597         (WebCore::InspectorDOMDebuggerAgent::discardAgent):
3598         * inspector/InspectorDOMStorageAgent.cpp:
3599         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
3600         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
3601         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
3602         (WebCore::InspectorDOMStorageAgent::findStorageArea):
3603         * inspector/InspectorDatabaseAgent.cpp:
3604         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
3605         (WebCore::InspectorDatabaseAgent::findByFileName):
3606         (WebCore::InspectorDatabaseAgent::databaseForId):
3607         * inspector/InspectorDebuggerAgent.cpp:
3608         (WebCore::InspectorDebuggerAgent::addMessageToConsole):
3609         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3610         (WebCore::InspectorDebuggerAgent::didParseSource):
3611         (WebCore::InspectorDebuggerAgent::didContinue):
3612         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
3613         * inspector/InspectorFrontendHost.cpp:
3614         (WebCore::FrontendMenuProvider::disconnect):
3615         (WebCore::InspectorFrontendHost::InspectorFrontendHost):
3616         (WebCore::InspectorFrontendHost::disconnectClient):
3617         * inspector/InspectorHeapProfilerAgent.cpp:
3618         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
3619         * inspector/InspectorIndexedDBAgent.cpp:
3620         (WebCore::assertDocument):
3621         (WebCore::assertIDBFactory):
3622         (WebCore::InspectorIndexedDBAgent::requestData):
3623         * inspector/InspectorInstrumentation.cpp:
3624         (WebCore::frameForScriptExecutionContext):
3625         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
3626         (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
3627         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
3628         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
3629         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
3630         (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
3631         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
3632         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
3633         * inspector/InspectorInstrumentation.h:
3634         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
3635         (WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
3636         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
3637         * inspector/InspectorLayerTreeAgent.cpp:
3638         (WebCore::InspectorLayerTreeAgent::disable):
3639         * inspector/InspectorNodeFinder.cpp:
3640         (WebCore::InspectorNodeFinder::searchUsingXPath):
3641         * inspector/InspectorOverlay.cpp:
3642         (WebCore::buildObjectForElementInfo):
3643         * inspector/InspectorPageAgent.cpp:
3644         (WebCore::InspectorPageAgent::cachedResourceContent):
3645         (WebCore::InspectorPageAgent::sharedBufferContent):
3646         (WebCore::InspectorPageAgent::disable):
3647         (WebCore::InspectorPageAgent::frameForId):
3648         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
3649         * inspector/InspectorProfilerAgent.cpp:
3650         (WebCore::InspectorProfilerAgent::~InspectorProfilerAgent):
3651         * inspector/InspectorProfilerAgent.h:
3652         * inspector/InspectorResourceAgent.cpp:
3653         (WebCore::buildObjectForResourceResponse):
3654         (WebCore::InspectorResourceAgent::willSendRequest):
3655         (WebCore::InspectorResourceAgent::didReceiveResponse):
3656         (WebCore::InspectorResourceAgent::didFinishLoading):
3657         (WebCore::InspectorResourceAgent::didFailLoading):
3658         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3659         (WebCore::InspectorResourceAgent::disable):
3660         * inspector/InspectorRuntimeAgent.cpp:
3661         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3662         * inspector/InspectorStyleSheet.cpp:
3663         (ParsedStyleSheet::ruleSourceDataAt):
3664         (WebCore::buildSourceRangeObject):
3665         (WebCore::asCSSRuleList):
3666         (WebCore::fillMediaListChain):
3667         (WebCore::InspectorStyle::setPropertyText):
3668         (WebCore::InspectorStyle::populateAllProperties):
3669         (WebCore::InspectorStyle::extractSourceData):
3670         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
3671         (WebCore::InspectorStyleSheet::addRule):
3672         (WebCore::InspectorStyleSheet::ruleForId):
3673         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3674         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3675         (WebCore::InspectorStyleSheet::buildObjectForRule):
3676         (WebCore::InspectorStyleSheet::styleForId):
3677         (WebCore::InspectorStyleSheet::inspectorStyleForId):
3678         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3679         * inspector/InspectorStyleSheet.h:
3680         (WebCore::InspectorCSSId::asProtocolValue):
3681         * inspector/InspectorTimelineAgent.cpp:
3682         (WebCore::InspectorTimelineAgent::stop):
3683         (WebCore::InspectorTimelineAgent::willComposite):
3684         (WebCore::InspectorTimelineAgent::page):
3685         * inspector/InspectorWorkerAgent.cpp:
3686         (WebCore::InspectorWorkerAgent::~InspectorWorkerAgent):
3687         * inspector/InstrumentingAgents.cpp:
3688         (WebCore::InstrumentingAgents::InstrumentingAgents):
3689         (WebCore::InstrumentingAgents::reset):
3690         * inspector/NetworkResourcesData.cpp:
3691         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
3692         (WebCore::NetworkResourcesData::xhrReplayData):
3693         (WebCore::NetworkResourcesData::removeCachedResource):
3694         (WebCore::NetworkResourcesData::resourceDataForRequestId):
3695         * inspector/PageConsoleAgent.cpp:
3696         (WebCore::PageConsoleAgent::~PageConsoleAgent):
3697         * inspector/PageDebuggerAgent.cpp:
3698         (WebCore::PageDebuggerAgent::disable):
3699         * inspector/PageRuntimeAgent.cpp:
3700         (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
3701         (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
3702         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3703         * inspector/ScriptArguments.cpp:
3704         (WebCore::ScriptArguments::globalState):
3705         * inspector/WorkerRuntimeAgent.cpp:
3706         (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
3707
3708 2014-01-20  Anders Carlsson  <andersca@apple.com>
3709
3710         Add empty UserContentController class
3711         https://bugs.webkit.org/show_bug.cgi?id=127300
3712         <rdar://problem/15861296>
3713
3714         Reviewed by Dan Bernstein.
3715
3716         This is the first step towards moving handling of user scripts and style sheets from
3717         the page group to a separate objects and ultimately make them be settable per page instead of per page group.
3718
3719         * CMakeLists.txt:
3720         * GNUmakefile.list.am:
3721         * WebCore.vcxproj/WebCore.vcxproj:
3722         * WebCore.vcxproj/WebCore.vcxproj.filters:
3723         * WebCore.xcodeproj/project.pbxproj:
3724         * page/UserContentController.cpp: Added.
3725         (WebCore::UserContentController::create):
3726         (WebCore::UserContentController::UserContentController):
3727         (WebCore::UserContentController::~UserContentController):
3728         * page/UserContentController.h: Added.
3729
3730 2014-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3731
3732         Run clang-modernize and let it add a bunch of missing overrides in WebCore/inspector
3733         https://bugs.webkit.org/show_bug.cgi?id=127206
3734
3735         Reviewed by Anders Carlsson.
3736
3737         Let clang-modernize add overrides.
3738
3739         * inspector/DOMEditor.cpp:
3740         * inspector/InspectorApplicationCacheAgent.h:
3741         * inspector/InspectorCSSAgent.h:
3742         * inspector/InspectorCanvasAgent.h:
3743         * inspector/InspectorConsoleAgent.h:
3744         * inspector/InspectorDOMAgent.h:
3745         * inspector/InspectorDOMDebuggerAgent.h:
3746         * inspector/InspectorDOMStorageAgent.h:
3747         * inspector/InspectorDatabaseAgent.cpp:
3748         * inspector/InspectorDatabaseAgent.h:
3749         * inspector/InspectorDebuggerAgent.h:
3750         * inspector/InspectorFrontendHost.cpp:
3751         * inspector/InspectorHeapProfilerAgent.cpp:
3752         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
3753         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
3754         * inspector/InspectorHeapProfilerAgent.h:
3755         * inspector/InspectorHistory.cpp:
3756         * inspector/InspectorIndexedDBAgent.cpp:
3757         * inspector/InspectorIndexedDBAgent.h:
3758         * inspector/InspectorInputAgent.h:
3759         * inspector/InspectorLayerTreeAgent.h:
3760         * inspector/InspectorMemoryAgent.h:
3761         * inspector/InspectorPageAgent.h:
3762         * inspector/InspectorProfilerAgent.cpp:
3763         * inspector/InspectorProfilerAgent.h:
3764         * inspector/InspectorResourceAgent.h:
3765         * inspector/InspectorRuntimeAgent.h:
3766         * inspector/InspectorStyleSheet.h:
3767         * inspector/InspectorTimelineAgent.h:
3768         * inspector/InspectorWorkerAgent.cpp:
3769         * inspector/InspectorWorkerAgent.h:
3770         * inspector/PageConsoleAgent.h:
3771         * inspector/PageDebuggerAgent.h:
3772         * inspector/PageRuntimeAgent.h:
3773         * inspector/WorkerConsoleAgent.h:
3774         * inspector/WorkerDebuggerAgent.cpp:
3775         * inspector/WorkerInspectorController.cpp:
3776         * inspector/WorkerRuntimeAgent.h:
3777
3778 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3779
3780         Move WebAudio source code to std::unique_ptr
3781         https://bugs.webkit.org/show_bug.cgi?id=127274
3782
3783         Reviewed by Eric Carlson.
3784
3785         Move from using OwnPtr and PassOwnPtr to using std::unique_ptr and move semantics
3786         in the WebAudio module and the WebAudio code in the platform layer.
3787
3788         * Modules/webaudio/AsyncAudioDecoder.cpp:
3789         * Modules/webaudio/AsyncAudioDecoder.h:
3790         * Modules/webaudio/AudioBasicInspectorNode.cpp:
3791         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
3792         * Modules/webaudio/AudioBasicProcessorNode.cpp:
3793         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
3794         * Modules/webaudio/AudioBasicProcessorNode.h:
3795         * Modules/webaudio/AudioBufferSourceNode.cpp:
3796         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3797         * Modules/webaudio/AudioContext.cpp:
3798         * Modules/webaudio/AudioContext.h:
3799         * Modules/webaudio/AudioDestinationNode.cpp:
3800         (WebCore::AudioDestinationNode::AudioDestinationNode):
3801         * Modules/webaudio/AudioNode.cpp:
3802         (WebCore::AudioNode::addInput):
3803         (WebCore::AudioNode::addOutput):
3804         (WebCore::AudioNode::checkNumberOfChannelsForInput):
3805         * Modules/webaudio/AudioNode.h:
3806         * Modules/webaudio/BiquadFilterNode.cpp:
3807         (WebCore::BiquadFilterNode::BiquadFilterNode):
3808         * Modules/webaudio/BiquadProcessor.cpp:
3809         (WebCore::BiquadProcessor::createKernel):
3810         (WebCore::BiquadProcessor::getFrequencyResponse):
3811         * Modules/webaudio/BiquadProcessor.h:
3812         * Modules/webaudio/ChannelMergerNode.cpp:
3813         (WebCore::ChannelMergerNode::ChannelMergerNode):
3814         * Modules/webaudio/ChannelSplitterNode.cpp:
3815         (WebCore::ChannelSplitterNode::ChannelSplitterNode):
3816         * Modules/webaudio/ConvolverNode.cpp:
3817         (WebCore::ConvolverNode::ConvolverNode):
3818         (WebCore::ConvolverNode::uninitialize):
3819         (WebCore::ConvolverNode::setBuffer):
3820         * Modules/webaudio/ConvolverNode.h:
3821         * Modules/webaudio/DefaultAudioDestinationNode.h:
3822         * Modules/webaudio/DelayNode.cpp:
3823         (WebCore::DelayNode::DelayNode):
3824         * Modules/webaudio/DelayProcessor.cpp:
3825         (WebCore::DelayProcessor::createKernel):
3826         * Modules/webaudio/DelayProcessor.h:
3827         * Modules/webaudio/DynamicsCompressorNode.cpp:
3828         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
3829         (WebCore::DynamicsCompressorNode::initialize):
3830         (WebCore::DynamicsCompressorNode::uninitialize):
3831         * Modules/webaudio/DynamicsCompressorNode.h:
3832         * Modules/webaudio/GainNode.cpp:
3833         (WebCore::GainNode::GainNode):
3834         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3835         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
3836         (WebCore::MediaElementAudioSourceNode::setFormat):
3837         * Modules/webaudio/MediaElementAudioSourceNode.h:
3838         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
3839         * Modules/webaudio/MediaStreamAudioSource.cpp:
3840         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3841         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
3842         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3843         * Modules/webaudio/OscillatorNode.cpp:
3844         (WebCore::OscillatorNode::OscillatorNode):
3845         * Modules/webaudio/PannerNode.cpp:
3846         (WebCore::PannerNode::PannerNode):
3847         (WebCore::PannerNode::uninitialize):
3848         (WebCore::PannerNode::setPanningModel):
3849         * Modules/webaudio/PannerNode.h:
3850         * Modules/webaudio/PeriodicWave.cpp:
3851         (WebCore::PeriodicWave::createBandLimitedTables):
3852         * Modules/webaudio/PeriodicWave.h:
3853         * Modules/webaudio/RealtimeAnalyser.cpp:
3854         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
3855         (WebCore::RealtimeAnalyser::setFftSize):
3856         * Modules/webaudio/RealtimeAnalyser.h:
3857         * Modules/webaudio/ScriptProcessorNode.cpp:
3858         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
3859         * Modules/webaudio/WaveShaperDSPKernel.cpp:
3860         (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
3861         * Modules/webaudio/WaveShaperDSPKernel.h:
3862         * Modules/webaudio/WaveShaperNode.cpp:
3863         (WebCore::WaveShaperNode::WaveShaperNode):
3864         * Modules/webaudio/WaveShaperProcessor.cpp:
3865         (WebCore::WaveShaperProcessor::createKernel):
3866         * Modules/webaudio/WaveShaperProcessor.h:
3867         * platform/audio/AudioBus.cpp:
3868         (WebCore::AudioBus::AudioBus):
3869         (WebCore::AudioBus::copyWithGainFrom):
3870         * platform/audio/AudioBus.h:
3871         * platform/audio/AudioChannel.cpp:
3872         * platform/audio/AudioChannel.h:
3873         (WebCore::AudioChannel::AudioChannel):
3874         (WebCore::AudioChannel::set):
3875         * platform/audio/AudioDSPKernelProcessor.h:
3876         * platform/audio/AudioDestination.h:
3877         * platform/audio/AudioResampler.cpp:
3878         (WebCore::AudioResampler::AudioResampler):
3879         (WebCore::AudioResampler::configureChannels):
3880         * platform/audio/AudioResampler.h:
3881         * platform/audio/AudioSession.h:
3882         * platform/audio/DynamicsCompressor.cpp:
3883         (WebCore::DynamicsCompressor::setNumberOfChannels):
3884         * platform/audio/DynamicsCompressor.h:
3885         * platform/audio/DynamicsCompressorKernel.cpp:
3886         (WebCore::DynamicsCompressorKernel::setNumberOfChannels):
3887         * platform/audio/DynamicsCompressorKernel.h:
3888         * platform/audio/FFTFrame.cpp:
3889         (WebCore::FFTFrame::createInterpolatedFrame):
3890         * platform/audio/FFTFrame.h:
3891         * platform/audio/HRTFDatabase.cpp:
3892         (WebCore::HRTFDatabase::HRTFDatabase):
3893         * platform/audio/HRTFDatabase.h:
3894         * platform/audio/HRTFDatabaseLoader.cpp:
3895         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3896         (WebCore::HRTFDatabaseLoader::load):
3897         * platform/audio/HRTFDatabaseLoader.h:
3898         * platform/audio/HRTFElevation.cpp:
3899         (WebCore::HRTFElevation::createForSubject):
3900         (WebCore::HRTFElevation::createByInterpolatingSlices):
3901         * platform/audio/HRTFElevation.h:
3902         (WebCore::HRTFElevation::HRTFElevation):
3903         * platform/audio/HRTFKernel.cpp:
3904         (WebCore::HRTFKernel::HRTFKernel):
3905         (WebCore::HRTFKernel::createImpulseResponse):
3906         (WebCore::HRTFKernel::createInterpolatedKernel):
3907         * platform/audio/HRTFKernel.h:
3908         (WebCore::HRTFKernel::create):
3909         (WebCore::HRTFKernel::HRTFKernel):
3910         * platform/audio/MultiChannelResampler.cpp:
3911         (WebCore::MultiChannelResampler::MultiChannelResampler):
3912         * platform/audio/MultiChannelResampler.h:
3913         * platform/audio/Panner.cpp:
3914         (WebCore::Panner::create):
3915         * platform/audio/Panner.h:
3916         * platform/audio/Reverb.cpp:
3917         (WebCore::Reverb::initialize):
3918         * platform/audio/Reverb.h:
3919         * platform/audio/ReverbConvolver.h:
3920         * platform/audio/ReverbConvolverStage.cpp:
3921         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
3922         * platform/audio/ReverbConvolverStage.h:
3923         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3924         (WebCore::AudioDestination::create):
3925         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3926         * platform/audio/ios/AudioDestinationIOS.cpp:
3927         (WebCore::AudioDestination::create):
3928         * platform/audio/ios/AudioSessionIOS.mm:
3929         (WebCore::AudioSession::AudioSession):
3930         * platform/audio/mac/AudioDestinationMac.cpp:
3931         (WebCore::AudioDestination::create):
3932         * platform/audio/mac/AudioDestinationMac.h:
3933         * platform/audio/mac/AudioSessionMac.cpp:
3934         (WebCore::AudioSession::AudioSession):
3935
3936 2014-01-20  Morten Stenshorne  <mstensho@opera.com>
3937
3938         Region based multicol: support explicit column breaks
3939         https://bugs.webkit.org/show_bug.cgi?id=123993
3940
3941         Reviewed by David Hyatt.
3942
3943         Merely supporting insertion of explicit (forced) column breaks in
3944         the region based multicol implementation is really simple: just
3945         hook up with what the CSS regions code is already doing.
3946
3947         However, there is one complication: column balancing. In order to
3948         balance columns as nicely as possible when there are explicit
3949         breaks, we need to figure out between which explicit breaks the
3950         implicit breaks will occur (if there's room for any at all).
3951
3952         Tests: fast/multicol/newmulticol/break-after.html
3953                fast/multicol/newmulticol/break-before.html
3954                fast/multicol/newmulticol/breaks-2-columns-3-no-balancing.html
3955                fast/multicol/newmulticol/breaks-2-columns-3.html
3956                fast/multicol/newmulticol/breaks-3-columns-3.html
3957                fast/multicol/newmulticol/fixed-height-fill-balance-2.html
3958
3959         * rendering/RenderBlockFlow.cpp:
3960         (WebCore::RenderBlockFlow::applyBeforeBreak):
3961         (WebCore::RenderBlockFlow::applyAfterBreak): Use the already
3962         existing region breaking code when inserting breaks in region
3963         based multicol.
3964         * rendering/RenderFlowThread.h:
3965         * rendering/RenderMultiColumnBlock.cpp:
3966         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
3967         (WebCore::RenderMultiColumnBlock::relayoutForPagination): Avoid
3968         re-balancing if the multicol's contents were not laid out. Apart
3969         from being good for performance, this is now necessary because of
3970         how explicit breaks are implemented.
3971         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
3972         Detect if the contents are going to be laid out, or skipped, so
3973         that we can tell if we need to (re-)balance the columns
3974         afterwards.
3975         * rendering/RenderMultiColumnBlock.h:
3976         * rendering/RenderMultiColumnFlowThread.cpp:
3977         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
3978         Locate the appropriate multi-column set and call its
3979         addForcedBreak().
3980         * rendering/RenderMultiColumnFlowThread.h:
3981         * rendering/RenderMultiColumnSet.cpp:
3982         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3983         (WebCore::RenderMultiColumnSet::findRunWithTallestColumns):
3984         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks): Figure
3985         out how many implicit breaks each single "content run" should
3986         contain. The taller the content run, the more implicit breaks.
3987         (WebCore::RenderMultiColumnSet::calculateBalancedHeight): This is
3988         now a const method that only does half of what the old
3989         calculateBalancedHeight() did. The rest (such as actually storing
3990         the new column height) is done by recalculateBalancedHeight().
3991         (WebCore::RenderMultiColumnSet::clearForcedBreaks): Needs to be
3992         called between each layout pass, to clear the list of "content
3993         runs".
3994         (WebCore::RenderMultiColumnSet::addForcedBreak): Only useful when
3995         columns are to be balanced. It receives explicit (forced) breaks
3996         and stores them as "content runs". When layout is done, we'll go
3997         through the list of content runs, and see where implicit breaks
3998         should be inserted (if there's room for any). The goal is to
3999         insert implicit breaks in such a way that the final columns become
4000         as short as possible.
4001         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
4002         Calculates and sets a new balanced column height. This used to be
4003         done directly in calculateBalancedHeight(), but that method is now
4004         const and it now only calculates the new height and returns it.
4005         (WebCore::RenderMultiColumnSet::prepareForLayout):
4006         * rendering/RenderMultiColumnSet.h: Remove old data members
4007         intended for forced breaks (they were unused), and introduce a
4008         "content run" vector instead. A new content run is triggered by an
4009         explicit break. This is only used when column balancing is
4010         enabled. When not balanced, RenderMultiColumnSet doesn't need to
4011         do anything when explicit breaks are inserted.
4012
4013 2014-01-20  Eric Carlson  <eric.carlson@apple.com>
4014
4015         Allow MediaSessionManager to restrict 'preload' behavior
4016         https://bugs.webkit.org/show_bug.cgi?id=127297
4017
4018         Reviewed by Jer Noble.
4019
4020         Tests: media/video-restricted-no-preload-auto.html
4021                media/video-restricted-no-preload-metadata.html
4022
4023         * html/HTMLMediaElement.cpp:
4024         (WebCore::HTMLMediaElement::parseAttribute): Apply restrictions to preload attribute before
4025             passing to media engine.
4026         (WebCore::HTMLMediaElement::loadResource): Ditto.
4027
4028         * html/HTMLMediaSession.cpp:
4029         (WebCore::HTMLMediaSession::effectivePreloadForElement): New, limit preload according to restrictions.
4030         * html/HTMLMediaSession.h:
4031
4032         * platform/audio/MediaSessionManager.h:
4033         * platform/audio/ios/MediaSessionManagerIOS.mm:
4034         (WebCore::MediaSessionManageriOS::resetRestrictions): Limit preload to metadata only. Drive-by
4035             static deviceClass initialization cleanup.
4036
4037         * testing/Internals.cpp:
4038         (WebCore::Internals::setMediaSessionRestrictions): Support MetadataPreloadingNotPermitted and
4039             AutoPreloadingNotPermitted.
4040