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