Setting playback rate on Media Controller modifies current time.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-19  Piotr Grad  <p.grad@samsung.com>
2
3         Setting playback rate on Media Controller modifies current time.
4         https://bugs.webkit.org/show_bug.cgi?id=129042
5
6         Reviewed by Jer Noble.
7
8         In ClockGeneric: when setting playback rate or stoping timer,clock was restarted using current real time
9         instead of provided time by setCurrentTime.
10         Changed impl. so that m_offset is updated when clock stops to remember last clock position.
11         When playbackRate is changed m_offset is updated in order to not use old time interval for new playback rate.
12
13         Test: media/video-controller-currentTime-rate.html
14
15         * html/MediaController.cpp:
16         (MediaController::updatePlaybackState):
17         * platform/ClockGeneric.cpp:
18         (ClockGeneric::setPlayRate):
19         (ClockGeneric::start):
20         (ClockGeneric::stop):
21
22 2014-02-19  Brady Eidson  <beidson@apple.com>
23
24         Add settings/preferences for enabling image controls
25         https://bugs.webkit.org/show_bug.cgi?id=129027
26
27         Reviewed by Jer Noble.
28
29         * WebCore.exp.in:
30
31         * page/Settings.cpp:
32         (WebCore::Settings::Settings):
33         (WebCore::Settings::setImageControlsEnabled):
34         * page/Settings.h:
35         (WebCore::Settings::imageControlsEnabled):
36
37 2014-02-19  Bem Jones-Bey  <bjonesbe@adobe.com>
38
39         [CSS Shapes] shape-outside does not properly handle different writing modes
40         https://bugs.webkit.org/show_bug.cgi?id=128631
41
42         Reviewed by David Hyatt.
43
44         Fix ShapeOutsideInfo to properly convert the line coordinates and
45         shape coordinates with respect to the writing mode and writing
46         direction for the lines that are affected by the shape. This is
47         notably different from shape inside in that shape outside needs to use
48         the writing mode of the container, not of the element that the shape
49         is applied to.
50
51         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-direction-border-box.html
52                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-direction-content-box.html
53                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-direction-margin-box.html
54                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-direction-padding-box.html
55                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-border-box.html
56                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-content-box.html
57                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-margin-box.html
58                fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-padding-box.html
59
60         * rendering/RenderBoxModelObject.h:
61         (WebCore::RenderBoxModelObject::borderWidth): Used by
62             ShapeInfo::setReferenceBoxLogicalSize.
63         (WebCore::RenderBoxModelObject::borderHeight): Ditto.
64         * rendering/shapes/ShapeInfo.cpp:
65         (WebCore::ShapeInfo<RenderType>::setReferenceBoxLogicalSize): Use the
66             container's writing mode to determine the logical dimensions in
67             the case of shape outside.
68         (WebCore::ShapeInfo<RenderType>::computedShape): Use the new
69             ShapeInfo::styleForWritingMode method.
70         (WebCore::borderBeforeInWritingMode): Determines the borderBefore for
71             the passed in renderer using the writing mode passed in. The
72             borderBefore method on the renderer is implemented in RenderStyle,
73             unlike with the margin methods, so this was chosen instead of
74             attempting to move the border method implementation into a place
75             where it could take the writing mode as an argument.
76         (WebCore::borderAndPaddingBeforeInWritingMode): Determines the
77             borderAndPaddingBefore for the passed in renderer using the
78             given writihg mode. See above for why this method instead of doing
79             it like margins.
80         (WebCore::borderStartWithStyleForWritingMode): Determines the
81             borderStart for the passed in renderer using the writing mode and
82             direction from the style passed in. See above for why this method
83             instead of doing it like margins.
84         (WebCore::borderAndPaddingStartWithStyleForWritingMode): Determines
85             the borderAndPaddingStart for the passed in renderer using the
86             writing mode and direction from the style passed in. See above for
87             why this method instead of doing it like margins.
88         (WebCore::ShapeInfo<RenderType>::logicalTopOffset): Use the
89             container's writing mode to determine the logicalTopOffset in the
90             case of shape outside.
91         (WebCore::ShapeInfo<RenderType>::logicalLeftOffset): Use the
92             container's writing mode to determine the logicalTopOffset in the
93             case of shape outside.
94         * rendering/shapes/ShapeInfo.h:
95         * rendering/shapes/ShapeInsideInfo.cpp:
96         (WebCore::ShapeInsideInfo::styleForWritingMode): Return the entire
97             style because to determine start/end the writing direction is
98             needed in addtion to the writing mode.
99         * rendering/shapes/ShapeInsideInfo.h:
100         * rendering/shapes/ShapeOutsideInfo.cpp:
101         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
102             Properly convert the containing block line into the reference box
103             coordinates of the shape.
104         (WebCore::ShapeOutsideInfo::styleForWritingMode): Return the entire
105             style because to determine start/end the writing direction is
106             needed in addtion to the writing mode.
107         * rendering/shapes/ShapeOutsideInfo.h:
108
109 2014-02-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
110
111         [GStreamer] the GstPlayFlags enum diverged from upstream
112         https://bugs.webkit.org/show_bug.cgi?id=128957
113
114         Reviewed by Philippe Normand.
115
116         Removed the GstPlayFlags from the GStreamer implementation and
117         replaced by the use of the GFlags.
118
119         * platform/graphics/gstreamer/GStreamerUtilities.h:
120         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
121         (WebCore::getGstPlaysFlag): Created to get the flags by using the
122         GFlags infrastructure.
123         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
124         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
125         Replaced GST_PLAY_FLAG_DOWNLOAD with getGstPlaysFlag.
126
127 2014-02-19  Zan Dobersek  <zdobersek@igalia.com>
128
129         Replace WTF::bind() uses in RTCPeerConnection with C++11 lambdas
130         https://bugs.webkit.org/show_bug.cgi?id=129001
131
132         Reviewed by Eric Carlson.
133
134         * Modules/mediastream/RTCPeerConnection.cpp:
135         (WebCore::RTCPeerConnection::setLocalDescription): Pass a lambda function to
136         callOnMainThread() instead of using WTF::bind().
137         (WebCore::RTCPeerConnection::setRemoteDescription): Ditto.
138
139 2014-02-19  Dan Bernstein  <mitz@apple.com>
140
141         Simplify PLATFORM(MAC) && !PLATFORM(IOS) and similar expressions
142         https://bugs.webkit.org/show_bug.cgi?id=129029
143
144         Reviewed by Mark Rowe.
145
146         * accessibility/AccessibilityRenderObject.cpp:
147         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
148         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
149         * config.h:
150         * editing/Editor.cpp:
151         (WebCore::Editor::copyURL):
152         * editing/EditorCommand.cpp:
153         (WebCore::createCommandMap):
154         * editing/TypingCommand.cpp:
155         (WebCore::TypingCommand::markMisspellingsAfterTyping):
156         * loader/FrameLoader.cpp:
157         (WebCore::FrameLoader::loadArchive):
158         * page/AlternativeTextClient.h:
159         * page/EventHandler.cpp:
160         * page/PageGroup.cpp:
161         (WebCore::PageGroup::captionPreferences):
162         * page/scrolling/ScrollingStateScrollingNode.cpp:
163         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
164         * page/scrolling/ScrollingStateScrollingNode.h:
165         * page/scrolling/ScrollingTree.h:
166         * page/scrolling/ThreadedScrollingTree.cpp:
167         * page/scrolling/ThreadedScrollingTree.h:
168         * platform/DragData.h:
169         * platform/FileSystem.cpp:
170         * platform/MemoryPressureHandler.cpp:
171         * platform/Pasteboard.h:
172         * platform/PlatformMouseEvent.h:
173         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
174         * platform/PlatformPasteboard.h:
175         * platform/PlatformScreen.h:
176         * platform/Scrollbar.cpp:
177         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
178         * platform/SuddenTermination.h:
179         * platform/ThreadGlobalData.cpp:
180         (WebCore::ThreadGlobalData::ThreadGlobalData):
181         (WebCore::ThreadGlobalData::destroy):
182         * platform/ThreadGlobalData.h:
183         * platform/audio/mac/AudioDestinationMac.cpp:
184         * platform/audio/mac/AudioFileReaderMac.cpp:
185         * platform/audio/mac/AudioSessionMac.cpp:
186         * platform/graphics/DisplayRefreshMonitor.h:
187         * platform/graphics/FloatPoint.h:
188         * platform/graphics/FloatRect.h:
189         * platform/graphics/FloatSize.h:
190         * platform/graphics/IntRect.h:
191         * platform/graphics/IntSize.h:
192         * platform/graphics/MediaPlayer.cpp:
193         (WebCore::installedMediaEngines):
194         * platform/graphics/cg/ImageBufferCG.cpp:
195         (WebCore::utiFromMIMEType):
196         * platform/graphics/cg/PDFDocumentImage.h:
197         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
198         * platform/graphics/mac/GraphicsContextMac.mm:
199         (WebCore::GraphicsContext::drawLineForDocumentMarker):
200         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
201         (WebCore::Extensions3DOpenGL::supportsExtension):
202         (WebCore::Extensions3DOpenGL::drawBuffersEXT):
203         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
204         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
205         * platform/mac/KeyEventMac.mm:
206         * platform/network/NetworkStateNotifier.h:
207         * platform/network/cf/CookieJarCFNet.cpp:
208         * platform/network/cf/ResourceRequest.h:
209         * platform/network/cf/ResourceRequestCFNet.cpp:
210         * platform/network/cf/SocketStreamHandleCFNet.cpp:
211         (WebCore::SocketStreamHandle::reportErrorToClient):
212         * platform/text/TextEncodingRegistry.cpp:
213         (WebCore::extendTextCodecMaps):
214         * rendering/RenderLayerCompositor.cpp:
215         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames):
216         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
217
218 2014-02-18  Dan Bernstein  <mitz@apple.com>
219
220         PLATFORM(MAC) is true when building for iOS
221         https://bugs.webkit.org/show_bug.cgi?id=129025
222
223         Reviewed by Mark Rowe.
224
225         * editing/Editor.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA) now that the former does not
226         include iOS.
227
228 2014-02-17  Gavin Barraclough  <barraclough@apple.com>
229
230         Add fast mapping from StringImpl to JSString
231         https://bugs.webkit.org/show_bug.cgi?id=128625
232
233         Reviewed by Geoff Garen & Andreas Kling.
234
235         Removed JSStringCache from WebCore; call JSC::jsStringWithWeakOwner instead.
236
237         * bindings/js/DOMWrapperWorld.cpp:
238         (WebCore::DOMWrapperWorld::clearWrappers):
239             - removed JSStringCache.
240         * bindings/js/DOMWrapperWorld.h:
241             - removed JSStringCache.
242         * bindings/js/JSDOMBinding.h:
243         (WebCore::jsStringWithCache):
244             - call jsStringWithWeakOwner insead of using JSStringCache.
245         * bindings/js/JSDOMWindowBase.cpp:
246         (WebCore::JSDOMWindowBase::commonVM):
247             - renamed createLeaked -> createLeakedForMainThread.
248         * bindings/scripts/StaticString.pm:
249         (GenerateStrings):
250             - StringImpl has an additional field.
251
252 2014-02-18  Simon Fraser  <simon.fraser@apple.com>
253
254         Remove UIWKRemoteView
255         https://bugs.webkit.org/show_bug.cgi?id=129015
256
257         Reviewed by Dan Bernstein.
258
259         The project referenced a maketokenizer script that disappeared
260         long ago.
261
262         * WebCore.xcodeproj/project.pbxproj:
263
264 2014-02-18  Simon Fraser  <simon.fraser@apple.com>
265
266         border-box clip-paths jump around when outline changes
267         https://bugs.webkit.org/show_bug.cgi?id=128929
268
269         Reviewed by Dirk Schulze.
270         
271         computeReferenceBox() for clip paths was using "rootRelativeBounds"
272         to position the border-box. This bounds is an enclosing bounds for
273         the layer and its descendants, including outlines and absolute descendants,
274         so it is not the correct box to use to offset the border-box.
275         
276         The caller has offsetFromRoot(), which is the correct thing to use,
277         so use it.
278
279         Test: css3/masking/clip-path-root-relative-bounds.html
280
281         * rendering/RenderLayer.cpp:
282         (WebCore::computeReferenceBox):
283         (WebCore::RenderLayer::setupClipPath):
284
285 2014-02-18  James Craig  <jcraig@apple.com>
286
287         Web Inspector: AX: more properties: exists, required, and invalid (exists was previously combined with ignored)
288         https://bugs.webkit.org/show_bug.cgi?id=128504
289
290         Reviewed by Timothy Hatcher.
291
292         Additions to the accessibility node inspector: exists, required, invalid.
293
294         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
295
296         * inspector/InspectorDOMAgent.cpp:
297         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
298         * inspector/protocol/DOM.json:
299
300 2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
301
302         Commit the code change supposed to happen in r164320.
303
304         * editing/Editor.cpp:
305         (WebCore::Editor::setIgnoreCompositionSelectionChange):
306         (WebCore::Editor::respondToChangedSelection):
307         * editing/Editor.h:
308
309 2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
310
311         TextFieldInputType::handleBeforeTextInsertedEvent shouldn't use plainText
312         https://bugs.webkit.org/show_bug.cgi?id=128953
313
314         Reviewed by Alexey Proskuryakov.
315
316         Don't use FrameSelection's toNormalizedRange and plainText. Instead, use the cached selection start and selection
317         end to extract the selected text. The caches are updated inside FrameSelection::setSelection whenever selection
318         is inside a text form control via HTMLTextFormControlElement::selectionChanged.
319
320         * html/TextFieldInputType.cpp:
321         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
322
323 2014-02-18  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
324
325         Bottom/right sticky positioning don't correctly handle scroll containers with padding
326         https://bugs.webkit.org/show_bug.cgi?id=119280
327
328         Reviewed by Simon Fraser.
329
330         Take padding into account during calculation of overflow constraining rect for sticky
331         positioning.
332
333         Test: fast/css/sticky/sticky-bottom-overflow-padding.html
334
335         * rendering/RenderBoxModelObject.cpp:
336         (WebCore::RenderBoxModelObject::stickyPositionOffset):
337
338 2014-02-17  Jon Honeycutt  <jhoneycutt@apple.com>
339
340         Crash when merging ruby bases that contain floats
341
342         https://bugs.webkit.org/show_bug.cgi?id=127515
343         <rdar://problem/15896562>
344
345         This crash occurs when we remove a ruby text object and decide to merge
346         two adjacent ruby base objects. The right ruby base's children were
347         being merged into the left ruby base, but the right ruby base's floats
348         were not being moved to the left base. This could cause us not to
349         descend into all nodes containing a FloatingObject in
350         RenderBlockFlow::markAllDescendantsWithFloatsForLayout(), because we
351         assume that if a block does not have a particular float in its float
352         list, none of its descendants will, either.
353
354         Reviewed by David Hyatt.
355
356         Test: fast/ruby/ruby-base-merge-block-children-crash-2.html
357
358         * rendering/RenderBlockFlow.cpp:
359         (WebCore::RenderBlockFlow::moveFloatsTo):
360         Code split out of moveAllChildrenIncludingFloatsTo().
361         (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
362         Call moveFloatsTo().
363
364         * rendering/RenderBlockFlow.h:
365         Add declaration of moveFloatsTo().
366
367         * rendering/RenderRubyBase.cpp:
368         (WebCore::RenderRubyBase::mergeChildrenWithBase):
369         Move children and floats to the new base.
370
371         * rendering/RenderRubyBase.h:
372         Declare mergeChildrenWithBase().
373
374         * rendering/RenderRubyRun.cpp:
375         (WebCore::RenderRubyRun::removeChild):
376         Call mergeChildrenWithBase().
377
378 2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
379
380         iOS build fix after r164319.
381
382         * editing/FrameSelection.cpp:
383         (WebCore::FrameSelection::setSelectedRange):
384
385 2014-02-18  Samuel White  <samuel_white@apple.com>
386
387         AX: Searching for "immediate descendants only" can return unexpected results.
388         https://bugs.webkit.org/show_bug.cgi?id=128986
389
390         Reviewed by Chris Fleizach.
391
392         Missed an application of the immediateDescendantsOnly flag during the initial implementation. We
393         need to make sure we don't decend into the startObject first if it is provided. This fix causes
394         the outer loop to 'skip' the first iteration so only siblings of the startObject are considered.
395
396         No new tests, updated existing search-predicate-immediate-descendants-only.html test to cover this case.
397
398         * accessibility/AccessibilityObject.cpp:
399         (WebCore::AccessibilityObject::findMatchingObjects):
400
401 2014-02-18 Ryosuke Niwa <rniwa@webkit.org>
402
403         Merge notifyComponentsOnChangedSelection into respondToSelectionChange
404         https://bugs.webkit.org/show_bug.cgi?id=128993
405
406         Reviewed by Andreas Kling.
407
408         Merged notifyComponentsOnChangedSelection into respondToSelectionChange since notifyComponentsOnChangedSelection
409         was only added in iOS codebase in response to the code added for continuous spellchecking and alternative text controller
410         in respondToChangedSelection but they should have been called inside setIgnoreCompositionSelectionChange.
411
412         So merge these two functions and make respondToChangedSelection behave like setIgnoreCompositionSelectionChange.
413
414         * editing/Editor.cpp:
415         (WebCore::Editor::setIgnoreCompositionSelectionChange):
416         (WebCore::Editor::respondToChangedSelection):
417         * editing/Editor.h:
418
419 2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
420
421         FrameSelection::textWasReplaced and setSelectedRange shouldn't trigger synchronous layout
422         https://bugs.webkit.org/show_bug.cgi?id=128951
423
424         Reviewed by Antti Koivisto.
425
426         Cleanup.
427
428         * editing/FrameSelection.cpp:
429         (WebCore::FrameSelection::textWasReplaced): Don't call updateLayout. It's totally unnecessarily.
430         (WebCore::FrameSelection::setSelectedRange): Ditto. Also removed the code to set affinity only when
431         range is collapsed since VisibleSelection::validate already does this.
432
433 2014-02-18  Eric Carlson  <eric.carlson@apple.com>
434
435         Do not cache media time until media engine returns a non-zero value
436         https://bugs.webkit.org/show_bug.cgi?id=128976
437
438         Reviewed by Jer Noble.
439
440         No new tests, covered by existing tests.
441
442         * html/HTMLMediaElement.cpp:
443         (WebCore::HTMLMediaElement::refreshCachedTime): Don't mark the cached time as valid
444             until it is non-zero.
445         (WebCore::HTMLMediaElement::currentTime): Return 0 if m_cachedTime is invalid.
446
447 2014-02-17  Alexey Proskuryakov  <ap@apple.com>
448
449         [iOS] All WebKit clients should encrypt WebCrypto keys automatically
450         https://bugs.webkit.org/show_bug.cgi?id=128938
451
452         Reviewed by Dan Bernstein.
453
454         Don't pass ACLs on iOS. Key will be added to app's default Keychain access group.
455
456         Also, don't pass kSecAttrIsPermanent, which is irrelevant for password items, and
457         caused error -50 in DumpRenderTree for me when passed.
458
459         Added fallback to _NSGetProgname for account name, to account for tools such as
460         Mac DumpRenderTree that don't have bundle identifiers.
461
462         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
463         (WebCore::masterKeyAccountNameForCurrentApplication):
464         (WebCore::createAndStoreMasterKey):
465
466 2014-02-18  Ryosuke Niwa  <rniwa@webkit.org>
467
468         setSelectionRange should set selection without validation
469         https://bugs.webkit.org/show_bug.cgi?id=128949
470
471         Reviewed by Enrica Casucci.
472
473         Since positionForIndex in HTMLTextFormControlElement always returns a candidate Position, we don't have to
474         validate selection in setSelectionRange.
475
476         Also fixed various bugs uncovered by this change.
477
478         This patch also fixes fast/forms/input-select-webkit-user-select-none.html, which used to assert wrong outcome
479         so that WebKit's behavior matches that of Chrome and Firefox.
480
481         Test: fast/forms/input-select-webkit-user-select-none.html
482
483         * dom/Position.h:
484         (WebCore::positionInParentBeforeNode): This function had a bug that when node is a child of the shadow root
485         it would return a null Position. Allow a position anchored inside a shadow root.
486         (WebCore::positionInParentAfterNode): Ditto.
487
488         * editing/FrameSelection.cpp:
489         (WebCore::FrameSelection::moveWithoutValidationTo): Renamed from moveTo and avoided selection validation.
490         * editing/FrameSelection.h:
491
492         * editing/htmlediting.cpp:
493         (WebCore::updatePositionForNodeRemoval): Fixed the bug that this function doesn't update positions before
494         or after children even if the shadow host of the anchor node is getting removed. Move the position before
495         the shadow host to be removed in both situations.
496
497         * html/HTMLTextFormControlElement.cpp:
498         (WebCore::HTMLTextFormControlElement::setSelectionRange): moveTo is renamed to moveWithoutValidationTo.
499         (WebCore::HTMLTextFormControlElement::selectionChanged): Check if the cached selection offsets are different
500         in lieu of FrameSelection::isRange() since they're equivalent here.
501         (WebCore::positionForIndex): Return the position inside or after the last br when there is one to match
502         the canonicalization algorithm we have. It's probably harmless to return the last position in the inner text
503         element anyways since most of our codebase supports that but this would avoid having to rebaseline dozens
504         of tests and reduces the risk of this patch.
505
506 2014-02-18  Zan Dobersek  <zdobersek@igalia.com>
507
508         Move IndexedDB module, LevelDB code to std::unique_ptr
509         https://bugs.webkit.org/show_bug.cgi?id=128964
510
511         Reviewed by Andreas Kling.
512
513         Replace uses of OwnPtr and PassOwnPtr in the IndexedDB module and LevelDB platform code with std::unique_ptr.
514
515         * Modules/indexeddb/IDBCursorBackend.h:
516         * Modules/indexeddb/IDBDatabaseBackend.cpp:
517         (WebCore::IDBDatabaseBackend::IDBDatabaseBackend):
518         (WebCore::IDBDatabaseBackend::transactionFinishedAndAbortFired):
519         (WebCore::IDBDatabaseBackend::processPendingCalls):
520         (WebCore::IDBDatabaseBackend::processPendingOpenCalls):
521         (WebCore::IDBDatabaseBackend::openConnection):
522         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
523         (WebCore::IDBDatabaseBackend::deleteDatabase):
524         (WebCore::IDBDatabaseBackend::close):
525         * Modules/indexeddb/IDBDatabaseBackend.h:
526         (WebCore::IDBDatabaseBackend::hasPendingSecondHalfOpen):
527         (WebCore::IDBDatabaseBackend::setPendingSecondHalfOpen):
528         * Modules/indexeddb/IDBPendingDeleteCall.h:
529         (WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):
530         * Modules/indexeddb/IDBPendingOpenCall.h:
531         (WebCore::IDBPendingOpenCall::IDBPendingOpenCall):
532         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
533         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
534         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
535         * Modules/indexeddb/IDBTransactionCoordinator.h:
536         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
537         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
538         (WebCore::setUpMetadata):
539         (WebCore::DefaultLevelDBFactory::openLevelDB):
540         (WebCore::IDBBackingStoreLevelDB::IDBBackingStoreLevelDB):
541         (WebCore::IDBBackingStoreLevelDB::~IDBBackingStoreLevelDB):
542         (WebCore::IDBBackingStoreLevelDB::open):
543         (WebCore::IDBBackingStoreLevelDB::openInMemory):
544         (WebCore::IDBBackingStoreLevelDB::create):
545         (WebCore::IDBBackingStoreLevelDB::getDatabaseNames):
546         (WebCore::deleteRange):
547         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
548         (WebCore::IDBBackingStoreLevelDB::getObjectStores):
549         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
550         (WebCore::IDBBackingStoreLevelDB::getIndexes):
551         (WebCore::findGreatestKeyLessThanOrEqual):
552         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
553         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
554         * platform/leveldb/LevelDBDatabase.cpp:
555         (WebCore::LevelDBDatabase::~LevelDBDatabase):
556         (WebCore::LevelDBDatabase::open):
557         (WebCore::LevelDBDatabase::openInMemory):
558         (WebCore::IteratorImpl::IteratorImpl):
559         (WebCore::LevelDBDatabase::createIterator):
560         * platform/leveldb/LevelDBDatabase.h:
561         * platform/leveldb/LevelDBTransaction.cpp:
562         (WebCore::LevelDBTransaction::commit):
563         (WebCore::LevelDBTransaction::createIterator):
564         (WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
565         (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator):
566         (WebCore::LevelDBWriteOnlyTransaction::LevelDBWriteOnlyTransaction):
567         * platform/leveldb/LevelDBTransaction.h:
568         * platform/leveldb/LevelDBWriteBatch.cpp:
569         (WebCore::LevelDBWriteBatch::LevelDBWriteBatch):
570         * platform/leveldb/LevelDBWriteBatch.h:
571
572 2014-02-18  David Kilzer  <ddkilzer@apple.com>
573
574         Follow-up: Add type-checked casts for StyleImage and subclasses
575         <http://webkit.org/b/128915>
576
577         Address some style issues based on feedback from Andreas Kling.
578
579         * css/CSSCursorImageValue.cpp:
580         (WebCore::CSSCursorImageValue::cachedImageURL):
581         * css/CSSImageSetValue.cpp:
582         (WebCore::CSSImageSetValue::~CSSImageSetValue):
583         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
584         * css/CSSImageValue.cpp:
585         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
586         - Use the reference version of the type-checked casts since we
587           know the pointers are not NULL.
588
589         * rendering/style/StyleImage.h:
590         - Use 'styleImage' instead of 'resource' in
591           STYLE_IMAGE_TYPE_CASTS.
592
593 2014-02-18  Zan Dobersek  <zdobersek@igalia.com>
594
595         Remove unnecessary UserActionElementSet constructor, destructor
596         https://bugs.webkit.org/show_bug.cgi?id=128962
597
598         Reviewed by Andreas Kling.
599
600         UserActionElementSet constructor and destructor are not necessary, as is not the
601         static create() function that returns PassOwnPtr<UserActionElementSet>. The implicit
602         constructor and destructor can take care of creating and destroying the sole HashMap
603         member variable.
604
605         * dom/UserActionElementSet.cpp:
606         * dom/UserActionElementSet.h:
607
608 2014-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
609
610         Rename convertFixedAndStickyPosition() to convertPositionStyle()
611         https://bugs.webkit.org/show_bug.cgi?id=128987
612
613         Reviewed by NOBODY. This is addressing a post-commit review from Dean Jackson.
614
615         No new tests are necessary because there is no behavior change
616
617         * editing/EditingStyle.cpp:
618         (WebCore::EditingStyle::convertPositionStyle):
619         * editing/EditingStyle.h:
620         * editing/markup.cpp:
621         (WebCore::StyledMarkupAccumulator::appendElement):
622
623 2014-02-18  Commit Queue  <commit-queue@webkit.org>
624
625         Unreviewed, rolling out r164296.
626         http://trac.webkit.org/changeset/164296
627         https://bugs.webkit.org/show_bug.cgi?id=128989
628
629         Broke many media tests (Requested by eric_carlson on #webkit).
630
631         * html/HTMLMediaElement.cpp:
632         (WebCore::HTMLMediaElement::parseAttribute):
633         * html/HTMLMediaElement.h:
634
635 2014-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
636
637         Convert position:sticky to position:static upon copy and paste
638         https://bugs.webkit.org/show_bug.cgi?id=128982
639
640         Reviewed by Simon Fraser.
641
642         This patch has two parts:
643
644         1. Make sure that position:absolute elements trigger the position:relative wrapping (as
645         well as position:fixed)
646         2. Now that we copy position:sticky, convert that to position:static
647
648         Tests: editing/pasteboard/copy-paste-converts-fixed.html
649                editing/pasteboard/copy-paste-converts-sticky.html
650                editing/pasteboard/copy-paste-wraps-position-absolute.html
651
652         * editing/EditingStyle.cpp:
653         (WebCore::EditingStyle::convertFixedAndStickyPosition):
654
655 2014-02-18  David Kilzer  <ddkilzer@apple.com>
656
657         Add type-checked casts for StyleImage and subclasses
658         <http://webkit.org/b/128915>
659
660         Reviewed by Oliver Hunt.
661
662         * css/CSSCursorImageValue.cpp:
663         (WebCore::CSSCursorImageValue::detachPendingImage):
664         (WebCore::CSSCursorImageValue::cachedImage):
665         (WebCore::CSSCursorImageValue::cachedImageURL):
666         * css/CSSImageSetValue.cpp:
667         (WebCore::CSSImageSetValue::detachPendingImage):
668         (WebCore::CSSImageSetValue::~CSSImageSetValue):
669         (WebCore::CSSImageSetValue::cachedImageSet):
670         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
671         * css/CSSImageValue.cpp:
672         (WebCore::CSSImageValue::detachPendingImage):
673         (WebCore::CSSImageValue::cachedImage):
674         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
675         * css/StyleResolver.cpp:
676         (WebCore::StyleResolver::loadPendingShapeImage):
677         (WebCore::StyleResolver::loadPendingImages):
678         * page/PageSerializer.cpp:
679         (WebCore::PageSerializer::retrieveResourcesForProperties):
680         * page/animation/CSSPropertyAnimation.cpp:
681         (WebCore::blendFunc):
682         - Switch from static_cast<>() operators to toTypeName() methods.
683         - Replace 0 with nullptr where convenient.
684
685         * rendering/style/StyleCachedImage.h:
686         * rendering/style/StyleCachedImageSet.h:
687         * rendering/style/StyleGeneratedImage.h:
688         * rendering/style/StyleImage.h:
689         * rendering/style/StylePendingImage.h:
690         - Define type-checked cast macros.
691
692 2014-02-18  Sam Weinig  <sam@webkit.org>
693
694         Simplify HTML tokenizer parameterization down to what is used
695         https://bugs.webkit.org/show_bug.cgi?id=128977
696
697         Reviewed by Alexey Proskuryakov.
698
699         - Removes support for CustomHTMLTokenizerChunkSize.
700         - Consolidates CustomHTMLTokenizerTimeDelay down to one implementation, using Settings::maxParseDuration
701
702         * WebCore.exp.in:
703         * html/parser/HTMLParserScheduler.cpp:
704         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
705         * page/Page.cpp:
706         (WebCore::Page::Page):
707         (WebCore::Page::hasCustomHTMLTokenizerTimeDelay):
708         (WebCore::Page::customHTMLTokenizerTimeDelay):
709         * page/Page.h:
710
711 2014-02-18  Eric Carlson  <eric.carlson@apple.com>
712
713         Do not cache media time until media engine returns a non-zero value
714         https://bugs.webkit.org/show_bug.cgi?id=128976
715
716         Reviewed by Jer Noble.
717
718         No new tests, covered by existing tests.
719
720         * html/HTMLMediaElement.cpp:
721         (WebCore::HTMLMediaElement::refreshCachedTime): Don't mark the cached time as valid
722             until it is non-zero.
723
724 2014-02-18  Mihai Tica  <mitica@adobe.com>
725
726         [CSS Blending] Add -webkit-blend-mode support for SVG.
727
728         https://bugs.webkit.org/show_bug.cgi?id=110427
729         Reviewed by Dirk Schulze.
730
731         Add support for blend modes to SVG. This includes adding and validating isolation for blending.
732         Make masked elements isolate blending by creating a transparency layer.
733
734         Tests: css3/compositing/svg-blend-color-burn.html
735                css3/compositing/svg-blend-color-dodge.html
736                css3/compositing/svg-blend-color.html
737                css3/compositing/svg-blend-darken.html
738                css3/compositing/svg-blend-difference.html
739                css3/compositing/svg-blend-exclusion.html
740                css3/compositing/svg-blend-hard-light.html
741                css3/compositing/svg-blend-hue.html
742                css3/compositing/svg-blend-layer-blend.html
743                css3/compositing/svg-blend-layer-clip-path.html
744                css3/compositing/svg-blend-layer-filter.html
745                css3/compositing/svg-blend-layer-mask.html
746                css3/compositing/svg-blend-layer-opacity.html
747                css3/compositing/svg-blend-layer-shadow.html
748                css3/compositing/svg-blend-lighten.html
749                css3/compositing/svg-blend-luminosity.html
750                css3/compositing/svg-blend-multiply-alpha.html
751                css3/compositing/svg-blend-multiply.html
752                css3/compositing/svg-blend-normal.html
753                css3/compositing/svg-blend-overlay.html
754                css3/compositing/svg-blend-saturation.html
755                css3/compositing/svg-blend-screen.html
756                css3/compositing/svg-blend-soft-light.html
757
758         * rendering/RenderElement.cpp:
759         (WebCore::RenderElement::styleDidChange): Also pass a pointer to the old style when calling SVGRenderSupport::styleChanged.
760         * rendering/style/RenderStyle.h:  Add blendMode default getter when CSS_COMPOSITING is disabled.
761         * rendering/style/SVGRenderStyle.h:
762         (WebCore::SVGRenderStyle::isolatesBlending): Add method.
763         * rendering/svg/SVGRenderSupport.cpp:
764         (WebCore::SVGRenderSupport::styleChanged): Call updateMaskedAncestorShouldIsolateBlending only when a blend mode is set/unset.
765         (WebCore::SVGRenderSupport::isolatesBlending): Implement method that decides whether an SVGElement isolates or not blending.
766         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending): Traverse to the nearest ancestor having a mask.
767         - Set a flag causing the creation of a transparency layer when rendering the masked element.
768         * rendering/svg/SVGRenderSupport.h:
769         * rendering/svg/SVGRenderingContext.cpp:
770         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Call GraphicsContext::setCompositeOperation.
771         - Isolate blending by creating a transparency layer.
772         - Isolate group when rendering a masked element having a blended child node.
773         * svg/SVGGraphicsElement.cpp:
774         (WebCore::SVGGraphicsElement::SVGGraphicsElement): Set default m_shouldIsolateBlending to false.
775         * svg/SVGGraphicsElement.h: Add m_shouldIsolateBlending member, getter and setter.
776         (WebCore::SVGGraphicsElement::shouldIsolateBlending):
777         (WebCore::SVGGraphicsElement::setShouldIsolateBlending):
778
779 2014-02-18  ChangSeok Oh  <changseok.oh@collabora.com>
780
781         [GTK] Unreviewed fix. Correct wrong flags, ENABLE(GTK)->PLATFORM(GTK).
782
783         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
784         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
785         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
786         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
787
788 2014-02-18  Mihnea Ovidenie  <mihnea@adobe.com>
789
790         [CSSRegions] Compute region ranges for inline replaced elements
791         https://bugs.webkit.org/show_bug.cgi?id=128800
792
793         Reviewed by Andrei Bucur.
794
795         Tests: fast/regions/hover-content-inside-iframe-in-region.html
796                fast/regions/select-multiple-in-region.html
797
798         When asking for the range of regions for an inline replaced box,
799         use the region cached on the root inline box for the inline replaced
800         box as the range of regions is computed only for blocks.
801         A future patch will extend the computation of region ranges
802         for inline blocks too.
803
804         * rendering/RenderBoxModelObject.cpp:
805         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
806         Remove the restriction set during https://bugs.webkit.org/show_bug.cgi?id=113703
807         and enable the code path for boxes not only for blocks.
808         Method RenderFlowThread::getRegionRangeForBox returns a null region when it is unable
809         to get the region range and we already check for null region case.
810         * rendering/RenderFlowThread.cpp:
811         (WebCore::RenderFlowThread::getRegionRangeForBox):
812
813 2014-02-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
814
815         Move inheriting method to the superclass in the JavaScript media controls
816         https://bugs.webkit.org/show_bug.cgi?id=128897
817
818         Reviewed by Jer Noble.
819
820         The inheriting method of the JavaScript multimedia controls was
821         moved from the subclasses to the superclass because this way it is
822         only defined once.
823
824         * Modules/mediacontrols/mediaControlsApple.js:
825         (Controller.prototype.extend): Added to replace inheritFrom in the
826         subclasses.
827         * Modules/mediacontrols/mediaControlsGtk.js:
828         * Modules/mediacontrols/mediaControlsiOS.js: Removed inheritFrom
829         and used extend.
830
831 2014-02-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
832
833         [GTK] Fix hitting hasClass() assertion in debug with the new JS media controls
834         https://bugs.webkit.org/show_bug.cgi?id=128820
835
836         Reviewed by Martin Robinson.
837
838         The code introduced at r164024 caused the hit of hasClass()
839         assertion when getting the classNames() of an element with no
840         class. Now we check for it to avoid the assertion.
841
842         No new tests, current set detects the crash in many tests.
843
844         * platform/gtk/RenderThemeGtk.cpp:
845         (WebCore::nodeHasClass): Check for hasClass() in order not to hit
846         the assertion when getting the classNames() in debug mode.
847
848 2014-02-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
849
850         Refactor SVGPreserveAspectRatio::parse()
851         https://bugs.webkit.org/show_bug.cgi?id=128658
852
853         Reviewed by Dirk Schulze.
854
855         To removed "goto" in SVGPreserveAspectRatio::parse(), this patch introduce parseInternal() to handle
856         existing behavior with local variables, and existing/new parse() functions invoke it, then set
857         those to member variables.
858
859         Motivated from Blink: https://src.chromium.org/viewvc/blink?view=rev&revision=166927
860
861         No new tests, no behavior change.
862
863         * svg/SVGPreserveAspectRatio.cpp:
864         (WebCore::SVGPreserveAspectRatio::parse):
865         (WebCore::SVGPreserveAspectRatio::parseInternal):
866         * svg/SVGPreserveAspectRatio.h: Add parse() and parseInternal() functions.
867
868 2014-02-17  Radu Stavila  <stavila@adobe.com>
869
870         [CSS Regions] Move specific named flow methods from RenderRegion to RenderNamedFlowFragment
871         https://bugs.webkit.org/show_bug.cgi?id=128914
872
873         Reviewed by Antti Koivisto.
874
875         Moved named flow specific methods regionContainer() and regionContainerLayer() from 
876         RenderRegion to RenderNamedFlowFragment and renamed them to fragmentContainer and
877         fragmentContainerLayer.
878
879         No new tests required.
880
881         * rendering/RenderLayer.cpp:
882         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
883         (WebCore::RenderLayer::calculateClipRects):
884         * rendering/RenderNamedFlowFragment.cpp:
885         (WebCore::RenderNamedFlowFragment::fragmentContainer):
886         (WebCore::RenderNamedFlowFragment::fragmentContainerLayer):
887         * rendering/RenderNamedFlowFragment.h:
888         * rendering/RenderRegion.cpp:
889         * rendering/RenderRegion.h:
890
891 2014-02-17  Sangho Kim  <thomas.kim@lge.com>
892
893         Move PublicURLMansger to std::unique_ptr.
894         https://bugs.webkit.org/show_bug.cgi?id=128891
895
896         Reviewed by Anders Carlsson.
897
898         Use std::unique_ptr and std::make_unique in place of PassOwnPtr and adoptPtr in the PublicURLManager
899
900         * dom/ScriptExecutionContext.h:
901         * html/PublicURLManager.cpp:
902         (WebCore::PublicURLManager::create):
903         * html/PublicURLManager.h:
904
905 2014-02-17  Ricky Mondello  <rmondello@apple.com>
906
907         Expose a way to clear cookies modified after a given date
908         https://bugs.webkit.org/show_bug.cgi?id=128845
909
910         Reviewed by Alexey Proskuryakov.
911
912         * WebCore.exp.in: Add a symbol.
913         * platform/network/PlatformCookieJar.h: Declare deleteAllCookiesModifiedAfterDate.
914         * platform/network/cf/CookieJarCFNet.cpp:
915         (WebCore::deleteAllCookiesModifiedAfterDate): Add a stub.
916         * platform/network/curl/CookieJarCurl.cpp:
917         (WebCore::deleteAllCookiesModifiedAfterDate): Ditto.
918         * platform/network/soup/CookieJarSoup.cpp:
919         (WebCore::deleteAllCookiesModifiedAfterDate): Ditto.
920         * platform/network/mac/CookieJarMac.mm: Add a category NSHTTPCookieStorage category with the method
921             used for time-based clearing so we can build on all platforms. For now, we'll check for support
922             at runtime.
923         (WebCore::deleteAllCookiesModifiedAfterDate): Added. Without foundation API, we'll ignore the passed-in
924             NetworkStorageSession.
925
926 2014-02-17  Benjamin Poulain  <bpoulain@apple.com>
927
928         SelectorCompiler incorrectly saves a backtracking register for a child chain without descendant relation on the right
929         https://bugs.webkit.org/show_bug.cgi?id=128944
930
931         Reviewed by Andreas Kling.
932
933         When resolving the backtracking relations, the value of ancestorPositionSinceDescendantRelation was incorrect for the
934         rightmost child chain.
935         What was happenning is updateChainStates() would increment ancestorPositionSinceDescendantRelation even if there was
936         no descendant relation previously in the chain. As a result, the second SelectorFragment in the fragment chain would
937         save a backtracking register.
938
939         Previously this would just be a wasted register but since r163850, the number of registers available for compilation
940         is defined by SelectorCompiler::minimumRegisterRequirements(). Since we would have one less register available than computed,
941         we could run out of register and RegisterAllocator would invoke WTFCrash to avoid generating incorrect code.
942
943         This patch fixes the issue by not updating ancestorPositionSinceDescendantRelation until the first descendant relation
944         is seen. There was no need to fix the Adjacent relation because adjacentPositionSinceIndirectAdjacentTreeWalk already
945         had the correct guard.
946
947         Test: fast/selectors/querySelector-rightmost-child-chain-attribute-matching.html
948
949         * cssjit/SelectorCompiler.cpp:
950         (WebCore::SelectorCompiler::updateChainStates):
951         (WebCore::SelectorCompiler::isFirstAdjacent): The name was a bad copy-paste, fix it.
952
953 2014-02-17  Dean Jackson  <dino@apple.com>
954
955         Constrain replaced element layout to from-intrinsic aspect ratio if specified
956         https://bugs.webkit.org/show_bug.cgi?id=128629
957
958         Reviewed by Simon Fraser.
959
960         First pass at implementing -webkit-aspect-ratio: from-instrinsics;
961
962         After RenderReplaced has done layout, attempt to update the
963         resulting size to match the desired aspect ratio. This step
964         will only reduce the size of an element, and never below the
965         minimum dimensions.
966
967         Tests: fast/css/aspect-ratio/columns.html
968                fast/css/aspect-ratio/containers.html
969                fast/css/aspect-ratio/simple.html
970
971         * rendering/RenderImage.cpp:
972         (WebCore::RenderImage::imageDimensionsChanged): If we get an update
973         to our intrinsic dimensions, and layout depends on this, trigger
974         another layout pass.
975         * rendering/RenderReplaced.cpp:
976         (WebCore::RenderReplaced::layout): Implement the step described
977         above.
978
979 2014-02-17  Sam Weinig  <sam@webkit.org>
980
981         Fix build.
982
983         * WebCore.exp.in:
984
985 2014-02-17  Anders Carlsson  <andersca@apple.com>
986
987         Remove ENABLE_GLOBAL_FASTMALLOC_NEW
988         https://bugs.webkit.org/show_bug.cgi?id=127067
989
990         Reviewed by Geoffrey Garen.
991
992         * platform/Timer.h:
993
994 2014-02-17  Sam Weinig  <sam@webkit.org>
995
996         Move iOS only Settings into Settings.in and make them not-iOS only
997         https://bugs.webkit.org/show_bug.cgi?id=128942
998
999         Reviewed by Tim Horton.
1000
1001         * page/Settings.cpp:
1002         * page/Settings.h:
1003         * page/Settings.in:
1004
1005 2014-02-17  Anders Carlsson  <andersca@apple.com>
1006
1007         Remove view source code
1008         https://bugs.webkit.org/show_bug.cgi?id=127233
1009
1010         Reviewed by Antti Koivisto.
1011
1012         * CMakeLists.txt:
1013         * DerivedSources.make:
1014         * GNUmakefile.am:
1015         * GNUmakefile.list.am:
1016         * WebCore.vcxproj/WebCore.vcxproj:
1017         * WebCore.vcxproj/WebCore.vcxproj.filters:
1018         * WebCore.xcodeproj/project.pbxproj:
1019         * bindings/js/ScriptController.cpp:
1020         (WebCore::ScriptController::canExecuteScripts):
1021         * css/CSSDefaultStyleSheets.cpp:
1022         * css/CSSDefaultStyleSheets.h:
1023         * css/DocumentRuleSets.cpp:
1024         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
1025         (WebCore::DocumentRuleSets::collectFeatures):
1026         * css/DocumentRuleSets.h:
1027         * css/ElementRuleCollector.cpp:
1028         (WebCore::ElementRuleCollector::matchUARules):
1029         * css/StyleResolver.cpp:
1030         (WebCore::StyleResolver::appendAuthorStyleSheets):
1031         (WebCore::StyleResolver::styleForElement):
1032         * css/view-source.css: Removed.
1033         * dom/DOMImplementation.cpp:
1034         (WebCore::DOMImplementation::createDocument):
1035         * dom/DOMImplementation.h:
1036         * dom/Document.cpp:
1037         (WebCore::Document::Document):
1038         * dom/Document.h:
1039         * html/HTMLAttributeNames.in:
1040         * html/HTMLFrameElementBase.cpp:
1041         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
1042         (WebCore::HTMLFrameElementBase::openURL):
1043         * html/HTMLFrameElementBase.h:
1044         * html/HTMLViewSourceDocument.cpp: Removed.
1045         * html/HTMLViewSourceDocument.h: Removed.
1046         * html/parser/HTMLToken.h:
1047         * html/parser/HTMLViewSourceParser.cpp: Removed.
1048         * html/parser/HTMLViewSourceParser.h: Removed.
1049         * html/parser/TextViewSourceParser.cpp: Removed.
1050         * html/parser/TextViewSourceParser.h: Removed.
1051         * inspector/InspectorOverlayPage.css:
1052         (.tag-name):
1053         (.node-id):
1054         (.class-name):
1055         * loader/DocumentWriter.cpp:
1056         (WebCore::DocumentWriter::createDocument):
1057         * loader/FrameLoader.cpp:
1058         (WebCore::FrameLoader::receivedFirstData):
1059         * page/Frame.cpp:
1060         (WebCore::Frame::Frame):
1061         * page/Frame.h:
1062         * xml/DOMParser.cpp:
1063         (WebCore::DOMParser::parseFromString):
1064         * xml/XMLViewer.css:
1065         (.tag):
1066         * xml/XSLTProcessor.cpp:
1067         (WebCore::XSLTProcessor::createDocumentFromSource):
1068
1069 2014-02-17  Simon Fraser  <simon.fraser@apple.com>
1070
1071         box-shadows get truncated with a combination of transforms and clip: (affects Google Maps)
1072         https://bugs.webkit.org/show_bug.cgi?id=128937
1073
1074         Reviewed by Dean Jackson.
1075         
1076         RenderLayer::calculateLayerBounds() incorrectly assumed that if localClipRect() returns
1077         a non-infinite rect, that rect is OK to use as the compositing bounds.
1078         
1079         That is not a valid assumption when clip() has a larger rect than the element (e.g.
1080         with negative top/left in the rect). In that case, localClipRect() still just
1081         returns the background rect, but we actually need a larger compositing layer
1082         to show the unclipped parts of descendants.
1083         
1084         Fix by detecting clip() that exceeds the renderer bounds, and when it does,
1085         not early returning in the UseLocalClipRectIfPossible clause.
1086
1087         Test: compositing/geometry/css-clip-oversize.html
1088
1089         * rendering/RenderLayer.cpp:
1090         (WebCore::RenderLayer::localClipRect): Do a convertToLayerCoords()
1091         because we need offsetFromRoot later, and we can pass our value down to
1092         calculateRects(). Compute clipExceedsBounds based on the CSS clip rect.
1093         (WebCore::RenderLayer::calculateClipRects): Don't early return if clipExceedsBounds
1094         is true.
1095         * rendering/RenderLayer.h:
1096
1097 2014-02-17  Antti Koivisto  <antti@apple.com>
1098
1099         Make TreeScope::rootNode return a reference
1100         https://bugs.webkit.org/show_bug.cgi?id=128934
1101
1102         Reviewed by Andreas Kling.
1103
1104         It is never null.
1105
1106         * css/ElementRuleCollector.cpp:
1107         (WebCore::ElementRuleCollector::collectMatchingRules):
1108         * dom/ContainerNode.h:
1109         (WebCore::Node::isTreeScope):
1110         * dom/Document.cpp:
1111         (WebCore::Document::buildAccessKeyMap):
1112         * dom/DocumentOrderedMap.cpp:
1113         (WebCore::DocumentOrderedMap::add):
1114         (WebCore::DocumentOrderedMap::get):
1115         (WebCore::DocumentOrderedMap::getAllElementsById):
1116         * dom/EventDispatcher.cpp:
1117         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
1118         (WebCore::eventTargetRespectingTargetRules):
1119         (WebCore::shouldEventCrossShadowBoundary):
1120         * dom/Node.cpp:
1121         (WebCore::Node::containingShadowRoot):
1122         (WebCore::Node::removedFrom):
1123         * dom/ShadowRoot.h:
1124         (WebCore::isShadowRoot):
1125         * dom/TreeScope.h:
1126         (WebCore::TreeScope::rootNode):
1127         * page/DOMSelection.cpp:
1128         (WebCore::DOMSelection::DOMSelection):
1129         * page/DragController.cpp:
1130         (WebCore::asFileInput):
1131         * page/FocusController.cpp:
1132         (WebCore::FocusNavigationScope::rootNode):
1133
1134 2014-02-17  Chris Fleizach  <cfleizach@apple.com>
1135
1136         AX: Invalid cast in WebCore::AccessibilityTable::isDataTable (CRBug 280352)
1137         <https://webkit.org/b/128925>
1138         <rdar://problem/16087351>
1139
1140         Merged from Blink (patch by Dominic Mazzoni):
1141         https://src.chromium.org/viewvc/blink?revision=159711&view=revision
1142
1143         Reviewed by Oliver Hunt.
1144
1145         Don't cast to a table cell element unless we are sure it is one.
1146
1147         Test: accessibility/display-table-cell-causes-crash.html
1148
1149         * accessibility/AccessibilityTable.cpp:
1150         (WebCore::AccessibilityTable::isDataTable):
1151
1152 2014-02-17  Antti Koivisto  <antti@apple.com>
1153
1154         Node constructor should take Document reference
1155         https://bugs.webkit.org/show_bug.cgi?id=128931
1156
1157         Reviewed by Geoff Garen.
1158
1159         * dom/Attr.cpp:
1160         (WebCore::Attr::Attr):
1161         * dom/CharacterData.h:
1162         (WebCore::CharacterData::CharacterData):
1163         * dom/ContainerNode.cpp:
1164         (WebCore::ContainerNode::~ContainerNode):
1165         * dom/ContainerNode.h:
1166         (WebCore::ContainerNode::ContainerNode):
1167         * dom/Document.cpp:
1168         (WebCore::Document::Document):
1169         * dom/Document.h:
1170         (WebCore::Node::Node):
1171         * dom/DocumentFragment.cpp:
1172         (WebCore::DocumentFragment::DocumentFragment):
1173         (WebCore::DocumentFragment::create):
1174         * dom/DocumentFragment.h:
1175         * dom/DocumentType.cpp:
1176         (WebCore::DocumentType::DocumentType):
1177         * dom/Element.h:
1178         (WebCore::Element::Element):
1179         * dom/Entity.h:
1180         (WebCore::Entity::Entity):
1181         * dom/EntityReference.cpp:
1182         (WebCore::EntityReference::EntityReference):
1183         * dom/Node.cpp:
1184         (WebCore::Node::~Node):
1185         (WebCore::Node::willBeDeletedFrom):
1186         * dom/Node.h:
1187         * dom/Notation.cpp:
1188         * dom/Notation.h:
1189         (WebCore::Notation::publicId):
1190         (WebCore::Notation::systemId):
1191         (WebCore::Notation::Notation):
1192         
1193             Remove cruft from this non-instantiated class.
1194
1195         * dom/ShadowRoot.cpp:
1196         (WebCore::ShadowRoot::ShadowRoot):
1197         (WebCore::ShadowRoot::~ShadowRoot):
1198         * dom/TemplateContentDocumentFragment.h:
1199
1200 2014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
1201
1202         Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
1203         https://bugs.webkit.org/show_bug.cgi?id=128681
1204
1205         Reviewed by Timothy Hatcher.
1206
1207         Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
1208         WebCore/inspector/*. Besides files in there, a few other files in
1209         JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
1210         and WebCore/testing were touched.
1211
1212         No new tests; no new behavior.
1213
1214         * WebCore.exp.in:
1215         * inspector/CommandLineAPIHost.cpp:
1216         * inspector/CommandLineAPIHost.h:
1217         * inspector/DOMEditor.cpp:
1218         * inspector/DOMPatchSupport.cpp:
1219         * inspector/DOMPatchSupport.h:
1220         * inspector/InspectorApplicationCacheAgent.h:
1221         * inspector/InspectorCSSAgent.cpp:
1222         * inspector/InspectorCSSAgent.h:
1223         * inspector/InspectorCanvasAgent.h:
1224         * inspector/InspectorDOMAgent.cpp:
1225         * inspector/InspectorDOMAgent.h:
1226         * inspector/InspectorDOMDebuggerAgent.h:
1227         * inspector/InspectorDOMStorageAgent.h:
1228         * inspector/InspectorDatabaseAgent.h:
1229         * inspector/InspectorFrontendClientLocal.cpp:
1230         * inspector/InspectorFrontendClientLocal.h:
1231         * inspector/InspectorHeapProfilerAgent.h:
1232         * inspector/InspectorHistory.cpp:
1233         * inspector/InspectorHistory.h:
1234         * inspector/InspectorIndexedDBAgent.h:
1235         * inspector/InspectorInputAgent.h:
1236         * inspector/InspectorLayerTreeAgent.h:
1237         * inspector/InspectorMemoryAgent.cpp:
1238         * inspector/InspectorMemoryAgent.h:
1239         * inspector/InspectorOverlay.cpp:
1240         * inspector/InspectorOverlay.h:
1241         * inspector/InspectorProfilerAgent.cpp:
1242         * inspector/InspectorProfilerAgent.h:
1243         * inspector/InspectorResourceAgent.cpp:
1244         * inspector/InspectorResourceAgent.h:
1245         * inspector/InspectorStyleSheet.cpp:
1246         * inspector/InspectorStyleSheet.h:
1247         * inspector/InspectorTimelineAgent.h:
1248         * inspector/InspectorWorkerAgent.cpp:
1249         * inspector/PageConsoleAgent.cpp:
1250         * inspector/PageRuntimeAgent.h:
1251         * inspector/WebConsoleAgent.cpp:
1252         * inspector/WorkerRuntimeAgent.h:
1253         * testing/Internals.cpp:
1254
1255 2014-02-17  Antti Koivisto  <antti@apple.com>
1256
1257         Rename Document::m_selfOnlyRefCount to m_referencingNodeCount
1258         https://bugs.webkit.org/show_bug.cgi?id=128916
1259
1260         Reviewed by Andreas Kling.
1261
1262         Make the name more informative. Also make it zero based (document is not considered to reference itself).
1263
1264         * dom/Document.cpp:
1265         (WebCore::Document::Document):
1266         (WebCore::Document::removedLastRef):
1267         * dom/Document.h:
1268         (WebCore::Document::increaseReferencingNodeCount):
1269         (WebCore::Document::decreaseReferencingNodeCount):
1270         (WebCore::Node::Node):
1271         * dom/Node.cpp:
1272         (WebCore::Node::~Node):
1273         * dom/TreeScopeAdopter.cpp:
1274         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1275         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1276
1277 2014-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
1278
1279         [GTK] Build failure caused by missing jsmin module
1280         https://bugs.webkit.org/show_bug.cgi?id=128742
1281
1282         Reviewed by Philippe Normand.
1283
1284         No new tests since no functionality changed.
1285
1286         * GNUmakefile.am: Relocate PYTHONPATH to make it meaningful.
1287
1288 2014-02-17  Radu Stavila  <stavila@adobe.com>
1289
1290         [CSS Regions] Make regions unsplittable
1291         https://bugs.webkit.org/show_bug.cgi?id=128811
1292
1293         Reviewed by David Hyatt.
1294
1295         At the moment, nested regions are not properly fragmented across regions. For the moment, 
1296         the regions will become unsplittable elements to avoid slicing. At a later time a proper
1297         fragmentation algorithm should be written, also taking into consideration pagination strut.
1298
1299         Test: fast/regions/unsplittable-nested-region.html
1300
1301         * rendering/RenderBox.cpp:
1302         (WebCore::RenderBox::isUnsplittableForPagination):
1303
1304 2014-02-17  Simon Fraser  <simon.fraser@apple.com>
1305
1306         Graphics buffer issue with clip-path and fixed positioned element
1307         https://bugs.webkit.org/show_bug.cgi?id=126262
1308
1309         Reviewed by Tim Horton.
1310         
1311         If an element has a clip-path, backgroundIsKnownToBeOpaqueInRect() needs
1312         to return false so that we don't try to make opaque compositing layers.
1313
1314         Test: compositing/contents-opaque/opaque-with-clip-path.html
1315
1316         * rendering/RenderBox.cpp:
1317         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
1318
1319 2014-02-17  Radu Stavila  <stavila@adobe.com>
1320
1321         [CSS Regions] The box decorations of an element overflowing a region should be clipped at the border box, not the content box
1322         https://bugs.webkit.org/show_bug.cgi?id=128815
1323
1324         Reviewed by Andrei Bucur.
1325
1326         Elements flowed into a region should not be painted past the region's content box
1327         if they continue to flow into another region in that direction.
1328         If they do not continue into another region in that direction, they should be
1329         painted all the way to the region's border box.
1330         Regions with overflow:hidden will apply clip at the border box, not the content box.
1331
1332         Tests: fast/regions/box-decorations-over-region-padding-fragmented.html
1333                fast/regions/box-decorations-over-region-padding-horiz-bt.html
1334                fast/regions/box-decorations-over-region-padding-vert-lr.html
1335                fast/regions/box-decorations-over-region-padding-vert-rl.html
1336                fast/regions/box-decorations-over-region-padding.html
1337
1338         * rendering/RenderNamedFlowFragment.cpp:
1339         (WebCore::RenderNamedFlowFragment::flowThreadPortionRectForClipping):
1340         * rendering/RenderNamedFlowFragment.h:
1341         * rendering/RenderRegion.cpp:
1342         (WebCore::RenderRegion::rectFlowPortionForBox):
1343
1344 2014-02-17  Brendan Long  <b.long@cablelabs.com>
1345
1346         DataCue.data should be a copy of the input ArrayBuffer, not a pointer
1347         https://bugs.webkit.org/show_bug.cgi?id=128886
1348
1349         Reviewed by Eric Carlson.
1350
1351         No new tests, just updated existing track-datacue.html test.
1352
1353         * html/track/DataCue.cpp:
1354         (WebCore::DataCue::DataCue): Add ExceptionCode and pass through to setData().
1355         (WebCore::DataCue::data): Return a copy of m_data instead of a pointer.
1356         (WebCore::DataCue::setData): Create a copy of the input data, or throw an exception if it's null.
1357         * html/track/DataCue.h: Add ExceptionCode parameters to constructor and data setter.
1358         * html/track/DataCue.idl: Same.
1359
1360 2014-02-17  David Kilzer  <ddkilzer@apple.com>
1361
1362         CounterContentData::counter() and ImageContentData::image() should return references
1363         <http://webkit.org/b/128671>
1364
1365         Reviewed by Darin Adler.
1366
1367         * css/CSSComputedStyleDeclaration.cpp:
1368         (WebCore::contentToCSSValue):
1369         - Update to use references.  Remove useless ASSERTs.
1370
1371         * css/StyleResolver.cpp:
1372         (WebCore::StyleResolver::loadPendingImages):
1373         - Update to use references.  StyleResolver::loadPendingImage()
1374           will be changed to take a reference in the near future.
1375
1376         * rendering/RenderElement.cpp:
1377         (WebCore::RenderElement::createFor):
1378         - Update to use references.  The auto keyword wanted to
1379           instantiate a StyleImage instead a reference, so it was
1380           replaced.
1381
1382         * rendering/style/ContentData.h:
1383         (WebCore::ImageContentData::ImageContentData): Add ASSERT that
1384         m_image is not NULL.
1385         (WebCore::ImageContentData::image): Return a reference.  Remove
1386         useless overload with identical name.
1387         (WebCore::ImageContentData::cloneInternal): Simplify by using
1388         implicit PassRefPtr constructor.
1389         (WebCore::operator==): Remove unneeded deref operators.
1390         (WebCore::CounterContentData::counter): Return a reference.
1391         (WebCore::CounterContentData::cloneInternal): Remove unneeded
1392         deref operator.
1393         (WebCore::operator==): Remove unneeded deref operators.
1394
1395 2014-02-17  Jer Noble  <jer.noble@apple.com>
1396
1397         [MediaControls][iOS] Make mediacontrols match the system inline controls
1398         https://bugs.webkit.org/show_bug.cgi?id=128833
1399
1400         Reviewed by Eric Carlson.
1401
1402         Move items slightly, fix button sizes, font sizes, and colors to match the
1403         inline controls from MoviePlayer.framework.
1404
1405         * Modules/mediacontrols/mediaControlsiOS.css:
1406         (audio::-webkit-media-controls-panel):
1407         (audio::-webkit-media-controls-fullscreen-button):
1408         (audio::-webkit-media-controls-play-button):
1409         (audio::-webkit-media-controls-play-button.paused):
1410         (audio::-webkit-media-controls-timeline):
1411         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
1412         (audio::-webkit-media-controls-time-remaining-display):
1413         * Modules/mediacontrols/mediaControlsiOS.js:
1414         (ControllerIOS.prototype.configureInlineControls): Do not add the status text.
1415         (ControllerIOS.prototype.updateTime): Call updateProgress().
1416         (ControllerIOS.prototype.progressFillStyle): Draw a slightly different color.
1417         (ControllerIOS.prototype.updateProgress): Draw white to the left of the currentTime.
1418         (ControllerIOS.prototype.formatTime): Single leading zero in the time display fields.
1419         (ControllerIOS.prototype.handleTimelineChange): Call updateProgress().
1420
1421 2014-02-17  Manuel Rego Casasnovas  <rego@igalia.com>
1422
1423         [CSS Grid Layout] Fix missing layout in flexible and content sized columns
1424         https://bugs.webkit.org/show_bug.cgi?id=128672
1425
1426         Reviewed by Sergio Villar Senin.
1427
1428         RenderGrid::logicalContentHeightForChild() is called for some items at the beginning of RenderGrid::layoutGridItems()
1429         from RenderGrid::computeUsedBreadthOfGridTracks(). This causes that the comparison inside the for loop in
1430         RenderGrid::layoutGridItems() does not detect width changes, so elements won't be marked as needsLayout.
1431
1432         So the comparison is done in RenderGrid::logicalContentHeightForChild() and the element is marked to perform a layout if
1433         the width has changed.
1434
1435         The issue can be reproduced easily with a simple grid with one flexible or content sized column, all the available width
1436         is not used. On top of that, when you resize the window the flexible or content sized columns are not updating their
1437         size properly.
1438
1439         CSS Grid Layout perftest results are around 4% worse, which is expected as we're adding a missing layout.
1440
1441         Test: fast/css-grid-layout/flex-content-sized-column-use-available-width.html
1442
1443         * rendering/RenderGrid.cpp:
1444         (WebCore::RenderGrid::logicalContentHeightForChild): Check width changes and mark element as needed layout if required.
1445
1446 2014-02-16  Andreas Kling  <akling@apple.com>
1447
1448         Ensure that removing an iframe from the DOM tree disconnects its Frame.
1449         <https://webkit.org/b/128889>
1450         <rdar://problem/15671221>
1451
1452         Merged from Blink (patch by Adam Klein):
1453         https://src.chromium.org/viewvc/blink?revision=156174&view=revision
1454
1455         SubframeLoadingDisabler wasn't catching the case when an <iframe> was,
1456         in its unload handler, removed and re-added to the same parent.
1457         Fix this by using a count of SubframeLoadingDisablers that are on the
1458         stack for a given root, rather than a simple boolean.
1459
1460         Test: fast/frames/reattach-in-unload.html
1461
1462         * html/HTMLFrameOwnerElement.h:
1463         (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
1464
1465 2014-02-16  Benjamin Poulain  <benjamin@webkit.org>
1466
1467         When applying style, attribute value matching should be case sensitive for SVG
1468         https://bugs.webkit.org/show_bug.cgi?id=128882
1469
1470         Reviewed by Andreas Kling.
1471
1472         SelectorChecker was incorrectly matching attribute values with a case insensitve comparison
1473         in some cases.
1474
1475         The choice to use case sensitive matching was taking into account the document type but not
1476         the element type. As a result, SVG (and likely MHTML) elements were incorrectly being tested
1477         as if they were HTML element.
1478
1479         With the patch, WebKit also matches the behavior of Firefox, which is great.
1480
1481         Tests: fast/css/case-insensitive-attribute-with-svg.html
1482                fast/selectors/querySelector-case-insensitive-attribute-match-with-svg.html
1483
1484         * css/SelectorChecker.cpp:
1485         (WebCore::SelectorChecker::checkOne):
1486
1487 2014-02-16  Benjamin Poulain  <benjamin@webkit.org>
1488
1489         Split compilation state between querySelector and CSS matching
1490         https://bugs.webkit.org/show_bug.cgi?id=128869
1491
1492         Reviewed by Antti Koivisto.
1493
1494         Cleanup after recent changes:
1495         -SelectorCompiler now has a SelectorContext defining if the code is compiled for QuerySelector
1496          or for ElementRuleCollector.
1497         -Generalize m_selectorCannotMatchAnything by making it part of the FunctionType. FunctionType now
1498          fully represent the type of code generation and we don't rely implicitly on m_selectorFragments being
1499          empty.
1500
1501         * css/ElementRuleCollector.cpp:
1502         (WebCore::ElementRuleCollector::ruleMatches):
1503
1504         * cssjit/SelectorCompiler.cpp:
1505         (WebCore::SelectorCompiler::compileSelector):
1506         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1507         There is no tree marking for QuerySelector, so we can generate a simple selector
1508         for the sibling selectors.
1509
1510         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1511         The code is split to make it simpler. The classic code generation has been moved
1512         to generateSelectorChecker().
1513         The decision on what to generate is reduced to a simple switch-case.
1514
1515         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1516         The code that was previously in compile().
1517
1518         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
1519         We should not generate tree marking on querySelector traversal. Since the constructor
1520         now generate a SimpleChecker, it would also be incorrect to attempt to access the checkingContext
1521         on the stack.
1522         We can just skip the marking entierly.
1523
1524         * cssjit/SelectorCompiler.h:
1525         * dom/SelectorQuery.cpp:
1526         (WebCore::SelectorDataList::execute):
1527         With the changes of SelectorContext, we can no longer generate a complex checker for querySelector.
1528         This code may come back in the future but at the moment it is useless.
1529
1530 2014-02-16  Benjamin Poulain  <bpoulain@apple.com>
1531
1532         The FTP view is squished to the left
1533         https://bugs.webkit.org/show_bug.cgi?id=128856
1534
1535         Reviewed by Andreas Kling.
1536
1537         * html/FTPDirectoryDocument.cpp:
1538         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
1539
1540 2014-02-16  Jae Hyun Park  <jae.park@company100.net>
1541
1542         [Coordinated Graphics] Make AreaAllocator fast allocated
1543         https://bugs.webkit.org/show_bug.cgi?id=124995
1544
1545         Reviewed by Anders Carlsson.
1546
1547         AreaAllocator can be created and destroyed frequently (at least once per
1548         frame) in case of animation with changing width or height. So, it's
1549         better to make AreaAllocator fast allocated.
1550
1551         * platform/graphics/texmap/coordinated/AreaAllocator.h:
1552
1553 2014-02-16  Pratik Solanki  <psolanki@apple.com>
1554
1555         [iOS] WebKit crashes if text is copied to pasteboard with style containing text-shadow
1556         https://bugs.webkit.org/show_bug.cgi?id=128888
1557         <rdar://problem/16065699>
1558
1559         Reviewed by Anders Carlsson.
1560
1561         Use the correct class on iOS so that we don't crash.
1562
1563         * platform/mac/HTMLConverter.mm:
1564         (_shadowForShadowStyle):
1565
1566 2014-02-16  Andreas Kling  <akling@apple.com>
1567
1568         Atomicize frequently identical ResourceResponse string members.
1569         <https://webkit.org/b/128887>
1570
1571         Store the mime type, text encoding and HTTP response status text in
1572         AtomicStrings instead of Strings to deduplicate frequently occurring
1573         values (e.g "text/html", "utf-8" and "OK".)
1574
1575         Reviewed by Geoffrey Garen.
1576
1577         * platform/network/ResourceResponseBase.h:
1578         * platform/network/cf/ResourceResponseCFNet.cpp:
1579         (WebCore::ResourceResponse::cfURLResponse):
1580         (WebCore::ResourceResponse::platformLazyInit):
1581         * platform/network/mac/ResourceResponseMac.mm:
1582         (WebCore::ResourceResponse::platformLazyInit):
1583
1584 2014-02-16  Dan Bernstein  <mitz@apple.com>
1585
1586         Speculative iOS build fix.
1587
1588         * dom/Document.cpp:
1589         (WebCore::Document::Document):
1590
1591 2014-02-15  Antti Koivisto  <antti@apple.com>
1592
1593         Move document life time management from TreeScope to Document
1594         https://bugs.webkit.org/show_bug.cgi?id=128877
1595
1596         Reviewed by Andreas Kling.
1597
1598         Document life time is managed in confusing manner by TreeScopes which are also inherited to ShadowRoots.
1599         
1600         This patches moves the life time management to Document. Nodes in shadow trees selfOnlyRef the Document instead
1601         of the ShadowRoot. ShadowRoot is treated like any other node and selfOnlyRefs the Document as well (which it
1602         also did earlier, indirectly).
1603         
1604         TreeScope is devirtualized.
1605
1606         * css/ElementRuleCollector.cpp:
1607         (WebCore::ElementRuleCollector::collectMatchingRules):
1608         
1609             Author stylesheets never match in UA shadow trees.
1610
1611         * dom/ContainerNode.cpp:
1612         (WebCore::ContainerNode::~ContainerNode):
1613         * dom/Document.cpp:
1614         (WebCore::Document::Document):
1615         (WebCore::Document::~Document):
1616         (WebCore::Document::removedLastRef):
1617         * dom/Document.h:
1618         (WebCore::Document::selfOnlyRef):
1619         (WebCore::Document::selfOnlyDeref):
1620
1621             To avoid branches Document self-refs itself like all other Nodes. This is why deletion will now happen on ref count of 1.
1622
1623         (WebCore::Node::isDocumentNode):
1624         (WebCore::Node::Node):
1625         * dom/DocumentOrderedMap.cpp:
1626         (WebCore::DocumentOrderedMap::add):
1627         * dom/Element.cpp:
1628         (WebCore::Element::insertedInto):
1629         (WebCore::Element::removedFrom):
1630         * dom/Node.cpp:
1631         (WebCore::Node::~Node):
1632         (WebCore::Node::removedLastRef):
1633         * dom/Node.h:
1634         (WebCore::Node::document):
1635         (WebCore::Node::inDocument):
1636         * dom/ShadowRoot.cpp:
1637         (WebCore::ShadowRoot::ShadowRoot):
1638         (WebCore::ShadowRoot::~ShadowRoot):
1639         * dom/ShadowRoot.h:
1640         * dom/TreeScope.cpp:
1641         (WebCore::TreeScope::TreeScope):
1642         (WebCore::TreeScope::~TreeScope):
1643         (WebCore::TreeScope::setParentTreeScope):
1644         * dom/TreeScope.h:
1645         (WebCore::TreeScope::documentScope):
1646         
1647             Document can no longer ever be null.
1648
1649         (WebCore::TreeScope::rootNode):
1650         (WebCore::TreeScope::setDocumentScope):
1651         * dom/TreeScopeAdopter.cpp:
1652         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1653         (WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
1654         
1655             Manage Document selfOnlyRefs for nodes in shadow trees too.
1656
1657         (WebCore::TreeScopeAdopter::updateTreeScope):
1658         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1659         * dom/TreeScopeAdopter.h:
1660
1661 2014-02-16  Ryosuke Niwa  <rniwa@webkit.org>
1662
1663         setSelectionRange shouldn't directly instantiate VisibleSelection
1664         https://bugs.webkit.org/show_bug.cgi?id=128881
1665
1666         Reviewed by Andreas Kling.
1667
1668         Added a new version of moveTo for setSelectionRange.
1669
1670         * editing/FrameSelection.cpp:
1671         (WebCore::FrameSelection::moveTo): Added.
1672         * editing/FrameSelection.h:
1673         * html/HTMLTextFormControlElement.cpp:
1674         (WebCore::HTMLTextFormControlElement::setSelectionRange): Use the newly added FrameSelection::moveTo
1675         instead of manually instantiating VisibleSelection here.
1676
1677 2014-02-16  Dan Bernstein  <mitz@apple.com>
1678
1679         Stop using PLATFORM(MAC) in Source except where it means “OS X but not iOS”
1680         https://bugs.webkit.org/show_bug.cgi?id=128885
1681
1682         Reviewed by Anders Carlsson.
1683
1684         * loader/FrameLoaderClient.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1685         * platform/Cursor.h: Changed PLATFORM(MAC) to USE(APPKIT) around uses of NSCursor.
1686         * platform/LocalizedStrings.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1687         * platform/graphics/PlatformLayer.h: Ditto.
1688         * platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
1689         * rendering/RenderLayerCompositor.cpp: Ditto.
1690         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
1691         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1692
1693 2014-02-16  Dan Bernstein  <mitz@apple.com>
1694
1695         Speculative iOS build fix after r164184.
1696
1697         * dom/Node.cpp:
1698         (WebCore::Node::defaultEventHandler):
1699
1700 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
1701
1702         DOMSelection shouldn't instantiate VisibleSelection everywhere
1703         https://bugs.webkit.org/show_bug.cgi?id=128879
1704
1705         Reviewed by Antti Koivisto.
1706
1707         Removed explicit instantiation of VisibleSelection from various member functions of VisibleSelection.
1708
1709         * page/DOMSelection.cpp:
1710         (WebCore::DOMSelection::collapse):
1711         (WebCore::DOMSelection::collapseToEnd):
1712         (WebCore::DOMSelection::collapseToStart):
1713         (WebCore::DOMSelection::setBaseAndExtent):
1714         (WebCore::DOMSelection::setPosition):
1715         (WebCore::DOMSelection::extend):
1716         (WebCore::DOMSelection::getRangeAt):
1717         (WebCore::DOMSelection::addRange):
1718
1719 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
1720
1721         Remove unused arguments from moveTo(Range*)
1722         https://bugs.webkit.org/show_bug.cgi?id=128878
1723
1724         Reviewed by Antti Koivisto.
1725
1726         Cleanup.
1727
1728         * bindings/objc/DOMUIKitExtensions.mm:
1729         (-[DOMRange move:inDirection:]):
1730         (-[DOMRange extend:inDirection:]):
1731         * editing/FrameSelection.cpp:
1732         (WebCore::FrameSelection::moveTo):
1733         * editing/FrameSelection.h:
1734
1735 2014-02-15  Filip Pizlo  <fpizlo@apple.com>
1736
1737         Vector with inline capacity should work with non-PODs
1738         https://bugs.webkit.org/show_bug.cgi?id=128864
1739
1740         Reviewed by Michael Saboff.
1741
1742         No new tests because no change behavior.
1743         
1744         Deques no longer have inline capacity because it was broken, and we didn't need it
1745         here anyway.
1746
1747         * page/WheelEventDeltaTracker.h:
1748
1749 2014-02-15  Andreas Kling  <akling@apple.com>
1750
1751         Add checked casts for Event.
1752         <https://webkit.org/b/128875>
1753
1754         Generate casting helpers for casting from Event to various subclasses
1755         and go on static_cast replacement spree.
1756
1757         Reviewed by Sam Weinig.
1758
1759 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
1760
1761         HTMLTextFormControlElement::subtreeHasChanged should be called before updating selection
1762         https://bugs.webkit.org/show_bug.cgi?id=128870
1763
1764         Reviewed by Darin Adler.
1765
1766         Extracted HTMLTextFormControlElement::didEditInnerTextValue out of HTMLTextFormControlElement::defaultEventHandler
1767         and called it in appliedEditing, unappliedEditing, and reappliedEditing before updating selection.
1768
1769         * editing/Editor.cpp:
1770         (WebCore::notifyTextFromControls): Added.
1771         (WebCore::Editor::appliedEditing): Update text form control's internal states before updating selection.
1772         (WebCore::Editor::unappliedEditing): Ditto.
1773         (WebCore::Editor::reappliedEditing): Ditto.
1774         * html/HTMLTextFormControlElement.cpp:
1775         (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
1776         * html/TextFieldInputType.cpp:
1777         (WebCore::TextFieldInputType::subtreeHasChanged): Removed a stale assertion from the time we used to do
1778         everything in the render tree.
1779
1780 2014-02-15  Andreas Kling  <akling@apple.com>
1781
1782         Add checked casts for ScriptExecutionContext.
1783         <https://webkit.org/b/128874>
1784
1785         Generate casting helpers for casting from ScriptExecutionContext to
1786         Document and WorkerGlobalScope. Apply heartily.
1787
1788         Reviewed by Antti Koivisto.
1789
1790 2014-02-15  Alexey Proskuryakov  <ap@apple.com>
1791
1792         [Mac] All WebKit clients should encrypt WebCrypto keys automatically
1793         https://bugs.webkit.org/show_bug.cgi?id=128852
1794
1795         Reviewed by Oliver Hunt.
1796
1797         Install a persistent master key in Keychain on first use of WebCrypto key serialization.
1798         The key is per application, protected with ACL.
1799
1800         * English.lproj/Localizable.strings:
1801         * WebCore.exp.in:
1802         * crypto/SerializedCryptoKeyWrap.h:
1803         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
1804         (WebCore::masterKeyAccountNameForCurrentApplication):
1805         (WebCore::getDefaultWebCryptoMasterKey):
1806         (WebCore::createAndStoreMasterKey):
1807         (WebCore::findMasterKey):
1808         * platform/LocalizedStrings.cpp:
1809         (WebCore::webCryptoMasterKeyKeychainLabel):
1810         (WebCore::webCryptoMasterKeyKeychainComment):
1811         * platform/LocalizedStrings.h:
1812
1813 2014-02-15  Ryosuke Niwa  <rniwa@webkit.org>
1814
1815         computeSelectionStart and computeSelectionEnd shouldn't trigger synchronous layout
1816         https://bugs.webkit.org/show_bug.cgi?id=128806
1817
1818         Reviewed by Darin Adler.
1819
1820         Added indexForPosition to HTMLTextFormControlElement. Like r163825, this patch traverses the DOM tree
1821         instead of the render tree to compute the index for a given position.
1822
1823         We traverse the DOM Tree backwards starting at the specified Position all the way back to the beginning
1824         of the inner text element. The index is computed as the number of characters we encountered during
1825         this backwards DOM traversal.
1826
1827         It's worth noting that passedPosition.computeNodeBeforePosition() returns and only returns 0 when the
1828         position is before the first node of its parent or inside a text node. In such cases, we call
1829         passedPosition.containerNode() to find the parent or the text node.
1830
1831         * html/HTMLTextFormControlElement.cpp:
1832         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Use indexForPosition.
1833         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Ditto.
1834         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Dotto.
1835         (WebCore::finishText): Cleanup. Use newlineCharacter instead of hard-coding '\n'.
1836         (WebCore::HTMLTextFormControlElement::indexForPosition): Added. See above for the description.
1837         * html/HTMLTextFormControlElement.h:
1838
1839 2014-02-15  Brent Fulgham  <bfulgham@apple.com>
1840
1841         [Win] Avoid unnecessary asserts if "prepareToPlay" is called multiple times.
1842         https://bugs.webkit.org/show_bug.cgi?id=128859
1843
1844         Reviewed by Eric Carlson.
1845
1846         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1847         (WebCore::AVFWrapper::createPlayer): Don't assert if player exists; just return the
1848         existing copy.
1849         (WebCore::AVFWrapper::createPlayerItem): Ditto (but with Player Items).
1850
1851 2014-02-15  Darin Adler  <darin@apple.com>
1852
1853         Remove double hashing from DatasetDOMStringMap::deleteItem
1854         https://bugs.webkit.org/show_bug.cgi?id=128865
1855
1856         Reviewed by Benjamin Poulain.
1857
1858         * dom/DatasetDOMStringMap.cpp:
1859         (WebCore::DatasetDOMStringMap::deleteItem): Removed call to hasAttribute, using the
1860         result from removeAttribute instead.
1861
1862         * dom/Element.cpp:
1863         (WebCore::Element::removeAttribute): Add a return value, false if nothing is removed,
1864         and true if something is removed.
1865         (WebCore::Element::removeAttributeNS): Ditto.
1866         * dom/Element.h: Ditto.
1867
1868 2014-02-15  Piotr Grad  <p.grad@samsung.com>
1869
1870         Setting currentTime on HTMLMediaElement with media controller should throw exception.
1871         https://bugs.webkit.org/show_bug.cgi?id=128867.
1872
1873         Reviewed by Eric Carlson.
1874
1875         Added implementation for setting currentTime in HTMLMediaElement. Old implementation
1876         was left to be used internally.
1877
1878         Test: media/video-controller-currentTime.html
1879
1880         * html/HTMLMediaElement.cpp:
1881         (WebCore::HTMLMediaElement::parseAttribute):
1882         * html/HTMLMediaElement.h:
1883         * html/HTMLMediaElement.idl:
1884
1885 2014-02-15  Anders Carlsson  <andersca@apple.com>
1886
1887         Form controls are always painted in the active state
1888         https://bugs.webkit.org/show_bug.cgi?id=128872
1889         <rdar://problem/9422677>
1890
1891         Reviewed by Dan Bernstein.
1892
1893         AppKit will always paint form controls in the active state if the view doesn't have a
1894         window. Fix this by adding a fake window whose key appearance we'll update based on the 
1895         control state. Also, rename WebCoreFlippedView to WebCoreThemeView since it stopped being
1896         just about the flippedness a long time ago.
1897
1898         * platform/mac/ThemeMac.h:
1899         * platform/mac/ThemeMac.mm:
1900         (-[WebCoreThemeWindow hasKeyAppearance]):
1901         Return themeWindowHasKeyAppearance.
1902
1903         (-[WebCoreThemeView window]):
1904         Create a WebCoreThemeWindow object lazily and return it.
1905
1906         (WebCore::paintCheckbox):
1907         (WebCore::paintRadio):
1908         (WebCore::paintButton):
1909         Pass the control states to ThemeMac::ensuredView.
1910
1911         (WebCore::ThemeMac::ensuredView):
1912         Set themeWindowHasKeyAppearance based on the control state.
1913
1914         * rendering/RenderThemeMac.mm:
1915         (WebCore::RenderThemeMac::documentViewFor):
1916         Pass the control states to ThemeMac::ensuredView.
1917
1918 2014-02-15  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1919
1920         ASSERT_WITH_SECURITY_IMPLICATION in WebCore::toElement
1921         https://bugs.webkit.org/show_bug.cgi?id=128810
1922
1923         Reviewed by Ryosuke Niwa.
1924
1925         Make CompositeEditCommand::cloneParagraphUnderNewElement() to work when |outerNode|
1926         doesn't contain |start|.
1927
1928         Before this patch, CompositeEditCommand::cloneParagraphUnderNewElement() tried to copy
1929         ancestry nodes from |start| to Document node when |start| position isn't in |outerNode|. This
1930         patch changes CompositeEditCommand::cloneParagraphUnderNewElement() to copy |start| to
1931         |outerNode| only if |outerNode| contains |start| position.
1932
1933         Merged from Blink https://src.chromium.org/viewvc/blink?revision=161762&view=revision by yosin@chromium.org.
1934
1935         Test: editing/execCommand/indent-with-uneditable-crash.html
1936
1937         * editing/CompositeEditCommand.cpp:
1938         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
1939
1940 2014-02-15  Samuel White  <samuel_white@apple.com>
1941
1942         AX: Add ability to specify descendant type when using AXUIElementsForSearchPredicate.
1943         https://bugs.webkit.org/show_bug.cgi?id=128747
1944
1945         Reviewed by Chris Fleizach.
1946
1947         Added support for 'immediate descendant only' to existing predicate based searching. This
1948         addition allows VoiceOver to fetch each child element lazily (rather than all at once via AXChildren).
1949
1950         Test: platform/mac/accessibility/search-predicate-immediate-descendants-only.html
1951
1952         * accessibility/AccessibilityObject.cpp:
1953         (WebCore::AccessibilityObject::findMatchingObjects):
1954         * accessibility/AccessibilityObject.h:
1955         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
1956         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1957         (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
1958
1959 2014-02-15  Jeremy Jones  <jeremyj@apple.com>
1960
1961         WK2 AVKit enter fullscreen doesn't work a second time.
1962         https://bugs.webkit.org/show_bug.cgi?id=128558
1963
1964         Reviewed by Jer Noble.
1965
1966         Lazily create WebAVPlayerController when needed.
1967
1968         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1969         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1970         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
1971         (WebVideoFullscreenInterfaceAVKit::getPlayerController):
1972         Add getPlayerController()
1973
1974         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
1975         (WebVideoFullscreenInterfaceAVKit::setDuration):
1976         (WebVideoFullscreenInterfaceAVKit::setCurrentTime):
1977         (WebVideoFullscreenInterfaceAVKit::setRate):
1978         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
1979         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
1980         (WebVideoFullscreenInterfaceAVKit::enterFullscreenWithCompletionHandler):
1981         use getPlayerController();
1982
1983 2014-02-15  Jer Noble  <jer.noble@apple.com>
1984
1985         [Mac] 10X slower than Chrome when drawing a video into a canvas
1986         https://bugs.webkit.org/show_bug.cgi?id=124599
1987
1988         Reviewed by Darin Adler.
1989
1990         Follow up patch to r159518 to address Darin's post-commit review.
1991
1992         * html/HTMLVideoElement.cpp:
1993         (WebCore::HTMLVideoElement::nativeImageForCurrentTime): Use nullptr.
1994         * platform/graphics/MediaPlayerPrivate.h:
1995         (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime): Ditto.
1996         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1997         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
1998         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the
1999                 AVPlayerItemVideoOutput's delegate callback.
2000         (WebCore::CVPixelBufferGetBytePointerCallback): Use static_cast.
2001         (WebCore::CVPixelBufferReleaseBytePointerCallback): Ditto.
2002         (WebCore::CVPixelBufferReleaseInfoCallback): Ditto.
2003         (-[WebCoreAVFPullDelegate initWithCallback:]): Space changes.
2004         (-[WebCoreAVFPullDelegate setCallback:]): Added.
2005         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]): Check the value of m_callback.
2006
2007 2014-02-14  Andreas Kling  <akling@apple.com>
2008
2009         CTTE: WorkerGlobalScope is always owned by a WorkerThread.
2010         <https://webkit.org/b/128834>
2011
2012         Codify this by storing the owner thread as a WorkerThread& and making
2013         thread() return a reference.
2014
2015         This exposed a couple of unnecessary assertions.
2016
2017         Reviewed by Anders Carlsson.
2018
2019         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
2020         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
2021         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2022         (WebCore::ThreadableWebSocketChannel::create):
2023         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2024         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
2025         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
2026         * bindings/js/ScheduledAction.cpp:
2027         (WebCore::ScheduledAction::execute):
2028         * bindings/js/WorkerScriptDebugServer.cpp:
2029         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
2030         * dom/ScriptExecutionContext.cpp:
2031         (WebCore::ScriptExecutionContext::createdMessagePort):
2032         (WebCore::ScriptExecutionContext::destroyedMessagePort):
2033         * inspector/WorkerDebuggerAgent.cpp:
2034         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
2035         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
2036         * inspector/WorkerInspectorController.cpp:
2037         * inspector/WorkerRuntimeAgent.cpp:
2038         (WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
2039         * loader/WorkerThreadableLoader.cpp:
2040         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2041         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2042         * loader/cache/MemoryCache.cpp:
2043         (WebCore::MemoryCache::removeRequestFromCache):
2044         * workers/DedicatedWorkerGlobalScope.cpp:
2045         (WebCore::DedicatedWorkerGlobalScope::create):
2046         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
2047         (WebCore::DedicatedWorkerGlobalScope::postMessage):
2048         (WebCore::DedicatedWorkerGlobalScope::importScripts):
2049         (WebCore::DedicatedWorkerGlobalScope::thread):
2050         * workers/DedicatedWorkerGlobalScope.h:
2051         * workers/DedicatedWorkerThread.cpp:
2052         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
2053         * workers/SharedWorkerGlobalScope.cpp:
2054         (WebCore::SharedWorkerGlobalScope::create):
2055         (WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
2056         (WebCore::SharedWorkerGlobalScope::thread):
2057         * workers/SharedWorkerGlobalScope.h:
2058         * workers/SharedWorkerThread.cpp:
2059         (WebCore::SharedWorkerThread::createWorkerGlobalScope):
2060         * workers/WorkerGlobalScope.cpp:
2061         (WebCore::CloseWorkerGlobalScopeTask::performTask):
2062         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2063         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
2064         (WebCore::WorkerGlobalScope::postTask):
2065         (WebCore::WorkerGlobalScope::logExceptionToConsole):
2066         (WebCore::WorkerGlobalScope::addConsoleMessage):
2067         (WebCore::WorkerGlobalScope::addMessage):
2068         (WebCore::WorkerGlobalScope::isContextThread):
2069         * workers/WorkerGlobalScope.h:
2070         (WebCore::WorkerGlobalScope::thread):
2071         * workers/WorkerMessagingProxy.cpp:
2072         (WebCore::MessageWorkerGlobalScopeTask::performTask):
2073         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
2074         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
2075         * workers/WorkerRunLoop.cpp:
2076         (WebCore::WorkerRunLoop::runInMode):
2077         (WebCore::WorkerRunLoop::runCleanupTasks):
2078
2079 2014-02-14  Ryosuke Niwa  <rniwa@webkit.org>
2080
2081         setSelectionRange shouldn't trigger a synchronous layout to check focusability when text field is already focused
2082         https://bugs.webkit.org/show_bug.cgi?id=128804
2083
2084         Reviewed by Enrica Casucci.
2085
2086         Don't trigger a synchronous layout at the beginning of setSelectionRange if the element is already focused
2087         since we don't have to check the size of render box in that case.
2088
2089         We should be able to get rid of this synchronous layout entirely once we fix https://webkit.org/b/128797
2090         but that's somewhat risky behavioral change so we'll do that in a separate patch.
2091
2092         * editing/FrameSelection.cpp:
2093         (WebCore::FrameSelection::selectAll): Fixed the bug where selectAll selects the entire document even if the text
2094         form contol is focused if the selection is none (i.e. not anchored to any node).
2095         * html/HTMLTextFormControlElement.cpp:
2096         (WebCore::HTMLTextFormControlElement::setSelectionRange): Only update the layout if the element is not focused
2097         already. Also pass in DoNotSetFocus option to setSelection since we already have the focus in that case.
2098
2099 2014-02-14  Dan Bernstein  <mitz@apple.com>
2100
2101         REGRESSION (r157443): Search fields with a non-white background don’t have a round bezel
2102         https://bugs.webkit.org/show_bug.cgi?id=126295
2103
2104         Reviewed by Ryosuke Niwa.
2105
2106         Reverted r157443 and improved comment.
2107
2108         * rendering/RenderTheme.cpp:
2109         (WebCore::RenderTheme::isControlStyled):
2110
2111 2014-02-14  Brian Burg  <bburg@apple.com>
2112
2113         Web Replay: AtomicString replay input names should be stored in a thread-local table
2114         https://bugs.webkit.org/show_bug.cgi?id=128829
2115
2116         Reviewed by Andreas Kling.
2117
2118         Similar to how DOM event names are frequently-used AtomicStrings, replay input
2119         names are also checked in many places as a "type tag". This patch puts all known
2120         input names into a class held by ThreadGlobalData and adds the shortcut `inputTypes()`
2121         so that replay input types can be referenced with `inputTypes.InputName()`.
2122
2123         * WebCore.xcodeproj/project.pbxproj:
2124         * platform/ThreadGlobalData.cpp: Add inputTypes() shortcut.
2125         (WebCore::ThreadGlobalData::ThreadGlobalData):
2126         * platform/ThreadGlobalData.h: Add inputTypes() shortcut.
2127         (WebCore::ThreadGlobalData::inputTypes):
2128         * replay/ReplayInputTypes.cpp: Added.
2129         (WebCore::ReplayInputTypes::ReplayInputTypes):
2130         * replay/ReplayInputTypes.h: Added.
2131         (WebCore::inputTypes): The input names are provided by per-framework macros that
2132         are generated by the replay inputs code generator.
2133
2134 2014-02-14  Jer Noble  <jer.noble@apple.com>
2135
2136         Add support for specced event handlers to HTMLMediaElement
2137         https://bugs.webkit.org/show_bug.cgi?id=128292
2138
2139         Reviewed by Andreas Kling.
2140
2141         Test: media/media-event-listeners.html
2142
2143         Add explicit event listener IDL attributes to HTMLMediaElement.
2144
2145         * html/HTMLMediaElement.h:
2146         * html/HTMLMediaElement.idl:
2147
2148 2014-02-14  Oliver Hunt  <oliver@apple.com>
2149
2150         Implement a few more Array prototype functions in JS
2151         https://bugs.webkit.org/show_bug.cgi?id=128788
2152
2153         Reviewed by Gavin Barraclough.
2154
2155         Minor change to ensure that the inspector is treating builtins
2156         as host functions.
2157
2158         Tests: js/regress/array-prototype-filter.html
2159                js/regress/array-prototype-forEach.html
2160                js/regress/array-prototype-map.html
2161                js/regress/array-prototype-some.html
2162
2163         * inspector/InspectorDOMAgent.cpp:
2164         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2165           Make sure we treat builtins as regular host functions
2166
2167 2014-02-14  Beth Dakin  <bdakin@apple.com>
2168
2169         Margin tiles are not created for the top and left sides when there is a < 1.0 
2170         scale factor
2171         https://bugs.webkit.org/show_bug.cgi?id=128842
2172
2173         Reviewed by Simon Fraser.
2174
2175         floor the result of the computation whenever we have a negative origin, to ensure 
2176         that we are rounding 'up' to a larger number of tiles. 
2177         * platform/graphics/ca/mac/TileController.mm:
2178         (WebCore::TileController::getTileIndexRangeForRect):
2179
2180 2014-02-13  Ryosuke Niwa  <rniwa@webkit.org>
2181
2182         setSelection should not synchronously trigger layout
2183         https://bugs.webkit.org/show_bug.cgi?id=128797
2184
2185         Reviewed by Antti Koivisto.
2186
2187         Only update the appearance and reveal selection when the style and the layout is already up to date.
2188         Otherwise, do so in performPostLayoutTasks.
2189
2190         * editing/FrameSelection.cpp:
2191         (WebCore::FrameSelection::FrameSelection):
2192         (WebCore::FrameSelection::setSelection): Set m_pendingSelectionUpdate and synchronously update caret rect
2193         if we don't need to update style or layout.
2194         (WebCore::updateSelectionByUpdatingLayoutOrStyle): Added. Used by FrameSelection member functions to
2195         trigger layout or style recalc whichever is needed.
2196         (WebCore::FrameSelection::updateAndRevealSelection): Extracted from setSelection.
2197         (WebCore::FrameSelection::absoluteCaretBounds): Call updateSelectionByUpdatingLayoutOrStyle since caret rect
2198         is no longer updated synchronously in setSelection.
2199         (WebCore::FrameSelection::recomputeCaretRect): Don't assert that visibleStart().absoluteCaretBounds() is
2200         equal to m_absCaretBounds since selection may no longer be caret at this point.
2201         (WebCore::FrameSelection::setCaretVisibility): Call updateSelectionByUpdatingLayoutOrStyle since we're
2202         synchronously calling into updateAppearance here. In the future, we should make this asynchronous as well.
2203         (WebCore::FrameSelection::selectionBounds): Call updateSelectionByUpdatingLayoutOrStyle since selection bounds
2204         could be outdated. This code only triggering style recalc was presumably a bug.
2205         * editing/FrameSelection.h:
2206
2207         * page/FrameView.cpp:
2208         (WebCore::FrameView::performPostLayoutTasks): Update selection's appearance and scroll to reveal selection
2209         as needed.
2210
2211 2014-02-14  Andreas Kling  <akling@apple.com>
2212
2213         Purge remaining ENABLE(SHADOW_DOM) cruft.
2214         <https://webkit.org/b/128827>
2215
2216         Remove the remaining 8.8 million lines of Shadow DOM code to align
2217         with goals for intent to ship 60fps on mobile in 2014.
2218
2219         Reviewed by Antti Koivisto.
2220
2221 2014-02-13  Jer Noble  <jer.noble@apple.com>
2222
2223         [MediaControls][iOS] Embedded YouTube does not show a 'paused' button state after starting
2224         https://bugs.webkit.org/show_bug.cgi?id=128755
2225
2226         Reviewed by Eric Carlson.
2227
2228         Don't rely on "canPlay()", instead, take the information directly from the event itself. I.e., when
2229         handling the 'play' event, switch mode to playing, and vice versa for the 'pause' event.
2230
2231         * Modules/mediacontrols/mediaControlsApple.js:
2232         (Controller.prototype.handlePlay):
2233         (Controller.prototype.handlePause):
2234         (Controller.prototype.updatePlaying):
2235         (Controller.prototype.setPlaying):
2236
2237 2014-02-13  Jer Noble  <jer.noble@apple.com>
2238
2239         [MediaControls][iOS] Start playback button is visible when playing embedded YouTube
2240         https://bugs.webkit.org/show_bug.cgi?id=128754
2241
2242         Reviewed by Eric Carlson.
2243
2244         Update shouldHaveStartPlaybackButton to match the behavior of the plugin proxy.
2245
2246         Add a accessor to determine whether playback has been requested:
2247         * Modules/mediacontrols/MediaControlsHost.cpp:
2248         (WebCore::MediaControlsHost::userGestureRequired):
2249         * Modules/mediacontrols/MediaControlsHost.h:
2250         * Modules/mediacontrols/MediaControlsHost.idl:
2251
2252         Update the logic of shouldHaveStartPlaybackButton.
2253         * Modules/mediacontrols/mediaControlsiOS.js:
2254         (ControllerIOS.prototype.shouldHaveStartPlaybackButton):
2255
2256 2014-02-13  Jer Noble  <jer.noble@apple.com>
2257
2258         [MediaControls] Add support for a loading progress meter
2259         https://bugs.webkit.org/show_bug.cgi?id=128651
2260
2261         Reviewed by Eric Carlson.
2262
2263         Draw the loaded ranges underneath the timeline slider. Use a -webkit-canvas()
2264         CSS function to allow the track of the slider to reflect the current state of
2265         the video's loadedTimeRanges property.
2266
2267         Since -webkit-canvas() will share a backing store with all other CSS images using
2268         the same identifier, use a monotonically increasing identifier to uniquely identify the timeline on a per-document basis.
2269
2270         * Modules/mediacontrols/mediaControlsApple.css:
2271         (audio::-webkit-media-controls-timeline):
2272         * Modules/mediacontrols/mediaControlsApple.js:
2273         (Controller): Call updateProgress().
2274         (Controller.prototype.createControls): Set up the canvas style and identifier.
2275         (Controller.prototype.handleLoadStart): Call updateProgress().
2276         (Controller.prototype.handleStalled): Ditto.
2277         (Controller.prototype.handleReadyStateChange): Ditto.
2278         (Controller.prototype.handleDurationChange): Ditto.
2279         (Controller.prototype.handleProgress): Ditto.
2280         (Controller.prototype.progressFillStyle): Added an easily overridable method
2281             to determine the fill color of the progress bar.
2282         (Controller.prototype.updateProgress): Draw the loadedTimeRanges into the timeline slider.
2283         * Modules/mediacontrols/mediaControlsiOS.js:
2284         (ControllerIOS.prototype.progressFillStyle): Override.
2285
2286 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
2287
2288         Clean up JSDOMStringMap::deleteProperty
2289         https://bugs.webkit.org/show_bug.cgi?id=128801
2290
2291         Reviewed by Geoffrey Garen.
2292
2293         Follow up on my cleaning of JSDOMStringMapCustom, this time for deletion.
2294
2295         Previously, we would query for the name, then call deleteItem() if the name was
2296         found. Instead, everything is moved to deleteItem which then return if the deletion
2297         is successful or not.
2298
2299         By using convertPropertyNameToAttributeName, we can use Element::hasAttribute() directly
2300         to find if the attribute exists or not. If it exists, we remove it.
2301
2302         Theoretically we could have a single pass over the attributes to find->delete but this
2303         code is not hot enough to justify anything fancy at this point.
2304
2305         Finally, we no longer check for isValidPropertyName() on deletion. JSDOMStringMapCustom
2306         was the last client of DatasetDOMStringMap::deleteItem() and it could not call deleteItem()
2307         with invalid name since the name would have failed DatasetDOMStringMap::contains().
2308         The spec does not specify any name checking either for deletion so we are safe just ignoring
2309         invalid input.
2310
2311         * bindings/js/JSDOMStringMapCustom.cpp:
2312         (WebCore::JSDOMStringMap::deleteProperty):
2313         * dom/DatasetDOMStringMap.cpp:
2314         (WebCore::DatasetDOMStringMap::deleteItem):
2315         * dom/DatasetDOMStringMap.h:
2316
2317 2014-02-14  Benjamin Poulain  <bpoulain@apple.com>
2318
2319         Improve the performance on mobile of FTPDirectoryDocument
2320         https://bugs.webkit.org/show_bug.cgi?id=128778
2321
2322         Reviewed by Antti Koivisto.
2323
2324         Little cleanup.
2325
2326         * html/FTPDirectoryDocument.cpp:
2327         (WebCore::FTPDirectoryDocumentParser::appendEntry):
2328         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
2329         (WebCore::processFilesizeString):
2330         (WebCore::wasLastDayOfMonth):
2331         (WebCore::processFileDateString):
2332         (WebCore::FTPDirectoryDocumentParser::parseAndAppendOneLine):
2333         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
2334         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
2335
2336 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
2337
2338         Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
2339         https://bugs.webkit.org/show_bug.cgi?id=128728
2340
2341         Reviewed by Andreas Kling.
2342
2343         In most cases, we don't even need to test for the flag animatedSVGAttributesNotDirty.
2344         If the selector filter could never match an animatable attribute, there is no point in testing for one.
2345
2346         * cssjit/SelectorCompiler.cpp:
2347         (WebCore::SelectorCompiler::canMatchStyleAttribute):
2348         Skip the second test when the local name is equal to canonicalLocalName. That is the common case.
2349
2350         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
2351         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
2352
2353         * svg/SVGElement.cpp:
2354         (WebCore::addQualifiedName):
2355         (WebCore::SVGElement::animatableAttributeForName):
2356         (WebCore::SVGElement::isAnimatableAttribute):
2357         (WebCore::SVGElement::filterOutAnimatableAttribute):
2358         * svg/SVGElement.h:
2359         * svg/SVGScriptElement.cpp:
2360         (WebCore::SVGScriptElement::filterOutAnimatableAttribute):
2361         * svg/SVGScriptElement.h:
2362         Move the list of animatable attribute to a static function available in Release.
2363         Selector matching is a lot more flexible than normal name matching. Since the local name must
2364         always match, it is used as a key to get the full QualifiedName to compare to the selector.
2365
2366         Separating the list of animatable attributes between Selectors and SVGElement::isAnimatableAttribute
2367         would be error prone. Instead, SVGElement::isAnimatableAttribute() is modified to use
2368         SVGElement::animatableAttributeForName so that the two never get out of sync.
2369
2370         Since SVGScriptElement has one additional restriction to isAnimatableAttribute(), the function
2371         filterOutAnimatableAttribute() is added to remove a qualified name from the complete list of animatable attributes.
2372         This ensure SVGElement::animatableAttributeForName() always has the complete list, and subclasses of SVGElement
2373         can only remove QualifiedNames, not add them.
2374
2375 2014-02-14  Benjamin Poulain  <benjamin@webkit.org>
2376
2377         Make code generation of the unoptimized pseudo classes separate
2378         https://bugs.webkit.org/show_bug.cgi?id=128704
2379
2380         Reviewed by Andreas Kling.
2381
2382         Mapping the unoptimized selectors when generating the code was useful for debugging
2383         but those cases are so common that looping over unoptimizedPseudoCheckers was more
2384         costly than anticipated.
2385
2386         This patch moves the unoptimized pseudo selector in their own array to simplify code generation.
2387
2388         * cssjit/SelectorCompiler.cpp:
2389         (WebCore::SelectorCompiler::addPseudoType):
2390         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2391         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2392
2393 2014-02-14  Myles C. Maxfield  <mmaxfield@apple.com>
2394
2395         Implement text-decoration-skip: auto
2396         https://bugs.webkit.org/show_bug.cgi?id=128786
2397
2398         Reviewed by Dean Jackson.
2399
2400         http://lists.w3.org/Archives/Public/www-style/2014Feb/0485.html
2401         We are updating the initial value of text-decoration-skip to a new value, "auto".
2402         On Mac + iOS, this will have the same behavior as "skip".
2403
2404         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html
2405
2406         * css/CSSComputedStyleDeclaration.cpp:
2407         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
2408         * css/CSSParser.cpp:
2409         (WebCore::CSSParser::parseTextDecorationSkip):
2410         * css/DeprecatedStyleBuilder.cpp:
2411         (WebCore::valueToDecorationSkip):
2412         * rendering/InlineTextBox.cpp:
2413         (WebCore::InlineTextBox::paintDecoration):
2414         * rendering/style/RenderStyle.h:
2415         * rendering/style/RenderStyleConstants.h:
2416
2417 2014-02-13  Simon Fraser  <simon.fraser@apple.com>
2418
2419         Give ScrollingTree(State)Nodes a reference to another layer, which is used for moving overflow:scroll contents around
2420         https://bugs.webkit.org/show_bug.cgi?id=128790
2421
2422         Reviewed by Beth Dakin.
2423
2424         Have scrolling tree nodes and state nodes track another layer, the
2425         "scrolled contents layer", for accelerated overflow:scroll.
2426         
2427         When making ScrollingTreeScrollingNodes for overflow:scroll, the node's
2428         layer will point to the composited element's primary layer, and its
2429         scrolledContentsLayer to the layer that gets moved around by scrolling.
2430         
2431         Do some other cleanup on AsyncScrollingCoordinator, removing
2432         functions that just called through to nodes.
2433
2434         * WebCore.exp.in:
2435         * page/scrolling/AsyncScrollingCoordinator.cpp:
2436         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2437         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
2438         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
2439         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
2440         (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
2441         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
2442         * page/scrolling/AsyncScrollingCoordinator.h:
2443         * page/scrolling/ScrollingCoordinator.h:
2444         (WebCore::ScrollingCoordinator::updateScrollingNode):
2445         * page/scrolling/ScrollingStateScrollingNode.cpp:
2446         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2447         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
2448         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
2449         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
2450         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
2451         * page/scrolling/ScrollingStateScrollingNode.h:
2452         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
2453         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
2454         (WebCore::ScrollingTreeScrollingNodeIOS::updateBeforeChildren):
2455         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2456         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2457         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2458         * rendering/RenderLayerCompositor.cpp:
2459         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
2460
2461 2014-02-14  Chris Fleizach  <cfleizach@apple.com>
2462
2463         AX: WebKit needs heuristics to differentiate lists used for layout from semantic data lists, similar to the heuristics for layout tables versus data tables.
2464         https://bugs.webkit.org/show_bug.cgi?id=122320
2465
2466         Reviewed by Mario Sanchez Prada.
2467
2468         Many authors use lists for layout, rather than presenting data. Exposing these kinds of lists to accessibility users
2469         makes the web harder to process and listen, while degrading the importance of real lists.
2470
2471         This introduces heuristics to filter out layout lists with the following:
2472            1. If it's a named list, like ol or aria=list, then it's a list.
2473              1a. Unless the list has no children, then it's not a list.
2474            2. If it displays visible list markers, it's a list.
2475            3. If it does not display list markers and has only one child, it's not a list.
2476            4. If it does not have any listitem children, it's not a list.
2477            5. Otherwise it's a list (for now).
2478
2479         Test: accessibility/list-detection.html
2480
2481         * accessibility/AccessibilityList.cpp:
2482         (WebCore::AccessibilityList::determineAccessibilityRole):
2483         (WebCore::AccessibilityList::roleValue):
2484         * accessibility/AccessibilityList.h:
2485
2486 2014-02-14  Brendan Long  <b.long@cablelabs.com>
2487
2488         Use AtomicString arguments in TrackPrivateBaseClient callbacks
2489         https://bugs.webkit.org/show_bug.cgi?id=128765
2490
2491         Reviewed by Eric Carlson.
2492
2493         No new tests because this doesn't change functionality.
2494
2495         * html/track/AudioTrack.cpp:
2496         (WebCore::AudioTrack::idChanged):
2497         (WebCore::AudioTrack::labelChanged):
2498         (WebCore::AudioTrack::languageChanged):
2499         * html/track/AudioTrack.h:
2500         * html/track/InbandTextTrack.cpp:
2501         (WebCore::InbandTextTrack::InbandTextTrack):
2502         (WebCore::InbandTextTrack::idChanged):
2503         (WebCore::InbandTextTrack::labelChanged):
2504         (WebCore::InbandTextTrack::languageChanged):
2505         * html/track/InbandTextTrack.h:
2506         * html/track/VideoTrack.cpp:
2507         (WebCore::VideoTrack::idChanged):
2508         (WebCore::VideoTrack::labelChanged):
2509         (WebCore::VideoTrack::languageChanged):
2510         * html/track/VideoTrack.h:
2511         * platform/graphics/TrackPrivateBase.h:
2512
2513 2014-02-14  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
2514
2515         ASSERTION FAILED: comparePositions(newEnd, newStart) >= 0 in WebCore::ApplyStyleCommand::updateStartEnd
2516         https://bugs.webkit.org/show_bug.cgi?id=121791
2517
2518         Reviewed by Darin Adler.
2519
2520         If WebCore::ApplyStyleCommand::applyBlockStyle() creates a TextIterator for a range
2521         that has an element with ReplacedElement rendering object, then a ',' is emitted in the
2522         constructor of TextIterator. Due to this comma the end of the run range can be at the
2523         wrong position, what makes the assertion fire. This situation can be handled the same
2524         way in TextIterator::rangeFromLocationAndLength() as we do in case of the emitted '\n's.
2525
2526         Test: editing/execCommand/remove-formatting-from-iframe-in-button.html
2527
2528         * editing/TextIterator.cpp:
2529         (WebCore::TextIterator::rangeFromLocationAndLength):
2530
2531 2014-02-14  Andrei Bucur  <abucur@adobe.com>
2532
2533         [CSS Regions] visibility: hidden on a region should hide its content
2534         https://bugs.webkit.org/show_bug.cgi?id=128814
2535
2536         Reviewed by Mihnea Ovidenie.
2537
2538         The patch properly checks that the content of a region layer should be painted before actually
2539         calling the paint function (for example, when visibility: hidden is specified on a region, its
2540         content should be hidden).
2541
2542         Test: fast/regions/visibility-hidden.html
2543
2544         * rendering/RenderLayer.cpp:
2545         (WebCore::RenderLayer::paintLayerContents):
2546
2547 2014-02-14  László Langó  <llango.u-szeged@partner.samsung.com>
2548
2549         Follow-up fix after r164036.
2550
2551         Reviewed by Csaba Osztrogonác.
2552
2553         * dom/Document.cpp:
2554         (WebCore::Document::create):
2555
2556 2014-02-13  Byungseon Shin  <sun.shin@lge.com>
2557
2558         [MSE] Move PublicURLManager shutdown logic so ActiveDOMObjects associated with public URLs won't leak.
2559         https://bugs.webkit.org/show_bug.cgi?id=128532
2560
2561         Reviewed by Jer Noble.
2562
2563         This fixes a leak of DOM objects by breaking the circular reference 
2564         between Document, PublicURLManager, and MediaSource. 
2565         Instead of clearing PublicURLManager at destruction-time, 
2566         which is delayed indefinitely because of the circular reference, 
2567         clear the PublicURLManager during ActiveDOMObject::stop().
2568
2569         Frome Blink r151890 by <acolwell@chromium.org>
2570         <https://src.chromium.org/viewvc/blink?view=rev&revision=151890>
2571
2572         * dom/ScriptExecutionContext.cpp:
2573         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
2574         (WebCore::ScriptExecutionContext::publicURLManager):
2575         * html/DOMURL.h:
2576         * html/PublicURLManager.cpp:
2577         (WebCore::PublicURLManager::create):
2578         (WebCore::PublicURLManager::PublicURLManager):
2579         (WebCore::PublicURLManager::registerURL):
2580         (WebCore::PublicURLManager::stop):
2581         * html/PublicURLManager.h:
2582
2583 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
2584
2585         Remove position:sticky runtime flag
2586         https://bugs.webkit.org/show_bug.cgi?id=128774
2587
2588         Reviewed by Simon Fraser.
2589
2590         Rollout of r128663
2591
2592         No new tests are necessary because there is no behavior change.
2593
2594         * css/CSSParser.cpp:
2595         (WebCore::CSSParserContext::CSSParserContext):
2596         (WebCore::operator==):
2597         (WebCore::isValidKeywordPropertyAndValue):
2598         * css/CSSParserMode.h:
2599         * dom/Document.cpp:
2600         * dom/Document.h:
2601         * page/Settings.cpp:
2602         (WebCore::Settings::Settings):
2603         * page/Settings.h:
2604
2605 2014-02-04  Gustavo Noronha Silva  <gns@gnome.org>
2606
2607         [GTK][CMake] Generate GObject DOM bindings .symbols files
2608         https://bugs.webkit.org/show_bug.cgi?id=126210
2609
2610         Reviewed by Martin Robinson.
2611
2612         No new tests. Build change only.
2613
2614         * CMakeLists.txt: list Quota module files and IDLs even if the feature
2615         is disabled, for GTK, since we rely on that for our DOM bindings.
2616         * PlatformGTK.cmake: add a new target to check for DOM symbols API by
2617         running the new python script.
2618         * bindings/gobject/GNUmakefile.am: call the new python script instead
2619         of using a custom rule.
2620
2621 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
2622
2623         text-decoration-skip: ink skips randomly when using SVG fonts
2624         https://bugs.webkit.org/show_bug.cgi?id=128709
2625
2626         Reviewed by Simon Fraser.
2627
2628         This patch simply disables skipping underlines being used with SVG fonts.
2629         It's a stopgap until we can support skipping properly with SVG fonts.
2630
2631         Test: svg/custom/svg-fonts-skip-ink.html
2632
2633         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2634         (WebCore::FontPlatformData::ctFont):
2635         * platform/graphics/mac/FontMac.mm:
2636         (WebCore::Font::dashesForIntersectionsWithRect):
2637
2638 2014-02-13  Daniel Bates  <dabates@apple.com>
2639
2640         Fix the ARM build when HAVE_ARM_NEON_INTRINSICS is enabled
2641
2642         Add !HAVE(ARM_NEON_INTRINSICS)-guard around file-level inline function arithmeticSoftware to
2643         avoid an unused function compiler warning when building with ARM Neon intrinsics.
2644
2645         * platform/graphics/filters/FEComposite.cpp:
2646
2647 2014-02-13  Brady Eidson  <beidson@apple.com>
2648
2649         IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
2650         https://bugs.webkit.org/show_bug.cgi?id=128763
2651
2652         Reviewed by Anders Carlsson.
2653
2654         No new tests (Covered by three existing tests)
2655
2656         * platform/KeyedCoding.h:
2657         (WebCore::KeyedEncoder::encodeObjects): If the array is empty we still have to begin() and end() it.
2658
2659 2014-02-13  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2660
2661         [css3-text] Support -webkit-text-decoration-skip: objects
2662         https://bugs.webkit.org/show_bug.cgi?id=128723
2663
2664         Reviewed by Dean Jackson.
2665
2666         Implemented 'objects' value of text-decoration-skip.
2667         http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/#text-decoration-skip
2668
2669         This is initial value and same behavior without
2670         ENABLE_CSS3_TEXT_DECORATION_SKIP_INK flag. Threfore, this patch only
2671         added parser code and constant for 'objects'.
2672
2673         Changed the initial value of text-decoration-skip.
2674
2675         The current implementation parses 'none', but the rendering code is
2676         not match the spec, so this patch added FIXME to the rendering code.
2677
2678         * css/CSSComputedStyleDeclaration.cpp:
2679         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
2680         * css/CSSParser.cpp:
2681         (WebCore::CSSParser::parseTextDecorationSkip):
2682         * css/CSSValueKeywords.in:
2683         * css/DeprecatedStyleBuilder.cpp:
2684         (WebCore::valueToDecorationSkip):
2685         * rendering/InlineTextBox.cpp:
2686         (WebCore::InlineTextBox::paintDecoration):
2687         * rendering/style/RenderStyle.h:
2688         * rendering/style/RenderStyleConstants.h:
2689
2690 2014-02-13  Daniel Bates  <dabates@apple.com>
2691
2692         Fix ARM NEON build following <http://trac.webkit.org/changeset/164058>
2693         (https://bugs.webkit.org/show_bug.cgi?id=128767)
2694
2695         I inadvertently didn't include header NEONHelpers.h, which defines WebCore::loadRGBA8AsFloat().
2696
2697         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
2698
2699 2014-02-13  Daniel Bates  <dabates@apple.com>
2700
2701         Write FEComposite::computeArithmeticPixelsNeon() in terms of loadRGBA8AsFloat()
2702         https://bugs.webkit.org/show_bug.cgi?id=128767
2703
2704         Reviewed by Dean Jackson.
2705
2706         This patch was inspired by Gabor Rapcsanyi's work in <https://bugs.webkit.org/show_bug.cgi?id=90669>.
2707
2708         Currently we duplicate code in FEComposite::computeArithmeticPixelsNeon() to read pixel data.
2709         Instead we should use the convenience function WebCore::loadRGBA8AsFloat. This also resolves
2710         an uninitialized variable compiler warning in the existing code.
2711
2712         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
2713         (WebCore::FEComposite::computeArithmeticPixelsNeon):
2714
2715 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
2716
2717         During a copy, position:fixed gets converted to position:absolute even if only part of the document is selected
2718         https://bugs.webkit.org/show_bug.cgi?id=128688
2719
2720         Reviewed by Ryosuke Niwa.
2721
2722         Adds a field, m_needsPositionStyleConversion, to StyledMarkupAccumulator.
2723
2724         Also, renames the ConvertPositionStyleOnCopy setting to ShouldConvertPositionStyleOnCopy
2725
2726         Test: editing/pasteboard/copy-paste-doesnt-convert-sticky-and-fixed-during-partial-copy.html
2727
2728         * editing/markup.cpp:
2729         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
2730         (WebCore::StyledMarkupAccumulator::appendElement):
2731         (WebCore::createMarkupInternal):
2732         * page/Settings.in:
2733         * testing/InternalSettings.cpp:
2734         (WebCore::InternalSettings::Backup::Backup):
2735         (WebCore::InternalSettings::Backup::restoreTo):
2736         (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy):
2737         * testing/InternalSettings.h:
2738         * testing/InternalSettings.idl:
2739
2740 2014-02-12  Timothy Hatcher  <timothy@apple.com>
2741
2742         Enable inspection of recently used IndexedDB databases.
2743
2744         https://bugs.webkit.org/show_bug.cgi?id=128687
2745
2746         Reviewed by Brady Eidson & Joseph Pecoraro.
2747
2748         * Modules/indexeddb/IDBFactory.cpp:
2749         (WebCore::IDBFactory::getDatabaseNames):
2750         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2751         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2752         (WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
2753         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2754         Fix up the arguments passed to getDatabaseNames.
2755
2756         * WebCore.xcodeproj/project.pbxproj:
2757         Make DOMStringList.h private so WebKit2 can use it.
2758
2759         * inspector/InspectorIndexedDBAgent.cpp:
2760         Modernize the loops and remove some PLATFORM(COCOA) ifdefs to
2761         compile the code. 
2762
2763         * inspector/protocol/IndexedDB.json: Use number for version to
2764         allow larger values instead of clamping to int.
2765
2766 2014-02-13  Chang Shu  <cshu@webkit.org>
2767
2768         Copying (createMarkup) wrapping text results in space between wrapped lines stripped.
2769         https://bugs.webkit.org/show_bug.cgi?id=63233
2770
2771         The problem is StyledMarkupAccumulator uses renderedText and the space at
2772         the end of the text has been stripped when the tag after the text was wrapped.
2773
2774         Reviewed by Ryosuke Niwa.
2775
2776         Test: editing/pasteboard/copy-text-with-wrapped-tag.html
2777
2778         * editing/TextIterator.cpp:
2779         (WebCore::TextIterator::TextIterator):
2780         (WebCore::TextIterator::handleTextBox):
2781         * editing/TextIterator.h:
2782         Check the special case when the iterator runs over a range that is followed by a non-text box.
2783         In this case, the possible last space has been collapsed and needs to be restored.
2784         * editing/markup.cpp:
2785         (WebCore::StyledMarkupAccumulator::renderedText):
2786         Check if the range is followed by more nodes and pass this information to the constructed TextIterator.
2787
2788 2014-02-13  Myles C. Maxfield  <mmaxfield@apple.com>
2789
2790         Gaps for text-decoration-skip: ink are calculated assuming the glyph orientation is the same as the run orientation
2791         https://bugs.webkit.org/show_bug.cgi?id=128718
2792
2793         Reviewed by Darin Adler.
2794
2795         This is a stop-gap patch to make underlines in CJK text not look terrible. A long-term fix is to refactor
2796         showGlyphsWithAdvances to move rotation logic into a common place that the text-decoration-skip: ink code
2797         can use.
2798
2799         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-orientation-upright.html
2800
2801         * rendering/InlineTextBox.cpp:
2802         (WebCore::InlineTextBox::paintDecoration):
2803
2804 2014-02-13  Andreas Kling  <akling@apple.com>
2805
2806         InsertIntoTextNodeCommand should get Settings from the Frame.
2807         <https://webkit.org/b/128678>
2808
2809         EditCommands have a frame() accessor that returns a reference,
2810         so there's no need to go through Document.
2811
2812         Reviewed by Anders Carlsson.
2813
2814         * editing/InsertIntoTextNodeCommand.cpp:
2815         (WebCore::InsertIntoTextNodeCommand::doApply):
2816
2817 2014-02-13  László Langó  <llango.u-szeged@partner.samsung.com>
2818
2819         Document should be constructable
2820         https://bugs.webkit.org/show_bug.cgi?id=115643
2821
2822         Reviewed by Darin Adler.
2823
2824         http://www.w3.org/TR/2014/WD-dom-20140204/#interface-document
2825         Make Document constructable so that one can do "new Document"
2826         instead of "document.implementation.createHTMLDocument('')".
2827
2828         Test: fast/dom/Document/document-constructor.html
2829
2830         * dom/Document.cpp:
2831         (WebCore::Document::create):
2832         (WebCore::Document::origin):
2833         * dom/Document.h:
2834         * dom/Document.idl:
2835
2836 2014-02-13  Javier Fernandez  <jfernandez@igalia.com>
2837
2838         [CSS Grid Layout] Rename named areas property
2839         https://bugs.webkit.org/show_bug.cgi?id=127990
2840
2841         Reviewed by Sergio Villar Senin.
2842
2843         From Blink r165891 by <rego@igalia.com>
2844
2845         The property 'grid-template' has been renamed to 'grid-template-areas'
2846         in the last two versions of the spec.
2847
2848         * CMakeLists.txt:
2849         * GNUmakefile.list.am:
2850         * WebCore.vcxproj/WebCore.vcxproj:
2851         * WebCore.vcxproj/WebCore.vcxproj.filters:
2852         * WebCore.xcodeproj/project.pbxproj:
2853         * css/CSSComputedStyleDeclaration.cpp:
2854         (WebCore::ComputedStyleExtractor::propertyValue):
2855         * css/CSSGridTemplateAreasValue.cpp: Renamed from Source/WebCore/css/CSSGridTemplateValue.cpp.
2856         (WebCore::CSSGridTemplateAreasValue::CSSGridTemplateAreasValue):
2857         (WebCore::stringForPosition):
2858         (WebCore::CSSGridTemplateAreasValue::customCSSText):
2859         * css/CSSGridTemplateAreasValue.h: Renamed from Source/WebCore/css/CSSGridTemplateValue.h.
2860         (WebCore::CSSGridTemplateAreasValue::create):
2861         (WebCore::CSSGridTemplateAreasValue::~CSSGridTemplateAreasValue):
2862         (WebCore::CSSGridTemplateAreasValue::gridAreaMap):
2863         (WebCore::CSSGridTemplateAreasValue::rowCount):
2864         (WebCore::CSSGridTemplateAreasValue::columnCount):
2865         * css/CSSParser.cpp:
2866         (WebCore::CSSParser::parseValue):
2867         (WebCore::CSSParser::parseGridTemplateAreas):
2868         * css/CSSParser.h:
2869         * css/CSSPropertyNames.in:
2870         * css/CSSValue.cpp:
2871         (WebCore::CSSValue::equals):
2872         (WebCore::CSSValue::cssText):
2873         (WebCore::CSSValue::destroy):
2874         * css/CSSValue.h:
2875         (WebCore::CSSValue::isGridTemplateAreasValue):
2876         * css/StyleResolver.cpp:
2877         (WebCore::StyleResolver::applyProperty):
2878
2879 2014-02-13  Adrian Bunk  <bunk@stusta.de>
2880
2881         Remove the last remnants of Maemo support
2882         https://bugs.webkit.org/show_bug.cgi?id=85238
2883
2884         Reviewed by Ryosuke Niwa.
2885
2886         * plugins/npapi.h:
2887
2888 2014-02-13  ChangSeok Oh  <changseok.oh@collabora.com>
2889
2890         Support ANGLE_instanced_arrays for GLES backend.
2891         https://bugs.webkit.org/show_bug.cgi?id=128579
2892
2893         Reviewed by Dean Jackson.
2894
2895         Add some APIs to Extensions3D to support ANGLE_instanced_arrays for GLES backend.
2896         At the same time, drawArraysInstanced, drawElementsInstanced and vertexAttribDivisor
2897         are moved from GC3DOpenGL.cpp to GC3DOpenGLCommon.cpp since they could be shareable
2898         through Extensions3D.
2899
2900         Covered by fast/canvas/webgl/angle-instanced-arrays.html
2901
2902         * platform/graphics/Extensions3D.h:
2903         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2904         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
2905         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
2906         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
2907         * platform/graphics/opengl/Extensions3DOpenGL.h:
2908         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2909         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
2910         (WebCore::Extensions3DOpenGLES::drawArraysInstanced):
2911         (WebCore::Extensions3DOpenGLES::drawElementsInstanced):
2912         (WebCore::Extensions3DOpenGLES::vertexAttribDivisor):
2913         (WebCore::Extensions3DOpenGLES::supportsExtension):
2914         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2915         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2916         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2917         (WebCore::GraphicsContext3D::drawArraysInstanced):
2918         (WebCore::GraphicsContext3D::drawElementsInstanced):
2919         (WebCore::GraphicsContext3D::vertexAttribDivisor):
2920         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2921
2922 2014-02-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2923
2924         [GTK] MEDIA_CONTROLS_SCRIPT support
2925         https://bugs.webkit.org/show_bug.cgi?id=123097
2926
2927         Reviewed by Jer Noble.
2928
2929         WebKitGTK+ multimedia controls are now managed from Javascript
2930         code. Apple controls are kept as common code and GTK+ ones are
2931         subclassed for the specific behavior.
2932
2933         Both CMake and Autotools build support is provided.
2934
2935         * CMakeLists.txt: Added support to build the media controls
2936         script and their associated files.
2937         * GNUmakefile.am: Added support to generate the C++ code from the
2938         Javascript.
2939         * GNUmakefile.list.am: Added the media controls script associated
2940         files.
2941         * Modules/mediacontrols/MediaControlsHost.cpp:
2942         * Modules/mediacontrols/MediaControlsHost.h:
2943         * Modules/mediacontrols/MediaControlsHost.idl:
2944         (WebCore::MediaControlsHost::supportsFullscreen): Added attribute
2945         to know if the element supports fullscreen.
2946         * Modules/mediacontrols/mediaControlsApple.js:
2947         (Controller.prototype.handleWrapperMouseMove):
2948         (Controller.prototype.handleWrapperMouseOut):
2949         (Controller.prototype.updatePlaying): Use clear and
2950         resetHideControlsTimer.
2951         (Controller.prototype.clearHideControlsTimer): Added.
2952         (Controller.prototype.resetHideControlsTimer): Added.
2953         * Modules/mediacontrols/mediaControlsGtk.js: Added.
2954         (createControls): Calls ControllerGtk.
2955         (ControllerGtk): Calls the superclass.
2956         (contains): Defines a function to know if an object is contained
2957         in an array.
2958         (ControllerGtk.prototype.inheritFrom): Copies the method of the
2959         superclass that are not reimplemented in the subclass.
2960         (ControllerGtk.prototype.createControls): Calls the superclass and
2961         create the remaining needed elements.
2962         (ControllerGtk.prototype.configureInlineControls): Configures the
2963         controls.
2964         (ControllerGtk.prototype.setStatusHidden): Redefined empty.
2965         (ControllerGtk.prototype.updateTime): Writes the duration and
2966         current position. As it was so far, current time also includes
2967         duration. If current time is bigger than 0 we show that.
2968         (ControllerGtk.prototype.showCurrentTime): Shows current time and
2969         hides duration label (that is included in current time).
2970         (ControllerGtk.prototype.handlePlay): Calls the superclass and
2971         force showing the current time.
2972         (ControllerGtk.prototype.handleTimeUpdate): Always update the
2973         time.
2974         (ControllerGtk.prototype.handleMuteButtonMouseOver): Shows the
2975         volume slider.
2976         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Hides the
2977         volume slider.
2978         (ControllerGtk.prototype.addControls): Adds the enclosure instead
2979         of the panel directly. Panel is, of course, part of the enclosure.
2980         (ControllerGtk.prototype.updateReadyState): Shows the fullscreen
2981         button only if fullscreen is supported. Sets the volume in up or
2982         down mode depending on its position in the document. Updates the
2983         volume.
2984         (ControllerGtk.prototype.setControlsType): Creates the controls it
2985         they were not created before. Unlike Apple ones, WebKitGTK+
2986         fullscreen and inline controls are the same.
2987         (ControllerGtk.prototype.updatePlaying): Calls the superclass and
2988         shows the controls if not playing.
2989         (ControllerGtk.prototype.handleCaptionButtonClicked): Redefined
2990         empty. To be coherent with volume, that also shows a popup, this
2991         is handled with mouseover instead of click.
2992         (ControllerGtk.prototype.buildCaptionMenu): Calls the superclass
2993         to build the menu, sets some listeners, centers the popup with the
2994         captions button, keeps the current height and sets the style to 0,
2995         which is needed to animate it.
2996         (ControllerGtk.prototype.destroyCaptionMenu): Hides the caption menu.
2997         (ControllerGtk.prototype.showCaptionMenu): Resets the height to
2998         its original. We don't animate it with CSS because we would need
2999         to specify a height in the style and we don't know it in advance.
3000         (ControllerGtk.prototype.hideCaptionMenu): Sets height to 0.
3001         (ControllerGtk.prototype.captionMenuTransitionEnd): When the
3002         captions menu transtition ends, it is destroyed.
3003         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Creates
3004         the caption menu and shows it.
3005         (ControllerGtk.prototype.handleCaptionButtonMouseOut): Hides the
3006         captions menu.
3007         (ControllerGtk.prototype.handleCaptionMouseOut): Hides the
3008         captions menu.
3009         * PlatformGTK.cmake: Added WebCore to the target link libraries
3010         and initialized the variables needed at CMakelists.txt
3011         * css/mediaControlsGtk.css:
3012         (audio::-webkit-media-controls-panel)
3013         (video::-webkit-media-controls-panel): Added transtion based on opacity.
3014         (video::-webkit-media-controls-panel): Set video opacity to 0.
3015         (video::-webkit-media-controls-panel.paused): Set video opacity to 1.
3016         (audio::-webkit-media-controls-panel div.mute-box): Set the same
3017         style as the mute button to preserve the layout.
3018         (audio::-webkit-media-controls-panel div.mute-box.hidden): Sets
3019         the display to none.
3020         (audio::-webkit-media-controls-mute-button)
3021         (video::-webkit-media-controls-mute-button): Removed the outline
3022         and the margin that is managed by the mute box now.
3023         (audio::-webkit-media-controls-play-button)
3024         (video::-webkit-media-controls-play-button): Removed the outline.
3025         (audio::-webkit-media-controls-time-remaining-display)
3026         (video::-webkit-media-controls-time-remaining-display): Removed
3027         the display.
3028         (audio::-webkit-media-controls-current-time-display)
3029         (video::-webkit-media-controls-current-time-display): Added the
3030         display block.
3031         (video::-webkit-media-controls-time-remaining-display): Set
3032         display none.
3033         (video::-webkit-media-controls-time-remaining-display.show): Set
3034         display block.
3035         (video::-webkit-media-controls-time-remaining-display.hidden): Set
3036         display none.
3037         (audio::-webkit-media-controls-timeline)
3038         (video::-webkit-media-controls-timeline): Removed outline.
3039         (audio::-webkit-media-controls-volume-slider-container)
3040         (video::-webkit-media-controls-volume-slider-container): Set
3041         overflow hidden and set a transition by height.
3042         (video::-webkit-media-controls-volume-slider-container.hidden):
3043         Set height 0.
3044         (video::-webkit-media-controls-volume-slider-container.down): Set
3045         bottom to be below the panel. Changed the border radius and
3046         transition accordingly.
3047         (video::-webkit-media-controls-panel .hidden.down): Sets default
3048         bottom as 0.
3049         (audio::-webkit-media-controls-volume-slider)
3050         (video::-webkit-media-controls-volume-slider): Removed the outline.
3051         (audio::-webkit-media-controls-toggle-closed-captions-button)
3052         (video::-webkit-media-controls-toggle-closed-captions-button):
3053         Removed the background that is painted from C++ and removed the
3054         outline.
3055         (video::-webkit-media-controls-closed-captions-container):
3056         (video::-webkit-media-controls-closed-captions-container h3):
3057         (video::-webkit-media-controls-closed-captions-container ul):
3058         (video::-webkit-media-controls-closed-captions-container li):
3059         (video::-webkit-media-controls-closed-captions-container li.selected): Changed
3060         the style to make it more coherent with the rest of the controls.
3061         (audio::-webkit-media-controls-fullscreen-button)
3062         (video::-webkit-media-controls-fullscreen-button): Removed the outline.
3063         (audio::-webkit-media-controls-panel button.hidden): Sets the
3064         display to none.
3065         * html/HTMLMediaElement.cpp: UserAgentScripts.h is not needed here
3066         and build cmake build would need for changes to get this compiled.
3067         * platform/gtk/RenderThemeGtk.cpp:
3068         (WebCore::nodeHasPseudo): Added. Checks if a node has a certain
3069         pseudo.
3070         (WebCore::nodeHasClass): Added. Checks if a node has a certain
3071         class.
3072         (WebCore::supportsFocus): Removed some element types as outline is
3073         now handled in CSS.
3074         (WebCore::RenderThemeGtk::paintMediaPlayButton): Checks if the
3075         play button has the class paused to show the play icon instead of
3076         the pause one.
3077         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
3078         Added. Paints the captions icon.
3079         (WebCore::RenderThemeGtk::mediaControlsScript): Added. Loads the
3080         bundled scripts.
3081         * platform/gtk/RenderThemeGtk.h: Added the mediaControlsScript
3082         method and declared the redefinition of the method to play the
3083         captions icon.
3084
3085 2014-02-11  Alexey Proskuryakov  <ap@apple.com>
3086
3087         Don't crash when SerializedScriptValue deserialization fails
3088         https://bugs.webkit.org/show_bug.cgi?id=128657
3089
3090         Reviewed by Oliver Hunt.
3091
3092         Test: crypto/subtle/postMessage-worker.html
3093
3094         * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Added a FIXME.
3095
3096         * bindings/js/SerializedScriptValue.cpp:
3097         (WebCore::CloneBase::fail): Don't assert on failure.
3098         (WebCore::SerializedScriptValue::deserialize): Never return a null JSValue, these
3099         are not allowed.
3100
3101 2014-02-12  Bem Jones-Bey  <bjonesbe@adobe.com>
3102
3103         [CSS Shapes] Rename shapeSize and others to make ShapeInfo and friends easier to understand
3104         https://bugs.webkit.org/show_bug.cgi?id=128685
3105
3106         Reviewed by Alexandru Chiculita.
3107
3108         The ShapeInfo hierarchy has grown organically as the spec has changed,
3109         and the naming has become very stale and confusing. The spec is now in
3110         Last Call, so it seems like a good time to take a stab towards better
3111         naming that matches the spec terminology and is also more consistent
3112         in general.
3113
3114         No new tests, no behavior change.
3115
3116         * rendering/RenderBlock.cpp:
3117         (WebCore::RenderBlock::imageChanged): Use new names.
3118         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
3119         (WebCore::shapeInfoRequiresRelayout): Ditto.
3120         (WebCore::RenderBlock::computeShapeSize): Ditto.
3121         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Ditto.
3122         * rendering/RenderBlock.h:
3123         (WebCore::RenderBlock::logicalSizeForChild): This method makes it much
3124             cleaner to set the reference box size.
3125         * rendering/RenderBlockFlow.cpp:
3126         (WebCore::RenderBlockFlow::positionNewFloats): Use new names.
3127         * rendering/RenderBox.cpp:
3128         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Ditto.
3129         (WebCore::RenderBox::imageChanged): Ditto.
3130         * rendering/shapes/ShapeInfo.cpp:
3131         (WebCore::getShapeImageMarginRect): Rename variables.
3132         (WebCore::ShapeInfo<RenderType>::computedShape): More renames.
3133         * rendering/shapes/ShapeInfo.h:
3134         (WebCore::ShapeInfo::setReferenceBoxLogicalSize): Renamed from
3135             setShapeSize.
3136         (WebCore::ShapeInfo::logicalLineTop): Use new names.
3137         (WebCore::ShapeInfo::logicalLineBottom): Ditto.
3138         (WebCore::ShapeInfo::shapeContainingBlockLogicalHeight): Ditto.
3139         (WebCore::ShapeInfo::markShapeAsDirty): Renamed from dirtyShapeSize.
3140         (WebCore::ShapeInfo::isShapeDirty): Renamed from shapeSizeDirty.
3141         (WebCore::ShapeInfo::referenceBoxLogicalSize): Renamed from shapeSize.
3142         (WebCore::ShapeInfo::logicalTopOffset): Use new names.
3143         (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
3144         * rendering/shapes/ShapeInsideInfo.cpp:
3145         (WebCore::ShapeInsideInfo::updateSegmentsForLine): Ditto.
3146         (WebCore::ShapeInsideInfo::adjustLogicalLineTop): Ditto.
3147         (WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Ditto.
3148         * rendering/shapes/ShapeInsideInfo.h:
3149         * rendering/shapes/ShapeOutsideInfo.cpp:
3150         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): Ditto.
3151         * rendering/shapes/ShapeOutsideInfo.h:
3152
3153 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
3154
3155         REGRESSION: Crashing/Broken Tests Due To Unexpected 8-bit Character Data
3156         https://bugs.webkit.org/show_bug.cgi?id=128698
3157
3158         Reviewed by Tim Horton.
3159
3160         * platform/graphics/win/UniscribeController.cpp:
3161         (WebCore::UniscribeController::advance): Make 16-bit copy when needed.
3162         (WebCore::UniscribeController::shapeAndPlaceItem): Handle 8-bit case when checking
3163         for word boundaries.
3164
3165 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
3166
3167         Document::childrenChanged does not necessarily have a page
3168
3169         Rubber stamped by Enrica Casucci.
3170
3171         * dom/Document.cpp:
3172         (WebCore::Document::childrenChanged):
3173
3174 2014-02-12  Timothy Hatcher  <timothy@apple.com>
3175
3176         Add a missing ": " between the URL and exception in STDOUT logs.
3177
3178         https://bugs.webkit.org/show_bug.cgi?id=128689
3179
3180         Reviewed by Joseph Pecoraro.
3181
3182         * page/PageConsole.cpp:
3183         (WebCore::PageConsole::addMessage): Print ": " after calling
3184         printSourceURLAndPosition now that it does not print it for us.
3185
3186 2014-02-12  Enrica Casucci  <enrica@apple.com>
3187
3188         WK2: coordinate mapping for frames does not work when the page is scrolled.
3189         https://bugs.webkit.org/show_bug.cgi?id=128690
3190         <rdar://problem/16042925>
3191
3192         Reviewed by Simon Fraser.
3193
3194         We should not apply the scroll offset when using delegate scrolling.
3195
3196         * platform/ScrollView.cpp:
3197         (WebCore::ScrollView::rootViewToContents):
3198         (WebCore::ScrollView::contentsToRootView):
3199         (WebCore::ScrollView::rootViewToTotalContents):
3200
3201 2014-02-12  Joseph Pecoraro  <pecoraro@apple.com>
3202
3203         Web Inspector: Rename PageInjectedScript* to WebInjectedScript*
3204         https://bugs.webkit.org/show_bug.cgi?id=128660
3205
3206         Reviewed by Timothy Hatcher.
3207
3208         Rename the files update build systems and users.
3209
3210         * CMakeLists.txt:
3211         * GNUmakefile.list.am:
3212         * WebCore.vcxproj/WebCore.vcxproj:
3213         * WebCore.vcxproj/WebCore.vcxproj.filters:
3214         * WebCore.xcodeproj/project.pbxproj:
3215         * inspector/CommandLineAPIModule.cpp:
3216         (WebCore::CommandLineAPIModule::host):
3217         * inspector/InspectorAllInOne.cpp:
3218         * inspector/InspectorController.cpp:
3219         (WebCore::InspectorController::InspectorController):
3220         * inspector/InspectorController.h:
3221         * inspector/InspectorHeapProfilerAgent.cpp:
3222         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
3223         * inspector/InspectorHeapProfilerAgent.h:
3224         * inspector/InspectorProfilerAgent.cpp:
3225         (WebCore::PageProfilerAgent::PageProfilerAgent):
3226         (WebCore::InspectorProfilerAgent::create):
3227         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
3228         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
3229         * inspector/InspectorProfilerAgent.h:
3230         * inspector/PageConsoleAgent.cpp:
3231         (WebCore::PageConsoleAgent::PageConsoleAgent):
3232         (WebCore::PageConsoleAgent::addInspectedNode):
3233         * inspector/PageConsoleAgent.h:
3234         * inspector/WebConsoleAgent.cpp:
3235         (WebCore::WebConsoleAgent::WebConsoleAgent):
3236         (WebCore::WebConsoleAgent::frameWindowDiscarded):
3237         (WebCore::WebConsoleAgent::addInspectedHeapObject):
3238         * inspector/WebConsoleAgent.h:
3239         * inspector/WebInjectedScriptHost.cpp: Renamed from Source/WebCore/inspector/PageInjectedScriptHost.cpp.
3240         (WebCore::WebInjectedScriptHost::type):
3241         (WebCore::WebInjectedScriptHost::isHTMLAllCollection):
3242         * inspector/WebInjectedScriptHost.h: Renamed from Source/WebCore/inspector/PageInjectedScriptHost.h.
3243         * inspector/WebInjectedScriptManager.cpp: Renamed from Source/WebCore/inspector/PageInjectedScriptManager.cpp.
3244         (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
3245         (WebCore::WebInjectedScriptManager::disconnect):
3246         (WebCore::WebInjectedScriptManager::didCreateInjectedScript):
3247         (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
3248         * inspector/WebInjectedScriptManager.h: Renamed from Source/WebCore/inspector/PageInjectedScriptManager.h.
3249         * inspector/WorkerConsoleAgent.cpp:
3250         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
3251         * inspector/WorkerConsoleAgent.h:
3252         * inspector/WorkerInspectorController.cpp:
3253         (WebCore::WorkerInspectorController::WorkerInspectorController):
3254         * inspector/WorkerInspectorController.h:
3255
3256 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
3257
3258         Unreviewed iOS Build fix after r163975.
3259
3260         * page/EventHandler.cpp: Use wheel event stubs if !PLATFORM(MAC) || PLATFORM(IOS).
3261
3262 2014-02-12  Gavin Barraclough  <barraclough@apple.com>
3263
3264         Clean up PageThrottler interface
3265         https://bugs.webkit.org/show_bug.cgi?id=128677
3266
3267         Reviewed by Benjamin Poulain.
3268
3269         Currently, responsibility for throttling DOM timers & suspending animations is split
3270         between the Page & the PageThrottler. Clarify by making Page responsible for suspending
3271         animations (PageThrottler is now purely related to aspects of timer throttling), and
3272         move all timer throttling policy to the PageThrottler, with a single function on Page to
3273         enable (Page::setTimerThrottlingEnabled).
3274
3275         Also, transmit the full ViewState to the PageThrottler (not just the IsVisuallyIdle flag),
3276         and distinguish between media & page-load activity.
3277
3278         * WebCore.exp.in:
3279             - removed setDOMTimerAlignmentInterval.
3280         * html/HTMLMediaElement.cpp:
3281         (WebCore::HTMLMediaElement::parseAttribute):
3282             - createActivityToken -> mediaActivityToken
3283         * loader/FrameLoader.cpp:
3284         (WebCore::FrameLoader::started):
3285             - createActivityToken -> pageLoadActivityToken
3286         * page/Page.cpp:
3287         (WebCore::Page::Page):
3288             - added m_timerThrottlingEnabled, made PageThrottler a member
3289         (WebCore::Page::setIsVisuallyIdleInternal):
3290             - update animiation suspension.
3291         (WebCore::Page::setTimerThrottlingEnabled):
3292             - setTimerAlignmentInterval -> setTimerThrottlingEnabled
3293         (WebCore::Page::setViewState):
3294             - pass viewState to PageThrottler.
3295         (WebCore::Page::setIsVisibleInternal):
3296             - don't update timer throttling.
3297         * page/Page.h:
3298         (WebCore::Page::pageThrottler):
3299             - made PageThrottler a member.
3300         (WebCore::Page::timerAlignmentInterval):
3301             - inlined.
3302         * page/PageThrottler.cpp:
3303         (WebCore::PageThrottler::PageThrottler):
3304             - initialize ViewState.
3305         (WebCore::PageThrottler::~PageThrottler):
3306             - clean up by calling setTimerThrottlingEnabled directly.
3307         (WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged):
3308             - moved from Page.
3309         (WebCore::PageThrottler::mediaActivityToken):
3310         (WebCore::PageThrottler::pageLoadActivityToken):
3311             - from Page::createActivityToken
3312         (WebCore::PageThrottler::throttlePage):
3313         (WebCore::PageThrottler::unthrottlePage):
3314             - don't throttle animations here.
3315         (WebCore::PageThrottler::setViewState):
3316         (WebCore::PageThrottler::setIsVisible):
3317             - added, throttle Dom timers.
3318         * page/PageThrottler.h:
3319         * page/Settings.cpp:
3320         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
3321             - removed setDOMTimerAlignmentInterval, hiddenPageDOMTimerThrottlingStateChanged moved to PageThrottler.
3322         * page/Settings.h:
3323             - removed setDOMTimerAlignmentInterval.
3324
3325 2014-02-12  Benjamin Poulain  <bpoulain@apple.com>
3326
3327         [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
3328         https://bugs.webkit.org/show_bug.cgi?id=128639
3329
3330         Reviewed by Andreas Kling.
3331
3332         * WebCore.exp.in:
3333         * dom/Document.cpp:
3334         (WebCore::Document::childrenChanged):
3335         Document::setDocType() has been removed and the doctype update code with it.
3336         Add a call to didReceiveDocType() to ensure the viewport is updated when the doctype is parsed.
3337
3338         * loader/EmptyClients.h:
3339         * page/Chrome.cpp:
3340         (WebCore::Chrome::didReceiveDocType):
3341         * page/ChromeClient.h:
3342         * page/ViewportConfiguration.cpp:
3343         (WebCore::ViewportConfiguration::xhtmlMobileParameters):
3344         * page/ViewportConfiguration.h:
3345
3346 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
3347
3348         Mountain Lion build fix.
3349
3350         * WebCore.exp.in: Only export WebCrypto symbols on 10.9+, because SUBTLE_CRYPTO
3351         is not enabled on 10.8.
3352
3353 2014-02-12  Alexey Proskuryakov  <ap@apple.com>
3354
3355         Wrap WebCrypto keys in SerializedScriptValue
3356         https://bugs.webkit.org/show_bug.cgi?id=128680
3357
3358         Reviewed by Anders Carlsson.
3359
3360         Test: crypto/subtle/rsa-indexeddb.html
3361
3362         Added Mac code to wrap a key with AES-GCM. We then serialize it into a plist,
3363         because more custom formats would be crazy (even the custom format in SerializedScriptValue
3364         makes me nervous, we'll certainly need to change CryptoKey in the future).
3365
3366         * WebCore.exp.in:
3367         * WebCore.xcodeproj/project.pbxproj:
3368         * crypto/CommonCryptoUtilities.h:
3369         * crypto/SerializedCryptoKeyWrap.h: Added.
3370         * crypto/mac/SerializedCryptoKeyWrapMac.mm: Added.
3371         (WebCore::vectorFromNSData):
3372         (WebCore::wrapSerializedCryptoKey):
3373         (WebCore::unwrapSerializedCryptoKey):
3374
3375 2014-02-12  Brent Fulgham  <bfulgham@apple.com>
3376
3377         Wheel events don't latch to inner scrollable elements 
3378         https://bugs.webkit.org/show_bug.cgi?id=128225
3379         <rdar://problem/12183688>
3380
3381         Reviewed by Simon Fraser
3382
3383         * WebCore.exp.in: Add declarations for new scrolledToTop, scrolledToBottom, scrolledToLeft, and scrolledToRight.
3384         * page/EventHandler.cpp:
3385         (WebCore::EventHandler::EventHandler):
3386         (WebCore::EventHandler::clear):
3387         (WebCore::findScrollableContainer): New helper function to locate first node
3388         in enclosing region of document that is capable of handling mouse wheel events.
3389         (WebCore::isAtMaxDominantScrollPosition): Predicate to check if the scrollable
3390         area is at the limit we will hit based on scroll direction.
3391         (WebCore::EventHandler::handleWheelEvent): Identify the case where we have hit
3392         the end of a scroll, and treat that as a valid 'handled' case. If the scroll event
3393         is just starting, treat end-of-scroll as unhandled so the parent element can
3394         handle things.
3395         * page/EventHandler.h:
3396         * page/scrolling/ScrollingTree.cpp:
3397         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Use new methods
3398         on the PlatformWheelEvent class.
3399         (WebCore::ScrollingTree::setOrClearLatchedNode): Ditto
3400         * platform/PlatformWheelEvent.h:
3401         (WebCore::PlatformWheelEvent::shouldConsiderLatching): Moved implementation from ScrollingTree.
3402         (WebCore::PlatformWheelEvent::shouldClearLatchedNode): Ditto
3403         * platform/ScrollableArea.cpp:
3404         (WebCore::ScrollableArea::scrolledToTop): Added
3405         (WebCore::ScrollableArea::scrolledToBottom):Added
3406         (WebCore::ScrollableArea::scrolledToLeft): Added
3407         (WebCore::ScrollableArea::scrolledToRight): Added
3408         * platform/ScrollableArea.h:
3409         * rendering/RenderListBox.cpp:
3410         (WebCore::RenderListBox::scrolledToTop): Added
3411         (WebCore::RenderListBox::scrolledToBottom): Added
3412         (WebCore::RenderListBox::scrolledToLeft): Added
3413         (WebCore::RenderListBox::scrolledToRight): Added
3414         * rendering/RenderListBox.h: Changed to public inheritance of ScrollableArea to
3415         allow generic use of this type in scroll wheel logic.
3416
3417 2014-02-12  Brendan Long  <b.long@cablelabs.com>
3418
3419         Implement DataCue for metadata cues
3420         https://bugs.webkit.org/show_bug.cgi?id=128402
3421
3422         Reviewed by Eric Carlson.
3423
3424         Test: media/track/track-datacue.html
3425
3426         * CMakeLists.txt: Add DataCue.
3427         * DerivedSources.cpp: Add JSDataCue.
3428         * DerivedSources.make: Same.
3429         * GNUmakefile.list.am: Add DataCue and JSDataCue.
3430         * WebCore.vcxproj/WebCore.vcxproj: Add DataCue.
3431         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
3432         * WebCore.xcodeproj/project.pbxproj: Add DataCue and JSDataCue.
3433         * bindings/js/JSTextTrackCueCustom.cpp:
3434         (WebCore::toJS): Add DataCue wrapper.
3435         * html/track/DataCue.cpp: Copied from Source/WebCore/html/track/TextTrack.idl.
3436         * html/track/DataCue.h: Copied from Source/WebCore/html/track/TextTrack.idl.
3437         * html/track/DataCue.idl: Copied from Source/WebCore/html/track/TextTrack.idl.
3438         * html/track/InbandGenericTextTrack.cpp:
3439         (WebCore::InbandGenericTextTrack::addGenericCue): Pass ASSERT_NO_EXCEPTION to addCue().
3440         * html/track/InbandWebVTTTextTrack.cpp:
3441         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Same.
3442         * html/track/TextTrack.cpp:
3443         (WebCore::TextTrack::addCue): Throw an exception if DataCue is added to a track that isn't kind="metadata".
3444         * html/track/TextTrack.h: Add exception code parameter to addCue().
3445         * html/track/TextTrack.idl: Add [RaisesException] to addCue().
3446         * html/track/TextTrackCue.h: Add Data CueType.
3447
3448 2014-02-12  Zalan Bujtas  <zalan@apple.com>
3449
3450         Subpixel layout: Clean up LayoutPoint class.
3451         https://bugs.webkit.org/show_bug.cgi?id=128515
3452
3453         Reviewed by Simon Fraser.
3454
3455         Remove redundant functions (keep the more explicit ones).
3456
3457         No change in functionality.
3458
3459         * page/FrameView.cpp:
3460         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
3461         * platform/graphics/LayoutPoint.h:
3462         (WebCore::toLayoutPoint):
3463         (WebCore::toLayoutSize):
3464         (WebCore::roundedIntPoint):
3465         * platform/graphics/ca/GraphicsLayerCA.cpp:
3466         (WebCore::GraphicsLayerCA::updateContentsRects):
3467         * rendering/LayoutState.cpp:
3468         (WebCore::LayoutState::LayoutState):
3469         * rendering/RenderBlock.cpp:
3470         (WebCore::RenderBlock::addFocusRingRects):
3471         * rendering/RenderBox.cpp:
3472         (WebCore::RenderBox::offsetFromContainer):
3473         * rendering/RenderInline.cpp:
3474         (WebCore::RenderInline::addFocusRingRects):
3475         * rendering/RenderLayer.cpp:
3476         (WebCore::RenderLayer::updateLayerPosition):
3477         (WebCore::accumulateOffsetTowardsAncestor):
3478         (WebCore::RenderLayer::paintBackgroundForFragments):
3479         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
3480         (WebCore::RenderLayer::paintOutlineForFragments):
3481         (WebCore::RenderLayer::paintMaskForFragments):
3482         (WebCore::RenderLayer::paintOverflowControlsForFragments):
3483         * rendering/RenderScrollbarPart.cpp:
3484         (WebCore::RenderScrollbarPart::paintIntoRect):
3485
3486 2014-02-12  Zan Dobersek  <zdobersek@igalia.com>
3487
3488         [CoordinatedGraphics] Move CoordinatedGraphicsScene, CoordinatedLayerTreeHostProxy to std::function
3489         https://bugs.webkit.org/show_bug.cgi?id=128473
3490
3491         Reviewed by Anders Carlsson.
3492
3493
3494         Move the CoordinatedGraphicsScene class to using std::function instead of WTF::Functional and std::bind
3495         instead of WTF::bind. The function wrapper is now moved through function calls and not passed by reference,
3496         and lambda functions are inlined into the dispatchOnMainThread() calls, with the CoordinatedGraphicsScene
3497         refcount-protected.
3498
3499         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3500         (WebCore::CoordinatedGraphicsScene::dispatchOnMainThread):
3501         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
3502         (WebCore::CoordinatedGraphicsScene::commitSceneState):
3503         (WebCore::CoordinatedGraphicsScene::syncRemoteContent):
3504         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
3505         (WebCore::CoordinatedGraphicsScene::commitScrollOffset):
3506         (WebCore::CoordinatedGraphicsScene::appendUpdate):
3507         (WebCore::CoordinatedGraphicsScene::setActive):
3508         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
3509
3510 2014-02-12  Eric Carlson  <eric.carlson@apple.com>
3511
3512         Cleanup the code added for https://bugs.webkit.org/show_bug.cgi?id=128125.
3513
3514         Not reviewed.
3515
3516         * html/HTMLMediaSession.cpp:
3517         (WebCore::restrictionName): Don't need a "break" after a "return" in a case statement.
3518         * platform/audio/MediaSession.cpp:
3519         (WebCore::stateName): Ditto.
3520         * platform/audio/ios/MediaSessionManagerIOS.mm:
3521
3522 2014-02-12  Andreas Kling  <akling@apple.com>
3523
3524         RenderNamedFlowThread should only support RenderElement children.
3525         <https://webkit.org/b/128675>
3526
3527         Tighten up flow-thread rendering so that it only supports element
3528         children directly. This means we don't have to worry about text
3529         renderers on this code path.
3530
3531         Reviewed by Antti Koivisto.
3532
3533         * rendering/RenderElement.cpp:
3534         (WebCore::RenderElement::insertedIntoTree):
3535         (WebCore::RenderElement::willBeRemovedFromTree):
3536         (WebCore::RenderElement::willBeDestroyed):
3537         * rendering/RenderNamedFlowThread.cpp:
3538         (WebCore::RenderNamedFlowThread::nextRendererForElement):
3539         (WebCore::RenderNamedFlowThread::addFlowChild):
3540         (WebCore::RenderNamedFlowThread::removeFlowChild):
3541         * rendering/RenderNamedFlowThread.h:
3542         * rendering/RenderObject.cpp:
3543         (WebCore::RenderObject::willBeDestroyed):
3544         (WebCore::RenderObject::insertedIntoTree):
3545         (WebCore::RenderObject::willBeRemovedFromTree):
3546         * style/StyleResolveTree.cpp:
3547         (WebCore::Style::createRendererIfNeeded):
3548
3549 2014-02-12  Joseph Pecoraro  <pecoraro@apple.com>
3550
3551         Web Inspector: Modernize missed inspector files
3552         https://bugs.webkit.org/show_bug.cgi?id=128661
3553
3554         Reviewed by Anders Carlsson.
3555
3556         Add final, override, and use nullptr where appropriate.
3557
3558         * inspector/InspectorCSSAgent.cpp:
3559         (WebCore::InspectorCSSAgent::asCSSStyleRule):
3560         (WebCore::InspectorCSSAgent::discardAgent):
3561         (WebCore::InspectorCSSAgent::disable):
3562         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
3563         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
3564         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
3565         (WebCore::InspectorCSSAgent::elementForId):
3566         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3567         (WebCore::InspectorCSSAgent::assertStyleSheetForId):
3568         (WebCore::InspectorCSSAgent::buildObjectForRule):
3569         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
3570         * inspector/InspectorFrontendClientLocal.h:
3571
3572 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
3573
3574         Remove some unintended copies in ranged for loops
3575         https://bugs.webkit.org/show_bug.cgi?id=128644
3576
3577         Reviewed by Anders Carlsson.
3578
3579         * css/StyleResolver.cpp:
3580         (WebCore::StyleResolver::loadPendingSVGDocuments): Avoid creating/destroying
3581         RefPtrs in loop.
3582
3583 2014-02-12  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
3584
3585         Update the HTML Media Capture implementation.
3586         https://bugs.webkit.org/show_bug.cgi?id=118465
3587
3588         Reviewed by Darin Adler.
3589
3590         Make the implementation in WebKit compatible with the 2013-05-09
3591         version of the spec, which makes the "capture" attribute a boolean
3592         instead of an enum.
3593
3594         Covered by fast/forms/file/file-input-capture.html.
3595
3596         * html/FileInputType.cpp:
3597         (WebCore::FileInputType::handleDOMActivateEvent):
3598         * html/HTMLInputElement.cpp:
3599         (WebCore::HTMLInputElement::capture): Renamed to shouldUseMediaCapture().
3600         (WebCore::HTMLInputElement::shouldUseMediaCapture): Return a bool.
3601         * html/HTMLInputElement.h:
3602         * html/HTMLInputElement.idl: Turn the `capture' attribute into a
3603         reflective boolean instead of a DOMString.
3604         * platform/FileChooser.h:
3605
3606 2014-02-12  Radu Stavila  <stavila@adobe.com>
3607
3608         [CSS Regions] Remove unused method in RenderFlowThread
3609         https://bugs.webkit.org/show_bug.cgi?id=128373
3610
3611         Reviewed by Mihnea Ovidenie.
3612
3613         After the landing of https://bugs.webkit.org/show_bug.cgi?id=118665, the 
3614         RenderFlowThread::computeRegionClippingRect method is obsolete.
3615
3616         No new tests needed, this patch only removes an unused method.
3617
3618         * rendering/RenderFlowThread.cpp:
3619         * rendering/RenderFlowThread.h:
3620
3621 2014-02-12  Mihai Tica  <mitica@adobe.com>
3622
3623         [CSS Element Blending] Implement the software path of -webkit-blend-mode with Core Graphics.
3624         https://bugs.webkit.org/show_bug.cgi?id=99119
3625
3626         Reviewed by Simon Fraser.
3627
3628         This patch adds support for -webkit-blend-mode with Core Graphics.
3629         The layer promotion code that forced compositing when blending was detected has been removed.
3630         Remaining work for the software path is to detect and implement isolation of the blending operation:
3631         as stated in the spec, blending should be limited to the parent stacking context.
3632
3633         Tests: css3/compositing/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer.html
3634                css3/compositing/blend-mode-parent-of-composited-blended-has-layer.html
3635                css3/compositing/blend-mode-simple-composited.html
3636                css3/compositing/blend-mode-with-composited-descendant-should-have-layer.html
3637
3638         * inspector/InspectorLayerTreeAgent.cpp:
3639         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): Remove CompositingReasonBlending.
3640         * rendering/RenderLayer.cpp:
3641         (WebCore::RenderLayer::beginTransparencyLayers): Set the blendMode on the GraphicsContext.
3642         * rendering/RenderLayer.h: paintsWithTransparency should return true when a blendMode is set.
3643         * rendering/RenderLayerCompositor.cpp: Remove promotion code when a blendMode is detected.
3644         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Remove CompositingReasonBlending reason.
3645         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Remove CompositingReasonBlending reason.
3646         (WebCore::RenderLayerCompositor::reasonsForCompositing): Remove CompositingReasonBlending reason.
3647         (WebCore::RenderLayerCompositor::logReasonsForCompositing): Remove CompositingReasonBlending reason.
3648         * rendering/RenderLayerCompositor.h:
3649         - Remove the requiresCompositingForBlending method
3650         - Remove the CompositingReasonBlending from the CompositingReasons enum.
3651
3652 2014-02-11  Zalan Bujtas  <zalan@apple.com>
3653
3654         Subpixel rendering: Switch repaint rect from IntRect to LayoutRect to be able to
3655         repaint on device pixel boundaries.
3656         https://bugs.webkit.org/show_bug.cgi?id=128477
3657
3658         Reviewed by Simon Fraser.
3659
3660         RenderLayer needs to be able to repaint on device pixel boundaries. RenderView still
3661         repaints on integral position.
3662
3663         No change in functionality.
3664
3665         * rendering/RenderBlockLineLayout.cpp:
3666         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
3667         * rendering/RenderElement.cpp:
3668         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
3669         * rendering/RenderLayer.cpp:
3670         (WebCore::RenderLayer::updateLayerPositions):
3671         (WebCore::RenderLayer::clearRepaintRects):
3672         (WebCore::RenderLayer::scrollTo):
3673         (WebCore::RenderLayer::calculateClipRects):
3674         * rendering/RenderLayerBacking.cpp:
3675         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
3676         * rendering/RenderLayerBacking.h:
3677         * rendering/RenderObject.cpp:
3678         (WebCore::RenderObject::repaintUsingContainer):
3679         (WebCore::RenderObject::repaint):
3680         (WebCore::RenderObject::repaintRectangle):
3681         * rendering/RenderObject.h:
3682
3683 2014-02-11  Dan Bernstein  <mitz@apple.com>
3684
3685         iOS build fix fix.
3686
3687         * rendering/RenderElement.cpp:
3688         (WebCore::shouldRepaintForImageAnimation):
3689
3690 2014-02-11  Dan Bernstein  <mitz@apple.com>
3691
3692         iOS build fix.
3693
3694         * rendering/RenderElement.cpp:
3695         (WebCore::shouldRepaintForImageAnimation):
3696
3697 2014-02-11  David Kilzer  <ddkilzer@apple.com>
3698
3699         ContentData equals() methods are not inline-able
3700         <http://webkit.org/b/128538>
3701
3702         Reviewed by Darin Adler.
3703
3704         Get rid of pure virtual equals() method in favor of
3705         ContentData::Type enum for runtime type information.
3706         This also lets us devirtualize the isFoo() methods.
3707
3708         * rendering/style/ContentData.h:
3709         (WebCore::ContentData::type): Add.
3710         (WebCore::ContentData::isCounter): Devirtualize.
3711         (WebCore::ContentData::isImage): Devirtualize.
3712         (WebCore::ContentData::isQuote): Devirtualize.
3713         (WebCore::ContentData::isText): Devirtualize.
3714         (WebCore::ContentData::ContentData): Add.  Include
3715         ContentData::Type parameter.
3716         (WebCore::operator==): Add overloaded methods for each subclass.
3717         Stop using pure virtual equals() method, check type(), and use
3718         overloaded subclass operator==() methods.
3719         (WebCore::operator!=): Add overloaded methods for each subclass.
3720
3721 2014-02-11  Andreas Kling  <akling@apple.com>
3722
3723         Protect some RenderFlowThread functions.
3724         <https://webkit.org/b/128642>
3725
3726         Make the RenderFlowThread constructor protected and a handful of
3727         member functions private.
3728
3729         Reviewed by Anders Carlsson.
3730
3731         * rendering/RenderFlowThread.h:
3732
3733 2014-02-11  Andreas Kling  <akling@apple.com>
3734
3735         Don't allocate RenderNamedFlowThread's child list separately.
3736         <https://webkit.org/b/128640>
3737
3738         Since we always create the flow-thread child list, there's no reason
3739         to put it in a separate heap allocation. Also remove the typedef and
3740         use auto instead.
3741
3742         Reviewed by Anders Carlsson.
3743
3744         * rendering/RenderNamedFlowThread.cpp:
3745         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3746         (WebCore::RenderNamedFlowThread::nextRendererForNode):
3747         (WebCore::RenderNamedFlowThread::addFlowChild):
3748         (WebCore::RenderNamedFlowThread::removeFlowChild):
3749         * rendering/RenderNamedFlowThread.h:
3750
3751 2014-02-11  Zalan Bujtas  <zalan@apple.com>
3752
3753         Subpixel rendering: Make GraphicsLayerClient::paintContents's clip rect subpixel based.
3754         https://bugs.webkit.org/show_bug.cgi?id=128460
3755
3756         Reviewed by Simon Fraser.
3757
3758         GraphicsClient::paintContents takes clipRect as FloatRect now so that we can paint on
3759         subpixel position.
3760
3761         No change in functionality.
3762
3763         * platform/graphics/GraphicsLayerClient.h:
3764         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3765         (WebCore::CompositingCoordinator::paintContents):
3766         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
3767         * rendering/RenderLayer.cpp:
3768         (WebCore::cornerRect):
3769         (WebCore::RenderLayer::scrollCornerRect):
3770         (WebCore::resizerCornerRect):
3771         (WebCore::RenderLayer::scrollCornerAndResizerRect):
3772         (WebCore::RenderLayer::verticalScrollbarStart):
3773         (WebCore::RenderLayer::horizontalScrollbarStart):
3774         (WebCore::RenderLayer::paintResizer):
3775         (WebCore::RenderLayer::hitTestOverflowControls):
3776         * rendering/RenderLayer.h:
3777         * rendering/RenderLayerBacking.cpp:
3778         (WebCore::RenderLayerBacking::paintIntoLayer):
3779         (WebCore::RenderLayerBacking::paintContents):
3780         * rendering/RenderLayerBacking.h:
3781         * rendering/RenderLayerCompositor.cpp:
3782         (WebCore::RenderLayerCompositor::paintContents):
3783         * rendering/RenderLayerCompositor.h:
3784         * rendering/RenderWidget.cpp:
3785         (WebCore::RenderWidget::paint):
3786
3787 2014-02-11  Antti Koivisto  <antti@apple.com>
3788
3789         GIF animations should be suspended when outside of viewport
3790         https://bugs.webkit.org/show_bug.cgi?id=128632
3791
3792         Reviewed by Andreas Kling.
3793         
3794         Animations are driven by the paint cycle. Speculative tiles keep animations outside the actual viewport going.
3795         
3796         Pause animations when they are outside the viewport by not painting them.
3797
3798         Test: fast/repaint/no-animation-outside-viewport.html
3799
3800         * loader/cache/CachedImage.cpp:
3801         (WebCore::CachedImage::animationAdvanced):
3802         
3803             Call animation specific newImageAnimationFrameAvailable instead of the generic notifyObservers.
3804
3805         * loader/cache/CachedImage.h:
3806         
3807             Removed now unnecessary resumeAnimatingImagesForLoader mechanism.
3808             Remove unnecessary shouldPauseAnimation. Pausing is now always done when by avoiding repaint.
3809
3810         * loader/cache/CachedImageClient.h:
3811         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
3812         * page/FrameView.cpp:
3813         (WebCore::FrameView::scrollPositionChanged):
3814         
3815             Check if we have image animations to resume when scroll position changes.
3816
3817         * page/Page.cpp:
3818         (WebCore::Page::resumeAnimatingImages):
3819         
3820             Use the same mechanism when resuming background tabs etc.
3821
3822         * platform/graphics/BitmapImage.cpp:
3823         (WebCore::BitmapImage::internalAdvanceAnimation):
3824         
3825             Remove the shouldPauseAnimation test, always rely on pausing on invalidation.
3826
3827         * platform/graphics/ImageObserver.h:
3828         * rendering/RenderBoxModelObject.cpp:
3829         * rendering/RenderElement.cpp:
3830         (WebCore::RenderElement::RenderElement):
3831         (WebCore::RenderElement::~RenderElement):
3832         (WebCore::shouldRepaintForImageAnimation):
3833         
3834             Factor the pausing conditions to a function. Test that the animation is withing the
3835             visible rect.
3836
3837         (WebCore::RenderElement::newImageAnimationFrameAvailable):
3838         
3839             Add renderer to the paused animation set if we don't continue the animation.
3840
3841         (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
3842         
3843             Resume the paused animations by triggering repaint.
3844
3845         * rendering/RenderElement.h:
3846         (WebCore::RenderElement::setHasPausedImageAnimations):
3847         (WebCore::RenderElement::hasPausedImageAnimations):
3848         * rendering/RenderObject.cpp:
3849         * rendering/RenderObject.h:
3850         * rendering/RenderView.cpp:
3851         (WebCore::RenderView::addRendererWithPausedImageAnimations):
3852         (WebCore::RenderView::removeRendererWithPausedImageAnimations):
3853         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
3854         * rendering/RenderView.h:
3855
3856 2014-02-11  Andreas Kling  <akling@apple.com>
3857
3858         Remove unused RenderNamedFlowThread::previousRendererForNode().
3859         <https://webkit.org/b/128637>
3860
3861         Reviewed by Antti Koivisto.
3862
3863         * rendering/RenderNamedFlowThread.cpp:
3864         * rendering/RenderNamedFlowThread.h:
3865
3866 2014-02-11  Andreas Kling  <akling@apple.com>
3867
3868         Move renderNamedFlowThreadWrapper() to RenderElement.
3869         <https://webkit.org/b/128634>
3870
3871         This function is only ever called on RenderElements so move it there
3872         from RenderObject.
3873
3874         Reviewed by Antti Koivisto.
3875
3876         * rendering/RenderElement.cpp:
3877         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
3878         * rendering/RenderElement.h:
3879         * rendering/RenderObject.cpp:
3880         * rendering/RenderObject.h:
3881
3882 2014-02-11  Myles C. Maxfield  <mmaxfield@apple.com>
3883
3884         Position and thickness of underline as text size changes
3885         https://bugs.webkit.org/show_bug.cgi?id=16768
3886
3887         Reviewed by Dean Jackson.
3888
3889         This patch adopts the iOS codepath for underlines. It also reorganizes
3890         drawLineForText to avoid a costly global state save & restore.
3891
3892         Test: fast/css3-text/css3-text-decoration/text-decoration-thickness.html
3893
3894         * platform/graphics/cg/GraphicsContextCG.cpp:
3895         (WebCore::computeLineBoundsAndAntialiasingModeForText):
3896         (WebCore::GraphicsContext::computeLineBoundsForText):
3897         (WebCore::GraphicsContext::drawLineForText):
3898         (WebCore::GraphicsContext::drawLinesForText):
3899         * rendering/InlineTextBox.cpp:
3900         (WebCore::InlineTextBox::paintDecoration):
3901
3902 2014-02-11  Ryosuke Niwa  <rniwa@webkit.org>
3903
3904         Frame::rectForSelection shouldn't instantiate FrameSelection
3905         https://bugs.webkit.org/show_bug.cgi?id=128587
3906
3907         Reviewed by Enrica Casucci.
3908
3909         Made VisiblePosition::absoluteCaretBounds more interoperable with the one in FrameSelection and made
3910         iOS's Frame::rectForScrollToVisible use that function instead.
3911
3912         The above change allows us to remove:
3913         - suppressCloseTyping(), restoreCloseTyping(), and m_closeTypingSuppressions in FrameSelection
3914         - suppressSelectionNotifications() and restoreSelectionNotifications() in EditorClient
3915
3916         See inline comments below for more details.
3917
3918         * Source/WebCore/WebCore.exp.in:
3919
3920         * editing/FrameSelection.cpp:
3921         (WebCore::FrameSelection::FrameSelection):
3922         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3923         (WebCore::CaretBase::updateCaretRect):
3924         (WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
3925         (WebCore::DragCaretController::caretRenderer):
3926         (WebCore::repaintCaretForLocalRect):
3927         (WebCore::FrameSelection::recomputeCaretRect): Merged FrameSelection::localCaretRect(). Modified
3928         the code to update caretNode when and only when caret rect is updated. Also added an assertion to
3929         ensure absoluteCaretBounds() on FrameSelection and VisiblePosition yield the same result.
3930
3931         (WebCore::CaretBase::paintCaret):
3932         * editing/FrameSelection.h:
3933
3934         * editing/VisiblePosition.cpp:
3935         (WebCore::VisiblePosition::absoluteCaretBounds): Fixed the bug where the old code wasn't respecting
3936         the convention to use containing block as the renderer to paint caret.
3937
3938         * editing/htmlediting.cpp:
3939         (WebCore::caretRendersInsideNode): Moved from FrameSelection.cpp.
3940         (WebCore::rendererForCaretPainting): Ditto and renamed from caretRenderer.
3941         (WebCore::localCaretRectInRendererForCaretPainting): Extracted from FrameSelection::updateCaretRect.
3942         (WebCore::absoluteBoundsForLocalCaretRect): Ditto from CaretBase::absoluteBoundsForLocalRect.
3943         * editing/htmlediting.h:
3944
3945         * loader/EmptyClients.h:
3946         * page/EditorClient.h:
3947         * page/Frame.h:
3948
3949         * page/ios/FrameIOS.mm:
3950         (WebCore::Frame::rectForScrollToVisible): Reimplemented in its simplest form using VisiblePosition's
3951         absoluteCaretBounds().
3952
3953 2014-02-11  Enrica Casucci  <enrica@apple.com>
3954
3955         Support WebSelections in WK2 on iOS.
3956         https://bugs.webkit.org/show_bug.cgi?id=127015
3957         <rdar://problem/15211964>
3958
3959         Reviewed by Benjamin Poulain.
3960
3961         Adding few exports.
3962
3963         * WebCore.exp.in:
3964
3965 2014-02-11  Andreas Kling  <akling@apple.com>
3966
3967         CTTE: RenderNamedFlowThread always has a WebKitNamedFlow.
3968         <https://webkit.org/b/128623>
3969
3970         Codify the fact that RenderNamedFlowThread always has a corresponding
3971         WebKitNamedFlow by storing it in a Ref, and adding an accessor that
3972         returns a reference to get rid of all the ->'s.
3973
3974         Also removed some unnecessary assertions exposed by this.
3975
3976         Reviewed by Antti Koivisto.
3977
3978         * dom/NamedFlowCollection.cpp:
3979         (WebCore::NamedFlowCollection::ensureFlowWithName):
3980         * dom/NamedFlowCollection.h:
3981         * rendering/RenderNamedFlowThread.cpp:
3982         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3983         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
3984         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
3985         (WebCore::RenderNamedFlowThread::flowThreadName):
3986         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
3987         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
3988         (WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired):
3989         (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
3990         (WebCore::RenderNamedFlowThread::setMarkForDestruction):
3991         (WebCore::RenderNamedFlowThread::resetMarkForDestruction):
3992         (WebCore::RenderNamedFlowThread::isMarkedForDestruction):
3993         * rendering/RenderNamedFlowThread.h:
3994
3995 2014-02-10  Myles C. Maxfield  <mmaxfield@apple.com>
3996
3997         Convert position:fixed property to position:absolute upon copy
3998         https://bugs.webkit.org/show_bug.cgi?id=128194
3999
4000         Reviewed by Simon Fraser.
4001
4002         This adds a Setting and Preference that allows clients to opt-in to this behavior.
4003
4004         This new behavior is only activated if the entire body is copied. If there is a position:fixed
4005         element in the copied selection, it is replaced with position:absolute, and a containing
4006         block (position:relative) is wrapped around the copied text.
4007
4008         This patch originally converted position:-webkit-sticky to position:relative. However, we
4009         currently don't support copying and pasting of position:-webkit-sticky content (See below).
4010         Therefore, this patch only deals with position:fixed.
4011
4012         Right now we don't copy position:-webkit-sticky. This is because:
4013         1. When copying styled elements, we parse the style properties again
4014         2. CSSParserContext has a flag which can disable parsing -webkit-sticky
4015         3. There are two constructors to CSSParserContext: one that takes a document and sets up the
4016         aforementioned flag, and a simple one that doesn't take a document and sets all the enableFoo
4017         flags to false
4018         4. At the relevant place within copy code, we are far removed from the Document object, so we
4019         instead call the second constructor, thereby disabling parsing of -webkit-sticky
4020
4021         Test: editing/pasteboard/copy-paste-converts-sticky-and-fixed.html
4022
4023         * WebCore.exp.in: Export the Setting setter
4024         * editing/EditingStyle.cpp:
4025         (WebCore::EditingStyle::convertFixedAndStickyPosition): Converts a single style
4026         * editing/EditingStyle.h: