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