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