9bbeefe9f0c6f10a32e398fd5dd1052c516e0754
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2
3         Improving createOffer and createAnswer LayoutTests
4         https://bugs.webkit.org/show_bug.cgi?id=125568
5
6         Reviewed by Philippe Normand.
7
8         The constraints parameter should be optional in both. Also adding tests to check if we already have a local SDP
9         when creating an answer.
10
11         Existing tests were updated.
12
13         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
14         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
15
16 2013-12-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
17
18         [EFL] Fix build with CONTEXT_MENUS flag set OFF
19         https://bugs.webkit.org/show_bug.cgi?id=125572
20
21         Reviewed by Gyuyoung Kim.
22
23         dispatchEventAsContextMenuEvent is called regardless of CONTEXT_MENUS flag setting,
24         thus its definition in InspectorFrontendHost should not be guarded by this flag.
25
26         No new tests, no behaviour change.
27
28         * inspector/InspectorFrontendHost.cpp:
29         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
30
31 2013-12-11  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
32
33         [CURL] Build fails after r160386.
34         https://bugs.webkit.org/show_bug.cgi?id=125571
35
36         Reviewed by Zoltan Herczeg.
37
38         Need no new tests.
39
40         Fix a typo in commit r160386 that prevents building with curl.
41
42         * platform/network/curl/CurlCacheEntry.cpp:
43         (WebCore::CurlCacheEntry::generateBaseFilename):
44
45 2013-12-11  Rob Buis  <rob.buis@samsung.com>
46
47         [CSS Shapes] Take into account fill-rule for polygon interpolation
48         https://bugs.webkit.org/show_bug.cgi?id=125508
49
50         Reviewed by Dirk Schulze.
51
52         Implement the polygon fill-rule part of http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation.
53
54         Adapt fast/shapes/shape-outside-floats/shape-outside-animation.html.
55
56         * rendering/style/BasicShapes.cpp:
57         (WebCore::BasicShape::canBlend):
58
59 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
60
61         Programmatically-inserted children lack accessibility events
62         https://bugs.webkit.org/show_bug.cgi?id=100275
63
64         Reviewed by Chris Fleizach.
65
66         Test: accessibility/children-changed-sends-notification.html
67
68         Emit children-changed::add and children-changed::remove whenever
69         an object has been added/removed to the accessibility hierarchy,
70         that is, when a new AtkObject is being attached/detached.
71
72         * accessibility/AXObjectCache.h: Added new enumeration to know
73         when we are detaching a wrapper because of the cache or the
74         element is being destroyed, so we can use that information.
75         (WebCore::AXObjectCache::detachWrapper): Added a new parameter and
76         updated all the prototypes in different ports.
77         * accessibility/AXObjectCache.cpp:
78         (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
79         specifying that we do it because the cache is being destroyed.
80         (WebCore::AXObjectCache::remove): Call detachWrapper() specifying
81         that we do it because an accessible element is being destroyed.
82
83         * accessibility/atk/AXObjectCacheAtk.cpp:
84         (WebCore::AXObjectCache::detachWrapper): Emit the children-changed
85         signal when needed. We rely on the cached reference to the parent
86         AtkObject (using the implementation of atk_object_get_parent from
87         the AtkObject class) to find the right object to emit the signal
88         from here, since the accessibility hierarchy from WebCore will no
89         longer be accessible at this point.
90         (WebCore::AXObjectCache::attachWrapper): Emit the children-change
91         signal from here unless we are in the middle of a layout update,
92         trying to provide as much information (e.g. the offset) as possible.
93         (WebCore::AXObjectCache::postPlatformNotification): Make sure we
94         update (touch) the subtree under an accessibility object whenever
95         we receive AXChildrenChanded from WebCore, to ensure that those
96         objects will also be visible rightaway to ATs, and that those get
97         properly notified of the event at that very same moment.
98
99         * accessibility/ios/AXObjectCacheIOS.mm:
100         (WebCore::AXObjectCache::detachWrapper): Updated function signature.
101         * accessibility/mac/AXObjectCacheMac.mm:
102         (WebCore::AXObjectCache::detachWrapper): Ditto.
103         * accessibility/win/AXObjectCacheWin.cpp:
104         (WebCore::AXObjectCache::detachWrapper): Ditto.
105
106 2013-12-11  Andreas Kling  <akling@apple.com>
107
108         REGRESSION(r160389): SVG test assertion extravaganza.
109
110         Unreviewed. Use getAttribute() instead of fastGetAttribute() for
111         the "type" attribute since it's animatable on SVG elements.
112
113 2013-12-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
114
115         Set m_nextBreakablePosition as private in InlineIterator, and use it.
116         https://bugs.webkit.org/show_bug.cgi?id=125482
117
118         Reviewed by Andreas Kling.
119
120         InlineIterator has been exported m_nextBreakablePosition as public though it is member variable.
121         This patch set it as private, and add getter/setter functions for it.
122
123         No new tests, no behavior changes.
124
125         * rendering/InlineIterator.h:
126         (WebCore::InlineIterator::InlineIterator):
127         (WebCore::InlineIterator::nextBreakablePosition):
128         (WebCore::InlineIterator::setNextBreakablePosition):
129         * rendering/line/BreakingContextInlineHeaders.h:
130         (WebCore::BreakingContext::handleText):
131
132 2013-12-10  Gurpreet Kaur  <k.gurpreet@samsung.com>
133
134         top and bottom black background line not getting displayed
135         https://bugs.webkit.org/show_bug.cgi?id=21664
136
137         Reviewed by Simon Fraser.
138
139         The table cell's background was not being displayed. Since the table
140         cell had no child correct offsetWidth was not being set even if table
141         width is being defined.
142
143         Test: fast/dom/HTMLTableElement/empy-table-cell-with-background-color.html
144
145         * rendering/AutoTableLayout.cpp:
146         (WebCore::AutoTableLayout::recalcColumn):
147         cellHasContent should also be set to true incase background color is
148         present.
149
150 2013-12-10  Beth Dakin  <bdakin@apple.com>
151
152         Horizontal rubber-banding without a horizontal scrollbar is distracting
153         https://bugs.webkit.org/show_bug.cgi?id=125550
154
155         Reviewed by Simon Fraser.
156
157         Setting the ScrollElasticity to ScrollElasticityAutomatic will make sure we only 
158         rubber-band horizontally when there is a horizontal scrollbar.
159
160         * page/FrameView.cpp:
161         (WebCore::FrameView::FrameView):
162
163 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
164
165         Correct a preprocessor guard from a mis-merged patch
166
167         In r160367, I mismerged a patch from Gustavo Noronha. This commit
168         fixes the merge and thus fixes the CMake build.
169
170         * html/HTMLMediaElement.idl: Move the preprocessor guard to the correct property.
171
172 2013-12-10  Rob Buis  <rob.buis@samsung.com>
173
174         Clean up SVGScriptElement
175         https://bugs.webkit.org/show_bug.cgi?id=125527
176
177         Reviewed by Sam Weinig.
178
179         Rewrite to not store type in m_type and also remove type getter/setter.
180
181         * svg/SVGScriptElement.cpp:
182         (WebCore::SVGScriptElement::parseAttribute):
183         (WebCore::SVGScriptElement::typeAttributeValue):
184         * svg/SVGScriptElement.h:
185         * svg/SVGScriptElement.idl:
186
187 2013-12-10  Laszlo Vidacs  <lac@inf.u-szeged.hu>
188
189         Use std::array when computing MD5 checksum
190         https://bugs.webkit.org/show_bug.cgi?id=125509
191
192         Reviewed by Anders Carlsson.
193
194         Use MD5::Digest type and MD5::hashSize when computing MD5 checksum.
195
196         * platform/network/curl/CurlCacheEntry.cpp:
197         (WebCore::CurlCacheEntry::generateBaseFilename):
198
199 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
200
201         [ATK] Expose splitter elements with ATK_ROLE_SEPARATOR
202         https://bugs.webkit.org/show_bug.cgi?id=125522
203
204         Reviewed by Chris Fleizach.
205
206         Expose objects with SplitterRole role as ATK_ROLE_SEPARATOR.
207
208         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
209         (atkRole):
210
211 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
212
213         [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
214         https://bugs.webkit.org/show_bug.cgi?id=125521
215
216         Reviewed by Chris Fleizach.
217
218         Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as
219         ATK_ROLE_ALERT instead.
220
221         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
222         (atkRole):
223
224 2013-12-10  Brendan Long  <b.long@cablelabs.com>
225
226         [GTK][GStreamer] media/video-preload.html is flakily crashing on WK2
227         https://bugs.webkit.org/show_bug.cgi?id=125411
228
229         Reviewed by Philippe Normand.
230
231         No new tests because this fixes flakeyness in existing tests (media/video-preload.html, and various tests in media/track/{audio,in-band,video}).
232
233         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
234         (webkitTextCombinerPadGetProperty): Copy tag list to prevent concurrent modification problems.
235         (webkitTextCombinerPadEvent): Add locking.
236         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
237         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Call tagsChanged() because we need it to setup m_tags.
238         (WebCore::TrackPrivateBaseGStreamer::disconnect): Clear m_tags.
239         (WebCore::TrackPrivateBaseGStreamer::tagsChanged): Lookup the tags while we're in this callback, because it's the only time we can guarantee that the input-selector won't unref them.
240         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use m_tags.
241         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_tags and a mutex.
242
243 2013-12-10  László Langó  <lango@inf.u-szeged.hu>
244
245         PageConsole::addMessage should automatically determine column number alongside line number
246         https://bugs.webkit.org/show_bug.cgi?id=114319
247
248         Reviewed by Joseph Pecoraro.
249
250         * dom/InlineStyleSheetOwner.cpp:
251         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
252         * dom/ScriptElement.cpp:
253         (WebCore::ScriptElement::ScriptElement):
254         * dom/ScriptableDocumentParser.h:
255         * dom/StyledElement.cpp:
256         (WebCore::StyledElement::styleAttributeChanged):
257         * html/parser/HTMLDocumentParser.cpp:
258         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
259         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
260         * html/parser/HTMLDocumentParser.h:
261         * inspector/InspectorResourceAgent.cpp:
262         (WebCore::InspectorResourceAgent::buildInitiatorObject):
263         * page/Console.cpp:
264         (WebCore::internalAddMessage):
265         * page/PageConsole.cpp:
266         (WebCore::PageConsole::printSourceURLAndPosition):
267         (WebCore::PageConsole::addMessage):
268         * page/PageConsole.h:
269         * xml/parser/XMLDocumentParser.h:
270         * xml/parser/XMLDocumentParserLibxml2.cpp:
271         (WebCore::XMLDocumentParser::error):
272
273 2013-12-10  Andreas Kling  <akling@apple.com>
274
275         Jettison all StyleResolver data on memory pressure.
276         <https://webkit.org/b/125498>
277
278         The StyleResolver can be rebuilt relatively quickly; we already
279         have an optimization that discards it some time after last use.
280
281         If we find ourseles under serious memory pressure, don't wait for
282         the timer to kick in, throw everything overboard right away.
283
284         ~5MB progression post-pressure on Membuster3.
285
286         Reviewed by Anders Carlsson.
287
288 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
289
290         [GTK] [CMake] Add support for building the DOM bindings
291         https://bugs.webkit.org/show_bug.cgi?id=116375
292
293         Reviewed by Gustavo Noronha Silva.
294
295         The CMake build is more complete than the autotools counterpart, so autotools doesn't consider
296         some supplemental IDL attributes when building the DOM bindings. To prevent API breaks we should
297         protect these attributes from DOM binding generation.
298
299         * Modules/battery/BatteryManager.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
300         * Modules/battery/NavigatorBattery.idl: Ditto.
301         * Modules/mediastream/HTMLMediaElementMediaStream.idl: Ditto.
302         * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Ditto.
303         * Modules/networkinfo/NetworkInfoConnection.idl: Ditto.
304         * PlatformGTK.cmake: Add build steps for building the bindings.
305         * dom/Document.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
306         * html/HTMLMediaElement.idl: Ditto.
307
308 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
309
310         Various fixes for the CMake GTK+ build
311
312         Reviewed by Gustavo Noronha.
313
314         * PlatformGTK.cmake: Update source list.
315
316 2013-12-10  Robert Sipka  <sipka@inf.u-szeged.hu>
317
318         [nix][curl] Buildfix after r160310
319         https://bugs.webkit.org/show_bug.cgi?id=125489
320
321         Reviewed by Gustavo Noronha Silva.
322
323         Curl doesn't include soup files.
324
325         * PlatformNix.cmake:
326
327 2013-12-10  Gustavo Noronha Silva  <gns@gnome.org>
328
329         [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change
330         https://bugs.webkit.org/show_bug.cgi?id=125444
331
332         Reviewed by Martin Robinson.
333
334         * platform/gtk/UserAgentGtk.cpp:
335         (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X.
336         (WebCore::standardUserAgent): ditto.
337
338 2013-12-09  Gustavo Noronha Silva  <gns@gnome.org>
339
340         [Soup] Send original encoded data size to didReceiveBuffer
341         https://bugs.webkit.org/show_bug.cgi?id=125410
342
343         Reviewed by Martin Robinson.
344
345         No tests, the only way to test this seems to be through the inspector UI.
346
347         * platform/network/ResourceHandle.h:
348         * platform/network/ResourceHandleInternal.h:
349         (WebCore::ResourceHandleInternal::ResourceHandleInternal): data member to track stream
350         position.
351         * platform/network/soup/ResourceHandleSoup.cpp:
352         (WebCore::ResourceHandle::currentStreamPosition): obtains the current stream position by querying
353         the first seekable input stream we find.
354         (WebCore::nextMultipartResponsePartCallback): store the position before we start reading a new part.
355         (WebCore::sendRequestCallback): store the position before we start reading the response body.
356         (WebCore::readCallback): pass the position delta to didReceiveData.
357
358 2013-12-09  Andreas Kling  <akling@apple.com>
359
360         Clear out font width measurement caches on memory pressure.
361         <https://webkit.org/b/125481>
362
363         The data kept in WidthCaches can be regenerated on demand. Throwing
364         it away when we're under memory pressure buys us ~4MB on Membuster3.
365
366         Reviewed by Antti Koivisto.
367
368 2013-12-09  Seokju Kwon  <seokju@webkit.org>
369
370         Web Inspector: Remove enabled() in InspectorRuntimeAgent.
371         https://bugs.webkit.org/show_bug.cgi?id=125476
372
373         Reviewed by Joseph Pecoraro.
374
375         Dead code. It's never called anywhere.
376
377         No new tests, no behavior change.
378
379         * inspector/InspectorRuntimeAgent.h:
380
381 2013-12-09  Sam Weinig  <sam@webkit.org>
382
383         Replace use of WTF::FixedArray with std::array
384         https://bugs.webkit.org/show_bug.cgi?id=125475
385
386         Reviewed by Anders Carlsson.
387
388         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
389         * platform/graphics/GlyphMetricsMap.h:
390
391 2013-12-09  Benjamin Poulain  <bpoulain@apple.com>
392
393         Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
394         https://bugs.webkit.org/show_bug.cgi?id=125379
395
396         Reviewed by Alexey Proskuryakov.
397
398         * WebCore.vcxproj/WebCore.vcxproj:
399         * WebCore.vcxproj/WebCore.vcxproj.filters:
400         * WebCore.xcodeproj/project.pbxproj:
401         * platform/network/ResourceHandle.h:
402         * platform/network/ResourceHandleInternal.h:
403         * platform/network/cf/ResourceHandleCFNet.cpp:
404         (WebCore::ResourceHandle::createCFURLConnection):
405         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added.
406         (WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate):
407         (WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate):
408         (WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback):
409         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
410         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback):
411         (WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback):
412         (WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback):
413         (WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback):
414         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback):
415         (WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback):
416         (WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
417         (WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback):
418         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback):
419         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
420         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added.
421         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added.
422         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate):
423         (WebCore::synthesizeRedirectResponseIfNecessary):
424         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
425         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
426         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
427         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
428         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail):
429         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
430         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge):
431         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData):
432         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
433         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
434         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
435         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added.
436
437 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
438
439         REGRESSION(r136280): input[type=image] should assume coords of 0,0 when activated without physically clicking
440         https://bugs.webkit.org/show_bug.cgi?id=125392
441
442         Reviewed by Darin Adler.
443
444         Merge https://chromium.googlesource.com/chromium/blink/+/3c33d42207cd209bb171083ba66c225f694f2101
445
446         Activating an image button with the keyboard or element.click() should result in selected coords of (0,0) per
447         http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#image-button-state-(type=image)
448         "If the user activates the control without explicitly selecting a coordinate, then the coordinate (0,0) must be assumed."
449
450         New behavior also matches that of Internet Explorer and Firefox.
451
452         Tests: fast/forms/input-image-submit.html
453
454         * html/ImageInputType.cpp:
455         (WebCore::ImageInputType::handleDOMActivateEvent): Set m_clickLocation to (0, 0) for simulated events.
456
457 2013-12-09  Jer Noble  <jer.noble@apple.com>
458
459         [MSE] Add support for VideoPlaybackMetrics.
460         https://bugs.webkit.org/show_bug.cgi?id=125380
461
462         Reviewed by Eric Carlson.
463
464         Test: media/media-source/media-source-video-playback-quality.html
465
466         Add a new object type VideoPlaybackQuality to be returned by
467         HTMLMediaElement.getVideoPlaybackQuality().
468
469         HTMLMediaElements must separately track a droppedVideoFrame count, as
470         certain operations on SourceBuffer will drop incoming frames, which must
471         be accounted for. Reset this count when the media engine changes, which is
472         indicitive of a new media load requset starting.
473
474         Add the new VideoPlaybackQuality class:
475         * Modules/mediasource/VideoPlaybackQuality.cpp: Added.
476         (WebCore::VideoPlaybackQuality::create):
477         (WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
478         * Modules/mediasource/VideoPlaybackQuality.h: Added.
479         (WebCore::VideoPlaybackQuality::creationTime):
480         (WebCore::VideoPlaybackQuality::totalVideoFrames):
481         (WebCore::VideoPlaybackQuality::droppedVideoFrames):
482         (WebCore::VideoPlaybackQuality::corruptedVideoFrames):
483         (WebCore::VideoPlaybackQuality::totalFrameDelay):
484         * Modules/mediasource/VideoPlaybackQuality.idl: Added.
485
486         Add support for the new class to HTMLMediaElement:
487         * html/HTMLMediaElement.cpp:
488         (HTMLMediaElement::shouldUseVideoPluginProxy):
489         (HTMLMediaElement::getVideoPlaybackQuality):
490         * html/HTMLMediaElement.h:
491         * html/HTMLMediaElement.idl:
492
493         Report the video quality metrics from the MediaPlayer:
494         * platform/graphics/MediaPlayer.cpp:
495         (WebCore::MediaPlayer::totalVideoFrames):
496         (WebCore::MediaPlayer::droppedVideoFrames):
497         (WebCore::MediaPlayer::corruptedVideoFrames):
498         (WebCore::MediaPlayer::totalFrameDelay):
499         * platform/graphics/MediaPlayer.h:
500         * platform/graphics/MediaPlayerPrivate.h:
501         (WebCore::MediaPlayerPrivateInterface::totalVideoFrames):
502         (WebCore::MediaPlayerPrivateInterface::droppedVideoFrames):
503         (WebCore::MediaPlayerPrivateInterface::corruptedVideoFrames):
504         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
505
506         Correctly report the dropped frame count:
507         * Modules/mediasource/SourceBuffer.cpp:
508         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): needsRandomAccessFlag defaults to true.
509         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check the sync status of the incoming sample.
510         (WebCore::SourceBuffer::didDropSample): Notify the media element of a dropped frame.
511         * Modules/mediasource/SourceBuffer.h:
512         * html/HTMLMediaElement.cpp:
513         (WebCore::HTMLMediaElement::HTMLMediaElement):
514         (HTMLMediaElement::mediaPlayerEngineUpdated): Reset m_droppedFrameCount.
515         (HTMLMediaElement::getVideoPlaybackQuality): Return a new VideoPlaybackQuality object.
516         * html/HTMLMediaElement.h:
517         (WebCore::HTMLMediaElement::incrementDroppedFrameCount): Simple incrementer.
518         * platform/MediaSample.h:
519         (WebCore::MediaSample::isSync): Convenience function.
520         (WebCore::MediaSample::isNonDisplaying): Ditto.
521
522         Add support in the AVFoundation MediaSource Engine:
523         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
524         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
525         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalVideoFrames):
526         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::droppedVideoFrames):
527         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::corruptedVideoFrames):
528         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
529
530         Add support in the Mock MediaSource Engine:
531         * platform/mock/mediasource/MockBox.h:
532         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
533         (WebCore::MockMediaPlayerMediaSource::totalVideoFrames): Simple accessor.
534         (WebCore::MockMediaPlayerMediaSource::droppedVideoFrames): Ditto.
535         (WebCore::MockMediaPlayerMediaSource::corruptedVideoFrames): Ditto.
536         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay): Ditto.
537         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
538         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
539         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
540         * platform/mock/mediasource/MockMediaSourcePrivate.h:
541         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
542         (WebCore::MockSourceBufferPrivate::enqueueSample): Increment the frame counts based on
543             the incoming sample.
544         * platform/mock/mediasource/MockSourceBufferPrivate.h:
545
546         Add the new files to the project:
547         * bindings/gobject/GNUmakefile.am:
548         * DerivedSources.make:
549         * WebCore.xcodeproj/project.pbxproj:
550         * GNUMakefile.list.am:
551         * CMakeLists.txt:
552
553 2013-12-09  Simon Fraser  <simon.fraser@apple.com>
554
555         Avoid divide by zero in scrollbar code, and protect against Obj-C exceptions
556         https://bugs.webkit.org/show_bug.cgi?id=125469
557         <rdar://problem/15535772>
558
559         Reviewed by Beth Dakin.
560         
561         In ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(), proportion could
562         end up as NaN if scrollbar->totalSize() were zero. Protect against that.
563         
564         Also wrap functions that call into Objective-C with BEGIN_BLOCK_OBJC_EXCEPTIONS/
565         END_BLOCK_OBJC_EXCEPTIONS.
566
567         * platform/mac/ScrollbarThemeMac.mm:
568         (WebCore::ScrollbarThemeMac::scrollbarThickness):
569         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
570         (WebCore::ScrollbarThemeMac::minimumThumbLength):
571         (WebCore::ScrollbarThemeMac::updateEnabledState):
572         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
573         (WebCore::scrollbarPainterPaint):
574
575 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
576
577         Implement Document.cloneNode()
578         https://bugs.webkit.org/show_bug.cgi?id=11646
579
580         Reviewed by Darin Adler.
581
582         Merge https://chromium.googlesource.com/chromium/blink/+/dc7879025e01d63be9fcf6a84ca6c9b8b5768a80
583
584         Implement the behavior specified in the current DOM4 working draft:
585         http://www.w3.org/TR/2013/WD-dom-20131107/#dom-node-clonenode
586
587         Tests: fast/dom/Document/clone-node.html
588                fast/dom/HTMLDocument/clone-node-quirks-mode.html
589                svg/custom/clone-node.html
590
591         * dom/Document.cpp:
592         (WebCore::Document::cloneNode):
593         (WebCore::Document::cloneDocumentWithoutChildren):
594         (WebCore::Document::cloneDataFromDocument):
595         * dom/Document.h:
596         * html/HTMLDocument.cpp:
597         (WebCore::HTMLDocument::cloneDocumentWithoutChildren):
598         * html/HTMLDocument.h:
599         * svg/SVGDocument.cpp:
600         (WebCore::SVGDocument::cloneDocumentWithoutChildren):
601         * svg/SVGDocument.h:
602
603 2013-12-09  Andreas Kling  <akling@apple.com>
604
605         REGRESSION(r160260): Memory pressure signal causes web process to hang.
606         <https://webkit.org/b/125465>
607
608         Reviewed by Tim Horton.
609
610         This command caused all of my web processes to hang:
611
612             notifyutil -p org.WebKit.lowMemory
613
614         This only happens when the cache pruning code encounters a resource
615         using purgeable memory.
616
617         * loader/cache/MemoryCache.cpp:
618         (WebCore::MemoryCache::pruneLiveResourcesToSize):
619
620             Grab the next CachedResource pointer before continuing the loop.
621
622 2013-12-09  peavo@outlook.com  <peavo@outlook.com>
623
624         [WinCairo] OpenGL compile error.
625         https://bugs.webkit.org/show_bug.cgi?id=125383
626
627         Reviewed by Darin Adler.
628
629         * platform/graphics/opengl/Extensions3DOpenGLES.h: Define GL_HALF_FLOAT_ARB on Windows when OPENGL_ES_2 is used.
630
631 2013-12-09  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
632
633         Fix handling of 'inherit' and 'initial' for grid lines.
634         https://bugs.webkit.org/show_bug.cgi?id=125223
635
636         Reviewed by Darin Adler.
637
638         'initial' and 'inherit' are always allowed values for CSS properties.
639         As the CSSParser handles them automatically, those 2 values were never
640         taken care of in StyleResolver, leading to crashes.
641
642         Added tests cases for 'inherit' and 'initial' to the following tests:
643
644         fast/css-grid-layout/grid-item-column-row-get-set.html
645         fast/css-grid-layout/grid-item-end-after-get-set.html
646         fast/css-grid-layout/grid-item-start-before-get-set.html
647
648         Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision
649
650         * css/StyleResolver.cpp:
651         (WebCore::StyleResolver::applyProperty):
652         * rendering/style/RenderStyle.h:
653         * rendering/style/StyleGridItemData.cpp:
654         (WebCore::StyleGridItemData::StyleGridItemData):
655
656 2013-12-09  Joseph Pecoraro  <pecoraro@apple.com>
657
658         Web Inspector: Inspector.json and CodeGenerator tweaks
659         https://bugs.webkit.org/show_bug.cgi?id=125321
660
661         Reviewed by Timothy Hatcher.
662
663         * inspector/protocol/Runtime.json:
664         Runtime.js was depending on Network.FrameId. This is a layering
665         violation, so ideally we can fix this later. For now, just copy
666         the FrameId type into Runtime. They are strings so all is good.
667
668         * inspector/CodeGeneratorInspector.py:
669         (Generator.EventMethodStructTemplate.append_epilog):
670         * inspector/CodeGeneratorInspectorStrings.py:
671         Improve --help usage information.
672         Make the script work with a single domain json file.
673         Add ASCIILiteral's where appropriate.
674
675 2013-12-09  Nick Diego Yamane  <nick.yamane@openbossa.org>
676
677         [Nix] Fix file name typo in PlatformNix.cmake
678         https://bugs.webkit.org/show_bug.cgi?id=125457
679
680         Reviewed by Gustavo Noronha Silva.
681
682         Wrong file name introduced in http://trac.webkit.org/changeset/160310.
683         * PlatformNix.cmake:
684
685 2013-12-09  Brendan Long  <b.long@cablelabs.com>
686
687         [GStreamer] Memory leak due to incorrect use of gst_tag_list_merge in TextCombinerGStreamer
688         https://bugs.webkit.org/show_bug.cgi?id=125452
689
690         Reviewed by Philippe Normand.
691
692         No new tests because this fixes a memory leak.
693
694         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
695         (webkitTextCombinerPadEvent): Use gst_tag_list_insert instead of gst_tag_list_merge, since we don't want to create a new list.
696
697 2013-12-09  Chris Fleizach  <cfleizach@apple.com>
698
699         AX: WebKit ignores @alt on IMG elements with role="text"
700         https://bugs.webkit.org/show_bug.cgi?id=125363
701
702         Reviewed by Mario Sanchez Prada.
703
704         If an <img> element has a different role, the alt attribute should still be used in the 
705         name calculation if present.
706
707         Test: accessibility/alt-tag-on-image-with-nonimage-role.html
708
709         * accessibility/AccessibilityNodeObject.cpp:
710         (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation):
711         (WebCore::AccessibilityNodeObject::alternativeText):
712         (WebCore::AccessibilityNodeObject::accessibilityDescription):
713         (WebCore::AccessibilityNodeObject::text):
714         * accessibility/AccessibilityNodeObject.h:
715
716 2013-12-08  Martin Robinson  <mrobinson@igalia.com>
717
718         [WK2][Soup] Use didReceiveBuffer instead of didReceiveData
719         https://bugs.webkit.org/show_bug.cgi?id=118598
720
721         Reviewed by Gustavo Noronha Silva.
722
723         Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba Osztrogonác  <ossy@webkit.org>.
724
725         Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
726         let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
727         only supports getting data via SharedBuffer.
728
729         * GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
730         * PlatformEfl.cmake:
731         * PlatformGTK.cmake:
732         * PlatformNix.cmake:
733         * platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
734         * platform/SharedBuffer.h: Ditto.
735         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
736         * platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
737         * platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
738         * platform/network/soup/GOwnPtrSoup.h: Ditto.
739         * platform/network/soup/ResourceHandleSoup.cpp:
740         (WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
741         called now.
742         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
743         (WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
744         (WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
745         (WebCore::cleanupSoupRequestOperation): Ditto.
746         (WebCore::nextMultipartResponsePartCallback): Ditto.
747         (WebCore::sendRequestCallback): Ditto.
748         (WebCore::readCallback):
749         * platform/soup/SharedBufferSoup.cpp: Added.
750
751 2013-12-09  Michal Poteralski  <m.poteralski@samsung.com>
752
753         DataCloneError exception is not thrown when postMessage's second parameter is the source
754         port or the target port.
755
756         https://bugs.webkit.org/show_bug.cgi?id=124708
757
758         Reviewed by Alexey Proskuryakov.
759
760         According to specification:
761         http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage
762
763         If the method was invoked with a second argument transfer then if any of the objects in the
764         transfer are either the source port or the target port (if any), then a DataCloneError
765         exception should be thrown. Currently an InvalidStateError exception is thrown what is an
766         incorrect behaviour.
767
768         The proposed solution is change to the correct the exception value.
769
770         Tests: fast/dom/Window/postMessage-clone-port-error.html
771
772         * dom/MessagePort.cpp:
773         (WebCore::MessagePort::postMessage): Improve exception value
774
775 2013-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
776
777         Unreviewed. Fix the GTK+ build with NetworkProcess enabled.
778
779         * GNUmakefile.list.am: Add missing file to compilation.
780
781 2013-12-08  Ryosuke Niwa  <rniwa@webkit.org>
782
783         getComputedStyle border-radius shorthand omits vertical radius information
784         https://bugs.webkit.org/show_bug.cgi?id=125394
785
786         Reviewed by Andreas Kling.
787
788         Merge https://chromium.googlesource.com/chromium/blink/+/4c2866855dddbb28bb7d978ad627acc368af23d0
789
790         getComputedStyle of border-radius shows the vertical radius components if they differ from their horizontal counterpants.
791         We were incorrectly detecting this case and over simplifying the results of getComputedStyle.
792         This patch ensures we only hide the vertical values if they are identical to the horizontal values.
793
794         * css/CSSComputedStyleDeclaration.cpp:
795         (WebCore::getBorderRadiusShorthandValue):
796
797 2013-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
798
799         [GTK] Do not skip attributes with only custom setter
800         https://bugs.webkit.org/show_bug.cgi?id=125417
801
802         Reviewed by Gustavo Noronha Silva.
803
804         For attributes with a custom setter, we now generate the code as a
805         read-only attribute with a getter method, unless it also has a
806         custom getter in which case the attribute is skipped.
807
808         * bindings/gobject/GNUmakefile.am: Generate WebKitDOMMediaController
809         that is now required by an attribute having a custom setter.
810         * bindings/gobject/WebKitDOMCustom.cpp: Remove methods that are now generated.
811         * bindings/gobject/WebKitDOMCustom.h: Ditto.
812         * bindings/gobject/WebKitDOMCustom.symbols: Ditto.
813         * bindings/gobject/webkitdom.symbols: Add new symbols.
814         * bindings/scripts/CodeGeneratorGObject.pm:
815         (SkipAttribute): Do not skip attributes having a custom setter.
816         (GetWriteableProperties): Do not include attributes having a
817         custom setter.
818         (GenerateProperty): Do not return early for attributes having
819         custom setter.
820         (GenerateFunctions): Do not generate setter for attributes having
821         a custom setter.
822
823 2013-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
824
825         [GTK] Do not generate new dispatch_event methods marked as deprecated
826         https://bugs.webkit.org/show_bug.cgi?id=125416
827
828         Reviewed by Gustavo Noronha Silva.
829
830         * bindings/scripts/CodeGeneratorGObject.pm:
831         (SkipFunction): Skip dispatch_event methods for objects
832         implementing EventTarget interface unless they are already
833         deprecated.
834         (GenerateFunction): Pass also the parentNode to SkipFunction().
835
836 2013-12-05  Jer Noble  <jer.noble@apple.com>
837
838         [MSE] Bring end-of-stream algorithm section up to current spec.
839         https://bugs.webkit.org/show_bug.cgi?id=125270
840
841         Reviewed by Darin Adler.
842
843         Test: media/media-source/media-source-end-of-stream.html
844
845         Separate the "endOfStream()" method from the "end of stream algorithm".
846
847         * Modules/mediasource/MediaSource.cpp:
848         (WebCore::SourceBufferIsUpdating): Added predicate function.
849         (WebCore::MediaSource::endOfStream): Call streamEndedWithError().
850         (WebCore::MediaSource::streamEndedWithError): Added.
851         * Modules/mediasource/MediaSource.h:
852         * Modules/mediasource/SourceBuffer.cpp:
853         (WebCore::SourceBuffer::appendBufferTimerFired): Call streamEndedWithError().
854         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
855         * Modules/mediasource/SourceBuffer.h:
856         * html/HTMLMediaElement.cpp:
857         (HTMLMediaElement::mediaLoadingFailedFatally): Renamed from mediaEngineError.
858         (HTMLMediaElement::mediaLoadingFailed): Call renamed method.
859         * html/HTMLMediaElement.h:
860         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
861         (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): Set load state to Loaded.
862         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
863         (WebCore::MockMediaPlayerMediaSource::setNetworkState): Simple setter.
864         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
865         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
866         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set the intitial duration to NaN.
867         (WebCore::MockMediaSourcePrivate::markEndOfStream): Set load state to Loaded.
868
869 2013-12-04  Jer Noble  <jer.noble@apple.com>
870
871         [MSE][Mac] Crash when removing MediaSource from HTMLMediaElement.
872         https://bugs.webkit.org/show_bug.cgi?id=125269
873
874         Reviewed by Sam Weinig.
875
876         Fixes the media/media-source/media-source-fastseek.html test when run with MallocScribble enabled.
877
878         It's possible for a SourceBufferPrivateAVFObjC to outlive its MediaSourcePrivateAVFObjC, so
879         make sure to clear the pointer from the former to the latter when the latter is destroyed.
880         That means we now have to check to see if the pointer to the latter is still valid at every
881         call site.
882
883         As a drive-by fix, rename m_parent to m_mediaSource to more accurately reflect what the pointer
884         points to.
885
886         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
887         (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC): Clear the SourceBuffer's backpointer.
888         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
889         (WebCore::SourceBufferPrivateAVFObjC::clearMediaSource): 
890         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
891         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Rename m_parent -> m_mediaSource.
892         (WebCore::SourceBufferPrivateAVFObjC::append): Check m_mediaSource before calling.
893         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
894         (WebCore::SourceBufferPrivateAVFObjC::readyState): Ditto.
895         (WebCore::SourceBufferPrivateAVFObjC::setReadyState): Ditto.
896         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
897         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
898         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
899         (WebCore::SourceBufferPrivateAVFObjC::setActive): Ditto.
900         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
901         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate): Clear the SourceBuffer's backpointer.
902         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
903         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate): Rename m_parent -> m_mediaSource.
904         (WebCore::MockSourceBufferPrivate::removedFromMediaSource): Check m_mediaSource before calling.
905         (WebCore::MockSourceBufferPrivate::readyState): Ditto.
906         (WebCore::MockSourceBufferPrivate::setReadyState): Ditto.
907         (WebCore::MockSourceBufferPrivate::setActive): Ditto.
908         * platform/mock/mediasource/MockSourceBufferPrivate.h:
909         (WebCore::MockSourceBufferPrivate::clearMediaSource):
910
911 2013-12-07  Zoltan Horvath  <zoltan@webkit.org>
912
913         Remove statusWithDirection static function from RenderBlockLineLayout
914         https://bugs.webkit.org/show_bug.cgi?id=125372
915
916         Reviewed by Andreas Kling.
917
918         I run into a FIXME about using BidiStatus constructor rather than statusWithDirection,
919         once it's implemented. BidiStatus has got the appropriate constructor now, so I removed
920         statusWithDirection and updated the code to use the constructor of BidiStatus.
921
922         No new tests, no behavior change.
923
924         * rendering/RenderBlockLineLayout.cpp:
925         (WebCore::constructBidiRunsForSegment):
926
927 2013-12-07  ChangSeok Oh  <changseok.oh@collabora.com>
928
929         Unreviewed. Build fix for gtk port after r160260.
930
931         * loader/cache/CachedImage.h: Add missing a header.
932
933 2013-12-07  Gustavo Noronha Silva  <gns@gnome.org>
934
935         ubuntu software center hits _XReadEvents() error
936         https://bugs.webkit.org/show_bug.cgi?id=123480
937
938         Reviewed by Martin Robinson.
939
940         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
941         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface
942         before freeing the associated pixmap.
943
944 2013-12-06  Tim Horton  <timothy_horton@apple.com>
945
946         [mac] Keep around more decoded image data, since it's purgeable
947         https://bugs.webkit.org/show_bug.cgi?id=125273
948         <rdar://problem/13205438>
949
950         Unreviewed patch to fix review comments...
951
952         * platform/graphics/BitmapImage.h:
953         Dan noticed that these return statements were improperly indented.
954
955 2013-12-05  Jer Noble  <jer.noble@apple.com>
956
957         [MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource.
958         https://bugs.webkit.org/show_bug.cgi?id=125338
959
960         Reviewed by Darin Adler.
961
962         The MediaSource API has some assumptions which break if more than one installed
963         media engine supports MediaSources at the same time. So when enabling the mock
964         media source engine in DRT or WKTR, disable AVFoundation so that only the mock
965         engine will support media source loading.
966
967         * testing/Internals.cpp:
968         (WebCore::Internals::initializeMockMediaSource):
969
970 2013-12-06  Antti Koivisto  <antti@apple.com>
971
972         Use NeverDestroyed instead of DEFINE_STATIC_LOCAL
973
974         Reviewed by Anders Carlsson.
975
976         * rendering/RenderText.cpp:
977         (WebCore::originalTextMap):
978
979 2013-12-05  Jer Noble  <jer.noble@apple.com>
980
981         [MSE] Add a runtime-setting for the MediaSource constructor.
982         https://bugs.webkit.org/show_bug.cgi?id=125336
983
984         Reviewed by Eric Carlson.
985
986         Add a Setting to enable the MediaSource constructor.
987
988         * Modules/mediasource/MediaSource.idl:
989         * page/Settings.in:
990
991 2013-12-06  Tim Horton  <timothy_horton@apple.com>
992
993         [mac] Keep around more decoded image data, since it's purgeable
994         https://bugs.webkit.org/show_bug.cgi?id=125273
995         <rdar://problem/13205438>
996
997         Reviewed by Simon Fraser.
998
999         No new tests, just an optimization.
1000
1001         Instead of throwing away decoded image data eagerly, allow the operating
1002         system to manage the memory via the standard purgeability mechanism,
1003         where it can.
1004
1005         This improves the performance on some pathological cases (extremely large
1006         animated GIFs) by up to 8x.
1007
1008         * loader/cache/MemoryCache.cpp:
1009         (WebCore::MemoryCache::pruneLiveResourcesToSize):
1010         Don't prune live resources' decoded data if it is purgeable.
1011
1012         * platform/graphics/BitmapImage.cpp:
1013         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
1014         Don't eagerly throw away decoded image data if it's purgeable.
1015
1016         * loader/cache/CachedImage.h:
1017         * loader/cache/CachedResource.h:
1018         (WebCore::CachedResource::decodedDataIsPurgeable):
1019         * platform/graphics/BitmapImage.h:
1020         * platform/graphics/Image.h:
1021         (WebCore::Image::decodedDataIsPurgeable):
1022
1023 2013-12-06  Antti Koivisto  <antti@apple.com>
1024
1025         Save original text for RenderText to a map
1026         https://bugs.webkit.org/show_bug.cgi?id=125278
1027
1028         Reviewed by Darin Adler.
1029         
1030         Currently the original text is fetched from the Text node. This is one of the few things 
1031         where we use the RenderText node pointer and is stopping Text nodes from being anonymous.
1032         
1033         It is very rare of original text to differ from the actual text so we can just squirrel the
1034         original to a map when it differs. This is also simplifies the code.
1035
1036         * rendering/RenderQuote.cpp:
1037         (WebCore::RenderQuote::styleDidChange):
1038         (WebCore::RenderQuote::updateDepth):
1039         * rendering/RenderText.cpp:
1040         (WebCore::originalTextMap):
1041         (WebCore::RenderText::RenderText):
1042         (WebCore::RenderText::~RenderText):
1043         (WebCore::RenderText::styleDidChange):
1044         (WebCore::RenderText::originalText):
1045         (WebCore::RenderText::setTextInternal):
1046         (WebCore::RenderText::setText):
1047         * rendering/RenderText.h:
1048         * rendering/RenderTextFragment.cpp:
1049         * rendering/RenderTextFragment.h:
1050
1051 2013-12-04  Jer Noble  <jer.noble@apple.com>
1052
1053         [MSE] Refactor MediaSourceBase back into MediaSource
1054         https://bugs.webkit.org/show_bug.cgi?id=125245
1055
1056         Reviewed by Eric Carlson.
1057
1058         Now that the legacy WebKitMediaSource has been removed, there is no reason to have
1059         a separate MediaSource and MediaSourceBase. Re-integrate the two.
1060
1061         Copy all the methods from MediaSource into MediaSourceBase, and rename the class MediaSource:
1062         * Modules/mediasource/MediaSource.cpp: Copied from MediaSourceBase.cpp.
1063         (WebCore::MediaSource::create): Copied from MediaSource.cpp.
1064         (WebCore::MediaSource::addSourceBuffer): Ditto.
1065         (WebCore::MediaSource::removeSourceBuffer): Ditto.
1066         (WebCore::MediaSource::isTypeSupported): Ditto.
1067         (WebCore::MediaSource::eventTargetInterface): Ditto.
1068         (WebCore::MediaSource::sourceBufferDidChangeAcitveState): Ditto.
1069         * Modules/mediasource/MediaSource.h: Copied from MediaSourceBase.h.
1070         (WebCore::MediaSource::sourceBuffers): Copied from MediaSource.h.
1071         (WebCore::MediaSource::activeSourceBuffers): Copied from MediaSource.h.
1072         * Modules/mediasource/MediaSourceBase.cpp: Removed.
1073         * Modules/mediasource/MediaSourceBase.h: Removed.
1074
1075         Change all references to MediaSourceBase into MediaSource:
1076         * Modules/mediasource/DOMURLMediaSource.cpp:
1077         (WebCore::DOMURLMediaSource::createObjectURL):
1078         * Modules/mediasource/DOMURLMediaSource.h:
1079         * Modules/mediasource/MediaSourceRegistry.cpp:
1080         (WebCore::MediaSourceRegistry::registerURL):
1081         (WebCore::MediaSourceRegistry::unregisterURL):
1082         * Modules/mediasource/MediaSourceRegistry.h:
1083
1084         Remove MediaSourceBase.cpp/h from the project file:
1085         * WebCore.xcodeproj/project.pbxproj:
1086         * GNUmakefile.list.am:
1087
1088 2013-12-06  Eric Carlson  <eric.carlson@apple.com>
1089
1090         r159827 broke plug-in snapshotting
1091         https://bugs.webkit.org/show_bug.cgi?id=125365
1092
1093         Reviewed by Dean Jackson.
1094
1095         No new tests, covered by existing tests.
1096
1097         * html/HTMLPlugInImageElement.cpp:
1098         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Return early if there is NOT
1099             a page, not if there IS a page.
1100
1101 2013-12-06  Roger Fong <roger_fong@apple.com> and Brent Fulgham  <bfulgham@apple.com>
1102
1103         [Win] Support compiling with VS2013
1104         https://bugs.webkit.org/show_bug.cgi?id=125353
1105
1106         Reviewed by Anders Carlsson.
1107
1108         * loader/archive/cf/LegacyWebArchive.cpp:
1109         (WebCore::LegacyWebArchive::create): Use nullptr
1110         (WebCore::LegacyWebArchive::createFromSelection): Ditto
1111
1112 2013-11-15  Jer Noble  <jer.noble@apple.com>
1113
1114         [MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation, MediaPlayerPrivateMediaSourceAVFObjC
1115         https://bugs.webkit.org/show_bug.cgi?id=123378
1116
1117         Reviewed by Eric Carlson.
1118
1119         Add an AVFoundation implementation of MediaPlayerPrivate which creates and uses
1120         MediaSourcePrivate and SourceBufferPrivate subclasses.
1121
1122         Add the new media engine to the list of installed engines:
1123         * platform/MediaSample.h:
1124         * platform/graphics/MediaPlayer.cpp:
1125         (WebCore::installedMediaEngines):
1126         * platform/graphics/MediaPlayer.h:
1127
1128         Add the new files to the project:
1129         * WebCore.xcodeproj/project.pbxproj:
1130
1131         Drive by fix for ports who implement seekDouble():
1132         * platform/graphics/MediaPlayerPrivate.h:
1133         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
1134
1135         Add new Video and AudioTrackPrivate types which handle their own enable state:
1136         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: Added
1137         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
1138         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
1139         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack):
1140         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::assetTrack):
1141         (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
1142         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Added
1143         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.cpp: Added.
1144         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
1145         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
1146         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack):
1147         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::assetTrack):
1148         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setSelected):
1149         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: Added.
1150
1151         Add a new MediaPlayerPrivate which can handle MediaSource objects:
1152         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Added.
1153         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Added.
1154         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1155         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
1156         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
1157         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create):
1158         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
1159         (WebCore::mimeTypeCache):
1160         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
1161         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
1162         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
1163         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
1164         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareToPlay):
1165         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformMedia):
1166         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
1167         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
1168         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
1169         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
1170         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
1171         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
1172         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsScanning):
1173         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
1174         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo):
1175         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio):
1176         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
1177         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
1178         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
1179         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble):
1180         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
1181         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
1182         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
1183         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
1184         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
1185         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::networkState):
1186         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::readyState):
1187         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
1188         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble):
1189         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable):
1190         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
1191         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress):
1192         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize):
1193         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
1194         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
1195         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame):
1196         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsAcceleratedRendering):
1197         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
1198         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType):
1199         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareForRendering):
1200         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):
1201         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::languageOfPrimaryAudioTrack):
1202         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::extraMemoryCost):
1203         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
1204         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
1205         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateDuration):
1206         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateStates):
1207         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
1208         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
1209         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
1210         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
1211
1212         Add a new MediaSourcePrivate implementation:
1213         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: Added.
1214         (WebCore::MediaSourcePrivateAVFObjC::player):
1215         (WebCore::MediaSourcePrivateAVFObjC::activeSourceBuffers):
1216         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Added.
1217         (WebCore::MediaSourcePrivateAVFObjC::create):
1218         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
1219         (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
1220         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
1221         (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):
1222         (WebCore::MediaSourcePrivateAVFObjC::duration):
1223         (WebCore::MediaSourcePrivateAVFObjC::setDuration):
1224         (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream):
1225         (WebCore::MediaSourcePrivateAVFObjC::unmarkEndOfStream):
1226         (WebCore::MediaSourcePrivateAVFObjC::readyState):
1227         (WebCore::MediaSourcePrivateAVFObjC::setReadyState):
1228         (WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState):
1229         (WebCore::MediaSourcePrivateAVFObjCHasAudio):
1230         (WebCore::MediaSourcePrivateAVFObjC::hasAudio):
1231         (WebCore::MediaSourcePrivateAVFObjCHasVideo):
1232         (WebCore::MediaSourcePrivateAVFObjC::hasVideo):
1233         (WebCore::MediaSourcePrivateAVFObjC::seekToTime):
1234
1235         Add a new SourceBufferPrivate implementation:
1236         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Added.
1237         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Added.
1238         (-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]):
1239         (-[WebAVStreamDataParserListener dealloc]):
1240         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
1241         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
1242         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
1243         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]):
1244         (WebCore::MediaSampleAVFObjC::create):
1245         (WebCore::MediaSampleAVFObjC::~MediaSampleAVFObjC):
1246         (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
1247         (WebCore::MediaSampleAVFObjC::platformSample):
1248         (WebCore::CMSampleBufferIsRandomAccess):
1249         (WebCore::MediaSampleAVFObjC::flags):
1250         (WebCore::MediaDescriptionAVFObjC::create):
1251         (WebCore::MediaDescriptionAVFObjC::~MediaDescriptionAVFObjC):
1252         (WebCore::MediaDescriptionAVFObjC::MediaDescriptionAVFObjC):
1253         (WebCore::SourceBufferPrivateAVFObjC::create):
1254         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
1255         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
1256         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1257         (WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
1258         (WebCore::callProcessCodedFrameForEachSample):
1259         (WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
1260         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
1261         (WebCore::SourceBufferPrivateAVFObjC::didReachEndOfTrackWithTrackID):
1262         (WebCore::SourceBufferPrivateAVFObjC::setClient):
1263         (WebCore::SourceBufferPrivateAVFObjC::append):
1264         (WebCore::SourceBufferPrivateAVFObjC::abort):
1265         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
1266         (WebCore::SourceBufferPrivateAVFObjC::readyState):
1267         (WebCore::SourceBufferPrivateAVFObjC::setReadyState):
1268         (WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames):
1269         (WebCore::SourceBufferPrivateAVFObjC::isFull):
1270         (WebCore::SourceBufferPrivateAVFObjC::hasVideo):
1271         (WebCore::SourceBufferPrivateAVFObjC::hasAudio):
1272         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1273         (WebCore::createNonDisplayingCopy):
1274         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
1275         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
1276         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
1277         (WebCore::SourceBufferPrivateAVFObjC::setActive):
1278         (WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
1279         (WebCore::SourceBufferPrivateAVFObjC::seekToTime):
1280         * platform/mac/PlatformClockCM.h:
1281
1282         Add a SOFT_LINK_CLASS_OPTIONAL macro:
1283         * platform/mac/SoftLinking.h:
1284
1285 2013-12-06  Alexey Proskuryakov  <ap@apple.com>
1286
1287         Remove some duplicate checks from SerializedScriptValue
1288         https://bugs.webkit.org/show_bug.cgi?id=125358
1289
1290         Reviewed by Geoffrey Garen.
1291
1292         There is no need to call inherits() before WebCore's toXXX(JSValue) functions.
1293
1294         Also, the result of toArrayBuffer() is a raw pointer, not a RefPtr (it's confusing
1295         because toArrayBufferView returns a RefPtr).
1296
1297         * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal):
1298
1299 2013-12-06  Tim Horton  <timothy_horton@apple.com>
1300
1301         Remove Image::decodedSize()
1302         https://bugs.webkit.org/show_bug.cgi?id=125327
1303
1304         Reviewed by Simon Fraser.
1305
1306         Missed a comment when removing this code.
1307
1308         * svg/graphics/SVGImage.h:
1309
1310 2013-12-06  Rob Buis  <rob.buis@samsung.com>
1311
1312         [CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets
1313         https://bugs.webkit.org/show_bug.cgi?id=124680
1314
1315         Reviewed by Dirk Schulze.
1316
1317         Do not take the writing-mode property on the float into account for shape-outside.
1318         Add a virtual method writingMode() in order to do this for shape-outside but
1319         keep old behavior (element writingMode) for shape-inside.
1320
1321         Change existing test floats/shape-outside-floats-different-writing-modes.html to test the
1322         new behavior.
1323
1324         * rendering/shapes/ShapeInfo.cpp:
1325         (WebCore::::computedShape):
1326         * rendering/shapes/ShapeInfo.h:
1327         (WebCore::ShapeInfo::writingMode):
1328         * rendering/shapes/ShapeOutsideInfo.cpp:
1329         (WebCore::ShapeOutsideInfo::writingMode):
1330         * rendering/shapes/ShapeOutsideInfo.h:
1331
1332 2013-12-06  Joseph Pecoraro  <pecoraro@apple.com>
1333
1334         Web Inspector: Remove Staging Workaround
1335         https://bugs.webkit.org/show_bug.cgi?id=125354
1336
1337         Reviewed by Timothy Hatcher.
1338
1339         * inspector/CodeGeneratorInspector.py:
1340
1341 2013-12-06  Joseph Pecoraro  <pecoraro@apple.com>
1342
1343         Simplify ScriptFunctionCall by removing dead code.
1344         https://bugs.webkit.org/show_bug.cgi?id=125274
1345
1346         Reviewed by Timothy Hatcher.
1347
1348         * bindings/js/ScriptFunctionCall.cpp:
1349         (WebCore::ScriptFunctionCall::call):
1350         * bindings/js/ScriptFunctionCall.h:
1351
1352 2013-12-06  Daniel Bates  <dabates@apple.com>
1353
1354         [iOS] Upstream WebCore/rendering changes
1355         https://bugs.webkit.org/show_bug.cgi?id=125239
1356
1357         Reviewed by Simon Fraser.
1358
1359         * WebCore.xcodeproj/project.pbxproj:
1360         * rendering/InlineBox.cpp:
1361         (WebCore::InlineBox::previousOnLineExists): Added.
1362         * rendering/InlineBox.h:
1363         * rendering/InlineTextBox.cpp:
1364         (WebCore::InlineTextBox::paintCompositionBackground): Modified to query RenderStyle
1365         on iOS for the composition fill color. Added FIXME to make this platform-independent.
1366         (WebCore::InlineTextBox::paintDecoration): Added iOS-specific decoration code.
1367         (WebCore::lineStyleForMarkerType):
1368         (WebCore::InlineTextBox::paintDocumentMarkers): Added iOS-specific code. Also, added
1369         FIXME to make this code platform-independent.
1370         * rendering/RenderBlock.cpp:
1371         (WebCore::RenderBlock::paint): Ditto.
1372         (WebCore::positionForPointRespectingEditingBoundaries): Added iOS-specific code.
1373         * rendering/RenderBlock.h: Changed access control of logical{Left, Right}SelectionOffset()
1374         from private to protected so that these methods can be used from RenderImage::collectSelectionRects().
1375         * rendering/RenderBox.cpp:
1376         (WebCore::RenderBox::borderRadii): Added.
1377         (WebCore::RenderBox::paintBoxDecorations): Added iOS-specific workaround. See <rdar://problem/6209763>
1378         for more details.
1379         (WebCore::RenderBox::computeRectForRepaint): Added iOS-specific code. 
1380         (WebCore::customContainingBlockWidth): Added; guarded by PLATFORM(IOS).
1381         (WebCore::customContainingBlockHeight): Added; guarded by PLATFORM(IOS).
1382         (WebCore::customContainingBlockLogicalWidth): Added; guarded by PLATFORM(IOS).
1383         (WebCore::customContainingBlockLogicalHeight): Added; guarded by PLATFORM(IOS).
1384         (WebCore::customContainingBlockAvailableLogicalHeight): Added; guarded by PLATFORM(IOS).
1385         (WebCore::RenderBox::availableLogicalHeightUsing): Added iOS-specific code; calls customContainingBlockAvailableLogicalHeight().
1386         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Added iOS-specific code; calls customContainingBlockLogicalWidth().
1387         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Added iOS-specific code; calls customContainingBlockLogicalHeight().
1388         (WebCore::RenderBox::layoutOverflowRectForPropagation): Added iOS-specific code.
1389         * rendering/RenderBox.h:
1390         * rendering/RenderBoxModelObject.cpp:
1391         (WebCore::RenderBoxModelObject::stickyPositionOffset): Use FrameView::customFixedPositionLayoutRect()
1392         instead of FrameView::viewportConstrainedVisibleContentRect().
1393         * rendering/RenderButton.cpp:
1394         (WebCore::RenderButton::layout): Added; iOS-specific. Includes FIXME comment.
1395         See <rdar://problem/7675493> for more details.
1396         * rendering/RenderElement.cpp:
1397         (WebCore::RenderElement::styleWillChange): Added iOS-specific code.
1398         (WebCore::RenderElement::styleDidChange): Modified to only call areCursorsEqual() and
1399         EventHandler::scheduleCursorUpdate() on a non-iOS port.
1400         * rendering/RenderEmbeddedObject.cpp:
1401         (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing): Added iOS-specific code.
1402         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason): This method has an empty implementation for iOS.
1403         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Ditto.
1404         * rendering/RenderFileUploadControl.cpp:
1405         (WebCore::nodeHeight):
1406         (WebCore::RenderFileUploadControl::maxFilenameWidth): Added iOS-specific code.
1407         (WebCore::RenderFileUploadControl::paintObject): Ditto.
1408         (WebCore::RenderFileUploadControl::fileTextValue): Ditto.
1409         * rendering/RenderFrameSet.cpp:
1410         (WebCore::RenderFrameSet::positionFrames): Ditto; Also added FIXME comment as this code may not
1411         be specific to iOS.
1412         * rendering/RenderIFrame.h: Added iOS-specific workaround to RenderObject::renderName(). Added
1413         FIXME comment to determine whether this workaround is still applicable.
1414         * rendering/RenderImage.cpp:
1415         (WebCore::RenderImage::collectSelectionRects): Added; guarded by PLATFORM(IOS).
1416         (WebCore::RenderImage::paintAreaElementFocusRing): This method has an empty implementation for iOS.
1417         * rendering/RenderImage.h:
1418         * rendering/RenderInline.cpp:
1419         (WebCore::RenderInline::absoluteQuadsForSelection): Added; guarded by PLATFORM(IOS).
1420         * rendering/RenderInline.h:
1421         * rendering/RenderLayer.cpp:
1422         (WebCore::RenderLayer::RenderLayer): Added iOS-specific member initialization.
1423         (WebCore::RenderLayer::~RenderLayer): Added iOS-specific code.
1424         (WebCore::RenderLayer::willBeDestroyed): Added; iOS-specific.
1425         (WebCore::RenderLayer::hasAcceleratedTouchScrolling): Ditto.
1426         (WebCore::RenderLayer::handleTouchEvent): Ditto.
1427         (WebCore::RenderLayer::registerAsTouchEventListenerForScrolling): Ditto.
1428         (WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling): Ditto.
1429         (WebCore::RenderLayer::updateNeedsCompositedScrolling): Added iOS-specific code as we use UIKit
1430         to composite our scroll bars.
1431         (WebCore::RenderLayer::scrollTo): Added iOS-specific code.
1432         (WebCore::RenderLayer::scrollRectToVisible): Ditto.
1433         (WebCore::RenderLayer::styleChanged): Modified to make use of the passed StyleDifference on iOS.
1434         (WebCore::RenderLayer::visibleContentRect): Added; iOS-specific.
1435         (WebCore::RenderLayer::didStartScroll): Ditto.
1436         (WebCore::RenderLayer::didEndScroll): Ditto.
1437         (WebCore::RenderLayer::didUpdateScroll): Ditto.
1438         (WebCore::RenderLayer::invalidateScrollbarRect): Added iOS-specific code.
1439         (WebCore::RenderLayer::invalidateScrollCornerRect): Ditto.
1440         (WebCore::RenderLayer::verticalScrollbarWidth): Ditto.
1441         (WebCore::RenderLayer::horizontalScrollbarHeight): Ditto.
1442         (WebCore::RenderLayer::updateScrollableAreaSet): Ditto.
1443         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add iOS-specific workaround with FIXME. See
1444         <rdar://problem/15579797> for more details.
1445         (WebCore::RenderLayer::paintOverflowControls): Added iOS-specific code.
1446         (WebCore::RenderLayer::calculateClipRects): Ditto.
1447         * rendering/RenderLayer.h:
1448         * rendering/RenderLayerBacking.cpp:
1449         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Modified to not apply page scale on iOS
1450         as we apply a page scale at a different time in the code.
1451         (WebCore::RenderLayerBacking::layerWillBeDestroyed): Added; guarded by PLATFORM(IOS).
1452         (WebCore::layerOrAncestorIsTransformedOrScrolling): Added iOS-specific variant with FIXME comment.
1453         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Added iOS-specific code.
1454         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Ditto.
1455         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Ditto.
1456         (WebCore::RenderLayerBacking::registerScrollingLayers): Ditto.
1457         (WebCore::RenderLayerBacking::updateScrollingLayers): Ditto.
1458         (WebCore::RenderLayerBacking::containsPaintedContent): Call RenderLayer::hasBoxDecorationsOrBackground()
1459         when building on iOS Simulator.
1460         (WebCore::RenderLayerBacking::parentForSublayers): Added iOS-specific code and FIXME comment.
1461         (WebCore::RenderLayerBacking::paintsIntoWindow): Opt-into coordinated graphics code path.
1462         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Added iOS-specific code.
1463         (WebCore::RenderLayerBacking::paintIntoLayer): Compile-out ASSERT_NOT_REACHED for iOS and added FIXME comment.
1464         * rendering/RenderLayerBacking.h:
1465         * rendering/RenderLayerCompositor.cpp:
1466         (WebCore::RenderLayerCompositor::scheduleLayerFlush): Added iOS-specific code.
1467         (WebCore::RenderLayerCompositor::chromeClient): Added; guarded by PLATFORM(IOS).
1468         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Added iOS-specific code.
1469         (WebCore::scrollbarHasDisplayNone): Added; iOS-specific.
1470         (WebCore::updateScrollingLayerWithClient): Ditto.
1471         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush): Ditto.
1472         (WebCore::RenderLayerCompositor::didFlushChangesForLayer): Added iOS-specific code.
1473         (WebCore::RenderLayerCompositor::didChangeVisibleRect): Ditto.
1474         (WebCore::RenderLayerCompositor::addToOverlapMap): Don't apply page scale factor on iOS. We apply
1475         the page scale factor at a different time in the code. Also, added FIXME comment.
1476         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Added iOS-specific workaround.
1477         See <rdar://problem/8348337> for more details.
1478         (WebCore::RenderLayerCompositor::setIsInWindow): Use non-Mac code path for iOS.
1479         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Added iOS-specific code.
1480         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Ditto.
1481         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Ditto.
1482         (WebCore::RenderLayerCompositor::reasonsForCompositing): Ditto.
1483         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): Opt-into calling
1484         AnimationController::isRunningAnimationOnRenderer() on iOS.
1485         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Added; guarded by PLATFORM(IOS).
1486         (WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Added iOS-specific code.
1487         (WebCore::isViewportConstrainedFixedOrStickyLayer): Ditto.
1488         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Use FrameView::customFixedPositionLayoutRect()
1489         instead of FrameView::viewportConstrainedVisibleContentRect().
1490         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Ditto.
1491         (WebCore::RenderLayerCompositor::ensureRootLayer): Ditto.
1492         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints): Use FrameView::customFixedPositionLayoutRect()
1493         instead of FrameView::viewportConstrainedVisibleContentRect().
1494         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Ditto.
1495         (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer): This method has an empty implementation for iOS
1496         as we batch update viewport-constrained layers in the iOS-specific method, RenderLayerCompositor::updateCustomLayersAfterFlush().
1497         (WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer): Ditto.
1498         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
1499         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Ditto.
1500         (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Ditto.
1501         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Ditto.
1502         (WebCore::RenderLayerCompositor::scrollingLayerAddedOrUpdated): Ditto.
1503         (WebCore::RenderLayerCompositor::scrollingLayerRemoved): Ditto.
1504         (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded): Ditto.
1505         * rendering/RenderLayerCompositor.h:
1506         * rendering/RenderLayerFilterInfo.h: Added iOS-specific Clang workaround to ignore
1507         an unused private field.
1508         * rendering/RenderMenuList.cpp:
1509         (WebCore::selectedOptionCount): Added; guarded by PLATFORM(IOS).
1510         (WebCore::RenderMenuList::RenderMenuList): On iOS we don't make use of RenderMenuList::m_popupIsVisible.
1511         (WebCore::RenderMenuList::~RenderMenuList): On iOS we don't make use of RenderMenuList::m_popup.
1512         (WebCore::RenderMenuList::adjustInnerStyle): Add iOS-specific code.
1513         (RenderMenuList::updateFromElement): On iOS we don't make use of RenderMenuList::m_popup.
1514         (RenderMenuList::setTextFromOption): Add iOS-specific code.
1515         (RenderMenuList::showPopup): Define RenderMenuList::showPopup() to ASSERT_NOT_REACHED() on iOS as
1516         we don't make use of RenderMenuList::m_popup.
1517         (RenderMenuList::hidePopup): This method has an empty implementation for iOS as we don't make use
1518         of RenderMenuList::m_popup.
1519         (RenderMenuList::popupDidHide): This method has an empty implementation for iOS as we don't make use
1520         of RenderMenuList::m_popupIsVisible.
1521         * rendering/RenderMenuList.h:
1522         * rendering/RenderObject.cpp:
1523         (WebCore::RenderObject::columnNumberForOffset): Added; guarded by PLATFORM(IOS). Also, added a FIXME comment to
1524         make this function return an unsigned integer instead of a signed integer.
1525         (WebCore::RenderObject::collectSelectionRects): Added; guarded by PLATFORM(IOS).
1526         (WebCore::RenderObject::destroy): Added iOS-specific code.
1527         (WebCore::RenderObject::innerLineHeight): Added.
1528         (WebCore::RenderObject::willRenderImage): Added iOS-specific code.
1529         * rendering/RenderObject.h: Change the access control of RenderObject::drawLineForBoxSide() from protected to
1530         public so that it can be used from RenderThemeIOS::adjustMenuListButtonStyle().
1531         (WebCore::RenderObject::absoluteQuadsForSelection):
1532         * rendering/RenderScrollbar.h: Change the access control of RenderScrollbar::getScrollbarPseudoStyle() from
1533         private to public so that it can be used from the iOS-specific static function, scrollbarHasDisplayNone,
1534         defined in RenderLayerCompositor.cpp.
1535         * rendering/RenderSearchField.cpp:
1536         (WebCore::RenderSearchField::itemText): Added iOS-specific code.
1537         * rendering/RenderText.cpp:
1538         (WebCore::RenderText::collectSelectionRects): Added; guarded by PLATFORM(IOS).
1539         (WebCore::RenderText::setTextInternal): Added iOS-specific code.
1540         * rendering/RenderText.h:
1541         * rendering/RenderTextControl.cpp:
1542         (WebCore::RenderTextControl::adjustInnerTextStyle): Ditto.
1543         (WebCore::RenderTextControl::canScroll): Added; guarded by PLATFORM(IOS).
1544         (WebCore::RenderTextControl::innerLineHeight): Ditto.
1545         * rendering/RenderTextControl.h:
1546         * rendering/RenderTextControlMultiLine.cpp:
1547         (WebCore::RenderTextControlMultiLine::getAvgCharWidth): Compile-out code when building for iOS.
1548         (WebCore::RenderTextControlMultiLine::createInnerTextStyle): Added iOS-specific code.
1549         * rendering/RenderTextControlSingleLine.cpp:
1550         (WebCore::RenderTextControlSingleLine::layout): Ditto.
1551         (WebCore::RenderTextControlSingleLine::getAvgCharWidth): Compile-out code when building for iOS.
1552         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth): Ditto.
1553         * rendering/RenderTextLineBoxes.cpp:
1554         (WebCore::lineDirectionPointFitsInBox): Ditto.
1555         (WebCore::RenderTextLineBoxes::positionForPoint): Added iOS-specific code.
1556         * rendering/RenderTheme.cpp:
1557         (WebCore::RenderTheme::paintBorderOnly): Ditto.
1558         (WebCore::RenderTheme::paintDecorations): Modified to call the control-specific paint*Decorations().
1559         * rendering/RenderTheme.h:
1560         (WebCore::RenderTheme::paintCheckboxDecorations): Added.
1561         (WebCore::RenderTheme::paintRadioDecorations): Added.
1562         (WebCore::RenderTheme::paintButtonDecorations): Added.
1563         (WebCore::RenderTheme::paintTextFieldDecorations): Added.
1564         (WebCore::RenderTheme::paintTextAreaDecorations): Added.
1565         (WebCore::RenderTheme::paintMenuListDecorations): Added.
1566         (WebCore::RenderTheme::paintPushButtonDecorations): Added.
1567         (WebCore::RenderTheme::paintSquareButtonDecorations): Added.
1568         (WebCore::RenderTheme::paintFileUploadIconDecorations): Added.
1569         (WebCore::RenderTheme::paintSliderThumbDecorations): Added.
1570         (WebCore::RenderTheme::paintSearchFieldDecorations): Added.
1571         * rendering/RenderThemeIOS.h: Added.
1572         * rendering/RenderThemeIOS.mm: Added.
1573         * rendering/RenderThemeMac.h: Don't compile the contents of this file when building for iOS.
1574         * rendering/RenderThemeMac.mm: Ditto.
1575         * rendering/RenderVideo.cpp:
1576         (WebCore::RenderVideo::calculateIntrinsicSize): Compile-out code when building for iOS.
1577         * rendering/RenderView.cpp:
1578         (WebCore::RenderView::availableLogicalHeight): Add iOS-specific workaround. See <rdar://problem/7166808>.
1579         (WebCore::fixedPositionOffset): Added; used in iOS-specific code (e.g. RenderView::mapLocalToContainer()).
1580         (WebCore::RenderView::mapLocalToContainer): Use WebCore::fixedPositionOffset() instead of 
1581         FrameView::scrollOffsetForFixedPosition().
1582         (WebCore::RenderView::pushMappingToContainer): Ditto.
1583         (WebCore::RenderView::mapAbsoluteToLocalPoint): Ditto.
1584         (WebCore::RenderView::repaintViewRectangle): Ditto.
1585         (WebCore::RenderView::computeRectForRepaint): Ditto.
1586         (WebCore::isFixedPositionInViewport): Added; used in RenderView::hasCustomFixedPosition().
1587         (WebCore::RenderView::hasCustomFixedPosition): Added; guarded by PLATFORM(IOS).
1588         * rendering/RenderView.h:
1589         * rendering/RenderWidget.cpp:
1590         (WebCore::RenderWidget::willBeDestroyed): Added iOS-specific code.
1591         * rendering/RootInlineBox.cpp:
1592         (WebCore::RootInlineBox::ascentAndDescentForBox): Ditto.
1593         * rendering/break_lines.cpp: Only include header <CoreServices/CoreServices.h> when building for Mac.
1594
1595 2013-12-06  Zoltan Horvath  <zoltan@webkit.org>
1596
1597         Clean up the includes of RenderBlock.h 
1598         https://bugs.webkit.org/show_bug.cgi?id=125351
1599
1600         Reviewed by Darin Adler.
1601
1602         I turned some header includes into forward declarations. I also removed / 
1603         moved out some includes, which don't belong to RenderBlock.h anymore.
1604
1605         No new tests, no behavior change.
1606
1607         * editing/VisibleUnits.cpp:
1608         * html/HTMLInputElement.cpp:
1609         * html/HTMLTextAreaElement.cpp:
1610         * html/TextFieldInputType.cpp:
1611         * html/TextInputType.cpp:
1612         * rendering/InlineElementBox.cpp:
1613         * rendering/RenderBlock.h:
1614         * rendering/RenderBlockFlow.cpp:
1615         * rendering/line/LineBreaker.h:
1616         * rendering/line/LineWidth.cpp:
1617
1618 2013-12-06  Laszlo Vidacs  <lac@inf.u-szeged.hu>
1619
1620         Define SHA1 hash size in SHA1.h and use it at various places.
1621         https://bugs.webkit.org/show_bug.cgi?id=125345
1622
1623         Reviewed by Darin Adler.
1624
1625         Use SHA1::hashSize instead of local variables.
1626
1627         * Modules/websockets/WebSocketHandshake.cpp:
1628         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
1629         * platform/network/soup/ResourceHandleSoup.cpp:
1630         (WebCore::HostTLSCertificateSet::computeCertificateHash):
1631
1632 2013-12-06  Dan Bernstein  <mitz@apple.com>
1633
1634         [Cocoa] Add load delegate methods for responding to authentication challenges
1635         https://bugs.webkit.org/show_bug.cgi?id=125333
1636
1637         Reviewed by Darin Adler.
1638
1639         * WebCore.exp.in: Exported core(NSURLCredential *).
1640
1641 2013-12-06  Daniel Bates  <dabates@apple.com>
1642
1643         Rename {adjust, paint}SearchFieldDecoration, {adjust, paint}SearchFieldResultsDecoration
1644         https://bugs.webkit.org/show_bug.cgi?id=125191
1645
1646         Reviewed by Joseph Pecoraro.
1647
1648         Towards upstreaming the iOS concept of render theme decorations, we should rename
1649         RenderTheme::{adjust, paint}SearchFieldDecorationStyle and RenderTheme::{adjust, paint}SearchFieldResultsDecoration
1650         to avoid ambiguity with the iOS concept.
1651
1652         * platform/efl/RenderThemeEfl.cpp:
1653         * platform/efl/RenderThemeEfl.h:
1654         * platform/gtk/RenderThemeGtk.cpp:
1655         * platform/gtk/RenderThemeGtk.h:
1656         * rendering/RenderTheme.cpp:
1657         * rendering/RenderTheme.h:
1658         * rendering/RenderThemeMac.h:
1659         * rendering/RenderThemeMac.mm:
1660         * rendering/RenderThemeSafari.cpp:
1661         * rendering/RenderThemeSafari.h:
1662         * rendering/RenderThemeWin.cpp:
1663         * rendering/RenderThemeWin.h:
1664         * rendering/RenderThemeWinCE.cpp:
1665         * rendering/RenderThemeWinCE.h:
1666
1667 2013-12-06  Andreas Kling  <akling@apple.com>
1668
1669         Make remaining CSSValue constructors return PassRef.
1670         <https://webkit.org/b/125337>
1671
1672         Tweak the remaining CSSValue create() helpers to return PassRef
1673         instead of PassRefPtr in the cases where nullptr is never returned.
1674
1675         Reviewed by Anders Carlsson.
1676
1677 2013-12-06  Roger Fong  <roger_fong@apple.com>
1678
1679         Hook into some shader symbol logic following the ANGLE update in r159533.
1680         https://bugs.webkit.org/show_bug.cgi?id=125332.
1681
1682         Reviewed by Brent Fulgham.
1683
1684         No new functionality added.
1685
1686         * html/canvas/WebGLRenderingContext.cpp: Add some error checking for errors related to 
1687             shader symbols that exist across both vertex and fragment shaders.
1688         (WebCore::WebGLRenderingContext::linkProgram):
1689         * platform/graphics/ANGLEWebKitBridge.cpp: Add logic for handling varyings 
1690             and add new fields to the ANGLEShaderSymbol struct.
1691         (WebCore::getSymbolInfo):
1692         * platform/graphics/ANGLEWebKitBridge.h:
1693         * platform/graphics/GraphicsContext3D.h: Add those same fields to the SymbolInfo struct 
1694             as well so that we can access them from our shader source map.
1695             Also add a map of varyings along side the uniforms and attributes.
1696         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
1697         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
1698         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1699         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1700         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1701         (WebCore::GraphicsContext3D::areProgramSymbolsValid): Will be filled in later, this method 
1702             will use the shader source map to check for issues with unused varyings and precisions 
1703             mismatches of shader symbols that exist across both the vertex and fragment shaders.
1704
1705 2013-12-06  Lukasz Gajowy  <l.gajowy@samsung.com>
1706
1707         [ATK] Missing aria roles mappings
1708         https://bugs.webkit.org/show_bug.cgi?id=117729
1709
1710         Reviewed by Mario Sanchez Prada.
1711
1712         Added a few mappings from ARIA roles to ATK roles.
1713
1714         Test: accessibility/aria-mappings.html
1715
1716         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1717         (atkRole):
1718
1719 2013-11-11  Philippe Normand  <pnormand@igalia.com>
1720
1721         [GStreamer] webkitwebaudiosrc element needs to emit stream-start, caps and segment events
1722         https://bugs.webkit.org/show_bug.cgi?id=123015
1723
1724         Reviewed by Martin Robinson.
1725
1726         When the source element starts emitting buffers send along various
1727         events to notify downstream elements.
1728
1729         No new tests, change covered by existing webaudio tests.
1730
1731         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1732         (webkit_web_audio_src_init): Initialize segment.
1733         (webKitWebAudioSrcConstructed): Give an explicit name to each
1734         queue added in front of the interleave element.
1735         (webKitWebAudioSrcLoop): Before sending the first buffers push
1736         stream-start, caps and segment events on each queue's sinkpad.
1737
1738 2013-12-05  Philippe Normand  <pnormand@igalia.com>
1739
1740         [GStreamer] Audio/Video sink management is incoherent
1741         https://bugs.webkit.org/show_bug.cgi?id=125304
1742
1743         Reviewed by Gustavo Noronha Silva.
1744
1745         Allow subclasses of MediaPlayerPrivateGStreamerBase to create
1746         custom audio/video sinks in a coherent manner using
1747         create{Audio,Video}Sink methods. Convenience getters are also
1748         available. Also removed some un-needed member variables in the
1749         playbin-based player.
1750
1751         No new tests, existing media tests cover this change.
1752
1753         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1754         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1755         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
1756         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
1757         (WebCore::MediaPlayerPrivateGStreamer::audioSink):
1758         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1759         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1760         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1761         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1762         (WebCore::MediaPlayerPrivateGStreamerBase::createAudioSink):
1763
1764 2013-12-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1765
1766         Introduce IMAGE_TYPE_CASTS, and use it
1767         https://bugs.webkit.org/show_bug.cgi?id=125330
1768
1769         Reviewed by Ryosuke Niwa.
1770
1771         As a step to use TYPE_CASTS_BASE, this cl introduce IMAGE_TYPE_CASTS.
1772         BitmapImage and SVGImage can use it to generate toFoo() type case helper functions.
1773
1774         No new tests, no behavior changes.
1775
1776         * loader/cache/CachedImage.cpp:
1777         (WebCore::CachedImage::imageSizeForRenderer):
1778         (WebCore::CachedImage::resumeAnimatingImagesForLoader):
1779         * platform/graphics/BitmapImage.h:
1780         * platform/graphics/Image.h:
1781         * platform/mac/DragImageMac.mm:
1782         (WebCore::createDragImageFromImage):
1783         * svg/graphics/SVGImage.h:
1784
1785 2013-12-05  Zoltan Horvath  <zoltan@webkit.org>
1786
1787         Clean up the forwarding headers of RenderBlock.h
1788         https://bugs.webkit.org/show_bug.cgi?id=125323
1789
1790         Reviewed by Ryosuke Niwa.
1791
1792         In this patch, I removed the unnecessary forwarding headers from RenderBlock.h, and moved some to RenderBlockFlow.h.
1793
1794         No new tests, no behavior change.
1795
1796         * rendering/RenderBlock.h: Remove unnecessary forwarding headers.
1797         * rendering/RenderBlockFlow.h: Moved some forwarding headers from RenderBlock.h
1798
1799 2013-12-04  Oliver Hunt  <oliver@apple.com>
1800
1801         Refactor static getter function prototype to include thisValue in addition to the base object
1802         https://bugs.webkit.org/show_bug.cgi?id=124461
1803
1804         Reviewed by Geoffrey Garen.
1805
1806         Change bindings codegen to produce static getter functions
1807         with the correct types.  Also update the many custom implementations
1808         to the new type.
1809
1810         No change in behaviour.
1811
1812         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1813         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
1814         (WebCore::cssPropertyGetterCallback):
1815         * bindings/js/JSDOMBinding.cpp:
1816         (WebCore::objectToStringFunctionGetter):
1817         * bindings/js/JSDOMBinding.h:
1818         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
1819         (WebCore::JSDOMMimeTypeArray::nameGetter):
1820         * bindings/js/JSDOMPluginArrayCustom.cpp:
1821         (WebCore::JSDOMPluginArray::nameGetter):
1822         * bindings/js/JSDOMPluginCustom.cpp:
1823         (WebCore::JSDOMPlugin::nameGetter):
1824         * bindings/js/JSDOMStringMapCustom.cpp:
1825         (WebCore::JSDOMStringMap::nameGetter):
1826         * bindings/js/JSDOMWindowCustom.cpp:
1827         (WebCore::nonCachingStaticFunctionGetter):
1828         (WebCore::childFrameGetter):
1829         (WebCore::indexGetter):
1830         (WebCore::namedItemGetter):
1831         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1832         (WebCore::JSHTMLAllCollection::nameGetter):
1833         * bindings/js/JSHTMLCollectionCustom.cpp:
1834         (WebCore::JSHTMLCollection::nameGetter):
1835         * bindings/js/JSHTMLDocumentCustom.cpp:
1836         (WebCore::JSHTMLDocument::nameGetter):
1837         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1838         (WebCore::JSHTMLFormControlsCollection::nameGetter):
1839         * bindings/js/JSHTMLFormElementCustom.cpp:
1840         (WebCore::JSHTMLFormElement::nameGetter):
1841         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1842         (WebCore::JSHTMLFrameSetElement::nameGetter):
1843         * bindings/js/JSHistoryCustom.cpp:
1844         (WebCore::nonCachingStaticBackFunctionGetter):
1845         (WebCore::nonCachingStaticForwardFunctionGetter):
1846         (WebCore::nonCachingStaticGoFunctionGetter):
1847         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1848         (WebCore::JSJavaScriptCallFrame::scopeType):
1849         * bindings/js/JSLocationCustom.cpp:
1850         (WebCore::nonCachingStaticReplaceFunctionGetter):
1851         (WebCore::nonCachingStaticReloadFunctionGetter):
1852         (WebCore::nonCachingStaticAssignFunctionGetter):
1853         * bindings/js/JSNamedNodeMapCustom.cpp:
1854         (WebCore::JSNamedNodeMap::nameGetter):
1855         * bindings/js/JSNodeListCustom.cpp:
1856         (WebCore::JSNodeList::nameGetter):
1857         * bindings/js/JSPluginElementFunctions.cpp:
1858         (WebCore::pluginElementPropertyGetter):
1859         * bindings/js/JSPluginElementFunctions.h:
1860         * bindings/js/JSRTCStatsResponseCustom.cpp:
1861         (WebCore::JSRTCStatsResponse::nameGetter):
1862         * bindings/js/JSStorageCustom.cpp:
1863         (WebCore::JSStorage::nameGetter):
1864         * bindings/js/JSStyleSheetListCustom.cpp:
1865         (WebCore::JSStyleSheetList::nameGetter):
1866         * bindings/scripts/CodeGeneratorJS.pm:
1867         (GenerateHeader):
1868         (GenerateImplementation):
1869         (GenerateParametersCheck):
1870         * bridge/runtime_array.cpp:
1871         (JSC::RuntimeArray::lengthGetter):
1872         (JSC::RuntimeArray::indexGetter):
1873         * bridge/runtime_array.h:
1874         * bridge/runtime_method.cpp:
1875         (JSC::RuntimeMethod::lengthGetter):
1876         * bridge/runtime_method.h:
1877         * bridge/runtime_object.cpp:
1878         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
1879         (JSC::Bindings::RuntimeObject::fieldGetter):
1880         (JSC::Bindings::RuntimeObject::methodGetter):
1881         * bridge/runtime_object.h:
1882
1883 2013-12-05  Tim Horton  <timothy_horton@apple.com>
1884
1885         Remove Image::decodedSize()
1886         https://bugs.webkit.org/show_bug.cgi?id=125327
1887
1888         Reviewed by Sam Weinig.
1889
1890         No new tests, just removing dead code.
1891
1892         * platform/graphics/BitmapImage.cpp:
1893         (WebCore::BitmapImage::resetAnimation):
1894         * platform/graphics/BitmapImage.h:
1895         * platform/graphics/GeneratedImage.h:
1896         * platform/graphics/Image.h:
1897         * platform/graphics/cg/PDFDocumentImage.cpp:
1898         * platform/graphics/cg/PDFDocumentImage.h:
1899         * svg/graphics/SVGImage.h:
1900         * svg/graphics/SVGImageForContainer.h:
1901
1902 2013-12-05  Commit Queue  <commit-queue@webkit.org>
1903
1904         Unreviewed, rolling out r160133.
1905         http://trac.webkit.org/changeset/160133
1906         https://bugs.webkit.org/show_bug.cgi?id=125325
1907
1908         broke bindings tests on all the bots (Requested by thorton on
1909         #webkit).
1910
1911         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1912         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
1913         (WebCore::cssPropertyGetterCallback):
1914         * bindings/js/JSDOMBinding.cpp:
1915         (WebCore::objectToStringFunctionGetter):
1916         * bindings/js/JSDOMBinding.h:
1917         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
1918         (WebCore::JSDOMMimeTypeArray::nameGetter):
1919         * bindings/js/JSDOMPluginArrayCustom.cpp:
1920         (WebCore::JSDOMPluginArray::nameGetter):
1921         * bindings/js/JSDOMPluginCustom.cpp:
1922         (WebCore::JSDOMPlugin::nameGetter):
1923         * bindings/js/JSDOMStringMapCustom.cpp:
1924         (WebCore::JSDOMStringMap::nameGetter):
1925         * bindings/js/JSDOMWindowCustom.cpp:
1926         (WebCore::nonCachingStaticFunctionGetter):
1927         (WebCore::childFrameGetter):
1928         (WebCore::indexGetter):
1929         (WebCore::namedItemGetter):
1930         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1931         (WebCore::JSHTMLAllCollection::nameGetter):
1932         * bindings/js/JSHTMLCollectionCustom.cpp:
1933         (WebCore::JSHTMLCollection::nameGetter):
1934         * bindings/js/JSHTMLDocumentCustom.cpp:
1935         (WebCore::JSHTMLDocument::nameGetter):
1936         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1937         (WebCore::JSHTMLFormControlsCollection::nameGetter):
1938         * bindings/js/JSHTMLFormElementCustom.cpp:
1939         (WebCore::JSHTMLFormElement::nameGetter):
1940         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1941         (WebCore::JSHTMLFrameSetElement::nameGetter):
1942         * bindings/js/JSHistoryCustom.cpp:
1943         (WebCore::nonCachingStaticBackFunctionGetter):
1944         (WebCore::nonCachingStaticForwardFunctionGetter):
1945         (WebCore::nonCachingStaticGoFunctionGetter):
1946         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1947         (WebCore::JSJavaScriptCallFrame::scopeType):
1948         * bindings/js/JSLocationCustom.cpp:
1949         (WebCore::nonCachingStaticReplaceFunctionGetter):
1950         (WebCore::nonCachingStaticReloadFunctionGetter):
1951         (WebCore::nonCachingStaticAssignFunctionGetter):
1952         * bindings/js/JSNamedNodeMapCustom.cpp:
1953         (WebCore::JSNamedNodeMap::nameGetter):
1954         * bindings/js/JSNodeListCustom.cpp:
1955         (WebCore::JSNodeList::nameGetter):
1956         * bindings/js/JSPluginElementFunctions.cpp:
1957         (WebCore::pluginElementPropertyGetter):
1958         * bindings/js/JSPluginElementFunctions.h:
1959         * bindings/js/JSRTCStatsResponseCustom.cpp:
1960         (WebCore::JSRTCStatsResponse::nameGetter):
1961         * bindings/js/JSStorageCustom.cpp:
1962         (WebCore::JSStorage::nameGetter):
1963         * bindings/js/JSStyleSheetListCustom.cpp:
1964         (WebCore::JSStyleSheetList::nameGetter):
1965         * bindings/scripts/CodeGeneratorJS.pm:
1966         (GenerateHeader):
1967         (GenerateImplementation):
1968         (GenerateParametersCheck):
1969         * bridge/runtime_array.cpp:
1970         (JSC::RuntimeArray::lengthGetter):
1971         (JSC::RuntimeArray::indexGetter):
1972         * bridge/runtime_array.h:
1973         * bridge/runtime_method.cpp:
1974         (JSC::RuntimeMethod::lengthGetter):
1975         * bridge/runtime_method.h:
1976         * bridge/runtime_object.cpp:
1977         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
1978         (JSC::Bindings::RuntimeObject::fieldGetter):
1979         (JSC::Bindings::RuntimeObject::methodGetter):
1980         * bridge/runtime_object.h:
1981
1982 2013-12-05  Seokju Kwon  <seokju@webkit.org>
1983
1984         Web Inspector: Remove 'cookiesString' output from Page.getCookies
1985         https://bugs.webkit.org/show_bug.cgi?id=125268
1986
1987         Reviewed by Timothy Hatcher.
1988
1989         Remove 'cookiesString' output from Page.getCookies protocol.
1990         It is no longer meaningful because it is an unused parameter.
1991
1992         No new tests, no behavior change.
1993
1994         * inspector/InspectorPageAgent.cpp:
1995         (WebCore::InspectorPageAgent::getCookies):
1996         * inspector/InspectorPageAgent.h:
1997         * inspector/protocol/Page.json:
1998
1999 2013-12-05  Brian J. Burg  <burg@cs.washington.edu>
2000
2001         Web Inspector: expose node and frame snapshot capabilities.
2002         https://bugs.webkit.org/show_bug.cgi?id=124326
2003
2004         Reviewed by Joseph Pecoraro.
2005
2006         This adds snapshotRect() and snapshotNode() to the Page domain.
2007         Both methods create snapshots using FrameSnapshotting APIs
2008         and send images to the inspector frontend as a data URL.
2009
2010         Remove the unimplemented Page.captureScreenshot API.
2011
2012         * inspector/InspectorPageAgent.cpp:
2013         (WebCore::InspectorPageAgent::snapshotNode): Added.
2014         (WebCore::InspectorPageAgent::snapshotRect): Added.
2015         * inspector/InspectorPageAgent.h:
2016         * inspector/protocol/Page.json: Added new protocol APIs.
2017
2018 2013-12-04 Bear Travis <betravis@adobe.com>
2019
2020     [CSS Shapes] Enable CSS Shapes on Windows
2021     https://bugs.webkit.org/show_bug.cgi?id=89957
2022
2023     Reviewed by Brent Fulgham.
2024
2025     * css/CSSPropertyNames.in: Tweak to ensure shapes properties are regenerated.
2026
2027 2013-12-05  Roger Fong  <roger_fong@apple.com>
2028
2029         [WebGL] Make sure we satisfy uniform and varying packing restrictions.
2030         https://bugs.webkit.org/show_bug.cgi?id=125124.
2031         <rdar://problem/15203291>
2032
2033         Reviewed by Brent Fulgham.
2034
2035         Tests covered by WebGL Khronos conformance tests:
2036         webgl/1.0.2/conformance/glsl/misc/shader-uniform-packing-restrictions.html
2037         webgl/1.0.2/conformance/glsl/misc/shader-varying-packing-restrictions.html
2038
2039         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2040         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2041
2042 2013-12-05  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2043
2044         32bit buildfix after r160151
2045         https://bugs.webkit.org/show_bug.cgi?id=125298
2046
2047         Reviewed by Csaba Osztrogonác.
2048
2049         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2050         (StreamingClient::handleDataReceived):
2051
2052 2013-12-05  Myles C. Maxfield  <mmaxfield@apple.com>
2053
2054         Cropping and drawing ImageBuffers results in uninitialized data being shown
2055         https://bugs.webkit.org/show_bug.cgi?id=125271
2056
2057         Reviewed by Simon Fraser.
2058
2059         createCroppedImageIfNecessary() crops to the bottom left of the ImageBuffer
2060         backing store instead of the top left. In addition, ImageBuffer::draw()
2061         draws the entire ImageBuffer's backing store instead of just the relevant
2062         portion of it.
2063
2064         No new tests are necessary because the existing tests already test this
2065         functionality
2066
2067         * platform/graphics/cg/ImageBufferCG.cpp:
2068         (WebCore::createCroppedImageIfNecessary): Crop to the top left of the
2069         backing store 
2070         (WebCore::ImageBuffer::draw): Draw only the logical portion of the
2071         backing store 
2072
2073 2013-12-05  Joseph Pecoraro  <pecoraro@apple.com>
2074
2075         Remove stale ScriptGlobalObject methods
2076         https://bugs.webkit.org/show_bug.cgi?id=125276
2077
2078         Reviewed by Sam Weinig.
2079
2080         * bindings/js/ScriptObject.cpp:
2081         (WebCore::ScriptGlobalObject::set):
2082         * bindings/js/ScriptObject.h:
2083
2084 2013-12-04  Ryosuke Niwa  <rniwa@webkit.org>
2085
2086         Change how the form element pointer affects parsing template elements, to reduce weirdness in templates
2087         https://bugs.webkit.org/show_bug.cgi?id=125279
2088
2089         Reviewed by Antti Koivisto.
2090
2091         Faithfully update the HTML5 parser after http://html5.org/tools/web-apps-tracker?from=8330&to=8331.
2092
2093         Test: fast/dom/HTMLTemplateElement/no-form-association-2.html
2094
2095         * html/parser/HTMLConstructionSite.cpp:
2096         (WebCore::HTMLConstructionSite::insertHTMLFormElement): Don't the form element pointer if the context
2097         element or its ancestor is a template element.
2098         (WebCore::HTMLConstructionSite::insideTemplateElement): Added.
2099         (WebCore::HTMLConstructionSite::createHTMLElement): Renamed openElementsContainTemplateElement to
2100         insideTemplateElement to reflect the true semantics of the boolean.
2101
2102         * html/parser/HTMLConstructionSite.h:
2103
2104         * html/parser/HTMLTreeBuilder.cpp:
2105         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ignore the form element pointer if there
2106         is a template element on the stack of open elements. This faithfully reflects what's being said in the
2107         specification. We should probably make isParsingTemplateContents more efficient by storing a boolean
2108         and then wrap from() in some helper function but that should probbaly happen in a separate patch.
2109         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
2110         (WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
2111         (WebCore::HTMLTreeBuilder::processEndTagForInBody): Don't unset or rely on the form element pointer
2112         when there is a template element on the stack of open elements.
2113
2114         * html/parser/HTMLTreeBuilder.h:
2115         (WebCore::HTMLTreeBuilder::isParsingTemplateContents): Added a trivial implementation for when
2116         TEMPLATE_ELEMENT is disabled.
2117         (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents): Merged two implementations.
2118
2119 2013-12-05  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2120
2121         [MediaStream] Firing negotiationneeded event upon track add/remove on MediaStream
2122         https://bugs.webkit.org/show_bug.cgi?id=125243
2123
2124         Reviewed by Eric Carlson.
2125
2126         Spec states that: In particular, if an RTCPeerConnection object is consuming a MediaStream on which a track is
2127         added, by, e.g., the addTrack() method being invoked, the RTCPeerConnection object must fire the
2128         "negotiationneeded" event. Removal of media components must also trigger "negotiationneeded".
2129
2130         Existing tests updated.
2131
2132         * Modules/mediastream/MediaStream.cpp:
2133         (WebCore::MediaStream::addTrack):
2134         (WebCore::MediaStream::removeTrack):
2135         (WebCore::MediaStream::addObserver):
2136         (WebCore::MediaStream::removeObserver):
2137         * Modules/mediastream/MediaStream.h:
2138         * Modules/mediastream/RTCPeerConnection.cpp:
2139         (WebCore::RTCPeerConnection::~RTCPeerConnection):
2140         (WebCore::RTCPeerConnection::addStream):
2141         (WebCore::RTCPeerConnection::removeStream):
2142         (WebCore::RTCPeerConnection::didAddOrRemoveTrack):
2143         * Modules/mediastream/RTCPeerConnection.h:
2144         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2145         (WebCore::RTCPeerConnectionHandlerMock::addStream):
2146
2147 2013-12-05  Beth Dakin  <bdakin@apple.com>
2148
2149         Bad repaints on twitter when the tile cache has a margin
2150         https://bugs.webkit.org/show_bug.cgi?id=125263
2151         -and corresponding-
2152         <rdar://problem/15576884>
2153
2154         Reviewed by Tim Horton.
2155
2156         When tiles that used to be margin tiles become real-content tiles, they need to be 
2157         invalidated.
2158
2159         Two new helper functions will make it so that we don’t have to manually factor out 
2160         the margin from the bounds in more than one place in the code.
2161         * platform/graphics/ca/mac/TileController.h:
2162         * platform/graphics/ca/mac/TileController.mm:
2163         (WebCore::TileController::boundsWithoutMargin):
2164         (WebCore::TileController::boundsAtLastRevalidateWithoutMargin):
2165
2166          Here is one existing place where we used to factor out the margin, but now we can 
2167         call boundsWithoutMargin().
2168         (WebCore::TileController::adjustRectAtTileIndexForMargin):
2169
2170         And here is where we invalidate the formerly-margin tiles.
2171         (WebCore::TileController::revalidateTiles):
2172
2173 2013-12-05  Zoltan Horvath  <zoltan@webkit.org>
2174
2175         Remove the forward declaration of BidiContext class from RenderBlock.h
2176         https://bugs.webkit.org/show_bug.cgi?id=125265
2177
2178         Reviewed by Csaba Osztrogonác.
2179
2180         No new tests, no behavior change.
2181
2182         * rendering/RenderBlock.h: BidiContext is not used in RenderBlock.h
2183
2184 2013-12-05  Aloisio Almeida Jr  <aloisio.almeida@openbossa.org>
2185
2186         [Cairo] Avoid extra copy when drawing images
2187         https://bugs.webkit.org/show_bug.cgi?id=124209
2188
2189         Reviewed by Carlos Garcia Campos.
2190
2191         This commit applies some changes proposed after the original patch has
2192         been landed. It fixes the logic to create the subsurface (as it was
2193         inverted). It also remove an unnecessary RefPtr variable to hold the
2194         subsurface.
2195
2196         No new tests. It's an enhancement. Already covered by existing tests.
2197
2198         * platform/graphics/cairo/PlatformContextCairo.cpp:
2199         (WebCore::PlatformContextCairo::drawSurfaceToContext):
2200
2201 2013-12-05  Zoltan Horvath  <zoltan@webkit.org>
2202
2203         [CSS Shapes] Fix inset when only a subset of the arguments are defined
2204         https://bugs.webkit.org/show_bug.cgi?id=125277
2205
2206         Reviewed by David Hyatt.
2207
2208        I thought Length's default value is fixed-0, but actually it's auto-0. For the optional arguments
2209        of inset shape, we need to use fixed-0, so I updated the code and the tests to use that explicitly.
2210
2211         No new tests, I updated the old ones.
2212
2213         * css/BasicShapeFunctions.cpp:
2214         (WebCore::basicShapeForValue):
2215
2216 2013-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2217
2218         [GTK] Do not use deprecated gtk-doc 'Rename to' tag
2219         https://bugs.webkit.org/show_bug.cgi?id=125303
2220
2221         Reviewed by Philippe Normand.
2222
2223         GObject introspection rename-to annotation is available in
2224         since version 0.6.3 so we should use that instead.
2225
2226         * bindings/gobject/WebKitDOMEventTarget.h:
2227
2228 2013-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2229
2230         [GTK] Add missing symbols to WebKitDOMDeprecated.symbols
2231         https://bugs.webkit.org/show_bug.cgi?id=125300
2232
2233         Reviewed by Philippe Normand.
2234
2235         Add webkit_dom_html_element_get_id and
2236         webkit_dom_html_element_set_id to the symbols files.
2237
2238         * bindings/gobject/WebKitDOMDeprecated.symbols:
2239         * bindings/gobject/webkitdom.symbols:
2240
2241 2013-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2242
2243         Unreviewed. Update GObject DOM bindings symbols file after r159711.
2244
2245         * bindings/gobject/webkitdom.symbols:
2246
2247 2013-12-05  Zan Dobersek  <zdobersek@igalia.com>
2248
2249         [GTK] Move platform sources free of layering violations under libPlatform
2250         https://bugs.webkit.org/show_bug.cgi?id=117509
2251
2252         Reviewed by Carlos Garcia Campos.
2253
2254         * GNUmakefile.list.am: Move additional source files located in the platform layer under libPlatform.
2255         All moved sources are free of layering violations and thus ready for the migration.
2256
2257 2013-12-05  László Langó  <lango@inf.u-szeged.hu>
2258
2259         Remove bridge/testqtbindings.cpp.
2260         https://bugs.webkit.org/show_bug.cgi?id=125287
2261
2262         Reviewed by Alexey Proskuryakov.
2263
2264         * bridge/testqtbindings.cpp: Removed. There is no QT anymore.
2265         We don't need this file.
2266
2267 2013-12-04  Gurpreet Kaur  <k.gurpreet@samsung.com>
2268
2269         % unit heights don't work if parent block height is set in vh
2270         https://bugs.webkit.org/show_bug.cgi?id=118516
2271
2272         Reviewed by Simon Fraser.
2273
2274         From Blink r156449 by <srinivasa.ragavan.venkateswaran@intel.com>
2275
2276         An element having height as percentage needs to have the
2277         containingblock's height or availableheight to calculate its
2278         own height. The containing block having a height set in vh
2279         unit was not being considered for calculating the child's
2280         height.
2281
2282         Tests: fast/css/viewport-percentage-compute-box-height.html
2283                fast/css/viewport-percentage-compute-box-width.html
2284
2285         * rendering/RenderBox.cpp:
2286         (WebCore::RenderBox::computePercentageLogicalHeight):
2287         Correct child's height(in pecentage) was not being calculated
2288         incase of parent having height set in vh unit. Added condition
2289         to calculate the containing block height in terms of viewport size.
2290
2291 2013-12-04  Roger Fong  <roger_fong@apple.com>
2292
2293         [Windows] Unreviewed build fix. Copy headers from rendering/line to build directory.
2294
2295         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2296
2297 2013-12-04  Ryosuke Niwa  <rniwa@webkit.org>
2298
2299         bgColor, setBgColor, alinkColor, setAlinkColor, and etc... on HTMLBodyElement are useless
2300         https://bugs.webkit.org/show_bug.cgi?id=125208
2301
2302         Rubber-stamped by Anders Carlsson.
2303
2304         Address Darin's comment to use fastGetAttribute instead of getAttribute.
2305
2306         * html/HTMLDocument.cpp:
2307         (WebCore::HTMLDocument::bgColor):
2308         (WebCore::HTMLDocument::fgColor):
2309         (WebCore::HTMLDocument::alinkColor):
2310         (WebCore::HTMLDocument::linkColor):
2311         (WebCore::HTMLDocument::vlinkColor):
2312
2313 2013-12-04  Brian J. Burg  <burg@cs.washington.edu>
2314
2315         Consolidate various frame snapshot capabilities.
2316         https://bugs.webkit.org/show_bug.cgi?id=124325
2317
2318         Reviewed by Darin Adler.
2319
2320         Various snapshot creation methods had duplicated code and were split
2321         between Frame, DragImage, and platform-specific implementationss.
2322         This patch puts WebCore snapshot methods into FrameSnapshotting
2323         and removes platform implementations where possible.
2324
2325         DragImage methods reuse snapshot methods where possible. Inspector
2326         will be able to take snapshots without using drag images.
2327
2328         No new tests, this is a refactoring.
2329
2330         * CMakeLists.txt:
2331         * GNUmakefile.list.am:
2332         * WebCore.exp.in:
2333         * WebCore.vcxproj/WebCore.vcxproj:
2334         * WebCore.vcxproj/WebCore.vcxproj.filters:
2335         * WebCore.xcodeproj/project.pbxproj:
2336         * bindings/objc/DOM.mm:
2337         (-[DOMNode renderedImage]):
2338         (-[DOMRange renderedImageForcingBlackText:]):
2339         * dom/Clipboard.cpp:
2340         (WebCore::Clipboard::createDragImage):
2341         * dom/ClipboardMac.mm:
2342         (WebCore::Clipboard::createDragImage):
2343         * page/DragController.cpp:
2344         (WebCore::DragController::startDrag):
2345         * page/Frame.cpp:
2346         * page/Frame.h:
2347         * page/FrameSnapshotting.cpp: Added.
2348         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
2349         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
2350         (WebCore::snapshotFrameRect): Move most buffer logic to here.
2351         (WebCore::snapshotSelection): Moved from Frame.
2352         (WebCore::snapshotNode): Moved from Frame.
2353         * page/FrameSnapshotting.h: Added.
2354         * page/mac/FrameMac.mm: Removed.
2355         * page/mac/FrameSnapshottingMac.h: Removed.
2356         * page/mac/FrameSnapshottingMac.mm: Removed.
2357         * page/win/FrameWin.cpp: remove duplicate implementation.
2358         * page/win/FrameWin.h: Fix an incorrect parameter name.
2359         * platform/DragImage.cpp:
2360         (WebCore::ScopedNodeDragState::ScopedNodeDragState):
2361         (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
2362         (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
2363         (WebCore::createDragImageForNode):
2364         (WebCore::createDragImageForSelection):
2365         (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
2366         (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
2367         (WebCore::createDragImageForRange): Moved from Frame.
2368         (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
2369         (WebCore::createDragImageForLink): use nullptr.
2370
2371 2013-12-04  Benjamin Poulain  <bpoulain@apple.com>
2372
2373         Remove spaces on a blank line to have ResourceHandleCFNet.cpp identical to iOS
2374
2375         Unreviewed.
2376
2377         * platform/network/cf/ResourceHandleCFNet.cpp:
2378         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2379
2380 2013-12-04  Antti Koivisto  <antti@apple.com>
2381
2382         Move pseudo element construction out from Element
2383         https://bugs.webkit.org/show_bug.cgi?id=125257
2384
2385         Reviewed by Anders Carlsson.
2386
2387         This is logically part of the style resolve/render tree construction. This will make future
2388         refactoring easier.
2389
2390         * dom/Element.cpp:
2391         * dom/Element.h:
2392         * style/StyleResolveTree.cpp:
2393         (WebCore::Style::beforeOrAfterPseudoElement):
2394         (WebCore::Style::setBeforeOrAfterPseudoElement):
2395         (WebCore::Style::clearBeforeOrAfterPseudoElement):
2396         (WebCore::Style::needsPseudeElement):
2397         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2398         (WebCore::Style::attachRenderTree):
2399         (WebCore::Style::updateBeforeOrAfterPseudoElement):
2400         (WebCore::Style::resolveTree):
2401
2402 2013-12-04  Zoltan Horvath  <zoltan@webkit.org>
2403
2404         Move TrailingObjects class into its own h/cpp
2405         https://bugs.webkit.org/show_bug.cgi?id=124956
2406
2407         Reviewed by David Hyatt.
2408
2409         Since I moved space-ignoring inline functions into MidpointState in r160074,
2410         I can nicely separate TrailingObjects class from BreakingContextInlineHeader.h.
2411         This change improves the readability, and it's part of the RenderBlockLineLayout
2412         refactoring campaign, which is tracked under bug #121261.
2413
2414         No new tests, no behavior change.
2415
2416         * CMakeLists.txt:
2417         * GNUmakefile.list.am:
2418         * WebCore.vcxproj/WebCore.vcxproj:
2419         * WebCore.xcodeproj/project.pbxproj:
2420         * rendering/RenderBlock.h:
2421         * rendering/RenderBlockFlow.h:
2422         * rendering/line/BreakingContextInlineHeaders.h:
2423         * rendering/line/TrailingObjects.cpp: Added.
2424         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
2425         * rendering/line/TrailingObjects.h: Added.
2426         (WebCore::TrailingObjects::TrailingObjects):
2427         (WebCore::TrailingObjects::setTrailingWhitespace):
2428         (WebCore::TrailingObjects::clear):
2429         (WebCore::TrailingObjects::appendBoxIfNeeded):
2430
2431 2013-12-04  Oliver Hunt  <oliver@apple.com>
2432
2433         Refactor static getter function prototype to include thisValue in addition to the base object
2434         https://bugs.webkit.org/show_bug.cgi?id=124461
2435
2436         Reviewed by Geoffrey Garen.
2437
2438         Change bindings codegen to produce static getter functions
2439         with the correct types.  Also update the many custom implementations
2440         to the new type.
2441
2442         No change in behaviour.
2443
2444         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2445         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
2446         (WebCore::cssPropertyGetterCallback):
2447         * bindings/js/JSDOMBinding.cpp:
2448         (WebCore::objectToStringFunctionGetter):
2449         * bindings/js/JSDOMBinding.h:
2450         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
2451         (WebCore::JSDOMMimeTypeArray::nameGetter):
2452         * bindings/js/JSDOMPluginArrayCustom.cpp:
2453         (WebCore::JSDOMPluginArray::nameGetter):
2454         * bindings/js/JSDOMPluginCustom.cpp:
2455         (WebCore::JSDOMPlugin::nameGetter):
2456         * bindings/js/JSDOMStringMapCustom.cpp:
2457         (WebCore::JSDOMStringMap::nameGetter):
2458         * bindings/js/JSDOMWindowCustom.cpp:
2459         (WebCore::nonCachingStaticFunctionGetter):
2460         (WebCore::childFrameGetter):
2461         (WebCore::indexGetter):
2462         (WebCore::namedItemGetter):
2463         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2464         (WebCore::JSHTMLAllCollection::nameGetter):
2465         * bindings/js/JSHTMLCollectionCustom.cpp:
2466         (WebCore::JSHTMLCollection::nameGetter):
2467         * bindings/js/JSHTMLDocumentCustom.cpp:
2468         (WebCore::JSHTMLDocument::nameGetter):
2469         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
2470         (WebCore::JSHTMLFormControlsCollection::nameGetter):
2471         * bindings/js/JSHTMLFormElementCustom.cpp:
2472         (WebCore::JSHTMLFormElement::nameGetter):
2473         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2474         (WebCore::JSHTMLFrameSetElement::nameGetter):
2475         * bindings/js/JSHistoryCustom.cpp:
2476         (WebCore::nonCachingStaticBackFunctionGetter):
2477         (WebCore::nonCachingStaticForwardFunctionGetter):
2478         (WebCore::nonCachingStaticGoFunctionGetter):
2479         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2480         (WebCore::JSJavaScriptCallFrame::scopeType):
2481         * bindings/js/JSLocationCustom.cpp:
2482         (WebCore::nonCachingStaticReplaceFunctionGetter):
2483         (WebCore::nonCachingStaticReloadFunctionGetter):
2484         (WebCore::nonCachingStaticAssignFunctionGetter):
2485         * bindings/js/JSNamedNodeMapCustom.cpp:
2486         (WebCore::JSNamedNodeMap::nameGetter):
2487         * bindings/js/JSNodeListCustom.cpp:
2488         (WebCore::JSNodeList::nameGetter):
2489         * bindings/js/JSPluginElementFunctions.cpp:
2490         (WebCore::pluginElementPropertyGetter):
2491         * bindings/js/JSPluginElementFunctions.h:
2492         * bindings/js/JSRTCStatsResponseCustom.cpp:
2493         (WebCore::JSRTCStatsResponse::nameGetter):
2494         * bindings/js/JSStorageCustom.cpp:
2495         (WebCore::JSStorage::nameGetter):
2496         * bindings/js/JSStyleSheetListCustom.cpp:
2497         (WebCore::JSStyleSheetList::nameGetter):
2498         * bindings/scripts/CodeGeneratorJS.pm:
2499         (GenerateHeader):
2500         (GenerateImplementation):
2501         (GenerateParametersCheck):
2502         * bridge/runtime_array.cpp:
2503         (JSC::RuntimeArray::lengthGetter):
2504         (JSC::RuntimeArray::indexGetter):
2505         * bridge/runtime_array.h:
2506         * bridge/runtime_method.cpp:
2507         (JSC::RuntimeMethod::lengthGetter):
2508         * bridge/runtime_method.h:
2509         * bridge/runtime_object.cpp:
2510         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
2511         (JSC::Bindings::RuntimeObject::fieldGetter):
2512         (JSC::Bindings::RuntimeObject::methodGetter):
2513         * bridge/runtime_object.h:
2514
2515 2013-12-04  Zoltan Horvath  <zoltan@webkit.org>
2516
2517         [CSS Shapes] Support inset for shape-outside
2518         <https://webkit.org/b/125112>
2519
2520         Reviewed by David Hyatt.
2521
2522         This patch adds inset support for shape-outside. Parsing has previously landed in r159968.
2523         Specification: http://dev.w3.org/csswg/css-shapes/#supported-basic-shapes
2524
2525         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-left.html
2526                fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-right.html
2527                fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-left.html
2528                fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-right.html
2529                fast/shapes/shape-outside-floats/shape-outside-floats-inset.html
2530
2531         * platform/LengthSize.h:
2532         (WebCore::LengthSize::floatSize): Add conversion to FloatSize.
2533         * rendering/shapes/Shape.cpp:
2534         (WebCore::Shape::createShape): Handle inset case.
2535
2536 2013-12-04  Bear Travis  <betravis@adobe.com>
2537
2538         Web Inspector: [CSS Shapes] Support raster shape visualizations
2539         https://bugs.webkit.org/show_bug.cgi?id=124080
2540
2541         Reviewed by Joseph Pecoraro.
2542
2543         Create an inspector visualization for a shape created from an image.
2544         The visualization takes each line of the image, combining where possible.
2545
2546         Test added to inspector-protocol/model/highlight-shape-outside.html
2547
2548         * rendering/shapes/RasterShape.cpp:
2549         (WebCore::RasterShapeIntervals::buildBoundsPath): Create a path representing the
2550         RasterShapeIntervals.
2551         * rendering/shapes/RasterShape.h:
2552
2553 2013-12-04  Zoltan Horvath  <zoltan@webkit.org>
2554
2555         [CSS Shapes] Remove explicit numbering from BasicShape::Type and CSSBasicShape::Type enums
2556         https://bugs.webkit.org/show_bug.cgi?id=125163
2557
2558         Reviewed by Rob Buis.
2559
2560         I don't see any reason to have explicit numbering for the Type enum in our [CSS]BasicShape classes.
2561         I removed numbering, which will decrease for instance the merge conflicts on Type changes.
2562
2563         No new tests, no behavior change.
2564
2565         * css/CSSBasicShapes.h:
2566         * rendering/style/BasicShapes.h:
2567
2568 2013-12-04  Myles C. Maxfield  <mmaxfield@apple.com>
2569
2570         Allow ImageBuffer to use an IOSurface that is larger than necessary
2571         https://bugs.webkit.org/show_bug.cgi?id=124626
2572
2573         Reviewed by Simon Fraser.
2574
2575         Because creating ImageBuffer's backing store can be so expensive, it
2576         would be beneficial to have a pool of pre-created backing stores
2577         available. However, this means that ImageBuffer might have to use a
2578         backing store that is larger than the exact dimensions that it needs.
2579         This patch adds a field, m_backingStoreSize, to CG's ImageBufferData
2580         class, and uses this new field when performing ImageBuffer operations
2581         to allow for larger-than-necessary backing stores. Content is always
2582         drawn in the top left corner of the backing store.
2583
2584         No new tests are necessary because there is no behavior change.
2585
2586         * platform/graphics/ImageBuffer.h:
2587         (WebCore::ImageBuffer::baseTransform): The base transform has to put
2588         content at the top left corner instead of bottom left
2589         * platform/graphics/cg/ImageBufferCG.cpp:
2590         (WebCore::createCroppedImageIfNecessary): Convenience function to figure out
2591         the dimensions of the backing texture in user space
2592         (WebCore::ImageBuffer::ImageBuffer): Set up new m_backingStoreSize member
2593         (WebCore::maybeCropToBounds): Some ImageBuffer API functions require
2594         outputting an image with logical size. This function performs the cropping
2595         (WebCore::ImageBuffer::copyImage): Updated for larger-than-necessary
2596         backing stores
2597         (WebCore::ImageBuffer::copyNativeImage): Ditto
2598         (WebCore::ImageBuffer::draw): Ditto
2599         (WebCore::ImageBuffer::clip): Ditto
2600         (WebCore::ImageBuffer::putByteArray): Ditto
2601         (WebCore::ImageBuffer::toDataURL): Ditto
2602         * platform/graphics/cg/ImageBufferDataCG.cpp:
2603         (WebCore::ImageBufferData::getData): Ditto
2604         (WebCore::ImageBufferData::putData): Ditto
2605         * platform/graphics/cg/ImageBufferDataCG.h: New m_backingStoreSize field
2606
2607 2013-12-03  Dean Jackson  <dino@apple.com>
2608
2609         [WebGL] Support for texImage2D of type HALF_FLOAT_OES
2610         https://bugs.webkit.org/show_bug.cgi?id=110936
2611
2612         Reviewed by Brent Fulgham.
2613
2614         Add support for the HALF_FLOAT_OES texture format from texImage2D
2615         and texSubImage2D.
2616
2617         A lot of this patch comes from the original patch on the bug
2618         by Nayan Kumar, and the Blink commit:
2619         https://codereview.chromium.org/13842017
2620
2621         Tests: fast/canvas/webgl/oes-texture-half-float-with-canvas.html
2622                fast/canvas/webgl/oes-texture-half-float-with-image.html
2623                fast/canvas/webgl/oes-texture-half-float-with-video.html
2624
2625         * html/canvas/OESTextureHalfFloat.idl: New HALF_FLOAT_OES constant value.
2626         * html/canvas/WebGLRenderingContext.cpp:
2627         (WebCore::WebGLRenderingContext::validateTexFunc): Remove the code that
2628         would bail if half-float values were used.
2629         * platform/graphics/GraphicsContext3D.cpp:
2630         - Return appropriate DataFormats for half floating point types.
2631         - Copy the float -> half-float code from Blink
2632         - New pack functions for half floats
2633         * platform/graphics/GraphicsContext3D.h: New format types.
2634         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2635         (WebCore::GraphicsContext3D::texSubImage2D): Use GL_HALF_FLOAT_ARB if we're passed
2636         a HALF_FLOAT_OES.
2637
2638 2013-12-04  Daniel Bates  <dabates@apple.com>
2639
2640         Fix the Apple Windows build after <http://trac.webkit.org/changeset/160113>
2641         (https://bugs.webkit.org/show_bug.cgi?id=125193)
2642
2643         * rendering/RenderThemeWin.cpp:
2644         (WebCore::RenderThemeWin::paintMenuList): Substitute paintInfo for i.
2645
2646 2013-12-04  Daniel Bates  <dabates@apple.com>
2647
2648         Rename RenderTheme::paintMenuListButton()
2649         https://bugs.webkit.org/show_bug.cgi?id=125193
2650
2651         Reviewed by Simon Fraser.
2652
2653         Towards upstreaming the iOS concept of render theme decorations we should rename
2654         RenderTheme::paintMenuListButton() to RenderTheme::paintMenuListButtonDecorations()
2655         to better describe its purpose.
2656
2657         Also, fix code style issues.
2658
2659         * platform/blackberry/RenderThemeBlackBerry.cpp:
2660         (WebCore::RenderThemeBlackBerry::paintMenuListButtonDecorations):
2661         * platform/blackberry/RenderThemeBlackBerry.h:
2662         * platform/efl/RenderThemeEfl.cpp:
2663         (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
2664         * platform/efl/RenderThemeEfl.h:
2665         * platform/gtk/RenderThemeGtk.cpp:
2666         (WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
2667         * platform/gtk/RenderThemeGtk.h:
2668         * platform/nix/RenderThemeNix.h:
2669         * rendering/RenderTheme.cpp:
2670         (WebCore::RenderTheme::paintDecorations): Rename argument o, r to renderer and rect, respectively.
2671         * rendering/RenderTheme.h:
2672         (WebCore::RenderTheme::paintMenuListButtonDecorations):
2673         * rendering/RenderThemeMac.h:
2674         * rendering/RenderThemeMac.mm:
2675         (WebCore::RenderThemeMac::paintMenuListButtonDecorations): Rename argument o, r to renderer and rect,
2676         respectively; also remove extraneous white space and substitute 1 for 1.0f.
2677         * rendering/RenderThemeSafari.cpp:
2678         (WebCore::RenderThemeSafari::paintMenuListButtonDecorations): Ditto.
2679         * rendering/RenderThemeSafari.h:
2680         * rendering/RenderThemeWin.cpp:
2681         (WebCore::RenderThemeWin::paintMenuList): Rename argument o, i, r to renderer, paintInfo, and rect,
2682         respectively.
2683         (WebCore::RenderThemeWin::paintMenuListButtonDecorations): Ditto.
2684         * rendering/RenderThemeWin.h:
2685         * rendering/RenderThemeWinCE.cpp:
2686         (WebCore::RenderThemeWinCE::paintMenuList): Ditto.
2687         (WebCore::RenderThemeWinCE::paintMenuListButtonDecorations): Ditto. 
2688         * rendering/RenderThemeWinCE.h:
2689
2690 2013-12-04  Andy Estes  <aestes@apple.com>
2691
2692         [iOS] Build projects with $(ARCHS_STANDARD_32_64_BIT)
2693         https://bugs.webkit.org/show_bug.cgi?id=125236
2694
2695         Reviewed by Sam Weinig.
2696
2697         $(ARCHS_STANDARD_32_64_BIT) is what we want for both device and simulator builds.
2698
2699         * Configurations/DebugRelease.xcconfig:
2700
2701 2013-12-04  Joseph Pecoraro  <pecoraro@apple.com>
2702
2703         Unreviewed Windows build fix attempt after r160099.
2704
2705         * WebCore.vcxproj/WebCore.vcxproj.filters:
2706         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2707
2708 2013-12-03  Joseph Pecoraro  <pecoraro@apple.com>
2709
2710         Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore
2711         https://bugs.webkit.org/show_bug.cgi?id=124613
2712
2713         Reviewed by Timothy Hatcher.
2714
2715         Make a WebCore::Page a "Web" Remote Debuggable.
2716
2717         * bindings/js/JSDOMGlobalObject.cpp:
2718         Disable JavaScript context inspection on JSGlobalObjects inside WebCore::Page's.
2719
2720         * page/Page.cpp:
2721         (WebCore::Page::Page):
2722         (WebCore::Page::remoteInspectionAllowed):
2723         (WebCore::Page::setRemoteInspectionAllowed):
2724         (WebCore::Page::remoteInspectorInformationDidChange):
2725         * page/Page.h:
2726         * page/PageDebuggable.h:
2727         * page/PageDebuggable.cpp: Added.
2728         (WebCore::PageDebuggable::PageDebuggable):
2729         (WebCore::PageDebuggable::name):
2730         (WebCore::PageDebuggable::url):
2731         (WebCore::PageDebuggable::hasLocalDebugger):
2732         (WebCore::PageDebuggable::connect):
2733         (WebCore::PageDebuggable::disconnect):
2734         (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend):
2735         (WebCore::PageDebuggable::setIndicating):
2736         Make a page a "Web" debuggable.
2737
2738         * GNUmakefile.list.am:
2739         * WebCore.exp.in:
2740         * WebCore.vcxproj/WebCore.vcxproj:
2741         * WebCore.vcxproj/WebCore.vcxproj.filters:
2742         * WebCore.xcodeproj/project.pbxproj:
2743         Misc.
2744
2745         * inspector/InspectorClient.h:
2746         (WebCore::InspectorClient::indicate):
2747         (WebCore::InspectorClient::hideIndicate):
2748         Forward indicate methods to WebKit clients.
2749
2750         * loader/FrameLoader.cpp:
2751         (WebCore::FrameLoader::didChangeTitle):
2752         (WebCore::FrameLoader::dispatchDidCommitLoad):
2753         Push updates when remote debuggable information like the Page's
2754         URL or title change.
2755
2756         * ForwardingHeaders/inspector/InspectorFrontendChannel.h:
2757         * inspector/InspectorForwarding.h:
2758         Re-export Inspector::InspectorFrontendChannel as WebCore::InspectorFrontendChannel
2759         to avoid needlessly updating code all over the place.
2760
2761         * inspector/CodeGeneratorInspectorStrings.py:
2762         * inspector/InspectorWorkerAgent.cpp:
2763         * inspector/WorkerInspectorController.cpp:
2764         * testing/Internals.cpp:
2765         Update include names.
2766
2767         * page/ContextMenuController.cpp:
2768         (WebCore::ContextMenuController::populate):
2769         Make the "Inspect Element" context menu work correctly when there is a
2770         remote inspector instead of a local inspector.
2771
2772 2013-12-03  Joseph Pecoraro  <pecoraro@apple.com>
2773
2774         Web Inspector: Add missing folders and files to Xcode project
2775         https://bugs.webkit.org/show_bug.cgi?id=124802
2776
2777         Reviewed by Timothy Hatcher.
2778
2779         * WebCore.xcodeproj/project.pbxproj:
2780
2781 2013-12-04  José Dapena Paz  <jdapena@igalia.com>
2782
2783         [texmap] Borders on rotating images are hidden/wrongly rendered with edge distance antialiasing
2784         https://bugs.webkit.org/show_bug.cgi?id=124653
2785
2786         Reviewed by Noam Rosenthal.
2787
2788         Texture mapper edge distance antialiasing texture sampling was causing
2789         borders to be shaded (and made them almost disappear in some cases).
2790         This was because calculation of sampling happened on vertex shader, so
2791         the border of the texture would go to the border of the inflation area.
2792
2793         What algorithm should do is sampling the border pixel for all the
2794         inflation area (it is the closest pixel to all the samples in
2795         inflation area), and then use the standard sampling for the other
2796         parts of the texture.
2797
2798         No new test because this is already covered by test
2799         transforms/3d/point-mapping/3d-point-mapping.html
2800
2801         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: fix edge
2802         distance antialiasing texture sampling.
2803
2804 2013-12-04  László Langó  <lango@inf.u-szeged.hu>
2805
2806         Typo fix after r160074 to fix debug builds.
2807
2808         Reviewed by Csaba Osztrogonác.
2809
2810         * platform/text/BidiResolver.h:
2811         (WebCore::MidpointState::stopIgnoringSpaces):
2812
2813 2013-12-04  Zoltan Horvath  <zoltan@webkit.org>
2814
2815         Move space-ignoring inline functions into MidpointState
2816         <https://webkit.org/b/124957>
2817
2818         Reviewed by David Hyatt.
2819
2820         Since:
2821          - The following inline functions were used only with a mandatory LineMidpointState argument:
2822            startIgnoringSpaces, stopIgnoringSpaces, ensureLineBoxInsideIgnoredSpaces, deprecatedAddMidpoint.
2823          - TrailingObjects class uses these functions. Since they're inline in BreakingContextInlineHeaders.h,
2824            it's hard to separate TrailingObjects into it's own file. (blocks bug #124956)
2825          I made these functions as a member of LineMidpointState, and I also updated the call sites.
2826
2827         No new tests, no behavior change.
2828
2829         * platform/text/BidiResolver.h:
2830         (WebCore::MidpointState::startIgnoringSpaces):
2831         (WebCore::MidpointState::stopIgnoringSpaces):
2832         (WebCore::MidpointState::ensureLineBoxInsideIgnoredSpaces):
2833         (WebCore::MidpointState::deprecatedAddMidpoint):
2834         * rendering/RenderBlock.h:
2835         * rendering/line/BreakingContextInlineHeaders.h:
2836         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
2837         (WebCore::BreakingContext::handleBR):
2838         (WebCore::BreakingContext::handleOutOfFlowPositioned):
2839         (WebCore::shouldSkipWhitespaceAfterStartObject):
2840         (WebCore::BreakingContext::handleEmptyInline):
2841         (WebCore::BreakingContext::handleReplaced):
2842         (WebCore::ensureCharacterGetsLineBox):
2843         (WebCore::BreakingContext::handleText):
2844
2845 2013-12-03  Zoltan Horvath  <zoltan@webkit.org>
2846
2847         Remove BreakingContext's friendship from RenderBlockFlow
2848         <https://webkit.org/b/124958>
2849
2850         Reviewed by David Hyatt.
2851
2852         BreakingContext uses only 2 functions from RenderBlockFlow: insertFloatingObject/positionNewFloatOnLine. I added helper
2853         functions to LineBreaker, what is already a friend of RenderBlockFlow, so BreakingContext doesn't need to be anymore.
2854  
2855         No new tests, no behavior change.
2856
2857         * rendering/RenderBlockFlow.h:
2858         * rendering/line/BreakingContextInlineHeaders.h:
2859         (WebCore::BreakingContext::handleFloat):
2860         * rendering/line/LineBreaker.h:
2861         (WebCore::LineBreaker::insertFloatingObject):
2862         (WebCore::LineBreaker::positionNewFloatOnLine):
2863
2864 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
2865
2866         bgColor, setBgColor, alinkColor, setAlinkColor, and etc... on HTMLBodyElement are useless
2867         https://bugs.webkit.org/show_bug.cgi?id=125208
2868
2869         Reviewed by Antti Koivisto.
2870
2871         Merge https://chromium.googlesource.com/chromium/blink/+/49b1eeabbbf573d5271288c66d2b566cf33a09cf
2872
2873         These member functions of HTMLBodyElement were only used by corresponding functions in HTMLDocument
2874         since they had the Reflect option specified in HTMLBodyElement.idl.
2875
2876         Removed the functions and directly called getAttribute and setAttribute in relevant functions in
2877         HTMLDocument. The optimization to avoid assignment is no longer needed here since we've added that
2878         optimization to setAttributeInternal a while ago.
2879
2880         * html/HTMLBodyElement.cpp:
2881         * html/HTMLBodyElement.h:
2882         * html/HTMLDocument.cpp:
2883         (WebCore::HTMLDocument::bgColor):
2884         (WebCore::HTMLDocument::setBgColor):
2885         (WebCore::HTMLDocument::fgColor):
2886         (WebCore::HTMLDocument::setFgColor):
2887         (WebCore::HTMLDocument::alinkColor):
2888         (WebCore::HTMLDocument::setAlinkColor):
2889         (WebCore::HTMLDocument::linkColor):
2890         (WebCore::HTMLDocument::setLinkColor):
2891         (WebCore::HTMLDocument::vlinkColor):
2892         (WebCore::HTMLDocument::setVlinkColor):
2893         * html/HTMLDocument.h:
2894
2895 2013-12-03  Andreas Kling  <akling@apple.com>
2896
2897         Add a CSSProperty::isDirectionAwareProperty() helper.
2898         <https://webkit.org/b/125202>
2899
2900         Move the block of case labels for checking whether a CSS property ID
2901         is a directional property into a separate function. Also removed an
2902         outdated comment about CSS variables.
2903
2904         Reviewed by Antti Koivisto.
2905
2906 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
2907
2908         Revert the inadvertently committed change.
2909
2910         * html/HTMLElement.idl:
2911
2912 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
2913
2914         Remove nodeIsDetachedFromDocument and visualWordMovementEnabled in FrameSelection
2915         https://bugs.webkit.org/show_bug.cgi?id=125210
2916
2917         Reviewed by Antti Koivisto.
2918
2919         Inspired by https://chromium.googlesource.com/chromium/blink/+/92409870f0ff8fafe31217830db0838a9e1ffb98
2920
2921         Removed some unused code.
2922
2923         * editing/FrameSelection.cpp:
2924         (WebCore::FrameSelection::textWasReplaced):
2925         * editing/FrameSelection.h:
2926         * page/Settings.in:
2927
2928 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
2929
2930         Potential crash in RenderView::selectionBounds and RenderView::repaintSelection
2931         https://bugs.webkit.org/show_bug.cgi?id=125207
2932
2933         Reviewed by Simon Fraser.
2934         
2935         Merge https://chromium.googlesource.com/chromium/blink/+/f9e6e288a5aa959f05c374806121aaf0fc52d440
2936
2937         Update style in FrameSelection instead of RenderView's member functions. These are the last two
2938         member functions of RenderView that updates the style.
2939
2940         * editing/FrameSelection.cpp:
2941         (WebCore::FrameSelection::focusedOrActiveStateChanged):
2942         (WebCore::FrameSelection::bounds):
2943         * rendering/RenderView.cpp:
2944         (WebCore::RenderView::selectionBounds):
2945         (WebCore::RenderView::repaintSelection):
2946
2947 2013-12-03  Mark Rowe  <mrowe@apple.com>
2948
2949         <https://webkit.org/b/125143> Improve the formatting in the generated Objective-C headers.
2950
2951         Add a space between @property and any parenthesized attributes.
2952         Prefer strong over retain when specifying memory management semantics.
2953
2954         Reviewed by Darin Adler.
2955
2956         * bindings/objc/PublicDOMInterfaces.h:
2957         * bindings/scripts/CodeGeneratorObjC.pm:
2958         (GetPropertyAttributes): Generate strong instead of retain. Include a
2959         space before the parenthesis.
2960         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
2961         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2962         * bindings/scripts/test/ObjC/DOMTestException.h:
2963         * bindings/scripts/test/ObjC/DOMTestInterface.h:
2964         * bindings/scripts/test/ObjC/DOMTestObj.h:
2965         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2966         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
2967         * bindings/scripts/test/ObjC/DOMattribute.h:
2968
2969 2013-12-03  Alexey Proskuryakov  <ap@apple.com>
2970
2971         Update WebCrypto JWK mapping to newer proposal
2972         https://bugs.webkit.org/show_bug.cgi?id=124218
2973
2974         Reviewed by Anders Carlsson.
2975
2976         Tests: crypto/subtle/jwk-export-use-values.html
2977                crypto/subtle/jwk-import-use-values.html
2978
2979         1. "extractable" renamed to "ext" in JWK.
2980         2. New values for "use" mapping, which can now be combined into comma separated lists,
2981         and cover all possible WebCrypto usages.
2982
2983         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2984         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
2985         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable):
2986         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
2987         (WebCore::processUseValue):
2988         (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON):
2989         (WebCore::JSCryptoKeySerializationJWK::serialize):
2990
2991 2013-12-03  Simon Fraser  <simon.fraser@apple.com>
2992
2993         Remove some iOS-related documentScale code
2994         https://bugs.webkit.org/show_bug.cgi?id=125194
2995
2996         Reviewed by Enrica Casucci.
2997
2998         Remove exports of nonexistent documentScale-related functions on Frame.
2999
3000         * WebCore.exp.in:
3001
3002 2013-12-03  Eric Carlson  <eric.carlson@apple.com>
3003
3004         Fix regression caused by r158599
3005         https://bugs.webkit.org/show_bug.cgi?id=125188
3006
3007         Reviewed by Jer Noble.
3008
3009         * html/HTMLMediaElement.cpp:
3010         (HTMLMediaElement::clearMediaPlayer): Do not clear m_player when PLUGIN_PROXY_FOR_VIDEO
3011             is enabled.
3012
3013 2013-12-03  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3014
3015         Nix Upstream: Updating WebCore files
3016         https://bugs.webkit.org/show_bug.cgi?id=124981
3017
3018         Reviewed by Benjamin Poulain.
3019
3020         Just to sync our github repo files and the trunk, as part of the upstream process
3021
3022         No new tests needed.
3023
3024         * PlatformNix.cmake:
3025         * css/mediaControlsNix.css:
3026         (audio):
3027         (video::-webkit-media-controls):
3028         (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
3029         (video::-webkit-media-controls-enclosure):
3030         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
3031         (video:-webkit-full-page-media):
3032         (audio:-webkit-full-page-media, video:-webkit-full-page-media):
3033         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
3034         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
3035         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
3036         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
3037         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
3038         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
3039         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
3040         (input[type="range"]::-webkit-media-slider-container):
3041         (input[type="range"]::-webkit-media-slider-container > div):
3042         (input[type="range"]::-webkit-media-slider-thumb):
3043         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
3044         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
3045         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
3046         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
3047         (audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-controls-fullscreen-volume-slider):
3048         (audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media-controls-fullscreen-volume-min-button):
3049         (audio::-webkit-media-controls-fullscreen-volume-max-button, video::-webkit-media-controls-fullscreen-volume-max-button):
3050         (video::-webkit-media-text-track-container):
3051         (video::cue):
3052         (video::-webkit-media-text-track-region):
3053         (video::-webkit-media-text-track-region-container):
3054         (video::-webkit-media-text-track-region-container.scrolling):
3055         (video::-webkit-media-text-track-display):
3056         (video::cue(:future)):
3057         (video::-webkit-media-text-track-container b):
3058         (video::-webkit-media-text-track-container u):
3059         (video::-webkit-media-text-track-container i):
3060         * editing/Editor.cpp:
3061         (WebCore::Editor::cut):
3062         (WebCore::Editor::copy):
3063         (WebCore::Editor::copyImage):
3064         * editing/Editor.h:
3065         * html/HTMLCanvasElement.h:
3066         * platform/Cursor.h:
3067         * platform/audio/FFTFrame.h:
3068         * platform/audio/nix/AudioBusNix.cpp:
3069         (WebCore::AudioBus::loadPlatformResource):
3070         * platform/graphics/GLContext.h:
3071         * platform/nix/CursorNix.cpp:
3072         (WebCore::Cursor::ensurePlatformCursor):
3073         * platform/nix/GamepadsNix.cpp:
3074         (WebCore::sampleGamepads):
3075         * platform/nix/RenderThemeNix.cpp:
3076         (WebCore::toIntSize):
3077         (WebCore::toNixRect):
3078         (WebCore::RenderThemeNix::platformActiveSelectionBackgroundColor):
3079         (WebCore::RenderThemeNix::platformInactiveSelectionBackgroundColor):
3080         (WebCore::RenderThemeNix::platformActiveSelectionForegroundColor):
3081         (WebCore::RenderThemeNix::platformInactiveSelectionForegroundColor):
3082         (WebCore::RenderThemeNix::platformActiveListBoxSelectionBackgroundColor):
3083         (WebCore::RenderThemeNix::platformInactiveListBoxSelectionBackgroundColor):
3084         (WebCore::RenderThemeNix::platformActiveListBoxSelectionForegroundColor):
3085         (WebCore::RenderThemeNix::platformInactiveListBoxSelectionForegroundColor):
3086         (WebCore::RenderThemeNix::platformActiveTextSearchHighlightColor):
3087         (WebCore::RenderThemeNix::platformInactiveTextSearchHighlightColor):
3088         (WebCore::RenderThemeNix::platformFocusRingColor):
3089         (WebCore::RenderThemeNix::platformTapHighlightColor):
3090         (WebCore::RenderThemeNix::paintButton):
3091         (WebCore::RenderThemeNix::paintTextField):
3092         (WebCore::RenderThemeNix::paintCheckbox):
3093         (WebCore::RenderThemeNix::setCheckboxSize):
3094         (WebCore::RenderThemeNix::paintRadio):
3095         (WebCore::RenderThemeNix::setRadioSize):
3096         (WebCore::RenderThemeNix::paintMenuList):
3097         (WebCore::RenderThemeNix::paintProgressBar):
3098         (WebCore::RenderThemeNix::paintSliderTrack):
3099         (WebCore::RenderThemeNix::paintSliderThumb):
3100         (WebCore::RenderThemeNix::paintInnerSpinButton):
3101         (WebCore::RenderThemeNix::paintMeter):
3102         (WebCore::RenderThemeNix::extraMediaControlsStyleSheet):
3103         (WebCore::RenderThemeNix::paintMediaPlayButton):
3104         (WebCore::RenderThemeNix::paintMediaMuteButton):
3105         (WebCore::RenderThemeNix::paintMediaSeekBackButton):
3106         (WebCore::RenderThemeNix::paintMediaSeekForwardButton):
3107         (WebCore::RenderThemeNix::paintMediaSliderTrack):
3108         (WebCore::RenderThemeNix::paintMediaVolumeSliderContainer):
3109         (WebCore::RenderThemeNix::paintMediaVolumeSliderTrack):
3110         (WebCore::RenderThemeNix::paintMediaRewindButton):
3111         * platform/nix/RenderThemeNix.h:
3112         * rendering/SimpleLineLayout.cpp:
3113         (WebCore::SimpleLineLayout::canUseFor):
3114
3115 2013-12-03  Ralph Thomas  <ralpht@gmail.com>
3116
3117         Typo: FixedPositionConstaint -> FixedPositionConstraint
3118         https://bugs.webkit.org/show_bug.cgi?id=125171
3119
3120         Reviewed by Simon Fraser.
3121
3122         No new tests, no change in behavior.
3123
3124         * page/scrolling/ScrollingConstraints.h:
3125         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
3126         (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
3127         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3128         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
3129
3130 2013-12-03  Samuel White  <samuel_white@apple.com>
3131
3132         AXPress event coordinates are always sent as (0, 0)
3133         https://bugs.webkit.org/show_bug.cgi?id=76677
3134
3135         Reviewed by Simon Fraser.
3136
3137         Set the coordinates of a simulated press equal to the center of the target
3138         element when the simulated press does not have a related mouse event.
3139
3140         Test: accessibility/press-targets-center-point.html
3141
3142         * dom/Element.cpp:
3143         (WebCore::Element::clientRect):
3144         (WebCore::Element::screenRect):
3145         * dom/Element.h:
3146         * dom/EventDispatcher.cpp:
3147         (WebCore::EventDispatcher::dispatchSimulatedClick):
3148         * dom/MouseEvent.cpp:
3149         (WebCore::SimulatedMouseEvent::create):
3150         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
3151         * dom/MouseEvent.h:
3152
3153 2013-12-03  Dean Jackson  <dino@apple.com>
3154
3155         [WebGL] Implement OES texture float linear
3156         https://bugs.webkit.org/show_bug.cgi?id=124871
3157
3158         Reviewed by Brent Fulgham.
3159
3160         Implement the OES_texture_float_linear extension. Generally
3161         we'd also enable OES_texture_half_float_linear at the same
3162         time, but that's blocked on webkit.org/b/110936.
3163
3164         Test: fast/canvas/webgl/oes-texture-float-linear.html
3165
3166         * CMakeLists.txt: Add new files.
3167         * DerivedSources.cpp: Ditto.
3168         * DerivedSources.make: Generate new file from IDL.
3169         * GNUmakefile.list.am: Add new files.
3170         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3171         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3172         * WebCore.xcodeproj/project.pbxproj: New files for OESTextureFloatLinear.
3173
3174         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3175         (WebCore::toJS): Map the new name into the appropriate type.
3176
3177         * html/canvas/OESTextureFloatLinear.cpp: Added. This is a very simple class
3178         that's mostly empty.
3179         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
3180         (WebCore::OESTextureFloatLinear::~OESTextureFloatLinear):
3181         (WebCore::OESTextureFloatLinear::getName):
3182         (WebCore::OESTextureFloatLinear::create):
3183         * html/canvas/OESTextureFloatLinear.h: Added.
3184         * html/canvas/OESTextureFloatLinear.idl: Added.
3185
3186         * html/canvas/WebGLExtension.h: Declare the new name in the enum of extensions.
3187
3188         * html/canvas/WebGLRenderingContext.cpp:
3189         (WebCore::WebGLRenderingContext::drawArrays): Call new name.
3190         (WebCore::WebGLRenderingContext::drawElements): Call new name.
3191         (WebCore::WebGLRenderingContext::getExtension): Create the new extension if asked.
3192         (WebCore::WebGLRenderingContext::checkTextureCompleteness): Renamed from handleNPOTTextures. Now
3193         checks for the type of the texture too.
3194         * html/canvas/WebGLRenderingContext.h: Member variable for new extension.
3195
3196         * html/canvas/WebGLTexture.cpp:
3197         (WebCore::WebGLTexture::WebGLTexture):
3198         (WebCore::WebGLTexture::needToUseBlackTexture): Takes an extra parameter which indicates
3199         if it has an extension enabled.
3200         (WebCore::WebGLTexture::update): Note it is a float type when updating.
3201         * html/canvas/WebGLTexture.h: New flag to indicate float type.
3202
3203         * platform/graphics/Extensions3D.h: New flag type.
3204         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3205         (WebCore::Extensions3DOpenGL::supportsExtension): Add a comment about the extension.
3206
3207 2013-12-03  Alexey Proskuryakov  <ap@apple.com>
3208
3209         Support exporting private WebCrypto RSA keys
3210         https://bugs.webkit.org/show_bug.cgi?id=124483
3211
3212         Reviewed by Anders Carlsson.
3213
3214         Test: crypto/subtle/rsa-export-private-key.html
3215
3216         It might be better to have our own bignum implementation in WTF, but we currently
3217         don't, and the need for this computation is Common Crypto specific anyway.
3218
3219         * crypto/CommonCryptoUtilities.h:
3220         * crypto/CommonCryptoUtilities.cpp:
3221         (WebCore::CCBigNum::CCBigNum):
3222         (WebCore::CCBigNum::~CCBigNum):
3223         (WebCore::CCBigNum::operator=):
3224         (WebCore::CCBigNum::data):
3225         (WebCore::CCBigNum::operator-):
3226         (WebCore::CCBigNum::operator%):
3227         (WebCore::CCBigNum::inverse):
3228         Added a minimal wrapper around CommonCrypto BigNum.
3229
3230         * crypto/mac/CryptoKeyRSAMac.cpp:
3231         (WebCore::getPrivateKeyComponents): Compute missing parts using CCBigNum.
3232         (WebCore::CryptoKeyRSA::exportData): Implemented private key case.
3233
3234 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
3235
3236         XML fragment parsing algorithm doesn't use the context element's default namespace URI
3237         https://bugs.webkit.org/show_bug.cgi?id=125132
3238
3239         Reviewed by Darin Adler.
3240
3241         Always use the context element's namespace as the default namespace URI when one is not specified by xmlns.
3242
3243         The new behavior matches that of Internet Explorer and the specified behavior in HTML5:
3244         http://www.w3.org/TR/2013/CR-html5-20130806/the-xhtml-syntax.html#parsing-xhtml-fragments
3245
3246         "The default namespace is the namespace for which the DOM isDefaultNamespace() method on the element would
3247         return true."
3248
3249         Test: fast/parser/fragment-parsing-in-document-without-xmlns.html
3250
3251         * xml/parser/XMLDocumentParserLibxml2.cpp:
3252         (WebCore::XMLDocumentParser::XMLDocumentParser):
3253
3254 2013-12-03  Nick Diego Yamane  <nick.yamane@openbossa.org>
3255
3256         Remove some CSS Variables leftovers
3257         https://bugs.webkit.org/show_bug.cgi?id=125167
3258
3259         Reviewed by Darin Adler.
3260
3261         No new tests needed. Only removing leftover code.
3262
3263         * css/CSSBasicShapes.cpp:
3264         * css/CSSBasicShapes.h:
3265
3266 2013-12-03  Myles C. Maxfield  <mmaxfield@apple.com>
3267
3268         Checking second-to-last bit in address is a typo
3269         https://bugs.webkit.org/show_bug.cgi?id=125162
3270
3271         Reviewed by Darin Adler.
3272
3273         After talking with the original author of this line,
3274         is was a typo to make sure that the second-to-last bit
3275         in an address is 0. Instead, we want to make sure that
3276         the address is aligned to a 4-byte boundary
3277
3278         No behavior change, so no test is necessary
3279
3280         * platform/graphics/cg/ImageBufferCG.cpp:
3281         (WebCore::ImageBuffer::ImageBuffer):
3282
3283 2013-12-03  Radu Stavila  <stavila@adobe.com>
3284
3285         The overflow border of a relatively positioned element inside a region is not painted
3286         https://bugs.webkit.org/show_bug.cgi?id=124919
3287
3288         Relative positioned elements have self-painting layers that don't propagate the visual overflow
3289         so the layer's position should be used when determining the clipping rectangle for box decorations.
3290
3291         Reviewed by Mihnea Ovidenie.
3292
3293         Test: fast/regions/relative-borders-overflow.html
3294
3295         * rendering/RenderFlowThread.cpp:
3296         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
3297
3298 2013-12-03  Seokju Kwon  <seokju@webkit.org>
3299
3300         Web Inspector: Get rid of 'hasFrontend()' in InspectorController and WorkerInspectorController
3301         https://bugs.webkit.org/show_bug.cgi?id=125135
3302
3303         Reviewed by Darin Adler.
3304
3305         Remove 'hasFrontend()' from InspectorController and WorkerInspectorController
3306         as it's never called.
3307
3308         No new tests, no behavior changes.
3309
3310         * inspector/InspectorController.h:
3311         * inspector/WorkerInspectorController.h:
3312
3313 2013-12-03  Seokju Kwon  <seokju@webkit.org>
3314
3315         Web Inspector: webViewResized() is not used anywhere in WebInspectorUI
3316         https://bugs.webkit.org/show_bug.cgi?id=125137
3317
3318         Reviewed by Darin Adler.
3319
3320         Remove leftover code.
3321
3322         No new tests, no behavior changes.
3323
3324         * inspector/InspectorController.cpp:
3325         * inspector/InspectorController.h:
3326         * inspector/InspectorOverlay.cpp:
3327         * inspector/InspectorOverlay.h:
3328         * inspector/InspectorPageAgent.cpp:
3329         * inspector/InspectorPageAgent.h:
3330
3331 2013-12-03  László Langó  <lango@inf.u-szeged.hu>
3332
3333         ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue.
3334         https://bugs.webkit.org/show_bug.cgi?id=125146
3335
3336         Reviewed by Darin Adler.
3337
3338         Do not presume that |yValue| is primitive if |value| is implicit in StylePropertySerializer.
3339         An implicit y-value can become explicit if specified as a separate longhand.
3340         At the same time, its new value can be non-primitive.
3341
3342         Backported from Blink:
3343         http://src.chromium.org/viewvc/blink?view=rev&rev=153678
3344
3345         Test: fast/css/webkit-mask-crash-implicit.html
3346
3347         * css/StyleProperties.cpp:
3348         (WebCore::StyleProperties::getLayeredShorthandValue):
3349
3350 2013-12-03  Rob Buis  <rob.buis@samsung.com>
3351
3352         Fix build break after r160007.
3353
3354         * rendering/style/BasicShapes.cpp:
3355         (WebCore::BasicShape::canBlend):
3356
3357 2013-12-03  Rob Buis  <rob.buis@samsung.com>
3358
3359         [css shapes] layout for new ellipse syntax
3360         https://bugs.webkit.org/show_bug.cgi?id=124621
3361
3362         Reviewed by Dirk Schulze.
3363
3364         Implement support for doing layout with the new ellipse shape syntax,
3365         including basic animation support.
3366
3367         Test: fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-000.html
3368
3369         * rendering/shapes/Shape.cpp:
3370         (WebCore::Shape::createShape): Convert new ellipse to a layout shape.
3371         * rendering/style/BasicShapes.cpp:
3372         (WebCore::BasicShape::canBlend): Ignore ellipses with values that
3373             cannot be interpolated.
3374         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Helper function to calculate
3375             either radiusX or radiusY, shared by clip-path and shape code paths.
3376         (WebCore::BasicShapeEllipse::path):
3377         * rendering/style/BasicShapes.h:
3378
3379 2013-12-03  Frédéric Wang  <fred.wang@free.fr>
3380
3381         Add an MathMLSelectElement class to implement <maction> and <semantics>.
3382         <https://webkit.org/b/120058>
3383
3384         Reviewed by Chris Fleizach.
3385
3386         Tests: mathml/presentation/maction-dynamic.html
3387                mathml/presentation/maction.html
3388                mathml/presentation/semantics.html
3389
3390         This adds a new MathMLSelectElement class to prepare the implementation
3391         of the <maction> and <semantics> elements, for which only one "selected"
3392         child is visible. We now simply display the first child of the
3393         <semantics> element instead of hiding the annotations and this allows to
3394         handle the use case of SVG-in-MathML as generated by Instiki when
3395         bug 124128 is fixed ; Gecko's selection algorithm will be implemented
3396         later (bug 100626). We now also rely on the @actiontype and @selection
3397         attributes to select the visible <maction> child ; It remains to deal
3398         with the user interaction (bug 85734).
3399
3400         * CMakeLists.txt: add the new files.
3401         * GNUmakefile.list.am: ditto
3402         * Target.pri: ditto
3403         * WebCore.vcxproj/WebCore.vcxproj: ditto
3404         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto
3405         * WebCore.xcodeproj/project.pbxproj: ditto
3406         * css/mathml.css: remove the CSS rule for annotation/annotation-xml.
3407         * mathml/MathMLAllInOne.cpp: add the new cpp file.
3408         * mathml/MathMLSelectElement.cpp: Added.
3409         (WebCore::MathMLSelectElement::MathMLSelectElement):
3410         (WebCore::MathMLSelectElement::create):
3411         (WebCore::MathMLSelectElement::createRenderer):
3412         (WebCore::MathMLSelectElement::childShouldCreateRenderer):
3413         (WebCore::MathMLSelectElement::finishParsingChildren):
3414         (WebCore::MathMLSelectElement::childrenChanged):
3415         (WebCore::MathMLSelectElement::attributeChanged):
3416         (WebCore::MathMLSelectElement::updateSelectedChild): basic implementation for maction, semantics, maction@actiontype and maction@selection.
3417         * mathml/MathMLSelectElement.h: Added.
3418         * mathml/mathattrs.in: add actiontype and selection attributes.
3419         * mathml/mathtags.in: set element classes for maction, semantics, annotation and annotation-xml.
3420
3421 2013-12-03  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3422
3423         Nix Upstream: Adding missing nix new files to WebCore
3424         https://bugs.webkit.org/show_bug.cgi?id=124987
3425
3426         Reviewed by Benjamin Poulain.
3427
3428         No new tests needed.
3429
3430         * PlatformNix.cmake:
3431         * platform/nix/ErrorsNix.cpp: Added.
3432         * platform/nix/ErrorsNix.h: Added.
3433         * platform/nix/FileSystemNix.cpp: Added.
3434         * platform/nix/MIMETypeRegistryNix.cpp: Added.
3435         * platform/nix/SharedTimerNix.cpp: Added.
3436         * platform/nix/TemporaryLinkStubs.cpp: Added.
3437
3438 2013-12-03  Tamas Gergely  <gertom@inf.u-szeged.hu>
3439
3440         Correct broken build on efl port with --no-netscape-plugin-api
3441         configuration.
3442         https://bugs.webkit.org/show_bug.cgi?id=123997
3443
3444         Reviewed by Zoltan Herczeg.
3445
3446         Build failed on efl port with --no-netscape-plugin-api configuration
3447         as ld did not found some methods. The configuration uses a minimal
3448         empty implementation of the class, which is now extended with empty
3449         method implementations.
3450
3451         * plugins/PluginPackageNone.cpp:
3452         (WebCore::PluginPackage::createPackage):
3453           Returns NULL pointer.
3454         (WebCore::PluginPackage::hash):
3455           Returns 0.
3456         (WebCore::PluginPackage::equal):
3457           Returns true (equals).
3458         (WebCore::PluginPackage::compare):
3459           Returns 0 (equals).
3460         (WebCore::PluginPackage::~PluginPackage):
3461           Do nothing.
3462
3463 2013-12-02  Andreas Kling  <akling@apple.com>
3464
3465         Avoid setting style twice for generated image content.
3466         <https://webkit.org/b/125128>
3467
3468         Take care of a FIXME I added in r158097 and avoid redundant work in
3469         ImageContentData::createRenderer().
3470
3471         I changed the inheritance helper RenderImage::setPseudoStyle() into
3472         a new createStyleInheritingFromPseudoStyle() function instead so it
3473         can be used from both PseudoElement and ImageContentData.
3474
3475         Reviewed by Antti Koivisto.
3476
3477 2013-12-02  Samuel White  <samuel_white@apple.com>
3478
3479         AX: Add AXUIElementCountForSearchPredicate parameterized attribute.
3480         https://bugs.webkit.org/show_bug.cgi?id=124561
3481
3482         Reviewed by Chris Fleizach.
3483
3484         Added ability to fetch the number of elements that match a specific criteria. This will enable VoiceOver
3485         to interface with WebKit much more dynamically. We can now get an idea of how many interesting elements
3486         exist on a page, and then fetch them in chunks as needed.
3487
3488         Test: platform/mac/accessibility/search-predicate-element-count.html
3489
3490         * accessibility/AccessibilityObject.cpp:
3491         (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch):
3492         * accessibility/AccessibilityObject.h:
3493         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
3494         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3495         (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
3496         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
3497         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3498
3499 2013-12-02  Bem Jones-Bey  <bjonesbe@adobe.com>
3500
3501         [css shapes] Layout support for new circle shape syntax
3502         https://bugs.webkit.org/show_bug.cgi?id=124619
3503
3504         Reviewed by Dirk Schulze.
3505
3506         Implement support for doing layout with the new circle shape syntax,
3507         inclduing basic animation support.
3508
3509         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-circle-000.html
3510                fast/shapes/shape-outside-floats/shape-outside-floats-circle-001.html
3511                fast/shapes/shape-outside-floats/shape-outside-floats-circle-002.html
3512                fast/shapes/shape-outside-floats/shape-outside-floats-circle-003.html
3513                fast/shapes/shape-outside-floats/shape-outside-floats-circle-004.html
3514                fast/shapes/shape-outside-floats/shape-outside-floats-circle-005.html
3515
3516         * css/BasicShapeFunctions.cpp:
3517         (WebCore::floatValueForCenterCoordinate): Used by both the CSS Shapes
3518             layout code and the clip path code.
3519         * css/BasicShapeFunctions.h:
3520         * css/CSSBasicShapes.cpp:
3521         (WebCore::buildCircleString): Update to use appendLiteral, and remove
3522             call to reserveCapacity - if we find that it's actually slow when
3523             doing performance tests, we can hopefully do something smarter and
3524             less ugly than that.
3525         * css/CSSParser.cpp:
3526         (WebCore::CSSParser::parseShapeRadius): Fix a logic error that caused
3527             the radius keywords not to work properly.
3528         * rendering/shapes/Shape.cpp:
3529         (WebCore::Shape::createShape): Convert new circle to a layout shape.
3530         * rendering/style/BasicShapes.cpp:
3531         (WebCore::BasicShape::canBlend): Ignore circles with values that
3532             cannot be interpolated.
3533         (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Convert circle
3534             radius keywords to a float value.
3535         (WebCore::BasicShapeCircle::path):
3536         (WebCore::BasicShapeCircle::blend):
3537         * rendering/style/BasicShapes.h:
3538         (WebCore::BasicShapeCenterCoordinate::canBlend):
3539         (WebCore::BasicShapeRadius::canBlend):
3540
3541 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
3542
3543         WebCrypto HMAC doesn't check key algorithm's hash
3544         https://bugs.webkit.org/show_bug.cgi?id=125114
3545
3546         Reviewed by Anders Carlsson.
3547
3548         Test: crypto/subtle/hmac-check-algorithm.html
3549
3550         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3551         (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches): Check it.
3552
3553 2013-12-02  Brady Eidson  <beidson@apple.com>
3554
3555         Possible crash in ProgressTracker::progressHeartbeatTimerFired(Timer<ProgressTracker>*)
3556         https://bugs.webkit.org/show_bug.cgi?id=125110
3557
3558         Reviewed by Darin Adler.
3559
3560         FrameLoader::loadProgressingStatusChanged() might be called while the Frame has a null FrameView.
3561
3562         It’s unclear how to reproduce, but there’s no harm in a null check.
3563
3564         * loader/FrameLoader.cpp:
3565         (WebCore::FrameLoader::loadProgressingStatusChanged):
3566
3567 2013-12-02  Brady Eidson  <beidson@apple.com>
3568
3569         Possible crash in ProgressTracker::progressHeartbeatTimerFired(Timer<ProgressTracker>*)
3570         https://bugs.webkit.org/show_bug.cgi?id=125110
3571
3572         Reviewed by Darin Adler.
3573
3574         It’s possible to have a null m_originatingProgressFrame when the heartbeat timer fires.
3575
3576         On the surface this seems impossible because the only time m_originatingProgressFrame is cleared
3577         out the heartbeat timer is also stopped.
3578
3579         But there’s likely still a race condition in multi-threaded environments.
3580
3581         There’s no harm in null-checking m_originatingProgressFrame before accessing its loader.
3582
3583         * loader/ProgressTracker.cpp:
3584         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
3585
3586 2013-12-02  Brady Eidson  <beidson@apple.com>
3587
3588         Add more CachedPage null checks
3589         https://bugs.webkit.org/show_bug.cgi?id=125106
3590
3591         Reviewed by Sam Weinig.
3592
3593         Only some functions in PageCache.cpp null-check the CachedPages in HistoryItems.
3594
3595         Every part that manipulates the CachedPage should.
3596
3597         * history/PageCache.cpp:
3598         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
3599         (WebCore::PageCache::markPagesForFullStyleRecalc):
3600         (WebCore::PageCache::markPagesForDeviceScaleChanged):
3601         (WebCore::PageCache::markPagesForCaptionPreferencesChanged):
3602
3603 2013-12-02  Zoltan Horvath  <zoltan@webkit.org>
3604
3605         [CSS Shapes] Support inset parsing
3606         https://bugs.webkit.org/show_bug.cgi?id=124903
3607
3608         Reviewed by David Hyatt.
3609
3610         In this patch I added support for inset shape parsing for CSS Shapes. Inset is defined
3611         by CSS Shapes Level 1 (http://dev.w3.org/csswg/css-shapes-1/#supported-basic-shapes).
3612         Inset is going to be used by shape-outside (bug #124905), and eventually by shape-inside.
3613
3614         No new tests, I updated existing tests to cover the changes.
3615
3616         * css/BasicShapeFunctions.cpp:
3617         (WebCore::valueForBasicShape): Add support for inset.
3618         (WebCore::basicShapeForValue): Add support for inset.
3619         * css/CSSBasicShapes.cpp:
3620         (WebCore::buildInsetString): Create inset css string.
3621         (WebCore::CSSBasicShapeInset::cssText): Convert inset shape to a CSS string.
3622         (WebCore::CSSBasicShapeInset::equals): Compare two inset rectangles.
3623         (WebCore::CSSBasicShapeInset::serializeResolvingVariables): Create an inset string, with CSS variables resolved.
3624         (WebCore::CSSBasicShapeInset::hasVariableReference): Determine if this inset has any CSS Variable references.
3625         * css/CSSBasicShapes.h: Add inset class.
3626         (WebCore::CSSBasicShapeInset::create):
3627         (WebCore::CSSBasicShapeInset::top):
3628         (WebCore::CSSBasicShapeInset::right):
3629         (WebCore::CSSBasicShapeInset::bottom):
3630         (WebCore::CSSBasicShapeInset::left):
3631         (WebCore::CSSBasicShapeInset::topLeftRadius):
3632         (WebCore::CSSBasicShapeInset::topRightRadius):
3633         (WebCore::CSSBasicShapeInset::bottomRightRadius):
3634         (WebCore::CSSBasicShapeInset::bottomLeftRadius):
3635         (WebCore::CSSBasicShapeInset::setTop):
3636         (WebCore::CSSBasicShapeInset::setRight):
3637         (WebCore::CSSBasicShapeInset::setBottom):
3638         (WebCore::CSSBasicShapeInset::setLeft):
3639         (WebCore::CSSBasicShapeInset::setTopLeftRadius):
3640         (WebCore::CSSBasicShapeInset::setTopRightRadius):
3641         (WebCore::CSSBasicShapeInset::setBottomRightRadius):
3642         (WebCore::CSSBasicShapeInset::setBottomLeftRadius):
3643         (WebCore::CSSBasicShapeInset::CSSBasicShapeInset):
3644         * css/CSSParser.cpp:
3645         (WebCore::completeBorderRadii): Move static function before parseInsetBorderRadius.
3646         (WebCore::CSSParser::parseInsetRoundedCorners): I added this helper function for parsing the rounded corners
3647         (WebCore::CSSParser::parseBasicShapeInset): Parse inset.
3648         (WebCore::CSSParser::parseBasicShape): Add call to parse inset.
3649         * css/CSSParser.h:
3650         * css/CSSPrimitiveValue.cpp:
3651         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add constructor for LengthSize.
3652         (WebCore::CSSPrimitiveValue::init): Initialize LengthSize.
3653         * css/CSSPrimitiveValue.h:
3654         (WebCore::CSSPrimitiveValue::create): Add support for creating PrimitiveValue from LengthSize.
3655         * css/CSSValuePool.h:
3656         (WebCore::CSSValuePool::createValue): Add support for LengthSize.
3657         * platform/LengthSize.h:
3658         (WebCore::LengthSize::blend): Add blend for LengthSize.
3659         * rendering/shapes/ShapeInsideInfo.cpp:
3660         (WebCore::ShapeInsideInfo::isEnabledFor): Keep inset disabled for shape-inside now.
3661         * rendering/style/BasicShapes.cpp:
3662         (WebCore::BasicShapeInset::path): Calculate path for an inset.
3663         (WebCore::BasicShapeInset::blend): Blend two insets.
3664         * rendering/style/BasicShapes.h: Add higher level inset.
3665         (WebCore::BasicShapeInset::create):
3666         (WebCore::BasicShapeInset::top):
3667         (WebCore::BasicShapeInset::right):
3668         (WebCore::BasicShapeInset::bottom):
3669         (WebCore::BasicShapeInset::left):
3670         (WebCore::BasicShapeInset::topLeftRadius):
3671         (WebCore::BasicShapeInset::topRightRadius):
3672         (WebCore::BasicShapeInset::bottomRightRadius):
3673         (WebCore::BasicShapeInset::bottomLeftRadius):
3674         (WebCore::BasicShapeInset::setTop):
3675         (WebCore::BasicShapeInset::setRight):
3676         (WebCore::BasicShapeInset::setBottom):
3677         (WebCore::BasicShapeInset::setLeft):
3678         (WebCore::BasicShapeInset::setTopLeftRadius):
3679         (WebCore::BasicShapeInset::setTopRightRadius):
3680         (WebCore::BasicShapeInset::setBottomRightRadius):
3681         (WebCore::BasicShapeInset::setBottomLeftRadius):
3682         (WebCore::BasicShapeInset::BasicShapeInset):
3683
3684 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
3685
3686         Support WebCrypto AES-KW
3687         https://bugs.webkit.org/show_bug.cgi?id=125105
3688
3689         Reviewed by Sam Weinig.
3690
3691         Tests: crypto/subtle/aes-kw-key-manipulation.html
3692                crypto/subtle/aes-kw-wrap-unwrap-aes.html
3693
3694         * WebCore.xcodeproj/project.pbxproj: Added new files.
3695
3696         * crypto/CryptoAlgorithmIdentifier.h: (WebCore::CryptoAlgorithmIdentifier): Added AES-KW.
3697         It's not standardized yet, but there appears to be a consensus that it will be specified.
3698
3699         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3700         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
3701         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
3702         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
3703         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
3704         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
3705         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
3706         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
3707         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
3708         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
3709         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
3710         Added AES-KW cases everywhere.
3711
3712         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3713         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
3714         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
3715         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
3716         Support importing/exporting AES-KW keys in JWK.
3717
3718         * bindings/js/JSSubtleCryptoCustom.cpp:
3719         (WebCore::JSSubtleCrypto::importKey):
3720         (WebCore::JSSubtleCrypto::exportKey):
3721         (WebCore::JSSubtleCrypto::wrapKey):
3722         (WebCore::JSSubtleCrypto::unwrapKey):
3723         Added some accidentally forgotten std::moves.
3724
3725         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: Added.
3726         * crypto/algorithms/CryptoAlgorithmAES_KW.h: Added.
3727         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp: Added.
3728
3729         * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::CryptoKeyAES): Allow AES-KW
3730         as valid algorithm for AES keys.
3731
3732         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
3733         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-KW.
3734
3735 2013-12-02  Beth Dakin  <bdakin@apple.com>
3736
3737         Add a setting to opt into a mode where the background extends and fixed elements 
3738         don't move on rubber-band
3739         https://bugs.webkit.org/show_bug.cgi?id=124745
3740
3741         Reviewed by Tim Horton.
3742
3743         New setting backgroundShouldExtendBeyondPage() will cause the tile cache to have a 
3744         margin, and it will also cause fixed elements and backgrounds to stick to the 
3745         viewport on scroll instead of sticking to the document. 
3746
3747         * WebCore.exp.in:
3748         * page/FrameView.cpp:
3749         (WebCore::FrameView::scrollBehaviorForFixedElements):
3750         * page/Settings.in:
3751         * rendering/RenderLayerBacking.cpp:
3752         (WebCore::RenderLayerBacking::RenderLayerBacking):
3753
3754 2013-12-02  Roger Zanoni  <rogerzanoni@gmail.com>
3755
3756         [MediaStream] Use iterator-based loops instead of index-based loops
3757         https://bugs.webkit.org/show_bug.cgi?id=125021
3758
3759         Reviewed by Eric Carlson.
3760
3761         Also, changing iterator variable names from iter to it and
3762         initializing an 'end' variable in each loop instead of evaluating
3763         'collection.end()' multiple times.
3764
3765         No new tests, covered by existing ones.
3766
3767         * Modules/mediastream/MediaStream.cpp:
3768         (WebCore::MediaStream::cloneMediaStreamTrackVector):
3769         (WebCore::MediaStream::haveTrackWithSource):
3770         (WebCore::MediaStream::getTrackById):
3771         (WebCore::MediaStream::trackDidEnd):
3772         (WebCore::MediaStream::scheduledEventTimerFired):
3773
3774 2013-12-02  Rob Buis  <rob.buis@samsung.com>
3775
3776         [css shapes] Parse new ellipse shape syntax
3777         https://bugs.webkit.org/show_bug.cgi?id=124620
3778
3779         Reviewed by Dirk Schulze.
3780
3781         Implement parsing of the new ellipse shape syntax. This closely follows the patch
3782         for the new circle syntax (https://bugs.webkit.org/show_bug.cgi?id=124618), with
3783         some refactoring of functionality shared by both.
3784
3785         Updated existing parsing tests to cover this.
3786
3787         * css/BasicShapeFunctions.cpp:
3788         (WebCore::BasicShapeRadiusToCSSValue):
3789         (WebCore::valueForBasicShape):
3790         (WebCore::CSSValueToBasicShapeRadius):
3791         (WebCore::basicShapeForValue):
3792         * css/CSSBasicShapes.cpp:
3793         (WebCore::buildEllipseString):
3794         (WebCore::CSSBasicShapeEllipse::cssText):
3795         (WebCore::CSSBasicShapeEllipse::equals):
3796         (WebCore::buildDeprecatedEllipseString):
3797         (WebCore::CSSDeprecatedBasicShapeEllipse::cssText):
3798         (WebCore::CSSDeprecatedBasicShapeEllipse::equals):
3799         * css/CSSBasicShapes.h:
3800         (WebCore::CSSDeprecatedBasicShapeEllipse::create):
3801         (WebCore::CSSDeprecatedBasicShapeEllipse::centerX):
3802         (WebCore::CSSDeprecatedBasicShapeEllipse::centerY):
3803         (WebCore::CSSDeprecatedBasicShapeEllipse::radiusX):
3804         (WebCore::CSSDeprecatedBasicShapeEllipse::radiusY):
3805         (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterX):
3806         (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterY):
3807         (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusX):
3808         (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusY):
3809         (WebCore::CSSDeprecatedBasicShapeEllipse::CSSDeprecatedBasicShapeEllipse):
3810         * css/CSSParser.cpp:
3811         (WebCore::CSSParser::parseBasicShapeEllipse):
3812         (WebCore::CSSParser::parseDeprecatedBasicShapeEllipse):
3813         (WebCore::CSSParser::parseBasicShape):
3814         * css/CSSParser.h:
3815         * rendering/shapes/Shape.cpp:
3816         (WebCore::Shape::createShape):
3817         * rendering/style/BasicShapes.cpp:
3818         (WebCore::DeprecatedBasicShapeEllipse::path):
3819         (WebCore::DeprecatedBasicShapeEllipse::blend):
3820         (WebCore::BasicShapeEllipse::path):
3821         (WebCore::BasicShapeEllipse::blend):
3822         * rendering/style/BasicShapes.h:
3823         (WebCore::BasicShapeEllipse::centerX):
3824         (WebCore::BasicShapeEllipse::centerY):
3825         (WebCore::BasicShapeEllipse::radiusX):
3826         (WebCore::BasicShapeEllipse::radiusY):
3827         (WebCore::BasicShapeEllipse::setCenterX):
3828         (WebCore::BasicShapeEllipse::setCenterY):
3829         (WebCore::BasicShapeEllipse::setRadiusX):
3830         (WebCore::BasicShapeEllipse::setRadiusY):
3831         (WebCore::BasicShapeEllipse::BasicShapeEllipse):
3832         (WebCore::DeprecatedBasicShapeEllipse::create):
3833         (WebCore::DeprecatedBasicShapeEllipse::DeprecatedBasicShapeEllipse):
3834
3835 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
3836
3837         Add support for WebCrypto RSA-OAEP
3838         https://bugs.webkit.org/show_bug.cgi?id=125084
3839
3840         Build fix.
3841
3842         * crypto/CommonCryptoUtilities.h:
3843         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3844         * crypto/mac/CryptoKeyRSAMac.cpp:
3845
3846 2013-12-02  Brendan Long  <b.long@cablelabs.com>
3847
3848         Use GenericEventQueue in TrackListBase and reduce code duplication with scheduleTrackEvent()
3849         https://bugs.webkit.org/show_bug.cgi?id=124811
3850
3851         Reviewed by Eric Carlson.
3852
3853         No new tests because this is just refactoring.
3854
3855         * html/track/TrackListBase.cpp:
3856         (TrackListBase::TrackListBase): Replace event code with a GenericEventQueue.
3857         (TrackListBase::scheduleTrackEvent): Factor out duplicate code in schedule{Add,Remove}TrackEvent functions.
3858         (TrackListBase::scheduleAddTrackEvent): Same.
3859         (TrackListBase::scheduleRemoveTrackEvent): Same.
3860         (TrackListBase::scheduleChangeEvent): Use GenericEventQueue.
3861         * html/track/TrackListBase.h: Replace event code with GenericEventQueue.
3862
3863 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
3864
3865         Add support for WebCrypto RSA-OAEP
3866         https://bugs.webkit.org/show_bug.cgi?id=125084
3867
3868         Build fix.
3869
3870         * WebCore.xcodeproj/project.pbxproj: Fix an automatic merge failure by re-adding
3871         CryptoAlgorithmRsaOaepParams.h.
3872
3873 2013-12-02  Victor Jaquez  <vjaquez@igalia.com>
3874
3875         [Gstreamer] update webkitvideosink metadata
3876         https://bugs.webkit.org/show_bug.cgi?id=125082
3877
3878         Reviewed by Philippe Normand.
3879
3880         No new tests, no behavior changes.
3881
3882         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3883         (webkit_video_sink_class_init):
3884
3885 2013-12-02  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3886
3887         Simplify MediaPlayerPrivateGStreamerBase::createVideoSink()
3888         https://bugs.webkit.org/show_bug.cgi?id=125077
3889
3890         Remove the method's unused parameter.
3891         Remove the GStreamer 0.10.22 run-time validation, since we are using
3892         GStreamer 1.0 officially.
3893         Remove the creation of a spurious Bin for the video sink, since
3894         either the fpssink or the webkitsink are valid sink elements.
3895         Change fpsink to a GRefPtr.
3896
3897         Now, createVideoSink() returns a simple pointer to the created sink
3898         element.
3899
3900         Reviewed by Philippe Normand.
3901
3902         No new tests, no behavior changes.
3903
3904         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3905         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
3906         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3907         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
3908         (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
3909         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
3910         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3911
3912 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
3913
3914         Add support for WebCrypto RSA-OAEP
3915         https://bugs.webkit.org/show_bug.cgi?id=125084
3916
3917         Reviewed by Sam Weinig.
3918
3919         Tests: crypto/subtle/rsa-oaep-key-manipulation.html
3920                crypto/subtle/rsa-oaep-plaintext-length.html
3921                crypto/subtle/rsa-oaep-wrap-unwrap-aes.html
3922
3923         * WebCore.xcodeproj/project.pbxproj: Added new files.
3924
3925         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3926         (WebCore::createRsaOaepParams):
3927         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
3928         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
3929         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
3930         Added RSA-OAEP parameters.
3931
3932         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3933         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
3934         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
3935         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
3936         Support RSA-OAEP in JWK. It is more limited than general WebCrypto, as JWK only
3937         allows SHA-1 as hash.
3938
3939         * crypto/CommonCryptoUtilities.cpp: Added. (WebCore::getCommonCryptoDigestAlgorithm):
3940         * crypto/CommonCryptoUtilities.h: Added.
3941         Extracted some shared code and forward declarations for CommonCrypto.
3942
3943         * crypto/CryptoAlgorithmParameters.h: (WebCore::CryptoAlgorithmParameters::Class):
3944         * crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
3945         Added RsaOaepParams.
3946
3947         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: Added.
3948         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h: Added.
3949         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp: Added.
3950
3951         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3952         (WebCore::getCommonCryptoHMACAlgorithm):
3953         (WebCore::CryptoAlgorithmHMAC::platformSign):
3954         (WebCore::CryptoAlgorithmHMAC::platformVerify):
3955         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3956         * crypto/mac/CryptoKeyMac.cpp:
3957         * crypto/mac/CryptoKeyRSAMac.cpp:
3958         Use CommonCryptoUtilities.
3959
3960         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
3961         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register RSA-OAEP.
3962
3963 2013-12-02  Andres Gomez  <agomez@igalia.com>
3964
3965         [GTK] Fails to build with freetype 2.5.1
3966         https://bugs.webkit.org/show_bug.cgi?id=125074
3967
3968         Reviewed by Carlos Garcia Campos.
3969
3970         FreeType specifies a canonical way of including their own
3971         headers. Now, we are following this recommendation so the
3972         compilation won't be broken again due to an upgrade in FeeType's
3973         including paths.
3974
3975         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3976         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3977         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
3978
3979 2013-12-02  Chris Fleizach  <cfleizach@apple.com>
3980
3981         AX: Crash at WebCore::commonTreeScope
3982         https://bugs.webkit.org/show_bug.cgi?id=125042
3983
3984         Reviewed by Mario Sanchez Prada.
3985
3986         When an AX text marker that references a node in a detached document is used to create a text marker range, a crash occurs
3987         because the method to determine commonTreeScopes does not account for when there are no common tree scopes.
3988
3989         Test: platform/mac/accessibility/ordered-textmarker-crash.html
3990
3991         * accessibility/AccessibilityObject.cpp:
3992         (WebCore::AccessibilityObject::visiblePositionRangeForUnorderedPositions):
3993         * dom/TreeScope.cpp:
3994         (WebCore::commonTreeScope):
3995
3996 2013-12-02  Nick Diego Yamane  <nick.yamane@openbossa.org>
3997
3998         Fix a crash in the webaudio source provider when the audio track is going away.
3999         https://bugs.webkit.org/show_bug.cgi?id=124975
4000
4001         Reviewed by Philippe Normand.
4002
4003         Merged https://chromium.googlesource.com/chromium/blink/+/b21838b32bf11b1a972dfc449ddde71115490c23
4004
4005         Before this patch, it was hitting a use-after-free crash  when the audio
4006         track in the media stream is going away and the webaudio mediastreamsourcenode
4007         is still running.
4008
4009         * Modules/webaudio/AudioContext.cpp:
4010         (WebCore::AudioContext::createMediaStreamSource): Passing audio track
4011         pointer to MediaStreamAudioSourceNode constructor.
4012         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
4013         (WebCore::MediaStreamAudioSourceNode::create):
4014         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
4015         * Modules/webaudio/MediaStreamAudioSourceNode.h: Added
4016         MediaStreamTrack class variable and change the constructor to receive
4017         it as parameter.
4018
4019 2013-12-02  Andrzej Badowski  <a.badowski@samsung.com>
4020
4021         [ATK] Support active state for listbox elements.
4022         https://bugs.webkit.org/show_bug.cgi?id=125009
4023
4024         Reviewed by Chris Fleizach.
4025
4026         Added support for ATK_STATE_ACTIVE for listbox elements.
4027
4028         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
4029         (setAtkStateSetFromCoreObject):
4030
4031 2013-12-02  Seokju Kwon  <seokju@webkit.org>
4032
4033         Web Inspector: Remove unused functions from InspectorAgent
4034         https://bugs.webkit.org/show_bug.cgi?id=125061
4035
4036         Reviewed by Antoine Quint.
4037
4038         Get rid of unused functions, redundant inclusion and forward declaration.
4039
4040         No new tests, no behavior changes.
4041
4042         * inspector/InspectorAgent.cpp:
4043         * inspector/InspectorAgent.h:
4044
4045 2013-12-02  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
4046
4047         Fix build warning in EventHandler.cpp