platform/mac/editing/input/devanagari-ligature.html is flaky on Yosemite, ligature...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-12-23  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         platform/mac/editing/input/devanagari-ligature.html is flaky on Yosemite, ligature fails to form
4         https://bugs.webkit.org/show_bug.cgi?id=138683
5
6         Reviewed by Darin Adler.
7
8         This patch changes how we check fonts for equality. In particular, this patch adds a
9         objectForEqualityCheck() to Cocoa's FontPlatformData, and callers should pass this object
10         to CFEqual() to determine if two platform fonts are equal. This patch also migrates all
11         call sites to using this function.
12
13         I don't want to implement operator==() because there are many cases where the same font
14         is compared against many others, and this solution is cleaner than caching a comparison
15         object inside the font object itself.
16
17         No new tests because this is covered by platform/mac/editing/input/devanagari-ligature.html.
18
19         * platform/graphics/FontPlatformData.h:
20         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
21         (WebCore::FontPlatformData::objectForEqualityCheck):
22         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
23         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
24         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
25         (WebCore::GlyphPage::fill):
26         * platform/graphics/mac/SimpleFontDataMac.mm:
27         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
28         * platform/spi/cocoa/CoreTextSPI.h:
29
30 2014-12-23  Myles C. Maxfield  <mmaxfield@apple.com>
31
32         [SVG -> OTF Converter] Make Placeholder a move-only type
33         https://bugs.webkit.org/show_bug.cgi?id=139870
34
35         Reviewed by Anders Carlsson.
36
37         No new tests because there is no behavior change.
38
39         * svg/SVGToOTFFontConversion.cpp:
40         (WebCore::SVGToOTFFontConverter::Placeholder::Placeholder):
41         (WebCore::SVGToOTFFontConverter::Placeholder::populate):
42         (WebCore::SVGToOTFFontConverter::Placeholder::~Placeholder):
43
44 2014-12-23  Chris Dumez  <cdumez@apple.com>
45
46         Move color CSS properties to the new StyleBuilder
47         https://bugs.webkit.org/show_bug.cgi?id=139898
48
49         Reviewed by Antti Koivisto.
50
51         Move color CSS properties to the new StyleBuilder by teaching the
52         StyleBuilder generator how to handle them.
53
54         * css/CSSPropertyNames.in:
55         - Move color properties to the new StyleBuilder.
56
57         * css/DeprecatedStyleBuilder.cpp:
58         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
59         (WebCore::defaultInitialColor): Deleted.
60         (WebCore::ApplyPropertyColor::applyInheritValue): Deleted.
61         (WebCore::ApplyPropertyColor::applyInitialValue): Deleted.
62         (WebCore::ApplyPropertyColor::applyValue): Deleted.
63         (WebCore::ApplyPropertyColor::applyColorValue): Deleted.
64         (WebCore::ApplyPropertyColor::createHandler): Deleted.
65         - Drop color properties support from the DeprecatedStyleBuilder.
66
67         * css/makeprop.pl:
68         - Teach the StyleBuilder generator how to handle color properties.
69         - Use a class for StyleBuilderFunctions instead of a namespace so
70           that it can be made a friend of RenderStyle class.
71
72         * rendering/style/RenderStyle.h:
73         - Mark StyleBuilderFunctions class as friend as its functions
74           can set RenderStyle members directly. This is similar to what
75           is already done for StyleBuilderCustom class. The new color
76           properties handling calls private methods on RenderStyle.
77         - Mark invalidColor() method as static as it does not require
78           an instance.
79
80 2014-12-23  Zalan Bujtas  <zalan@apple.com>
81
82         Incorrect dashed and dotted border painting.
83         https://bugs.webkit.org/show_bug.cgi?id=139872
84         rdar://problem/18024205
85
86         Reviewed by Simon Fraser.
87
88         This patch makes dashed/dotted border painting symmetric and consistent.
89         It also works with subpixel positioning.
90
91         Tests: fast/borders/border-painting-correctness-dashed.html
92                fast/borders/border-painting-correctness-dotted.html
93
94         * platform/graphics/cg/GraphicsContextCG.cpp:
95         (WebCore::GraphicsContext::drawLine):
96         * rendering/RenderObject.cpp:
97         (WebCore::RenderObject::drawLineForBoxSide):
98
99 2014-12-22  Chris Dumez  <cdumez@apple.com>
100
101         [iOS] Log which type of resources are commonly loaded using FeatureCounter
102         https://bugs.webkit.org/show_bug.cgi?id=139890
103
104         Reviewed by Darin Adler.
105
106         Log which type of resources are commonly loaded using FeatureCounter
107         (e.g. stylesheets, scripts, fonts, images, ...).
108
109         * loader/SubresourceLoader.cpp:
110         (WebCore::logResourceLoadedUsingFeatureCounter):
111         (WebCore::SubresourceLoader::didFinishLoading):
112         * platform/FeatureCounterKeys.h:
113
114 2014-12-22  Chris Dumez  <cdumez@apple.com>
115
116         [iOS] Log using FeatureCounter when a PacheCache fails due to memory pressure
117         https://bugs.webkit.org/show_bug.cgi?id=139874
118         <rdar://problem/19255690>
119
120         Reviewed by Darin Adler.
121
122         Log using FeatureCounter when a PacheCache fails due to memory
123         pressure. To detect this, a flag is added to HistoryItem to mark
124         items that are no longer in the page becaused they were pruned
125         (either because of a low memory handling or because the page cache
126         reached its maximum capacity).
127
128         * history/HistoryItem.cpp:
129         (WebCore::HistoryItem::HistoryItem):
130         * history/HistoryItem.h:
131         * history/PageCache.cpp:
132         (WebCore::PageCache::add):
133         (WebCore::PageCache::take):
134         (WebCore::PageCache::get):
135         (WebCore::PageCache::prune):
136         * platform/FeatureCounterKeys.h:
137
138 2014-12-22  Commit Queue  <commit-queue@webkit.org>
139
140         Unreviewed, rolling out r177658.
141         https://bugs.webkit.org/show_bug.cgi?id=139900
142
143         Caused many assertion failures (Requested by ap on #webkit).
144
145         Reverted changeset:
146
147         "Incorrect dashed and dotted border painting."
148         https://bugs.webkit.org/show_bug.cgi?id=139872
149         http://trac.webkit.org/changeset/177658
150
151 2014-12-22  Jaehun Lim  <ljaehun.lim@samsung.com>
152
153         Unreviewed build fix after r177661 and r177662
154
155         * dom/SecurityOriginPolicy.cpp: Modify #include path.
156
157 2014-12-22  Mark Rowe  <mrowe@apple.com>
158
159         [Mac] Engineering builds of WebCore on OS X 10.8 and 10.9 shouldn't build with -gline-tables-only
160         <https://webkit.org/b/139883> / <rdar://problem/19297261>
161
162         Reviewed by Alexey Proskuryakov.
163
164         * Configurations/DebugRelease.xcconfig: Override the setting using conditional settings
165         so that they take precedence over the conditional settings in Base.xcconfig.
166
167 2014-12-22  Alexey Proskuryakov  <ap@apple.com>
168
169         Unreviewed build fix.
170
171         * WebCore.exp.in: Move SQLiteDatabaseTracker::setClient export out of PLATFORM(IOS) section.
172
173 2014-12-22  Anders Carlsson  <andersca@apple.com>
174
175         Remove two functions from SecurityOrigin
176         https://bugs.webkit.org/show_bug.cgi?id=139885
177
178         Reviewed by Andreas Kling.
179
180         * page/SecurityOrigin.h:
181         (WebCore::SecurityOrigin::canAccessPasswordManager): Deleted.
182         (WebCore::SecurityOrigin::canAccessFileSystem): Deleted.
183
184 2014-12-22  Chris Dumez  <cdumez@apple.com>
185
186         [iOS] Log using FeatureCounter user-triggered zooming
187         https://bugs.webkit.org/show_bug.cgi?id=139879
188         <rdar://problem/19329130>
189
190         Reviewed by Benjamin Poulain.
191
192         Log using FeatureCounter user-triggered zooming on iOS.
193
194         * WebCore.exp.in:
195         * WebCore.xcodeproj/project.pbxproj:
196         * platform/FeatureCounter.h:
197         * platform/FeatureCounterKeys.h:
198
199 2014-12-22  Benjamin Poulain  <bpoulain@apple.com>
200
201         Form elements should match :valid and :invalid based on their associated elements
202         https://bugs.webkit.org/show_bug.cgi?id=139850
203
204         Reviewed by Darin Adler.
205
206         In the latest HTML spec, form elements can match :valid or :invalid based
207         on their associated element.
208
209         The tricky part is that object lifetime is a mess. When elements are associated
210         with forms by the parser, the form is set by the constructor of HTMLFormControlElement.
211         At that point, the real object has not been initialized yet which
212         makes it impossible to find its validity.
213
214         To work around the lifetime problem, the code of HTMLFormControlElement::didChangeForm()
215         uses m_willValidateInitialized and m_willValidate direclty instead
216         of invoking willValidate(). That way we don't try to validate an incomplete object.
217
218         When the object really validates, HTMLFormControlElement::setNeedsWillValidateCheck()
219         takes care of updating the form.
220
221         Tests: fast/css/pseudo-invalid-form-and-fieldset-basics.html
222                fast/css/pseudo-invalid-form-basics.html
223                fast/css/pseudo-invalid-form-dynamically-created-basics.html
224                fast/css/pseudo-invalid-form-invalidation-optimization.html
225                fast/css/pseudo-valid-form-and-fieldset-basics.html
226                fast/css/pseudo-valid-form-basics.html
227                fast/css/pseudo-valid-form-dynamically-created-basics.html
228                fast/css/pseudo-valid-form-invalidation-optimization.html
229                fast/selectors/invalid-form-style-update-1.html
230                fast/selectors/invalid-form-style-update-2.html
231                fast/selectors/invalid-form-style-update-3.html
232                fast/selectors/valid-form-style-update-1.html
233                fast/selectors/valid-form-style-update-2.html
234                fast/selectors/valid-form-style-update-3.html
235
236         * css/StyleResolver.cpp:
237         (WebCore::StyleResolver::canShareStyleWithControl):
238         (WebCore::StyleResolver::canShareStyleWithElement):
239         HTMLFormElement is not a FormControl, we have to generalize the test
240         for :valid/:invalid with style sharing.
241
242         * html/HTMLFormControlElement.cpp:
243         (WebCore::HTMLFormControlElement::~HTMLFormControlElement):
244         Since we now have willChangeForm(), didChangeForm(), we have to null
245         the form ourself, as documented by FormAssociatedElement.
246
247         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
248         (WebCore::HTMLFormControlElement::willChangeForm):
249         (WebCore::HTMLFormControlElement::didChangeForm):
250         (WebCore::HTMLFormControlElement::updateValidity):
251         Update the owner form when any of the associated form element changes
252         to invalid.
253
254         * html/HTMLFormControlElement.h:
255         * html/HTMLFormElement.cpp:
256         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
257         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
258         (WebCore::HTMLFormElement::matchesValidPseudoClass):
259         (WebCore::HTMLFormElement::matchesInvalidPseudoClass):
260         This is very similar to the code of fieldset, but we have much weaker
261         invariants due to the insane way FormAssociatedElement initializes.
262
263         * html/HTMLFormElement.h:
264         * html/HTMLInputElement.cpp:
265         (WebCore::HTMLInputElement::initializeInputType):
266         For completeness, we should always validate when changing the type.
267         The code was only doing that when the element was inserted into the tree,
268         that was too fragile.
269
270 2014-12-22  Anders Carlsson  <andersca@apple.com>
271
272         Try to fix the Windows build.
273
274         * dom/DOMAllInOne.cpp:
275
276 2014-12-22  Anders Carlsson  <andersca@apple.com>
277
278         Add a SecurityOriginPolicy class
279         https://bugs.webkit.org/show_bug.cgi?id=139875
280
281         Reviewed by Sam Weinig.
282
283         This is the first step towards making SecurityOrigin immutable. SecurityOriginPolicy will hold a
284         SecurityOrigin and will handle things that would otherwise mutate SecurityOrigin.
285
286         * CMakeLists.txt:
287         * WebCore.exp.in:
288         * WebCore.vcxproj/WebCore.vcxproj:
289         * WebCore.vcxproj/WebCore.vcxproj.filters:
290         * WebCore.xcodeproj/project.pbxproj:
291         * dom/DOMImplementation.cpp:
292         (WebCore::DOMImplementation::createDocument):
293         (WebCore::DOMImplementation::createHTMLDocument):
294         * dom/Document.cpp:
295         (WebCore::Document::create):
296         (WebCore::Document::open):
297         (WebCore::Document::cloneDataFromDocument):
298         (WebCore::Document::initSecurityContext):
299         * dom/ScriptExecutionContext.h:
300         * dom/SecurityContext.cpp:
301         (WebCore::SecurityContext::setSecurityOriginPolicy):
302         (WebCore::SecurityContext::securityOrigin):
303         (WebCore::SecurityContext::isSecureTransitionTo):
304         (WebCore::SecurityContext::enforceSandboxFlags):
305         (WebCore::SecurityContext::setSecurityOrigin): Deleted.
306         * dom/SecurityContext.h:
307         (WebCore::SecurityContext::securityOriginPolicy):
308         (WebCore::SecurityContext::securityOrigin): Deleted.
309         * dom/SecurityOriginPolicy.cpp: Added.
310         (WebCore::SecurityOriginPolicy::create):
311         (WebCore::SecurityOriginPolicy::SecurityOriginPolicy):
312         (WebCore::SecurityOriginPolicy::~SecurityOriginPolicy):
313         * dom/SecurityOriginPolicy.h: Added.
314         (WebCore::SecurityOriginPolicy::origin):
315         * loader/DocumentWriter.cpp:
316         (WebCore::DocumentWriter::begin):
317         * workers/WorkerGlobalScope.cpp:
318         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
319         * xml/XMLHttpRequest.cpp:
320         (WebCore::XMLHttpRequest::responseXML):
321         * xml/XMLTreeViewer.cpp:
322         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
323         * xml/XSLTProcessor.cpp:
324         (WebCore::XSLTProcessor::createDocumentFromSource):
325
326 2014-12-22  Zalan Bujtas  <zalan@apple.com>
327
328         Incorrect dashed and dotted border painting.
329         https://bugs.webkit.org/show_bug.cgi?id=139872
330         rdar://problem/18024205
331
332         Reviewed by Simon Fraser.
333
334         This patch makes dashed/dotted border painting symmetric and consistent.
335         It also works with subpixel positioning.
336
337         Tests: fast/borders/border-painting-correctness-dashed.html
338                fast/borders/border-painting-correctness-dotted.html
339
340         * platform/graphics/cg/GraphicsContextCG.cpp:
341         (WebCore::GraphicsContext::drawLine):
342         * rendering/RenderObject.cpp:
343         (WebCore::RenderObject::drawLineForBoxSide):
344
345 2014-12-22  Timothy Horton  <timothy_horton@apple.com>
346
347         TextIndicatorWindow is larger than it needs to be, especially when not bouncing
348         https://bugs.webkit.org/show_bug.cgi?id=139876
349         <rdar://problem/19311017>
350
351         Reviewed by Sam Weinig.
352
353         * page/TextIndicator.cpp:
354         (WebCore::TextIndicator::wantsBounce):
355         (WebCore::TextIndicator::wantsContentCrossfade):
356         (WebCore::TextIndicator::wantsFadeIn):
357         * page/TextIndicator.h:
358         * page/mac/TextIndicatorWindow.mm:
359         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
360         (-[WebTextIndicatorView _animationDuration]):
361         (-[WebTextIndicatorView present]):
362         (WebCore::TextIndicatorWindow::setTextIndicator):
363         (-[WebTextIndicatorView _textIndicatorWantsBounce]): Deleted.
364         (-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]): Deleted.
365         (-[WebTextIndicatorView _textIndicatorWantsFadeIn]): Deleted.
366         Move the various switches over TextIndicatorPresentationTransition into TextIndicator.
367         Adjust the margin; only inflate by the shadow if we're not bouncing.
368         If we are bouncing, fix the math to more tightly fit the bounce.
369         Previously we were inflating by way too much, and even when we didn't need to.
370
371 2014-12-22  Chris Dumez  <cdumez@apple.com>
372
373         [iOS] Log using FeatureCounter when a PacheCache entry is not reused because it expired
374         https://bugs.webkit.org/show_bug.cgi?id=139869
375         <rdar://problem/19255690>
376
377         Reviewed by Darin Adler.
378
379         Log using FeatureCounter when a PacheCache entry is not reused because
380         it expired.
381
382         * history/PageCache.cpp:
383         (WebCore::PageCache::take):
384         (WebCore::PageCache::get):
385         * history/PageCache.h:
386         * loader/FrameLoader.cpp:
387         (WebCore::FrameLoader::commitProvisionalLoad):
388         (WebCore::FrameLoader::loadDifferentDocumentItem):
389         * loader/HistoryController.cpp:
390         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
391         * platform/FeatureCounterKeys.h:
392
393 2014-12-22  Antti Koivisto  <antti@apple.com>
394
395         Try to fix the windows build.
396
397         * platform/graphics/win/SimpleFontDataCGWin.cpp:
398
399 2014-12-22  Timothy Horton  <timothy_horton@apple.com>
400
401         Adjust TextIndicator shadow parameters
402         https://bugs.webkit.org/show_bug.cgi?id=139871
403         <rdar://problem/19283300>
404
405         Reviewed by Sam Weinig.
406
407         * page/mac/TextIndicatorWindow.mm:
408         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
409         Slightly adjust the shadow and bounce size.
410
411 2014-12-22  Chris Dumez  <cdumez@apple.com>
412
413         Consistently use "FeatureCounter*Key" naming for FeatureCounter keys
414         https://bugs.webkit.org/show_bug.cgi?id=139867
415
416         Reviewed by Darin Adler.
417
418         Consistently use "FeatureCounter*Key" naming for FeatureCounter keys.
419
420         * loader/FrameLoader.cpp:
421         (WebCore::logNavigationWithFeatureCounter):
422         * platform/FeatureCounterKeys.h:
423
424 2014-12-22  Antti Koivisto  <antti@apple.com>
425
426         Generic font code should not know about SVG font missing glyph
427         https://bugs.webkit.org/show_bug.cgi?id=139864
428
429         Reviewed by Andreas Kling and Myles Maxfield.
430
431         The defined missing glyph is an SVG font concept and should be handled in SVG code.
432
433         * platform/graphics/FontGlyphs.cpp:
434         (WebCore::FontGlyphs::glyphDataForSystemFallback):
435         (WebCore::FontGlyphs::glyphDataForVariant):
436
437             Return null glyph instead of the missing glyph (the missing glyph was already a null glyph in all non-svg-font cases).
438             Use early return style.
439
440         * platform/graphics/FontGlyphs.h:
441         * platform/graphics/SegmentedFontData.cpp:
442         * platform/graphics/SimpleFontData.cpp:
443         (WebCore::SimpleFontData::platformGlyphInit):
444         * platform/graphics/SimpleFontData.h:
445
446             Remove the missingGlyph member.
447
448         * platform/graphics/WidthIterator.cpp:
449         (WebCore::WidthIterator::advanceInternal):
450
451             Explicitly skip over null glyphs. Before they had non-null fontData and would get skipped implicitly.
452
453         * platform/graphics/mac/SimpleFontDataMac.mm:
454         * rendering/svg/SVGTextRunRenderingContext.cpp:
455         (WebCore::missingGlyphForFont):
456
457             Get the missing glyph from the SVG font element.
458
459         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
460
461             Return the missing glyph if the normal lookup didn't produce results.
462
463         * svg/SVGFontData.cpp:
464         (WebCore::SVGFontData::initializeFontData):
465
466 2014-12-22  Chris Dumez  <cdumez@apple.com>
467
468         Move "Auto" CSS properties to the new StyleBuilder
469         https://bugs.webkit.org/show_bug.cgi?id=139858
470
471         Reviewed by Antti Koivisto.
472
473         Move "Auto" CSS properties from DeprecatedStyleBuilder to the new
474         StyleBuilder, by adding support in the generator for using hasAutoXXX()
475         / setHasAutoXXX() methods on RenderStyle.
476
477         No new tests, no web-exposed behavior change.
478
479         * css/CSSPropertyNames.in:
480         * css/DeprecatedStyleBuilder.cpp:
481         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
482         (WebCore::ApplyPropertyAuto::setValue): Deleted.
483         (WebCore::ApplyPropertyAuto::value): Deleted.
484         (WebCore::ApplyPropertyAuto::hasAuto): Deleted.
485         (WebCore::ApplyPropertyAuto::setAuto): Deleted.
486         (WebCore::ApplyPropertyAuto::applyInheritValue): Deleted.
487         (WebCore::ApplyPropertyAuto::applyInitialValue): Deleted.
488         (WebCore::ApplyPropertyAuto::applyValue): Deleted.
489         (WebCore::ApplyPropertyAuto::createHandler): Deleted.
490         * css/StyleBuilderCustom.h:
491         (WebCore::StyleBuilderCustom::applyInitialColumnGap):
492         (WebCore::StyleBuilderCustom::applyInheritColumnGap):
493         (WebCore::StyleBuilderCustom::applyValueColumnGap):
494         * css/makeprop.pl:
495         (getNameForMethods):
496         (getAutoGetter):
497         (getAutoSetter):
498         (generateInitialValueSetter):
499         (generateInheritValueSetter):
500         (generateValueSetter):
501
502 2014-12-21  Shivakumar JM  <shiva.jm@samsung.com>
503
504         HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement).
505         https://bugs.webkit.org/show_bug.cgi?id=139806
506
507         Reviewed by Darin Adler.
508
509         HTMLSelectElement add() should support adding group of options (optgroup) element.
510
511         Test: fast/dom/HTMLSelectElement/select-add-optgroup.html
512
513         * html/HTMLSelectElement.cpp:
514         (WebCore::HTMLSelectElement::add):
515
516 2014-12-21  Chris Dumez  <cdumez@apple.com>
517
518         Fix missing assertion in r177623.
519         https://bugs.webkit.org/show_bug.cgi?id=139334
520
521         Reviewed by Darin Adler.
522
523         ValueWithCalculation::setCalculation() was meant to include an
524         "isCalculation()" assertion but I inadvertently omitted the
525         ASSERT() around the statement.
526
527         * css/CSSParser.h:
528         (WebCore::CSSParser::ValueWithCalculation::setCalculation):
529
530 2014-12-21  Gabor Rapcsanyi  <rgabor@webkit.org>
531
532         AX: Hidden aria table crash
533         https://bugs.webkit.org/show_bug.cgi?id=139856
534
535         Reviewed by Chris Fleizach.
536
537         Change axCaption to pointer and check it's value because
538         AXObjectCache::getOrCreate() can return with nullptr.
539
540         Test: accessibility/aria-hidden-crash.html
541
542         * accessibility/AccessibilityTable.cpp:
543         (WebCore::AccessibilityTable::addChildren):
544
545 2014-12-20  Chris Dumez  <cdumez@apple.com>
546
547         Get rid of error-prone ReleaseParsedCalcValueCondition argument in CSSParser
548         https://bugs.webkit.org/show_bug.cgi?id=139334
549
550         Reviewed by Darin Adler.
551
552         Get rid of error-prone ReleaseParsedCalcValueCondition argument in
553         CSSParser that determines the the m_parsedCalculation member should
554         be released.
555
556         Instead, introduce a new ValueWithCalculation type which wraps a
557         CSSParserValue and an optional parsed calculation value. This way,
558         the parsed calculation value is now associated with its CSSParserValue.
559         This makes it very difficult to use a parsed calculation value for the
560         wrong CSSParserValue. The API is also easier to use as developers no
561         longer need to explicitly indicate if the calculation value should be
562         released or not.
563
564         No new tests, no web-behavior change.
565
566 2014-12-20  Eric Carlson  <eric.carlson@apple.com>
567
568         [iOS] add optimized fullscreen API
569         https://bugs.webkit.org/show_bug.cgi?id=139833
570         <rdar://problem/18844486>
571
572         Reviewed by Simon Fraser.
573
574         * Configurations/FeatureDefines.xcconfig: Add ENABLE_VIDEO_PRESENTATION_MODE.
575
576         * Modules/mediacontrols/MediaControlsHost.cpp:
577         (WebCore::MediaControlsHost::optimizedFullscreenSupported): Deleted.
578         (WebCore::MediaControlsHost::fullscreenMode): Deleted.
579         * Modules/mediacontrols/MediaControlsHost.h:
580         * Modules/mediacontrols/MediaControlsHost.idl:
581
582         * Modules/mediacontrols/mediaControlsiOS.js:
583         (ControllerIOS.prototype.addVideoListeners): Listen for 'webkitpresentationmodechanged'.
584         (ControllerIOS.prototype.removeVideoListeners): Stop listening for 'webkitpresentationmodechanged'.
585         (ControllerIOS.prototype.configureInlineControls): Call video element instead of using the now 
586             removed host property.
587         (ControllerIOS.prototype.updateControls): Ditto.
588         (ControllerIOS.prototype.presentationMode): New, return webkitPresentationMode when possible.
589         (ControllerIOS.prototype.handleFullscreenButtonClicked): Use webkitSetPresentationMode when possible.
590         (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): Use video element instead of 
591             using the now removed host method.
592         (ControllerIOS.prototype.handlePresentationModeChange): New, react to presentation mode changes.
593         (ControllerIOS.prototype.handleFullscreenChange): Call handlePresentationModeChange.
594
595         * dom/EventNames.h: Add webkitpresentationmodechanged.
596
597         * html/HTMLAttributeNames.in: Add onwebkitpresentationmodechanged.
598
599         * html/HTMLMediaElement.cpp:
600         (WebCore::HTMLMediaElement::enterFullscreen): Early return when asked to change to the current 
601             mode. Call fullscreenModeChanged() instead of whacking the instance variable directly.
602         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
603         * html/HTMLMediaElement.h:
604         (WebCore::HTMLMediaElement::fullscreenModeChanged): Make virtual.
605
606         * html/HTMLVideoElement.cpp:
607         (WebCore::HTMLVideoElement::parseAttribute): Deal with onwebkitpresentationmodechange.
608         (WebCore::presentationModeFullscreen): New.
609         (WebCore::presentationModeOptimized): Ditto.
610         (WebCore::presentationModeInline): Ditto.
611         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Ditto.
612         (WebCore::HTMLVideoElement::webkitSetPresentationMode): Ditto.
613         (WebCore::HTMLVideoElement::webkitPresentationMode): Ditto.
614         (WebCore::HTMLVideoElement::fullscreenModeChanged): Ditto.
615         * html/HTMLVideoElement.h:
616         * html/HTMLVideoElement.idl:
617
618         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
619         (WebVideoFullscreenInterfaceAVKit::setIsOptimized): Simplify the logic a bit. Don't report
620             a mode change when 
621
622 2014-12-20  David Kilzer  <ddkilzer@apple.com>
623
624         Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
625         <http://webkit.org/b/139463>
626
627         Reviewed by Mark Rowe.
628
629         Also remove all uses of SQLITE3_HEADER_SEARCH_PATHS and
630         WEBCORE_SQLITE3_HEADER_SEARCH_PATHS which were phased out in
631         r132859 and needed for Leopard.
632
633         * Configurations/Base.xcconfig:
634         - Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
635           on OS X.
636         - Set GCC_OPTIMIZATION_LEVEL_normal based on SDK.
637         - Simplify SQLITE3_HEADER_SEARCH_PATHS.
638         * Configurations/DebugRelease.xcconfig:
639         - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
640         * Configurations/Version.xcconfig:
641         - Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
642         * Configurations/WebCore.xcconfig:
643         - Set EXPORTED_SYMBOLS_FILE_i386, EXPORTED_SYMBOLS_FILE_x86_64,
644           FRAMEWORK_SEARCH_PATHS, INSTALL_PATH, DYLIB_INSTALL_NAME_BASE,
645           OTHER_LDFLAGS, SECTORDER_FLAGS, NORMAL_WEBCORE_FRAMEWORKS_DIR,
646           WEBCORE_FRAMEWORKS_DIR, NORMAL_PRODUCTION_FRAMEWORKS_DIR,
647           PRODUCTION_FRAMEWORKS_DIR,
648           JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production and
649           EXCLUDED_SOURCE_FILE_NAMES based on SDK.
650         - Make sure DYLIB_INSTALL_NAME_BASE and OTHER_LDFLAGS are
651           overrideable by WebCoreTestSupport.xcconfig.
652         * Configurations/WebCoreTestSupport.xcconfig:
653         - Set PRIVATE_HEADERS_FOLDER_PATH_Production and
654           INSTALL_PATH_Production based on SDK.
655         - Override SECT_ORDER_FLAGS from WebCore.xcconfig.
656
657 2014-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
658
659         [SVG -> OTF Converter] Make placeholders more robust
660         https://bugs.webkit.org/show_bug.cgi?id=139836
661
662         Reviewed by Dan Bernstein.
663
664         This patch creates a Placeholder object which hides the complexity of
665         populating offsets to subtables.
666
667         No new tests because there is no behavior change.
668
669         * svg/SVGToOTFFontConversion.cpp:
670         (WebCore::SVGToOTFFontConverter::Placeholder::Placeholder):
671         (WebCore::SVGToOTFFontConverter::Placeholder::populate):
672         (WebCore::SVGToOTFFontConverter::Placeholder::~Placeholder):
673         (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
674         (WebCore::SVGToOTFFontConverter::appendGSUBTable):
675
676 2014-12-19  Chris Dumez  <cdumez@apple.com>
677
678         Fix initial / inherit support for '-webkit-perspective-origin' CSS property
679         https://bugs.webkit.org/show_bug.cgi?id=139843
680
681         Reviewed by Simon Fraser.
682
683         Fix initial / inherit support for '-webkit-perspective-origin' CSS
684         property. These previously had no effect.
685
686         This patch updates the code to be consistent with
687         '-webkit-transform-origin' and gets rid of the code in
688         DeprecatedStyleBuilder as it isn't used.
689
690         Test: fast/css/perspective-origin-initial-inherit.html
691
692         * css/DeprecatedStyleBuilder.cpp:
693         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
694         (WebCore::ApplyPropertyPerspectiveOrigin::applyInheritValue): Deleted.
695         (WebCore::ApplyPropertyPerspectiveOrigin::applyInitialValue): Deleted.
696         (WebCore::ApplyPropertyPerspectiveOrigin::applyValue): Deleted.
697         (WebCore::ApplyPropertyPerspectiveOrigin::createHandler): Deleted.
698         * css/StyleProperties.cpp:
699         (WebCore::StyleProperties::getPropertyValue):
700         (WebCore::StyleProperties::asText):
701         * css/StylePropertyShorthand.cpp:
702         (WebCore::webkitPerspectiveOriginShorthand):
703         (WebCore::shorthandForProperty):
704         (WebCore::matchingShorthandsForLonghand):
705         * css/StylePropertyShorthand.h:
706         * css/StyleResolver.cpp:
707         (WebCore::StyleResolver::applyProperty):
708
709 2014-12-19  Commit Queue  <commit-queue@webkit.org>
710
711         Unreviewed, rolling out r177599.
712         https://bugs.webkit.org/show_bug.cgi?id=139846
713
714         this breaks so many things (Requested by thorton_ on #webkit).
715
716         Reverted changeset:
717
718         "TextIndicator's window can be pushed down if it intersects
719         the menu bar"
720         https://bugs.webkit.org/show_bug.cgi?id=139841
721         http://trac.webkit.org/changeset/177599
722
723 2014-12-19  Timothy Horton  <timothy_horton@apple.com>
724
725         TextIndicator's window can be pushed down if it intersects the menu bar
726         https://bugs.webkit.org/show_bug.cgi?id=139841
727         <rdar://problem/19311017>
728
729         Reviewed by Anders Carlsson.
730
731         * page/mac/TextIndicatorWindow.mm:
732         (WebCore::TextIndicatorWindow::setTextIndicator):
733         Ensure that the textIndicatorWindow sits above the menubar, and re-set
734         its frame so that it moves under the menubar if required.
735
736 2014-12-19  Anders Carlsson  <andersca@apple.com>
737
738         Use WebCore::MachSendRights for the compositing render server port
739         https://bugs.webkit.org/show_bug.cgi?id=139834
740
741         Reviewed by Tim Horton.
742
743         * WebCore.exp.in:
744
745 2014-12-19  Chris Dumez  <cdumez@apple.com>
746
747         [iOS] Log how often media element playback happens using FeatureCounter
748         https://bugs.webkit.org/show_bug.cgi?id=139819
749         <rdar://problem/19309988>
750
751         Reviewed by Eric Carlson.
752
753         Log using FeatureCounter how often we start loading for audio / video
754         elements, and how often they end up being played.
755
756         * html/HTMLMediaElement.cpp:
757         (WebCore::HTMLMediaElement::HTMLMediaElement):
758         Add flag to identify when a media element starts playing for the first
759         time.
760
761         (WebCore::HTMLMediaElement::loadResource):
762         Log when a media element starts loading.
763
764         (WebCore::HTMLMediaElement::updatePlayState):
765         Log when a media element starts playing for the first time.
766
767         * html/HTMLMediaElement.h:
768         Add flag to identify when a media element starts playing for the first
769         time.
770
771         * platform/FeatureCounterKeys.h:
772         Add FeatureCounter keys for HTMLMediaElement loading / playback.
773
774 2014-12-19  Andreas Kling  <akling@apple.com>
775
776         Ref-ify TextIterator API.
777         <https://webkit.org/b/139823>
778
779         Reviewed by Antti Koivisto.
780
781         Change TextIterator functions that always return Range objects to return
782         Ref<Range> instead of PassRefPtr<Range>.
783
784         One API (rangeFromLocationAndLength) may return nullptr, so its return type
785         is now RefPtr<Range>.
786
787         * editing/TextIterator.cpp:
788         (WebCore::TextIterator::range):
789         (WebCore::TextIterator::node):
790         (WebCore::SimplifiedBackwardsTextIterator::range):
791         (WebCore::CharacterIterator::range):
792         (WebCore::characterSubrange):
793         (WebCore::BackwardsCharacterIterator::range):
794         (WebCore::TextIterator::subrange):
795         (WebCore::TextIterator::rangeFromLocationAndLength):
796         (WebCore::TextIterator::getLocationAndLengthFromRange):
797         (WebCore::collapsedToBoundary):
798         (WebCore::findPlainText):
799         * editing/TextIterator.h:
800
801 2014-12-19  Joseph Pecoraro  <pecoraro@apple.com>
802
803         Web Inspector: CRASH in inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html
804         https://bugs.webkit.org/show_bug.cgi?id=139792
805
806         Reviewed by Timothy Hatcher.
807
808         * bindings/js/WorkerScriptDebugServer.cpp:
809         (WebCore::WorkerScriptDebugServer::removeListener):
810         When removing listeners, we could be during WorkerGlobalObject shutdown
811         and WorkerGlobalObject::script may be null.
812
813         * workers/WorkerMessagingProxy.cpp:
814         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
815         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
816         This postTask may happen after m_pageInspector has been cleared, so
817         only execute it if m_pageInspector is still valid.
818
819 2014-12-19  Chris Dumez  <cdumez@apple.com>
820
821         Drop useless HTMLMediaElement::m_previousProgress member
822         https://bugs.webkit.org/show_bug.cgi?id=139822
823
824         Reviewed by Eric Carlson.
825
826         Drop HTMLMediaElement::m_previousProgress member and it is not used or
827         even initialized.
828
829         * html/HTMLMediaElement.h:
830
831 2014-12-19  Chris Dumez  <cdumez@apple.com>
832
833         [iOS] Log how successful the memory cache is using FeatureCounter
834         https://bugs.webkit.org/show_bug.cgi?id=139802
835
836         Reviewed by Andreas Kling.
837
838         Log how successful the memory cache is using FeatureCounter and why we
839         choose not to use the resource in the memory cache when it is present.
840
841         * loader/cache/CachedResourceLoader.cpp:
842         (WebCore::CachedResourceLoader::requestResource):
843         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
844         * platform/FeatureCounterKeys.h:
845
846 2014-12-19  Commit Queue  <commit-queue@webkit.org>
847
848         Unreviewed, rolling out r177574.
849         https://bugs.webkit.org/show_bug.cgi?id=139821
850
851         "Broke Production builds by installing
852         libWebCoreTestSupport.dylib in the wrong directory" (Requested
853         by ddkilzer on #webkit).
854
855         Reverted changeset:
856
857         "Switch from using PLATFORM_NAME to SDK selectors in WebCore,
858         WebInspectorUI, WebKit, WebKit2"
859         https://bugs.webkit.org/show_bug.cgi?id=139463
860         http://trac.webkit.org/changeset/177574
861
862 2014-12-19  Said Abou-Hallawa  <sabouhallawa@apple.com>
863
864         Only when the SVG is inline and only when a shape is referenced before it is defined, this shape will not be drawn.
865         https://bugs.webkit.org/show_bug.cgi?id=139451.
866
867         Reviewed by Antti Koivisto.
868
869         Tests: svg/in-html/defs-after-use.html.
870
871         When parsing the children of an SVG element is finished, we need to notify the
872         other SVG elements which have incomplete shadow trees because of early referencing
873         to this element. The referencing elements need to rebuild their shadow trees and
874         make new copies of the this element and its sub-tree.
875         
876         This is the case where a <use> tag references target elements before these target
877         elements are defined. Updating the shadow DOM tree of a <use> element should update
878         the corresponding shadow render tree as well.
879
880         * svg/SVGElement.cpp:
881         (WebCore::SVGElement::finishParsingChildren):
882         Invalidate all the referencing elements of a target element whose sub-tree has
883         just finished parsing.
884
885 2014-12-19  David Kilzer  <ddkilzer@apple.com>
886
887         Switch from using PLATFORM_NAME to SDK selectors in WebCore, WebInspectorUI, WebKit, WebKit2
888         <http://webkit.org/b/139463>
889
890         Reviewed by Mark Rowe.
891
892         Also remove all uses of SQLITE3_HEADER_SEARCH_PATHS and
893         WEBCORE_SQLITE3_HEADER_SEARCH_PATHS which were phased out in
894         r132859 and needed for Leopard.
895
896         * Configurations/Base.xcconfig:
897         - Only set GCC_ENABLE_OBJC_GC, GCC_MODEL_TUNING and TOOLCHAINS
898           on OS X.
899         - Set GCC_OPTIMIZATION_LEVEL_normal based on SDK.
900         - Simplify SQLITE3_HEADER_SEARCH_PATHS.
901         * Configurations/DebugRelease.xcconfig:
902         - Only set MACOSX_DEPLOYMENT_TARGET and SDKROOT on OS X.
903         * Configurations/Version.xcconfig:
904         - Set SYSTEM_VERSION_PREFIX separately for iOS and OS X.
905         * Configurations/WebCore.xcconfig:
906         - Set EXPORTED_SYMBOLS_FILE_i386, EXPORTED_SYMBOLS_FILE_x86_64,
907           FRAMEWORK_SEARCH_PATHS, INSTALL_PATH, DYLIB_INSTALL_NAME_BASE,
908           OTHER_LDFLAGS, SECTORDER_FLAGS, NORMAL_WEBCORE_FRAMEWORKS_DIR,
909           WEBCORE_FRAMEWORKS_DIR, NORMAL_PRODUCTION_FRAMEWORKS_DIR,
910           PRODUCTION_FRAMEWORKS_DIR,
911           JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production and
912           EXCLUDED_SOURCE_FILE_NAMES based on SDK.
913         - Make sure DYLIB_INSTALL_NAME_BASE and OTHER_LDFLAGS are
914           overrideable by WebCoreTestSupport.xcconfig.
915         * Configurations/WebCoreTestSupport.xcconfig:
916         - Set PRIVATE_HEADERS_FOLDER_PATH_Production and
917           INSTALL_PATH_Production based on SDK.
918         - Override SECT_ORDER_FLAGS from WebCore.xcconfig.
919
920 2014-12-19  Chris Dumez  <cdumez@apple.com>
921
922         Clean up StyleBuilderCustom and DeprecatedStyleBuilder
923         https://bugs.webkit.org/show_bug.cgi?id=139807
924
925         Reviewed by Antti Koivisto.
926
927         Clean up StyleBuilderCustom and DeprecatedStyleBuilder.
928
929         * css/DeprecatedStyleBuilder.cpp:
930
931         - Remove unnecessary header includes.
932
933         (WebCore::ApplyPropertyPerspectiveOrigin::applyInheritValue):
934         (WebCore::ApplyPropertyPerspectiveOrigin::applyInitialValue):
935         (WebCore::ApplyPropertyPerspectiveOrigin::applyValue):
936         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
937         (WebCore::ApplyPropertyExpanding::applyInheritValue): Deleted.
938         (WebCore::ApplyPropertyExpanding::applyInitialValue): Deleted.
939         (WebCore::ApplyPropertyExpanding::applyValue): Deleted.
940         (WebCore::ApplyPropertyExpanding::createHandler): Deleted.
941
942         - Rename ApplyPropertyExpanding to ApplyPropertyPerspectiveOrigin as
943           PerspectiveOrigin is the only remaining user of this class. This also
944           allows us to simplify the implementation a lot.
945
946         (WebCore::ApplyPropertyDefaultBase::setValue): Deleted.
947         (WebCore::ApplyPropertyDefaultBase::value): Deleted.
948         (WebCore::ApplyPropertyDefaultBase::initial): Deleted.
949         (WebCore::ApplyPropertyDefaultBase::applyInheritValue): Deleted.
950         (WebCore::ApplyPropertyDefaultBase::applyInitialValue): Deleted.
951         (WebCore::ApplyPropertyDefaultBase::applyValue): Deleted.
952
953         - There is no longer any user of this templated class.
954
955         * css/StyleBuilderCustom.h:
956
957         - Introduce a macro that declares all 3 handlers (inherit, initial and
958           value) in the StyleBuilderCustom class. This greatly reduces the
959           number of lines in this class.
960         - Also alphabetize the handlers.
961
962 2014-12-18  Jeremy Jones  <jeremyj@apple.com>
963
964         dispatch to main thread before accessing playerController() in WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse
965         https://bugs.webkit.org/show_bug.cgi?id=139809
966
967         Reviewed by Dan Bernstein.
968
969         This prevents a race in playerController().
970
971         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
972         (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse):
973
974 2014-12-18  Jessie Berlin  <jberlin@webkit.org>
975
976         More speculative build fixing.
977
978         * WebCore.exp.in:
979
980 2014-12-18  Andreas Kling  <akling@apple.com>
981
982         Ref-ify various Document-related things.
983         <https://webkit.org/b/139796>
984
985         Reviewed by Anders Carlsson.
986
987         * bindings/objc/DOMHTML.mm:
988         (-[DOMHTMLDocument createDocumentFragmentWithText:]):
989         * dom/CDATASection.cpp:
990         (WebCore::CDATASection::create):
991         (WebCore::CDATASection::virtualCreate):
992         * dom/CDATASection.h:
993         * dom/Comment.cpp:
994         (WebCore::Comment::create):
995         * dom/Comment.h:
996         * dom/Document.cpp:
997         (WebCore::Document::create):
998         (WebCore::Document::createDocumentFragment):
999         (WebCore::Document::createTextNode):
1000         (WebCore::Document::createComment):
1001         (WebCore::Document::createEditingTextNode):
1002         (WebCore::Document::createCSSStyleDeclaration):
1003         (WebCore::Document::createElement):
1004         (WebCore::Document::createRange):
1005         (WebCore::Document::createParser):
1006         (WebCore::Document::cloneNodeInternal):
1007         (WebCore::Document::cloneDocumentWithoutChildren):
1008         * dom/Document.h:
1009         (WebCore::Document::create):
1010         (WebCore::Document::createXHTML):
1011         (WebCore::Document::createNonRenderedPlaceholder):
1012         * dom/DocumentFragment.cpp:
1013         (WebCore::DocumentFragment::create):
1014         * dom/DocumentFragment.h:
1015         * dom/DocumentType.h:
1016         * dom/EntityReference.cpp:
1017         (WebCore::EntityReference::create):
1018         * dom/EntityReference.h:
1019         * dom/Text.cpp:
1020         (WebCore::Text::create):
1021         (WebCore::Text::createEditingText):
1022         (WebCore::Text::splitText):
1023         (WebCore::Text::virtualCreate):
1024         (WebCore::Text::createWithLengthLimit):
1025         * dom/Text.h:
1026         * editing/markup.cpp:
1027         (WebCore::replaceChildrenWithText):
1028         * html/FTPDirectoryDocument.cpp:
1029         (WebCore::FTPDirectoryDocument::createParser):
1030         * html/FTPDirectoryDocument.h:
1031         * html/HTMLDocument.cpp:
1032         (WebCore::HTMLDocument::createParser):
1033         (WebCore::HTMLDocument::cloneDocumentWithoutChildren):
1034         * html/HTMLDocument.h:
1035         (WebCore::HTMLDocument::create):
1036         (WebCore::HTMLDocument::createSynthesizedDocument):
1037         * html/ImageDocument.cpp:
1038         (WebCore::ImageDocument::createParser):
1039         * html/ImageDocument.h:
1040         * html/MediaDocument.cpp:
1041         (WebCore::MediaDocument::createParser):
1042         * html/MediaDocument.h:
1043         * html/PluginDocument.cpp:
1044         (WebCore::PluginDocument::createParser):
1045         * html/PluginDocument.h:
1046         * html/TextDocument.cpp:
1047         (WebCore::TextDocument::createParser):
1048         * html/TextDocument.h:
1049         * html/parser/HTMLConstructionSite.cpp:
1050         (WebCore::HTMLConstructionSite::insertTextNode):
1051         * html/parser/HTMLDocumentParser.h:
1052         (WebCore::HTMLDocumentParser::create):
1053         * loader/SinkDocument.cpp:
1054         (WebCore::SinkDocument::createParser):
1055         * loader/SinkDocument.h:
1056         * svg/SVGDocument.cpp:
1057         (WebCore::SVGDocument::cloneDocumentWithoutChildren):
1058         * svg/SVGDocument.h:
1059         * xml/parser/XMLDocumentParser.h:
1060         (WebCore::XMLDocumentParser::create):
1061         * xml/parser/XMLDocumentParserLibxml2.cpp:
1062         (WebCore::XMLParserContext::createStringParser):
1063         (WebCore::XMLParserContext::createMemoryParser):
1064
1065 2014-12-18  Anders Carlsson  <andersca@apple.com>
1066
1067         Use MachSendRight in WebKit2
1068         https://bugs.webkit.org/show_bug.cgi?id=139800
1069
1070         Reviewed by Tim Horton.
1071
1072         * WebCore.exp.in:
1073         * platform/cocoa/MachSendRight.h:
1074         (WebCore::MachSendRight::MachSendRight):
1075         (WebCore::MachSendRight::sendRight):
1076         * platform/graphics/cocoa/IOSurface.h:
1077         * platform/graphics/cocoa/IOSurface.mm:
1078         (IOSurface::createFromSendRight):
1079         (IOSurface::createFromMachPort): Deleted.
1080
1081 2014-12-18  Gavin Barraclough  <barraclough@apple.com>
1082
1083         Add strong typing to RefCounter interface, return value as a bool.
1084         https://bugs.webkit.org/show_bug.cgi?id=139776
1085
1086         Reviewed by Geoff Garen.
1087
1088         Currently all token vended by a RefCounter have the same type - Ref<RefCounter::Count>.
1089         This means there is no compile time type checking to prevent mistakes. Update the count()
1090         method to token<>(), templated on type used to identify the token being returned.
1091         Calls to token<T>() will return a result of type RefCounter::Token<T>.
1092
1093         There are a few problems with the fact the counter will return you an exact count of the
1094         number of outstanding tokens:
1095           - It is desirable to only fire the callback on zero-edge changes; it is more consistent
1096             to do so if the value is only readable as a boolean.
1097           - It is desirable to provide the value as an argument to the callback, however to make
1098             this useful for integer values it is also necessary to indicate the direction of change
1099             (0->1 is often interesting where 2->1 is not).
1100           - There is a mismatch between the precision of returning a count, and the inherent
1101             imprecision of a token based mechanism, where it may be difficult to guarantee
1102             absolutely no unnecessary refcount churn, and thus unintentional counter values.
1103
1104         * page/PageThrottler.cpp:
1105         (WebCore::m_mediaActivityCounter):
1106         (WebCore::m_pageLoadActivityCounter):
1107             - lambdas now passed the value.
1108         (WebCore::PageThrottler::mediaActivityToken):
1109         (WebCore::PageThrottler::pageLoadActivityToken):
1110             - count() -> token<>().
1111         * page/PageThrottler.h:
1112             - specify tpoken type for PageActivityAssertionToken.
1113
1114 2014-12-18  Benjamin Poulain  <bpoulain@apple.com>
1115
1116         HTMLFormControlElement and HTMLObjectElement need not to look for an ancestor on construction
1117         https://bugs.webkit.org/show_bug.cgi?id=139791
1118
1119         Reviewed by Alexey Proskuryakov.
1120
1121         The objects are being constructed, they have not been inserted into the tree yet.
1122         There is not chance of finding the owner form at this point,
1123         that is done when inserting the node into the tree.
1124
1125         * html/HTMLFormControlElement.cpp:
1126         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1127         * html/HTMLObjectElement.cpp:
1128         (WebCore::HTMLObjectElement::HTMLObjectElement):
1129
1130 2014-12-18  Chris Fleizach  <cfleizach@apple.com>
1131
1132         AX: Recursive crash at WebCore::accessibleNameForNode
1133         https://bugs.webkit.org/show_bug.cgi?id=139616
1134
1135         Reviewed by Mario Sanchez Prada.
1136
1137         An image that uses aria-labelledby to reference its own parent can lead to a recursion crash.
1138         There needs to be some information we can pass through these methods to ensure we don't hit this case.
1139
1140         Test: accessibility/accessibility-description-crash.html
1141
1142         * accessibility/AccessibilityNodeObject.cpp:
1143         (WebCore::AccessibilityNodeObject::alternativeText):
1144         (WebCore::AccessibilityNodeObject::textUnderElement):
1145         (WebCore::accessibleNameForNode):
1146         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
1147         * accessibility/AccessibilityObject.h:
1148         (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
1149
1150 2014-12-18  Chris Fleizach  <cfleizach@apple.com>
1151
1152         AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an element with any explicit ARIA role, including presentation.
1153         https://bugs.webkit.org/show_bug.cgi?id=133613
1154
1155         Reviewed by Mario Sanchez Prada.
1156
1157         This adds a heuristic to avoid a problem we have where too many objects that say they respond to press actions for accessibility.
1158         It results from people installing click handlers on container nodes and then lots of static text objects are "clickable" in the eyes of VoiceOver.
1159
1160         What we can do is avoid this determination if the element is presentational.
1161
1162         Test: platform/mac/accessibility/press-action-for-presentational-descendants.html
1163
1164         * accessibility/AccessibilityObject.cpp:
1165         (WebCore::nodeHasPresentationRole):
1166         (WebCore::AccessibilityObject::supportsPressAction):
1167         * accessibility/AccessibilityObject.h:
1168         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1169         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
1170
1171 2014-12-18  Chris Fleizach  <cfleizach@apple.com>
1172
1173         AX: event.target should sometimes be a descendant element on AXPress-triggered mouse clicks
1174         https://bugs.webkit.org/show_bug.cgi?id=135689
1175
1176         Reviewed by Mario Sanchez Prada.
1177
1178         When trying to find the right sub-node to target, we need to go back up the parent chain to find 
1179         an Element, in case we land on a Text node for example.
1180
1181         Test: accessibility/press-target-uses-text-descendant-node.html
1182
1183         * accessibility/AccessibilityObject.cpp:
1184         (WebCore::AccessibilityObject::press):
1185
1186 2014-12-16  Sam Weinig  <sam@webkit.org>
1187
1188         Unify the Mac and iOS implementations of FontPlatformData a bit
1189         https://bugs.webkit.org/show_bug.cgi?id=139721
1190
1191         Reviewed by Anders Carlsson.
1192
1193         This is a first pass of unifying the Mac and iOS implementations of FontPlatformData.
1194         Notable changes:
1195         - Change the storage of the platform font to be CTFontRef across the board. Adds NSFont
1196           setter/getter/constructor as a temporary measures during the transition away from NSFont.
1197         - Removes duplicate code that only differed by whether the type was NSFont or CTFontRef.
1198         - Reduces the number of #ifdefs.
1199
1200         * platform/graphics/FontPlatformData.cpp:
1201         (WebCore::FontPlatformData::FontPlatformData):
1202         (WebCore::FontPlatformData::operator=):
1203         (WebCore::FontPlatformData::openTypeTable): Deleted.
1204         * platform/graphics/FontPlatformData.h:
1205         (WebCore::FontPlatformData::nsFont):
1206         (WebCore::FontPlatformData::setNSFont):
1207         (WebCore::FontPlatformData::hash):
1208         (WebCore::FontPlatformData::operator==):
1209         (WebCore::FontPlatformData::isHashTableDeletedValue):
1210         (WebCore::toCTFontRef): Deleted.
1211         (WebCore::FontPlatformData::font): Deleted.
1212         (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
1213         (WebCore::FontPlatformData::cgFont): Deleted.
1214         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
1215         * platform/graphics/SimpleFontData.h:
1216         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1217         (WebCore::FontPlatformData::FontPlatformData):
1218         (WebCore::FontPlatformData::~FontPlatformData):
1219         (WebCore::FontPlatformData::platformDataInit):
1220         (WebCore::FontPlatformData::platformDataAssign):
1221         (WebCore::FontPlatformData::setFont):
1222         (WebCore::FontPlatformData::roundsGlyphAdvances):
1223         (WebCore::FontPlatformData::allowsLigatures):
1224         (WebCore::FontPlatformData::ctFont):
1225         (WebCore::FontPlatformData::openTypeTable):
1226         (WebCore::FontPlatformData::loadFont): Deleted.
1227         * platform/graphics/mac/FontCacheMac.mm:
1228         (WebCore::FontCache::systemFallbackForCharacters):
1229         * platform/graphics/mac/FontMac.mm:
1230         (WebCore::Font::drawGlyphs):
1231         * platform/graphics/mac/SimpleFontDataMac.mm:
1232         (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
1233         (WebCore::SimpleFontData::platformInit):
1234         (WebCore::SimpleFontData::platformCreateScaledFontData):
1235         (WebCore::SimpleFontData::containsCharacters):
1236         (WebCore::SimpleFontData::determinePitch):
1237         (WebCore::SimpleFontData::renderingStyle):
1238         (WebCore::SimpleFontData::advanceForColorBitmapFont):
1239
1240 2014-12-18  Anders Carlsson  <andersca@apple.com>
1241
1242         Build fix.
1243
1244         * platform/cocoa/MachSendRight.cpp:
1245
1246 2014-12-18  Timothy Horton  <timothy_horton@apple.com>
1247
1248         Change page preview loading order, and add a TextIndicator
1249         https://bugs.webkit.org/show_bug.cgi?id=139793
1250         <rdar://problem/19288547>
1251
1252         Reviewed by Beth Dakin.
1253
1254         * WebCore.exp.in:
1255         * platform/spi/mac/NSPopoverSPI.h:
1256         Add an export and some SPI.
1257
1258 2014-12-18  Anders Carlsson  <andersca@apple.com>
1259
1260         Clean up MachSendRight and add a copySendRight member function
1261         https://bugs.webkit.org/show_bug.cgi?id=139788
1262
1263         Reviewed by Tim Horton.
1264
1265         * platform/cocoa/MachSendRight.cpp:
1266         (WebCore::retainSendRight):
1267         (WebCore::releaseSendRight):
1268         Use mach_error_string.
1269
1270         (WebCore::MachSendRight::copySendRight):
1271         Create a new send right with the given mach port.
1272
1273         (WebCore::MachSendRight::leakSendRight):
1274         Use std::exchange.
1275
1276         * platform/cocoa/MachSendRight.h:
1277
1278 2014-12-18  Joseph Pecoraro  <pecoraro@apple.com>
1279
1280         Web Inspector: ASSERT seen closing/opening multiple inspectors
1281         https://bugs.webkit.org/show_bug.cgi?id=139783
1282
1283         Reviewed by Timothy Hatcher.
1284
1285         * inspector/InspectorDOMAgent.cpp:
1286         (WebCore::InspectorDOMAgent::nodeForObjectId):
1287
1288 2014-12-18  Anders Carlsson  <andersca@apple.com>
1289
1290         Add a MachSendRight class to WebCore and use it in IOSurface
1291         https://bugs.webkit.org/show_bug.cgi?id=139787
1292
1293         Reviewed by Tim Horton.
1294
1295         * WebCore.exp.in:
1296         * WebCore.xcodeproj/project.pbxproj:
1297         * platform/cocoa/MachSendRight.cpp: Added.
1298         (WebCore::retainSendRight):
1299         (WebCore::releaseSendRight):
1300         (WebCore::MachSendRight::adopt):
1301         (WebCore::MachSendRight::create):
1302         (WebCore::MachSendRight::MachSendRight):
1303         (WebCore::MachSendRight::~MachSendRight):
1304         (WebCore::MachSendRight::operator=):
1305         (WebCore::MachSendRight::leakSendRight):
1306         * platform/cocoa/MachSendRight.h: Added.
1307         * platform/graphics/cocoa/IOSurface.h:
1308         * platform/graphics/cocoa/IOSurface.mm:
1309         (IOSurface::createSendRight):
1310         (IOSurface::createMachPort): Deleted.
1311
1312 2014-12-18  Andreas Kling  <akling@apple.com>
1313
1314         Ref-ify DOMSettableTokenList.
1315         <https://webkit.org/b/139785>
1316
1317         Reviewed by Chris Dumez.
1318
1319         Make DOMSettableTokenList::create() return a Ref, and have its two client
1320         elements store it in a Ref instead of a RefPtr (and fix their getter API
1321         to return references.)
1322
1323         * html/DOMSettableTokenList.cpp:
1324         (WebCore::DOMSettableTokenList::create): Deleted.
1325         * html/DOMSettableTokenList.h:
1326         * html/HTMLLinkElement.cpp:
1327         (WebCore::HTMLLinkElement::sizes): Deleted.
1328         * html/HTMLLinkElement.h:
1329         * html/HTMLOutputElement.cpp:
1330         (WebCore::HTMLOutputElement::htmlFor): Deleted.
1331         * html/HTMLOutputElement.h:
1332
1333 2014-12-18  Andreas Kling  <akling@apple.com>
1334
1335         Ref-ify ClientRectList.
1336         <https://webkit.org/b/139780>
1337
1338         Reviewed by Anders Carlsson.
1339
1340         Make the ClientRectList::create() helpers return Ref, along with a bunch
1341         of other functions that always return non-null ClientRectLists.
1342
1343         Also make ClientRectList store a Vector<Ref<ClientRect>> internally since
1344         entries in the Vector are never null.
1345
1346         * dom/ClientRectList.cpp:
1347         (WebCore::ClientRectList::item):
1348         * dom/ClientRectList.h:
1349         (WebCore::ClientRectList::create):
1350         * dom/Element.cpp:
1351         (WebCore::Element::getClientRects):
1352         * dom/Element.h:
1353         * dom/Range.cpp:
1354         (WebCore::Range::getClientRects):
1355         * dom/Range.h:
1356         * page/Page.cpp:
1357         (WebCore::Page::nonFastScrollableRects):
1358         * page/Page.h:
1359         * testing/Internals.cpp:
1360         (WebCore::Internals::inspectorHighlightRects):
1361         (WebCore::Internals::nonFastScrollableRects):
1362         * testing/Internals.h:
1363
1364 2014-12-18  Andreas Kling  <akling@apple.com>
1365
1366         Ref-ify ClientRect.
1367         <https://webkit.org/b/139777>
1368
1369         Reviewed by Anders Carlsson.
1370
1371         Make the ClientRect::create() helpers return Ref, along with a bunch
1372         of other functions that always return non-null ClientRects.
1373
1374         * dom/ClientRect.h:
1375         (WebCore::ClientRect::create):
1376         * dom/Element.cpp:
1377         (WebCore::Element::getBoundingClientRect):
1378         * dom/Element.h:
1379         * dom/Range.cpp:
1380         (WebCore::Range::getBoundingClientRect):
1381         * dom/Range.h:
1382         * html/track/VTTRegion.cpp:
1383         (WebCore::VTTRegion::displayLastTextTrackCueBox):
1384         * testing/Internals.cpp:
1385         (WebCore::Internals::absoluteCaretBounds):
1386         (WebCore::Internals::boundingBox):
1387         (WebCore::Internals::selectionBounds):
1388         * testing/Internals.h:
1389
1390 2014-12-18  Chris Dumez  <cdumez@apple.com>
1391
1392         [iOS] Log navigation types using FeatureCounter API
1393         https://bugs.webkit.org/show_bug.cgi?id=139753
1394
1395         Reviewed by Darin Adler.
1396
1397         Log navigation types using FeatureCounter API.
1398
1399         No new tests, no behavior change other than additional feature
1400         counting.
1401
1402         * loader/FrameLoader.cpp:
1403         (WebCore::logNavigationWithFeatureCounter):
1404         (WebCore::FrameLoader::loadWithDocumentLoader):
1405         * platform/FeatureCounterKeys.h:
1406
1407 2014-12-18  Chris Dumez  <cdumez@apple.com>
1408
1409         Move 'font-weight' CSS property to the new StyleBuilder
1410         https://bugs.webkit.org/show_bug.cgi?id=139765
1411
1412         Reviewed by Antti Koivisto.
1413
1414         Move 'font-weight' CSS property to the new StyleBuilder by using
1415         custom code.
1416
1417         No new tests, no behavior change.
1418
1419         * css/CSSPropertyNames.in:
1420         * css/DeprecatedStyleBuilder.cpp:
1421         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1422         (WebCore::ApplyPropertyFontWeight::applyValue): Deleted.
1423         (WebCore::ApplyPropertyFontWeight::createHandler): Deleted.
1424         * css/StyleBuilderCustom.h:
1425         (WebCore::StyleBuilderCustom::applyInitialFontWeight):
1426         (WebCore::StyleBuilderCustom::applyInheritFontWeight):
1427         (WebCore::StyleBuilderCustom::applyValueFontWeight):
1428
1429 2014-12-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1430
1431         Internals methods return 0 instead of false when they fail
1432         https://bugs.webkit.org/show_bug.cgi?id=139766
1433
1434         Reviewed by Darin Adler.
1435
1436         Some Internals method explicitly return 0 although
1437         they expect boolean value.
1438
1439         No new tests, no behavior change.
1440
1441         * testing/Internals.cpp:
1442         (WebCore::Internals::hasSpellingMarker):
1443         (WebCore::Internals::hasAutocorrectedMarker):
1444         (WebCore::Internals::isOverwriteModeEnabled):
1445         (WebCore::Internals::hasGrammarMarker):
1446         Return false instead of 0.
1447
1448 2014-12-18  Chris Dumez  <cdumez@apple.com>
1449
1450         [iOS] Log why cached resources are being revalidated using FeatureCounter API
1451         https://bugs.webkit.org/show_bug.cgi?id=139759
1452         <rdar://problem/19288177>
1453
1454         Reviewed by Antti Koivisto.
1455
1456         Log why cached resources are being revalidated using FeatureCounter API.
1457         Also log if revalidation is successful or not.
1458
1459         No new tests, no behavior change.
1460
1461         * loader/SubresourceLoader.cpp:
1462         (WebCore::SubresourceLoader::willSendRequest):
1463         (WebCore::SubresourceLoader::didReceiveResponse):
1464         * loader/cache/CachedImage.cpp:
1465         (WebCore::CachedImage::mustRevalidateDueToCacheHeaders):
1466         * loader/cache/CachedImage.h:
1467         * loader/cache/CachedResource.cpp:
1468         (WebCore::CachedResource::failBeforeStarting):
1469         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1470         * loader/cache/CachedResource.h:
1471         (WebCore::CachedResource::loader):
1472         * loader/cache/CachedResourceLoader.cpp:
1473         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1474         * platform/FeatureCounterKeys.h:
1475
1476 2014-12-18  Antti Koivisto  <antti@apple.com>
1477
1478         Remove alwaysUseBaselineOfPrimaryFont setting
1479         https://bugs.webkit.org/show_bug.cgi?id=139770
1480
1481         Reviewed by Anders Carlsson.
1482
1483         "FIXME: This is unneeded and should be removed."
1484
1485         This iOS-only setting has no clients anymore.
1486
1487         * page/Settings.in:
1488         * rendering/RootInlineBox.cpp:
1489         (WebCore::RootInlineBox::ascentAndDescentForBox):
1490
1491 2014-12-18  Radu Stavila  <stavila@adobe.com>
1492
1493         [SVG Masking] Enable the use of <mask> elements for -webkit-mask-image
1494         https://bugs.webkit.org/show_bug.cgi?id=139294
1495
1496         Reviewed by Simon Fraser.
1497
1498         This patch links together all parts required for the functionality which improves 
1499         the -webkit-mask-image property by allowing it to reference a <mask> element defined 
1500         in an inline or external SVG document.
1501         Support for this new functionality has been added in a previous patch, under issue
1502         https://bugs.webkit.org/show_bug.cgi?id=139092. A more detailed description of how
1503         the new functionality works can be found in the ChangeLog for that commit.
1504         The containsSVGDocument in ScrollView has been removed because it was added in the
1505         previous patch but is no longer required.
1506
1507         Tests: css3/masking/mask-base64.html
1508                css3/masking/mask-multiple-values.html
1509                css3/masking/mask-svg-clipped-fragmentId.html
1510                css3/masking/mask-svg-fragmentId.html
1511                css3/masking/mask-svg-inline-fragmentId.html
1512                css3/masking/mask-svg-inline-invalid-fragmentId.html
1513                css3/masking/mask-svg-invalid-fragmentId.html
1514                css3/masking/mask-svg-no-fragmentId-tiled.html
1515                css3/masking/mask-svg-no-fragmentId.html
1516                css3/masking/mask-svg-script-entire-svg-to-mask.html
1517                css3/masking/mask-svg-script-mask-to-entire-svg.html
1518                css3/masking/mask-svg-script-mask-to-none.html
1519                css3/masking/mask-svg-script-mask-to-png.html
1520                css3/masking/mask-svg-script-none-to-mask.html
1521                css3/masking/mask-svg-script-none-to-png.html
1522                css3/masking/mask-svg-script-png-to-mask.html
1523                css3/masking/mask-svg-script-png-to-none.html
1524
1525         * css/CSSComputedStyleDeclaration.cpp:
1526         (WebCore::ComputedStyleExtractor::propertyValue):
1527         * css/CSSParser.cpp:
1528         (WebCore::CSSParser::parseFillShorthand):
1529         (WebCore::CSSParser::parseFillProperty):
1530         (WebCore::CSSParser::parseMaskImage):
1531         * css/CSSParser.h:
1532         * css/CSSValue.h:
1533         * css/DeprecatedStyleBuilder.cpp:
1534         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1535         * css/StyleResolver.cpp:
1536         (WebCore::StyleResolver::adjustStyleForMaskImages):
1537         (WebCore::StyleResolver::applyMatchedProperties):
1538         (WebCore::StyleResolver::applyProperty):
1539         (WebCore::StyleResolver::loadPendingSVGDocuments):
1540         (WebCore::StyleResolver::createMaskImageOperations):
1541         (WebCore::StyleResolver::loadPendingImages):
1542         * css/StyleResolver.h:
1543         * page/FrameView.cpp:
1544         (WebCore::FrameView::containsSVGDocument): Deleted.
1545         * page/FrameView.h:
1546         * page/animation/CSSPropertyAnimation.cpp:
1547         (WebCore::blendFunc):
1548         (WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper):
1549         (WebCore::MaskImagePropertyWrapper::equals):
1550         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1551         * platform/ScrollView.h:
1552         (WebCore::ScrollView::containsSVGDocument): Deleted.
1553         * platform/graphics/MaskImageOperation.cpp:
1554         (WebCore::MaskImageOperation::~MaskImageOperation):
1555         (WebCore::MaskImageOperation::operator==):
1556         * platform/graphics/MaskImageOperation.h:
1557         * rendering/RenderBox.cpp:
1558         (WebCore::RenderBox::maskClipRect):
1559         * rendering/RenderBox.h:
1560         * rendering/RenderBoxModelObject.cpp:
1561         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1562         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1563         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1564         * rendering/RenderElement.cpp:
1565         (WebCore::RenderElement::~RenderElement):
1566         (WebCore::RenderElement::updateFillImages):
1567         * rendering/RenderLayer.cpp:
1568         (WebCore::RenderLayer::calculateClipRects):
1569         * rendering/RenderLayer.h:
1570         * rendering/RenderLayerMaskImageInfo.cpp:
1571         (WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo):
1572         (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients):
1573         (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients):
1574         * rendering/RenderLayerMaskImageInfo.h:
1575         * rendering/style/FillLayer.cpp:
1576         (WebCore::FillLayer::hasImage):
1577         * rendering/style/FillLayer.h:
1578         (WebCore::FillLayer::image):
1579         (WebCore::FillLayer::imageOrMaskImage): Deleted.
1580         * rendering/style/RenderStyle.cpp:
1581         (WebCore::RenderStyle::setMaskImage):
1582         * rendering/style/RenderStyle.h:
1583
1584 2014-12-18  Antti Koivisto  <antti@apple.com>
1585
1586         Stop returning GlyphPage from various Font functions
1587         https://bugs.webkit.org/show_bug.cgi?id=139627
1588
1589         Reviewed by Darin Adler.
1590
1591         Make all
1592
1593             std::pair<GlyphData, GlyphPage*> glyphDataAndPage*(...)
1594
1595         style functions to just return GlyphData only. The GlyphPage value was only used for an obscure SVG fallback case.
1596
1597         * platform/graphics/Font.h:
1598         (WebCore::Font::glyphDataForCharacter):
1599         (WebCore::Font::glyphDataAndPageForCharacter): Deleted.
1600         * platform/graphics/FontGlyphs.cpp:
1601         (WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic):
1602         (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
1603         (WebCore::FontGlyphs::glyphDataForSystemFallback):
1604         (WebCore::FontGlyphs::glyphDataForVariant):
1605         (WebCore::FontGlyphs::glyphDataForCharacter):
1606         (WebCore::glyphDataAndPageForCJKCharacterWithoutSyntheticItalic): Deleted.
1607         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Deleted.
1608         (WebCore::FontGlyphs::glyphDataAndPageForSystemFallback): Deleted.
1609         (WebCore::FontGlyphs::glyphDataAndPageForVariant): Deleted.
1610         (WebCore::FontGlyphs::glyphDataAndPageForCharacter): Deleted.
1611         * platform/graphics/FontGlyphs.h:
1612         (WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver): Deleted.
1613         (WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver): Deleted.
1614
1615             No longer needed.
1616
1617         * rendering/svg/SVGTextRunRenderingContext.cpp:
1618         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1619
1620             Simplify by not trying to resolve fallbacks in case context sensitive (based on lang attribute etc)
1621             glyph selection fails. Instead just fall back to a default font. This behavior is not specified
1622             anywhere as far as I can see. (normal non-context sensitive fallbacks will still work fine).
1623             This removes the need to hackishly mutate glyph pages.
1624
1625             Also fix a bug where we didn't use the specified missing glyph when context sensitive selection failed.
1626
1627 2014-12-18  Chris Dumez  <cdumez@apple.com>
1628
1629         Move 'list-style-image' CSS property to the new StyleBuilder
1630         https://bugs.webkit.org/show_bug.cgi?id=139763
1631
1632         Reviewed by Antti Koivisto.
1633
1634         Move 'list-style-image' CSS property to the new StyleBuilder
1635         by reusing an existing Converter helper and renaming it for
1636         clarity.
1637
1638         No new tests, no behavior change.
1639
1640         * css/CSSPropertyNames.in:
1641         * css/DeprecatedStyleBuilder.cpp:
1642         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1643         (WebCore::ApplyPropertyStyleImage::applyValue): Deleted.
1644         (WebCore::ApplyPropertyStyleImage::createHandler): Deleted.
1645         * css/StyleBuilderConverter.h:
1646         (WebCore::StyleBuilderConverter::convertStyleImage):
1647         (WebCore::StyleBuilderConverter::convertBorderImageSource): Deleted.
1648
1649 2014-12-17  Csaba Osztrogonác  <ossy@webkit.org>
1650
1651         URTBF after r177452.
1652         https://bugs.webkit.org/show_bug.cgi?id=139752
1653
1654         * CMakeLists.txt:
1655
1656 2014-12-17  Andreas Kling  <akling@apple.com>
1657
1658         Ref-ify Range::create().
1659         <https://webkit.org/b/139755>
1660
1661         Reviewed by Anders Carlsson.
1662
1663         * dom/Document.cpp:
1664         (WebCore::acceptsEditingFocus):
1665         * dom/Element.cpp:
1666         (WebCore::Element::innerText):
1667         * dom/Range.cpp:
1668         (WebCore::Range::create):
1669         (WebCore::Range::cloneRange):
1670         (WebCore::rangeOfContents):
1671         * dom/Range.h:
1672         * editing/AlternativeTextController.cpp:
1673         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1674         * editing/CompositeEditCommand.cpp:
1675         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1676         * editing/VisibleUnits.cpp:
1677         (WebCore::charactersAroundPosition):
1678         * editing/markup.cpp:
1679         (WebCore::StyledMarkupAccumulator::renderedText):
1680         * page/FocusController.cpp:
1681         (WebCore::relinquishesEditingFocus):
1682
1683 2014-12-17  Dan Bernstein  <mitz@apple.com>
1684
1685         <rdar://problem/19282508> WebKitLegacy is unusable due to bad dylib identifier
1686         https://bugs.webkit.org/show_bug.cgi?id=139760
1687
1688         Reviewed by Anders Carlsson.
1689
1690         * Configurations/WebCore.xcconfig:
1691
1692 2014-12-17  Anders Carlsson  <andersca@apple.com>
1693
1694         Get rid of FrameLoader::defaultObjectContentType
1695         https://bugs.webkit.org/show_bug.cgi?id=139758
1696
1697         Reviewed by Geoffrey Garen.
1698
1699         Move the FrameLoader::defaultObjectContentType implementation to its only caller in WebKit/win.
1700
1701         * loader/FrameLoader.cpp:
1702         (WebCore::FrameLoader::defaultObjectContentType): Deleted.
1703         * loader/FrameLoader.h:
1704
1705 2014-12-17  peavo@outlook.com  <peavo@outlook.com>
1706
1707         [Curl] Compile error, setWasCached method has been removed.
1708         https://bugs.webkit.org/show_bug.cgi?id=139737
1709
1710         Reviewed by Alex Christensen.
1711
1712         The ResourceResponseBase::setWasCached() method has been replaced
1713         with ResourceResponseBase::setSource().
1714
1715         * platform/network/curl/CurlCacheEntry.cpp:
1716         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
1717
1718 2014-12-17  Chris Dumez  <cdumez@apple.com>
1719
1720         [iOS] Make it possible to toggle FeatureCounter support at runtime
1721         https://bugs.webkit.org/show_bug.cgi?id=139688
1722         <rdar://problem/19266254>
1723
1724         Reviewed by Andreas Kling.
1725
1726         Make it possible to toggle FeatureCounter support at runtime by adding
1727         a setting (disabled by default) and moving the API to a new
1728         FeatureCounter class under WebCore/plattorm which only logs if the
1729         setting is enabled. For privacy reasons, FeatureCounter logging is also
1730         disabled for private / ephemeral sessions.
1731
1732         No new tests, no behavior change.
1733
1734         * CMakeLists.txt:
1735         * Configurations/WebCore.xcconfig:
1736         * WebCore.vcxproj/WebCore.vcxproj:
1737         * WebCore.vcxproj/WebCore.vcxproj.filters:
1738         * WebCore.xcodeproj/project.pbxproj:
1739         * history/PageCache.cpp:
1740         (WebCore::logCanCacheFrameDecision):
1741         (WebCore::logCanCachePageDecision):
1742         * page/Settings.in:
1743         * platform/FeatureCounter.cpp: Renamed from Source/WTF/wtf/FeatureCounter.cpp.
1744         (WebCore::FeatureCounter::shouldUseForPage):
1745         (WebCore::FeatureCounter::incrementKey):
1746         (WebCore::FeatureCounter::setKey):
1747         * platform/FeatureCounter.h: Renamed from Source/WTF/wtf/FeatureCounter.h.
1748         * platform/FeatureCounterKeys.h:
1749         * platform/ios/FeatureCounter.mm: Renamed from Source/WTF/wtf/ios/FeatureCounter.mm.
1750         (WebCore::FeatureCounter::incrementKey):
1751         (WebCore::FeatureCounter::setKey):
1752
1753 2014-12-17  Anders Carlsson  <andersca@apple.com>
1754
1755         Get rid of PluginPackageNone.cpp
1756         https://bugs.webkit.org/show_bug.cgi?id=139735
1757
1758         Reviewed by Andreas Kling.
1759
1760         * CMakeLists.txt:
1761         * PlatformEfl.cmake:
1762         * PlatformGTK.cmake:
1763         * PlatformWin.cmake:
1764         * plugins/PluginPackageNone.cpp: Removed.
1765
1766 2014-12-17  Andreas Kling  <akling@apple.com>
1767
1768         Purge PassRefPtr from Frame.
1769         <https://webkit.org/b/139731>
1770
1771         Reviewed by Anders Carlsson.
1772
1773         Remove all use of PassRefPtr from the Frame class, instead using
1774         Ref or RefPtr as appropriate.
1775
1776         * WebCore.exp.in:
1777         * loader/DocumentWriter.cpp:
1778         (WebCore::DocumentWriter::begin):
1779         * page/Frame.cpp:
1780         (WebCore::Frame::create):
1781         (WebCore::Frame::setView):
1782         (WebCore::Frame::setDocument):
1783         (WebCore::Frame::rangeForPoint):
1784         (WebCore::Frame::createView):
1785         * page/Frame.h:
1786         * xml/XSLTProcessor.cpp:
1787         (WebCore::XSLTProcessor::createDocumentFromSource):
1788
1789 2014-12-17  Myles C. Maxfield  <mmaxfield@apple.com>
1790
1791         Test fix after r177444.
1792
1793         Unreviewed.
1794
1795         * accessibility/AccessibilitySlider.cpp:
1796         (WebCore::AccessibilitySliderThumb::elementRect):
1797
1798 2014-12-16  Myles C. Maxfield  <mmaxfield@apple.com>
1799
1800         Addressing more post-review comments in r177035
1801
1802         * accessibility/AccessibilitySlider.cpp:
1803         (WebCore::AccessibilitySliderThumb::elementRect):
1804         * html/HTMLInputElement.cpp:
1805         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
1806
1807 2014-12-17  Zan Dobersek  <zdobersek@igalia.com>
1808
1809         [TexMap] Sprinkle range-based for-loops where still possible
1810         https://bugs.webkit.org/show_bug.cgi?id=138752
1811
1812         Reviewed by Chris Dumez.
1813
1814         Apply range-based for-loops where possible in the TextureMapper,
1815         TextureMapperGL and TextureMapperTiledBackingStore classes.
1816
1817         Also prettify the loop in SharedGLData destructor and return
1818         nullptr instead of explicitly constructing the empty PassRefPtr
1819         object in TextureMapperTiledBackingStore::texture().
1820
1821         * platform/graphics/texmap/TextureMapper.cpp:
1822         (WebCore::BitmapTexturePool::acquireTexture):
1823         * platform/graphics/texmap/TextureMapperGL.cpp:
1824         (WebCore::TextureMapperGLData::SharedGLData::~SharedGLData):
1825         (WebCore::TextureMapperGLData::~TextureMapperGLData):
1826         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1827         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
1828         (WebCore::TextureMapperTiledBackingStore::drawBorder):
1829         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1830         (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
1831         (WebCore::TextureMapperTiledBackingStore::updateContents):
1832         (WebCore::TextureMapperTiledBackingStore::texture):
1833
1834 2014-12-17  Radu Stavila  <stavila@adobe.com>
1835
1836         The SVGDocument of an SVGImage should not perform any additional actions when the SVGImage is being destroyed
1837         https://bugs.webkit.org/show_bug.cgi?id=139644
1838
1839         Reviewed by Antti Koivisto.
1840
1841         When an SVGImage is destroyed, having its SVGDocument perform style recalc and dispatching events is not only
1842         useless but can also cause problems, such as re-entrancy in StyleResolver::loadPendingResources.
1843
1844         No new tests required, existing tests cover this change.
1845
1846         * dom/Document.cpp:
1847         (WebCore::Document::Document):
1848         * dom/Document.h:
1849         (WebCore::Document::isBeingDestroyed):
1850         (WebCore::Document::setIsBeingDestroyed):
1851         * loader/FrameLoader.cpp:
1852         (WebCore::FrameLoader::closeURL):
1853         * svg/graphics/SVGImage.cpp:
1854         (WebCore::SVGImage::~SVGImage):
1855
1856 2014-12-17  Chris Dumez  <cdumez@apple.com>
1857
1858         Drop useless 'clipToContents' argument for windowClipRect()
1859         https://bugs.webkit.org/show_bug.cgi?id=139722
1860
1861         Reviewed by Darin Adler.
1862
1863         Drop useless 'clipToContents' argument for windowClipRect(). This
1864         argument is never used.
1865
1866         No new tests, no behavior change.
1867
1868         * page/FrameView.cpp:
1869         (WebCore::FrameView::windowClipRect):
1870         * page/FrameView.h:
1871         * platform/ScrollView.h:
1872
1873 2014-12-16  Shivakumar JM  <shiva.jm@samsung.com>
1874
1875         text node should not be created, On setting document.title to the empty string.
1876         https://bugs.webkit.org/show_bug.cgi?id=139121
1877
1878         Reviewed by Darin Adler.
1879
1880         Do not create text node, On setting document.title to the empty string as in spec.
1881         I have confirmed this matches the behavior of Firefox and Chrome.
1882
1883         Test: fast/dom/Document/document-set-title-no-child.html
1884
1885         * html/HTMLTitleElement.cpp:
1886         (WebCore::HTMLTitleElement::setText):
1887
1888 2014-12-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1889
1890         Move WebCore/platform/graphics/surfaces to std::unique_ptr
1891         https://bugs.webkit.org/show_bug.cgi?id=139641
1892
1893         Reviewed by Andreas Kling.
1894
1895         Replace OwnPtr|PassOwnPtr with std::make_unique<>|std::unique_ptr<>.
1896
1897         * platform/graphics/GLContext.cpp:
1898         (WebCore::GLContext::sharingContext):
1899         (WebCore::GLContext::createContextForWindow):
1900         (WebCore::GLContext::createOffscreenContext):
1901         * platform/graphics/GLContext.h:
1902         * platform/graphics/GraphicsContext3DPrivate.cpp:
1903         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1904         * platform/graphics/GraphicsContext3DPrivate.h:
1905         * platform/graphics/egl/GLContextEGL.cpp:
1906         (WebCore::GLContextEGL::createWindowContext):
1907         (WebCore::GLContextEGL::createPbufferContext):
1908         (WebCore::GLContextEGL::createPixmapContext):
1909         (WebCore::GLContextEGL::createContext):
1910         * platform/graphics/egl/GLContextEGL.h:
1911         * platform/graphics/glx/GLContextGLX.cpp:
1912         (WebCore::GLContextGLX::createWindowContext):
1913         (WebCore::GLContextGLX::createPbufferContext):
1914         (WebCore::GLContextGLX::createPixmapContext):
1915         (WebCore::GLContextGLX::createContext):
1916         * platform/graphics/glx/GLContextGLX.h:
1917         * platform/graphics/surfaces/GLTransportSurface.cpp:
1918         (WebCore::GLTransportSurface::createTransportSurface):
1919         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
1920         * platform/graphics/surfaces/GLTransportSurface.h:
1921         * platform/graphics/surfaces/GraphicsSurface.h:
1922         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
1923         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
1924         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1925         (WebCore::EGLTransportSurface::createTransportSurface):
1926         (WebCore::EGLTransportSurface::createTransportSurfaceClient):
1927         (WebCore::EGLTransportSurface::EGLTransportSurface):
1928         * platform/graphics/surfaces/egl/EGLSurface.h:
1929         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
1930         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
1931         * platform/graphics/surfaces/egl/EGLXSurface.h:
1932         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1933         (WebCore::GLXTransportSurface::GLXTransportSurface):
1934         (WebCore::GLXOffScreenSurface::initialize):
1935         * platform/graphics/surfaces/glx/GLXSurface.h:
1936
1937 2014-12-16  Timothy Horton  <timothy_horton@apple.com>
1938
1939         Implement and adopt two new TextIndicator presentation animations
1940         https://bugs.webkit.org/show_bug.cgi?id=139715
1941         <rdar://problem/19237945>
1942
1943         Reviewed by Anders Carlsson.
1944
1945         * WebCore.exp.in:
1946         Adjust one symbol and export another.
1947
1948         * page/TextIndicator.cpp:
1949         (WebCore::TextIndicator::createWithSelectionInFrame):
1950         Take a blue-highlight snapshot if we're doing a crossfade without a bounce.
1951
1952         * page/TextIndicator.h:
1953         (WebCore::TextIndicator::presentationTransition):
1954         Add FadeIn and Crossfade transition types.
1955
1956         * page/mac/TextIndicatorWindow.h:
1957         * page/mac/TextIndicatorWindow.mm:
1958         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
1959         (createBounceAnimation):
1960         (createContentCrossfadeAnimation):
1961         (createShadowFadeAnimation):
1962         (createFadeInAnimation):
1963         (-[WebTextIndicatorView _textIndicatorWantsBounce]):
1964         (-[WebTextIndicatorView _textIndicatorWantsContentCrossfade]):
1965         (-[WebTextIndicatorView _textIndicatorWantsFadeIn]):
1966         Factor out the animation construction.
1967
1968         (-[WebTextIndicatorView _animationDuration]):
1969         Factor out the duration computation.
1970
1971         (-[WebTextIndicatorView present]):
1972         (-[WebTextIndicatorView setAnimationProgress:]):
1973         Implement FadeIn and Crossfade transitions.
1974         They can be driven externally and then continue from where they
1975         left off when the progress reaches 100%.
1976         FadeIn changes the opacity of the whole bubble, Crossfade
1977         crossfades the content (from blue to yellow).
1978
1979         (WebCore::TextIndicatorWindow::TextIndicatorWindow):
1980         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1981         Don't immediately destroy the window if it is crossfades or fades in.
1982         Fade it out, instead.
1983
1984         (WebCore::TextIndicatorWindow::setAnimationProgress):
1985         Drive the paused animation manually. If progress hits 100%,
1986         start running it automatically from where it last left off.
1987
1988         (WebCore::TextIndicatorWindow::setTextIndicator):
1989         (WebCore::TextIndicatorWindow::startFadeOut):
1990         (-[WebTextIndicatorView presentWithCompletionHandler:]): Deleted.
1991         (WebCore::TextIndicatorWindow::startFadeOutTimerFired): Deleted.
1992         Remove the completion block from -present.
1993
1994         * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
1995         Add some SPI.
1996
1997 2014-12-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1998
1999         Move WebCore/platform/image-decoders to std::unique_ptr<>
2000         https://bugs.webkit.org/show_bug.cgi?id=139668
2001
2002         Reviewed by Andreas Kling.
2003
2004         As a step to use std::unique_ptr<>, this patch replaces OwnPtr|PassOwnPtr with
2005         std::unique_ptr<> | std::make_unique<>.
2006
2007         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
2008         (WebCore::BMPImageDecoder::setFailed):
2009         (WebCore::BMPImageDecoder::decode):
2010         (WebCore::BMPImageDecoder::decodeHelper):
2011         * platform/image-decoders/bmp/BMPImageDecoder.h:
2012         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2013         (WebCore::GIFImageDecoder::setFailed):
2014         (WebCore::GIFImageDecoder::gifComplete):
2015         (WebCore::GIFImageDecoder::decode):
2016         * platform/image-decoders/gif/GIFImageDecoder.h:
2017         * platform/image-decoders/gif/GIFImageReader.cpp:
2018         (GIFFrameContext::decode):
2019         (GIFImageReader::addFrameIfNecessary):
2020         * platform/image-decoders/gif/GIFImageReader.h:
2021         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2022         (WebCore::ICOImageDecoder::decode):
2023         (WebCore::ICOImageDecoder::decodeAtIndex):
2024         * platform/image-decoders/ico/ICOImageDecoder.h:
2025         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2026         (WebCore::JPEGImageDecoder::setFailed):
2027         (WebCore::JPEGImageDecoder::decode):
2028         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2029         * platform/image-decoders/png/PNGImageDecoder.cpp:
2030         (WebCore::PNGImageDecoder::setFailed):
2031         (WebCore::PNGImageDecoder::decode):
2032         * platform/image-decoders/png/PNGImageDecoder.h:
2033
2034 2014-12-16  Andreas Kling  <akling@apple.com>
2035
2036         Use Ref for SecurityOrigin.
2037         <https://webkit.org/b/139710>
2038
2039         Reviewed by Anders Carlsson.
2040
2041         Make SecurityOrigin::create*() return Ref<SecurityOrigin>.
2042
2043         * html/HTMLAnchorElement.cpp:
2044         (WebCore::HTMLAnchorElement::origin):
2045         * loader/DocumentLoadTiming.cpp:
2046         (WebCore::DocumentLoadTiming::addRedirect):
2047         * loader/DocumentLoader.cpp:
2048         (WebCore::DocumentLoader::willSendRequest):
2049         * loader/FrameLoader.cpp:
2050         (WebCore::FrameLoader::commitProvisionalLoad):
2051         * loader/PingLoader.cpp:
2052         (WebCore::PingLoader::sendPing):
2053         * loader/appcache/ApplicationCacheHost.cpp:
2054         (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
2055         * loader/appcache/ApplicationCacheStorage.cpp:
2056         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
2057         * page/ContentSecurityPolicy.cpp:
2058         (WebCore::stripURLForUseInReport):
2059         * page/DOMWindow.cpp:
2060         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
2061         * page/SecurityOrigin.cpp:
2062         (WebCore::getCachedOrigin):
2063         (WebCore::SecurityOrigin::create):
2064         (WebCore::SecurityOrigin::createUnique):
2065         (WebCore::SecurityOrigin::isolatedCopy):
2066         (WebCore::SecurityOrigin::canRequest):
2067         (WebCore::SecurityOrigin::createFromString):
2068         (WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier):
2069         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
2070         * page/SecurityOrigin.h:
2071         * page/SecurityPolicy.cpp:
2072         (WebCore::SecurityPolicy::isAccessToURLWhiteListed):
2073         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2074         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
2075         * storage/StorageTracker.cpp:
2076         (WebCore::StorageTracker::deleteOriginWithIdentifier):
2077         * workers/DefaultSharedWorkerRepository.cpp:
2078         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
2079         * workers/WorkerThread.cpp:
2080         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2081
2082 2014-12-16  Chris Dumez  <cdumez@apple.com>
2083
2084         Move 'cursor' CSS property to the new StyleBuilder
2085         https://bugs.webkit.org/show_bug.cgi?id=139660
2086
2087         Reviewed by Benjamin Poulain.
2088
2089         Move 'cursor' CSS property to the new StyleBuilder by using
2090         custom code.
2091
2092         No new tests, no behavior change.
2093
2094         * css/CSSPropertyNames.in:
2095         * css/DeprecatedStyleBuilder.cpp:
2096         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2097         (WebCore::ApplyPropertyCursor::applyInheritValue): Deleted.
2098         (WebCore::ApplyPropertyCursor::applyInitialValue): Deleted.
2099         (WebCore::ApplyPropertyCursor::applyValue): Deleted.
2100         (WebCore::ApplyPropertyCursor::createHandler): Deleted.
2101         * css/StyleBuilderCustom.h:
2102         (WebCore::StyleBuilderCustom::applyInitialCursor):
2103         (WebCore::StyleBuilderCustom::applyInheritCursor):
2104         (WebCore::StyleBuilderCustom::applyValueCursor):
2105
2106 2014-12-16  Zalan Bujtas  <zalan@apple.com>
2107
2108         Subpixel rendering: Animating HTML elements leaves trails when embedded to a subpxiel positioned iframe.
2109         https://bugs.webkit.org/show_bug.cgi?id=139691
2110         rdar://problem/19078958
2111
2112         Reviewed by Simon Fraser.
2113
2114         This patch ensures that repaint rect and actual paint coordinate calculations are in sync.
2115
2116         RenderWidget painting still snaps final coordinates to integral positions. We need to
2117         mimic the same snapping behaviour when the repaint rects are being calculated so that
2118         they are in sync with the final repaint rects. This is a workaround until after
2119         widgets get pushed to device pixel positions.
2120
2121         Test: fast/repaint/hidpi-content-inside-iframe-leaves-trails.html
2122
2123         * rendering/RenderBox.cpp:
2124         (WebCore::RenderBox::computeRectForRepaint):
2125         * rendering/RenderView.cpp:
2126         (WebCore::RenderView::repaintViewRectangle):
2127         * rendering/RenderWidget.cpp:
2128         (WebCore::RenderWidget::paintContents):
2129
2130 2014-12-16  Beth Dakin  <bdakin@apple.com>
2131
2132         REGRESSION: Preview popovers obscure the link, look wrong
2133         https://bugs.webkit.org/show_bug.cgi?id=139711
2134         -and corresponding-
2135         rdar://problem/19271854
2136
2137         Reviewed by Tim Horton.
2138
2139         New SPI.
2140         * WebCore.xcodeproj/project.pbxproj:
2141         * platform/spi/mac/NSPopoverSPI.h: Added.
2142
2143 2014-12-16  Myles C. Maxfield  <mmaxfield@apple.com>
2144
2145         [iOS] Cherokee language is drawn as boxes
2146         https://bugs.webkit.org/show_bug.cgi?id=139706
2147
2148         Reviewed by Simon Fraser.
2149
2150         Test: platform/ios-simulator/fast/text/cherokee.html
2151
2152         * platform/graphics/ios/FontCacheIOS.mm:
2153         (WebCore::languageSpecificFallbackFont):
2154
2155 2014-12-16  Enrica Casucci  <enrica@apple.com>
2156
2157         Fix iOS builders for 8.0
2158         https://bugs.webkit.org/show_bug.cgi?id=139495
2159
2160         Reviewed by Jer Noble
2161
2162         * WebCore.exp.in:
2163         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2164         (-[WebVideoFullscreenController enterFullscreen:mode:]):
2165         (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
2166         (-[WebVideoFullscreenController enterFullscreen:]): Deleted.
2167         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2168
2169 2014-12-16  Myles C. Maxfield  <mmaxfield@apple.com>
2170
2171         Ruby overhang uses ints instead of floats
2172         https://bugs.webkit.org/show_bug.cgi?id=139624
2173
2174         Reviewed by Dave Hyatt.
2175
2176         Simply change the type.
2177
2178         Updated existing tests.
2179
2180         * rendering/RenderBlockLineLayout.cpp:
2181         (WebCore::RenderBlockFlow::setMarginsForRubyRun):
2182         * rendering/RenderRubyRun.cpp:
2183         (WebCore::RenderRubyRun::getOverhang):
2184         * rendering/RenderRubyRun.h:
2185         * rendering/line/LineWidth.cpp:
2186         (WebCore::LineWidth::applyOverhang):
2187
2188 2014-12-16  Gavin Barraclough  <barraclough@apple.com>
2189
2190         Move Mac process suppression from WebCore to WebKit2
2191         https://bugs.webkit.org/show_bug.cgi?id=139705
2192
2193         Reviewed by Geoff Garen.
2194
2195         Currently PageThrottler constructs the PageActivityState, holds a copy of the ViewState,
2196         and an optional UserActivity.
2197
2198         Instead, still construct the PageActivityState but just pass this out via the Page to WebPage.
2199         Logic From PageThrottler::updateUserActivity merged into WebPage::updateUserActivity.
2200
2201         * WebCore.exp.in:
2202             - removed createUserActivity.
2203         * page/ChromeClient.h:
2204         (WebCore::ChromeClient::setPageActivityState):
2205             - added to propagate PageActivityState to WebPage.
2206         * page/Page.cpp:
2207         (WebCore::Page::Page):
2208             - PageThrottler constructor now takes a Page&.
2209         (WebCore::Page::setViewState):
2210             - no longer necessary to pass this to PageThrottler.
2211         (WebCore::Page::setPageActivityState):
2212             - added to propagate PageActivityState to WebPage.
2213         (WebCore::Page::enablePageThrottler): Deleted.
2214             - PageThrottler no longer has a UserActivity.
2215         * page/Page.h:
2216         (WebCore::Page::pageThrottler):
2217             - added setPageActivityState, removed enablePageThrottler.
2218         * page/PageThrottler.cpp:
2219         (WebCore::PageThrottler::PageThrottler):
2220             - removed m_viewState, added m_page.
2221         (WebCore::PageThrottler::setActivityFlag):
2222             - propagate PageActivityState via Page to WebPage.
2223         (WebCore::PageThrottler::createUserActivity): Deleted.
2224         (WebCore::PageThrottler::updateUserActivity): Deleted.
2225         (WebCore::PageThrottler::setViewState): Deleted.
2226             - removed; PageThrottler no longer has a PageThrottler or UserActivity.
2227         * page/PageThrottler.h:
2228             - removed createUserActivity, setViewState, m_viewState, m_activity; added m_page.
2229
2230 2014-12-16  Jer Noble  <jer.noble@apple.com>
2231
2232         Unreviewed build fix after r177375; explicitly cast to NSUInteger.
2233
2234         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2235         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
2236         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):
2237
2238 2014-12-16  peavo@outlook.com  <peavo@outlook.com>
2239
2240         [Win] Compiling WebCore fails because of invalid project file.
2241         https://bugs.webkit.org/show_bug.cgi?id=139686
2242
2243         Reviewed by Alex Christensen.
2244
2245         A WebCore project file contains illegal characters.
2246
2247         * WebCore.vcxproj/WebCore.vcxproj.filters:
2248
2249 2014-12-16  Gavin Barraclough  <barraclough@apple.com>
2250
2251         Introduce PageActivityState
2252         https://bugs.webkit.org/show_bug.cgi?id=139687
2253
2254         Reviewed by Anders Carlsson.
2255
2256         Add a bitfield to track each of the activities on the page separately.
2257         Split the hysteresis & counters so we can track these separately.
2258
2259         * page/PageThrottler.cpp:
2260         (WebCore::PageThrottler::PageThrottler):
2261             - initialze new hysteresis, counters; closures call setActivityFlag.
2262         (WebCore::PageThrottler::mediaActivityToken):
2263         (WebCore::PageThrottler::pageLoadActivityToken):
2264             - split m_pageActivityCounter -> m_mediaActivityCounter, m_pageLoadActivityCounter.
2265         (WebCore::PageThrottler::updateUserActivity):
2266             - use m_activityState to check for activity.
2267         (WebCore::PageThrottler::setActivityFlag):
2268             - helper to clear/set a bit in m_activityState, and call updateUserActivity as necessary.
2269         * page/PageThrottler.h:
2270         (WebCore::PageThrottler::didReceiveUserInput):
2271         (WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):
2272             - split m_hysteresis -> m_userInputHysteresis, m_audiblePluginHysteresis
2273
2274 2014-12-16  Myles C. Maxfield  <litherum@gmail.com>
2275
2276         Ruby does not preserve expansion opportunities from enclosing context
2277         https://bugs.webkit.org/show_bug.cgi?id=139618
2278
2279         Reviewed by David Hyatt.
2280
2281         There is currently no sharing of expansion opportunity information between
2282         ruby bases and the text surrounding the ruby. This patch adds a bit on
2283         RenderText, m_contentIsKnownToFollow, which affects how expansion
2284         opportunities are handled at paint-time, as well as a bit on RenderRubyBase,
2285         m_isAfterExpansion, which affects how expansions are calculated when laying
2286         out a line. This patch also adds a field to RenderRubyBase which represents
2287         the base's starting position within a ruby. This field is necessary because
2288         an expansion from a line might occur at the very beginning of a ruby base,
2289         so we have to remember some state from expansion time to RenderRubyBase
2290         layout time.
2291
2292         Added more tests to fast/ruby/ruby-justification.html.
2293
2294         * rendering/InlineBox.h:
2295         (WebCore::InlineBox::setExpansionWithoutGrowing):
2296         (WebCore::InlineBox::expansion):
2297         * rendering/InlineFlowBox.cpp:
2298         (WebCore::InlineFlowBox::removeChild): Keep the bit on InlineTextBox up to
2299         date.
2300         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Set expansion
2301         information in InlineFlowBoxes so the total expansion for a whole line
2302         is held in the RootInlineBox's expansion.
2303         * rendering/InlineTextBox.h:
2304         (WebCore::InlineTextBox::expansionBehavior):
2305         * rendering/RenderBlockFlow.h:
2306         * rendering/RenderBlockLineLayout.cpp:
2307         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
2308         updateRubyForJustifiedText() had a bunch of problems with it. First of all,
2309         it didn't actually set the InlineBoxes as dirty, so the second layout pass
2310         sometimes wouldn't perform any updates. Secondarily, it didn't take
2311         overhangs into account. Thirdly, it didn't mark the ruby base and text as
2312         needing layout so that subsequent layouts would actually traverse into them.
2313         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
2314         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2315         This nested if triangle is super nasty, but I'm not sure of a better way to
2316         write it.
2317         (WebCore::updateRubyForJustifiedText): Deleted.
2318         (WebCore::computeExpansionForJustifiedText): Deleted.
2319         * rendering/RenderRubyBase.cpp:
2320         (WebCore::RenderRubyBase::RenderRubyBase):
2321         (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds):
2322         * rendering/RenderRubyBase.h:
2323         * rendering/RenderRubyRun.cpp:
2324         (WebCore::RenderRubyRun::layout):
2325         * rendering/RenderText.cpp:
2326         (WebCore::RenderText::RenderText):
2327         * rendering/RenderText.h:
2328         (WebCore::RenderText::contentIsKnownToFollow):
2329         (WebCore::RenderText::setContentIsKnownToFollow):
2330
2331 2014-12-16  Jer Noble  <jer.noble@apple.com>
2332
2333         [iOS] Crash in WebKit::WebPageProxy::dispatchViewStateChange() tapping a link from another app while playing a video
2334         https://bugs.webkit.org/show_bug.cgi?id=139550
2335
2336         Reviewed by Anders Carlsson.
2337
2338         The existing "dispatch to WebThread, then release" model is insufficient and still
2339         can result in RefPtr race conditions between the main thread and the web thread.
2340         Make WebVideoFullscreenInterfaceAVKit a thread-safe ref-counted class, which
2341         eliminates the necessity of disptaching back to the web thread before releasing.
2342
2343         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2344         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2345         (WebVideoFullscreenInterfaceAVKit::setDuration): Use a strongThis model.
2346         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): Ditto.
2347         (WebVideoFullscreenInterfaceAVKit::setRate): Ditto.
2348         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): Ditto.
2349         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): Ditto.
2350         (mediaSelectionOptions): Return a RetainPtr object.
2351         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): Use a strongThis model.
2352         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): Ditto.
2353         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): Ditto.
2354         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
2355         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
2356         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Ditto.
2357         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Ditto.
2358         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Added utility
2359             function. Lets us use the implied this pointer rather than an explicit
2360             strongThis.
2361         (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized): Ditto.
2362         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): Ditto.
2363         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
2364         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
2365         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Use a strongThis model.
2366
2367 2014-12-16  Ryosuke Niwa  <rniwa@webkit.org>
2368
2369         Nested template contents are not cloned by document.importNode
2370         https://bugs.webkit.org/show_bug.cgi?id=137619
2371
2372         Reviewed by Andreas Kling.
2373
2374         The bug was caused by Document.importNode not cloning HTMLTemplateElement's content.
2375
2376         Fixed the bug by sharing code between Document::importNode and Node::cloneNode by
2377         generalizing Node::cloneNodeInternal, added in r177314, by taking the owner document
2378         as an argument. The most of code changes are the result of adding this argument.
2379
2380         Document::importNode is the only function in which the actual logic changes.
2381         Note that the code to import TEXT_NODE, CDATA_SECTION_NODE, ENTITY_REFERENCE_NODE,
2382         PROCESSING_INSTRUCTION_NODE and COMMENT_NODE nodes are identical to that of cloneNode.
2383
2384         This patch removes the call to hasValidNamespaceForElements in ELEMENT_NODE but this
2385         should not introduce an observable behavior change since all instantiated elements
2386         should have a valid namespace in the first place.
2387
2388         Because DOCUMENT_NODE and DOCUMENT_TYPE_NODE cannot be imported and DOCUMENT_TYPE_NODE
2389         can only appear as a direct child of DOCUMENT_NODE, neither nodes nor unimplemented
2390         XPATH_NAMESPACE_NODE and XPATH_NAMESPACE_NODE can appear inside the recursive calls
2391         for ELEMENT_NODE and DOCUMENT_FRAGMENT_NODE nodes.
2392
2393         While importNode behaves differently from cloneNode for ATTRIBUTE_NODE, namely that
2394         it merges all of its child nodes, this behavior isn't present when recursing inside
2395         ELEMENT_NODE and DOCUMENT_FRAGMENT_NODE since we are using cloneDataFromElement.
2396
2397         Thus there should be no observable behavior changes for DOCUMENT_FRAGMENT_NODE and
2398         ELEMENT_NODE nodes either.
2399
2400         Test: fast/dom/HTMLTemplateElement/importNode-nested-templates.html
2401
2402         * dom/Attr.cpp:
2403         (WebCore::Attr::cloneNodeInternal):
2404         * dom/Attr.h:
2405         * dom/CDATASection.cpp:
2406         (WebCore::CDATASection::cloneNodeInternal):
2407         * dom/CDATASection.h:
2408         * dom/Comment.cpp:
2409         (WebCore::Comment::cloneNodeInternal):
2410         * dom/Comment.h:
2411         * dom/ContainerNode.cpp:
2412         (WebCore::ContainerNode::cloneChildNodes):
2413         * dom/Document.cpp:
2414         (WebCore::Document::importNode):
2415         (WebCore::Document::cloneNodeInternal):
2416         * dom/Document.h:
2417         * dom/DocumentFragment.cpp:
2418         (WebCore::DocumentFragment::cloneNodeInternal):
2419         * dom/DocumentFragment.h:
2420         * dom/DocumentType.cpp:
2421         (WebCore::DocumentType::cloneNodeInternal):
2422         * dom/DocumentType.h:
2423         * dom/Element.cpp:
2424         (WebCore::Element::cloneNodeInternal):
2425         (WebCore::Element::cloneElementWithChildren):
2426         (WebCore::Element::cloneElementWithoutChildren):
2427         (WebCore::Element::cloneElementWithoutAttributesAndChildren):
2428         * dom/Element.h:
2429         * dom/EntityReference.cpp:
2430         (WebCore::EntityReference::cloneNodeInternal):
2431         * dom/EntityReference.h:
2432         * dom/Node.h:
2433         (WebCore::Node::cloneNode):
2434         * dom/ProcessingInstruction.cpp:
2435         (WebCore::ProcessingInstruction::cloneNodeInternal):
2436         * dom/ProcessingInstruction.h:
2437         * dom/ShadowRoot.cpp:
2438         (WebCore::ShadowRoot::cloneNodeInternal):
2439         * dom/ShadowRoot.h:
2440         * dom/Text.cpp:
2441         (WebCore::Text::cloneNodeInternal):
2442         * dom/Text.h:
2443         * editing/ApplyStyleCommand.cpp:
2444         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
2445         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
2446         * editing/BreakBlockquoteCommand.cpp:
2447         (WebCore::BreakBlockquoteCommand::doApply):
2448         * editing/InsertParagraphSeparatorCommand.cpp:
2449         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
2450         (WebCore::InsertParagraphSeparatorCommand::doApply):
2451         * editing/ModifySelectionListLevel.cpp:
2452         (WebCore::IncreaseSelectionListLevelCommand::doApply):
2453         * editing/SplitElementCommand.cpp:
2454         (WebCore::SplitElementCommand::doApply):
2455         * editing/markup.cpp:
2456         (WebCore::createFragmentFromText):
2457         * html/HTMLKeygenElement.cpp:
2458         * html/HTMLScriptElement.cpp:
2459         (WebCore::HTMLScriptElement::cloneElementWithoutAttributesAndChildren):
2460         * html/HTMLScriptElement.h:
2461         * html/HTMLTemplateElement.cpp:
2462         (WebCore::HTMLTemplateElement::cloneNodeInternal):
2463         * html/HTMLTemplateElement.h:
2464         * html/shadow/SliderThumbElement.cpp:
2465         (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren):
2466         * html/shadow/SliderThumbElement.h:
2467         * html/track/WebVTTElement.cpp:
2468         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
2469         * html/track/WebVTTElement.h:
2470         * svg/SVGScriptElement.cpp:
2471         (WebCore::SVGScriptElement::cloneElementWithoutAttributesAndChildren):
2472         * svg/SVGScriptElement.h:
2473         * svg/SVGUseElement.cpp:
2474         (WebCore::SVGUseElement::buildShadowTree):
2475         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2476
2477 2014-12-16  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
2478
2479         Document.contentType implementation
2480         https://bugs.webkit.org/show_bug.cgi?id=132269
2481
2482         Reviewed by Darin Adler.
2483
2484         Chromium merge from https://codereview.chromium.org/151653004
2485
2486         Tests: fast/dom/document-contentType-DOMParser.html
2487                fast/dom/document-contentType-createDocument.html
2488                fast/dom/document-contentType-data-uri.html
2489                fast/xsl/xslt-contentType.html
2490                http/tests/dom/document-contentType-meta.html
2491                http/tests/dom/document-contentType-xhr.html
2492                http/tests/dom/document-contentType.html
2493
2494         * dom/Document.cpp:
2495         (WebCore::Document::overrideMIMEType):
2496         (WebCore::Document::contentType):
2497         (WebCore::Document::cloneDataFromDocument):
2498         * dom/Document.h:
2499         * dom/Document.idl:
2500         * loader/DocumentLoader.cpp:
2501         (WebCore::DocumentLoader::currentContentType):
2502         * loader/DocumentLoader.h:
2503         * xml/XMLHttpRequest.cpp:
2504         (WebCore::XMLHttpRequest::responseXML):
2505         * xml/XSLTProcessor.cpp:
2506         (WebCore::XSLTProcessor::createDocumentFromSource):
2507
2508 2014-12-16  Anders Carlsson  <andersca@apple.com>
2509
2510         Put some common code in StorageNamespaceProvider
2511         https://bugs.webkit.org/show_bug.cgi?id=139682
2512
2513         Reviewed by Tim Horton.
2514
2515         We have code in two places that gets the local storage area from a given document,
2516         choosing either the local storage namespace or the transient local storage namespace.
2517         Move it to StorageNamespaceProvider::localStorageArea.
2518
2519         * bindings/js/ScriptController.cpp:
2520         * inspector/InspectorDOMStorageAgent.cpp:
2521         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2522         * page/DOMWindow.cpp:
2523         (WebCore::DOMWindow::localStorage):
2524         * page/Navigator.cpp:
2525         * storage/StorageNamespaceProvider.cpp:
2526         (WebCore::StorageNamespaceProvider::localStorageArea):
2527         (WebCore::StorageNamespaceProvider::localStorageNamespace):
2528         * storage/StorageNamespaceProvider.h:
2529
2530 2014-12-16  Anders Carlsson  <andersca@apple.com>
2531
2532         Add FeatureCounterKeys.h to the Xcode project.
2533
2534         * WebCore.xcodeproj/project.pbxproj:
2535
2536 2014-12-16  Chris Dumez  <cdumez@apple.com>
2537
2538         REGRESSION (r163928): Animated GIFs are not resumed when translated into view using -webkit-transform
2539         https://bugs.webkit.org/show_bug.cgi?id=139672
2540         <rdar://problem/19260797>
2541
2542         Reviewed by Antti Koivisto.
2543
2544         After r163928, animated GIFs were not resumed when translated into view
2545         using '-webkit-transform' CSS property.
2546
2547         This broke animated gifs on the mobile version of weibo.com (which is
2548         one of the most popular blogging sites in China) on iPhone. e.g.
2549         http://m.weibo.cn/page/tpl?containerid=1005052150182731_-_WEIBO_SECOND_PROFILE_WEIBO&itemid=&title=全部微博
2550
2551         This patch calls FrameView::resumeVisibleImageAnimationsIncludingSubframes()
2552         after style recalc so that we resume animated images if they become visible
2553         after the style has changed. Doing so after layout wouldn't work because
2554         no layout happens in this case.
2555
2556         Test: fast/images/animated-gif-webkit-transform.html
2557
2558         * dom/Document.cpp:
2559         (WebCore::Document::recalcStyle):
2560
2561 2014-12-16  Sebastian Dröge  <sebastian@centricular.com>
2562
2563         [GStreamer] Fix deadlock when shutting down AudioDestination
2564         https://bugs.webkit.org/show_bug.cgi?id=139496
2565
2566         Reviewed by Philippe Normand.
2567
2568         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2569         (webKitWebAudioSrcLoop):
2570         (webKitWebAudioSrcChangeState):
2571         Sometimes we would wait forever for the task to shut down. This
2572         was happening because of a bug in GStreamer that caused joining
2573         a paused task to deadlock.
2574
2575 2014-12-15  Dhi Aurrahman  <diorahman@rockybars.com>
2576
2577         Extend :lang()'s selector checker to handle ranges with '*' properly and perform matching within the ASCII range
2578         https://bugs.webkit.org/show_bug.cgi?id=139340
2579
2580         Reviewed by Benjamin Poulain.
2581
2582         Asterisk is considered as a valid subtag of a language range to express wildcard matching 
2583         in :lang()'s extended filtering procedure. The matching rules introduced by language 
2584         range with '*' is outlined in [1].
2585
2586         The matching of subtags is performed case-insensitively within the ASCII range[2].
2587
2588         [1] www.ietf.org/rfc/rfc4647.txt
2589         [2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
2590
2591         Test: fast/selectors/lang-equal-ignoring-case.html
2592               fast/selectors/lang-valid-extended-filtering.html
2593
2594         * css/SelectorCheckerTestFunctions.h:
2595         (WebCore::equalIgnoringCaseWithinASCIIRange): Handle matching case-insensitively within the ASCII range.
2596         (WebCore::containslanguageSubtagMatchingRange):
2597         (WebCore::matchesLangPseudoClass):
2598
2599 2014-12-15  Chris Dumez  <cdumez@apple.com>
2600
2601         [iOS] Add feature counting support
2602         https://bugs.webkit.org/show_bug.cgi?id=139652
2603         <rdar://problem/19255690>
2604
2605         Reviewed by Gavin Barraclough.
2606
2607         Use FeatureCounter API to log PageCache failure reasons
2608         as well as its success rate.
2609
2610         No new tests, no behavior change.
2611
2612         * history/PageCache.cpp:
2613         (WebCore::logCanCacheFrameDecision):
2614         (WebCore::logCanCachePageDecision):
2615         (WebCore::PageCache::canCache):
2616         * platform/FeatureCounterKeys.h: Added.
2617
2618 2014-12-15  Beth Dakin  <bdakin@apple.com>
2619
2620         Speculative build fix.
2621
2622         * platform/spi/mac/LookupSPI.h:
2623
2624 2014-12-15  Beth Dakin  <bdakin@apple.com>
2625
2626         Speculative build fix.
2627
2628         * platform/spi/mac/LookupSPI.h:
2629
2630 2014-12-15  Jer Noble  <jer.noble@apple.com>
2631
2632         Switching src of <video> with clipping layer results in empty black square.
2633         https://bugs.webkit.org/show_bug.cgi?id=139650
2634
2635         Reviewed by Simon Fraser.
2636
2637         Test: compositing/video-clip-change-src.html
2638
2639         When the contentsLayer changes after a contentsClippingLayer has already been created, make sure to parent the
2640         new contentsLayer, as updateRects() will only reparent when first creating a contentsClippingLayer.
2641
2642         * platform/graphics/ca/GraphicsLayerCA.cpp:
2643         (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
2644
2645 2014-12-15  Beth Dakin  <bdakin@apple.com>
2646
2647         Make lookup an immediate action instead of an action menu item
2648         https://bugs.webkit.org/show_bug.cgi?id=139661
2649         -and corresponding-
2650         rdar://problem/19198414
2651
2652         Reviewed by Tim Horton.
2653
2654         New SPI.
2655         * platform/spi/mac/LookupSPI.h:
2656
2657 2014-12-12  Anders Carlsson  <andersca@apple.com>
2658
2659         Get rid of the DONT_FINALIZE_ON_MAIN_THREAD #define
2660         https://bugs.webkit.org/show_bug.cgi?id=139613
2661
2662         Reviewed by Sam Weinig.
2663
2664         * WebCore.exp.in:
2665         Update symbols.
2666
2667         * WebCore.xcodeproj/project.pbxproj:
2668         Remove -Wno-deprecated-declarations from the WebCoreObjCExtras.mm build flags.
2669
2670         * platform/mac/WebCoreObjCExtras.h:
2671         If OBJC_NO_GC is defined to 1, just make WebCoreObjCFinalizeOnMainThread a no-op inline function.
2672
2673         * platform/mac/WebCoreObjCExtras.mm:
2674         (WebCoreObjCFinalizeOnMainThread):
2675         Move this to the .h file for easier inlining.
2676
2677         (WebCoreObjCScheduleDeallocateOnMainThread):
2678         Use a lambda.
2679
2680 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
2681
2682         Separate counted and hysteresis activities in PageThrottler
2683         https://bugs.webkit.org/show_bug.cgi?id=139657
2684
2685         Reviewed by Sam Weinig.
2686
2687         Currently all activities funnel into a common hysteresis mechanism, the result of
2688         which is combined with the visually idle state, the result of which in turn drives
2689         a UserActivity::Impl.
2690
2691         This is a first refactoring towards moving the UserActivity out to WebKit2. Use
2692         m_hysteresis only of the impulse activities (plugin evaluation, user input), and
2693         flatten the three types of activities (impulse, counted, ViewState) to all directly
2694         control a UserActivity. Switch from a UserActivity::Impl to a UserActivity since
2695         this will provide hysteresis for media activity.
2696
2697         * page/PageThrottler.cpp:
2698         (WebCore::m_pageActivityCounter):
2699             - when the RefCounter changes just call updateUserActivity directly, removeed redundant call to updateUserActivity.
2700         (WebCore::PageThrottler::createUserActivity):
2701             - m_activity is now a UserActivity.
2702         (WebCore::PageThrottler::updateUserActivity):
2703             - previously just checked m_hysteresis for activity; now check m_pageActivityCounter too.
2704         (WebCore::PageThrottler::pageActivityCounterValueDidChange): Deleted.
2705             - no longer needed; when the RefCounter changes just call updateUserActivity directly.
2706         * page/PageThrottler.h:
2707             - removed pageActivityCounterValueDidChange, m_activity is now a UserActivity.
2708
2709 2014-12-15  Commit Queue  <commit-queue@webkit.org>
2710
2711         Unreviewed, rolling out r177284.
2712         https://bugs.webkit.org/show_bug.cgi?id=139658
2713
2714         "Breaks API tests and LayoutTests on Yosemite Debug"
2715         (Requested by msaboff on #webkit).
2716
2717         Reverted changeset:
2718
2719         "Make sure range based iteration of Vector<> still receives
2720         bounds checking"
2721         https://bugs.webkit.org/show_bug.cgi?id=138821
2722         http://trac.webkit.org/changeset/177284
2723
2724 2014-12-15  Ryosuke Niwa  <rniwa@webkit.org>
2725
2726         cloneNode(true) does not clone nested template elements' contents
2727         https://bugs.webkit.org/show_bug.cgi?id=137755
2728
2729         Reviewed by Darin Adler.
2730
2731         The bug was caused by cloneChildNodes not copying template element's content.
2732
2733         Fixed the bug by adding the third behavior (CloneContent) to the polymorphic
2734         cloneNodeInternal, which copies template element's content but not its children,
2735         in addition to the existing CloneSelf (deep=false) and CloneChildren (deep=true).
2736
2737         Test: fast/dom/HTMLTemplateElement/cloneNode-nested-templates.html
2738
2739         * dom/Attr.cpp:
2740         (WebCore::Attr::cloneNodeInternal): Renamed from cloneNode.
2741         * dom/Attr.h:
2742         * dom/CDATASection.cpp:
2743         (WebCore::CDATASection::cloneNodeInternal): Renamed from cloneNode.
2744         * dom/CDATASection.h:
2745         * dom/Comment.cpp:
2746         (WebCore::Comment::cloneNodeInternal): Renamed from cloneNode.
2747         * dom/Comment.h:
2748         * dom/ContainerNode.cpp:
2749         (WebCore::ContainerNode::cloneChildNodes): Calls cloneNode with CloneContent.
2750         * dom/Document.cpp:
2751         (WebCore::Document::cloneNodeInternal): Renamed from cloneNode.
2752         * dom/Document.h:
2753         * dom/DocumentFragment.cpp:
2754         (WebCore::DocumentFragment::cloneNodeInternal): Renamed from cloneNode.
2755         * dom/DocumentFragment.h:
2756         * dom/DocumentType.cpp:
2757         (WebCore::DocumentType::cloneNodeInternal): Renamed from cloneNode.
2758         * dom/DocumentType.h:
2759         * dom/Element.cpp:
2760         (WebCore::Element::cloneNodeInternal): Renamed from cloneNode.
2761         * dom/Element.h:
2762         * dom/EntityReference.cpp:
2763         (WebCore::EntityReference::cloneNodeInternal): Renamed from cloneNode.
2764         * dom/EntityReference.h:
2765         * dom/Node.h:
2766         (WebCore::Node::cloneNode): Added. It calls cloneNodeInternal with CloneSelf or CloneChildren.
2767         * dom/ProcessingInstruction.cpp:
2768         (WebCore::ProcessingInstruction::cloneNodeInternal): Renamed from cloneNode.
2769         * dom/ProcessingInstruction.h:
2770         * dom/ShadowRoot.cpp:
2771         (WebCore::ShadowRoot::cloneNodeInternal): Renamed from cloneNode. Also moved from ShadowRoot.h.
2772         * dom/ShadowRoot.h:
2773         * dom/Text.cpp:
2774         (WebCore::Text::cloneNodeInternal): Renamed from cloneNode.
2775         * dom/Text.h:
2776         * html/HTMLTemplateElement.cpp:
2777         (WebCore::HTMLTemplateElement::cloneNodeInternal): Renamed from cloneNode. This is the only
2778         function in which CloneContent results in a different behavior from CloneSelf.
2779         * html/HTMLTemplateElement.h:
2780
2781 2014-12-15  Benjamin Poulain  <bpoulain@apple.com>
2782
2783         Unify the various serialization of selector list
2784         https://bugs.webkit.org/show_bug.cgi?id=139606
2785
2786         Reviewed by Andreas Kling.
2787
2788         There were code in various place to build a string from the selectors contained
2789         in a selecor list.
2790
2791         This patch adds a single function to do that: buildSelectorsText(). All the call sites
2792         were modified to use it.
2793
2794         The serialization of :-webkit-any() gets fixed as a result.
2795
2796         * css/CSSSelector.cpp:
2797         (WebCore::CSSSelector::selectorText):
2798         (WebCore::appendSelectorList): Deleted.
2799         * css/CSSSelectorList.cpp:
2800         (WebCore::CSSSelectorList::selectorsText):
2801         (WebCore::CSSSelectorList::buildSelectorsText):
2802         * css/CSSSelectorList.h:
2803         * css/CSSStyleRule.cpp:
2804         (WebCore::CSSStyleRule::generateSelectorText):
2805         * css/WebKitCSSRegionRule.cpp:
2806         (WebCore::WebKitCSSRegionRule::cssText):
2807
2808 2014-12-15  Antti Koivisto  <antti@apple.com>
2809
2810         Try to fix iOS build.
2811
2812         * WebCore.exp.in:
2813
2814 2014-12-15  Javier Fernandez  <jfernandez@igalia.com>
2815
2816         Floats Don't Overhang Their Block Formatting Contex
2817         https://bugs.webkit.org/show_bug.cgi?id=139476
2818
2819         Reviewed by David Hyatt.
2820
2821         From Blink r172530 by <robhogan@gmail.com>
2822
2823         Floats Don't Overhang Their Block Formatting Context Per
2824         http://www.w3.org/TR/CSS2/visuren.html#float-position: "References
2825         to [the elements] in the [rules that govern the behaviour of
2826         floats] refer only to other elements in the same block formatting
2827         context as the float."
2828
2829         This means we don't need to look for intruding or overhanging
2830         floats in boxes that establish a new block formatting
2831         context. Even that we don't have a test breaking this rule it
2832         seems we are doing unnecessary work in
2833         rebuildFloatsFromIntruding() so make sure we avoid adding floats
2834         from different block formatting contexts.
2835
2836         Test:
2837         fast/block/float/floats-do-not-overhang-from-block-formatting-context.html
2838
2839         * rendering/RenderBlockFlow.cpp:
2840         (WebCore::RenderBlockFlow::addIntrudingFloats):
2841
2842 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
2843
2844         Unreviewed build fix after r177301
2845
2846         * html/ColorInputType.cpp:
2847         (WebCore::ColorInputType::elementRectRelativeToRootView):
2848
2849 2014-12-15  Timothy Horton  <timothy_horton@apple.com>
2850
2851         Implement Data Detectors immediate actions for WebKit2
2852         https://bugs.webkit.org/show_bug.cgi?id=139617
2853         <rdar://problem/19198539>
2854
2855         Reviewed by Beth Dakin.
2856
2857         * platform/spi/mac/DataDetectorsSPI.h:
2858         Add some new SPI.
2859
2860 2014-12-12  Simon Fraser  <simon.fraser@apple.com>
2861
2862         REGRESSION (r168217): Images are cropped out during animation at jetblue.com
2863         https://bugs.webkit.org/show_bug.cgi?id=136410
2864         rdar://problem/18188533
2865
2866         Reviewed by Dean Jackson.
2867         
2868         During GraphicsLayer flushing, for tiled layers we can compute a visible rect using
2869         the current state of an animation, which is obtained via the AnimationController.
2870         If that animation was running in a subframe, AnimationController could use a stale
2871         beginAnimationUpdateTime since no-one called its beginAnimationUpdate(). That
2872         resulted in an incorrect computation of the visible rect, resulting in missing tiles.
2873         
2874         There are two parts to this fix. First, add an assertion that beginAnimationUpdateTime()
2875         is being called inside an animation update block. This required moving m_beginAnimationUpdateCount
2876         into AnimationControllerPrivate, and changes to endAnimationUpdate().
2877         
2878         The second is adding a AnimationUpdateBlock to getAnimatedStyleForRenderer(), which
2879         can be called outside of style resolution. We also need some in other API functions.
2880         
2881         Testing revealed that layout can call via layoutOverflowRectForPropagation(), suggesting
2882         that we should have an animation batch inside FrameView::layout(). In addition, a single
2883         resolveStyle/layout should use the same animationBeginTime, so we add a batch to 
2884         updateLayoutAndStyleIfNeededRecursive().
2885         
2886         Identical to the patch that was rolled out in r177269 with the addition of a 
2887         Ref<Frame> protector(m_frame) in AnimationControllerPrivate::animationTimerFired()
2888         that ensures that the AnimationControllerPrivate is kept alive for the scope of
2889         the AnimationPrivateUpdateBlock, when a transitionEnd event destroys an iframe.
2890         
2891         No test because it's timing-dependent. Existing tests exercise the new assertion.
2892
2893         * css/CSSComputedStyleDeclaration.cpp:
2894         (WebCore::computeRenderStyleForProperty):
2895         * page/FrameView.cpp:
2896         (WebCore::FrameView::layout):
2897         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2898         * page/animation/AnimationController.cpp:
2899         (WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
2900         (WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
2901         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
2902         (WebCore::AnimationControllerPrivate::animationTimerFired):
2903         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2904         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2905         (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
2906         (WebCore::AnimationControllerPrivate::beginAnimationUpdate):
2907         (WebCore::AnimationControllerPrivate::endAnimationUpdate):
2908         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
2909         (WebCore::AnimationController::AnimationController):
2910         (WebCore::AnimationController::notifyAnimationStarted):
2911         (WebCore::AnimationController::pauseAnimationAtTime):
2912         (WebCore::AnimationController::pauseTransitionAtTime):
2913         (WebCore::AnimationController::resumeAnimationsForDocument):
2914         (WebCore::AnimationController::startAnimationsIfNotSuspended):
2915         (WebCore::AnimationController::beginAnimationUpdate):
2916         (WebCore::AnimationController::endAnimationUpdate):
2917         * page/animation/AnimationController.h:
2918         * page/animation/AnimationControllerPrivate.h:
2919
2920 2014-12-12  Simon Fraser  <simon.fraser@apple.com>
2921
2922         REGRESSION (r168217): Images are cropped out during animation at jetblue.com
2923         https://bugs.webkit.org/show_bug.cgi?id=136410
2924
2925         Reviewed by Dean Jackson.
2926
2927         We were hitting the new assertion under Page::setPageScaleFactor(), which
2928         calls recalcStyle(), so move the AnimationUpdateBlock from updateStyleIfNeeded()
2929         to recalcStyle().
2930
2931         * dom/Document.cpp:
2932         (WebCore::Document::recalcStyle):
2933         (WebCore::Document::updateStyleIfNeeded):
2934
2935 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
2936
2937         Addressing post-review comments in r177035
2938         https://bugs.webkit.org/show_bug.cgi?id=139557
2939
2940         Reviewed by Darin Adler.
2941
2942         This patch deletes the helper functions rendererBoundingBox() and rendererAnchorRect() and
2943         migrates callers to using renderers directly.
2944
2945         It also improves the comment in RenderElement.h regarding RenderElement::anchorRect().
2946
2947         No new tests because this is simply refactoring.
2948
2949         * WebCore.exp.in: Delete exported symbol for rendererBoundingBox()
2950         * accessibility/AccessibilitySlider.cpp:
2951         (WebCore::AccessibilitySliderThumb::elementRect): Migrate off rendererBoundingBox()
2952         * dom/ContainerNode.cpp:
2953         (WebCore::rendererAnchorRect): Deleted.
2954         * dom/ContainerNode.h:
2955         * dom/Node.cpp:
2956         (WebCore::rendererBoundingBox): Deleted.
2957         * dom/Node.h:
2958         * html/ColorInputType.cpp:
2959         (WebCore::ColorInputType::elementRectRelativeToRootView): Migrate off rendererBoundingBox().
2960         * html/HTMLInputElement.cpp:
2961         (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
2962         * html/ValidationMessage.cpp:
2963         (WebCore::ValidationMessage::buildBubbleTree): Ditto.
2964         * page/FrameView.cpp:
2965         (WebCore::FrameView::scrollElementToRect): Migrate off rendererAnchorRect().
2966         (WebCore::FrameView::scrollToAnchor): Ditto.
2967         * page/SpatialNavigation.cpp:
2968         (WebCore::nodeRectInAbsoluteCoordinates): Migrate off rendererBoundingBox().
2969         * rendering/RenderElement.h:
2970
2971 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
2972
2973         Delete Notation because we don't use it
2974         https://bugs.webkit.org/show_bug.cgi?id=139171
2975
2976         Reviewed by Kent Tamura.
2977
2978         No tests because this is un-exposing something that never gets instantiated.
2979
2980         * CMakeLists.txt:
2981         * DerivedSources.cpp:
2982         * DerivedSources.make:
2983         * WebCore.exp.in:
2984         * WebCore.order:
2985         * WebCore.vcxproj/WebCore.vcxproj:
2986         * WebCore.vcxproj/WebCore.vcxproj.filters:
2987         * WebCore.xcodeproj/project.pbxproj:
2988         * bindings/gobject/WebKitDOMNodeFilter.h:
2989         * bindings/gobject/WebKitDOMNodeFilter.symbols:
2990         * bindings/gobject/WebKitDOMPrivate.cpp:
2991         (WebKit::wrap):
2992         * bindings/gobject/webkitdom.symbols:
2993         * bindings/js/JSNodeCustom.cpp:
2994         (WebCore::createWrapperInline):
2995         * bindings/objc/DOM.mm:
2996         (kitClass):
2997         * bindings/objc/DOMCore.h:
2998         * bindings/objc/PublicDOMInterfaces.h:
2999         * dom/DOMAllInOne.cpp:
3000         * dom/Document.cpp:
3001         (WebCore::Document::importNode):
3002         (WebCore::Document::adoptNode):
3003         (WebCore::Document::childTypeAllowed):
3004         (WebCore::Document::canReplaceChild):
3005         * dom/Node.cpp:
3006         (WebCore::Node::dumpStatistics):
3007         (WebCore::Node::isDefaultNamespace):
3008         (WebCore::Node::lookupPrefix):
3009         (WebCore::Node::lookupNamespaceURI):
3010         (WebCore::appendTextContent):
3011         (WebCore::Node::setTextContent):
3012         * dom/Node.h:
3013         * dom/Node.idl:
3014         * dom/NodeFilter.h:
3015         * dom/NodeFilter.idl:
3016         * dom/Notation.cpp: Removed.
3017         * dom/Notation.h: Removed.
3018         * dom/Notation.idl: Removed.
3019         * dom/Range.cpp:
3020         (WebCore::lengthOfContentsInNode):
3021         (WebCore::Range::processContentsBetweenOffsets):
3022         (WebCore::Range::insertNode):
3023         (WebCore::Range::checkNodeWOffset):
3024         (WebCore::Range::checkNodeBA):
3025         (WebCore::Range::selectNode):
3026         (WebCore::Range::selectNodeContents):
3027         (WebCore::Range::surroundContents):
3028         * editing/MarkupAccumulator.cpp:
3029         (WebCore::MarkupAccumulator::appendStartMarkup):
3030         * xml/XPathUtil.cpp:
3031         (WebCore::XPath::isValidContextNode):
3032
3033 2014-12-15  Gavin Barraclough  <barraclough@apple.com>
3034
3035         Change HysteresisActivity to use a lambda
3036         https://bugs.webkit.org/show_bug.cgi?id=139636
3037
3038         Reviewed by Darin Adler.
3039
3040         The current implementation provides notifications via callbacks to a delegate. Using a delegate
3041         with callbacks is limiting a number of ways. The callback names are very ambiguous, the callbacks
3042         must either be on a separate object (more boilerplate), or the callback must be public for
3043         HysteresisActivity to call them, or friends get involved. Without the boilerplate of extra
3044         delegate objects it's hard to scale use of these objects - a single object can't serve as a
3045         delegate for multiple HysteresisActivity members.
3046
3047         Instead, make HysteresisActivity take a lambda to callback on state change. To simplify, changed
3048         HysteresisState to only track Started/Stopped states (removed WillStopPendingTimeout).
3049
3050         * WebCore.exp.in:
3051             - removed exports of deleted functions.
3052         * page/PageThrottler.cpp:
3053         (WebCore::PageThrottler::PageThrottler):
3054             - m_hysteresis lambda calls updateUserActivity.
3055         (WebCore::PageThrottler::pageActivityCounterValueDidChange):
3056             - ASSERT updated due to removal of WillStopPendingTimeout state.
3057         (WebCore::PageThrottler::started): Deleted.
3058         (WebCore::PageThrottler::stopped): Deleted.
3059             - functionality replaced by lambda.
3060         * page/PageThrottler.h:
3061             - HysteresisActivity is no longer templated on delegate type, removed function declarations & friend.
3062         * platform/HysteresisActivity.h:
3063         (WebCore::HysteresisActivity::HysteresisActivity):
3064             - HysteresisActivity takes a lambda, not a delegate.
3065         (WebCore::HysteresisActivity::start):
3066             - delegate call -> callback.
3067         (WebCore::HysteresisActivity::state):
3068             - simplified to remove WillStopPendingTimeout.
3069         (WebCore::HysteresisActivity::hysteresisTimerFired):
3070             - delegate call -> callback.
3071         * platform/UserActivity.cpp:
3072         (WebCore::UserActivity::UserActivity):
3073             - HysteresisActivity lambda calls hysteresisUpdated.
3074         (WebCore::UserActivity::hysteresisUpdated):
3075         (WebCore::UserActivity::started): Deleted.
3076         (WebCore::UserActivity::stopped): Deleted.
3077             - started/stopped -> hysteresisUpdated.
3078         * platform/UserActivity.h:
3079             - started/stopped -> hysteresisUpdated, removed friend.
3080
3081 2014-12-15  Antti Koivisto  <antti@apple.com>
3082
3083         WebKit level persistent caching
3084         https://bugs.webkit.org/show_bug.cgi?id=30322
3085
3086         Reviewed by Sam Weinig.
3087
3088         Test: http/tests/cache/disk-cache-validation.html
3089
3090         * WebCore.exp.in:
3091         * inspector/InspectorResourceAgent.cpp:
3092         (WebCore::buildObjectForResourceResponse):
3093         * platform/network/ResourceResponseBase.cpp:
3094         (WebCore::ResourceResponseBase::ResourceResponseBase):
3095         (WebCore::ResourceResponseBase::source):
3096         (WebCore::ResourceResponseBase::setSource):
3097         (WebCore::ResourceResponseBase::wasCached): Deleted.
3098         (WebCore::ResourceResponseBase::setWasCached): Deleted.
3099
3100             Replace wasCached bit with Source enum.
3101             This is useful for testing.
3102
3103         * platform/network/ResourceResponseBase.h:
3104         (WebCore::ResourceResponseBase::containsCertificateInfo):
3105         (WebCore::ResourceResponseBase::encode):
3106         (WebCore::ResourceResponseBase::decode):
3107         * testing/Internals.cpp:
3108         (WebCore::Internals::xhrResponseSource):
3109         (WebCore::Internals::clearMemoryCache):
3110         * testing/Internals.h:
3111         * testing/Internals.idl:
3112
3113             Testing support.
3114
3115         * xml/XMLHttpRequest.h:
3116
3117 2014-12-15  Andreas Kling  <akling@apple.com>
3118
3119         Purge PassRefPtr from FocusEvent code.
3120         <https://webkit.org/b/139647>
3121
3122         Reviewed by Anders Carlsson.
3123
3124         Convert FocusEvent-related code from using PassRefPtr to using RefPtr&& instead.
3125
3126         * dom/Document.cpp:
3127         (WebCore::Document::setFocusedElement):
3128         * dom/Element.cpp:
3129         (WebCore::Element::dispatchFocusInEvent):
3130         (WebCore::Element::dispatchFocusOutEvent):
3131         (WebCore::Element::dispatchFocusEvent):
3132         (WebCore::Element::dispatchBlurEvent):
3133         * dom/Element.h:
3134         * dom/FocusEvent.cpp:
3135         (WebCore::FocusEvent::FocusEvent):
3136         * dom/FocusEvent.h:
3137         * html/HTMLFormControlElement.cpp:
3138         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
3139         * html/HTMLFormControlElement.h:
3140         * html/HTMLSelectElement.cpp:
3141         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3142         (WebCore::HTMLSelectElement::dispatchBlurEvent):
3143         * html/HTMLSelectElement.h:
3144         * html/HTMLTextFormControlElement.cpp:
3145         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
3146         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
3147         * html/HTMLTextFormControlElement.h:
3148         * page/FocusController.cpp:
3149         (WebCore::dispatchEventsOnWindowAndFocusedElement):
3150
3151 2014-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
3152
3153         [iOS] Codepoints not associated with languages are drawn as boxes
3154         https://bugs.webkit.org/show_bug.cgi?id=138906
3155
3156         Reviewed by Darin Adler.
3157
3158         Use SPI CTFontCreateForCharacters(), but only if we don't already know what to do
3159         with the characters.
3160
3161         Test: platform/ios-simulator/fast/text/non-language-font-fallback.html
3162
3163         * platform/graphics/ios/FontCacheIOS.mm:
3164         (WebCore::FontCache::systemFallbackForCharacters):
3165         * platform/spi/cocoa/CoreTextSPI.h:
3166
3167 2014-12-15  Bem Jones-Bey  <bjonesbe@adobe.com>
3168
3169         [CSS Shapes] Fix StyleBuilder code to use CSSValueNone to match spec and other code
3170         https://bugs.webkit.org/show_bug.cgi?id=139601
3171
3172         Reviewed by Chris Dumez.
3173
3174         Change the code to properly use CSSValueNone instead of CSSValueAuto.
3175         Asserts have been added to catch similar errors in the future.
3176         In doing this change, it became apparent that there is nothing
3177         special about the shape-outside property that requires custom code, so
3178         it was changed to use a standard converter function. 
3179
3180         No change observable via LayoutTests.
3181
3182         * css/CSSPropertyNames.in: Use a converter instead of custom code.
3183         * css/StyleBuilderConverter.h:
3184         (WebCore::isImageShape): Helper function so that isImageSetValue can
3185             be properly guarded.
3186         (WebCore::StyleBuilderConverter::convertShapeValue): Format as a
3187             converter instead of custom code.
3188         * css/StyleBuilderCustom.h:
3189         (WebCore::StyleBuilderCustom::applyValueWebkitShapeOutside): Deleted.
3190
3191 2014-12-15  Oliver Hunt  <oliver@apple.com>
3192
3193         Make sure range based iteration of Vector<> still receives bounds checking
3194         https://bugs.webkit.org/show_bug.cgi?id=138821
3195
3196         Reviewed by Mark Lam.
3197
3198         Update to deal with different iterator type.
3199
3200         * bindings/js/SerializedScriptValue.cpp:
3201         (WebCore::CloneDeserializer::deserializeString):
3202         * editing/TextIterator.cpp:
3203         (WebCore::SearchBuffer::isBadMatch):
3204         * page/mac/ServicesOverlayController.mm:
3205         (WebCore::ServicesOverlayController::buildSelectionHighlight):
3206         * platform/graphics/SegmentedFontData.cpp:
3207         (WebCore::SegmentedFontData::fontDataForCharacter):
3208         (WebCore::SegmentedFontData::containsCharacter):
3209         (WebCore::SegmentedFontData::isLoading):
3210         * platform/graphics/WOFFFileFormat.cpp:
3211         (WebCore::convertWOFFToSfnt):
3212         * platform/graphics/cairo/GradientCairo.cpp:
3213         (WebCore::Gradient::platformGradient):
3214         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3215         (WebCore::GIFImageDecoder::clearFrameBufferCache):
3216         * rendering/RenderBox.cpp:
3217         (WebCore::RenderBox::paintFillLayers):
3218         * rendering/style/GridResolvedPosition.cpp:
3219         (WebCore::firstNamedGridLineBeforePosition):
3220         (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
3221         * svg/SVGFontElement.cpp:
3222         (WebCore::kerningForPairOfStringsAndGlyphs):
3223         * svg/SVGPathByteStream.h:
3224         (WebCore::SVGPathByteStream::append):
3225         * xml/XPathNodeSet.h:
3226         (WebCore::XPath::NodeSet::begin):
3227         (WebCore::XPath::NodeSet::end):
3228
3229 2014-12-15  Chris Dumez  <cdumez@apple.com>
3230
3231         Move '-webkit-text-decoration-skip' to the new StyleBuilder
3232         https://bugs.webkit.org/show_bug.cgi?id=139633
3233
3234         Reviewed by Darin Adler.
3235
3236         Move '-webkit-text-decoration-skip' to the new StyleBuilder by
3237         introducing a new TextDecorationSkip converter.
3238
3239         No new tests, no behavior change.
3240
3241         * css/CSSPropertyNames.in:
3242         * css/DeprecatedStyleBuilder.cpp:
3243         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3244         (WebCore::valueToDecorationSkip): Deleted.
3245         (WebCore::ApplyPropertyTextDecorationSkip::applyValue): Deleted.
3246         (WebCore::ApplyPropertyTextDecorationSkip::createHandler): Deleted.
3247         * css/StyleBuilderConverter.h:
3248         (WebCore::StyleBuilderConverter::valueToDecorationSkip):
3249         (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
3250
3251 2014-12-15  Bartlomiej Gajda  <b.gajda@samsung.com>
3252
3253         [MSE] Prevent SourceBuffer monitoring algorithm from triggering a HAVE_NOTHING to HAVE_METADATA transition.
3254         https://bugs.webkit.org/show_bug.cgi?id=139444
3255
3256         Reviewed by Jer Noble.
3257
3258         In case of 2 SourceBuffers, there can be transition to HaveMetadata from monitorSourceBuffers,
3259         even though second SourceBuffer did not receive init segment - we can't query for it's metadata
3260         such as width/height (if second one was video), so we shouldn't fire the event.
3261         W3 Bug reference : https://www.w3.org/Bugs/Public/show_bug.cgi?id=27542
3262
3263         Test: media/media-source/media-source-loadedmetada-with-two-sourcebuffers.html
3264
3265         * Modules/mediasource/MediaSource.cpp:
3266         (WebCore::MediaSource::monitorSourceBuffers):
3267         * Modules/mediasource/SourceBuffer.h:
3268         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3269         (WebCore::mimeTypeCache):
3270
3271 2014-12-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3272
3273         Move WebCore/platform/text to std::unique_ptr 
3274         https://bugs.webkit.org/show_bug.cgi?id=139395
3275
3276         Reviewed by Darin Adler.
3277
3278         As a step to use std::unique_ptr<>, this patch replaces OwnPtr|PassOwnPtr with
3279         std::unique_ptr<> | std::make_unique<>.
3280
3281         * dom/Document.h:
3282         * platform/text/LineBreakIteratorPoolICU.h:
3283         (WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
3284         (WebCore::LineBreakIteratorPool::create): Deleted.
3285         * platform/text/LocaleICU.cpp:
3286         (WebCore::Locale::create):
3287         (WebCore::LocaleICU::createLabelVector):
3288         (WebCore::createFallbackMonthLabels):
3289         (WebCore::createFallbackAMPMLabels):
3290         (WebCore::LocaleICU::initializeDateTimeFormat):
3291         (WebCore::LocaleICU::shortMonthLabels):
3292         (WebCore::LocaleICU::create): Deleted.
3293         (WebCore::LocaleICU::standAloneMonthLabels): Deleted.
3294         (WebCore::LocaleICU::shortStandAloneMonthLabels): Deleted.
3295         * platform/text/LocaleICU.h:
3296         * platform/text/LocaleNone.cpp:
3297         (WebCore::Locale::create):
3298         * platform/text/PlatformLocale.h:
3299         (WebCore::Locale::createDefault):
3300         * platform/text/TextCodecLatin1.cpp:
3301         * platform/text/TextCodecUTF16.cpp:
3302         * platform/text/TextEncoding.cpp:
3303         * platform/text/mac/LocaleMac.h:
3304         * platform/text/mac/LocaleMac.mm:
3305         (WebCore::Locale::create):
3306         (WebCore::LocaleMac::create):
3307         * platform/text/mac/TextCodecMac.cpp:
3308         * platform/text/win/LocaleWin.cpp:
3309         (WebCore::Locale::create):
3310         (WebCore::LocaleWin::create):
3311         * platform/text/win/LocaleWin.h:
3312         * platform/text/win/TextCodecWin.cpp:
3313         (WebCore::newTextCodecWin):
3314
3315 2014-12-15  Xavier Claessens  <xavier.claessens@collabora.com>
3316
3317         [GStreamer] the webkitwebsrc element can stale
3318         https://bugs.webkit.org/show_bug.cgi?id=138425
3319
3320         Reviewed by Philippe Normand.
3321
3322         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3323         (removeTimeoutSources):
3324         (webKitWebSrcStart):
3325         (webKitWebSrcChangeState):
3326
3327 2014-12-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3328
3329         [GTK] Remove GamepadDeviceGtk::create()
3330         https://bugs.webkit.org/show_bug.cgi?id=139637
3331
3332         Reviewed by Carlos Garcia Campos.
3333
3334         std::make_unique<> can replace GamepadDeviceGtk::create() factory function.
3335
3336         * platform/gtk/GamepadsGtk.cpp: Add "explicit" to GamepadsGtk constructor.
3337         (WebCore::GamepadsGtk::registerDevice):
3338         (WebCore::GamepadDeviceGtk::create): Deleted.
3339
3340 2014-12-15  Chris Dumez  <cdumez@apple.com>
3341
3342         Move 'counter-increment' / 'counter-reset' to the new StyleBuilder
3343         https://bugs.webkit.org/show_bug.cgi?id=139635
3344
3345         Reviewed by Antti Koivisto.
3346
3347         Move 'counter-increment' / 'counter-reset' to the new StyleBuilder by
3348         using custom code.
3349
3350         No new tests, no behavior change.
3351
3352         * css/CSSPropertyNames.in:
3353         * css/DeprecatedStyleBuilder.cpp:
3354         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3355         (WebCore::ApplyPropertyCounter::emptyFunction): Deleted.
3356         (WebCore::ApplyPropertyCounter::applyInheritValue): Deleted.
3357         (WebCore::ApplyPropertyCounter::applyValue): Deleted.
3358         (WebCore::ApplyPropertyCounter::createHandler): Deleted.
3359         * css/StyleBuilderCustom.h:
3360         (WebCore::StyleBuilderCustom::applyInitialCounterIncrement):
3361         (WebCore::StyleBuilderCustom::applyInitialCounterReset):
3362         (WebCore::StyleBuilderCustom::applyInheritCounter):
3363         (WebCore::StyleBuilderCustom::applyValueCounter):
3364         (WebCore::StyleBuilderCustom::applyInheritCounterIncrement):
3365         (WebCore::StyleBuilderCustom::applyValueCounterIncrement):
3366         (WebCore::StyleBuilderCustom::applyInheritCounterReset):
3367         (WebCore::StyleBuilderCustom::applyValueCounterReset):
3368
3369 2014-12-14  Commit Queue  <commit-queue@webkit.org>
3370
3371         Unreviewed, rolling out r177238 and r177244.
3372         https://bugs.webkit.org/show_bug.cgi?id=139632
3373
3374         Introduced memory corruption (Requested by ap on #webkit).
3375
3376         Reverted changesets:
3377
3378         "REGRESSION (r168217): Images are cropped out during animation
3379         at jetblue.com"
3380         https://bugs.webkit.org/show_bug.cgi?id=136410
3381         http://trac.webkit.org/changeset/177238
3382
3383         https://bugs.webkit.org/show_bug.cgi?id=139596
3384         http://trac.webkit.org/changeset/177244
3385
3386 2014-12-14  Commit Queue  <commit-queue@webkit.org>
3387
3388         Unreviewed, rolling out r177223 and r177226.
3389         https://bugs.webkit.org/show_bug.cgi?id=139631
3390
3391         Multiple tests are flakily asserting in
3392         StyleResolver::loadPendingResources (Requested by ap_ on
3393         #webkit).
3394
3395         Reverted changesets:
3396
3397         "[SVG Masking] Enable the use of <mask> elements for -webkit-
3398         mask-image"
3399         https://bugs.webkit.org/show_bug.cgi?id=139294
3400         http://trac.webkit.org/changeset/177223
3401
3402         "animations/cross-fade-webkit-mask-image.html is flaky"
3403         https://bugs.webkit.org/show_bug.cgi?id=139590
3404         http://trac.webkit.org/changeset/177226
3405
3406 2014-12-14  Andreas Kling  <akling@apple.com>
3407
3408         Event construction helpers should return Ref instead of PassRefPtr.
3409         <https://webkit.org/b/139625>
3410
3411         Reviewed by Antti Koivisto.
3412
3413         Change all the FooEvent::create() construction helpers to return Ref<FooEvent>
3414         instead of PassRefPtr<FooEvent>.
3415
3416         This allows the compiler to omit null checks at each call site, since we know
3417         that these functions always return valid objects.
3418
3419         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
3420         (WebCore::WebKitPlaybackTargetAvailabilityEvent::create):
3421         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
3422         (WebCore::MediaKeyMessageEvent::create):
3423         * Modules/encryptedmedia/MediaKeyNeededEvent.h:
3424         (WebCore::MediaKeyNeededEvent::create):
3425         * Modules/gamepad/GamepadEvent.h:
3426         (WebCore::GamepadEvent::create):
3427         * Modules/indexeddb/IDBVersionChangeEvent.h:
3428         (WebCore::IDBVersionChangeEvent::create):
3429         * Modules/indieui/UIRequestEvent.cpp:
3430         (WebCore::UIRequestEvent::create):
3431         * Modules/indieui/UIRequestEvent.h:
3432         * Modules/mediastream/MediaStreamEvent.cpp:
3433         (WebCore::MediaStreamEvent::create):
3434         * Modules/mediastream/MediaStreamEvent.h:
3435         * Modules/mediastream/MediaStreamTrackEvent.cpp:
3436         (WebCore::MediaStreamTrackEvent::create):
3437         * Modules/mediastream/MediaStreamTrackEvent.h:
3438         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
3439         (WebCore::RTCDTMFToneChangeEvent::create):
3440         * Modules/mediastream/RTCDTMFToneChangeEvent.h:
3441         * Modules/mediastream/RTCDataChannelEvent.cpp:
3442         (WebCore::RTCDataChannelEvent::create):
3443         * Modules/mediastream/RTCDataChannelEvent.h:
3444         * Modules/mediastream/RTCIceCandidateEvent.cpp:
3445         (WebCore::RTCIceCandidateEvent::create):
3446         * Modules/mediastream/RTCIceCandidateEvent.h:
3447         * Modules/speech/SpeechSynthesisEvent.cpp:
3448         (WebCore::SpeechSynthesisEvent::create):
3449         * Modules/speech/SpeechSynthesisEvent.h:
3450         * Modules/webaudio/AudioProcessingEvent.cpp:
3451         (WebCore::AudioProcessingEvent::create):
3452         * Modules/webaudio/AudioProcessingEvent.h:
3453         * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
3454         (WebCore::OfflineAudioCompletionEvent::create):
3455         * Modules/webaudio/OfflineAudioCompletionEvent.h:
3456         * Modules/websockets/CloseEvent.h:
3457         (WebCore::CloseEvent::create):
3458         * dom/AnimationEvent.h:
3459         * dom/AutocompleteErrorEvent.h:
3460         * dom/BeforeLoadEvent.h:
3461         * dom/BeforeTextInsertedEvent.h:
3462         * dom/BeforeUnloadEvent.h:
3463         * dom/ClipboardEvent.h:
3464         * dom/CompositionEvent.h:
3465         * dom/CustomEvent.h:
3466         * dom/DeviceMotionEvent.h:
3467         * dom/DeviceOrientationEvent.h:
3468         * dom/ErrorEvent.h:
3469         * dom/Event.h:
3470         (WebCore::Event::create):
3471         * dom/FocusEvent.h:
3472         * dom/HashChangeEvent.h:
3473         * dom/KeyboardEvent.h:
3474         * dom/MessageEvent.h:
3475         * dom/MouseEvent.cpp:
3476         (WebCore::MouseEvent::create):
3477         (WebCore::SimulatedMouseEvent::create):
3478         * dom/MouseEvent.h:
3479         (WebCore::MouseEvent::create):
3480         * dom/MutationEvent.h:
3481         * dom/OverflowEvent.h:
3482         * dom/PageTransitionEvent.h:
3483         * dom/PopStateEvent.cpp:
3484         (WebCore::PopStateEvent::create):
3485         * dom/PopStateEvent.h:
3486         * dom/ProgressEvent.h:
3487         (WebCore::ProgressEvent::create):
3488         * dom/TextEvent.cpp:
3489         (WebCore::TextEvent::create):
3490         (WebCore::TextEvent::createForPlainTextPaste):
3491         (WebCore::TextEvent::createForFragmentPaste):
3492         (WebCore::TextEvent::createForDrop):
3493         (WebCore::TextEvent::createForDictation):
3494         * dom/TextEvent.h:
3495         * dom/TouchEvent.h:
3496         * dom/TransitionEvent.h: