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