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