53a821484bf2f66454aab2d149326b1374322c8b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-16  Dan Bernstein  <mitz@apple.com>
2
3         Speculative iOS build fix.
4
5         * dom/Document.cpp:
6         (WebCore::Document::Document):
7
8 2014-02-15  Antti Koivisto  <antti@apple.com>
9
10         Move document life time management from TreeScope to Document
11         https://bugs.webkit.org/show_bug.cgi?id=128877
12
13         Reviewed by Andreas Kling.
14
15         Document life time is managed in confusing manner by TreeScopes which are also inherited to ShadowRoots.
16         
17         This patches moves the life time management to Document. Nodes in shadow trees selfOnlyRef the Document instead
18         of the ShadowRoot. ShadowRoot is treated like any other node and selfOnlyRefs the Document as well (which it
19         also did earlier, indirectly).
20         
21         TreeScope is devirtualized.
22
23         * css/ElementRuleCollector.cpp:
24         (WebCore::ElementRuleCollector::collectMatchingRules):
25         
26             Author stylesheets never match in UA shadow trees.
27
28         * dom/ContainerNode.cpp:
29         (WebCore::ContainerNode::~ContainerNode):
30         * dom/Document.cpp:
31         (WebCore::Document::Document):
32         (WebCore::Document::~Document):
33         (WebCore::Document::removedLastRef):
34         * dom/Document.h:
35         (WebCore::Document::selfOnlyRef):
36         (WebCore::Document::selfOnlyDeref):
37
38             To avoid branches Document self-refs itself like all other Nodes. This is why deletion will now happen on ref count of 1.
39
40         (WebCore::Node::isDocumentNode):
41         (WebCore::Node::Node):
42         * dom/DocumentOrderedMap.cpp:
43         (WebCore::DocumentOrderedMap::add):
44         * dom/Element.cpp:
45         (WebCore::Element::insertedInto):
46         (WebCore::Element::removedFrom):
47         * dom/Node.cpp:
48         (WebCore::Node::~Node):
49         (WebCore::Node::removedLastRef):
50         * dom/Node.h:
51         (WebCore::Node::document):
52         (WebCore::Node::inDocument):
53         * dom/ShadowRoot.cpp:
54         (WebCore::ShadowRoot::ShadowRoot):
55         (WebCore::ShadowRoot::~ShadowRoot):
56         * dom/ShadowRoot.h:
57         * dom/TreeScope.cpp:
58         (WebCore::TreeScope::TreeScope):
59         (WebCore::TreeScope::~TreeScope):
60         (WebCore::TreeScope::setParentTreeScope):
61         * dom/TreeScope.h:
62         (WebCore::TreeScope::documentScope):
63         
64             Document can no longer ever be null.
65
66         (WebCore::TreeScope::rootNode):
67         (WebCore::TreeScope::setDocumentScope):
68         * dom/TreeScopeAdopter.cpp:
69         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
70         (WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
71         
72             Manage Document selfOnlyRefs for nodes in shadow trees too.
73
74         (WebCore::TreeScopeAdopter::updateTreeScope):
75         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
76         * dom/TreeScopeAdopter.h:
77
78 2014-02-16  Ryosuke Niwa  <rniwa@webkit.org>
79
80         setSelectionRange shouldn't directly instantiate VisibleSelection
81         https://bugs.webkit.org/show_bug.cgi?id=128881
82
83         Reviewed by Andreas Kling.
84
85         Added a new version of moveTo for setSelectionRange.
86
87         * editing/FrameSelection.cpp:
88         (WebCore::FrameSelection::moveTo): Added.
89         * editing/FrameSelection.h:
90         * html/HTMLTextFormControlElement.cpp:
91         (WebCore::HTMLTextFormControlElement::setSelectionRange): Use the newly added FrameSelection::moveTo
92         instead of manually instantiating VisibleSelection here.
93
94 2014-02-16  Dan Bernstein  <mitz@apple.com>
95
96         Stop using PLATFORM(MAC) in Source except where it means “OS X but not iOS”
97         https://bugs.webkit.org/show_bug.cgi?id=128885
98
99         Reviewed by Anders Carlsson.
100
101         * loader/FrameLoaderClient.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
102         * platform/Cursor.h: Changed PLATFORM(MAC) to USE(APPKIT) around uses of NSCursor.
103         * platform/LocalizedStrings.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
104         * platform/graphics/PlatformLayer.h: Ditto.
105         * platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
106         * rendering/RenderLayerCompositor.cpp: Ditto.
107         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
108         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
109
110 2014-02-16  Dan Bernstein  <mitz@apple.com>
111
112         Speculative iOS build fix after r164184.
113
114         * dom/Node.cpp:
115         (WebCore::Node::defaultEventHandler):
116
117 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
118
119         DOMSelection shouldn't instantiate VisibleSelection everywhere
120         https://bugs.webkit.org/show_bug.cgi?id=128879
121
122         Reviewed by Antti Koivisto.
123
124         Removed explicit instantiation of VisibleSelection from various member functions of VisibleSelection.
125
126         * page/DOMSelection.cpp:
127         (WebCore::DOMSelection::collapse):
128         (WebCore::DOMSelection::collapseToEnd):
129         (WebCore::DOMSelection::collapseToStart):
130         (WebCore::DOMSelection::setBaseAndExtent):
131         (WebCore::DOMSelection::setPosition):
132         (WebCore::DOMSelection::extend):
133         (WebCore::DOMSelection::getRangeAt):
134         (WebCore::DOMSelection::addRange):
135
136 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
137
138         Remove unused arguments from moveTo(Range*)
139         https://bugs.webkit.org/show_bug.cgi?id=128878
140
141         Reviewed by Antti Koivisto.
142
143         Cleanup.
144
145         * bindings/objc/DOMUIKitExtensions.mm:
146         (-[DOMRange move:inDirection:]):
147         (-[DOMRange extend:inDirection:]):
148         * editing/FrameSelection.cpp:
149         (WebCore::FrameSelection::moveTo):
150         * editing/FrameSelection.h:
151
152 2014-02-15  Filip Pizlo  <fpizlo@apple.com>
153
154         Vector with inline capacity should work with non-PODs
155         https://bugs.webkit.org/show_bug.cgi?id=128864
156
157         Reviewed by Michael Saboff.
158
159         No new tests because no change behavior.
160         
161         Deques no longer have inline capacity because it was broken, and we didn't need it
162         here anyway.
163
164         * page/WheelEventDeltaTracker.h:
165
166 2014-02-15  Andreas Kling  <akling@apple.com>
167
168         Add checked casts for Event.
169         <https://webkit.org/b/128875>
170
171         Generate casting helpers for casting from Event to various subclasses
172         and go on static_cast replacement spree.
173
174         Reviewed by Sam Weinig.
175
176 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
177
178         HTMLTextFormControlElement::subtreeHasChanged should be called before updating selection
179         https://bugs.webkit.org/show_bug.cgi?id=128870
180
181         Reviewed by Darin Adler.
182
183         Extracted HTMLTextFormControlElement::didEditInnerTextValue out of HTMLTextFormControlElement::defaultEventHandler
184         and called it in appliedEditing, unappliedEditing, and reappliedEditing before updating selection.
185
186         * editing/Editor.cpp:
187         (WebCore::notifyTextFromControls): Added.
188         (WebCore::Editor::appliedEditing): Update text form control's internal states before updating selection.
189         (WebCore::Editor::unappliedEditing): Ditto.
190         (WebCore::Editor::reappliedEditing): Ditto.
191         * html/HTMLTextFormControlElement.cpp:
192         (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
193         * html/TextFieldInputType.cpp:
194         (WebCore::TextFieldInputType::subtreeHasChanged): Removed a stale assertion from the time we used to do
195         everything in the render tree.
196
197 2014-02-15  Andreas Kling  <akling@apple.com>
198
199         Add checked casts for ScriptExecutionContext.
200         <https://webkit.org/b/128874>
201
202         Generate casting helpers for casting from ScriptExecutionContext to
203         Document and WorkerGlobalScope. Apply heartily.
204
205         Reviewed by Antti Koivisto.
206
207 2014-02-15  Alexey Proskuryakov  <ap@apple.com>
208
209         [Mac] All WebKit clients should encrypt WebCrypto keys automatically
210         https://bugs.webkit.org/show_bug.cgi?id=128852
211
212         Reviewed by Oliver Hunt.
213
214         Install a persistent master key in Keychain on first use of WebCrypto key serialization.
215         The key is per application, protected with ACL.
216
217         * English.lproj/Localizable.strings:
218         * WebCore.exp.in:
219         * crypto/SerializedCryptoKeyWrap.h:
220         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
221         (WebCore::masterKeyAccountNameForCurrentApplication):
222         (WebCore::getDefaultWebCryptoMasterKey):
223         (WebCore::createAndStoreMasterKey):
224         (WebCore::findMasterKey):
225         * platform/LocalizedStrings.cpp:
226         (WebCore::webCryptoMasterKeyKeychainLabel):
227         (WebCore::webCryptoMasterKeyKeychainComment):
228         * platform/LocalizedStrings.h:
229
230 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
231
232         computeSelectionStart and computeSelectionEnd shouldn't trigger synchronous layout
233         https://bugs.webkit.org/show_bug.cgi?id=128806
234
235         Reviewed by Darin Adler.
236
237         Added indexForPosition to HTMLTextFormControlElement. Like r163825, this patch traverses the DOM tree
238         instead of the render tree to compute the index for a given position.
239
240         We traverse the DOM Tree backwards starting at the specified Position all the way back to the beginning
241         of the inner text element. The index is computed as the number of characters we encountered during
242         this backwards DOM traversal.
243
244         It's worth noting that passedPosition.computeNodeBeforePosition() returns and only returns 0 when the
245         position is before the first node of its parent or inside a text node. In such cases, we call
246         passedPosition.containerNode() to find the parent or the text node.
247
248         * html/HTMLTextFormControlElement.cpp:
249         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Use indexForPosition.
250         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Ditto.
251         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Dotto.
252         (WebCore::finishText): Cleanup. Use newlineCharacter instead of hard-coding '\n'.
253         (WebCore::HTMLTextFormControlElement::indexForPosition): Added. See above for the description.
254         * html/HTMLTextFormControlElement.h:
255
256 2014-02-15  Brent Fulgham  <bfulgham@apple.com>
257
258         [Win] Avoid unnecessary asserts if "prepareToPlay" is called multiple times.
259         https://bugs.webkit.org/show_bug.cgi?id=128859
260
261         Reviewed by Eric Carlson.
262
263         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
264         (WebCore::AVFWrapper::createPlayer): Don't assert if player exists; just return the
265         existing copy.
266         (WebCore::AVFWrapper::createPlayerItem): Ditto (but with Player Items).
267
268 2014-02-15  Darin Adler  <darin@apple.com>
269
270         Remove double hashing from DatasetDOMStringMap::deleteItem
271         https://bugs.webkit.org/show_bug.cgi?id=128865
272
273         Reviewed by Benjamin Poulain.
274
275         * dom/DatasetDOMStringMap.cpp:
276         (WebCore::DatasetDOMStringMap::deleteItem): Removed call to hasAttribute, using the
277         result from removeAttribute instead.
278
279         * dom/Element.cpp:
280         (WebCore::Element::removeAttribute): Add a return value, false if nothing is removed,
281         and true if something is removed.
282         (WebCore::Element::removeAttributeNS): Ditto.
283         * dom/Element.h: Ditto.
284
285 2014-02-15  Piotr Grad  <p.grad@samsung.com>
286
287         Setting currentTime on HTMLMediaElement with media controller should throw exception.
288         https://bugs.webkit.org/show_bug.cgi?id=128867.
289
290         Reviewed by Eric Carlson.
291
292         Added implementation for setting currentTime in HTMLMediaElement. Old implementation
293         was left to be used internally.
294
295         Test: media/video-controller-currentTime.html
296
297         * html/HTMLMediaElement.cpp:
298         (WebCore::HTMLMediaElement::parseAttribute):
299         * html/HTMLMediaElement.h:
300         * html/HTMLMediaElement.idl:
301
302 2014-02-15  Anders Carlsson  <andersca@apple.com>
303
304         Form controls are always painted in the active state
305         https://bugs.webkit.org/show_bug.cgi?id=128872
306         <rdar://problem/9422677>
307
308         Reviewed by Dan Bernstein.
309
310         AppKit will always paint form controls in the active state if the view doesn't have a
311         window. Fix this by adding a fake window whose key appearance we'll update based on the 
312         control state. Also, rename WebCoreFlippedView to WebCoreThemeView since it stopped being
313         just about the flippedness a long time ago.
314
315         * platform/mac/ThemeMac.h:
316         * platform/mac/ThemeMac.mm:
317         (-[WebCoreThemeWindow hasKeyAppearance]):
318         Return themeWindowHasKeyAppearance.
319
320         (-[WebCoreThemeView window]):
321         Create a WebCoreThemeWindow object lazily and return it.
322
323         (WebCore::paintCheckbox):
324         (WebCore::paintRadio):
325         (WebCore::paintButton):
326         Pass the control states to ThemeMac::ensuredView.
327
328         (WebCore::ThemeMac::ensuredView):
329         Set themeWindowHasKeyAppearance based on the control state.
330
331         * rendering/RenderThemeMac.mm:
332         (WebCore::RenderThemeMac::documentViewFor):
333         Pass the control states to ThemeMac::ensuredView.
334
335 2014-02-15  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
336
337         ASSERT_WITH_SECURITY_IMPLICATION in WebCore::toElement
338         https://bugs.webkit.org/show_bug.cgi?id=128810
339
340         Reviewed by Ryosuke Niwa.
341
342         Make CompositeEditCommand::cloneParagraphUnderNewElement() to work when |outerNode|
343         doesn't contain |start|.
344
345         Before this patch, CompositeEditCommand::cloneParagraphUnderNewElement() tried to copy
346         ancestry nodes from |start| to Document node when |start| position isn't in |outerNode|. This
347         patch changes CompositeEditCommand::cloneParagraphUnderNewElement() to copy |start| to
348         |outerNode| only if |outerNode| contains |start| position.
349
350         Merged from Blink https://src.chromium.org/viewvc/blink?revision=161762&view=revision by yosin@chromium.org.
351
352         Test: editing/execCommand/indent-with-uneditable-crash.html
353
354         * editing/CompositeEditCommand.cpp:
355         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
356
357 2014-02-15  Samuel White  <samuel_white@apple.com>
358
359         AX: Add ability to specify descendant type when using AXUIElementsForSearchPredicate.
360         https://bugs.webkit.org/show_bug.cgi?id=128747
361
362         Reviewed by Chris Fleizach.
363
364         Added support for 'immediate descendant only' to existing predicate based searching. This
365         addition allows VoiceOver to fetch each child element lazily (rather than all at once via AXChildren).
366
367         Test: platform/mac/accessibility/search-predicate-immediate-descendants-only.html
368
369         * accessibility/AccessibilityObject.cpp:
370         (WebCore::AccessibilityObject::findMatchingObjects):
371         * accessibility/AccessibilityObject.h:
372         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
373         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
374         (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
375
376 2014-02-15  Jeremy Jones  <jeremyj@apple.com>
377
378         WK2 AVKit enter fullscreen doesn't work a second time.
379         https://bugs.webkit.org/show_bug.cgi?id=128558
380
381         Reviewed by Jer Noble.
382
383         Lazily create WebAVPlayerController when needed.
384
385         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
386         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
387         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
388         (WebVideoFullscreenInterfaceAVKit::getPlayerController):
389         Add getPlayerController()
390
391         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
392         (WebVideoFullscreenInterfaceAVKit::setDuration):
393         (WebVideoFullscreenInterfaceAVKit::setCurrentTime):
394         (WebVideoFullscreenInterfaceAVKit::setRate):
395         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
396         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
397         (WebVideoFullscreenInterfaceAVKit::enterFullscreenWithCompletionHandler):
398         use getPlayerController();
399
400 2014-02-15  Jer Noble  <jer.noble@apple.com>
401
402         [Mac] 10X slower than Chrome when drawing a video into a canvas
403         https://bugs.webkit.org/show_bug.cgi?id=124599
404
405         Reviewed by Darin Adler.
406
407         Follow up patch to r159518 to address Darin's post-commit review.
408
409         * html/HTMLVideoElement.cpp:
410         (WebCore::HTMLVideoElement::nativeImageForCurrentTime): Use nullptr.
411         * platform/graphics/MediaPlayerPrivate.h:
412         (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime): Ditto.
413         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
414         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
415         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the
416                 AVPlayerItemVideoOutput's delegate callback.
417         (WebCore::CVPixelBufferGetBytePointerCallback): Use static_cast.
418         (WebCore::CVPixelBufferReleaseBytePointerCallback): Ditto.
419         (WebCore::CVPixelBufferReleaseInfoCallback): Ditto.
420         (-[WebCoreAVFPullDelegate initWithCallback:]): Space changes.
421         (-[WebCoreAVFPullDelegate setCallback:]): Added.
422         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]): Check the value of m_callback.
423
424 2014-02-14  Andreas Kling  <akling@apple.com>
425
426         CTTE: WorkerGlobalScope is always owned by a WorkerThread.
427         <https://webkit.org/b/128834>
428
429         Codify this by storing the owner thread as a WorkerThread& and making
430         thread() return a reference.
431
432         This exposed a couple of unnecessary assertions.
433
434         Reviewed by Anders Carlsson.
435
436         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
437         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
438         * Modules/websockets/ThreadableWebSocketChannel.cpp:
439         (WebCore::ThreadableWebSocketChannel::create):
440         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
441         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
442         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
443         * bindings/js/ScheduledAction.cpp:
444         (WebCore::ScheduledAction::execute):
445         * bindings/js/WorkerScriptDebugServer.cpp:
446         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
447         * dom/ScriptExecutionContext.cpp:
448         (WebCore::ScriptExecutionContext::createdMessagePort):
449         (WebCore::ScriptExecutionContext::destroyedMessagePort):
450         * inspector/WorkerDebuggerAgent.cpp:
451         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
452         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
453         * inspector/WorkerInspectorController.cpp:
454         * inspector/WorkerRuntimeAgent.cpp:
455         (WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
456         * loader/WorkerThreadableLoader.cpp:
457         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
458         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
459         * loader/cache/MemoryCache.cpp:
460         (WebCore::MemoryCache::removeRequestFromCache):
461         * workers/DedicatedWorkerGlobalScope.cpp:
462         (WebCore::DedicatedWorkerGlobalScope::create):
463         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
464         (WebCore::DedicatedWorkerGlobalScope::postMessage):
465         (WebCore::DedicatedWorkerGlobalScope::importScripts):
466         (WebCore::DedicatedWorkerGlobalScope::thread):
467         * workers/DedicatedWorkerGlobalScope.h:
468         * workers/DedicatedWorkerThread.cpp:
469         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
470         * workers/SharedWorkerGlobalScope.cpp:
471         (WebCore::SharedWorkerGlobalScope::create):
472         (WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
473         (WebCore::SharedWorkerGlobalScope::thread):
474         * workers/SharedWorkerGlobalScope.h:
475         * workers/SharedWorkerThread.cpp:
476         (WebCore::SharedWorkerThread::createWorkerGlobalScope):
477         * workers/WorkerGlobalScope.cpp:
478         (WebCore::CloseWorkerGlobalScopeTask::performTask):
479         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
480         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
481         (WebCore::WorkerGlobalScope::postTask):
482         (WebCore::WorkerGlobalScope::logExceptionToConsole):
483         (WebCore::WorkerGlobalScope::addConsoleMessage):
484         (WebCore::WorkerGlobalScope::addMessage):
485         (WebCore::WorkerGlobalScope::isContextThread):
486         * workers/WorkerGlobalScope.h:
487         (WebCore::WorkerGlobalScope::thread):
488         * workers/WorkerMessagingProxy.cpp:
489         (WebCore::MessageWorkerGlobalScopeTask::performTask):
490         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
491         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
492         * workers/WorkerRunLoop.cpp:
493         (WebCore::WorkerRunLoop::runInMode):
494         (WebCore::WorkerRunLoop::runCleanupTasks):
495
496 2014-02-14  Ryosuke Niwa  <rniwa@webkit.org>
497
498         setSelectionRange shouldn't trigger a synchronous layout to check focusability when text field is already focused
499         https://bugs.webkit.org/show_bug.cgi?id=128804
500
501         Reviewed by Enrica Casucci.
502
503         Don't trigger a synchronous layout at the beginning of setSelectionRange if the element is already focused
504         since we don't have to check the size of render box in that case.
505
506         We should be able to get rid of this synchronous layout entirely once we fix https://webkit.org/b/128797
507         but that's somewhat risky behavioral change so we'll do that in a separate patch.
508
509         * editing/FrameSelection.cpp:
510         (WebCore::FrameSelection::selectAll): Fixed the bug where selectAll selects the entire document even if the text
511         form contol is focused if the selection is none (i.e. not anchored to any node).
512         * html/HTMLTextFormControlElement.cpp:
513         (WebCore::HTMLTextFormControlElement::setSelectionRange): Only update the layout if the element is not focused
514         already. Also pass in DoNotSetFocus option to setSelection since we already have the focus in that case.
515
516 2014-02-14  Dan Bernstein  <mitz@apple.com>
517
518         REGRESSION (r157443): Search fields with a non-white background don’t have a round bezel
519         https://bugs.webkit.org/show_bug.cgi?id=126295
520
521         Reviewed by Ryosuke Niwa.
522
523         Reverted r157443 and improved comment.
524
525         * rendering/RenderTheme.cpp:
526         (WebCore::RenderTheme::isControlStyled):
527
528 2014-02-14  Brian Burg  <bburg@apple.com>
529
530         Web Replay: AtomicString replay input names should be stored in a thread-local table
531         https://bugs.webkit.org/show_bug.cgi?id=128829
532
533         Reviewed by Andreas Kling.
534
535         Similar to how DOM event names are frequently-used AtomicStrings, replay input
536         names are also checked in many places as a "type tag". This patch puts all known
537         input names into a class held by ThreadGlobalData and adds the shortcut `inputTypes()`
538         so that replay input types can be referenced with `inputTypes.InputName()`.
539
540         * WebCore.xcodeproj/project.pbxproj:
541         * platform/ThreadGlobalData.cpp: Add inputTypes() shortcut.
542         (WebCore::ThreadGlobalData::ThreadGlobalData):
543         * platform/ThreadGlobalData.h: Add inputTypes() shortcut.
544         (WebCore::ThreadGlobalData::inputTypes):
545         * replay/ReplayInputTypes.cpp: Added.
546         (WebCore::ReplayInputTypes::ReplayInputTypes):
547         * replay/ReplayInputTypes.h: Added.
548         (WebCore::inputTypes): The input names are provided by per-framework macros that
549         are generated by the replay inputs code generator.
550
551 2014-02-14  Jer Noble  <jer.noble@apple.com>
552
553         Add support for specced event handlers to HTMLMediaElement
554         https://bugs.webkit.org/show_bug.cgi?id=128292
555
556         Reviewed by Andreas Kling.
557
558         Test: media/media-event-listeners.html
559
560         Add explicit event listener IDL attributes to HTMLMediaElement.
561
562         * html/HTMLMediaElement.h:
563         * html/HTMLMediaElement.idl:
564
565 2014-02-14  Oliver Hunt  <oliver@apple.com>
566
567         Implement a few more Array prototype functions in JS
568         https://bugs.webkit.org/show_bug.cgi?id=128788
569
570         Reviewed by Gavin Barraclough.
571
572         Minor change to ensure that the inspector is treating builtins
573         as host functions.
574
575         Tests: js/regress/array-prototype-filter.html
576                js/regress/array-prototype-forEach.html
577                js/regress/array-prototype-map.html
578                js/regress/array-prototype-some.html
579
580         * inspector/InspectorDOMAgent.cpp:
581         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
582           Make sure we treat builtins as regular host functions
583
584 2014-02-14  Beth Dakin  <bdakin@apple.com>
585
586         Margin tiles are not created for the top and left sides when there is a < 1.0 
587         scale factor
588         https://bugs.webkit.org/show_bug.cgi?id=128842
589
590         Reviewed by Simon Fraser.
591
592         floor the result of the computation whenever we have a negative origin, to ensure 
593         that we are rounding 'up' to a larger number of tiles. 
594         * platform/graphics/ca/mac/TileController.mm:
595         (WebCore::TileController::getTileIndexRangeForRect):
596
597 2014-02-13  Ryosuke Niwa  <rniwa@webkit.org>
598
599         setSelection should not synchronously trigger layout
600         https://bugs.webkit.org/show_bug.cgi?id=128797
601
602         Reviewed by Antti Koivisto.
603
604         Only update the appearance and reveal selection when the style and the layout is already up to date.
605         Otherwise, do so in performPostLayoutTasks.
606
607         * editing/FrameSelection.cpp:
608         (WebCore::FrameSelection::FrameSelection):
609         (WebCore::FrameSelection::setSelection): Set m_pendingSelectionUpdate and synchronously update caret rect
610         if we don't need to update style or layout.
611         (WebCore::updateSelectionByUpdatingLayoutOrStyle): Added. Used by FrameSelection member functions to
612         trigger layout or style recalc whichever is needed.
613         (WebCore::FrameSelection::updateAndRevealSelection): Extracted from setSelection.
614         (WebCore::FrameSelection::absoluteCaretBounds): Call updateSelectionByUpdatingLayoutOrStyle since caret rect
615         is no longer updated synchronously in setSelection.
616         (WebCore::FrameSelection::recomputeCaretRect): Don't assert that visibleStart().absoluteCaretBounds() is
617         equal to m_absCaretBounds since selection may no longer be caret at this point.
618         (WebCore::FrameSelection::setCaretVisibility): Call updateSelectionByUpdatingLayoutOrStyle since we're
619         synchronously calling into updateAppearance here. In the future, we should make this asynchronous as well.
620         (WebCore::FrameSelection::selectionBounds): Call updateSelectionByUpdatingLayoutOrStyle since selection bounds
621         could be outdated. This code only triggering style recalc was presumably a bug.
622         * editing/FrameSelection.h:
623
624         * page/FrameView.cpp:
625         (WebCore::FrameView::performPostLayoutTasks): Update selection's appearance and scroll to reveal selection
626         as needed.
627
628 2014-02-14  Andreas Kling  <akling@apple.com>
629
630         Purge remaining ENABLE(SHADOW_DOM) cruft.
631         <https://webkit.org/b/128827>
632
633         Remove the remaining 8.8 million lines of Shadow DOM code to align
634         with goals for intent to ship 60fps on mobile in 2014.
635
636         Reviewed by Antti Koivisto.
637
638 2014-02-13  Jer Noble  <jer.noble@apple.com>
639
640         [MediaControls][iOS] Embedded YouTube does not show a 'paused' button state after starting
641         https://bugs.webkit.org/show_bug.cgi?id=128755
642
643         Reviewed by Eric Carlson.
644
645         Don't rely on "canPlay()", instead, take the information directly from the event itself. I.e., when
646         handling the 'play' event, switch mode to playing, and vice versa for the 'pause' event.
647
648         * Modules/mediacontrols/mediaControlsApple.js:
649         (Controller.prototype.handlePlay):
650         (Controller.prototype.handlePause):
651         (Controller.prototype.updatePlaying):
652         (Controller.prototype.setPlaying):
653
654 2014-02-13  Jer Noble  <jer.noble@apple.com>
655
656         [MediaControls][iOS] Start playback button is visible when playing embedded YouTube
657         https://bugs.webkit.org/show_bug.cgi?id=128754
658
659         Reviewed by Eric Carlson.
660
661         Update shouldHaveStartPlaybackButton to match the behavior of the plugin proxy.
662
663         Add a accessor to determine whether playback has been requested:
664         * Modules/mediacontrols/MediaControlsHost.cpp:
665         (WebCore::MediaControlsHost::userGestureRequired):
666         * Modules/mediacontrols/MediaControlsHost.h:
667         * Modules/mediacontrols/MediaControlsHost.idl:
668
669         Update the logic of shouldHaveStartPlaybackButton.
670         * Modules/mediacontrols/mediaControlsiOS.js:
671         (ControllerIOS.prototype.shouldHaveStartPlaybackButton):
672
673 2014-02-13  Jer Noble  <jer.noble@apple.com>
674
675         [MediaControls] Add support for a loading progress meter
676         https://bugs.webkit.org/show_bug.cgi?id=128651
677
678         Reviewed by Eric Carlson.
679
680         Draw the loaded ranges underneath the timeline slider. Use a -webkit-canvas()
681         CSS function to allow the track of the slider to reflect the current state of
682         the video's loadedTimeRanges property.
683
684         Since -webkit-canvas() will share a backing store with all other CSS images using
685         the same identifier, use a monotonically increasing identifier to uniquely identify the timeline on a per-document basis.
686
687         * Modules/mediacontrols/mediaControlsApple.css:
688         (audio::-webkit-media-controls-timeline):
689         * Modules/mediacontrols/mediaControlsApple.js:
690         (Controller): Call updateProgress().
691         (Controller.prototype.createControls): Set up the canvas style and identifier.
692         (Controller.prototype.handleLoadStart): Call updateProgress().
693         (Controller.prototype.handleStalled): Ditto.
694         (Controller.prototype.handleReadyStateChange): Ditto.
695         (Controller.prototype.handleDurationChange): Ditto.
696         (Controller.prototype.handleProgress): Ditto.
697         (Controller.prototype.progressFillStyle): Added an easily overridable method
698             to determine the fill color of the progress bar.
699         (Controller.prototype.updateProgress): Draw the loadedTimeRanges into the timeline slider.
700         * Modules/mediacontrols/mediaControlsiOS.js:
701         (ControllerIOS.prototype.progressFillStyle): Override.
702
703 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
704
705         Clean up JSDOMStringMap::deleteProperty
706         https://bugs.webkit.org/show_bug.cgi?id=128801
707
708         Reviewed by Geoffrey Garen.
709
710         Follow up on my cleaning of JSDOMStringMapCustom, this time for deletion.
711
712         Previously, we would query for the name, then call deleteItem() if the name was
713         found. Instead, everything is moved to deleteItem which then return if the deletion
714         is successful or not.
715
716         By using convertPropertyNameToAttributeName, we can use Element::hasAttribute() directly
717         to find if the attribute exists or not. If it exists, we remove it.
718
719         Theoretically we could have a single pass over the attributes to find->delete but this
720         code is not hot enough to justify anything fancy at this point.
721
722         Finally, we no longer check for isValidPropertyName() on deletion. JSDOMStringMapCustom
723         was the last client of DatasetDOMStringMap::deleteItem() and it could not call deleteItem()
724         with invalid name since the name would have failed DatasetDOMStringMap::contains().
725         The spec does not specify any name checking either for deletion so we are safe just ignoring
726         invalid input.
727
728         * bindings/js/JSDOMStringMapCustom.cpp:
729         (WebCore::JSDOMStringMap::deleteProperty):
730         * dom/DatasetDOMStringMap.cpp:
731         (WebCore::DatasetDOMStringMap::deleteItem):
732         * dom/DatasetDOMStringMap.h:
733
734 2014-02-14  Benjamin Poulain  <bpoulain@apple.com>
735
736         Improve the performance on mobile of FTPDirectoryDocument
737         https://bugs.webkit.org/show_bug.cgi?id=128778
738
739         Reviewed by Antti Koivisto.
740
741         Little cleanup.
742
743         * html/FTPDirectoryDocument.cpp:
744         (WebCore::FTPDirectoryDocumentParser::appendEntry):
745         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
746         (WebCore::processFilesizeString):
747         (WebCore::wasLastDayOfMonth):
748         (WebCore::processFileDateString):
749         (WebCore::FTPDirectoryDocumentParser::parseAndAppendOneLine):
750         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
751         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
752
753 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
754
755         Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
756         https://bugs.webkit.org/show_bug.cgi?id=128728
757
758         Reviewed by Andreas Kling.
759
760         In most cases, we don't even need to test for the flag animatedSVGAttributesNotDirty.
761         If the selector filter could never match an animatable attribute, there is no point in testing for one.
762
763         * cssjit/SelectorCompiler.cpp:
764         (WebCore::SelectorCompiler::canMatchStyleAttribute):
765         Skip the second test when the local name is equal to canonicalLocalName. That is the common case.
766
767         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
768         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
769
770         * svg/SVGElement.cpp:
771         (WebCore::addQualifiedName):
772         (WebCore::SVGElement::animatableAttributeForName):
773         (WebCore::SVGElement::isAnimatableAttribute):
774         (WebCore::SVGElement::filterOutAnimatableAttribute):
775         * svg/SVGElement.h:
776         * svg/SVGScriptElement.cpp:
777         (WebCore::SVGScriptElement::filterOutAnimatableAttribute):
778         * svg/SVGScriptElement.h:
779         Move the list of animatable attribute to a static function available in Release.
780         Selector matching is a lot more flexible than normal name matching. Since the local name must
781         always match, it is used as a key to get the full QualifiedName to compare to the selector.
782
783         Separating the list of animatable attributes between Selectors and SVGElement::isAnimatableAttribute
784         would be error prone. Instead, SVGElement::isAnimatableAttribute() is modified to use
785         SVGElement::animatableAttributeForName so that the two never get out of sync.
786
787         Since SVGScriptElement has one additional restriction to isAnimatableAttribute(), the function
788         filterOutAnimatableAttribute() is added to remove a qualified name from the complete list of animatable attributes.
789         This ensure SVGElement::animatableAttributeForName() always has the complete list, and subclasses of SVGElement
790         can only remove QualifiedNames, not add them.
791
792 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
793
794         Make code generation of the unoptimized pseudo classes separate
795         https://bugs.webkit.org/show_bug.cgi?id=128704
796
797         Reviewed by Andreas Kling.
798
799         Mapping the unoptimized selectors when generating the code was useful for debugging
800         but those cases are so common that looping over unoptimizedPseudoCheckers was more
801         costly than anticipated.
802
803         This patch moves the unoptimized pseudo selector in their own array to simplify code generation.
804
805         * cssjit/SelectorCompiler.cpp:
806         (WebCore::SelectorCompiler::addPseudoType):
807         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
808         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
809
810 2014-02-14  Myles C. Maxfield  <mmaxfield@apple.com>
811
812         Implement text-decoration-skip: auto
813         https://bugs.webkit.org/show_bug.cgi?id=128786
814
815         Reviewed by Dean Jackson.
816
817         http://lists.w3.org/Archives/Public/www-style/2014Feb/0485.html
818         We are updating the initial value of text-decoration-skip to a new value, "auto".
819         On Mac + iOS, this will have the same behavior as "skip".
820
821         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html
822
823         * css/CSSComputedStyleDeclaration.cpp:
824         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
825         * css/CSSParser.cpp:
826         (WebCore::CSSParser::parseTextDecorationSkip):
827         * css/DeprecatedStyleBuilder.cpp:
828         (WebCore::valueToDecorationSkip):
829         * rendering/InlineTextBox.cpp:
830         (WebCore::InlineTextBox::paintDecoration):
831         * rendering/style/RenderStyle.h:
832         * rendering/style/RenderStyleConstants.h:
833
834 2014-02-13  Simon Fraser  <simon.fraser@apple.com>
835
836         Give ScrollingTree(State)Nodes a reference to another layer, which is used for moving overflow:scroll contents around
837         https://bugs.webkit.org/show_bug.cgi?id=128790
838
839         Reviewed by Beth Dakin.
840
841         Have scrolling tree nodes and state nodes track another layer, the
842         "scrolled contents layer", for accelerated overflow:scroll.
843         
844         When making ScrollingTreeScrollingNodes for overflow:scroll, the node's
845         layer will point to the composited element's primary layer, and its
846         scrolledContentsLayer to the layer that gets moved around by scrolling.
847         
848         Do some other cleanup on AsyncScrollingCoordinator, removing
849         functions that just called through to nodes.
850
851         * WebCore.exp.in:
852         * page/scrolling/AsyncScrollingCoordinator.cpp:
853         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
854         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
855         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
856         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
857         (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
858         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
859         * page/scrolling/AsyncScrollingCoordinator.h:
860         * page/scrolling/ScrollingCoordinator.h:
861         (WebCore::ScrollingCoordinator::updateScrollingNode):
862         * page/scrolling/ScrollingStateScrollingNode.cpp:
863         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
864         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
865         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
866         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
867         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
868         * page/scrolling/ScrollingStateScrollingNode.h:
869         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
870         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
871         (WebCore::ScrollingTreeScrollingNodeIOS::updateBeforeChildren):
872         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
873         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
874         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
875         * rendering/RenderLayerCompositor.cpp:
876         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
877
878 2014-02-14  Chris Fleizach  <cfleizach@apple.com>
879
880         AX: WebKit needs heuristics to differentiate lists used for layout from semantic data lists, similar to the heuristics for layout tables versus data tables.
881         https://bugs.webkit.org/show_bug.cgi?id=122320
882
883         Reviewed by Mario Sanchez Prada.
884
885         Many authors use lists for layout, rather than presenting data. Exposing these kinds of lists to accessibility users
886         makes the web harder to process and listen, while degrading the importance of real lists.
887
888         This introduces heuristics to filter out layout lists with the following:
889            1. If it's a named list, like ol or aria=list, then it's a list.
890              1a. Unless the list has no children, then it's not a list.
891            2. If it displays visible list markers, it's a list.
892            3. If it does not display list markers and has only one child, it's not a list.
893            4. If it does not have any listitem children, it's not a list.
894            5. Otherwise it's a list (for now).
895
896         Test: accessibility/list-detection.html
897
898         * accessibility/AccessibilityList.cpp:
899         (WebCore::AccessibilityList::determineAccessibilityRole):
900         (WebCore::AccessibilityList::roleValue):
901         * accessibility/AccessibilityList.h:
902
903 2014-02-14  Brendan Long  <b.long@cablelabs.com>
904
905         Use AtomicString arguments in TrackPrivateBaseClient callbacks
906         https://bugs.webkit.org/show_bug.cgi?id=128765
907
908         Reviewed by Eric Carlson.
909
910         No new tests because this doesn't change functionality.
911
912         * html/track/AudioTrack.cpp:
913         (WebCore::AudioTrack::idChanged):
914         (WebCore::AudioTrack::labelChanged):
915         (WebCore::AudioTrack::languageChanged):
916         * html/track/AudioTrack.h:
917         * html/track/InbandTextTrack.cpp:
918         (WebCore::InbandTextTrack::InbandTextTrack):
919         (WebCore::InbandTextTrack::idChanged):
920         (WebCore::InbandTextTrack::labelChanged):
921         (WebCore::InbandTextTrack::languageChanged):
922         * html/track/InbandTextTrack.h:
923         * html/track/VideoTrack.cpp:
924         (WebCore::VideoTrack::idChanged):
925         (WebCore::VideoTrack::labelChanged):
926         (WebCore::VideoTrack::languageChanged):
927         * html/track/VideoTrack.h:
928         * platform/graphics/TrackPrivateBase.h:
929
930 2014-02-14  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
931
932         ASSERTION FAILED: comparePositions(newEnd, newStart) >= 0 in WebCore::ApplyStyleCommand::updateStartEnd
933         https://bugs.webkit.org/show_bug.cgi?id=121791
934
935         Reviewed by Darin Adler.
936
937         If WebCore::ApplyStyleCommand::applyBlockStyle() creates a TextIterator for a range
938         that has an element with ReplacedElement rendering object, then a ',' is emitted in the
939         constructor of TextIterator. Due to this comma the end of the run range can be at the
940         wrong position, what makes the assertion fire. This situation can be handled the same
941         way in TextIterator::rangeFromLocationAndLength() as we do in case of the emitted '\n's.
942
943         Test: editing/execCommand/remove-formatting-from-iframe-in-button.html
944
945         * editing/TextIterator.cpp:
946         (WebCore::TextIterator::rangeFromLocationAndLength):
947
948 2014-02-14  Andrei Bucur  <abucur@adobe.com>
949
950         [CSS Regions] visibility: hidden on a region should hide its content
951         https://bugs.webkit.org/show_bug.cgi?id=128814
952
953         Reviewed by Mihnea Ovidenie.
954
955         The patch properly checks that the content of a region layer should be painted before actually
956         calling the paint function (for example, when visibility: hidden is specified on a region, its
957         content should be hidden).
958
959         Test: fast/regions/visibility-hidden.html
960
961         * rendering/RenderLayer.cpp:
962         (WebCore::RenderLayer::paintLayerContents):
963
964 2014-02-14  László Langó  <llango.u-szeged@partner.samsung.com>
965
966         Follow-up fix after r164036.
967
968         Reviewed by Csaba Osztrogonác.
969
970         * dom/Document.cpp:
971         (WebCore::Document::create):
972
973 2014-02-13  Byungseon Shin  <sun.shin@lge.com>
974
975         [MSE] Move PublicURLManager shutdown logic so ActiveDOMObjects associated with public URLs won't leak.
976         https://bugs.webkit.org/show_bug.cgi?id=128532
977
978         Reviewed by Jer Noble.
979
980         This fixes a leak of DOM objects by breaking the circular reference 
981         between Document, PublicURLManager, and MediaSource. 
982         Instead of clearing PublicURLManager at destruction-time, 
983         which is delayed indefinitely because of the circular reference, 
984         clear the PublicURLManager during ActiveDOMObject::stop().
985
986         Frome Blink r151890 by <acolwell@chromium.org>
987         <https://src.chromium.org/viewvc/blink?view=rev&revision=151890>
988
989         * dom/ScriptExecutionContext.cpp:
990         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
991         (WebCore::ScriptExecutionContext::publicURLManager):
992         * html/DOMURL.h:
993         * html/PublicURLManager.cpp:
994         (WebCore::PublicURLManager::create):
995         (WebCore::PublicURLManager::PublicURLManager):
996         (WebCore::PublicURLManager::registerURL):
997         (WebCore::PublicURLManager::stop):
998         * html/PublicURLManager.h:
999
1000 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1001
1002         Remove position:sticky runtime flag
1003         https://bugs.webkit.org/show_bug.cgi?id=128774
1004
1005         Reviewed by Simon Fraser.
1006
1007         Rollout of r128663
1008
1009         No new tests are necessary because there is no behavior change.
1010
1011         * css/CSSParser.cpp:
1012         (WebCore::CSSParserContext::CSSParserContext):
1013         (WebCore::operator==):
1014         (WebCore::isValidKeywordPropertyAndValue):
1015         * css/CSSParserMode.h:
1016         * dom/Document.cpp:
1017         * dom/Document.h:
1018         * page/Settings.cpp:
1019         (WebCore::Settings::Settings):
1020         * page/Settings.h:
1021
1022 2014-02-04  Gustavo Noronha Silva  <gns@gnome.org>
1023
1024         [GTK][CMake] Generate GObject DOM bindings .symbols files
1025         https://bugs.webkit.org/show_bug.cgi?id=126210
1026
1027         Reviewed by Martin Robinson.
1028
1029         No new tests. Build change only.
1030
1031         * CMakeLists.txt: list Quota module files and IDLs even if the feature
1032         is disabled, for GTK, since we rely on that for our DOM bindings.
1033         * PlatformGTK.cmake: add a new target to check for DOM symbols API by
1034         running the new python script.
1035         * bindings/gobject/GNUmakefile.am: call the new python script instead
1036         of using a custom rule.
1037
1038 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1039
1040         text-decoration-skip: ink skips randomly when using SVG fonts
1041         https://bugs.webkit.org/show_bug.cgi?id=128709
1042
1043         Reviewed by Simon Fraser.
1044
1045         This patch simply disables skipping underlines being used with SVG fonts.
1046         It's a stopgap until we can support skipping properly with SVG fonts.
1047
1048         Test: svg/custom/svg-fonts-skip-ink.html
1049
1050         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1051         (WebCore::FontPlatformData::ctFont):
1052         * platform/graphics/mac/FontMac.mm:
1053         (WebCore::Font::dashesForIntersectionsWithRect):
1054
1055 2014-02-13  Daniel Bates  <dabates@apple.com>
1056
1057         Fix the ARM build when HAVE_ARM_NEON_INTRINSICS is enabled
1058
1059         Add !HAVE(ARM_NEON_INTRINSICS)-guard around file-level inline function arithmeticSoftware to
1060         avoid an unused function compiler warning when building with ARM Neon intrinsics.
1061
1062         * platform/graphics/filters/FEComposite.cpp:
1063
1064 2014-02-13  Brady Eidson  <beidson@apple.com>
1065
1066         IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
1067         https://bugs.webkit.org/show_bug.cgi?id=128763
1068
1069         Reviewed by Anders Carlsson.
1070
1071         No new tests (Covered by three existing tests)
1072
1073         * platform/KeyedCoding.h:
1074         (WebCore::KeyedEncoder::encodeObjects): If the array is empty we still have to begin() and end() it.
1075
1076 2014-02-13  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1077
1078         [css3-text] Support -webkit-text-decoration-skip: objects
1079         https://bugs.webkit.org/show_bug.cgi?id=128723
1080
1081         Reviewed by Dean Jackson.
1082
1083         Implemented 'objects' value of text-decoration-skip.
1084         http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/#text-decoration-skip
1085
1086         This is initial value and same behavior without
1087         ENABLE_CSS3_TEXT_DECORATION_SKIP_INK flag. Threfore, this patch only
1088         added parser code and constant for 'objects'.
1089
1090         Changed the initial value of text-decoration-skip.
1091
1092         The current implementation parses 'none', but the rendering code is
1093         not match the spec, so this patch added FIXME to the rendering code.
1094
1095         * css/CSSComputedStyleDeclaration.cpp:
1096         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
1097         * css/CSSParser.cpp:
1098         (WebCore::CSSParser::parseTextDecorationSkip):
1099         * css/CSSValueKeywords.in:
1100         * css/DeprecatedStyleBuilder.cpp:
1101         (WebCore::valueToDecorationSkip):
1102         * rendering/InlineTextBox.cpp:
1103         (WebCore::InlineTextBox::paintDecoration):
1104         * rendering/style/RenderStyle.h:
1105         * rendering/style/RenderStyleConstants.h:
1106
1107 2014-02-13  Daniel Bates  <dabates@apple.com>
1108
1109         Fix ARM NEON build following <http://trac.webkit.org/changeset/164058>
1110         (https://bugs.webkit.org/show_bug.cgi?id=128767)
1111
1112         I inadvertently didn't include header NEONHelpers.h, which defines WebCore::loadRGBA8AsFloat().
1113
1114         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
1115
1116 2014-02-13  Daniel Bates  <dabates@apple.com>
1117
1118         Write FEComposite::computeArithmeticPixelsNeon() in terms of loadRGBA8AsFloat()
1119         https://bugs.webkit.org/show_bug.cgi?id=128767
1120
1121         Reviewed by Dean Jackson.
1122
1123         This patch was inspired by Gabor Rapcsanyi's work in <https://bugs.webkit.org/show_bug.cgi?id=90669>.
1124
1125         Currently we duplicate code in FEComposite::computeArithmeticPixelsNeon() to read pixel data.
1126         Instead we should use the convenience function WebCore::loadRGBA8AsFloat. This also resolves
1127         an uninitialized variable compiler warning in the existing code.
1128
1129         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
1130         (WebCore::FEComposite::computeArithmeticPixelsNeon):
1131
1132 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1133
1134         During a copy, position:fixed gets converted to position:absolute even if only part of the document is selected
1135         https://bugs.webkit.org/show_bug.cgi?id=128688
1136
1137         Reviewed by Ryosuke Niwa.
1138
1139         Adds a field, m_needsPositionStyleConversion, to StyledMarkupAccumulator.
1140
1141         Also, renames the ConvertPositionStyleOnCopy setting to ShouldConvertPositionStyleOnCopy
1142
1143         Test: editing/pasteboard/copy-paste-doesnt-convert-sticky-and-fixed-during-partial-copy.html
1144
1145         * editing/markup.cpp:
1146         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
1147         (WebCore::StyledMarkupAccumulator::appendElement):
1148         (WebCore::createMarkupInternal):
1149         * page/Settings.in:
1150         * testing/InternalSettings.cpp:
1151         (WebCore::InternalSettings::Backup::Backup):
1152         (WebCore::InternalSettings::Backup::restoreTo):
1153         (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy):
1154         * testing/InternalSettings.h:
1155         * testing/InternalSettings.idl:
1156
1157 2014-02-12  Timothy Hatcher  <timothy@apple.com>
1158
1159         Enable inspection of recently used IndexedDB databases.
1160
1161         https://bugs.webkit.org/show_bug.cgi?id=128687
1162
1163         Reviewed by Brady Eidson & Joseph Pecoraro.
1164
1165         * Modules/indexeddb/IDBFactory.cpp:
1166         (WebCore::IDBFactory::getDatabaseNames):
1167         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1168         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1169         (WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
1170         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1171         Fix up the arguments passed to getDatabaseNames.
1172
1173         * WebCore.xcodeproj/project.pbxproj:
1174         Make DOMStringList.h private so WebKit2 can use it.
1175
1176         * inspector/InspectorIndexedDBAgent.cpp:
1177         Modernize the loops and remove some PLATFORM(COCOA) ifdefs to
1178         compile the code. 
1179
1180         * inspector/protocol/IndexedDB.json: Use number for version to
1181         allow larger values instead of clamping to int.
1182
1183 2014-02-13  Chang Shu  <cshu@webkit.org>
1184
1185         Copying (createMarkup) wrapping text results in space between wrapped lines stripped.
1186         https://bugs.webkit.org/show_bug.cgi?id=63233
1187
1188         The problem is StyledMarkupAccumulator uses renderedText and the space at
1189         the end of the text has been stripped when the tag after the text was wrapped.
1190
1191         Reviewed by Ryosuke Niwa.
1192
1193         Test: editing/pasteboard/copy-text-with-wrapped-tag.html
1194
1195         * editing/TextIterator.cpp:
1196         (WebCore::TextIterator::TextIterator):
1197         (WebCore::TextIterator::handleTextBox):
1198         * editing/TextIterator.h:
1199         Check the special case when the iterator runs over a range that is followed by a non-text box.
1200         In this case, the possible last space has been collapsed and needs to be restored.
1201         * editing/markup.cpp:
1202         (WebCore::StyledMarkupAccumulator::renderedText):
1203         Check if the range is followed by more nodes and pass this information to the constructed TextIterator.
1204
1205 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
1206
1207         Gaps for text-decoration-skip: ink are calculated assuming the glyph orientation is the same as the run orientation
1208         https://bugs.webkit.org/show_bug.cgi?id=128718
1209
1210         Reviewed by Darin Adler.
1211
1212         This is a stop-gap patch to make underlines in CJK text not look terrible. A long-term fix is to refactor
1213         showGlyphsWithAdvances to move rotation logic into a common place that the text-decoration-skip: ink code
1214         can use.
1215
1216         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html
1217
1218         * rendering/InlineTextBox.cpp:
1219         (WebCore::InlineTextBox::paintDecoration):
1220
1221 2014-02-13  Andreas Kling  <akling@apple.com>
1222
1223         InsertIntoTextNodeCommand should get Settings from the Frame.
1224         <https://webkit.org/b/128678>
1225
1226         EditCommands have a frame() accessor that returns a reference,
1227         so there's no need to go through Document.
1228
1229         Reviewed by Anders Carlsson.
1230
1231         * editing/InsertIntoTextNodeCommand.cpp:
1232         (WebCore::InsertIntoTextNodeCommand::doApply):
1233
1234 2014-02-13  László Langó  <llango.u-szeged@partner.samsung.com>
1235
1236         Document should be constructable
1237         https://bugs.webkit.org/show_bug.cgi?id=115643
1238
1239         Reviewed by Darin Adler.
1240
1241         http://www.w3.org/TR/2014/WD-dom-20140204/#interface-document
1242         Make Document constructable so that one can do "new Document"
1243         instead of "document.implementation.createHTMLDocument('')".
1244
1245         Test: fast/dom/Document/document-constructor.html
1246
1247         * dom/Document.cpp:
1248         (WebCore::Document::create):
1249         (WebCore::Document::origin):
1250         * dom/Document.h:
1251         * dom/Document.idl:
1252
1253 2014-02-13  Javier Fernandez  <jfernandez@igalia.com>
1254
1255         [CSS Grid Layout] Rename named areas property
1256         https://bugs.webkit.org/show_bug.cgi?id=127990
1257
1258         Reviewed by Sergio Villar Senin.
1259
1260         From Blink r165891 by <rego@igalia.com>
1261
1262         The property 'grid-template' has been renamed to 'grid-template-areas'
1263         in the last two versions of the spec.
1264
1265         * CMakeLists.txt:
1266         * GNUmakefile.list.am:
1267         * WebCore.vcxproj/WebCore.vcxproj:
1268         * WebCore.vcxproj/WebCore.vcxproj.filters:
1269         * WebCore.xcodeproj/project.pbxproj:
1270         * css/CSSComputedStyleDeclaration.cpp:
1271         (WebCore::ComputedStyleExtractor::propertyValue):
1272         * css/CSSGridTemplateAreasValue.cpp: Renamed from Source/WebCore/css/CSSGridTemplateValue.cpp.
1273         (WebCore::CSSGridTemplateAreasValue::CSSGridTemplateAreasValue):
1274         (WebCore::stringForPosition):
1275         (WebCore::CSSGridTemplateAreasValue::customCSSText):
1276         * css/CSSGridTemplateAreasValue.h: Renamed from Source/WebCore/css/CSSGridTemplateValue.h.
1277         (WebCore::CSSGridTemplateAreasValue::create):
1278         (WebCore::CSSGridTemplateAreasValue::~CSSGridTemplateAreasValue):
1279         (WebCore::CSSGridTemplateAreasValue::gridAreaMap):
1280         (WebCore::CSSGridTemplateAreasValue::rowCount):
1281         (WebCore::CSSGridTemplateAreasValue::columnCount):
1282         * css/CSSParser.cpp:
1283         (WebCore::CSSParser::parseValue):
1284         (WebCore::CSSParser::parseGridTemplateAreas):
1285         * css/CSSParser.h:
1286         * css/CSSPropertyNames.in:
1287         * css/CSSValue.cpp:
1288         (WebCore::CSSValue::equals):
1289         (WebCore::CSSValue::cssText):
1290         (WebCore::CSSValue::destroy):
1291         * css/CSSValue.h:
1292         (WebCore::CSSValue::isGridTemplateAreasValue):
1293         * css/StyleResolver.cpp:
1294         (WebCore::StyleResolver::applyProperty):
1295
1296 2014-02-13  Adrian Bunk  <bunk@stusta.de>
1297
1298         Remove the last remnants of Maemo support
1299         https://bugs.webkit.org/show_bug.cgi?id=85238
1300
1301         Reviewed by Ryosuke Niwa.
1302
1303         * plugins/npapi.h:
1304
1305 2014-02-13  ChangSeok Oh  <changseok.oh@collabora.com>
1306
1307         Support ANGLE_instanced_arrays for GLES backend.
1308         https://bugs.webkit.org/show_bug.cgi?id=128579
1309
1310         Reviewed by Dean Jackson.
1311
1312         Add some APIs to Extensions3D to support ANGLE_instanced_arrays for GLES backend.
1313         At the same time, drawArraysInstanced, drawElementsInstanced and vertexAttribDivisor
1314         are moved from GC3DOpenGL.cpp to GC3DOpenGLCommon.cpp since they could be shareable
1315         through Extensions3D.
1316
1317         Covered by fast/canvas/webgl/angle-instanced-arrays.html
1318
1319         * platform/graphics/Extensions3D.h:
1320         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1321         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
1322         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
1323         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
1324         * platform/graphics/opengl/Extensions3DOpenGL.h:
1325         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1326         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
1327         (WebCore::Extensions3DOpenGLES::drawArraysInstanced):
1328         (WebCore::Extensions3DOpenGLES::drawElementsInstanced):
1329         (WebCore::Extensions3DOpenGLES::vertexAttribDivisor):
1330         (WebCore::Extensions3DOpenGLES::supportsExtension):
1331         * platform/graphics/opengl/Extensions3DOpenGLES.h:
1332         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1333         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1334         (WebCore::GraphicsContext3D::drawArraysInstanced):
1335         (WebCore::GraphicsContext3D::drawElementsInstanced):
1336         (WebCore::GraphicsContext3D::vertexAttribDivisor):
1337         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1338
1339 2014-02-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1340
1341         [GTK] MEDIA_CONTROLS_SCRIPT support
1342         https://bugs.webkit.org/show_bug.cgi?id=123097
1343
1344         Reviewed by Jer Noble.
1345
1346         WebKitGTK+ multimedia controls are now managed from Javascript
1347         code. Apple controls are kept as common code and GTK+ ones are
1348         subclassed for the specific behavior.
1349
1350         Both CMake and Autotools build support is provided.
1351
1352         * CMakeLists.txt: Added support to build the media controls
1353         script and their associated files.
1354         * GNUmakefile.am: Added support to generate the C++ code from the
1355         Javascript.
1356         * GNUmakefile.list.am: Added the media controls script associated
1357         files.
1358         * Modules/mediacontrols/MediaControlsHost.cpp:
1359         * Modules/mediacontrols/MediaControlsHost.h:
1360         * Modules/mediacontrols/MediaControlsHost.idl:
1361         (WebCore::MediaControlsHost::supportsFullscreen): Added attribute
1362         to know if the element supports fullscreen.
1363         * Modules/mediacontrols/mediaControlsApple.js:
1364         (Controller.prototype.handleWrapperMouseMove):
1365         (Controller.prototype.handleWrapperMouseOut):
1366         (Controller.prototype.updatePlaying): Use clear and
1367         resetHideControlsTimer.
1368         (Controller.prototype.clearHideControlsTimer): Added.
1369         (Controller.prototype.resetHideControlsTimer): Added.
1370         * Modules/mediacontrols/mediaControlsGtk.js: Added.
1371         (createControls): Calls ControllerGtk.
1372         (ControllerGtk): Calls the superclass.
1373         (contains): Defines a function to know if an object is contained
1374         in an array.
1375         (ControllerGtk.prototype.inheritFrom): Copies the method of the
1376         superclass that are not reimplemented in the subclass.
1377         (ControllerGtk.prototype.createControls): Calls the superclass and
1378         create the remaining needed elements.
1379         (ControllerGtk.prototype.configureInlineControls): Configures the
1380         controls.
1381         (ControllerGtk.prototype.setStatusHidden): Redefined empty.
1382         (ControllerGtk.prototype.updateTime): Writes the duration and
1383         current position. As it was so far, current time also includes
1384         duration. If current time is bigger than 0 we show that.
1385         (ControllerGtk.prototype.showCurrentTime): Shows current time and
1386         hides duration label (that is included in current time).
1387         (ControllerGtk.prototype.handlePlay): Calls the superclass and
1388         force showing the current time.
1389         (ControllerGtk.prototype.handleTimeUpdate): Always update the
1390         time.
1391         (ControllerGtk.prototype.handleMuteButtonMouseOver): Shows the
1392         volume slider.
1393         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Hides the
1394         volume slider.
1395         (ControllerGtk.prototype.addControls): Adds the enclosure instead
1396         of the panel directly. Panel is, of course, part of the enclosure.
1397         (ControllerGtk.prototype.updateReadyState): Shows the fullscreen
1398         button only if fullscreen is supported. Sets the volume in up or
1399         down mode depending on its position in the document. Updates the
1400         volume.
1401         (ControllerGtk.prototype.setControlsType): Creates the controls it
1402         they were not created before. Unlike Apple ones, WebKitGTK+
1403         fullscreen and inline controls are the same.
1404         (ControllerGtk.prototype.updatePlaying): Calls the superclass and
1405         shows the controls if not playing.
1406         (ControllerGtk.prototype.handleCaptionButtonClicked): Redefined
1407         empty. To be coherent with volume, that also shows a popup, this
1408         is handled with mouseover instead of click.
1409         (ControllerGtk.prototype.buildCaptionMenu): Calls the superclass
1410         to build the menu, sets some listeners, centers the popup with the
1411         captions button, keeps the current height and sets the style to 0,
1412         which is needed to animate it.
1413         (ControllerGtk.prototype.destroyCaptionMenu): Hides the caption menu.
1414         (ControllerGtk.prototype.showCaptionMenu): Resets the height to
1415         its original. We don't animate it with CSS because we would need
1416         to specify a height in the style and we don't know it in advance.
1417         (ControllerGtk.prototype.hideCaptionMenu): Sets height to 0.
1418         (ControllerGtk.prototype.captionMenuTransitionEnd): When the
1419         captions menu transtition ends, it is destroyed.
1420         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Creates
1421         the caption menu and shows it.
1422         (ControllerGtk.prototype.handleCaptionButtonMouseOut): Hides the
1423         captions menu.
1424         (ControllerGtk.prototype.handleCaptionMouseOut): Hides the
1425         captions menu.
1426         * PlatformGTK.cmake: Added WebCore to the target link libraries
1427         and initialized the variables needed at CMakelists.txt
1428         * css/mediaControlsGtk.css:
1429         (audio::-webkit-media-controls-panel)
1430         (video::-webkit-media-controls-panel): Added transtion based on opacity.
1431         (video::-webkit-media-controls-panel): Set video opacity to 0.
1432         (video::-webkit-media-controls-panel.paused): Set video opacity to 1.
1433         (audio::-webkit-media-controls-panel div.mute-box): Set the same
1434         style as the mute button to preserve the layout.
1435         (audio::-webkit-media-controls-panel div.mute-box.hidden): Sets
1436         the display to none.
1437         (audio::-webkit-media-controls-mute-button)
1438         (video::-webkit-media-controls-mute-button): Removed the outline
1439         and the margin that is managed by the mute box now.
1440         (audio::-webkit-media-controls-play-button)
1441         (video::-webkit-media-controls-play-button): Removed the outline.
1442         (audio::-webkit-media-controls-time-remaining-display)
1443         (video::-webkit-media-controls-time-remaining-display): Removed
1444         the display.
1445         (audio::-webkit-media-controls-current-time-display)
1446         (video::-webkit-media-controls-current-time-display): Added the
1447         display block.
1448         (video::-webkit-media-controls-time-remaining-display): Set
1449         display none.
1450         (video::-webkit-media-controls-time-remaining-display.show): Set
1451         display block.
1452         (video::-webkit-media-controls-time-remaining-display.hidden): Set
1453         display none.
1454         (audio::-webkit-media-controls-timeline)
1455         (video::-webkit-media-controls-timeline): Removed outline.
1456         (audio::-webkit-media-controls-volume-slider-container)
1457         (video::-webkit-media-controls-volume-slider-container): Set
1458         overflow hidden and set a transition by height.
1459         (video::-webkit-media-controls-volume-slider-container.hidden):
1460         Set height 0.
1461         (video::-webkit-media-controls-volume-slider-container.down): Set
1462         bottom to be below the panel. Changed the border radius and
1463         transition accordingly.
1464         (video::-webkit-media-controls-panel .hidden.down): Sets default
1465         bottom as 0.
1466         (audio::-webkit-media-controls-volume-slider)
1467         (video::-webkit-media-controls-volume-slider): Removed the outline.
1468         (audio::-webkit-media-controls-toggle-closed-captions-button)
1469         (video::-webkit-media-controls-toggle-closed-captions-button):
1470         Removed the background that is painted from C++ and removed the
1471         outline.
1472         (video::-webkit-media-controls-closed-captions-container):
1473         (video::-webkit-media-controls-closed-captions-container h3):
1474         (video::-webkit-media-controls-closed-captions-container ul):
1475         (video::-webkit-media-controls-closed-captions-container li):
1476         (video::-webkit-media-controls-closed-captions-container li.selected): Changed
1477         the style to make it more coherent with the rest of the controls.
1478         (audio::-webkit-media-controls-fullscreen-button)
1479         (video::-webkit-media-controls-fullscreen-button): Removed the outline.
1480         (audio::-webkit-media-controls-panel button.hidden): Sets the
1481         display to none.
1482         * html/HTMLMediaElement.cpp: UserAgentScripts.h is not needed here
1483         and build cmake build would need for changes to get this compiled.
1484         * platform/gtk/RenderThemeGtk.cpp:
1485         (WebCore::nodeHasPseudo): Added. Checks if a node has a certain
1486         pseudo.
1487         (WebCore::nodeHasClass): Added. Checks if a node has a certain
1488         class.
1489         (WebCore::supportsFocus): Removed some element types as outline is
1490         now handled in CSS.
1491         (WebCore::RenderThemeGtk::paintMediaPlayButton): Checks if the
1492         play button has the class paused to show the play icon instead of
1493         the pause one.
1494         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
1495         Added. Paints the captions icon.
1496         (WebCore::RenderThemeGtk::mediaControlsScript): Added. Loads the
1497         bundled scripts.
1498         * platform/gtk/RenderThemeGtk.h: Added the mediaControlsScript
1499         method and declared the redefinition of the method to play the
1500         captions icon.
1501
1502 2014-02-11  Alexey Proskuryakov  <ap@apple.com>
1503
1504         Don't crash when SerializedScriptValue deserialization fails
1505         https://bugs.webkit.org/show_bug.cgi?id=128657
1506
1507         Reviewed by Oliver Hunt.
1508
1509         Test: crypto/subtle/postMessage-worker.html
1510
1511         * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Added a FIXME.
1512
1513         * bindings/js/SerializedScriptValue.cpp:
1514         (WebCore::CloneBase::fail): Don't assert on failure.
1515         (WebCore::SerializedScriptValue::deserialize): Never return a null JSValue, these
1516         are not allowed.
1517
1518 2014-02-12  Bem Jones-Bey  <bjonesbe@adobe.com>
1519
1520         [CSS Shapes] Rename shapeSize and others to make ShapeInfo and friends easier to understand
1521         https://bugs.webkit.org/show_bug.cgi?id=128685
1522
1523         Reviewed by Alexandru Chiculita.
1524
1525         The ShapeInfo hierarchy has grown organically as the spec has changed,
1526         and the naming has become very stale and confusing. The spec is now in
1527         Last Call, so it seems like a good time to take a stab towards better
1528         naming that matches the spec terminology and is also more consistent
1529         in general.
1530
1531         No new tests, no behavior change.
1532
1533         * rendering/RenderBlock.cpp:
1534         (WebCore::RenderBlock::imageChanged): Use new names.
1535         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
1536         (WebCore::shapeInfoRequiresRelayout): Ditto.
1537         (WebCore::RenderBlock::computeShapeSize): Ditto.
1538         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Ditto.
1539         * rendering/RenderBlock.h:
1540         (WebCore::RenderBlock::logicalSizeForChild): This method makes it much
1541             cleaner to set the reference box size.
1542         * rendering/RenderBlockFlow.cpp:
1543         (WebCore::RenderBlockFlow::positionNewFloats): Use new names.
1544         * rendering/RenderBox.cpp:
1545         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Ditto.
1546         (WebCore::RenderBox::imageChanged): Ditto.
1547         * rendering/shapes/ShapeInfo.cpp:
1548         (WebCore::getShapeImageMarginRect): Rename variables.
1549         (WebCore::ShapeInfo<RenderType>::computedShape): More renames.
1550         * rendering/shapes/ShapeInfo.h:
1551         (WebCore::ShapeInfo::setReferenceBoxLogicalSize): Renamed from
1552             setShapeSize.
1553         (WebCore::ShapeInfo::logicalLineTop): Use new names.
1554         (WebCore::ShapeInfo::logicalLineBottom): Ditto.
1555         (WebCore::ShapeInfo::shapeContainingBlockLogicalHeight): Ditto.
1556         (WebCore::ShapeInfo::markShapeAsDirty): Renamed from dirtyShapeSize.
1557         (WebCore::ShapeInfo::isShapeDirty): Renamed from shapeSizeDirty.
1558         (WebCore::ShapeInfo::referenceBoxLogicalSize): Renamed from shapeSize.
1559         (WebCore::ShapeInfo::logicalTopOffset): Use new names.
1560         (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
1561         * rendering/shapes/ShapeInsideInfo.cpp:
1562         (WebCore::ShapeInsideInfo::updateSegmentsForLine): Ditto.
1563         (WebCore::ShapeInsideInfo::adjustLogicalLineTop): Ditto.
1564         (WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Ditto.
1565         * rendering/shapes/ShapeInsideInfo.h:
1566         * rendering/shapes/ShapeOutsideInfo.cpp:
1567         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Ditto.
1568         * rendering/shapes/ShapeOutsideInfo.h:
1569
1570 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
1571
1572         REGRESSION: Crashing/Broken Tests Due To Unexpected 8-bit Character Data
1573         https://bugs.webkit.org/show_bug.cgi?id=128698
1574
1575         Reviewed by Tim Horton.
1576
1577         * platform/graphics/win/UniscribeController.cpp:
1578         (WebCore::UniscribeController::advance): Make 16-bit copy when needed.
1579         (WebCore::UniscribeController::shapeAndPlaceItem): Handle 8-bit case when checking
1580         for word boundaries.
1581
1582 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
1583
1584         Document::childrenChanged does not necessarily have a page
1585
1586         Rubber stamped by Enrica Casucci.
1587
1588         * dom/Document.cpp:
1589         (WebCore::Document::childrenChanged):
1590
1591 2014-02-12  Timothy Hatcher  <timothy@apple.com>
1592
1593         Add a missing ": " between the URL and exception in STDOUT logs.
1594
1595         https://bugs.webkit.org/show_bug.cgi?id=128689
1596
1597         Reviewed by Joseph Pecoraro.
1598
1599         * page/PageConsole.cpp:
1600         (WebCore::PageConsole::addMessage): Print ": " after calling
1601         printSourceURLAndPosition now that it does not print it for us.
1602
1603 2014-02-12  Enrica Casucci  <enrica@apple.com>
1604
1605         WK2: coordinate mapping for frames does not work when the page is scrolled.
1606         https://bugs.webkit.org/show_bug.cgi?id=128690
1607         <rdar://problem/16042925>
1608
1609         Reviewed by Simon Fraser.
1610
1611         We should not apply the scroll offset when using delegate scrolling.
1612
1613         * platform/ScrollView.cpp:
1614         (WebCore::ScrollView::rootViewToContents):
1615         (WebCore::ScrollView::contentsToRootView):
1616         (WebCore::ScrollView::rootViewToTotalContents):
1617
1618 2014-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1619
1620         Web Inspector: Rename PageInjectedScript* to WebInjectedScript*
1621         https://bugs.webkit.org/show_bug.cgi?id=128660
1622
1623         Reviewed by Timothy Hatcher.
1624
1625         Rename the files update build systems and users.
1626
1627         * CMakeLists.txt:
1628         * GNUmakefile.list.am:
1629         * WebCore.vcxproj/WebCore.vcxproj:
1630         * WebCore.vcxproj/WebCore.vcxproj.filters:
1631         * WebCore.xcodeproj/project.pbxproj:
1632         * inspector/CommandLineAPIModule.cpp:
1633         (WebCore::CommandLineAPIModule::host):
1634         * inspector/InspectorAllInOne.cpp:
1635         * inspector/InspectorController.cpp:
1636         (WebCore::InspectorController::InspectorController):
1637         * inspector/InspectorController.h:
1638         * inspector/InspectorHeapProfilerAgent.cpp:
1639         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1640         * inspector/InspectorHeapProfilerAgent.h:
1641         * inspector/InspectorProfilerAgent.cpp:
1642         (WebCore::PageProfilerAgent::PageProfilerAgent):
1643         (WebCore::InspectorProfilerAgent::create):
1644         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
1645         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1646         * inspector/InspectorProfilerAgent.h:
1647         * inspector/PageConsoleAgent.cpp:
1648         (WebCore::PageConsoleAgent::PageConsoleAgent):
1649         (WebCore::PageConsoleAgent::addInspectedNode):
1650         * inspector/PageConsoleAgent.h:
1651         * inspector/WebConsoleAgent.cpp:
1652         (WebCore::WebConsoleAgent::WebConsoleAgent):
1653         (WebCore::WebConsoleAgent::frameWindowDiscarded):
1654         (WebCore::WebConsoleAgent::addInspectedHeapObject):
1655         * inspector/WebConsoleAgent.h:
1656         * inspector/WebInjectedScriptHost.cpp: Renamed from Source/WebCore/inspector/PageInjectedScriptHost.cpp.
1657         (WebCore::WebInjectedScriptHost::type):
1658         (WebCore::WebInjectedScriptHost::isHTMLAllCollection):
1659         * inspector/WebInjectedScriptHost.h: Renamed from Source/WebCore/inspector/PageInjectedScriptHost.h.
1660         * inspector/WebInjectedScriptManager.cpp: Renamed from Source/WebCore/inspector/PageInjectedScriptManager.cpp.
1661         (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
1662         (WebCore::WebInjectedScriptManager::disconnect):
1663         (WebCore::WebInjectedScriptManager::didCreateInjectedScript):
1664         (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
1665         * inspector/WebInjectedScriptManager.h: Renamed from Source/WebCore/inspector/PageInjectedScriptManager.h.
1666         * inspector/WorkerConsoleAgent.cpp:
1667         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
1668         * inspector/WorkerConsoleAgent.h:
1669         * inspector/WorkerInspectorController.cpp:
1670         (WebCore::WorkerInspectorController::WorkerInspectorController):
1671         * inspector/WorkerInspectorController.h:
1672
1673 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
1674
1675         Unreviewed iOS Build fix after r163975.
1676
1677         * page/EventHandler.cpp: Use wheel event stubs if !PLATFORM(MAC) || PLATFORM(IOS).
1678
1679 2014-02-12  Gavin Barraclough  <barraclough@apple.com>
1680
1681         Clean up PageThrottler interface
1682         https://bugs.webkit.org/show_bug.cgi?id=128677
1683
1684         Reviewed by Benjamin Poulain.
1685
1686         Currently, responsibility for throttling DOM timers & suspending animations is split
1687         between the Page & the PageThrottler. Clarify by making Page responsible for suspending
1688         animations (PageThrottler is now purely related to aspects of timer throttling), and
1689         move all timer throttling policy to the PageThrottler, with a single function on Page to
1690         enable (Page::setTimerThrottlingEnabled).
1691
1692         Also, transmit the full ViewState to the PageThrottler (not just the IsVisuallyIdle flag),
1693         and distinguish between media & page-load activity.
1694
1695         * WebCore.exp.in:
1696             - removed setDOMTimerAlignmentInterval.
1697         * html/HTMLMediaElement.cpp:
1698         (WebCore::HTMLMediaElement::parseAttribute):
1699             - createActivityToken -> mediaActivityToken
1700         * loader/FrameLoader.cpp:
1701         (WebCore::FrameLoader::started):
1702             - createActivityToken -> pageLoadActivityToken
1703         * page/Page.cpp:
1704         (WebCore::Page::Page):
1705             - added m_timerThrottlingEnabled, made PageThrottler a member
1706         (WebCore::Page::setIsVisuallyIdleInternal):
1707             - update animiation suspension.
1708         (WebCore::Page::setTimerThrottlingEnabled):
1709             - setTimerAlignmentInterval -> setTimerThrottlingEnabled
1710         (WebCore::Page::setViewState):
1711             - pass viewState to PageThrottler.
1712         (WebCore::Page::setIsVisibleInternal):
1713             - don't update timer throttling.
1714         * page/Page.h:
1715         (WebCore::Page::pageThrottler):
1716             - made PageThrottler a member.
1717         (WebCore::Page::timerAlignmentInterval):
1718             - inlined.
1719         * page/PageThrottler.cpp:
1720         (WebCore::PageThrottler::PageThrottler):
1721             - initialize ViewState.
1722         (WebCore::PageThrottler::~PageThrottler):
1723             - clean up by calling setTimerThrottlingEnabled directly.
1724         (WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged):
1725             - moved from Page.
1726         (WebCore::PageThrottler::mediaActivityToken):
1727         (WebCore::PageThrottler::pageLoadActivityToken):
1728             - from Page::createActivityToken
1729         (WebCore::PageThrottler::throttlePage):
1730         (WebCore::PageThrottler::unthrottlePage):
1731             - don't throttle animations here.
1732         (WebCore::PageThrottler::setViewState):
1733         (WebCore::PageThrottler::setIsVisible):
1734             - added, throttle Dom timers.
1735         * page/PageThrottler.h:
1736         * page/Settings.cpp:
1737         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
1738             - removed setDOMTimerAlignmentInterval, hiddenPageDOMTimerThrottlingStateChanged moved to PageThrottler.
1739         * page/Settings.h:
1740             - removed setDOMTimerAlignmentInterval.
1741
1742 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
1743
1744         [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
1745         https://bugs.webkit.org/show_bug.cgi?id=128639
1746
1747         Reviewed by Andreas Kling.
1748
1749         * WebCore.exp.in:
1750         * dom/Document.cpp:
1751         (WebCore::Document::childrenChanged):
1752         Document::setDocType() has been removed and the doctype update code with it.
1753         Add a call to didReceiveDocType() to ensure the viewport is updated when the doctype is parsed.
1754
1755         * loader/EmptyClients.h:
1756         * page/Chrome.cpp:
1757         (WebCore::Chrome::didReceiveDocType):
1758         * page/ChromeClient.h:
1759         * page/ViewportConfiguration.cpp:
1760         (WebCore::ViewportConfiguration::xhtmlMobileParameters):
1761         * page/ViewportConfiguration.h:
1762
1763 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
1764
1765         Mountain Lion build fix.
1766
1767         * WebCore.exp.in: Only export WebCrypto symbols on 10.9+, because SUBTLE_CRYPTO
1768         is not enabled on 10.8.
1769
1770 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
1771
1772         Wrap WebCrypto keys in SerializedScriptValue
1773         https://bugs.webkit.org/show_bug.cgi?id=128680
1774
1775         Reviewed by Anders Carlsson.
1776
1777         Test: crypto/subtle/rsa-indexeddb.html
1778
1779         Added Mac code to wrap a key with AES-GCM. We then serialize it into a plist,
1780         because more custom formats would be crazy (even the custom format in SerializedScriptValue
1781         makes me nervous, we'll certainly need to change CryptoKey in the future).
1782
1783         * WebCore.exp.in:
1784         * WebCore.xcodeproj/project.pbxproj:
1785         * crypto/CommonCryptoUtilities.h:
1786         * crypto/SerializedCryptoKeyWrap.h: Added.
1787         * crypto/mac/SerializedCryptoKeyWrapMac.mm: Added.
1788         (WebCore::vectorFromNSData):
1789         (WebCore::wrapSerializedCryptoKey):
1790         (WebCore::unwrapSerializedCryptoKey):
1791
1792 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
1793
1794         Wheel events don't latch to inner scrollable elements 
1795         https://bugs.webkit.org/show_bug.cgi?id=128225
1796         <rdar://problem/12183688>
1797
1798         Reviewed by Simon Fraser
1799
1800         * WebCore.exp.in: Add declarations for new scrolledToTop, scrolledToBottom, scrolledToLeft, and scrolledToRight.
1801         * page/EventHandler.cpp:
1802         (WebCore::EventHandler::EventHandler):
1803         (WebCore::EventHandler::clear):
1804         (WebCore::findScrollableContainer): New helper function to locate first node
1805         in enclosing region of document that is capable of handling mouse wheel events.
1806         (WebCore::isAtMaxDominantScrollPosition): Predicate to check if the scrollable
1807         area is at the limit we will hit based on scroll direction.
1808         (WebCore::EventHandler::handleWheelEvent): Identify the case where we have hit
1809         the end of a scroll, and treat that as a valid 'handled' case. If the scroll event
1810         is just starting, treat end-of-scroll as unhandled so the parent element can
1811         handle things.
1812         * page/EventHandler.h:
1813         * page/scrolling/ScrollingTree.cpp:
1814         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Use new methods
1815         on the PlatformWheelEvent class.
1816         (WebCore::ScrollingTree::setOrClearLatchedNode): Ditto
1817         * platform/PlatformWheelEvent.h:
1818         (WebCore::PlatformWheelEvent::shouldConsiderLatching): Moved implementation from ScrollingTree.
1819         (WebCore::PlatformWheelEvent::shouldClearLatchedNode): Ditto
1820         * platform/ScrollableArea.cpp:
1821         (WebCore::ScrollableArea::scrolledToTop): Added
1822         (WebCore::ScrollableArea::scrolledToBottom):Added
1823         (WebCore::ScrollableArea::scrolledToLeft): Added
1824         (WebCore::ScrollableArea::scrolledToRight): Added
1825         * platform/ScrollableArea.h:
1826         * rendering/RenderListBox.cpp:
1827         (WebCore::RenderListBox::scrolledToTop): Added
1828         (WebCore::RenderListBox::scrolledToBottom): Added
1829         (WebCore::RenderListBox::scrolledToLeft): Added
1830         (WebCore::RenderListBox::scrolledToRight): Added
1831         * rendering/RenderListBox.h: Changed to public inheritance of ScrollableArea to
1832         allow generic use of this type in scroll wheel logic.
1833
1834 2014-02-12  Brendan Long  <b.long@cablelabs.com>
1835
1836         Implement DataCue for metadata cues
1837         https://bugs.webkit.org/show_bug.cgi?id=128402
1838
1839         Reviewed by Eric Carlson.
1840
1841         Test: media/track/track-datacue.html
1842
1843         * CMakeLists.txt: Add DataCue.
1844         * DerivedSources.cpp: Add JSDataCue.
1845         * DerivedSources.make: Same.
1846         * GNUmakefile.list.am: Add DataCue and JSDataCue.
1847         * WebCore.vcxproj/WebCore.vcxproj: Add DataCue.
1848         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
1849         * WebCore.xcodeproj/project.pbxproj: Add DataCue and JSDataCue.
1850         * bindings/js/JSTextTrackCueCustom.cpp:
1851         (WebCore::toJS): Add DataCue wrapper.
1852         * html/track/DataCue.cpp: Copied from Source/WebCore/html/track/TextTrack.idl.
1853         * html/track/DataCue.h: Copied from Source/WebCore/html/track/TextTrack.idl.
1854         * html/track/DataCue.idl: Copied from Source/WebCore/html/track/TextTrack.idl.
1855         * html/track/InbandGenericTextTrack.cpp:
1856         (WebCore::InbandGenericTextTrack::addGenericCue): Pass ASSERT_NO_EXCEPTION to addCue().
1857         * html/track/InbandWebVTTTextTrack.cpp:
1858         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Same.
1859         * html/track/TextTrack.cpp:
1860         (WebCore::TextTrack::addCue): Throw an exception if DataCue is added to a track that isn't kind="metadata".
1861         * html/track/TextTrack.h: Add exception code parameter to addCue().
1862         * html/track/TextTrack.idl: Add [RaisesException] to addCue().
1863         * html/track/TextTrackCue.h: Add Data CueType.
1864
1865 2014-02-12  Zalan Bujtas  <zalan@apple.com>
1866
1867         Subpixel layout: Clean up LayoutPoint class.
1868         https://bugs.webkit.org/show_bug.cgi?id=128515
1869
1870         Reviewed by Simon Fraser.
1871
1872         Remove redundant functions (keep the more explicit ones).
1873
1874         No change in functionality.
1875
1876         * page/FrameView.cpp:
1877         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
1878         * platform/graphics/LayoutPoint.h:
1879         (WebCore::toLayoutPoint):
1880         (WebCore::toLayoutSize):
1881         (WebCore::roundedIntPoint):
1882         * platform/graphics/ca/GraphicsLayerCA.cpp:
1883         (WebCore::GraphicsLayerCA::updateContentsRects):
1884         * rendering/LayoutState.cpp:
1885         (WebCore::LayoutState::LayoutState):
1886         * rendering/RenderBlock.cpp:
1887         (WebCore::RenderBlock::addFocusRingRects):
1888         * rendering/RenderBox.cpp:
1889         (WebCore::RenderBox::offsetFromContainer):
1890         * rendering/RenderInline.cpp:
1891         (WebCore::RenderInline::addFocusRingRects):
1892         * rendering/RenderLayer.cpp:
1893         (WebCore::RenderLayer::updateLayerPosition):
1894         (WebCore::accumulateOffsetTowardsAncestor):
1895         (WebCore::RenderLayer::paintBackgroundForFragments):
1896         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
1897         (WebCore::RenderLayer::paintOutlineForFragments):
1898         (WebCore::RenderLayer::paintMaskForFragments):
1899         (WebCore::RenderLayer::paintOverflowControlsForFragments):
1900         * rendering/RenderScrollbarPart.cpp:
1901         (WebCore::RenderScrollbarPart::paintIntoRect):
1902
1903 2014-02-12  Zan Dobersek  <zdobersek@igalia.com>
1904
1905         [CoordinatedGraphics] Move CoordinatedGraphicsScene, CoordinatedLayerTreeHostProxy to std::function
1906         https://bugs.webkit.org/show_bug.cgi?id=128473
1907
1908         Reviewed by Anders Carlsson.
1909
1910
1911         Move the CoordinatedGraphicsScene class to using std::function instead of WTF::Functional and std::bind
1912         instead of WTF::bind. The function wrapper is now moved through function calls and not passed by reference,
1913         and lambda functions are inlined into the dispatchOnMainThread() calls, with the CoordinatedGraphicsScene
1914         refcount-protected.
1915
1916         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1917         (WebCore::CoordinatedGraphicsScene::dispatchOnMainThread):
1918         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1919         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1920         (WebCore::CoordinatedGraphicsScene::syncRemoteContent):
1921         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
1922         (WebCore::CoordinatedGraphicsScene::commitScrollOffset):
1923         (WebCore::CoordinatedGraphicsScene::appendUpdate):
1924         (WebCore::CoordinatedGraphicsScene::setActive):
1925         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1926
1927 2014-02-12  Eric Carlson  <eric.carlson@apple.com>
1928
1929         Cleanup the code added for https://bugs.webkit.org/show_bug.cgi?id=128125.
1930
1931         Not reviewed.
1932
1933         * html/HTMLMediaSession.cpp:
1934         (WebCore::restrictionName): Don't need a "break" after a "return" in a case statement.
1935         * platform/audio/MediaSession.cpp:
1936         (WebCore::stateName): Ditto.
1937         * platform/audio/ios/MediaSessionManagerIOS.mm:
1938
1939 2014-02-12  Andreas Kling  <akling@apple.com>
1940
1941         RenderNamedFlowThread should only support RenderElement children.
1942         <https://webkit.org/b/128675>
1943
1944         Tighten up flow-thread rendering so that it only supports element
1945         children directly. This means we don't have to worry about text
1946         renderers on this code path.
1947
1948         Reviewed by Antti Koivisto.
1949
1950         * rendering/RenderElement.cpp:
1951         (WebCore::RenderElement::insertedIntoTree):
1952         (WebCore::RenderElement::willBeRemovedFromTree):
1953         (WebCore::RenderElement::willBeDestroyed):
1954         * rendering/RenderNamedFlowThread.cpp:
1955         (WebCore::RenderNamedFlowThread::nextRendererForElement):
1956         (WebCore::RenderNamedFlowThread::addFlowChild):
1957         (WebCore::RenderNamedFlowThread::removeFlowChild):
1958         * rendering/RenderNamedFlowThread.h:
1959         * rendering/RenderObject.cpp:
1960         (WebCore::RenderObject::willBeDestroyed):
1961         (WebCore::RenderObject::insertedIntoTree):
1962         (WebCore::RenderObject::willBeRemovedFromTree):
1963         * style/StyleResolveTree.cpp:
1964         (WebCore::Style::createRendererIfNeeded):
1965
1966 2014-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1967
1968         Web Inspector: Modernize missed inspector files
1969         https://bugs.webkit.org/show_bug.cgi?id=128661
1970
1971         Reviewed by Anders Carlsson.
1972
1973         Add final, override, and use nullptr where appropriate.
1974
1975         * inspector/InspectorCSSAgent.cpp:
1976         (WebCore::InspectorCSSAgent::asCSSStyleRule):
1977         (WebCore::InspectorCSSAgent::discardAgent):
1978         (WebCore::InspectorCSSAgent::disable):
1979         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1980         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1981         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
1982         (WebCore::InspectorCSSAgent::elementForId):
1983         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1984         (WebCore::InspectorCSSAgent::assertStyleSheetForId):
1985         (WebCore::InspectorCSSAgent::buildObjectForRule):
1986         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
1987         * inspector/InspectorFrontendClientLocal.h:
1988
1989 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
1990
1991         Remove some unintended copies in ranged for loops
1992         https://bugs.webkit.org/show_bug.cgi?id=128644
1993
1994         Reviewed by Anders Carlsson.
1995
1996         * css/StyleResolver.cpp:
1997         (WebCore::StyleResolver::loadPendingSVGDocuments): Avoid creating/destroying
1998         RefPtrs in loop.
1999
2000 2014-02-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2001
2002         Update the HTML Media Capture implementation.
2003         https://bugs.webkit.org/show_bug.cgi?id=118465
2004
2005         Reviewed by Darin Adler.
2006
2007         Make the implementation in WebKit compatible with the 2013-05-09
2008         version of the spec, which makes the "capture" attribute a boolean
2009         instead of an enum.
2010
2011         Covered by fast/forms/file/file-input-capture.html.
2012
2013         * html/FileInputType.cpp:
2014         (WebCore::FileInputType::handleDOMActivateEvent):
2015         * html/HTMLInputElement.cpp:
2016         (WebCore::HTMLInputElement::capture): Renamed to shouldUseMediaCapture().
2017         (WebCore::HTMLInputElement::shouldUseMediaCapture): Return a bool.
2018         * html/HTMLInputElement.h:
2019         * html/HTMLInputElement.idl: Turn the `capture' attribute into a
2020         reflective boolean instead of a DOMString.
2021         * platform/FileChooser.h:
2022
2023 2014-02-12  Radu Stavila  <stavila@adobe.com>
2024
2025         [CSS Regions] Remove unused method in RenderFlowThread
2026         https://bugs.webkit.org/show_bug.cgi?id=128373
2027
2028         Reviewed by Mihnea Ovidenie.
2029
2030         After the landing of https://bugs.webkit.org/show_bug.cgi?id=118665, the 
2031         RenderFlowThread::computeRegionClippingRect method is obsolete.
2032
2033         No new tests needed, this patch only removes an unused method.
2034
2035         * rendering/RenderFlowThread.cpp:
2036         * rendering/RenderFlowThread.h:
2037
2038 2014-02-12  Mihai Tica  <mitica@adobe.com>
2039
2040         [CSS Element Blending] Implement the software path of -webkit-blend-mode with Core Graphics.
2041         https://bugs.webkit.org/show_bug.cgi?id=99119
2042
2043         Reviewed by Simon Fraser.
2044
2045         This patch adds support for -webkit-blend-mode with Core Graphics.
2046         The layer promotion code that forced compositing when blending was detected has been removed.
2047         Remaining work for the software path is to detect and implement isolation of the blending operation:
2048         as stated in the spec, blending should be limited to the parent stacking context.
2049
2050         Tests: css3/compositing/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer.html
2051                css3/compositing/blend-mode-parent-of-composited-blended-has-layer.html
2052                css3/compositing/blend-mode-simple-composited.html
2053                css3/compositing/blend-mode-with-composited-descendant-should-have-layer.html
2054
2055         * inspector/InspectorLayerTreeAgent.cpp:
2056         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): Remove CompositingReasonBlending.
2057         * rendering/RenderLayer.cpp:
2058         (WebCore::RenderLayer::beginTransparencyLayers): Set the blendMode on the GraphicsContext.
2059         * rendering/RenderLayer.h: paintsWithTransparency should return true when a blendMode is set.
2060         * rendering/RenderLayerCompositor.cpp: Remove promotion code when a blendMode is detected.
2061         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Remove CompositingReasonBlending reason.
2062         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Remove CompositingReasonBlending reason.
2063         (WebCore::RenderLayerCompositor::reasonsForCompositing): Remove CompositingReasonBlending reason.
2064         (WebCore::RenderLayerCompositor::logReasonsForCompositing): Remove CompositingReasonBlending reason.
2065         * rendering/RenderLayerCompositor.h:
2066         - Remove the requiresCompositingForBlending method
2067         - Remove the CompositingReasonBlending from the CompositingReasons enum.
2068
2069 2014-02-11  Zalan Bujtas  <zalan@apple.com>
2070
2071         Subpixel rendering: Switch repaint rect from IntRect to LayoutRect to be able to
2072         repaint on device pixel boundaries.
2073         https://bugs.webkit.org/show_bug.cgi?id=128477
2074
2075         Reviewed by Simon Fraser.
2076
2077         RenderLayer needs to be able to repaint on device pixel boundaries. RenderView still
2078         repaints on integral position.
2079
2080         No change in functionality.
2081
2082         * rendering/RenderBlockLineLayout.cpp:
2083         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
2084         * rendering/RenderElement.cpp:
2085         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
2086         * rendering/RenderLayer.cpp:
2087         (WebCore::RenderLayer::updateLayerPositions):
2088         (WebCore::RenderLayer::clearRepaintRects):
2089         (WebCore::RenderLayer::scrollTo):
2090         (WebCore::RenderLayer::calculateClipRects):
2091         * rendering/RenderLayerBacking.cpp:
2092         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2093         * rendering/RenderLayerBacking.h:
2094         * rendering/RenderObject.cpp:
2095         (WebCore::RenderObject::repaintUsingContainer):
2096         (WebCore::RenderObject::repaint):
2097         (WebCore::RenderObject::repaintRectangle):
2098         * rendering/RenderObject.h:
2099
2100 2014-02-11  Dan Bernstein  <mitz@apple.com>
2101
2102         iOS build fix fix.
2103
2104         * rendering/RenderElement.cpp:
2105         (WebCore::shouldRepaintForImageAnimation):
2106
2107 2014-02-11  Dan Bernstein  <mitz@apple.com>
2108
2109         iOS build fix.
2110
2111         * rendering/RenderElement.cpp:
2112         (WebCore::shouldRepaintForImageAnimation):
2113
2114 2014-02-11  David Kilzer  <ddkilzer@apple.com>
2115
2116         ContentData equals() methods are not inline-able
2117         <http://webkit.org/b/128538>
2118
2119         Reviewed by Darin Adler.
2120
2121         Get rid of pure virtual equals() method in favor of
2122         ContentData::Type enum for runtime type information.
2123         This also lets us devirtualize the isFoo() methods.
2124
2125         * rendering/style/ContentData.h:
2126         (WebCore::ContentData::type): Add.
2127         (WebCore::ContentData::isCounter): Devirtualize.
2128         (WebCore::ContentData::isImage): Devirtualize.
2129         (WebCore::ContentData::isQuote): Devirtualize.
2130         (WebCore::ContentData::isText): Devirtualize.
2131         (WebCore::ContentData::ContentData): Add.  Include
2132         ContentData::Type parameter.
2133         (WebCore::operator==): Add overloaded methods for each subclass.
2134         Stop using pure virtual equals() method, check type(), and use
2135         overloaded subclass operator==() methods.
2136         (WebCore::operator!=): Add overloaded methods for each subclass.
2137
2138 2014-02-11  Andreas Kling  <akling@apple.com>
2139
2140         Protect some RenderFlowThread functions.
2141         <https://webkit.org/b/128642>
2142
2143         Make the RenderFlowThread constructor protected and a handful of
2144         member functions private.
2145
2146         Reviewed by Anders Carlsson.
2147
2148         * rendering/RenderFlowThread.h:
2149
2150 2014-02-11  Andreas Kling  <akling@apple.com>
2151
2152         Don't allocate RenderNamedFlowThread's child list separately.
2153         <https://webkit.org/b/128640>
2154
2155         Since we always create the flow-thread child list, there's no reason
2156         to put it in a separate heap allocation. Also remove the typedef and
2157         use auto instead.
2158
2159         Reviewed by Anders Carlsson.
2160
2161         * rendering/RenderNamedFlowThread.cpp:
2162         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2163         (WebCore::RenderNamedFlowThread::nextRendererForNode):
2164         (WebCore::RenderNamedFlowThread::addFlowChild):
2165         (WebCore::RenderNamedFlowThread::removeFlowChild):
2166         * rendering/RenderNamedFlowThread.h:
2167
2168 2014-02-11  Zalan Bujtas  <zalan@apple.com>
2169
2170         Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
2171         https://bugs.webkit.org/show_bug.cgi?id=128460
2172
2173         Reviewed by Simon Fraser.
2174
2175         GraphicsClient::paintContents takes clipRect as FloatRect now so that we can paint on
2176         subpixel position.
2177
2178         No change in functionality.
2179
2180         * platform/graphics/GraphicsLayerClient.h:
2181         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2182         (WebCore::CompositingCoordinator::paintContents):
2183         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2184         * rendering/RenderLayer.cpp:
2185         (WebCore::cornerRect):
2186         (WebCore::RenderLayer::scrollCornerRect):
2187         (WebCore::resizerCornerRect):
2188         (WebCore::RenderLayer::scrollCornerAndResizerRect):
2189         (WebCore::RenderLayer::verticalScrollbarStart):
2190         (WebCore::RenderLayer::horizontalScrollbarStart):
2191         (WebCore::RenderLayer::paintResizer):
2192         (WebCore::RenderLayer::hitTestOverflowControls):
2193         * rendering/RenderLayer.h:
2194         * rendering/RenderLayerBacking.cpp:
2195         (WebCore::RenderLayerBacking::paintIntoLayer):
2196         (WebCore::RenderLayerBacking::paintContents):
2197         * rendering/RenderLayerBacking.h:
2198         * rendering/RenderLayerCompositor.cpp:
2199         (WebCore::RenderLayerCompositor::paintContents):
2200         * rendering/RenderLayerCompositor.h:
2201         * rendering/RenderWidget.cpp:
2202         (WebCore::RenderWidget::paint):
2203
2204 2014-02-11  Antti Koivisto  <antti@apple.com>
2205
2206         GIF animations should be suspended when outside of viewport
2207         https://bugs.webkit.org/show_bug.cgi?id=128632
2208
2209         Reviewed by Andreas Kling.
2210         
2211         Animations are driven by the paint cycle. Speculative tiles keep animations outside the actual viewport going.
2212         
2213         Pause animations when they are outside the viewport by not painting them.
2214
2215         Test: fast/repaint/no-animation-outside-viewport.html
2216
2217         * loader/cache/CachedImage.cpp:
2218         (WebCore::CachedImage::animationAdvanced):
2219         
2220             Call animation specific newImageAnimationFrameAvailable instead of the generic notifyObservers.
2221
2222         * loader/cache/CachedImage.h:
2223         
2224             Removed now unnecessary resumeAnimatingImagesForLoader mechanism.
2225             Remove unnecessary shouldPauseAnimation. Pausing is now always done when by avoiding repaint.
2226
2227         * loader/cache/CachedImageClient.h:
2228         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
2229         * page/FrameView.cpp:
2230         (WebCore::FrameView::scrollPositionChanged):
2231         
2232             Check if we have image animations to resume when scroll position changes.
2233
2234         * page/Page.cpp:
2235         (WebCore::Page::resumeAnimatingImages):
2236         
2237             Use the same mechanism when resuming background tabs etc.
2238
2239         * platform/graphics/BitmapImage.cpp:
2240         (WebCore::BitmapImage::internalAdvanceAnimation):
2241         
2242             Remove the shouldPauseAnimation test, always rely on pausing on invalidation.
2243
2244         * platform/graphics/ImageObserver.h:
2245         * rendering/RenderBoxModelObject.cpp:
2246         * rendering/RenderElement.cpp:
2247         (WebCore::RenderElement::RenderElement):
2248         (WebCore::RenderElement::~RenderElement):
2249         (WebCore::shouldRepaintForImageAnimation):
2250         
2251             Factor the pausing conditions to a function. Test that the animation is withing the
2252             visible rect.
2253
2254         (WebCore::RenderElement::newImageAnimationFrameAvailable):
2255         
2256             Add renderer to the paused animation set if we don't continue the animation.
2257
2258         (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
2259         
2260             Resume the paused animations by triggering repaint.
2261
2262         * rendering/RenderElement.h:
2263         (WebCore::RenderElement::setHasPausedImageAnimations):
2264         (WebCore::RenderElement::hasPausedImageAnimations):
2265         * rendering/RenderObject.cpp:
2266         * rendering/RenderObject.h:
2267         * rendering/RenderView.cpp:
2268         (WebCore::RenderView::addRendererWithPausedImageAnimations):
2269         (WebCore::RenderView::removeRendererWithPausedImageAnimations):
2270         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
2271         * rendering/RenderView.h:
2272
2273 2014-02-11  Andreas Kling  <akling@apple.com>
2274
2275         Remove unused RenderNamedFlowThread::previousRendererForNode().
2276         <https://webkit.org/b/128637>
2277
2278         Reviewed by Antti Koivisto.
2279
2280         * rendering/RenderNamedFlowThread.cpp:
2281         * rendering/RenderNamedFlowThread.h:
2282
2283 2014-02-11  Andreas Kling  <akling@apple.com>
2284
2285         Move renderNamedFlowThreadWrapper() to RenderElement.
2286         <https://webkit.org/b/128634>
2287
2288         This function is only ever called on RenderElements so move it there
2289         from RenderObject.
2290
2291         Reviewed by Antti Koivisto.
2292
2293         * rendering/RenderElement.cpp:
2294         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
2295         * rendering/RenderElement.h:
2296         * rendering/RenderObject.cpp:
2297         * rendering/RenderObject.h:
2298
2299 2014-02-11  Myles C. Maxfield  <mmaxfield@apple.com>
2300
2301         Position and thickness of underline as text size changes
2302         https://bugs.webkit.org/show_bug.cgi?id=16768
2303
2304         Reviewed by Dean Jackson.
2305
2306         This patch adopts the iOS codepath for underlines. It also reorganizes
2307         drawLineForText to avoid a costly global state save & restore.
2308
2309         Test: fast/css3-text/css3-text-decoration/text-decoration-thickness.html
2310
2311         * platform/graphics/cg/GraphicsContextCG.cpp:
2312         (WebCore::computeLineBoundsAndAntialiasingModeForText):
2313         (WebCore::GraphicsContext::computeLineBoundsForText):
2314         (WebCore::GraphicsContext::drawLineForText):
2315         (WebCore::GraphicsContext::drawLinesForText):
2316         * rendering/InlineTextBox.cpp:
2317         (WebCore::InlineTextBox::paintDecoration):
2318
2319 2014-02-11  Ryosuke Niwa  <rniwa@webkit.org>
2320
2321         Frame::rectForSelection shouldn't instantiate FrameSelection
2322         https://bugs.webkit.org/show_bug.cgi?id=128587
2323
2324         Reviewed by Enrica Casucci.
2325
2326         Made VisiblePosition::absoluteCaretBounds more interoperable with the one in FrameSelection and made
2327         iOS's Frame::rectForScrollToVisible use that function instead.
2328
2329         The above change allows us to remove:
2330         - suppressCloseTyping(), restoreCloseTyping(), and m_closeTypingSuppressions in FrameSelection
2331         - suppressSelectionNotifications() and restoreSelectionNotifications() in EditorClient
2332
2333         See inline comments below for more details.
2334
2335         * Source/WebCore/WebCore.exp.in:
2336
2337         * editing/FrameSelection.cpp:
2338         (WebCore::FrameSelection::FrameSelection):
2339         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2340         (WebCore::CaretBase::updateCaretRect):
2341         (WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
2342         (WebCore::DragCaretController::caretRenderer):
2343         (WebCore::repaintCaretForLocalRect):
2344         (WebCore::FrameSelection::recomputeCaretRect): Merged FrameSelection::localCaretRect(). Modified
2345         the code to update caretNode when and only when caret rect is updated. Also added an assertion to
2346         ensure absoluteCaretBounds() on FrameSelection and VisiblePosition yield the same result.
2347
2348         (WebCore::CaretBase::paintCaret):
2349         * editing/FrameSelection.h:
2350
2351         * editing/VisiblePosition.cpp:
2352         (WebCore::VisiblePosition::absoluteCaretBounds): Fixed the bug where the old code wasn't respecting
2353         the convention to use containing block as the renderer to paint caret.
2354
2355         * editing/htmlediting.cpp:
2356         (WebCore::caretRendersInsideNode): Moved from FrameSelection.cpp.
2357         (WebCore::rendererForCaretPainting): Ditto and renamed from caretRenderer.
2358         (WebCore::localCaretRectInRendererForCaretPainting): Extracted from FrameSelection::updateCaretRect.
2359         (WebCore::absoluteBoundsForLocalCaretRect): Ditto from CaretBase::absoluteBoundsForLocalRect.
2360         * editing/htmlediting.h:
2361
2362         * loader/EmptyClients.h:
2363         * page/EditorClient.h:
2364         * page/Frame.h:
2365
2366         * page/ios/FrameIOS.mm:
2367         (WebCore::Frame::rectForScrollToVisible): Reimplemented in its simplest form using VisiblePosition's
2368         absoluteCaretBounds().
2369
2370 2014-02-11  Enrica Casucci  <enrica@apple.com>
2371
2372         Support WebSelections in WK2 on iOS.
2373         https://bugs.webkit.org/show_bug.cgi?id=127015
2374         <rdar://problem/15211964>
2375
2376         Reviewed by Benjamin Poulain.
2377
2378         Adding few exports.
2379
2380         * WebCore.exp.in:
2381
2382 2014-02-11  Andreas Kling  <akling@apple.com>
2383
2384         CTTE: RenderNamedFlowThread always has a WebKitNamedFlow.
2385         <https://webkit.org/b/128623>
2386
2387         Codify the fact that RenderNamedFlowThread always has a corresponding
2388         WebKitNamedFlow by storing it in a Ref, and adding an accessor that
2389         returns a reference to get rid of all the ->'s.
2390
2391         Also removed some unnecessary assertions exposed by this.
2392
2393         Reviewed by Antti Koivisto.
2394
2395         * dom/NamedFlowCollection.cpp:
2396         (WebCore::NamedFlowCollection::ensureFlowWithName):
2397         * dom/NamedFlowCollection.h:
2398         * rendering/RenderNamedFlowThread.cpp:
2399         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2400         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
2401         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
2402         (WebCore::RenderNamedFlowThread::flowThreadName):
2403         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
2404         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
2405         (WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired):
2406         (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
2407         (WebCore::RenderNamedFlowThread::setMarkForDestruction):
2408         (WebCore::RenderNamedFlowThread::resetMarkForDestruction):
2409         (WebCore::RenderNamedFlowThread::isMarkedForDestruction):
2410         * rendering/RenderNamedFlowThread.h:
2411
2412 2014-02-10  Myles C. Maxfield  <mmaxfield@apple.com>
2413
2414         Convert position:fixed property to position:absolute upon copy
2415         https://bugs.webkit.org/show_bug.cgi?id=128194
2416
2417         Reviewed by Simon Fraser.
2418
2419         This adds a Setting and Preference that allows clients to opt-in to this behavior.
2420
2421         This new behavior is only activated if the entire body is copied. If there is a position:fixed
2422         element in the copied selection, it is replaced with position:absolute, and a containing
2423         block (position:relative) is wrapped around the copied text.
2424
2425         This patch originally converted position:-webkit-sticky to position:relative. However, we
2426         currently don't support copying and pasting of position:-webkit-sticky content (See below).
2427         Therefore, this patch only deals with position:fixed.
2428
2429         Right now we don't copy position:-webkit-sticky. This is because:
2430         1. When copying styled elements, we parse the style properties again
2431         2. CSSParserContext has a flag which can disable parsing -webkit-sticky
2432         3. There are two constructors to CSSParserContext: one that takes a document and sets up the
2433         aforementioned flag, and a simple one that doesn't take a document and sets all the enableFoo
2434         flags to false
2435         4. At the relevant place within copy code, we are far removed from the Document object, so we
2436         instead call the second constructor, thereby disabling parsing of -webkit-sticky
2437
2438         Test: editing/pasteboard/copy-paste-converts-sticky-and-fixed.html
2439
2440         * WebCore.exp.in: Export the Setting setter
2441         * editing/EditingStyle.cpp:
2442         (WebCore::EditingStyle::convertFixedAndStickyPosition): Converts a single style
2443         * editing/EditingStyle.h:
2444         * editing/markup.cpp:
2445         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Remember if we found
2446         an element which needs the position:relative containing block
2447         (WebCore::StyledMarkupAccumulator::appendElement): Surround with the position:relative
2448         containing block if necessary
2449         (WebCore::createMarkupInternal):
2450         * page/Settings.cpp:
2451         (WebCore::Settings::Settings): New setting to opt-in to this new behavior
2452         (WebCore::Settings::setConvertPositionStyleOnCopy):
2453         * page/Settings.h:
2454         (WebCore::Settings::convertPositionStyleOnCopy):
2455         * testing/InternalSettings.cpp: Allow setting the setting from a Layout Test
2456         (WebCore::InternalSettings::Backup::Backup):
2457         (WebCore::InternalSettings::Backup::restoreTo):
2458         (WebCore::InternalSettings::setConvertPositionStyleOnCopy):
2459         * testing/InternalSettings.h:
2460         * testing/InternalSettings.idl:
2461
2462 2014-02-11  Youenn Fablet  <youennf@gmail.com>
2463
2464         XMLHttpRequest should not send DNT header
2465         https://bugs.webkit.org/show_bug.cgi?id=128533
2466
2467         Reviewed by Alexey Proskuryakov.
2468
2469         Added DNT (Do Not Track) header to the list of forbidden headers.
2470         Updated http/tests/xmlhttprequest/set-dangerous-headers.html to test that header.
2471
2472         * xml/XMLHttpRequest.cpp:
2473         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
2474
2475 2014-02-10  Jeffrey Pfau  <jpfau@apple.com>
2476
2477         Bring third-party app cache blocking behavior in line with private browsing app cache blocking behavior
2478         https://bugs.webkit.org/show_bug.cgi?id=128557
2479
2480         Reviewed by Alexey Proskuryakov.
2481
2482         * loader/appcache/ApplicationCacheGroup.cpp:
2483         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
2484         (WebCore::ApplicationCacheGroup::selectCache):
2485         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
2486         (WebCore::ApplicationCacheGroup::update):
2487         * loader/appcache/ApplicationCacheHost.cpp:
2488         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
2489         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
2490         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
2491         (WebCore::ApplicationCacheHost::maybeLoadResource):
2492         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
2493         (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
2494         * loader/appcache/ApplicationCacheHost.h:
2495
2496 2014-02-11  Brady Eidson  <beidson@apple.com>
2497
2498         IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in cleanup code
2499         <rdar://problem/16040663> and https://bugs.webkit.org/show_bug.cgi?id=128621
2500
2501         Reviewed by Alexey Proskuryakov.
2502
2503         Covered by storage/indexeddb/mozilla/object-identity.html.
2504
2505         * Modules/indexeddb/IDBTransactionBackend.cpp:
2506         (WebCore::IDBTransactionBackend::abort): Clear the m_database pointer before calling the onAbort callback.
2507         (WebCore::IDBTransactionBackend::commit): Don't run the abort code if there's no m_database pointer.
2508
2509 2014-02-10  Jer Noble  <jer.noble@apple.com>
2510
2511         [EME][Mac] Move the implementation of CDMPrivateAVFoundation back into MediaPlayerPrivateAVFoundationObjC.
2512         https://bugs.webkit.org/show_bug.cgi?id=128559
2513
2514         Reviewed by Dean Jackson.
2515
2516         To prepare for multiple simultaneous CDMs with muliple MediaPlayer types, move the implementation for
2517         CDMPrivateAVFoundation back into its media engine.
2518
2519         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
2520         (WebCore::MediaKeyExceptionToErrorCode): Added.
2521         (WebCore::CDMSessionAVFoundation::generateKeyRequest): Moved to MediaPlayerPrivateAVFoundationObjC.
2522         (WebCore::CDMSessionAVFoundation::releaseKeys): Ditto.
2523         (WebCore::CDMSessionAVFoundation::update): Ditto.
2524         * platform/graphics/MediaPlayer.cpp:
2525         (WebCore::MediaPlayer::generateKeyRequest): Added, pass through to MediaPlayerPrivate.
2526         (WebCore::MediaPlayer::releaseKeys): Ditto.
2527         (WebCore::MediaPlayer::update): Ditto.
2528         * platform/graphics/MediaPlayer.h:
2529         * platform/graphics/MediaPlayerPrivate.h:
2530         (WebCore::MediaPlayerPrivateInterface::generateKeyRequest): Added.
2531         (WebCore::MediaPlayerPrivateInterface::releaseKeys): Ditto.
2532         (WebCore::MediaPlayerPrivateInterface::update): Ditto.
2533         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2534         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2535         (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest): Moved from CDMSessionAVFoundation.
2536         (WebCore::MediaPlayerPrivateAVFoundationObjC::releaseKeys): Ditto.
2537         (WebCore::MediaPlayerPrivateAVFoundationObjC::update): Ditto.
2538
2539 2014-01-24  Jer Noble  <jer.noble@apple.com>
2540
2541         Run UserAgentScripts through jsmin rather than the css preprocessor
2542         https://bugs.webkit.org/show_bug.cgi?id=127559
2543
2544         Reviewed by Tim Horton.
2545
2546         User Agent JavaScript files were being run through the c++ preprocessor to strip out
2547         comments (and presumably to allow #if ENABLE macros, though that feature is entirely
2548         unused). This had the side effect of removing important whitespace, namely newlines where
2549         there would normally be an implicit semicolon.
2550
2551         Instead, .js files will now be run through the jsmin minifier, used by the inspector.
2552         Jsmin will also strip comments and whitespace, but in a syntactically aware way which will
2553         keep newlines when their presence adds an implied semicolon.
2554
2555         * DerivedSources.make:
2556         * Scripts/make-js-file-arrays.py: Added.
2557         (stringifyCodepoint):
2558         (chunk):
2559         (main):
2560
2561 2014-02-11  Andy Estes  <aestes@apple.com>
2562
2563         [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
2564         https://bugs.webkit.org/show_bug.cgi?id=128583
2565
2566         Reviewed by Anders Carlsson.
2567
2568         The delegate method was removed in Snow Leopard.
2569
2570         * loader/ResourceLoader.cpp:
2571         * loader/ResourceLoader.h:
2572         * platform/network/ResourceHandleClient.h:
2573         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
2574         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2575
2576 2014-02-10  Andy Estes  <aestes@apple.com>
2577
2578         [Content Filter] Check for NULL before calling dispatch_release()
2579         https://bugs.webkit.org/show_bug.cgi?id=128576
2580
2581         Reviewed by Darin Adler.
2582
2583         m_neFilterSourceQueue will be NULL if NEFilterSource isn't enabled, and
2584         passing NULL to dispatch_release() is undefined.
2585
2586         * platform/mac/ContentFilterMac.mm:
2587         (WebCore::ContentFilter::~ContentFilter):
2588
2589 2014-01-24  Jer Noble  <jer.noble@apple.com>
2590
2591         [MediaControls] Allow the media controls script to be debuggable by giving it a generated sourceURL
2592         https://bugs.webkit.org/show_bug.cgi?id=127560
2593
2594         Reviewed by Eric Carlson.
2595
2596         When evaluating a script through ScriptController, if that script does not have an
2597         explicit sourceURL, it will not appear in the resources section of the Web Inspector.
2598         For debug builds only, give the media controls script a generated (i.e. fake) sourceURL.
2599
2600         * html/HTMLMediaElement.cpp:
2601         (WebCore::HTMLMediaElement::parseAttribute):
2602
2603 2014-02-11  Samuel White  <samuel_white@apple.com>
2604
2605         AX: Add text replacement activity support to NSAccessibilitySelectTextWithCriteriaParameterizedAttribute.
2606         https://bugs.webkit.org/show_bug.cgi?id=128397
2607
2608         Reviewed by Chris Fleizach.
2609
2610         Added text replacement support for the AXSelectTextWithCriteria parameterized attribute.
2611
2612         No new test. Updated platform/mac/accessibility/select-text.html to test the added functionality.
2613
2614         * accessibility/AccessibilityObject.cpp:
2615         (WebCore::AccessibilityObject::selectText):
2616         * accessibility/AccessibilityObject.h:
2617         (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria):
2618         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2619         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
2620
2621 2014-02-11  Roger Fong  <roger_fong@apple.com>
2622
2623         [Windows] Unreviewed. Speculative test fix.
2624
2625         * platform/graphics/GraphicsContext.h:
2626         (WebCore::GraphicsContext::pixelSnappingFactor):
2627         * platform/graphics/cg/GraphicsContextCG.cpp:
2628         (WebCore::GraphicsContext::platformInit):
2629
2630 2014-02-11  Dan Bernstein  <mitz@apple.com>
2631
2632         iOS build fix.
2633
2634         * platform/ios/TileGrid.mm:
2635         (WebCore::TileGrid::dropTilesBetweenRects):
2636         (WebCore::TileGrid::dropDistantTiles):
2637         (WebCore::TileGrid::dropInvalidTiles):
2638
2639 2014-02-11  James Craig  <jcraig@apple.com>
2640
2641         Web Inspector: AX: Accessibility Node Inspection
2642         https://bugs.webkit.org/show_bug.cgi?id=127447
2643
2644         Reviewed by Timothy Hatcher.
2645
2646         New methods supporting WebCore::AccessibilityObject::computedRoleString()
2647         used for Accessibility section in WebInspector Node Inspector. Other updates 
2648         support the JSON interface for the WebInspectorUI feature.
2649
2650         Test: accessibility/roles-computedRoleString.html
2651
2652         * accessibility/AccessibilityObject.cpp:
2653         (WebCore::initializeRoleMap):
2654         (WebCore::ariaRoleMap):
2655         (WebCore::reverseAriaRoleMap):
2656         (WebCore::AccessibilityObject::ariaRoleToWebCoreRole):
2657         (WebCore::AccessibilityObject::computedRoleString):
2658         * accessibility/AccessibilityObject.h:
2659         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2660         (-[WebAccessibilityObjectWrapper computedRoleString]):
2661         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2662         * inspector/InspectorDOMAgent.cpp:
2663         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
2664         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2665         * inspector/InspectorDOMAgent.h:
2666         * inspector/protocol/DOM.json:
2667
2668 2014-02-10  Oliver Hunt  <oliver@apple.com>
2669
2670         Stop throwing when attempting to read instance properties directly from the prototype
2671         https://bugs.webkit.org/show_bug.cgi?id=128568
2672
2673         Reviewed by Mark Lam.
2674
2675         A number of websites expect to be able to access instance properties
2676         directly through the prototype.  This is broken behavior but if we
2677         throw an exception the entire site breaks.  This patch simply makes us
2678         return undefined when reading, and logs the error to the console.
2679
2680         * bindings/scripts/CodeGeneratorJS.pm:
2681         (GenerateImplementation):
2682         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2683         (WebCore::jsTestActiveDOMObjectExcitingAttr):
2684         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2685         (WebCore::jsTestEventConstructorAttr1):
2686         (WebCore::jsTestEventConstructorAttr2):
2687         * bindings/scripts/test/JS/JSTestException.cpp:
2688         (WebCore::jsTestExceptionName):
2689         * bindings/scripts/test/JS/JSTestInterface.cpp:
2690         (WebCore::jsTestInterfaceImplementsStr1):
2691         (WebCore::jsTestInterfaceImplementsStr2):
2692         (WebCore::jsTestInterfaceImplementsStr3):
2693         (WebCore::jsTestInterfaceImplementsNode):
2694         (WebCore::jsTestInterfaceSupplementalStr1):
2695         (WebCore::jsTestInterfaceSupplementalStr2):
2696         (WebCore::jsTestInterfaceSupplementalStr3):
2697         (WebCore::jsTestInterfaceSupplementalNode):
2698         * bindings/scripts/test/JS/JSTestObj.cpp:
2699         (WebCore::jsTestObjReadOnlyLongAttr):
2700         (WebCore::jsTestObjReadOnlyStringAttr):
2701         (WebCore::jsTestObjReadOnlyTestObjAttr):
2702         (WebCore::jsTestObjConstructorTestSubObj):
2703         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
2704         (WebCore::jsTestObjEnumAttr):
2705         (WebCore::jsTestObjByteAttr):
2706         (WebCore::jsTestObjOctetAttr):
2707         (WebCore::jsTestObjShortAttr):
2708         (WebCore::jsTestObjUnsignedShortAttr):
2709         (WebCore::jsTestObjLongAttr):
2710         (WebCore::jsTestObjLongLongAttr):
2711         (WebCore::jsTestObjUnsignedLongLongAttr):
2712         (WebCore::jsTestObjStringAttr):
2713         (WebCore::jsTestObjTestObjAttr):
2714         (WebCore::jsTestObjXMLObjAttr):
2715         (WebCore::jsTestObjCreate):
2716         (WebCore::jsTestObjReflectedStringAttr):
2717         (WebCore::jsTestObjReflectedIntegralAttr):
2718         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
2719         (WebCore::jsTestObjReflectedBooleanAttr):
2720         (WebCore::jsTestObjReflectedURLAttr):
2721         (WebCore::jsTestObjReflectedCustomIntegralAttr):
2722         (WebCore::jsTestObjReflectedCustomBooleanAttr):
2723         (WebCore::jsTestObjReflectedCustomURLAttr):
2724         (WebCore::jsTestObjTypedArrayAttr):
2725         (WebCore::jsTestObjAttrWithGetterException):
2726         (WebCore::jsTestObjAttrWithSetterException):
2727         (WebCore::jsTestObjStringAttrWithGetterException):
2728         (WebCore::jsTestObjStringAttrWithSetterException):
2729         (WebCore::jsTestObjCustomAttr):
2730         (WebCore::jsTestObjWithScriptStateAttribute):
2731         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
2732         (WebCore::jsTestObjWithScriptStateAttributeRaises):
2733         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2734         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
2735         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2736         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2737         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
2738         (WebCore::jsTestObjConditionalAttr1):
2739         (WebCore::jsTestObjConditionalAttr2):
2740         (WebCore::jsTestObjConditionalAttr3):
2741         (WebCore::jsTestObjConditionalAttr4Constructor):
2742         (WebCore::jsTestObjConditionalAttr5Constructor):
2743         (WebCore::jsTestObjConditionalAttr6Constructor):
2744         (WebCore::jsTestObjCachedAttribute1):
2745         (WebCore::jsTestObjCachedAttribute2):
2746         (WebCore::jsTestObjAnyAttribute):
2747         (WebCore::jsTestObjContentDocument):
2748         (WebCore::jsTestObjMutablePoint):
2749         (WebCore::jsTestObjImmutablePoint):
2750         (WebCore::jsTestObjStrawberry):
2751         (WebCore::jsTestObjStrictFloat):
2752         (WebCore::jsTestObjDescription):
2753         (WebCore::jsTestObjId):
2754         (WebCore::jsTestObjHash):
2755         (WebCore::jsTestObjReplaceableAttribute):
2756         (WebCore::jsTestObjNullableDoubleAttribute):
2757         (WebCore::jsTestObjNullableLongAttribute):
2758         (WebCore::jsTestObjNullableBooleanAttribute):
2759         (WebCore::jsTestObjNullableStringAttribute):
2760         (WebCore::jsTestObjNullableLongSettableAttribute):
2761         (WebCore::jsTestObjNullableStringValue):
2762         (WebCore::jsTestObjAttribute):
2763         (WebCore::jsTestObjAttributeWithReservedEnumType):
2764         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2765         (WebCore::jsTestSerializedScriptValueInterfaceValue):
2766         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
2767         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
2768         (WebCore::jsTestSerializedScriptValueInterfacePorts):
2769         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
2770         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2771         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
2772         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
2773         (WebCore::jsTestTypedefsConstructorTestSubObj):
2774         (WebCore::jsTestTypedefsAttrWithGetterException):
2775         (WebCore::jsTestTypedefsAttrWithSetterException):
2776         (WebCore::jsTestTypedefsStringAttrWithGetterException):
2777         (WebCore::jsTestTypedefsStringAttrWithSetterException):
2778         * bindings/scripts/test/JS/JSattribute.cpp:
2779         (WebCore::jsattributeReadonly):
2780
2781 2014-02-11  Sergio Villar Senin  <svillar@igalia.com>
2782
2783         [CSS Grid Layout] Support calc() breadth size type
2784         https://bugs.webkit.org/show_bug.cgi?id=103761
2785
2786         Reviewed by Dean Jackson.
2787
2788         We now support using calc() in
2789         -webkit-grid-template-{columns|rows}. This means that we now
2790         match the specification and support all the possible ways to
2791         specify the track breadths.
2792
2793         This includes a fix to CSSCalculationValue that was converting
2794         Length values to CalcExpressionNumber and thus removing all the
2795         info regarding length units (px, em, pt...). That's why things
2796         like calc(10px + 20%) were shown as calc(10 + 20%) in
2797         getComputedStyle() output.
2798
2799         * css/CSSCalculationValue.cpp:
2800         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
2801         * css/CSSComputedStyleDeclaration.cpp:
2802         (WebCore::zoomAdjustedPixelValueForLength):
2803         (WebCore::specifiedValueForGridTrackBreadth):
2804         (WebCore::specifiedValueForGridTrackSize):
2805         * css/StyleResolver.cpp:
2806         (WebCore::createGridTrackBreadth):
2807         * rendering/RenderGrid.cpp:
2808         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
2809         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
2810         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
2811
2812 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
2813
2814         Correct some uses of 'auto'
2815         https://bugs.webkit.org/show_bug.cgi?id=128578
2816
2817         Reviewed by Anders Carlsson.
2818
2819         Correct the following instances of "for (auto ...)" to use reference or
2820         const references to avoid copies.
2821
2822         * accessibility/AccessibilityObject.cpp:
2823         (WebCore::AccessibilityObject::elementsFromAttribute):
2824         * css/CSSGridTemplateValue.cpp:
2825         (WebCore::stringForPosition):
2826         * dom/Node.cpp:
2827         (WebCore::NodeListsNodeData::invalidateCaches):
2828         * inspector/PageInjectedScriptManager.cpp:
2829         (WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
2830         * page/WheelEventDeltaTracker.cpp:
2831         (WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
2832         * page/scrolling/ScrollingCoordinator.cpp:
2833         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
2834         * platform/graphics/mac/WebLayer.mm:
2835         (WebCore::drawLayerContents):
2836         * platform/ios/TileGrid.mm:
2837         (WebCore::TileGrid::dropTilesBetweenRects):
2838         (WebCore::TileGrid::dropDistantTiles):
2839         (WebCore::TileGrid::dropInvalidTiles):
2840         * rendering/InlineTextBox.cpp:
2841         (WebCore::translateIntersectionPointsToSkipInkBoundaries):
2842         * testing/InternalSettings.cpp:
2843         (WebCore::InternalSettings::Backup::restoreTo):
2844
2845 2014-02-10  David Hyatt  <hyatt@apple.com>
2846
2847         [New Multicolumn] Make columns work with line grids
2848         https://bugs.webkit.org/show_bug.cgi?id=128555
2849
2850         Reviewed by Antti Koivisto.
2851
2852         Added line-snap-into-columns.html and line-snap-inside-columns.html
2853
2854         * rendering/LayoutState.cpp:
2855         (WebCore::LayoutState::LayoutState):
2856         * rendering/LayoutState.h:
2857         (WebCore::LayoutState::pageOffset):
2858         (WebCore::LayoutState::setLineGridPaginationOrigin):
2859         Change the LayoutState to call into the renderer to compute the line
2860         grid pagination origin instead of doing it directly. Added the
2861         appropriate getters and setters to enable the renderer to do this.
2862
2863         * rendering/RenderBlock.cpp:
2864         (WebCore::RenderBlock::computeLineGridPaginationOrigin):
2865          * rendering/RenderBlock.h:
2866         An implementation for the old multi-column code. The logic is the
2867         same with tweaks made now that the method is on the renderer instead.
2868
2869         * rendering/RenderBlockFlow.cpp:
2870         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
2871         Fix a bug with flow threads and pageLogicalTopForOffset. Normal CSS region-based
2872         flow threads are never embedded in an enclosing pagination context, so they
2873         didn't add in the firstPageLogicalTop (or subtract it when computing the region
2874         hit). Multi-column flow threads do need to subtract out the firstPageLogicalTop,
2875         since it can occur somewhere on the page.
2876         
2877         Ultimately regions will need to get smarter here too if they want to work with
2878         line grids, but for now I just fixed multi-column.
2879
2880         * rendering/RenderBox.cpp:
2881         (WebCore::RenderBox::isUnsplittableForPagination):
2882         Undo this change, since it prevents the inheritance of line grids into the
2883         multi-column layout.
2884
2885         * rendering/RenderMultiColumnFlowThread.cpp:
2886         (WebCore::RenderMultiColumnFlowThread::computeLineGridPaginationOrigin):
2887         * rendering/RenderMultiColumnFlowThread.h:
2888         An implementation for the new multi-column code. The logic is the
2889         same as the old code. Code duplication is ok, since the old multi-column method
2890         in RenderBlock will just be deleted once the new code is turned on, and it's easier
2891         not to intertwine them.
2892
2893 2014-02-11  Radu Stavila  <stavila@adobe.com>
2894
2895         [CSS Regions] Overflow above the first region is not properly painted for regions with padding
2896         https://bugs.webkit.org/show_bug.cgi?id=128590
2897
2898         Reviewed by Andrei Bucur.
2899
2900         Painting is done using the layer of the region's container, so offsetting using the content box
2901         of the region itself is incorrect. 
2902
2903         Test: fast/regions/region-padding-overflow-hidden.html
2904
2905         * rendering/RenderLayer.cpp:
2906         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
2907         * rendering/RenderRegion.cpp:
2908         (WebCore::RenderRegion::regionContainer):
2909         (WebCore::RenderRegion::regionContainerLayer):
2910         * rendering/RenderRegion.h:
2911
2912 2014-02-11  Benjamin Poulain  <benjamin@webkit.org>
2913
2914         querySelector() does not use the compiler correctly
2915         https://bugs.webkit.org/show_bug.cgi?id=128588
2916
2917         Reviewed by Andreas Kling.
2918
2919         * dom/SelectorQuery.cpp:
2920         (WebCore::SelectorDataList::execute):
2921         I messed up the refactoring when I landed SelectorQuery. The compiled
2922         code was not used the first time through SelectorDataList::execute.
2923
2924 2014-02-11  Piotr Grad  <p.grad@samsung.com>
2925
2926         [GStreamer] High playback rate causes crash
2927         https://bugs.webkit.org/show_bug.cgi?id=128453
2928
2929         Reviewed by Philippe Normand.
2930
2931         To high playback rate passed to GStreamer was causing crash.
2932         Added guard in setRate method.
2933
2934         Test: media/video-extreme-playbackrate-crash.html
2935
2936         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2937         (WebCore::MediaPlayerPrivateGStreamer::setRate):
2938
2939 2014-02-10  Brady Eidson  <beidson@apple.com>
2940
2941         IndexedDB assertion at IDBTransactionBackend::~IDBTransactionBackend()
2942         https://bugs.webkit.org/show_bug.cgi?id=128341
2943
2944         Reviewed by Maciej Stachowiak.
2945
2946         * Modules/indexeddb/IDBTransactionBackend.cpp:
2947         (WebCore::IDBTransactionBackend::~IDBTransactionBackend): "Finished" is not the only
2948           valid value here - In WK2, "Unused" is also valid. Update the ASSERT.
2949
2950 2014-02-10  Alexey Proskuryakov  <ap@apple.com>
2951
2952         Add hooks for wrapping CryptoKeys in SerializedScriptValue
2953         https://bugs.webkit.org/show_bug.cgi?id=128567
2954
2955         Reviewed by Anders Carlsson.
2956
2957         * bindings/js/SerializedScriptValue.cpp: Changed SerializedScriptValue to serialize
2958         wrapped keys. Added a version number to crypto key serialization.
2959
2960         * dom/Document.cpp:
2961         (WebCore::Document::wrapCryptoKey):
2962         (WebCore::Document::unwrapCryptoKey):
2963         * dom/Document.h:
2964         * dom/ScriptExecutionContext.h:
2965         * page/ChromeClient.h:
2966         (WebCore::ChromeClient::wrapCryptoKey):
2967         (WebCore::ChromeClient::unwrapCryptoKey):
2968         Hand wrapping/unwrapping over to client code.
2969
2970         * workers/WorkerGlobalScope.cpp:
2971         (WebCore::WorkerGlobalScope::wrapCryptoKey):
2972         (WebCore::WorkerGlobalScope::unwrapCryptoKey):
2973         * workers/WorkerGlobalScope.h:
2974         Not implemented in workers. SubtleCrypto is currently not exposed in workers. It used
2975         to be possible in WebKit implementation to post a CryptoKey to a worker anyway,
2976         but this doesn't work any more.
2977
2978 2014-02-10  ChangSeok Oh  <changseok.oh@collabora.com>
2979
2980         Support ANGLE_instanced_arrays for linux
2981         https://bugs.webkit.org/show_bug.cgi?id=127465
2982
2983         Reviewed by Martin Robinson.
2984
2985         Support the instanced drawing WebGL extension, ANGLE_instanced_arrays for linux platform.
2986         This is a following patch for r162565. Relevant opengl APIs are exposed
2987         for WebGLRenderingContext to access them.
2988
2989         Covered by fast/canvas/webgl/angle-instanced-arrays.html
2990
2991         * html/canvas/ANGLEInstancedArrays.cpp:
2992         (WebCore::ANGLEInstancedArrays::supported):
2993         * platform/graphics/OpenGLShims.cpp:
2994         (WebCore::initializeOpenGLShims):
2995         * platform/graphics/OpenGLShims.h:
2996         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2997         (WebCore::Extensions3DOpenGL::supportsExtension):
2998         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2999         (WebCore::GraphicsContext3D::drawArraysInstanced):
3000         (WebCore::GraphicsContext3D::drawElementsInstanced):
3001         (WebCore::GraphicsContext3D::vertexAttribDivisor):
3002
3003 2014-02-10  Mark Lam  <mark.lam@apple.com>
3004
3005         Removing limitation on JSLock’s lockDropDepth.
3006         <https://webkit.org/b/128570>
3007
3008         Reviewed by Geoffrey Garen.
3009
3010         No new tests.
3011
3012         * bindings/js/PageScriptDebugServer.cpp:
3013         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
3014         * platform/ios/wak/WebCoreThread.mm:
3015         (SendDelegateMessage):
3016         (WebThreadRunOnMainThread):
3017         - No longer need to specify AlwaysDropLocks, because DropAllLocks is
3018           now always unconditional.
3019
3020 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3021
3022         Clean up MarkupAccumulator::appendCharactersReplacingEntities
3023         https://bugs.webkit.org/show_bug.cgi?id=128440
3024
3025         Reviewed by Ryosuke Niwa.
3026
3027         Some cleanup:
3028         -Remove the copied code for the loops. Instead, use a template with the loop
3029          parametrized by the characters type.
3030         -Move EntityDescription from the header to the implementation.
3031         -Make the 5 substitution strings compile-time literals. Replacement is not hot enough
3032          to justify the static here.
3033
3034         * editing/MarkupAccumulator.cpp:
3035         (WebCore::appendCharactersReplacingEntitiesInternal):
3036         (WebCore::MarkupAccumulator::appendCharactersReplacingEntities):
3037         * editing/MarkupAccumulator.h:
3038
3039 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3040
3041         Add a few pseudo type to the selector compiler through function calls
3042         https://bugs.webkit.org/show_bug.cgi?id=128514
3043
3044         Reviewed by Dean Jackson.
3045
3046         Certain pseudo type checkers rely on virtual function calls. Since those types
3047         are uncommon, and this code generator cannot currently make virtual function calls,
3048         the checker are added by generating a function call to a wrapper function.
3049
3050         To avoid code duplication between SelectorChecker and the compiler, all the relevant checking
3051         code has been moved to a common header, SelectorCheckerTestFunctions.h.
3052         SelectorChecker still inline the functions, while the SelectorCompiler generate local static functions
3053         and generate calls to them as needed.
3054
3055         * GNUmakefile.list.am:
3056         * WebCore.vcxproj/WebCore.vcxproj:
3057         * WebCore.vcxproj/WebCore.vcxproj.filters:
3058         * WebCore.xcodeproj/project.pbxproj:
3059         * css/SelectorChecker.cpp:
3060         (WebCore::SelectorChecker::checkOne):
3061         * css/SelectorCheckerTestFunctions.h: Added.
3062         (WebCore::isAutofilled):
3063         (WebCore::isDefaultButtonForForm):
3064         (WebCore::isDisabled):
3065         (WebCore::isEnabled):
3066         (WebCore::isChecked):
3067         (WebCore::isInvalid):
3068         (WebCore::isOptionalFormControl):
3069         (WebCore::isRequiredFormControl):
3070         (WebCore::isValid):
3071         (WebCore::matchesReadOnlyPseudoClass):
3072         (WebCore::matchesReadWritePseudoClass):
3073         (WebCore::shouldAppearIndeterminate):
3074         (WebCore::matchesFullScreenPseudoClass):
3075         (WebCore::matchesFutureCuePseudoClass):
3076         (WebCore::matchesPastCuePseudoClass):
3077         * cssjit/SelectorCompiler.cpp:
3078         (WebCore::SelectorCompiler::addPseudoType):
3079         (WebCore::SelectorCompiler::nonConstTestFunctionWrapper):
3080         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3081         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
3082         * dom/Element.h:
3083         (WebCore::Element::isValidFormControlElement):
3084         * dom/Node.h:
3085         (WebCore::Node::toInputElement):
3086         * html/HTMLFormControlElement.cpp:
3087         (WebCore::HTMLFormControlElement::isValidFormControlElement):
3088         * html/HTMLFormControlElement.h:
3089
3090 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3091
3092         Add the basic infrastructure to compile attributes matching in selectors
3093         https://bugs.webkit.org/show_bug.cgi?id=128484
3094
3095         Reviewed by Gavin Barraclough.
3096
3097         Tests: fast/selectors/querySelector-attribute-match-with-child-backtracking.html
3098                fast/selectors/querySelector-long-attribute-match-with-child-backtracking.html
3099                fast/selectors/querySelector-long-multiple-attribute-match-with-child-backtracking.html
3100                fast/selectors/querySelector-multiple-attribute-match-with-child-backtracking.html
3101
3102         Add the infrastructure to match attributes. This only add basic support for the 'Set' match
3103         type, the other match types will have to be built on top.
3104
3105         * cssjit/RegisterAllocator.h:
3106         (WebCore::RegisterAllocator::availableRegisterCount):
3107         (WebCore::RegisterAllocator::allocateRegister):
3108         (WebCore::RegisterAllocator::deallocateRegister):
3109         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
3110         (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
3111         (WebCore::RegisterAllocator::allocatedRegisters):
3112         (WebCore::RegisterAllocator::RegisterAllocator):
3113         (WebCore::RegisterAllocator::~RegisterAllocator):
3114         In the worst case, matching attributes can take up to 10 registers. On x86_64, we have
3115         8 caller-saved registers. The extra 2 registers are simply added by taking callee-saved registers.
3116
3117         RegisterAllocator is modified to know support saving and restoring callee saved registers.
3118         The list of available registers is changed from a vector to a HashSet because the registers
3119         are removed from arbitrary locations in restoreCalleeSavedRegisters(). The m_allocatedRegisters
3120         remain a vector since the allocation/release pattern remain ordered.
3121
3122         * cssjit/SelectorCompiler.cpp:
3123         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
3124
3125         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3126         This new utility finds the minimum number of registers needed to compile the input. In most
3127         cases we have plenty enough. In rare cases we need to saved a few registers to the stack.
3128
3129         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3130         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
3131         (WebCore::SelectorCompiler::testIsHTMLFlagOnNode):
3132         (WebCore::SelectorCompiler::canMatchStyleAttribute):
3133
3134         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
3135         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
3136         The style attribute and certain SVG attributes can be modified lazily. In those cases,
3137         the element needs to be updated before querying the attributes.
3138
3139         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
3140         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
3141         Generate the attribute matching. For each CSSSelector matching an attribute, we generate
3142         a loop over all the attributes of the element, maching the particular CSSSelector.
3143         This makes no attempt at grouping related queries since those do not seem to happen a lot
3144         in practice.
3145
3146         * dom/Attribute.h:
3147         (WebCore::Attribute::nameMemoryOffset):
3148         (WebCore::Attribute::nameMatchesFilter):
3149         (WebCore::Attribute::matches):
3150         * dom/ElementData.h:
3151         (WebCore::ElementData::isUniqueFlag):
3152         (WebCore::ElementData::arraySizeAndFlagsMemoryOffset):
3153         (WebCore::ElementData::styleAttributeIsDirtyFlag):
3154         (WebCore::ElementData::animatedSVGAttributesAreDirtyFlag):
3155         (WebCore::ElementData::arraySizeOffset):
3156         (WebCore::ShareableElementData::attributeArrayMemoryOffset):
3157         (WebCore::UniqueElementData::attributeVectorMemoryOffset):
3158         * dom/Node.h:
3159         (WebCore::Node::flagIsHTML):
3160         * dom/StyledElement.cpp:
3161         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
3162         * dom/StyledElement.h:
3163         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
3164         * svg/SVGElement.cpp:
3165         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
3166         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
3167         * svg/SVGElement.h:
3168
3169 2014-02-10  Brady Eidson  <beidson@apple.com>
3170
3171         IDB: storage/indexeddb/mozilla/indexes.html fails
3172         <rdar://problem/16031590> and https://bugs.webkit.org/show_bug.cgi?id=128563
3173
3174         Reviewed by Tim Horton.
3175
3176         Tested by storage/indexeddb/mozilla/indexes.html (and probably others)
3177
3178         * Modules/indexeddb/IDBGetResult.h:
3179         (WebCore::IDBGetResult::IDBGetResult): Add a constructor that takes an IDBKeyData argument.
3180
3181         * Modules/indexeddb/IDBRequest.cpp:
3182         (WebCore::IDBRequest::onSuccess): If there’s no keyPath then skip the injection step.
3183
3184 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
3185
3186         Speed up DatasetDOMStringMap::item() when the element has multiple attributes
3187         https://bugs.webkit.org/show_bug.cgi?id=128058
3188
3189         Reviewed by Darin Adler.
3190
3191         Accessing data attributes by name through DatasetDOMStringMap involes the conversion
3192         from JavaScript property name to attribute name (done with propertyNameMatchesAttributeName()).
3193
3194         When there is a single data attribute, that method is efficient. When there are several attributes,
3195         comparing names character by character becomes a bottleneck.
3196
3197         This patch add an efficent path for this case: instead of converting the attribute name on the fly,
3198         the JavaScript property name is converted to an attribute name so that it can compared by its
3199         AtomicStringImpl pointer.
3200
3201         This method puts a lot more pressure on convertPropertyNameToAttributeName()'s speed. The method was
3202         improved accordingly to compensate for its new caller.
3203
3204         When enumerating multiple attributes by name, this patch provides about 80% speedup.
3205         I could not measure any slow down on the simple cases.
3206
3207         * dom/DatasetDOMStringMap.cpp:
3208         (WebCore::convertPropertyNameToAttributeName):
3209         (WebCore::DatasetDOMStringMap::item):
3210         * dom/ElementData.h:
3211         (WebCore::AttributeIteratorAccessor::attributeCount):
3212
3213 2014-02-10  Ryosuke Niwa  <rniwa@webkit.org>
3214
3215         Address the review comments for r163825.
3216
3217         * html/HTMLTextFormControlElement.cpp:
3218         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
3219         (WebCore::positionForIndex):
3220
3221 2014-02-10  Simon Fraser  <simon.fraser@apple.com>
3222
3223         Try to fix the 32-bit build.
3224
3225         * WebCore.exp.in:
3226
3227 2014-02-10  Filip Pizlo  <fpizlo@apple.com>
3228
3229         Rename Operations.h to JSCInlines.h
3230         https://bugs.webkit.org/show_bug.cgi?id=128543
3231
3232         Rubber stamped by Geoffrey Garen.
3233
3234         No new tests because no change in behavior.
3235
3236         * ForwardingHeaders/runtime/JSCInlines.h: Added.
3237         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
3238         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3239         * bindings/js/JSCustomXPathNSResolver.h:
3240         * bindings/js/JSDOMBinding.h:
3241         * bindings/js/JSDOMGlobalObject.h:
3242         * bindings/js/JSDictionary.h:
3243         * bindings/js/JSMessagePortCustom.cpp:
3244         * bindings/js/JSMessagePortCustom.h:
3245         * bindings/js/JSNodeFilterCondition.h:
3246         * bindings/js/SerializedScriptValue.cpp:
3247         * bindings/js/WebCoreTypedArrayController.cpp:
3248         * bridge/c/c_utility.h:
3249         * bridge/jsc/BridgeJSC.h:
3250         * dom/CustomEvent.cpp:
3251         * dom/Node.cpp:
3252         * html/HTMLCanvasElement.cpp:
3253         * html/HTMLImageLoader.cpp:
3254         * html/canvas/WebGLRenderingContext.cpp:
3255         * inspector/InspectorDOMAgent.cpp:
3256         * inspector/WebConsoleAgent.cpp:
3257         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3258         * platform/graphics/filters/FEGaussianBlur.cpp:
3259         * platform/graphics/filters/FilterEffect.cpp:
3260         * testing/MockCDM.cpp:
3261         * xml/XMLHttpRequest.cpp:
3262
3263 2014-02-09  Dean Jackson  <dino@apple.com>
3264
3265         Update aspect-ratio property to have constraining keywords
3266         https://bugs.webkit.org/show_bug.cgi?id=128262
3267
3268         Reviewed by Simon Fraser.
3269
3270         Add support for "from-dimensions" and "from-intrinsic"
3271         property values to "-webkit-aspect-ratio". I also changed
3272         the default value from "none" to "auto", because "none" doesn't
3273         make sense any more.
3274
3275         Covered by enhancing existing tests.
3276
3277         * css/CSSComputedStyleDeclaration.cpp:
3278         (WebCore::ComputedStyleExtractor::propertyValue): New keywords.
3279         * css/CSSParser.cpp:
3280         (WebCore::CSSParser::parseAspectRatio): Support new keywords.
3281         * css/CSSValueKeywords.in: Add from-dimensions and from-intrinsic.
3282         * css/DeprecatedStyleBuilder.cpp: This now has to handle the new
3283         values. I also changed "none" to "auto".
3284         (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
3285         (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
3286         (WebCore::ApplyPropertyAspectRatio::applyValue):
3287         * rendering/style/RenderStyle.h: hasAspectRatio is now aspectRatioType
3288         and indicates one of the three keywords, or a specified number.
3289         * rendering/style/RenderStyleConstants.h: New enum.
3290         * rendering/style/StyleRareNonInheritedData.cpp:
3291         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3292         (WebCore::StyleRareNonInheritedData::operator==):
3293         * rendering/style/StyleRareNonInheritedData.h:
3294
3295 2014-02-10  Benjamin Poulain  <bpoulain@apple.com>
3296
3297         [WK2] Add support for image document viewport configuration
3298         https://bugs.webkit.org/show_bug.cgi?id=128565
3299
3300         Reviewed by Simon Fraser.
3301
3302         Add proper default settings for displaying images.
3303
3304         * WebCore.exp.in:
3305         * page/ViewportConfiguration.cpp:
3306         (WebCore::ViewportConfiguration::imageDocumentParameters):
3307         (WebCore::ViewportConfiguration::textDocumentParameters):
3308         * page/ViewportConfiguration.h:
3309
3310 2014-02-10  Brendan Long  <b.long@cablelabs.com>
3311
3312         Unreviewed GTK build fix after r163816.
3313
3314         * GNUmakefile.list.am: Remove HTMLMediaSource.h and HTMLMediaSource.cpp
3315
3316 2014-02-10  Jinwoo Song  <jinwoo7.song@samsung.com>
3317
3318         Unreviewed EFL WebKit2 build fix after r163816.
3319
3320         * CMakeLists.txt: Remove HTMLMediaSource.cpp
3321
3322 2014-02-10  Ryosuke Niwa  <rniwa@webkit.org>
3323
3324         HTMLTextFormControlElement::setSelectionRange shouldn't use VisiblePosition
3325         https://bugs.webkit.org/show_bug.cgi?id=128478
3326
3327         Reviewed by Darin Adler.
3328
3329         Added positionForIndex to compute Position given a selection index. This function doesn't
3330         synchronously trigger like visiblePositionForIndex.
3331
3332         Also added assertions in visiblePositionForIndex and visiblePositionForIndex to make sure
3333         they are inverse of one another.
3334
3335         * html/HTMLTextFormControlElement.cpp:
3336         (WebCore::HTMLTextFormControlElement::setSelectionRange): Use positionForIndex. Also removed
3337         the now tautological assertions since we would never create a position outside the inner text
3338         element.
3339
3340         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Fixed the bug where this
3341         function could return a selection index beyond innerTextElement in some types of input
3342         elements such as search fields. fast/forms/search-disabled-readonly.html hits the newly
3343         added assertion without this change. Note we can't use visiblePositionForIndex here as that
3344         would result in a mutual recursion with the assertion in visiblePositionForIndex.
3345
3346         (WebCore::HTMLTextFormControlElement::visiblePositionForIndex): Added an assertion.
3347
3348         (WebCore::positionForIndex): Added. It's here with prototype at the beginning of the file
3349         so that it's right next to HTMLTextFormControlElement::innerText() where we do a similar
3350         DOM traversal to obtain the inner text value.
3351
3352 2014-02-07  Jeffrey Pfau  <jpfau@apple.com>
3353
3354         Disable access to application cache when in private browsing
3355         https://bugs.webkit.org/show_bug.cgi?id=128426
3356
3357         Reviewed by Alexey Proskuryakov.
3358
3359         Tests: http/tests/security/appcache-in-private-browsing.html
3360                http/tests/security/appcache-switching-private-browsing.html
3361
3362         * loader/appcache/ApplicationCacheGroup.cpp:
3363         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3364         (WebCore::ApplicationCacheGroup::selectCache):
3365         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3366         (WebCore::ApplicationCacheGroup::update):
3367         * loader/appcache/ApplicationCacheHost.cpp:
3368         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
3369
3370 2014-02-10  Jer Noble  <jer.noble@apple.com>
3371
3372         [MSE] Fix layering violations in MediaSource
3373         https://bugs.webkit.org/show_bug.cgi?id=128546
3374
3375         Reviewed by Eric Carlson.
3376
3377         Code in Modules should be considered part of html/ and should have the
3378         same layering properties. Get rid of HTMLMediaSource (which was intended
3379         to allow Modules/mediasource to be considered part of platform/) and add
3380         a new client interface allowing communication from platform/ -> 
3381         Modules/mediasource.
3382
3383         Replace HTMLMediaSource -> MediaSourcePrivateClient:
3384         * html/HTMLMediaSource.cpp: Removed.
3385         * html/HTMLMediaSource.h: Removed.
3386         * platform/graphics/MediaSourcePrivateClient.h: Added.
3387         (WebCore::MediaSourcePrivateClient::~MediaSourcePrivateClient):
3388
3389         Move registry support from HTMLMediaSource -> MediaSource.
3390         * Modules/mediasource/MediaSource.cpp:
3391         (WebCore::MediaSource::setRegistry): Moved from HTMLMediaSource.cpp.
3392         * Modules/mediasource/MediaSource.h:
3393         (WebCore::MediaSource::lookup): Ditto.
3394
3395         Update references to HTMLMediaSource -> MediaSource:
3396         * Modules/mediasource/MediaSourceRegistry.cpp:
3397         (WebCore::MediaSourceRegistry::MediaSourceRegistry): 
3398         * WebCore.xcodeproj/project.pbxproj:
3399         * html/HTMLMediaElement.cpp:
3400         (WebCore::HTMLMediaElement::loadResource):
3401         * html/HTMLMediaElement.h:
3402
3403         Update references to HTMLMediaSource -> MediaSourcePrivateClient:
3404         * platform/graphics/MediaPlayer.cpp:
3405         (WebCore::NullMediaPlayerPrivate::load):
3406         (WebCore::MediaPlayer::load): Ditto.
3407         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3408         * platform/graphics/MediaPlayer.h:
3409         * platform/graphics/MediaPlayerPrivate.h:
3410         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3411         (WebCore::MediaPlayerPrivateAVFoundation::load):
3412         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3413         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3414         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3415         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
3416         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3417         (WebCore::MediaPlayerPrivateGStreamer::load):
3418         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3419         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
3420         (WebCore::MediaSourceGStreamer::open):
3421         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
3422         * platform/graphics/ios/MediaPlayerPrivateIOS.h:
3423         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3424         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3425         (WebCore::MediaPlayerPrivateQTKit::load):
3426         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3427         (WebCore::MockMediaPlayerMediaSource::load):
3428         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3429
3430 2014-02-10  Alexey Proskuryakov  <ap@apple.com>
3431
3432         Remove some unused functions from SerializedScriptValue
3433         https://bugs.webkit.org/show_bug.cgi?id=128407
3434
3435         Reviewed by Oliver Hunt.
3436
3437         Removed functions that used Deprecated::ScriptValue
3438
3439         * Modules/indexeddb/IDBObjectStore.cpp:
3440         (WebCore::IDBObjectStore::put):
3441         * bindings/js/IDBBindingUtilities.cpp:
3442         (WebCore::deserializeIDBValue):
3443         (WebCore::deserializeIDBValueBuffer):
3444         * bindings/js/SerializedScriptValue.cpp:
3445         * bindings/js/SerializedScriptValue.h:
3446
3447 2014-02-10  Roger Fong  <roger_fong@apple.com>
3448
3449         [Windows] Unreviewed test fix.
3450
3451         * platform/graphics/cg/GraphicsContextCG.cpp: m_pixelSnappingFactor was not set to 1.
3452         (WebCore::GraphicsContext::platformInit):
3453
3454 2014-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
3455
3456         [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
3457         https://bugs.webkit.org/show_bug.cgi?id=127554
3458
3459         Reviewed by Gustavo Noronha Silva.
3460
3461         Use GUniqueOutPtr instead of GOwnPtr.
3462
3463         * GNUmakefile.list.am:
3464         * PlatformEfl.cmake:
3465         * PlatformGTK.cmake:
3466         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3467         (WebCore::AudioDestinationGStreamer::handleMessage):
3468         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3469         (WebCore::AudioFileReader::handleMessage):
3470         * platform/glib/BatteryProviderUPower.cpp:
3471         (BatteryProviderUPower::startUpdating):
3472         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
3473         (WebCore::initializeGStreamer):
3474         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3475         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3476         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3477         (WebCore::TrackPrivateBaseGStreamer::getTag):
3478         * platform/graphics/gtk/ImageBufferGtk.cpp:
3479         (WebCore::encodeImage):
3480         (WebCore::ImageBuffer::toDataURL):
3481         * platform/graphics/gtk/ImageGtk.cpp:
3482         (WebCore::loadResourceSharedBuffer):
3483         * platform/gtk/DataObjectGtk.cpp:
3484         (WebCore::DataObjectGtk::setURIList):
3485         * platform/gtk/FileSystemGtk.cpp:
3486         (WebCore::readFromFile):
3487         * platform/gtk/GamepadsGtk.cpp:
3488         (WebCore::GamepadDeviceGtk::readCallback):
3489         * platform/gtk/GtkInputMethodFilter.cpp:
3490         (WebCore::GtkInputMethodFilter::handlePreeditChanged):
3491         * platform/gtk/PasteboardHelper.cpp:
3492         (WebCore::PasteboardHelper::fillDataObjectFromDropData):
3493         * platform/gtk/RenderThemeGtk.cpp:
3494         (WebCore::RenderThemeGtk::systemFont):
3495         * platform/gtk/SharedBufferGtk.cpp:
3496         (WebCore::SharedBuffer::createWithContentsOfFile):
3497         * platform/network/gtk/CredentialBackingStore.cpp:
3498         (WebCore::credentialForChallengeAsyncReadyCallback):
3499         * platform/network/soup/GOwnPtrSoup.cpp: Removed.
3500         * platform/network/soup/GOwnPtrSoup.h: Removed.
3501         * platform/network/soup/ResourceHandleSoup.cpp:
3502         (WebCore::redirectSkipCallback):
3503         (WebCore::nextMultipartResponsePartCallback):
3504         (WebCore::sendRequestCallback):
3505         (WebCore::addFileToSoupMessageBody):
3506         (WebCore::createSoupRequestAndMessageForHandle):
3507         (WebCore::readCallback):
3508         * platform/network/soup/SocketStreamHandleSoup.cpp:
3509         (WebCore::SocketStreamHandle::platformSend):
3510         (WebCore::SocketStreamHandle::platformClose):
3511         (WebCore::connectedCallback):
3512         (WebCore::readReadyCallback):
3513         * platform/network/soup/SoupNetworkSession.cpp:
3514         (WebCore::SoupNetworkSession::httpProxy):
3515
3516 2014-02-10  Darin Adler  <darin@apple.com>
3517
3518         Automatically generate isRendererOfType in RENDER_OBJECT_TYPE_CASTS
3519         https://bugs.webkit.org/show_bug.cgi?id=128520
3520
3521         Reviewed by Andreas Kling.
3522
3523         * rendering/RenderObject.h: Updated the RENDER_OBJECT_TYPE_CASTS macro so
3524         that it generates isRendererOfType specializations as well as type casts
3525         and also have the type casts use the isRendererOfType function. The macro
3526         also now uses an argument name of "renderer" and allows for a predicate
3527         that is more than just a single function call (see RenderTextFragment.h).
3528
3529         * rendering/RenderBlock.h:
3530         * rendering/RenderBlockFlow.h:
3531         * rendering/RenderBox.h:
3532         * rendering/RenderBoxModelObject.h:
3533         * rendering/RenderCounter.h:
3534         * rendering/RenderElement.h:
3535         * rendering/RenderFrameSet.h:
3536         * rendering/RenderLayerModelObject.h:
3537         * rendering/RenderMenuList.h:
3538         * rendering/RenderNamedFlowThread.h:
3539         * rendering/RenderRubyRun.h:
3540         * rendering/RenderTableSection.h:
3541         * rendering/RenderText.h:
3542         * rendering/mathml/RenderMathMLBlock.h:
3543         * rendering/mathml/RenderMathMLOperator.h:
3544         * rendering/mathml/RenderMathMLToken.h:
3545         * rendering/svg/RenderSVGRoot.h:
3546         * rendering/svg/RenderSVGText.h:
3547         Removed specialization of isRendererOfType, since the RENDER_OBJECT_TYPE_CASTS
3548         macro handles that now. Also removed some unneeded semicolons.
3549
3550         * rendering/RenderTextFragment.h: Use RENDER_OBJECT_TYPE_CASTS instead of
3551         hand written casts, now that it can handle a non-trivial predicate.
3552
3553         * rendering/RenderCombineText.h:
3554         * rendering/RenderDetailsMarker.h:
3555         * rendering/RenderListMarker.h:
3556         * rendering/RenderVideo.h:
3557         * rendering/RenderView.h:
3558         * rendering/mathml/RenderMathMLFraction.h:
3559         * rendering/mathml/RenderMathMLScripts.h:
3560         * rendering/mathml/RenderMathMLSpace.h:
3561         Removed unneeded semicolons.
3562
3563 2014-02-10  Darin Adler  <darin@apple.com>
3564
3565         Stop using String::deprecatedCharacters to call WTF::Collator
3566         https://bugs.webkit.org/show_bug.cgi?id=128517
3567
3568         Reviewed by Alexey Proskuryakov.
3569
3570         * xml/XSLTUnicodeSort.cpp:
3571         (WebCore::xsltUnicodeSortFunction): Create the collator in a single line using the
3572         new constructor that takes a shouldSortLowercaseFirst boolean. Use the new
3573         collateUTF8 function instead of upconverting UTF-8 strings to UTF-16 as the old code did.
3574
3575 2014-02-10  Changhun Kang  <temoochin@company100.net>
3576
3577         Remove unnecessary comment lines.
3578         https://bugs.webkit.org/show_bug.cgi?id=127894
3579
3580         Reviewed by Darin Adler.
3581
3582         No new tests. No change in behavior.
3583
3584         * Modules/websockets/WebSocketHandshake.cpp:
3585         (WebCore::WebSocketHandshake::clientHandshakeRequest):
3586
3587 2014-02-10  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3588
3589         Fix EFL build with INSPECTOR disabled
3590         https://bugs.webkit.org/show_bug.cgi?id=125064
3591
3592         Reviewed by Csaba Osztrogonác.
3593
3594         * bindings/js/PageScriptDebugServer.cpp:
3595         * bindings/js/PageScriptDebugServer.h:
3596         * bindings/js/WorkerScriptDebugServer.cpp:
3597         * bindings/js/WorkerScriptDebugServer.h:
3598         * inspector/PageInjectedScriptManager.h:
3599
3600 2014-02-10  Zan Dobersek  <zdobersek@igalia.com>
3601
3602         Fix a few mistakes that landed with r163749.
3603
3604         Rubber-stamped by Carlos Garcia Campos.
3605
3606         * platform/gtk/GtkTouchContextHelper.cpp:
3607         (WebCore::GtkTouchContextHelper::handleEvent): When handling GDK_TOUCH_BEGIN, the assertion
3608         should ensure that the sequence-to-event map doesn't yet contain pairs with the specific
3609         sequence as the key.
3610
3611 2014-02-10  David Kilzer  <ddkilzer@apple.com>
3612
3613         Add type-safe casts for ContentData subclasses
3614         <http://webkit.org/b/128510>
3615
3616         Reviewed by Darin Adler.
3617
3618         * css/CSSComputedStyleDeclaration.cpp:
3619         (WebCore::contentToCSSValue):
3620         * css/StyleResolver.cpp:
3621         (WebCore::StyleResolver::loadPendingImages):
3622         * rendering/RenderElement.cpp:
3623         (WebCore::RenderElement::createFor):
3624         * rendering/style/RenderStyle.cpp:
3625         (WebCore::RenderStyle::setContent):
3626         - Switch to toFooContentData() methods.
3627
3628         * rendering/style/ContentData.h:
3629         - Define toFooContentData() methods.
3630         - Extract FooContentData::equals() methods so that the
3631           toFooContentData() methods can be used.
3632
3633 2014-02-09  Dirk Schulze  <dschulze@chromium.org>
3634
3635         -webkit-clip-path should support fill, stroke, view-box keywords
3636         https://bugs.webkit.org/show_bug.cgi?id=128393
3637
3638         Reviewed by Dean Jackson.
3639
3640         CSS Masking uses the keywords fill, stroke and view-box for SVG shapes.
3641         This patch updates the parser, style resolver and SVG implementation of
3642         the prefixed clip-path property.
3643
3644         Remove the unexposed and obsolete keyword bounding-box.
3645
3646         Tests: svg/clip-path/clip-path-shape-fill-expected.svg
3647                svg/clip-path/clip-path-shape-fill.svg
3648                svg/clip-path/clip-path-shape-stroke-expected.svg
3649                svg/clip-path/clip-path-shape-stroke.svg
3650                svg/clip-path/clip-path-shape-view-box-expected.svg
3651                svg/clip-path/clip-path-shape-view-box.svg
3652
3653         * css/CSSParser.cpp: Parse fill, stroke, view-box. Remove bounding-box.
3654         (WebCore::isBoxValue):
3655         * css/CSSPrimitiveValueMappings.h:
3656         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3657         (WebCore::CSSPrimitiveValue::operator LayoutBox):
3658         * css/CSSValueKeywords.in:
3659         * css/DeprecatedStyleBuilder.cpp:
3660         (WebCore::ApplyPropertyClipPath::applyValue):
3661         * rendering/RenderLayer.cpp:
3662         (WebCore::computeReferenceBox):
3663         * rendering/shapes/ShapeInfo.h:
3664         (WebCore::ShapeInfo::setShapeSize):
3665         (WebCore::ShapeInfo::logicalTopOffset):
3666         (WebCore::ShapeInfo::logicalLeftOffset):
3667         * rendering/style/RenderStyleConstants.h:
3668         * rendering/svg/SVGRenderingContext.cpp: Use different reference boxes per keyword.
3669         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3670
3671 2014-02-09  Dean Jackson  <dino@apple.com>
3672
3673         [WebGL] Remove state restorer code
3674         https://bugs.webkit.org/show_bug.cgi?id=128516
3675
3676         Reviewed by Dirk Schulze.
3677
3678         I'm not sure what the point of the WebGLStateRestorer class was. It was
3679         always constructed with a false parameter, and then wasn't even retained
3680         in local scope (so wouldn't have worked anyway). Meanwhile there were
3681         also LOTS of calls to cleanupAfterGraphicsCall, the majority of which
3682         were a no-op. I replaced the handful of cleanupAfterGraphicsCall(true)
3683         with the call to markContextChanged().
3684
3685         * html/canvas/OESVertexArrayObject.cpp:
3686         (WebCore::OESVertexArrayObject::bindVertexArrayOES):
3687         * html/canvas/WebGLRenderingContext.cpp:
3688         (WebCore::WebGLRenderingContext::activeTexture):
3689         (WebCore::WebGLRenderingContext::attachShader):
3690         (WebCore::WebGLRenderingContext::bindAttribLocation):
3691         (WebCore::WebGLRenderingContext::bindBuffer):
3692         (WebCore::WebGLRenderingContext::bindFramebuffer):
3693         (WebCore::WebGLRenderingContext::bindRenderbuffer):
3694         (WebCore::WebGLRenderingContext::bindTexture):
3695         (WebCore::WebGLRenderingContext::blendColor):
3696         (WebCore::WebGLRenderingContext::blendEquation):
3697         (WebCore::WebGLRenderingContext::blendEquationSeparate):
3698         (WebCore::WebGLRenderingContext::blendFunc):
3699         (WebCore::WebGLRenderingContext::blendFuncSeparate):
3700         (WebCore::WebGLRenderingContext::bufferData):
3701         (WebCore::WebGLRenderingContext::bufferSubData):
3702         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
3703         (WebCore::WebGLRenderingContext::clear):
3704         (WebCore::WebGLRenderingContext::clearColor):
3705         (WebCore::WebGLRenderingContext::clearDepth):
3706         (WebCore::WebGLRenderingContext::clearStencil):
3707         (WebCore::WebGLRenderingContext::colorMask):
3708         (WebCore::WebGLRenderingContext::compileShader):
3709         (WebCore::WebGLRenderingContext::compressedTexImage2D):
3710         (WebCore::WebGLRenderingContext::compressedTexSubImage2D):
3711         (WebCore::WebGLRenderingContext::copyTexImage2D):
3712         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
3713         (WebCore::WebGLRenderingContext::cullFace):
3714         (WebCore::WebGLRenderingContext::depthFunc):
3715         (WebCore::WebGLRenderingContext::depthMask):
3716         (WebCore::WebGLRenderingContext::depthRange):
3717         (WebCore::WebGLRenderingContext::detachShader):
3718         (WebCore::WebGLRenderingContext::disable):
3719         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
3720         (WebCore::WebGLRenderingContext::validateDrawArrays):
3721         (WebCore::WebGLRenderingContext::drawArrays):
3722         (WebCore::WebGLRenderingContext::validateDrawElements):
3723         (WebCore::WebGLRenderingContext::drawElements):
3724         (WebCore::WebGLRenderingContext::enable):
3725         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
3726         (WebCore::WebGLRenderingContext::finish):
3727         (WebCore::WebGLRenderingContext::flush):
3728         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
3729         (WebCore::WebGLRenderingContext::framebufferTexture2D):
3730         (WebCore::WebGLRenderingContext::frontFace):
3731         (WebCore::WebGLRenderingContext::generateMipmap):
3732         (WebCore::WebGLRenderingContext::getBufferParameter):
3733         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
3734         (WebCore::WebGLRenderingContext::getParameter):
3735         (WebCore::WebGLRenderingContext::getProgramParameter):
3736         (WebCore::WebGLRenderingContext::getProgramInfoLog):
3737         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
3738         (WebCore::WebGLRenderingContext::getShaderParameter):
3739         (WebCore::WebGLRenderingContext::getShaderInfoLog):
3740         (WebCore::WebGLRenderingContext::getTexParameter):
3741         (WebCore::WebGLRenderingContext::getUniform):
3742         (WebCore::WebGLRenderingContext::getUniformLocation):
3743         (WebCore::WebGLRenderingContext::getVertexAttrib):
3744         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
3745         (WebCore::WebGLRenderingContext::hint):
3746         (WebCore::WebGLRenderingContext::lineWidth):
3747         (WebCore::WebGLRenderingContext::linkProgram):
3748         (WebCore::WebGLRenderingContext::pixelStorei):
3749         (WebCore::WebGLRenderingContext::polygonOffset):
3750         (WebCore::WebGLRenderingContext::readPixels):
3751         (WebCore::WebGLRenderingContext::releaseShaderCompiler):
3752         (WebCore::WebGLRenderingContext::renderbufferStorage):
3753         (WebCore::WebGLRenderingContext::sampleCoverage):
3754         (WebCore::WebGLRenderingContext::scissor):
3755         (WebCore::WebGLRenderingContext::shaderSource):
3756         (WebCore::WebGLRenderingContext::stencilFunc):
3757         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
3758         (WebCore::WebGLRenderingContext::stencilMask):
3759         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
3760         (WebCore::WebGLRenderingContext::stencilOp):
3761         (WebCore::WebGLRenderingContext::stencilOpSeparate):
3762         (WebCore::WebGLRenderingContext::texImage2DBase):
3763         (WebCore::WebGLRenderingContext::texImage2D):
3764         (WebCore::WebGLRenderingContext::texParameter):
3765         (WebCore::WebGLRenderingContext::texSubImage2DBase):
3766         (WebCore::WebGLRenderingContext::uniform1f):
3767         (WebCore::WebGLRenderingContext::uniform1fv):
3768         (WebCore::WebGLRenderingContext::uniform1i):
3769         (WebCore::WebGLRenderingContext::uniform1iv):
3770         (WebCore::WebGLRenderingContext::uniform2f):
3771         (WebCore::WebGLRenderingContext::uniform2fv):
3772         (WebCore::WebGLRenderingContext::uniform2i):
3773         (WebCore::WebGLRenderingContext::uniform2iv):
3774         (WebCore::WebGLRenderingContext::uniform3f):
3775         (WebCore::WebGLRenderingContext::uniform3fv):
3776         (WebCore::WebGLRenderingContext::uniform3i):
3777         (WebCore::WebGLRenderingContext::uniform3iv):
3778         (WebCore::WebGLRenderingContext::uniform4f):
3779         (WebCore::WebGLRenderingContext::uniform4fv):
3780         (WebCore::WebGLRenderingContext::uniform4i):
3781         (WebCore::WebGLRenderingContext::uniform4iv):
3782         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
3783         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
3784         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
3785         (WebCore::WebGLRenderingContext::useProgram):
3786         (WebCore::WebGLRenderingContext::validateProgram):
3787         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3788         (WebCore::WebGLRenderingContext::viewport):
3789         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
3790         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
3791         (WebCore::WebGLRenderingContext::drawArraysInstanced):
3792         (WebCore::WebGLRenderingContext::drawElementsInstanced):
3793         * html/canvas/WebGLRenderingContext.h:
3794
3795 2014-02-09  Dean Jackson  <dino@apple.com>
3796
3797         Remove unused layer owner from WebGLLayer
3798         https://bugs.webkit.org/show_bug.cgi?id=128512
3799
3800         Reviewed by Dirk Schulze.
3801
3802         The m_layerOwner and ObjC category were not
3803         used anywhere.
3804
3805         * platform/graphics/mac/WebGLLayer.h:
3806         * platform/graphics/mac/WebGLLayer.mm:
3807         (-[WebGLLayer display]):
3808
3809 2014-02-09  Ryuan Choi  <ryuan.choi@samsung.com>
3810
3811         [EFL] Remove PageClientEfl
3812         https://bugs.webkit.org/show_bug.cgi?id=128508
3813
3814         Reviewed by Andreas Kling.
3815
3816         PageClientEfl was introduced for accelerated compositing of WebKit1, but
3817         it's bad idea because it's layer violation.
3818         Indeed, it has never been used since introduced.
3819
3820         * platform/Widget.h: Back to PlatformPageClient to Evas_Object.
3821         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
3822         Removed empty method which use PageClientEfl.
3823         * platform/graphics/efl/GraphicsContext3DPrivate.h: Ditto.
3824
3825 2014-02-09  Tim Horton  <timothy_horton@apple.com>
3826
3827         [iOS][wk2] ASSERT(WebThreadIsCurrent()) in [WebDisplayLinkHandler handleDisplayLink:]
3828         https://bugs.webkit.org/show_bug.cgi?id=128490
3829
3830         Reviewed by Simon Fraser.
3831
3832         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
3833         (-[WebDisplayLinkHandler handleDisplayLink:]):
3834         [WebDisplayLinkHandler handleDisplayLink:] has an ASSERT(WebThreadIsCurrent()).
3835
3836         We don't use the Web Thread in WebKit2, but it looks like isMainThread()
3837         does the right thing (main thread if web thread is disabled, web thread
3838         otherwise), so use that instead.
3839
3840 2014-02-09  Anders Carlsson  <andersca@apple.com>
3841
3842         Add WTF_MAKE_FAST_ALLOCATED to more classes
3843         https://bugs.webkit.org/show_bug.cgi?id=128506
3844
3845         Reviewed by Andreas Kling.
3846
3847         * dom/Node.h:
3848         * dom/ScriptElement.h:
3849         * loader/ImageLoader.h:
3850         * loader/cache/CachedResourceClient.h:
3851         * platform/TreeShared.h:
3852         * platform/graphics/GlyphMetricsMap.h:
3853         * rendering/InlineBox.h:
3854         * rendering/RenderLayer.h:
3855         * rendering/RenderObject.h:
3856
3857 2014-02-09  Andreas Kling  <akling@apple.com>
3858
3859         Reduce ref churn in ChildNodesLazySnapshot iteration.
3860         <https://webkit.org/b/128492>
3861
3862         Add a missing release() in ChildNodesLazySnapshot::nextNode()
3863         so we don't have to churn the ref count.
3864
3865         Reviewed by Sam Weinig.
3866
3867         * dom/ContainerNode.h:
3868         (WebCore::ChildNodesLazySnapshot::nextNode):
3869
3870 2014-02-09  Andreas Kling  <akling@apple.com>
3871
3872         Reduce ref churn in ChildInsertionNotifier.
3873         <https://webkit.org/b/128494>
3874
3875         All callers of notifyNodeInsertedIntoDocument() already hold a strong
3876         reference on the Node, so there's no need to ref it again inside.
3877
3878         Reviewed by Anders Carlsson.
3879
3880         * dom/ContainerNodeAlgorithms.h:
3881         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
3882
3883 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
3884
3885         Manage ShadowData through std::unique_ptr
3886         https://bugs.webkit.org/show_bug.cgi?id=128466
3887
3888         Reviewed by Andreas Kling.
3889
3890         Use std::unique_ptr instead of OwnPtr to manage ShadowData objects.
3891
3892         * css/SVGCSSStyleSelector.cpp:
3893         (WebCore::StyleResolver::applySVGProperty):
3894         * css/StyleResolver.cpp:
3895         (WebCore::StyleResolver::applyProperty):
3896         * page/animation/CSSPropertyAnimation.cpp:
3897         (WebCore::blendFunc):
3898         (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
3899         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
3900         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
3901         * rendering/style/RenderStyle.cpp:
3902         (WebCore::RenderStyle::setTextShadow):
3903         (WebCore::RenderStyle::setBoxShadow):
3904         * rendering/style/RenderStyle.h:
3905         * rendering/style/SVGRenderStyle.h:
3906         (WebCore::SVGRenderStyle::setShadow):
3907         * rendering/style/SVGRenderStyleDefs.cpp:
3908         (WebCore::StyleShadowSVGData::StyleShadowSVGData):
3909         * rendering/style/SVGRenderStyleDefs.h:
3910         * rendering/style/ShadowData.cpp:
3911         (WebCore::ShadowData::ShadowData):
3912         * rendering/style/ShadowData.h:
3913         (WebCore::ShadowData::setNext):
3914         * rendering/style/StyleRareInheritedData.cpp:
3915         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3916         * rendering/style/StyleRareInheritedData.h:
3917         * rendering/style/StyleRareNonInheritedData.cpp:
3918         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3919         * rendering/style/StyleRareNonInheritedData.h:
3920
3921 2014-02-09  Carlos Garnacho  <carlosg@gnome.org>
3922
3923         [GTK] Add touch-events related code to build
3924         https://bugs.webkit.org/show_bug.cgi?id=98931
3925
3926         Reviewed by Carlos Garcia Campos.
3927
3928         Tests in fast/events/touch have been enabled on GTK+ now that touch
3929         support is implemented, and thus all expected bits are there.
3930
3931         * platform/gtk/GtkTouchContextHelper.cpp:
3932         * platform/gtk/GtkTouchContextHelper.h: Add helper object to track all touchpoints, handy
3933         when creating WebTouchEvents.
3934         * GNUmakefile.list.am:
3935         * PlatformGTK.cmake:
3936         * bindings/gobject/GNUmakefile.am: Add touch related code and idls to build, those are
3937         necessary now that GTK+ implements touch events.
3938
3939 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
3940
3941         Switch the rest of CSS code from OwnPtr over to std::unique_ptr
3942         https://bugs.webkit.org/show_bug.cgi?id=128471
3943
3944         Reviewed by Andreas Kling.
3945
3946         Replace the remaining uses of OwnPtr in the CSS code with std::unique_ptr, covering
3947         the CSSParser, CSSParserSelector and CSSSelector classes and a few additional, closely related classes.
3948
3949         * css/CSSGrammar.y.in:
3950         * css/CSSParser.cpp:
3951         (WebCore::CSSParser::parseSheet):
3952         (WebCore::CSSParser::parseDeclaration):
3953         (WebCore::CSSParser::parseValue):
3954         (WebCore::CSSParser::markSupportsRuleHeaderStart):
3955         (WebCore::CSSParser::createKeyframesRule):
3956         (WebCore::CSSParser::createStyleRule):
3957         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
3958         (WebCore::CSSParser::rewriteSpecifiers):
3959         * css/CSSParser.h:
3960         * css/CSSParserValues.cpp:
3961         (WebCore::CSSParserSelector::CSSParserSelector):
3962         (WebCore::CSSParserSelector::~CSSParserSelector):
3963         (WebCore::CSSParserSelector::adoptSelectorVector):
3964         (WebCore::CSSParserSelector::insertTagHistory):
3965         (WebCore::CSSParserSelector::appendTagHistory):
3966         (WebCore::CSSParserSelector::prependTagSelector):
3967         * css/CSSParserValues.h:
3968         (WebCore::CSSParserSelector::releaseSelector):
3969         (WebCore::CSSParserSelector::setTagHistory):
3970         (WebCore::CSSParserSelector::clearTagHistory):
3971         * css/CSSSelector.cpp:
3972         (WebCore::CSSSelector::setSelectorList):
3973         * css/CSSSelector.h:
3974         * css/CSSSelectorList.cpp:
3975         (WebCore::CSSSelectorList::adoptSelectorVector):
3976         * css/CSSSelectorList.h:
3977         * css/CSSValueList.cpp:
3978         * css/StyleRule.cpp:
3979         (WebCore::StyleRuleRegion::StyleRuleRegion):
3980         * css/StyleRule.h:
3981         (WebCore::StyleRule::parserAdoptSelectorVector):
3982         (WebCore::StyleRulePage::parserAdoptSelectorVector):
3983         (WebCore::StyleRuleRegion::create):
3984
3985 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
3986
3987         Manage MutationObserverInterestGroup through std::unique_ptr
3988         https://bugs.webkit.org/show_bug.cgi?id=128468
3989
3990         Reviewed by Andreas Kling.
3991
3992         Use std::unique_ptr instead of OwnPtr for managing MutationObserverInterestGroup objects.
3993
3994         * css/PropertySetCSSStyleDeclaration.cpp:
3995         * dom/CharacterData.cpp:
3996         (WebCore::CharacterData::dispatchModifiedEvent):
3997         * dom/ChildListMutationScope.cpp:
3998         (WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator):
3999         * dom/ChildListMutationScope.h:
4000         (WebCore::ChildListMutationAccumulator::hasObservers):
4001         * dom/Element.cpp:
4002         (WebCore::Element::willModifyAttribute):
4003         * dom/MutationObserverInterestGroup.cpp:
4004         (WebCore::MutationObserverInterestGroup::createIfNeeded):
4005         * dom/MutationObserverInterestGroup.h:
4006         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
4007         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
4008         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
4009
4010 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
4011
4012         Manage MessagePort, MessagePortChannel and friends through std::unique_ptr
4013         https://bugs.webkit.org/show_bug.cgi?id=128467
4014
4015         Reviewed by Andreas Kling.
4016
4017         Use std::unique_ptr instead of OwnPtr to manage MessagePort, MessagePortArray, MessagePortChannel
4018         and MessagePortChannelArray objects.
4019
4020         * bindings/js/JSMessageEventCustom.cpp:
4021         (WebCore::handleInitMessageEvent):
4022         * dom/MessageEvent.cpp:
4023         (WebCore::MessageEvent::MessageEvent):
4024         (WebCore::MessageEvent::initMessageEvent):
4025         * dom/MessageEvent.h:
4026         (WebCore::MessageEvent::create):
4027         * dom/MessagePort.cpp:
4028         (WebCore::MessagePort::postMessage):
4029         (WebCore::MessagePort::disentangle):
4030         (WebCore::MessagePort::entangle):
4031         (WebCore::MessagePort::dispatchMessages):
4032         (WebCore::MessagePort::disentanglePorts):
4033         (WebCore::MessagePort::entanglePorts):
4034         * dom/MessagePort.h:
4035         * dom/MessagePortChannel.h:
4036         * dom/default/PlatformMessagePortChannel.cpp:
4037         (WebCore::PlatformMessagePortChannel::EventData::EventData):
4038         (WebCore::MessagePortChannel::createChannel):
4039         (WebCore::MessagePortChannel::postMessageToRemote):
4040         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
4041         * dom/default/PlatformMessagePortChannel.h:
4042         (WebCore::PlatformMessagePortChannel::EventData::channels):
4043         * page/DOMWindow.cpp:
4044         (WebCore::PostMessageTimer::PostMessageTimer):
4045         (WebCore::PostMessageTimer::event):
4046         (WebCore::DOMWindow::postMessage):
4047         * workers/DedicatedWorkerGlobalScope.cpp:
4048         (WebCore::DedicatedWorkerGlobalScope::postMessage):
4049         * workers/DefaultSharedWorkerRepository.cpp:
4050         (WebCore::SharedWorkerConnectTask::create):
4051         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
4052         (WebCore::SharedWorkerConnectTask::performTask):
4053