<attachment> should have an inactive style (gray in background)
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
2
3         <attachment> should have an inactive style (gray in background)
4         https://bugs.webkit.org/show_bug.cgi?id=142103
5         <rdar://problem/19982486>
6
7         Reviewed by Dan Bernstein.
8
9         * rendering/RenderThemeMac.mm:
10         (WebCore::attachmentLabelInactiveBackgroundColor):
11         (WebCore::attachmentLabelInactiveTextColor):
12         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
13         (WebCore::RenderThemeMac::paintAttachmentLabel):
14         Use a gray background and gray text when the selection containing the
15         attachment isn't focused and active.
16
17 2015-02-27  Brady Eidson  <beidson@apple.com>
18
19         Add a "block-cookies" rule to the user content filter.
20         https://bugs.webkit.org/show_bug.cgi?id=142105
21
22         Reviewed by Alex Christensen.
23
24         Tests: http/tests/usercontentfilter/block-cookies-basic.html
25                http/tests/usercontentfilter/block-cookies-send.html
26
27         * contentextensions/ContentExtensionRule.h:
28
29         * contentextensions/ContentExtensionsBackend.cpp:
30         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
31         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
32         * contentextensions/ContentExtensionsBackend.h:
33
34         * contentextensions/ContentExtensionsManager.cpp:
35         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
36
37         * loader/cache/CachedResourceLoader.cpp:
38         (WebCore::CachedResourceLoader::requestResource):
39
40         * page/UserContentController.cpp:
41         (WebCore::UserContentController::actionForURL):
42         (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
43         * page/UserContentController.h:
44
45 2015-02-27  Alex Christensen  <achristensen@webkit.org>
46
47         [WinCairo] Unreviewed build fix.
48
49         * platform/graphics/BitmapImage.h:
50         * platform/win/BitmapInfo.h:
51         Added WEBCORE_EXPORT.
52
53 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
54
55         <attachment>'s label baseline should match that of the surrounding text
56         https://bugs.webkit.org/show_bug.cgi?id=142099
57         rdar://problem/19982495
58
59         Reviewed by Dan Bernstein.
60
61         * rendering/RenderAttachment.cpp:
62         (WebCore::RenderAttachment::baselinePosition):
63         * rendering/RenderAttachment.h:
64         Override baselinePosition and retrieve it from RenderTheme.
65
66         * rendering/RenderTheme.h:
67         (WebCore::RenderTheme::attachmentBaseline):
68         * rendering/RenderThemeMac.h:
69         * rendering/RenderThemeMac.mm:
70         (WebCore::AttachmentLayout::AttachmentLayout):
71         (WebCore::RenderThemeMac::attachmentBaseline):
72         Plumb the label baseline from AttachmentLayout to RenderAttachment.
73
74 2015-02-27  Commit Queue  <commit-queue@webkit.org>
75
76         Unreviewed, rolling out r180752.
77         https://bugs.webkit.org/show_bug.cgi?id=142098
78
79         Causes 10 SVG test failures on Windows. (Requested by
80         bfulgham_ on #webkit).
81
82         Reverted changeset:
83
84         "Cache glyph widths to GlyphPages"
85         https://bugs.webkit.org/show_bug.cgi?id=142028
86         http://trac.webkit.org/changeset/180752
87
88 2015-02-27  David Kilzer  <ddkilzer@apple.com>
89
90         [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
91
92         * platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
93         until header refactoring is completed.
94
95 2015-02-27  Chris Dumez  <cdumez@apple.com>
96
97         MediaSource should be suspendable when closed
98         https://bugs.webkit.org/show_bug.cgi?id=142089
99         <rdar://problem/19923085>
100
101         Reviewed by Jer Noble.
102
103         Make MediaSource ActiveDOMObject suspendable when it is in closed state
104         and it has no pending events. This increases the likelihood of pages
105         using MediaSource to enter the PageCache.
106
107         Tests: fast/history/page-cache-media-source-closed-2.html
108                fast/history/page-cache-media-source-closed.html
109                fast/history/page-cache-media-source-opened.html
110
111 2015-02-27  Andreas Kling  <akling@apple.com>
112
113         Use NeverDestroyed for JS wrapper owners.
114         <https://webkit.org/b/142090>
115
116         Reviewed by Chris Dumez.
117
118         Using NeverDestroyed puts these objects in BSS which is preferable
119         since that prevents them from pinning down entire malloc pages forever.
120
121         * bindings/scripts/CodeGeneratorJS.pm:
122         (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
123
124         * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
125
126 2015-02-27  Chris Dumez  <cdumez@apple.com>
127
128         Make IDBDatabase / IDBRequest suspendable
129         https://bugs.webkit.org/show_bug.cgi?id=142076
130         <rdar://problem/19923085>
131
132         Reviewed by Andreas Kling.
133
134         Make IDBDatabase / IDBRequest suspendable under certain conditions to
135         make it more likely for pages using indexeddb to enter the PageCache.
136
137         IDBDatabase is safely suspendable if the database is closed. IDBRequest
138         is safely suspendable if the request no longer has any pending activity
139         (i.e. state is DONE and success / failure handler was called). We may
140         be able to do better later but this is the bare minimum for now.
141
142         Tests: fast/history/page-cache-indexed-closed-db.html
143                fast/history/page-cache-indexed-opened-db.html
144
145         * Modules/indexeddb/IDBDatabase.cpp:
146         (WebCore::IDBDatabase::IDBDatabase):
147         (WebCore::IDBDatabase::closeConnection):
148         (WebCore::IDBDatabase::enqueueEvent):
149         (WebCore::IDBDatabase::canSuspend):
150         * Modules/indexeddb/IDBDatabase.h:
151         * Modules/indexeddb/IDBRequest.cpp:
152         (WebCore::IDBRequest::canSuspend):
153         * Modules/indexeddb/IDBRequest.h:
154
155 2015-02-27  Chris Dumez  <cdumez@apple.com>
156
157         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
158         https://bugs.webkit.org/show_bug.cgi?id=142052
159
160         Reviewed by Andreas Kling.
161
162         Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
163         DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
164         returning false so pages using WebDatabase would never enter the PageCache anyway.
165
166         This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
167         return false when there are open databases. This check is now equivalent to the one
168         that was in PageCache.
169
170         An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
171         to false so once a page opened a database, it will never be page-cacheable. This
172         will be taken care of separately though.
173
174         Test: fast/history/page-cache-webdatabase-opened-db.html
175
176         * Modules/webdatabase/DatabaseContext.cpp:
177         (WebCore::DatabaseContext::canSuspend):
178         * Modules/webdatabase/DatabaseContext.h:
179         * history/PageCache.cpp:
180         (WebCore::logCanCacheFrameDecision):
181         (WebCore::PageCache::canCachePageContainingThisFrame):
182         * page/DiagnosticLoggingKeys.cpp:
183         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
184         * page/DiagnosticLoggingKeys.h:
185
186 2015-02-27  Alex Christensen  <achristensen@webkit.org>
187
188         Compile DFA to bytecode.
189         https://bugs.webkit.org/show_bug.cgi?id=142031
190
191         Reviewed by Benjamin Poulain.
192
193         * WebCore.xcodeproj/project.pbxproj:
194         * contentextensions/ContentExtensionsBackend.cpp:
195         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
196         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
197         * contentextensions/ContentExtensionsBackend.h:
198         * contentextensions/DFA.cpp:
199         (WebCore::ContentExtensions::DFA::nextState): Deleted.
200         (WebCore::ContentExtensions::DFA::actions): Deleted.
201         * contentextensions/DFA.h:
202         (WebCore::ContentExtensions::DFA::size):
203         (WebCore::ContentExtensions::DFA::nodeAt):
204         * contentextensions/DFABytecode.h: Added.
205         (WebCore::ContentExtensions::instructionSizeWithArguments):
206         * contentextensions/DFABytecodeCompiler.cpp: Added.
207         (WebCore::ContentExtensions::append):
208         (WebCore::ContentExtensions::set32Bits):
209         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
210         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
211         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
212         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
213         (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
214         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
215         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
216         * contentextensions/DFABytecodeCompiler.h: Added.
217         (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
218         * contentextensions/DFABytecodeInterpreter.cpp: Added.
219         (WebCore::ContentExtensions::getBits):
220         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
221         * contentextensions/DFABytecodeInterpreter.h: Added.
222         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
223
224 2015-02-27  Zalan Bujtas  <zalan@apple.com>
225
226         Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
227         https://bugs.webkit.org/show_bug.cgi?id=138366
228
229         Reviewed by Dave Hyatt.
230
231         This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
232
233         In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
234         When a child is being detached from the tree, it removes itself from this hashmap.
235         We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
236         However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
237         is inside a flow too and continue the cleanup accordingly.
238
239         Test: fast/regions/region-with-multicolumn-embedded-crash.html
240
241         * rendering/RenderObject.cpp:
242         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
243
244 2015-02-27  Brady Eidson  <beidson@apple.com>
245
246         Add API to remove a single content filter.
247         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
248
249         Reviewed by Sam Weinig.
250
251         * page/UserContentController.cpp:
252         (WebCore::UserContentController::removeUserContentFilter):
253         * page/UserContentController.h:
254
255 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
256
257         [Win] Remove remaining SafariTheme cruft
258         https://bugs.webkit.org/show_bug.cgi?id=142075
259
260         Reviewed by Anders Carlsson.
261
262         Remove reference to SafariTheme-switching preference.
263
264         Tested by existing layout tests.
265
266         * WebCore.vcxproj/WebCore.vcxproj:
267         * WebCore.vcxproj/WebCore.vcxproj.filters:
268         * config.h:
269         * page/Settings.cpp:
270         (WebCore::Settings::fontRenderingMode):
271         (WebCore::Settings::setShouldPaintNativeControls): Deleted.
272         * page/Settings.h:
273         (WebCore::Settings::shouldPaintNativeControls): Deleted.
274         * platform/win/ScrollbarThemeWin.cpp:
275         (WebCore::ScrollbarTheme::nativeTheme):
276         * rendering/RenderThemeWin.cpp:
277         (WebCore::RenderTheme::themeForPage):
278
279 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
280
281         Add comment about CSS value name mangling
282
283         Unreviewed
284
285         * css/CSSParser.cpp:
286         (WebCore::cssValueKeywordID):
287
288 2015-02-27  Antti Koivisto  <antti@apple.com>
289
290         Cache glyph widths to GlyphPages
291         https://bugs.webkit.org/show_bug.cgi?id=142028
292
293         Reviewed by Andreas Kling.
294
295         Currently we have a separate cache in Font for glyph widths. In practice we always need
296         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
297         a per-character hash lookup from WidthIterator.
298
299         * platform/graphics/Font.cpp:
300         (WebCore::Font::Font):
301         (WebCore::Font::initCharWidths):
302         (WebCore::Font::platformGlyphInit):
303         (WebCore::createAndFillGlyphPage):
304         (WebCore::Font::computeWidthForGlyph):
305
306             Rename to make it clear this doesn't cache.
307
308         (WebCore::GlyphPage::setGlyphDataForIndex):
309
310             Initialize the width.
311             This could go to GlyphPage.cpp if we had one.
312
313         * platform/graphics/Font.h:
314         (WebCore::Font::glyphZeroWidth):
315         (WebCore::Font::isZeroWidthSpaceGlyph):
316         (WebCore::Font::zeroGlyph): Deleted.
317         (WebCore::Font::setZeroGlyph): Deleted.
318         (WebCore::Font::widthForGlyph): Deleted.
319         * platform/graphics/FontCascade.cpp:
320         (WebCore::offsetToMiddleOfGlyph):
321         * platform/graphics/FontCascadeFonts.cpp:
322         (WebCore::FontCascadeFonts::glyphDataForCharacter):
323         * platform/graphics/GlyphPage.h:
324         (WebCore::GlyphData::GlyphData):
325
326             Return width too as part of GlyphData.
327
328         (WebCore::GlyphPage::glyphDataForIndex):
329         (WebCore::GlyphPage::setGlyphDataForCharacter):
330         (WebCore::GlyphPage::setGlyphDataForIndex):
331         (WebCore::GlyphPage::GlyphPage):
332         * platform/graphics/WidthIterator.cpp:
333         (WebCore::WidthIterator::advanceInternal):
334
335             No need to lookup width separately now.
336
337         * platform/graphics/mac/ComplexTextController.cpp:
338         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
339         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
340         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
341         * rendering/mathml/RenderMathMLOperator.cpp:
342         (WebCore::RenderMathMLOperator::advanceForGlyph):
343         * rendering/svg/SVGTextRunRenderingContext.cpp:
344         (WebCore::missingGlyphForFont):
345         * svg/SVGFontData.cpp:
346         (WebCore::SVGFontData::initializeFont):
347
348 2015-02-26  Alexey Proskuryakov  <ap@apple.com>
349
350         iOS build fix after r180717.
351
352         * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
353
354 2015-02-26  Ryosuke Niwa  <rniwa@webkit.org>
355
356         isEditablePosition and related functions shouldn't move position out of table
357         https://bugs.webkit.org/show_bug.cgi?id=129200
358
359         Reviewed by Darin Adler.
360
361         This patch removes the legacy editing position for elements display: table in its computed style.
362         Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
363         such an element for historical reasons. This forced us to update the style tree before computing
364         the editability of a position because we have to check the editability of the position outside
365         the element with display: table if the position was using such a legacy editing position.
366         e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
367         should still be considered editable if the parent node of the table was editable.
368
369         This patch replaces such a legacy editing position by using modern position types:
370         PositionIsBeforeAnchor and PositionIsAfterAnchor.
371
372         No new tests since there should be no change in the user perceived editing operations.
373
374         * dom/Position.cpp:
375         (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
376         type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
377         is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
378         position inside a table.
379         (WebCore::Position::next): Ditto.
380         (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
381         of positions.
382         (WebCore::Position::atEndOfTree): Ditto.
383         (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
384         for an atomic element or a table element as done in the equivalent code in Position::upstream.
385         (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
386         (table, 1) when there are more than two children of the table.
387
388         * dom/PositionIterator.cpp:
389         (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
390         positions. So convert it to a modern position by returning a position before or after a table here.
391         * editing/ApplyBlockElementCommand.cpp:
392         (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
393         is actually empty before executing the simple code path for an empty unsplittable element. Without
394         this check, block formatting a table element will fail.
395
396         * editing/htmlediting.cpp:
397         (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
398         of a position before or after an element is determined by its parent, not the element itself.
399         (WebCore::isAtUnsplittableElement): Ditto.
400         (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
401         an element with display: table. This is the code removal for which this patch was made.
402         (WebCore::editableRootForPosition): Ditto.
403
404 2015-02-26  Timothy Horton  <timothy_horton@apple.com>
405
406         Implement <attachment> element appearance on Mac
407         https://bugs.webkit.org/show_bug.cgi?id=142023
408
409         Reviewed by Dean Jackson.
410
411         * css/CSSParser.cpp:
412         (WebCore::isValidKeywordPropertyAndValue):
413         * css/CSSPrimitiveValueMappings.h:
414         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
415         * css/CSSValueKeywords.in:
416         * css/html.css:
417         (attachment):
418         * platform/ThemeTypes.h:
419         Add a new -webkit-appearance value, attachment.
420
421         * WebCore.xcodeproj/project.pbxproj:
422         * html/HTMLAttachmentElement.cpp:
423         (WebCore::HTMLAttachmentElement::setFile):
424         Let the renderer know when the file changes (so it can relayout and repaint).
425
426         (WebCore::HTMLAttachmentElement::filePath):
427         (WebCore::HTMLAttachmentElement::fileName):
428         * html/HTMLAttachmentElement.h:
429         Handy acccessors for the full path and the name of the file.
430
431         * platform/spi/mac/IconServicesSPI.h: Added.
432         * platform/spi/mac/LaunchServicesSPI.h: Added.
433         Add some IconServices and LaunchServices SPI headers.
434
435         * rendering/RenderAttachment.cpp:
436         (WebCore::RenderAttachment::RenderAttachment):
437         Don't have a default intrinsic size; we'll adjust in layout().
438
439         (WebCore::RenderAttachment::isSelected):
440         (WebCore::RenderAttachment::isFocused):
441         (WebCore::RenderAttachment::isSelectedOrFocused):
442         Factor out from paintReplaced().
443
444         (WebCore::RenderAttachment::layout):
445         Use RenderTheme to compute the intrinsic size of this attachment.
446
447         (WebCore::RenderAttachment::paintReplaced):
448         Use RenderTheme to paint the attachment.
449
450         (WebCore::RenderAttachment::representedFileChanged):
451         When the represented file changes, we need to recompute the intrinsic size and repaint.
452
453         * rendering/RenderTheme.cpp:
454         (WebCore::RenderTheme::adjustStyle):
455         (WebCore::RenderTheme::paint):
456         (WebCore::RenderTheme::adjustAttachmentStyle):
457         (WebCore::RenderTheme::paintAttachment):
458         Plumb through the attachment appearance.
459
460         * rendering/RenderAttachment.h:
461         * rendering/RenderTheme.h:
462         (WebCore::RenderTheme::paintAttachment):
463         (WebCore::RenderTheme::attachmentIntrinsicSize):
464         * rendering/RenderThemeMac.h:
465         * rendering/RenderThemeMac.mm:
466         (WebCore::attachmentIconBackgroundColor):
467         (WebCore::attachmentIconBorderColor):
468         (WebCore::AttachmentLayout):
469         AttachmentLayout lays out the innards of the RenderThemeMac attachment
470         presentation: an icon with an optional bordered background, with a label
471         underneath it with an optional background.
472
473         (WebCore::RenderThemeMac::attachmentIntrinsicSize):
474         (WebCore::paintAttachmentIconBackground):
475         (WebCore::paintAttachmentIcon):
476         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
477         (WebCore::RenderThemeMac::paintAttachmentLabel):
478         (WebCore::RenderThemeMac::paintAttachment):
479         Paint the attachment element. Paint the optional backgrounds (and swap
480         out the text color) if the element is selected/focused.
481
482 2015-02-26  Doug Russell  <d_russell@apple.com>
483
484         AX: Expose caret browsing preference to accessibility API
485         https://bugs.webkit.org/show_bug.cgi?id=141862
486
487         Reviewed by Chris Fleizach.
488
489         Exposing the caret browsing setting on WebCore::Frame via the accessibility API would allow assistive tech apps to enable it contextually (for example, when the assistive tech app is running).
490         Enabling caret browsing when assistive tech apps are running greatly improves the reliability of keyboard navigation on the web. Most especially in cases where selection would be disrupted by focus events.
491
492         Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
493                platform/mac/accessibility/caret-browsing-attribute.html
494                platform/mac/accessibility/caret-browsing-tab-selection.html
495
496         * accessibility/AccessibilityObject.h:
497         * accessibility/mac/AccessibilityObjectMac.mm:
498         (WebCore::AccessibilityObject::caretBrowsingEnabled):
499         (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
500         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
501         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
502         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
503         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
504         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
505         (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
506
507 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
508
509         Remove unnecessary create() factory functions
510         https://bugs.webkit.org/show_bug.cgi?id=142039
511
512         Reviewed by Chris Dumez.
513
514         Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
515         and DatabaseUnpauseTask::create.
516
517         * Modules/webdatabase/DatabaseThread.cpp:
518         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
519         (WebCore::DatabaseThread::setPaused):
520         (WebCore::DatabaseUnpauseTask::create): Deleted.
521         * bindings/js/JSCryptoKeySerializationJWK.h:
522         * bindings/js/JSSubtleCryptoCustom.cpp:
523         (WebCore::importKey):
524         * html/HTMLMediaElement.cpp:
525         (WebCore::HTMLMediaElement::HTMLMediaElement):
526         * html/HTMLMediaSession.cpp:
527         (WebCore::HTMLMediaSession::create): Deleted.
528         * html/HTMLMediaSession.h:
529
530 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
531
532         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
533         https://bugs.webkit.org/show_bug.cgi?id=142061
534
535         Reviewed by Timothy Hatcher.
536
537         * inspector/CommandLineAPIModuleSource.js:
538         Replace $1-$4 "inspected objects" with $1-$99 "saved results".
539
540         * bindings/js/JSCommandLineAPIHostCustom.cpp:
541         (WebCore::JSCommandLineAPIHost::inspectedObject):
542         * inspector/CommandLineAPIHost.cpp:
543         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
544         (WebCore::CommandLineAPIHost::InspectableObject::get):
545         (WebCore::CommandLineAPIHost::addInspectedObject):
546         (WebCore::CommandLineAPIHost::inspectedObject):
547         (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
548         * inspector/CommandLineAPIHost.h:
549         * inspector/CommandLineAPIHost.idl:
550         Since we now just save the single $0 inspected object, eliminate
551         keeping track of a list of 5 values.
552
553 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
554
555         Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
556         https://bugs.webkit.org/show_bug.cgi?id=141902
557
558         Reviewed by Darin Adler.
559
560         Create instance using std::make_unique<> in CDMFactory directly. To do that,
561         CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
562
563         No new tests, no behavior changes.
564
565         * Modules/encryptedmedia/CDM.cpp:
566         (WebCore::installedCDMFactories):
567         * Modules/encryptedmedia/CDM.h:
568         * Modules/encryptedmedia/CDMPrivateClearKey.h:
569         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
570         (WebCore::CDMPrivateClearKey::create): Deleted.
571         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
572         (WebCore::CDMPrivateMediaPlayer::create): Deleted.
573         * dom/Element.cpp:
574         (WebCore::Element::attributes):
575         * dom/NamedNodeMap.h:
576         (WebCore::NamedNodeMap::NamedNodeMap):
577         (WebCore::NamedNodeMap::create): Deleted.
578         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
579         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
580
581 2015-02-26  Andy Estes  <aestes@apple.com>
582
583         [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
584         https://bugs.webkit.org/show_bug.cgi?id=142062
585
586         Reviewed by Daniel Bates.
587
588         * WebCore.xcodeproj/project.pbxproj:
589         * platform/mac/ContentFilterMac.mm:
590         * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
591         * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
592
593 2015-02-26  Anders Carlsson  <andersca@apple.com>
594
595         Add API to remove all website data for the given data records
596         https://bugs.webkit.org/show_bug.cgi?id=142060
597
598         Reviewed by Beth Dakin.
599
600         * loader/cache/MemoryCache.cpp:
601         (WebCore::MemoryCache::removeResourcesWithOrigins):
602         New function that removes all resources that match the set of origins in a given session.
603
604 2015-02-26  Chris Dumez  <cdumez@apple.com>
605
606         Rename DatabaseManager::manager() to DatabaseManager::singleton()
607         https://bugs.webkit.org/show_bug.cgi?id=142054
608
609         Reviewed by Ryosuke Niwa.
610
611         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
612         per coding style and use WTF::NeverDestroyed.
613
614         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
615         (WebCore::DOMWindowWebDatabase::openDatabase):
616         * Modules/webdatabase/DatabaseBackendBase.cpp:
617         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
618         * Modules/webdatabase/DatabaseContext.cpp:
619         (WebCore::DatabaseContext::DatabaseContext):
620         (WebCore::DatabaseContext::~DatabaseContext):
621         (WebCore::DatabaseContext::stopDatabases):
622         (WebCore::DatabaseContext::databaseExceededQuota):
623         * Modules/webdatabase/DatabaseManager.cpp:
624         (WebCore::DatabaseManager::singleton):
625         (WebCore::DatabaseManager::manager): Deleted.
626         * Modules/webdatabase/DatabaseManager.h:
627         (WebCore::DatabaseManager::~DatabaseManager): Deleted.
628         * Modules/webdatabase/SQLTransactionClient.cpp:
629         (WebCore::SQLTransactionClient::didExceedQuota):
630         * history/PageCache.cpp:
631         (WebCore::logCanCacheFrameDecision):
632         (WebCore::PageCache::canCachePageContainingThisFrame):
633         * loader/FrameLoader.cpp:
634         (WebCore::FrameLoader::stopLoading):
635
636 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
637
638         Fix the !ENABLE(GEOLOCATION) build after r180533
639         https://bugs.webkit.org/show_bug.cgi?id=142053
640
641         Reviewed by Chris Dumez.
642
643         * Modules/geolocation/GeoNotifier.cpp:
644         * Modules/geolocation/GeoNotifier.h:
645
646 2015-02-26  Dean Jackson  <dino@apple.com>
647
648         [iOS Media] incorrect front padding on time values
649         https://bugs.webkit.org/show_bug.cgi?id=142027
650         <rdar://problem/19960790>
651
652         Reviewed by Brent Fulgham.
653
654         My last commit was updating the OS X file,
655         not the iOS file.
656
657         We don't want to prefix times with a "0".
658
659         * Modules/mediacontrols/mediaControlsApple.js:
660         (Controller.prototype.formatTime):
661         * Modules/mediacontrols/mediaControlsiOS.js:
662         (ControllerIOS.prototype.formatTime):
663
664 2015-02-26  Mark Lam  <mark.lam@apple.com>
665
666         Rolling out r180602, r180608, r180613, r180617, r180671.
667         <https://webkit.org/b/141990>
668
669         Not reviewed.
670
671         The r180602 solution does result in more work for GC when worker
672         threads are in use.  Filip is uncomfortable with that.
673         The EFL and GTK ports also seem to be unhappy with this change.
674         Rolling out while we investigate.
675
676         * bindings/js/JSDOMWindowBase.cpp:
677         (WebCore::JSDOMWindowBase::commonVM):
678
679 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
680
681         [Mac] [iOS] Parsing support for -apple-trailing-word
682         https://bugs.webkit.org/show_bug.cgi?id=141939
683
684         Reviewed by Andreas Kling.
685
686         This patch implements initial parsing support for the -apple-trailing-word CSS property.
687         This property has two possible (mutually exclusive) values: auto and
688         -apple-partially-balanced. This property is inherited.
689
690         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
691
692         This is an internal property that will allow us to control line breaking behavior for
693         short paragraphs.
694
695         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
696         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
697         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
698         version.
699
700         Test: platform/mac/fast/text/trailing-word-parse.html
701
702         * Configurations/FeatureDefines.xcconfig:
703         * css/CSSComputedStyleDeclaration.cpp:
704         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
705         CSS value.
706         * css/CSSParser.cpp:
707         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
708         pair.
709         (WebCore::isKeywordPropertyID): New property is a keyword property.
710         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
711         * css/CSSPrimitiveValueMappings.h:
712         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
713         representation and CSS values.
714         (WebCore::CSSPrimitiveValue::operator TrailingWord):
715         * css/CSSPropertyNames.in: New property.
716         * css/CSSValueKeywords.in: New value.
717         * rendering/SimpleLineLayout.cpp:
718         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
719         * rendering/style/RenderStyle.h: Getter, setter and initial value.
720         * rendering/style/RenderStyleConstants.h: Internal data type.
721         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
722         * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
723
724 2015-02-26  Roger Fong  <roger_fong@apple.com>
725
726         Unreviewed. Fix a accidental deletion from r178674.
727
728         * html/canvas/WebGLRenderingContextBase.cpp:
729         (WebCore::WebGLRenderingContextBase::create):
730         Return the fake WebGL context.
731
732 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
733
734         Cleanup RenderSVGResourceClipper class.
735         https://bugs.webkit.org/show_bug.cgi?id=142032.
736
737         Reviewed by Darin Adler.
738         
739         This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
740         It includes cleanup for RenderSVGResourceClipper class.
741
742         * rendering/svg/RenderSVGResourceClipper.cpp:
743         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
744         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
745         * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
746         typedef instead of a class and rename it to ClipperMaskImage. The purpose
747         of having it a class even though it includes only one member was because
748         we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
749         as a separate object on the heap anymore.
750         
751         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
752         double hash table lookups by calling HashMap::contains() and then HashMap::get(),
753         we can use HashMap::add() instead.
754
755 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
756
757         Setting any of the <object> element plugin controlling attributes does not have any affect.
758         https://bugs.webkit.org/show_bug.cgi?id=141936.
759
760         Reviewed by Zalan Bujtas.
761
762         When setting any of the <object> element plugin controlling attributes
763         dynamically we need to mark the the element to be dirty by calling
764         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
765         
766         Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
767
768         * dom/Element.h: Delete unimplemented function.
769         
770         * html/HTMLObjectElement.cpp:
771         (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
772         setNeedsStyleRecalc() when one of the plugin controlling attributes gets
773         changed. We have to clear the m_useFallbackContent because the attribute's
774         new value might fix the object rendering.
775         
776         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
777         
778         * html/HTMLPlugInImageElement.cpp:
779         (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to 
780         reconstruct the object renderer in the image case. This can happen if the
781         image was rendering fallback content and the attribute's new value fixes
782         the object rendering.
783
784 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
785
786         [Win] Make build logs more legible by reducing noise
787         https://bugs.webkit.org/show_bug.cgi?id=142034
788
789         Reviewed by Alexey Proskuryakov.
790
791         Modify batch files, makefiles, and DOS commands to remove
792         uninteresting/unhelpful output.
793
794         * WebCore.vcxproj/WebCoreGenerated.make:
795         * WebCore.vcxproj/WebCorePreBuild.cmd:
796         * WebCore.vcxproj/copyForwardingHeaders.cmd:
797         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
798
799 2015-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
800
801         [FreeType] REGRESSION(r180563): Introduced crashes
802         https://bugs.webkit.org/show_bug.cgi?id=142044
803
804         Reviewed by Martin Robinson.
805
806         No new tests, should be caught by any woff font test.
807
808         Use optionsPattern, not m_pattern, when m_pattern may be null.
809
810         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
811         (WebCore::FontPlatformData::initializeWithFontFace):
812
813 2015-02-26  Sergio Villar Senin  <svillar@igalia.com>
814
815         ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
816         https://bugs.webkit.org/show_bug.cgi?id=141645
817
818         Reviewed by Chris Dumez.
819
820         This bug has been here since r110484 but was uncovered by
821         r180140. The problem r110484 was trying to fix was that
822         CSSPrimitiveValue::convertToLength<Length> ended up calling
823         CSSPrimitiveValue::computeLengthDouble() which was apparently
824         dereferencing conversionData.style() and
825         conversionData.rootStyle() pointers without checking them. That's
826         why that fix added this condition to convertToLength():
827
828         isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
829
830         which is not correct, because for the 4 possible font relative
831         length types, 3 of them just use the style() pointer and the other
832         one just uses rootStyle() which BTW could be NULL. This erroneous
833         condition makes that function to return Length(Undefined) more
834         often than it should.
835
836         From now on it only returns Length(Undefined) if the style()
837         pointer is NULL and the font relative length type is one in the
838         set (CSS_EMS, CSS_EXS, CSS_CHS);
839
840         Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
841
842         * css/CSSPrimitiveValue.h:
843         * css/CSSPrimitiveValueMappings.h:
844         (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
845         (WebCore::CSSPrimitiveValue::convertToLength):
846
847
848 2015-02-26  Andreas Kling  <akling@apple.com>
849
850         [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
851         <https://webkit.org/b/142024>
852         <rdar://problem/19966096>
853
854         Reviewed by Antti Koivisto.
855
856         libcache already listens to the OS memory pressure notifications, but we still
857         need to manually request a cleanup when doing an iOS process suspension, or when
858         simulating memory pressure.
859
860         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
861         (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
862         cache_simulate_memory_warning_event() to make sure that nonessential objects
863         being kept alive by NSCaches get dropped when we need the memory.
864
865 2015-02-25  Zalan Bujtas  <zalan@apple.com>
866
867         Black line across screen on Adobe Illustrator detail page (non-retina only)
868         https://bugs.webkit.org/show_bug.cgi?id=141866
869
870         Reviewed by Simon Fraser.
871
872         Phase is relative to the destination origin. We need to take location information into account
873         while snapping so that the result is inline with the snapped destination rect.
874         (location affects the snapped size.)
875
876         Test: fast/backgrounds/gradient-background-on-subpixel-position.html
877
878         * rendering/RenderBoxModelObject.cpp:
879         (WebCore::pixelSnapBackgroundImageGeometryForPainting):
880         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
881
882 2015-02-25  Brent Fulgham  <bfulgham@apple.com>
883
884         [Win] Use WEBCORE_EXPORT instead of Definition file
885         https://bugs.webkit.org/show_bug.cgi?id=141734
886
887         Reviewed by Alex Christensen.
888
889         No change in functionality.
890
891         * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
892         settings on certain files.
893         * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
894         by Visual Studio.
895         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
896         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
897         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
898         * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
899         * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
900         * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
901         * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
902         * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
903         * WebCorePrefix.h: Provide proper export definitions for Windows.
904         * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
905         needed by the new export style.
906         * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
907         access to parts of it.
908         * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
909         needed by the new export style.
910         * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
911         when generating WebCoreTestSupport files, so that we don't confuse
912         the linker when WebCore.lib and WebCoreTestSupport.lib try to
913         both export WEBCORE_EXPORT symbols.
914         (ExportLabelForClass):
915         (GenerateHeader):
916         * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
917         export style.
918         * css/CSSParser.cpp: Ditto.
919         * dom/Document.cpp: Ditto.
920         * html/HTMLImageLoader.cpp: Ditto.
921         * inspector/CommandLineAPIModule.cpp: Ditto.
922         * inspector/PageDebuggerAgent.cpp: Ditto.
923         * inspector/PageRuntimeAgent.cpp: Ditto.
924         * inspector/WorkerRuntimeAgent.cpp: Ditto.
925         * page/DOMWindow.cpp: Ditto.
926         * page/DOMWindow.h: Export the destructor, as it is needed by
927         DumpRenderTree (on Windows).
928         * page/Page.cpp: Add missing #include needed by the new export style.
929         * platform/Logging.h: Remove conflicting export declaration.
930         * platform/PlatformExportMacros.h: Update for Windows use.
931         * testing/Internals.cpp: Add missing #include needed by the new export style.
932         * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
933         are supposed to be exported by WebCoreTestSupport, not WebCore.
934         * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
935         new export style.
936         * testing/js/WebCoreTestSupportPrefix.cpp: Added.
937         * testing/js/WebCoreTestSupportPrefix.h: Added.
938         * xml/XMLHttpRequest.h: Export the destructor.
939         * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
940         export style.
941         * xml/XSLTProcessorLibxslt.cpp: Ditto.
942
943 2015-02-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
944
945         Remove unnecessary DatabaseFooTask::create
946         https://bugs.webkit.org/show_bug.cgi?id=142002
947
948         Reviewed by Darin Adler.
949
950         DatabaseFooTask::create can be replaced with std::make_unique<>.
951
952         No new tests, no behavior changes.
953
954         * Modules/webdatabase/Database.cpp:
955         (WebCore::Database::scheduleTransaction):
956         (WebCore::Database::scheduleTransactionStep):
957         (WebCore::Database::markAsDeletedAndClose):
958         (WebCore::Database::closeImmediately):
959         (WebCore::Database::tableNames):
960         * Modules/webdatabase/DatabaseTask.h:
961         (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
962         (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
963         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
964
965 2015-02-25  Dean Jackson  <dino@apple.com>
966
967         [iOS Media] incorrect front padding on time values
968         https://bugs.webkit.org/show_bug.cgi?id=142027
969         <rdar://problem/19960790>
970
971         Reviewed by Brent Fulgham.
972
973         We don't want to prefix times with a "0".
974
975         * Modules/mediacontrols/mediaControlsApple.js:
976         (Controller.prototype.formatTime):
977
978 2015-02-25  Chris Dumez  <cdumez@apple.com>
979
980         Make PublicURLManager suspendable
981         https://bugs.webkit.org/show_bug.cgi?id=141977
982         <rdar://problem/19923085>
983
984         Reviewed by Andreas Kling.
985
986         Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
987         and returning true. Nothing prevents suspending the PublicURLManager as its
988         implementation never causes JS to be executed. No implementation for
989         suspend() / resume() needs to be provided for the same reason.
990
991         The fact that PublicURLManager wasn't suspendable was preventing pages using
992         URL.createObjectURL() from entering the PageCache. Baidu.com search results
993         pages are using the API for example.
994
995         Test: fast/history/page-cache-createObjectURL.html
996
997         * html/PublicURLManager.cpp:
998         (WebCore::PublicURLManager::canSuspend):
999         * html/PublicURLManager.h:
1000
1001 2015-02-25  Zalan Bujtas  <zalan@apple.com>
1002
1003         Cleanup BackgroundImageGeometry class.
1004         https://bugs.webkit.org/show_bug.cgi?id=141997
1005
1006         Reviewed by Simon Fraser.
1007
1008         This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
1009         removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
1010         becomes a read only class (with the exception of the clip() method).
1011
1012         No change in functionality.
1013
1014         * rendering/RenderBoxModelObject.cpp:
1015         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
1016         (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
1017         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1018         (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
1019         (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
1020         (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
1021         (WebCore::BackgroundImageGeometry::clip): Deleted.
1022         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
1023         * rendering/RenderBoxModelObject.h:
1024         (WebCore::BackgroundImageGeometry::clip):
1025         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
1026         (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
1027         (WebCore::BackgroundImageGeometry::setPhase): Deleted.
1028         (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
1029         (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
1030         (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
1031         (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
1032         (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
1033
1034 2015-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
1035
1036         Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
1037         https://bugs.webkit.org/show_bug.cgi?id=141776.
1038
1039         Reviewed by Dean Jackson.
1040
1041         Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
1042                svg/clip-path/clip-path-line-use-before-defined.svg
1043
1044         * rendering/svg/RenderSVGResourceClipper.cpp:
1045         (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
1046         is added to m_clipper if it does not exist. The same renderer might have been 
1047         added to m_clipper in resourceBoundingBox().
1048         
1049         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
1050         m_clipper if it does not exist. Return the associated ClipperData.
1051         
1052         (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
1053         referenced before it is defined, add the renderer to m_clipper. While doing the
1054         layout() for the clipper, we can check if m_clipper has values or not. If it does
1055         have, we are going to mark the clipper for client invalidation which is done by
1056         the SVG root.
1057         
1058         * rendering/svg/RenderSVGResourceClipper.h:
1059         * rendering/svg/RenderSVGResourceContainer.h:
1060         (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a 
1061         new function selfNeedsClientInvalidation() which controls marking the clipper 
1062         for client invalidation. In RenderSVGResourceClipper, override it so it checks
1063         m_clipper to force clients validation even if it the first time we do layout
1064         for this clipper.
1065
1066         * rendering/svg/RenderSVGResourceContainer.cpp:
1067         (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
1068         selfNeedsClientInvalidation() to check whether we need to mark the clipper for
1069         client invalidation.
1070         
1071         * svg/SVGElement.cpp: Delete unneeded header file.
1072
1073 2015-02-25  peavo@outlook.com  <peavo@outlook.com>
1074
1075         [WinCairo] WinLauncher is not starting on Vista.
1076         https://bugs.webkit.org/show_bug.cgi?id=141905
1077
1078         Reviewed by Alex Christensen.
1079
1080         We have to soft link with Media Foundation functions to be able
1081         to start on Vista and WinXP.
1082
1083         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1084         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
1085         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1086         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
1087         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
1088         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
1089         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
1090         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
1091         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
1092
1093 2015-02-25  Beth Dakin  <bdakin@apple.com>
1094
1095         REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
1096         https://bugs.webkit.org/show_bug.cgi?id=142020
1097         -and corresponding-
1098         rdar://problem/19945216
1099
1100         Reviewed by Tom Horton.
1101
1102         It was a mistaken assumption that it was necessary to return false in the zero-
1103         delta case. That is clearly conceptually wrong since false represents the DOM 
1104         doing something special with the event, which is clearly not the case if we never 
1105         even send the event to the DOM. Returning true will allow the rest of the 
1106         scrolling machinery the ability to handle the event.
1107         * dom/Element.cpp:
1108         (WebCore::Element::dispatchWheelEvent):
1109
1110 2015-02-25  Ryosuke Niwa  <rniwa@webkit.org>
1111
1112         HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
1113         https://bugs.webkit.org/show_bug.cgi?id=142003
1114
1115         Reviewed by Sam Weinig.
1116
1117         Utilized contentEditableType to reduce the code duplication.
1118
1119         * html/HTMLElement.cpp:
1120         (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
1121         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
1122
1123 2015-02-25  Sergio Villar Senin  <svillar@igalia.com>
1124
1125         [CSS Grid Layout] Tracks growing beyond limits when they should not
1126         https://bugs.webkit.org/show_bug.cgi?id=140883
1127
1128         Reviewed by Darin Adler.
1129
1130         Our track sizing algorithm implementation incorrectly grew some
1131         tracks beyond limits when handling min-content and max-content
1132         base sizes. In those cases we should only grow "any affected track
1133         that happens to also have an intrinsic max track sizing function"
1134         or all of them if there are none.
1135
1136         The problem was that we're using a vector of indexes pointing to
1137         the vector with the list of affected tracks. Those indexes become
1138         easily incorrect because the first thing we do in
1139         distributeSpaceToTracks() is to sort the vector with the affected
1140         tracks by growth potential.
1141
1142         Instead of that we now pass a vector with pointers to the list of
1143         tracks allowed to grow over the limits. The size changes are now
1144         directly stored in the GridTracks (it's called plannedSize)
1145         instead of in a separate vector, so we don't need to worry about
1146         tracks being rearranged (and we also get rid of the ugly vector of
1147         indexes pointing to another vector).
1148
1149         * rendering/RenderGrid.cpp:
1150         (WebCore::GridTrack::plannedSize): New member with getter/setter.
1151         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1152         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1153         Pass a setXXX() function instead of a growXXX() one to ForItems().
1154         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1155         Renamed additionalBreadthSpace to extraSpace which is the term
1156         used by specs.
1157         (WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
1158         plannedSize instead of the old distribution vector.
1159         (WebCore::GridTrack::growBaseSize): Deleted.
1160         (WebCore::GridTrack::growGrowthLimit): Deleted.
1161         * rendering/RenderGrid.h:
1162
1163 2015-02-25  Joanmarie Diggs  <jdiggs@igalia.com>
1164
1165         AX: Implement support for ARIA 1.1 'searchbox' role
1166         https://bugs.webkit.org/show_bug.cgi?id=142004
1167
1168         Reviewed by Chris Fleizach.
1169
1170         Add a new accessible SearchFieldRole to handle both the ARIA role
1171         and the "search" input type.
1172
1173         No new tests. Instead, added a new test case to roles-exposed.html
1174         for the mapping, and updated roles-computedRoleString.html because
1175         there is now a one-to-one mapping between the "search" input type
1176         and an ARIA role.
1177
1178         * accessibility/AccessibilityNodeObject.cpp:
1179         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1180         (WebCore::AccessibilityNodeObject::isSearchField):
1181         * accessibility/AccessibilityObject.cpp:
1182         (WebCore::AccessibilityObject::isARIATextControl):
1183         (WebCore::AccessibilityObject::isARIAInput):
1184         (WebCore::initializeRoleMap):
1185         * accessibility/AccessibilityObject.h:
1186         * accessibility/AccessibilityRenderObject.cpp:
1187         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1188         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1189         (atkRole):
1190         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1191         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
1192         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1193         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1194         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1195         (createAccessibilityRoleMap):
1196
1197 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1198
1199         Clarify some resizing terminology in ScrollView/FrameView
1200         https://bugs.webkit.org/show_bug.cgi?id=141996
1201
1202         Reviewed by Zalan Bujtas.
1203
1204         ScrollableArea/ScrollView/FrameView had some confusing terminology around
1205         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
1206         
1207         Clarify this by distinguishing between:
1208         1. Available size changes because of
1209             i) non-overlay scrollbar presence
1210            ii) ScrollableArea frame change
1211         2. Removing fixedLayoutSizeChanged() and just treating it like an
1212            available size change.
1213            
1214         contentsResized() is relegated to simply being a hook that allows Mac to
1215         flash overlay scrollbars.
1216         
1217         The confusingly named visibleContentsResized() is now updateContentsSize(),
1218         and is the way that a ScrollableArea tells its subclasss that it should recompute
1219         the size of the contents (i.e. do a layout).
1220
1221         * page/FrameView.cpp:
1222         (WebCore::FrameView::setContentsSize): No longer mysteriously skip the
1223         FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
1224         which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
1225         (WebCore::FrameView::adjustViewSize): Whitespace.
1226         (WebCore::FrameView::layout): Ditto.
1227         (WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
1228         change.
1229         (WebCore::FrameView::updateContentsSize): This actually does the layout.
1230         (WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
1231         will bail if not a forced update.
1232         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
1233         (WebCore::FrameView::contentsResized): Deleted.
1234         (WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
1235         (WebCore::FrameView::visibleContentsResized): Deleted.
1236         * page/FrameView.h:
1237         * platform/ScrollView.cpp:
1238         (WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
1239         (WebCore::ScrollView::setUseFixedLayout): Ditto.
1240         (WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
1241         the reason we are being called.
1242         (WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
1243         replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
1244         replace with updateContentsSize().
1245         (WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
1246         updating scrollbars, so no need to explicitly do that.
1247         (WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
1248         (WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
1249         * platform/ScrollView.h:
1250         * platform/ScrollableArea.cpp:
1251         (WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
1252         to flash the scrollbars.
1253         (WebCore::ScrollableArea::scrolledToRight):
1254         (WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
1255         scrollbar style affects available space.
1256         * platform/ScrollableArea.h:
1257         (WebCore::ScrollableArea::updateContentsSize):
1258         (WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.
1259
1260 2015-02-24  Ryosuke Niwa  <rniwa@webkit.org>
1261
1262         Unreviewed Mavericks build attempt fix after r180609.
1263
1264         * platform/graphics/mac/GraphicsContext3DMac.mm:
1265         (WebCore::GraphicsContext3D::GraphicsContext3D):
1266         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
1267
1268 2015-02-19  Roger Fong  <roger_fong@apple.com>
1269
1270         WebGL: Destroy the GLContext if a GPU restart has been detected.
1271         https://bugs.webkit.org/show_bug.cgi?id=141567.
1272         <rdar://problem/18507496>
1273
1274         Reviewed by Dean Jackson.
1275
1276         * html/canvas/WebGLRenderingContextBase.cpp:
1277         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1278         * platform/graphics/GraphicsContext3D.h:
1279         (WebCore::GraphicsContext3D::setWebGLContext): 
1280         Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
1281         * platform/graphics/mac/GraphicsContext3DMac.mm:
1282         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
1283         (WebCore::GraphicsContext3D::GraphicsContext3D): 
1284         Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
1285         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1286         (WebCore::GraphicsContext3D::forceContextLost): 
1287         Force the WebGLRenderingContext to be lost.
1288         (WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
1289         (WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
1290         * WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
1291         * platform/spi/ios/OpenGLESSPI.h: Added.
1292
1293 2015-02-24  Stephanie Lewis  <slewis@apple.com>
1294
1295         Unreviewed ios build fix after http://trac.webkit.org/changeset/180602.
1296
1297         * bindings/js/JSDOMWindowBase.cpp:
1298         (WebCore::JSDOMWindowBase::commonVM):
1299
1300 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1301
1302         Use an enum for scrollbar style
1303         https://bugs.webkit.org/show_bug.cgi?id=141985
1304
1305         Reviewed by Beth Dakin.
1306
1307         Switch to an enum class for the scrollbar style (normal or overlay).
1308
1309         * page/ChromeClient.h:
1310         * page/FrameView.cpp:
1311         (WebCore::FrameView::scrollbarStyleChanged):
1312         * page/FrameView.h:
1313         * platform/ScrollTypes.h:
1314         * platform/ScrollView.cpp:
1315         (WebCore::ScrollView::scrollbarStyleChanged):
1316         * platform/ScrollView.h:
1317         * platform/ScrollableArea.h:
1318         (WebCore::ScrollableArea::scrollbarStyleChanged):
1319         * platform/mac/ScrollAnimatorMac.mm:
1320         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1321
1322 2015-02-24  Commit Queue  <commit-queue@webkit.org>
1323
1324         Unreviewed, rolling out r180599.
1325         https://bugs.webkit.org/show_bug.cgi?id=141998
1326
1327         Lots of new test failures (Requested by smfr on #webkit).
1328
1329         Reverted changeset:
1330
1331         "Parsing support for -webkit-trailing-word"
1332         https://bugs.webkit.org/show_bug.cgi?id=141939
1333         http://trac.webkit.org/changeset/180599
1334
1335 2015-02-24  Sam Weinig  <sam@webkit.org>
1336
1337         [Attachment] Give <attachment> elements an underlying File
1338         https://bugs.webkit.org/show_bug.cgi?id=141993
1339
1340         Reviewed by Tim Horton.
1341
1342         - Add a JS subclass for attachments so that <attachment>s are
1343           instances of HTMLAttachmentElement rather than HTMLElement.
1344         - Give HTMLAttachmentElements an underlying File that they
1345           are the representation of. Expose it via a new 'file' property.
1346         - Expose a new Internals function called window.internals.createFile(url)
1347           that allows creating File objects for testing.
1348
1349         * CMakeLists.txt:
1350         * DerivedSources.cpp:
1351         * DerivedSources.make:
1352         * WebCore.vcxproj/WebCore.vcxproj:
1353         * WebCore.vcxproj/WebCore.vcxproj.filters:
1354         * WebCore.xcodeproj/project.pbxproj:
1355         * fileapi/File.h:
1356         * html/HTMLAttachmentElement.cpp:
1357         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
1358         (WebCore::HTMLAttachmentElement::file):
1359         (WebCore::HTMLAttachmentElement::setFile):
1360         * html/HTMLAttachmentElement.h:
1361         * html/HTMLAttachmentElement.idl: Added.
1362         * html/HTMLTagNames.in:
1363         * testing/Internals.cpp:
1364         (WebCore::Internals::createFile):
1365         * testing/Internals.h:
1366         * testing/Internals.idl:
1367
1368 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
1369
1370         AX: Implement support for ARIA 1.1 'switch' role
1371         https://bugs.webkit.org/show_bug.cgi?id=141986
1372
1373         Reviewed by Chris Fleizach.
1374
1375         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
1376         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
1377         widget to accessibility APIs (supports and emits notifications when
1378         toggled, doesn't have children, exposes a name and description when
1379         provided).
1380
1381         Tests: accessibility/aria-switch-checked.html
1382                accessibility/aria-switch-sends-notification.html
1383                accessibility/aria-switch-text.html
1384
1385         * accessibility/AccessibilityNodeObject.cpp:
1386         (WebCore::AccessibilityNodeObject::canHaveChildren):
1387         (WebCore::AccessibilityNodeObject::isChecked):
1388         (WebCore::AccessibilityNodeObject::visibleText):
1389         (WebCore::AccessibilityNodeObject::title):
1390         * accessibility/AccessibilityObject.cpp:
1391         (WebCore::AccessibilityObject::isARIAInput):
1392         (WebCore::AccessibilityObject::actionVerb):
1393         (WebCore::initializeRoleMap):
1394         (WebCore::AccessibilityObject::supportsChecked):
1395         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1396         * accessibility/AccessibilityObject.h:
1397         (WebCore::AccessibilityObject::isSwitch):
1398         * accessibility/atk/AXObjectCacheAtk.cpp:
1399         (WebCore::AXObjectCache::postPlatformNotification):
1400         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1401         (atkRole):
1402         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1403         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
1404         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1405         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1406         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1407         (createAccessibilityRoleMap):
1408         (-[WebAccessibilityObjectWrapper subrole]):
1409         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1410
1411 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
1412
1413         [Mac] [iOS] Parsing support for -apple-trailing-word
1414         https://bugs.webkit.org/show_bug.cgi?id=141939
1415
1416         Reviewed by Andreas Kling.
1417
1418         This patch implements initial parsing support for the -apple-trailing-word CSS property.
1419         This property has two possible (mutually exclusive) values: auto and
1420         -apple-partially-balanced. This property is inherited.
1421
1422         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
1423
1424         This is an internal property that will allow us to control line breaking behavior for
1425         short paragraphs.
1426
1427         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
1428         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
1429         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
1430         version.
1431
1432         Test: platform/mac/fast/text/trailing-word-parse.html
1433
1434         * Configurations/FeatureDefines.xcconfig:
1435         * css/CSSComputedStyleDeclaration.cpp:
1436         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
1437         CSS value.
1438         * css/CSSParser.cpp:
1439         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
1440         pair.
1441         (WebCore::isKeywordPropertyID): New property is a keyword property.
1442         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
1443         * css/CSSPrimitiveValueMappings.h:
1444         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
1445         representation and CSS values.
1446         (WebCore::CSSPrimitiveValue::operator TrailingWord):
1447         * css/CSSPropertyNames.in: New property.
1448         * css/CSSValueKeywords.in: New value.
1449         * rendering/SimpleLineLayout.cpp:
1450         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
1451         * rendering/style/RenderStyle.h: Getter, setter and initial value.
1452         * rendering/style/RenderStyleConstants.h: Internal data type.
1453         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
1454
1455 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1456
1457         Remove DecodingTask::create and DatabaseOpenTask::create
1458         https://bugs.webkit.org/show_bug.cgi?id=141966
1459
1460         Reviewed by Anders Carlsson.
1461
1462         These create() factory functions are redundant. We can use std::make_unique<> directly.
1463
1464         No new tests, no behavior changes.
1465
1466         * Modules/webaudio/AsyncAudioDecoder.cpp:
1467         (WebCore::AsyncAudioDecoder::decodeAsync):
1468         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
1469         * Modules/webaudio/AsyncAudioDecoder.h:
1470         * Modules/webdatabase/Database.cpp:
1471         (WebCore::Database::openAndVerifyVersion):
1472         * Modules/webdatabase/DatabaseTask.h:
1473         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
1474
1475 2015-02-24  Commit Queue  <commit-queue@webkit.org>
1476
1477         Unreviewed, rolling out r180578.
1478         https://bugs.webkit.org/show_bug.cgi?id=141992
1479
1480         Broke scrolling in Inspector Console. (Requested by JoePeck on
1481         #webkit).
1482
1483         Reverted changeset:
1484
1485         "[Mac] WebKit abandons overlay scrollbar CALayers."
1486         https://bugs.webkit.org/show_bug.cgi?id=141943
1487         http://trac.webkit.org/changeset/180578
1488
1489 2015-02-24  Dean Jackson  <dino@apple.com>
1490
1491         [ios Media] the inline controls are visible after pressing Done on iPhone
1492         https://bugs.webkit.org/show_bug.cgi?id=141987
1493         <rdar://problem/19944110>
1494
1495         Reviewed by Beth Dakin.
1496
1497         When exiting out of a playing video, we should show the
1498         start playback button if we don't allow inline media
1499         (such as on iPhone).
1500
1501         * Modules/mediacontrols/mediaControlsiOS.js:
1502         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
1503         allowsInline as well.
1504
1505 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1506
1507         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
1508         https://bugs.webkit.org/show_bug.cgi?id=141982
1509
1510         Reviewed by Simon Fraser.
1511
1512         There should always be a valid FillLayer.
1513
1514         No change in functionality.
1515
1516         * rendering/RenderBox.cpp:
1517         (WebCore::RenderBox::getBackgroundPaintedExtent):
1518         (WebCore::RenderBox::maskClipRect):
1519         (WebCore::RenderBox::repaintLayerRectsForImage):
1520         * rendering/RenderBoxModelObject.cpp:
1521         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1522         (WebCore::RenderBoxModelObject::calculateFillTileSize):
1523         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1524         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1525         * rendering/RenderBoxModelObject.h:
1526
1527 2015-02-24  Dean Jackson  <dino@apple.com>
1528
1529         [iOS Media] Be specific about which document to use for the timeline background canvas
1530         https://bugs.webkit.org/show_bug.cgi?id=141981
1531
1532         Reviewed by Eric Carlson.
1533
1534         In some cases, especially with nested iframes, the document
1535         reference for the shadow DOM might not be the one used
1536         to create a -webkit-canvas context for rendering via CSS.
1537         Explicitly get the context from the video's owner
1538         document.
1539
1540         There is still a bug here:
1541         https://bugs.webkit.org/show_bug.cgi?id=141983
1542
1543         * Modules/mediacontrols/mediaControlsiOS.js:
1544         (ControllerIOS.prototype.drawTimelineBackground):
1545
1546 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1547
1548         Remove unused BackgroundImageGeometry::m_destOrigin
1549         https://bugs.webkit.org/show_bug.cgi?id=141980
1550
1551         Reviewed by Simon Fraser.
1552
1553         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
1554         They are not used at all.
1555
1556         No change in functionality.
1557
1558         * rendering/RenderBoxModelObject.cpp:
1559         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1560         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
1561         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1562         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
1563         * rendering/RenderBoxModelObject.h:
1564         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
1565         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
1566         * rendering/svg/RenderSVGResourceMasker.cpp:
1567         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
1568
1569 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1570
1571         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
1572         https://bugs.webkit.org/show_bug.cgi?id=141979
1573
1574         Reviewed by Simon Fraser.
1575
1576         No change in functionality.
1577
1578         * rendering/RenderBox.cpp:
1579         (WebCore::RenderBox::getBackgroundPaintedExtent):
1580         (WebCore::RenderBox::maskClipRect):
1581         (WebCore::RenderBox::repaintLayerRectsForImage):
1582         * rendering/RenderBoxModelObject.cpp:
1583         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1584         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1585         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1586         * rendering/RenderBoxModelObject.h:
1587
1588 2015-02-24  Zalan Bujtas  <zalan@apple.com>
1589
1590         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
1591         https://bugs.webkit.org/show_bug.cgi?id=141972
1592
1593         Reviewed by Simon Fraser.
1594
1595         Image geometry's phase represents distance.
1596
1597         No change in functionality.
1598
1599         * WebCore.order:
1600         * platform/graphics/GraphicsLayer.h:
1601         (WebCore::GraphicsLayer::setContentsTilePhase):
1602         (WebCore::GraphicsLayer::contentsTilePhase):
1603         * platform/graphics/texmap/TextureMapperLayer.cpp:
1604         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
1605         (WebCore::TextureMapperLayer::setContentsTilePhase):
1606         * platform/graphics/texmap/TextureMapperLayer.h:
1607         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1608         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
1609         * rendering/RenderBoxModelObject.cpp:
1610         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1611         (WebCore::BackgroundImageGeometry::setNoRepeatX):
1612         (WebCore::BackgroundImageGeometry::setNoRepeatY):
1613         (WebCore::BackgroundImageGeometry::useFixedAttachment):
1614         (WebCore::BackgroundImageGeometry::relativePhase):
1615         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
1616         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1617         * rendering/RenderBoxModelObject.h:
1618         (WebCore::BackgroundImageGeometry::phase):
1619         (WebCore::BackgroundImageGeometry::setPhase):
1620         (WebCore::BackgroundImageGeometry::setPhaseX):
1621         (WebCore::BackgroundImageGeometry::setPhaseY):
1622         * rendering/RenderLayerBacking.cpp:
1623         (WebCore::RenderLayerBacking::resetContentsRect):
1624         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1625         * rendering/svg/RenderSVGResourceMasker.cpp:
1626         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
1627
1628 2015-02-24  Andreas Kling  <akling@apple.com>
1629
1630         [Mac] WebKit abandons overlay scrollbar CALayers.
1631         <https://webkit.org/b/141943>
1632         <rdar://problem/19932199>
1633
1634         Reviewed by Beth Dakin.
1635
1636         * platform/mac/ScrollAnimatorMac.mm:
1637         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
1638         Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
1639         The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
1640         amounts of abandoned memory to accumulate over time.
1641
1642 2015-02-24  Anders Carlsson  <andersca@apple.com>
1643
1644         Implement more of the data fetching API
1645         https://bugs.webkit.org/show_bug.cgi?id=141975
1646
1647         Reviewed by Andreas Kling.
1648
1649         Add API for getting origins in a given session that has cached data.
1650
1651         * loader/cache/MemoryCache.cpp:
1652         (WebCore::MemoryCache::originsWithCache):
1653
1654 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
1655
1656         Use nullptr in more places in FrameView, RenderView, RenderObject
1657         https://bugs.webkit.org/show_bug.cgi?id=141974
1658
1659         Reviewed by Zalan Bujtas.
1660
1661         0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.
1662         
1663         Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
1664         to make it more clear that it's a count.
1665
1666         * page/FrameView.cpp:
1667         (WebCore::FrameView::FrameView):
1668         (WebCore::FrameView::reset):
1669         (WebCore::FrameView::setContentsSize):
1670         (WebCore::FrameView::calculateScrollbarModesForLayout):
1671         (WebCore::FrameView::layerForScrolling):
1672         (WebCore::FrameView::layerForHorizontalScrollbar):
1673         (WebCore::FrameView::layerForVerticalScrollbar):
1674         (WebCore::FrameView::layerForScrollCorner):
1675         (WebCore::FrameView::tiledBacking):
1676         (WebCore::FrameView::scrollLayerID):
1677         (WebCore::FrameView::layerForOverhangAreas):
1678         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
1679         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
1680         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
1681         (WebCore::FrameView::layoutRoot):
1682         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
1683         (WebCore::FrameView::layout):
1684         (WebCore::FrameView::hostWindow):
1685         (WebCore::FrameView::scheduleRelayout):
1686         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1687         (WebCore::FrameView::needsLayout):
1688         (WebCore::FrameView::setNeedsLayout):
1689         (WebCore::FrameView::enclosingScrollableArea):
1690         (WebCore::FrameView::parentFrameView):
1691         (WebCore::FrameView::paintControlTints):
1692         (WebCore::FrameView::adjustPageHeightDeprecated):
1693         (WebCore::FrameView::axObjectCache):
1694         * page/FrameView.h:
1695         * rendering/RenderObject.cpp:
1696         (WebCore::RenderObject::RenderObject):
1697         (WebCore::RenderObject::nextInPreOrderAfterChildren):
1698         (WebCore::RenderObject::previousInPreOrder):
1699         (WebCore::RenderObject::firstLeafChild):
1700         (WebCore::RenderObject::lastLeafChild):
1701         (WebCore::RenderObject::traverseNext):
1702         (WebCore::RenderObject::firstLineBlock):
1703         (WebCore::RenderObject::containerForRepaint):
1704         (WebCore::RenderObject::showRenderSubTreeAndMark):
1705         (WebCore::RenderObject::localToAbsolute):
1706         (WebCore::RenderObject::container):
1707         * rendering/RenderObject.h:
1708         (WebCore::RenderObject::virtualContinuation):
1709         (WebCore::RenderObject::node):
1710         (WebCore::RenderObject::nonPseudoNode):
1711         (WebCore::RenderObject::localToAbsoluteQuad):
1712         (WebCore::RenderObject::absoluteQuads):
1713         (WebCore::RenderObject::absoluteClippedOverflowRect):
1714         (WebCore::RenderObject::outlineBoundsForRepaint):
1715         (WebCore::RenderObject::computeAbsoluteRepaintRect):
1716         (WebCore::RenderObject::selectionRect):
1717         (WebCore::RenderObject::imageChanged):
1718         (WebCore::RenderObject::addFocusRingRects):
1719         (WebCore::RenderObject::absoluteOutlineBounds):
1720         * rendering/RenderView.cpp:
1721         (WebCore::SelectionIterator::next):
1722         (WebCore::RenderView::RenderView):
1723         (WebCore::RenderView::mapLocalToContainer):
1724         (WebCore::RenderView::pushMappingToContainer):
1725         (WebCore::RenderView::computeRectForRepaint):
1726         (WebCore::rendererAfterPosition):
1727         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1728         (WebCore::RenderView::rootBackgroundIsEntirelyFixed):
1729         * rendering/RenderView.h:
1730
1731 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1732
1733         REGRESSION(r179429): Can't type comments in Facebook
1734         https://bugs.webkit.org/show_bug.cgi?id=141859
1735
1736         Reviewed by Brent Fulgham.
1737
1738         Enable SymbolEnabled runtime flag in inspector context.
1739
1740         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
1741         * WebCore.order:
1742         * WebCore.vcxproj/WebCore.vcxproj:
1743         * WebCore.vcxproj/WebCore.vcxproj.filters:
1744         * bindings/js/JSDOMWindowBase.cpp:
1745         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
1746         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
1747         * bindings/js/JSDOMWindowBase.h:
1748         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1749         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
1750         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
1751         * bindings/js/JSWorkerGlobalScopeBase.h:
1752         * inspector/InspectorFrontendClientLocal.cpp:
1753         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
1754         * page/Settings.h:
1755         * page/Settings.in:
1756
1757 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
1758
1759         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
1760         https://bugs.webkit.org/show_bug.cgi?id=141748
1761
1762         Reviewed by Sergio Villar Senin.
1763
1764         The first step of grid item placement algorithm has been updated in
1765         order to support both "sparse" and "dense" modes. Current code is always
1766         doing a "dense" packing in this case.
1767
1768         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
1769
1770         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
1771
1772         * rendering/RenderGrid.cpp:
1773         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
1774         for each row/column and use it to place items in the right position.
1775
1776 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
1777
1778         [GTK] Layout Test accessibility/roles-exposed.html is failing
1779         https://bugs.webkit.org/show_bug.cgi?id=141960
1780
1781         Reviewed by Martin Robinson.
1782
1783         The test was failing because Gtk now uses GtkColorChooserDialog for the
1784         color input, making the input field a button which results in the color
1785         chooser dialog appearing. As a side effect of this change, the input now
1786         has an accessible role of ColorWell, which is currently mapped to
1787         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
1788         upon activating the button input field). Changed the Gtk platform mapping
1789         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
1790
1791         No new tests. Instead, updated and unskipped failing test.
1792
1793         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1794         (atkRole):
1795
1796 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1797
1798         [GTK] Fonts loaded via @font-face look bad
1799         https://bugs.webkit.org/show_bug.cgi?id=140994
1800
1801         Reviewed by Martin Robinson.
1802
1803         We've had several complaints that woff fonts look bad on some websites. This seems to be a
1804         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
1805         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
1806         use sane default settings from Fontconfig when loading a web font, rather than accepting the
1807         default settings from GTK+, which are normally overridden by Fontconfig when loading system
1808         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
1809         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
1810         issues when fonts with poor native hinting are only tested in browsers that do not use the
1811         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
1812         bytecode interpreter.
1813
1814         The net result of this is that there should be little noticable difference if you have GTK+
1815         set to use slight hinting (which forces use of the autohinter) unless you have customized
1816         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
1817         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
1818
1819         No new tests, since the affected fonts we've found are not freely redistributable.
1820
1821         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1822         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
1823         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1824         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
1825         (WebCore::getDefaultFontconfigOptions): Added.
1826         (WebCore::FontPlatformData::initializeWithFontFace): Always call
1827         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
1828         created with an FcPattern (e.g. because this is a web font), call
1829         getDefaultFontconfigOptions to get a sane default FcPattern.
1830         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
1831         (WebCore::getDefaultFontOptions): Deleted.
1832
1833 2015-02-24  Andreas Kling  <akling@apple.com>
1834
1835         [Cocoa] Break internal reference cycle in WebCore::Font.
1836         <https://webkit.org/b/141941>
1837         <rdar://problem/19650570>
1838
1839         Reviewed by Antti Koivisto.
1840
1841         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
1842         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
1843
1844         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
1845         variant (really "this") in Font::m_derivedData->smallCaps.
1846
1847         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
1848         This stops us from accumulating tons of abandoned Font objects over time.
1849
1850         * platform/graphics/Font.cpp:
1851         (WebCore::Font::verticalRightOrientationFont):
1852         (WebCore::Font::uprightOrientationFont):
1853         (WebCore::Font::smallCapsFont):
1854         (WebCore::Font::emphasisMarkFont):
1855         (WebCore::Font::brokenIdeographFont):
1856         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
1857
1858         * platform/graphics/cocoa/FontCocoa.mm:
1859         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
1860
1861 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1862
1863         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
1864         https://bugs.webkit.org/show_bug.cgi?id=141650
1865
1866         Reviewed by Benjamin Poulain.
1867
1868         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
1869         This patch stores them as private slots in JSReadableStream.
1870         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
1871
1872         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
1873         That may be the cleanest solution, especially if other APIs express the same need.
1874         Another alternative is to store DeferredWrapper in ReadableStream objects.
1875         But it is currently preferred to keep DeferredWrapper in bindings/js code.
1876
1877         Added new constructor for DeferredWrapper to use these stored values.
1878         Updated ready and closed methods to use that new constructor.
1879         Changes are covered by new test in streams/readablestream-constructor.html.
1880
1881         * bindings/js/JSDOMPromise.cpp:
1882         (WebCore::DeferredWrapper::DeferredWrapper):
1883         * bindings/js/JSDOMPromise.h:
1884         * bindings/js/JSReadableStreamCustom.cpp:
1885         (WebCore::closedPromiseSlotName):
1886         (WebCore::getOrCreatePromiseDeferredFromObject):
1887         (WebCore::readyPromiseSlotName):
1888         (WebCore::JSReadableStream::ready):
1889         (WebCore::JSReadableStream::closed):
1890         * bindings/js/ReadableStreamJSSource.cpp:
1891         (WebCore::setInternalSlotToObject):
1892         (WebCore::getInternalSlotFromObject):
1893         * bindings/js/ReadableStreamJSSource.h:
1894
1895 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
1896
1897         Always serialize :lang()'s arguments to strings
1898         https://bugs.webkit.org/show_bug.cgi?id=141944
1899
1900         Reviewed by Benjamin Poulain.
1901
1902         As specified in [1] :lang()'s arguments are always serialized to strings.
1903
1904         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
1905
1906         Related tests are updated.
1907
1908         * css/CSSGrammar.y.in:
1909         * css/CSSParserValues.cpp:
1910         (WebCore::CSSParserSelector::setLangArgumentList):
1911         * css/CSSParserValues.h:
1912         (WebCore::CSSParserString::init):
1913         (WebCore::CSSParserString::clear):
1914         (WebCore::CSSParserString::tokenType): Deleted.
1915         (WebCore::CSSParserString::setTokenType): Deleted.
1916         * css/CSSSelector.cpp:
1917         (WebCore::appendLangArgumentList):
1918         (WebCore::CSSSelector::setLangArgumentList):
1919         * css/CSSSelector.h:
1920         (WebCore::CSSSelector::langArgumentList):
1921         * css/SelectorCheckerTestFunctions.h:
1922         (WebCore::matchesLangPseudoClass):
1923         * cssjit/SelectorCompiler.cpp:
1924         (WebCore::SelectorCompiler::addPseudoClassType):
1925         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
1926
1927 2015-02-24  Antti Koivisto  <antti@apple.com>
1928
1929        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
1930
1931         * css/StyleResolver.cpp:
1932         (WebCore::StyleResolver::loadPendingImages):
1933
1934 2015-02-23  Commit Queue  <commit-queue@webkit.org>
1935
1936         Unreviewed, rolling out r180547 and r180550.
1937         https://bugs.webkit.org/show_bug.cgi?id=141957
1938
1939         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
1940
1941         Reverted changesets:
1942
1943         "REGRESSION(r179429): Can't type comments in Facebook"
1944         https://bugs.webkit.org/show_bug.cgi?id=141859
1945         http://trac.webkit.org/changeset/180547
1946
1947         "Constructor returning null should construct an object instead
1948         of null"
1949         https://bugs.webkit.org/show_bug.cgi?id=141640
1950         http://trac.webkit.org/changeset/180550
1951
1952 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
1953
1954         Disable font loading events until our implementation gets updated to match the latest spec
1955         https://bugs.webkit.org/show_bug.cgi?id=141938
1956
1957         Reviewed by Andreas Kling.
1958
1959         Revert r173531 for now since our implementation is outdated.
1960
1961         * Configurations/FeatureDefines.xcconfig:
1962
1963 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
1964
1965         EventHandler references deleted Scrollbar
1966         https://bugs.webkit.org/show_bug.cgi?id=141931
1967         <rdar://problem/19915210>
1968
1969         Reviewed by Tim Horton.
1970
1971         Tested by scrollbars/overflow-custom-scrollbar-crash.html
1972
1973         Update the EventHandler class to use a WeakPtr to reference the
1974         last used Scrollbar, rather than retaining the Scrollbar and
1975         artificially extending its life. This keeps the EventHandler
1976         state in proper sync with the state of the render tree, and
1977         avoids cases where we have destroyed a ScrollableArea (and
1978         Scrollbar) but are still sending messages to a fake zombie
1979         version of the element.
1980
1981         * page/EventHandler.cpp:
1982         (WebCore::EventHandler::clear):
1983         (WebCore::EventHandler::handleMousePressEvent):
1984         (WebCore::EventHandler::updateMouseEventTargetNode):
1985         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
1986         * page/EventHandler.h:
1987         * platform/Scrollbar.cpp:
1988         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
1989         * platform/Scrollbar.h:
1990         (WebCore::Scrollbar::createWeakPtr): Added,
1991
1992 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
1993
1994         REGRESSION(r179429): Can't type comments in Facebook
1995         https://bugs.webkit.org/show_bug.cgi?id=141859
1996
1997         Reviewed by Geoffrey Garen.
1998
1999         Enable SymbolEnabled runtime flag in inspector context.
2000
2001         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
2002         * WebCore.order:
2003         * WebCore.vcxproj/WebCore.vcxproj:
2004         * WebCore.vcxproj/WebCore.vcxproj.filters:
2005         * bindings/js/JSDOMWindowBase.cpp:
2006         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
2007         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
2008         * bindings/js/JSDOMWindowBase.h:
2009         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2010         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
2011         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
2012         * bindings/js/JSWorkerGlobalScopeBase.h:
2013         * inspector/InspectorFrontendClientLocal.cpp:
2014         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2015         * page/Settings.h:
2016         * page/Settings.in:
2017
2018 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
2019
2020         CSS JIT: add support for case-insensitive attribute matching
2021         https://bugs.webkit.org/show_bug.cgi?id=141880
2022
2023         Reviewed by Andreas Kling.
2024
2025         The value matching now has 3 cases:
2026         1) Case-sensitive.
2027         2) Case-insensitive.
2028         3) Legacy HTML Case-insensitive.
2029
2030         The information to determine the case is split over 2 source:
2031         -To know if explicit case-insensitive is needed, we need to ask the selector
2032          for attributeValueMatchingIsCaseInsensitive().
2033         -To know if the legacy HTML behavior is needed, we need to test the attribute
2034          name filter with HTMLDocument::isCaseSensitiveAttribute().
2035
2036         I decided to perform all those checks at the fragment creation step.
2037         This makes the register requirements and code generation more explicit.
2038
2039         From there, everything is easy: switch() on the type of matching needed,
2040         and generate the code. The new case-insensitive case is a simplified version
2041         of the legacy HTML behavior without runtime check for the element type.
2042
2043         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
2044                fast/selectors/case-insensitive-attribute-register-requirement-1.html
2045                fast/selectors/case-insensitive-attribute-register-requirement-2.html
2046                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
2047
2048         * cssjit/SelectorCompiler.cpp:
2049         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
2050         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
2051         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
2052         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
2053         (WebCore::SelectorCompiler::constructFragmentsInternal):
2054         Compute the type of value matching and store it on the AttributeMatchingInfo
2055         when creating the fragment.
2056
2057         (WebCore::SelectorCompiler::minimumRegisterRequirements):
2058         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
2059         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
2060         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
2061         register. I have made an exception for generateElementAttributeValueExactMatching()
2062         for simplicity. I use that register to load the StringImpl of the attribute
2063         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
2064
2065         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
2066         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
2067         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
2068         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
2069         the behavior is consistent between XML and HTML.
2070
2071 2015-02-23  Alex Christensen  <achristensen@webkit.org>
2072
2073         [WinCairo] Unreviewed build fix after r180532
2074
2075         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2076         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
2077         Fixed typo.
2078
2079 2015-02-23  Chris Dumez  <cdumez@apple.com>
2080
2081         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
2082         https://bugs.webkit.org/show_bug.cgi?id=141922
2083         <rdar://problem/19923085>
2084
2085         Reviewed by Andreas Kling.
2086
2087         Log using diagnostic logging which ActiveDOMObjects prevent using the
2088         PageCache.
2089
2090         * history/PageCache.cpp:
2091         (WebCore::logCanCacheFrameDecision):
2092         * page/DiagnosticLoggingKeys.cpp:
2093         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
2094         * page/DiagnosticLoggingKeys.h:
2095
2096 2015-02-23  Chris Dumez  <cdumez@apple.com>
2097
2098         Move GeoNotifier class to its own file
2099         https://bugs.webkit.org/show_bug.cgi?id=141918
2100
2101         Reviewed by Andreas Kling.
2102
2103         Move GeoNotifier class to its own file to make Geolocation class less
2104         crowded.
2105
2106 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2107
2108         Remove unnecessary PlatformTimeRanges::create()
2109         https://bugs.webkit.org/show_bug.cgi?id=141901
2110
2111         Reviewed by Filip Pizlo.
2112
2113         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
2114         This functionality can be replaced with std::make_unique<> use directly.
2115
2116         No new tests, no behavior changes.
2117
2118         * Modules/mediasource/MediaSource.cpp:
2119         (WebCore::MediaSource::buffered):
2120         * Modules/mediasource/SourceBuffer.cpp:
2121         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
2122         * platform/graphics/MediaPlayer.cpp:
2123         (WebCore::NullMediaPlayerPrivate::buffered):
2124         * platform/graphics/MediaPlayerPrivate.h:
2125         (WebCore::MediaPlayerPrivateInterface::seekable):
2126         * platform/graphics/PlatformTimeRanges.cpp:
2127         (WebCore::PlatformTimeRanges::create): Deleted.
2128         * platform/graphics/PlatformTimeRanges.h:
2129         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2130         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
2131         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2132         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
2133         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2134         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
2135         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2136         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
2137         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
2138         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2139         (WebCore::MediaPlayerPrivateGStreamer::buffered):
2140         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2141         (WebCore::MediaPlayerPrivateQTKit::buffered):
2142         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2143         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
2144         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2145         (WebCore::MockMediaPlayerMediaSource::buffered):
2146
2147 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2148
2149         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
2150         https://bugs.webkit.org/show_bug.cgi?id=141888
2151
2152         Reviewed by Filip Pizlo.
2153
2154         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
2155         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
2156
2157         No new tests, no behavior changes.
2158
2159         * platform/SharedBuffer.h:
2160         * platform/Supplementable.h:
2161         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
2162         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
2163         * platform/graphics/ImageBuffer.h:
2164         * platform/graphics/TiledBackingStoreBackend.h:
2165         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2166         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2167         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2168         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2169         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2170         * platform/gtk/GamepadsGtk.cpp:
2171
2172 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
2173
2174         Default value of HTMLSelectElement size IDL attribute should be 0.
2175         https://bugs.webkit.org/show_bug.cgi?id=141795
2176
2177         Reviewed by Andreas Kling.
2178
2179         Default value of HTMLSelectElement size IDL attribute should be 0. 
2180         As in spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element, also this matches the behavior of Chrome, IE and
2181         Gecko.
2182
2183         Test: fast/dom/select-size.html
2184
2185         * html/HTMLSelectElement.cpp:
2186         (WebCore::HTMLSelectElement::parseAttribute):
2187
2188 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
2189
2190         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
2191         https://bugs.webkit.org/show_bug.cgi?id=141729.
2192
2193         Reviewed by Daniel Bates.
2194
2195         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
2196         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
2197
2198         * platform/graphics/GraphicsContext.h:
2199         (WebCore::GraphicsContext::paintingDisabled):
2200         (WebCore::GraphicsContext::updatingControlTints):
2201
2202 2015-02-22  Dean Jackson  <dino@apple.com>
2203
2204         [iOS] Max canvas size is lower than expected
2205         https://bugs.webkit.org/show_bug.cgi?id=141886
2206         <rdar://problem/19729246>
2207
2208         Reviewed by Tim Horton.
2209
2210         Use the same maximum canvas area for all ports,
2211         which bumps the iOS limit up from 4580 * 1145
2212         to 16k * 16k.
2213
2214         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
2215
2216 2015-02-23  Chris Dumez  <cdumez@apple.com>
2217
2218         Add support for diagnostic logging messages sampling
2219         https://bugs.webkit.org/show_bug.cgi?id=141823
2220         <rdar://problem/19899030>
2221
2222         Reviewed by Andreas Kling.
2223
2224         Add support for diagnostic logging messages sampling to decrease the
2225         impact of diagnostic logging on CPU usage, while still getting useful
2226         overall results. This patch adds a ShouldSample argument to
2227         logDiagnosticMessage*() functions and logs 5% of the messages when
2228         sampling. Sampling is turned on for keys that are known to be verbose
2229         (e.g. per resource load logging).
2230
2231         On the page load test I am tracking, CPU usage caused by diagnostic
2232         logging went down to 0.3% of UIProcess from 2.8% with this change.
2233
2234         * history/PageCache.cpp:
2235         (WebCore::logPageCacheFailureDiagnosticMessage):
2236         (WebCore::logCanCachePageDecision):
2237         * html/HTMLMediaElement.cpp:
2238         (WebCore::HTMLMediaElement::parseAttribute):
2239         * loader/EmptyClients.h:
2240         * loader/FrameLoader.cpp:
2241         (WebCore::logNavigation):
2242         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2243         * loader/ResourceLoader.cpp:
2244         (WebCore::logResourceResponseSource):
2245         * loader/SubframeLoader.cpp:
2246         (WebCore::logPluginRequest):
2247         * loader/SubresourceLoader.cpp:
2248         (WebCore::SubresourceLoader::willSendRequest):
2249         (WebCore::SubresourceLoader::didReceiveResponse):
2250         (WebCore::logResourceLoaded):
2251         * loader/cache/CachedResource.cpp:
2252         (WebCore::logResourceRevalidationReason):
2253         * loader/cache/CachedResourceLoader.cpp:
2254         (WebCore::logMemoryCacheResourceRequest):
2255         * page/DiagnosticLoggingClient.h:
2256
2257 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
2258
2259         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
2260         https://bugs.webkit.org/show_bug.cgi?id=141729.
2261
2262         Reviewed by Simon Fraser.
2263
2264         When drawing an SVG image and the drawing context is set to be transparent,
2265         make sure this transparency is applied to the compositing layer.
2266
2267         Test: svg/canvas/canvas-global-alpha-svg.html
2268
2269         * platform/graphics/GraphicsContext.cpp:
2270         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
2271         function and sets 'm_state.alpha' to the input value.
2272
2273         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
2274         returns the value of the global alpha.
2275         
2276         * platform/graphics/GraphicsContext.h:
2277         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
2278         'alpha' to the context state since the getter function CGContextGetAlpha
2279         is defined only in a private header file. Also move single line functions
2280         from the source file to the header file.
2281     
2282         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2283         (WebCore::GraphicsContext::setPlatformAlpha):
2284         (WebCore::GraphicsContext::setAlpha): Deleted.
2285         * platform/graphics/cg/GraphicsContextCG.cpp:
2286         (WebCore::GraphicsContext::setPlatformAlpha):
2287         (WebCore::GraphicsContext::setAlpha): Deleted.
2288         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
2289         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
2290         setPlatformAlpha().
2291     
2292         * svg/graphics/SVGImage.cpp:
2293         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
2294         global alpha value to the compositing layer.
2295         
2296 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
2297
2298         Occasional crash in MediaPlayer::setPrivateBrowsingMode
2299         https://bugs.webkit.org/show_bug.cgi?id=141910
2300
2301         Reviewed by Jer Noble.
2302
2303         No new tests, I was unable to reproduce the crash.
2304
2305         * html/HTMLMediaElement.cpp:
2306         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
2307         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
2308             to NULL.
2309         * html/HTMLMediaElement.h: Define EveryDelayedAction.
2310
2311 2015-02-23  Philippe Normand  <pnormand@igalia.com>
2312
2313         [GStreamer] Redundant track language notifications
2314         https://bugs.webkit.org/show_bug.cgi?id=141908
2315
2316         Reviewed by Žan Doberšek.
2317
2318         Invoke languageChanged only if the language code actually
2319         changed.
2320
2321         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2322         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
2323
2324 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
2325
2326         [WinCairo] Crash when media player is destroyed.
2327         https://bugs.webkit.org/show_bug.cgi?id=141248
2328
2329         Reviewed by Darin Adler.
2330
2331         A COM smart pointer is both released, and set to null.
2332         This means that the COM Release method is called twice, causing a crash.
2333
2334         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2335         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
2336
2337 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
2338
2339         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
2340         https://bugs.webkit.org/show_bug.cgi?id=141899
2341
2342         Reviewed by Sergio Villar Senin.
2343
2344         There was a FIXME about not re-resolving positions if the grid is grown during
2345         auto-placement. But as the spec has changed [1] and you can only refer to the
2346         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
2347         we can get rid of this FIXME as it's not a causing a problem anymore.
2348
2349         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
2350
2351         No new tests (no change in behavior).
2352
2353         * rendering/RenderGrid.cpp:
2354         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
2355
2356 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2357
2358         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
2359         https://bugs.webkit.org/show_bug.cgi?id=137877
2360
2361         Reviewed by Sam Weinig.
2362
2363         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
2364         change OwnPtr with std::unique_ptr<>|make_unique<>.
2365
2366         No new tests, no behavior changes.
2367
2368         * page/scrolling/AsyncScrollingCoordinator.h:
2369         * page/scrolling/ScrollingStateFixedNode.cpp:
2370         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2371         * page/scrolling/ScrollingStateNode.cpp:
2372         (WebCore::ScrollingStateNode::appendChild):
2373         * page/scrolling/ScrollingStateNode.h:
2374         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
2375         * page/scrolling/ScrollingStateScrollingNode.cpp:
2376         * page/scrolling/ScrollingStateStickyNode.cpp:
2377         * page/scrolling/ScrollingTree.h:
2378         * page/scrolling/ScrollingTreeNode.cpp:
2379         (WebCore::ScrollingTreeNode::appendChild):
2380         * page/scrolling/ScrollingTreeNode.h:
2381         * page/scrolling/ScrollingTreeScrollingNode.h:
2382
2383 2015-02-22  Dean Jackson  <dino@apple.com>
2384
2385         Print a console warning when HTMLCanvasElement exceeds the maximum size
2386         https://bugs.webkit.org/show_bug.cgi?id=141861
2387         <rdar://problem/19729145>
2388
2389         Reviewed by Simon Fraser.
2390
2391         Add a warning if we ever try to create a canvas that is
2392         too big.
2393
2394         No test because:
2395         1. We can't ref-test against console messages.
2396         2. The output is platform specific.
2397
2398         * html/HTMLCanvasElement.cpp:
2399         (WebCore::HTMLCanvasElement::createImageBuffer):
2400
2401 2015-02-21  Sam Weinig  <sam@webkit.org>
2402
2403         Convert the caps lock indicator to be implemented using the shadow DOM
2404         https://bugs.webkit.org/show_bug.cgi?id=141868
2405
2406         Reviewed by Dan Bernstein.
2407
2408         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
2409           in r74099 to work around a site bug, that should not be a problem anymore.
2410         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
2411           than a paint time effect. This gives the proper overflow behavior (it now clips) and
2412           behaves correctly in RTL.
2413
2414         * css/CSSParser.cpp:
2415         (WebCore::isValidKeywordPropertyAndValue):
2416         Make 'caps-lock-indicator' a valid -webkit-appearance value.
2417
2418         * css/CSSValueKeywords.in:
2419         Remove comment that indicated that caps-lock-indicator was not a valid
2420         -webkit-appearance value.
2421
2422         * css/html.css:
2423         (input::-webkit-caps-lock-indicator):
2424         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
2425         trick employed here is to use a content: image to both implement the painting of
2426         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
2427
2428         * html/HTMLInputElement.cpp:
2429         (WebCore::HTMLInputElement::capsLockIndicatorElement):
2430         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
2431         * html/HTMLInputElement.h:
2432         * html/InputType.cpp:
2433         (WebCore::InputType::capsLockStateMayHaveChanged):
2434         * html/InputType.h:
2435         (WebCore::InputType::capsLockIndicatorElement):
2436         Pipe notification of changes in the caps locks state to the <input> element
2437         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
2438         lock indicator element in the shadow DOM.
2439
2440         * html/TextFieldInputType.cpp:
2441         (WebCore::TextFieldInputType::forwardEvent):
2442         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
2443         (WebCore::TextFieldInputType::createShadowSubtree):
2444         (WebCore::TextFieldInputType::capsLockIndicatorElement):
2445         (WebCore::TextFieldInputType::destroyShadowSubtree):
2446         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
2447         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
2448         * html/TextFieldInputType.h:
2449         Add a new element to the text field shadow DOM to act as the caps lock indicator.
2450         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
2451         from CSS. The element is always in the DOM for a password field. It toggles between
2452         display: none and display: block depending on the state of the caps lock key.
2453
2454         * page/EventHandler.cpp:
2455         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2456         Pipe notification of changes in the caps locks state to the <input> element
2457         rather than the RenderTextControlSingleLine.
2458
2459         * rendering/RenderTextControlSingleLine.cpp:
2460         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2461         (WebCore::RenderTextControlSingleLine::paint): Deleted.
2462         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
2463         * rendering/RenderTextControlSingleLine.h:
2464         Remove logic for drawing the caps lock indicator.
2465
2466         * rendering/RenderTheme.cpp:
2467         (WebCore::RenderTheme::adjustStyle):
2468         (WebCore::RenderTheme::paint):
2469         (WebCore::RenderTheme::paintMeter):
2470         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
2471         (WebCore::RenderTheme::paintCapsLockIndicator):
2472         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
2473         * rendering/RenderTheme.h:
2474         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
2475         * rendering/RenderThemeIOS.h:
2476         * rendering/RenderThemeIOS.mm:
2477         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
2478         * rendering/RenderThemeMac.h:
2479         * rendering/RenderThemeMac.mm:
2480         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
2481         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
2482         Now that the caps lock indicator is implemented like other aspects of form controls,
2483         the theme code can be converted to be similar as well.
2484
2485 2015-02-21  David Kilzer  <ddkilzer@apple.com>
2486
2487         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
2488         <http://webkit.org/b/141816>
2489
2490         Attempt to fix the following build failure:
2491
2492             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
2493             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
2494             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2495             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2496             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
2497             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
2498             <scratch space>:58:1: note: expanded from here
2499             CoreMediaLibrary
2500             ^~~~~~~~~~~~~~~~
2501             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2502             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
2503             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
2504             ^
2505             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2506             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
2507             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
2508             <scratch space>:42:1: note: expanded from here
2509             CoreMediaLibrary
2510             ^
2511             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
2512             SOFT_LINK_FRAMEWORK(CoreMedia)
2513             ^
2514             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
2515             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
2516             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
2517             <scratch space>:51:1: note: expanded from here
2518             CoreMediaLibrary
2519             ^
2520
2521         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
2522         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
2523         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
2524         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
2525
2526 2015-02-21  David Kilzer  <ddkilzer@apple.com>
2527
2528         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
2529         <http://webkit.org/b/141816>
2530
2531         Reviewed by Alexey Proskuryakov.
2532
2533         * WebCore.vcxproj/WebCore.vcxproj:
2534         * WebCore.vcxproj/WebCore.vcxproj.filters:
2535         - Remove CoreMediaSoftLinking.h.
2536
2537         * platform/cf/CoreMediaSoftLink.cpp:
2538         - Add kCMTimeZero constant.
2539         * platform/cf/CoreMediaSoftLink.h:
2540         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
2541         - Add kCMTimeZero constant.
2542
2543         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
2544
2545         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2546         - Remove reference to CoreMediaSoftLinking.h and update comment.
2547         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
2548         - Switch to using new method to check if a framework is
2549           available.
2550
2551         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2552         - Remove all local soft-linking macros for CoreMedia.
2553           CoreMediaSoftLink.h handles everything now.
2554         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
2555         - Switch to using new method to check if a framework is
2556           available.
2557
2558         * platform/mac/SoftLinking.h:
2559         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
2560         is_Name_FrameworkAvailable() macro.
2561         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
2562         optional framework checks without a separate macro.
2563         (SOFT_LINK_CONSTANT_HEADER): Add.
2564         (SOFT_LINK_CONSTANT_SOURCE): Add.
2565         - Support soft-links to constants.
2566
2567         * platform/win/SoftLinking.h:
2568         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
2569         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
2570         non-static function.
2571         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
2572         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
2573         SOFT_LINK_DEBUG_LIBRARY.
2574         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
2575         is_Name_FrameworkAvailable() macro.
2576         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
2577         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
2578         (SOFT_LINK_CONSTANT_HEADER): Add.
2579         (SOFT_LINK_CONSTANT_SOURCE): Add.
2580         - Support soft-links to constants.
2581
2582 2015-02-20  David Kilzer  <ddkilzer@apple.com>
2583
2584         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
2585         <http://webkit.org/b/141849>
2586
2587         Reviewed by Brent Fulgham.
2588
2589         This patch does the following:
2590         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
2591           macros for reuse in other projects.
2592         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
2593           141816.
2594         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
2595           and includes framework name in generated function names.  This
2596           adds more entropy to the names in case there are two functions
2597           with the same name in different frameworks.
2598
2599         * platform/cf/CoreMediaSoftLink.cpp:
2600         - Add FIXME about USE(COREMEDIA).
2601         - Switch from SOFT_LINK_FRAMEWORK() to
2602           SOFT_LINK_FRAMEWORK_SOURCE().
2603         * platform/cf/CoreMediaSoftLink.h:
2604         - Add FIXME about USE(COREMEDIA).
2605         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
2606           macros.
2607
2608         * platform/mac/SoftLinking.h:
2609         - Add missing header guards.
2610         - Add pragmas for different macro groups.
2611         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
2612         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
2613         (SOFT_LINK_FUNCTION_SOURCE): Move.
2614         - Add framework name to generated function names.
2615         - Incorporates namespace so that it doesn't have to be listed in
2616           the *SoftLink.{cpp,h} file.
2617
2618         * platform/win/SoftLinking.h:
2619         - Add pragmas for different macro groups.
2620         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
2621         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
2622         (SOFT_LINK_FUNCTION_SOURCE): Move.
2623         - Add framework name to generated function names.
2624         - Incorporates namespace so that it doesn't have to be listed in
2625           the *SoftLink.{cpp,h} file.
2626
2627 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
2628
2629         [Gtk] Unreviewed build fix.
2630
2631         * platform/ScrollAnimatorNone.cpp:
2632         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
2633         uses of ScrollableArea.
2634
2635 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
2636
2637         Scrollbars and ScrollAnimators must always have a ScrollableArea
2638         https://bugs.webkit.org/show_bug.cgi?id=141855
2639
2640         Reviewed by Simon Fraser.
2641
2642         No change in functionality.
2643         
2644         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
2645         a number of unnecessary nullptr checks.
2646
2647         * accessibility/AccessibilityScrollbar.cpp:
2648         (WebCore::AccessibilityScrollbar::setValue):
2649         * css/SelectorCheckerTestFunctions.h:
2650         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
2651         * page/FrameView.cpp:
2652         (WebCore::FrameView::createScrollbar):
2653         (WebCore::FrameView::setFixedVisibleContentRect):
2654         * page/scrolling/ScrollingCoordinator.cpp:
2655         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
2656         * platform/PopupMenuClient.h:
2657         * platform/ScrollAnimator.cpp:
2658         (WebCore::ScrollAnimator::ScrollAnimator):
2659         (WebCore::ScrollAnimator::scroll):
2660         (WebCore::ScrollAnimator::handleWheelEvent):
2661         (WebCore::ScrollAnimator::notifyPositionChanged):
2662         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
2663         * platform/ScrollAnimator.h:
2664         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
2665         * platform/ScrollAnimatorNone.cpp:
2666         * platform/ScrollAnimatorNone.h:
2667         * platform/ScrollView.cpp:
2668         (WebCore::ScrollView::createScrollbar):
2669         * platform/ScrollableArea.cpp:
2670         (WebCore::ScrollableArea::scrollAnimator):
2671         (WebCore::ScrollableArea::scroll):
2672         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
2673         (WebCore::ScrollableArea::notifyScrollPositionChanged):
2674         (WebCore::ScrollableArea::scrollPositionChanged):
2675         (WebCore::ScrollableArea::handleWheelEvent):
2676         (WebCore::ScrollableArea::handleTouchEvent):
2677         (WebCore::ScrollableArea::mouseEnteredScrollbar):
2678         (WebCore::ScrollableArea::mouseExitedScrollbar):
2679         (WebCore::ScrollableArea::didAddScrollbar):
2680         (WebCore::ScrollableArea::willRemoveScrollbar):
2681         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
2682         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
2683         * platform/ScrollableArea.h:
2684         * platform/Scrollbar.cpp:
2685         (WebCore::Scrollbar::createNativeScrollbar):
2686         (WebCore::Scrollbar::Scrollbar):
2687         (WebCore::Scrollbar::scrollbarOverlayStyle):
2688         (WebCore::Scrollbar::isScrollableAreaActive):
2689         (WebCore::Scrollbar::offsetDidChange):
2690         (WebCore::Scrollbar::autoscrollPressedPart):
2691         (WebCore::Scrollbar::moveThumb):
2692         (WebCore::Scrollbar::mouseMoved):
2693         (WebCore::Scrollbar::mouseEntered):
2694         (WebCore::Scrollbar::mouseExited):
2695         (WebCore::Scrollbar::mouseUp):
2696         (WebCore::Scrollbar::shouldParticipateInHitTesting):
2697         (WebCore::Scrollbar::isWindowActive):
2698         (WebCore::Scrollbar::invalidateRect):
2699         (WebCore::Scrollbar::convertToContainingView):
2700         (WebCore::Scrollbar::convertFromContainingView):
2701         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2702         * platform/Scrollbar.h:
2703         (WebCore::Scrollbar::scrollableArea):
2704         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
2705         * platform/ios/ScrollAnimatorIOS.mm:
2706         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
2707         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
2708         * platform/mac/ScrollAnimatorMac.h:
2709         * platform/mac/ScrollAnimatorMac.mm:
2710         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
2711         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
2712         (-[WebScrollbarPainterDelegate scrollAnimator]):
2713         (-[WebScrollbarPainterDelegate layer]):
2714         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
2715         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
2716         (WebCore::ScrollAnimator::create):
2717         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2718         (WebCore::ScrollAnimatorMac::scroll):
2719         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
2720         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
2721         (WebCore::ScrollAnimatorMac::immediateScrollTo):
2722         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2723         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2724         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
2725         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
2726         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
2727         (WebCore::ScrollAnimatorMac::pinnedInDirection):
2728         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
2729         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
2730         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
2731         (WebCore::ScrollAnimatorMac::stretchAmount):
2732         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
2733         (WebCore::ScrollAnimatorMac::canScrollVertically):
2734         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
2735         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
2736         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2737         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
2738         * rendering/RenderLayer.cpp:
2739         (WebCore::RenderLayer::RenderLayer):
2740         (WebCore::RenderLayer::createScrollbar):
2741         (WebCore::RenderLayer::destroyScrollbar):
2742         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2743         * rendering/RenderListBox.cpp:
2744         (WebCore::RenderListBox::createScrollbar):
2745         (WebCore::RenderListBox::destroyScrollbar):
2746         * rendering/RenderMenuList.cpp:
2747         (RenderMenuList::createScrollbar):
2748         * rendering/RenderMenuList.h:
2749         * rendering/RenderScrollbar.cpp:
2750         (WebCore::RenderScrollbar::createCustomScrollbar):
2751         (WebCore::RenderScrollbar::RenderScrollbar):
2752         * rendering/RenderScrollbar.h:
2753         * rendering/RenderSearchField.cpp:
2754         (WebCore::RenderSearchField::createScrollbar):
2755         * rendering/RenderSearchField.h:
2756
2757 2015-02-20  Enrica Casucci  <enrica@apple.com>
2758
2759         [WK2] Add support for font panel on OS X.
2760         https://bugs.webkit.org/show_bug.cgi?id=141777
2761
2762         Reviewed by Tim Horton.
2763
2764         This patch adds the necessary hooks to the Editor class to support
2765         the font panel.
2766
2767         * editing/Editor.h:
2768         * editing/mac/EditorMac.mm:
2769         (WebCore::Editor::applyFontStyles):
2770
2771 2015-02-20  Zalan Bujtas  <zalan@apple.com>
2772
2773         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
2774         https://bugs.webkit.org/show_bug.cgi?id=141854
2775
2776         Reviewed by Ryosuke Niwa.
2777
2778         Inserting content before/after the body as the result of editing is a valid operation.
2779         This assert was originally introduced to cover cases where edited content would get moved
2780         out of body. However, asserting such operation properly is not possible atm.
2781
2782         Test: editing/inserting/insert-as-body-sibling.html
2783
2784         * editing/CompositeEditCommand.cpp:
2785         (WebCore::CompositeEditCommand::insertNodeBefore):
2786         (WebCore::CompositeEditCommand::insertNodeAfter):
2787
2788 2015-02-20  Chris Dumez  <cdumez@apple.com>
2789
2790         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
2791         https://bugs.webkit.org/show_bug.cgi?id=141803
2792         <rdar://problem/19632080>
2793
2794         Reviewed by Antti Koivisto.
2795
2796         Add more diagnostic logging keys for the network cache.
2797
2798         * page/DiagnosticLoggingKeys.cpp:
2799         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
2800         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
2801         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
2802         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
2803         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
2804         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
2805         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
2806         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
2807         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
2808         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
2809         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
2810         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
2811         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
2812         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
2813         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
2814         * page/DiagnosticLoggingKeys.h:
2815
2816 2015-02-20  Tim Horton  <timothy_horton@apple.com>
2817
2818         <attachment> turns the wrong blue when you highlight it
2819         https://bugs.webkit.org/show_bug.cgi?id=141853
2820
2821         Reviewed by Simon Fraser.
2822
2823         * rendering/RenderAttachment.h:
2824         * rendering/RenderReplaced.cpp:
2825         (WebCore::RenderReplaced::shouldDrawSelectionTint):
2826         (WebCore::RenderReplaced::paint):
2827         * rendering/RenderReplaced.h:
2828         Don't draw the selection tint for RenderAttachment.
2829
2830 2015-02-20  Tim Horton  <timothy_horton@apple.com>
2831
2832         Allow <attachment> elements to be focused
2833         https://bugs.webkit.org/show_bug.cgi?id=141847
2834
2835         Reviewed by Enrica Casucci.
2836
2837         * css/html.css:
2838         (attachment:focus):
2839         Disable focus rings for <attachment>.
2840
2841         * html/HTMLAttachmentElement.cpp:
2842         (WebCore::HTMLAttachmentElement::setFocus):
2843         * html/HTMLAttachmentElement.h:
2844         Allow HTMLAttachmentElement to get editing focus.
2845         Let RenderAttachment know when focus changes.
2846
2847         * rendering/RenderAttachment.cpp:
2848         (WebCore::RenderAttachment::paintReplaced):
2849         Paint the background in cyan when we are inside the selection or have focus.
2850         Otherwise, it will be gray.
2851
2852         (WebCore::RenderAttachment::focusChanged):
2853         When focus changes, repaint.
2854
2855         * rendering/RenderAttachment.h:
2856
2857 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
2858
2859         Rename ScrollElasticityController to ScrollController
2860         https://bugs.webkit.org/show_bug.cgi?id=141842
2861
2862         Reviewed by Simon Fraser.
2863
2864         No change in functionality.
2865
2866         * PlatformMac.cmake:
2867         * WebCore.order:
2868         * WebCore.xcodeproj/project.pbxproj:
2869         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2870         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2871         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2872         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
2873         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
2874         * platform/mac/ScrollAnimatorMac.h:
2875         * platform/mac/ScrollAnimatorMac.mm:
2876         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2877         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
2878         (WebCore::ScrollAnimatorMac::handleWheelEvent):
2879         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2880         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
2881         (WebCore::ScrollControllerClient::~ScrollControllerClient):
2882         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
2883         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
2884         (WebCore::ScrollController::ScrollController):
2885         (WebCore::ScrollController::handleWheelEvent):
2886         (WebCore::ScrollController::snapRubberBandTimerFired):
2887         (WebCore::ScrollController::isRubberBandInProgress):
2888         (WebCore::ScrollController::stopSnapRubberbandTimer):
2889         (WebCore::ScrollController::snapRubberBand):
2890         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
2891         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
2892         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
2893         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
2894         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
2895         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
2896         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
2897         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
2898         * platform/mac/ScrollElasticityController.h: Removed.
2899         * platform/mac/ScrollElasticityController.mm: Removed.
2900
2901 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
2902
2903         Remove svn:keywords property.
2904
2905         As far as I can tell, the property had no effect on any of these files, but also,
2906         when it has effect it's likely harmful.
2907
2908         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
2909         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
2910         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
2911         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
2912         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
2913         * css/CSSKeyframeRule.h: Removed property svn:keywords.
2914         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
2915         * css/CSSKeyframesRule.h: Removed property svn:keywords.
2916         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
2917         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
2918         * css/plugIns.css: Removed property svn:keywords.
2919         * dom/AnimationEvent.cpp: Removed property svn:keywords.
2920         * dom/AnimationEvent.h: Removed property svn:keywords.
2921         * dom/DeviceMotionClient.h: Removed property svn:keywords.
2922         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
2923         * dom/DeviceMotionController.h: Removed property svn:keywords.
2924         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
2925         * dom/DeviceMotionData.h: Removed property svn:keywords.
2926         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
2927         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
2928         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
2929         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
2930         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
2931         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
2932         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
2933         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
2934         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
2935         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
2936         * page/Frame.h: Removed property svn:keywords.
2937         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
2938         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
2939         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
2940         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
2941         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
2942         * platform/ControlStates.h: Removed property svn:keywords.
2943         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
2944         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
2945         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
2946         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
2947         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
2948         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
2949         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
2950         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
2951         * platform/ios/SystemMemory.h: Removed property svn:keywords.
2952         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
2953         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
2954         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
2955         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
2956         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
2957         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
2958         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
2959         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
2960         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
2961         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
2962         * rendering/TextAutoSizing.h: Removed property svn:keywords.
2963         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
2964
2965 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
2966
2967         [Mac] REGRESSION: Scroll snap points broken after r180018
2968         https://bugs.webkit.org/show_bug.cgi?id=141821
2969         <rdar://problem/19898333>
2970
2971         Reviewed by Simon Fraser.
2972
2973         * page/EventHandler.cpp:
2974         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added stub.
2975         (WebCore::EventHandler::handleWheelEvent): Call new 'platformNotifySnapIfNecessary' method
2976         to catch the 'ended wheel' gesture.
2977         * page/EventHandler.h:
2978         * page/mac/EventHandlerMac.mm:
2979         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added. If the wheel event signifies
2980         the end of a wheel/swipe gesture, let the snap logic decide if it should do anything
2981         (i.e., trigger an animation)
2982         * platform/ScrollAnimator.cpp:
2983         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Added.
2984         * platform/ScrollAnimator.h:
2985
2986 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
2987
2988         [iOS] cleanup AirPlay code
2989         https://bugs.webkit.org/show_bug.cgi?id=141811
2990
2991         Reviewed by Jer Noble.
2992
2993         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
2994
2995         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
2996         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
2997         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
2998
2999         * Modules/mediacontrols/MediaControlsHost.cpp:
3000         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
3001         (WebCore::MediaControlsHost::externalDeviceType):
3002
3003         * dom/EventNames.h: Ditto.
3004         * dom/EventNames.in:
3005
3006         * html/HTMLMediaElement.cpp:
3007         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
3008         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
3009         (WebCore::HTMLMediaElement::parseAttribute):
3010         * html/HTMLMediaElement.h:
3011         * html/HTMLMediaElement.idl:
3012
3013         * html/HTMLMediaSession.cpp:
3014         (WebCore::restrictionName): Ditto.
3015         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
3016         * html/HTMLMediaSession.h:
3017
3018         * html/HTMLVideoElement.cpp:
3019         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
3020         * html/HTMLVideoElement.h:
3021         * html/HTMLVideoElement.idl:
3022
3023         * page/Settings.in: Ditto.
3024
3025         * platform/audio/MediaSessionManager.h:
3026         * platform/audio/ios/MediaSessionManagerIOS.h:
3027         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
3028
3029         * platform/graphics/MediaPlayer.cpp:
3030         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
3031         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
3032         * platform/graphics/MediaPlayer.h:
3033         * platform/graphics/MediaPlayerPrivate.h:
3034         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
3035         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
3036         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3037         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
3038         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
3039
3040         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3041         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3042         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3043         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
3044         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
3045         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
3046         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
3047         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
3048
3049 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
3050
3051         Language ranges containing asterisks must be quoted as strings
3052         https://bugs.webkit.org/show_bug.cgi?id=141659
3053
3054         Reviewed by Benjamin Poulain.
3055
3056         As specified in [1], the language ranges containing asterisks must be quoted as strings.
3057
3058         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
3059
3060         * css/CSSGrammar.y.in:
3061         * css/CSSParser.cpp:
3062         (WebCore::CSSParser::realLex):
3063
3064 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3065
3066         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
3067         https://bugs.webkit.org/show_bug.cgi?id=137765
3068
3069         Reviewed by Ryosuke Niwa.
3070
3071         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
3072         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
3073         used in registerMediaEngine().
3074
3075         No new tests, no behavior changes.
3076
3077         * WebCore.exp.in:
3078         * html/HTMLMediaElement.cpp:
3079         (WebCore::HTMLMediaElement::parseAttribute):
3080         * html/HTMLMediaElement.h:
3081         * platform/graphics/MediaPlayer.cpp:
3082         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
3083         (WebCore::MediaPlayer::MediaPlayer):
3084         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3085         (WebCore::createNullMediaPlayer): Deleted.
3086         * platform/graphics/MediaPlayer.h:
3087         (WebCore::MediaPlayer::create): Deleted.
3088         * platform/graphics/MediaPlayerPrivate.h:
3089         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3090         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3091         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
3092         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
3093         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3094         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3095         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3096         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
3097         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
3098         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3099         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3100         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
3101         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
3102         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3103         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
3104         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
3105         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3106         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3107         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3108         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
3109         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
3110         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3111         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
3112         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
3113         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3114         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3115         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
3116         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
3117         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3118
3119 2015-02-19  David Kilzer  <ddkilzer@apple.com>
3120
3121         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
3122
3123         Rubber-stamped by Brent Fulgham.
3124
3125         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
3126         Brent agreed when I talked to him in person.
3127
3128         * platform/cf/CoreMediaSoftLink.cpp:
3129         * platform/cf/CoreMediaSoftLink.h:
3130         * platform/mac/SoftLinking.h:
3131         * platform/win/SoftLinking.h:
3132         - Do the rename.
3133
3134 2015-02-19  David Kilzer  <ddkilzer@apple.com>
3135
3136         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
3137         <http://webkit.org/b/141791>
3138
3139         Reviewed by Alexey Proskuryakov.
3140
3141         * Configurations/WebCore.unexp:
3142         - Remove five more symbols.
3143
3144         * Modules/plugins/QuickTimePluginReplacement.mm:
3145         - Remove all local soft-links and include CoreMediaSoftLink.h.
3146           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
3147           used here since we didn't use the optional function soft-link
3148           method.
3149
3150         * WebCore.vcxproj/WebCore.vcxproj.filters:
3151         * WebCore.vcxproj/WebCoreCFNetwork.props:
3152         * WebCore.xcodeproj/project.pbxproj:
3153         - Add CoreMediaSPI.h to the project.
3154
3155         * platform/cf/CoreMediaSoftLink.cpp:
3156         * platform/cf/CoreMediaSoftLink.h:
3157         - Add three cross-platform symbols, five Cocoa-only symbols, and
3158           two Windows-only symbols (based on current usage, not
3159           availability on each platform).
3160         - Include CoreMediaSPI.h header.
3161         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
3162
3163         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3164         - Remove all CoreMedia soft-linked functions.  Constants remain.
3165
3166         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3167         - Remove one CoreMedia soft-linked method.
3168
3169         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
3170         - Remove all CoreMedia soft-linked funtions.  With this change,
3171           we are already realizing space savings for duplicate
3172           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
3173           generated for many unused functions included by
3174           CoreMediaSoftLinking.h.)
3175
3176         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
3177         - Remove all CoreMedia soft-linked funtions.  Constants remain.
3178
3179         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3180         - Remove duplicate header included by CoreMediaSoftLink.h.
3181
3182         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3183         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3184         - Remove all CoreMedia soft-linked funtions.  Constants remain.
3185
3186         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3187         - Remove three CoreMedia soft-linked methods.
3188
3189         * platform/mac/PlatformClockCM.mm:
3190         - Remove two CoreMedia soft-linked methods.
3191
3192         * platform/mac/SerializedPlatformRepresentationMac.mm:
3193         - Remove only CoreMedia soft-linked funtion.  It wasn't even
3194           used.
3195
3196         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3197         - Remove two CoreMedia soft-linked method.
3198
3199         * platform/spi/cf/CoreMediaSPI.h:
3200         - Add for SPI from CMNotificationCenter.h.
3201
3202 2015-02-19  David Hyatt  <hyatt@apple.com>
3203
3204         Columns are splitting unsplittable content.
3205         https://bugs.webkit.org/show_bug.cgi?id=141807
3206         <rdar://problem/18387659>
3207
3208         Reviewed by Dean Jackson.
3209
3210         Added inline-table-dynamic-movement.html
3211
3212         * rendering/RenderBlockFlow.cpp:
3213         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
3214         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
3215         Patch these functions to always check the layout state for a zero
3216         pageLogicalHeight, since that is actually our indicator that we're
3217         doing column balancing and don't have a height set yet.
3218
3219         * rendering/RenderMultiColumnFlowThread.cpp:
3220         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
3221         * rendering/RenderMultiColumnSet.cpp:
3222         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3223         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
3224         (WebCore::RenderMultiColumnSet::prepareForLayout):
3225         * rendering/RenderMultiColumnSet.h:
3226         The function for deciding whether the logical height of the columns was
3227         known was checking for a zero computedColumnHeight. However, a column set
3228         can legitimately compute a zero column height, and with the fix to examine
3229         the layout state, this bug was exposed.
3230
3231         The fix is to add a new variable that caches whether or not the column height
3232         has been computed, so that even if it computes to zero, we aren't fooled.
3233
3234 2015-02-19  Chris Dumez  <cdumez@apple.com>
3235
3236         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
3237         https://bugs.webkit.org/show_bug.cgi?id=141744
3238
3239         Reviewed by Alexey Proskuryakov.
3240
3241         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
3242         implementation, similarly to what was already done for Mac in:
3243         <http://trac.webkit.org/changeset/174717>
3244
3245         The following changes were made:
3246         - Add missing "initLevel == AllFields" check before initializing
3247           uncommon fields. This bug was causing us to initialize uncommon
3248           fields even if called with 'CommonFieldsOnly' initLevel.
3249         - Bypass the first pass populating common HTTP headers in
3250           m_httpHeaderFields if the initLevel is AllFields. If called
3251           with AllFields initLevel, we will end up populating all HTTP
3252           headers later on so this first pass is redundant.
3253         - Use C++11 range loop to iterator over commonHeaderFields array
3254           for readability.
3255         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
3256           for the CFDictionaryRef containing the headers instead of creating
3257           copies of keys and values using CFDictionaryGetKeysAndValues() and
3258           then iterating over those. This avoids allocating Vectors for keys /
3259           values and avoids unnecessary copying.
3260
3261
3262 2015-02-18  Dean Jackson  <dino@apple.com>
3263
3264         Sufficiently small media controls should remove toolbar elements
3265         https://bugs.webkit.org/show_bug.cgi?id=141780
3266         <rdar://problem/16548548>
3267         <rdar://problem/17598778>
3268         <rdar://problem/18351963>
3269
3270         Reviewed by Eric Carlson.
3271
3272         Implement some logic where elements on the media controls are
3273         hidden when there isn't enough room. We start by dropping
3274         the scrubber, then the various buttons on the right hand
3275         side.
3276
3277         This solution isn't perfect. If we had perfection, it would
3278         be because we get resize events and respond accordingly. Instead
3279         we check the size when the user has pinch-zoomed, or when
3280         we start/stop playing.
3281
3282         This is going to cause some extra layout, because we need
3283         to know the size of things before we can work out which
3284         bits to hide.
3285
3286         * Modules/mediacontrols/mediaControlsiOS.css:
3287         (::-webkit-media-controls): Remove the minimum width. This can
3288         cause the controls to get clipped.
3289         (audio::-webkit-media-controls-spacer): Add this empty element to
3290         replace the scrubber when it is hidden.
3291         (audio::-webkit-media-controls-timeline-container):
3292         * Modules/mediacontrols/mediaControlsiOS.js:
3293         (ControllerIOS): Remember our size so we don't churn.
3294         (ControllerIOS.prototype.createControls): Create a new spacer element.
3295         (ControllerIOS.prototype.configureInlineControls):
3296         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
3297         (ControllerIOS.prototype.updateControls):
3298         (ControllerIOS.prototype.setPlaying): Ditto.
3299         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
3300         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
3301         asap. In this case it's probably ok to be in a bad state for a frame, or
3302         we are inside setup and we know that we'll layout soon.
3303         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
3304         that hides elements.
3305
3306 2015-02-19  Tim Horton  <timothy_horton@apple.com>
3307
3308         Move the software-only ImageBuffer::m_context to ImageBufferData
3309         https://bugs.webkit.org/show_bug.cgi?id=141784
3310
3311         Reviewed by Simon Fraser.
3312
3313         * platform/graphics/ImageBuffer.h:
3314         * platform/graphics/cairo/ImageBufferCairo.cpp:
3315         (WebCore::ImageBuffer::ImageBuffer):
3316         (WebCore::ImageBuffer::context):
3317         * platform/graphics/cairo/ImageBufferDataCairo.h:
3318         * platform/graphics/cg/ImageBufferCG.cpp:
3319         (WebCore::ImageBuffer::ImageBuffer):
3320         (WebCore::ImageBuffer::context):
3321         * platform/graphics/cg/ImageBufferDataCG.h:
3322         Move m_context to ImageBufferData in the software-only section;
3323         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
3324         This will make it harder for ImageBuffer to make the mistake of using
3325         m_context blindly without thinking when it will often be null.
3326
3327 2015-02-18  Andreas Kling  <akling@apple.com>
3328
3329         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
3330         <https://webkit.org/b/141788>
3331
3332         Reviewed by Anders Carlsson.
3333
3334         Once again we've fallen into the TemporaryChange trap:
3335
3336             TemporaryChange<unsigned>(m_member, temporaryValue);
3337
3338         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
3339         it immediately goes out of scope and restores the original value of m_member.
3340
3341         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
3342         to catch bugs like this. Whatever we do will be done separately from this bug.
3343
3344         Test: fast/history/page-cache-clearing.html
3345
3346         * history/PageCache.cpp:
3347         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
3348
3349         * testing/Internals.cpp:
3350         (WebCore::Internals::clearPageCache):
3351         (WebCore::Internals::pageCacheSize):
3352         * testing/Internals.h:
3353         * testing/Internals.idl: Add a way to clear the page cache and query its size from
3354         window.internals to facilitate writing a simple test for this bug.
3355
3356 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
3357
3358         Roll out r180280.
3359
3360         Crashes under IDBDatabase::closeConnection.
3361         https://bugs.webkit.org/show_bug.cgi?id=141745
3362         rdar://problem/19816412
3363
3364         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
3365
3366 2015-02-18  Tim Horton  <timothy_horton@apple.com>
3367
3368         Fix the iOS Simulator build after r180308.
3369
3370         * platform/graphics/cg/ImageBufferDataCG.h:
3371
3372 2015-02-18  Zalan Bujtas  <zalan@apple.com>
3373
3374         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
3375         https://bugs.webkit.org/show_bug.cgi?id=138224
3376
3377         Reviewed by Dave Hyatt.
3378
3379         It's wrong to call flowThreadRelativeWillBeRemoved(child).
3380         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
3381         Should this introduce any regressions, we need to deal with those separately.
3382
3383         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
3384
3385         * rendering/RenderMultiColumnFlowThread.cpp:
3386         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
3387         * rendering/RenderMultiColumnFlowThread.h:
3388
3389 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
3390
3391         [Win] CFData leak in CDMSessionAVFoundationCF
3392         https://bugs.webkit.org/show_bug.cgi?id=141765
3393         <rdar://problem/141765>
3394
3395         Reviewed by Joseph Pecoraro.
3396
3397         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
3398         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
3399         so we don't double-increment the retain count.
3400
3401 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
3402
3403         Adopt WebCore::IOSurface in ImageBuffer
3404         https://bugs.webkit.org/show_bug.cgi?id=141751
3405
3406         Reviewed by Simon Fraser.
3407
3408         * platform/graphics/cg/ImageBufferCG.cpp:
3409         (WebCore::createIOSurface): Deleted.
3410         (WebCore::ImageBuffer::ImageBuffer):
3411         Make use of cachedCGColorSpace.
3412         Make use of WebCore::IOSurface.
3413         Remove the unused size argument from ImageBufferDataCG.
3414         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
3415         do this for us, unlike wkIOSurfaceContextCreate.
3416         Apply the flipping and scale factor to whichever context we made.
3417         We don't need to setIsAcceleratedContext anymore because it's always
3418         false for software contexts, and WebCore::IOSurface will set it for
3419         any accelerated contexts.
3420
3421         (WebCore::ImageBuffer::context):
3422         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
3423
3424         (WebCore::ImageBuffer::flushContext):
3425         Make use of context(); m_context is now null for accelerated ImageBuffers.
3426
3427         (WebCore::ImageBuffer::copyNativeImage):
3428         Adopt in-line with the Create functions for clarity. Make use of
3429         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
3430
3431         (WebCore::ImageBuffer::draw):