Unreviewed. Removing the remaining Automake cruft.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-26  Zan Dobersek  <zdobersek@igalia.com>
2
3         Unreviewed. Removing the remaining Automake cruft.
4
5         * GNUmakefile.list.am: Removed.
6
7 2014-03-25  Pratik Solanki  <psolanki@apple.com>
8
9         iOS build fix. Add missing semicolon.
10
11         * editing/cocoa/HTMLConverter.mm:
12         (HTMLConverter::_addAttachmentForElement):
13
14 2014-03-25  Sam Weinig  <sam@webkit.org>
15
16         Speculative iOS build fix.
17
18         * editing/cocoa/HTMLConverter.mm:
19         (HTMLConverter::_addAttachmentForElement):
20
21 2014-03-25  Jer Noble  <jer.noble@apple.com>
22
23         [MSE] Duplicate 'seeked' events.
24         https://bugs.webkit.org/show_bug.cgi?id=130754
25
26         Reviewed by Eric Carlson.
27
28         Test: media/media-source/media-source-duplicate-seeked.html
29
30         During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
31         the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
32         end of finishSeek() after m_seeking has been cleared.
33
34         * html/HTMLMediaElement.cpp:
35         (WebCore::HTMLMediaElement::parseAttribute):
36
37 2014-03-25  James Craig  <jcraig@apple.com>
38
39         Web Inspector: AXI: add support for aria-activedescendant and reconcile UI/testing with parentNode
40         https://bugs.webkit.org/show_bug.cgi?id=130712
41
42         Reviewed by Timothy Hatcher.
43
44         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
45
46         Support for @aria-activedescendant; code reuse changes w/ parentNode and activeDescendantNode.
47
48         * inspector/InspectorDOMAgent.cpp:
49         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
50         * inspector/protocol/DOM.json:
51
52 2014-03-25  Sanghyup Lee  <sh53.lee@samsung.com>
53
54         When the mouse is upped after dragged out of shadowDOM, it should lose :active.
55         https://bugs.webkit.org/show_bug.cgi?id=130660
56
57         Reviewed by Darin Adler.
58
59         This caused a regression after r165037.
60         When we have to clear :active style of shadow DOM, we should clear host's style.
61         This patch replaces parentElement() by parentOrShadowHostElement().
62
63         * dom/Document.cpp:
64         (WebCore::Document::updateHoverActiveState):
65
66 2014-03-25  Eric Carlson  <eric.carlson@apple.com>
67
68         [Mac] Always retry a failed MediaDocument as a PluginDocument
69         https://bugs.webkit.org/show_bug.cgi?id=130742
70
71         Reviewed by Jer Noble.
72
73         * html/HTMLMediaElement.cpp:
74         (WebCore::HTMLMediaElement::mediaLoadingFailedFatally): If the element is in a media document,
75             tell it that loading failed so it can retry as a plug-in.
76
77 2014-03-25  Ryosuke Niwa  <rniwa@webkit.org>
78
79         Replace HTMLConverter::_stringForNode by propertyValueForNode
80         https://bugs.webkit.org/show_bug.cgi?id=130711
81
82         Reviewed by Sam Weinig.
83
84         Replaced all calls to HTMLConverter::_stringForNode by that to propertyValueForNode.
85
86         * editing/cocoa/HTMLConverter.mm:
87         (HTMLConverter::_computedAttributesForElement):
88         (HTMLConverter::_addAttachmentForElement):
89         (HTMLConverter::_enterElement):
90         (HTMLConverter::_addTableForElement):
91         (HTMLConverter::_addTableCellForElement):
92         (HTMLConverter::_processElement):
93         (HTMLConverter::_exitElement):
94         (HTMLConverter::_processText):
95         (HTMLConverter::_traverseNode):
96         (HTMLConverter::_traverseFooterNode):
97         (HTMLConverter::_stringForNode): Deleted.
98
99 2014-03-25  Pratik Solanki  <psolanki@apple.com>
100
101         Attempt to fix iOS build after r166261.
102
103         * WebCore.xcodeproj/project.pbxproj: Make SystemSleepListener.h a private header.
104
105 2014-03-21  Jer Noble  <jer.noble@apple.com>
106
107         [iOS] Enable caption support in full screen.
108         https://bugs.webkit.org/show_bug.cgi?id=130603
109
110         Reviewed by Eric Carlson.
111
112         Add TextTrackRepresentation support to MediaPlayerPrivateAVFoundationObjC.
113
114         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
115         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
116         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Add the m_textTrackRepresenationLayer if present.
117         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
118         (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation): True, if a m_videoFullscreenLayer is present.
119         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation): Remove the old, and add the new m_textTrackRepresenationLayer.
120
121         Make the text track container a stacking context for painting purposes.
122         * Modules/mediacontrols/mediaControlsiOS.css:
123         (video::-webkit-media-text-track-container):
124
125 2014-03-25  Brian Burg  <bburg@apple.com>
126
127         Web Replay: resource unique identifiers should be unique-per-frame, not globally
128         https://bugs.webkit.org/show_bug.cgi?id=130632
129
130         Reviewed by Timothy Hatcher.
131
132         For replay purposes, we want to deterministically assign resource load identifiers
133         to resource loaders, provided that the resource loaders are created in the same
134         order.
135
136         To do this, we convert unique identifiers from being globally-unique to being
137         frame-unique. When a new frame is being loaded, unique identifiers for
138         subresources of that frame begin counting from 1.
139
140         No new tests. Identifier invariants are exercised by existing assertions and tests.
141
142         * loader/ProgressTracker.cpp:
143         (WebCore::ProgressTracker::ProgressTracker):
144         (WebCore::ProgressTracker::reset):
145         (WebCore::ProgressTracker::createUniqueIdentifier):
146         * loader/ProgressTracker.h:
147
148 2014-03-25  Jer Noble  <jer.noble@apple.com>
149
150         [Mac] Pause the media element during system sleep.
151         https://bugs.webkit.org/show_bug.cgi?id=130718
152
153         Reviewed by Eric Carlson.
154
155         Test: media/video-system-sleep.html
156
157         Relying on the platform media system to pause and restart playback during
158         system sleep can cause problems on some platforms, especially where hardware
159         decoders are concerned. Rather than implicitly pausing the media during
160         system sleep, explicitly pause the media before sleeping and resume (if
161         appropriate) upon waking.
162
163         Add a new class to be used for system sleep notifications:
164         * platform/SystemSleepListener.cpp: Added.
165         (WebCore::SystemSleepListener::create):
166         (WebCore::SystemSleepListener::SystemSleepListener):
167         * platform/SystemSleepListener.h: Added.
168         (WebCore::SystemSleepListener::Client::~Client):
169         (WebCore::SystemSleepListener::~SystemSleepListener):
170         (WebCore::SystemSleepListener::client):
171
172         Add a Mac-specific implementation:
173         * platform/mac/SystemSleepListenerMac.h: Added.
174         * platform/mac/SystemSleepListenerMac.mm: Added.
175         (WebCore::SystemSleepListener::create):
176         (WebCore::SystemSleepListenerMac::SystemSleepListenerMac):
177         (WebCore::SystemSleepListenerMac::~SystemSleepListenerMac):
178
179         Listen for system sleep notifications in MediaSessionManager:
180         * platform/audio/MediaSessionManager.cpp:
181         (WebCore::MediaSessionManager::MediaSessionManager):
182         (WebCore::MediaSessionManager::systemWillSleep):
183         (WebCore::MediaSessionManager::systemDidWake):
184         * platform/audio/MediaSessionManager.h:
185
186         Drive-by fix; notify the MediaSession that playback will begin
187         due to autoplay, but do not begin autoplaying if the session
188         is already interrupted:
189         * html/HTMLMediaElement.cpp:
190         (WebCore::HTMLMediaElement::parseAttribute):
191
192         Add new files to project:
193         * WebCore.vcxproj/WebCore.vcxproj:
194         * WebCore.xcodeproj/project.pbxproj:
195         * CMakeLists.txt:
196         * GNUmakefile.list.am:
197
198 2014-03-25  Radu Stavila  <stavila@adobe.com>
199
200         [CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled
201         https://bugs.webkit.org/show_bug.cgi?id=130574
202
203         Reviewed by David Hyatt.
204
205         When computing the clip rect for painting the box decorations, the scrolled content offset
206         must be computed by going up the containing block tree, up to the region.
207
208         Tests: fast/regions/scrollable-region-scrollable-absolute-content-background.html
209                fast/regions/scrollable-region-scrollable-content-background.html
210
211         * rendering/RenderNamedFlowThread.cpp:
212         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
213
214 2014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
215
216         [iOS] Inspector View Indication Support
217         https://bugs.webkit.org/show_bug.cgi?id=130709
218
219         Reviewed by Simon Fraser.
220
221         * inspector/InspectorClient.h:
222         (WebCore::InspectorClient::showInspectorIndication):
223         (WebCore::InspectorClient::hideInspectorIndication):
224         * inspector/InspectorController.cpp:
225         (WebCore::InspectorController::setIndicating):
226         Rename indicate/hideIndication to show/hide names.
227
228 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
229
230         Unreviewed build fix. Typo on checkin.
231
232         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
233         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Left an unmatched open bracket.
234
235 2014-03-25  Jer Noble  <jer.noble@apple.com>
236
237         Even further unreviewed build fix after r166247. Unprotect the implementation of HTMLMediaElement::shouldDisableSleep().
238
239         * html/HTMLMediaElement.cpp:
240         (WebCore::HTMLMediaElement::parseAttribute):
241
242 2014-03-25  Jer Noble  <jer.noble@apple.com>
243
244         Further unreviewed build fix after r166247. Add DisplaySleepDisabler to the windows project file and
245         move the definition of DisplaySleepDisabler's constructor and destructor into the cpp file.
246
247         * WebCore.vcxproj/WebCore.vcxproj:
248         * platform/DisplaySleepDisabler.cpp:
249         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
250         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
251         * platform/DisplaySleepDisabler.h:
252
253 2014-03-25  Jer Noble  <jer.noble@apple.com>
254
255         Unreviewed build fix after r166247. Un-platform-protect the declaration of HTMLMediaElement::shouldDisableSleep()
256         and make WebVideoFullscreenController's _displaySleepDisabler a std::unique_ptr.
257
258         * html/HTMLMediaElement.h:
259         * platform/mac/WebVideoFullscreenController.h:
260
261 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
262
263         [iOS] Pass additional options to AVFoundation during playback.
264         https://bugs.webkit.org/show_bug.cgi?id=130624
265
266         Reviewed by Eric Carlson.
267
268         * html/HTMLMediaElement.cpp:
269         (WebCore::HTMLMediaElement::doesHaveAttribute): Return attribute value if the user
270         passes a pointer to fill in.
271         * html/HTMLMediaElement.h:
272         * platform/graphics/MediaPlayer.cpp:
273         (WebCore::MediaPlayer::doesHaveAttribute):
274         * platform/graphics/MediaPlayer.h:
275         (WebCore::MediaPlayerClient::doesHaveAttribute):
276         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
277         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Pass additional
278         option if supplied by user.
279
280 2014-03-25  Michael Saboff  <msaboff@apple.com>
281
282         Unreviewed, rolling out r166070.
283
284         Rollout r166070 due to 2% performance loss in page load times
285
286         Reverted changeset:
287
288         "Change CodeGeneratorJS.pm special cases for "DOMWindow" to be
289         general purpose"
290         https://bugs.webkit.org/show_bug.cgi?id=130553
291         http://trac.webkit.org/changeset/166070
292
293 2014-03-25  Michael Saboff  <msaboff@apple.com>
294
295         Unreviewed, rolling out r166126.
296
297         Rollout r166126 in prepartion to roll out prerequisite r166070
298
299         Reverted changeset:
300
301         "toThis() on a JSWorkerGlobalScope should return a JSProxy and
302         not undefined"
303         https://bugs.webkit.org/show_bug.cgi?id=130554
304         http://trac.webkit.org/changeset/166126
305
306 2014-03-25  Jer Noble  <jer.noble@apple.com>
307
308         [iOS] Playing video does not disable display sleep.
309         https://bugs.webkit.org/show_bug.cgi?id=130729
310
311         Reviewed by Eric Carlson.
312
313         DisplaySleepDisabler was broken by r161589, which replaced the iOS implementation with
314         an empty one. Make a platform independent version with a Cocoa-platform subclass. Update
315         the APIs to non-deprecated ones.
316
317         * platform/DisplaySleepDisabler.cpp: Added.
318         (WebCore::DisplaySleepDisabler::create):
319         * platform/DisplaySleepDisabler.h: Added.
320         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
321         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
322         * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.cpp.
323         (WebCore::DisplaySleepDisabler::create):
324         (WebCore::DisplaySleepDisablerCocoa::DisplaySleepDisablerCocoa):
325         (WebCore::DisplaySleepDisablerCocoa::~DisplaySleepDisablerCocoa):
326         * platform/cocoa/DisplaySleepDisablerCocoa.h: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.h.
327
328         Update m_sleepDisabler to be a std::unique_ptr, and unprotect the definition of methods which use it.
329         * html/HTMLMediaElement.cpp:
330         (WebCore::HTMLMediaElement::updateSleepDisabling):
331         (WebCore::HTMLMediaElement::shouldDisableSleep):
332         * html/HTMLMediaElement.h:
333
334         Add the new and renamed files to the project:
335         * CMakeLists.txt:
336         * GNUmakefile.list.am:
337         * WebCore.xcodeproj/project.pbxproj:
338
339 2014-03-25  Dirk Schulze  <krit@webkit.org>
340
341         Implement ImageData constructors and WebWorkers exposure
342         https://bugs.webkit.org/show_bug.cgi?id=130668
343
344         Reviewed by Dean Jackson.
345
346         Add new constructors for ImageData.
347
348         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation
349
350         Test: fast/canvas/canvas-imageData.html
351
352         * html/ImageData.cpp: 
353         (WebCore::ImageData::create):
354         * html/ImageData.h:
355         * html/ImageData.idl:
356
357 2014-03-25  Myles C. Maxfield  <mmaxfield@apple.com>
358
359         InlineIterator position (unsigned int) variable can wrap around
360         https://bugs.webkit.org/show_bug.cgi?id=130540
361
362         Reviewed by Simon Fraser.
363
364         We trigger an ASSERT that occurs when we are ignoring spaces (to collapse them
365         into a single whitespace mark) but then encounter a line break. Because we don't ignore
366         the first space (but do ignore subsequent spaces), when we hit a newline in an RTL context
367         we want to ignore that first space as well (so as not to push the text away from the right
368         edge). We do this by decrementing the InlineIterator pointing to this first space, so all
369         the spaces get ignored. However, if that space is the first character in a Text node, the
370         decrement will try to go past the beginning of the node, and trigger an ASSERT.
371
372         This design is not great. At some point we should rework it to more elegantly handle
373         collapsing whitespace in both RTL and LTR writing modes.
374
375         This patch adds an ASSERT earlier in this codepath to catch potential problems earlier.
376         It also pulls our sentinel value out into a separate boolean to make it more clear what is
377         going on.
378
379         Test: fast/text/whitespace-only-text-in-rtl.html
380
381         * rendering/InlineIterator.h:
382         (WebCore::InlineIterator::moveTo): Use the set***() calls
383         (WebCore::InlineIterator::setOffset): ASSERT early that our math hasn't wrapped
384         * rendering/RenderBlockLineLayout.cpp:
385         (WebCore::RenderBlockFlow::appendRunsForObject): Use new boolean value
386         * rendering/line/BreakingContextInlineHeaders.h:
387         (WebCore::BreakingContext::handleText): Guard against wraps
388         (WebCore::checkMidpoints): Use new boolean value
389         * rendering/line/TrailingObjects.cpp:
390         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Use new boolean value
391
392 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
393
394         [GTK] Remove the autotools build
395         https://bugs.webkit.org/show_bug.cgi?id=130717
396
397         Reviewed by Anders Carlsson.
398
399         * GNUmakefile.am: Removed.
400         * bindings/gobject/GNUmakefile.am: Removed.
401         * config.h: Removed references to autotools configure file.
402
403 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
404
405         Prevent 'removetrack' events from firing when all inband text tracks are removed.
406         https://bugs.webkit.org/show_bug.cgi?id=130704
407
408         Reviewed by Eric Carlson.
409
410         Test: media/track/track-remove-track.html
411
412         Based on the Blink change (patch by acolwell@chromium.org):
413         https://codereview.chromium.org/177243018/
414
415         * html/HTMLMediaElement.cpp:
416         (WebCore::HTMLMediaElement::prepareForLoad): Reorder steps to match W3C specification.
417         (WebCore::HTMLMediaElement::noneSupported): Forget tracks as required by specification.
418         (WebCore::HTMLMediaElement::mediaLoadingFailed): Forget tracks as required by specification.
419         (WebCore::HTMLMediaElement::removeTextTrack): Only request the 'removetracks' event if
420         requested by caller.
421         (WebCore::HTMLMediaElement::removeAllInbandTracks): Renamed to 'forgetResourceSpecificTracks'
422         (WebCore::HTMLMediaElement::noneSupported): Specify that we want the 'removetracks' event
423         fired for this use case.
424         (WebCore::HTMLMediaElement::prepareForLoad): Switch to new 'forgetResourceSpecificTracks' name.
425         * html/HTMLMediaElement.h:
426         * html/track/TextTrackList.cpp:
427         (TextTrackList::remove): Only fire the 'removetrack' event if the caller requests it.
428         * html/track/TextTrackList.h: Add default argument to fire the 'removetrack' event
429         when removing a track.
430         * html/track/TrackListBase.cpp:
431         (TrackListBase::remove): Only fire the 'removetrack' event if the caller requests it.
432         * html/track/TrackListBase.h: Add default argument to fire the 'removetrack' event.
433
434 2014-03-25  David Kilzer  <ddkilzer@apple.com>
435
436         Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
437         <http://webkit.org/b/130713>
438         <rdar://problem/15661876>
439
440         Reviewed by Darin Adler.
441
442         Merged from Blink (patch by Ian Beer):
443         http://crbug.com/303657
444         https://src.chromium.org/viewvc/blink?view=rev&revision=158938
445
446         Test: fast/forms/form-submission-crash-successful-submit-button.html
447
448         * html/HTMLFormElement.cpp:
449         (WebCore::HTMLFormElement::submit):
450
451 2014-03-25  Gabor Rapcsanyi  <rgabor@webkit.org>
452
453         [ARM64] GNU assembler fails in TransformationMatrix::multiply
454         https://bugs.webkit.org/show_bug.cgi?id=130454
455
456         Reviewed by Zoltan Herczeg.
457
458         Change the NEON intstructions to the proper style.
459
460         * platform/graphics/transforms/TransformationMatrix.cpp:
461         (WebCore::TransformationMatrix::multiply):
462
463 2014-03-20  Sergio Villar Senin  <svillar@igalia.com>
464
465         [CSS Grid Layout] Vertical rectangles not considered as valid grid areas
466         https://bugs.webkit.org/show_bug.cgi?id=130513
467
468         Reviewed by Andreas Kling.
469
470         Grid areas sized as vertical rectangles were incorrectly
471         considered as invalid by the parser. That's because the condition
472         checking that each new row was adjacent to the previous one was
473         using the first row of the currently parsed grid area instead of
474         the last one.
475
476         Test: fast/css-grid-layout/grid-template-areas-get-set.html
477
478         * css/CSSParser.cpp:
479         (WebCore::CSSParser::parseGridTemplateAreas):
480
481 2014-03-25  Xabier Rodriguez Calvar  <calvaris@igalia.com>
482
483         [GTK] Volume slider shows below the panel with videos in certain cases
484         https://bugs.webkit.org/show_bug.cgi?id=130608
485
486         Reviewed by Jer Noble.
487
488         We need to delay the moment we check if the volume slider shows up
489         or down. If the video was not visible, the offsets were 0 and it
490         was forced to be shown below the panel.
491
492         Test: media/video-initially-hidden-volume-slider-up.html
493
494         * Modules/mediacontrols/mediaControlsApple.js:
495         (Controller.prototype.createControls): Moved volumebox pseudo from
496         the subclass. The test checks for it and it would fail in Mac.
497         * Modules/mediacontrols/mediaControlsGtk.js:
498         (ControllerGtk.prototype.createControls): Moved volumebox pseudo
499         to the superclass.
500         (ControllerGtk.prototype.handleMuteButtonMouseOver): Check if
501         volume slider should show up or down.
502         (ControllerGtk.prototype.updateReadyState): Removed check for
503         volume slider direction.
504
505 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
506
507         [Win] Enable WebVTT Regions on Windows.
508         https://bugs.webkit.org/show_bug.cgi?id=130680
509
510         Reviewed by Eric Carlson.
511
512         * DerivedSources.cpp: Add new build components.
513         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
514         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
515
516 2014-03-24  Simon Fraser  <simon.fraser@apple.com>
517
518         Remove some unnecessary includes from PlatformCALayerClient.h
519         https://bugs.webkit.org/show_bug.cgi?id=130703
520
521         Reviewed by Andreas Kling.
522         
523         No need for all these #includes.
524
525         * platform/graphics/ca/PlatformCALayerClient.h:
526
527 2014-03-24  Adenilson Cavalcanti  <cavalcantii@gmail.com>
528
529         [core] FEGaussianBlur: use IntSize to simplify member function interface
530         https://bugs.webkit.org/show_bug.cgi?id=130695
531
532         Reviewed by Dean Jackson.
533
534         By returning an IntSize to store the calculated kernel size values
535         it is possible to have less function parameters. This patch also
536         streamlines a bit the code in calculateUnscaledKernelSize.
537
538         No new tests, no change in behavior.
539
540         * platform/graphics/filters/FEDropShadow.cpp:
541         (WebCore::FEDropShadow::determineAbsolutePaintRect):
542         * platform/graphics/filters/FEGaussianBlur.cpp:
543         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
544         (WebCore::FEGaussianBlur::calculateKernelSize):
545         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
546         (WebCore::FEGaussianBlur::platformApplySoftware):
547         * platform/graphics/filters/FEGaussianBlur.h:
548         (if): Deleted.
549         * platform/graphics/filters/FilterOperations.cpp:
550         (WebCore::outsetSizeForBlur):
551
552 2014-03-24  Brian Burg  <bburg@apple.com>
553
554         Web Replay: capture and replay keyboard events
555         https://bugs.webkit.org/show_bug.cgi?id=130314
556
557         Reviewed by Joseph Pecoraro.
558
559         Upstream support for capturing and replaying non-IME keyboard input.
560         This works similarly to mouse events. It introduces optional fields and
561         macros to encode/decode them.
562
563         Test: ManualTests/inspector/replay-keyboard-events.html
564
565         * replay/ReplayInputDispatchMethods.cpp:
566         (WebCore::HandleKeyPress::dispatch):
567         * replay/SerializationMethods.cpp:
568         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
569         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue): Switch existing
570         encode/decode calls to use the shortening macros.
571         (JSC::EncodingTraits<KeypressCommand>::encodeValue): Added.
572         (JSC::EncodingTraits<KeypressCommand>::decodeValue): Added.
573         (JSC::PlatformKeyboardEventAppKit::PlatformKeyboardEventAppKit): Subclass
574         PlatformKeyboardEvent so that we can set AppKit-specific members not
575         initialized through the main constructors.
576         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Added.
577         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): Added.
578         * replay/SerializationMethods.h:
579         * replay/UserInputBridge.cpp:
580         (WebCore::UserInputBridge::UserInputBridge): initialize m_state inside a guard.
581         (WebCore::UserInputBridge::handleKeyEvent): fill in the implementation.
582         * replay/WebInputs.json:
583
584 2014-03-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
585
586         Optimizing string construction for type error in JSNavigatorCustom.cpp
587         https://bugs.webkit.org/show_bug.cgi?id=130683
588
589         Reviewed by Eric Carlson.
590
591         * bindings/js/JSNavigatorCustom.cpp:
592         (WebCore::JSNavigator::webkitGetUserMedia):
593
594 2014-03-24  Beth Dakin  <bdakin@apple.com>
595
596         Legacy-style scrollbars constantly redraw after scrolling
597         https://bugs.webkit.org/show_bug.cgi?id=130699
598
599         Reviewed by Simon Fraser.
600
601         The constant re-draw was happening because we were never calling [ScrollbarPainter 
602         setUsePresentationValue:NO]. This is a silly bug where were should have been 
603         looking at PlatformWheelEvent::momentumPhase() instead of 
604         PlatformWheelEvent::phase()
605
606         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
607         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
608
609 2014-03-24  Daniel Bates  <dabates@apple.com>
610
611         XSS Auditor doesn't block <script> injected before an existing <script>
612         https://bugs.webkit.org/show_bug.cgi?id=130475
613
614         Merged from Blink (patch by Tom Sepez):
615         https://src.chromium.org/viewvc/blink?view=rev&revision=169697
616
617         Tests: http/tests/security/xssAuditor/script-tag-expression-follows.html
618                http/tests/security/xssAuditor/script-tag-near-start.html
619
620         * html/parser/XSSAuditor.cpp:
621         (WebCore::startsHTMLCommentAt):
622         (WebCore::startsSingleLineCommentAt):
623         (WebCore::startsMultiLineCommentAt):
624         (WebCore::startsOpeningScriptTagAt):
625         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
626
627 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
628
629         Activate WebVTT Tests Once Merging is Complete
630         https://bugs.webkit.org/show_bug.cgi?id=130420
631
632         Reviewed by Eric Carlson.
633
634         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
635
636 2014-03-24  Anders Carlsson  <andersca@apple.com>
637
638         Re-fix the build.
639
640         * WebCore.exp.in:
641
642 2014-03-24  Anders Carlsson  <andersca@apple.com>
643
644         Fix build.
645
646         * WebCore.exp.in:
647         Move a CFNetwork only symbol inside the USE(CFNETWORK) section.
648
649 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
650
651         Regression: AX: Don't expose role or notifications for invalid menus
652         https://bugs.webkit.org/show_bug.cgi?id=129814
653
654         Reviewed by Mario Sanchez Prada.
655
656         If a role=menu has no menuitem children, it should not be a menu.
657         This was a bit tricky to implement since we need to update the role after the children are created,
658         but it means we have to be a bit more aggressive about when to updateChildren, so that the role
659         is known to be valid.
660
661         Test: platform/mac/accessibility/invalid-menu-role-does-not-send-notification.html
662
663         * accessibility/AXObjectCache.cpp:
664         (WebCore::AXObjectCache::notificationPostTimerFired):
665         * accessibility/AccessibilityRenderObject.cpp:
666         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
667         (WebCore::AccessibilityRenderObject::addChildren):
668         * accessibility/AccessibilityRenderObject.h:
669         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
670         (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
671
672 2014-03-24  Andy Estes  <aestes@apple.com>
673
674         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
675         https://bugs.webkit.org/show_bug.cgi?id=129322
676
677         Reviewed by Anders Carlsson.
678
679         * platform/network/ResourceHandle.h:
680         * platform/network/cf/ResourceHandleCFNet.cpp:
681         (WebCore::ResourceHandle::releaseConnectionForDownload): Changed to
682         return a RetainPtr that adopts the connection's retain count.
683
684 2014-03-24  Enrica Casucci  <enrica@apple.com>
685
686         Update Hindi fallback font.
687         https://bugs.webkit.org/show_bug.cgi?id=130690
688         <rdar://problem/16391601>
689
690         Reviewed by Sam Weinig.
691
692         Using the new available font for Hindi in the fallback list.
693
694         * platform/graphics/ios/FontCacheIOS.mm:
695         (WebCore::FontCache::systemFallbackForCharacters):
696
697 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
698
699         Merge Minor WebVTT Cleanups from Blink
700         https://bugs.webkit.org/show_bug.cgi?id=130681
701
702         Reviewed by Eric Carlson.
703
704         Merged from Blink (patch by philipj@opera.com):
705         https://chromium.googlesource.com/chromium/blink/+/693eb5e2933dca0eab5bbd604e9f3406fe9fd1ab
706         http://crbug.com/52593009
707         https://chromium.googlesource.com/chromium/blink/+/40b3602feab34e9be829fd742b6ad6ded322a09f
708         http://crbug.com/104243003
709
710         * html/track/TextTrack.cpp:
711         (WebCore::TextTrack::setMode):
712         * html/track/TextTrack.idl:
713         * html/track/TextTrackCue.h:
714         * html/track/VTTCue.cpp:
715         (WebCore::VTTCue::VTTCue):
716         * html/track/VTTCue.h:
717
718 2014-03-24  Commit Queue  <commit-queue@webkit.org>
719
720         Unreviewed, rolling out r166169.
721         https://bugs.webkit.org/show_bug.cgi?id=130682
722
723         This patch broke tests on Apple Mavericks (Requested by fredw
724         on #webkit).
725
726         Reverted changeset:
727
728         "Operator stretching: expose a math data API"
729         https://bugs.webkit.org/show_bug.cgi?id=130572
730         http://trac.webkit.org/changeset/166169
731
732 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
733
734         ENABLE(CSS_GRID_LAYOUT) guard for CSSGridLineNamesValue
735         https://bugs.webkit.org/show_bug.cgi?id=130669
736
737         Reviewed by Sergio Villar Senin.
738
739         No new tests. No new functionality.
740
741         * css/CSSGridLineNamesValue.cpp:
742         * css/CSSGridLineNamesValue.h:
743
744 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
745
746         <hr> should expose AXRole/AXSubrole, etc
747         https://bugs.webkit.org/show_bug.cgi?id=109015
748
749         Reviewed by Mario Sanchez Prada.
750
751         Expose the <hr> element to Mac and iOS through the accessibility interface.
752
753         Test: platform/mac/accessibility/hr-element.html
754
755         * English.lproj/Localizable.strings:
756         * accessibility/AccessibilityNodeObject.cpp:
757         (WebCore::AccessibilityNodeObject::isEnabled):
758         * accessibility/AccessibilityObject.cpp:
759         (WebCore::AccessibilityObject::computedRoleString):
760         * accessibility/AccessibilityRenderObject.cpp:
761         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
762         * accessibility/atk/AccessibilityObjectAtk.cpp:
763         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
764         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
765         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
766         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
767         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
768         (createAccessibilityRoleMap):
769         (-[WebAccessibilityObjectWrapper subrole]):
770         (-[WebAccessibilityObjectWrapper roleDescription]):
771         * platform/LocalizedStrings.cpp:
772         (WebCore::AXHorizontalRuleDescriptionText):
773         * platform/LocalizedStrings.h:
774
775 2014-03-24  Antti Koivisto  <antti@apple.com>
776
777         Invalidate sibling text node style when needed instead of attaching synchronously
778         https://bugs.webkit.org/show_bug.cgi?id=130590
779
780         Reviewed by Andreas Kling.
781         
782         Make things simpler.
783
784         * style/StyleResolveTree.cpp:
785         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
786         
787             Just invalidate instead of calling attach directly.
788             Rename to match.
789
790         (WebCore::Style::textRendererIsNeeded):
791         (WebCore::Style::createTextRendererIfNeeded):
792         
793             Move all testing to textRendererIsNeeded.
794
795         (WebCore::Style::updateTextRendererAfterContentChange):
796         
797             Call resolveTextNode instead of re-implementing the same thing.
798
799         (WebCore::Style::resolveLocal):
800         (WebCore::Style::resolveTextNode):
801         
802             Avoid unnecessary reattaching.
803             Rename for consistency.
804
805         (WebCore::Style::resolveShadowTree):
806         (WebCore::Style::resolveTree):
807         
808 2014-03-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
809
810         Fix !ENABLE(VIDEO) build
811         https://bugs.webkit.org/show_bug.cgi?id=130671
812
813         Reviewed by Eric Carlson.
814
815         Add missing ENABLE(VIDEO) guards because many functions use
816         the newly guarded functions.
817
818         * testing/Internals.cpp:
819         * testing/Internals.h:
820         * testing/Internals.idl:
821
822 2014-03-24  Antti Koivisto  <antti@apple.com>
823
824         Text autosizing does not determine line count correctly for simple line layout
825         https://bugs.webkit.org/show_bug.cgi?id=130673
826
827         Reviewed by Daniel Bates.
828         
829         We don't count lines correctly in simple line layout case.
830
831         * page/Frame.cpp:
832         (WebCore::Frame::textAutosizingWidth):
833         (WebCore::Frame::setTextAutosizingWidth):
834         * page/ios/FrameIOS.mm:
835         (WebCore::Frame::textAutosizingWidth): Deleted.
836         (WebCore::Frame::setTextAutosizingWidth): Deleted.
837         
838             Move to Frame.cpp to make enabling on non-iOS build easier.
839
840         * rendering/RenderBlockFlow.cpp:
841         (WebCore::RenderBlockFlow::lineCount):
842         
843             Handle simple line layout case.
844
845         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
846             
847             Call lineCount() if children are inline.
848             Rename for clarity.
849
850         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
851         (WebCore::RenderBlockFlow::immediateLineCount): Deleted.
852         * rendering/RenderBlockFlow.h:
853
854 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
855
856         [regression] background colors do not apply to <mo> elements.
857         https://bugs.webkit.org/show_bug.cgi?id=130470.
858
859         Test: mathml/presentation/tokenElements-background-color.html
860
861         * rendering/mathml/RenderMathMLOperator.cpp:
862         (WebCore::RenderMathMLOperator::paint): always call the parent painting to draw the background.
863         (WebCore::RenderMathMLOperator::paintChildren): move the special case for invisible operator here.
864
865 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
866
867         Operator stretching: expose a math data API
868         https://bugs.webkit.org/show_bug.cgi?id=130572
869
870         Reviewed by Chris Fleizach.
871
872         We expose a new SimpleFontData API to give access to the data from the
873         OpenType MATH table using a font cache. The class OpenTypeMathData will
874         be implemented in bug 130324. On Darwin platform, we also implement the
875         missing FontPlatformData::openTypeTable function which will be necessary
876         to load the OpenType MATH table. The changes are intended to be used
877         for MathML operator stretching (bug 130322) so tests are not added yet.
878
879         * CMakeLists.txt: add new OpenTypeMathData files.
880         * GNUmakefile.list.am: ditto.
881         * WebCore.vcxproj/WebCore.vcxproj: ditto.
882         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
883         * WebCore.xcodeproj/project.pbxproj: ditto.
884         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
885         We make the math and vertical data share the same key for the cache.
886         (WebCore::fontMathDataCacheInstance):
887         (WebCore::FontCache::getMathData):
888         (WebCore::fontVerticalDataCacheInstance):
889         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
890         * platform/graphics/FontPlatformData.cpp:
891         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
892         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
893         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
894         (WebCore::SimpleFontData::SimpleFontData):
895         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
896         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
897         (WebCore::OpenTypeMathData::OpenTypeMathData):
898         * platform/graphics/opentype/OpenTypeMathData.h: Added.
899         (WebCore::OpenTypeMathData::create):
900         (WebCore::OpenTypeMathData::hasMathData):
901
902 2014-03-24  Jon Lee  <jonlee@apple.com>
903
904         Build fixes.
905
906         Unreviewed.
907
908         * editing/ios/EditorIOS.mm:
909         (WebCore::Editor::writeSelectionToPasteboard): Convert to reference.
910
911 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
912
913         ENABLE(VIDEO_TRACK) guard for CSSParserSelector::parsePseudoCueFunctionSelector
914         https://bugs.webkit.org/show_bug.cgi?id=130666
915
916         Reviewed by Andreas Kling.
917
918         No new tests. No new functionality.
919
920         * css/CSSParserValues.cpp:
921         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
922
923 2014-03-24  Javier Fernandez  <jfernandez@igalia.com>
924
925         [CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
926         https://bugs.webkit.org/show_bug.cgi?id=129041
927
928         Reviewed by Sergio Villar Senin.
929
930         From Blink r162555 by <svillar@igalia.com>
931
932         Names for grid lines are now specified as a list of whitespace separated
933         idents enclosed in parentheses instead of as a list of strings.
934
935         Updated tests to match the new <grid-line> syntax.
936
937         * CMakeLists.txt:
938         * GNUmakefile.list.am:
939         * WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
940         * css/CSSComputedStyleDeclaration.cpp:
941         (WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
942         * css/CSSGrammar.y.in: New syntax for named <grid-line>.
943         * css/CSSGridLineNamesValue.cpp: Added.
944         (WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
945         (WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
946         (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
947         * css/CSSGridLineNamesValue.h: Added.
948         (WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
949         * css/CSSParser.cpp:
950         (WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
951         (WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
952         (WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
953         * css/CSSParser.h:
954         * css/CSSParserValues.cpp:
955         (WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
956         (WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
957         * css/CSSParserValues.h:
958         (WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
959         * css/CSSValue.cpp:
960         (WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
961         (WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
962         (WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
963         * css/CSSValue.h:
964         (WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
965         * css/StyleResolver.cpp:
966         (WebCore::createGridTrackList): Using the new named <grid-line> syntax.
967
968 2014-03-23  Sam Weinig  <sam@webkit.org>
969
970         Convert WebHTMLConverter to C++
971         https://bugs.webkit.org/show_bug.cgi?id=130655
972
973         Reviewed by Andreas Kling.
974
975         - Mechanically converts the Objective-C class WebHTMLConverter, to the C++ HTMLConverter (lots of cleanup to follow).
976         - Removes unused members
977             - _standardFontFamily (never assigned to)
978             - _textSizeMultiplier (always exactly 1)
979             - _webViewTextSizeMultiplier (always exactly 0)
980             - _defaultFontSize (always exactly 12, changed to be constant)
981             - _minimumFontSize (always exactly 1, changed to be constant)
982             - _colorsForNodes (never assigned to)
983             - _indexingLimit (always exactly 0)
984             - _thumbnailLimit (always exactly 0)
985             - _flags.isIndexing (always false)
986             - _flags.isTesting (always false)
987
988         * editing/cocoa/HTMLConverter.mm:
989         (HTMLConverter::convert):
990         (HTMLConverter::HTMLConverter):
991         (HTMLConverter::~HTMLConverter):
992         (defaultParagraphStyle):
993         (_childrenForNode):
994         (HTMLConverter::_stringForNode):
995         (HTMLConverter::_getFloat):
996         (_webKitBundle):
997         (HTMLConverter::_elementIsBlockLevel):
998         (HTMLConverter::_elementHasOwnBackgroundColor):
999         (HTMLConverter::_blockLevelElementForNode):
1000         (HTMLConverter::_colorForNode):
1001         (HTMLConverter::_computedAttributesForElement):
1002         (HTMLConverter::_attributesForElement):
1003         (HTMLConverter::_newParagraphForElement):
1004         (HTMLConverter::_newLineForElement):
1005         (HTMLConverter::_newTabForElement):
1006         (_WebMessageDocumentClass):
1007         (HTMLConverter::_addAttachmentForElement):
1008         (HTMLConverter::_addQuoteForElement):
1009         (HTMLConverter::_addValue):
1010         (HTMLConverter::_fillInBlock):
1011         (HTMLConverter::_processMetaElementWithName):
1012         (HTMLConverter::_processHeadElement):
1013         (HTMLConverter::_enterElement):
1014         (HTMLConverter::_addTableForElement):
1015         (HTMLConverter::_addTableCellForElement):
1016         (HTMLConverter::_processElement):
1017         (HTMLConverter::_addMarkersToList):
1018         (HTMLConverter::_exitElement):
1019         (HTMLConverter::_processText):
1020         (HTMLConverter::_traverseNode):
1021         (HTMLConverter::_traverseFooterNode):
1022         (HTMLConverter::_adjustTrailingNewline):
1023         (HTMLConverter::_loadFromDOMRange):
1024         (fileWrapperForURL):
1025         (fileWrapperForElement):
1026         (WebCore::attributedStringFromRange):
1027         (WebCore::editingAttributedStringFromRange):
1028
1029 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
1030
1031         Remove Dead Stores from editing directory
1032         https://bugs.webkit.org/show_bug.cgi?id=130634
1033
1034         Reviewed by Darin Adler.
1035
1036         Remove Dead Stores from editing directory which assigning a value to a variable
1037         and never reading that value.
1038
1039         * editing/ApplyStyleCommand.cpp:
1040         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1041         * editing/markup.cpp:
1042         (WebCore::createMarkupInternal):
1043
1044 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
1045
1046         Move all EFL typedefs into EflTypedefs.h.
1047         https://bugs.webkit.org/show_bug.cgi?id=130511
1048
1049         Reviewed by Gyuyoung Kim.
1050
1051         * platform/FileSystem.h: Remove EFL typedefs.
1052         * platform/Widget.h: Ditto.
1053         * platform/efl/EflScreenUtilities.h: Ditto.
1054         * platform/graphics/Icon.h: Ditto.
1055         * platform/graphics/Image.h: Ditto.
1056         * platform/graphics/IntPoint.h: Ditto.
1057         * platform/graphics/IntRect.h: Ditto.
1058         * platform/network/NetworkStateNotifier.h: Ditto.
1059
1060 2014-03-23  Sam Weinig  <sam@webkit.org>
1061
1062         Move HTMLConverter from platform/mac to editing/cocoa.
1063
1064         Rubber-stamped by Darin Adler.
1065
1066         * WebCore.xcodeproj/project.pbxproj:
1067         * editing/cocoa: Added.
1068         * editing/cocoa/HTMLConverter.h: Copied from platform/mac/HTMLConverter.h.
1069         * editing/cocoa/HTMLConverter.mm: Copied from platform/mac/HTMLConverter.mm.
1070         * platform/mac/HTMLConverter.h: Removed.
1071         * platform/mac/HTMLConverter.mm: Removed.
1072
1073 2014-03-23  Sam Weinig  <sam@webkit.org>
1074
1075         Simplify the HTMLConverter interface (Part 2)
1076         https://bugs.webkit.org/show_bug.cgi?id=130654
1077
1078         Reviewed by Darin Adler.
1079
1080         Switch HTMLConverter from using an Objective-C interface to C functions.
1081
1082         * WebCore.exp.in:
1083         * editing/ios/EditorIOS.mm:
1084         (WebCore::Editor::writeSelectionToPasteboard):
1085         * editing/mac/EditorMac.mm:
1086         (WebCore::Editor::dataSelectionForPasteboard):
1087         (WebCore::Editor::writeSelectionToPasteboard):
1088         * platform/ios/PasteboardIOS.mm:
1089         * platform/mac/HTMLConverter.h:
1090         * platform/mac/HTMLConverter.mm:
1091         (WebCore::attributedStringFromRange):
1092         (WebCore::editingAttributedStringFromRange):
1093         * platform/mac/PasteboardMac.mm:
1094
1095 2014-03-23  Darin Adler  <darin@apple.com>
1096
1097         Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
1098         https://bugs.webkit.org/show_bug.cgi?id=130653
1099
1100         Reviewed by Antti Koivisto.
1101
1102         * dom/ContainerNode.cpp: Moved the post-attach callback code from here to
1103         StyleResolveTree.h/cpp.
1104         * dom/ContainerNode.h: Ditto.
1105
1106         * dom/Document.cpp:
1107         (WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
1108         PostAttachCallbackDisabler.
1109
1110         * dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
1111
1112         * html/HTMLEmbedElement.cpp:
1113         (WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
1114         it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
1115         code to trigger image loads. Changed srcAttr to call updateImageLoaderWithNewURLSoon to
1116         do the image loading logic.
1117
1118         * html/HTMLFormControlElement.cpp:
1119         (WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
1120         Style::queuePostResolutionCallback and use a lambda instead of a function.
1121         (WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
1122         of just using wishful thinking to keep the object alive.
1123         * html/HTMLFrameOwnerElement.cpp:
1124         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.
1125
1126         * html/HTMLObjectElement.cpp:
1127         (WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
1128         it into a 1-liner. Changed dataAttr to use updateImageLoaderWithNewURLSoon(). Also made
1129         it call setNeedsWidgetUpdate(true) unconditionally after checking carefully to see that's
1130         harmless if there is no renderer. Changed classidAttr to call setNeedsWidgetUpdate(true)
1131         unconditionally and not set m_classId.
1132         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
1133         instead of classId and descendantsOfType instead of getElementsByTagName.
1134         (WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
1135         (WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.
1136
1137         * html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
1138         attribute in a data member. Rearranged header, making more private, and fixing some typos,
1139         and doing a "using" instead of a function to disambiguate the inherited form functions.
1140
1141         * html/HTMLPlugInImageElement.cpp:
1142         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize m_needsImageReload.
1143         (WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
1144         first child of the shadow root is guaranteed to be an element.
1145         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
1146         scheduleUpdateForAfterStyleResolution function.
1147         (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
1148         function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
1149         class; cleaner even though it's just an assertion.
1150         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
1151         Schedules a call to updateAfterStyleResolution when needed.
1152         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
1153         Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
1154         m_needsImageReload boolean in cases where no actual loading is done.
1155         (WebCore::HTMLPlugInImageElement::removedFrom): Added. Do not delay the load event of
1156         document once this element is removed, clears m_needsImageReload.
1157         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
1158         since m_needsDocumentActivationCallbacks can't be true if the old document was null.
1159         (WebCore::is100Percent): Added helper to make function below more readable.
1160         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
1161         bit. The part that attracted my attention was the local variable of type RenderBox, which
1162         was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
1163         is a renderer of type RenderEmbeddedObject, so depend on that.
1164         (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Added. When called with true, sets
1165         the flag and triggers a style recalculation, and lets updateAfterStyleResolution do the rest.
1166         When called with false, reverses the effects and stops delaying the load event.
1167
1168         * html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
1169         Marked more function members final. Made a protected imageLoader function so that
1170         m_imageLoader can be private. Added new protected function updateImageLoaderWithNewURLSoon,
1171         as well as other new private functions. Made m_imageLoader be std::unique_ptr instead of
1172         OwnPtr, and added m_needsImageReload.
1173
1174         * style/StyleResolveTree.cpp:
1175         (WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
1176         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
1177         (WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
1178         (WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
1179         (WebCore::Style::postResolutionCallbackQueue): Added.
1180         (WebCore::Style::queuePostResolutionCallback): Added.
1181         (WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
1182         PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
1183         of as a special case. It should not work for multiple documents across multiple pages instead of
1184         only the outermost one.
1185         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
1186         Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
1187         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
1188         (WebCore::Style::postResolutionCallbacksAreSuspended): Added.
1189
1190         * style/StyleResolveTree.h: Added queuePostResolutionCallback and
1191         postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
1192         eventually become a private implementation detail.
1193
1194 2014-03-23  Sam Weinig  <sam@webkit.org>
1195
1196         Simplify the HTMLConverter interface (Part 1)
1197         https://bugs.webkit.org/show_bug.cgi?id=130654
1198
1199         Reviewed by Dan Bernstein.
1200
1201         Convert WebHTMLConverter's interface to only use class methods as the first
1202         step of simplifying the interface. 
1203
1204         * editing/ios/EditorIOS.mm:
1205         (WebCore::attributedStringForRange):
1206         * editing/mac/EditorMac.mm:
1207         (WebCore::attributedStringForRange):
1208         * platform/mac/HTMLConverter.h:
1209         * platform/mac/HTMLConverter.mm:
1210         (+[WebHTMLConverter attributedStringFromRange:]):
1211
1212 2014-03-23  James Craig  <jcraig@apple.com>
1213
1214         Web Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
1215         https://bugs.webkit.org/show_bug.cgi?id=130635
1216
1217         Reviewed by Timothy Hatcher.
1218
1219         Support for @aria-owns, @aria-controls, and @aria-flowto.
1220
1221         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1222
1223         * inspector/InspectorDOMAgent.cpp:
1224         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1225         * inspector/protocol/DOM.json:
1226
1227 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
1228
1229         Clean up #includes by geometry classes
1230         https://bugs.webkit.org/show_bug.cgi?id=130645
1231
1232         Reviewed by Andreas Kling.
1233
1234         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
1235         classes brings in a lot of additional headers. Fix by adding a new
1236         GeometryUtilities file so that the basic files don't need Vector,
1237         and including GeometryUtilities.h where necessary.
1238         
1239         Also forward declare PrintStream.h and only bring in the header
1240         in implementation files.
1241
1242         * CMakeLists.txt:
1243         * GNUmakefile.list.am:
1244         * WebCore.vcxproj/WebCore.vcxproj:
1245         * WebCore.vcxproj/WebCore.vcxproj.filters:
1246         * WebCore.xcodeproj/project.pbxproj:
1247         * css/CSSToStyleMap.h:
1248         * html/HTMLCanvasElement.cpp:
1249         * platform/cairo/WidgetBackingStoreCairo.h:
1250         * platform/graphics/FloatPoint.cpp:
1251         * platform/graphics/FloatPoint.h:
1252         * platform/graphics/FloatRect.cpp:
1253         * platform/graphics/FloatRect.h:
1254         * platform/graphics/FloatSize.cpp:
1255         * platform/graphics/FloatSize.h:
1256         * platform/graphics/GeometryUtilities.cpp: Added.
1257         (WebCore::findSlope):
1258         (WebCore::findIntersection):
1259         (WebCore::unionRect):
1260         (WebCore::mapRect):
1261         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
1262         * platform/graphics/IntPoint.h:
1263         * platform/graphics/IntRect.cpp:
1264         * platform/graphics/IntRect.h:
1265         * platform/graphics/IntSize.h:
1266         * platform/graphics/TextTrackRepresentation.h:
1267         * platform/graphics/Tile.h:
1268         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
1269         * platform/gtk/WidgetBackingStoreGtkX11.h:
1270         * rendering/RenderBoxModelObject.cpp:
1271         * rendering/RenderImage.cpp:
1272         * rendering/RenderObject.cpp:
1273
1274 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
1275
1276         Clean up #includes by geometry classes
1277         https://bugs.webkit.org/show_bug.cgi?id=130645
1278
1279         Reviewed by Andreas Kling.
1280
1281         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
1282         classes brings in a lot of additional headers. Fix by adding a new
1283         GeometryUtilities file so that the basic files don't need Vector,
1284         and including GeometryUtilities.h where necessary.
1285         
1286         Also forward declare PrintStream.h and only bring in the header
1287         in implementation files.
1288
1289         * CMakeLists.txt:
1290         * GNUmakefile.list.am:
1291         * WebCore.vcxproj/WebCore.vcxproj:
1292         * WebCore.vcxproj/WebCore.vcxproj.filters:
1293         * WebCore.xcodeproj/project.pbxproj:
1294         * css/CSSToStyleMap.h:
1295         * html/HTMLCanvasElement.cpp:
1296         * platform/cairo/WidgetBackingStoreCairo.h:
1297         * platform/graphics/FloatPoint.cpp:
1298         * platform/graphics/FloatPoint.h:
1299         * platform/graphics/FloatRect.cpp:
1300         * platform/graphics/FloatRect.h:
1301         * platform/graphics/FloatSize.cpp:
1302         * platform/graphics/FloatSize.h:
1303         * platform/graphics/GeometryUtilities.cpp: Added.
1304         (WebCore::findSlope):
1305         (WebCore::findIntersection):
1306         (WebCore::unionRect):
1307         (WebCore::mapRect):
1308         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
1309         * platform/graphics/IntPoint.h:
1310         * platform/graphics/IntRect.cpp:
1311         * platform/graphics/IntRect.h:
1312         * platform/graphics/IntSize.h:
1313         * platform/graphics/TextTrackRepresentation.h:
1314         * platform/graphics/Tile.h:
1315         * platform/gtk/WidgetBackingStoreGtkX11.h:
1316         * rendering/RenderBoxModelObject.cpp:
1317         * rendering/RenderImage.cpp:
1318         * rendering/RenderObject.cpp:
1319
1320 2014-03-22  Chang Shu  <cshu@webkit.org>
1321
1322         Replace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace in TextIterator.
1323         https://bugs.webkit.org/show_bug.cgi?id=130612.
1324
1325         Reviewed by Darin Adler.
1326
1327         Some layout tests are affected by this change but the new behavior should be correct.
1328
1329         * editing/TextIterator.cpp:
1330         (WebCore::TextIterator::handleTextNode):
1331         (WebCore::TextIterator::handleTextBox):
1332
1333 2014-03-22  Sam Weinig  <sam@webkit.org>
1334
1335         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
1336         https://bugs.webkit.org/show_bug.cgi?id=130639
1337
1338         Reviewed by Darin Adler.
1339
1340         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
1341
1342         - Removes gratuitous lookup of CSS properties that are known at compile time.
1343         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
1344           that will alway yield the same results.
1345         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
1346           but instead used the non-existent font-effect.
1347
1348         * platform/mac/HTMLConverter.mm:
1349         (HTMLConverterCaches::computedStylePropertyForElement):
1350         (HTMLConverterCaches::inlineStylePropertyForElement):
1351         (HTMLConverterCaches::propertyValueForNode):
1352         (-[WebHTMLConverter _stringForNode:property:]):
1353         (HTMLConverterCaches::floatPropertyValueForNode):
1354         (-[WebHTMLConverter _getFloat:forNode:property:]):
1355         (HTMLConverterCaches::isBlockElement):
1356         (HTMLConverterCaches::elementHasOwnBackgroundColor):
1357         (HTMLConverterCaches::colorPropertyValueForNode):
1358         (-[WebHTMLConverter _colorForNode:property:]):
1359         (-[WebHTMLConverter _computedAttributesForElement:]):
1360         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1361         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1362         (-[WebHTMLConverter _addTableForElement:]):
1363         (-[WebHTMLConverter _addTableCellForElement:]):
1364         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1365         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1366         (-[WebHTMLConverter _processText:]):
1367         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1368
1369 2014-03-22  Andreas Kling  <akling@apple.com>
1370
1371         Fix debug build.
1372
1373         * bindings/js/JSDOMBinding.h:
1374         (WebCore::createWrapper):
1375
1376 2014-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1377
1378         Add *final* keyword to NavigatorContentUtils class
1379         https://bugs.webkit.org/show_bug.cgi?id=130636
1380
1381         Reviewed by Darin Adler.
1382
1383         NavigatorContentUtils won't be used as a base class. So, added final keyword.
1384
1385         No new tests, no behavior changes.
1386
1387         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
1388
1389 2014-03-22  Andreas Kling  <akling@apple.com>
1390
1391         CREATE_DOM_WRAPPER doesn't need the ExecState.
1392         <https://webkit.org/b/130648>
1393
1394         Remove the ExecState parameter from CREATE_DOM_WRAPPER and get all
1395         that we need from the global object instead.
1396
1397         toJS() and toJSNewlyCreated() still take an ExecState, that needs
1398         to be dealt with separately since some of them have scary looking
1399         currentWorld() checks.
1400
1401         Reviewed by Darin Adler.
1402
1403         * bindings/js/JSAudioContextCustom.cpp:
1404         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1405         * bindings/js/JSBlobCustom.cpp:
1406         (WebCore::toJS):
1407         (WebCore::JSBlobConstructor::constructJSBlob):
1408         * bindings/js/JSCDATASectionCustom.cpp:
1409         (WebCore::toJSNewlyCreated):
1410         * bindings/js/JSCSSRuleCustom.cpp:
1411         (WebCore::toJS):
1412         * bindings/js/JSCSSValueCustom.cpp:
1413         (WebCore::toJS):
1414         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1415         (WebCore::toJS):
1416         * bindings/js/JSDOMBinding.h:
1417         (WebCore::createWrapper):
1418         (WebCore::wrap):
1419         (WebCore::createNewWrapper):
1420         * bindings/js/JSDocumentCustom.cpp:
1421         (WebCore::toJS):
1422         * bindings/js/JSElementCustom.cpp:
1423         (WebCore::toJSNewlyCreated):
1424         * bindings/js/JSEventCustom.cpp:
1425         (WebCore::toJS):
1426         * bindings/js/JSHTMLCollectionCustom.cpp:
1427         (WebCore::toJS):
1428         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1429         (WebCore::JSHTMLTemplateElement::content):
1430         * bindings/js/JSIDBAnyCustom.cpp:
1431         (WebCore::toJS):
1432         * bindings/js/JSImageDataCustom.cpp:
1433         (WebCore::toJS):
1434         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
1435         (WebCore::toJS):
1436         * bindings/js/JSNodeCustom.cpp:
1437         (WebCore::createWrapperInline):
1438         * bindings/js/JSPerformanceEntryCustom.cpp:
1439         (WebCore::toJS):
1440         * bindings/js/JSRTCIceCandidateCustom.cpp:
1441         (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
1442         * bindings/js/JSRTCPeerConnectionCustom.cpp:
1443         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
1444         * bindings/js/JSRTCSessionDescriptionCustom.cpp:
1445         (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
1446         * bindings/js/JSSVGPathSegCustom.cpp:
1447         (WebCore::toJS):
1448         * bindings/js/JSStyleSheetCustom.cpp:
1449         (WebCore::toJS):
1450         * bindings/js/JSTextCustom.cpp:
1451         (WebCore::toJSNewlyCreated):
1452         * bindings/js/JSTextTrackCueCustom.cpp:
1453         (WebCore::toJS):
1454         * bindings/js/JSTouchCustom.cpp:
1455         (WebCore::toJSNewlyCreated):
1456         * bindings/js/JSTouchListCustom.cpp:
1457         (WebCore::toJSNewlyCreated):
1458         * bindings/js/JSTrackCustom.cpp:
1459         (WebCore::toJS):
1460         * bindings/scripts/CodeGeneratorJS.pm:
1461         (GenerateImplementation):
1462         * dom/make_names.pl:
1463         (printWrapperFunctions):
1464         (printWrapperFactoryCppFile):
1465         (printWrapperFactoryHeaderFile):
1466
1467 2014-03-22  Michael Saboff  <msaboff@apple.com>
1468
1469         toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
1470         https://bugs.webkit.org/show_bug.cgi?id=130554
1471
1472         Reviewed by Geoffrey Garen.
1473
1474         Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
1475         Added cast from JSProxy->target() if the jsCast<>() to the native object fails
1476         in toJSDedicatedWorkerGlobalScope() and toJSSharedWorkerGlobalScope().
1477         The original cast is needed for access to the local side of the worker, while the JSProxy
1478         cast is used on the remote side of a worker.
1479
1480         Test: fast/workers/worker-strict.html
1481
1482         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1483         (WebCore::toJSDedicatedWorkerGlobalScope):
1484         (WebCore::toJSSharedWorkerGlobalScope):
1485
1486         * bindings/js/WorkerScriptController.cpp:
1487         (WebCore::WorkerScriptController::evaluate): Changed to pass in the JSProxy and not
1488         the WorkerGlobalScope object as the this object to script evaluation.
1489
1490         * workers/DedicatedWorkerGlobalScope.idl:
1491         * workers/SharedWorkerGlobalScope.idl:
1492         * workers/WorkerGlobalScope.idl:
1493         Added the new CustomProxyToJSObject attribute so we'll call to<{nativeClass}>() for
1494         getting the object to use for global evaluation.
1495
1496 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
1497
1498         Some #include hygiene in Node/Element etc
1499         https://bugs.webkit.org/show_bug.cgi?id=130642
1500
1501         Reviewed by Geoffrey Garen.
1502
1503         Clean up various #includes.
1504
1505         * accessibility/AccessibilityObject.h:
1506         * bindings/js/WebCoreTypedArrayController.h:
1507         * dom/Element.h:
1508         * dom/EventListenerMap.h:
1509         * dom/EventTarget.h:
1510         * dom/Node.h:
1511         * rendering/RenderObject.h:
1512         * rendering/svg/RenderSVGRoot.h:
1513
1514 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
1515
1516         FloatRect.h on iOS should not suck in a system header
1517         https://bugs.webkit.org/show_bug.cgi?id=130641
1518
1519         Reviewed by Geoff Garen.
1520
1521         Don't pull in <CoreGraphics/CGGeometry.h> from FloatRect.h.
1522
1523         * platform/graphics/FloatRect.h:
1524
1525 2014-03-22  Dan Bernstein  <mitz@apple.com>
1526
1527         Fixed the iOS build.
1528
1529         Reviewed by Darin Adler.
1530
1531         * page/ios/FrameIOS.mm:
1532         (WebCore::Frame::interpretationsForCurrentRoot):
1533
1534 2014-03-22  Darin Adler  <darin@apple.com>
1535
1536         Remove String::deprecatedCharacters
1537         https://bugs.webkit.org/show_bug.cgi?id=126854
1538
1539         Reviewed by Sam Weinig.
1540
1541         * bindings/scripts/StaticString.pm:
1542         (GenerateStrings): Remove the code to generate the null m_copyData16 pointer.
1543
1544         * editing/TextIterator.cpp:
1545         (WebCore::SearchBuffer::prependContext): Changed to use the new append function in
1546         StringView.h and removed the one defined locally here.
1547
1548         * editing/VisibleUnits.cpp:
1549         (WebCore::wordBreakIteratorForMinOffsetBoundary): Use the new append function
1550         in StringView.h instead of using deprecatedCharacters.
1551         (WebCore::wordBreakIteratorForMaxOffsetBoundary): Ditto.
1552         Removed an append function defined locally here and use the one in StringView.h.
1553
1554         * editing/htmlediting.cpp:
1555         (WebCore::stringWithRebalancedWhitespace): Use StringView::getCharactersWithUpconvert.
1556
1557         * html/parser/HTMLToken.h:
1558         (WebCore::HTMLToken::appendToAttributeValue): Changed to take a StringView instead
1559         of a const String&.
1560
1561         * loader/appcache/ManifestParser.cpp:
1562         (WebCore::parseManifest): Use StringView and StringView::upconvertedCharacters.
1563
1564         * page/EventSource.cpp:
1565         (WebCore::EventSource::didReceiveData): Use the new append overload from StringView.h.
1566         Also added a comment about incorrect use of the decode function.
1567
1568         * page/ios/FrameIOS.mm:
1569         (WebCore::Frame::interpretationsForCurrentRoot): Use the new StringView append function.
1570         Also use simpler new-style for loops.
1571
1572         * platform/LinkHash.cpp:
1573         (WebCore::visitedURLInline): Use the new append function and StringView::substring.
1574         (WebCore::visitedLinkHash): Use upconvertedCharacters for the non-8-bit case.
1575
1576         * platform/URL.cpp:
1577         (WebCore::findFirstOf): Chagned to take a StringView.
1578         (WebCore::containsOnlyASCII): Added. Works on StringView. Could move to a WTF header in
1579         the future if it's needed elsewhere.
1580         (WebCore::protocolIs): Added. Works on StringView. Could put in URL.h if needed elsewhere,
1581         or consider replacing the one that takes const String& with just this one.
1582         (WebCore::appendEncodedHostname): Changed to take a StringView and use
1583         StringView::upconvertedCharacters.
1584         (WebCore::findHostnamesInMailToURL): Changed to take a StringView.
1585         (WebCore::findHostnameInHierarchicalURL): Ditto.
1586         (WebCore::encodeHostnames): Ditto.
1587         (WebCore::encodeRelativeString): Ditto.
1588
1589         * platform/graphics/StringTruncator.cpp:
1590         (WebCore::StringTruncator::width): Use StringView::upconvertedCharacters.
1591
1592         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1593         (WebCore::HarfBuzzShaper::setFontFeatures): Use indexing directly on the string instead
1594         of on a UChar*.
1595         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use StringView::upconvertedCharacters.
1596
1597         * platform/text/TextCodecICU.cpp:
1598         (WebCore::TextCodecICU::encode): Use a Vector<UChar> rather than a String to copy and
1599         replace the backslashes with yen signs. Also optimize case where there are no backslashes.
1600
1601         * rendering/RenderListMarker.cpp:
1602         (WebCore::RenderListMarker::paint): Use TextRun::setText(StringView).
1603
1604         * rendering/RenderText.cpp:
1605         (WebCore::maxWordFragmentWidth): Pass a String to RenderBlock::constructTextRun instead of
1606         calling StringBuilder::deprecatedCharacters.
1607
1608         * rendering/RenderText.h: Removed deprecatedCharacters function.
1609
1610         * rendering/line/BreakingContextInlineHeaders.h: Added now-needed header include.
1611
1612         * rendering/svg/SVGInlineTextBox.cpp:
1613         (WebCore::SVGInlineTextBox::constructTextRun): Use StringView version of TextRun constructor.
1614
1615         * rendering/svg/SVGTextMetrics.cpp:
1616         (WebCore::SVGTextMetrics::SVGTextMetrics): Take references instead of pointers.
1617         (WebCore::SVGTextMetrics::constructTextRun): Take references instead of pointers, and don't
1618         take a character pointer any more. Instead, extract the text and use the StringView version of
1619         the TextRun constructor.
1620         (WebCore::SVGTextMetrics::measureCharacterRange): Take references instead of pointers and
1621         update for above changes.
1622         * rendering/svg/SVGTextMetrics.h: Updated for changes above. Also tweaked style a bit.
1623
1624         * rendering/svg/SVGTextMetricsBuilder.cpp:
1625         (WebCore::SVGTextMetricsBuilder::advanceSimpleText): Updated for SVGTextMetrics changes.
1626         (WebCore::SVGTextMetricsBuilder::advanceComplexText): Ditto.
1627         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): Ditto.
1628         (WebCore::SVGTextMetricsBuilder::measureTextRenderer): Change code to store a character
1629         for lastCharacter rather than storing a pointer to a character. Stop using TextRun::data16.
1630
1631         * rendering/svg/SVGTextQuery.cpp:
1632         (WebCore::SVGTextQuery::subStringLengthCallback): Updated for SVGTextMetrics changes.
1633         (WebCore::SVGTextQuery::startPositionOfCharacterCallback): Ditto.
1634         (WebCore::SVGTextQuery::endPositionOfCharacterCallback): Ditto.
1635         (WebCore::calculateGlyphBoundaries): Ditto.
1636
1637         * xml/XPathFunctions.cpp:
1638         (WebCore::XPath::atomicSubstring): Added.
1639         (WebCore::XPath::FunId::evaluate): Tweaked a bit to use a new style for loop.
1640         Use the atomicSubstring function to avoid making a temporary String just to make an AtomicString.
1641         That function also uses characters8/16 rather than depreccatedCharacters.
1642
1643         * xml/XPathNodeSet.h: Added begin and end so this collection can be iterated with new style for loop.
1644
1645         * xml/parser/XMLDocumentParserLibxml2.cpp:
1646         (WebCore::XMLDocumentParser::doWrite): Use StringView::upconvertedCharacters.
1647         (WebCore::parseAttributes): Ditto.
1648
1649 2014-03-22  Commit Queue  <commit-queue@webkit.org>
1650
1651         Unreviewed, rolling out r166118.
1652         https://bugs.webkit.org/show_bug.cgi?id=130640
1653
1654         Crashing things (Requested by weinig on #webkit).
1655
1656         Reverted changeset:
1657
1658         "Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
1659         properties"
1660         https://bugs.webkit.org/show_bug.cgi?id=130639
1661         http://trac.webkit.org/changeset/166118
1662
1663 2014-03-22  Sam Weinig  <sam@webkit.org>
1664
1665         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
1666         https://bugs.webkit.org/show_bug.cgi?id=130639
1667
1668         Reviewed by Simon Fraser.
1669
1670         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
1671
1672         - Removes gratuitous lookup of CSS properties that are known at compile time.
1673         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
1674           that will alway yield the same results.
1675         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
1676           but instead used the non-existent font-effect.
1677
1678         * platform/mac/HTMLConverter.mm:
1679         (HTMLConverterCaches::computedStylePropertyForElement):
1680         (HTMLConverterCaches::inlineStylePropertyForElement):
1681         (HTMLConverterCaches::propertyValueForNode):
1682         (-[WebHTMLConverter _stringForNode:property:]):
1683         (HTMLConverterCaches::floatPropertyValueForNode):
1684         (-[WebHTMLConverter _getFloat:forNode:property:]):
1685         (HTMLConverterCaches::isBlockElement):
1686         (HTMLConverterCaches::elementHasOwnBackgroundColor):
1687         (HTMLConverterCaches::colorPropertyValueForNode):
1688         (-[WebHTMLConverter _colorForNode:property:]):
1689         (-[WebHTMLConverter _computedAttributesForElement:]):
1690         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1691         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1692         (-[WebHTMLConverter _addTableForElement:]):
1693         (-[WebHTMLConverter _addTableCellForElement:]):
1694         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1695         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1696         (-[WebHTMLConverter _processText:]):
1697         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1698
1699 2014-03-21  Simon Fraser  <simon.fraser@apple.com>
1700
1701         Don't flush compositing layers within FrameView::willPaintContents()
1702         https://bugs.webkit.org/show_bug.cgi?id=130627
1703         <rdar://problem/16368869>
1704
1705         Reviewed by Sam Weinig.
1706
1707         Remove the call to flushCompositingStateForThisFrame() here. We should
1708         have always flushed before painting via other mechanisms in WebKit2 and WebKit2.
1709         Flushing during painting is actually harmful, since we could be inside
1710         a CA commit already, and creating or destroying layers via flushing is bad.
1711
1712         * page/FrameView.cpp:
1713         (WebCore::FrameView::willPaintContents):
1714
1715 2014-03-22  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
1716
1717         ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
1718         https://bugs.webkit.org/show_bug.cgi?id=127361
1719
1720         Huge numbers represented by the 'INF' value can not be used
1721         in CSS rules, so they make the assert fail. We have to make
1722         sure that the parsed property value is finite, otherwise
1723         the property will be dropped.
1724
1725         Test: fast/css/infinite-floating-value.html
1726
1727         * css/CSSValuePool.cpp:
1728         (WebCore::CSSValuePool::createValue):
1729
1730 2014-03-21  Zalan Bujtas  <zalan@apple.com>
1731
1732         Remove redundant friending from class Image.
1733         https://bugs.webkit.org/show_bug.cgi?id=130628
1734
1735         Reviewed by Simon Fraser.
1736
1737         Those friend classes are subclasses. No need to make them friend of their parent class.
1738
1739         No change in functionality.
1740
1741         * platform/graphics/Image.h:
1742
1743 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
1744
1745         [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
1746         https://bugs.webkit.org/show_bug.cgi?id=130555
1747
1748         Reviewed by Simon Fraser.
1749
1750         * WebCore.exp.in:
1751         * platform/ScrollView.h:
1752         * platform/graphics/ca/mac/TileController.mm:
1753         (WebCore::TileController::computeTileCoverageRect):
1754         * platform/ios/ScrollViewIOS.mm:
1755         (WebCore::ScrollView::setScrollVelocityInformation):
1756         (WebCore::ScrollView::computeCoverageRect):
1757         * rendering/RenderLayerCompositor.cpp:
1758         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1759
1760 2014-03-21  Eric Carlson  <eric.carlson@apple.com>
1761
1762         [iOS] clean up fullscreen player controller when exiting fullscreen
1763         https://bugs.webkit.org/show_bug.cgi?id=130621
1764
1765         Reviewed by Jer Noble.
1766
1767         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1768         (-[WebAVVideoLayer setBounds:]): Do nothing if _avPlayerController is nil.
1769         (-[WebAVVideoLayer setVideoLayerGravity:]): Ditto.
1770         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Set m_playerViewController delegate
1771             and player controller to nil.
1772
1773 2014-03-21  Eric Carlson  <eric.carlson@apple.com>
1774
1775         [iOS] remote command callbacks must happen on the WebThread
1776         https://bugs.webkit.org/show_bug.cgi?id=130618
1777
1778         Reviewed by Jer Noble.
1779
1780         * platform/ios/RemoteCommandListenerIOS.h:
1781         (WebCore::RemoteCommandListenerIOS::createWeakPtr):
1782         * platform/ios/RemoteCommandListenerIOS.mm:
1783         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Dispatch commands to the
1784             main thread before making listener callbacks.
1785
1786 2014-03-21  Zalan Bujtas  <zalan@apple.com>
1787
1788         Subpixel rendering: Make <img> positioning subpixel aware.
1789         https://bugs.webkit.org/show_bug.cgi?id=130596
1790
1791         Reviewed by Simon Fraser.
1792
1793         Change <img> positioning from integral to device pixel. It enables us
1794         to paint hairline borders around <img> properly.
1795         This patch changes the behavior of broken image representation from constant 1 CSS px border
1796         to a dynamic 1 device px.
1797
1798         Test: fast/images/hidpi-image-position-on-device-pixels.html
1799
1800         * WebCore.exp.in:
1801         * platform/graphics/GraphicsContext.cpp:
1802         (WebCore::GraphicsContext::drawImage):
1803         * platform/graphics/GraphicsContext.h:
1804         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1805         (WebCore::GraphicsContext::drawRect):
1806         * platform/graphics/cg/GraphicsContextCG.cpp:
1807         (WebCore::GraphicsContext::drawRect):
1808         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1809         (WebCore::GraphicsContext::drawRect):
1810         * rendering/RenderImage.cpp:
1811         (WebCore::RenderImage::paintReplaced):
1812         (WebCore::RenderImage::paintIntoRect):
1813         * rendering/RenderImage.h:
1814         * rendering/RenderLayer.cpp:
1815         (WebCore::RenderLayer::drawPlatformResizerImage):
1816
1817 2014-03-21  Brent Fulgham  <bfulgham@apple.com>
1818
1819         Merge VTTScanner Code from Blink
1820         https://bugs.webkit.org/show_bug.cgi?id=130616
1821
1822         Reviewed by Eric Carlson.
1823
1824         Merged from Blink (patch by fs@opera.com):
1825         https://chromium.googlesource.com/chromium/blink/+/f1ceb058d574a1174b524c57f67350510a942071
1826         http://crbug.com/75273002
1827         https://chromium.googlesource.com/chromium/blink/+/3e2c67969486e86347b328c72c67cacabfe6f4a1
1828         http://crbug.com/134173002
1829         https://chromium.googlesource.com/chromium/blink/+/5962b7bbb001838f3fc7f24817637528b86bfd9b
1830         http://crbug.com/134153002
1831         https://chromium.googlesource.com/chromium/blink/+/6c81f51438013edca920a19fc6a31026fc562af2
1832         http://crbug.com/137033002
1833         https://chromium.googlesource.com/chromium/blink/+/fa286dca17a291da3ae8be80111e2264de6d5cfd
1834         http://crbug.com/140503004
1835         https://chromium.googlesource.com/chromium/blink/+/8f33b63aabcce7dd21dd15288d45c4eb37c02001
1836         http://crbug.com/139343006
1837         https://chromium.googlesource.com/chromium/blink/+/1872b54b908fac525f1ad9d6f15174b11e27c8af
1838         http://crbug.com/143983002
1839         https://chromium.googlesource.com/chromium/blink/+/e6494b3359e2077bd8772d86ab1fb709acf4c398
1840         http://crbug.com/144893002
1841  
1842         * CMakeLists.txt:
1843         * GNUmakefile.list.am:
1844         * WebCore.vcxproj/WebCore.vcxproj:
1845         * WebCore.vcxproj/WebCore.vcxproj.filters:
1846         * WebCore.xcodeproj/project.pbxproj:
1847         * html/track/ParsingUtilities.h: Added.
1848         (skipExactly):
1849         (skipUntil):
1850         (skipWhile):
1851         * html/track/VTTCue.cpp:
1852         (WebCore::VTTCue::markFutureAndPastNodes):
1853         (WebCore::VTTCue::settingName):
1854         (WebCore::scanPercentage):
1855         (WebCore::VTTCue::setCueSettings):
1856         * html/track/VTTCue.h:
1857         * html/track/VTTRegion.cpp:
1858         (WebCore::VTTRegion::setRegionSettings):
1859         (WebCore::VTTRegion::scanSettingName):
1860         (WebCore::parsedEntireRun):
1861         (WebCore::VTTRegion::parseSettingValue):
1862         * html/track/VTTRegion.h:
1863         * html/track/VTTScanner.cpp: Added.
1864         (WebCore::VTTScanner::VTTScanner):
1865         (WebCore::VTTScanner::scan):
1866         (WebCore::VTTScanner::scanRun):
1867         (WebCore::VTTScanner::skipRun):
1868         (WebCore::VTTScanner::extractString):
1869         (WebCore::VTTScanner::restOfInputAsString):
1870         (WebCore::VTTScanner::scanDigits):
1871         (WebCore::VTTScanner::scanFloat):
1872         * html/track/VTTScanner.h: Added.
1873         (WebCore::VTTScanner::Run::Run):
1874         (WebCore::VTTScanner::Run::start):
1875         (WebCore::VTTScanner::Run::end):
1876         (WebCore::VTTScanner::Run::isEmpty):
1877         (WebCore::VTTScanner::isAt):
1878         (WebCore::VTTScanner::isAtEnd):
1879         (WebCore::VTTScanner::match):
1880         (WebCore::VTTScanner::position):
1881         (WebCore::VTTScanner::end):
1882         (WebCore::VTTScanner::LCharPredicateAdapter):
1883         (WebCore::VTTScanner::Run::length):
1884         (WebCore::VTTScanner::scan):
1885         (WebCore::VTTScanner::skipWhile):
1886         (WebCore::VTTScanner::skipUntil):
1887         (WebCore::VTTScanner::collectWhile):
1888         (WebCore::VTTScanner::collectUntil):
1889         (WebCore::VTTScanner::seekTo):
1890         (WebCore::VTTScanner::currentChar):
1891         (WebCore::VTTScanner::advance):
1892         * html/track/WebVTTParser.cpp:
1893         (WebCore::WebVTTParser::parseFloatPercentageValue):
1894         (WebCore::WebVTTParser::parseFloatPercentageValuePair):
1895         (WebCore::WebVTTParser::collectTimingsAndSettings):
1896         (WebCore::WebVTTParser::collectTimeStamp):
1897         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
1898         * html/track/WebVTTParser.h:
1899
1900 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
1901
1902         Pseudo type cleanup part 2: split pseudo elements parsing
1903         https://bugs.webkit.org/show_bug.cgi?id=130370
1904
1905         Reviewed by Andreas Kling.
1906
1907         With this patch, pseudo elements are handled separately. The only thing left in
1908         the old path is compatibility pseudo elements and pseudo classes.
1909
1910         The list of special pseudo elements is now separated and is stored in SelectorPseudoElementTypeMap.in.
1911         The script makeSelectorPseudoElementsMap.py takes that list to make the pseudo elements hash table.
1912
1913         The other pseudo elements are the prefixed ones, they are filtered in CSSSelector::parsePseudoElementType().
1914
1915         All the non-compatibility selectors are removed from SelectorPseudoTypeMap.in. CSSParserSelector::setPseudoTypeValue()
1916         is updated accordingly. The next step will be to clean that part.
1917
1918         * CMakeLists.txt:
1919         * DerivedSources.make:
1920         * GNUmakefile.list.am:
1921         * WebCore.vcxproj/WebCore.vcxproj:
1922         * WebCore.vcxproj/WebCore.vcxproj.filters:
1923         * WebCore.xcodeproj/project.pbxproj:
1924         * css/CSSComputedStyleDeclaration.cpp:
1925         (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
1926         * css/CSSGrammar.y.in:
1927         * css/CSSParserValues.cpp:
1928         (WebCore::CSSParserSelector::parsePseudoElementSelector):
1929         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector):
1930         (WebCore::CSSParserSelector::setPseudoTypeValue):
1931         * css/CSSParserValues.h:
1932         * css/CSSSelector.cpp:
1933         (WebCore::CSSSelector::parsePseudoElementType):
1934         * css/CSSSelector.h:
1935         * css/SelectorPseudoElementTypeMap.in: Added.
1936         * css/SelectorPseudoTypeMap.h:
1937         * css/SelectorPseudoTypeMap.in:
1938         * css/html.css:
1939         (q::before):
1940         (q::after):
1941         * css/makeSelectorPseudoElementsMap.py: Added.
1942         (enumerablePseudoType):
1943         (expand_ifdef_condition):
1944         * page/DOMWindow.cpp:
1945         (WebCore::DOMWindow::getMatchedCSSRules):
1946
1947 2014-03-20  Andreas Kling  <akling@apple.com>
1948
1949         Less inclusion of JSCInlines.h.
1950         <https://webkit.org/b/130545>
1951
1952         Stop including JSCInlines.h from JSDOMGlobalObject.h!
1953
1954         Reviewed by Simon Fraser.
1955
1956         * ForwardingHeaders/runtime/IdentifierInlines.h: Added.
1957         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1958         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1959         * bindings/js/JSDOMGlobalObject.h:
1960         * bindings/js/JSDOMStringMapCustom.cpp:
1961         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1962         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1963         * bindings/js/JSLazyEventListener.cpp:
1964         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1965         * bindings/js/JSStorageCustom.cpp:
1966         * bindings/js/ScriptGlobalObject.cpp:
1967         * dom/NodeIterator.cpp:
1968         * dom/TreeWalker.cpp:
1969         * testing/Internals.cpp:
1970         * testing/js/WebCoreTestSupport.cpp:
1971
1972 2014-03-21  Oliver Hunt  <oliver@apple.com>
1973
1974         Fix a crash when assigning an object to document.location
1975         https://bugs.webkit.org/show_bug.cgi?id=130213
1976
1977         Reviewed by Geoffrey Garen.
1978
1979         Convert location to string before we make use the document.
1980         This prevents us from attempting to navigate a frame that
1981         has already been removed.
1982
1983         Test: fast/dom/navigation-with-sideeffects-crash.html
1984
1985         * bindings/js/JSDocumentCustom.cpp:
1986         (WebCore::JSDocument::location):
1987         (WebCore::JSDocument::setLocation):
1988
1989 2014-03-21  Brian Burg  <bburg@apple.com>
1990
1991         Web Replay: replay controller is improperly setting user input bridge state
1992         https://bugs.webkit.org/show_bug.cgi?id=130606
1993
1994         Reviewed by Timothy Hatcher.
1995
1996         The user input bridge was being set based on the old session state,
1997         rather than the new session state.
1998
1999         * replay/ReplayController.cpp:
2000         (WebCore::ReplayController::setSessionState):
2001
2002 2014-03-21  James Craig  <jcraig@apple.com>
2003
2004         Web Inspector: AXI: Expose Accessibility Tree children of the selected node
2005         https://bugs.webkit.org/show_bug.cgi?id=130264
2006
2007         Reviewed by Timothy Hatcher.
2008
2009         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
2010
2011         Expose the accessibility tree children (different from DOM children) of the
2012         current node in the accessibility node inspector.
2013
2014         * inspector/InspectorDOMAgent.cpp: 
2015         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2016         * inspector/InspectorDOMAgent.h:
2017         * inspector/protocol/DOM.json:
2018
2019 2014-03-21  Alex Christensen  <achristensen@webkit.org>
2020
2021         [Win] Compile fixes with video not enabled.
2022         https://bugs.webkit.org/show_bug.cgi?id=130597
2023
2024         Reviewed by Darin Adler.
2025
2026         * DerivedSources.make:
2027         Only generate UserAgentScripts.h if needed.
2028         * platform/audio/MediaSession.cpp:
2029         * platform/audio/MediaSessionManager.cpp:
2030         Only compile if video is enabled.
2031
2032 2014-03-21  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2033
2034         Optimize FEGaussian blur
2035         https://bugs.webkit.org/show_bug.cgi?id=50881
2036
2037         Reviewed by Dirk Schulze.
2038
2039         Currently boxBlur() will calculate the filter for each channel in
2040         a loop and also uses Uint8ClampedArray::set() to write the
2041         resulting pixels into destination array.
2042
2043         Using Uint8ClampedArray::set() requires lots of unnecessary type
2044         conversions, not to mention other function calls. This patch
2045         updates the original written by Simon Fraser to apply cleanly to current
2046         trunk.
2047
2048         It also implements code to handle EdgeModes and finally avoids use
2049         of ::set() in the newly added boxBlurAlphaOnly()
2050         function. Assignment of calculated pixel values rely on pointers.
2051
2052         No new tests, no change on behavior.
2053
2054         * platform/graphics/filters/FEGaussianBlur.cpp:
2055         (WebCore::boxBlurAlphaOnly): Specialized version for alpha only cases.
2056         (WebCore::boxBlur):
2057
2058 2014-03-21  Simon Fraser  <simon.fraser@apple.com>
2059
2060         unobscuredContentRect() should have the same signature on iOS and other platforms,
2061         and should not recurse on iOS.
2062         https://bugs.webkit.org/show_bug.cgi?id=130604
2063         <rdar://problem/16392587>
2064
2065         Reviewed by Tim Horton and Beth Dakin.
2066
2067         Having different signatures on different platforms is a recipe for
2068         build breakage. Give the iOS unobscuredContentRect() an unused 
2069         VisibleContentRectIncludesScrollbars parameter.
2070         
2071         Also avoid recursion via unobscuredContentRect() calling visibleContentRectInternal().
2072
2073         * WebCore.exp.in:
2074         * platform/ScrollView.cpp:
2075         (WebCore::ScrollView::unobscuredContentRect):
2076         (WebCore::ScrollView::unobscuredContentRectInternal):
2077         (WebCore::ScrollView::visibleContentRectInternal):
2078         * platform/ScrollView.h:
2079         (WebCore::ScrollView::unobscuredContentRectIncludingScrollbars):
2080         * platform/ios/ScrollViewIOS.mm:
2081         (WebCore::ScrollView::unobscuredContentRect):
2082
2083 2014-03-21  Brent Fulgham  <bfulgham@apple.com>
2084
2085         Handle recovery on "timestamp-looking" lines in the WebVTT parser
2086         https://bugs.webkit.org/show_bug.cgi?id=130610
2087
2088         Reviewed by Eric Carlson.
2089
2090         Merged from Blink (patch by fs@opera.com):
2091         https://chromium.googlesource.com/chromium/blink/+/b669a380efbffe25f3b154b026b57b9822ce08e2
2092         http://crbug.com/75273002
2093
2094         Tests: media/track/track-webvtt-tc031-cue-recovery.html
2095                media/track/track-webvtt-tc032-degenerate-cues.html
2096
2097         * html/track/WebVTTParser.cpp:
2098         (WebCore::WebVTTParser::parse):
2099         (WebCore::WebVTTParser::collectCueText):
2100         (WebCore::WebVTTParser::recoverCue):
2101         (WebCore::WebVTTParser::ignoreBadCue):
2102         * html/track/WebVTTParser.h:
2103
2104 2014-03-21  Andreas Kling  <akling@apple.com>
2105
2106         Remove unused RenderView::repaintRectangleInViewAndCompositedLayers().
2107         <https://webkit.org/b/130605>
2108
2109         Reviewed by Antti Koivisto.
2110
2111         * rendering/RenderView.cpp:
2112         * rendering/RenderView.h:
2113
2114 2014-03-21  David Hyatt  <hyatt@apple.com>
2115
2116         Crash in RenderBlock::addChildIgnoringAnonymousColumnBlocks.
2117         https://bugs.webkit.org/show_bug.cgi?id=129948
2118         <rdar://problem/16074072>
2119         
2120         Reviewed by Simon Fraser.
2121
2122         When the marker was placed for multi-column list items, it was being inserted
2123         into the list item itself. Even though the add code in RenderBlock did the right
2124         thing and put the marker inside the multi-column flow thread, the list item code
2125         passed in a beforeChild that was computed using the incorrect parent. This resulted
2126         in the flow thread being used both as the parent of the marker and the sibling of
2127         the marker.
2128         
2129         The fix is to add some code to RenderListItem to make sure it uses the multi-column
2130         flow thread if it exists both as the parent of the marker and as the basis for the
2131         computation of the sibling that the marker should be placed in front of.
2132
2133         Added fast/multicol/multicol-li-crash.html
2134
2135         * rendering/RenderListItem.cpp:
2136         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
2137
2138 2014-03-20  Andreas Kling  <akling@apple.com>
2139
2140         Stop pulling in JSCInlines.h all over the place.
2141         <https://webkit.org/b/130105>
2142
2143         JSDOMBinding.h is included by everyone and their uncle, so try to
2144         cut down on the amount of JSC *Inlines.h it includes.
2145
2146         Reviewed by Geoff Garen.
2147
2148         * ForwardingHeaders/heap/SlotVisitorInlines.h: Added.
2149         * ForwardingHeaders/runtime/JSCJSValueInlines.h: Added.
2150         * ForwardingHeaders/runtime/JSCellInlines.h: Added.
2151         * ForwardingHeaders/runtime/StructureInlines.h: Added.
2152         * bindings/js/JSDOMBinding.h:
2153
2154 2014-03-21  David Kilzer  <ddkilzer@apple.com>
2155
2156         WindowFeatures.{x|y|width|height} are not initialized
2157         <http://webkit.org/b/130547>
2158         <rdar://problem/16383151>
2159
2160         Reviewed by Darin Adler.
2161
2162         Based on a Blink patch in CRBug 342591 by zhaoqin.
2163
2164         * page/WindowFeatures.cpp:
2165         (WebCore::WindowFeatures::WindowFeatures):
2166         - Initialize x, y, width, height in String constructor.
2167         - Move 'resizeable' variable to short-hand initialization since
2168           it is true in both cases.
2169         - Use String::isEmpty() instead of checking its length.
2170         * page/WindowFeatures.h:
2171         (WebCore::WindowFeatures::WindowFeatures): Initialize x, y,
2172         width, height in no-argument constructor.
2173
2174 2014-03-21  Sergio Villar Senin  <svillar@igalia.com>
2175
2176         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/
2177         https://bugs.webkit.org/show_bug.cgi?id=130601
2178
2179         Reviewed by Darin Adler.
2180
2181         * bridge/IdentifierRep.cpp:
2182         (WebCore::identifierSet):
2183         (WebCore::intIdentifierMap):
2184         (WebCore::stringIdentifierMap):
2185         * bridge/NP_jsobject.cpp:
2186         (objectMap):
2187         * bridge/runtime_root.cpp:
2188         (JSC::Bindings::rootObjectSet): Return a reference instead of
2189         a pointer.
2190         (JSC::Bindings::findProtectingRootObject):
2191         (JSC::Bindings::findRootObject):
2192         (JSC::Bindings::RootObject::RootObject):
2193         (JSC::Bindings::RootObject::invalidate):
2194
2195 2014-03-21  Michael Saboff  <msaboff@apple.com>
2196
2197         Change CodeGeneratorJS.pm special cases for "DOMWindow" to be general purpose
2198         https://bugs.webkit.org/show_bug.cgi?id=130553
2199
2200         Reviewed by Geoffrey Garen.
2201
2202         Eliminated 'if ($interfaceName eq "DOMWindow") {' sections in CodeGeneratorJS where
2203         it was used to do DOMWindow specific casting to a JSObject, either a JSDOMWindow* or
2204         a JSDOMWindowShell*.  Instead the code generator will use the existing 
2205         JSDOMWindow* toJSDOMWindow(JSValue value) function based on a newly added attribute
2206         "CustomProxyToJSObject".  That attribute will emit a call to the function
2207         ${className}* to${className}(JSValue).
2208
2209         This is being done to clean up the code generator and for a subsequent patch that
2210         will use a similar custom to{className} function for workers,
2211         JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSValue).
2212
2213         Changes covered by existing tests.
2214
2215         * bindings/scripts/CodeGeneratorJS.pm:
2216         (GenerateImplementation):
2217         * bindings/scripts/IDLAttributes.txt:
2218         * page/DOMWindow.idl:
2219
2220 2014-03-21  Krzysztof Czech  <k.czech@samsung.com>
2221
2222         AX: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed
2223         https://bugs.webkit.org/show_bug.cgi?id=130594
2224
2225         Reviewed by Chris Fleizach.
2226
2227         Use static NeverDestroyed<T> in new code.
2228
2229         * accessibility/AccessibilityMediaControls.cpp:
2230         (WebCore::AccessibilityMediaControl::controlTypeName):
2231         (WebCore::AccessibilityMediaControl::title):
2232         (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
2233         (WebCore::AccessibilityMediaTimeline::helpText):
2234         (WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):
2235         * accessibility/AccessibilityObject.cpp:
2236         (WebCore::AccessibilityObject::actionVerb):
2237         * accessibility/AccessibilityRenderObject.cpp:
2238         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2239         (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
2240         (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
2241         (WebCore::AccessibilityRenderObject::actionVerb):
2242         * accessibility/atk/AXObjectCacheAtk.cpp:
2243         (WebCore::notifyChildrenSelectionChange):
2244
2245 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
2246
2247         Merge WebVTT Tokenizer Updates
2248         https://bugs.webkit.org/show_bug.cgi?id=130565
2249
2250         Reviewed by Eric Carlson.
2251
2252         Merged from Blink (patch by fs@opera.com):
2253         https://chromium.googlesource.com/chromium/blink/+/923db263aa65d6efd71c5b55708ad7eea6b23f53
2254         http://crbug.com/73813002
2255         https://chromium.googlesource.com/chromium/blink/+/48375b1d56b2d8850ae93a6c6fb01c69fae82c75
2256         http://crbug.com/77553004
2257         https://chromium.googlesource.com/chromium/blink/+/98d4fc4f5cb716a31d11907120b10538d4ba0f09
2258         http://crbug.com/78833002
2259         https://chromium.googlesource.com/chromium/blink/+/0e53d4f9f140e979b7f32de495551684bc7f4cd2
2260         http://crbug.com/81113003
2261         https://chromium.googlesource.com/chromium/blink/+/730ef1e7f9a1919964f7e74e7ccb2f343e10a148
2262         http://crbug.com/97103002
2263         https://chromium.googlesource.com/chromium/blink/+/c373ee914ffabeaf833939129538251d8f2f4eca
2264         http://crbug.com/98763004
2265         https://chromium.googlesource.com/chromium/blink/+/4ddb4d57948228fa05e49e06bd58a1179c09f212
2266         http://crbug.com/118263002
2267  
2268         * html/track/VTTCue.cpp:
2269         (WebCore::scanPercentage):
2270         (WebCore::VTTCue::setCueSettings):
2271         * html/track/WebVTTParser.cpp:
2272         (WebCore::WebVTTTreeBuilder::buildFromString):
2273         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
2274         * html/track/WebVTTToken.h:
2275         (WebCore::WebVTTToken::WebVTTToken):
2276         (WebCore::WebVTTToken::StringToken):
2277         (WebCore::WebVTTToken::StartTag):
2278         (WebCore::WebVTTToken::EndTag):
2279         (WebCore::WebVTTToken::TimestampTag):
2280         (WebCore::WebVTTToken::type):
2281         (WebCore::WebVTTToken::name):
2282         (WebCore::WebVTTToken::characters):
2283         (WebCore::WebVTTToken::classes):
2284         (WebCore::WebVTTToken::annotation):
2285         * html/track/WebVTTTokenizer.cpp:
2286         (WebCore::addNewClass):
2287         (WebCore::emitToken):
2288         (WebCore::advanceAndEmitToken):
2289         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
2290         (WebCore::WebVTTTokenizer::nextToken):
2291         * html/track/WebVTTTokenizer.h:
2292         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
2293
2294 2014-03-21  Frédéric Wang  <fred.wang@free.fr>
2295
2296         Bug 130345 - Refine childShouldCreateRenderer for MathML elements
2297         https://bugs.webkit.org/show_bug.cgi?id=130345
2298
2299         Reviewed by Chris Fleizach.
2300
2301         This is a follow-up of bug 124128. We add more restrictions on foreign
2302         content of MathML elements.
2303
2304         Tests: mathml/presentation/annotation-children.html
2305                mathml/presentation/foreign-element-in-token.html
2306
2307         * mathml/MathMLElement.cpp:
2308         (WebCore::MathMLElement::isPresentationMathML): fix line wrapping
2309         (WebCore::MathMLElement::isPhrasingContent):
2310         - move the function from MathMLSelectElement.cpp
2311         - add the constraint "is descendant of a map element" for area.
2312         (WebCore::MathMLElement::isFlowContent): new function to test flow content.
2313         (WebCore::MathMLElement::childShouldCreateRenderer):
2314         - remove annotation since it is now tested in MathMLTextElement
2315         - refine testing of annotation-xml
2316         - do not create renderer for text content in MathML. Such content is only allowed inside token elements.
2317         * mathml/MathMLElement.h: Declare isPhrasingContent and isFlowContent.
2318         * mathml/MathMLSelectElement.cpp: Add new function to test MathML/SVG/HTML encodings.
2319         (WebCore::MathMLSelectElement::isMathMLEncoding):
2320         (WebCore::MathMLSelectElement::isSVGEncoding):
2321         (WebCore::MathMLSelectElement::isHTMLEncoding):
2322         (WebCore::MathMLSelectElement::getSelectedSemanticsChild): use the new functions.
2323         * mathml/MathMLSelectElement.h: Declare the new public functions.
2324         * mathml/MathMLTextElement.cpp: remove the isPhrasingContent function.
2325         (WebCore::MathMLTextElement::childShouldCreateRenderer): Just in case, use the generic StyledElement::childShouldCreateRenderer.
2326
2327 2014-03-21  Darin Adler  <darin@apple.com>
2328
2329         Stop using deprecatedCharacters in WebCore/platform/win
2330         https://bugs.webkit.org/show_bug.cgi?id=130515
2331
2332         Reviewed by Brent Fulgham.
2333
2334         * platform/graphics/TextRun.h:
2335         (WebCore::TextRun::TextRun): Add a constructor that takes a StringView.
2336         Later, we might want to exclusively use the StringView version and remove
2337         some of the others.
2338         (WebCore::TextRun::setText): Add a version of this function that takes a StringView.
2339
2340         * platform/graphics/win/FontCacheWin.cpp:
2341         (WebCore::FontCache::systemFallbackForCharacters): Use StringView::getCharactersWithUpconvert.
2342         (WebCore::createGDIFont): Ditto.
2343         (WebCore::FontCache::getTraitsInFamily): Ditto.
2344         * platform/win/BString.cpp:
2345         (WebCore::BString::BString): Use StringView::upconvertedCharacters.
2346         * platform/win/ClipboardUtilitiesWin.cpp:
2347         (WebCore::createGlobalData): Use StringView::getCharactersWithUpconvert.
2348         * platform/win/FileSystemWin.cpp:
2349         (WebCore::pathByAppendingComponent): Use StringBuilder and StringView::getCharactersWithUpconvert.
2350         (WebCore::fileSystemRepresentation): Use StringView::upconvertedCharacters.
2351         * platform/win/PasteboardWin.cpp:
2352         (WebCore::filesystemPathFromUrlOrTitle): Use StringView::getCharactersWithUpconvert.
2353         (WebCore::Pasteboard::writeURLToDataObject): Ditto.
2354         (WebCore::createGlobalImageFileDescriptor): Ditto.
2355
2356         * platform/win/PopupMenuWin.cpp:
2357         (WebCore::PopupMenuWin::calculatePositionAndSize): Use the new TextRun constructor.
2358         * platform/win/WebCoreTextRenderer.cpp:
2359         (WebCore::doDrawTextAtPoint): Ditto.
2360
2361 2014-03-21  Zalan Bujtas  <zalan@apple.com>
2362
2363         Subpixel rendering: RenderBox is positioned off by one when non-compositing transform is present.
2364         https://bugs.webkit.org/show_bug.cgi?id=130430
2365
2366         Reviewed by Simon Fraser.
2367
2368         div {
2369             position: absolute;
2370              top: 10.25px;
2371              left: 10.25px;
2372          }
2373
2374          The <div> with (10.25px, 10.25px) is painted to (10.5px, 10.5px) after device pixel snapping on 2x display.
2375          Moving <div> to its own RenderLayer should not change the painting position.
2376
2377          div {
2378              position: absolute;
2379              top: 10.25px;
2380              left: 10.25px;
2381              -webkit-transform: rotate(0deg);
2382          }
2383
2384         When we paint the RenderLayer's content, the graphics context is translated by the rounded value of
2385         renderer's offset from parent.
2386
2387             (10.25px,10.25px) -> rounded to (10.5px,10.5px).
2388
2389         When the translate moves the graphics context's origin over the renderer's top-left position,
2390         the renderer's relative top-left coordinates end up being negative.
2391
2392             Graphics context translated by (10.5px,10.5px) -> pushes renderer's relative top-left coords to (-0.25px,-0.25px)
2393
2394         When we round (pixel snap) these negative coordinates, half-way values get translated to the wrong direction.
2395
2396         (relative coords (-0.25px,-0.25px) -> pixel snapped to (-0.5px,-0.5px) -> final absolute(painting) coords (10px,10px))
2397
2398         This patch changes the rounding to flooring to ensure that the relative top-left position never gets negative as the result
2399         of subpixel shifting.
2400
2401         Tests: compositing/hidpi-box-positioned-off-by-one-when-non-compositing-transform-is-present.html
2402                fast/layers/hidpi-box-positioned-off-by-one-when-transform-is-present.html
2403
2404         * css/CSSComputedStyleDeclaration.cpp:
2405         (WebCore::computedTransform):
2406         * rendering/RenderLayer.cpp:
2407         (WebCore::RenderLayer::updateTransform):
2408         (WebCore::RenderLayer::currentTransform):
2409         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2410         * rendering/RenderLayerBacking.cpp:
2411         (WebCore::RenderLayerBacking::updateTransform):
2412         * rendering/style/RenderStyle.cpp:
2413         * rendering/style/RenderStyle.h:
2414         * svg/SVGTextElement.cpp:
2415         (WebCore::SVGTextElement::animatedLocalTransform):
2416
2417 2014-03-21  Pratik Solanki  <psolanki@apple.com>
2418
2419         Unreviewed. iOS build fix after r166046.
2420
2421         * WebCore.exp.in:
2422
2423 2014-03-21  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2424
2425         Fix the !ENABLE(FILTERS) build
2426         https://bugs.webkit.org/show_bug.cgi?id=130394
2427
2428         Reviewed by Gyuyoung Kim.
2429
2430         Add missing includes in rendering to fix compile errors, and include JSC headers to ImageBuffer.h to fix linker errors.
2431
2432         * platform/graphics/ImageBuffer.h:
2433         * rendering/svg/RenderSVGImage.cpp:
2434         * rendering/svg/RenderSVGRoot.cpp:
2435
2436 2014-03-21  Commit Queue  <commit-queue@webkit.org>
2437
2438         Unreviewed, rolling out r166052.
2439         https://bugs.webkit.org/show_bug.cgi?id=130571
2440
2441         It broke EFL build (Requested by KaL on #webkit).
2442
2443         Reverted changeset:
2444
2445         "[GTK] Use GMainLoopSource for idle and timeout sources in
2446         WebCore"
2447         https://bugs.webkit.org/show_bug.cgi?id=130078
2448         http://trac.webkit.org/changeset/166052
2449
2450 2014-03-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2451
2452         Add *explicit* keyword to avoid implicit type conversion
2453         https://bugs.webkit.org/show_bug.cgi?id=130568
2454
2455         Reviewed by Antti Koivisto.
2456
2457         Constructors of RemoteFontFaceSource, SVGDocumentExtensions, XMLDocumentParserScope,
2458         and WorkerScriptDebugServer need to use *explicit* keyword because they have an argument.
2459         Besides removed a meaningless argument name.
2460
2461         * svg/SVGDocumentExtensions.h:
2462         * xml/parser/XMLDocumentParserScope.h:
2463
2464 2014-03-20  Sergio Villar Senin  <svillar@igalia.com>
2465
2466         Modules: replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
2467         https://bugs.webkit.org/show_bug.cgi?id=130407
2468
2469         Reviewed by Darin Adler.
2470
2471         * Modules/encryptedmedia/CDM.cpp:
2472         (WebCore::installedCDMFactories):
2473         * Modules/mediasource/MediaSourceRegistry.cpp:
2474         (WebCore::MediaSourceRegistry::registry):
2475         * Modules/mediasource/MediaSourceRegistry.h:
2476         * Modules/mediastream/MediaStreamRegistry.cpp:
2477         (WebCore::MediaStreamRegistry::registry):
2478
2479 2014-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2480
2481         [GTK] Use GMainLoopSource for idle and timeout sources in WebCore
2482         https://bugs.webkit.org/show_bug.cgi?id=130078
2483
2484         Reviewed by Philippe Normand.
2485
2486         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2487         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2488         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2489         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2490         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2491         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2492         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2493         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2494         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2495         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2496         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
2497         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2498         * platform/gtk/GtkDragAndDropHelper.cpp:
2499         * platform/gtk/SharedTimerGtk.cpp:
2500
2501 2014-03-21  Andreas Kling  <akling@apple.com>
2502
2503         HTMLFrameOwnerElement should obey the SubframeLoadingDisabler when creating subframes
2504         <rdar://problem/15675780>
2505
2506         Merge Blink r156744 by Adam Klein.
2507
2508         Test: fast/frames/set-iframe-src-in-pagehide-crash.html
2509
2510         * loader/SubframeLoader.cpp:
2511         (WebCore::SubframeLoader::loadSubframe):
2512
2513 2014-03-21  Darin Adler  <darin@apple.com>
2514
2515         Improve idiom used for string building in a few places
2516         https://bugs.webkit.org/show_bug.cgi?id=130561
2517
2518         Reviewed by Andreas Kling.
2519
2520         * Modules/indexeddb/IDBKeyData.cpp:
2521         (WebCore::IDBKeyData::loggingString): Use a StringBuilder, and get rid of
2522         an an unnecessary additional string allocation.
2523
2524         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2525         (WebCore::ThreadableWebSocketChannel::create): Use StringBuilder.
2526
2527         * html/FTPDirectoryDocument.cpp:
2528         (WebCore::FTPDirectoryDocumentParser::createTDForFilename): Do a more efficient
2529         string concatenation.
2530         * html/ValidationMessage.cpp:
2531         (WebCore::ValidationMessage::updateValidationMessage): Ditto.
2532
2533         * inspector/InspectorApplicationCacheAgent.cpp:
2534         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
2535         Use a StringBuilder.
2536
2537         * inspector/InspectorStyleSheet.cpp: 
2538         (WebCore::InspectorStyle::shorthandValue): Use a StringBuilder.
2539
2540         * inspector/InspectorStyleTextEditor.cpp:
2541         (WebCore::InspectorStyleTextEditor::insertProperty): Use a more efficient idiom
2542         for string concatenation.
2543         (WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.
2544         * loader/FormSubmission.cpp:
2545         (WebCore::appendMailtoPostFormDataToURL): Ditto.
2546
2547         * page/Frame.cpp:
2548         (WebCore::createRegExpForLabels): Use a StringBuilder.
2549
2550         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2551         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Use a more efficient
2552         idiom for string concatenation.
2553
2554         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2555         (WebCore::GraphicsContext3D::getUnmangledInfoLog): Use a StringBuilder.
2556
2557         * platform/network/MIMEHeader.cpp:
2558         (WebCore::MIMEHeader::parseHeader): Use a more efficient idiom for string
2559         concatenation.
2560         * platform/network/ResourceResponseBase.cpp:
2561         (WebCore::ResourceResponseBase::addHTTPHeaderField): Ditto.
2562         * rendering/RenderLayerCompositor.cpp:
2563         (WebCore::RenderLayerCompositor::layerTreeAsText): Ditto.
2564
2565         * rendering/RenderText.cpp:
2566         (WebCore::RenderText::secureText): Create a new string with the substring
2567         function rather than with the append function.
2568
2569         * xml/XMLHttpRequest.cpp:
2570         (WebCore::XMLHttpRequest::setRequestHeaderInternal): Use a more efficient idiom
2571         for string concatenation.
2572
2573 2014-03-21  Darin Adler  <darin@apple.com>
2574
2575         Add a combined decodeAndFlush to TextResourceDecoder
2576         https://bugs.webkit.org/show_bug.cgi?id=130560
2577
2578         Reviewed by Andreas Kling.
2579
2580         * WebCore.exp.in: Added new symbol for decodeAndFlush. Also re-did
2581         the geometry types #if so it would sort more logically.
2582
2583         * fileapi/FileReaderLoader.cpp:
2584         (WebCore::FileReaderLoader::convertToText): Use decodeAndFlush.
2585         * inspector/InspectorPageAgent.cpp:
2586         (WebCore::InspectorPageAgent::cachedResourceContent): Ditto.
2587         * inspector/NetworkResourcesData.cpp:
2588         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): Ditto.
2589
2590         * loader/TextResourceDecoder.cpp:
2591         (WebCore::TextResourceDecoder::decodeAndFlush): Added.
2592         * loader/TextResourceDecoder.h: Ditto.
2593
2594         * loader/appcache/ManifestParser.cpp:
2595         (WebCore::parseManifest): Use decodeAndFlush.
2596         * loader/cache/CachedCSSStyleSheet.cpp:
2597         (WebCore::CachedCSSStyleSheet::sheetText): Ditto.
2598         (WebCore::CachedCSSStyleSheet::finishLoading): Ditto.
2599
2600         * loader/cache/CachedFont.cpp:
2601         (WebCore::CachedFont::ensureSVGFontData): Use decodeAndFlush. Also use nullptr.
2602         (WebCore::CachedFont::getSVGFontById): Use descendantsOfType<SVGFontElement>
2603         instead of using a NodeList. Much more efficient!
2604
2605         * loader/cache/CachedSVGDocument.cpp:
2606         (WebCore::CachedSVGDocument::finishLoading): Use decodeAndFlush.
2607         * loader/cache/CachedScript.cpp:
2608         (WebCore::CachedScript::script): Ditto.
2609         * loader/cache/CachedXSLStyleSheet.cpp:
2610         (WebCore::CachedXSLStyleSheet::finishLoading): Ditto.
2611         * page/Page.cpp:
2612         (WebCore::Page::userStyleSheet): Ditto.
2613
2614 2014-03-20  Darin Adler  <darin@apple.com>
2615
2616         Remove a couple of unused functions from CSSOMUtils
2617         https://bugs.webkit.org/show_bug.cgi?id=130558
2618
2619         Reviewed by Andreas Kling.
2620
2621         * css/CSSOMUtils.cpp: Remove String overloads. Callers all use the StringBuilder
2622         ones, which is good since that is a more efficient idiom.
2623         * css/CSSOMUtils.h: Ditto.
2624
2625 2014-03-20  Pratik Solanki  <psolanki@apple.com>
2626
2627         Unreviewed. iOS build fix after r166017, r166032.
2628
2629         * platform/ScrollView.cpp:
2630         (WebCore::ScrollView::visibleContentRectInternal):
2631
2632 2014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
2633
2634         Move to using std::unique_ptr for EFL objects.
2635         https://bugs.webkit.org/show_bug.cgi?id=129853
2636
2637         Reviewed by Gyuyoung Kim.
2638
2639         EflUniquePtr is a template alias of std::unique_ptr
2640         with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
2641         This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
2642
2643         No new tests. No new functionality.
2644
2645         * platform/efl/EflScreenUtilities.h:
2646         * platform/efl/RenderThemeEfl.cpp:
2647         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
2648         (WebCore::RenderThemeEfl::loadTheme):
2649         * platform/efl/RenderThemeEfl.h:
2650         * platform/graphics/Icon.h:
2651         * platform/graphics/efl/EvasGLContext.h:
2652         (WebCore::EvasGLContext::create):
2653         * platform/graphics/efl/EvasGLSurface.h:
2654         (WebCore::EvasGLSurface::create):
2655
2656 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2657
2658         [EFL][GTK] Get CMake to find Freetype2 properly
2659         https://bugs.webkit.org/show_bug.cgi?id=130150
2660
2661         Reviewed by Martin Robinson.
2662
2663         Newer versions of CMake are not able to find Freetype2 correctly.
2664         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
2665         freetype2 repo, because a completely different version number is found in freetype2.pc.
2666
2667         * PlatformEfl.cmake:
2668         * PlatformGTK.cmake:
2669
2670 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
2671
2672         [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
2673         https://bugs.webkit.org/show_bug.cgi?id=130517
2674
2675         Reviewed by Sergio Villar Senin.
2676
2677         * plugins/gtk/gtk2xtbin.c: Use GCC suppression to suppress errors about deprecations.
2678
2679 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
2680
2681         Cleanup in aisle r166017.
2682         
2683         visibleContentRectInternal() was dropping the scrollbar
2684         inclusiveness on the floor, and we need to reset the top inset
2685         between tests.
2686
2687         * platform/ScrollView.cpp:
2688         (WebCore::ScrollView::visibleContentRectInternal):
2689         * testing/Internals.cpp:
2690         (WebCore::Internals::resetToConsistentState):
2691
2692 2014-03-20  Enrica Casucci  <enrica@apple.com>
2693
2694         Build fix.
2695
2696         Removing unused variable.
2697         
2698         * page/FrameView.cpp:
2699         (WebCore::FrameView::didPaintContents):
2700
2701 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
2702
2703         Rename TextTrackRegion/TextTrackRegionList to VTTRegion/VTTRegionList
2704         https://bugs.webkit.org/show_bug.cgi?id=130543
2705
2706         Reviewed by Dean Jackson.
2707
2708         Merged from Blink (patch by philipj@opera.com):
2709         https://chromium.googlesource.com/chromium/blink/+/69ee6d3399d64163e4936ac1bde222036c54c4b8
2710         http://crbug.com/55653003
2711
2712         Tests: media/track/regions-webvtt/vtt-region-constructor.html
2713                media/track/regions-webvtt/vtt-region-display.html
2714                media/track/regions-webvtt/vtt-region-dom-layout.html
2715                media/track/regions-webvtt/vtt-region-list.html
2716                media/track/regions-webvtt/vtt-region-parser.html
2717
2718         * Configurations/FeatureDefines.xcconfig:
2719         * DerivedSources.make:
2720         * WebCore.xcodeproj/project.pbxproj:
2721         * html/shadow/MediaControlElements.cpp:
2722         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2723         * html/track/LoadableTextTrack.cpp:
2724         (WebCore::LoadableTextTrack::newRegionsAvailable):
2725         * html/track/TextTrack.cpp:
2726         (WebCore::TextTrack::ensureVTTRegionList):
2727         (WebCore::TextTrack::regions):
2728         (WebCore::TextTrack::addRegion):
2729         (WebCore::TextTrack::removeRegion):
2730         * html/track/TextTrack.h:
2731         * html/track/TextTrack.idl:
2732         * html/track/TextTrackCue.cpp:
2733         * html/track/TextTrackRegion.cpp: Removed.
2734         * html/track/TextTrackRegion.h: Removed.
2735         * html/track/TextTrackRegion.idl: Removed.
2736         * html/track/TextTrackRegionList.cpp: Removed.
2737         * html/track/TextTrackRegionList.h: Removed.
2738         * html/track/TextTrackRegionList.idl: Removed.
2739         * html/track/VTTCue.cpp:
2740         (WebCore::VTTCue::removeDisplayTree):
2741         * html/track/VTTRegion.cpp: Copied from Source/WebCore/html/track/TextTrackRegion.cpp.
2742         (WebCore::VTTRegion::VTTRegion):
2743         (WebCore::VTTRegion::~VTTRegion):
2744         (WebCore::VTTRegion::setTrack):
2745         (WebCore::VTTRegion::setId):
2746         (WebCore::VTTRegion::setWidth):
2747         (WebCore::VTTRegion::setHeight):
2748         (WebCore::VTTRegion::setRegionAnchorX):
2749         (WebCore::VTTRegion::setRegionAnchorY):
2750         (WebCore::VTTRegion::setViewportAnchorX):
2751         (WebCore::VTTRegion::setViewportAnchorY):
2752         (WebCore::VTTRegion::scroll):
2753         (WebCore::VTTRegion::setScroll):
2754         (WebCore::VTTRegion::updateParametersFromRegion):
2755         (WebCore::VTTRegion::setRegionSettings):
2756         (WebCore::VTTRegion::getSettingFromString):
2757         (WebCore::VTTRegion::parseSettingValue):
2758         (WebCore::VTTRegion::parseSetting):
2759         (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
2760         (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
2761         (WebCore::VTTRegion::textTrackRegionShadowPseudoId):
2762         (WebCore::VTTRegion::appendTextTrackCueBox):
2763         (WebCore::VTTRegion::displayLastTextTrackCueBox):
2764         (WebCore::VTTRegion::willRemoveTextTrackCueBox):
2765         (WebCore::VTTRegion::getDisplayTree):
2766         (WebCore::VTTRegion::prepareRegionDisplayTree):
2767         (WebCore::VTTRegion::startTimer):
2768         (WebCore::VTTRegion::stopTimer):
2769         (WebCore::VTTRegion::scrollTimerFired):
2770         * html/track/VTTRegion.h: Copied from Source/WebCore/html/track/TextTrackRegion.h.
2771         (WebCore::VTTRegion::create):
2772         * html/track/VTTRegion.idl: Copied from Source/WebCore/html/track/TextTrackRegion.idl.
2773         * html/track/VTTRegionList.cpp: Copied from Source/WebCore/html/track/TextTrackRegionList.cpp.
2774         (WebCore::VTTRegionList::VTTRegionList):
2775         (WebCore::VTTRegionList::length):
2776         (WebCore::VTTRegionList::item):
2777         (WebCore::VTTRegionList::getRegionById):
2778         (WebCore::VTTRegionList::add):
2779         (WebCore::VTTRegionList::remove):
2780         (WebCore::VTTRegionList::clear):
2781         * html/track/VTTRegionList.h: Copied from Source/WebCore/html/track/TextTrackRegionList.h.
2782         (WebCore::VTTRegionList::create):
2783         (WebCore::VTTRegionList::~VTTRegionList):
2784         * html/track/VTTRegionList.idl: Copied from Source/WebCore/html/track/TextTrackRegionList.idl.
2785         * html/track/WebVTTParser.cpp:
2786         (WebCore::WebVTTParser::parseFloatPercentageValue):
2787         (WebCore::WebVTTParser::getNewRegions):
2788         (WebCore::WebVTTParser::createNewRegion):
2789         * html/track/WebVTTParser.h:
2790         * loader/TextTrackLoader.cpp:
2791         (WebCore::TextTrackLoader::getNewRegions):
2792         * loader/TextTrackLoader.h:
2793
2794 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
2795
2796         Fix the iOS build.
2797
2798         * page/FrameView.cpp:
2799         (WebCore::FrameView::willPaintContents):
2800         (WebCore::FrameView::didPaintContents):
2801
2802 2014-03-20  Hans Muller  <hmuller@adobe.com>
2803
2804         [CSS Shapes] clamp RasterShape shapeMargin to reference box size
2805         https://bugs.webkit.org/show_bug.cgi?id=130350
2806
2807         Reviewed by Dean Jackson.
2808
2809         Corrected the way the maximum shape-margin value was computed for image valued
2810         shapes. The limiting case is an image with just one above threshold pixel. The
2811         largest possible value for shapeMargin is the radius of a circle that encloses
2812         the size of the shape-outside element's margin-box, since the shape-outside's
2813         boundary is clipped to the margin-box. The radius is just sqrt(2) * the margin-box's
2814         largest dimension.
2815
2816         Also cleaned up up a few poorly named parameters.
2817
2818         Test: fast/shapes/shape-outside-floats/shape-outside-one-pixel.html
2819
2820         * rendering/shapes/RasterShape.cpp:
2821         (WebCore::RasterShape::marginIntervals):
2822         * rendering/shapes/RasterShape.h:
2823         (WebCore::RasterShape::RasterShape):
2824         * rendering/shapes/Shape.h:
2825
2826 2014-03-20  Beth Dakin  <bdakin@apple.com>
2827
2828         Build fix.
2829
2830         * page/FrameView.cpp:
2831         (WebCore::FrameView::paintContents):
2832
2833 2014-03-20  Beth Dakin  <bdakin@apple.com>
2834
2835         Implement contentInset for Mac WebKit2
2836         https://bugs.webkit.org/show_bug.cgi?id=130273
2837
2838         Reviewed by Simon Fraser.
2839
2840         This patch adds support for topContentInset(). If a page has a topContentInset(), 
2841         the root layer’s position is adjusted to account for the inset. It is assumed that 
2842         the area accounted for by the inset is visible but obscured, so scrollbars need to 
2843         be moved so that they only cover the non-obscured area, and most parts of WebCore 
2844         that wonder about visibleContentSize only care about the unobscured area, so this 
2845         patch makes that visibleContentRect return the unobscuredRect. Finally since this 
2846         is achieved by moving a layer’s position, the topContentInset() also needs to be 
2847         factored into various functions that are used to convert between coordinate 
2848         spaces. 
2849
2850         Return Page::topContentInset() if this is the main frame.
2851         * page/FrameView.cpp:
2852         (WebCore::FrameView::topContentInset):
2853         * page/FrameView.h:
2854
2855         Cache the inset on Page.
2856         * page/Page.cpp:
2857         (WebCore::Page::Page):
2858         * page/Page.h:
2859         (WebCore::Page::topContentInset):
2860         (WebCore::Page::setTopContentInset):
2861
2862         unobscuredContentRect() used to unconditionally return visibleContentRect() on 
2863         non-iOS platforms. Now that it is possible for some technically visible content to 
2864         be obscured, this code needed to be re-worked a bit to make some more sense. 
2865         visibleContentRect() now represents that visible content that is completely 
2866         unobscured, so it should call into unobscuredContentRect() rather than the other 
2867         way around.
2868         * platform/ScrollView.cpp:
2869         (WebCore::ScrollView::unobscuredContentRect):
2870
2871         unscaledTotalVisibleContentSize() includes the size of all content that might be 
2872         visible. Some of this content might be obscured.
2873         (WebCore::ScrollView::unscaledTotalVisibleContentSize):
2874
2875         Most of the time, we only care about the content that is FULLY visible. That is 
2876         what you get from unscaledUnobscuredVisibleContentSize().
2877         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
2878
2879         Use the unobscured size for these computations.
2880         (WebCore::ScrollView::visibleContentRectInternal):
2881         (WebCore::ScrollView::layoutSize):
2882
2883         Factor in the topContentInset().
2884         (WebCore::ScrollView::scrollOffsetRelativeToDocument):
2885         (WebCore::ScrollView::scrollPositionRelativeToDocument):
2886
2887         The scrollbars should be positioned to cover the non-obscured content only. 
2888         (WebCore::ScrollView::updateScrollbars):
2889
2890         Again, factor the topContentInset() into these conversions since the root layer’s 
2891         position has been adjusted to account for it.
2892         (WebCore::ScrollView::contentsToRootView):
2893         (WebCore::ScrollView::contentsToWindow):
2894
2895          Just like the scrollbars, the scroll corner must be moved the account for the 
2896         inset.
2897         (WebCore::ScrollView::scrollCornerRect):
2898         * platform/ScrollView.h:
2899         (WebCore::ScrollView::topContentInset):
2900
2901         RenderLayerCompositor cares about unscaledTotalVisibleContentSize(). It does not 
2902         care if some of that content is obscured.
2903         * rendering/RenderLayerCompositor.cpp:
2904         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2905
2906         Move the root layer’s position based on the contentInset.
2907         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2908         (WebCore::RenderLayerCompositor::ensureRootLayer):
2909
2910         Allow setting contentInset via Internals for testing purposes.
2911         * testing/Internals.cpp:
2912         (WebCore::Internals::setTopContentInset):
2913         * testing/Internals.h:
2914         * testing/Internals.idl:
2915
2916 2014-03-20  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2917
2918         Optimize RenderTable::colToEffCol() for tables without colspans
2919         https://bugs.webkit.org/show_bug.cgi?id=129298
2920
2921         Reviewed by Simon Fraser.
2922
2923         Create an alternative fast path to RenderTable colToEffCol() and effColToCol()
2924         when there is no colspan or colspan does not exceed the width of table.
2925         Blink merge https://codereview.chromium.org/154243002 by rhogan
2926
2927         * rendering/RenderTable.cpp:
2928         (WebCore::RenderTable::RenderTable):
2929         (WebCore::RenderTable::appendColumn):
2930         (WebCore::RenderTable::recalcSections):
2931         * rendering/RenderTable.h:
2932         (WebCore::RenderTable::colToEffCol):
2933         (WebCore::RenderTable::effColToCol):
2934         (WebCore::RenderTable::hasCellColspanThatDeterminesTableWidth):
2935
2936 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
2937
2938         FrameView::paintContents() is not called for composited content
2939         https://bugs.webkit.org/show_bug.cgi?id=130541
2940
2941         Reviewed by Beth Dakin.
2942
2943         FrameView::paintContents() is not called for frames that have
2944         composited contents, yet it contains code that is expected
2945         to run for all Frames.
2946         
2947         Fix by factoring into will/didPaintContents(), and calling
2948         the will/did functions from RenderLayerBacking::paintIntoLayer().
2949         
2950         Also add a SetLayoutNeededForbiddenScope check for composited-layer
2951         painting.
2952
2953         * page/FrameView.cpp:
2954         (WebCore::FrameView::updateControlTints):
2955         (WebCore::FrameView::willPaintContents):
2956         (WebCore::FrameView::didPaintContents):
2957         (WebCore::FrameView::paintContents):
2958         * page/FrameView.h:
2959         * rendering/RenderLayerBacking.cpp:
2960         (WebCore::RenderLayerBacking::paintIntoLayer):
2961
2962 2014-03-20  Tim Horton  <timothy_horton@apple.com>
2963
2964         Fix the Mountain Lion build.
2965
2966         * platform/graphics/cocoa/IOSurface.mm:
2967         (IOSurface::setIsPurgeable):
2968
2969 2014-03-20  Brian Burg  <bburg@apple.com>
2970
2971         Web Replay: capture and replay mouse events
2972         https://bugs.webkit.org/show_bug.cgi?id=129395
2973
2974         Reviewed by Joseph Pecoraro.
2975
2976         Add support for capturing and replaying mouse inputs that come from WebKit2.
2977         Hook up the UserInputBridge to session state changes in the ReplayController so
2978         that the bridge knows when to capture or deny mouse inputs.
2979
2980         Test: ManualTests/inspector/replay-mouse-events.html
2981
2982         * platform/PlatformEvent.h: Give explicit storage types to Modifiers and Type enums
2983         so they can be forward-declared.
2984         * platform/PlatformMouseEvent.h: Give an explicit storage type to enum MouseButton.
2985         Add operator== and operator!= for MouseButton to work around an MSVC bug.
2986
2987         * replay/ReplayController.cpp: Perform session state changes in a helper function, and
2988         at the same time change the state of the page's user input bridge.
2989         (WebCore::ReplayController::setSessionState):
2990         (WebCore::ReplayController::startCapturing):
2991         (WebCore::ReplayController::stopCapturing):
2992         (WebCore::ReplayController::startPlayback):
2993         (WebCore::ReplayController::cancelPlayback):
2994
2995         * replay/ReplayInputDispatchMethods.cpp: Add dispatch methods for new inputs.
2996         (WebCore::HandleMouseMove::dispatch):
2997         (WebCore::HandleMousePress::dispatch):
2998         (WebCore::HandleMouseRelease::dispatch):
2999
3000         * replay/SerializationMethods.cpp: Add helper macros so that encode/decode methods look
3001         symmetric with one data member per line. This helps reduce unintentional inconsistencies.
3002         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Added.
3003         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue): Added.
3004         * replay/SerializationMethods.h:
3005
3006         * replay/UserInputBridge.cpp: Fill in the bridge method implementations for mouse
3007         events, adding helpers and macros as necessary to reduce boilerplate.
3008         (WebCore::UserInputBridge::activeCursor): Added.
3009         (WebCore::UserInputBridge::handleMousePressEvent):
3010         (WebCore::UserInputBridge::handleMouseReleaseEvent):
3011         (WebCore::UserInputBridge::handleMouseMoveEvent):
3012         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
3013
3014         * replay/UserInputBridge.h: Add a bridge state enum along with getters and setters.
3015         The enum value controls whether the bridge should capture commands, deny non-synthetic
3016         commands (from the user), or allow anything to pass (the default).
3017         (WebCore::UserInputBridge::setState): Added.
3018         (WebCore::UserInputBridge::state): Added.
3019
3020         * replay/WebInputs.json: Add inputs HandleMouseMove, HandleMousePress, HandleMouseRelease.
3021         Add enum definitions for PlatformEvent::Type, PlatformEvent::Modifiers, and PlatformMouseEvent::MouseButton.
3022         Alphabetize the existing data type definitions.
3023
3024 2014-03-20  Tim Horton  <timothy_horton@apple.com>
3025
3026         Add WebCore::IOSurface wrapper
3027         https://bugs.webkit.org/show_bug.cgi?id=130529
3028
3029         Reviewed by Simon Fraser.
3030
3031         * WebCore.exp.in:
3032         * WebCore.xcodeproj/project.pbxproj:
3033         * platform/graphics/cg/ColorCG.cpp:
3034         * platform/graphics/cg/GraphicsContextCG.h:
3035         (WebCore::cachedCGColorSpace):
3036         Move cachedCGColorSpace out so that other clients of GraphicsContextCG
3037         can use its mapping from WebCore::ColorSpace -> CGColorSpaceRef.
3038
3039         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
3040         * platform/graphics/cg/ImageBufferCG.cpp:
3041         Add FIXMEs for ImageBuffer to adopt WebCore::IOSurface.
3042
3043         * platform/graphics/cocoa/IOSurface.h: Added.
3044         * platform/graphics/cocoa/IOSurface.mm: Added.
3045         (IOSurface::create):
3046         (IOSurface::createFromMachPort):
3047         (IOSurface::createFromSurface):
3048         (IOSurface::IOSurface):
3049         (IOSurface::maximumSize):
3050         (IOSurface::createMachPort):
3051         (IOSurface::createImage):
3052         (IOSurface::ensurePlatformContext):
3053         (IOSurface::ensureGraphicsContext):
3054         (IOSurface::state):
3055         (IOSurface::isPurgeable):
3056         (IOSurface::setIsPurgeable):
3057         (IOSurface::inUse):
3058         Add WebCore::IOSurface.
3059
3060 2014-03-20  Pratik Solanki  <psolanki@apple.com>
3061
3062         iOS build fix after r165992.
3063
3064         * generate-export-file:
3065         (preprocessorMacros):
3066
3067 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3068
3069         [WebRTC] Moving RTCConfiguration and RTCIceServer to Modules/mediastream
3070         https://bugs.webkit.org/show_bug.cgi?id=130434
3071
3072         Reviewed by Eric Carlson.
3073
3074         Those classes are defined in WebRTC spec, so they should not be in platform layer.
3075         Adding a platform implementation to be passed to handler classes.
3076
3077         * Modules/mediastream/RTCConfiguration.h: Copied from Source/WebCore/platform/mediastream/RTCConfiguration.h.
3078         * Modules/mediastream/RTCIceServer.h: Copied from Source/WebCore/platform/mediastream/RTCIceServer.h.
3079         * Modules/mediastream/RTCPeerConnection.cpp:
3080         (WebCore::RTCPeerConnection::RTCPeerConnection):
3081         (WebCore::RTCPeerConnection::updateIce):
3082         * WebCore.xcodeproj/project.pbxproj:
3083         * platform/mediastream/RTCConfigurationPrivate.h: Added.
3084         * platform/mediastream/RTCIceServerPrivate.h: Added.
3085         * platform/mediastream/RTCPeerConnectionHandler.h:
3086         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
3087         (WebCore::RTCPeerConnectionHandlerMock::initialize):
3088         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
3089         * platform/mock/RTCPeerConnectionHandlerMock.h:
3090
3091 2014-03-20  Alex Christensen  <achristensen@webkit.org>
3092
3093         [WinCairo] Unreviewed speculative build after my r165996.
3094
3095         * platform/network/soup/AuthenticationChallengeSoup.cpp:
3096         * platform/network/soup/CertificateInfo.cpp:
3097         * platform/network/soup/CookieJarSoup.cpp:
3098         * platform/network/soup/ResourceRequestSoup.cpp:
3099         * platform/network/soup/ResourceResponseSoup.cpp:
3100         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
3101
3102 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
3103
3104         Add a flushing mechanism for the WebVTTParser
3105         https://bugs.webkit.org/show_bug.cgi?id=130532
3106
3107         Reviewed by Eric Carlson.
3108
3109         Merged from Blink (patch by vcarbune@chromium.org):
3110         https://chromium.googlesource.com/chromium/blink/+/1ac2b3081492ab8661429230004013a9a3623f0f
3111         http://crbug.com/54203003
3112         https://chromium.googlesource.com/chromium/blink/+/24343d32bc36d20d59ef3e10040faddde65929e6
3113         http://crbug.com/59453002
3114         https://chromium.googlesource.com/chromium/blink/+/ef2793f1d9d207389589ecf9a136ea5c7170b4af
3115         http://crbug.com/75233002
3116         https://chromium.googlesource.com/chromium/blink/+/a29f2f8324abcd4826b41e7dc34373dee2ec57a9
3117         http://crbug.com/52713005
3118         https://chromium.googlesource.com/chromium/blink/+/7ce003c8d47b39f116f1f2a592a5dfb4a9e77228
3119         http://crbug.com/64303004
3120         https://chromium.googlesource.com/chromium/blink/+/18f896b3498478311e880f782813d5dfc8c0c7d1
3121         http://crbug.com/96933004
3122         https://chromium.googlesource.com/chromium/blink/+/8670e8ecb13254a651f5493ec83f4484d18c154e
3123         http://crbug.com/98783005
3124         https://chromium.googlesource.com/chromium/blink/+/4ac55780a6af3d76e0159c1d145330964ad56647
3125         http://crbug.com/104713002
3126
3127         Tests: http/tests/media/track/track-webvtt-slow-loading-2.html
3128                http/tests/media/track/track-webvtt-slow-loading.html
3129
3130         * CMakeLists.txt:
3131         * GNUmakefile.list.am:
3132         * WebCore.vcxproj/WebCore.vcxproj:
3133         * WebCore.vcxproj/WebCore.vcxproj.filters:
3134         * WebCore.xcodeproj/project.pbxproj:
3135         * html/track/BufferedLineReader.cpp: Added.
3136         * html/track/BufferedLineReader.h: Added.
3137         * html/track/TextTrackRegion.cpp:
3138         * html/track/VTTCue.cpp:
3139         * html/track/WebVTTParser.cpp:
3140         * html/track/WebVTTParser.h:
3141         * loader/TextTrackLoader.cpp:
3142
3143 2014-03-20  Alex Christensen  <achristensen@webkit.org>
3144
3145         Preparation for using Soup on Windows.
3146         https://bugs.webkit.org/show_bug.cgi?id=130472
3147
3148         Reviewed by Brent Fulgham.
3149
3150         * WebCore.vcxproj/WebCore.vcxproj:
3151         * WebCore.vcxproj/WebCore.vcxproj.filters:
3152         Added Soup source to build on WinCairo.
3153         * platform/network/curl/CookieJarCurl.cpp:
3154         * platform/network/curl/CredentialStorageCurl.cpp:
3155         * platform/network/curl/CurlCacheEntry.cpp:
3156         * platform/network/curl/CurlCacheManager.cpp:
3157         * platform/network/curl/CurlDownload.cpp:
3158         * platform/network/curl/DNSCurl.cpp:
3159         * platform/network/curl/FormDataStreamCurl.cpp:
3160         * platform/network/curl/MultipartHandle.cpp:
3161         * platform/network/curl/ProxyServerCurl.cpp:
3162         * platform/network/curl/ResourceHandleCurl.cpp:
3163         * platform/network/curl/ResourceHandleManager.cpp:
3164         * platform/network/curl/SSLHandle.cpp:
3165         * platform/network/curl/SocketStreamHandleCurl.cpp:
3166         Protected with USE(CURL) to avoid duplicate symbols when linking.
3167         * platform/network/soup/AuthenticationChallengeSoup.cpp:
3168         * platform/network/soup/CertificateInfo.cpp:
3169         * platform/network/soup/CookieJarSoup.cpp:
3170         * platform/network/soup/CookieStorageSoup.cpp:
3171         * platform/network/soup/CredentialStorageSoup.cpp:
3172         * platform/network/soup/DNSSoup.cpp:
3173         * platform/network/soup/NetworkStorageSessionSoup.cpp:
3174         * platform/network/soup/ProxyResolverSoup.cpp:
3175         * platform/network/soup/ProxyServerSoup.cpp:
3176         * platform/network/soup/ResourceErrorSoup.cpp:
3177         * platform/network/soup/ResourceHandleSoup.cpp:
3178         * platform/network/soup/ResourceRequestSoup.cpp:
3179         * platform/network/soup/ResourceResponseSoup.cpp:
3180         * platform/network/soup/SocketStreamHandleSoup.cpp:
3181         * platform/network/soup/SoupNetworkSession.cpp:
3182         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
3183         Protected with USE(CURL) to avoid duplicate symbols when linking.
3184
3185 2014-03-20  Pratik Solanki  <psolanki@apple.com>
3186
3187         iOS build fix after r165979.
3188
3189         * generate-export-file:
3190         (preprocessorMacros):
3191
3192 2014-03-20  David Hyatt  <hyatt@apple.com>
3193
3194         [New Multicolumn] getClientRects returns wrong rectangle
3195         https://bugs.webkit.org/show_bug.cgi?id=128614
3196
3197         Reviewed by Sam Weinig.
3198
3199         Added fast/multicol/newmulticol/client-rects.html and beefed up existing
3200         fast/multicol/client-rects.html to use more writing modes.
3201
3202         * rendering/LayoutState.h:
3203         Removed unused function.
3204
3205         * rendering/RenderFlowThread.h:
3206         Make mapFlowToRegion virtual so that RenderMultiColumnFlowThread can
3207         override it.
3208
3209         * rendering/RenderMultiColumnFlowThread.cpp:
3210         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
3211         * rendering/RenderMultiColumnFlowThread.h:
3212         Implement mapFlowToRegion to correctly translate a flow thread position
3213         into a column offset within a region.
3214
3215         * rendering/RenderMultiColumnSet.cpp:
3216         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3217         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
3218         * rendering/RenderMultiColumnSet.h:
3219         Refactored some code to make a columnTranslationForOffset helper that
3220         can be used by RenderMultiColumnFlowThread.
3221
3222 2014-03-20  Daniel Bates  <dabates@apple.com>
3223
3224         Preserve original document URL for XSSAuditor reports
3225
3226         Merged from Blink (patch by Tom Sepez):
3227         https://src.chromium.org/viewvc/blink?view=rev&revision=158406
3228
3229         Test: http/tests/security/xssAuditor/report-script-tag-replace-state.html
3230
3231         * html/parser/XSSAuditor.cpp:
3232         (WebCore::XSSAuditor::filterToken):
3233         * html/parser/XSSAuditorDelegate.cpp:
3234         (WebCore::buildConsoleError):
3235         (WebCore::XSSAuditorDelegate::generateViolationReport):
3236         (WebCore::XSSAuditorDelegate::didBlockScript):
3237         * html/parser/XSSAuditorDelegate.h:
3238         (WebCore::XSSInfo::XSSInfo):
3239
3240 2014-03-20  Daniel Bates  <dabates@apple.com>
3241
3242         XSSAuditor bypass with frameset tags
3243
3244         Merged from Blink (patch by Tom Sepez):
3245         https://src.chromium.org/viewvc/blink?view=rev&revision=157794
3246
3247         Test: http/tests/security/xssAuditor/frameset-injection.html
3248
3249         * html/parser/XSSAuditor.cpp:
3250         (WebCore::XSSAuditor::filterStartToken):
3251         (WebCore::XSSAuditor::filterFrameToken):
3252         * html/parser/XSSAuditor.h:
3253
3254 2014-03-20  Brian Burg  <bburg@apple.com>
3255
3256         Web Replay: fix some oversights in the replay backend
3257         https://bugs.webkit.org/show_bug.cgi?id=130435
3258
3259         Reviewed by Andreas Kling.
3260
3261         This functionality will be covered by tests in https://webkit.org/b/130145.
3262
3263         * inspector/InspectorInstrumentation.cpp:
3264         (WebCore::InspectorInstrumentation::playbackFinishedImpl):
3265         * inspector/InspectorInstrumentation.h:
3266         (WebCore::InspectorInstrumentation::playbackFinished):
3267         * inspector/InspectorReplayAgent.cpp:
3268         (WebCore::buildInspectorObjectForSegment):
3269         (WebCore::InspectorReplayAgent::playbackFinished):
3270         * inspector/InspectorReplayAgent.h: Add a playbackFinished event to Inspector
3271         instrumentation. This is fired by ReplayController when playback is cancelled or 
3272         playback of the final segment has completed.
3273
3274         * replay/EventLoopInputDispatcher.cpp:
3275         (WebCore::EventLoopInputDispatcher::dispatchInputSoon): Fix wrong cast.
3276         (WebCore::EventLoopInputDispatcher::dispatchInput): Ensure that m_dispatching is
3277         false when m_running is false.
3278         * replay/EventLoopInputDispatcher.h: Distinguish 'dispaching' and 'running' in comments.
3279         (WebCore::EventLoopInputDispatcher::isRunning): Added.
3280
3281         * replay/FunctorInputCursor.h: Since the base class InputCursor is RefCounted, the
3282         Functor subclass cannot be put into a unique_ptr. Add create() method instead.
3283
3284         * replay/ReplayController.cpp:
3285         (WebCore::ReplayController::loadSegmentAtIndex): Renamed from loadSegment(). Callers
3286         now pass in the desired segment index rather than the segment itself. The index is
3287         necessary to properly reset m_position after the segment is loaded.
3288
3289         (WebCore::ReplayController::startPlayback): Set the dispatcher's speed before run().
3290         (WebCore::ReplayController::pausePlayback): Only pause the dispatcher if it's running.
3291         (WebCore::ReplayController::cancelPlayback): Add playbackFinished instrumentation.
3292         (WebCore::ReplayController::replayToPosition):
3293         (WebCore::ReplayController::didDispatchFinalInput): If there are no more segments to load,
3294         manually adjust the final m_position and defer to cancelPlayback to unload the segment.
3295         * replay/ReplayController.h:
3296         * replay/ReplaySessionSegment.cpp:
3297         (WebCore::ReplaySessionSegment::createFunctorCursor):
3298         * replay/ReplaySessionSegment.h:
3299
3300 2014-03-20  Pratik Solanki  <psolanki@apple.com>
3301
3302         [iOS] Get code to compile on older iOS versions
3303         https://bugs.webkit.org/show_bug.cgi?id=130142
3304         <rdar://problem/16302908>
3305
3306         Reviewed by Darin Adler.
3307
3308         * WebCore.exp.in:
3309         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3310         (-[WebVideoFullscreenController WebCore::]):
3311         (-[WebVideoFullscreenController enterFullscreen:]):
3312         (-[WebVideoFullscreenController exitFullscreen]):
3313         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3314         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3315         * platform/mac/HTMLConverter.mm:
3316         (_dateForString):
3317         * platform/network/cf/CookieJarCFNet.cpp:
3318         (WebCore::copyCookiesForURLWithFirstPartyURL):
3319         * platform/text/ios/LocalizedDateCache.mm:
3320         (WebCore::LocalizedDateCache::calculateMaximumWidth):
3321         * platform/text/mac/LocaleMac.mm:
3322         (WebCore::LocaleMac::LocaleMac):
3323
3324 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
3325
3326         Followup build fix: AnimationBase.h needs to be private because
3327         it's included by AnimationController.h.
3328
3329         * WebCore.xcodeproj/project.pbxproj:
3330
3331 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
3332
3333         A completed fill-forwards animation should not disable overlap testing
3334         https://bugs.webkit.org/show_bug.cgi?id=130522
3335         <rdar://problem/15862395>
3336
3337         Reviewed by Dean Jackson.
3338         
3339         Previously, if -webkit-transform was being keyframe-animated, and the
3340         animation had fill-forwards, then we would continue to think that the
3341         animation is running and turn off compositing overlap testing. This
3342         caused some sites to keep too much backing store around.
3343         
3344         Fix by having isRunning{Accelerated}AnimationOnRenderer take some flags
3345         so that more specific questions about the running state can be asked.
3346         For layer creation, keep using the same criteria as before (for now)
3347         which includes paused and fill-forwards animations. For overlap testing,
3348         don't include the fill-forwards test.
3349
3350         Tests: compositing/animation/filling-animation-overlap-at-end.html
3351                compositing/animation/filling-animation-overlap.html
3352                compositing/animation/layer-for-filling-animation.html
3353
3354         * page/animation/AnimationBase.h:
3355         (WebCore::AnimationBase::fillingForwards):
3356         (WebCore::AnimationBase::inPausedState):
3357         (WebCore::AnimationBase::isAnimatingProperty):
3358         * page/animation/AnimationController.cpp:
3359         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
3360         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
3361         (WebCore::AnimationController::isRunningAnimationOnRenderer):
3362         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
3363         * page/animation/AnimationController.h:
3364         * page/animation/AnimationControllerPrivate.h:
3365         * page/animation/CompositeAnimation.cpp:
3366         (WebCore::CompositeAnimation::isAnimatingProperty):
3367         * page/animation/CompositeAnimation.h:
3368         * rendering/RenderLayerBacking.cpp:
3369         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3370         * rendering/RenderLayerCompositor.cpp:
3371         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3372         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
3373
3374 2014-03-20  Dirk Schulze  <krit@webkit.org>
3375
3376         Canvas methods clip/fill/stroke should not except 0 argument
3377         https://bugs.webkit.org/show_bug.cgi?id=130497
3378
3379         Reviewed by Dean Jackson.
3380
3381         Do not allow nullable argument for fill/stroke/clip.
3382
3383         No new tests. Updated existing tests.
3384
3385         * html/canvas/CanvasRenderingContext2D.idl:
3386
3387 2014-03-20  Eric Carlson  <eric.carlson@apple.com>
3388
3389         [iOS] Support MediaDocument when building with PLUGIN_PROXY_FOR_VIDEO
3390         https://bugs.webkit.org/show_bug.cgi?id=130520
3391
3392         Reviewed by Jer Noble.
3393
3394         * dom/DOMImplementation.cpp:
3395         (WebCore::DOMImplementation::createDocument): Check the isVideoPluginProxyEnabled setting 
3396             when building with ENABLE_PLUGIN_PROXY_FOR_VIDEO.
3397
3398 2014-03-20  Mihai Tica  <mitica@adobe.com>
3399
3400         [CSS Blending] Blending operation is not isolated when setting z-index on parent from javascript
3401         https://bugs.webkit.org/show_bug.cgi?id=129307
3402
3403         Reviewed by Dean Jackson.
3404
3405         Reimplement the logic behind isolating blend modes. The blending operation should be limited to the
3406         contents of the parent stacking context. The proposed solution implies adding logic in updateDescendantDependentFlags,
3407         to track child elements that have blending and create a transparency layer that triggers isolation.
3408
3409         Tests: css3/compositing/blend-mode-background.html
3410                fast/repaint/blend-mode-isolate-stacking-context.html
3411
3412         * rendering/RenderLayer.cpp:
3413         (WebCore::RenderLayer::RenderLayer): Remove old members, add new members to constructor.
3414         (WebCore::RenderLayer::updateBlendMode): Update parent stacking context isolation on blend mode change.
3415         (WebCore::RenderLayer::updateNonCompositedParentStackingContextHasBlendedChild):
3416         - Set m_hasBlendedElementInChildStackingContext for the non composited parent stacking context.
3417         (WebCore::RenderLayer::dirtyAncestorParentStackingContextHasBlendedElement):
3418         - Set flag so isolation should be considered in updateDescendantDependentFlags.
3419         (WebCore::RenderLayer::nonCompositedParentStackingContextHasBlendedChild):
3420         - Return whether the non composited parent stacking context isolates blending.
3421         (WebCore::RenderLayer::updateDescendantDependentFlags): Add logic for isolating blending.
3422         (WebCore::RenderLayer::addChild): Call to updateNonCompositedParentStackingContextHasBlendedChild if needed.
3423         (WebCore::RenderLayer::removeChild): Call to dirtyAncestorParentStackingContextHasBlendedElement if needed.
3424         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange): Update isolation when a stacking context was set or unset.
3425         (WebCore::RenderLayer::styleChanged): Removed oldStyle parameter from updateBlendMode call.
3426          Update parent stacking context isolation on blend mode change.
3427         * rendering/RenderLayer.h:
3428         - Add members, getters and setters for tracking whether the element has a blended child:
3429             - m_hasBlendedElementInChildStackingContext
3430             - m_hasBlendedElementInChildStackingContextStatusDirty
3431         - Removed m_updateParentStackingContextShouldIsolateBlendingDirty (replaced with m_hasBlendedElementInChildStackingContextStatusDirty)
3432         - Removed m_isolatesBlending (replaced with m_hasBlendedElementInChildStackingContext)
3433         - Updated the isolatesBlending method to return true only when the element is a stacking context and has a blended child.
3434         * rendering/RenderLayerCompositor.cpp:
3435         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Removed layer.updateParentStackingContextShouldIsolateBlending call.
3436
3437 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
3438
3439         [GTK] [CMake] Do not compile ProxyResolverSoup.cpp
3440         https://bugs.webkit.org/show_bug.cgi?id=130516
3441
3442         Reviewed by Sergio Villar Senin.
3443
3444         * PlatformGTK.cmake: Remove the file from the source list.
3445
3446 2014-03-20  Commit Queue  <commit-queue@webkit.org>
3447
3448         Unreviewed, rolling out r165962.
3449         https://bugs.webkit.org/show_bug.cgi?id=130512
3450
3451         It broke the build (Requested by Ossy on #webkit).
3452
3453         Reverted changeset:
3454
3455         "[EFL][GTK] Get CMake to find Freetype2 properly"
3456         https://bugs.webkit.org/show_bug.cgi?id=130150
3457         http://trac.webkit.org/changeset/165962
3458
3459 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
3460
3461         "input" event is not fired when changing a select element's value
3462         https://bugs.webkit.org/show_bug.cgi?id=117526
3463
3464         Reviewed by Antti Koivisto.
3465
3466         Add a call to dispatch input event when listbox or menulist
3467         values are modified.
3468
3469         According to the spec: "When the user agent is to send select update
3470         notifications, queue a task to first fire a simple even that bubbles
3471         named input at the select element, and then fire a simple event that
3472         bubbles named change at the select element, using the user interaction
3473         task source as the task source."
3474
3475         Tests: fast/forms/select/listbox-oninput-fired.html
3476                fast/forms/select/menulist-oninput-fired.html
3477
3478         * html/HTMLSelectElement.cpp:
3479         (WebCore::HTMLSelectElement::listBoxOnChange):