Remove even more Mountain Lion support
[WebKit.git] / Source / WebCore / ChangeLog
1 2015-01-31  Sam Weinig  <sam@webkit.org>
2
3         Remove even more Mountain Lion support
4         https://bugs.webkit.org/show_bug.cgi?id=141124
5
6         Reviewed by Alexey Proskuryakov.
7
8         * Configurations/Base.xcconfig:
9         * Configurations/DebugRelease.xcconfig:
10         * Configurations/FeatureDefines.xcconfig:
11         * Configurations/Version.xcconfig:
12         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
13         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
14         (-[WebAccessibilityObjectWrapper subrole]):
15         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
16         (PlatformCALayer::drawLayerContents):
17         * platform/mac/ThemeMac.mm:
18         (-[WebCoreThemeView _focusRingVisibleRect]):
19
20 2015-01-30  Sam Weinig  <sam@webkit.org>
21
22         Merge SimpleFontDataIOS.mm and SimpleFontDataMac.mm into FontCocoa.mm
23         https://bugs.webkit.org/show_bug.cgi?id=141101
24
25         Rubber-stamped by Dan Bernstein.
26
27         * WebCore.xcodeproj/project.pbxproj:
28         Remove SimpleFontDataIOS.mm and SimpleFontDataMac.mm. Add FontCocoa.mm.
29
30         * platform/graphics/Font.h:
31         Remove a few CG only functions from the header that can be implemented as static functions
32         in the implementation file.
33
34         * platform/graphics/cocoa/FontCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
35         (WebCore::fontFamilyShouldNotBeUsedForArabic):
36         (WebCore::Font::platformInit):
37         (WebCore::Font::platformCharWidthInit):
38         (WebCore::Font::platformCreateScaledFont):
39         (WebCore::Font::determinePitch):
40         (WebCore::renderingStyle):
41         (WebCore::advanceForColorBitmapFont):
42         (WebCore::hasCustomTracking):
43         (WebCore::canUseFastGlyphAdvanceGetter):
44         (WebCore::Font::platformWidthForGlyph):
45         (WebCore::Font::compositeFontReferenceFont):
46         (WebCore::copyFontTableForTag): Deleted.
47         (WebCore::Font::renderingStyle): Deleted.
48         Merge in the iOS specific parts.
49
50         * platform/graphics/ios/SimpleFontDataIOS.mm: Removed.
51         * platform/graphics/mac/SimpleFontDataMac.mm: Removed.
52
53 2015-01-31  Zalan Bujtas  <zalan@apple.com>
54
55         Regression(r179438) Simple line layout: ASSERTION at SimpleLineLayout::FlowContentsIterator::runWidth().
56         https://bugs.webkit.org/show_bug.cgi?id=141121
57
58         Reviewed by Antti Koivisto.
59
60         When a breakable text fragment does not fit the current line, we split it.
61         The first part stays on the current line, while the second part gets pushed to the next line.
62         In certain cases, the first part could end up being empty.
63         This patch ensures that we don't measure empty fragments.
64
65         Covered by existing tests.
66
67         * rendering/SimpleLineLayout.cpp:
68         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
69
70 2015-01-31  Commit Queue  <commit-queue@webkit.org>
71
72         Unreviewed, rolling out r179426.
73         https://bugs.webkit.org/show_bug.cgi?id=141119
74
75         "caused a memory use regression" (Requested by Guest45 on
76         #webkit).
77
78         Reverted changeset:
79
80         "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
81         pages"
82         https://bugs.webkit.org/show_bug.cgi?id=140900
83         http://trac.webkit.org/changeset/179426
84
85 2015-01-30  Zalan Bujtas  <zalan@apple.com>
86
87         Simple line layout: Improve FlowContentsIterator::TextFragment's encapsulation.
88         https://bugs.webkit.org/show_bug.cgi?id=141090
89
90         Reviewed by Andreas Kling.
91
92         Make members private to avoid accidental change in TextFragment.
93
94         No change in functionality.
95
96         * rendering/SimpleLineLayout.cpp:
97         (WebCore::SimpleLineLayout::LineState::addFragment):
98         (WebCore::SimpleLineLayout::LineState::addWhitespace):
99         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
100         (WebCore::SimpleLineLayout::firstFragment):
101         (WebCore::SimpleLineLayout::createLineRuns):
102         * rendering/SimpleLineLayoutFlowContentsIterator.cpp:
103         (WebCore::SimpleLineLayout::FlowContentsIterator::nextTextFragment):
104         * rendering/SimpleLineLayoutFlowContentsIterator.h:
105         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::TextFragment):
106         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::start):
107         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::end):
108         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::width):
109         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::type):
110         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isCollapsed):
111         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isBreakable):
112         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isEmpty):
113
114 2015-01-30  Zalan Bujtas  <zalan@apple.com>
115
116         Simple line layout: Make LineState fragment handling simpler.
117         https://bugs.webkit.org/show_bug.cgi?id=141100
118
119         Reviewed by Andreas Kling.
120
121         New fragments are appeneded to the Run's last entry
122         instead of accumulating them until after a new run is required. 
123         (whitespace collapse or line end)
124         LineState::appendFragment manages whitespace collapsing now.
125         This makes createLineRuns() logic lighter and no need to "flush"
126         the LineState when the line ends.
127
128         No change in functionality.
129
130         * rendering/SimpleLineLayout.cpp: Make LineState members private and introduce getters.
131         (WebCore::SimpleLineLayout::LineState::setAvailableWidth):
132         (WebCore::SimpleLineLayout::LineState::setLogicalLeftOffset):
133         (WebCore::SimpleLineLayout::LineState::setOverflowedFragment):
134         (WebCore::SimpleLineLayout::LineState::availableWidth):
135         (WebCore::SimpleLineLayout::LineState::logicalLeftOffset):
136         (WebCore::SimpleLineLayout::LineState::overflowedFragment):
137         (WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace):
138         (WebCore::SimpleLineLayout::LineState::isWhitespaceOnly):
139         (WebCore::SimpleLineLayout::LineState::fits):
140         (WebCore::SimpleLineLayout::LineState::firstCharacterFits):
141         (WebCore::SimpleLineLayout::LineState::width):
142         (WebCore::SimpleLineLayout::LineState::appendFragment): Append each fragment to the Run 
143         by either creating a new run or expanding the last one.
144         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace): Remove trailing whitespace from
145         the Run's and reset the trailing whitespace variables.
146         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
147         (WebCore::SimpleLineLayout::updateLineConstrains):
148         (WebCore::SimpleLineLayout::firstFragment):
149         (WebCore::SimpleLineLayout::createLineRuns):
150         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
151         (WebCore::SimpleLineLayout::createTextRuns):
152         (WebCore::SimpleLineLayout::LineState::createRun): Deleted.
153         (WebCore::SimpleLineLayout::LineState::addFragment): Deleted.
154         (WebCore::SimpleLineLayout::LineState::addWhitespace): Deleted.
155         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly): Deleted.
156
157 2015-01-30  Chris Dumez  <cdumez@apple.com>
158
159         Drop HistoryItem's m_prev / m_next
160         https://bugs.webkit.org/show_bug.cgi?id=141105
161
162         Reviewed by Zalan Bujtas.
163
164         Drop HistoryItem's m_prev / m_next. Those are no longer needed after
165         the PageCache refactoring in <http://trac.webkit.org/r179347>.
166
167         * history/HistoryItem.cpp:
168         (WebCore::HistoryItem::HistoryItem):
169         * history/HistoryItem.h:
170
171 2015-01-30  Jeongmin Kim  <jm86.kim@lge.com>
172
173         Update the comment in RenderLayer for clarity as related code location is changed
174         https://bugs.webkit.org/show_bug.cgi?id=141103
175
176         Reviewed by Simon Fraser.
177
178         Update the comment in RenderLayer for clarity as related code location is changed
179         The repainting in implicitClose() that is now called in setVisualUpdatesAllowed(bool) is removed
180
181         * rendering/RenderLayer.cpp:
182         (WebCore::shouldSuppressPaintingLayer):
183         * rendering/RenderLayerCompositor.cpp:
184         (WebCore::RenderLayerCompositor::updateCompositingLayers):
185
186 2015-01-30  Chris Dumez  <cdumez@apple.com>
187
188         Optimize MemoryCache::getSessionMap() a bit
189         https://bugs.webkit.org/show_bug.cgi?id=141069
190
191         Reviewed by Anders Carlsson.
192
193         Optimize MemoryCache::getSessionMap() a bit by doing 1 HashMap lookup
194         instead of previously 3. Also rename the method to
195         ensureSessionResourceMap() as we usually don't use "get" prefix for
196         getters and the implementation will also create the HashMap value if
197         the key is not found.
198
199         Also add a alternative sessionResourceMap() method which returns
200         the HashMap value if the key exists but doesn't try to create it if
201         missing. This is actually what we really want for some call sites.
202
203         * loader/cache/MemoryCache.cpp:
204         (WebCore::MemoryCache::add):
205         (WebCore::MemoryCache::revalidationSucceeded):
206         (WebCore::MemoryCache::resourceForRequest):
207         (WebCore::MemoryCache::removeImageFromCache):
208         (WebCore::MemoryCache::remove):
209         (WebCore::MemoryCache::getSessionMap): Deleted.
210         * loader/cache/MemoryCache.h:
211
212 2015-01-30  Chris Dumez  <cdumez@apple.com>
213
214         Unreviewed. Remove outdated comment.
215
216         * loader/cache/MemoryCache.cpp:
217
218 2015-01-30  Eric Carlson  <eric.carlson@apple.com>
219
220         Remove MediaPlayerProxy.h
221         https://bugs.webkit.org/show_bug.cgi?id=141087
222
223         Reviewed by Sam Weinig.
224
225         * WebCore.xcodeproj/project.pbxproj: Remove reference to MediaPlayerProxy.h.
226         * platform/graphics/mac/MediaPlayerProxy.h: Removed.
227
228 2015-01-30  Geoffrey Garen  <ggaren@apple.com>
229
230         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
231         https://bugs.webkit.org/show_bug.cgi?id=140900
232
233         Reviewed by Mark Hahnenberg.
234
235         Re-landing just the HandleBlock piece of this patch.
236
237         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
238         (WebCore::MemoryPressureHandler::install):
239
240 2015-01-30  Chris Dumez  <cdumez@apple.com>
241
242         Update MemoryCache code to use more references instead of pointers
243         https://bugs.webkit.org/show_bug.cgi?id=141099
244
245         Reviewed by Andreas Kling.
246
247 2015-01-30  Brian J. Burg  <burg@cs.washington.edu>
248
249         Web Inspector: ASSERT in InspectorTimelineAgent::internalStop
250         https://bugs.webkit.org/show_bug.cgi?id=141039
251
252         Reviewed by Timothy Hatcher.
253
254         Don't unconditionally stop the environment stopwatch, since it could have
255         already stopped due to the debugger pausing.
256
257         * inspector/InspectorTimelineAgent.cpp:
258         (WebCore::InspectorTimelineAgent::internalStop):
259
260 2015-01-30  Chris Dumez  <cdumez@apple.com>
261
262         When no background-size is specified on the 2nd background layer, it takes the first instead of the initial value
263         https://bugs.webkit.org/show_bug.cgi?id=141059
264
265         Reviewed by Antti Koivisto.
266
267         This patch fixes fill size support for 'initial' value.
268
269         Test: fast/css/background-layers-initial-size.html
270
271         * css/CSSToStyleMap.cpp:
272         - Add check for initial values and set fill size to initialFillSize()
273           in this case (which is 'auto'). Previously, we were handling all
274           non CSSPrimitiveValues the same way and setting the fill size type
275           to SizeNone, which means no size (not 'auto').
276         - Clean up the rest of the function (no behavior change).
277
278         * rendering/style/FillLayer.cpp:
279         (WebCore::FillLayer::FillLayer):
280         - Initialize m_sizeLength to SizeNone instead of calling
281           initialFillSizeType(). There is no behavior change here. However,
282           initialFillSizeType() was not supposed to return SizeNone.
283         - Stop explicitly initializing m_sizeLength to LengthSize() as this
284           is already what happens implicitly.
285
286         * rendering/style/FillLayer.h:
287         (WebCore::FillLayer::initialFillSize):
288         Return FillSize() instead of FillSize(SizeNone, LengthSize()).
289         FillSize() is equivalent to FillSize(SizeLength, LengthSize())
290         which is resolved to 'auto'. SizeNone means no size which isn't
291         what we want as an initial value.
292
293         (WebCore::FillLayer::initialFillSizeType): Deleted.
294         (WebCore::FillLayer::initialFillSizeLength): Deleted.
295         Remove Individual initialFillSizeType() / initialFillSizeLength()
296         functions now that all caller use initialFillSize() instead.
297
298 2015-01-30  Commit Queue  <commit-queue@webkit.org>
299
300         Unreviewed, rolling out r179403.
301         https://bugs.webkit.org/show_bug.cgi?id=141091
302
303         Broke fast/files/workers/worker-apply-blob-url-to-xhr.html
304         (Requested by ap_ on #webkit).
305
306         Reverted changeset:
307
308         "Optimize MemoryCache::getSessionMap() a bit"
309         https://bugs.webkit.org/show_bug.cgi?id=141069
310         http://trac.webkit.org/changeset/179403
311
312 2015-01-30  Chris Dumez  <cdumez@apple.com>
313
314         Rename shared() static member functions to singleton() for singleton classes.
315         https://bugs.webkit.org/show_bug.cgi?id=141088
316
317         Reviewed by Ryosuke Niwa and Benjamin Poulain.
318
319         Rename shared() static member functions to singleton() for singleton
320         classes as per the recent coding style change.
321
322 2015-01-30  Matthew Mirman  <mmirman@apple.com>
323
324         Added ClientRect as an interface that requires attributes 
325         on instance for compatibility.
326         https://bugs.webkit.org/show_bug.cgi?id=141063
327         <rdar://problem/18437653>
328
329         Reviewed by Oliver Hunt.
330
331         Added a new test to LayoutTests/js/resources/JSON-stringify.js
332
333         * bindings/scripts/CodeGeneratorJS.pm:
334         (InterfaceRequiresAttributesOnInstanceForCompatibility):
335
336 2015-01-30  Chris Dumez  <cdumez@apple.com>
337
338         Optimize MemoryCache::getSessionMap() a bit
339         https://bugs.webkit.org/show_bug.cgi?id=141069
340
341         Reviewed by Anders Carlsson.
342
343         Optimize MemoryCache::getSessionMap() a bit by doing 1 HashMap lookup
344         instead of previously 3. Also rename the method to sessionResources()
345         as we usually don't use "get" prefix for getters.
346
347         * loader/cache/MemoryCache.cpp:
348         (WebCore::MemoryCache::sessionResources):
349         (WebCore::MemoryCache::add):
350         (WebCore::MemoryCache::revalidationSucceeded):
351         (WebCore::MemoryCache::resourceForRequest):
352         (WebCore::MemoryCache::removeImageFromCache):
353         (WebCore::MemoryCache::remove):
354         (WebCore::MemoryCache::getSessionMap): Deleted.
355         * loader/cache/MemoryCache.h:
356
357 2015-01-30  Chris Dumez  <cdumez@apple.com>
358
359         Store MemoryCache's live decoded resources in a ListHashSet
360         https://bugs.webkit.org/show_bug.cgi?id=141051
361
362         Reviewed by Antti Koivisto.
363
364         Store MemoryCache's live decoded resources in a ListHashSet instead of
365         a linked list. The frequent operations are:
366         1. Add items to one end
367         2. Remove items from the other end or anywhere in the container by value
368
369         Using a ListHashSet instead of a manual linked list results in *much*
370         simpler / shorter code and is fast for all operations (faster than
371         linked list even for removing an given element from the container given
372         its value). The previous implementation required us to keep a lot of
373         pointers up-to-date, which was error prone.
374
375         This is a first step towards simplifying the MemoryCache implementation.
376
377         * loader/cache/CachedResource.cpp:
378         (WebCore::CachedResource::CachedResource):
379         (WebCore::CachedResource::setDecodedSize):
380         (WebCore::CachedResource::didAccessDecodedData):
381         * loader/cache/CachedResource.h:
382         (WebCore::CachedResource::inLiveDecodedResourcesList): Deleted.
383         * loader/cache/MemoryCache.cpp:
384         (WebCore::MemoryCache::pruneLiveResourcesToSize):
385         (WebCore::MemoryCache::removeFromLiveDecodedResourcesList):
386         (WebCore::MemoryCache::insertInLiveDecodedResourcesList):
387         * loader/cache/MemoryCache.h:
388         (WebCore::MemoryCache::inLiveDecodedResourcesList):
389
390 2015-01-30  Csaba Osztrogonác  <ossy@webkit.org>
391
392         [cairo] Fix #if guards in platform/graphics/cairo directory
393         https://bugs.webkit.org/show_bug.cgi?id=141076
394
395         Reviewed by Sergio Villar Senin.
396
397         * platform/graphics/cairo/BackingStoreBackendCairo.h:
398         * platform/graphics/cairo/BitmapImageCairo.cpp:
399         * platform/graphics/cairo/CairoUtilities.cpp:
400         * platform/graphics/cairo/CairoUtilities.h:
401         * platform/graphics/cairo/DrawErrorUnderline.h:
402         * platform/graphics/cairo/DrawingBufferCairo.cpp:
403         * platform/graphics/cairo/FloatRectCairo.cpp:
404         * platform/graphics/cairo/FontCairo.cpp:
405         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
406         * platform/graphics/cairo/FontCustomPlatformData.h:
407         * platform/graphics/cairo/GradientCairo.cpp:
408         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
409         * platform/graphics/cairo/GraphicsContextCairo.cpp:
410         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
411         * platform/graphics/cairo/ImageBufferCairo.cpp:
412         * platform/graphics/cairo/ImageBufferDataCairo.h:
413         * platform/graphics/cairo/ImageCairo.cpp:
414         * platform/graphics/cairo/IntRectCairo.cpp:
415         * platform/graphics/cairo/OwnPtrCairo.cpp:
416         * platform/graphics/cairo/OwnPtrCairo.h:
417         * platform/graphics/cairo/PathCairo.cpp:
418         * platform/graphics/cairo/PatternCairo.cpp:
419         * platform/graphics/cairo/PlatformContextCairo.cpp:
420         * platform/graphics/cairo/PlatformContextCairo.h:
421         * platform/graphics/cairo/PlatformPathCairo.cpp:
422         * platform/graphics/cairo/PlatformPathCairo.h:
423         * platform/graphics/cairo/RefPtrCairo.cpp:
424         * platform/graphics/cairo/RefPtrCairo.h:
425         * platform/graphics/cairo/TileCairo.h:
426         * platform/graphics/cairo/TransformationMatrixCairo.cpp:
427
428 2015-01-29  Darin Adler  <darin@apple.com>
429
430         Remove SVGUseElement.instanceRoot and all tests that depend on it
431         https://bugs.webkit.org/show_bug.cgi?id=141025
432
433         Reviewed by Anders Carlsson.
434
435         * svg/SVGUseElement.cpp:
436         (WebCore::SVGUseElement::instanceRoot): Deleted.
437         * svg/SVGUseElement.h: Removed instanceRoot.
438         * svg/SVGUseElement.idl: Ditto.
439
440 2015-01-29  Tim Horton  <timothy_horton@apple.com>
441
442         Fix the build with newer Clang.
443
444         * platform/graphics/ca/GraphicsLayerCA.h:
445
446 2015-01-29  Sam Weinig  <sam@webkit.org>
447
448         Try to fix the iOS build.
449
450         * WebCore.exp.in:
451
452 2015-01-29  Brent Fulgham  <bfulgham@apple.com>
453
454         [Win] Build fix after r179368.
455
456         * platform/graphics/win/UniscribeController.cpp:
457         (WebCore::UniscribeController::shapeAndPlaceItem): Don't use the no longer
458         valid isPrinterFont method.
459
460 2015-01-29  Tim Horton  <timothy_horton@apple.com>
461
462         Fix the build after r179368
463
464         * platform/graphics/FontDescription.h:
465         (WebCore::FontDescription::equalForTextAutoSizing):
466
467 2015-01-29  Simon Fraser  <simon.fraser@apple.com>
468
469         Border-radius clipping on a stacking context causes descendants to not render
470         https://bugs.webkit.org/show_bug.cgi?id=140536
471
472         Reviewed by Zalan Bujtas.
473         
474         Fix one of the issues introduced in r178029. The changes in GraphicsLayerCA
475         failed to adhere to the "set a bit and flush later" pattern that this class uses,
476         instead poking the platform layers directly. This caused an issue where the bounds
477         of the clipping layer would later be set to 0x0, causing content to disappear.
478         
479         Fix by changing the "applyClippingBorder" function to "setMasksToBoundsRect"
480         and have it update via a new MasksToBoundsRectChanged dirty bit.
481
482         In order to avoid clobbering the mask layer used to clip contents, we need another
483         shape mask layer, so rename m_shapeMaskLayer to m_contentsShapeMaskLayer, then
484         introduce a new m_shapeMaskLayer which is used for masks-to-bounds clipping. Update
485         the reflection cloning code to correctly clone this layer.
486
487         Test: compositing/clipping/border-radius-stacking-context-clip.html
488
489         * WebCore.exp.in:
490         * platform/graphics/GraphicsLayer.h:
491         (WebCore::GraphicsLayer::maskToBoundsRect):
492         (WebCore::GraphicsLayer::setMasksToBoundsRect):
493         (WebCore::GraphicsLayer::applyClippingBorder): Deleted.
494         (WebCore::GraphicsLayer::clearClippingBorder): Deleted.
495         * platform/graphics/ca/GraphicsLayerCA.cpp:
496         (WebCore::GraphicsLayerCA::willBeDestroyed):
497         (WebCore::GraphicsLayerCA::setMasksToBoundsRect):
498         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
499         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
500         (WebCore::GraphicsLayerCA::updateContentsImage):
501         (WebCore::GraphicsLayerCA::updateContentsRects):
502         (WebCore::GraphicsLayerCA::updateMasksToBoundsRect):
503         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
504         (WebCore::GraphicsLayerCA::applyClippingBorder): Deleted.
505         (WebCore::GraphicsLayerCA::clearClippingBorder): Deleted.
506         * platform/graphics/ca/GraphicsLayerCA.h:
507         * rendering/RenderLayerBacking.cpp:
508         (WebCore::RenderLayerBacking::updateChildClippingStrategy): Add a FIXME since
509         this code is trying to access geometry and we may not have done layout yet.
510         Also, to clear the rounded rect, just set a non-rounded rect the size of the layer.
511
512 2015-01-29  Sam Weinig  <sam@webkit.org>
513
514         Remove support for screen font substitution
515         https://bugs.webkit.org/show_bug.cgi?id=141038
516
517         Reviewed by Tim Horton.
518
519         - Removes the screen font substitution setting (which was only on in Mountain Lion)
520         - Remove the concept of a printer font, from the family of Font related classes.
521
522         * WebCore.exp.in:
523         * css/StyleResolver.cpp:
524         (WebCore::StyleResolver::initializeFontStyle):
525         * page/Settings.cpp:
526         (WebCore::Settings::Settings):
527         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
528         (WebCore::Settings::setScreenFontSubstitutionEnabled): Deleted.
529         * page/Settings.h:
530         (WebCore::Settings::screenFontSubstitutionEnabled): Deleted.
531         * page/mac/SettingsMac.mm:
532         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
533         * platform/graphics/FontCache.h:
534         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
535         * platform/graphics/FontCascade.cpp:
536         (WebCore::FontCascade::FontCascade):
537         * platform/graphics/FontCascade.h:
538         (WebCore::FontCascade::isPrinterFont): Deleted.
539         * platform/graphics/FontDescription.h:
540         (WebCore::FontDescription::FontDescription):
541         (WebCore::FontDescription::setWeight):
542         (WebCore::FontDescription::equalForTextAutoSizing):
543         (WebCore::FontDescription::operator==):
544         (WebCore::FontDescription::usePrinterFont): Deleted.
545         (WebCore::FontDescription::setUsePrinterFont): Deleted.
546         * platform/graphics/FontPlatformData.h:
547         (WebCore::FontPlatformData::isCompositeFontReference):
548         (WebCore::FontPlatformData::hash):
549         (WebCore::FontPlatformData::operator==):
550         (WebCore::FontPlatformData::isPrinterFont): Deleted.
551         * platform/graphics/WidthIterator.h:
552         (WebCore::WidthIterator::supportsTypesettingFeatures):
553         * platform/graphics/cocoa/FontCascadeCocoa.mm:
554         (WebCore::FontCascade::drawGlyphs):
555         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
556         (WebCore::FontPlatformData::FontPlatformData):
557         (WebCore::FontPlatformData::platformDataInit):
558         (WebCore::FontPlatformData::platformDataAssign):
559         * platform/graphics/ios/FontCacheIOS.mm:
560         (WebCore::FontCache::getSystemFontFallbackForCharacters):
561         (WebCore::FontCache::createFontPlatformData):
562         * platform/graphics/ios/SimpleFontDataIOS.mm:
563         (WebCore::Font::platformCreateScaledFont):
564         * platform/graphics/mac/ComplexTextController.cpp:
565         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
566         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
567         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
568         * platform/graphics/mac/FontCacheMac.mm:
569         (WebCore::FontCache::systemFallbackForCharacters):
570         (WebCore::FontCache::createFontPlatformData):
571         * platform/graphics/mac/SimpleFontDataMac.mm:
572         (WebCore::Font::compositeFontReferenceFont):
573         (WebCore::Font::platformCreateScaledFont):
574         * platform/mac/DragImageMac.mm:
575         (WebCore::fontFromNSFont):
576         (WebCore::widthWithFont):
577         (WebCore::drawAtPoint):
578         * style/StyleResolveForDocument.cpp:
579         (WebCore::Style::resolveForDocument):
580
581 2015-01-20  David Hyatt  <hyatt@apple.com>
582
583         Japanese line breaking rules need to be respected before and after Ruby.
584         https://bugs.webkit.org/show_bug.cgi?id=91588
585         <rdar://problem/17306535>
586
587         Reviewed by Dean Jackson.
588
589         Added fast/ruby/ruby-punctuation-avoid-breaking.html.
590
591         This patch has to add support for following line breaking rules at both
592         sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
593         just hard-code the rules (and apply this hard-coding only to Ruby and not
594         to other inline replaced elements).
595
596         For breaking after a Ruby we do better. The Ruby run caches its prior characters
597         and line layout is able to obtain them and use them when deciding whether or not
598         to break. This means for the "after" side of a Ruby, we're able to behave the same
599         as if no Ruby was used.
600
601         * rendering/RenderBlockFlow.h:
602         (WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):
603         * rendering/RenderBlockLineLayout.cpp:
604         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
605         * rendering/RenderRubyBase.cpp:
606         (WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):
607         * rendering/RenderRubyBase.h:
608         * rendering/RenderRubyRun.cpp:
609         (WebCore::RenderRubyRun::RenderRubyRun):
610         (WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
611         (WebCore::RenderRubyRun::canBreakBefore):
612         * rendering/RenderRubyRun.h:
613         * rendering/RenderRubyText.cpp:
614         (WebCore::RenderRubyText::canBreakBefore):
615         * rendering/RenderRubyText.h:
616         * rendering/line/BreakingContextInlineHeaders.h:
617         (WebCore::BreakingContext::handleReplaced):
618         (WebCore::BreakingContext::canBreakAtThisPosition):
619         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
620
621 2015-01-28  Beth Dakin  <bdakin@apple.com>
622
623         Remove more Mountain Lion code from WebCore
624         https://bugs.webkit.org/show_bug.cgi?id=141014
625
626         Reviewed by Anders Carlsson.
627
628         * WebCore.exp.in:
629         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
630         (AXAttributeStringSetSpelling):
631         (AXAttributedStringAppendText):
632         * crypto/CommonCryptoUtilities.h:
633         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
634         (WebCore::transformAES_CBC):
635         * editing/cocoa/HTMLConverter.mm:
636         (_dateForString):
637         * html/canvas/ANGLEInstancedArrays.cpp:
638         (WebCore::ANGLEInstancedArrays::supported):
639         * loader/cocoa/DiskCacheMonitorCocoa.mm:
640         * page/mac/SettingsMac.mm:
641         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
642         (WebCore::Settings::initializeDefaultFontFamilies):
643         * platform/audio/mac/MediaSessionManagerMac.cpp:
644         (MediaSessionManager::updateSessionState):
645         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
646         (WebCore::MemoryPressureHandler::install):
647         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
648         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted.
649         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
650         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
651         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
652         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
653         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
654         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
655         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
656         * platform/graphics/cocoa/IOSurface.mm:
657         (IOSurface::state):
658         (IOSurface::isVolatile):
659         (IOSurface::setIsVolatile):
660         * platform/graphics/mac/SimpleFontDataMac.mm:
661         (WebCore::Font::platformInit):
662         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
663         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
664         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
665         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
666         * platform/mac/WebCoreSystemInterface.h:
667         * platform/mac/WebCoreSystemInterface.mm:
668         * platform/network/cf/ResourceHandleCFNet.cpp:
669         (WebCore::ResourceHandle::createCFURLConnection):
670         * platform/network/cocoa/ProtectionSpaceCocoa.h:
671         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
672         * platform/network/cocoa/ProtectionSpaceCocoa.mm:
673         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
674         * platform/network/mac/ResourceHandleMac.mm:
675         (WebCore::ResourceHandle::createNSURLConnection):
676         * platform/network/mac/WebCoreURLResponse.mm:
677         (WebCore::synthesizeRedirectResponseIfNecessary):
678         * platform/spi/cf/CFNetworkSPI.h:
679         * platform/text/mac/LocaleMac.mm:
680         (WebCore::LocaleMac::LocaleMac):
681
682 2015-01-29  Benjamin Poulain  <bpoulain@apple.com>
683
684         Remove an extraneous check from the parser of :not()
685         https://bugs.webkit.org/show_bug.cgi?id=141021
686
687         Reviewed by Darin Adler.
688
689         * css/CSSGrammar.y.in:
690         :not() takes a selector list, it can be null if there selector list is invalid,
691         but there cannot be a invalid pointer.
692
693 2015-01-29  Tim Horton  <timothy_horton@apple.com>
694
695         Fix the iOS build after r179347
696
697         * loader/FrameLoader.cpp:
698         (WebCore::FrameLoader::commitProvisionalLoad):
699
700 2015-01-29  Andreas Kling  <akling@apple.com>
701
702         JavaScript bindings constructors should take Ref<ImplType>&&.
703         <https://webkit.org/b/140952>
704
705         Reviewed by Darin Adler.
706
707         When constructing a JS wrapper object, there is always going to be a
708         corresponding DOM object.
709
710         Tweak the JavaScript DOM bindings generator to spit out constructors
711         that take the DOM object by Ref&& rather than PassRefPtr.
712
713         This avoids generating unnecessary null checks around every instance
714         of wrapper construction.
715
716         * bindings/js/JSDOMBinding.h:
717         (WebCore::createWrapper):
718         * bindings/js/JSDOMWindowShell.cpp:
719         (WebCore::JSDOMWindowShell::setWindow):
720         * bindings/js/JSDocumentCustom.cpp:
721         (WebCore::JSDocument::location):
722         * bindings/scripts/CodeGeneratorJS.pm:
723         (GenerateHeader):
724         (GenerateImplementation):
725
726 2015-01-29  Chris Dumez  <cdumez@apple.com>
727
728         Clean up / modernize PageCache class
729         https://bugs.webkit.org/show_bug.cgi?id=141009
730
731         Reviewed by Darin Adler.
732
733         Clean up / modernize PageCache class:
734         - Use more references instead of pointers
735         - Use a ListHashSet<Ref<HistoryItem>> internally instead of a linked
736           list of HistoryItem*. This avoids having the ref/unref HistoryItems
737           manually and maintaining the list size separately. It also simplifies
738           the code dealing with the container and makes looking up HistoryItems
739           faster as a bonus. Similarly to the previous implementation, we are
740           adding elements to one end and removing from the opposite end when
741           pruning to drop old history items first. Note that even though the
742           previous implementation was called LRUList, it did not move items to
743           the front when accessed. The new implementation doesn't either.
744          - Rename "capacity" to "maxSize" to avoid confusing with containers'
745            capacity (which doesn't limit the size of the container).
746          - Use unsigned instead of int for all values that are supposed to be
747            positive.
748          - Do not explicitely define the default constructor and let the
749            compiler generate it for us (and use in-class initialization for
750            members)
751          - Fix indentation in the header.
752
753 2015-01-29  Julien Isorce  <j.isorce@samsung.com>
754
755         HTMLImageLoader: fix build failure on assert condition after r179340
756         https://bugs.webkit.org/show_bug.cgi?id=140722
757
758         Reviewed by Csaba Osztrogonác.
759
760         * html/HTMLImageLoader.cpp:
761         (WebCore::HTMLImageLoader::imageChanged): image() directly
762         returns a CachedImage*.
763
764 2015-01-29  Julien Isorce  <j.isorce@samsung.com>
765
766         CachedImage: ensure clients overrides imageChanged instead of notifyFinished
767         https://bugs.webkit.org/show_bug.cgi?id=140722
768
769         Reviewed by Tim Horton.
770
771         imageChanged is called whenever a frame of an image changes
772         because we got more data from the network.
773
774         notifyFinished was called when the image was entirely loaded.
775
776         The problem was that some clients were implementing only
777         imageChanged (ex: RenderBox), some only notifyFinished and
778         some both (ex: RenderImage) which made the situation difficult
779         to understand and to maintain.
780
781         For example when the image finished loading, both imageChanged
782         and notifyFinished were called with the difference that for the
783         first one isLoaded() returned false.
784         It could result in functions being called twice in a row,
785         ex: contentChanged(ImageChanged).
786
787         So this patch tries to simplify the situation by marking
788         CachedImageClient::notifyFinished final in order to prevent
789         clients from implementing it.
790         Indeed this patch ensure that CachedImage clients implement
791         and only implement imageChanged function.
792
793         Also Clients can now differentiate intermediate and end
794         calls by checking isLoaded() in imageChanged.
795
796         * html/HTMLImageLoader.cpp:
797         (WebCore::HTMLImageLoader::imageChanged): Added instead
798         of notifyFinished.
799         (WebCore::HTMLImageLoader::notifyFinished): Deleted.
800         * html/HTMLImageLoader.h:
801
802         * loader/ImageLoader.cpp:
803         (WebCore::ImageLoader::imageChanged): Added instead
804         of notifyFinished.
805         (WebCore::ImageLoader::notifyFinished): Deleted.
806         * loader/ImageLoader.h:
807
808         * loader/cache/CachedImage.cpp:
809         (WebCore::CachedImage::finishLoading): Explicilty mark image as
810         loaded and before notifying observers. So that it avoids to call
811         notifyFinished (from CachedResource::finishLoading).
812
813         * loader/cache/CachedImageClient.h:
814         Make CachedImageClient::notifyFinished final to make sure
815         sub classes implement imageChanged instead.
816
817         * rendering/RenderImage.cpp:
818         (WebCore::RenderImage::notifyFinished): Deleted.
819         ImageChanged already exists and is more clever than notifyFinished.
820         Indeed invalidateBackgroundObscurationStatus() will be called by
821         RenderReplaced::layout() upon call to setNeedsLayout() in
822         RenderImage::imageDimensionsChanged.
823         Also contentChanged(ImageChanged) is now called only when necessary.
824         * rendering/RenderImage.h:
825
826         * svg/SVGFEImageElement.cpp:
827         (WebCore::SVGFEImageElement::imageChanged): Added instead
828         of notifyFinished.
829         (WebCore::SVGFEImageElement::notifyFinished): Deleted.
830         * svg/SVGFEImageElement.h:
831
832 2015-01-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
833
834         Poor performance on IE's Chalkboard benchmark.
835         https://bugs.webkit.org/show_bug.cgi?id=140753.
836
837         Reviewed by Zalan Bujtas.
838
839         Test: PerformanceTests/SVG/UnderTheSeeBenchmark.html
840               PerformanceTests/SVG/WorldcupBenchmark.html
841               
842         The SVG rendering code was not skipping the SVG elements which are outside the
843         clipping rectangle. We were drawing all the SVG elements even if some of them
844         are completely outside the clipping rectangle. The fix is to pass the correct
845         dirty rectangle to the ScrollView which then gets propagated to the SVG renderers.
846
847         * svg/graphics/SVGImage.cpp:
848         (WebCore::SVGImage::draw):
849         SVGImage::draw() needs to pass the intersection of 'srcRect' and context->clipBounds(),
850         to ScrollView::paint(). This will ensure RenderSVGShape::paint() gets the correct
851         clipping rectangle. If there is no intersection between the boundingBox of the
852         RenderSVGShape and the clipping rectangle, the RenderSVGShape will not be drawn.
853
854 2015-01-28  Brent Fulgham  <bfulgham@apple.com>
855
856         Scroll snap points do not work in the vertical direction
857         https://bugs.webkit.org/show_bug.cgi?id=141001
858         <rdar://problem/19632089>
859
860         Reviewed by Beth Dakin.
861
862         New scroll snap tests are being prepared separately. A manual test case is attached to the issue.
863
864         * page/EventHandler.cpp:
865         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): We want to consider momentum end phase
866         when dealing with Scroll Snap Points.
867         * platform/mac/AxisScrollSnapAnimator.mm:
868         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): We do NOT want to bail out early here. In fact, it's strange
869         that this code was like this at all, since it meant a large number of cases were not being used. We also want to
870         trigger the scroll snap animation (when applicable) upon an inertia scroll end.
871         * platform/mac/ScrollAnimatorMac.mm:
872         (WebCore::gestureShouldBeginSnap): Added.
873         (WebCore::ScrollAnimatorMac::allowsVerticalStretching): If we have automatic elasticity, and we have active scroll
874         snap points, we want to let the scroll snap animator deal with the gesture.
875         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching): Ditto.
876
877 2015-01-28  Benjamin Poulain  <bpoulain@apple.com>
878
879         Start fixing the handling of Element's attributes when they contain non-ASCII characters
880         https://bugs.webkit.org/show_bug.cgi?id=141016
881
882         Reviewed by Ryosuke Niwa.
883
884         Attribute handling does not work properly when the attribute name contains non-ASCII character.
885
886         The HTML parser tokenize those names as ASCII lowercase. Some of the code is CSS and Element use
887         unicode lowercase for the names. This breaks all the APIs as soon as a name contains a character
888         that is non-ASCII and uppercase since some APIs change it, other don't.
889
890         This patch is a first step toward fixing this mess, it only address the simple cases.
891         The HTML spec says the names should be compared ASCII case-insensitive, to I spread that behavior
892         to places that were using unicode.
893
894         Tests: fast/css/attribute-ascii-case-insensitive-html.html
895                fast/css/attribute-ascii-case-insensitive-xhtml-expected.xhtml
896                fast/css/attribute-ascii-case-insensitive-xhtml.xhtml
897                fast/css/attribute-ascii-case-insensitive-xml-in-html.html
898                fast/dom/Element/attribute-ascii-case-insensitive-1.html
899                fast/dom/Element/attribute-ascii-case-insensitive-2.html
900                fast/selectors/attribute-ascii-case-insensitive-style-update.html
901                fast/selectors/element-matches-attribute-ascii-case-insensitive-html.html
902                fast/selectors/querySelector-attribute-ascii-case-insensitive-html.html
903
904         * css/CSSSelector.cpp:
905         (WebCore::CSSSelector::setAttribute):
906         * dom/Element.cpp:
907         (WebCore::Element::synchronizeAttribute):
908         (WebCore::Element::setAttribute):
909         (WebCore::Element::removeAttribute):
910         (WebCore::Element::hasAttribute):
911         * dom/ElementData.cpp:
912         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
913         * dom/ElementData.h:
914         (WebCore::ElementData::findAttributeIndexByName):
915
916 2015-01-28  Zalan Bujtas  <zalan@apple.com>
917
918         Simple line layout: Drop uncommitted/committed terms from LineState.
919         https://bugs.webkit.org/show_bug.cgi?id=141005
920
921         Reviewed by Antti Koivisto.
922
923         Fragments form segments and segments turn into runs on the lines.
924         We add fragments only when they fit so they should not be in 'uncommitted' state at all.
925
926         No change in functionality.
927
928         * rendering/SimpleLineLayout.cpp:
929         (WebCore::SimpleLineLayout::LineState::createRun):
930         (WebCore::SimpleLineLayout::LineState::addFragment):
931         (WebCore::SimpleLineLayout::LineState::addWhitespace):
932         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
933         (WebCore::SimpleLineLayout::LineState::width):
934         (WebCore::SimpleLineLayout::LineState::firstCharacterFits):
935         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
936         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
937         (WebCore::SimpleLineLayout::firstFragment):
938         (WebCore::SimpleLineLayout::createLineRuns):
939         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
940         (WebCore::SimpleLineLayout::createTextRuns): Unnecessary assert.
941         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): Deleted.
942         (WebCore::SimpleLineLayout::LineState::addUncommitted): Deleted.
943         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted.
944
945 2015-01-28  Chris Dumez  <cdumez@apple.com>
946
947         Regression(r177494): Bad cast to WebKitCSSResourceValue in StyleBuilderConverter::convertMaskImageOperations()
948         https://bugs.webkit.org/show_bug.cgi?id=140991
949         <rdar://problem/19625305>
950
951         Reviewed by Antti Koivisto.
952
953         convertMaskImageOperations() was assuming that the CSSValueList's values
954         were always WebKitCSSResourceValue values. However, they can be
955         CSSInitialValues as well so we should check before casting.
956
957         Test: css3/masking/mask-image-initial-value-crash.html
958
959         * css/StyleBuilderConverter.h:
960         (WebCore::maskImageValueFromIterator):
961         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
962
963 2015-01-28  Chris Dumez  <cdumez@apple.com>
964
965         Remove dead code from MemoryCache
966         https://bugs.webkit.org/show_bug.cgi?id=140964
967
968         Reviewed by Andreas Kling.
969
970         Remove dead code from MemoryCache, make more things private and
971         clean up a little bit.
972
973         * WebCore.exp.in:
974         * inspector/InspectorResourceAgent.cpp:
975         * loader/cache/MemoryCache.cpp:
976         (WebCore::MemoryCache::MemoryCache):
977         (WebCore::MemoryCache::revalidationSucceeded):
978         (WebCore::MemoryCache::removeImageFromCache):
979         (WebCore::MemoryCache::pruneLiveResources):
980         (WebCore::MemoryCache::pruneDeadResources):
981         (WebCore::MemoryCache::pruneDeadResourcesToSize):
982         (WebCore::MemoryCache::remove):
983         (WebCore::MemoryCache::removeRequestFromSessionCaches):
984         (WebCore::MemoryCache::setDisabled):
985         (WebCore::MemoryCache::resourceForURL): Deleted.
986         (WebCore::MemoryCache::pruneLiveResourcesToPercentage): Deleted.
987         (WebCore::MemoryCache::pruneDeadResourcesToPercentage): Deleted.
988         (WebCore::MemoryCache::evict): Deleted.
989         (WebCore::MemoryCache::removeUrlFromCache): Deleted.
990         (WebCore::MemoryCache::removeRequestFromCache): Deleted.
991         (WebCore::MemoryCache::pruneToPercentage): Deleted.
992         * loader/cache/MemoryCache.h:
993         (WebCore::MemoryCache::LRUList::LRUList): Deleted.
994         (WebCore::MemoryCache::remove): Deleted.
995         (WebCore::MemoryCache::setPruneEnabled): Deleted.
996         (WebCore::MemoryCache::minDeadCapacity): Deleted.
997         (WebCore::MemoryCache::maxDeadCapacity): Deleted.
998         (WebCore::MemoryCache::capacity): Deleted.
999         (WebCore::MemoryCache::liveSize): Deleted.
1000         (WebCore::MemoryCache::deadSize): Deleted.
1001         * platform/MemoryPressureHandler.cpp:
1002         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1003
1004 2015-01-28  Brian J. Burg  <burg@cs.washington.edu>
1005
1006         Web Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
1007         https://bugs.webkit.org/show_bug.cgi?id=140961
1008
1009         Reviewed by Timothy Hatcher.
1010
1011         No new tests, no behavior changed.
1012
1013         * CMakeLists.txt:
1014         * WebCore.vcxproj/WebCore.vcxproj:
1015         * WebCore.vcxproj/WebCore.vcxproj.filters:
1016         * WebCore.xcodeproj/project.pbxproj:
1017         * inspector/InspectorAllInOne.cpp:
1018         * inspector/InspectorCSSAgent.cpp:
1019         (WebCore::InspectorCSSAgent::setPropertyText): Deleted.
1020         (WebCore::InspectorCSSAgent::toggleProperty): Deleted.
1021         * inspector/InspectorCSSAgent.h:
1022         * inspector/InspectorStyleSheet.cpp:
1023         (WebCore::InspectorStyle::InspectorStyle):
1024         (WebCore::InspectorStyle::populateAllProperties):
1025         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
1026         (WebCore::InspectorStyleSheet::reparseStyleSheet):
1027         (WebCore::InspectorStyleSheet::inspectorStyleForId):
1028         (WebCore::InspectorStyle::setPropertyText): Deleted.
1029         (WebCore::InspectorStyle::toggleProperty): Deleted.
1030         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Deleted.
1031         (WebCore::InspectorStyleSheet::setPropertyText): Deleted.
1032         (WebCore::InspectorStyleSheet::toggleProperty): Deleted.
1033         (WebCore::InspectorStyleSheet::rememberInspectorStyle): Deleted.
1034         (WebCore::InspectorStyleSheet::forgetInspectorStyle): Deleted.
1035         (WebCore::InspectorStyleSheet::revalidateStyle): Deleted.
1036         * inspector/InspectorStyleSheet.h:
1037         * inspector/InspectorStyleTextEditor.cpp: Removed.
1038         * inspector/InspectorStyleTextEditor.h: Removed.
1039
1040 2015-01-28  Zalan Bujtas  <zalan@apple.com>
1041
1042         Simple line layout: Move FlowContents iterator interface to FlowContentsIterator.
1043         https://bugs.webkit.org/show_bug.cgi?id=140944
1044
1045         Reviewed by Antti Koivisto.
1046
1047         This patch cleans up FlowContents's interface by moving the iterator functionality
1048         to this new FlowContentsIterator class.
1049
1050         No change in functionality.
1051
1052         * CMakeLists.txt:
1053         * WebCore.vcxproj/WebCore.vcxproj:
1054         * WebCore.vcxproj/WebCore.vcxproj.filters:
1055         * WebCore.xcodeproj/project.pbxproj:
1056         * rendering/SimpleLineLayout.cpp:
1057         (WebCore::SimpleLineLayout::LineState::addUncommitted):
1058         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
1059         (WebCore::SimpleLineLayout::preWrap):
1060         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1061         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
1062         (WebCore::SimpleLineLayout::firstFragment):
1063         (WebCore::SimpleLineLayout::createLineRuns):
1064         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
1065         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
1066         (WebCore::SimpleLineLayout::createTextRuns):
1067         * rendering/SimpleLineLayoutFlowContents.cpp:
1068         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
1069         (WebCore::SimpleLineLayout::FlowContents::Style::Style): Deleted.
1070         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment): Deleted.
1071         (WebCore::SimpleLineLayout::nextBreakablePosition): Deleted.
1072         (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition): Deleted.
1073         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
1074         (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition): Deleted.
1075         (WebCore::SimpleLineLayout::FlowContents::textWidth): Deleted.
1076         (WebCore::SimpleLineLayout::FlowContents::runWidth): Deleted.
1077         * rendering/SimpleLineLayoutFlowContents.h:
1078         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator):
1079         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
1080         (WebCore::SimpleLineLayout::FlowContents::begin):
1081         (WebCore::SimpleLineLayout::FlowContents::end):
1082         (WebCore::SimpleLineLayout::FlowContents::length):
1083         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++):
1084         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==):
1085         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=):
1086         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition):
1087         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment): Deleted.
1088         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty): Deleted.
1089         (WebCore::SimpleLineLayout::FlowContents::hasOneSegment): Deleted.
1090         (WebCore::SimpleLineLayout::FlowContents::style): Deleted.
1091         (WebCore::SimpleLineLayout::FlowContents::characterAt): Deleted.
1092         (WebCore::SimpleLineLayout::FlowContents::isLineBreak): Deleted.
1093         (WebCore::SimpleLineLayout::FlowContents::isEnd): Deleted.
1094         * rendering/SimpleLineLayoutFlowContentsIterator.cpp: Copied from Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp.
1095         (WebCore::SimpleLineLayout::FlowContentsIterator::Style::Style):
1096         (WebCore::SimpleLineLayout::FlowContentsIterator::FlowContentsIterator):
1097         (WebCore::SimpleLineLayout::FlowContentsIterator::nextTextFragment):
1098         (WebCore::SimpleLineLayout::FlowContentsIterator::textWidth):
1099         (WebCore::SimpleLineLayout::nextBreakablePosition):
1100         (WebCore::SimpleLineLayout::FlowContentsIterator::findNextBreakablePosition):
1101         (WebCore::SimpleLineLayout::findNextNonWhitespace):
1102         (WebCore::SimpleLineLayout::FlowContentsIterator::findNextNonWhitespacePosition):
1103         (WebCore::SimpleLineLayout::FlowContentsIterator::runWidth):
1104         * rendering/SimpleLineLayoutFlowContentsIterator.h: Copied from Source/WebCore/rendering/SimpleLineLayoutFlowContents.h.
1105         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::TextFragment):
1106         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isEmpty):
1107         (WebCore::SimpleLineLayout::FlowContentsIterator::style):
1108         (WebCore::SimpleLineLayout::FlowContentsIterator::segmentForPosition):
1109         (WebCore::SimpleLineLayout::FlowContentsIterator::characterAt):
1110         (WebCore::SimpleLineLayout::FlowContentsIterator::isLineBreak):
1111         (WebCore::SimpleLineLayout::FlowContentsIterator::isEnd):
1112
1113 2015-01-28  Beth Dakin  <bdakin@apple.com>
1114
1115         Remove Mountain Lion code from WebCore
1116         https://bugs.webkit.org/show_bug.cgi?id=141007
1117
1118         Reviewed by Sam Weinig.
1119
1120         * WebCore.exp.in:
1121         * page/AlternativeTextClient.h:
1122         * page/mac/SettingsMac.mm:
1123         (WebCore::Settings::initializeDefaultFontFamilies):
1124         * platform/cocoa/SystemVersion.mm:
1125         (WebCore::callGestalt): Deleted.
1126         (WebCore::createSystemMarketingVersion): Deleted.
1127         * platform/graphics/Font.cpp:
1128         (WebCore::Font::applyTransforms):
1129         * platform/graphics/WidthIterator.h:
1130         (WebCore::WidthIterator::supportsTypesettingFeatures):
1131         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1132         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
1133         * platform/graphics/ca/GraphicsLayerCA.cpp:
1134         (WebCore::supportsAcceleratedFilterAnimations):
1135         * platform/graphics/ca/PlatformCAFilters.h:
1136         * platform/graphics/mac/FontCacheMac.mm:
1137         (WebCore::FontCache::platformInit):
1138         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1139         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
1140         * platform/mac/PlatformEventFactoryMac.mm:
1141         (WebCore::phaseForEvent):
1142         * platform/mac/WebCoreSystemInterface.h:
1143         * platform/mac/WebCoreSystemInterface.mm:
1144         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1145         (WebCore::SocketStreamHandle::createStreams):
1146         * platform/network/cocoa/CredentialCocoa.mm:
1147         (WebCore::toCredentialPersistence):
1148         * platform/spi/cocoa/CoreTextSPI.h:
1149
1150 2015-01-28  peavo@outlook.com  <peavo@outlook.com>
1151
1152         [WinCairo] Compile error in media player implementation.
1153         https://bugs.webkit.org/show_bug.cgi?id=141004
1154
1155         Reviewed by Brent Fulgham.
1156
1157         MediaPlayer::cachedResourceLoader() returns a pointer to the resource loader, not a reference.
1158
1159         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1160         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1161         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
1162
1163 2015-01-28  Jeremy Jones  <jeremyj@apple.com>
1164
1165         Prevent implicit animation when setting fullscreen background to clear.
1166         https://bugs.webkit.org/show_bug.cgi?id=140888
1167
1168         Reviewed by Eric Carlson.
1169
1170         This patch decreases flicker when exiting fullscreen by preventing
1171         an implicit animation when changing the background to clear.
1172
1173         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1174         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
1175
1176 2015-01-28  Dana Burkart  <dburkart@apple.com>
1177
1178         Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
1179         https://bugs.webkit.org/show_bug.cgi?id=136765
1180
1181         Reviewed by Alexey Proskuryakov.
1182
1183         * Configurations/Base.xcconfig:
1184         * Configurations/DebugRelease.xcconfig:
1185         * WebCore.xcodeproj/project.pbxproj:
1186
1187 2015-01-28  Chris Dumez  <cdumez@apple.com>
1188
1189         Use an enum class for createFontFamilyValue()'s fromSystemFontID argument
1190         https://bugs.webkit.org/show_bug.cgi?id=140981
1191
1192         Reviewed by Darin Adler.
1193
1194         Use an enum class for createFontFamilyValue()'s fromSystemFontID argument
1195         instead of a simple enum, as suggested by Sam. This is a bit nicer.
1196
1197         Also, use a boolean type for CSSFontFamily.fromSystemFontID instead of
1198         the enum type to facilitate handling. Using a enum (class) for
1199         CSSFontFamily's fromSystemFontID member is not useful as it is always
1200         accessed by name.
1201
1202         * css/CSSFontFamily.h:
1203         * css/CSSParser.cpp:
1204         (WebCore::CSSParser::parseSystemFont):
1205         * css/CSSValuePool.cpp:
1206         (WebCore::CSSValuePool::createFontFamilyValue):
1207         * css/CSSValuePool.h:
1208
1209 2015-01-28  Chris Dumez  <cdumez@apple.com>
1210
1211         Fix typo in markPagesForVistedLinkStyleRecalc()
1212         https://bugs.webkit.org/show_bug.cgi?id=140977
1213
1214         Reviewed by Darin Adler.
1215
1216         * WebCore.exp.in:
1217         * history/CachedPage.h:
1218         (WebCore::CachedPage::markForVisitedLinkStyleRecalc):
1219         (WebCore::CachedPage::markForVistedLinkStyleRecalc): Deleted.
1220         * history/PageCache.cpp:
1221         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc):
1222         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc): Deleted.
1223         * history/PageCache.h:
1224
1225 2015-01-28  Chris Dumez  <cdumez@apple.com>
1226
1227         Unreviewed. Remove duplicate friend class statement after r179255.
1228
1229         * history/PageCache.h:
1230
1231 2015-01-28  Darin Adler  <darin@apple.com>
1232
1233         Make SVGElement::instancesForElement point to elements in the shadow tree, not SVGElementInstance objects
1234         https://bugs.webkit.org/show_bug.cgi?id=140984
1235
1236         Reviewed by Anders Carlsson.
1237
1238         Refactoring of code that is pretty well covered by existing tests, so
1239         not adding new tests.
1240
1241         Inspired by work Rob Buis did in Blink:
1242
1243             http://src.chromium.org/viewvc/blink?view=revision&revision=173275
1244
1245         * page/EventHandler.cpp:
1246         (WebCore::EventHandler::clear): Removed code to zero m_lastInstanceUnderMouse.
1247         (WebCore::instanceAssociatedWithShadowTreeElement): Deleted.
1248         (WebCore::EventHandler::updateMouseEventTargetNode): Removed code that used
1249         m_lastInstanceUnderMouse to track events on an object after recloning.
1250         This behavior doesn't seem to be needed to pass any existing tests, and Rob
1251         removed it from Blink, so I'll take it out and we can bring if back, based
1252         on the original element rather than on the SVGElementInstance, if we find we
1253         need to restore the behavior in the future.
1254
1255         * page/EventHandler.h: Removed m_lastInstanceUnderMouse.
1256
1257         * svg/SVGAnimateElementBase.cpp:
1258         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
1259         Changed this function to take a reference and to call the updated version
1260         of the targetElement.animatedPropertyTypesForAttribute function.
1261         (WebCore::SVGAnimateElementBase::calculateAnimatedValue): Updated to pass
1262         a reference rather than a pointer.
1263         (WebCore::SVGAnimateElementBase::resetAnimatedType): Updated to pass
1264         references rather than pointers.
1265         (WebCore::applyCSSPropertyToTarget): Updated to take a reference.
1266         (WebCore::removeCSSPropertyFromTarget): Ditto.
1267         (WebCore::applyCSSPropertyToTargetAndInstances): Ditto. Also use a modern
1268         for loop, and iterate over shadow tree instances, not over SVGElementInstance.
1269         (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
1270         (WebCore::notifyTargetAboutAnimValChange): Ditto.
1271         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
1272         (WebCore::SVGAnimateElementBase::clearAnimatedType): More of the same.
1273         (WebCore::SVGAnimateElementBase::applyResultsToTarget): Ditto.
1274         (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType): Ditto.
1275
1276         * svg/SVGAnimateElementBase.h: Changed determineAnimatedPropertyType to take
1277         a reference rahter than a pointer.
1278
1279         * svg/SVGAnimateMotionElement.cpp:
1280         (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Updated to use the
1281         new instances instead of SVGElementInstance. Also added code to skip work if
1282         the transform is not changing, and use the assignment operator instead of
1283         breaking one matrix down and calling setMatrix on the other.
1284
1285         * svg/SVGAnimatedTypeAnimator.cpp:
1286         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
1287         Changed to take a reference rather than a pointer, and rewrote to streamline,
1288         using modern for loops and using the new instances set.
1289
1290         * svg/SVGAnimatedTypeAnimator.h: Removed the constructors from the
1291         SVGElementAnimatedProperties struct since we can build them just fine without
1292         them. Changed findAnimatedPropertiesForAttributeName to take a reference.
1293
1294         * svg/SVGAnimationElement.cpp:
1295         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): Pass a
1296         reference rather than a pointer. Also streamlined the code a bit and removed
1297         a comment that tried to say exactly what the code was doing, but was outdated.
1298
1299         * svg/SVGElement.cpp:
1300         (WebCore::SVGElement::~SVGElement): Disconnect all instances from this element
1301         and also disconnect the corresponding element from this element if it itself
1302         is an instance. This guarantees we have no dangling pointers.
1303         (WebCore::SVGElement::mapInstanceToElement): Deleted.
1304         (WebCore::SVGElement::removeInstanceMapping): Deleted.
1305         (WebCore::SVGElement::instances): Renamed from instancesForElement and changed
1306         to be a set of SVG element instances in the shadow tree, rather than
1307         SVGElementInstance objects.
1308         (WebCore::SVGElement::correspondingElement): Tweaked assertion a little and use
1309         nullptr instead of 0.
1310         (WebCore::SVGElement::correspondingUseElement): Added. Finds the use element
1311         that owns the shadow tree this element is in by following the host element
1312         pointer from the shadow root.
1313         (WebCore::SVGElement::setCorrespondingElement): Added code to insert or remove
1314         this element from the instances set of the corresponding element.
1315         (WebCore::SVGElement::animatedPropertyTypesForAttribute): Renamed from
1316         animatedPropertyTypeForAttribute and switched to use a return value instead of
1317         an out argument.
1318         (WebCore::SVGElement::addEventListener): Updated to use instances rather than
1319         the old instancesForElement.
1320         (WebCore::SVGElement::removeEventListener): Ditto.
1321         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute): Pass a reference.
1322         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute): Ditto.
1323         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Updated to use the
1324         new function from AttributeToPropertyMap.
1325
1326         * svg/SVGElement.h: Changed animatedPropertyTypesForAttribute name to be plural
1327         since it returns a vector of types, and made it use a return value instead of
1328         an out argument. Added the correspondingUseElement function, and removed the
1329         mapInstanceToElement and removeInstanceMapping functions.
1330
1331         * svg/SVGElementInstance.cpp:
1332         (WebCore::SVGElementInstance::SVGElementInstance): Removed now-unneeded call to
1333         mapInstanceToElement. This is now handled entirely by the SVGElement itself.
1334         (WebCore::SVGElementInstance::detach): Removed now-unneeded call to
1335         removeInstanceMapping. This is now handled entirely by the SVGElement itself.
1336         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Rewrote to be
1337         based on the instances set; logic is different now because we remove each
1338         element from that set as we go.
1339
1340         * svg/SVGElementRareData.h:
1341         (WebCore::SVGElementRareData::SVGElementRareData): Removed initialization of
1342         pointers since we can do that where they are defined instead.
1343         (WebCore::SVGElementRareData::instances): Renamed from elementInstances and
1344         changed the type.
1345         (WebCore::SVGElementRareData::destroyAnimatedSMILStyleProperties): Deleted.
1346         Unneeded since it was already called just before deleting the rare data.
1347
1348         * svg/SVGTests.cpp:
1349         (WebCore::SVGTests::SVGTests): Took advantage of using namespace.
1350         (WebCore::createSVGTestPropertyInfo): Added. Helper for function below.
1351         (WebCore::createSVGTextAttributeToPropertyMap): Ditto.
1352         (WebCore::SVGTests::attributeToPropertyMap): Changed to use the create function
1353         above. No longer allocates objects on the heap.
1354         (WebCore::SVGTests::hasExtension): Reworked #if code to make the MathML part
1355         independent rather than repeating the return statement.
1356         (WebCore::SVGTests::synchronizeAttribute): Added. Helper for functions below.
1357         (WebCore::SVGTests::synchronizeRequiredFeatures): Call synchronizeAttribute.
1358         (WebCore::SVGTests::synchronizeRequiredExtensions): Ditto.
1359         (WebCore::SVGTests::synchronizeSystemLanguage): Ditto.
1360
1361         * svg/SVGTests.h: Removed unneeded forward declarations. Mark the many functions
1362         that do not depend on object state as static so the call sites don't wastefully
1363         pass a this pointer. Removed the unneeded requiredFeaturesPropertyInfo,
1364         requiredExtensionsPropertyInfo, and systemLanguagePropertyInfo functions.
1365         Added synchronizeAttribute helper function.
1366
1367         * svg/SVGUseElement.cpp:
1368         (WebCore::SVGUseElement::invalidateDependentShadowTrees): Updated to use the
1369         new instances set and a modern for loop.
1370
1371         * svg/properties/SVGAnimatedPropertyMacros.h: Pass reference to addProperty and
1372         made a few other small refinements.
1373
1374         * svg/properties/SVGAttributeToPropertyMap.cpp:
1375         (WebCore::SVGAttributeToPropertyMap::addProperties): Fixed problems mentioned
1376         in FIXME where we did too much hashing and vector resizing.
1377         (WebCore::SVGAttributeToPropertyMap::addProperty): Streamlined to use a single
1378         hash table lookup.
1379         (WebCore::SVGAttributeToPropertyMap::properties): Renamed from
1380         animatedPropertiesForAttribute and changed to return a vector rather than using
1381         an out argument. Also had to change some since the vectors are in the hash table
1382         now rather than allocated on the heap.
1383         (WebCore::SVGAttributeToPropertyMap::types): Renamed from
1384         animatedPropertyTypeForAttribute and made changes just like the ones above.
1385         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Use modern for
1386         loops, take a reference rather than a pointer, and use the function pointer
1387         directly instead of calling through a helper with various assertions.
1388         (WebCore::SVGAttributeToPropertyMap::synchronizeProperty): Ditto.
1389
1390         * svg/properties/SVGAttributeToPropertyMap.h: Updated to match the changes
1391         above. Also changed the map to contain vectors instead of pointers to vectors.
1392
1393 2015-01-28  Darin Adler  <darin@apple.com>
1394
1395         REGRESSION (r173698): Leaks of selector lists in CSS parsing
1396         https://bugs.webkit.org/show_bug.cgi?id=140993
1397
1398         Reviewed by Anders Carlsson.
1399
1400         * css/CSSGrammar.y.in: Fixed logic in rules that were not moving a parser-
1401         owned pointer into a unique_ptr in all code paths. The magic value
1402         invalidSelectorVector makes this really messy. We might want to find a
1403         different seolution in the future.
1404
1405 2015-01-28  Brent Fulgham  <bfulgham@apple.com>
1406
1407         [Win] Unreviewed build fix after r179247.
1408
1409         * history/PageCache.h: Need to declare NeverDestroyed specialization as
1410         a friend.
1411
1412 2015-01-28  Joanmarie Diggs  <jdiggs@igalia.com>
1413
1414         AX: [ATK] Implement support for new AtkRole types for MathML
1415         https://bugs.webkit.org/show_bug.cgi?id=140916
1416
1417         Reviewed by Chris Fleizach.
1418
1419         Expose mfrac as ATK_ROLE_MATH_FRACTION, and both mroot and msqrt as
1420         ATK_ROLE_MATH_ROOT. In the case of script elements, expose the container
1421         (msub, msup, msubsup, and mmultiscripts) using the generic text block role
1422         ATK_ROLE_SECTION. Then expose the actual script child elements using role
1423         ATK_ROLE_SUBSCRIPT/ATK_ROLE_SUPERSCRIPT. In the case of mmultiscripts,
1424         expose whether it is a prescript or postscript via AtkObject attribute.
1425
1426         Test: accessibility/math-multiscript-attributes.html
1427         Also added additional test cases to accessibility/roles-exposed.html
1428
1429         * accessibility/AccessibilityObject.h:
1430         (WebCore::AccessibilityObject::isMathScriptObject): Added.
1431         (WebCore::AccessibilityObject::isMathMultiscriptObject): Added.
1432         * accessibility/AccessibilityRenderObject.cpp:
1433         (WebCore::AccessibilityRenderObject::isMathScriptObject): Added.
1434         (WebCore::AccessibilityRenderObject::isMathMultiscriptObject): Added.
1435         * accessibility/AccessibilityRenderObject.h:
1436         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1437         (webkitAccessibleGetAttributes): Expose whether a multiscript object is a prescript or postscript.
1438         (atkRole): Map WebCore Accessibility objects to the new ATK roles.
1439
1440 2015-01-28  Chris Dumez  <cdumez@apple.com>
1441
1442         Rename pageCache() to PageCache::shared() and return a reference
1443         https://bugs.webkit.org/show_bug.cgi?id=140983
1444
1445         Reviewed by Andreas Kling.
1446
1447         Rename pageCache() to PageCache::shared() as this is a singleton class
1448         and have it return a reference instead of a pointer.
1449
1450         * history/BackForwardList.cpp:
1451         (WebCore::BackForwardList::addItem):
1452         (WebCore::BackForwardList::setCapacity):
1453         (WebCore::BackForwardList::clearAllPageCaches):
1454         (WebCore::BackForwardList::close):
1455         * history/CachedFrame.cpp:
1456         (WebCore::CachedFrame::CachedFrame):
1457         * history/HistoryItem.cpp:
1458         (WebCore::HistoryItem::setURL):
1459         * history/PageCache.cpp:
1460         (WebCore::PageCache::shared):
1461         (WebCore::PageCache::get):
1462         (WebCore::pageCache): Deleted.
1463         * history/PageCache.h:
1464         * loader/FrameLoader.cpp:
1465         (WebCore::FrameLoader::commitProvisionalLoad):
1466         (WebCore::FrameLoader::loadDifferentDocumentItem):
1467         * loader/HistoryController.cpp:
1468         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
1469         (WebCore::HistoryController::updateForReload):
1470         * page/Frame.cpp:
1471         (WebCore::Frame::setPageAndTextZoomFactors):
1472         * page/Page.cpp:
1473         (WebCore::Page::setDeviceScaleFactor):
1474         (WebCore::Page::setPagination):
1475         (WebCore::Page::setVisitedLinkStore):
1476         * page/PageGroup.cpp:
1477         (WebCore::PageGroup::captionPreferencesChanged):
1478         * page/Settings.cpp:
1479         (WebCore::Settings::setUsesPageCache):
1480         * platform/MemoryPressureHandler.cpp:
1481         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1482
1483 2015-01-28  Darin Adler  <darin@apple.com>
1484
1485         Fix MediaPlayerEngine leaks
1486         https://bugs.webkit.org/show_bug.cgi?id=140992
1487
1488         Reviewed by Jer Noble.
1489
1490         * platform/graphics/MediaPlayer.cpp:
1491         (WebCore::mutableInstalledMediaEnginesVector): Added.
1492         (WebCore::buildMediaEnginesVector): Added.
1493         (WebCore::installedMediaEngines): Changed this to be a vector of factories
1494         instead of a vector of heap-allocated factories. The old code would leak
1495         all the factories when this was called with the ResetEngines option.
1496         (WebCore::addMediaEngine): Updated for above change.
1497         (WebCore::bestMediaEngineForSupportParameters): Ditto.
1498         (WebCore::nextMediaEngine): Ditto.
1499         (WebCore::MediaPlayer::nextBestMediaEngine): Ditto.
1500         (WebCore::MediaPlayer::loadWithNextMediaEngine): Ditto.
1501         (WebCore::MediaPlayer::supportsType): Ditto.
1502         (WebCore::MediaPlayer::getSupportedTypes): Ditto.
1503         (WebCore::MediaPlayer::getSitesInMediaCache): Ditto.
1504         (WebCore::MediaPlayer::clearMediaCache): Ditto.
1505         (WebCore::MediaPlayer::clearMediaCacheForSite): Ditto.
1506         (WebCore::MediaPlayer::supportsKeySystem): Ditto.
1507         (WebCore::MediaPlayer::resetMediaEngines): Ditto.
1508         * platform/graphics/MediaPlayer.h: Ditto.
1509
1510 2015-01-28  Jeongmin Kim  <jm86.kim@lge.com>
1511
1512         Rename descendentxxx to descendantxxxx in RenderLayerBacking
1513         https://bugs.webkit.org/show_bug.cgi?id=140979
1514
1515         Reviewed by Martin Robinson.
1516
1517         Rename descendentxxx to descendantxxxx in RenderLayerBacking
1518         for matching other variables and function names.
1519
1520         * rendering/RenderLayerBacking.cpp:
1521         (WebCore::RenderLayerBacking::updateConfiguration):
1522         (WebCore::RenderLayerBacking::updateAfterDescendants):
1523         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
1524         (WebCore::RenderLayerBacking::paintsChildren):
1525         (WebCore::descendantLayerPaintsIntoAncestor):
1526         (WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
1527         (WebCore::descendentLayerPaintsIntoAncestor): Deleted.
1528         (WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers): Deleted.
1529
1530 2015-01-27  Chris Dumez  <cdumez@apple.com>
1531
1532         Use a Ref<CachedResourceLoader> in Document instead of a RefPtr
1533         https://bugs.webkit.org/show_bug.cgi?id=140971
1534
1535         Reviewed by Andreas Kling.
1536
1537         Use a Ref<CachedResourceLoader> in Document instead of a RefPtr as it
1538         can never be null. Also have Document::cachedResourceLoader() return a
1539         reference instead of a pointer. This gets rid of a lot of unnecessary
1540         null-checks.
1541
1542 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
1543
1544         More build fixes for newer clang.
1545
1546         Rubber-stamped by Anders Carlsson.
1547
1548         * loader/icon/IconDatabase.h: Added missing override keywords.
1549
1550 2015-01-27  Roger Fong  <roger_fong@apple.com>
1551
1552         WebGL2: Disable various extensions on WebGL2 context that have been promoted to core.
1553         https://bugs.webkit.org/show_bug.cgi?id=140907.
1554         <rdar://problem/19545857>
1555
1556         Reviewed by Brent Fulgham.
1557
1558         * html/canvas/WebGL2RenderingContext.cpp:
1559         (WebCore::WebGL2RenderingContext::getExtension):
1560         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1561         * html/canvas/WebGL2RenderingContext.h:
1562         * html/canvas/WebGLRenderingContext.cpp:
1563         (WebCore::WebGLRenderingContext::getExtension):
1564         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1565         * html/canvas/WebGLRenderingContext.h:
1566         * html/canvas/WebGLRenderingContextBase.cpp:
1567         (WebCore::WebGLRenderingContextBase::getSupportedExtensions): Deleted.
1568         * html/canvas/WebGLRenderingContextBase.h:
1569         * html/canvas/WebGLRenderingContextBase.idl: 
1570         Remove some extra extension enums that shouldn't have been declared on the context idl.
1571
1572 2015-01-27  Chris Dumez  <cdumez@apple.com>
1573
1574         Remove unnecessary m_cachedPage null-checks in PageCache
1575         https://bugs.webkit.org/show_bug.cgi?id=140965
1576
1577         Reviewed by Andreas Kling.
1578
1579         Remove unnecessary m_cachedPage null-checks in PageCache. We initialize
1580         m_cachedPage when inserting the HistoryItem in the page cache and clear
1581         it when removing it from the page cache. Therefore, it is guaranteed
1582         that HistoryItems currently in the page cache have m_cachedPage
1583         initialized and there is no need to null-check it.
1584
1585         * history/PageCache.cpp:
1586         (WebCore::PageCache::frameCount):
1587         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
1588         (WebCore::PageCache::markPagesForFullStyleRecalc):
1589         (WebCore::PageCache::markPagesForDeviceScaleChanged):
1590         (WebCore::PageCache::markPagesForCaptionPreferencesChanged):
1591
1592 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
1593
1594         Some NSAccessibility methods we use are deprecated on 10.10
1595         https://bugs.webkit.org/show_bug.cgi?id=140966
1596
1597         Reviewed by Anders Carlsson.
1598
1599         * accessibility/mac/AccessibilityObjectMac.mm:
1600         (WebCore::AccessibilityObject::overrideAttachmentParent):
1601         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
1602         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1603         (-[WebAccessibilityObjectWrapper role]):
1604         (-[WebAccessibilityObjectWrapper roleDescription]):
1605         Silence the warnings for now.
1606
1607 2015-01-27  Chris Dumez  <cdumez@apple.com>
1608
1609         Rename isExpandedShorthand() to isShorthandCSSProperty() for clarity
1610         https://bugs.webkit.org/show_bug.cgi?id=140954
1611
1612         Reviewed by Andreas Kling.
1613
1614         Rename isExpandedShorthand() to isShorthandCSSProperty() for clarity as
1615         all CSS shorthand properties are now expanded during parsing (even
1616         'font').
1617
1618         * css/StylePropertyShorthand.cpp:
1619         (WebCore::isShorthandCSSProperty):
1620         (WebCore::isExpandedShorthand): Deleted.
1621         * css/StylePropertyShorthand.h:
1622         * css/StyleResolver.cpp:
1623         (WebCore::StyleResolver::applyProperty):
1624         * css/makeprop.pl:
1625
1626 2015-01-27  Eric Carlson  <eric.carlson@apple.com>
1627
1628         Simplify http/tests/media/video-play-stall.html
1629         https://bugs.webkit.org/show_bug.cgi?id=140630
1630
1631         Reviewed by Brent Fulgham.
1632
1633         Test: http/tests/media/video-play-waiting.html
1634
1635         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1636         (WebCore::MediaPlayerPrivateAVFoundation::play): Add more logging.
1637         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty
1638             always maps to HaveCurrentData.
1639         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Don't log FunctionType,
1640             doing so it needlessly verbose.
1641         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Ditto.
1642         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1643         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Log KVO property 
1644             values and notification state.
1645
1646 2015-01-27  Commit Queue  <commit-queue@webkit.org>
1647
1648         Unreviewed, rolling out r179192.
1649         https://bugs.webkit.org/show_bug.cgi?id=140953
1650
1651         Caused numerous layout test failures (Requested by mattbaker_
1652         on #webkit).
1653
1654         Reverted changeset:
1655
1656         "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
1657         pages"
1658         https://bugs.webkit.org/show_bug.cgi?id=140900
1659         http://trac.webkit.org/changeset/179192
1660
1661 2015-01-27  Benjamin Poulain  <bpoulain@apple.com>
1662
1663         Modernize some constructors of the CSS JIT
1664         https://bugs.webkit.org/show_bug.cgi?id=140903
1665
1666         Reviewed by Darin Adler.
1667
1668         Two constructors were still using the old style.
1669
1670         * cssjit/SelectorCompiler.cpp:
1671         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment): Deleted.
1672         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern): Deleted.
1673
1674 2015-01-27  Brent Fulgham  <bfulgham@apple.com>
1675
1676         [Win] Unreviewed build fix.
1677
1678         Lack of include guards in WebVTTElement.h caused a build failure once we started including
1679         this header file from more than one implementation file.
1680
1681         * html/track/WebVTTElement.h:
1682
1683 2015-01-26  Sylvain Galineau  <galineau@adobe.com>
1684
1685         CSSKeyframesRule::findRule() and deleteRule() should delete the last matching rule, not the first
1686         https://bugs.webkit.org/show_bug.cgi?id=139732
1687
1688         Reviewed by Dean Jackson and Darin Adler.
1689
1690         No new tests because existing tests have been updated to verify this behavior.
1691
1692         * css/CSSKeyframeRule.h:
1693         (WebCore::StyleKeyframe::getKeys): Deleted.
1694         * css/StyleResolver.cpp:
1695         (WebCore::StyleResolver::keyframeStylesForAnimation): use StyleKeyframe::keys().
1696         * css/CSSKeyframeRule.cpp:
1697         (WebCore::StyleKeyframe::parseKeyString): Deleted. Moved to CSSParser.
1698         (WebCore::StyleKeyframe::keyText): Build keyframe selector from Vector<double> representation.
1699         * css/CSSKeyframeRule.h:
1700         (WebCore::StyleKeyframe::setKeyText): parse keyframe selector into Vector<double>.
1701         (WebCore::StyleKeyframe::keys): Added. Returns vector representation of selector keys.
1702         (WebCore::StyleKeyframe::getKeys): Deleted. Now keys().
1703         * css/CSSKeyframesRule.cpp:
1704         (WebCore::StyleRuleKeyframes::findKeyframeIndex): Return last matching rule.
1705         * css/CSSParser.cpp:
1706         (WebCore::CSSParser::parseKeyframeSelector): Added. Moved from StyleKeyframe.
1707         * css/CSSParser.h:
1708         (WebCore::CSSParser::parseKeyframeSelector): Added. Moved from StyleKeyframe.
1709
1710 2015-01-26  Geoffrey Garen  <ggaren@apple.com>
1711
1712         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
1713         https://bugs.webkit.org/show_bug.cgi?id=140900
1714
1715         Reviewed by Mark Hahnenberg.
1716
1717         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1718         (WebCore::MemoryPressureHandler::install): Be sure to release other
1719         memory after GC and not before, since GC might contribute to free
1720         malloc pages now.
1721
1722 2015-01-27  Zalan Bujtas  <zalan@apple.com>
1723
1724         Simple line layout: Make FlowContents an iterator class.
1725         https://bugs.webkit.org/show_bug.cgi?id=140909
1726
1727         Reviewed by Antti Koivisto.
1728
1729         This patch transfers content position handling from createLineRuns()/LineState to
1730         FlowContents. FlowContents becomes a real iterator class.
1731         It tightens content and position information so that we can start supporting
1732         no textual content such as <br>.
1733
1734         No change in functionality.
1735
1736         * rendering/SimpleLineLayout.cpp:
1737         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): Remove redundant committedLogicalRight.
1738         (WebCore::SimpleLineLayout::LineState::addUncommitted): Now that we don't have current
1739         positon in LineState, we need to be able to figure out where we start the uncommitted content.
1740         This is mainly relevant after collapsed whitespace, when we start a new uncommitted segment.
1741         It was previously achieved through LineState::jumpTo().
1742         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
1743         (WebCore::SimpleLineLayout::firstFragment): Return the first fragment for this line.
1744         (WebCore::SimpleLineLayout::createLineRuns): Renaming and removing position handling.
1745         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): Renaming.
1746         (WebCore::SimpleLineLayout::createTextRuns):
1747         (WebCore::SimpleLineLayout::LineState::jumpTo): Deleted.
1748         (WebCore::SimpleLineLayout::initializeNewLine): Deleted. : Move overflow fragment functionality
1749         to firstFragment().
1750         * rendering/SimpleLineLayoutFlowContents.cpp:
1751         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
1752         * rendering/SimpleLineLayoutFlowContents.h:
1753
1754 2015-01-27  Chris Dumez  <cdumez@apple.com>
1755
1756         HTMLElement.dir should only return known values
1757         https://bugs.webkit.org/show_bug.cgi?id=140925
1758
1759         Reviewed by Darin Adler.
1760
1761         HTMLElement.dir should only return known values according to the HTML
1762         specification:
1763         https://html.spec.whatwg.org/multipage/dom.html#dom-document-dir
1764
1765         Chrome and Firefox 28 match the specification. IE11's behavior is
1766         slightly different:
1767         - When setting an unknown 'dir' value, an exception will be thrown.
1768         - Setting a known 'dir' value in a non-canonical case (e.g. "RTL"),
1769           the value will be directly converted to its canonical form (e.g.
1770           "rtl") before updating the DOM tree. (close to the spec but changing
1771           the case upon setting).
1772
1773         This patch is based on the following Blink revision by me:
1774         https://src.chromium.org/viewvc/blink?view=rev&revision=171861
1775
1776         Test: fast/dom/document-dir-property.html
1777
1778         * html/HTMLDocument.cpp:
1779         (WebCore::HTMLDocument::dir):
1780         (WebCore::HTMLDocument::setDir):
1781         * html/HTMLDocument.h:
1782         * html/HTMLElement.cpp:
1783         (WebCore::toValidDirValue):
1784         (WebCore::HTMLElement::dir):
1785         (WebCore::HTMLElement::setDir):
1786         * html/HTMLElement.h:
1787         * html/HTMLElement.idl:
1788
1789 2015-01-26  Chris Dumez  <cdumez@apple.com>
1790
1791         Introduce Document::body() for call sites interested in the <body> element
1792         https://bugs.webkit.org/show_bug.cgi?id=140920
1793
1794         Reviewed by Darin Adler.
1795
1796         Introduce Document::body() method for call sites interested only in the
1797         document's <body> element (not the <frameset>). Also clean up the call
1798         sites of Document::bodyOrFrameset() to cache the return value when
1799         suitable as this method does a tree traversal.
1800
1801         This patch does not change behavior, it merely ports calls sites that
1802         were calling Document::bodyOrFrameset() then checking if the tag was
1803         <body>, to call Document::body() instead. Doing so is more efficient
1804         and clearer.
1805
1806 2015-01-26  Brent Fulgham  <bfulgham@apple.com>
1807
1808         [Win] ASSERTION FAILED !m_ptr under AccessibilityController::winAddNotificationListener
1809         https://bugs.webkit.org/show_bug.cgi?id=87426
1810         <rdar://problem/11527899>
1811
1812         Reviewed by Darin Adler.
1813
1814         Revise COMPtr to work better with our HashMap implementation:
1815         (1) Add a specialization for IsSmartPtr.
1816         (2) Remove PtrHash specialization.
1817         (3) Refresh HashTrails specialization for COMPtr to match what we
1818         do for RefPtr.
1819
1820         * platform/win/COMPtr.h:
1821
1822 2015-01-26  Sylvain Galineau  <galineau@adobe.com>
1823
1824         The computed value of line-height:normal is incorrect
1825         https://bugs.webkit.org/show_bug.cgi?id=133744
1826
1827         Reviewed by Dean Jackson.
1828
1829         Use font's line spacing as computed line-height value when specified value is 'normal'.
1830         This behavior is compatible with all other engines.
1831
1832         No new tests; all existing tests are updated to reflect the new computed value.
1833
1834         * css/CSSComputedStyleDeclaration.cpp:
1835         (WebCore::lineHeightFromStyle): If line-height wasn't set, use the font's line spacing (same as Blink).
1836
1837 2015-01-26  Chris Dumez  <cdumez@apple.com>
1838
1839         Document.dir should reflect the 'dir' attribute of the root html element
1840         https://bugs.webkit.org/show_bug.cgi?id=140922
1841
1842         Reviewed by Darin Adler.
1843
1844         Document.dir should reflect the 'dir' content attribute of the root
1845         <html> element as per the specification:
1846         https://html.spec.whatwg.org/multipage/dom.html#dom-document-dir
1847
1848         Previously, WebKit was reflecting the 'dir' content attribute of the
1849         body element. This patch aligns WebKit with the specification and the
1850         behavior of other browsers (tested Firefox 28, IE11 and Chrome).
1851
1852         This patch is based on the following Blink revision by me:
1853         https://src.chromium.org/viewvc/blink?revision=171734&view=revision
1854
1855         Test: fast/dom/document-dir-property.html
1856
1857         * html/HTMLDocument.cpp:
1858         (WebCore::HTMLDocument::dir):
1859         (WebCore::HTMLDocument::setDir):
1860         * html/HTMLDocument.h:
1861
1862 2015-01-26  Darin Adler  <darin@apple.com>
1863
1864         REGRESSION (r179101): SVGUseElement::expandUseElementsInShadowTree has an object lifetime mistake
1865         https://bugs.webkit.org/show_bug.cgi?id=140921
1866
1867         Reviewed by Alexey Proskuryakov.
1868
1869         Bug found by running regression tests with Address Sanitizer.
1870
1871         * svg/SVGUseElement.cpp:
1872         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Use a Ref to protect
1873         the original use element after it's been replaced in the tree; we use it for
1874         one more thing after that.
1875
1876 2015-01-26  Roger Fong  <roger_fong@apple.com>
1877
1878         WebGL 2.0: Actually allow for experimental-webgl2 context creation.
1879         https://bugs.webkit.org/show_bug.cgi?id=140906
1880         <rdar://problem/19606875>.
1881
1882         Reviewed by Brent Fulgham.
1883
1884         * html/HTMLCanvasElement.cpp:
1885         (WebCore::HTMLCanvasElement::is3dType): Include "experimental-webgl2" in the list of acceptable 3d context types.
1886
1887 2015-01-26  Chris Dumez  <cdumez@apple.com>
1888
1889         Rename Document::body() to Document::bodyOrFrameset() for clarity
1890         https://bugs.webkit.org/show_bug.cgi?id=140902
1891
1892         Reviewed by Andreas Kling.
1893
1894         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
1895         method does not necessarily return an HTMLBodyElement, it can also
1896         return a frameset as per the specification:
1897         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
1898
1899         This method is often misused internally (the caller is only interested
1900         in the <body> element). I will fix these instances in a follow-up patch,
1901         this patch is only renaming mechanically.
1902
1903 2015-01-26  Byungseon Shin  <sun.shin@lge.com>
1904
1905         Fix Border-radius clipping issue on a composited descendants
1906         https://bugs.webkit.org/show_bug.cgi?id=138551 
1907
1908         Reviewed by Simon Fraser.
1909
1910         Fix assertion in RenderLayerBacking::paintIntoLayer
1911         by not checking out of sync with the GraphicsLayer heirarchy
1912         in GraphicsLayerPaintChildClippingMask phase.
1913
1914         Test: compositing/clipping/border-radius-overflow-hidden-stacking-context.html
1915
1916         * rendering/RenderLayerBacking.cpp:
1917         (WebCore::RenderLayerBacking::paintIntoLayer):
1918
1919 2015-01-26  Chris Dumez  <cdumez@apple.com>
1920
1921         Simplify RenderElement's shouldRepaintForImageAnimation()
1922         https://bugs.webkit.org/show_bug.cgi?id=140890
1923
1924         Reviewed by Darin Adler.
1925
1926         Simplify RenderElement's shouldRepaintForImageAnimation() by
1927         not calling rendererForRootBackground(). The previous code was
1928         doing a null-check on Document::documentElement() but failing
1929         to do a null-check on the renderer just after, which lead me
1930         to refactor this code.
1931
1932         Instead of calling document().documentElement.renderer(), we
1933         now call renderer.parent(). This is equivalent because we already
1934         know that renderer.isBody() returns true. The parent of the <body>
1935         has to be the <html> element, which has to be the documentElement.
1936         There is also no need to do a null-check on renderer.parent(). We
1937         already know that the <body> has a renderer (because |renderer| is
1938         its renderer), thus its parent <html> element has to have a renderer
1939         as well.
1940
1941         Finally, simply call !rootElement.hasBackground() instead of
1942         rootElement.rendererForRootBackground() == &bodyRenderer to determine
1943         if the background painted by the root. This is equivalent but more
1944         efficient because:
1945         - We already know that the root renderer's is an <html> element. We
1946           can thus avoid the check in rendererForRootBackground().
1947         - We already have the <body>'s renderer so we don't need to do the
1948           DOM tree traversal in rendererForRootBackground() to get it.
1949
1950         No new tests, already covered by:
1951         fast/images/animated-gif-body-delegated-background-image.html
1952         fast/images/animated-gif-html-background-image.html
1953
1954         * rendering/RenderElement.cpp:
1955         (WebCore::shouldRepaintForImageAnimation):
1956
1957 2015-01-26  Chris Dumez  <cdumez@apple.com>
1958
1959         First argument to DOM traversal functions should be a reference
1960         https://bugs.webkit.org/show_bug.cgi?id=140895
1961
1962         Reviewed by Antti Koivisto.
1963
1964         First argument to DOM traversal functions should be a reference instead
1965         of a pointer as it is dereferenced without null-check.
1966
1967 2015-01-26  Roger Fong  <roger_fong@apple.com>
1968
1969         [WebGL2] Update IDL for WebGL2.
1970         https://bugs.webkit.org/show_bug.cgi?id=126406
1971         <rdar://problem/15002268>.
1972
1973         Reviewed by Brent Fulgham.
1974
1975         Update WebGL2RenderingContext idl to match spec. Create method stubs as necessary.
1976
1977         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1978         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter):
1979         (WebCore::JSWebGL2RenderingContext::getInternalformatParameter):
1980         (WebCore::JSWebGL2RenderingContext::getQueryParameter):
1981         (WebCore::JSWebGL2RenderingContext::getSamplerParameter):
1982         (WebCore::JSWebGL2RenderingContext::getSyncParameter):
1983         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
1984         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter):
1985         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName):
1986         * html/canvas/WebGL2RenderingContext.cpp:
1987         (WebCore::WebGL2RenderingContext::copyBufferSubData):
1988         (WebCore::WebGL2RenderingContext::getBufferSubData):
1989         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
1990         (WebCore::WebGL2RenderingContext::blitFramebuffer):
1991         (WebCore::WebGL2RenderingContext::framebufferTextureLayer):
1992         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
1993         (WebCore::WebGL2RenderingContext::invalidateFramebuffer):
1994         (WebCore::WebGL2RenderingContext::invalidateSubFramebuffer):
1995         (WebCore::WebGL2RenderingContext::readBuffer):
1996         (WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
1997         (WebCore::WebGL2RenderingContext::texStorage2D):
1998         (WebCore::WebGL2RenderingContext::texStorage3D):
1999         (WebCore::WebGL2RenderingContext::texImage3D):
2000         (WebCore::WebGL2RenderingContext::texSubImage3D):
2001         (WebCore::WebGL2RenderingContext::copyTexSubImage3D):
2002         (WebCore::WebGL2RenderingContext::compressedTexImage3D):
2003         (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
2004         (WebCore::WebGL2RenderingContext::getFragDataLocation):
2005         (WebCore::WebGL2RenderingContext::uniform1ui):
2006         (WebCore::WebGL2RenderingContext::uniform2ui):
2007         (WebCore::WebGL2RenderingContext::uniform3ui):
2008         (WebCore::WebGL2RenderingContext::uniform4ui):
2009         (WebCore::WebGL2RenderingContext::uniform1uiv):
2010         (WebCore::WebGL2RenderingContext::uniform2uiv):
2011         (WebCore::WebGL2RenderingContext::uniform3uiv):
2012         (WebCore::WebGL2RenderingContext::uniform4uiv):
2013         (WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
2014         (WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
2015         (WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
2016         (WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
2017         (WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
2018         (WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
2019         (WebCore::WebGL2RenderingContext::vertexAttribI4i):
2020         (WebCore::WebGL2RenderingContext::vertexAttribI4iv):
2021         (WebCore::WebGL2RenderingContext::vertexAttribI4ui):
2022         (WebCore::WebGL2RenderingContext::vertexAttribI4uiv):
2023         (WebCore::WebGL2RenderingContext::vertexAttribIPointer):
2024         (WebCore::WebGL2RenderingContext::vertexAttribDivisor):
2025         (WebCore::WebGL2RenderingContext::drawArraysInstanced):
2026         (WebCore::WebGL2RenderingContext::drawElementsInstanced):
2027         (WebCore::WebGL2RenderingContext::drawRangeElements):
2028         (WebCore::WebGL2RenderingContext::drawBuffers):
2029         (WebCore::WebGL2RenderingContext::clearBufferiv):
2030         (WebCore::WebGL2RenderingContext::clearBufferuiv):
2031         (WebCore::WebGL2RenderingContext::clearBufferfv):
2032         (WebCore::WebGL2RenderingContext::clearBufferfi):
2033         (WebCore::WebGL2RenderingContext::createQuery):
2034         (WebCore::WebGL2RenderingContext::deleteQuery):
2035         (WebCore::WebGL2RenderingContext::isQuery):
2036         (WebCore::WebGL2RenderingContext::beginQuery):
2037         (WebCore::WebGL2RenderingContext::endQuery):
2038         (WebCore::WebGL2RenderingContext::getQuery):
2039         (WebCore::WebGL2RenderingContext::getQueryParameter):
2040         (WebCore::WebGL2RenderingContext::createSampler):
2041         (WebCore::WebGL2RenderingContext::deleteSampler):
2042         (WebCore::WebGL2RenderingContext::isSampler):
2043         (WebCore::WebGL2RenderingContext::bindSampler):
2044         (WebCore::WebGL2RenderingContext::samplerParameteri):
2045         (WebCore::WebGL2RenderingContext::samplerParameterf):
2046         (WebCore::WebGL2RenderingContext::getSamplerParameter):
2047         (WebCore::WebGL2RenderingContext::fenceSync):
2048         (WebCore::WebGL2RenderingContext::isSync):
2049         (WebCore::WebGL2RenderingContext::deleteSync):
2050         (WebCore::WebGL2RenderingContext::clientWaitSync):
2051         (WebCore::WebGL2RenderingContext::waitSync):
2052         (WebCore::WebGL2RenderingContext::getSyncParameter):
2053         (WebCore::WebGL2RenderingContext::createTransformFeedback):
2054         (WebCore::WebGL2RenderingContext::deleteTransformFeedback):
2055         (WebCore::WebGL2RenderingContext::isTransformFeedback):
2056         (WebCore::WebGL2RenderingContext::bindTransformFeedback):
2057         (WebCore::WebGL2RenderingContext::beginTransformFeedback):
2058         (WebCore::WebGL2RenderingContext::endTransformFeedback):
2059         (WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
2060         (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
2061         (WebCore::WebGL2RenderingContext::pauseTransformFeedback):
2062         (WebCore::WebGL2RenderingContext::resumeTransformFeedback):
2063         (WebCore::WebGL2RenderingContext::bindBufferBase):
2064         (WebCore::WebGL2RenderingContext::bindBufferRange):
2065         (WebCore::WebGL2RenderingContext::getIndexedParameter):
2066         (WebCore::WebGL2RenderingContext::getUniformIndices):
2067         (WebCore::WebGL2RenderingContext::getActiveUniforms):
2068         (WebCore::WebGL2RenderingContext::getUniformBlockIndex):
2069         (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter):
2070         (WebCore::WebGL2RenderingContext::getActiveUniformBlockName):
2071         (WebCore::WebGL2RenderingContext::uniformBlockBinding):
2072         (WebCore::WebGL2RenderingContext::createVertexArray):
2073         (WebCore::WebGL2RenderingContext::deleteVertexArray):
2074         (WebCore::WebGL2RenderingContext::isVertexArray):
2075         (WebCore::WebGL2RenderingContext::bindVertexArray):
2076         * html/canvas/WebGL2RenderingContext.h:
2077         * html/canvas/WebGL2RenderingContext.idl:
2078         * platform/graphics/GraphicsTypes3D.h:
2079
2080 2015-01-26  Andreas Kling  <akling@apple.com>
2081
2082         Don't let the CSSValuePool's font family cache grow unbounded.
2083         <https://webkit.org/b/140894>
2084
2085         Reviewed by Chris Dumez.
2086
2087         Darin pointed out to Chris who pointed out to me that the font family cache
2088         in CSSValuePool can grow unbounded until we get a system memory pressure
2089         notification. Put a limit on it like we did with the font face cache.
2090
2091         * css/CSSValuePool.cpp:
2092         (WebCore::CSSValuePool::createFontFamilyValue):
2093
2094 2015-01-26  Andreas Kling  <akling@apple.com>
2095
2096         Plug leak in jsValueWithDictionaryInContext().
2097         <https://webkit.org/b/140889>
2098
2099         Reviewed by Alexey Proskuryakov.
2100
2101         Add a missing JSStringRelease to plug leak that was showing up on leaks bot.
2102
2103         * platform/mac/SerializedPlatformRepresentationMac.mm:
2104         (WebCore::jsValueWithDictionaryInContext):
2105
2106 2015-01-26  Benjamin Poulain  <benjamin@webkit.org>
2107
2108         Fix CSS Selector's tag name matching when mixing HTML and XML
2109         https://bugs.webkit.org/show_bug.cgi?id=140878
2110
2111         Reviewed by Darin Adler.
2112
2113         Previsouly, WebKit was unable to match any XML element that had
2114         any uppercase character if the stylesheet was in a HTML document.
2115         This problem was most often reported due to the inability to style
2116         SVG-in-HTML.
2117
2118         The reason was that the tag local name was incorrectly transformed
2119         to lowercase at parsing time. Instead, we are supposed to only
2120         do case-insensitive match for HTML elements in a HTML document.
2121
2122         This fix is very similar with how we handle attributes:
2123         -Keep both the original and the lowercase versions of the name.
2124         -When matching, chose which version to use depending on the element being matched.
2125
2126         There is one major difference in the way the names are stored.
2127         Unlike attribute selectors, tag name selectors are common, and the uppercase
2128         version is not that uncommon. I wanted to preserve the dense representation
2129         so I specialized CSSSelector specifically for tag names.
2130
2131         To store the data, if the name is already lowercase, just use the m_data pointer
2132         as usual.
2133         If the name is not lowercase, allocate a new small structure in the union to store
2134         both names.
2135
2136         Tests: fast/css/tagname-and-namespace-case-sensitivity-xml-in-html.html
2137                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml-expected.xhtml
2138                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml.xhtml
2139                fast/css/tagname-case-sensitivity-svg-in-html.html
2140                fast/css/tagname-case-sensitivity-svg-in-xhtml-expected.xhtml
2141                fast/css/tagname-case-sensitivity-svg-in-xhtml.xhtml
2142                fast/css/tagname-case-sensitivity-xml-in-html.html
2143                fast/css/tagname-case-sensitivity-xml-in-xhtml-expected.xhtml
2144                fast/css/tagname-case-sensitivity-xml-in-xhtml.xhtml
2145                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-html.html
2146                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-xhtml.xhtml
2147                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-html.html
2148                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-xhtml.xhtml
2149                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-html.html
2150                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-xhtml.xhtml
2151                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-html.html
2152                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-xhtml.xhtml
2153                fast/selectors/tagname-adjacent-backtracking-case-sensitivity-html.html
2154                fast/selectors/tagname-descendant-backtracking-case-sensitivity-html.html
2155
2156         * css/CSSGrammar.y.in:
2157         The parser is unaware of anything case related. CSSSelector takes care of that.
2158
2159         * css/CSSSelector.cpp:
2160         (WebCore::CSSSelector::CSSSelector):
2161         (WebCore::CSSSelector::createRareData):
2162         * css/CSSSelector.h:
2163         (WebCore::CSSSelector::NameWithCase::NameWithCase):
2164         (WebCore::CSSSelector::CSSSelector):
2165         (WebCore::CSSSelector::~CSSSelector):
2166         (WebCore::CSSSelector::tagQName):
2167         (WebCore::CSSSelector::tagLowercaseLocalName):
2168         The new representation stores both the original form and the lower case
2169         form.
2170
2171         * css/RuleSet.cpp:
2172         (WebCore::RuleSet::addRule):
2173         (WebCore::RuleSet::shrinkToFit):
2174         * css/RuleSet.h:
2175         (WebCore::RuleSet::tagRules):
2176         * css/ElementRuleCollector.cpp:
2177         (WebCore::ElementRuleCollector::collectMatchingRules):
2178         The tag name partition is now split in two: lowercase and original case.
2179         If the matched element is HTML, the lowercase partition is used. 
2180
2181         * css/SelectorFilter.cpp:
2182         (WebCore::collectElementIdentifierHashes):
2183         (WebCore::collectDescendantSelectorIdentifierHashes):
2184         This is the most annoying part of the patch performance wise:
2185         the bloom filter knows the case of the real elements but it cannot know
2186         how selectors will match them.
2187
2188         To make it work, all names are now converted to lowercase.
2189         That implies that we can filter less on XML and we may have to pay for
2190         converting the tag name to lowercase.
2191
2192         I expect the performance hit to be small because:
2193         -Having two XML elements with the same name but different case is uncommon.
2194         -Most elements use lowercase names.
2195
2196         Still sad...that's the price to pay for correctness.
2197
2198         * css/SelectorChecker.cpp:
2199         (WebCore::tagMatches):
2200         (WebCore::SelectorChecker::checkOne):
2201         * css/SelectorChecker.h:
2202         (WebCore::SelectorChecker::tagMatches): Deleted.
2203         Update the legacy matcher, nothing special.
2204
2205         * cssjit/SelectorCompiler.cpp:
2206         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2207         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
2208         (WebCore::SelectorCompiler::constructFragmentsInternal):
2209         (WebCore::SelectorCompiler::equalTagNames):
2210         (WebCore::SelectorCompiler::equalTagNamePatterns):
2211         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
2212         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
2213         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
2214         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2215         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
2216         Tag names are used to optimize backtracking; this is quite common for descendant
2217         (e.g. div > ul > li).
2218         We have to differenciate one new case there: if two tag names are equal
2219         when compared case-insensitively but strictly different, they may still
2220         be equal if they don't match the same kind of elements or both matches
2221         and HTML element.
2222
2223         * dom/SelectorQuery.cpp:
2224         (WebCore::localNameMatches):
2225         (WebCore::elementsForLocalName):
2226         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2227         Update the inline versions of SelectorQuery.
2228
2229 2015-01-26  Chris Dumez  <cdumez@apple.com>
2230
2231         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
2232         https://bugs.webkit.org/show_bug.cgi?id=140891
2233
2234         Reviewed by Anders Carlsson.
2235
2236         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
2237         to make sure the argument is not unexpectedly moved when it shouldn't (like I
2238         experienced yesterday in Bug 140577):
2239         <http://trac.webkit.org/changeset/179105>
2240
2241         * css/CSSPrimitiveValue.h:
2242         (WebCore::CSSPrimitiveValue::create):
2243         * css/CSSValuePool.h:
2244         (WebCore::CSSValuePool::createValue):
2245
2246 2015-01-26  Beth Dakin  <bdakin@apple.com>
2247
2248         Blacklist iBooks for WebKit's default immediate actions
2249         https://bugs.webkit.org/show_bug.cgi?id=140854
2250         -and corresponding-
2251         rdar://problem/19489518
2252
2253         Reviewed by Tim Horton.
2254
2255         Add a runtime check for iBooks.
2256         * WebCore.exp.in:
2257         * platform/RuntimeApplicationChecks.cpp:
2258         (WebCore::applicationIsIBooks):
2259         * platform/RuntimeApplicationChecks.h:
2260
2261 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
2262
2263         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
2264         https://bugs.webkit.org/show_bug.cgi?id=140860
2265
2266         Reviewed by Darin Adler.
2267
2268         No new tests because this simply reverts broken code.
2269
2270         The fonts it makes are grotesque. (See what I did there? Typographic
2271         humor is the best humor.)
2272
2273         * Configurations/FeatureDefines.xcconfig:
2274
2275 2015-01-26  Chris Dumez  <cdumez@apple.com>
2276
2277         Demote 'line-height' to a low priority property.
2278         https://bugs.webkit.org/show_bug.cgi?id=140817
2279
2280         Reviewed by Andreas Kling.
2281
2282         Our special handling of the 'line-height' property is no longer
2283         required, since the 'font' shorthand is now expanded in the parser
2284         in all cases (also for system fonts).
2285
2286         This patch is based on the following Blink revision:
2287         https://src.chromium.org/viewvc/blink?revision=184629&view=revision
2288
2289         No new tests, already covered by:
2290         fast/css/font-shorthand-line-height.html
2291         fast/css/line-height-font-order.html
2292
2293         * css/CSSPropertyNames.in:
2294         * css/StyleResolver.cpp:
2295         (WebCore::StyleResolver::styleForKeyframe):
2296         (WebCore::StyleResolver::styleForPage):
2297         (WebCore::StyleResolver::applyMatchedProperties):
2298         (WebCore::StyleResolver::initializeFontStyle):
2299         (WebCore::StyleResolver::CascadedProperties::Property::apply):
2300         * css/StyleResolver.h:
2301         (WebCore::StyleResolver::State::State):
2302         (WebCore::StyleResolver::State::setLineHeightValue): Deleted.
2303         (WebCore::StyleResolver::State::lineHeightValue): Deleted.
2304
2305 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2306
2307         [GTK] gtkdoc does not appear in DevHelp
2308         https://bugs.webkit.org/show_bug.cgi?id=139369
2309
2310         Reviewed by Philippe Normand.
2311
2312         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
2313
2314 2015-01-25  Chris Dumez  <cdumez@apple.com>
2315
2316         Remove 'font' shorthand property special casing
2317         https://bugs.webkit.org/show_bug.cgi?id=140577
2318
2319         Reviewed by Darin Adler.
2320
2321         Mark CSSPrimitiveValue::m_value.fontFamily as const as it is not
2322         supposed to change. This also makes sure that m_value.fontFamily
2323         gets copied instead of moved when constructing a clone in
2324         CSSPrimitiveValue::cloneForCSSOM(). This was causing several tests
2325         to fail on the bots.
2326
2327         * css/CSSPrimitiveValue.h:
2328
2329 2015-01-25  Alexey Proskuryakov  <ap@apple.com>
2330
2331         Setting HTMLMarqueeElement.trueSpeed doesn't work
2332         https://bugs.webkit.org/show_bug.cgi?id=140863
2333
2334         Reviewed by Darin Adler.
2335
2336         Test: fast/html/marquee-set-truespeed.html
2337
2338         * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::minimumDelay):
2339         Check the boolean attribute properly - an empty value is true.
2340
2341 2015-01-25  Darin Adler  <darin@apple.com>
2342
2343         Streamline SVGUseElement shadow tree handling and make it use SVGElementInstance less
2344         https://bugs.webkit.org/show_bug.cgi?id=140875
2345
2346         Reviewed by Anders Carlsson.
2347
2348         Refactoring of code that is pretty well covered by existing tests, so
2349         not adding new tests.
2350
2351         Inspired by work Rob Buis did in Blink:
2352
2353             http://src.chromium.org/viewvc/blink?view=revision&revision=173273
2354
2355         Althgouh that is less than half of what ended up in this patch.
2356
2357         * dom/ContainerNode.h: Fixed NoEventDispatchAssertion so it can be
2358         copied without causing an underflow of NoEventDispatchAssertion::s_count.
2359         Made the copy constructor call the default constructor. Also changed it
2360         to be based on ASSERT_DISABLED rather than NDEBUG and tweaked it a bit.
2361
2362         * dom/ElementIteratorAssertions.h: Removed an unnecessary include and
2363         an unnecessary default constructor. Changed to use WTF::Optional instead
2364         of WTF::OwnPtr to handle NoEventDispatchAssertion, which makes this class
2365         copyable and assignable, which in turn makes the iterators based on this
2366         copyable and assignable, which is what I needed in SVGUseElement code.
2367         Also simplified code in a couple places.
2368
2369         * dom/TypedElementDescendantIterator.h:
2370         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
2371         Fixed an error where the arguments to Traversal::next were passed backwards.
2372         This led to incomplete iteration in SVGUseElement code, and an immediate
2373         assertion failure. Probably could use some unit test coverage, too.
2374         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
2375         Ditto.
2376
2377         * svg/SVGUseElement.cpp:
2378         (WebCore::SVGUseElement::animatedInstanceRoot): Deleted.
2379         (WebCore::SVGUseElement::transferSizeAttributesToShadowTreeTargetClone):
2380         Removed the originalElement argument, since we can use the correspondingElement
2381         to get back to it. Removed the useElement argument and changed this into a
2382         member function.
2383         (WebCore::SVGUseElement::svgAttributeChanged): Updated for above changes.
2384         (WebCore::subtreeContainsDisallowedElement): Deleted this function, because
2385         it was only used to optimize by not calling removeDisallowedElementsFromSubtree,
2386         but that function is already similarly efficient when called to do nothing, so
2387         the preflight was not useful.
2388         (WebCore::SVGUseElement::clearResourceReferences): Call userAgentShadowRoot
2389         instead of shadowRoot for clarity.
2390         (WebCore::SVGUseElement::buildPendingResource): Pass a reference instead of
2391         a pointer to buildShadowAndInstanceTree, since it's guaranteed to not be null.
2392         (WebCore::SVGUseElement::shadowTreeTargetClone): Added. Returns the SVG element
2393         inside the shadow tree that corresponds to the use element's target.
2394         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Changed argument type
2395         to a reference instead of a pointer. Removed comments explaining why we have
2396         an instance tree, since soon we will not have one. Removed many comments that
2397         simply state the names of the functions they are commenting on and perhaps a tiny
2398         bit more. Changed to not use m_targetElementInstance as much, dealing with the
2399         shadow tree directly instead of through the instance tree.
2400         (WebCore::SVGUseElement::toClipPath): Use shadowTreeTargetClone instead of
2401         getting at the element through m_targetElementInstance.
2402         (WebCore::SVGUseElement::rendererClipChild): Ditto.
2403         (WebCore::removeDisallowedElementsFromSubtree): Removed the inline keyword,
2404         since there's no good reason to inline thif function's body. Improved local
2405         variable names and used a modern for loop. Also moved the comment about why
2406         this function is used here inside the function instead of repeating it at
2407         each call site.
2408         (WebCore::SVGUseElement::buildShadowTree): Changed to take a reference
2409         instead of a pointer. Moved the check to see if the target is disallowed
2410         out of this function and into buildShadowAndInstanceTree, which needs to
2411         handle that failure explicitly. Tightened up the code a bit, using Ref instead
2412         of RefPtr, putting the comment about removeDisallowedElementsFromSubtree into
2413         that function itself, and removing the unneeded subtreeContainsDisallowedElement
2414         check entirely.
2415         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed the argument,
2416         getting the shadow tree from the shadowTree function instead. Walk the tree
2417         iteratively instead of recursively, using the descendantsOfType function.
2418         Rearranged and streamlined the logic.
2419         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto.
2420         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
2421         (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Renamed
2422         this to avoid the term "replaced element", which is not a reasonable way to
2423         refer to the <g> element in the shadow tree that replaces the <use> element.
2424         Changed the argument type to SVGGElement to make it harder to misuse this
2425         function by accident, and made the use element be "this" instead of passing
2426         it as an argument.
2427         (WebCore::SVGUseElement::selfHasRelativeLengths): Call hasRelativeLengths
2428         on the target inside the shadow tree rather than the original target, which
2429         makes more sense anyway, and is straightforward now that we have the
2430         shadowTreeTargetClone function. Removes use of m_targetElementInstance here.
2431
2432         * svg/SVGUseElement.h: Updated for above changes.
2433
2434         * svg/SVGUseElement.idl: Removed animatedInstanceRoot and tweaked formatting.
2435
2436 2015-01-25  Chris Dumez  <cdumez@apple.com>
2437
2438         Remove 'font' shorthand property special casing
2439         https://bugs.webkit.org/show_bug.cgi?id=140577
2440
2441         Reviewed by Darin Adler.
2442
2443         Expand system font values during 'font' property parsing. The 'font'
2444         CSS property was the only shorthand that wasn't always expanded in
2445         the CSS parser, so it needed a lot of special handling that we can
2446         now get rid of.
2447
2448         This patch is inspired from the following Blink revision:
2449         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
2450
2451         Tests:
2452         - fast/css/css2-system-fonts.html (existing)
2453         - fast/css/CSSPrimitiveValue-font-family-primitiveType.html (new)
2454         - fast/css/font-systemFontID-parsing.html (new)
2455         - fast/css/font-shorthand-line-height.html (rebased)
2456
2457         * WebCore.xcodeproj/project.pbxproj:
2458         * css/CSSCalculationValue.cpp:
2459         (WebCore::hasDoubleValue):
2460         Handle CSS_FONT_FAMILY similarly to CSS_STRING in the switch.
2461
2462         * css/CSSFontFamily.h: Added.
2463         Introduce new CSSFontFamily class to store font families inside
2464         CSSPrimitive, instead of using a simple String as previously. We need
2465         an additional 'fromSystemFontID' flag in addition to the font family
2466         name now that system font ID are expanded during parsing. This
2467         information is needed later on by the StyleBuilder (see comment below).
2468
2469         * css/CSSFontSelector.cpp:
2470         (WebCore::CSSFontSelector::addFontFaceRule):
2471         Update code dealing with font family CSSPrimitiveValues now that they
2472         hold a CSSFontFamily internally instead of a String.
2473
2474         * css/CSSParser.cpp:
2475         (WebCore::CSSParser::parseValue):
2476         (WebCore::CSSParser::parseSystemFont):
2477         Expand system font values for the 'font' property by asking the
2478         RenderTheme for the system font and using it to set the 'font'
2479         longhand properties.
2480
2481         * css/CSSParserValues.cpp:
2482         (WebCore::CSSParserValue::createCSSValue):
2483         Handle CSS_FONT_FAMILY value in the switch.
2484
2485         * css/CSSPrimitiveValue.cpp:
2486         (WebCore::CSSPrimitiveValue::primitiveType):
2487         Make sure we still expose font family CSSPrimitiveValues to the Web as
2488         CSS_STRING, even though we are using a slightly different representation
2489         internally. This is so that we don't change web-exposed behavior and I
2490         added a new layout test to cover this.
2491
2492         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2493         (WebCore::CSSPrimitiveValue::cleanup):
2494         (WebCore::CSSPrimitiveValue::getStringValue):
2495         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
2496         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2497         (WebCore::CSSPrimitiveValue::equals):
2498         Handle CSS_FONT_FAMILY type in switches.
2499
2500         * css/CSSPrimitiveValue.h:
2501         (WebCore::CSSPrimitiveValue::isFontFamily):
2502         Add method to test if a CSSPrimitiveValue holds a CSSFontFamily
2503         internally.
2504
2505         (WebCore::CSSPrimitiveValue::fontFamily):
2506         Add a getter to retrieve the internal CSSFontFamily object if the
2507         primitive type is CSS_FONT_FAMILY.
2508
2509         * css/CSSPropertyNames.in:
2510         Treat 'font' as a regular shorthand property. Specify its longhand
2511         properties so that makeprop.pl can generate the shorthand code for
2512         us. Also demote 'font' to being a low-priority property as it is
2513         now always expanded during parsing.
2514
2515         * css/CSSValuePool.cpp:
2516         (WebCore::CSSValuePool::createFontFamilyValue):
2517         * css/CSSValuePool.h:
2518         * css/StyleBuilderCustom.h:
2519         (WebCore::StyleBuilderCustom::applyValueFontFamily):
2520         - Update the 'font-family' value setter in the StyleBuilder to reflect
2521         the changes in the CSS parser. The CSSPrimitiveValues in the list now
2522         have CSS_FONT_FAMILY type instead of CSS_STRING.
2523         - We also set the 'isGenericFamily' flag if the font-family was expanded
2524           from a system font ID (e.g. caption). The 'isGenericFamily' flag is
2525           used later on to property set the 'isSpecifiedFont' flag on the
2526           FontDescription object. If we don't do this, system font values will
2527           be treated as specified fonts, which means that we will no longer use
2528           the 'use backslash as Yen sign' hack for those. This is covered by the
2529           following layout tests:
2530           - fast/text/backslash-to-yen-sign-euc.html
2531           - editing/selection/find-yensign-and-backslash.html
2532
2533         (WebCore::StyleBuilderCustom::applyInitialFont): Deleted.
2534         (WebCore::StyleBuilderCustom::applyInheritFont): Deleted.
2535         (WebCore::StyleBuilderCustom::applyValueFont): Deleted.
2536         Remove StyleBuilder code dealing with the 'font' property. Now that
2537         the 'font' property is always expanded during parsing, this code can
2538         never be reached.
2539
2540         * css/StylePropertyShorthand.cpp:
2541         (WebCore::isExpandedShorthand):
2542         Stop returning false for 'font' as it is now expanded during parsing
2543         as well. We should probably consider renaming this method to something
2544         else now that all shorthands are expanded, maybe isCSSShorthand() or
2545         isShorthandProperty().
2546
2547         (WebCore::fontShorthand): Deleted.
2548         * css/StylePropertyShorthand.h:
2549         (WebCore::matchingCustomShorthandsForLonghand): Deleted.
2550         Remove custom shorthand code for the 'font' property as it is now
2551         generated by makeprop.pl, like other shorthands.
2552
2553         * css/StyleResolver.cpp:
2554         (WebCore::StyleResolver::applyFont): Deleted.
2555         This is unused now that the StyleBuilder code for 'font' has been
2556         removed.
2557
2558         * css/makeprop.pl:
2559         Remove custom shorthand code for 'font' as it no longer requires any
2560         special handling.
2561
2562 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
2563
2564         Long spins under Frame::rangeForPoint when doing Lookup on feedly.com
2565         https://bugs.webkit.org/show_bug.cgi?id=140862
2566         <rdar://problem/19566089>
2567
2568         Reviewed by Dan Bernstein.
2569
2570         * page/Frame.cpp:
2571         (WebCore::Frame::rangeForPoint):
2572         If there isn't a selectable text node at the given point, rangeForPoint
2573         will eventually return null. However, we can make it fail much faster
2574         by checking the initial position's text-ness and selectability.
2575
2576 2015-01-24  Darin Adler  <darin@apple.com>
2577
2578         Move height/width implementation for use element from RenderSVGViewportContainer to SVGUseElement
2579         https://bugs.webkit.org/show_bug.cgi?id=140826
2580
2581         Reviewed by Anders Carlsson.
2582
2583         Tests: svg/animations/use-animate-width-and-height.html
2584                svg/custom/use-attribute-invalidations.html
2585                svg/custom/use-dynamic-attribute-setting.html
2586
2587         This is an adaptation of work Rob Buis did in Blink:
2588
2589             http://src.chromium.org/viewvc/blink?view=revision&revision=173258
2590
2591         The goal here is to reduce use of SVGElementInstance since we are going to
2592         remove it. The tests Rob added to Blink (which I believe I improved a bit here)
2593         meant we had to fix quite a few bugs in the implementation of the width/height
2594         logic rather than just moving it. Even so, this could use even more test coverage
2595         since there is separate logic for <symbol> and <svg>, three different code paths
2596         (animation/attribute setting, initial creation, and one other), and also
2597         distinct issues for attributes not set at all, attributes set to values that
2598         can't be parsed, and attributes set with different units.
2599
2600         * rendering/svg/RenderSVGViewportContainer.cpp:
2601         (WebCore::RenderSVGViewportContainer::calcViewport): Removed the old logic.
2602
2603         * svg/SVGSVGElement.cpp:
2604         (WebCore::SVGSVGElement::SVGSVGElement): Use ASCIILiteral to more efficiently
2605         create strings from ASCII literals here.
2606         (WebCore::SVGSVGElement::parseAttribute): Default to 100%, not 0, when the
2607         width or height property are either not set or not successfully parsed. Without
2608         this change, one of the SVG tests starts failing.
2609
2610         * svg/SVGUseElement.cpp:
2611         (WebCore::updateWidthAndHeight): Added. The tricky part here is that we have
2612         to copy width and height attributes only if they were successfully parsed, and
2613         also we need to copy the current animating values, not the original attribute
2614         strings. Kind of messy, but I wanted to adapt Rob's solution for the time being,
2615         rather than inventing something new.
2616         (WebCore::SVGUseElement::svgAttributeChanged): Call updateWidthAndHeight.
2617         This is used both when actual attribute changes occur and also when animation
2618         changes the current value.
2619         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateWidthAndHeight.
2620         This is used when the shadow elements are first created.
2621         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Call updateWidthAndHeight.
2622         This was in Rob's patch, but I am not sure we have sufficient test coverage.
2623
2624 2015-01-24  Chris Dumez  <cdumez@apple.com>
2625
2626         Provide implementation for WTF::DefaultHash<bool>
2627         https://bugs.webkit.org/show_bug.cgi?id=140848
2628
2629         Reviewed by Anders Carlsson.
2630
2631         Use HashMap<std::pair<UChar32, bool>> type in Font.cpp for
2632         CharacterFallbackMap instead of HashMap<std::pair<UChar32, unsigned>>.
2633         It builds now that WTF::DefaultHash<bool> is defined in WTF.
2634
2635         * platform/graphics/Font.cpp:
2636         (WebCore::Font::removeFromSystemFallbackCache):
2637
2638 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
2639
2640         [Win] Cursor assignment operator is skipping scale factor
2641         https://bugs.webkit.org/show_bug.cgi?id=140852
2642
2643         Reviewed by Chris Dumez.
2644
2645         Found by fast/events/mouse-cursor-image-set.html
2646
2647         * platform/win/CursorWin.cpp:
2648         (WebCore::Cursor::operator=): Make sure to also assign the
2649         scale factor.
2650
2651 2015-01-23  David Kilzer  <ddkilzer@apple.com>
2652
2653         [iOS] Attempt to fix the build after AVValueTiming.h moved
2654
2655         * platform/spi/ios/AVKitSPI.h: The AVValueTiming.h header moved
2656         to an unexpected location, so work around it by using local SPI
2657         declarations.
2658
2659 2015-01-23  Alexey Proskuryakov  <ap@apple.com>
2660
2661         Try to fix the build after r179056.
2662
2663         * platform/Cursor.h: (WebCore::Cursor::Cursor): Initialize dadat members in correct order.
2664
2665 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
2666
2667         [Win] Cursor copy constructor does not initialize scale factor
2668         https://bugs.webkit.org/show_bug.cgi?id=140849
2669
2670         Reviewed by Antti Koivisto.
2671
2672         Found by fast/events/mouse-cursor-image-set.html
2673
2674         Make sure the scale factor is captured during copy construction. Also make sure
2675         it is properly initialized in the default constructor, since it it used in the
2676         Windows port for some default cursors.
2677
2678         * platform/CursorWin.h:
2679         * platform/win/CursorWin.cpp:
2680         (WebCore::Cursor::Cursor): Make sure copy constructor captures
2681         the scale factor.
2682
2683 2015-01-23  Benjamin Poulain  <bpoulain@apple.com>
2684
2685         Add pointer/hover media queries
2686         https://bugs.webkit.org/show_bug.cgi?id=134822
2687
2688         Reviewed by Antti Koivisto.
2689
2690         Media Queries Level 4 introduces two types of Interaction Media Features:
2691         "pointer" and "hover". Those media features are useful for adapting the design
2692         to the type of input:
2693             http://dev.w3.org/csswg/mediaqueries-4/#mf-interaction
2694
2695         This implementation is trivial: just #ifdef the return value depending on
2696         the support for touch events.
2697         In the future we should move that to a client interface but let's start easy
2698         for now.
2699
2700         Tests: fast/media/mq-any-hover-cssom.html
2701                fast/media/mq-any-hover-invalid.html
2702                fast/media/mq-any-hover-matchMedia.html
2703                fast/media/mq-any-hover-styling.html
2704                fast/media/mq-any-pointer-cssom.html
2705                fast/media/mq-any-pointer-invalid.html
2706                fast/media/mq-any-pointer-matchMedia.html
2707                fast/media/mq-any-pointer-styling.html
2708                fast/media/mq-hover-cssom.html
2709                fast/media/mq-hover-invalid.html
2710                fast/media/mq-hover-matchMedia.html
2711                fast/media/mq-hover-styling.html
2712                fast/media/mq-pointer-cssom.html
2713                fast/media/mq-pointer-invalid.html
2714                fast/media/mq-pointer-matchMedia.html
2715                fast/media/mq-pointer-styling.html
2716
2717         * css/CSSValueKeywords.in:
2718         * css/MediaFeatureNames.h:
2719         * css/MediaQueryEvaluator.cpp:
2720         (WebCore::hoverMediaFeatureEval):
2721         (WebCore::any_hoverMediaFeatureEval):
2722         (WebCore::pointerMediaFeatureEval):
2723         (WebCore::any_pointerMediaFeatureEval):
2724         (WebCore::leastCapablePrimaryPointerDeviceType): Deleted.
2725         * css/MediaQueryExp.cpp:
2726         (WebCore::featureWithCSSValueID):
2727         (WebCore::featureWithZeroOrOne):
2728         (WebCore::featureWithoutValue):
2729         * page/EventHandler.cpp:
2730         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
2731         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
2732         * page/Settings.in:
2733
2734 2015-01-23  Commit Queue  <commit-queue@webkit.org>
2735
2736         Unreviewed, rolling out r179051.
2737         https://bugs.webkit.org/show_bug.cgi?id=140850
2738
2739         broke the 32-bit build (Requested by thorton on #webkit).
2740
2741         Reverted changeset:
2742
2743         "[Mac][EME] Support ClearKey encryption with AES128-encrypted
2744         HLS"
2745         https://bugs.webkit.org/show_bug.cgi?id=140825
2746         http://trac.webkit.org/changeset/179051
2747
2748 2015-01-23  Joseph Pecoraro  <pecoraro@apple.com>
2749
2750         Web Inspector: Rename InjectedScriptHost::type to subtype
2751         https://bugs.webkit.org/show_bug.cgi?id=140841
2752
2753         Reviewed by Timothy Hatcher.
2754
2755         * inspector/WebInjectedScriptHost.cpp:
2756         (WebCore::WebInjectedScriptHost::subtype):
2757         (WebCore::WebInjectedScriptHost::type): Deleted.
2758         * inspector/WebInjectedScriptHost.h:
2759
2760 2015-01-23  Jer Noble  <jer.noble@apple.com>
2761
2762         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
2763         https://bugs.webkit.org/show_bug.cgi?id=140825
2764
2765         Reviewed by Eric Carlson.
2766
2767         Test: http/tests/media/clearkey/clear-key-hls-aes128.html
2768
2769         Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
2770
2771         * Modules/encryptedmedia/CDM.cpp:
2772         (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
2773         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
2774         (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
2775         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
2776         (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
2777         (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
2778         * Modules/encryptedmedia/CDMPrivateClearKey.h:
2779         (WebCore::CDMPrivateClearKey::create): Simple factory.
2780         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
2781         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
2782         * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
2783         (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
2784         (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
2785         (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
2786         (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
2787             URI, and return same.
2788         (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
2789         (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
2790         (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
2791         * Modules/encryptedmedia/CDMSessionClearKey.h:
2792
2793         Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
2794         way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
2795
2796         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2797         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2798         (WebCore::keySystemIsSupported):
2799         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2800         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
2801         (WebCore::fulfillRequestWithKeyData): Added utility method.
2802         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2803         (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
2804
2805         Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
2806
2807         * Modules/encryptedmedia/MediaKeySession.cpp:
2808         (WebCore::MediaKeySession::cachedKeyForKeyId):
2809         (WebCore::MediaKeySession::addKeyTimerFired):
2810         * Modules/encryptedmedia/MediaKeySession.h:
2811         * Modules/encryptedmedia/MediaKeys.cpp:
2812         (WebCore::MediaKeys::keyAdded):
2813         (WebCore::MediaKeys::cachedKeyForKeyId):
2814         * Modules/encryptedmedia/MediaKeys.h:
2815         * html/HTMLMediaElement.cpp:
2816         (WebCore::HTMLMediaElement::keyAdded):
2817         * html/HTMLMediaElement.h:
2818         * platform/graphics/CDMSession.h:
2819         (WebCore::CDMSession::cachedKeyForKeyID):
2820         * platform/graphics/MediaPlayer.cpp:
2821         (WebCore::MediaPlayer::keyAdded):
2822         (WebCore::MediaPlayer::cachedKeyForKeyId):
2823         * platform/graphics/MediaPlayer.h:
2824         (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
2825         * platform/graphics/MediaPlayerPrivate.h:
2826         (WebCore::MediaPlayerPrivateInterface::keyAdded):
2827
2828         Add new files to project:
2829
2830         * WebCore.xcodeproj/project.pbxproj:
2831         * CMakeLists.txt:
2832         * WebCore.vcxproj/WebCore.vcxproj:
2833         * WebCore.vcxproj/WebCore.vcxproj.filters:
2834
2835 2015-01-23  Chris Dumez  <cdumez@apple.com>
2836
2837         Implement system fonts FontDescription caching at RenderTheme level
2838         https://bugs.webkit.org/show_bug.cgi?id=140840
2839
2840         Reviewed by Andreas Kling.
2841
2842         Implement system fonts FontDescription caching at RenderTheme level
2843         instead of duplicating the logic in its subclasses for each platform.
2844         This reduces code / logic duplication and reduces the amount of
2845         platform-specific code. This will also make the refactoring at
2846         Bug 140577 a lot easier.
2847
2848         The caching logic remains in RenderThemeIOS class for iOS because:
2849         - It supports different system font values than all other platforms
2850         - It requires cache invalidation in some cases while other platforms
2851           do not.
2852
2853         This patch is inspired by the following Blink revision:
2854         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
2855
2856         Test: fast/css/css2-system-fonts.html
2857
2858 2015-01-23  Zalan Bujtas  <zalan@apple.com>
2859
2860         Simple line layout: Refactor line wrapping logic.
2861         https://bugs.webkit.org/show_bug.cgi?id=140834
2862
2863         Reviewed by Antti Koivisto.
2864
2865         Use a more readable structure to deal with wrapping logic. 
2866
2867         No change in functionality.
2868
2869         * rendering/SimpleLineLayout.cpp:
2870         (WebCore::SimpleLineLayout::createLineRuns):
2871
2872 2015-01-23  Zalan Bujtas  <zalan@apple.com>
2873
2874         Simple line layout: Use only FlowContents::nextTextFragment() to read fragments from the text flow.
2875         https://bugs.webkit.org/show_bug.cgi?id=140842
2876
2877         Reviewed by Antti Koivisto.
2878
2879         This is in preparation to make FlowContents a content iterator class.
2880
2881         No change in functionality.
2882
2883         * rendering/SimpleLineLayout.cpp:
2884         (WebCore::SimpleLineLayout::initializeNewLine):
2885         * rendering/SimpleLineLayoutFlowContents.h:
2886
2887 2015-01-23  Bartlomiej Gajda  <b.gajda@samsung.com>
2888
2889         [MSE] Implement Range Removal algorithm.
2890         https://bugs.webkit.org/show_bug.cgi?id=140622.
2891
2892         Reviewed by Jer Noble.
2893
2894         This extract Range Removal algorithm (Editor's Draft version, bug:26316) from remove(),
2895         to separate function to deal with old FIXME since bug in spec was resolved.
2896         This should both guarantee good order of events, and prevent from switching to 'open' state
2897         during end of stream.
2898
2899         Test: media/media-source/media-source-end-of-stream-readyState.html
2900
2901         * Modules/mediasource/MediaSource.cpp:
2902         (WebCore::MediaSource::setDurationInternal): update to use rangeRemoval(), not remove()
2903         (WebCore::MediaSource::streamEndedWithError): remove FIXME, brigning back correct order of events.
2904         * Modules/mediasource/SourceBuffer.cpp:
2905         (WebCore::SourceBuffer::remove): comments up to spec, extract rangeRemoval algorithm.
2906         (WebCore::SourceBuffer::rangeRemoval):
2907         (WebCore::SourceBuffer::removeTimerFired): comments up to spec.
2908         * Modules/mediasource/SourceBuffer.h:
2909
2910 2015-01-23  Enrica Casucci  <enrica@apple.com>
2911
2912         Hit test returns incorrect results when performed in paginated content over the page gaps.
2913         https://bugs.webkit.org/show_bug.cgi?id=140837
2914         rdar://problem/17494390
2915
2916         Reviewed by Dave Hyatt.
2917
2918         Tests: fast/multicol/pagination/LeftToRight-tb-hittest.html
2919                fast/multicol/pagination/RightToLeft-rl-hittest.html
2920
2921         When hittesting reaches the RenderView we need to check if we are
2922         in paginated content and use the correct class to compute hittest results.
2923
2924         * rendering/RenderView.cpp:
2925         (WebCore::RenderView::updateHitTestResult):
2926
2927 2015-01-23  Andreas Kling  <akling@apple.com>
2928
2929         Document should be a FontSelectorClient.
2930         <https://webkit.org/b/140833>
2931
2932         Reviewed by Antti Koivisto.
2933
2934         Make Document a FontSelectorClient so it can listen to the invalidation
2935         callbacks from FontSelector instead of having code in FontSelector that
2936         calls out to Document on invalidation.
2937
2938         * css/CSSFontSelector.cpp:
2939         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
2940         * dom/Document.cpp:
2941         (WebCore::Document::fontsNeedUpdate):
2942         (WebCore::Document::fontSelector):
2943         (WebCore::Document::clearStyleResolver):
2944         * dom/Document.h:
2945
2946 2015-01-23  Chris Dumez  <cdumez@apple.com>
2947
2948         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
2949         https://bugs.webkit.org/show_bug.cgi?id=140829
2950
2951         Reviewed by Andreas Kling.
2952
2953         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
2954         by calling CSSValuePool::createFontFamilyValue() to create the font
2955         family CSSPrimitiveValue instead of cssValuePool().createValue().
2956
2957         * css/CSSComputedStyleDeclaration.cpp:
2958         (WebCore::valueForFamily):
2959
2960 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
2961
2962         QLPreviewMenuItem popovers don't close when the page scrolls
2963         https://bugs.webkit.org/show_bug.cgi?id=140806
2964         <rdar://problem/19555618>
2965
2966         Reviewed by Beth Dakin.
2967
2968         * platform/spi/mac/QuickLookMacSPI.h:
2969         Add some SPI.
2970
2971 2015-01-23  Andreas Kling  <akling@apple.com>
2972
2973         Hang CSSFontSelector off Document instead of StyleResolver.
2974         <https://webkit.org/b/140820>
2975
2976         Reviewed by Antti Koivisto.
2977
2978         Move the CSSFontSelector from StyleResolver to Document. This is the first
2979         step towards making the CSSFontSelector be able to survive full style recalc.
2980
2981         Clearing a Document's StyleResolver will still nuke the CSSFontSelector,
2982         though that is done in Document::clearStyleResolver() now.
2983
2984         * css/CSSFontSelector.cpp:
2985         (WebCore::CSSFontSelector::CSSFontSelector):
2986         * css/CSSFontSelector.h:
2987
2988             Modernize CSSFontSelector construction a bit by having create() return
2989             a Ref and the constructor take a Document& instead of a Document*.
2990             Also made the constructor explicit.
2991
2992         (WebCore::StyleResolver::~StyleResolver):
2993         * dom/Document.cpp:
2994         (WebCore::Document::clearStyleResolver):
2995
2996             Nuke the current CSSFontSelector in clearStyleResolver() instead of
2997             in ~StyleResolver. It's a minor change, but shows the way forward.
2998             Added a FIXME about how CSSFontSelector should eventually survive
2999             this operation.
3000
3001         (WebCore::Document::fontSelector):
3002         * css/FontLoader.cpp:
3003         (WebCore::FontLoader::loadFont):
3004         (WebCore::FontLoader::checkFont):
3005         (WebCore::FontLoader::resolveFontStyle):
3006         * css/RuleSet.cpp:
3007         (WebCore::RuleSet::addChildRules):
3008         * css/StyleResolver.h:
3009         (WebCore::StyleResolver::fontSelector): Deleted.
3010         * css/StyleResolver.cpp:
3011         (WebCore::StyleResolver::StyleResolver):
3012         (WebCore::StyleResolver::appendAuthorStyleSheets):
3013         (WebCore::StyleResolver::styleForElement):
3014         (WebCore::StyleResolver::defaultStyleForElement):
3015         (WebCore::StyleResolver::updateFont):
3016         * dom/Document.h:
3017         * html/canvas/CanvasRenderingContext2D.cpp:
3018         (WebCore::CanvasRenderingContext2D::setFont):
3019         * rendering/RenderListBox.cpp:
3020         (WebCore::RenderListBox::updateFromElement):
3021         (WebCore::RenderListBox::paintItemForeground):
3022         * rendering/RenderMenuList.cpp:
3023         (RenderMenuList::fontSelector):
3024         * rendering/RenderSearchField.cpp:
3025         (WebCore::RenderSearchField::fontSelector):
3026         * rendering/TextAutoSizing.cpp:
3027         (WebCore::TextAutoSizingValue::adjustNodeSizes):
3028         (WebCore::TextAutoSizingValue::reset):
3029         * rendering/svg/RenderSVGInlineText.cpp:
3030         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
3031         * style/StyleResolveForDocument.cpp:
3032         (WebCore::Style::resolveForDocument):
3033         * style/StyleResolveTree.cpp:
3034         (WebCore::Style::resolveTree):
3035
3036             Move CSSFontSelector ownership from StyleResolver to Document.
3037
3038 2015-01-23  Jer Noble  <jer.noble@apple.com>
3039
3040         Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
3041         https://bugs.webkit.org/show_bug.cgi?id=140827
3042
3043         Reviewed by Eric Carlson.
3044
3045         Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.
3046
3047         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3048         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
3049
3050 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3051
3052         [GTK] Add initial database process support
3053         https://bugs.webkit.org/show_bug.cgi?id=139491
3054
3055         Reviewed by Sergio Villar Senin.
3056
3057         * platform/sql/SQLiteFileSystem.cpp:
3058         (WebCore::SQLiteFileSystem::openDatabase): Use
3059         WebCore::fileSystemRepresentation() for the database filename,
3060         otherwise sqlite3_open() fails when the filename contains "%2E".
3061
3062 2015-01-23  Byeongha Cho  <byeongha.cho@samsung.com>
3063
3064         Initialization for some member variable of FontPlatformData
3065         https://bugs.webkit.org/show_bug.cgi?id=136327
3066
3067         Reviewed by Myles C. Maxfield.
3068
3069         No new tests. There's no functional change.
3070
3071         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3072         (WebCore::FontPlatformData::FontPlatformData):
3073         (WebCore::FontPlatformData::operator=):
3074         (WebCore::FontPlatformData::~FontPlatformData):
3075
3076 2015-01-23  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3077
3078         Rename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
3079         https://bugs.webkit.org/show_bug.cgi?id=140766
3080
3081         Reviewed by Andreas Kling.
3082
3083         ChildNodeRemovalNotifier::ChildNodeRemovalNotifier(...) should take
3084         a node as removal point.
3085         It's probably Copy/Paste from ChildNodeInsertionNotifier::m_insertionPoint.
3086
3087         No new tests. No behavior change.
3088
3089         * dom/ContainerNodeAlgorithms.h:
3090         (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
3091         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
3092         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
3093
3094 2015-01-23  Hunseop Jeong  <hs85.jeong@samsung.com>
3095
3096         [GTK] Fix debug build after r178940
3097         https://bugs.webkit.org/show_bug.cgi?id=140814
3098
3099         Reviewed by Carlos Garcia Campos.
3100
3101         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
3102         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
3103
3104 2015-01-22  Zalan Bujtas  <zalan@apple.com>
3105
3106         Simple line layout: Move leading whitespace handling from removeTrailingWhitespace() to initializeNewLine().
3107         https://bugs.webkit.org/show_bug.cgi?id=140757
3108
3109         Reviewed by Antti Koivisto.
3110
3111         Checking if overflowed pre-wrap whitespace needs to be ignored should not be part of the trailing whitespace handling.
3112         Move it to initializeNewLine(). 
3113
3114         No change in functionality.
3115
3116         * rendering/SimpleLineLayout.cpp:
3117         (WebCore::SimpleLineLayout::preWrap):
3118         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3119         (WebCore::SimpleLineLayout::initializeNewLine):
3120         * rendering/SimpleLineLayoutFlowContents.h:
3121         (WebCore::SimpleLineLayout::FlowContents::isLineBreak):
3122
3123 2015-01-22  Jer Noble  <jer.noble@apple.com>
3124
3125         [iOS] Media controls disappear when loading a HLS live stream
3126         https://bugs.webkit.org/show_bug.cgi?id=140792
3127         rdar://problem/19491658
3128
3129         Reviewed by Dean Jackson.
3130
3131         Overload reconnectControls to reconnect the "start playback" button
3132         if the control type has been set to "StartPlaybackButton".
3133
3134         * Modules/mediacontrols/mediaControlsiOS.js:
3135         (ControllerIOS.prototype.reconnectControls):
3136
3137 2015-01-22  peavo@outlook.com  <peavo@outlook.com>
3138
3139         [Win] No plugin content on some sites.
3140         https://bugs.webkit.org/show_bug.cgi?id=140780
3141
3142         Reviewed by Anders Carlsson.
3143
3144         Return script instance from ScriptController::createScriptInstanceForWidget(),
3145         instead of always returning null.
3146
3147         * bindings/js/ScriptController.cpp:
3148         (WebCore::ScriptController::createScriptInstanceForWidget):
3149         * plugins/PluginViewBase.h:
3150         (WebCore::PluginViewBase::bindingInstance):
3151
3152 2015-01-22  Jer Noble  <jer.noble@apple.com>
3153
3154         [Mac][EME] Adopt changes to AVStreamSession class methods
3155         https://bugs.webkit.org/show_bug.cgi?id=140778
3156         rdar://problem/19458200
3157
3158         Reviewed by Eric Carlson.
3159
3160         AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
3161         read and modify records stored at non-default storage locations.
3162
3163         * Modules/encryptedmedia/MediaKeySession.cpp:
3164         (WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
3165         * Modules/encryptedmedia/MediaKeySession.h:
3166         * platform/graphics/CDMSession.h:
3167         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3168         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3169         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
3170         (WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
3171         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
3172         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.
3173
3174 2015-01-22  Michael Saboff  <msaboff@apple.com>
3175
3176         REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
3177         https://bugs.webkit.org/show_bug.cgi?id=140794
3178
3179         Reviewed by Anders Carlsson.
3180
3181         If a document.open has been set, return it instead of always returning a new,
3182         non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.
3183
3184         Test: js/dom/document-overwrite-open.html
3185
3186         * bindings/js/JSHTMLDocumentCustom.cpp:
3187         (WebCore::JSHTMLDocument::getOwnPropertySlot):
3188
3189 2015-01-22  Zalan Bujtas  <zalan@apple.com>
3190
3191         Simple line layout: Reset LineState when starting a new line.
3192         https://bugs.webkit.org/show_bug.cgi?id=140789
3193
3194         Reviewed by Antti Koivisto.
3195
3196         Reset LineState when starting a new line to ensure we always
3197         start with a clean state.
3198
3199         No change in functionality.
3200
3201         * rendering/SimpleLineLayout.cpp:
3202         (WebCore::SimpleLineLayout::updateLineConstrains):
3203         (WebCore::SimpleLineLayout::initializeNewLine):
3204         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3205         (WebCore::SimpleLineLayout::createTextRuns):
3206
3207 2015-01-22  Roger Fong  <roger_fong@apple.com>
3208
3209         [WebGL2] Create empty interface files for new WebGL2 objects.
3210         https://bugs.webkit.org/show_bug.cgi?id=140779.
3211         <rdar://problem/15002288>
3212
3213         Reviewed by Dean Jackson.
3214
3215         * CMakeLists.txt:
3216         * DerivedSources.cpp:
3217         * DerivedSources.make:
3218         * WebCore.vcxproj/WebCore.vcxproj:
3219         * WebCore.vcxproj/WebCore.vcxproj.filters:
3220         * WebCore.xcodeproj/project.pbxproj:
3221         * html/canvas/WebGLQuery.cpp: Added.
3222         (WebCore::WebGLQuery::create):
3223         (WebCore::WebGLQuery::~WebGLQuery):
3224         (WebCore::WebGLQuery::WebGLQuery):
3225         (WebCore::WebGLQuery::deleteObjectImpl):
3226         * html/canvas/WebGLQuery.h: Added.
3227         * html/canvas/WebGLQuery.idl: Added.
3228         * html/canvas/WebGLSampler.cpp: Added.
3229         (WebCore::WebGLSampler::create):
3230         (WebCore::WebGLSampler::~WebGLSampler):
3231         (WebCore::WebGLSampler::WebGLSampler):
3232         (WebCore::WebGLSampler::deleteObjectImpl):
3233         * html/canvas/WebGLSampler.h: Added.
3234         * html/canvas/WebGLSampler.idl: Added.
3235         * html/canvas/WebGLSharedObject.h:
3236         (WebCore::WebGLSharedObject::isQuery):
3237         (WebCore::WebGLSharedObject::isSampler):
3238         (WebCore::WebGLSharedObject::isSync):
3239         (WebCore::WebGLSharedObject::isTransformFeedback):
3240         (WebCore::WebGLSharedObject::isVertexArrayObject):
3241         * html/canvas/WebGLSync.cpp: Added.
3242         (WebCore::WebGLSync::create):
3243         (WebCore::WebGLSync::~WebGLSync):
3244         (WebCore::WebGLSync::WebGLSync):
3245         (WebCore::WebGLSync::deleteObjectImpl):
3246         * html/canvas/WebGLSync.h: Added.
3247         * html/canvas/WebGLSync.idl: Added.
3248         * html/canvas/WebGLTransformFeedback.cpp: Added.
3249         (WebCore::WebGLTransformFeedback::create):
3250         (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
3251         (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
3252         (WebCore::WebGLTransformFeedback::deleteObjectImpl):
3253         * html/canvas/WebGLTransformFeedback.h: Added.
3254         * html/canvas/WebGLTransformFeedback.idl: Added.
3255         * html/canvas/WebGLVertexArrayObject.cpp: Added.
3256         (WebCore::WebGLVertexArrayObject::create):
3257         (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
3258         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
3259         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
3260         * html/canvas/WebGLVertexArrayObject.h: Added.
3261         * html/canvas/WebGLVertexArrayObject.idl: Added.
3262
3263 2015-01-22  Chris Dumez  <cdumez@apple.com>
3264
3265         Fix remaining multiple targets per rule issues in DerivedSources.make
3266         https://bugs.webkit.org/show_bug.cgi?id=140790
3267
3268         Reviewed by David Kilzer.
3269
3270         Fix remaining multiple target per rule issues in DerivedSources.make,
3271         similarly to Bug 140784 and Bug 140756.
3272
3273         This was causing us to run scripts several times to generate the same
3274         files and may lead to malformed files in case of concurrency.
3275
3276         * DerivedSources.make:
3277
3278 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
3279
3280         Add a build flag for ES6 class syntax
3281         https://bugs.webkit.org/show_bug.cgi?id=140760
3282
3283         Reviewed by Michael Saboff.
3284
3285         * Configurations/FeatureDefines.xcconfig:
3286
3287 2015-01-22  Chris Dumez  <cdumez@apple.com>
3288
3289         SVGNames.cpp and HTMLNames.cpp are sometimes malformed
3290         https://bugs.webkit.org/show_bug.cgi?id=140784
3291         <rdar://problem/17701233>
3292
3293         Reviewed by David Kilzer.
3294
3295         Due to bad rules in DerivedSources.make, make_names.pl was called
3296         several times with the same arguments during build. This is because
3297         SVG/HTML/MathML each had several targets associated to the same
3298         command. This would cause the command (make_names.pl) to be called
3299         once per target. However, make_names.pl only needs to be executed
3300         once to generate all of the files currently marked as target.
3301
3302         Calling make_names.pl several times for the same files is not only
3303         wasteful, but it can also lead to malformed generated files if the
3304         scripts instances are executed in parallel as they will read / write
3305         from / to the same files.
3306
3307         This patch uses INTERMEDIATE targets instead so that we can still
3308         indicate which files are generated by make_names.pl but only run
3309         the script once.
3310
3311         This is a similar fix as for Bug 140756. There may several other
3312         similar issues in DerivedSources.make but this patch focuses on
3313         make_names.pl. I will take care of other in follow-ups if needed.
3314
3315         * DerivedSources.make:
3316
3317 2015-01-22  Chris Dumez  <cdumez@apple.com>
3318
3319         Have Counter::create() return a Ref<Counter>
3320         https://bugs.webkit.org/show_bug.cgi?id=140777
3321
3322         Reviewed by Andreas Kling.
3323
3324         Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.
3325
3326         The CSSPrimitiveValue class needed some updates as well to support
3327         constructing a CSSPrimitiveValue object from a Ref<>.
3328
3329         * css/CSSPrimitiveValue.cpp:
3330         (WebCore::CSSPrimitiveValue::init):
3331         * css/CSSPrimitiveValue.h:
3332         (WebCore::CSSPrimitiveValue::create):
3333         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3334         * css/Counter.h:
3335         (WebCore::Counter::create):
3336         (WebCore::Counter::cloneForCSSOM):
3337
3338 2015-01-22  Chris Dumez  <cdumez@apple.com>
3339
3340         Drop the legacy FeatureCounter class
3341         https://bugs.webkit.org/show_bug.cgi?id=140749
3342
3343         Reviewed by Andreas Kling.
3344
3345         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
3346         instead.
3347
3348         * CMakeLists.txt:
3349         * Configurations/WebCore.xcconfig:
3350         * WebCore.exp.in:
3351         * WebCore.vcxproj/WebCore.vcxproj:
3352         * WebCore.vcxproj/WebCore.vcxproj.filters:
3353         * WebCore.xcodeproj/project.pbxproj:
3354         * html/HTMLMediaElement.cpp:
3355         (WebCore::HTMLMediaElement::parseAttribute):
3356         * loader/SubresourceLoader.cpp:
3357         (WebCore::SubresourceLoader::willSendRequest):
3358         (WebCore::SubresourceLoader::didReceiveResponse):
3359         * loader/cache/CachedResource.cpp:
3360         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
3361         * loader/cache/CachedResourceLoader.cpp:
3362         (WebCore::logMemoryCacheResourceRequest):
3363         (WebCore::CachedResourceLoader::requestResource):
3364         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
3365         * page/DiagnosticLoggingKeys.cpp:
3366         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
3367         (WebCore::DiagnosticLoggingKeys::playedKey):
3368         (WebCore::DiagnosticLoggingKeys::noCacheKey):
3369         (WebCore::DiagnosticLoggingKeys::noStoreKey):
3370         (WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
3371         (WebCore::DiagnosticLoggingKeys::mediaKey):
3372         (WebCore::DiagnosticLoggingKeys::isExpiredKey):
3373         (WebCore::DiagnosticLoggingKeys::loadingKey):
3374         (WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
3375         (WebCore::DiagnosticLoggingKeys::reasonKey):
3376         (WebCore::DiagnosticLoggingKeys::audioKey):
3377         (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
3378         (WebCore::DiagnosticLoggingKeys::resourceRequestKey):
3379         (WebCore::DiagnosticLoggingKeys::revalidatingKey):
3380         (WebCore::DiagnosticLoggingKeys::unusedKey):
3381         (WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
3382         (WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
3383         (WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
3384         (WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
3385         (WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
3386         (WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
3387         (WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
3388         (WebCore::DiagnosticLoggingKeys::usedKey):
3389         (WebCore::DiagnosticLoggingKeys::userKey):
3390         (WebCore::DiagnosticLoggingKeys::videoKey):
3391         (WebCore::DiagnosticLoggingKeys::webViewKey):
3392         (WebCore::DiagnosticLoggingKeys::zoomedKey):
3393         * page/DiagnosticLoggingKeys.h:
3394         * page/Settings.in:
3395         * platform/FeatureCounter.cpp: Removed.
3396         * platform/FeatureCounter.h: Removed.
3397         * platform/FeatureCounterKeys.h: Removed.
3398         * platform/ios/FeatureCounter.mm: Removed.
3399
3400 2015-01-22  Benjamin Poulain  <benjamin@webkit.org>
3401
3402         When extending the fallback transitions with their closure, we are modifying the Set while iterating it
3403         https://bugs.webkit.org/show_bug.cgi?id=140785
3404
3405         Reviewed by Andreas Kling.
3406
3407         * contentextensions/NFAToDFA.cpp:
3408         (WebCore::ContentExtensions::populateTransitions):
3409         Make that in two steps: accumulate the fallback transitions then add the closure
3410         of every element.
3411
3412 2015-01-21  Antti Koivisto  <antti@apple.com>
3413
3414         Rename SimpleFontData to Font
3415         https://bugs.webkit.org/show_bug.cgi?id=140496
3416
3417         Reviewed by Zalan Bujtas.
3418
3419         The fallback supporting Font type was renamed FontCascade.
3420         We can now rename SimpleFontData to Font matching the usual definition.
3421
3422 2015-01-22  Zalan Bujtas  <zalan@apple.com>
3423
3424         Simple line layout: Make trailing whitespace handling more explicit.
3425         https://bugs.webkit.org/show_bug.cgi?id=140776
3426
3427         Reviewed by Antti Koivisto.
3428
3429         Differentiate between committed and uncommitted trailing whitespace.
3430         This enables further cleanup in removeTrailingWhitespace().
3431
3432         No change in functionality.
3433
3434         * rendering/SimpleLineLayout.cpp:
3435         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
3436         (WebCore::SimpleLineLayout::LineState::addUncommitted):
3437         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
3438         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
3439         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3440         (WebCore::SimpleLineLayout::LineState::LineState): Deleted.
3441         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
3442         (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.
3443
3444 2015-01-22  Alexey Proskuryakov  <ap@apple.com>
3445
3446         Crash in URL::protocol() after appcache load fails
3447         https://bugs.webkit.org/show_bug.cgi?id=140755
3448         rdar://problem/7881290
3449
3450         Reviewed by Dan Bates.
3451
3452         Test: http/tests/appcache/404-resource-with-slow-main-resource.php
3453
3454         Not every cache that isn't being updated is complete. It could also be in a zombie
3455         state after failing to load. We get rid of the cache once the main resource finishes
3456         loading, but while it's being loaded, the zombie still looks like a regular
3457         candidate application cache.
3458
3459         * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
3460         * loader/appcache/ApplicationCache.h:
3461         Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
3462         Constness doesn't make a lot of sense for these objects anyway.
3463
3464         * loader/appcache/ApplicationCacheGroup.cpp:
3465         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
3466         We can fail a main resource load when the document has a zombie appcache, too.
3467
3468         * loader/appcache/ApplicationCacheGroup.h:
3469         (WebCore::ApplicationCacheGroup::cacheIsComplete):
3470         (WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
3471         These functions are only used in ApplicationCache::isComplete().
3472
3473 2015-01-22  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3474
3475         Avoid defining always empty Vector<TextCheckingResult>
3476         https://bugs.webkit.org/show_bug.cgi?id=140765
3477
3478         Reviewed by Alexey Proskuryakov.
3479
3480         Pass an empty vector direclty instead.
3481
3482         No new tests. No behavior change.
3483
3484         * editing/SpellChecker.cpp:
3485         (WebCore::SpellChecker::didCheckCancel):
3486
3487 2015-01-22  Chris Dumez  <cdumez@apple.com>
3488
3489         makeprop.pl script is called too many times during build
3490         https://bugs.webkit.org/show_bug.cgi?id=140756
3491         <rdar://problem/19467942>
3492
3493         Reviewed by David Kilzer.
3494
3495         The makeprop.pl script was called 4 times (instead of once) during
3496         build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
3497         had 4 associated targets and thus was called 4 times (with the same
3498         parameter). Calling it once is sufficient to generate all 4 files