8baa72a9649a47087f1b4012ecc20d9cd5981f65
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
2
3         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
4         https://bugs.webkit.org/show_bug.cgi?id=141748
5
6         Reviewed by Sergio Villar Senin.
7
8         The first step of grid item placement algorithm has been updated in
9         order to support both "sparse" and "dense" modes. Current code is always
10         doing a "dense" packing in this case.
11
12         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
13
14         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
15
16         * rendering/RenderGrid.cpp:
17         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
18         for each row/column and use it to place items in the right position.
19
20 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
21
22         [GTK] Layout Test accessibility/roles-exposed.html is failing
23         https://bugs.webkit.org/show_bug.cgi?id=141960
24
25         Reviewed by Martin Robinson.
26
27         The test was failing because Gtk now uses GtkColorChooserDialog for the
28         color input, making the input field a button which results in the color
29         chooser dialog appearing. As a side effect of this change, the input now
30         has an accessible role of ColorWell, which is currently mapped to
31         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
32         upon activating the button input field). Changed the Gtk platform mapping
33         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
34
35         No new tests. Instead, updated and unskipped failing test.
36
37         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
38         (atkRole):
39
40 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
41
42         [GTK] Fonts loaded via @font-face look bad
43         https://bugs.webkit.org/show_bug.cgi?id=140994
44
45         Reviewed by Martin Robinson.
46
47         We've had several complaints that woff fonts look bad on some websites. This seems to be a
48         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
49         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
50         use sane default settings from Fontconfig when loading a web font, rather than accepting the
51         default settings from GTK+, which are normally overridden by Fontconfig when loading system
52         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
53         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
54         issues when fonts with poor native hinting are only tested in browsers that do not use the
55         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
56         bytecode interpreter.
57
58         The net result of this is that there should be little noticable difference if you have GTK+
59         set to use slight hinting (which forces use of the autohinter) unless you have customized
60         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
61         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
62
63         No new tests, since the affected fonts we've found are not freely redistributable.
64
65         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
66         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
67         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
68         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
69         (WebCore::getDefaultFontconfigOptions): Added.
70         (WebCore::FontPlatformData::initializeWithFontFace): Always call
71         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
72         created with an FcPattern (e.g. because this is a web font), call
73         getDefaultFontconfigOptions to get a sane default FcPattern.
74         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
75         (WebCore::getDefaultFontOptions): Deleted.
76
77 2015-02-24  Andreas Kling  <akling@apple.com>
78
79         [Cocoa] Break internal reference cycle in WebCore::Font.
80         <https://webkit.org/b/141941>
81         <rdar://problem/19650570>
82
83         Reviewed by Antti Koivisto.
84
85         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
86         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
87
88         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
89         variant (really "this") in Font::m_derivedData->smallCaps.
90
91         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
92         This stops us from accumulating tons of abandoned Font objects over time.
93
94         * platform/graphics/Font.cpp:
95         (WebCore::Font::verticalRightOrientationFont):
96         (WebCore::Font::uprightOrientationFont):
97         (WebCore::Font::smallCapsFont):
98         (WebCore::Font::emphasisMarkFont):
99         (WebCore::Font::brokenIdeographFont):
100         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
101
102         * platform/graphics/cocoa/FontCocoa.mm:
103         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
104
105 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
106
107         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
108         https://bugs.webkit.org/show_bug.cgi?id=141650
109
110         Reviewed by Benjamin Poulain.
111
112         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
113         This patch stores them as private slots in JSReadableStream.
114         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
115
116         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
117         That may be the cleanest solution, especially if other APIs express the same need.
118         Another alternative is to store DeferredWrapper in ReadableStream objects.
119         But it is currently preferred to keep DeferredWrapper in bindings/js code.
120
121         Added new constructor for DeferredWrapper to use these stored values.
122         Updated ready and closed methods to use that new constructor.
123         Changes are covered by new test in streams/readablestream-constructor.html.
124
125         * bindings/js/JSDOMPromise.cpp:
126         (WebCore::DeferredWrapper::DeferredWrapper):
127         * bindings/js/JSDOMPromise.h:
128         * bindings/js/JSReadableStreamCustom.cpp:
129         (WebCore::closedPromiseSlotName):
130         (WebCore::getOrCreatePromiseDeferredFromObject):
131         (WebCore::readyPromiseSlotName):
132         (WebCore::JSReadableStream::ready):
133         (WebCore::JSReadableStream::closed):
134         * bindings/js/ReadableStreamJSSource.cpp:
135         (WebCore::setInternalSlotToObject):
136         (WebCore::getInternalSlotFromObject):
137         * bindings/js/ReadableStreamJSSource.h:
138
139 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
140
141         Always serialize :lang()'s arguments to strings
142         https://bugs.webkit.org/show_bug.cgi?id=141944
143
144         Reviewed by Benjamin Poulain.
145
146         As specified in [1] :lang()'s arguments are always serialized to strings.
147
148         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
149
150         Related tests are updated.
151
152         * css/CSSGrammar.y.in:
153         * css/CSSParserValues.cpp:
154         (WebCore::CSSParserSelector::setLangArgumentList):
155         * css/CSSParserValues.h:
156         (WebCore::CSSParserString::init):
157         (WebCore::CSSParserString::clear):
158         (WebCore::CSSParserString::tokenType): Deleted.
159         (WebCore::CSSParserString::setTokenType): Deleted.
160         * css/CSSSelector.cpp:
161         (WebCore::appendLangArgumentList):
162         (WebCore::CSSSelector::setLangArgumentList):
163         * css/CSSSelector.h:
164         (WebCore::CSSSelector::langArgumentList):
165         * css/SelectorCheckerTestFunctions.h:
166         (WebCore::matchesLangPseudoClass):
167         * cssjit/SelectorCompiler.cpp:
168         (WebCore::SelectorCompiler::addPseudoClassType):
169         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
170
171 2015-02-24  Antti Koivisto  <antti@apple.com>
172
173        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
174
175         * css/StyleResolver.cpp:
176         (WebCore::StyleResolver::loadPendingImages):
177
178 2015-02-23  Commit Queue  <commit-queue@webkit.org>
179
180         Unreviewed, rolling out r180547 and r180550.
181         https://bugs.webkit.org/show_bug.cgi?id=141957
182
183         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
184
185         Reverted changesets:
186
187         "REGRESSION(r179429): Can't type comments in Facebook"
188         https://bugs.webkit.org/show_bug.cgi?id=141859
189         http://trac.webkit.org/changeset/180547
190
191         "Constructor returning null should construct an object instead
192         of null"
193         https://bugs.webkit.org/show_bug.cgi?id=141640
194         http://trac.webkit.org/changeset/180550
195
196 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
197
198         Disable font loading events until our implementation gets updated to match the latest spec
199         https://bugs.webkit.org/show_bug.cgi?id=141938
200
201         Reviewed by Andreas Kling.
202
203         Revert r173531 for now since our implementation is outdated.
204
205         * Configurations/FeatureDefines.xcconfig:
206
207 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
208
209         EventHandler references deleted Scrollbar
210         https://bugs.webkit.org/show_bug.cgi?id=141931
211         <rdar://problem/19915210>
212
213         Reviewed by Tim Horton.
214
215         Tested by scrollbars/overflow-custom-scrollbar-crash.html
216
217         Update the EventHandler class to use a WeakPtr to reference the
218         last used Scrollbar, rather than retaining the Scrollbar and
219         artificially extending its life. This keeps the EventHandler
220         state in proper sync with the state of the render tree, and
221         avoids cases where we have destroyed a ScrollableArea (and
222         Scrollbar) but are still sending messages to a fake zombie
223         version of the element.
224
225         * page/EventHandler.cpp:
226         (WebCore::EventHandler::clear):
227         (WebCore::EventHandler::handleMousePressEvent):
228         (WebCore::EventHandler::updateMouseEventTargetNode):
229         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
230         * page/EventHandler.h:
231         * platform/Scrollbar.cpp:
232         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
233         * platform/Scrollbar.h:
234         (WebCore::Scrollbar::createWeakPtr): Added,
235
236 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
237
238         REGRESSION(r179429): Can't type comments in Facebook
239         https://bugs.webkit.org/show_bug.cgi?id=141859
240
241         Reviewed by Geoffrey Garen.
242
243         Enable SymbolEnabled runtime flag in inspector context.
244
245         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
246         * WebCore.order:
247         * WebCore.vcxproj/WebCore.vcxproj:
248         * WebCore.vcxproj/WebCore.vcxproj.filters:
249         * bindings/js/JSDOMWindowBase.cpp:
250         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
251         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
252         * bindings/js/JSDOMWindowBase.h:
253         * bindings/js/JSWorkerGlobalScopeBase.cpp:
254         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
255         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
256         * bindings/js/JSWorkerGlobalScopeBase.h:
257         * inspector/InspectorFrontendClientLocal.cpp:
258         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
259         * page/Settings.h:
260         * page/Settings.in:
261
262 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
263
264         CSS JIT: add support for case-insensitive attribute matching
265         https://bugs.webkit.org/show_bug.cgi?id=141880
266
267         Reviewed by Andreas Kling.
268
269         The value matching now has 3 cases:
270         1) Case-sensitive.
271         2) Case-insensitive.
272         3) Legacy HTML Case-insensitive.
273
274         The information to determine the case is split over 2 source:
275         -To know if explicit case-insensitive is needed, we need to ask the selector
276          for attributeValueMatchingIsCaseInsensitive().
277         -To know if the legacy HTML behavior is needed, we need to test the attribute
278          name filter with HTMLDocument::isCaseSensitiveAttribute().
279
280         I decided to perform all those checks at the fragment creation step.
281         This makes the register requirements and code generation more explicit.
282
283         From there, everything is easy: switch() on the type of matching needed,
284         and generate the code. The new case-insensitive case is a simplified version
285         of the legacy HTML behavior without runtime check for the element type.
286
287         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
288                fast/selectors/case-insensitive-attribute-register-requirement-1.html
289                fast/selectors/case-insensitive-attribute-register-requirement-2.html
290                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
291
292         * cssjit/SelectorCompiler.cpp:
293         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
294         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
295         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
296         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
297         (WebCore::SelectorCompiler::constructFragmentsInternal):
298         Compute the type of value matching and store it on the AttributeMatchingInfo
299         when creating the fragment.
300
301         (WebCore::SelectorCompiler::minimumRegisterRequirements):
302         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
303         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
304         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
305         register. I have made an exception for generateElementAttributeValueExactMatching()
306         for simplicity. I use that register to load the StringImpl of the attribute
307         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
308
309         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
310         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
311         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
312         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
313         the behavior is consistent between XML and HTML.
314
315 2015-02-23  Alex Christensen  <achristensen@webkit.org>
316
317         [WinCairo] Unreviewed build fix after r180532
318
319         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
320         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
321         Fixed typo.
322
323 2015-02-23  Chris Dumez  <cdumez@apple.com>
324
325         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
326         https://bugs.webkit.org/show_bug.cgi?id=141922
327         <rdar://problem/19923085>
328
329         Reviewed by Andreas Kling.
330
331         Log using diagnostic logging which ActiveDOMObjects prevent using the
332         PageCache.
333
334         * history/PageCache.cpp:
335         (WebCore::logCanCacheFrameDecision):
336         * page/DiagnosticLoggingKeys.cpp:
337         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
338         * page/DiagnosticLoggingKeys.h:
339
340 2015-02-23  Chris Dumez  <cdumez@apple.com>
341
342         Move GeoNotifier class to its own file
343         https://bugs.webkit.org/show_bug.cgi?id=141918
344
345         Reviewed by Andreas Kling.
346
347         Move GeoNotifier class to its own file to make Geolocation class less
348         crowded.
349
350 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
351
352         Remove unnecessary PlatformTimeRanges::create()
353         https://bugs.webkit.org/show_bug.cgi?id=141901
354
355         Reviewed by Filip Pizlo.
356
357         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
358         This functionality can be replaced with std::make_unique<> use directly.
359
360         No new tests, no behavior changes.
361
362         * Modules/mediasource/MediaSource.cpp:
363         (WebCore::MediaSource::buffered):
364         * Modules/mediasource/SourceBuffer.cpp:
365         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
366         * platform/graphics/MediaPlayer.cpp:
367         (WebCore::NullMediaPlayerPrivate::buffered):
368         * platform/graphics/MediaPlayerPrivate.h:
369         (WebCore::MediaPlayerPrivateInterface::seekable):
370         * platform/graphics/PlatformTimeRanges.cpp:
371         (WebCore::PlatformTimeRanges::create): Deleted.
372         * platform/graphics/PlatformTimeRanges.h:
373         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
374         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
375         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
376         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
377         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
378         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
379         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
380         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
381         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
382         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
383         (WebCore::MediaPlayerPrivateGStreamer::buffered):
384         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
385         (WebCore::MediaPlayerPrivateQTKit::buffered):
386         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
387         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
388         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
389         (WebCore::MockMediaPlayerMediaSource::buffered):
390
391 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
392
393         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
394         https://bugs.webkit.org/show_bug.cgi?id=141888
395
396         Reviewed by Filip Pizlo.
397
398         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
399         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
400
401         No new tests, no behavior changes.
402
403         * platform/SharedBuffer.h:
404         * platform/Supplementable.h:
405         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
406         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
407         * platform/graphics/ImageBuffer.h:
408         * platform/graphics/TiledBackingStoreBackend.h:
409         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
410         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
411         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
412         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
413         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
414         * platform/gtk/GamepadsGtk.cpp:
415
416 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
417
418         Default value of HTMLSelectElement size IDL attribute should be 0.
419         https://bugs.webkit.org/show_bug.cgi?id=141795
420
421         Reviewed by Andreas Kling.
422
423         Default value of HTMLSelectElement size IDL attribute should be 0. 
424         As in spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element, also this matches the behavior of Chrome, IE and
425         Gecko.
426
427         Test: fast/dom/select-size.html
428
429         * html/HTMLSelectElement.cpp:
430         (WebCore::HTMLSelectElement::parseAttribute):
431
432 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
433
434         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
435         https://bugs.webkit.org/show_bug.cgi?id=141729.
436
437         Reviewed by Daniel Bates.
438
439         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
440         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
441
442         * platform/graphics/GraphicsContext.h:
443         (WebCore::GraphicsContext::paintingDisabled):
444         (WebCore::GraphicsContext::updatingControlTints):
445
446 2015-02-22  Dean Jackson  <dino@apple.com>
447
448         [iOS] Max canvas size is lower than expected
449         https://bugs.webkit.org/show_bug.cgi?id=141886
450         <rdar://problem/19729246>
451
452         Reviewed by Tim Horton.
453
454         Use the same maximum canvas area for all ports,
455         which bumps the iOS limit up from 4580 * 1145
456         to 16k * 16k.
457
458         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
459
460 2015-02-23  Chris Dumez  <cdumez@apple.com>
461
462         Add support for diagnostic logging messages sampling
463         https://bugs.webkit.org/show_bug.cgi?id=141823
464         <rdar://problem/19899030>
465
466         Reviewed by Andreas Kling.
467
468         Add support for diagnostic logging messages sampling to decrease the
469         impact of diagnostic logging on CPU usage, while still getting useful
470         overall results. This patch adds a ShouldSample argument to
471         logDiagnosticMessage*() functions and logs 5% of the messages when
472         sampling. Sampling is turned on for keys that are known to be verbose
473         (e.g. per resource load logging).
474
475         On the page load test I am tracking, CPU usage caused by diagnostic
476         logging went down to 0.3% of UIProcess from 2.8% with this change.
477
478         * history/PageCache.cpp:
479         (WebCore::logPageCacheFailureDiagnosticMessage):
480         (WebCore::logCanCachePageDecision):
481         * html/HTMLMediaElement.cpp:
482         (WebCore::HTMLMediaElement::parseAttribute):
483         * loader/EmptyClients.h:
484         * loader/FrameLoader.cpp:
485         (WebCore::logNavigation):
486         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
487         * loader/ResourceLoader.cpp:
488         (WebCore::logResourceResponseSource):
489         * loader/SubframeLoader.cpp:
490         (WebCore::logPluginRequest):
491         * loader/SubresourceLoader.cpp:
492         (WebCore::SubresourceLoader::willSendRequest):
493         (WebCore::SubresourceLoader::didReceiveResponse):
494         (WebCore::logResourceLoaded):
495         * loader/cache/CachedResource.cpp:
496         (WebCore::logResourceRevalidationReason):
497         * loader/cache/CachedResourceLoader.cpp:
498         (WebCore::logMemoryCacheResourceRequest):
499         * page/DiagnosticLoggingClient.h:
500
501 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
502
503         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
504         https://bugs.webkit.org/show_bug.cgi?id=141729.
505
506         Reviewed by Simon Fraser.
507
508         When drawing an SVG image and the drawing context is set to be transparent,
509         make sure this transparency is applied to the compositing layer.
510
511         Test: svg/canvas/canvas-global-alpha-svg.html
512
513         * platform/graphics/GraphicsContext.cpp:
514         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
515         function and sets 'm_state.alpha' to the input value.
516
517         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
518         returns the value of the global alpha.
519         
520         * platform/graphics/GraphicsContext.h:
521         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
522         'alpha' to the context state since the getter function CGContextGetAlpha
523         is defined only in a private header file. Also move single line functions
524         from the source file to the header file.
525     
526         * platform/graphics/cairo/GraphicsContextCairo.cpp:
527         (WebCore::GraphicsContext::setPlatformAlpha):
528         (WebCore::GraphicsContext::setAlpha): Deleted.
529         * platform/graphics/cg/GraphicsContextCG.cpp:
530         (WebCore::GraphicsContext::setPlatformAlpha):
531         (WebCore::GraphicsContext::setAlpha): Deleted.
532         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
533         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
534         setPlatformAlpha().
535     
536         * svg/graphics/SVGImage.cpp:
537         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
538         global alpha value to the compositing layer.
539         
540 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
541
542         Occasional crash in MediaPlayer::setPrivateBrowsingMode
543         https://bugs.webkit.org/show_bug.cgi?id=141910
544
545         Reviewed by Jer Noble.
546
547         No new tests, I was unable to reproduce the crash.
548
549         * html/HTMLMediaElement.cpp:
550         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
551         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
552             to NULL.
553         * html/HTMLMediaElement.h: Define EveryDelayedAction.
554
555 2015-02-23  Philippe Normand  <pnormand@igalia.com>
556
557         [GStreamer] Redundant track language notifications
558         https://bugs.webkit.org/show_bug.cgi?id=141908
559
560         Reviewed by Žan Doberšek.
561
562         Invoke languageChanged only if the language code actually
563         changed.
564
565         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
566         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
567
568 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
569
570         [WinCairo] Crash when media player is destroyed.
571         https://bugs.webkit.org/show_bug.cgi?id=141248
572
573         Reviewed by Darin Adler.
574
575         A COM smart pointer is both released, and set to null.
576         This means that the COM Release method is called twice, causing a crash.
577
578         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
579         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
580
581 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
582
583         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
584         https://bugs.webkit.org/show_bug.cgi?id=141899
585
586         Reviewed by Sergio Villar Senin.
587
588         There was a FIXME about not re-resolving positions if the grid is grown during
589         auto-placement. But as the spec has changed [1] and you can only refer to the
590         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
591         we can get rid of this FIXME as it's not a causing a problem anymore.
592
593         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
594
595         No new tests (no change in behavior).
596
597         * rendering/RenderGrid.cpp:
598         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
599
600 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
601
602         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
603         https://bugs.webkit.org/show_bug.cgi?id=137877
604
605         Reviewed by Sam Weinig.
606
607         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
608         change OwnPtr with std::unique_ptr<>|make_unique<>.
609
610         No new tests, no behavior changes.
611
612         * page/scrolling/AsyncScrollingCoordinator.h:
613         * page/scrolling/ScrollingStateFixedNode.cpp:
614         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
615         * page/scrolling/ScrollingStateNode.cpp:
616         (WebCore::ScrollingStateNode::appendChild):
617         * page/scrolling/ScrollingStateNode.h:
618         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
619         * page/scrolling/ScrollingStateScrollingNode.cpp:
620         * page/scrolling/ScrollingStateStickyNode.cpp:
621         * page/scrolling/ScrollingTree.h:
622         * page/scrolling/ScrollingTreeNode.cpp:
623         (WebCore::ScrollingTreeNode::appendChild):
624         * page/scrolling/ScrollingTreeNode.h:
625         * page/scrolling/ScrollingTreeScrollingNode.h:
626
627 2015-02-22  Dean Jackson  <dino@apple.com>
628
629         Print a console warning when HTMLCanvasElement exceeds the maximum size
630         https://bugs.webkit.org/show_bug.cgi?id=141861
631         <rdar://problem/19729145>
632
633         Reviewed by Simon Fraser.
634
635         Add a warning if we ever try to create a canvas that is
636         too big.
637
638         No test because:
639         1. We can't ref-test against console messages.
640         2. The output is platform specific.
641
642         * html/HTMLCanvasElement.cpp:
643         (WebCore::HTMLCanvasElement::createImageBuffer):
644
645 2015-02-21  Sam Weinig  <sam@webkit.org>
646
647         Convert the caps lock indicator to be implemented using the shadow DOM
648         https://bugs.webkit.org/show_bug.cgi?id=141868
649
650         Reviewed by Dan Bernstein.
651
652         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
653           in r74099 to work around a site bug, that should not be a problem anymore.
654         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
655           than a paint time effect. This gives the proper overflow behavior (it now clips) and
656           behaves correctly in RTL.
657
658         * css/CSSParser.cpp:
659         (WebCore::isValidKeywordPropertyAndValue):
660         Make 'caps-lock-indicator' a valid -webkit-appearance value.
661
662         * css/CSSValueKeywords.in:
663         Remove comment that indicated that caps-lock-indicator was not a valid
664         -webkit-appearance value.
665
666         * css/html.css:
667         (input::-webkit-caps-lock-indicator):
668         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
669         trick employed here is to use a content: image to both implement the painting of
670         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
671
672         * html/HTMLInputElement.cpp:
673         (WebCore::HTMLInputElement::capsLockIndicatorElement):
674         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
675         * html/HTMLInputElement.h:
676         * html/InputType.cpp:
677         (WebCore::InputType::capsLockStateMayHaveChanged):
678         * html/InputType.h:
679         (WebCore::InputType::capsLockIndicatorElement):
680         Pipe notification of changes in the caps locks state to the <input> element
681         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
682         lock indicator element in the shadow DOM.
683
684         * html/TextFieldInputType.cpp:
685         (WebCore::TextFieldInputType::forwardEvent):
686         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
687         (WebCore::TextFieldInputType::createShadowSubtree):
688         (WebCore::TextFieldInputType::capsLockIndicatorElement):
689         (WebCore::TextFieldInputType::destroyShadowSubtree):
690         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
691         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
692         * html/TextFieldInputType.h:
693         Add a new element to the text field shadow DOM to act as the caps lock indicator.
694         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
695         from CSS. The element is always in the DOM for a password field. It toggles between
696         display: none and display: block depending on the state of the caps lock key.
697
698         * page/EventHandler.cpp:
699         (WebCore::EventHandler::capsLockStateMayHaveChanged):
700         Pipe notification of changes in the caps locks state to the <input> element
701         rather than the RenderTextControlSingleLine.
702
703         * rendering/RenderTextControlSingleLine.cpp:
704         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
705         (WebCore::RenderTextControlSingleLine::paint): Deleted.
706         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
707         * rendering/RenderTextControlSingleLine.h:
708         Remove logic for drawing the caps lock indicator.
709
710         * rendering/RenderTheme.cpp:
711         (WebCore::RenderTheme::adjustStyle):
712         (WebCore::RenderTheme::paint):
713         (WebCore::RenderTheme::paintMeter):
714         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
715         (WebCore::RenderTheme::paintCapsLockIndicator):
716         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
717         * rendering/RenderTheme.h:
718         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
719         * rendering/RenderThemeIOS.h:
720         * rendering/RenderThemeIOS.mm:
721         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
722         * rendering/RenderThemeMac.h:
723         * rendering/RenderThemeMac.mm:
724         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
725         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
726         Now that the caps lock indicator is implemented like other aspects of form controls,
727         the theme code can be converted to be similar as well.
728
729 2015-02-21  David Kilzer  <ddkilzer@apple.com>
730
731         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
732         <http://webkit.org/b/141816>
733
734         Attempt to fix the following build failure:
735
736             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
737             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
738             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
739             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
740             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
741             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
742             <scratch space>:58:1: note: expanded from here
743             CoreMediaLibrary
744             ^~~~~~~~~~~~~~~~
745             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
746             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
747             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
748             ^
749             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
750             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
751             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
752             <scratch space>:42:1: note: expanded from here
753             CoreMediaLibrary
754             ^
755             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
756             SOFT_LINK_FRAMEWORK(CoreMedia)
757             ^
758             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
759             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
760             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
761             <scratch space>:51:1: note: expanded from here
762             CoreMediaLibrary
763             ^
764
765         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
766         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
767         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
768         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
769
770 2015-02-21  David Kilzer  <ddkilzer@apple.com>
771
772         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
773         <http://webkit.org/b/141816>
774
775         Reviewed by Alexey Proskuryakov.
776
777         * WebCore.vcxproj/WebCore.vcxproj:
778         * WebCore.vcxproj/WebCore.vcxproj.filters:
779         - Remove CoreMediaSoftLinking.h.
780
781         * platform/cf/CoreMediaSoftLink.cpp:
782         - Add kCMTimeZero constant.
783         * platform/cf/CoreMediaSoftLink.h:
784         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
785         - Add kCMTimeZero constant.
786
787         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
788
789         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
790         - Remove reference to CoreMediaSoftLinking.h and update comment.
791         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
792         - Switch to using new method to check if a framework is
793           available.
794
795         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
796         - Remove all local soft-linking macros for CoreMedia.
797           CoreMediaSoftLink.h handles everything now.
798         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
799         - Switch to using new method to check if a framework is
800           available.
801
802         * platform/mac/SoftLinking.h:
803         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
804         is_Name_FrameworkAvailable() macro.
805         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
806         optional framework checks without a separate macro.
807         (SOFT_LINK_CONSTANT_HEADER): Add.
808         (SOFT_LINK_CONSTANT_SOURCE): Add.
809         - Support soft-links to constants.
810
811         * platform/win/SoftLinking.h:
812         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
813         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
814         non-static function.
815         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
816         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
817         SOFT_LINK_DEBUG_LIBRARY.
818         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
819         is_Name_FrameworkAvailable() macro.
820         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
821         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
822         (SOFT_LINK_CONSTANT_HEADER): Add.
823         (SOFT_LINK_CONSTANT_SOURCE): Add.
824         - Support soft-links to constants.
825
826 2015-02-20  David Kilzer  <ddkilzer@apple.com>
827
828         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
829         <http://webkit.org/b/141849>
830
831         Reviewed by Brent Fulgham.
832
833         This patch does the following:
834         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
835           macros for reuse in other projects.
836         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
837           141816.
838         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
839           and includes framework name in generated function names.  This
840           adds more entropy to the names in case there are two functions
841           with the same name in different frameworks.
842
843         * platform/cf/CoreMediaSoftLink.cpp:
844         - Add FIXME about USE(COREMEDIA).
845         - Switch from SOFT_LINK_FRAMEWORK() to
846           SOFT_LINK_FRAMEWORK_SOURCE().
847         * platform/cf/CoreMediaSoftLink.h:
848         - Add FIXME about USE(COREMEDIA).
849         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
850           macros.
851
852         * platform/mac/SoftLinking.h:
853         - Add missing header guards.
854         - Add pragmas for different macro groups.
855         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
856         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
857         (SOFT_LINK_FUNCTION_SOURCE): Move.
858         - Add framework name to generated function names.
859         - Incorporates namespace so that it doesn't have to be listed in
860           the *SoftLink.{cpp,h} file.
861
862         * platform/win/SoftLinking.h:
863         - Add pragmas for different macro groups.
864         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
865         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
866         (SOFT_LINK_FUNCTION_SOURCE): Move.
867         - Add framework name to generated function names.
868         - Incorporates namespace so that it doesn't have to be listed in
869           the *SoftLink.{cpp,h} file.
870
871 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
872
873         [Gtk] Unreviewed build fix.
874
875         * platform/ScrollAnimatorNone.cpp:
876         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
877         uses of ScrollableArea.
878
879 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
880
881         Scrollbars and ScrollAnimators must always have a ScrollableArea
882         https://bugs.webkit.org/show_bug.cgi?id=141855
883
884         Reviewed by Simon Fraser.
885
886         No change in functionality.
887         
888         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
889         a number of unnecessary nullptr checks.
890
891         * accessibility/AccessibilityScrollbar.cpp:
892         (WebCore::AccessibilityScrollbar::setValue):
893         * css/SelectorCheckerTestFunctions.h:
894         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
895         * page/FrameView.cpp:
896         (WebCore::FrameView::createScrollbar):
897         (WebCore::FrameView::setFixedVisibleContentRect):
898         * page/scrolling/ScrollingCoordinator.cpp:
899         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
900         * platform/PopupMenuClient.h:
901         * platform/ScrollAnimator.cpp:
902         (WebCore::ScrollAnimator::ScrollAnimator):
903         (WebCore::ScrollAnimator::scroll):
904         (WebCore::ScrollAnimator::handleWheelEvent):
905         (WebCore::ScrollAnimator::notifyPositionChanged):
906         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
907         * platform/ScrollAnimator.h:
908         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
909         * platform/ScrollAnimatorNone.cpp:
910         * platform/ScrollAnimatorNone.h:
911         * platform/ScrollView.cpp:
912         (WebCore::ScrollView::createScrollbar):
913         * platform/ScrollableArea.cpp:
914         (WebCore::ScrollableArea::scrollAnimator):
915         (WebCore::ScrollableArea::scroll):
916         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
917         (WebCore::ScrollableArea::notifyScrollPositionChanged):
918         (WebCore::ScrollableArea::scrollPositionChanged):
919         (WebCore::ScrollableArea::handleWheelEvent):
920         (WebCore::ScrollableArea::handleTouchEvent):
921         (WebCore::ScrollableArea::mouseEnteredScrollbar):
922         (WebCore::ScrollableArea::mouseExitedScrollbar):
923         (WebCore::ScrollableArea::didAddScrollbar):
924         (WebCore::ScrollableArea::willRemoveScrollbar):
925         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
926         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
927         * platform/ScrollableArea.h:
928         * platform/Scrollbar.cpp:
929         (WebCore::Scrollbar::createNativeScrollbar):
930         (WebCore::Scrollbar::Scrollbar):
931         (WebCore::Scrollbar::scrollbarOverlayStyle):
932         (WebCore::Scrollbar::isScrollableAreaActive):
933         (WebCore::Scrollbar::offsetDidChange):
934         (WebCore::Scrollbar::autoscrollPressedPart):
935         (WebCore::Scrollbar::moveThumb):
936         (WebCore::Scrollbar::mouseMoved):
937         (WebCore::Scrollbar::mouseEntered):
938         (WebCore::Scrollbar::mouseExited):
939         (WebCore::Scrollbar::mouseUp):
940         (WebCore::Scrollbar::shouldParticipateInHitTesting):
941         (WebCore::Scrollbar::isWindowActive):
942         (WebCore::Scrollbar::invalidateRect):
943         (WebCore::Scrollbar::convertToContainingView):
944         (WebCore::Scrollbar::convertFromContainingView):
945         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
946         * platform/Scrollbar.h:
947         (WebCore::Scrollbar::scrollableArea):
948         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
949         * platform/ios/ScrollAnimatorIOS.mm:
950         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
951         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
952         * platform/mac/ScrollAnimatorMac.h:
953         * platform/mac/ScrollAnimatorMac.mm:
954         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
955         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
956         (-[WebScrollbarPainterDelegate scrollAnimator]):
957         (-[WebScrollbarPainterDelegate layer]):
958         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
959         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
960         (WebCore::ScrollAnimator::create):
961         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
962         (WebCore::ScrollAnimatorMac::scroll):
963         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
964         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
965         (WebCore::ScrollAnimatorMac::immediateScrollTo):
966         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
967         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
968         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
969         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
970         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
971         (WebCore::ScrollAnimatorMac::pinnedInDirection):
972         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
973         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
974         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
975         (WebCore::ScrollAnimatorMac::stretchAmount):
976         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
977         (WebCore::ScrollAnimatorMac::canScrollVertically):
978         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
979         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
980         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
981         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
982         * rendering/RenderLayer.cpp:
983         (WebCore::RenderLayer::RenderLayer):
984         (WebCore::RenderLayer::createScrollbar):
985         (WebCore::RenderLayer::destroyScrollbar):
986         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
987         * rendering/RenderListBox.cpp:
988         (WebCore::RenderListBox::createScrollbar):
989         (WebCore::RenderListBox::destroyScrollbar):
990         * rendering/RenderMenuList.cpp:
991         (RenderMenuList::createScrollbar):
992         * rendering/RenderMenuList.h:
993         * rendering/RenderScrollbar.cpp:
994         (WebCore::RenderScrollbar::createCustomScrollbar):
995         (WebCore::RenderScrollbar::RenderScrollbar):
996         * rendering/RenderScrollbar.h:
997         * rendering/RenderSearchField.cpp:
998         (WebCore::RenderSearchField::createScrollbar):
999         * rendering/RenderSearchField.h:
1000
1001 2015-02-20  Enrica Casucci  <enrica@apple.com>
1002
1003         [WK2] Add support for font panel on OS X.
1004         https://bugs.webkit.org/show_bug.cgi?id=141777
1005
1006         Reviewed by Tim Horton.
1007
1008         This patch adds the necessary hooks to the Editor class to support
1009         the font panel.
1010
1011         * editing/Editor.h:
1012         * editing/mac/EditorMac.mm:
1013         (WebCore::Editor::applyFontStyles):
1014
1015 2015-02-20  Zalan Bujtas  <zalan@apple.com>
1016
1017         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
1018         https://bugs.webkit.org/show_bug.cgi?id=141854
1019
1020         Reviewed by Ryosuke Niwa.
1021
1022         Inserting content before/after the body as the result of editing is a valid operation.
1023         This assert was originally introduced to cover cases where edited content would get moved
1024         out of body. However, asserting such operation properly is not possible atm.
1025
1026         Test: editing/inserting/insert-as-body-sibling.html
1027
1028         * editing/CompositeEditCommand.cpp:
1029         (WebCore::CompositeEditCommand::insertNodeBefore):
1030         (WebCore::CompositeEditCommand::insertNodeAfter):
1031
1032 2015-02-20  Chris Dumez  <cdumez@apple.com>
1033
1034         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
1035         https://bugs.webkit.org/show_bug.cgi?id=141803
1036         <rdar://problem/19632080>
1037
1038         Reviewed by Antti Koivisto.
1039
1040         Add more diagnostic logging keys for the network cache.
1041
1042         * page/DiagnosticLoggingKeys.cpp:
1043         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
1044         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
1045         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
1046         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
1047         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
1048         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
1049         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
1050         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
1051         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
1052         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
1053         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
1054         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
1055         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
1056         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
1057         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
1058         * page/DiagnosticLoggingKeys.h:
1059
1060 2015-02-20  Tim Horton  <timothy_horton@apple.com>
1061
1062         <attachment> turns the wrong blue when you highlight it
1063         https://bugs.webkit.org/show_bug.cgi?id=141853
1064
1065         Reviewed by Simon Fraser.
1066
1067         * rendering/RenderAttachment.h:
1068         * rendering/RenderReplaced.cpp:
1069         (WebCore::RenderReplaced::shouldDrawSelectionTint):
1070         (WebCore::RenderReplaced::paint):
1071         * rendering/RenderReplaced.h:
1072         Don't draw the selection tint for RenderAttachment.
1073
1074 2015-02-20  Tim Horton  <timothy_horton@apple.com>
1075
1076         Allow <attachment> elements to be focused
1077         https://bugs.webkit.org/show_bug.cgi?id=141847
1078
1079         Reviewed by Enrica Casucci.
1080
1081         * css/html.css:
1082         (attachment:focus):
1083         Disable focus rings for <attachment>.
1084
1085         * html/HTMLAttachmentElement.cpp:
1086         (WebCore::HTMLAttachmentElement::setFocus):
1087         * html/HTMLAttachmentElement.h:
1088         Allow HTMLAttachmentElement to get editing focus.
1089         Let RenderAttachment know when focus changes.
1090
1091         * rendering/RenderAttachment.cpp:
1092         (WebCore::RenderAttachment::paintReplaced):
1093         Paint the background in cyan when we are inside the selection or have focus.
1094         Otherwise, it will be gray.
1095
1096         (WebCore::RenderAttachment::focusChanged):
1097         When focus changes, repaint.
1098
1099         * rendering/RenderAttachment.h:
1100
1101 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1102
1103         Rename ScrollElasticityController to ScrollController
1104         https://bugs.webkit.org/show_bug.cgi?id=141842
1105
1106         Reviewed by Simon Fraser.
1107
1108         No change in functionality.
1109
1110         * PlatformMac.cmake:
1111         * WebCore.order:
1112         * WebCore.xcodeproj/project.pbxproj:
1113         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1114         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1115         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
1116         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
1117         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
1118         * platform/mac/ScrollAnimatorMac.h:
1119         * platform/mac/ScrollAnimatorMac.mm:
1120         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1121         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
1122         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1123         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
1124         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
1125         (WebCore::ScrollControllerClient::~ScrollControllerClient):
1126         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
1127         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
1128         (WebCore::ScrollController::ScrollController):
1129         (WebCore::ScrollController::handleWheelEvent):
1130         (WebCore::ScrollController::snapRubberBandTimerFired):
1131         (WebCore::ScrollController::isRubberBandInProgress):
1132         (WebCore::ScrollController::stopSnapRubberbandTimer):
1133         (WebCore::ScrollController::snapRubberBand):
1134         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
1135         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
1136         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
1137         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
1138         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
1139         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
1140         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
1141         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
1142         * platform/mac/ScrollElasticityController.h: Removed.
1143         * platform/mac/ScrollElasticityController.mm: Removed.
1144
1145 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
1146
1147         Remove svn:keywords property.
1148
1149         As far as I can tell, the property had no effect on any of these files, but also,
1150         when it has effect it's likely harmful.
1151
1152         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
1153         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
1154         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
1155         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
1156         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
1157         * css/CSSKeyframeRule.h: Removed property svn:keywords.
1158         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
1159         * css/CSSKeyframesRule.h: Removed property svn:keywords.
1160         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
1161         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
1162         * css/plugIns.css: Removed property svn:keywords.
1163         * dom/AnimationEvent.cpp: Removed property svn:keywords.
1164         * dom/AnimationEvent.h: Removed property svn:keywords.
1165         * dom/DeviceMotionClient.h: Removed property svn:keywords.
1166         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
1167         * dom/DeviceMotionController.h: Removed property svn:keywords.
1168         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
1169         * dom/DeviceMotionData.h: Removed property svn:keywords.
1170         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
1171         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
1172         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
1173         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
1174         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
1175         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
1176         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
1177         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
1178         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
1179         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
1180         * page/Frame.h: Removed property svn:keywords.
1181         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
1182         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
1183         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
1184         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
1185         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
1186         * platform/ControlStates.h: Removed property svn:keywords.
1187         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
1188         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
1189         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
1190         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
1191         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
1192         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
1193         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
1194         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
1195         * platform/ios/SystemMemory.h: Removed property svn:keywords.
1196         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
1197         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
1198         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
1199         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
1200         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
1201         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
1202         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
1203         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
1204         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
1205         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
1206         * rendering/TextAutoSizing.h: Removed property svn:keywords.
1207         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
1208
1209 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1210
1211         [Mac] REGRESSION: Scroll snap points broken after r180018
1212         https://bugs.webkit.org/show_bug.cgi?id=141821
1213         <rdar://problem/19898333>
1214
1215         Reviewed by Simon Fraser.
1216
1217         * page/EventHandler.cpp:
1218         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added stub.
1219         (WebCore::EventHandler::handleWheelEvent): Call new 'platformNotifySnapIfNecessary' method
1220         to catch the 'ended wheel' gesture.
1221         * page/EventHandler.h:
1222         * page/mac/EventHandlerMac.mm:
1223         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added. If the wheel event signifies
1224         the end of a wheel/swipe gesture, let the snap logic decide if it should do anything
1225         (i.e., trigger an animation)
1226         * platform/ScrollAnimator.cpp:
1227         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Added.
1228         * platform/ScrollAnimator.h:
1229
1230 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
1231
1232         [iOS] cleanup AirPlay code
1233         https://bugs.webkit.org/show_bug.cgi?id=141811
1234
1235         Reviewed by Jer Noble.
1236
1237         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1238
1239         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
1240         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
1241         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
1242
1243         * Modules/mediacontrols/MediaControlsHost.cpp:
1244         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
1245         (WebCore::MediaControlsHost::externalDeviceType):
1246
1247         * dom/EventNames.h: Ditto.
1248         * dom/EventNames.in:
1249
1250         * html/HTMLMediaElement.cpp:
1251         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
1252         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
1253         (WebCore::HTMLMediaElement::parseAttribute):
1254         * html/HTMLMediaElement.h:
1255         * html/HTMLMediaElement.idl:
1256
1257         * html/HTMLMediaSession.cpp:
1258         (WebCore::restrictionName): Ditto.
1259         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
1260         * html/HTMLMediaSession.h:
1261
1262         * html/HTMLVideoElement.cpp:
1263         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
1264         * html/HTMLVideoElement.h:
1265         * html/HTMLVideoElement.idl:
1266
1267         * page/Settings.in: Ditto.
1268
1269         * platform/audio/MediaSessionManager.h:
1270         * platform/audio/ios/MediaSessionManagerIOS.h:
1271         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
1272
1273         * platform/graphics/MediaPlayer.cpp:
1274         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
1275         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
1276         * platform/graphics/MediaPlayer.h:
1277         * platform/graphics/MediaPlayerPrivate.h:
1278         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
1279         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
1280         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1281         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
1282         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1283
1284         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1285         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1286         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1287         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1288         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
1289         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
1290         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
1291         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
1292
1293 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
1294
1295         Language ranges containing asterisks must be quoted as strings
1296         https://bugs.webkit.org/show_bug.cgi?id=141659
1297
1298         Reviewed by Benjamin Poulain.
1299
1300         As specified in [1], the language ranges containing asterisks must be quoted as strings.
1301
1302         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
1303
1304         * css/CSSGrammar.y.in:
1305         * css/CSSParser.cpp:
1306         (WebCore::CSSParser::realLex):
1307
1308 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1309
1310         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
1311         https://bugs.webkit.org/show_bug.cgi?id=137765
1312
1313         Reviewed by Ryosuke Niwa.
1314
1315         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
1316         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
1317         used in registerMediaEngine().
1318
1319         No new tests, no behavior changes.
1320
1321         * WebCore.exp.in:
1322         * html/HTMLMediaElement.cpp:
1323         (WebCore::HTMLMediaElement::parseAttribute):
1324         * html/HTMLMediaElement.h:
1325         * platform/graphics/MediaPlayer.cpp:
1326         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
1327         (WebCore::MediaPlayer::MediaPlayer):
1328         (WebCore::MediaPlayer::loadWithNextMediaEngine):
1329         (WebCore::createNullMediaPlayer): Deleted.
1330         * platform/graphics/MediaPlayer.h:
1331         (WebCore::MediaPlayer::create): Deleted.
1332         * platform/graphics/MediaPlayerPrivate.h:
1333         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1334         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1335         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
1336         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
1337         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1338         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1339         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1340         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
1341         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
1342         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1343         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1344         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
1345         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
1346         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1347         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
1348         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
1349         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1350         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1351         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1352         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
1353         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
1354         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1355         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
1356         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
1357         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1358         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1359         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
1360         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
1361         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1362
1363 2015-02-19  David Kilzer  <ddkilzer@apple.com>
1364
1365         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
1366
1367         Rubber-stamped by Brent Fulgham.
1368
1369         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
1370         Brent agreed when I talked to him in person.
1371
1372         * platform/cf/CoreMediaSoftLink.cpp:
1373         * platform/cf/CoreMediaSoftLink.h:
1374         * platform/mac/SoftLinking.h:
1375         * platform/win/SoftLinking.h:
1376         - Do the rename.
1377
1378 2015-02-19  David Kilzer  <ddkilzer@apple.com>
1379
1380         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
1381         <http://webkit.org/b/141791>
1382
1383         Reviewed by Alexey Proskuryakov.
1384
1385         * Configurations/WebCore.unexp:
1386         - Remove five more symbols.
1387
1388         * Modules/plugins/QuickTimePluginReplacement.mm:
1389         - Remove all local soft-links and include CoreMediaSoftLink.h.
1390           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
1391           used here since we didn't use the optional function soft-link
1392           method.
1393
1394         * WebCore.vcxproj/WebCore.vcxproj.filters:
1395         * WebCore.vcxproj/WebCoreCFNetwork.props:
1396         * WebCore.xcodeproj/project.pbxproj:
1397         - Add CoreMediaSPI.h to the project.
1398
1399         * platform/cf/CoreMediaSoftLink.cpp:
1400         * platform/cf/CoreMediaSoftLink.h:
1401         - Add three cross-platform symbols, five Cocoa-only symbols, and
1402           two Windows-only symbols (based on current usage, not
1403           availability on each platform).
1404         - Include CoreMediaSPI.h header.
1405         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
1406
1407         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1408         - Remove all CoreMedia soft-linked functions.  Constants remain.
1409
1410         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1411         - Remove one CoreMedia soft-linked method.
1412
1413         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
1414         - Remove all CoreMedia soft-linked funtions.  With this change,
1415           we are already realizing space savings for duplicate
1416           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
1417           generated for many unused functions included by
1418           CoreMediaSoftLinking.h.)
1419
1420         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
1421         - Remove all CoreMedia soft-linked funtions.  Constants remain.
1422
1423         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1424         - Remove duplicate header included by CoreMediaSoftLink.h.
1425
1426         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1427         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1428         - Remove all CoreMedia soft-linked funtions.  Constants remain.
1429
1430         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1431         - Remove three CoreMedia soft-linked methods.
1432
1433         * platform/mac/PlatformClockCM.mm:
1434         - Remove two CoreMedia soft-linked methods.
1435
1436         * platform/mac/SerializedPlatformRepresentationMac.mm:
1437         - Remove only CoreMedia soft-linked funtion.  It wasn't even
1438           used.
1439
1440         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1441         - Remove two CoreMedia soft-linked method.
1442
1443         * platform/spi/cf/CoreMediaSPI.h:
1444         - Add for SPI from CMNotificationCenter.h.
1445
1446 2015-02-19  David Hyatt  <hyatt@apple.com>
1447
1448         Columns are splitting unsplittable content.
1449         https://bugs.webkit.org/show_bug.cgi?id=141807
1450         <rdar://problem/18387659>
1451
1452         Reviewed by Dean Jackson.
1453
1454         Added inline-table-dynamic-movement.html
1455
1456         * rendering/RenderBlockFlow.cpp:
1457         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
1458         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
1459         Patch these functions to always check the layout state for a zero
1460         pageLogicalHeight, since that is actually our indicator that we're
1461         doing column balancing and don't have a height set yet.
1462
1463         * rendering/RenderMultiColumnFlowThread.cpp:
1464         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
1465         * rendering/RenderMultiColumnSet.cpp:
1466         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1467         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
1468         (WebCore::RenderMultiColumnSet::prepareForLayout):
1469         * rendering/RenderMultiColumnSet.h:
1470         The function for deciding whether the logical height of the columns was
1471         known was checking for a zero computedColumnHeight. However, a column set
1472         can legitimately compute a zero column height, and with the fix to examine
1473         the layout state, this bug was exposed.
1474
1475         The fix is to add a new variable that caches whether or not the column height
1476         has been computed, so that even if it computes to zero, we aren't fooled.
1477
1478 2015-02-19  Chris Dumez  <cdumez@apple.com>
1479
1480         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
1481         https://bugs.webkit.org/show_bug.cgi?id=141744
1482
1483         Reviewed by Alexey Proskuryakov.
1484
1485         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
1486         implementation, similarly to what was already done for Mac in:
1487         <http://trac.webkit.org/changeset/174717>
1488
1489         The following changes were made:
1490         - Add missing "initLevel == AllFields" check before initializing
1491           uncommon fields. This bug was causing us to initialize uncommon
1492           fields even if called with 'CommonFieldsOnly' initLevel.
1493         - Bypass the first pass populating common HTTP headers in
1494           m_httpHeaderFields if the initLevel is AllFields. If called
1495           with AllFields initLevel, we will end up populating all HTTP
1496           headers later on so this first pass is redundant.
1497         - Use C++11 range loop to iterator over commonHeaderFields array
1498           for readability.
1499         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
1500           for the CFDictionaryRef containing the headers instead of creating
1501           copies of keys and values using CFDictionaryGetKeysAndValues() and
1502           then iterating over those. This avoids allocating Vectors for keys /
1503           values and avoids unnecessary copying.
1504
1505
1506 2015-02-18  Dean Jackson  <dino@apple.com>
1507
1508         Sufficiently small media controls should remove toolbar elements
1509         https://bugs.webkit.org/show_bug.cgi?id=141780
1510         <rdar://problem/16548548>
1511         <rdar://problem/17598778>
1512         <rdar://problem/18351963>
1513
1514         Reviewed by Eric Carlson.
1515
1516         Implement some logic where elements on the media controls are
1517         hidden when there isn't enough room. We start by dropping
1518         the scrubber, then the various buttons on the right hand
1519         side.
1520
1521         This solution isn't perfect. If we had perfection, it would
1522         be because we get resize events and respond accordingly. Instead
1523         we check the size when the user has pinch-zoomed, or when
1524         we start/stop playing.
1525
1526         This is going to cause some extra layout, because we need
1527         to know the size of things before we can work out which
1528         bits to hide.
1529
1530         * Modules/mediacontrols/mediaControlsiOS.css:
1531         (::-webkit-media-controls): Remove the minimum width. This can
1532         cause the controls to get clipped.
1533         (audio::-webkit-media-controls-spacer): Add this empty element to
1534         replace the scrubber when it is hidden.
1535         (audio::-webkit-media-controls-timeline-container):
1536         * Modules/mediacontrols/mediaControlsiOS.js:
1537         (ControllerIOS): Remember our size so we don't churn.
1538         (ControllerIOS.prototype.createControls): Create a new spacer element.
1539         (ControllerIOS.prototype.configureInlineControls):
1540         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
1541         (ControllerIOS.prototype.updateControls):
1542         (ControllerIOS.prototype.setPlaying): Ditto.
1543         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
1544         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
1545         asap. In this case it's probably ok to be in a bad state for a frame, or
1546         we are inside setup and we know that we'll layout soon.
1547         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
1548         that hides elements.
1549
1550 2015-02-19  Tim Horton  <timothy_horton@apple.com>
1551
1552         Move the software-only ImageBuffer::m_context to ImageBufferData
1553         https://bugs.webkit.org/show_bug.cgi?id=141784
1554
1555         Reviewed by Simon Fraser.
1556
1557         * platform/graphics/ImageBuffer.h:
1558         * platform/graphics/cairo/ImageBufferCairo.cpp:
1559         (WebCore::ImageBuffer::ImageBuffer):
1560         (WebCore::ImageBuffer::context):
1561         * platform/graphics/cairo/ImageBufferDataCairo.h:
1562         * platform/graphics/cg/ImageBufferCG.cpp:
1563         (WebCore::ImageBuffer::ImageBuffer):
1564         (WebCore::ImageBuffer::context):
1565         * platform/graphics/cg/ImageBufferDataCG.h:
1566         Move m_context to ImageBufferData in the software-only section;
1567         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
1568         This will make it harder for ImageBuffer to make the mistake of using
1569         m_context blindly without thinking when it will often be null.
1570
1571 2015-02-18  Andreas Kling  <akling@apple.com>
1572
1573         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
1574         <https://webkit.org/b/141788>
1575
1576         Reviewed by Anders Carlsson.
1577
1578         Once again we've fallen into the TemporaryChange trap:
1579
1580             TemporaryChange<unsigned>(m_member, temporaryValue);
1581
1582         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
1583         it immediately goes out of scope and restores the original value of m_member.
1584
1585         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
1586         to catch bugs like this. Whatever we do will be done separately from this bug.
1587
1588         Test: fast/history/page-cache-clearing.html
1589
1590         * history/PageCache.cpp:
1591         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
1592
1593         * testing/Internals.cpp:
1594         (WebCore::Internals::clearPageCache):
1595         (WebCore::Internals::pageCacheSize):
1596         * testing/Internals.h:
1597         * testing/Internals.idl: Add a way to clear the page cache and query its size from
1598         window.internals to facilitate writing a simple test for this bug.
1599
1600 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
1601
1602         Roll out r180280.
1603
1604         Crashes under IDBDatabase::closeConnection.
1605         https://bugs.webkit.org/show_bug.cgi?id=141745
1606         rdar://problem/19816412
1607
1608         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
1609
1610 2015-02-18  Tim Horton  <timothy_horton@apple.com>
1611
1612         Fix the iOS Simulator build after r180308.
1613
1614         * platform/graphics/cg/ImageBufferDataCG.h:
1615
1616 2015-02-18  Zalan Bujtas  <zalan@apple.com>
1617
1618         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
1619         https://bugs.webkit.org/show_bug.cgi?id=138224
1620
1621         Reviewed by Dave Hyatt.
1622
1623         It's wrong to call flowThreadRelativeWillBeRemoved(child).
1624         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
1625         Should this introduce any regressions, we need to deal with those separately.
1626
1627         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
1628
1629         * rendering/RenderMultiColumnFlowThread.cpp:
1630         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
1631         * rendering/RenderMultiColumnFlowThread.h:
1632
1633 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
1634
1635         [Win] CFData leak in CDMSessionAVFoundationCF
1636         https://bugs.webkit.org/show_bug.cgi?id=141765
1637         <rdar://problem/141765>
1638
1639         Reviewed by Joseph Pecoraro.
1640
1641         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1642         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
1643         so we don't double-increment the retain count.
1644
1645 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
1646
1647         Adopt WebCore::IOSurface in ImageBuffer
1648         https://bugs.webkit.org/show_bug.cgi?id=141751
1649
1650         Reviewed by Simon Fraser.
1651
1652         * platform/graphics/cg/ImageBufferCG.cpp:
1653         (WebCore::createIOSurface): Deleted.
1654         (WebCore::ImageBuffer::ImageBuffer):
1655         Make use of cachedCGColorSpace.
1656         Make use of WebCore::IOSurface.
1657         Remove the unused size argument from ImageBufferDataCG.
1658         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
1659         do this for us, unlike wkIOSurfaceContextCreate.
1660         Apply the flipping and scale factor to whichever context we made.
1661         We don't need to setIsAcceleratedContext anymore because it's always
1662         false for software contexts, and WebCore::IOSurface will set it for
1663         any accelerated contexts.
1664
1665         (WebCore::ImageBuffer::context):
1666         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
1667
1668         (WebCore::ImageBuffer::flushContext):
1669         Make use of context(); m_context is now null for accelerated ImageBuffers.
1670
1671         (WebCore::ImageBuffer::copyNativeImage):
1672         Adopt in-line with the Create functions for clarity. Make use of
1673         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
1674
1675         (WebCore::ImageBuffer::draw):
1676         (WebCore::ImageBuffer::drawPattern):
1677         (WebCore::ImageBuffer::getUnmultipliedImageData):
1678         (WebCore::ImageBuffer::getPremultipliedImageData):
1679         (WebCore::ImageBuffer::putByteArray):
1680         (WebCore::ImageBuffer::toDataURL):
1681         Make use of context(); m_context is now null for accelerated ImageBuffers.
1682
1683         * platform/graphics/cg/ImageBufferDataCG.cpp:
1684         (WebCore::ImageBufferData::ImageBufferData):
1685         Indentation fix, and use nullptr.
1686
1687         (WebCore::convertScanline):
1688         Grammar fix (is -> are).
1689
1690         (WebCore::ImageBufferData::getData):
1691         (WebCore::ImageBufferData::putData):
1692         Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
1693         should be made more convenient by the wrapper.
1694
1695         * platform/graphics/cg/ImageBufferDataCG.h:
1696         Drop the unused size argument from the constructor.
1697         Reorganize and label the various members which are only used
1698         for a particular type of ImageBufferDataCG.
1699
1700         * platform/graphics/cocoa/IOSurface.mm:
1701         (IOSurface::ensureGraphicsContext):
1702         IOSurface-backed GraphicsContexts are always considered accelerated.
1703
1704         (IOSurface::create):
1705         (IOSurface::IOSurface):
1706         Add a constructor that take an extra size to use when making the CGContext;
1707         it can only be less than the actual backing IOSurface size.
1708         This is needed for r160121.
1709
1710         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1711         * platform/mac/WebCoreSystemInterface.h:
1712         * platform/mac/WebCoreSystemInterface.mm:
1713         Remove old WKSI IOSurface-related functions.
1714
1715 2015-02-18  Alex Christensen  <achristensen@webkit.org>
1716
1717         Prepare to use WEBCORE_EXPORT on Windows.
1718         https://bugs.webkit.org/show_bug.cgi?id=141735
1719
1720         Reviewed by Brent Fulgham.
1721
1722         * bindings/js/GCController.h:
1723         * bindings/js/JSDOMGlobalObject.h:
1724         * bindings/scripts/CodeGeneratorJS.pm:
1725         (GenerateHeader):
1726         (GenerateImplementation):
1727         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1728         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1729         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1730         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1731         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1732         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1733         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1734         * bindings/scripts/test/JS/JSTestEventTarget.h:
1735         * bindings/scripts/test/JS/JSTestException.cpp:
1736         * bindings/scripts/test/JS/JSTestException.h:
1737         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1738         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1739         * bindings/scripts/test/JS/JSTestInterface.cpp:
1740         * bindings/scripts/test/JS/JSTestInterface.h:
1741         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1742         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1743         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1744         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1745         * bindings/scripts/test/JS/JSTestNode.cpp:
1746         * bindings/scripts/test/JS/JSTestNode.h:
1747         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1748         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1749         * bindings/scripts/test/JS/JSTestObj.cpp:
1750         * bindings/scripts/test/JS/JSTestObj.h:
1751         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1752         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1753         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1754         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1755         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1756         * bindings/scripts/test/JS/JSTestTypedefs.h:
1757         * bindings/scripts/test/JS/JSattribute.cpp:
1758         * bindings/scripts/test/JS/JSattribute.h:
1759         * bindings/scripts/test/JS/JSreadonly.cpp:
1760         * bindings/scripts/test/JS/JSreadonly.h:
1761         * bridge/runtime_method.h:
1762         * bridge/runtime_object.h:
1763         * dom/make_names.pl:
1764         (printNamesHeaderFile):
1765         * history/HistoryItem.h:
1766         * loader/FrameLoader.h:
1767         * loader/LoaderStrategy.h:
1768         * loader/ResourceLoadScheduler.h:
1769         * loader/icon/IconDatabase.h:
1770         * loader/icon/IconDatabaseBase.h:
1771         * page/DatabaseProvider.h:
1772         * page/Page.h:
1773         * page/PageConsoleClient.h:
1774         * page/PageOverlay.h:
1775         * platform/FileSystem.h:
1776         * platform/MemoryPressureHandler.h:
1777         * platform/ThreadGlobalData.h:
1778         * platform/URL.h:
1779         * platform/graphics/ca/PlatformCALayer.h:
1780         * platform/network/BlobDataFileReference.h:
1781         * platform/network/BlobRegistry.h:
1782         * platform/network/BlobRegistryImpl.h:
1783         * platform/sql/SQLiteDatabase.h:
1784         * rendering/ScrollBehavior.h:
1785         * rendering/break_lines.h:
1786         Add and move some WEBCORE_EXPORT macros.
1787
1788 2015-02-18  Anders Carlsson  <andersca@apple.com>
1789
1790         Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
1791         https://bugs.webkit.org/show_bug.cgi?id=141767
1792
1793         Reviewed by Tim Horton.
1794
1795         Also, move it to platform/cocoa instead of platform/mac.
1796
1797         * WebCore.xcodeproj/project.pbxproj:
1798         * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
1799
1800 2015-02-18  Antti Koivisto  <antti@apple.com>
1801
1802         Rename FontGlyphs to FontCascadeFonts
1803         https://bugs.webkit.org/show_bug.cgi?id=141754
1804
1805         Reviewed by Andreas Kling.
1806
1807         "It is better than Impl."
1808
1809         The purpose of the class to own to create and own the realized Font instances and the associated caches
1810         for FontCascade instances.
1811
1812 2015-02-18  Commit Queue  <commit-queue@webkit.org>
1813
1814         Unreviewed, rolling out r180286.
1815         https://bugs.webkit.org/show_bug.cgi?id=141766
1816
1817         Caused >50 crashed LayoutTests (Requested by jernoble on
1818         #webkit).
1819
1820         Reverted changeset:
1821
1822         "Page::userContentController() should return a reference, not
1823         a pointer"
1824         https://bugs.webkit.org/show_bug.cgi?id=141764
1825         http://trac.webkit.org/changeset/180286
1826
1827 2015-02-18  David Kilzer  <ddkilzer@apple.com>
1828
1829         Consolidate soft-linked CMTimeMakeWithSeconds() function
1830         <http://webkit.org/b/141655>
1831
1832         Reviewed by Brent Fulgham.
1833
1834         * Configurations/WebCore.unexp: Remove workaround for
1835         CMTimeMakeWithSeconds() weak external.
1836
1837         * WebCore.vcxproj/WebCore.vcxproj:
1838         * WebCore.vcxproj/WebCore.vcxproj.filters:
1839         * WebCore.xcodeproj/project.pbxproj:
1840         - Add CoreMediaSoftLink.{cpp,h} to the project.
1841
1842         * platform/cf/CoreMediaSoftLink.cpp: Add.
1843         * platform/cf/CoreMediaSoftLink.h: Add.
1844         - Implement new strategy where code for soft-linking is only
1845           in one place, and the header can simply be included wherever a
1846           soft-linked method is needed.
1847
1848         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
1849         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
1850         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1851         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1852         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1853         * platform/mac/PlatformClockCM.mm:
1854         - Remove old soft-linking strategy and include
1855           CoreMediaSoftLink.h.
1856
1857         * platform/mac/SoftLinking.h:
1858         (SOFT_LINK_FUNCTION_DECL): Add.  New macro function used for
1859         header declaration.  Split out from SOFT_LINK() macro.  Also
1860         stop violating C++ standards by redeclaring an inline function
1861         with the exact same signature as an extern "C" function.  This
1862         now matches what we do on Windows (where Visual C++ already
1863         prevented these shenanigans).
1864         (SOFT_LINK_FUNCTION_IMPL): Add.  New macro function used for
1865         source implementation.  Split out the from SOFT_LINK() macro.
1866
1867         * platform/win/SoftLinking.h:
1868         (SOFT_LINK_FRAMEWORK): Map mac/SoftLinking.h macro name to
1869         Windows macros so we can simplify CoreMediaSoftLink.{cpp,h}.
1870         (SOFT_LINK_FUNCTION_DECL): Add.
1871         (SOFT_LINK_FUNCTION_IMPL): Add.
1872         - New macro functions split out from SOFT_LINK_DLL_IMPORT()
1873           macro for header declaration and source implementation.
1874         - We assume the __cdecl calling convention because that's what
1875           all Apple libraries use, and so we are able to use the exact
1876           same macro function on both Mac and Windows to simplify
1877           CoreMediaSoftLink.{cpp,h}.
1878
1879 2015-02-18  Brady Eidson  <beidson@apple.com>
1880
1881         Page::userContentController() should return a reference, not a pointer
1882         https://bugs.webkit.org/show_bug.cgi?id=141764
1883
1884         Reviewed by Jer Noble.
1885
1886         No new tests (No behavior change)
1887
1888         * dom/DocumentStyleSheetCollection.cpp:
1889         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
1890         * loader/cache/CachedResourceLoader.cpp:
1891         (WebCore::CachedResourceLoader::requestResource):
1892         * page/CaptionUserPreferences.cpp:
1893         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
1894         * page/DOMWindow.cpp:
1895         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
1896         * page/Frame.cpp:
1897         (WebCore::Frame::injectUserScripts):
1898         * page/Page.cpp:
1899         (WebCore::Page::Page):
1900         (WebCore::Page::~Page):
1901         (WebCore::Page::setUserContentController):
1902         * page/Page.h:
1903         (WebCore::Page::userContentController):
1904         * page/UserMessageHandlersNamespace.cpp:
1905         (WebCore::UserMessageHandlersNamespace::handler):
1906
1907 2015-02-18  Roger Fong  <roger_fong@apple.com>
1908
1909         WebGL2: Promote various WebGL1 extensions to core for WebGL2.
1910         https://bugs.webkit.org/show_bug.cgi?id=141446
1911         <rdar://problem/19633715>
1912
1913         Reviewed by Brent Fulham.
1914
1915         Tests covered by WebGL2 conformance tests.
1916
1917         This patch promotes the following WebGL1 extensions to core in WebGL2:
1918         OES_element_index_uint 
1919         EXT_sRGB 
1920         EXT_blend_minmax 
1921         EXT_frag_depth 
1922         EXT_shader_texture_lod
1923         OES_standard_derivatives 
1924         
1925         The latter 3 are enabled by default now for GLSL1, though we will get these extensions 
1926         for free when GLSL3 becomes available.
1927
1928         WebGL2 binding code should actually fall back to base implementation for getFramebufferAttachmentParameter.
1929         * bindings/js/JSWebGL2RenderingContextCustom.cpp: 
1930         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter): Deleted.
1931         * html/canvas/WebGL2RenderingContext.idl: Ditto.
1932
1933         * html/canvas/WebGL2RenderingContext.cpp:
1934         (WebCore::WebGL2RenderingContext::getExtension): Enable WEBGL_lose_context as an extension again.
1935         It was not promoted to core as I originally thought it had been.
1936         (WebCore::WebGL2RenderingContext::getSupportedExtensions): Ditto.
1937         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Promote the 3 shader extensions for GLSL1 to core.
1938         (WebCore::WebGL2RenderingContext::initializeShaderExtensions): Ditto.
1939         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Promote SRGB extension to core.
1940         (WebCore::WebGL2RenderingContext::renderbufferStorage): Ditto.
1941         (WebCore::WebGL2RenderingContext::hint): Ditto.
1942         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Ditto.
1943         (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Promote OES_element_index_uint extension to core.
1944         (WebCore::WebGL2RenderingContext::validateDrawElements): Ditto.
1945         (WebCore::WebGL2RenderingContext::validateBlendEquation): Promote EXT_blend_minmax extension to core.
1946         * html/canvas/WebGL2RenderingContext.h:
1947
1948         * html/canvas/WebGLRenderingContext.cpp:
1949         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Copied form WebGLRenderingContextBase.
1950         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
1951         (WebCore::WebGLRenderingContext::hint): Ditto.
1952         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
1953         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
1954         (WebCore::WebGLRenderingContext::validateBlendEquation): Ditto.
1955         * html/canvas/WebGLRenderingContext.h:
1956
1957         * html/canvas/WebGLRenderingContextBase.cpp:
1958         (WebCore::WebGLRenderingContextBase::validateIndexArrayConservative): Deleted.
1959         (WebCore::WebGLRenderingContextBase::validateDrawElements): Deleted.
1960         (WebCore::WebGLRenderingContextBase::getExtension): Deleted.
1961         (WebCore::WebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
1962         (WebCore::WebGLRenderingContextBase::hint): Deleted.
1963         (WebCore::WebGLRenderingContextBase::renderbufferStorage): Deleted.
1964         (WebCore::WebGLRenderingContextBase::validateBlendEquation): Deleted.
1965         * html/canvas/WebGLRenderingContextBase.h:
1966
1967 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
1968
1969         Streamline unexported function build fixes
1970         https://bugs.webkit.org/show_bug.cgi?id=141761
1971
1972         Reviewed by Alex Christensen.
1973
1974         * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
1975         OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
1976
1977         * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
1978         it's not only Xcode 5 that is affected.
1979
1980         * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
1981         Node, NodeList needs an exactly the same one. Also updated the comments.
1982
1983 2015-02-18  Chris Dumez  <cdumez@apple.com>
1984
1985         Access FontCache global instance via singleton() static member function
1986         https://bugs.webkit.org/show_bug.cgi?id=141726
1987
1988         Reviewed by Daniel Bates.
1989
1990         Access FontCache global instance via singleton() static member function,
1991         as per coding style.
1992
1993 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
1994
1995         Crashes under IDBDatabase::closeConnection.
1996         https://bugs.webkit.org/show_bug.cgi?id=141745
1997         rdar://problem/19816412
1998
1999         Reviewed by David Kilzer.
2000
2001         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
2002         Add a missing protector.
2003
2004 2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
2005
2006         Justified ruby can cause lines to grow beyond their container
2007         https://bugs.webkit.org/show_bug.cgi?id=141732
2008
2009         Reviewed by David Hyatt.
2010
2011         After we re-layout RenderRubyRuns, this can change the environment upon which
2012         ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
2013         the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
2014         effective width of the RenderRubyRun to change, which causes out subsequent
2015         justification calculations to be off.
2016
2017         Therefore, we have a cycle; the amount of ruby overhang can change the justification
2018         in a line, and the layout of the line affects the ruby overhang calculation. Instead
2019         of performing a layout in a loop until it converges, this patch simply observes that
2020         having a flush right edge is more valuable than having a perfectly correct overhang.
2021         It therefore simply removes the secondary overhang calculation.
2022
2023         Test: fast/text/ruby-justification-flush.html
2024
2025         * rendering/RenderBlockFlow.h:
2026         * rendering/RenderBlockLineLayout.cpp:
2027         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
2028         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
2029         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2030
2031 2015-02-18  Chris Dumez  <cdumez@apple.com>
2032
2033         Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
2034         https://bugs.webkit.org/show_bug.cgi?id=141723
2035
2036         Reviewed by Andreas Kling.
2037
2038         Evict dead resources from the MemoryCache on non-critical memory
2039         pressure. On critical memory pressure, we already evict ALL resources
2040         from the MemoryCache. It is a good idea to start by evicting resources
2041         we care less about on non-critical warning to decrease the chances of
2042         getting a critical warning and thus having to clear the whole
2043         MemoryCache.
2044
2045         * loader/cache/MemoryCache.h:
2046         * platform/MemoryPressureHandler.cpp:
2047         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
2048         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2049         (WebCore::MemoryPressureHandler::releaseMemory):
2050         Call releaseCriticalMemory() before releaseNoncriticalMemory()
2051         as releaseCriticalMemory() is more aggressive. Doing it the
2052         other way around would mean that on critical warning, we would
2053         first evict dead resources, then evict all resources. It is
2054         more efficient to evict all resources first, as it makes the
2055         non-critical operation (evict dead resources) a no-op.
2056
2057 2015-02-18  Eric Carlson  <eric.carlson@apple.com>
2058
2059         [iOS] pause video when a tab moves to the background on some devices
2060         https://bugs.webkit.org/show_bug.cgi?id=141753
2061         <rdar://problem/19814562>
2062
2063         Reviewed by Jer Noble.
2064
2065         Test: media/video-background-tab-playback.html
2066
2067         * platform/audio/MediaSession.cpp:
2068         (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
2069             hidden if the BackgroundTabPlaybackRestricted is set.
2070
2071         * platform/audio/MediaSessionManager.cpp:
2072         (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
2073              to BackgroundProcessPlaybackRestricted.
2074         (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
2075         * platform/audio/MediaSessionManager.h:
2076
2077         * platform/audio/ios/MediaSessionManagerIOS.mm:
2078         (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
2079             devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
2080
2081         * testing/Internals.cpp:
2082         (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
2083             BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
2084
2085 2015-02-16  David Hyatt  <hyatt@apple.com>
2086
2087         Wrong element's style is used for text-decoration-style.
2088         https://bugs.webkit.org/show_bug.cgi?id=141673
2089         <rdar://problem/19876774>
2090
2091         Reviewed by Dean Jackson.
2092
2093         Added fast/text/text-underline-style.html
2094
2095         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2096         (AXAttributeStringSetStyle):
2097         Add arguments for fetching styles.
2098
2099         * rendering/InlineTextBox.cpp:
2100         (WebCore::InlineTextBox::paint):
2101         (WebCore::InlineTextBox::paintDecoration):
2102         * rendering/InlineTextBox.h:
2103         Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
2104         way it fetches the colors.
2105
2106         * rendering/RenderObject.cpp:
2107         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
2108         (WebCore::RenderObject::getTextDecorationColors): Deleted.
2109         * rendering/RenderObject.h:
2110         Add style fetching to the same function that fetches colors and rename it.
2111
2112 2015-02-18  David Kilzer  <ddkilzer@apple.com>
2113
2114         REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
2115
2116         Attempt to fix this linker error by making a non-coding change:
2117
2118             Undefined symbols for architecture i386:
2119               "__ZN7WebCore17ContentExtensions24ContentExtensionsBackendC1Ev", referenced from:
2120                   __ZN7WebCore21UserContentController20addUserContentFilterERKN3WTF6StringES4_ in UserContentController.o
2121             ld: symbol(s) not found for architecture i386
2122
2123         This should have been fixed by r180266, but perhaps Xcode didn't
2124         recognize that it needed to rebuild this source file.
2125
2126         * page/UserContentController.cpp: Update copyright.
2127
2128 2015-02-18  Andreas Kling  <akling@apple.com>
2129
2130         Purge PassRefPtr from CanvasRenderingContext2D.
2131         <https://webkit.org/b/141749>
2132
2133         Reviewed by Gyuyoung Kim.
2134
2135         Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.
2136
2137         * html/TextMetrics.h:
2138         (WebCore::TextMetrics::create): Changed create() helper to return Ref.
2139
2140         * html/canvas/CanvasRenderingContext2D.h:
2141         * html/canvas/CanvasRenderingContext2D.cpp:
2142         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.
2143
2144         (WebCore::CanvasRenderingContext2D::createLinearGradient):
2145         (WebCore::CanvasRenderingContext2D::createRadialGradient):
2146         (WebCore::CanvasRenderingContext2D::createPattern):
2147         (WebCore::createEmptyImageData):
2148         (WebCore::CanvasRenderingContext2D::createImageData):
2149         (WebCore::CanvasRenderingContext2D::getImageData):
2150         (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
2151         a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
2152         and changed a PassRefPtr argument to RefPtr&&.
2153
2154         (WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.
2155
2156 2015-02-18  Commit Queue  <commit-queue@webkit.org>
2157
2158         Unreviewed, rolling out r180260.
2159         https://bugs.webkit.org/show_bug.cgi?id=141757
2160
2161         Broke the 32-bit builders (Requested by jessieberlin on
2162         #webkit).
2163
2164         Reverted changeset:
2165
2166         "Add a trivial code generator for the DFA"
2167         https://bugs.webkit.org/show_bug.cgi?id=141017
2168         http://trac.webkit.org/changeset/180260
2169
2170 2015-02-17  Anders Carlsson  <andersca@apple.com>
2171
2172         Add API for clearing in-memory caches to WKWebsiteDataStore
2173         https://bugs.webkit.org/show_bug.cgi?id=141724
2174
2175         Reviewed by Tim Horton.
2176
2177         Add a version of evictResources that takes a session id.
2178
2179         * loader/cache/MemoryCache.cpp:
2180         (WebCore::MemoryCache::evictResources):
2181
2182 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2183
2184         Remove more references to WebCore.exp.in
2185         https://bugs.webkit.org/show_bug.cgi?id=141747
2186
2187         Reviewed by Alexey Proskuryakov.
2188
2189         * WebCore.xcodeproj/project.pbxproj:
2190
2191 2015-02-17  Benjamin Poulain  <benjamin@webkit.org>
2192
2193         Add a trivial code generator for the DFA
2194         https://bugs.webkit.org/show_bug.cgi?id=141017
2195
2196         Reviewed by Andreas Kling.
2197
2198         Nothing fancy yet, this is just doing a literal translation from the DFA
2199         to machine code. It is extremely inefficient at the moment.
2200
2201         * WebCore.xcodeproj/project.pbxproj:
2202         * contentextensions/ContentExtensionsBackend.cpp:
2203         (WebCore::ContentExtensions::ContentExtensionsBackend::ContentExtensionsBackend):
2204         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2205         (WebCore::ContentExtensions::addActionToHashSet):
2206         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2207         * contentextensions/ContentExtensionsBackend.h:
2208         * contentextensions/DFA.cpp:
2209         (WebCore::ContentExtensions::DFA::nextState): Deleted.
2210         (WebCore::ContentExtensions::DFA::actions): Deleted.
2211         * contentextensions/DFA.h:
2212         (WebCore::ContentExtensions::DFA::size):
2213         (WebCore::ContentExtensions::DFA::nodeAt):
2214         * contentextensions/DFACompiler.cpp: Added.
2215         (WebCore::ContentExtensions::compileDFA):
2216         (WebCore::ContentExtensions::DFACodeGenerator::DFACodeGenerator):
2217         (WebCore::ContentExtensions::DFACodeGenerator::compile):
2218         (WebCore::ContentExtensions::DFACodeGenerator::lowerStateMachine):
2219         (WebCore::ContentExtensions::DFACodeGenerator::lowerNode):
2220         (WebCore::ContentExtensions::DFACodeGenerator::getNextCharacter):
2221         (WebCore::ContentExtensions::DFACodeGenerator::callAddActionFunction):
2222         * contentextensions/DFACompiler.h: Copied from Source/WebCore/contentextensions/DFA.h.
2223
2224 2015-02-17  Chris Dumez  <cdumez@apple.com>
2225
2226         Rename ScopedEventQueue::instance() to singleton()
2227         https://bugs.webkit.org/show_bug.cgi?id=141738
2228
2229         Reviewed by Daniel Bates.
2230
2231         Rename ScopedEventQueue::instance() to singleton(), as per coding
2232         style. Also modernize the code a little bit.
2233
2234         * dom/EventDispatcher.cpp:
2235         (WebCore::EventDispatcher::dispatchScopedEvent):
2236         * dom/ScopedEventQueue.cpp:
2237         (WebCore::ScopedEventQueue::singleton):
2238         (WebCore::ScopedEventQueue::dispatchAllEvents):
2239         (WebCore::ScopedEventQueue::incrementScopingLevel):
2240         (WebCore::ScopedEventQueue::decrementScopingLevel):
2241         (WebCore::ScopedEventQueue::ScopedEventQueue): Deleted.
2242         (WebCore::ScopedEventQueue::~ScopedEventQueue): Deleted.
2243         (WebCore::ScopedEventQueue::instance): Deleted.
2244         * dom/ScopedEventQueue.h:
2245         (WebCore::EventQueueScope::EventQueueScope):
2246         (WebCore::EventQueueScope::~EventQueueScope):
2247
2248 2015-02-17  Chris Dumez  <cdumez@apple.com>
2249
2250         Remove dead code from FontCache
2251         https://bugs.webkit.org/show_bug.cgi?id=141741
2252
2253         Reviewed by Daniel Bates.
2254
2255         Remove dead code from FontCache:
2256         - getFontFamilyForCharacters() has no implementation.
2257         - SimpleFontFamily is unused.
2258
2259         * platform/graphics/FontCache.h:
2260
2261 2015-02-17  Chris Dumez  <cdumez@apple.com>
2262
2263         Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
2264         https://bugs.webkit.org/show_bug.cgi?id=141739
2265
2266         Reviewed by Simon Fraser.
2267
2268         Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
2269         per coding style.
2270
2271         * page/animation/CSSPropertyAnimation.cpp:
2272         (WebCore::CSSPropertyAnimationWrapperMap::singleton):
2273         (WebCore::CSSPropertyAnimation::blendProperties):
2274         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
2275         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
2276         (WebCore::CSSPropertyAnimation::propertiesEqual):
2277         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
2278         (WebCore::CSSPropertyAnimation::getNumProperties):
2279         (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
2280
2281 2015-02-17  David Kilzer  <ddkilzer@apple.com>
2282
2283         REGRESSION (r180224): Remove unused generate-export-file script
2284         <http://webkit.org/b/141491>
2285
2286         * generate-export-file: Removed.  This was the script used to
2287         create WebCore.exp files for iOS since we couldn't compile a
2288         host-side tool to run like we did on Mac OS X.  Dont't tell
2289         anyone, but this was an epic hack I created while merging open
2290         source changes to the internal iOS WebKit repository around the
2291         time that the WebCore.exp.in file was created.  End of an era.
2292
2293 2015-02-17  David Kilzer  <ddkilzer@apple.com>
2294
2295         SoftLinking.h: Update copyright and license; clean up whitespace
2296
2297         * platform/win/SoftLinking.h:
2298
2299 2015-02-17  Chris Dumez  <cdumez@apple.com>
2300
2301         Slight CachedPage class clean up
2302         https://bugs.webkit.org/show_bug.cgi?id=141693
2303
2304         Reviewed by Andreas Kling.
2305
2306         Slight CachedPage class clean up:
2307         - Drop unnecessary m_timeStamp data member
2308         - Protect m_needsCaptionPreferencesChanged data member with
2309           #if ENABLE(VIDEO_TRACK)
2310         - Merge destroy() method into the destructor as this is the
2311           only caller
2312         - Update clear() to reset 2 data members that were missing
2313
2314 2015-02-17  Anders Carlsson  <andersca@apple.com>
2315
2316         Silence two -Wcast-qual warnings.
2317         rdar://problem/19758266
2318
2319         * platform/ios/wak/WKUtilities.c:
2320         (WKRetain):
2321         (WKRelease):
2322
2323 2015-02-17  Zalan Bujtas  <zalan@apple.com>
2324
2325         Minor RenderTable* class cleanups.
2326         https://bugs.webkit.org/show_bug.cgi?id=141707
2327
2328         Reviewed by Andreas Kling.
2329
2330         Use in-class initializer where possible.
2331         Remove redundant code.
2332         Move multiline implementations out of class declaration.
2333
2334         No change in functionality.
2335
2336         * rendering/RenderTableCaption.cpp:
2337         (WebCore::RenderTableCaption::insertedIntoTree):
2338         (WebCore::RenderTableCaption::willBeRemovedFromTree):
2339         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Deleted.
2340         * rendering/RenderTableCaption.h:
2341         * rendering/RenderTableCell.cpp:
2342         (WebCore::RenderTableCell::RenderTableCell):
2343         * rendering/RenderTableCell.h:
2344         (WebCore::RenderTableCell::colSpan):
2345         (WebCore::RenderTableCell::rowSpan):
2346         (WebCore::RenderTableCell::setCol):
2347         (WebCore::RenderTableCell::col):
2348         (WebCore::RenderTableCell::section):
2349         (WebCore::RenderTableCell::table):
2350         (WebCore::RenderTableCell::rowIndex):
2351         (WebCore::RenderTableCell::styleOrColLogicalWidth):
2352         (WebCore::RenderTableCell::logicalHeightForRowSizing):
2353         (WebCore::RenderTableCell::isBaselineAligned):
2354         (WebCore::RenderTableCell::borderAdjoiningTableStart):
2355         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
2356         (WebCore::RenderTableCell::borderAdjoiningCellBefore):
2357         (WebCore::RenderTableCell::borderAdjoiningCellAfter):
2358         * rendering/RenderTableCol.cpp:
2359         (WebCore::RenderTableCol::RenderTableCol):
2360         * rendering/RenderTableCol.h:
2361         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
2362         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
2363         * rendering/RenderTableRow.h:
2364         (WebCore::RenderTableRow::setRowIndex):
2365         (WebCore::RenderTableRow::rowIndex):
2366         (WebCore::RenderTableRow::borderAdjoiningTableStart):
2367         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
2368         (WebCore::RenderTableRow::table):
2369         (WebCore::RenderTableSection::firstRow):
2370         (WebCore::RenderTableSection::lastRow):
2371         * rendering/RenderTableSection.cpp:
2372         (WebCore::RenderTableSection::RenderTableSection):
2373         (WebCore::RenderTableSection::dirtiedRows):
2374         (WebCore::RenderTableSection::dirtiedColumns):
2375         (WebCore::RenderTableSection::paintObject):
2376         (WebCore::RenderTableSection::nodeAtPoint):
2377         * rendering/RenderTableSection.h:
2378         (WebCore::CellSpan::CellSpan):
2379         (WebCore::RenderTableSection::borderAdjoiningTableStart):
2380         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
2381         (WebCore::RenderTableSection::cellAt):
2382         (WebCore::RenderTableSection::primaryCellAt):
2383         (WebCore::RenderTableSection::rowRendererAt):
2384         (WebCore::RenderTableSection::outerBorderLeft):
2385         (WebCore::RenderTableSection::outerBorderRight):
2386         (WebCore::RenderTableSection::outerBorderTop):
2387         (WebCore::RenderTableSection::outerBorderBottom):
2388         (WebCore::RenderTableSection::numRows):
2389         (WebCore::RenderTableSection::recalcCellsIfNeeded):
2390         (WebCore::RenderTableSection::rowBaseline):
2391         (WebCore::RenderTableSection::fullTableRowSpan):
2392         (WebCore::CellSpan::start): Deleted.
2393         (WebCore::CellSpan::end): Deleted.
2394
2395 2015-02-16  Dean Jackson  <dino@apple.com>
2396
2397         REGRESSION: Video control fails to hide after playback begins in reflowable EPUB files
2398         https://bugs.webkit.org/show_bug.cgi?id=141689
2399         <rdar://problem/19689286>
2400
2401         Reviewed by Eric Carlson.
2402
2403         The iBooks app turns off the requirement for a user gesture
2404         before triggering playback. When we moved to script-based
2405         media controls there were a few regressions in this setup.
2406         This makes them behave a lot more like iOS 7.
2407
2408         * Modules/mediacontrols/mediaControlsApple.js:
2409         (Controller.prototype.setPlaying): We don't want to hide the controls
2410         yet, just start a hiding timer.
2411         * Modules/mediacontrols/mediaControlsiOS.js:
2412         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): If we've ever
2413         played before, we don't want to show the big start button. If we
2414         are in the middle of construction, we do want to show it. We no
2415         longer care about the case where you're not in setup and have
2416         the relaxed restrictions (we still want to show the start button
2417         in that case).
2418         (ControllerIOS.prototype.showControls): When we show the controls,
2419         make sure our timeline is up to date. This is necessary for the
2420         cases where we automatically show the controls, such as when we hit
2421         the end of a video.
2422         (ControllerIOS.prototype.updateTime): Make sure to pass the forceUpdate
2423         parameter on to the super-method.
2424         (ControllerIOS.prototype.setPlaying):
2425         (ControllerIOS.prototype.progressFillStyle): Deleted.
2426
2427 2015-02-17  Chris Dumez  <cdumez@apple.com>
2428
2429         Access MemoryPressureHandler global instance via a singleton() static member function
2430         https://bugs.webkit.org/show_bug.cgi?id=141691
2431
2432         Reviewed by Andreas Kling.
2433
2434         Access MemoryPressureHandler global instance via a singleton() static
2435         member function as per coding style. Also make all other member
2436         functions non-static as callers can just use singleton() to get the
2437         instance and access methods. This avoid having to call
2438         MemoryPressureHandler::singleton() from member functions.
2439
2440         * bindings/js/ScriptController.cpp:
2441         (WebCore::collectGarbageAfterWindowShellDestruction):
2442         * history/PageCache.cpp:
2443         (WebCore::PageCache::canCache):
2444         * loader/FrameLoader.cpp:
2445         (WebCore::FrameLoader::commitProvisionalLoad):
2446         * page/FrameView.cpp:
2447         (WebCore::FrameView::willPaintContents):
2448         (WebCore::FrameView::didPaintContents):
2449         (WebCore::FrameView::computeCoverageRect):
2450         * platform/MemoryPressureHandler.cpp:
2451         (WebCore::MemoryPressureHandler::singleton):
2452         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2453         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2454         (WebCore::memoryPressureHandler): Deleted.
2455         * platform/MemoryPressureHandler.h:
2456         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
2457         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2458         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2459         (WebCore::MemoryPressureHandler::install):
2460         (WebCore::MemoryPressureHandler::holdOff):
2461         (WebCore::respondToMemoryPressureCallback):
2462         * platform/graphics/FontCache.cpp:
2463         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
2464         * platform/ios/LegacyTileCache.mm:
2465         (WebCore::LegacyTileCache::createTilesInActiveGrid):
2466         * platform/ios/LegacyTileGrid.mm:
2467         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
2468         * platform/ios/LegacyTileLayerPool.mm:
2469         (WebCore::LegacyTileLayerPool::addLayer):
2470         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
2471         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
2472         * platform/linux/MemoryPressureHandlerLinux.cpp:
2473         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
2474
2475 2015-02-17  Alex Christensen  <achristensen@webkit.org>
2476
2477         Remove WebCore.exp.in and clean up.
2478         https://bugs.webkit.org/show_bug.cgi?id=141491
2479
2480         Reviewed by Andreas Kling.
2481
2482         * Configurations/WebCore.xcconfig:
2483         Don't use exported symbols files.
2484         * DerivedSources.make:
2485         Don't generate export files.
2486         * WebCore.exp.in: Removed.
2487         * WebCore.xcodeproj/project.pbxproj:
2488         Removed WebCoreExportFileGenerator targets.
2489         * make-export-file-generator: Removed.
2490
2491 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2492
2493         Use HashMap::add instead of get/contains + set in DOMObjectCache
2494         https://bugs.webkit.org/show_bug.cgi?id=141558
2495
2496         Rubber-stamped by Žan Doberšek.
2497
2498         * bindings/gobject/DOMObjectCache.cpp:
2499         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
2500         (WebKit::DOMObjectCache::put):
2501
2502 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2503
2504         [GTK] GObject DOM bindings object are cached forever
2505         https://bugs.webkit.org/show_bug.cgi?id=141558
2506
2507         Reviewed by Sergio Villar Senin.
2508
2509         Rework the DOMObjectCache to avoid having to manually clear the
2510         objects when the frame is destroyed, using a FrameDestructionObserver
2511         instead. When a new object associated to a Frame is added to the
2512         cache, a FrameDestructionObserver is created for the frame if
2513         needed, and the DOM object is tracked by the observer too. When
2514         the frame is detached from the page all its objects are cleared,
2515         and if the aren't additional references, the object is finalized
2516         and removed from the cache normally.
2517         This patch also simplifies and modernizes the code to make it
2518         easier to read an maintain.
2519
2520         * bindings/gobject/DOMObjectCache.cpp:
2521         (WebKit::DOMObjectCacheData::DOMObjectCacheData): Add constructor
2522         to initialize its members and simplify the callers.
2523         (WebKit::DOMObjectCacheData::clearObject): Remove the references
2524         added by the cache, ensuring the GObject is not finalized until
2525         the method returns.
2526         (WebKit::DOMObjectCacheData::refObject): Adds a reference owned by
2527         the cache.
2528         (WebKit::domObjectCacheFrameObservers): Map a frame to a FrameDestructionObserver.
2529         (WebKit::getOrCreateDOMObjectCacheFrameObserver): Create a new
2530         FrameDestructionObserver for the given Frame or return the
2531         existing one.
2532         (WebKit::domObjects): Map wrapped object to wrapper object.
2533         (WebKit::DOMObjectCache::forget): Remove the wrapped object from
2534         the cache.
2535         (WebKit::DOMObjectCache::get): Return the wrapped object if it is
2536         in the cache, increasing the cache references.
2537         (WebKit::DOMObjectCache::put): Add the wrapper object to the cache
2538         for the given wrapped object. If it's a Node and has a frame add
2539         the node to the FrameDestructionObserver corresponding to the frame.
2540         (WebKit::getFrameFromHandle): Deleted.
2541         (WebKit::weakRefNotify): Deleted.
2542         (WebKit::DOMObjectCache::clearByFrame): Deleted.
2543         (WebKit::DOMObjectCache::~DOMObjectCache): Deleted.
2544         * bindings/gobject/DOMObjectCache.h:
2545
2546 2015-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
2547
2548         REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
2549         https://bugs.webkit.org/show_bug.cgi?id=141647
2550
2551         Reviewed by Csaba Osztrogonác.
2552
2553         No new tests since this just fixes a build break.
2554
2555         * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
2556         (WebCore::Position::isCandidate):
2557
2558 2015-02-16  Chris Dumez  <cdumez@apple.com>
2559
2560         Keep all memory cache resources in ListHashSets
2561         https://bugs.webkit.org/show_bug.cgi?id=141667
2562
2563         Reviewed by Andreas Kling.
2564
2565         Keep all memory cache resources in ListHashSets instead of manual linked
2566         lists. This simplifies the code a lot and is also more efficient for
2567         retrieving / removing particular CachedResources.
2568
2569         * loader/cache/CachedResource.cpp:
2570         (WebCore::CachedResource::CachedResource):
2571         * loader/cache/CachedResource.h:
2572         * loader/cache/MemoryCache.cpp:
2573         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2574         (WebCore::MemoryCache::removeFromLRUList):
2575         (WebCore::MemoryCache::insertInLRUList):
2576         (WebCore::MemoryCache::dumpLRULists):
2577         (WebCore::MemoryCache::lruListFor): Deleted.
2578         * loader/cache/MemoryCache.h:
2579
2580 2015-02-16  Benjamin Poulain  <benjamin@webkit.org>
2581
2582         CSS JIT: finish :nth-last-child()
2583         https://bugs.webkit.org/show_bug.cgi?id=141629
2584
2585         Reviewed by Andreas Kling.
2586
2587         This patch adds the matcher for :nth-child(An+B of selector list) and
2588         fix a small bug I discovered while working on it.
2589
2590         The matcher is straightforward: count the next siblings matching the selector,
2591         nothing fancy.
2592
2593         While working on it I noticed I forgot the test for IsParsingChildrenFinished
2594         on the simple version of :nth-last-child(). I add it in both matcher, write
2595         a couple of tests, the first part of the tests now succeed, but the second part
2596         fails...
2597
2598         What happened is:
2599         1) We interupt the parsing to execute the JavaScript.
2600            From there, we force the style resolution to get the computed style.
2601         2) When resolving the style, the early check for isFinishedParsingChildren()
2602            quits the function early. This is done *before* we marked the parent
2603            for :nth-last-child() style resolution.
2604         3) After the script, parsing resume and the following elements are added.
2605         4) When resolving the style, only the new elements are marked dirty,
2606            the elements pending their :nth-last-child() style never get udpated.
2607
2608         To fix the problem, I moved the test for FinishedParsingChildren after
2609         the parent marking.
2610
2611         Honestly, those early return for FinishedParsingChildren need to be refined
2612         and they should be tested properly. We should not do this kind of things
2613         for Query for example.
2614
2615         Tests: fast/selectors/nth-last-child-cannot-match-during-parsing-1.html
2616                fast/selectors/nth-last-child-cannot-match-during-parsing-2.html
2617                fast/selectors/nth-last-child-of-cannot-match-during-parsing-1.html
2618                fast/selectors/nth-last-child-of-cannot-match-during-parsing-2.html
2619                fast/selectors/nth-last-child-of-register-requirement.html
2620
2621         * css/SelectorChecker.cpp:
2622         (WebCore::SelectorChecker::checkOne):
2623         Fix the tree marking.
2624
2625         * cssjit/SelectorCompiler.cpp:
2626         (WebCore::SelectorCompiler::addPseudoClassType):
2627         The fragment creation was already done, all I had to do was
2628         accept the compile.
2629
2630         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2631         :nth-child() and :nth-last-child() with a selector list are heavier than :not()
2632         and :matches(), move them accordingly.
2633
2634         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
2635         More the early return after the tree marking.
2636
2637         (WebCore::SelectorCompiler::setParentAffectedByLastChildOf):
2638         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
2639         New matcher, nothing optimized yet.
2640
2641 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2642
2643         Adopt CAMachPort-as-layer-contents
2644         https://bugs.webkit.org/show_bug.cgi?id=141687
2645         <rdar://problem/19393233>
2646
2647         Reviewed by Simon Fraser.
2648
2649         No new tests, just a performance bump.
2650
2651         * platform/cocoa/MachSendRight.h:
2652         (WebCore::MachSendRight::operator bool):
2653         Add an operator bool() that checks if the underlying port is nonnull.
2654
2655         * platform/spi/cocoa/QuartzCoreSPI.h:
2656         Add some SPI.
2657
2658 2015-02-15  Sam Weinig  <sam@webkit.org>
2659
2660         Add experimental <attachment> element support
2661         https://bugs.webkit.org/show_bug.cgi?id=141626
2662
2663         Reviewed by Tim Horton.
2664
2665         Adds scaffolding for an experimental implementation of an <attachment> element
2666         which can represent a file attachment (e.g. NSTextAttachment in NSAttributedString
2667         parlance).
2668
2669         The implementation is guarded by both an #ifdef (ENABLE(ATTACHMENT_ELEMENT)) and 
2670         a setting (Settings::attachmentElementEnabled()).
2671
2672         Tests: fast/attachment/attachment-disabled-dom.html
2673                fast/attachment/attachment-disabled-rendering.html
2674                fast/attachment/attachment-dom.html
2675                fast/attachment/attachment-rendering.html
2676
2677         * Configurations/FeatureDefines.xcconfig:
2678         Add new ENABLE_ATTACHMENT_ELEMENT macro.
2679
2680         * CMakeLists.txt:
2681         * WebCore.vcxproj/WebCore.vcxproj:
2682         * WebCore.xcodeproj/project.pbxproj:
2683         Add new files.
2684
2685         * dom/make_names.pl:
2686         Add support for checking a setting to determine if a particular tag should be exposed.
2687
2688         * html/HTMLAttachmentElement.cpp: Added.
2689         * html/HTMLAttachmentElement.h: Added.
2690         Stub out the basics of the new element.
2691
2692         * html/HTMLElementsAllInOne.cpp:
2693         Add HTMLAttachmentElement.cpp.
2694
2695         * html/HTMLTagNames.in:
2696         Add 'attachment'.
2697
2698         * page/Settings.in:
2699         Add attachmentElementEnabled setting.
2700
2701         * rendering/RenderAttachment.cpp: Added.
2702         * rendering/RenderAttachment.h: Added.
2703         Stub out the basics of the new render. We will probably want to replace this with
2704         a non-replaced render, but this will do as a placeholder for now.
2705
2706         * rendering/RenderObject.h:
2707         (WebCore::RenderObject::isAttachment):
2708         Add predicate for type casting.
2709
2710         * rendering/RenderingAllInOne.cpp:
2711         Add RenderAttachment.cpp.
2712
2713 2015-02-16  Andreas Kling  <akling@apple.com>
2714
2715         GC (almost) immediately when navigating under memory pressure.
2716         <https://webkit.org/b/141663>
2717
2718         Reviewed by Geoffrey Garen.
2719
2720         Since the PageCache is already disabled in memory pressure situations,
2721         we know that detaching the old window shell on navigation is basically
2722         guaranteed to generate a bunch of garbage, we can soften the memory
2723         peak a bit by doing a GC right away instead of scheduling one for soon(tm).
2724
2725         * bindings/js/GCController.cpp:
2726         (WebCore::GCController::GCController):
2727         (WebCore::GCController::garbageCollectSoon):
2728         (WebCore::GCController::garbageCollectOnNextRunLoop):
2729         (WebCore::GCController::gcTimerFired):
2730         * bindings/js/GCController.h:
2731
2732             Add a GCController::garbageCollectOnNextRunLoop() complement to the
2733             "soon" and "now" options. There was already a zero timer in here for
2734             non-CF builds, so I just used that same timer to implement this
2735             and have the non-CF code path call garbageCollectOnNextRunLoop().
2736
2737         * bindings/js/ScriptController.cpp:
2738         (WebCore::collectGarbageAfterWindowShellDestruction):
2739         (WebCore::ScriptController::~ScriptController):
2740         (WebCore::ScriptController::clearWindowShell):
2741
2742             Under system memory pressure conditions, schedule a full GC on next
2743             runloop iteration instead of just asking for it to happen soon.
2744             We do it on next runloop to ensure that there's no pointer to the
2745             window object on the stack.
2746
2747 2015-02-16  Enrica Casucci  <enrica@apple.com>
2748
2749         Emoji sequences do not render properly.
2750         https://bugs.webkit.org/show_bug.cgi?id=141661
2751         rdar://problem/19820463
2752
2753         Reviewed by Sam Weinig.
2754
2755         Emoji sequences and emoji with variations should be rendered
2756         using the Complex code path and should be treated as graphemes.
2757         This change modifies advanceByCombiningCharacterSequence to add
2758         this logic.
2759
2760         Test: fast/text/emoji.html
2761
2762         * WebCore.xcodeproj/project.pbxproj:
2763         * platform/graphics/FontCascade.cpp:
2764         (WebCore::FontCascade::characterRangeCodePath):
2765         * platform/graphics/mac/ComplexTextController.cpp:
2766         (WebCore::advanceByCombiningCharacterSequence): Implements a simple
2767         logic to treat emoji sequences and emoji with variations as graphemes.
2768         * platform/text/CharacterProperties.h: Added.
2769         (WebCore::isEmojiGroupCandidate):
2770         (WebCore::isEmojiModifier):
2771         (WebCore::isVariationSelector):
2772         * rendering/RenderText.cpp:
2773         (WebCore::isEmojiGroupCandidate): Deleted.
2774         (WebCore::isEmojiModifier): Deleted.
2775
2776 2015-02-16  Zalan Bujtas  <zalan@apple.com>
2777
2778         RenderTableRow should check if it has access to its ancestor chain.
2779         https://bugs.webkit.org/show_bug.cgi?id=141668
2780
2781         Reviewed by Andreas Kling.
2782
2783         Preventive fix.
2784
2785         * rendering/RenderTableRow.cpp:
2786         (WebCore::RenderTableRow::styleDidChange):
2787         (WebCore::RenderTableRow::addChild):
2788         * rendering/RenderTableRow.h:
2789
2790 2015-02-16  Jer Noble  <jer.noble@apple.com>
2791
2792         [iOS] Build fix: declare undeclared identifier 'credential'.
2793
2794         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2795         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential):
2796
2797 2015-02-16  Jer Noble  <jer.noble@apple.com>
2798
2799         [iOS] Unable to play .mp4 file over http with basic http authentication
2800         https://bugs.webkit.org/show_bug.cgi?id=141503
2801         rdar://problem/15799844
2802
2803         Reviewed by Alexey Proskuryakov.
2804
2805         On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
2806         provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
2807         object by way of CFURLAuthChallengeRef.
2808
2809         Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
2810         is to take AuthenticationChallengeClient callbacks and pass them along to a
2811         NSURLAuthenticationChallenge sender.
2812
2813         Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
2814         that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
2815         them into that same header.
2816
2817         * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
2818         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2819         (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
2820         (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
2821         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
2822         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
2823         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
2824         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
2825         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
2826         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
2827             Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
2828             to the HTMLMediaElement.
2829         * platform/network/mac/AuthenticationMac.mm:
2830         * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.
2831
2832 2015-02-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
2833
2834         Revert a change in SVGRenderSupport::mapLocalToContainer committed for fixing <https://bugs.webkit.org/show_bug.cgi?id=119626>.
2835         https://bugs.webkit.org/show_bug.cgi?id=138439
2836
2837         Reviewed by Darin Adler.
2838
2839         The change http://trac.webkit.org/changeset/164861 was ported from Blink
2840         but it was was revert later because it broke Chrome SVG rendering. It also
2841         broke the WebKit SVG text search highlighting.
2842         
2843         Tests: svg/transforms/svg-geometry-crash.html: This test was added by the
2844         blamed change. A new but correct solution is required to fix the assertion.
2845
2846         * rendering/svg/SVGRenderSupport.h:
2847         * rendering/svg/SVGRenderSupport.cpp:
2848         Notice that TransformState.applyTransform() does matrix-left-multiplication,
2849         i.e. state = transform * state. But operator*() of AffineTransform and
2850         MatrixTransform  does right multiply, i.e. this = this * transform.
2851         
2852         (WebCore::SVGRenderSupport::localToParentTransform): Have the calculation
2853         of the SVG localToParentTransform in one shared function.
2854         
2855         (WebCore::SVGRenderSupport::mapLocalToContainer): Revert the Blink change.
2856         If the parent is the SVG root, the transform state should be equal to
2857         transform = svg_to_css_mapping * local_to_parent_mapping * transform.
2858         
2859         (WebCore::SVGRenderSupport::pushMappingToContainer): Get the localToParent
2860         transform to be pushed in the geometryMap. If the parent is the SVG root,
2861         localToParent = svg_to_css_mapping * local_to_parent_mapping. The original
2862         code was doing the opposite and this is the cause of the assertion which 
2863         was fixed wrongly by reversing the correct multiplication order in 
2864         SVGRenderSupport::mapLocalToContainer().
2865
2866 2015-02-16  Zalan Bujtas  <zalan@apple.com>
2867
2868         RenderTableCell can't access its parent while in detached state.
2869         https://bugs.webkit.org/show_bug.cgi?id=141639
2870         rdar://problem/19850760
2871
2872         Reviewed by Simon Fraser.
2873
2874         Null check against ancestor chain so that certain methods in RenderTableCell can
2875         be called even if the renderer is not yet attached.
2876
2877         Test: fast/table/table-cell-crash-when-detached-state.html
2878
2879         * rendering/RenderTableCell.cpp:
2880         (WebCore::RenderTableCell::borderLeft):
2881         (WebCore::RenderTableCell::borderRight):
2882         (WebCore::RenderTableCell::borderTop):
2883         (WebCore::RenderTableCell::borderBottom):
2884         (WebCore::RenderTableCell::borderStart):
2885         (WebCore::RenderTableCell::borderEnd):
2886         (WebCore::RenderTableCell::borderBefore):
2887         (WebCore::RenderTableCell::borderAfter):
2888         * rendering/RenderTableCell.h:
2889
2890 2015-02-16  David Hyatt  <hyatt@apple.com>
2891
2892         Add ifdefs to avoid adjusting Ruby selection rects to avoid overlap on iOS.
2893         https://bugs.webkit.org/show_bug.cgi?id=141651
2894         <rdar://problem/19182526>
2895         
2896         Reviewed by Simon Fraser.
2897
2898         * rendering/RootInlineBox.cpp:
2899         (WebCore::RootInlineBox::selectionTop):
2900         (WebCore::RootInlineBox::selectionBottom):
2901
2902 2015-02-16  David Kilzer  <ddkilzer@apple.com>
2903
2904         SoftLinking.h: Update copyright and license; clean up whitespace
2905
2906         * platform/mac/SoftLinking.h:
2907
2908 2015-02-12  David Hyatt  <hyatt@apple.com>
2909
2910         text-underline-position:under has multiple correctness issues
2911         https://bugs.webkit.org/show_bug.cgi?id=141528
2912
2913         Reviewed by Dean Jackson.
2914
2915         Added a bunch of new tests in fast/text
2916
2917         * rendering/InlineFlowBox.cpp:
2918         (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
2919         (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
2920         (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
2921         * rendering/InlineFlowBox.h:
2922         These functions have been re-written to take an enclosing renderer that specified the
2923         decoration. This way they can properly limit the bottom/top computation to only line boxes
2924         that are contained inside the renderer.
2925
2926         * rendering/InlineTextBox.cpp:
2927         (WebCore::InlineTextBox::paintDecoration):
2928         Tweak the call to get the decoration colors now that quirks mode has been removed.
2929
2930         * rendering/RenderElement.cpp:
2931         (WebCore::RenderElement::enclosingRendererWithTextDecoration):
2932         * rendering/RenderElement.h:
2933         New function that finds the enclosing renderer that specified a text decoration. For now
2934         this is only used in the "under" position computation, but soon we'll be using it
2935         everywhere.
2936
2937         * rendering/RenderObject.cpp:
2938         (WebCore::RenderObject::getTextDecorationColors):
2939         * rendering/RenderObject.h:
2940         Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).
2941
2942         * rendering/RootInlineBox.cpp:
2943         (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
2944         * rendering/RootInlineBox.h:
2945         Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
2946         the InlineFlowBox functions directly.
2947
2948         * style/InlineTextBoxStyle.cpp:
2949         (WebCore::computeUnderlineOffset):
2950         Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
2951         computation to limit which line boxes get included.
2952
2953 2015-02-16  Brent Fulgham  <bfulgham@apple.com>
2954
2955         FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
2956         https://bugs.webkit.org/show_bug.cgi?id=141596
2957         <rdar://problem/19837103>
2958
2959         Reviewed by Zalan Bujtas.
2960
2961         No new tests. Covered by css3/filters/huge-blur-value.html
2962
2963         Avoid overflowing the signed integer values by not converting from unsigned
2964         until the maximum size has been clamped to the expected max.
2965
2966         * platform/graphics/filters/FEGaussianBlur.cpp:
2967         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
2968
2969 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
2970
2971         [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
2972         https://bugs.webkit.org/show_bug.cgi?id=140763
2973
2974         Reviewed by Antti Koivisto.
2975
2976         Content sized tracks with non-spanning grid items were not
2977         properly sized because the growth limit was sometimes infinity
2978         (-1) after calling resolveContentBasedTrackSizingFunctions() when
2979         it should not. This patch adds an special initialization phase for
2980         non-spanning grid items as the new track sizing algorithm
2981         describes.
2982
2983         Granted, that was handled in the old algorithm in
2984         distributeSpaceToTracks() as a special case. The problem is that
2985         it regressed after the optimization added in r173868 because that
2986         method is no longer called when the space to distribute is 0.
2987
2988         That's why we could fix this by allowing calls to
2989         distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
2990         it with an explicit initialization our implementation becomes
2991         closer to the new algorithm and the initialization is now explicit
2992         in the code instead of a side effect of calling
2993         distributeSpaceToTracks() with no space to be distributed. It also
2994         brings a slight performance improvement as we save sorts and hash
2995         lookups.
2996
2997         I also took the change to add caching to several GridTrackSize
2998         methods that were hot on the profiler (each one accounted for ~1%
2999         of the total time, now they account for ~0.3% each).
3000
3001         Test: fast/css-grid-layout/grid-initialize-span-one-items.html
3002
3003         * rendering/RenderGrid.cpp:
3004         (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
3005         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3006         Exclude non spanning grid items from the calls to
3007         resolveContentBasedTrackSizingFunctionsForItems().
3008         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
3009         New method to resolve track sizes only using non-spanning grid
3010         items.
3011         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3012         Ensure that it isn't called for non-spanning grid items.
3013         * rendering/RenderGrid.h:
3014         * rendering/style/GridTrackSize.h:
3015         (WebCore::GridTrackSize::GridTrackSize): Cache return values.
3016         (WebCore::GridTrackSize::setLength): Ditto.
3017         (WebCore::GridTrackSize::setMinMax): Ditto.
3018         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
3019         that caches the return values for hasXXXTrackBreadth() methods.
3020         (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
3021         the cached return value.
3022         (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
3023         (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
3024         (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
3025         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
3026         (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
3027         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
3028         Ditto.
3029         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
3030         Ditto.
3031
3032 2015-02-16  Milan Crha  <mcrha@redhat.com>
3033
3034         [GTK] Loading page into WebView shows g_closure_unref warning
3035         https://bugs.webkit.org/show_bug.cgi?id=127474
3036
3037         Reviewed by Carlos Garcia Campos.
3038
3039         * bindings/gobject/GObjectEventListener.cpp:
3040         (WebCore::GObjectEventListener::gobjectDestroyed):
3041
3042 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
3043
3044         [CSS Grid Layout] Remove the usage of Length(Undefined) in GridLength
3045         https://bugs.webkit.org/show_bug.cgi?id=141562
3046
3047         Reviewed by Chris Dumez.
3048
3049         From Blink r164154 by <timloh@chromium.org>
3050
3051         The patch simplifies some of the logic in creating and applying
3052         GridLength and GridTrackSize values to RenderStyles by using the
3053         constructors for initialisation instead of deferring to setters.
3054
3055         The rationale behind this change is that neither of
3056         createGridTrackSize() nor createGridTrackBreadth() should be able
3057         to fail, so these are changed to return objects directly instead
3058         of taking an out reference (note that in general failing in
3059         applying properties is incorrect and we should catch these in the
3060         parser).
3061
3062         The quirk value across to the Lengths was also removed because it
3063         doesn't apply to Grid.
3064
3065         * css/CSSPropertyNames.in:
3066         * css/StyleBuilderConverter.h:
3067         (WebCore::StyleBuilderConverter::createGridTrackBreadth): Return a
3068         GridLength instead of a bool.
3069         (WebCore::StyleBuilderConverter::createGridTrackSize): Return a
3070         GridTrackSize instead of a bool.
3071         (WebCore::StyleBuilderConverter::createGridTrackList): Do not
3072         create temporary GridTrackSizes with undefined Lengths.
3073         (WebCore::StyleBuilderConverter::convertGridTrackSize): Ditto.
3074         * rendering/style/GridLength.h:
3075         (WebCore::GridLength::GridLength): It now requires a mandatory
3076         Length argument.
3077         (WebCore::GridLength::length): Deleted.
3078         (WebCore::GridLength::setFlex): Deleted.
3079         * rendering/style/GridTrackSize.h:
3080         (WebCore::GridTrackSize::GridTrackSize): It now requires a
3081         mandatory GridLength argument.
3082         (WebCore::GridTrackSize::length): Removed no longer valid ASSERTs.
3083         (WebCore::GridTrackSize::minTrackBreadth): Ditto.
3084         (WebCore::GridTrackSize::maxTrackBreadth): Ditto.
3085         (WebCore::GridTrackSize::setLength): Deleted.
3086         (WebCore::GridTrackSize::setMinMax): Deleted.
3087         * rendering/style/RenderStyle.h:
3088
3089 2015-02-13  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3090
3091         Removing text node does not remove its associated markers
3092         https://bugs.webkit.org/show_bug.cgi?id=140999
3093
3094         Reviewed by Ryosuke Niwa.
3095
3096         Removing text node via script does not remove its markers.
3097         For example, running the following script:
3098
3099         <script>
3100             var div = document.getElementById("testElement");
3101             div.focus();
3102             document.execCommand("InsertText", false, "welllcome ");
3103
3104             // Give a time async spellchecker to show its markers and
3105             // remove the node.
3106             setTimeout(function() { div.removeChild(div.firstChild); }, 100);
3107         </script>
3108
3109         will cause that DocumentMarkerController still stores the markers for
3110         detached node.
3111
3112         The same issue occurs when the text gets cleared, for example,
3113         <script>
3114             input.value = ""; // for HTMLTextAreaElement, HTMLInputElement
3115             // or
3116             div.innerHTML = ""; // for content editable
3117         </script>
3118
3119         No new tests. Internals marker APIs operate on text node attached
3120         to the element. To test it we could expose document().markers().hasMarkers()
3121         but there is no more useful cases where it could be used.
3122         Another obstacle is that we are in isInShadowTree() so that there is
3123         no possible to register on "DOMSubtreeModified" event.
3124         Test cases attached to the bug:
3125         1. input.value = ""  https://bug-140999-attachments.webkit.org/attachment.cgi?id=245704
3126         2. elem.removeChild(textNode) https://bug-140999-attachments.webkit.org/attachment.cgi?id=246515
3127
3128         Remove markers when text nodes are about to remove.
3129         * dom/Document.cpp:
3130         (WebCore::Document::nodeChildrenWillBeRemoved):
3131         Fixes input.value = ""
3132         (WebCore::Document::nodeWillBeRemoved):
3133         Fixes elem.removeChild(textNode)
3134
3135 2015-02-15  David Kilzer  <ddkilzer@apple.com>
3136
3137         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3138         <http://webkit.org/b/141607>
3139
3140         This should fix the build, but leaves a FIXME list in
3141         WebCore.unexp.
3142
3143         * Configurations/WebCore.unexp: Add weak externals with a FIXME
3144         statement so they can be removed later.  It's more important to
3145         fix the build first.
3146
3147         * Configurations/WebCore.xcconfig: Change XCODE_VERSION_MINOR to
3148         XCODE_VERSION_MAJOR since the internal bots use version 5.1.1
3149         which still has the error.
3150
3151 2015-02-15  Brian J. Burg  <burg@cs.washington.edu>
3152
3153         Web Inspector: remove unused XHR replay code
3154         https://bugs.webkit.org/show_bug.cgi?id=141622
3155
3156         Reviewed by Timothy Hatcher.
3157
3158         XHR Replay functionality became unused with the last frontend rewrite.
3159         Remove instrumentation and data storage classes only used by this feature.
3160
3161         * inspector/InspectorInstrumentation.cpp:
3162         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
3163         (WebCore::InspectorInstrumentation::willLoadXHRImpl): Deleted.
3164         (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): Deleted.
3165         * inspector/InspectorInstrumentation.h:
3166         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
3167         (WebCore::InspectorInstrumentation::willLoadXHR): Deleted.
3168         (WebCore::InspectorInstrumentation::didFailXHRLoading): Deleted.
3169         * inspector/InspectorResourceAgent.cpp:
3170         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3171         (WebCore::InspectorResourceAgent::didFinishXHRLoading):
3172         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
3173         (WebCore::InspectorResourceAgent::willLoadXHR): Deleted.
3174         (WebCore::InspectorResourceAgent::didFailXHRLoading): Deleted.
3175         (WebCore::InspectorResourceAgent::replayXHR): Deleted.
3176         * inspector/InspectorResourceAgent.h:
3177         * inspector/NetworkResourcesData.cpp:
3178         (WebCore::NetworkResourcesData::clear):
3179         (WebCore::XHRReplayData::create): Deleted.
3180         (WebCore::XHRReplayData::XHRReplayData): Deleted.
3181         (WebCore::NetworkResourcesData::xhrReplayData): Deleted.
3182         (WebCore::NetworkResourcesData::setXHRReplayData): Deleted.
3183         (WebCore::NetworkResourcesData::reuseXHRReplayData): Deleted.
3184         * inspector/NetworkResourcesData.h:
3185         (WebCore::XHRReplayData::method): Deleted.
3186         (WebCore::XHRReplayData::url): Deleted.
3187         (WebCore::XHRReplayData::async): Deleted.
3188         (WebCore::XHRReplayData::formData): Deleted.
3189         (WebCore::XHRReplayData::headers): Deleted.
3190         (WebCore::XHRReplayData::includeCredentials): Deleted.
3191         (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): Deleted.
3192         (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): Deleted.
3193         * loader/DocumentThreadableLoader.cpp:
3194         (WebCore::DocumentThreadableLoader::loadRequest):
3195         * xml/XMLHttpRequest.cpp:
3196         (WebCore::XMLHttpRequest::createRequest):
3197         (WebCore::XMLHttpRequest::internalAbort):
3198         (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Deleted.
3199         * xml/XMLHttpRequest.h:
3200
3201 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
3202
3203         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
3204         https://bugs.webkit.org/show_bug.cgi?id=141550.
3205
3206         Reviewed by David Kilzer.
3207
3208         * svg/properties/SVGMatrixTearOff.h:
3209         (WebCore::SVGMatrixTearOff::create): Fix a compilation error on the release build.
3210         The ASSERT() here references a parameter which is not used anywhere else. We need 
3211         to change it to ASSERT_UNUSED(). 
3212
3213 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
3214
3215         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
3216         https://bugs.webkit.org/show_bug.cgi?id=141550.
3217
3218         Reviewed by Darin Adler.
3219
3220         Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to
3221         include a new test case.
3222
3223         * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null
3224         pointer. There is no point in having SVGMatrixTearOff points to the parent and
3225         the property of the parent at the same time.
3226         
3227         (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to
3228         the parent SVGPropertyTearOff<SVGTransform>. But it should overrides setValue()
3229         and propertyReference() so it can set and get the SVGMatrix from the SVGTransform
3230         parent.
3231         
3232         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class.
3233         SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by
3234         itself but it knows what property to set and get from the parent.
3235         
3236         * svg/properties/SVGPropertyTearOff.h:
3237         (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value.
3238         
3239         (WebCore::SVGPropertyTearOff::propertyReference):
3240         (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes
3241         like SVGMatrixTearOff can override them.
3242         
3243         (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor.
3244
3245 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
3246
3247         Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
3248         https://bugs.webkit.org/show_bug.cgi?id=141552.
3249
3250         Reviewed by Darin Adler.
3251
3252         Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to
3253         include a new test case.
3254
3255         * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item
3256         before trying to detach the wrapper of the item which going to be replaced.
3257
3258 2015-02-15  David Kilzer  <ddkilzer@apple.com>
3259
3260         CoreText only needs to be soft-linked on Windows
3261
3262         More work towards the Maverick Debug build fix:
3263
3264         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3265         <http://webkit.org/b/141607>
3266
3267         * page/CaptionUserPreferencesMediaAF.cpp:
3268
3269 2015-02-15  Alexey Proskuryakov  <ap@apple.com>
3270
3271         More build fixing.
3272
3273         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
3274
3275 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
3276
3277         More internal build fixing.
3278
3279         DDDFACache.h is not an actual private header, so we were using open source
3280         redeclaration of DDDFACacheRef with an internal function prototype from DDDFAScanner.h.
3281
3282         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
3283         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
3284
3285 2015-02-14  Benjamin Poulain  <benjamin@webkit.org>
3286
3287         Add the initial matching implementation for attribute selectors with case-insensitive value
3288         https://bugs.webkit.org/show_bug.cgi?id=141615
3289
3290         Reviewed by Andreas Kling.
3291
3292         Tests: fast/css/case-insensitive-attribute-selector-specificity.html
3293                fast/css/case-insensitive-attribute-selector-styling-html-1.html
3294                fast/css/case-insensitive-attribute-selector-styling-html-2.html
3295                fast/css/case-insensitive-attribute-selector-styling-html-3.html
3296                fast/css/case-insensitive-attribute-selector-styling-xhtml-1.xhtml
3297                fast/css/case-insensitive-attribute-selector-styling-xhtml-2.xhtml
3298                fast/css/case-insensitive-attribute-selector-styling-xhtml-3.xhtml
3299                fast/selectors/case-insensitive-attribute-bascis.html
3300                fast/selectors/case-insensitive-attribute-matching-style-attribute.html
3301                fast/selectors/case-insensitive-attribute-style-update.html
3302                fast/selectors/case-insensitive-attribute-with-case-sensitive-name.html
3303
3304         * css/SelectorChecker.cpp:
3305         (WebCore::SelectorChecker::checkOne):
3306         We already had case-insensitive value matching due to some legacy HTML
3307         behaviors where some attribute values would be matched case-insensitively
3308         depending on the attribute name.
3309
3310         For this patch, I just re-use the same mechanism. I used branches to try
3311         to convey the idea that matching is case sensitive by default unless
3312         the selector has a flag or we are in the weird HTML exception.
3313
3314         * cssjit/SelectorCompiler.cpp:
3315         (WebCore::SelectorCompiler::constructFragmentsInternal):
3316         Disable that case in the CSS JIT for now, I'll implement it later.
3317
3318 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3319
3320         Declare soft-linked functions with extern "C" linkage
3321
3322         More work towards the Maverick Debug build fix:
3323
3324         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3325         <http://webkit.org/b/141607>
3326
3327         * platform/mac/SoftLinking.h: Try declaring soft-linked
3328         functions with extern "C" linkage to see if they stop appearing
3329         as weak externals.  This has the added benefit that if the
3330         function signature changes, we'll get a build failure.
3331
3332 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
3333
3334         [Mac] RetainPtr member cleanup, possible leaks
3335         https://bugs.webkit.org/show_bug.cgi?id=141616
3336
3337         Reviewed by Andreas Kling.
3338
3339         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3340         (-[WebSpeechSynthesisWrapper speakUtterance:]):
3341         Adopt the allocated object to avoid a possible leak.
3342
3343         * platform/mac/ScrollAnimatorMac.mm:
3344         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3345         Adopt to avoid unnecessary retain/autorelease.
3346
3347 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
3348
3349         IncompleteMetaDataCue leak seen on leaks bot
3350         https://bugs.webkit.org/show_bug.cgi?id=141611
3351
3352         Reviewed by Eric Carlson.        
3353
3354         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
3355         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue): Deleted.
3356         (WebCore::IncompleteMetaDataCue::~IncompleteMetaDataCue): Deleted.
3357         (WebCore::IncompleteMetaDataCue::cueData): Deleted.
3358         (WebCore::IncompleteMetaDataCue::startTime): Deleted.
3359         Convert to a struct and hold a list of structs instead of pointers.
3360
3361         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
3362         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
3363         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
3364         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
3365         Update use of IncompleteMetaDataCue and modernize related code.
3366
3367 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
3368
3369         Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
3370         https://bugs.webkit.org/show_bug.cgi?id=141372
3371
3372         Reviewed by Joseph Pecoraro.
3373
3374         * WebCore.exp.in:
3375         * inspector/InspectorApplicationCacheAgent.cpp:
3376         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
3377         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
3378         * inspector/InspectorApplicationCacheAgent.h:
3379         * inspector/InspectorCSSAgent.cpp:
3380         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
3381         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
3382         * inspector/InspectorCSSAgent.h:
3383         * inspector/InspectorController.cpp:
3384         (WebCore::InspectorController::InspectorController):
3385         (WebCore::InspectorController::inspectedPageDestroyed):
3386         (WebCore::InspectorController::connectFrontend):
3387         (WebCore::InspectorController::disconnectFrontend):
3388         (WebCore::InspectorController::show):
3389         (WebCore::InspectorController::close):
3390         (WebCore::InspectorController::dispatchMessageFromFrontend):
3391         * inspector/InspectorController.h:
3392         * inspector/InspectorDOMAgent.cpp:
3393         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
3394         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
3395         * inspector/InspectorDOMAgent.h:
3396         * inspector/InspectorDOMDebuggerAgent.cpp:
3397         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
3398         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
3399         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
3400         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
3401         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
3402         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
3403         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
3404         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
3405         * inspector/InspectorDOMDebuggerAgent.h:
3406         * inspector/InspectorDOMStorageAgent.cpp:
3407         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
3408         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
3409         * inspector/InspectorDOMStorageAgent.h:
3410         * inspector/InspectorDatabaseAgent.cpp:
3411         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
3412         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
3413         * inspector/InspectorDatabaseAgent.h:
3414         * inspector/InspectorDatabaseResource.cpp:
3415         (WebCore::InspectorDatabaseResource::bind):
3416         * inspector/InspectorDatabaseResource.h:
3417         * inspector/InspectorForwarding.h:
3418         * inspector/InspectorIndexedDBAgent.cpp:
3419         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
3420         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
3421         * inspector/InspectorIndexedDBAgent.h:
3422         * inspector/InspectorLayerTreeAgent.cpp:
3423         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
3424         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
3425         * inspector/InspectorLayerTreeAgent.h:
3426         * inspector/InspectorPageAgent.cpp:
3427         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
3428         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
3429         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
3430         * inspector/InspectorPageAgent.h:
3431         * inspector/InspectorReplayAgent.cpp:
3432         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3433         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
3434         * inspector/InspectorReplayAgent.h:
3435         * inspector/InspectorResourceAgent.cpp:
3436         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
3437         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
3438         * inspector/InspectorResourceAgent.h:
3439         * inspector/InspectorStyleSheet.cpp:
3440         (WebCore::InspectorStyle::styleWithProperties):
3441         * inspector/InspectorTimelineAgent.cpp:
3442         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
3443         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
3444         * inspector/InspectorTimelineAgent.h:
3445         * inspector/InspectorWorkerAgent.cpp:
3446         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
3447         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
3448         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
3449         * inspector/InspectorWorkerAgent.h:
3450         * inspector/PageRuntimeAgent.cpp:
3451         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
3452         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
3453         * inspector/PageRuntimeAgent.h:
3454         * inspector/WorkerInspectorController.cpp:
3455         (WebCore::WorkerInspectorController::~WorkerInspectorController):
3456         (WebCore::WorkerInspectorController::connectFrontend):
3457         (WebCore::WorkerInspectorController::disconnectFrontend):
3458         * inspector/WorkerInspectorController.h:
3459         * inspector/WorkerRuntimeAgent.cpp:
3460         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
3461         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
3462         * inspector/WorkerRuntimeAgent.h:
3463         * loader/EmptyClients.h:
3464         * page/PageDebuggable.cpp:
3465         (WebCore::PageDebuggable::connect):
3466         (WebCore::PageDebuggable::disconnect):
3467         * page/PageDebuggable.h:
3468         * testing/Internals.cpp:
3469         (WebCore::Internals::closeDummyInspectorFrontend):
3470         * workers/WorkerMessagingProxy.cpp:
3471         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
3472
3473 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3474
3475         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3476         <http://webkit.org/b/141607>
3477
3478         Work towards fixing the Mavericks Debug build.
3479
3480         * dom/Document.h:
3481         (WebCore::Document::setAnnotatedRegionsDirty):
3482         * dom/Event.h:
3483         (WebCore::Event::create):
3484         * dom/Node.h:
3485         (WebCore::Node::hasEditableStyle):
3486         * dom/Position.h:
3487         (WebCore::Position::Position):
3488         * editing/FrameSelection.h:
3489         (WebCore::DragCaretController::clear):
3490         * loader/ResourceLoader.h:
3491         (WebCore::ResourceLoader::originalRequest):
3492         - Do not mark inline methods for export.
3493
3494 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
3495
3496         rel="noreferrer" should make window.opener null
3497         https://bugs.webkit.org/show_bug.cgi?id=141579
3498
3499         Reviewed by Darin Adler.
3500
3501         Tests: http/tests/navigation/target-blank-opener-post.html
3502                http/tests/navigation/target-blank-opener.html
3503
3504         We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader
3505         member variable. This works for some clients - ones that invoke delegate callbacks
3506         synchronously - but not in the general case.
3507
3508         So, changed to passing the policy explicitly.
3509
3510         * WebCore.exp.in:
3511         * loader/FrameLoader.cpp:
3512         (WebCore::FrameLoader::FrameLoader):
3513         (WebCore::FrameLoader::urlSelected):
3514         (WebCore::FrameLoader::loadURLIntoChildFrame):
3515         (WebCore::FrameLoader::loadFrameRequest):
3516         (WebCore::FrameLoader::loadURL):
3517         (WebCore::FrameLoader::load):
3518         (WebCore::FrameLoader::loadPostRequest):
3519         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3520         * loader/FrameLoader.h:
3521         (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted.
3522         * loader/FrameLoaderTypes.h:
3523         * loader/NavigationScheduler.cpp:
3524         * page/ContextMenuController.cpp:
3525         (WebCore::openNewWindow):
3526         (WebCore::ContextMenuController::contextMenuItemSelected):
3527
3528 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3529
3530         REGRESSION (r180082): WebCore build on Mountain Lion fails due to weak export for i386
3531         <rdar://problem/19838127>
3532
3533         * Configurations/WebCore.unexp: Add missing symbol.
3534
3535 2015-02-13  Chris Dumez  <cdumez@apple.com>
3536
3537         RenderListItem resets its marker's style on style change even if the diff is StyleDifferenceEqual
3538         https://bugs.webkit.org/show_bug.cgi?id=141572
3539         <rdar://problem/19759818>
3540
3541         Reviewed by Simon Fraser.
3542
3543         Do not unnecessarily update the marker's style in RenderListItem::styleDidChange()
3544         if the RenderStyle diff is StyleDifferenceEqual. Doing so can cause unnecessary
3545         layouts.
3546
3547         This was causing high cpu usage on
3548         http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html because there
3549         is an animation that changes the style every second (but the diff is equal) and the
3550         RenderListItem keeps resetting its marker's margin, which triggers a layout and the
3551         RenderListMarker re-computes its margin during layout and updates its style again.
3552
3553         With this change, CPU usage on the page goes from 150% to 20%. There is only a style
3554         recalc happening every second, no more relayouts and repaints.
3555
3556         Test: fast/repaint/list-item-equal-style-change-no-repaint.html
3557
3558         * rendering/RenderListItem.cpp:
3559         (WebCore::RenderListItem::styleDidChange):
3560
3561 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
3562
3563         Make WebCore::IOSurface have single ownership instead of refcounting
3564         https://bugs.webkit.org/show_bug.cgi?id=141578
3565
3566         Reviewed by Anders Carlsson.
3567
3568         In the interests of making it harder to misuse and to make it more like
3569         ImageBuffer, our IOSurface wrapper should have single ownership.
3570
3571         This will also allow future changes which depend on temporarily
3572         consuming an IOSurface to more easily enforce correct usage.
3573
3574         * WebCore.exp.in:
3575         * platform/graphics/cg/IOSurfacePool.cpp:
3576         (WebCore::IOSurfacePool::takeSurface):
3577         (WebCore::IOSurfacePool::addSurface):
3578         (WebCore::IOSurfacePool::insertSurfaceIntoPool):
3579         (WebCore::IOSurfacePool::tryEvictInUseSurface):
3580         (WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
3581         (WebCore::IOSurfacePool::collectInUseSurfaces):
3582         * platform/graphics/cg/IOSurfacePool.h:
3583         * platform/graphics/cocoa/IOSurface.h:
3584         * platform/graphics/cocoa/IOSurface.mm:
3585         (IOSurface::create):
3586         (IOSurface::createFromSendRight):
3587         (IOSurface::createFromSurface):
3588         (IOSurface::createFromImage):
3589         Make IOSurface::create()s return a unique_ptr, and adjust everywhere.
3590
3591 2015-02-12  Enrica Casucci  <enrica@apple.com>
3592
3593         Additional emoji group support.
3594         https://bugs.webkit.org/show_bug.cgi?id=141539
3595         rdar://problem/19727527
3596
3597         Reviewed by Sam Weinig.
3598
3599         Adding some new emoji ligatures.
3600         Updated existing test to include the new sequences.
3601
3602         * platform/text/TextBreakIterator.cpp:
3603         (WebCore::cursorMovementIterator):
3604         * rendering/RenderText.cpp:
3605         (WebCore::isEmojiGroupCandidate):
3606
3607 2015-02-13  Alex Christensen  <achristensen@webkit.org>
3608
3609         Really stop using export files.
3610         https://bugs.webkit.org/show_bug.cgi?id=141521
3611
3612         Reviewed by Mark Rowe.
3613
3614         * Configurations/WebCore.xcconfig:
3615         Don't use exported symbols files.
3616         * Configurations/WebCore.unexp:
3617         Added list of symbols not to export (needed by Xcode 5.0.2).
3618
3619 2015-02-13  Zalan Bujtas  <zalan@apple.com>
3620
3621         Simplify ASSERT in lastRubyRun().
3622         https://bugs.webkit.org/show_bug.cgi?id=141574
3623
3624         Reviewed by Daniel Bates.
3625
3626         r180064 made some of the conditions in the ASSERT redundant.
3627
3628         Covered by existing tests.
3629
3630         * rendering/RenderRuby.cpp:
3631         (WebCore::lastRubyRun):
3632
3633 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
3634
3635         [Mac, iOS] Adjust pagination behavior for Mail.app printing use
3636         https://bugs.webkit.org/show_bug.cgi?id=141569
3637         <rdar://problem/14912763>
3638
3639         Reviewed by Anders Carlsson.
3640
3641         * page/Settings.in: Add new pagination setting flag.
3642         * rendering/RenderBlockFlow.cpp:
3643         (WebCore::messageContainerName): Added.
3644         (WebCore::needsPaginationQuirk): Added.
3645         (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Don't move the message content
3646         div to a new page when using this special printing mode.
3647
3648 2015-02-13  Daniel Bates  <dabates@apple.com>
3649
3650         [iOS] DumpRenderTree.app fails to link due to undefined classes
3651         <rdar://problem/19831228>
3652
3653         Following r179945, DumpRenderTree.app fails to link due to undefined symbols:
3654
3655         Undefined symbols for architecture x86_64:
3656           "_OBJC_CLASS_$_WebEvent", referenced from:
3657               objc-class-ref in libDumpRenderTree.a(EventSendingController.o)
3658           "_OBJC_CLASS_$_WebUndefined", referenced from:
3659               objc-class-ref in libDumpRenderTree.a(ObjCController.o)
3660
3661         We need to export the classes WebScriptObject and WebEvent.
3662
3663         * bindings/objc/WebScriptObject.h:
3664         * platform/ios/WebEvent.h:
3665
3666 2015-02-13  Andreas Kling  <akling@apple.com>
3667
3668         CachedResource::clearLoader() should self-destruct if nothing else retains the CachedResource.
3669         <https://webkit.org/b/141568>
3670         <rdar://problem/19800310>
3671
3672         Reviewed by Antti Koivisto.
3673
3674         Anything that may cause CachedResource::canDelete() to return true must also make sure
3675         to call CachedResource::deleteIfPossible(), or we risk leaking the CachedResource.
3676         This is because CachedResource employs an extremely convoluted lifetime mechanism that
3677         depends on its presence in a number of collections, as well as internal counters and
3678         state.
3679
3680         This is a speculative fix for a potential CachedResource leak that I'm not sure exists
3681         in practice, but let's be good citizens here.
3682
3683         * loader/cache/CachedResource.cpp:
3684         (WebCore::CachedResource::clearLoader):
3685
3686 2015-02-13  Jer Noble  <jer.noble@apple.com>
3687
3688         [MSE][Mac] Crash at WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset + 2357
3689         https://bugs.webkit.org/show_bug.cgi?id=141566
3690         rdar://problem/19826075
3691
3692         Reviewed by Andreas Kling.
3693
3694         Null check m_mediaSource before dereferencing.
3695
3696         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3697         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
3698
3699 2015-02-13  Zalan Bujtas  <zalan@apple.com>
3700
3701         REGRESSION (r174761): Invalid cast in WebCore::lastRubyRun / WebCore::RenderRubyAsBlock::addChild
3702         https://bugs.webkit.org/show_bug.cgi?id=137929
3703         rdar://problem/18723492
3704
3705         Reviewed by Chris Dumez.
3706
3707         Ensure that the child renderer is a RenderRubyRun.
3708
3709         Test: fast/ruby/crash-with-before-after-on-ruby.html
3710
3711         * rendering/RenderRuby.cpp:
3712         (WebCore::lastRubyRun):
3713
3714 2015-02-13  Simon Fraser  <simon.fraser@apple.com>
3715
3716         Crashes under RenderLayer::hitTestLayer under determinePrimarySnapshottedPlugIn()
3717         https://bugs.webkit.org/show_bug.cgi?id=141551
3718
3719         Reviewed by Zalan Bujtas.
3720         
3721         It's possible for a layout to dirty the parent frame's state, via the calls to
3722         ownerElement()->scheduleSetNeedsStyleRecalc() that RenderLayerCompositor does when
3723         iframes toggle their compositing mode.
3724         
3725         That could cause FrameView::updateLayoutAndStyleIfNeededRecursive() to fail to 
3726         leave all the frames in a clean state. Later on, we could enter hit testing,
3727         which calls document().updateLayout() on each frame's document. Document::updateLayout()
3728         does layout on all ancestor documents, so in the middle of hit testing, we could
3729         layout a subframe (dirtying an ancestor frame), then layout another frame, which
3730         would forcing that ancestor to be laid out while we're hit testing it, thus
3731         corrupting the RenderLayer tree while it's being iterated over.
3732         
3733         Fix by having FrameView::updateLayoutAndStyleIfNeededRecursive() do a second
3734         layout after laying out subframes, which most of the time will be a no-op.
3735         
3736         Also add a stronger assertion, that this frame and all subframes are clean
3737         at the end of FrameView::updateLayoutAndStyleIfNeededRecursive() for the
3738         main frame.
3739
3740         Various existing frames tests hit the new assertion if the code change is removed,
3741         so this is covered by existing tests.
3742
3743         * page/FrameView.cpp:
3744         (WebCore::FrameView::needsStyleRecalcOrLayout):
3745         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
3746         * page/FrameView.h:
3747         * rendering/RenderWidget.cpp:
3748         (WebCore::RenderWidget::willBeDestroyed):
3749
3750 2015-02-12  Simon Fraser  <simon.fraser@apple.com>
3751
3752         determinePrimarySnapshottedPlugIn() should only traverse visible Frames
3753         https://bugs.webkit.org/show_bug.cgi?id=141547
3754         Part of rdar://problem/18445733.
3755
3756         Reviewed by Anders Carlsson.
3757
3758         There's an expectation from clients that FrameView::updateLayoutAndStyleIfNeededRecursive()
3759         updates layout in all frames, but it uses the widget tree, so only hits frames
3760         that are parented via renderers (i.e. not display:none frames or their descendants).
3761         
3762         Moving towards a future where we remove Widgets, fix by adding a FrameTree 
3763         traversal function that only finds rendered frames (those with an ownerRenderer).
3764         
3765         Not testable.
3766
3767         * page/FrameTree.cpp:
3768         (WebCore::FrameTree::firstRenderedChild):
3769         (WebCore::FrameTree::nextRenderedSibling):
3770         (WebCore::FrameTree::traverseNextRendered):
3771         (printFrames):
3772         * page/FrameTree.h:
3773         * page/FrameView.cpp:
3774         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
3775
3776 2015-02-13  Alexey Proskuryakov  <ap@apple.com>
3777
3778         TimerBase::m_heapInsertionOrder calculation is racy
3779         https://bugs.webkit.org/show_bug.cgi?id=141554
3780
3781         Reviewed by Anders Carlsson.
3782
3783         Use an atomic increment.
3784
3785         * platform/Timer.cpp: (WebCore::TimerBase::setNextFireTime):
3786
3787 2015-02-13  Andreas Kling  <akling@apple.com>
3788
3789         [iOS] Refine GC behavior in response to process suspension and memory pressure.
3790         <https://webkit.org/b/141543>
3791         <rdar://problem/19738024>
3792
3793         Reviewed by Geoffrey Garen.
3794
3795         Do an immediate full garbage collection when the web process is about to
3796         be suspended (when another tab is moving to the foreground on iOS.)
3797         This ensures that we make a best effort to reduce the process footprint
3798         before we lose the ability to execute code.
3799
3800         When receiving a memory pressure warning, tell the garbage collector to
3801         accelerate its next collection (by calling garbageCollectSoon().)
3802         This gives us some confidence that a collection will happen within a
3803         reasonable timeframe, but doesn't risk dooming us to a loop of endless
3804         garbage collections.
3805
3806         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3807         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3808
3809 2015-02-13  Antti Koivisto  <antti@apple.com>
3810
3811         Add some RELEASE_ASSERTs to try to catch crashes in StyleResolver::loadPendingImages
3812         https://bugs.webkit.org/show_bug.cgi?id=141561
3813
3814         Reviewed by Simon Fraser.
3815
3816         One possibility is that loads triggered by loadPendingImages end up synchronously destroying or re-entering
3817         style resolver. Try to catch these in release builds.
3818
3819         * css/StyleResolver.cpp:
3820         (WebCore::StyleResolver::~StyleResolver):
3821         (WebCore::StyleResolver::styleForElement):
3822         (WebCore::StyleResolver::styleForKeyframe):
3823         (WebCore::StyleResolver::styleForPage):
3824         (WebCore::StyleResolver::loadPendingImages):
3825         * css/StyleResolver.h:
3826
3827 2015-02-13  ChangSeok Oh  <changseok.oh@collabora.com>
3828
3829         Div having contentEditable and display:grid cannot be edited if it is empty.
3830         https://bugs.webkit.org/show_bug.cgi?id=141465
3831
3832         Reviewed by Ryosuke Niwa.
3833
3834         This bug is quite similar to webkit.org/b/141218. RenderGrid should be also treated as a candidate
3835         for visible position as like RenderFlexibleBox. The only different situation between them is
3836         that RenderGrid has a bug setting "0px" for logicalHeight when it is empty. RenderGrid should also have
3837         a minimum height of a single line if it is editable as well as RenderFlexibleBox does.
3838
3839         Test: fast/events/key-events-in-editable-gridbox.html
3840
3841         * dom/Position.cpp:
3842         (WebCore::Position::isCandidate):
3843         (WebCore::Position::isRenderedCharacter):
3844         * rendering/RenderGrid.cpp:
3845         (WebCore::RenderGrid::layoutGridItems):
3846
3847 2015-02-12  Zalan Bujtas  <zalan@apple.com>
3848
3849         REGRESSION (r176262): Invalid cast in WebCore`WebCore::RootInlineBox::selectionTop
3850         https://bugs.webkit.org/show_bug.cgi?id=138992
3851
3852         Reviewed by Dave Hyatt.
3853
3854         RenderRubyText requires the ancestor chain to be (RenderRubyAsInline | RenderRubyAsBlock) -> RenderRubyRun -> RenderRubyText.
3855         This patch ensures that we create RenderRubyText for an <rt> element only when
3856         the expected ancestor chain is guaranteed.
3857
3858         Test: fast/ruby/crash-when-ruby-is-set-to-inline-block.html
3859
3860         * rendering/RenderElement.cpp:
3861         (WebCore::RenderElement::createFor): treat inline-block <ruby> as block.
3862         * rendering/RenderObject.h:
3863         (WebCore::RenderObject::isRubyInline):
3864         (WebCore::RenderObject::isRubyBlock):
3865         (WebCore::RenderObject::isRuby): Deleted.
3866         * rendering/RenderRuby.cpp:
3867         (WebCore::isAnonymousRubyInlineBlock):
3868         * rendering/RenderRuby.h: add support for is<RenderRubyAsBlock>(renderer) and for is<RenderRubyAsInline>(renderer)
3869         The isRuby() method does not follow the is*() -> maps to one class pattern.
3870         (WebCore::isRuby):
3871         * rendering/RenderRubyRun.cpp:
3872         (WebCore::RenderRubyRun::addChild):
3873         (WebCore::RenderRubyRun::staticCreateRubyRun):
3874
3875 2015-02-13  Csaba Osztrogonac  <ossy@webkit.org>
3876
3877         Fix the gperf related build issue on the WinCairo bot
3878         https://bugs.webkit.org/show_bug.cgi?id=141507
3879
3880         Reviewed by Alex Christensen.
3881
3882         * platform/ColorData.gperf: Modified property svn:eol-style.
3883
3884 2015-02-13  Csaba Osztrogonác  <ossy@webkit.org>
3885
3886         Unreviewed, remove empty directories.
3887
3888         * loader/icon/wince: Removed.
3889         * platform/graphics/wince: Removed.
3890         * storage/wince: Removed.
3891
3892 2015-02-12  Timothy Horton  <timothy_horton@apple.com>
3893
3894         Crashes under detectItemAroundHitTestResult when DataDetectors is not available
3895         https://bugs.webkit.org/show_bug.cgi?id=141549
3896         <rdar://problem/19180955>
3897
3898         Reviewed by Dan Bernstein.
3899
3900         * editing/mac/DataDetection.mm:
3901         (WebCore::DataDetection::detectItemAroundHitTestResult):
3902         Bail out from data detection if either of the relevant frameworks aren't loaded.
3903
3904 2015-02-12  Dean Jackson  <dino@apple.com>
3905
3906         [iOS Media] Audio should hide timeline scrubber until playback starts
3907         https://bugs.webkit.org/show_bug.cgi?id=141542
3908         <rdar://problem/19820685>
3909
3910         Reviewed by Eric Carlson.
3911
3912         We regressed from the system behaviour in iOS 7, where the timeline
3913         scrubber for an audio element is not shown until the user starts
3914         playback.
3915
3916         * Modules/mediacontrols/mediaControlsiOS.css:
3917         (video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
3918         (audio::-webkit-media-controls-status-display): Add the style for the status display.
3919         * Modules/mediacontrols/mediaControlsiOS.js:
3920         (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
3921         (ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
3922         (ControllerIOS.prototype.setPlaying): Unhide the timeline.
3923
3924 2015-02-12  Chris Dumez  <cdumez@apple.com>
3925
3926         Drop the quirks-mode exception for CSS MIME types
3927         https://bugs.webkit.org/show_bug.cgi?id=141501
3928
3929         Reviewed by Alexey Proskuryakov.
3930
3931         Drop the quirks-mode exception for CSS MIME types.
3932         This matches Firefox's behavior.
3933
3934         This patch is based on the following Blink revision:
3935         http://src.chromium.org/viewvc/blink?view=revision&revision=189669
3936
3937         Tests:
3938         - http/tests/misc/css-accept-any-type.html
3939         - http/tests/security/cross-origin-css.html
3940
3941         * css/StyleSheetContents.cpp:
3942         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
3943         * dom/ProcessingInstruction.cpp:
3944         (WebCore::ProcessingInstruction::setCSSStyleSheet):
3945         * inspector/InspectorPageAgent.cpp:
3946         (WebCore::InspectorPageAgent::cachedResourceContent):
3947         * loader/cache/CachedCSSStyleSheet.cpp:
3948         (WebCore::CachedCSSStyleSheet::sheetText):
3949         (WebCore::CachedCSSStyleSheet::canUseSheet):
3950         * loader/cache/CachedCSSStyleSheet.h:
3951
3952 2015-02-12  Beth Dakin  <bdakin@apple.com>
3953
3954         REGRESSION: Should not send wheel events with a delta of 0
3955         https://bugs.webkit.org/show_bug.cgi?id=141537
3956         -and corresponding-
3957         rdar://problem/18903118
3958
3959         Reviewed by Simon Fraser.
3960
3961         This code should not have been removed entirely to accommodate rubber-banding, it 
3962         just needs to return false instead of true in order to allow the MayBegin and 
3963         Ended phases to be handled by the ElasticityController.
3964         * dom/Element.cpp:
3965         (WebCore::Element::dispatchWheelEvent):
3966
3967 2015-02-12  Dean Jackson  <dino@apple.com>
3968
3969         [iOS Media] Implement 3-style media timeline (buffered, played, unavailable)
3970         https://bugs.webkit.org/show_bug.cgi?id=141526
3971         <rdar://problem/19603337>
3972
3973         Reviewed by Eric Carlson and Antoine Quint.
3974
3975         Implement a 3-style media scrubber for iOS. This draws white for
3976         the region that has been played (before the playhead), black
3977         for the region that is buffered, and is hollow for the rest.
3978
3979         * Modules/mediacontrols/mediaControlsApple.js:
3980         (Controller.prototype.updateProgress): Update progress is now completely
3981         shared between OS X and iOS. This calls the implementation specific
3982         drawTimelineBackground.
3983         (Controller.prototype.drawTimelineBackground): Move the OS X code to here.
3984         * Modules/mediacontrols/mediaControlsiOS.css:
3985         (audio::-webkit-media-controls-timeline): New styles for the timeline. Updated thumb image, etc.
3986         (video::-webkit-media-controls-timeline::-webkit-slider-runnable-track):
3987         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
3988         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb:active):
3989         (video::-webkit-media-controls-time-remaining-display):
3990         * Modules/mediacontrols/mediaControlsiOS.js:
3991         (ControllerIOS): Create a globally unique canvas context name in the constructor.
3992         (ControllerIOS.prototype.createControls): Set the background of the timeline to a canvas.
3993         (ControllerIOS.prototype.addRoundedRect): Helper function.
3994         (ControllerIOS.prototype.drawTimelineBackground): Draw the 3-style content.
3995         (ControllerIOS.prototype.updateProgress): Deleted.
3996
3997 2015-02-12  Daniel Bates  <dabates@apple.com>
3998
3999         Fix some Mac linker warnings
4000         https://bugs.webkit.org/show_bug.cgi?id=141522
4001
4002         Reviewed by Alex Christensen.
4003
4004         Following <https://trac.webkit.org/changeset/179945>, the linker warns about the following hidden WebCore symbols:
4005         
4006         ld: warning: cannot export hidden symbol __ZN7WebCore20LogNotYetImplementedE from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/Logging.o
4007         ld: warning: cannot export hidden symbol _wkCreateURLPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
4008         ld: warning: cannot export hidden symbol _wkCreateURLNPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_