Fix the Windows build after <http://trac.webkit.org/changeset/162704>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-01-24  Daniel Bates  <dabates@apple.com>
2
3         Fix the Windows build after <http://trac.webkit.org/changeset/162704>
4         (https://bugs.webkit.org/show_bug.cgi?id=127293)
5
6         Only include TargetConditionals.h when building on a Darwin-based OS.
7         Also, check that TARGET_OS_IPHONE is defined before referencing its value
8         since it will be undefined when building on Windows.
9
10         * bindings/objc/PublicDOMInterfaces.h:
11
12 2014-01-24  Daniel Bates  <dabates@apple.com>
13
14         Bindings generation tests hit an error trying to include wtf/Platform.h after r161638
15         https://bugs.webkit.org/show_bug.cgi?id=127293
16
17         Reviewed by Alexey Proskuryakov.
18
19         Include TargetConditionals.h instead of wtf/Platform.h as the latter isn't available
20         in the public SDK.
21
22         As a side effect of this change, replace usage of PLATFORM(IOS) with TARGET_OS_IPHONE.
23
24         * bindings/objc/PublicDOMInterfaces.h:
25
26 2014-01-21  David Hyatt  <hyatt@apple.com>
27
28         [New Multicolumn] Table cells and list items need to work as multicolumn blocks.
29         https://bugs.webkit.org/show_bug.cgi?id=127365
30         
31         This patch is a first step towards eliminating RenderMultiColumnBlock and moving
32         all its functionality into RenderBlockFlow. Doing so will allow table cells, list
33         items and the RenderView to use the new multi-column layout.
34         
35         Reviewed by Simon Fraser.
36
37         * rendering/RenderBlockFlow.cpp:
38         (WebCore::RenderBlockFlow::setMultiColumnFlowThread):
39         * rendering/RenderBlockFlow.h:
40         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
41         (WebCore::RenderBlockFlow::multiColumnFlowThread):
42         Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
43         rare data. This lets us use only one pointer in the rare data to point to an object
44         that can hold all of the rest of the multi-column info.
45
46         * rendering/RenderMultiColumnBlock.cpp:
47         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
48         Move the construction of the flow thread to the constructor. This ensures we
49         never have a null flow thread and lets us avoid having to null check it for
50         empty multi-column blocks.
51
52         (WebCore::RenderMultiColumnBlock::columnHeightAvailable):
53         (WebCore::RenderMultiColumnBlock::columnWidth):
54         (WebCore::RenderMultiColumnBlock::columnCount):
55         (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
56         The above functions now call through to the multi-column flow thread for results.
57
58         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
59          Set the column height available on the flow thread.
60
61         (WebCore::RenderMultiColumnBlock::relayoutForPagination):
62         The balancing pass and guard is in the multi-column flow thread now.
63
64         (WebCore::RenderMultiColumnBlock::addChild):
65         Don't have to create the flow thread here any longer, since we do it up front
66         in the constructor of RenderMultiColumnBlock.
67
68         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
69         Don't need the null check of the flow thread any more.
70
71         * rendering/RenderMultiColumnBlock.h:
72         Change the inlined functions to not be inlined, since they need to call
73         RenderMultiColumnFlowThread functions now.
74
75         * rendering/RenderMultiColumnFlowThread.cpp:
76         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
77         Init the new member variables we moved here from RenderMultiColumnBlock.
78
79         (WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
80         Moved from RenderMultiColumnBlock.
81
82         * rendering/RenderMultiColumnFlowThread.h:
83         Add public getters/setters to the member variables so that RenderMultiColumnBlock can
84         still see them. Move the member variables here from RenderMultiColumnBlock.
85
86         * rendering/RenderMultiColumnSet.cpp:
87         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
88         (WebCore::RenderMultiColumnSet::prepareForLayout):
89         (WebCore::RenderMultiColumnSet::columnCount):
90         Call through to the flow thread instead.
91
92 2014-01-24  Zan Dobersek  <zdobersek@igalia.com>
93
94         Unreviewed GTK build fix after r162663.
95
96         * platform/gtk/ScrollViewGtk.cpp:
97         (WebCore::ScrollView::visibleContentRectInternal): Renamed from visibleContentRect.
98
99 2014-01-24  Zan Dobersek  <zdobersek@igalia.com>
100
101         Move HistoryItem to std::unique_ptr
102         https://bugs.webkit.org/show_bug.cgi?id=127275
103
104         Reviewed by Darin Adler.
105
106         Replace the uses of OwnPtr and PassOwnPtr in the HistoryItem class with std::unique_ptr.
107
108         * history/HistoryItem.cpp:
109         (WebCore::HistoryItem::HistoryItem):
110         (WebCore::HistoryItem::reset):
111         (WebCore::HistoryItem::addRedirectURL):
112         (WebCore::HistoryItem::setRedirectURLs):
113         * history/HistoryItem.h:
114         * history/mac/HistoryItemMac.mm:
115         (WebCore::HistoryItem::setTransientProperty):
116         WebCore.exp.in: Update the symbol.
117
118 2014-01-23  Morten Stenshorne  <mstensho@opera.com>
119
120         Region based multicol: unresolvable percent height results in 1px tall multicol
121         https://bugs.webkit.org/show_bug.cgi?id=122826
122
123         Reviewed by David Hyatt.
124
125         If a box has a percentage height, but the computed height of its
126         containing block is auto, the computed height of the box also becomes
127         auto. computeContentLogicalHeight() returns -1 if the height isn't
128         resolvable, and we need to make sure that such a value doesn't
129         constrain the height of the multicol container.
130
131         Tests: fast/multicol/newmulticol/unresolvable-percent-height-2.html
132                fast/multicol/newmulticol/unresolvable-percent-height.html
133                fast/multicol/newmulticol/unresolvable-percent-max-height-2.html
134                fast/multicol/newmulticol/unresolvable-percent-max-height.html
135
136         * rendering/RenderMultiColumnSet.cpp:
137         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
138         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
139         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
140         (WebCore::RenderMultiColumnSet::prepareForLayout):
141
142 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
143
144         Move ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCore for inspector
145         https://bugs.webkit.org/show_bug.cgi?id=127537
146
147         Reviewed by Timothy Hatcher.
148
149           - Rename ContentSearchUtils => ContentSearchUtilities and move to JavaScriptCore.
150           - Move ScriptBreakpoint and ScriptDebugListener to JavaScriptCore.
151           - Move them all to namespace Inspector.
152           - Update build files and users to the new names.
153
154         No change in functionality, just moving code.
155
156         * CMakeLists.txt:
157         * ForwardingHeaders/inspector/ContentSearchUtilities.h: Added.
158         * ForwardingHeaders/inspector/ScriptBreakpoint.h: Added.
159         * ForwardingHeaders/inspector/ScriptDebugListener.h: Added.
160         * GNUmakefile.list.am:
161         * WebCore.vcxproj/WebCore.vcxproj:
162         * WebCore.vcxproj/WebCore.vcxproj.filters:
163         * WebCore.xcodeproj/project.pbxproj:
164         * bindings/js/PageScriptDebugServer.cpp:
165         * bindings/js/PageScriptDebugServer.h:
166         * bindings/js/ScriptDebugServer.cpp:
167         * bindings/js/ScriptDebugServer.h:
168         * bindings/js/WorkerScriptDebugServer.cpp:
169         * bindings/js/WorkerScriptDebugServer.h:
170         * inspector/InspectorAllInOne.cpp:
171         * inspector/InspectorDebuggerAgent.cpp:
172         (WebCore::InspectorDebuggerAgent::searchInContent):
173         (WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
174         (WebCore::InspectorDebuggerAgent::didParseSource):
175         * inspector/InspectorDebuggerAgent.h:
176         * inspector/InspectorPageAgent.cpp:
177         (WebCore::InspectorPageAgent::sourceMapURLForResource):
178         (WebCore::InspectorPageAgent::searchInResource):
179         (WebCore::InspectorPageAgent::searchInResources):
180         * inspector/InspectorStyleSheet.cpp:
181         (WebCore::buildSourceRangeObject):
182         (WebCore::InspectorStyleSheet::lineEndings):
183         (WebCore::InspectorStyleSheetForInlineStyle::lineEndings):
184
185 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
186
187         Move RegularExpression into JavaScriptCore for inspector
188         https://bugs.webkit.org/show_bug.cgi?id=127526
189
190         Reviewed by Geoffrey Garen.
191
192         Update as appropriate for the moved file and namespace
193         change for class RegularExpression.
194
195         * CMakeLists.txt:
196         * ForwardingHeaders/yarr/RegularExpression.h: Added.
197         * GNUmakefile.list.am:
198         * WebCore.exp.in:
199         * WebCore.vcxproj/WebCore.vcxproj:
200         * WebCore.vcxproj/WebCore.vcxproj.filters:
201         * WebCore.xcodeproj/project.pbxproj:
202         * dom/DOMImplementation.h:
203         * html/BaseCheckableInputType.cpp:
204         * html/BaseTextInputType.cpp:
205         (WebCore::BaseTextInputType::patternMismatch):
206         * html/EmailInputType.cpp:
207         (WebCore::isValidEmailAddress):
208         * html/InputType.cpp:
209         * inspector/ContentSearchUtils.cpp:
210         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
211         (WebCore::ContentSearchUtils::createSearchRegex):
212         (WebCore::ContentSearchUtils::countRegularExpressionMatches):
213         (WebCore::ContentSearchUtils::searchInTextByLines):
214         * inspector/ContentSearchUtils.h:
215         * inspector/InspectorDebuggerAgent.cpp:
216         (WebCore::matches):
217         (WebCore::InspectorDebuggerAgent::breakpointActionLog):
218         (WebCore::InspectorDebuggerAgent::breakpointActionSound):
219         * inspector/InspectorDebuggerAgent.h:
220         * inspector/InspectorPageAgent.cpp:
221         (WebCore::InspectorPageAgent::searchInResources):
222         * inspector/InspectorPageAgent.h:
223         * inspector/InspectorRuntimeAgent.cpp:
224         * inspector/InspectorRuntimeAgent.h:
225         * inspector/InspectorStyleSheet.cpp:
226         (WebCore::selectorsFromSource):
227         * inspector/WorkerDebuggerAgent.cpp:
228         * page/Frame.cpp:
229         (WebCore::createRegExpForLabels):
230         (WebCore::Frame::searchForLabelsAboveCell):
231         (WebCore::Frame::searchForLabelsBeforeElement):
232         (WebCore::matchLabelsAgainstString):
233         * page/Frame.h:
234         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
235         (WebCore::GraphicsContext3D::getUnmangledInfoLog):
236
237 2014-01-23  Brady Eidson  <beidson@apple.com>
238
239         IDB: Support IDBObjectStore.clear()
240         https://bugs.webkit.org/show_bug.cgi?id=127541
241         
242         Reviewed by Anders Carlsson.
243
244         The backing store should never be performing callbacks directly:
245         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
246         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
247
248         Instead, the transaction operations should do that themselves:
249         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
250         (WebCore::ClearObjectStoreOperation::perform):
251         * Modules/indexeddb/IDBTransactionBackendOperations.h:
252         (WebCore::ClearObjectStoreOperation::transaction):
253
254 2014-01-23  Dan Bernstein  <mitz@apple.com>
255
256         <rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be reached) in CSSPreloadScanner::tokenize()
257         https://bugs.webkit.org/show_bug.cgi?id=127540
258
259         Reviewed by Anders Carlsson.
260
261         No new tests, because I could not reproduce the bug reliably and I don’t know how to trigger
262         it.
263
264         * html/parser/CSSPreloadScanner.cpp:
265         (WebCore::CSSPreloadScanner::scan): Check for the DoneParsingImportRules before tokenizing
266         a character, not after. This restores the logic from before r162257.
267
268 2014-01-23  Jer Noble  <jer.noble@apple.com>
269
270         [iOS] Protect against possbile deadlock by delaying video layer creation
271         https://bugs.webkit.org/show_bug.cgi?id=127505
272
273         Reviewed by Eric Carlson.
274
275         Work around a possible deadlock on iOS when creating a media element
276         backed by AVFoundation by delaying creation of the AVPlayerLayer.
277         The deadlock can occur when the web thread is doing CALayer layout
278         while taking the web thread lock, while CoreMedia is doing property
279         access on an async thread while taking the CM lock, and each is waiting
280         for the other's lock to be released.
281
282         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
283         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
284
285 2014-01-23  Jer Noble  <jer.noble@apple.com>
286
287         [MSE][Mac] Crash when reloading a page during playback
288         https://bugs.webkit.org/show_bug.cgi?id=126903
289
290         Reviewed by Eric Carlson.
291
292         Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
293         callback block even after being removed with -removeTimeObserver:, which is tracked by
294         <rdar://problem/15798050>. Work around this problem by passing a WeakPtr into the block
295         and bail early if the owning media player has been destroyed.
296
297         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
298         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
299         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
300         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
301
302 2014-01-23  ChangSeok Oh  <changseok.oh@collabora.com>
303
304         Dragging from inner side of video to outside causes a crash
305         https://bugs.webkit.org/show_bug.cgi?id=126338
306
307         Reviewed by Jer Noble.
308
309         The crash happens while dragging mouse cursor through timeline control to outside
310         of video region. This is beacause media controls are selected with the drag.
311         The media controls disappear when mouse cursor goes outside of video though
312         the dragging/selection proceeds. If once media controls are hidden, related element
313         lose their renderers. However the drag is still under going. it requires shadowPseudoId
314         of the selected controls. Untorntunately, SliderThumbElement/SliderContainerElement
315         don't return a static value for the shadowPseudoId unlike other media controls,
316         but they need a renderer to determine it. This is the reason of crash.
317
318         Test: media/media-controller-drag-crash.html
319
320         * html/shadow/SliderThumbElement.cpp:
321         (WebCore::SliderThumbElement::shadowPseudoId):
322         (WebCore::SliderContainerElement::shadowPseudoId):
323
324 2014-01-23  Brady Eidson  <beidson@apple.com>
325
326         IDB: Implement SQLite backing store 'get' support
327         https://bugs.webkit.org/show_bug.cgi?id=127502
328
329         Reviewed by Tim Horton.
330
331         Get a KeyRange from a KeyRangeData:
332         * Modules/indexeddb/IDBKeyRangeData.cpp:
333         (WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
334         * Modules/indexeddb/IDBKeyRangeData.h:
335
336         Add collation function support to SQLiteDatabase:
337         * platform/sql/SQLiteDatabase.cpp:
338         (WebCore::destroyCollationFunction):
339         (WebCore::callCollationFunction):
340         (WebCore::SQLiteDatabase::setCollationFunction):
341         (WebCore::SQLiteDatabase::removeCollationFunction):
342         * platform/sql/SQLiteDatabase.h:
343
344         * WebCore.exp.in:
345
346 2014-01-23  Jon Honeycutt  <jhoneycutt@apple.com>
347
348         Assertion failure in WebCore::PseudoElement::didRecalcStyle()
349         <https://bugs.webkit.org/show_bug.cgi?id=126761>
350         <rdar://problem/15793540>
351
352         Reviewed by Andy Estes.
353
354         Test: fast/images/animate-list-item-image-assertion.html
355
356         * dom/PseudoElement.cpp:
357         (WebCore::PseudoElement::didRecalcStyle):
358         Check isRenderImage() rather than isImage() before casting to
359         RenderImage.
360
361         * editing/ios/EditorIOS.mm:
362         (WebCore::getImage):
363         Ditto.
364
365         * editing/mac/EditorMac.mm:
366         (WebCore::getImage):
367         Ditto.
368
369         * html/HTMLImageElement.cpp:
370         (WebCore::HTMLImageElement::parseAttribute):
371         (WebCore::HTMLImageElement::didAttachRenderers):
372         Ditto.
373
374         * loader/ImageLoader.cpp:
375         (WebCore::ImageLoader::renderImageResource):
376         Ditto.
377
378         * page/DragController.cpp:
379         (WebCore::getCachedImage):
380         Ditto.
381
382         * rendering/RenderLayerBacking.cpp:
383         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
384         (WebCore::RenderLayerBacking::updateImageContents):
385         Ditto.
386
387 2014-01-23  Joseph Pecoraro  <pecoraro@apple.com>
388
389         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
390         https://bugs.webkit.org/show_bug.cgi?id=127409
391
392         Reviewed by Geoffrey Garen.
393
394         Covered by existing tests.
395
396         * bindings/js/ScriptDebugServer.h:
397         * bindings/js/ScriptDebugServer.cpp:
398         (WebCore::ScriptDebugServer::ScriptDebugServer):
399         Remove m_recompileTimer and the recompile soon function.
400         We can just recompile immediately in all existing cases.
401
402         * bindings/js/PageScriptDebugServer.h:
403         * bindings/js/PageScriptDebugServer.cpp:
404         (WebCore::PageScriptDebugServer::addListener):
405         (WebCore::PageScriptDebugServer::removeListener):
406         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
407         (WebCore::PageScriptDebugServer::didAddFirstListener):
408         (WebCore::PageScriptDebugServer::didRemoveLastListener):
409         Add a "didAddFirstListener" to match "didRemoveLastListener".
410         Only recompile functions when we attach the debugger and when
411         we detach the last listener.
412
413         * bindings/js/WorkerScriptDebugServer.cpp:
414         (WebCore::WorkerScriptDebugServer::addListener):
415         (WebCore::WorkerScriptDebugServer::removeListener):
416         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
417         Same thing. Also rearrange the functions to read better.
418
419         * inspector/InspectorProfilerAgent.cpp:
420         Use the direct recompile function instead of the removed "soon" version.
421
422         * WebCore.exp.in:
423         Update disconnectFrontend symbol.
424
425         * page/PageDebuggable.cpp:
426         (WebCore::PageDebuggable::disconnect):
427         * testing/Internals.cpp:
428         (WebCore::Internals::closeDummyInspectorFrontend):
429         * workers/WorkerMessagingProxy.cpp:
430         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
431         Include an InspectorDisconnectReason when calling disconnectFrontend.
432
433         * inspector/InspectorDatabaseAgent.h:
434         * inspector/InspectorDebuggerAgent.cpp:
435         (WebCore::InspectorDebuggerAgent::disable):
436         (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
437         If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
438
439         * inspector/InspectorProfilerAgent.h:
440         * inspector/InspectorProfilerAgent.cpp:
441         (WebCore::InspectorProfilerAgent::enable):
442         (WebCore::InspectorProfilerAgent::disable):
443         (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
444         If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.
445
446         * inspector/InspectorController.h:
447         * inspector/InspectorController.cpp:
448         (WebCore::InspectorController::inspectedPageDestroyed):
449         (WebCore::InspectorController::disconnectFrontend):
450         (WebCore::InspectorController::close):
451         Pass different reasons for the different disconnect reasons.
452
453         * inspector/WorkerInspectorController.h:
454         * inspector/WorkerInspectorController.cpp:
455         (WebCore::WorkerInspectorController::~WorkerInspectorController):
456         (WebCore::WorkerInspectorController::disconnectFrontend):
457         Pass different reasons for the different disconnect reasons.
458
459         * inspector/InspectorApplicationCacheAgent.cpp:
460         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
461         * inspector/InspectorApplicationCacheAgent.h:
462         * inspector/InspectorCSSAgent.cpp:
463         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
464         * inspector/InspectorCSSAgent.h:
465         * inspector/InspectorCanvasAgent.cpp:
466         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
467         * inspector/InspectorCanvasAgent.h:
468         * inspector/InspectorConsoleAgent.cpp:
469         (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
470         * inspector/InspectorConsoleAgent.h:
471         * inspector/InspectorDOMAgent.cpp:
472         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
473         * inspector/InspectorDOMAgent.h:
474         * inspector/InspectorDOMDebuggerAgent.cpp:
475         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
476         * inspector/InspectorDOMDebuggerAgent.h:
477         * inspector/InspectorDOMStorageAgent.cpp:
478         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
479         * inspector/InspectorDOMStorageAgent.h:
480         * inspector/InspectorDatabaseAgent.cpp:
481         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
482         * inspector/InspectorDebuggerAgent.h:
483         * inspector/InspectorHeapProfilerAgent.cpp:
484         (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
485         * inspector/InspectorHeapProfilerAgent.h:
486         * inspector/InspectorIndexedDBAgent.cpp:
487         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
488         * inspector/InspectorIndexedDBAgent.h:
489         * inspector/InspectorInputAgent.cpp:
490         (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
491         * inspector/InspectorInputAgent.h:
492         * inspector/InspectorLayerTreeAgent.cpp:
493         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
494         * inspector/InspectorLayerTreeAgent.h:
495         * inspector/InspectorMemoryAgent.cpp:
496         (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
497         * inspector/InspectorMemoryAgent.h:
498         * inspector/InspectorPageAgent.cpp:
499         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
500         * inspector/InspectorPageAgent.h:
501         * inspector/InspectorResourceAgent.cpp:
502         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
503         * inspector/InspectorResourceAgent.h:
504         * inspector/InspectorTimelineAgent.cpp:
505         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
506         * inspector/InspectorTimelineAgent.h:
507         * inspector/InspectorWorkerAgent.cpp:
508         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
509         * inspector/InspectorWorkerAgent.h:
510         * inspector/PageDebuggerAgent.cpp:
511         (WebCore::PageDebuggerAgent::disable):
512         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
513         * inspector/PageDebuggerAgent.h:
514         * inspector/PageRuntimeAgent.cpp:
515         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
516         * inspector/PageRuntimeAgent.h:
517         * inspector/WorkerDebuggerAgent.cpp:
518         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
519         * inspector/WorkerDebuggerAgent.h:
520         * inspector/WorkerRuntimeAgent.cpp:
521         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
522         * inspector/WorkerRuntimeAgent.h:
523         Include InspectorDisconnectReason param.
524
525 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
526
527         Another Windows fix: include <algorithm> for std::min and std::max.
528         
529         * platform/graphics/IntSize.h:
530
531 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
532
533         Try to fix Windows build.
534
535         * platform/win/PopupMenuWin.cpp:
536         (WebCore::PopupMenuWin::visibleSize):
537         * platform/win/PopupMenuWin.h:
538
539 2014-01-23  Simon Fraser  <simon.fraser@apple.com>
540
541         Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
542         https://bugs.webkit.org/show_bug.cgi?id=127456
543         
544         Reviewed by Antti Koivisto.
545         
546         On iOS, visibleContentRect() returns the entire document rect for historical
547         reasons, and actualVisibleContentRect() returns what visibleContentRect()
548         returns on other platforms.
549         
550         In addition, actualVisibleContentRect() was returning an empty rect in WK2.
551         
552         Reduce the confusion of #ifdefs by making visibleContentRect() behave like
553         actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
554         an optional parameter, LegacyIOSDocumentVisibleRect, provides this.
555         
556         Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
557         which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().
558         
559         Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
560         with non-virtual visibleHeight() and visibleWidth().
561         
562         ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.
563         
564         Mechanically change all the call sites of actualVisibleContentRect() to
565         use visibleContentRect(), and the call sites of visibleContentRect()
566         to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
567         where this may not be appropriate.
568         
569         Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().
570         
571         Also add actualScrollPosition(), and clean up some actualScroll* call sites.
572         
573         No behavior change.
574
575         * WebCore.exp.in:
576         * accessibility/AccessibilityObject.cpp:
577         (WebCore::AccessibilityObject::isOnscreen):
578         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
579         * accessibility/AccessibilityRenderObject.cpp:
580         (WebCore::AccessibilityRenderObject::isOffScreen):
581         * dom/Document.cpp:
582         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
583         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
584         * dom/MouseRelatedEvent.cpp:
585         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
586         * editing/Editor.cpp:
587         (WebCore::Editor::countMatchesForText):
588         * editing/FrameSelection.cpp:
589         (WebCore::FrameSelection::bounds):
590         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
591         * html/HTMLBodyElement.cpp:
592         (WebCore::HTMLBodyElement::scrollLeft):
593         (WebCore::HTMLBodyElement::scrollTop):
594         * html/ImageDocument.cpp:
595         (WebCore::ImageDocument::imageFitsInWindow):
596         (WebCore::ImageDocument::windowSizeChanged):
597         * inspector/InspectorOverlay.cpp:
598         (WebCore::InspectorOverlay::update):
599         * page/DOMWindow.cpp:
600         (WebCore::DOMWindow::innerHeight):
601         (WebCore::DOMWindow::innerWidth):
602         (WebCore::DOMWindow::scrollX):
603         (WebCore::DOMWindow::scrollY):
604         (WebCore::DOMWindow::scrollBy):
605         * page/FrameView.cpp:
606         (WebCore::FrameView::calculateScrollbarModesForLayout):
607         (WebCore::FrameView::layout):
608         (WebCore::FrameView::scrollContentsSlowPath):
609         (WebCore::FrameView::repaintContentRectangle):
610         (WebCore::FrameView::sendResizeEventIfNeeded):
611         (WebCore::FrameView::windowClipRect):
612         (WebCore::FrameView::isScrollable):
613         (WebCore::FrameView::paintControlTints):
614         * page/SpatialNavigation.cpp:
615         (WebCore::canScrollInDirection):
616         * platform/ScrollView.cpp:
617         (WebCore::ScrollView::unscaledVisibleContentSize):
618         (WebCore::ScrollView::visibleContentRectInternal):
619         (WebCore::ScrollView::updateScrollbars):
620         (WebCore::ScrollView::paint):
621         * platform/ScrollView.h:
622         (WebCore::ScrollView::scrollOffset):
623         (WebCore::ScrollView::actualScrollX):
624         (WebCore::ScrollView::actualScrollY):
625         (WebCore::ScrollView::actualScrollPosition):
626         * platform/ScrollableArea.cpp:
627         (WebCore::ScrollableArea::visibleContentRect):
628         (WebCore::ScrollableArea::visibleContentRectIncludingScrollbars):
629         (WebCore::ScrollableArea::visibleContentRectInternal):
630         * platform/ScrollableArea.h:
631         (WebCore::ScrollableArea::visibleWidth):
632         (WebCore::ScrollableArea::visibleHeight):
633         * platform/graphics/IntSize.h:
634         (WebCore::IntSize::expandedTo): Drive-by cleanup.
635         (WebCore::IntSize::shrunkTo):
636         * platform/gtk/ScrollViewGtk.cpp:
637         (WebCore::ScrollView::visibleContentRect):
638         * rendering/RenderLayer.cpp:
639         (WebCore::RenderLayer::scrollRectToVisible):
640         (WebCore::RenderLayer::maximumScrollPosition):
641         (WebCore::RenderLayer::visibleContentRectInternal):
642         (WebCore::RenderLayer::hitTest):
643         * rendering/RenderLayer.h:
644         * rendering/RenderLayerBacking.cpp:
645         (WebCore::RenderLayerBacking::updateCompositedBounds):
646         * rendering/RenderListBox.cpp:
647         * rendering/RenderListBox.h:
648         * rendering/RenderView.cpp:
649         (WebCore::RenderView::viewRect):
650         (WebCore::RenderView::viewportSize):
651
652 2014-01-20  Myles C. Maxfield  <mmaxfield@apple.com>
653
654        Turn text-decoration-skip: ink on for all underlines
655        https://bugs.webkit.org/show_bug.cgi?id=127331
656
657        Reviewed by Antti Koivisto.
658
659        No new tests are necessary because tests already exist
660
661        * rendering/style/RenderStyle.h:
662
663 2014-01-23  Hans Muller  <hmuller@adobe.com>
664
665         [CSS Shapes] Image valued shape size and position should conform to the spec
666         https://bugs.webkit.org/show_bug.cgi?id=123295
667
668         Reviewed by Andreas Kling.
669
670         Implement image valued shape-outside scaling and translation per the spec,
671         http://dev.w3.org/csswg/css-shapes/#shapes-from-image:
672
673         "The image is sized and positioned as if it were a replaced element whose
674         specified width and height are the same as the element’s used content box size."
675
676         This change doesn't completely fulfill the spec, it's limited to image elements
677         and shape-outside.
678
679         Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-001.html
680                fast/shapes/shape-outside-floats/shape-outside-image-fit-002.html
681                fast/shapes/shape-outside-floats/shape-outside-image-fit-003.html
682                fast/shapes/shape-outside-floats/shape-outside-image-fit-004.html
683
684         * rendering/shapes/Shape.h:
685         * rendering/shapes/Shape.cpp:
686         (WebCore::Shape::createRasterShape):
687         Added an imageRect parameter which specifies where the shape image is to
688         appear relative to the content box. The imageRect implies both scaling and
689         translation of the shape image.
690
691         * rendering/shapes/ShapeInfo.cpp:
692         (WebCore::ShapeInfo<RenderType>::computedShape):
693         (WebCore::getShapeImageRect):
694         For replaced elements, compute the shape's imageRect with
695         RenderReplaced::replacedContentRect().
696
697
698 2014-01-23  Max Vujovic  <mvujovic@adobe.com>
699
700         Remove CSS Custom Filters code and tests
701         https://bugs.webkit.org/show_bug.cgi?id=127382
702
703         Reviewed by Simon Fraser.
704
705         No new tests. Removing functionality.
706
707         * CMakeLists.txt:
708         * Configurations/FeatureDefines.xcconfig:
709         * DerivedSources.cpp:
710         * DerivedSources.make:
711         * GNUmakefile.list.am:
712         * WebCore.order:
713         * WebCore.vcxproj/WebCore.vcxproj:
714         * WebCore.vcxproj/WebCore.vcxproj.filters:
715         * WebCore.xcodeproj/project.pbxproj:
716         * bindings/js/JSCSSRuleCustom.cpp:
717         (WebCore::toJS):
718         * bindings/js/JSCSSValueCustom.cpp:
719         (WebCore::toJS):
720         * bindings/objc/DOMCSS.mm:
721         (kitClass):
722         * css/CSSComputedStyleDeclaration.cpp:
723         (WebCore::ComputedStyleExtractor::valueForFilter):
724         (WebCore::ComputedStyleExtractor::propertyValue):
725         * css/CSSComputedStyleDeclaration.h:
726         * css/CSSGrammar.y.in:
727         * css/CSSParser.cpp:
728         (WebCore::CSSParserContext::CSSParserContext):
729         (WebCore::operator==):
730         (WebCore::CSSParser::CSSParser):
731         (WebCore::CSSParser::parseValue):
732         (WebCore::filterInfoForName):
733         (WebCore::CSSParser::parseFilter):
734         (WebCore::CSSParser::detectAtToken):
735         * css/CSSParser.h:
736         * css/CSSParserMode.h:
737         * css/CSSPropertyNames.in:
738         * css/CSSPropertySourceData.h:
739         * css/CSSRule.h:
740         * css/CSSRule.idl:
741         * css/CSSValue.cpp:
742         (WebCore::CSSValue::equals):
743         (WebCore::CSSValue::cssText):
744         (WebCore::CSSValue::destroy):
745         (WebCore::CSSValue::cloneForCSSOM):
746         * css/CSSValue.h:
747         * css/CSSValueKeywords.in:
748         * css/StyleResolver.cpp:
749         (WebCore::StyleResolver::State::clear):
750         (WebCore::StyleResolver::applyProperty):
751         (WebCore::filterOperationForType):
752         (WebCore::StyleResolver::createFilterOperations):
753         (WebCore::StyleResolver::loadPendingResources):
754         * css/StyleResolver.h:
755         (WebCore::StyleResolver::State::State):
756         * css/StyleRule.cpp:
757         (WebCore::StyleRuleBase::destroy):
758         (WebCore::StyleRuleBase::copy):
759         (WebCore::StyleRuleBase::createCSSOMWrapper):
760         * css/StyleRule.h:
761         * css/StyleSheetContents.cpp:
762         (WebCore::childRulesHaveFailedOrCanceledSubresources):
763         * css/WebKitCSSArrayFunctionValue.cpp: Removed.
764         * css/WebKitCSSArrayFunctionValue.h: Removed.
765         * css/WebKitCSSFilterRule.cpp: Removed.
766         * css/WebKitCSSFilterRule.h: Removed.
767         * css/WebKitCSSFilterRule.idl: Removed.
768         * css/WebKitCSSFilterValue.cpp:
769         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
770         (WebCore::WebKitCSSFilterValue::customCSSText):
771         * css/WebKitCSSFilterValue.h:
772         * css/WebKitCSSFilterValue.idl:
773         * css/WebKitCSSMatFunctionValue.cpp: Removed.
774         * css/WebKitCSSMatFunctionValue.h: Removed.
775         * css/WebKitCSSMixFunctionValue.cpp: Removed.
776         * css/WebKitCSSMixFunctionValue.h: Removed.
777         * css/WebKitCSSMixFunctionValue.idl: Removed.
778         * css/WebKitCSSShaderValue.cpp: Removed.
779         * css/WebKitCSSShaderValue.h: Removed.
780         * loader/cache/CachedResource.cpp:
781         (WebCore::defaultPriorityForResourceType):
782         * loader/cache/CachedResource.h:
783         * loader/cache/CachedResourceLoader.cpp:
784         (WebCore::createResource):
785         (WebCore::CachedResourceLoader::checkInsecureContent):
786         (WebCore::CachedResourceLoader::canRequest):
787         * loader/cache/CachedResourceLoader.h:
788         * loader/cache/CachedShader.cpp: Removed.
789         * loader/cache/CachedShader.h: Removed.
790         * page/Settings.cpp:
791         (WebCore::Settings::Settings):
792         * page/Settings.h:
793         * page/animation/CSSPropertyAnimation.cpp:
794         (WebCore::blendFilter):
795         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
796         (PlatformCALayerMac::filtersCanBeComposited):
797         * platform/graphics/filters/CustomFilterArrayParameter.h: Removed.
798         * platform/graphics/filters/CustomFilterColorParameter.h: Removed.
799         * platform/graphics/filters/CustomFilterCompiledProgram.cpp: Removed.
800         * platform/graphics/filters/CustomFilterCompiledProgram.h: Removed.
801         * platform/graphics/filters/CustomFilterConstants.h: Removed.
802         * platform/graphics/filters/CustomFilterGlobalContext.cpp: Removed.
803         * platform/graphics/filters/CustomFilterGlobalContext.h: Removed.
804         * platform/graphics/filters/CustomFilterMesh.cpp: Removed.
805         * platform/graphics/filters/CustomFilterMesh.h: Removed.
806         * platform/graphics/filters/CustomFilterMeshGenerator.cpp: Removed.
807         * platform/graphics/filters/CustomFilterMeshGenerator.h: Removed.
808         * platform/graphics/filters/CustomFilterNumberParameter.h: Removed.
809         * platform/graphics/filters/CustomFilterOperation.cpp: Removed.
810         * platform/graphics/filters/CustomFilterOperation.h: Removed.
811         * platform/graphics/filters/CustomFilterParameter.h: Removed.
812         * platform/graphics/filters/CustomFilterParameterList.cpp: Removed.
813         * platform/graphics/filters/CustomFilterParameterList.h: Removed.
814         * platform/graphics/filters/CustomFilterProgram.cpp: Removed.
815         * platform/graphics/filters/CustomFilterProgram.h: Removed.
816         * platform/graphics/filters/CustomFilterProgramClient.h: Removed.
817         * platform/graphics/filters/CustomFilterProgramInfo.cpp: Removed.
818         * platform/graphics/filters/CustomFilterProgramInfo.h: Removed.
819         * platform/graphics/filters/CustomFilterRenderer.cpp: Removed.
820         * platform/graphics/filters/CustomFilterRenderer.h: Removed.
821         * platform/graphics/filters/CustomFilterTransformParameter.h: Removed.
822         * platform/graphics/filters/CustomFilterValidatedProgram.cpp: Removed.
823         * platform/graphics/filters/CustomFilterValidatedProgram.h: Removed.
824         * platform/graphics/filters/FECustomFilter.cpp: Removed.
825         * platform/graphics/filters/FECustomFilter.h: Removed.
826         * platform/graphics/filters/FilterOperation.h:
827         * platform/graphics/filters/FilterOperations.cpp:
828         (WebCore::FilterOperations::outsets):
829         * platform/graphics/filters/FilterOperations.h:
830         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Removed.
831         * platform/graphics/filters/ValidatedCustomFilterOperation.h: Removed.
832         * platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp: Removed.
833         * platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h: Removed.
834         * platform/graphics/gpu/Texture.cpp:
835         * platform/graphics/texmap/TextureMapper.h:
836         * platform/graphics/texmap/TextureMapperGL.cpp:
837         (WebCore::getPassesRequiredForFilter):
838         (WebCore::BitmapTextureGL::applyFilters):
839         * platform/graphics/texmap/TextureMapperGL.h:
840         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
841         (WebCore::CompositingCoordinator::clearPendingStateChanges):
842         (WebCore::CompositingCoordinator::syncLayerState):
843         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
844         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h: Removed.
845         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h: Removed.
846         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
847         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
848         (WebCore::CoordinatedGraphicsScene::commitSceneState):
849         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
850         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
851         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
852         * rendering/FilterEffectRenderer.cpp:
853         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
854         (WebCore::FilterEffectRenderer::build):
855         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
856         * rendering/FilterEffectRenderer.h:
857         * rendering/RenderLayer.cpp:
858         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
859         (WebCore::RenderLayer::calculateClipRects):
860         * rendering/RenderLayer.h:
861         * rendering/RenderLayerBacking.cpp:
862         (WebCore::RenderLayerBacking::updateFilters):
863         * rendering/RenderLayerFilterInfo.cpp:
864         (WebCore::RenderLayer::FilterInfo::~FilterInfo):
865         * rendering/RenderLayerFilterInfo.h:
866         * rendering/RenderView.cpp:
867         * rendering/RenderView.h:
868         * rendering/style/StyleCachedShader.cpp: Removed.
869         * rendering/style/StyleCachedShader.h: Removed.
870         * rendering/style/StyleCustomFilterProgram.cpp: Removed.
871         * rendering/style/StyleCustomFilterProgram.h: Removed.
872         * rendering/style/StyleCustomFilterProgramCache.cpp: Removed.
873         * rendering/style/StyleCustomFilterProgramCache.h: Removed.
874         * rendering/style/StylePendingShader.h: Removed.
875         * rendering/style/StyleShader.h: Removed.
876
877 2014-01-22  Jon Honeycutt  <jhoneycutt@apple.com>
878
879         REGRESSION(r161967): Crash in WebCore::CachedSVGDocumentReference::load
880         <https://webkit.org/b/127151>
881         <rdar://problem/15840760>
882
883         There were two issues introduced here; the first is a use-after-free of
884         CachedSVGDocumentReference objects.
885
886         The previous code kept a map from FilterOperation ->
887         RefPtr<WebKitCSSSVGDocumentValue>, which retained the
888         CachedSVGDocument. In r161967, this was changed to use a weak HashSet,
889         which allows stale CachedSVGDocumentReferences in the pending document
890         set if the owning FilterOperation is deleted. To fix this, we'll keep a
891         vector of RefPtr<FilterOperation> with pending SVG documents.
892
893         The second issue is a null deref in CachedSVGDocumentReference::load();
894         CachedResourceLoader::requestSVGDocument() can return 0 if (for
895         example) an invalid URL is passed. r161967 removed a null check as part
896         of the refactoring.
897
898         Reviewed by Dirk Schulze.
899
900         Tests: css3/filters/crash-filter-animation-invalid-url.html
901                css3/filters/crash-invalid-url.html
902
903         * css/StyleResolver.cpp:
904         (WebCore::StyleResolver::State::clear):
905         Use new member var name.
906         (WebCore::StyleResolver::loadPendingSVGDocuments):
907         For each FilterOperation with a pending SVG document, get or create a
908         CachedSVGDocumentReference, and tell it to load. Changed to use new
909         function names.
910         (WebCore::StyleResolver::createFilterOperations):
911         Append the FilterOperation to the list of FilterOperations with
912         unloaded SVG documents.
913
914         * css/StyleResolver.h:
915         Changed from using PendingSVGDocumentSet, a weak set, to
916         a Vector<RefPtr<ReferenceFilterOperation>>.
917         (WebCore::StyleResolver::State::filtersWithPendingSVGDocuments):
918         Return the vector.
919
920         * loader/cache/CachedSVGDocumentReference.cpp:
921         (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
922         Null check m_document rather than checking m_loadRequested.
923         m_loadRequested may be true when m_document is 0.
924         (WebCore::CachedSVGDocumentReference::load):
925         Null check the result of CachedResourceLoader::requestSVGDocument().
926
927         * platform/graphics/filters/FilterOperation.cpp:
928         (WebCore::ReferenceFilterOperation::getOrCreateCachedSVGDocumentReference):
929         Create, if necessary, and return the CachedSVGDocumentReference.
930
931         * platform/graphics/filters/FilterOperation.h:
932         Replaced createCachedSVGDocumentReference() with
933         getOrCreateCachedSVGDocumentReference(), which makes for slightly
934         cleaner code.
935
936 2014-01-23  Antti Koivisto  <antti@apple.com>
937
938         Don't enable speculative tiles immediately after main load stops progressing
939         https://bugs.webkit.org/show_bug.cgi?id=127507
940
941         Reviewed by Andreas Kling.
942
943         It is common for timers and events to trigger more loading after the initial main frame loading
944         has completed. We should delay a bit before enabling speculative tiles and keep them disabled 
945         if loading still continues.
946
947         * page/FrameView.cpp:
948         (WebCore::FrameView::FrameView):
949         (WebCore::FrameView::adjustTiledBackingCoverage):
950         (WebCore::shouldEnableSpeculativeTilingDuringLoading):
951         (WebCore::FrameView::enableSpeculativeTilingIfNeeded):
952         
953             When load progression stops wait 0.5s before enabling speculative tiles.
954
955         (WebCore::FrameView::speculativeTilingEnableTimerFired):
956         
957             Don't enable speculative tiles if the progression has started again. Instead restart the timer.
958
959         * page/FrameView.h:
960         * rendering/RenderLayerBacking.cpp:
961         (WebCore::RenderLayerBacking::RenderLayerBacking):
962         (WebCore::computeTileCoverage):
963         
964             Move the FrameView level code to FrameView (so we don't need to add a timer to every RenderLayerBacking).
965
966         * rendering/RenderLayerBacking.h:
967
968 2014-01-23  Antti Koivisto  <antti@apple.com>
969
970         Loads started soon after main frame completion should be considered part of the main load
971         https://bugs.webkit.org/show_bug.cgi?id=127504
972
973         Reviewed by Andreas Kling.
974
975         ProgressTracker currently decides that main load is complete when the main frame stops loading. 
976         However it is common that timers and onload events trigger more loads immediately (for example 
977         by inserting iframes) and loading continues visually. These should be considered as part of the
978         main load for paint throttling and speculative tiling coverage purposes.
979
980         * loader/ProgressTracker.cpp:
981         (WebCore::ProgressTracker::ProgressTracker):
982         (WebCore::ProgressTracker::progressStarted):
983         
984             Track whether this is considered part of the main load or not with a boolean. 
985             It is set for subframe loads too if they start loading soon (within 1s) after the main frame load completes.
986
987         (WebCore::ProgressTracker::finalProgressComplete):
988         
989             Get a timestamp.
990
991         (WebCore::ProgressTracker::isMainLoadProgressing):
992
993             New definition of "main load".
994
995         * loader/ProgressTracker.h:
996
997 2014-01-23  peavo@outlook.com  <peavo@outlook.com>
998
999         [WinCairo] Compile error.
1000         https://bugs.webkit.org/show_bug.cgi?id=127499
1001
1002         Reviewed by Brent Fulgham.
1003
1004         * platform/network/curl/ResourceError.h: Include <winsock2.h> before <curl/curl.h>.
1005
1006 2014-01-23  Brady Eidson  <beidson@apple.com>
1007
1008         IDB: Implement cross-thread and IPC plumbing for 'get' support
1009         https://bugs.webkit.org/show_bug.cgi?id=127501
1010
1011         Reviewed by Anders Carlsson.
1012
1013         Add isolatedCopy to the IDBGetResult object:
1014         * Modules/indexeddb/IDBGetResult.h:
1015         (WebCore::IDBGetResult::isolatedCopy):
1016
1017         Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
1018         * Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
1019         (WebCore::IDBKeyRangeData::isolatedCopy):
1020         * Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
1021         (WebCore::IDBKeyRangeData::IDBKeyRangeData):
1022
1023         Add a few more cross-thread copiers:
1024         * platform/CrossThreadCopier.cpp:
1025         (WebCore::IDBGetResult>::copy):
1026         (WebCore::IDBKeyRangeData>::copy):
1027         * platform/CrossThreadCopier.h:
1028
1029         Project file gunk:
1030         * CMakeLists.txt:
1031         * GNUmakefile.list.am:
1032         * WebCore.exp.in:
1033         * WebCore.xcodeproj/project.pbxproj:
1034
1035 2014-01-23  Jer Noble  <jer.noble@apple.com>
1036
1037         [MSE][Mac] Adopt new AVStreamDataParser delegate API
1038         https://bugs.webkit.org/show_bug.cgi?id=127498
1039
1040         Reviewed by Eric Carlson.
1041
1042         Adopt a new delegate API which passes in whether or not the new AVAsset
1043         is discontinuous, implying the AVAsset is entirely new rather than
1044         just updated with new information.
1045
1046         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1047         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
1048
1049 2014-01-23  Tim Horton  <timothy_horton@apple.com>
1050
1051         PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
1052         https://bugs.webkit.org/show_bug.cgi?id=127415
1053         <rdar://problem/12482452>
1054
1055         Reviewed by Sam Weinig.
1056
1057         * English.lproj/Localizable.strings:
1058         * WebCore.exp.in:
1059         * platform/LocalizedStrings.cpp:
1060         (WebCore::useBlockedPlugInContextMenuTitle):
1061         * platform/LocalizedStrings.h:
1062         Add a localizable string for the generic case, where the client
1063         didn't provide a more specific string for the context menu item.
1064
1065 2014-01-23  peavo@outlook.com  <peavo@outlook.com>
1066
1067         [Curl] There is no way to specify cache folder.
1068         https://bugs.webkit.org/show_bug.cgi?id=125028
1069
1070         Reviewed by Brent Fulgham.
1071
1072         Fixed logical test, disc cache should be disabled if creating cache folder fails.
1073
1074         * platform/network/curl/CurlCacheManager.cpp:
1075         (WebCore::CurlCacheManager::setCacheDirectory):
1076
1077 2014-01-23  Brady Eidson  <beidson@apple.com>
1078
1079         Unreviewed build fix.
1080
1081         * WebCore.xcodeproj/project.pbxproj: Export the new header so WebKit can see it
1082
1083 2014-01-22  Brent Fulgham  <bfulgham@apple.com>
1084
1085         [Win] Update project and solution files for 64-bit builds
1086         https://bugs.webkit.org/show_bug.cgi?id=127457
1087
1088         Reviewed by Eric Carlson.
1089
1090         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Update for VS2013
1091         * WebCore.vcxproj/WebCore.submit.sln: Add x64 targets
1092         * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013. Also exclude 32-bit specific
1093         assembly when building 64-bit target.
1094         * WebCore.vcxproj/WebCore.vcxproj.filters: Update for VS2013
1095         * config.h: Handle 64-bit type definitions.
1096         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1097         (PlatformCAAnimation::setFromValue): Use CGFloat to support 64-bit builds
1098         (PlatformCAAnimation::setToValue): Ditto
1099         (PlatformCAAnimation::setValues): Ditto
1100         * platform/graphics/win/FontCustomPlatformData.cpp:
1101         (WebCore::FontCustomPlatformData::fontPlatformData): Add cast to
1102         support 32- and 64-bit targets.
1103         * platform/graphics/win/GraphicsContextCGWin.cpp:
1104         (WebCore::GraphicsContext::drawLineForDocumentMarker): Use CGFloat to
1105         support 64-bit builds.
1106         * platform/win/PasteboardWin.cpp:
1107         (WebCore::Pasteboard::writeURLToDataObject): Specialize std::min to
1108         work on 32- and 64-bit code.
1109         (WebCore::createGlobalImageFileDescriptor): Ditto
1110         * platform/win/StructuredExceptionHandlerSuppressor.cpp:
1111         (WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor):
1112         Comment out 32-bit inline assembly.
1113         (WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor):
1114         Ditto
1115
1116 2014-01-23  Brady Eidson  <beidson@apple.com>
1117
1118         Make IDBGetResult work with IDBKeyData instead of IDBKey.
1119         https://bugs.webkit.org/show_bug.cgi?id=127493
1120
1121         Reviewed by Eric Carlson.
1122
1123         Also break it into its own header to work better with IPC messages.
1124
1125         * Modules/indexeddb/IDBGetResult.h: Added.
1126         (WebCore::IDBGetResult::IDBGetResult):
1127
1128         * Modules/indexeddb/IDBServerConnection.h:
1129
1130         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1131         (WebCore::GetOperation::perform):
1132
1133         * WebCore.xcodeproj/project.pbxproj:
1134
1135 2014-01-23  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
1136
1137         [curl] Add storage limit to cache manager
1138         https://bugs.webkit.org/show_bug.cgi?id=125779
1139
1140         Reviewed by Brent Fulgham.
1141
1142         Sets a local disc storage size limit for the cache manager
1143         used by the curl network backend.
1144
1145         * platform/network/curl/CurlCacheEntry.cpp:
1146         (WebCore::CurlCacheEntry::CurlCacheEntry):
1147         (WebCore::CurlCacheEntry::isCached):
1148         (WebCore::CurlCacheEntry::saveCachedData):
1149         (WebCore::CurlCacheEntry::readCachedData):
1150         (WebCore::CurlCacheEntry::didFail):
1151         (WebCore::CurlCacheEntry::didFinishLoading):
1152         (WebCore::CurlCacheEntry::loadFileToBuffer):
1153         (WebCore::CurlCacheEntry::parseResponseHeaders):
1154         (WebCore::CurlCacheEntry::entrySize):
1155         * platform/network/curl/CurlCacheEntry.h:
1156         (WebCore::CurlCacheEntry::requestHeaders):
1157         * platform/network/curl/CurlCacheManager.cpp:
1158         (WebCore::CurlCacheManager::CurlCacheManager):
1159         (WebCore::CurlCacheManager::setStorageSizeLimit):
1160         (WebCore::CurlCacheManager::loadIndex):
1161         (WebCore::CurlCacheManager::saveIndex):
1162         (WebCore::CurlCacheManager::makeRoomForNewEntry):
1163         (WebCore::CurlCacheManager::didReceiveResponse):
1164         (WebCore::CurlCacheManager::didReceiveData):
1165         (WebCore::CurlCacheManager::invalidateCacheEntry):
1166         (WebCore::CurlCacheManager::readCachedData):
1167         * platform/network/curl/CurlCacheManager.h:
1168         (WebCore::CurlCacheManager::cacheDirectory):
1169
1170 2014-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1171
1172         Unreviewed. Fix automake warning.
1173
1174         * GNUmakefile.list.am: Remove trailing whitespaces.
1175
1176 2014-01-23  Mihai Maerean  <mmaerean@adobe.com>
1177
1178         [CSS Regions] Fix positioning composited layers when the region has overflow:hidden
1179         https://bugs.webkit.org/show_bug.cgi?id=124042
1180
1181         Reviewed by Mihnea Ovidenie.
1182
1183         If there's a clipping GraphicsLayer on the hierarchy, substract its offset, since it's its
1184         parent that positions us.
1185
1186         Tests: compositing/regions/position-layer-inside-region-overflow-hidden.html
1187                compositing/regions/position-layer-inside-overflow-hidden.html
1188                compositing/regions/position-layers-inside-region-overflow-hidden.html
1189                compositing/regions/position-layers-inside-regions-overflow-hidden.html
1190
1191         * rendering/RenderLayerBacking.cpp:
1192         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): The position
1193         must also be correct when the region has box-shadow that inflates the region's layer. The
1194         composited layers from the flow thread should be rendered in the same position whether the
1195         associated region has clipping or not.
1196         Using the position of the clipping layer instead of the location of the clipbox makes it
1197         also work with box-shadow that inflates the region's graphics layer.
1198
1199 2014-01-23  Andrei Bucur  <abucur@adobe.com>
1200
1201         [CSS Regions] Convert regions iterator loops to range-based loops
1202         https://bugs.webkit.org/show_bug.cgi?id=127464
1203
1204         Reviewed by Antti Koivisto.
1205
1206         Replace most of the iterator loops in the region implementation with
1207         range based for loops. The for loops that iterate only over subsets
1208         of collections have not been changed.
1209
1210         Tests: no new tests, this is a refactoring patch.
1211
1212         * dom/WebKitNamedFlow.cpp:
1213         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
1214         (WebCore::WebKitNamedFlow::getRegionsByContent):
1215         (WebCore::WebKitNamedFlow::getRegions):
1216         (WebCore::WebKitNamedFlow::getContent):
1217         * inspector/InspectorOverlay.cpp:
1218         (WebCore::buildObjectForCSSRegionsHighlight):
1219         * rendering/RenderFlowThread.cpp:
1220         (WebCore::RenderFlowThread::validateRegions):
1221         (WebCore::RenderFlowThread::updateLogicalWidth):
1222         (WebCore::RenderFlowThread::computeLogicalHeight):
1223         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1224         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1225         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1226         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1227         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
1228         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
1229         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
1230         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1231         (WebCore::RenderFlowThread::collectLayerFragments):
1232         (WebCore::RenderFlowThread::fragmentsBoundingBox):
1233         * rendering/RenderNamedFlowFragment.cpp:
1234         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
1235         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
1236         * rendering/RenderNamedFlowThread.cpp:
1237         (WebCore::RenderNamedFlowThread::clearContentElements):
1238         (WebCore::RenderNamedFlowThread::nextRendererForNode):
1239         (WebCore::RenderNamedFlowThread::dependsOn):
1240         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
1241         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
1242         (WebCore::RenderNamedFlowThread::pushDependencies):
1243         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
1244         (WebCore::isContainedInElements):
1245         (WebCore::RenderNamedFlowThread::getRanges):
1246         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
1247         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
1248         * rendering/RenderTreeAsText.cpp:
1249         (WebCore::writeRenderRegionList):
1250
1251 2014-01-23  László Langó  <llango.u-szeged@partner.samsung.com>
1252
1253         Range should be constructable.
1254         https://bugs.webkit.org/show_bug.cgi?id=115639
1255
1256         Reviewed by Ryosuke Niwa.
1257
1258         http://www.w3.org/TR/2013/WD-dom-20131107/#interface-range
1259         Now we can do `new Range()` instead of `document.createRange()`.
1260
1261         Backported from Blink: https://chromium.googlesource.com/chromium/blink/+/47ca40efdf58a4787aa33aa75a35778899b1c002%5E%21
1262
1263         Test: fast/dom/Range/range-constructor.html
1264
1265         * dom/Range.cpp:
1266         (WebCore::Range::create):
1267         * dom/Range.h:
1268         * dom/Range.idl:
1269
1270 2014-01-23  ChangSeok Oh  <changseok.oh@collabora.com>
1271
1272         Unreviewed build fix for gles after r162565. Add missing definitions.
1273
1274         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1275         (WebCore::GraphicsContext3D::drawArraysInstanced):
1276         (WebCore::GraphicsContext3D::drawElementsInstanced):
1277         (WebCore::GraphicsContext3D::vertexAttribDivisor):
1278
1279 2014-01-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1280
1281         [GLIB] Use GUniquePtr instead of GOwnPtr
1282         https://bugs.webkit.org/show_bug.cgi?id=127431
1283
1284         Reviewed by Martin Robinson.
1285
1286         GUniquePtr is a template alias of std::unique_ptr with a custom
1287         deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
1288         where the output pointer is needed, but it will also be replaced soon.
1289
1290         * GNUmakefile.list.am:
1291         * PlatformGTK.cmake:
1292         * accessibility/atk/AXObjectCacheAtk.cpp:
1293         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1294         (getAttributeSetForAccessibilityObject):
1295         (accessibilityObjectLength):
1296         (textExtents):
1297         (webkitAccessibleTextGetChar):
1298         (numberOfReplacedElementsBeforeOffset):
1299         * page/ContextMenuController.cpp:
1300         * platform/SharedBuffer.h:
1301         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1302         (webKitWebAudioSrcConstructed):
1303         (webKitWebAudioSrcLoop):
1304         * platform/audio/gtk/AudioBusGtk.cpp:
1305         (WebCore::AudioBus::loadPlatformResource):
1306         * platform/geoclue/GeolocationProviderGeoclue.cpp:
1307         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
1308         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1309         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
1310         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1311         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1312         (webKitMediaSrcAddSrc):
1313         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1314         (webKitWebSrcStart):
1315         (ResourceHandleStreamingClient::wasBlocked):
1316         (ResourceHandleStreamingClient::cannotShowURL):
1317         * platform/graphics/gtk/ImageBufferGtk.cpp:
1318         (WebCore::encodeImage):
1319         (WebCore::ImageBuffer::toDataURL):
1320         * platform/graphics/gtk/ImageGtk.cpp:
1321         (WebCore::getThemeIconFileName):
1322         (WebCore::Image::loadPlatformResource):
1323         * platform/gtk/ContextMenuGtk.cpp:
1324         (WebCore::ContextMenu::itemCount):
1325         (WebCore::contextMenuItemVector):
1326         * platform/gtk/ContextMenuItemGtk.cpp:
1327         (WebCore::createPlatformMenuItemDescription):
1328         * platform/gtk/DataObjectGtk.cpp:
1329         (WebCore::DataObjectGtk::setURIList):
1330         (WebCore::DataObjectGtk::setURL):
1331         * platform/gtk/FileSystemGtk.cpp:
1332         (WebCore::filenameToString):
1333         (WebCore::fileSystemRepresentation):
1334         (WebCore::filenameForDisplay):
1335         (WebCore::pathGetFileName):
1336         (WebCore::applicationDirectoryPath):
1337         (WebCore::sharedResourcesPath):
1338         (WebCore::directoryName):
1339         (WebCore::listDirectory):
1340         (WebCore::openTemporaryFile):
1341         * platform/gtk/GOwnPtrGtk.cpp: Removed.
1342         * platform/gtk/GOwnPtrGtk.h: Removed.
1343         * platform/gtk/GUniquePtrGtk.h: Added.
1344         * platform/gtk/GamepadsGtk.cpp:
1345         (WebCore::GamepadsGtk::GamepadsGtk):
1346         * platform/gtk/GtkClickCounter.cpp:
1347         (WebCore::GtkClickCounter::shouldProcessButtonEvent):
1348         * platform/gtk/GtkInputMethodFilter.cpp:
1349         (WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
1350         * platform/gtk/GtkPopupMenu.cpp:
1351         (WebCore::GtkPopupMenu::popUp):
1352         (WebCore::GtkPopupMenu::typeAheadFind):
1353         * platform/gtk/LanguageGtk.cpp:
1354         (WebCore::platformLanguage):
1355         * platform/gtk/LocalizedStringsGtk.cpp:
1356         (WebCore::imageTitle):
1357         (WebCore::localizedMediaTimeDescription):
1358         * platform/gtk/PasteboardHelper.cpp:
1359         (WebCore::selectionDataToUTF8String):
1360         (WebCore::PasteboardHelper::getClipboardContents):
1361         (WebCore::PasteboardHelper::fillSelectionData):
1362         * platform/gtk/PopupMenuGtk.cpp:
1363         (WebCore::PopupMenuGtk::createGtkActionForMenuItem):
1364         (WebCore::PopupMenuGtk::show):
1365         * platform/gtk/WebKitAuthenticationWidget.cpp:
1366         (webkitAuthenticationWidgetInitialize):
1367         * platform/network/ResourceHandleInternal.h:
1368         * platform/network/gtk/CredentialBackingStore.cpp:
1369         (WebCore::credentialForChallengeAsyncReadyCallback):
1370         * platform/network/soup/CookieJarSoup.cpp:
1371         (WebCore::setCookiesFromDOM):
1372         (WebCore::cookiesForSession):
1373         (WebCore::getRawCookies):
1374         (WebCore::deleteCookie):
1375         (WebCore::getHostnamesWithCookies):
1376         (WebCore::deleteCookiesForHostname):
1377         (WebCore::deleteAllCookies):
1378         * platform/network/soup/DNSSoup.cpp:
1379         * platform/network/soup/GUniquePtrSoup.h: Added.
1380         * platform/network/soup/ResourceErrorSoup.cpp:
1381         (WebCore::failingURI):
1382         * platform/network/soup/ResourceHandleSoup.cpp:
1383         (WebCore::ResourceHandle::ensureReadBuffer):
1384         (WebCore::cleanupSoupRequestOperation):
1385         (WebCore::createSoupRequestAndMessageForHandle):
1386         * platform/network/soup/ResourceRequestSoup.cpp:
1387         (WebCore::ResourceRequest::updateSoupMessageMembers):
1388         (WebCore::ResourceRequest::updateSoupMessage):
1389         * platform/network/soup/ResourceResponseSoup.cpp:
1390         * platform/network/soup/SoupURIUtils.cpp:
1391         (WebCore::soupURIToKURL):
1392         * platform/soup/SharedBufferSoup.cpp:
1393         (WebCore::SharedBuffer::SharedBuffer):
1394         (WebCore::SharedBuffer::clearPlatformData):
1395         (WebCore::SharedBuffer::maybeTransferPlatformData):
1396         (WebCore::SharedBuffer::hasPlatformData):
1397         * plugins/gtk/PluginPackageGtk.cpp:
1398         (WebCore::PluginPackage::fetchInfo):
1399         (WebCore::PluginPackage::load):
1400
1401 2014-01-22  Simon Fraser  <simon.fraser@apple.com>
1402
1403         Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
1404         https://bugs.webkit.org/show_bug.cgi?id=127461
1405
1406         Reviewed by Andreas Kling.
1407
1408         The "fixedVisibleContentRect" code path is only used by platforms
1409         which enabled TILED_BACKING_STORE, so to reduce confusion, surround
1410         this code with #if USE(TILED_BACKING_STORE).
1411
1412         * page/Frame.cpp:
1413         (WebCore::Frame::createView):
1414         * page/FrameView.cpp:
1415         * page/FrameView.h:
1416         * platform/ScrollView.cpp:
1417         (WebCore::ScrollView::unscaledVisibleContentSize):
1418         (WebCore::ScrollView::visibleContentRect):
1419         * platform/ScrollView.h:
1420         (WebCore::ScrollView::visibleSize):
1421
1422 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
1423
1424         ASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing
1425         https://bugs.webkit.org/show_bug.cgi?id=126987
1426
1427         Reviewed by Simon Fraser.
1428
1429         When "inherit" is specified and there is no parent, Length values have an "Auto" type
1430
1431         Test: fast/css3-text/css3-word-spacing-percentage/word-spacing-crash.html
1432
1433         * rendering/style/RenderStyle.cpp:
1434         (WebCore::RenderStyle::setWordSpacing):
1435
1436 2014-01-22  Samuel White  <samuel_white@apple.com>
1437
1438         AX: Can't always increment web sliders.
1439         https://bugs.webkit.org/show_bug.cgi?id=127451
1440
1441         Reviewed by Chris Fleizach.
1442
1443         Clamping the decrement/increment amount to one when necessary (if a percent change would result in a change of less than one).
1444
1445         Test: accessibility/range-alter-by-percent.html
1446
1447         * accessibility/AccessibilityNodeObject.cpp:
1448         (WebCore::AccessibilityNodeObject::changeValueByPercent):
1449
1450 2014-01-22  Myles C. Maxfield  <mmaxfield@apple.com>
1451
1452         Remove CSS3_TEXT_DECORATION define
1453         https://bugs.webkit.org/show_bug.cgi?id=127333
1454
1455         Reviewed by Simon Fraser.
1456
1457         This is required for unprefixing the text-decoration-* CSS properties.
1458
1459         No new tests are necessary becase the flag was already on by default.
1460
1461         * Configurations/FeatureDefines.xcconfig:
1462         * css/CSSComputedStyleDeclaration.cpp:
1463         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
1464         (WebCore::ComputedStyleExtractor::propertyValue):
1465         * css/CSSParser.cpp:
1466         (WebCore::isColorPropertyID):
1467         (WebCore::CSSParser::parseValue):
1468         (WebCore::CSSParser::addTextDecorationProperty):
1469         (WebCore::CSSParser::parseTextUnderlinePosition):
1470         * css/CSSParser.h:
1471         * css/CSSPrimitiveValueMappings.h:
1472         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
1473         * css/CSSPropertyNames.in:
1474         * css/CSSValueKeywords.in:
1475         * css/DeprecatedStyleBuilder.cpp:
1476         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1477         * css/StylePropertyShorthand.cpp:
1478         (WebCore::webkitTextDecorationShorthand):
1479         (WebCore::shorthandForProperty):
1480         (WebCore::matchingShorthandsForLonghand):
1481         * css/StylePropertyShorthand.h:
1482         * css/StyleResolver.cpp:
1483         (WebCore::shouldApplyPropertyInParseOrder):
1484         (WebCore::isValidVisitedLinkProperty):
1485         (WebCore::StyleResolver::applyProperty):
1486         * platform/graphics/GraphicsContext.h:
1487         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1488         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1489         * platform/graphics/cg/GraphicsContextCG.cpp:
1490         (WebCore::GraphicsContext::platformInit):
1491         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1492         (WebCore::createPen):
1493         * rendering/InlineFlowBox.cpp:
1494         (WebCore::InlineFlowBox::computeMaxLogicalTop):
1495         * rendering/InlineFlowBox.h:
1496         * rendering/InlineTextBox.cpp:
1497         (WebCore::textDecorationStyleToStrokeStyle):
1498         (WebCore::boundingBoxForAllActiveDecorations):
1499         (WebCore::InlineTextBox::paintDecoration):
1500         * rendering/RenderObject.cpp:
1501         (WebCore::decorationColor):
1502         * rendering/RootInlineBox.cpp:
1503         (WebCore::RootInlineBox::maxLogicalTop):
1504         * rendering/RootInlineBox.h:
1505         * rendering/style/RenderStyle.cpp:
1506         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
1507         (WebCore::RenderStyle::colorIncludingFallback):
1508         (WebCore::RenderStyle::visitedDependentColor):
1509         * rendering/style/RenderStyle.h:
1510         * rendering/style/RenderStyleConstants.h:
1511         * rendering/style/StyleRareInheritedData.cpp:
1512         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1513         (WebCore::StyleRareInheritedData::operator==):
1514         * rendering/style/StyleRareInheritedData.h:
1515         * rendering/style/StyleRareNonInheritedData.cpp:
1516         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1517         (WebCore::StyleRareNonInheritedData::operator==):
1518         * rendering/style/StyleRareNonInheritedData.h:
1519
1520 2014-01-22  Chris Fleizach  <cfleizach@apple.com>
1521
1522         AX: Do not return an accessible name for an object just because it has tabindex=0
1523         https://bugs.webkit.org/show_bug.cgi?id=126914
1524
1525         Reviewed by Mario Sanchez Prada.
1526
1527         WebKit has code to return an accessible name for any object that is "generically" focusable (ie. tabindex=0).
1528         This behavior, which is not supported in ARIA, has caused many problems for VoiceOver. Often VoiceOver will
1529         speak all the text underneath any type of group.
1530
1531         I think we need to revert this behavior and follow the ARIA spec more closely.
1532
1533         Test: accessibility/aria-describedby-ensures-visibility.html
1534
1535         * accessibility/AccessibilityNodeObject.cpp:
1536         (WebCore::AccessibilityNodeObject::visibleText):
1537         (WebCore::AccessibilityNodeObject::title):
1538
1539 2014-01-22  Brady Eidson  <beidson@apple.com>
1540
1541         The IDB backing store get() method shouldn't call IDB callbacks directly
1542         https://bugs.webkit.org/show_bug.cgi?id=127453
1543
1544         Reviewed by Beth Dakin.
1545
1546         * Modules/indexeddb/IDBServerConnection.h:
1547         (WebCore::IDBGetResult::IDBGetResult): Add a new structure to hold all of the
1548           possible results of a get() call.
1549
1550         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1551         (WebCore::IDBServerConnectionLevelDB::get): Don't call IDBCallbacks directly.
1552           Instead, return the GetResult to the GetOperation which will make IDBCallbacks.
1553         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
1554
1555         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1556         (WebCore::GetOperation::perform): Get all of the IDBGetResults in the completion callback
1557           make the appropriate IDBCallback.
1558         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1559
1560 2014-01-22  Dean Jackson  <dino@apple.com>
1561
1562         Unreviewed attempt to fix 32-bit builds.
1563
1564         Use long long rather than GC3Dintptr.
1565
1566         * html/canvas/ANGLEInstancedArrays.cpp:
1567         (WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE):
1568         * html/canvas/ANGLEInstancedArrays.h:
1569         * html/canvas/WebGLRenderingContext.cpp:
1570         (WebCore::WebGLRenderingContext::drawElementsInstanced):
1571         * html/canvas/WebGLRenderingContext.h:
1572
1573 2014-01-21  Brady Eidson  <beidson@apple.com>
1574
1575         IDB: "Put" support
1576         <rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401
1577
1578         Reviewed by Alexey Proskuryakov.
1579
1580         Add persistent encode/decode for storage to the database:
1581         * Modules/indexeddb/IDBKey.cpp:
1582         (WebCore::IDBKey::encode):
1583         (WebCore::IDBKey::decode):
1584         * Modules/indexeddb/IDBKey.h:
1585
1586         Add a data class to represent IDBKey suitable for crossing IPC:
1587         * Modules/indexeddb/IDBKeyData.cpp: Added.
1588         (WebCore::IDBKeyData::IDBKeyData):
1589         (WebCore::IDBKeyData::maybeCreateIDBKey):
1590         (WebCore::IDBKeyData::isolatedCopy):
1591         * Modules/indexeddb/IDBKeyData.h: Added.
1592         (WebCore::IDBKeyData::IDBKeyData):
1593
1594         * platform/CrossThreadCopier.cpp:
1595         (WebCore::IDBKeyData>::copy):
1596         * platform/CrossThreadCopier.h:
1597
1598         * WebCore.exp.in:
1599         * WebCore.xcodeproj/project.pbxproj:
1600
1601 2014-01-22  Dean Jackson  <dino@apple.com>
1602
1603         [WebGL] Implement ANGLE_instanced_arrays
1604         https://bugs.webkit.org/show_bug.cgi?id=127257
1605
1606         Reviewed by Brent Fulgham.
1607
1608         Implement the instanced drawing WebGL extension,
1609         ANGLE_instanced_arrays. This is currently Mac-only,
1610         but should be portable to other platforms if their
1611         OpenGL exposes the functions. It's also done in a way
1612         that will make exposing it to WebGL2 simple.
1613
1614         Test: fast/canvas/webgl/angle-instanced-arrays.html
1615
1616         * CMakeLists.txt:
1617         * DerivedSources.cpp:
1618         * DerivedSources.make:
1619         * GNUmakefile.list.am:
1620         * WebCore.vcxproj/WebCore.vcxproj:
1621         * WebCore.vcxproj/WebCore.vcxproj.filters:
1622         * WebCore.xcodeproj/project.pbxproj:
1623         Add the new files to all the build systems.
1624
1625         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1626         (WebCore::toJS): Link JS side to C++ side.
1627
1628         * html/canvas/ANGLEInstancedArrays.cpp: Added.
1629         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
1630         * html/canvas/ANGLEInstancedArrays.h: Added.
1631         * html/canvas/ANGLEInstancedArrays.idl: Added.
1632         New boilerplate files that expose the extension methods.
1633
1634         * html/canvas/WebGLExtension.h: New extension enum.
1635
1636         * html/canvas/WebGLRenderingContext.cpp:
1637         (WebCore::WebGLRenderingContext::validateVertexAttributes): Add an optional
1638         parameter representing the number of instance primitives we are asked
1639         to draw. Use that for the draw count if looking at an instanced attribute.
1640         Also make sure we see at least one non-instanced attribute.
1641         (WebCore::WebGLRenderingContext::validateDrawArrays): Update this so it could
1642         be used from either drawArrays or drawArraysInstanced.
1643         (WebCore::WebGLRenderingContext::drawArrays):
1644         (WebCore::WebGLRenderingContext::validateDrawElements): Same here, now can be
1645         used by the instanced and non-instanced versions.
1646         (WebCore::WebGLRenderingContext::drawElements):
1647         (WebCore::WebGLRenderingContext::getExtension): Create and return the new extension.
1648         (WebCore::WebGLRenderingContext::getSupportedExtensions): Add new extension to the list.
1649         (WebCore::WebGLRenderingContext::getVertexAttrib): Intercept a query to the divisor
1650         attribute and return the value we kept in the state.
1651         (WebCore::WebGLRenderingContext::drawArraysInstanced): Call the GC3D method.
1652         (WebCore::WebGLRenderingContext::drawElementsInstanced): Ditto.
1653         (WebCore::WebGLRenderingContext::vertexAttribDivisor): Ditto.
1654
1655         * html/canvas/WebGLRenderingContext.h: Define the new methods and parameters.
1656
1657         * html/canvas/WebGLVertexArrayObjectOES.cpp:
1658         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Keep a record of the
1659         divisor if we set it.
1660         * html/canvas/WebGLVertexArrayObjectOES.h:
1661         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::VertexAttribState):
1662
1663         * platform/graphics/GraphicsContext3D.h: New enum.
1664         * platform/graphics/mac/GraphicsContext3DMac.mm:
1665         (WebCore::GraphicsContext3D::drawArraysInstanced): The actual calls into OpenGL.
1666         (WebCore::GraphicsContext3D::drawElementsInstanced): Ditto.
1667         (WebCore::GraphicsContext3D::vertexAttribDivisor): Ditto.
1668
1669         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Empty implementations
1670         for non-mac platforms.
1671
1672         * platform/graphics/ios/GraphicsContext3DIOS.h: Define the iOS names for the
1673         functions.
1674
1675 2014-01-22  Zalan Bujtas  <zalan@apple.com>
1676
1677         [CSS Shapes] shape-inside rectangle layout can fail
1678         https://bugs.webkit.org/show_bug.cgi?id=124784
1679
1680         Reviewed by Darin Adler.
1681
1682         Early subpixel rounding/flooring/ceiling can have unwanted
1683         side effect on the final pixel value. Delay pixel
1684         conversions as much as possible.
1685
1686         Existing test is changed to reflect subpixel functionality.
1687
1688         * rendering/shapes/RectangleShape.cpp:
1689         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
1690
1691 2014-01-22  Jochen Eisinger  <jochen@chromium.org>
1692
1693         Add protocolIsInHTTPFamily for strings and use it where appropriate
1694         https://bugs.webkit.org/show_bug.cgi?id=127336
1695
1696         Reviewed by Alexey Proskuryakov.
1697
1698         * html/HTMLAnchorElement.cpp:
1699         (WebCore::HTMLAnchorElement::parseAttribute):
1700         * page/ContentSecurityPolicy.cpp:
1701         (WebCore::CSPSource::schemeMatches):
1702         * page/SecurityPolicy.cpp:
1703         (WebCore::SecurityPolicy::generateReferrerHeader):
1704         * platform/URL.cpp:
1705         (WebCore::protocolIsInHTTPFamily):
1706         * platform/URL.h:
1707
1708 2014-01-22  Zalan Bujtas  <zalan@apple.com>
1709
1710         Subpixel Layout: SimpleLineLayout needs more position rounding to match InlineFlowBox layout.
1711         https://bugs.webkit.org/show_bug.cgi?id=127404
1712
1713         Reviewed by Antti Koivisto.
1714
1715         In order to produce a CSS pixel perfect layout, SimpleLineLayout needs to
1716         round line positions to CSS (integral) position similarly to InlineFlowBox.
1717
1718         Existing tests cover it.
1719
1720         * rendering/SimpleLineLayoutResolver.h:
1721         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1722         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
1723
1724 2014-01-22  Joseph Pecoraro  <pecoraro@apple.com>
1725
1726         Unreviewed rollout of r162534, this caused inspector test failures.
1727
1728         * bindings/js/PageScriptDebugServer.cpp:
1729         (WebCore::PageScriptDebugServer::addListener):
1730         (WebCore::PageScriptDebugServer::removeListener):
1731         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1732         (WebCore::PageScriptDebugServer::didRemoveLastListener):
1733         * bindings/js/PageScriptDebugServer.h:
1734         * bindings/js/ScriptDebugServer.cpp:
1735         (WebCore::ScriptDebugServer::ScriptDebugServer):
1736         (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
1737         (WebCore::ScriptDebugServer::recompileAllJSFunctionsTimerFired):
1738         * bindings/js/ScriptDebugServer.h:
1739         * bindings/js/WorkerScriptDebugServer.cpp:
1740         (WebCore::WorkerScriptDebugServer::addListener):
1741         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1742         (WebCore::WorkerScriptDebugServer::removeListener):
1743         * inspector/InspectorProfilerAgent.cpp:
1744
1745 2014-01-22  peavo@outlook.com  <peavo@outlook.com>
1746
1747         Crashes in setTextForIterator
1748         https://bugs.webkit.org/show_bug.cgi?id=127424
1749
1750         Reviewed by Brent Fulgham.
1751
1752         * platform/text/icu/UTextProviderLatin1.cpp:
1753         (WebCore::uTextLatin1Clone): Provide correct buffer size in utext_setup function call.
1754         (WebCore::uTextLatin1Access): Give correct buffer size to memset call.
1755         (WebCore::openLatin1UTextProvider): Ditto.
1756
1757 2014-01-22  Jer Noble  <jer.noble@apple.com>
1758
1759         [Mac] MediaPlayerPrivateMediaSourceAVFObjC::load ASSERTs on lots of tests
1760         https://bugs.webkit.org/show_bug.cgi?id=127430
1761
1762         Reviewed by Eric Carlson.
1763
1764         When other registered media engines cannot load a URL, the engine selection
1765         will eventually pick MediaPlayerPrivateMediaSourceAVFObjC and ask it to load
1766         the URL. Instead of ASSERTing here, simply reject the URL by setting the
1767         network state to FormatError.
1768
1769         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1770         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
1771
1772 2014-01-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1773
1774         [EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
1775         https://bugs.webkit.org/show_bug.cgi?id=127119
1776
1777         Reviewed by Mario Sanchez Prada.
1778
1779         At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
1780         ACCESSIBILITY is not enabled, fixing that.
1781         Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.
1782
1783         * accessibility/AXObjectCache.h:
1784         (WebCore::AXObjectCache::AXObjectCache):
1785         * accessibility/AccessibilityObject.h:
1786
1787 2014-01-22  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1788
1789         Refactor calculation of hasRx and hasRy values in SVGPathData
1790         https://bugs.webkit.org/show_bug.cgi?id=127423
1791
1792         Reviewed by Darin Adler.
1793
1794         This is a follow-up on https://bugs.webkit.org/show_bug.cgi?id=127337
1795
1796         * rendering/svg/SVGPathData.cpp:
1797         (WebCore::updatePathFromRectElement):
1798
1799 2014-01-21  Joseph Pecoraro  <pecoraro@apple.com>
1800
1801         Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
1802         https://bugs.webkit.org/show_bug.cgi?id=127409
1803
1804         Reviewed by Timothy Hatcher.
1805
1806         * bindings/js/ScriptDebugServer.h:
1807         * bindings/js/ScriptDebugServer.cpp:
1808         (WebCore::ScriptDebugServer::ScriptDebugServer):
1809         Remove m_recompileTimer and the recompile soon function.
1810         We can just recompile immediately in all existing cases.
1811
1812         * bindings/js/PageScriptDebugServer.h:
1813         * bindings/js/PageScriptDebugServer.cpp:
1814         (WebCore::PageScriptDebugServer::addListener):
1815         (WebCore::PageScriptDebugServer::removeListener):
1816         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1817         (WebCore::PageScriptDebugServer::didAddFirstListener):
1818         (WebCore::PageScriptDebugServer::didRemoveLastListener):
1819         Add a "didAddFirstListener" to match "didRemoveLastListener".
1820         Only recompile functions when we attach the debugger and when
1821         we detach the last listener.
1822
1823         * bindings/js/WorkerScriptDebugServer.cpp:
1824         (WebCore::WorkerScriptDebugServer::addListener):
1825         (WebCore::WorkerScriptDebugServer::removeListener):
1826         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1827         Same thing. Also rearrange the functions to read better.
1828
1829         * inspector/InspectorProfilerAgent.cpp:
1830         Use the direct recompile function instead of the removed "soon" version.
1831
1832 2014-01-22  Robert Sipka  <sipka@inf.u-szeged.hu>
1833
1834         [curl] Improve detecting and handling of SSL client certificate
1835         https://bugs.webkit.org/show_bug.cgi?id=125006
1836
1837         Reviewed by Brent Fulgham.
1838
1839         Add client certificate handling.
1840
1841         * platform/network/ResourceHandle.h:
1842         * platform/network/curl/ResourceError.h:
1843         (WebCore::ResourceError::hasSSLConnectError):
1844         * platform/network/curl/ResourceHandleCurl.cpp:
1845         (WebCore::ResourceHandle::setClientCertificateInfo):
1846         * platform/network/curl/ResourceHandleManager.cpp:
1847         (WebCore::ResourceHandleManager::initializeHandle):
1848         * platform/network/curl/SSLHandle.cpp:
1849         (WebCore::addAllowedClientCertificate):
1850         (WebCore::setSSLClientCertificate):
1851         * platform/network/curl/SSLHandle.h:
1852
1853 2014-01-22  Mihai Maerean  <mmaerean@adobe.com>
1854
1855         [CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
1856         https://bugs.webkit.org/show_bug.cgi?id=127343
1857
1858         Reviewed by Sam Weinig.
1859
1860         RenderNamedFlowFragment::layerOwner cannot return null because regions create stacking
1861         contexts which create layers.
1862
1863         No new tests, no functional change.
1864
1865         * rendering/RenderFlowThread.cpp:
1866         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
1867         * rendering/RenderLayer.cpp:
1868         (WebCore::RenderLayer::calculateClipRects):
1869         * rendering/RenderLayerBacking.cpp:
1870         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
1871         * rendering/RenderLayerCompositor.cpp:
1872         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
1873         * rendering/RenderNamedFlowFragment.h:
1874
1875 2014-01-22  Antti Koivisto  <antti@apple.com>
1876
1877         Avoid unthrottled layer flushes triggered by RenderLayerCompositor::ensureRootLayer
1878         https://bugs.webkit.org/show_bug.cgi?id=127426
1879
1880         Reviewed by Anders Carlsson.
1881         
1882         * rendering/RenderLayerCompositor.cpp:
1883         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
1884         (WebCore::RenderLayerCompositor::frameViewDidScroll):
1885
1886             Factor scroll layer position update to a function.
1887
1888         (WebCore::RenderLayerCompositor::ensureRootLayer):
1889         
1890             Stop calling frameViewDidChangeSize/frameViewDidScroll. Instead call the relevent functions
1891             directly. This avoid unthrottled layer flush that is done when the view actually scrolls.
1892
1893         * rendering/RenderLayerCompositor.h:
1894
1895 2014-01-22  Mihai Tica  <mitica@adobe.com>
1896
1897         [CSS Background Blending] -webkit-background-blend-mode fails for certain SVG files
1898         https://bugs.webkit.org/show_bug.cgi?id=127350
1899
1900         Reviewed by Dirk Schulze.
1901
1902         The graphics context of the SVG inherits the blend mode set
1903         on the background layer. Fix consists in drawing the SVG
1904         in a transparency layer.
1905
1906         Test: css3/compositing/background-blend-mode-svg.html
1907
1908         * svg/graphics/SVGImage.cpp:
1909         (WebCore::SVGImage::draw): Begin a transparency layer if a blend mode is set.
1910
1911 2014-01-22  Antti Koivisto  <antti@apple.com>
1912
1913         Update overlay scrollbars in single pass
1914         https://bugs.webkit.org/show_bug.cgi?id=127289
1915
1916         Reviewed by Anders Carlsson.
1917
1918         * platform/ScrollView.cpp:
1919         (WebCore::ScrollView::updateScrollbars):
1920         
1921             Multi-pass scrollbar resolution is only needed for traditional scrollbars. Overlay scrollbars don't affect layout.
1922
1923 2014-01-22  Mihnea Ovidenie  <mihnea@adobe.com>
1924
1925         [CSSRegions] Incorrect layout of a region pseudo children
1926         https://bugs.webkit.org/show_bug.cgi?id=126146
1927
1928         Reviewed by David Hyatt.
1929
1930         Test: fast/regions/collapse-anonymous-region.html
1931
1932         A region behaviour, styled using -webkit-flow-from, is modeled using an anonymous
1933         block created to fragment the named flow content inside the region. We have to prevent
1934         the behaviour of anonymous children collapsing for this block to make sure that the
1935         region element children are still laid out properly when the region element becomes an ordinary
1936         element.
1937
1938         * rendering/RenderBlockFlow.h:
1939
1940 2014-01-21  Ryuan Choi  <ryuan.choi@samsung.com>
1941
1942         Remove unused "acceleratedCompositingForScrollableFramesEnabled" setting
1943         https://bugs.webkit.org/show_bug.cgi?id=127402
1944
1945         Reviewed by Anders Carlsson.
1946
1947         compositing/iframes/iframe-composited-scrolling.html is updated because
1948         there are no usages in WebCore.
1949
1950         * page/Settings.in:
1951
1952 2014-01-21  Alex Christensen  <achristensen@webkit.org>
1953
1954         Compile fix for using libsoup on Windows.
1955         https://bugs.webkit.org/show_bug.cgi?id=127377
1956
1957         Reviewed by Daniel Bates.
1958
1959         * platform/network/soup/ProxyResolverSoup.cpp:
1960         (soupProxyResolverWkSetProperty):
1961         (soupProxyResolverWkGetProperty):
1962         (soupProxyResolverWkGetProxyURISync):
1963         Replaced uint with unsigned.
1964
1965 2014-01-21  Daniel Bates  <dabates@apple.com>
1966
1967         Break up single assertion into two assertions in HTMLMediaElement::returnPlatformLayer()
1968
1969         Following up after <http://trac.webkit.org/changeset/162473>, we should break up
1970         the assertion into two assertions as suggested by Darin Adler. Separating the single
1971         assertion into two assertions makes it straightforward to determine the conjunct that
1972         failed among other benefits.
1973
1974         * html/HTMLMediaElement.cpp:
1975         (WebCore::HTMLMediaElement::parseAttribute):
1976
1977 2014-01-21  Brady Eidson  <beidson@apple.com>
1978
1979         The IDB backing store put() method shouldn't call IDB callbacks directly
1980         https://bugs.webkit.org/show_bug.cgi?id=127399
1981
1982         Reviewed by Beth Dakin.
1983
1984         Refactor the put() callback to take a resulting key or an error.
1985         * Modules/indexeddb/IDBServerConnection.h:
1986
1987         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1988         (WebCore::PutOperation::perform): Call to the backing store, then perform the
1989           appropriate IDB callback whether a key or an error was returned.
1990         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1991
1992         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1993         (WebCore::IDBServerConnectionLevelDB::put): Don’t call IDB callbacks directly.
1994           Instead, pass the resulting key/error back to the PutOperation.
1995         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
1996
1997 2014-01-21  Jae Hyun Park  <jae.park@company100.net>
1998
1999         Use nullptr in HTMLCanvasElement
2000         https://bugs.webkit.org/show_bug.cgi?id=127388
2001
2002         Reviewed by Gyuyoung Kim.
2003
2004         * html/HTMLCanvasElement.cpp:
2005         (WebCore::HTMLCanvasElement::getContext):
2006         (WebCore::HTMLCanvasElement::drawingContext):
2007         (WebCore::HTMLCanvasElement::existingDrawingContext):
2008
2009 2014-01-21  László Langó  <llango.u-szeged@partner.samsung.com>
2010
2011         Assertion failure in Range::nodeWillBeRemoved
2012         https://bugs.webkit.org/show_bug.cgi?id=121694
2013
2014         Reviewed by Ryosuke Niwa.
2015
2016         Based on Blink a change: https://chromium.googlesource.com/chromium/blink/+/407c1d7b2c45974aa614b3f847ffe9e8fce205fa
2017
2018         This patch fix an assertion failure. Range::nodeWillBeRemoved() might
2019         be called with removed node in ContainerNode, when DOMNodeRemovedFromDocument
2020         event handler calls removeChild(), for node being removed.
2021
2022         Test: fast/dom/Range/remove-twice-crash.html
2023
2024         * dom/ContainerNode.cpp:
2025         (WebCore::ContainerNode::willRemoveChild):
2026         * dom/ContainerNode.h:
2027
2028 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2029
2030         REGRESSION (r161580): Some PDFs render outside their <img>
2031         https://bugs.webkit.org/show_bug.cgi?id=127381
2032         <rdar://problem/15872168>
2033
2034         Reviewed by Simon Fraser.
2035
2036         * platform/graphics/cg/PDFDocumentImage.cpp:
2037         (WebCore::transformContextForPainting):
2038         Only try to make the scale uniform if it isn't already, and use the minimum
2039         of the two original scales when doing so, so that it is absolutely certain
2040         to fit inside space allocated for the image during layout.
2041
2042 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2043
2044         Remove #if PLATFORM(IOS) in various places around customFixedPositionLayoutRect() code
2045         https://bugs.webkit.org/show_bug.cgi?id=127373
2046
2047         Reviewed by Beth Dakin.
2048
2049         Instead of PLATFORM(IOS) #idefs at every call site for viewportConstrainedVisibleContentRect(),
2050         move the #ifdef inside viewportConstrainedVisibleContentRect().
2051         
2052         The one call site that needs special handling is RenderLayerBacking::updateCompositedBounds(),
2053         which needs to avoid clipping fixed layers to the custom fixed position rect, but instead to
2054         visibleContentRect() (which is really the document bounds on iOS). This ensures that the
2055         fixed layers aren't clipped when zooming out.
2056
2057         * page/FrameView.cpp:
2058         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
2059         * rendering/RenderBoxModelObject.cpp:
2060         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2061         * rendering/RenderLayerBacking.cpp:
2062         (WebCore::RenderLayerBacking::updateCompositedBounds):
2063         * rendering/RenderLayerCompositor.cpp:
2064         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2065         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2066         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2067
2068 2014-01-21  Andy Estes  <aestes@apple.com>
2069
2070         [iOS] Allow all clients to link against WebCore
2071         https://bugs.webkit.org/show_bug.cgi?id=127372
2072         
2073         Reviewed by Dan Bernstein.
2074
2075         * Configurations/WebCore.xcconfig:
2076
2077 2014-01-21  Bear Travis  <betravis@adobe.com>
2078
2079         [CSS Shapes] Preserve box-shape order when serializing shape values
2080         https://bugs.webkit.org/show_bug.cgi?id=127200
2081
2082         Reviewed by Dirk Schulze.
2083
2084         Convert the parsed shape-box pair to a CSSValueList rather than directly
2085         adding the box value to BasicShape. The CSSValueList preserves the
2086         shape-box ordering, and cleans up a little bit of the code shared between
2087         clip and shape values.
2088
2089         Modifying existing parsing tests.
2090
2091         * css/CSSComputedStyleDeclaration.cpp:
2092         (WebCore::shapePropertyValue): Factor out code common to generating shape
2093         values.
2094         (WebCore::ComputedStyleExtractor::propertyValue): Generate a CSSValueList when
2095         you have both a shape and a box.
2096         * css/CSSParser.cpp:
2097         (WebCore::CSSParser::parseBasicShapeAndOrBox): Factor out code common to clip
2098         paths and shape properties that parses the [basic-shape || box] syntax from
2099         the CSS Shapes spec.
2100         (WebCore::CSSParser::parseShapeProperty): Parse shape-box pairs as a CSSValueList.
2101         * css/DeprecatedStyleBuilder.cpp:
2102         (WebCore::ApplyPropertyShape::applyValue): Use the CSSValueList for shape-box pairs.
2103         * css/CSSValueList.h:
2104         (WebCore::CSSValueList::itemWithoutBoundsCheck): Add a const version.
2105         * page/animation/CSSPropertyAnimation.cpp:
2106         (WebCore::blendFunc): Specify a box when blending.
2107         * rendering/style/ShapeValue.h:
2108         (WebCore::ShapeValue::createShapeValue): Add a box parameter.
2109         (WebCore::ShapeValue::ShapeValue): Ditto.
2110
2111 2014-01-21  Daniel Bates  <dabates@apple.com>
2112
2113         Fix the iOS Simulator release build
2114
2115         Substitute ASSERT_UNUSED() for ASSERT() to resolve a compiler warning
2116         that the argument platformLayer is unused. The argument platformLayer
2117         is only used in the asserted condition, which isn't compiled in a
2118         release build; => the argument is unused in a release build.
2119
2120         * html/HTMLMediaElement.cpp:
2121         (WebCore::HTMLMediaElement::parseAttribute):
2122
2123 2014-01-21  Zoltan Horvath  <zoltan@webkit.org>
2124
2125         Since MidpointState is a class, it should behave like a class
2126         https://bugs.webkit.org/show_bug.cgi?id=127154
2127
2128         Reviewed by David Hyatt.
2129
2130         I modified MidpointState to behave like a class, updated the call sites also.
2131
2132         No new tests, no behavior change.
2133
2134         * platform/text/BidiResolver.h:
2135         (WebCore::MidpointState::reset):
2136         (WebCore::MidpointState::startIgnoringSpaces):
2137         (WebCore::MidpointState::stopIgnoringSpaces):
2138         (WebCore::MidpointState::midpoints):
2139         (WebCore::MidpointState::numMidpoints):
2140         (WebCore::MidpointState::currentMidpoint):
2141         (WebCore::MidpointState::incrementCurrentMidpoint):
2142         (WebCore::MidpointState::decreaseNumMidpoints):
2143         (WebCore::MidpointState::betweenMidpoints):
2144         (WebCore::MidpointState::setBetweenMidpoints):
2145         (WebCore::MidpointState::addMidpoint): Renamed from deprecatedAddMidpoint, since now
2146         its private, we no longer need to discourage callers from using it.
2147         * rendering/InlineIterator.h:
2148         (WebCore::IsolateTracker::addFakeRunIfNecessary):
2149         * rendering/RenderBlockLineLayout.cpp:
2150         (WebCore::RenderBlockFlow::appendRunsForObject):
2151         (WebCore::constructBidiRunsForLine):
2152         * rendering/line/BreakingContextInlineHeaders.h:
2153         (WebCore::checkMidpoints):
2154         * rendering/line/TrailingObjects.cpp:
2155         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
2156
2157 2014-01-21  Commit Queue  <commit-queue@webkit.org>
2158
2159         Unreviewed, rolling out r162452.
2160         http://trac.webkit.org/changeset/162452
2161         https://bugs.webkit.org/show_bug.cgi?id=127366
2162
2163         broke a few tests on all Mac WebKit1 bots (Requested by
2164         thorton on #webkit).
2165
2166         * WebCore.exp.in:
2167         * page/FocusController.cpp:
2168         (WebCore::FocusController::FocusController):
2169         (WebCore::FocusController::setFocused):
2170         (WebCore::FocusController::setActive):
2171         (WebCore::FocusController::setContentIsVisible):
2172         * page/FocusController.h:
2173         (WebCore::FocusController::isActive):
2174         (WebCore::FocusController::isFocused):
2175         * page/Page.cpp:
2176         (WebCore::Page::Page):
2177         (WebCore::Page::setIsInWindow):
2178         (WebCore::Page::setIsVisuallyIdle):
2179         (WebCore::Page::setIsVisible):
2180         (WebCore::Page::visibilityState):
2181         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
2182         * page/Page.h:
2183         (WebCore::Page::isVisible):
2184         (WebCore::Page::isInWindow):
2185
2186 2014-01-21  Chris Fleizach  <cfleizach@apple.com>
2187
2188         AX: Mac: Expose the visible text of a password field to AX
2189         https://bugs.webkit.org/show_bug.cgi?id=127353
2190
2191         Reviewed by Brent Fulgham.
2192
2193         The Mac platform should now expose the rendered value of password fields through AX.
2194
2195         Test: accessibility/password-field-value.html
2196
2197         * accessibility/AccessibilityRenderObject.cpp:
2198         (WebCore::AccessibilityRenderObject::textLength):
2199         (WebCore::AccessibilityRenderObject::passwordFieldValue):
2200
2201 2014-01-21  Robert Sipka  <sipka@inf.u-szeged.hu>
2202
2203         Support SSL error handling in case of synchronous job.
2204         https://bugs.webkit.org/show_bug.cgi?id=125301
2205
2206         Reviewed by Brent Fulgham.
2207
2208         Set ssl error informations for the users.
2209
2210         * platform/network/curl/ResourceHandleManager.cpp:
2211         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2212
2213 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2214
2215         Export systemTotalMemory() and systemMemoryLevel() for MobileSafari
2216         https://bugs.webkit.org/show_bug.cgi?id=127360
2217
2218         Reviewed by Andy Estes.
2219         
2220         MobileSafari inappropriately calls these WebCore functions directly,
2221         so export them.
2222
2223         * WebCore.exp.in:
2224
2225 2014-01-21  Simon Fraser  <simon.fraser@apple.com>
2226
2227         Clean up PLATFORM(IOS) code related to the custom fixed position layout rect
2228         https://bugs.webkit.org/show_bug.cgi?id=127362
2229
2230         Reviewed by Dave Hyatt.
2231
2232         Various platforms customize the rect used to layout position:fixed elements,
2233         and each modified RenderBox::availableLogicalHeight/WidthUsing() in different
2234         ways.
2235         
2236         Clean this up by adding RenderView::clientLogicalWidth/HeightForFixedPosition(),
2237         and moving the platform hacks into it.
2238
2239         * rendering/RenderBox.cpp:
2240         (WebCore::RenderBox::availableLogicalHeightUsing):
2241         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2242         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2243         * rendering/RenderView.cpp:
2244         (WebCore::RenderView::clientLogicalWidthForFixedPosition):
2245         (WebCore::RenderView::clientLogicalHeightForFixedPosition):
2246         * rendering/RenderView.h:
2247
2248 2014-01-21  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2249
2250         ASSERT(time.isFinite()) in SVGSMILElement::createInstanceTimesFromSyncbase
2251         <https://webkit.org/b/108184>
2252
2253         Reviewed by Philip Rogers.
2254
2255         In the case a SMILElement timing had a syncbase dependency on an indefinite value
2256         the assert were raised. The assert has been removed and a check has been added
2257         instead that prevents the addition of indefinite times to the time list.
2258
2259         Test: svg/animations/smil-syncbase-self-dependency.svg
2260
2261         * svg/animation/SVGSMILElement.cpp:
2262         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
2263           ASSERT removed.
2264
2265 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2266
2267         Address late review naming comments after r162453.
2268
2269         * WebCore.xcodeproj/project.pbxproj:
2270         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2271         * platform/graphics/mac/CALayerWebAdditions.h: Removed.
2272         * platform/graphics/mac/CALayerWebAdditions.mm: Removed.
2273         * platform/graphics/mac/WebCoreCALayerExtras.h: Added.
2274         * platform/graphics/mac/WebCoreCALayerExtras.mm: Added.
2275         (-[CALayer web_disableAllActions]):
2276
2277 2014-01-21  Tim Horton  <timothy_horton@apple.com>
2278
2279         Keep CALayer implicit animation disabling code in a single place
2280         https://bugs.webkit.org/show_bug.cgi?id=127355
2281
2282         Reviewed by Simon Fraser.
2283
2284         * WebCore.xcodeproj/project.pbxproj:
2285         Add CALayerWebAdditions.{h,mm}.
2286
2287         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2288         (PlatformCALayerMac::commonInit):
2289         Remove nullActionsDictionary() and use [CALayer(WebAdditions) web_disableAllActions] instead.
2290
2291         * platform/graphics/mac/CALayerWebAdditions.h: Added.
2292         * platform/graphics/mac/CALayerWebAdditions.mm: Added.
2293         (-[CALayer web_disableAllActions]):
2294         Added. Disable all implicit actions on the layer.
2295
2296 2014-01-21  Gavin Barraclough  <barraclough@apple.com>
2297
2298         Change Page, FocusController to use ViewState
2299         https://bugs.webkit.org/show_bug.cgi?id=126533
2300
2301         Reviewed by Tim Horton.
2302
2303         These classes currently maintain a set of separate fields to represent the view state;
2304         combine these into a single field, and allow WebPage to send the combined update rather
2305         than individual changes.
2306
2307         Maintain existing interface for WebKit1 clients.
2308
2309         * WebCore.exp.in:
2310             - Added WebCore::setViewState, removed WebCore::setIsVisuallyIdle.
2311         * page/FocusController.cpp:
2312         (WebCore::FocusController::FocusController):
2313             - Initialize combined m_viewState.
2314         (WebCore::FocusController::setFocused):
2315             - Calls setViewState.
2316         (WebCore::FocusController::setFocusedInternal):
2317             - setFocused -> setFocusedInternal.
2318         (WebCore::FocusController::setViewState):
2319             - Added, update all ViewState flags.
2320         (WebCore::FocusController::setActive):
2321             - Calls setViewState.
2322         (WebCore::FocusController::setActiveInternal):
2323             - setActive -> setActiveInternal.
2324         (WebCore::FocusController::setContentIsVisible):
2325             - Calls setViewState.
2326         (WebCore::FocusController::setContentIsVisibleInternal):
2327             - setContentIsVisible -> setContentIsVisibleInternal.
2328         * page/FocusController.h:
2329         (WebCore::FocusController::isActive):
2330         (WebCore::FocusController::isFocused):
2331         (WebCore::FocusController::contentIsVisible):
2332             - Implemented in terms of ViewState.
2333         * page/Page.cpp:
2334         (WebCore::Page::Page):
2335             - Initialize using PageInitialViewState.
2336         (WebCore::Page::setIsInWindow):
2337             - Calls setViewState.
2338         (WebCore::Page::setIsInWindowInternal):
2339             - setIsInWindow -> setIsInWindowInternal.
2340         (WebCore::Page::setIsVisuallyIdleInternal):
2341             - setIsVisuallyIdle -> setIsVisuallyIdleInternal.
2342         (WebCore::Page::setViewState):
2343             - Added, update all ViewState flags, including FocusController.
2344         (WebCore::Page::setIsVisible):
2345             - Calls setViewState.
2346         (WebCore::Page::setIsVisibleInternal):
2347             - setIsVisible -> setIsVisibleInternal.
2348         (WebCore::Page::visibilityState):
2349             - m_isVisible -> isVisible()
2350         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
2351             - m_isVisible -> isVisible()
2352         * page/Page.h:
2353         (WebCore::Page::isVisible):
2354         (WebCore::Page::isInWindow):
2355             - Implemented in terms of ViewState.
2356         (WebCore::Page::scriptedAnimationsSuspended):
2357             - Combined member fields into ViewState::Flags.
2358
2359 2014-01-21  Lauro Neto  <lauro.neto@openbossa.org>
2360
2361         Remove PLATFORM(NIX) from WebCore
2362         https://bugs.webkit.org/show_bug.cgi?id=127299
2363
2364         Reviewed by Anders Carlsson.
2365
2366         * editing/Editor.cpp:
2367         (WebCore::Editor::cut):
2368         (WebCore::Editor::copy):
2369         (WebCore::Editor::copyImage):
2370         * editing/Editor.h:
2371         * html/HTMLCanvasElement.h:
2372         * loader/EmptyClients.h:
2373         * loader/FrameLoader.cpp:
2374         (WebCore::FrameLoader::defaultObjectContentType):
2375         * page/ChromeClient.h:
2376         * page/DragController.cpp:
2377         (WebCore::DragController::startDrag):
2378         * platform/Cursor.h:
2379         * platform/DragData.h:
2380         * platform/DragImage.h:
2381         * platform/FileSystem.h:
2382         * platform/LocalizedStrings.h:
2383         * platform/Widget.h:
2384         * platform/audio/FFTFrame.h:
2385         * platform/audio/HRTFElevation.cpp:
2386         * platform/cairo/WidgetBackingStore.h:
2387         * platform/graphics/ANGLEWebKitBridge.h:
2388         * platform/graphics/FontPlatformData.h:
2389         * platform/graphics/GLContext.cpp:
2390         (WebCore::GLContext::createContextForWindow):
2391         * platform/graphics/GLContext.h:
2392         * platform/graphics/GraphicsContext3D.h:
2393         * platform/graphics/GraphicsContext3DPrivate.cpp:
2394         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2395         * platform/graphics/OpenGLESShims.h:
2396         * platform/graphics/OpenGLShims.cpp:
2397         (WebCore::getProcAddress):
2398         * platform/graphics/OpenGLShims.h:
2399         * platform/graphics/PlatformLayer.h:
2400         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2401         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2402         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
2403         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
2404         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
2405         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
2406         (WebCore::Extensions3DOpenGL::supportsExtension):
2407         * platform/graphics/opengl/Extensions3DOpenGL.h:
2408         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2409         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2410         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2411         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2412         (WebCore::GraphicsContext3D::reshape):
2413         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
2414         * platform/graphics/texmap/TextureMapper.h:
2415         * platform/network/ResourceHandle.h:
2416         * plugins/PluginPackage.cpp:
2417         * plugins/PluginView.cpp:
2418         (WebCore::PluginView::PluginView):
2419         * plugins/PluginView.h:
2420         * plugins/PluginViewNone.cpp:
2421         * rendering/SimpleLineLayout.cpp:
2422         (WebCore::SimpleLineLayout::canUseFor):
2423
2424 2014-01-21  Eric Carlson  <eric.carlson@apple.com>
2425
2426         Add &lrm; &rlm; and &nbsp; to WebVTT parser
2427         https://bugs.webkit.org/show_bug.cgi?id=85112
2428
2429         Reviewed by Jer Noble.
2430
2431         No new tests, track-webvtt-tc022-entities.html was updated to test this.
2432
2433         * html/track/WebVTTTokenizer.cpp:
2434         (WebCore::WebVTTTokenizer::nextToken): Support RLM, LRM, and NBSP entities.
2435
2436 2014-01-21  Commit Queue  <commit-queue@webkit.org>
2437
2438         Unreviewed, rolling out r162354.
2439         http://trac.webkit.org/changeset/162354
2440         https://bugs.webkit.org/show_bug.cgi?id=127354
2441
2442         Appears to have broken accessibility in a non-trivial way
2443         (Requested by ap on #webkit).
2444
2445         * platform/ScrollView.cpp:
2446         (WebCore::ScrollView::updateScrollbars):
2447
2448 2014-01-21  Commit Queue  <commit-queue@webkit.org>
2449
2450         Unreviewed, rolling out r162445.
2451         http://trac.webkit.org/changeset/162445
2452         https://bugs.webkit.org/show_bug.cgi?id=127351
2453
2454         It broke the 32 bit GTK build (Requested by Ossy on #webkit).
2455
2456         * rendering/style/StyleRareInheritedData.cpp:
2457
2458 2014-01-21  László Langó  <llango.u-szeged@partner.samsung.com>
2459
2460         Wrong struct size when CSS_IMAGE_ORIENTATION and CSS3_TEXT_DECORATION are enabled.
2461         https://bugs.webkit.org/show_bug.cgi?id=127346
2462
2463         Efl build fix.
2464
2465         Reviewed by Csaba Osztrogonác.
2466
2467         * rendering/style/StyleRareInheritedData.cpp:
2468
2469 2014-01-21  Antti Koivisto  <antti@apple.com>
2470
2471         Delay initial layer flush during loading on all platforms
2472         https://bugs.webkit.org/show_bug.cgi?id=127347
2473
2474         Reviewed by Andreas Kling.
2475
2476         To reduce unnecessary repaints enable the same behaviour as iOS already has.
2477
2478         * rendering/RenderLayerCompositor.cpp:
2479         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2480         
2481             Set the initial state of m_layerFlushThrottlingEnabled correctly.
2482
2483         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
2484         (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded):
2485         * rendering/RenderLayerCompositor.h:
2486         
2487             Enable initial layer flush delay on all platforms.
2488
2489 2014-01-21  Mihai Tica  <mitica@adobe.com>
2490
2491         If you set a tiled cross-faded-image or a tiled gradient as
2492         a background layer, -webkit-background-blend-mode doesn't work.
2493         The problem consists in the blendMode parameter not being set
2494         for these specific drawing paths.
2495
2496         https://bugs.webkit.org/show_bug.cgi?id=126888
2497         Reviewed by Dirk Schulze.
2498
2499         Test: css3/compositing/background-blend-mode-tiled-layers.html
2500
2501         * platform/graphics/CrossfadeGeneratedImage.cpp:
2502         (WebCore::CrossfadeGeneratedImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern.
2503         * platform/graphics/GradientImage.cpp:
2504         (WebCore::GradientImage::drawPattern): Add the blendMode parameter and pass it to ImageBuffer::drawPattern.
2505         * platform/graphics/ImageBuffer.h: Add a BlendMode parameter to the drawPattern method.
2506         * platform/graphics/cairo/ImageBufferCairo.cpp:
2507         (WebCore::ImageBuffer::drawPattern): Add the default BlendMode parameter to the method declaration.
2508         * platform/graphics/cg/ImageBufferCG.cpp:
2509         (WebCore::ImageBuffer::drawPattern): Add and use the blendMode parameter for all the code paths.
2510         * platform/graphics/wince/ImageBufferWinCE.cpp:
2511         (WebCore::BufferedImage::drawPattern): Add the default BlendMode parameter to the method declaration.
2512
2513 2014-01-21  Gurpreet Kaur  <k.gurpreet@samsung.com>
2514
2515         The WebCore.vcxproj.filters doesnot apply
2516         https://bugs.webkit.org/show_bug.cgi?id=127338
2517
2518         Reviewed by Csaba Osztrogonác.
2519
2520         * WebCore.vcxproj/WebCore.vcxproj.filters:
2521         Modified the WebCore.vcxproj.filters so that it is applied when loading
2522         WebCore.vcxproj file.
2523
2524 2014-01-21  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2525
2526         Fix SVG animations which set rx or ry attributes
2527         https://bugs.webkit.org/show_bug.cgi?id=127337
2528
2529         Reviewed by Dirk Schulze.
2530
2531         Test: svg/stroke/animated-non-scaling-rxry.html
2532
2533         Merged from Blink: https://src.chromium.org/viewvc/blink?revision=152376&view=revision
2534
2535         * rendering/svg/RenderSVGRect.cpp:
2536         (WebCore::RenderSVGRect::updateShapeFromElement):
2537         * rendering/svg/SVGPathData.cpp:
2538         (WebCore::updatePathFromRectElement):
2539
2540 2014-01-21  Krzysztof Czech  <k.czech@samsung.com>
2541
2542         [ATK] Expose aria-flowto through ATK_RELATION_FLOWS_TO
2543         https://bugs.webkit.org/show_bug.cgi?id=127291
2544
2545         Reviewed by Mario Sanchez Prada.
2546
2547         Test: accessibility/aria-flowto.html
2548
2549         Expose aria-flowto through ATK_RELATION_FLOWS_TO according to
2550         http://www.w3.org/TR/wai-aria-implementation/#mapping_state-property
2551
2552         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2553         (setAtkRelationSetFromCoreObject):
2554
2555 2014-01-20  Ryuan Choi  <ryuan.choi@samsung.com>
2556
2557         [CMAKE] Remove Nix from CMake scripts
2558         https://bugs.webkit.org/show_bug.cgi?id=127264
2559
2560         Reviewed by Anders Carlsson.
2561
2562         * CMakeLists.txt:
2563
2564 2014-01-20  Anders Carlsson  <andersca@apple.com>
2565
2566         Remove an unused PageGroup function
2567         https://bugs.webkit.org/show_bug.cgi?id=127327
2568
2569         Reviewed by Andreas Kling.
2570
2571         * WebCore.exp.in:
2572         * page/PageGroup.cpp:
2573         * page/PageGroup.h:
2574
2575 2014-01-20  Anders Carlsson  <andersca@apple.com>
2576
2577         Move user style sheet handling to UserContentController
2578         https://bugs.webkit.org/show_bug.cgi?id=127322
2579         <rdar://problem/15861296>
2580
2581         Reviewed by Andreas Kling.
2582
2583         * dom/DocumentStyleSheetCollection.cpp:
2584         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
2585         * page/PageGroup.cpp:
2586         (WebCore::PageGroup::addUserStyleSheetToWorld):
2587         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
2588         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
2589         (WebCore::PageGroup::removeAllUserContent):
2590         * page/PageGroup.h:
2591         * page/UserContentController.cpp:
2592         (WebCore::UserContentController::addUserStyleSheet):
2593         (WebCore::UserContentController::removeUserStyleSheet):
2594         (WebCore::UserContentController::removeUserStyleSheets):
2595         (WebCore::UserContentController::removeAllUserContent):
2596         (WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFrames):
2597         * page/UserContentController.h:
2598         (WebCore::UserContentController::userStyleSheets):
2599
2600 2014-01-20  Benjamin Poulain  <benjamin@webkit.org>
2601
2602         Add a nicer way to iterate over all the attributes of an element
2603         https://bugs.webkit.org/show_bug.cgi?id=127266
2604
2605         Reviewed by Geoffrey Garen.
2606
2607         When using Element::attributeAt() in a loop, the compiler had to generate two kinds of
2608         accessor:
2609         -If the element data is unique, the length and data comes from the attribute Vector.
2610         -If the element data is shared, the data comes from the tail of elementData itself.
2611
2612         The choice was done for every access, which caused the assembly to be a little
2613         hard to follow.
2614         This patch unify the data access by doing everything as a array pointer with offset (getting
2615         that data from Vector when necessary).
2616
2617         To make it easier to do the right thing, a new iterator was added so that range-based loops
2618         can replace all the faulty cases.
2619
2620         * css/SelectorChecker.cpp:
2621         (WebCore::anyAttributeMatches):
2622         * css/SelectorChecker.h:
2623         (WebCore::SelectorChecker::checkExactAttribute):
2624         * dom/DatasetDOMStringMap.cpp:
2625         (WebCore::DatasetDOMStringMap::getNames):
2626         (WebCore::DatasetDOMStringMap::item):
2627         (WebCore::DatasetDOMStringMap::contains):
2628         * dom/Element.cpp:
2629         (WebCore::Element::normalizeAttributes):
2630         (WebCore::Element::detachAllAttrNodesFromElement):
2631         (WebCore::Element::cloneAttributesFromElement):
2632         * dom/Element.h:
2633         (WebCore::Element::attributesIterator):
2634         * dom/ElementData.cpp:
2635         (WebCore::ElementData::isEquivalent):
2636         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
2637         * dom/ElementData.h:
2638         (WebCore::AttributeConstIterator::AttributeConstIterator):
2639         (WebCore::AttributeConstIterator::operator*):
2640         (WebCore::AttributeConstIterator::operator->):
2641         (WebCore::AttributeConstIterator::operator++):
2642         (WebCore::AttributeConstIterator::operator==):
2643         (WebCore::AttributeConstIterator::operator!=):
2644         (WebCore::AttributeIteratorAccessor::AttributeIteratorAccessor):
2645         (WebCore::AttributeIteratorAccessor::begin):
2646         (WebCore::AttributeIteratorAccessor::end):
2647         (WebCore::ElementData::attributesIterator):
2648         * dom/Node.cpp:
2649         (WebCore::Node::isDefaultNamespace):
2650         (WebCore::Node::lookupNamespaceURI):
2651         (WebCore::Node::lookupNamespacePrefix):
2652         (WebCore::Node::compareDocumentPosition):
2653         * dom/StyledElement.cpp:
2654         (WebCore::StyledElement::makePresentationAttributeCacheKey):
2655         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2656         * editing/MarkupAccumulator.cpp:
2657         (WebCore::MarkupAccumulator::appendElement):
2658         * editing/markup.cpp:
2659         (WebCore::completeURLs):
2660         (WebCore::StyledMarkupAccumulator::appendElement):
2661         * html/HTMLEmbedElement.cpp:
2662         (WebCore::HTMLEmbedElement::parametersForPlugin):
2663         * html/HTMLObjectElement.cpp:
2664         (WebCore::HTMLObjectElement::parametersForPlugin):
2665         * inspector/DOMPatchSupport.cpp:
2666         (WebCore::DOMPatchSupport::innerPatchNode):
2667         (WebCore::DOMPatchSupport::createDigest):
2668         * inspector/InspectorDOMAgent.cpp:
2669         (WebCore::InspectorDOMAgent::setAttributesAsText):
2670         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2671         * inspector/InspectorNodeFinder.cpp:
2672         (WebCore::InspectorNodeFinder::matchesElement):
2673         * page/PageSerializer.cpp:
2674         (WebCore::isCharsetSpecifyingNode):
2675         * xml/XPathNodeSet.cpp:
2676         (WebCore::XPath::NodeSet::traversalSort):
2677         * xml/XPathStep.cpp:
2678         (WebCore::XPath::Step::nodesInAxis):
2679         * xml/parser/XMLDocumentParserLibxml2.cpp:
2680         (WebCore::XMLDocumentParser::XMLDocumentParser):
2681
2682 2014-01-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2683
2684         Do refactor in collectGradientAttributes() and renderStyleForLengthResolve()
2685         https://bugs.webkit.org/show_bug.cgi?id=126869
2686
2687         Reviewed by Dirk Schulze.
2688
2689         Some SVG functions have done a first iteration by using a boolean flag. This is
2690         one of poor implementations. This patch fix it by extracting a logic into a new method.
2691         Additionally it would be good to use do-while() loop instead of using while() in
2692         renderStyleForLengthResolving() because a first condition is always true.
2693
2694         Merge r165358 from blink.
2695
2696         * svg/SVGLengthContext.cpp:
2697         (WebCore::renderStyleForLengthResolving):
2698         * svg/SVGLinearGradientElement.cpp:
2699         (WebCore::setGradientAttributes):
2700         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
2701         * svg/SVGRadialGradientElement.cpp:
2702         (WebCore::setGradientAttributes):
2703         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2704
2705 2014-01-20  Anders Carlsson  <andersca@apple.com>
2706
2707         UserContentController should keep track of user scripts
2708         https://bugs.webkit.org/show_bug.cgi?id=127317
2709         <rdar://problem/15861296>
2710
2711         Reviewed by Andreas Kling.
2712
2713         Move handling of user scripts from PageGroup to UserContentController.
2714
2715         * page/Frame.cpp:
2716         (WebCore::Frame::injectUserScripts):
2717         * page/PageGroup.cpp:
2718         (WebCore::PageGroup::addUserScriptToWorld):
2719         (WebCore::PageGroup::removeUserScriptFromWorld):
2720         (WebCore::PageGroup::removeUserScriptsFromWorld):
2721         (WebCore::PageGroup::removeAllUserContent):
2722         * page/PageGroup.h:
2723         * page/UserContentController.cpp:
2724         (WebCore::UserContentController::addUserScript):
2725         (WebCore::UserContentController::removeUserScript):
2726         (WebCore::UserContentController::removeUserScripts):
2727         (WebCore::UserContentController::removeAllUserContent):
2728         * page/UserContentController.h:
2729         (WebCore::UserContentController::userScripts):
2730
2731 2014-01-20  Anders Carlsson  <andersca@apple.com>
2732
2733         Give each page a UserContentController
2734         https://bugs.webkit.org/show_bug.cgi?id=127315
2735         <rdar://problem/15861296>
2736
2737         Reviewed by Andreas Kling.
2738
2739         Add a UserContentController object to PageGroup and have the page group set it on any
2740         pages that are added to the page group.
2741
2742         This is another step towards moving handling of user content away from PageGroup and make it
2743         possible for each page to have different user content.
2744
2745         * page/Page.cpp:
2746         (WebCore::Page::~Page):
2747         (WebCore::Page::setUserContentController):
2748         * page/Page.h:
2749         (WebCore::Page::userContentController):
2750         * page/PageGroup.cpp:
2751         (WebCore::PageGroup::PageGroup):
2752         (WebCore::PageGroup::addPage):
2753         (WebCore::PageGroup::removePage):
2754         * page/PageGroup.h:
2755         * page/UserContentController.cpp:
2756         (WebCore::UserContentController::addPage):
2757         (WebCore::UserContentController::removePage):
2758         * page/UserContentController.h:
2759
2760 2014-01-20  Jeremy Jones  <jeremyj@apple.com>
2761
2762         Add AVKit fullscreen video interface.
2763         https://bugs.webkit.org/show_bug.cgi?id=126818
2764
2765         Reviewed by Eric Carlson.
2766
2767         No new tests, no observable change in functionality.
2768
2769         * WebCore.exp.in:
2770         * WebCore.xcodeproj/project.pbxproj:
2771         * html/HTMLMediaElement.cpp:
2772         (WebCore::HTMLMediaElement::parseAttribute):
2773         * html/HTMLMediaElement.h:
2774         Add ability for fullscreen to borrow the AVPlayerLayer.
2775         * page/Settings.cpp:
2776         * page/Settings.h:
2777         (WebCore::Settings::setMediaPlaybackFullscreenAVKit):
2778         (WebCore::Settings::mediaPlaybackFullscreenAVKit):
2779         Add a disabled setting.
2780         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2781         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
2782         Enabled fullscreen for iOS.
2783         * platform/ios/WebVideoFullscreenControllerAVKit.h: Added.
2784         * platform/ios/WebVideoFullscreenControllerAVKit.mm: Added.
2785         (-[WebAVPlayerController init]):
2786         (-[WebAVPlayerController dealloc]):
2787         (-[WebAVPlayerController forwardingTargetForSelector:]):
2788         (-[WebAVPlayerController shouldDismissForDone]):
2789         (-[WebAVPlayerController play:]):
2790         (-[WebAVPlayerController pause:]):
2791         (-[WebAVPlayerController togglePlayback:]):
2792         (-[WebAVPlayerController isPlaying]):
2793         (-[WebAVPlayerController setPlaying:]):
2794         (+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
2795         (-[WebAVPlayerController seekToTime:]):
2796         (-[WebAVPlayerController updateTimingWithCurrentTime:]):
2797         (-[WebAVPlayerController effectiveRate]):
2798         (-[WebAVPlayerController setMediaElement:]):
2799         (-[WebAVPlayerController handleEvent:]):
2800         (-[WebVideoFullscreenController init]):
2801         (-[WebVideoFullscreenController dealloc]):
2802         (-[WebVideoFullscreenController setMediaElement:]):
2803         (-[WebVideoFullscreenController mediaElement]):
2804         (-[WebVideoFullscreenController enterFullscreen:]):
2805         (-[WebVideoFullscreenController exitFullscreen]):
2806         Add WebAVPlayerController for HTMLMediaElememt to interface with AVPlayerViewController.
2807
2808 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
2809
2810         Replace uses of std::forward<T>(), std::unique_ptr<T>::clear() that landed in r162368
2811         https://bugs.webkit.org/show_bug.cgi?id=127306
2812
2813         Reviewed by Darin Adler.
2814
2815         Address the post-landing reviews of the r162368 commit that moved WebAudio source code to using std::unique_ptr.
2816         std::move() should be used instead of std::forward<T>() in HRTFKernel::create().
2817         Instead of calling std::unique_ptr<T>::reset(), nullptr should be assigned to that smart pointer to reset it.
2818
2819         * Modules/webaudio/ConvolverNode.cpp:
2820         (WebCore::ConvolverNode::uninitialize):
2821         * Modules/webaudio/DynamicsCompressorNode.cpp:
2822         (WebCore::DynamicsCompressorNode::uninitialize):
2823         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2824         (WebCore::MediaElementAudioSourceNode::setFormat):
2825         * Modules/webaudio/PannerNode.cpp:
2826         (WebCore::PannerNode::uninitialize):
2827         * platform/audio/AudioChannel.h:
2828         (WebCore::AudioChannel::set):
2829         * platform/audio/HRTFDatabaseLoader.cpp:
2830         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
2831         * platform/audio/HRTFKernel.h:
2832         (WebCore::HRTFKernel::create):
2833
2834 2014-01-20  Joseph Pecoraro  <pecoraro@apple.com>
2835
2836         Modernize WebCore/inspector with nullptr
2837         https://bugs.webkit.org/show_bug.cgi?id=127303
2838
2839         Reviewed by Anders Carlsson.
2840
2841         Ran clang-modernize -use-nullptr over WebCore/inspector.
2842
2843         * inspector/ConsoleMessage.cpp:
2844         (WebCore::ConsoleMessage::ConsoleMessage):
2845         * inspector/ConsoleMessage.h:
2846         * inspector/ContentSearchUtils.cpp:
2847         (WebCore::ContentSearchUtils::findMagicComment):
2848         * inspector/DOMEditor.cpp:
2849         (WebCore::DOMEditor::SetOuterHTMLAction::SetOuterHTMLAction):
2850         * inspector/DOMPatchSupport.cpp:
2851         (WebCore::DOMPatchSupport::patchDocument):
2852         (WebCore::DOMPatchSupport::patchNode):
2853         (WebCore::DOMPatchSupport::diff):
2854         (WebCore::DOMPatchSupport::innerPatchChildren):
2855         * inspector/InspectorApplicationCacheAgent.cpp:
2856         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
2857         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
2858         * inspector/InspectorCanvasAgent.cpp:
2859         (WebCore::InspectorCanvasAgent::disable):
2860         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
2861         (WebCore::InspectorCanvasAgent::frameNavigated):
2862         * inspector/InspectorConsoleAgent.cpp:
2863         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2864         (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
2865         (WebCore::InspectorConsoleAgent::clearMessages):
2866         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2867         (WebCore::InspectorConsoleAgent::didReceiveResponse):
2868         (WebCore::InspectorConsoleAgent::didFailLoading):
2869         * inspector/InspectorConsoleAgent.h:
2870         * inspector/InspectorController.cpp:
2871         (WebCore::InspectorController::inspectedPageDestroyed):
2872         * inspector/InspectorDOMDebuggerAgent.cpp:
2873         (WebCore::InspectorDOMDebuggerAgent::disable):
2874         (WebCore::InspectorDOMDebuggerAgent::discardAgent):
2875         * inspector/InspectorDOMStorageAgent.cpp:
2876         (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent):
2877         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2878         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2879         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2880         * inspector/InspectorDatabaseAgent.cpp:
2881         (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent):
2882         (WebCore::InspectorDatabaseAgent::findByFileName):
2883         (WebCore::InspectorDatabaseAgent::databaseForId):
2884         * inspector/InspectorDebuggerAgent.cpp:
2885         (WebCore::InspectorDebuggerAgent::addMessageToConsole):
2886         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2887         (WebCore::InspectorDebuggerAgent::didParseSource):
2888         (WebCore::InspectorDebuggerAgent::didContinue):
2889         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
2890         * inspector/InspectorFrontendHost.cpp:
2891         (WebCore::FrontendMenuProvider::disconnect):
2892         (WebCore::InspectorFrontendHost::InspectorFrontendHost):
2893         (WebCore::InspectorFrontendHost::disconnectClient):
2894         * inspector/InspectorHeapProfilerAgent.cpp:
2895         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
2896         * inspector/InspectorIndexedDBAgent.cpp:
2897         (WebCore::assertDocument):
2898         (WebCore::assertIDBFactory):
2899         (WebCore::InspectorIndexedDBAgent::requestData):
2900         * inspector/InspectorInstrumentation.cpp:
2901         (WebCore::frameForScriptExecutionContext):
2902         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
2903         (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
2904         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
2905         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
2906         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
2907         (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
2908         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
2909         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
2910         * inspector/InspectorInstrumentation.h:
2911         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
2912         (WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
2913         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
2914         * inspector/InspectorLayerTreeAgent.cpp:
2915         (WebCore::InspectorLayerTreeAgent::disable):
2916         * inspector/InspectorNodeFinder.cpp:
2917         (WebCore::InspectorNodeFinder::searchUsingXPath):
2918         * inspector/InspectorOverlay.cpp:
2919         (WebCore::buildObjectForElementInfo):
2920         * inspector/InspectorPageAgent.cpp:
2921         (WebCore::InspectorPageAgent::cachedResourceContent):
2922         (WebCore::InspectorPageAgent::sharedBufferContent):
2923         (WebCore::InspectorPageAgent::disable):
2924         (WebCore::InspectorPageAgent::frameForId):
2925         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
2926         * inspector/InspectorProfilerAgent.cpp:
2927         (WebCore::InspectorProfilerAgent::~InspectorProfilerAgent):
2928         * inspector/InspectorProfilerAgent.h:
2929         * inspector/InspectorResourceAgent.cpp:
2930         (WebCore::buildObjectForResourceResponse):
2931         (WebCore::InspectorResourceAgent::willSendRequest):
2932         (WebCore::InspectorResourceAgent::didReceiveResponse):
2933         (WebCore::InspectorResourceAgent::didFinishLoading):
2934         (WebCore::InspectorResourceAgent::didFailLoading):
2935         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2936         (WebCore::InspectorResourceAgent::disable):
2937         * inspector/InspectorRuntimeAgent.cpp:
2938         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
2939         * inspector/InspectorStyleSheet.cpp:
2940         (ParsedStyleSheet::ruleSourceDataAt):
2941         (WebCore::buildSourceRangeObject):
2942         (WebCore::asCSSRuleList):
2943         (WebCore::fillMediaListChain):
2944         (WebCore::InspectorStyle::setPropertyText):
2945         (WebCore::InspectorStyle::populateAllProperties):
2946         (WebCore::InspectorStyle::extractSourceData):
2947         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
2948         (WebCore::InspectorStyleSheet::addRule):
2949         (WebCore::InspectorStyleSheet::ruleForId):
2950         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2951         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2952         (WebCore::InspectorStyleSheet::buildObjectForRule):
2953         (WebCore::InspectorStyleSheet::styleForId):
2954         (WebCore::InspectorStyleSheet::inspectorStyleForId):
2955         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2956         * inspector/InspectorStyleSheet.h:
2957         (WebCore::InspectorCSSId::asProtocolValue):
2958         * inspector/InspectorTimelineAgent.cpp:
2959         (WebCore::InspectorTimelineAgent::stop):
2960         (WebCore::InspectorTimelineAgent::willComposite):
2961         (WebCore::InspectorTimelineAgent::page):
2962         * inspector/InspectorWorkerAgent.cpp:
2963         (WebCore::InspectorWorkerAgent::~InspectorWorkerAgent):
2964         * inspector/InstrumentingAgents.cpp:
2965         (WebCore::InstrumentingAgents::InstrumentingAgents):
2966         (WebCore::InstrumentingAgents::reset):
2967         * inspector/NetworkResourcesData.cpp:
2968         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
2969         (WebCore::NetworkResourcesData::xhrReplayData):
2970         (WebCore::NetworkResourcesData::removeCachedResource):
2971         (WebCore::NetworkResourcesData::resourceDataForRequestId):
2972         * inspector/PageConsoleAgent.cpp:
2973         (WebCore::PageConsoleAgent::~PageConsoleAgent):
2974         * inspector/PageDebuggerAgent.cpp:
2975         (WebCore::PageDebuggerAgent::disable):
2976         * inspector/PageRuntimeAgent.cpp:
2977         (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
2978         (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
2979         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
2980         * inspector/ScriptArguments.cpp:
2981         (WebCore::ScriptArguments::globalState):
2982         * inspector/WorkerRuntimeAgent.cpp:
2983         (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
2984
2985 2014-01-20  Anders Carlsson  <andersca@apple.com>
2986
2987         Add empty UserContentController class
2988         https://bugs.webkit.org/show_bug.cgi?id=127300
2989         <rdar://problem/15861296>
2990
2991         Reviewed by Dan Bernstein.
2992
2993         This is the first step towards moving handling of user scripts and style sheets from
2994         the page group to a separate objects and ultimately make them be settable per page instead of per page group.
2995
2996         * CMakeLists.txt:
2997         * GNUmakefile.list.am:
2998         * WebCore.vcxproj/WebCore.vcxproj:
2999         * WebCore.vcxproj/WebCore.vcxproj.filters:
3000         * WebCore.xcodeproj/project.pbxproj:
3001         * page/UserContentController.cpp: Added.
3002         (WebCore::UserContentController::create):
3003         (WebCore::UserContentController::UserContentController):
3004         (WebCore::UserContentController::~UserContentController):
3005         * page/UserContentController.h: Added.
3006
3007 2014-01-20  Joseph Pecoraro  <pecoraro@apple.com>
3008
3009         Run clang-modernize and let it add a bunch of missing overrides in WebCore/inspector
3010         https://bugs.webkit.org/show_bug.cgi?id=127206
3011
3012         Reviewed by Anders Carlsson.
3013
3014         Let clang-modernize add overrides.
3015
3016         * inspector/DOMEditor.cpp:
3017         * inspector/InspectorApplicationCacheAgent.h:
3018         * inspector/InspectorCSSAgent.h:
3019         * inspector/InspectorCanvasAgent.h:
3020         * inspector/InspectorConsoleAgent.h:
3021         * inspector/InspectorDOMAgent.h:
3022         * inspector/InspectorDOMDebuggerAgent.h:
3023         * inspector/InspectorDOMStorageAgent.h:
3024         * inspector/InspectorDatabaseAgent.cpp:
3025         * inspector/InspectorDatabaseAgent.h:
3026         * inspector/InspectorDebuggerAgent.h:
3027         * inspector/InspectorFrontendHost.cpp:
3028         * inspector/InspectorHeapProfilerAgent.cpp:
3029         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
3030         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
3031         * inspector/InspectorHeapProfilerAgent.h:
3032         * inspector/InspectorHistory.cpp:
3033         * inspector/InspectorIndexedDBAgent.cpp:
3034         * inspector/InspectorIndexedDBAgent.h:
3035         * inspector/InspectorInputAgent.h:
3036         * inspector/InspectorLayerTreeAgent.h:
3037         * inspector/InspectorMemoryAgent.h:
3038         * inspector/InspectorPageAgent.h:
3039         * inspector/InspectorProfilerAgent.cpp:
3040         * inspector/InspectorProfilerAgent.h:
3041         * inspector/InspectorResourceAgent.h:
3042         * inspector/InspectorRuntimeAgent.h:
3043         * inspector/InspectorStyleSheet.h:
3044         * inspector/InspectorTimelineAgent.h:
3045         * inspector/InspectorWorkerAgent.cpp:
3046         * inspector/InspectorWorkerAgent.h:
3047         * inspector/PageConsoleAgent.h:
3048         * inspector/PageDebuggerAgent.h:
3049         * inspector/PageRuntimeAgent.h:
3050         * inspector/WorkerConsoleAgent.h:
3051         * inspector/WorkerDebuggerAgent.cpp:
3052         * inspector/WorkerInspectorController.cpp:
3053         * inspector/WorkerRuntimeAgent.h:
3054
3055 2014-01-20  Zan Dobersek  <zdobersek@igalia.com>
3056
3057         Move WebAudio source code to std::unique_ptr
3058         https://bugs.webkit.org/show_bug.cgi?id=127274
3059
3060         Reviewed by Eric Carlson.
3061
3062         Move from using OwnPtr and PassOwnPtr to using std::unique_ptr and move semantics
3063         in the WebAudio module and the WebAudio code in the platform layer.
3064
3065         * Modules/webaudio/AsyncAudioDecoder.cpp:
3066         * Modules/webaudio/AsyncAudioDecoder.h:
3067         * Modules/webaudio/AudioBasicInspectorNode.cpp:
3068         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
3069         * Modules/webaudio/AudioBasicProcessorNode.cpp:
3070         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
3071         * Modules/webaudio/AudioBasicProcessorNode.h:
3072         * Modules/webaudio/AudioBufferSourceNode.cpp:
3073         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3074         * Modules/webaudio/AudioContext.cpp:
3075         * Modules/webaudio/AudioContext.h:
3076         * Modules/webaudio/AudioDestinationNode.cpp:
3077         (WebCore::AudioDestinationNode::AudioDestinationNode):
3078         * Modules/webaudio/AudioNode.cpp:
3079         (WebCore::AudioNode::addInput):
3080         (WebCore::AudioNode::addOutput):
3081         (WebCore::AudioNode::checkNumberOfChannelsForInput):
3082         * Modules/webaudio/AudioNode.h:
3083         * Modules/webaudio/BiquadFilterNode.cpp:
3084         (WebCore::BiquadFilterNode::BiquadFilterNode):
3085         * Modules/webaudio/BiquadProcessor.cpp:
3086         (WebCore::BiquadProcessor::createKernel):
3087         (WebCore::BiquadProcessor::getFrequencyResponse):
3088         * Modules/webaudio/BiquadProcessor.h:
3089         * Modules/webaudio/ChannelMergerNode.cpp:
3090         (WebCore::ChannelMergerNode::ChannelMergerNode):
3091         * Modules/webaudio/ChannelSplitterNode.cpp:
3092         (WebCore::ChannelSplitterNode::ChannelSplitterNode):
3093         * Modules/webaudio/ConvolverNode.cpp:
3094         (WebCore::ConvolverNode::ConvolverNode):
3095         (WebCore::ConvolverNode::uninitialize):
3096         (WebCore::ConvolverNode::setBuffer):
3097         * Modules/webaudio/ConvolverNode.h:
3098         * Modules/webaudio/DefaultAudioDestinationNode.h:
3099         * Modules/webaudio/DelayNode.cpp:
3100         (WebCore::DelayNode::DelayNode):
3101         * Modules/webaudio/DelayProcessor.cpp:
3102         (WebCore::DelayProcessor::createKernel):
3103         * Modules/webaudio/DelayProcessor.h:
3104         * Modules/webaudio/DynamicsCompressorNode.cpp:
3105         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
3106         (WebCore::DynamicsCompressorNode::initialize):
3107         (WebCore::DynamicsCompressorNode::uninitialize):
3108         * Modules/webaudio/DynamicsCompressorNode.h:
3109         * Modules/webaudio/GainNode.cpp:
3110         (WebCore::GainNode::GainNode):
3111         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3112         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
3113         (WebCore::MediaElementAudioSourceNode::setFormat):
3114         * Modules/webaudio/MediaElementAudioSourceNode.h:
3115         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
3116         * Modules/webaudio/MediaStreamAudioSource.cpp:
3117         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3118         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
3119         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3120         * Modules/webaudio/OscillatorNode.cpp:
3121         (WebCore::OscillatorNode::OscillatorNode):
3122         * Modules/webaudio/PannerNode.cpp:
3123         (WebCore::PannerNode::PannerNode):
3124         (WebCore::PannerNode::uninitialize):
3125         (WebCore::PannerNode::setPanningModel):
3126         * Modules/webaudio/PannerNode.h:
3127         * Modules/webaudio/PeriodicWave.cpp:
3128         (WebCore::PeriodicWave::createBandLimitedTables):
3129         * Modules/webaudio/PeriodicWave.h:
3130         * Modules/webaudio/RealtimeAnalyser.cpp:
3131         (WebCore::RealtimeAnalyser::RealtimeAnalyser):
3132         (WebCore::RealtimeAnalyser::setFftSize):
3133         * Modules/webaudio/RealtimeAnalyser.h:
3134         * Modules/webaudio/ScriptProcessorNode.cpp:
3135         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
3136         * Modules/webaudio/WaveShaperDSPKernel.cpp:
3137         (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
3138         * Modules/webaudio/WaveShaperDSPKernel.h:
3139         * Modules/webaudio/WaveShaperNode.cpp:
3140         (WebCore::WaveShaperNode::WaveShaperNode):
3141         * Modules/webaudio/WaveShaperProcessor.cpp:
3142         (WebCore::WaveShaperProcessor::createKernel):
3143         * Modules/webaudio/WaveShaperProcessor.h:
3144         * platform/audio/AudioBus.cpp:
3145         (WebCore::AudioBus::AudioBus):
3146         (WebCore::AudioBus::copyWithGainFrom):
3147         * platform/audio/AudioBus.h:
3148         * platform/audio/AudioChannel.cpp:
3149         * platform/audio/AudioChannel.h:
3150         (WebCore::AudioChannel::AudioChannel):
3151         (WebCore::AudioChannel::set):
3152         * platform/audio/AudioDSPKernelProcessor.h:
3153         * platform/audio/AudioDestination.h:
3154         * platform/audio/AudioResampler.cpp:
3155         (WebCore::AudioResampler::AudioResampler):
3156         (WebCore::AudioResampler::configureChannels):
3157         * platform/audio/AudioResampler.h:
3158         * platform/audio/AudioSession.h:
3159         * platform/audio/DynamicsCompressor.cpp:
3160         (WebCore::DynamicsCompressor::setNumberOfChannels):
3161         * platform/audio/DynamicsCompressor.h:
3162         * platform/audio/DynamicsCompressorKernel.cpp:
3163         (WebCore::DynamicsCompressorKernel::setNumberOfChannels):
3164         * platform/audio/DynamicsCompressorKernel.h:
3165         * platform/audio/FFTFrame.cpp:
3166         (WebCore::FFTFrame::createInterpolatedFrame):
3167         * platform/audio/FFTFrame.h:
3168         * platform/audio/HRTFDatabase.cpp:
3169         (WebCore::HRTFDatabase::HRTFDatabase):
3170         * platform/audio/HRTFDatabase.h:
3171         * platform/audio/HRTFDatabaseLoader.cpp:
3172         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
3173         (WebCore::HRTFDatabaseLoader::load):
3174         * platform/audio/HRTFDatabaseLoader.h:
3175         * platform/audio/HRTFElevation.cpp:
3176         (WebCore::HRTFElevation::createForSubject):
3177         (WebCore::HRTFElevation::createByInterpolatingSlices):
3178         * platform/audio/HRTFElevation.h:
3179         (WebCore::HRTFElevation::HRTFElevation):
3180         * platform/audio/HRTFKernel.cpp:
3181         (WebCore::HRTFKernel::HRTFKernel):
3182         (WebCore::HRTFKernel::createImpulseResponse):
3183         (WebCore::HRTFKernel::createInterpolatedKernel):
3184         * platform/audio/HRTFKernel.h:
3185         (WebCore::HRTFKernel::create):
3186         (WebCore::HRTFKernel::HRTFKernel):
3187         * platform/audio/MultiChannelResampler.cpp:
3188         (WebCore::MultiChannelResampler::MultiChannelResampler):
3189         * platform/audio/MultiChannelResampler.h:
3190         * platform/audio/Panner.cpp:
3191         (WebCore::Panner::create):
3192         * platform/audio/Panner.h:
3193         * platform/audio/Reverb.cpp:
3194         (WebCore::Reverb::initialize):
3195         * platform/audio/Reverb.h:
3196         * platform/audio/ReverbConvolver.h:
3197         * platform/audio/ReverbConvolverStage.cpp:
3198         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
3199         * platform/audio/ReverbConvolverStage.h:
3200         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3201         (WebCore::AudioDestination::create):
3202         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3203         * platform/audio/ios/AudioDestinationIOS.cpp:
3204         (WebCore::AudioDestination::create):
3205         * platform/audio/ios/AudioSessionIOS.mm:
3206         (WebCore::AudioSession::AudioSession):
3207         * platform/audio/mac/AudioDestinationMac.cpp:
3208         (WebCore::AudioDestination::create):
3209         * platform/audio/mac/AudioDestinationMac.h:
3210         * platform/audio/mac/AudioSessionMac.cpp:
3211         (WebCore::AudioSession::AudioSession):
3212
3213 2014-01-20  Morten Stenshorne  <mstensho@opera.com>
3214
3215         Region based multicol: support explicit column breaks
3216         https://bugs.webkit.org/show_bug.cgi?id=123993
3217
3218         Reviewed by David Hyatt.
3219
3220         Merely supporting insertion of explicit (forced) column breaks in
3221         the region based multicol implementation is really simple: just
3222         hook up with what the CSS regions code is already doing.
3223
3224         However, there is one complication: column balancing. In order to
3225         balance columns as nicely as possible when there are explicit
3226         breaks, we need to figure out between which explicit breaks the
3227         implicit breaks will occur (if there's room for any at all).
3228
3229         Tests: fast/multicol/newmulticol/break-after.html
3230                fast/multicol/newmulticol/break-before.html
3231                fast/multicol/newmulticol/breaks-2-columns-3-no-balancing.html
3232                fast/multicol/newmulticol/breaks-2-columns-3.html
3233                fast/multicol/newmulticol/breaks-3-columns-3.html
3234                fast/multicol/newmulticol/fixed-height-fill-balance-2.html
3235
3236         * rendering/RenderBlockFlow.cpp:
3237         (WebCore::RenderBlockFlow::applyBeforeBreak):
3238         (WebCore::RenderBlockFlow::applyAfterBreak): Use the already
3239         existing region breaking code when inserting breaks in region
3240         based multicol.
3241         * rendering/RenderFlowThread.h:
3242         * rendering/RenderMultiColumnBlock.cpp:
3243         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
3244         (WebCore::RenderMultiColumnBlock::relayoutForPagination): Avoid
3245         re-balancing if the multicol's contents were not laid out. Apart
3246         from being good for performance, this is now necessary because of
3247         how explicit breaks are implemented.
3248         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
3249         Detect if the contents are going to be laid out, or skipped, so
3250         that we can tell if we need to (re-)balance the columns
3251         afterwards.
3252         * rendering/RenderMultiColumnBlock.h:
3253         * rendering/RenderMultiColumnFlowThread.cpp:
3254         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
3255         Locate the appropriate multi-column set and call its
3256         addForcedBreak().
3257         * rendering/RenderMultiColumnFlowThread.h:
3258         * rendering/RenderMultiColumnSet.cpp:
3259         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3260         (WebCore::RenderMultiColumnSet::findRunWithTallestColumns):
3261         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks): Figure
3262         out how many implicit breaks each single "content run" should
3263         contain. The taller the content run, the more implicit breaks.
3264         (WebCore::RenderMultiColumnSet::calculateBalancedHeight): This is
3265         now a const method that only does half of what the old
3266         calculateBalancedHeight() did. The rest (such as actually storing
3267         the new column height) is done by recalculateBalancedHeight().
3268         (WebCore::RenderMultiColumnSet::clearForcedBreaks): Needs to be
3269         called between each layout pass, to clear the list of "content
3270         runs".
3271         (WebCore::RenderMultiColumnSet::addForcedBreak): Only useful when
3272         columns are to be balanced. It receives explicit (forced) breaks
3273         and stores them as "content runs". When layout is done, we'll go
3274         through the list of content runs, and see where implicit breaks
3275         should be inserted (if there's room for any). The goal is to
3276         insert implicit breaks in such a way that the final columns become
3277         as short as possible.
3278         (WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
3279         Calculates and sets a new balanced column height. This used to be
3280         done directly in calculateBalancedHeight(), but that method is now
3281         const and it now only calculates the new height and returns it.
3282         (WebCore::RenderMultiColumnSet::prepareForLayout):
3283         * rendering/RenderMultiColumnSet.h: Remove old data members
3284         intended for forced breaks (they were unused), and introduce a
3285         "content run" vector instead. A new content run is triggered by an
3286         explicit break. This is only used when column balancing is
3287         enabled. When not balanced, RenderMultiColumnSet doesn't need to
3288         do anything when explicit breaks are inserted.
3289
3290 2014-01-20  Eric Carlson  <eric.carlson@apple.com>
3291
3292         Allow MediaSessionManager to restrict 'preload' behavior
3293         https://bugs.webkit.org/show_bug.cgi?id=127297
3294
3295         Reviewed by Jer Noble.
3296
3297         Tests: media/video-restricted-no-preload-auto.html
3298                media/video-restricted-no-preload-metadata.html
3299
3300         * html/HTMLMediaElement.cpp:
3301         (WebCore::HTMLMediaElement::parseAttribute): Apply restrictions to preload attribute before
3302             passing to media engine.
3303         (WebCore::HTMLMediaElement::loadResource): Ditto.
3304
3305         * html/HTMLMediaSession.cpp:
3306         (WebCore::HTMLMediaSession::effectivePreloadForElement): New, limit preload according to restrictions.
3307         * html/HTMLMediaSession.h:
3308
3309         * platform/audio/MediaSessionManager.h:
3310         * platform/audio/ios/MediaSessionManagerIOS.mm:
3311         (WebCore::MediaSessionManageriOS::resetRestrictions): Limit preload to metadata only. Drive-by
3312             static deviceClass initialization cleanup.
3313
3314         * testing/Internals.cpp:
3315         (WebCore::Internals::setMediaSessionRestrictions): Support MetadataPreloadingNotPermitted and
3316             AutoPreloadingNotPermitted.
3317
3318 2014-01-20  Andreas Kling  <akling@apple.com>
3319
3320         Let RenderImage construct its RenderImageResource.
3321         <https://webkit.org/b/127290>
3322
3323         Everyone who creates a RenderImage immediately follows up with
3324         creating a RenderImageResource and assigning it to the image.
3325
3326         Let the RenderImage constructor do this instead, and make the
3327         imageResource() accessors return references. This exposed a
3328         number of unnecessary null checks.
3329
3330         Also modernized the touched code with std::unique_ptr.
3331
3332         Reviewed by Antti Koivisto.
3333
3334         * html/HTMLImageElement.cpp:
3335         (WebCore::HTMLImageElement::createElementRenderer):
3336         (WebCore::HTMLImageElement::didAttachRenderers):
3337         * html/HTMLPlugInImageElement.cpp:
3338         (WebCore::HTMLPlugInImageElement::createElementRenderer):
3339         * html/HTMLVideoElement.cpp:
3340         (WebCore::HTMLVideoElement::didAttachRenderers):
3341         (WebCore::HTMLVideoElement::parseAttribute):
3342         * html/ImageInputType.cpp:
3343         (WebCore::ImageInputType::createInputRenderer):
3344         (WebCore::ImageInputType::attach):
3345         * loader/ImageLoader.cpp:
3346         (WebCore::ImageLoader::renderImageResource):
3347         * rendering/RenderElement.cpp:
3348         (WebCore::RenderElement::createFor):
3349         * rendering/RenderImage.cpp:
3350         (WebCore::RenderImage::RenderImage):
3351         (WebCore::RenderImage::~RenderImage):
3352         (WebCore::RenderImage::styleDidChange):
3353         (WebCore::RenderImage::imageChanged):
3354         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded):
3355         (WebCore::RenderImage::updateInnerContentRect):
3356         (WebCore::RenderImage::imageDimensionsChanged):
3357         (WebCore::RenderImage::notifyFinished):
3358         (WebCore::RenderImage::paintReplaced):
3359         (WebCore::RenderImage::paintIntoRect):
3360         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
3361         (WebCore::RenderImage::minimumReplacedHeight):
3362         (WebCore::RenderImage::computeIntrinsicRatioInformation):
3363         (WebCore::RenderImage::embeddedContentBox):
3364         * rendering/RenderImage.h:
3365         (WebCore::RenderImage::imageResource):
3366         (WebCore::RenderImage::cachedImage):
3367         * rendering/RenderImageResource.h:
3368         * rendering/RenderImageResourceStyleImage.h:
3369         * rendering/RenderMedia.cpp:
3370         (WebCore::RenderMedia::RenderMedia):
3371         * rendering/RenderSnapshottedPlugIn.cpp:
3372         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
3373         * rendering/RenderSnapshottedPlugIn.h:
3374         * rendering/RenderVideo.cpp:
3375         (WebCore::RenderVideo::calculateIntrinsicSize):
3376         * rendering/style/ContentData.cpp:
3377         (WebCore::ImageContentData::createContentRenderer):
3378         * rendering/svg/RenderSVGImage.cpp:
3379         (WebCore::RenderSVGImage::RenderSVGImage):
3380         (WebCore::RenderSVGImage::~RenderSVGImage):
3381         (WebCore::RenderSVGImage::updateImageViewport):
3382         (WebCore::RenderSVGImage::paint):
3383         (WebCore::RenderSVGImage::paintForeground):
3384         * rendering/svg/RenderSVGImage.h:
3385         * svg/SVGImageElement.cpp:
3386         (WebCore::SVGImageElement::didAttachRenderers):
3387
3388 2014-01-20  Antti Koivisto  <antti@apple.com>
3389
3390         Update overlay scrollbars in single pass
3391         https://bugs.webkit.org/show_bug.cgi?id=127289
3392
3393         Reviewed by Anders Carlsson.
3394
3395         * platform/ScrollView.cpp:
3396         (WebCore::ScrollView::updateScrollbars):
3397         
3398             Multi-pass scrollbar resolution is only needed for traditional scrollbars. Overlay scrollbars don't affect layout.
3399
3400 2014-01-20  Jochen Eisinger  <jochen@chromium.org>
3401
3402         Never send a non-http(s) referrer header even with a referrer policy
3403         https://bugs.webkit.org/show_bug.cgi?id=127172
3404
3405         Reviewed by Alexey Proskuryakov.
3406
3407         This mirrors the code SecurityPolicy::shouldHideReferrer which is used
3408         for ReferrerPolicyDefault.
3409
3410         No new tests, only affects an embedder that registers other schemes,
3411         e.g. chrome://
3412
3413         * page/SecurityPolicy.cpp:
3414         (WebCore::SecurityPolicy::generateReferrerHeader):
3415
3416 2014-01-20  Mihai Tica  <mitica@adobe.com>
3417
3418         [CSS Background Blending] Background layer with -webkit-cross-fade doesn't blend
3419         when having -webkit-background-blending applied. Turns out the problem was
3420         the blending parameter not being passed to WebCore::CrossfadeGeneratedImage::draw
3421
3422         https://bugs.webkit.org/show_bug.cgi?id=126887
3423
3424         Reviewed by Dirk Schulze.
3425
3426         Test: css3/compositing/background-blend-mode-crossfade-image.html
3427
3428         * platform/graphics/CrossfadeGeneratedImage.cpp:
3429         (WebCore::CrossfadeGeneratedImage::draw): set blendMode on context.
3430
3431 2013-11-22  Sergio Villar Senin  <svillar@igalia.com>
3432
3433         Null-pointer dereference in WebCore::CSSValue::isPrimitiveValue
3434         https://bugs.webkit.org/show_bug.cgi?id=124769
3435
3436         Reviewed by Andreas Kling.
3437
3438         Test: fast/gradients/crash-on-no-position-separator.html
3439
3440         The function parseFillPosition() may not return valid values for
3441         centerX and centerY if the input data is malformed. We need to
3442         check that we get a valid pair of positions before checking that
3443         they're actually valid primitive values in the assertions.
3444
3445         * css/CSSParser.cpp:
3446         (WebCore::CSSParser::parseRadialGradient):
3447
3448 2014-01-20  Mihai Tica  <mitica@adobe.com>
3449
3450         Background-blend-mode doesn't work for an element with an
3451         SVG image as background and border-style or padding set.
3452         The problem consisted in the drawing path using the default
3453         blending parameter at all times.
3454         https://bugs.webkit.org/show_bug.cgi?id=118894
3455
3456         Reviewed by Dirk Schulze.
3457
3458         Test: css3/compositing/background-blend-mode-data-uri-svg-image.html
3459
3460         * svg/graphics/SVGImage.cpp:
3461         (WebCore::SVGImage::drawPatternForContainer): Pass blendMode to Image::drawPattern.
3462         * svg/graphics/SVGImage.h: Add a blendMode parameter to drawPatternForContainer.
3463         * svg/graphics/SVGImageForContainer.cpp:
3464         (WebCore::SVGImageForContainer::drawPattern): Pass blendMode to drawPatternForContainer call.
3465
3466 2014-01-20  Zalan Bujtas  <zalan@apple.com>
3467
3468         Subpixel layout: setSimpleLineLayoutEnabled() produces different layout when line position has CSS px fractions.
3469         https://bugs.webkit.org/show_bug.cgi?id=126892
3470
3471         Reviewed by Antti Koivisto.
3472
3473         SimpleLineLayout needs to copy normal linebox layout's subpixel rounding strategy to produce
3474         the same layout.
3475
3476         Covered by existing tests.
3477
3478         * rendering/SimpleLineLayoutFunctions.cpp:
3479         (WebCore::SimpleLineLayout::paintFlow):
3480
3481 2014-01-20  Gurpreet Kaur  <k.gurpreet@samsung.com>
3482
3483         Col width is not honored when dynamically updated and it would make table narrower
3484         https://bugs.webkit.org/show_bug.cgi?id=104711
3485
3486         Reviewed by Antti Koivisto.
3487
3488         Increasing the table width by increasing the colgroup width
3489         was working but decreasing the table width by decreasing the
3490         colgroup width is not working.
3491
3492         Test: fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
3493
3494         * rendering/RenderTableCol.cpp:
3495         (WebCore::RenderTableCol::styleDidChange):
3496         When colgroup width is defined table cell should adjust according to
3497         that. On decreasing colgroup width the cells maxPreferredLogicalWidth
3498         was still set to the earlier value. Setting the
3499         setPreferredLogicalWidthsDirty to true so that cells pref width is
3500         calculated again.
3501
3502 2014-01-20  Edit Balint  <edbalint@inf.u-szeged.hu>
3503
3504         [CoordinatedGraphics] Segmentation fault at  CoordinatedGraphicsScene::clearImageBackingContents
3505
3506         https://bugs.webkit.org/show_bug.cgi?id=125776
3507
3508         Reviewed by Csaba Osztrogonác.
3509
3510         Unexpected behavior occurs in some test cases which leads to segmentation fault.
3511
3512         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3513         (WebCore::CompositingCoordinator::removeImageBacking):
3514
3515 2014-01-20  Morten Stenshorne  <mstensho@opera.com>
3516
3517         Region based multicol: tall line causes taller multicol container than necessary
3518         https://bugs.webkit.org/show_bug.cgi?id=122550
3519
3520         Detect and report all column breaks, also when there's no pagination strut involved.
3521
3522         This may end up becoming the overall smallest space shortage in some cases,
3523         so we need to report it, to avoid column height over-stretching.
3524
3525         Reviewed by David Hyatt.
3526
3527         Test: fast/multicol/newmulticol/balance10.html
3528
3529         * rendering/RenderBlockFlow.cpp:
3530         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
3531
3532 2014-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3533
3534         [GLIB] GVariant floating references are not correctly handled by GRefPtr
3535         https://bugs.webkit.org/show_bug.cgi?id=127246
3536
3537         Reviewed by Martin Robinson.
3538
3539         Do not adopt GVariant floating references, they will be converted
3540         to a full reference by GRefPtr.
3541
3542         * platform/gtk/PasteboardHelper.cpp:
3543         (WebCore::PasteboardHelper::fillSelectionData):
3544         (WebCore::PasteboardHelper::fillDataObjectFromDropData):
3545
3546 2014-01-19  Jinwoo Song  <jinwoo7.song@samsung.com>
3547
3548         Use unsigned type for the size of CSSParserValueList
3549         https://bugs.webkit.org/show_bug.cgi?id=127211
3550
3551         Reviewed by Andreas Kling.
3552
3553         * css/CSSParser.cpp: Changed variable type from int to unsigned.
3554         (WebCore::CSSParser::parseValue):
3555
3556 2014-01-19  Jaehun Lim  <ljaehun.lim@samsung.com>
3557
3558         Unreviewed build fix after r162293
3559
3560         Fix debug build.
3561
3562         [ 13%] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/html/parser/HTMLTreeBuilder.cpp.o
3563         /source/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp: In member function ‘void WebCore::HTMLTreeBuilder::processStartTagForInTable(WebCore::AtomicHTMLToken*)’:
3564         /source/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1037:40: error: no match for ‘operator!’ in ‘!(WebCore::HTMLTreeBuilder::InsertionMode)12’
3565         /source/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1037:40: note: candidate is:
3566         /source/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1037:40: note: operator!(bool) <built-in>
3567         /source/WebKit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1037:40: note:   no known conversion for argument 1 from ‘WebCore::HTMLTreeBuilder::InsertionMode’ to ‘bool’
3568         make[2]: *** [Source/WebCore/CMakeFiles/WebCore.dir/html/parser/HTMLTreeBuilder.cpp.o] Error 1
3569         make[1]: *** [Source/WebCore/CMakeFiles/WebCore.dir/all] Error 2
3570         make: *** [all] Error 2
3571
3572         * html/parser/HTMLTreeBuilder.cpp:
3573         (WebCore::HTMLTreeBuilder::processStartTagForInTable): Fix ASSERT.
3574
3575 2014-01-19  Anders Carlsson  <andersca@apple.com>
3576
3577         Stop using MutexTryLocker in WebCore
3578         https://bugs.webkit.org/show_bug.cgi?id=127254
3579
3580         Reviewed by Andreas Kling.
3581
3582         Instead use std::mutex and std::unique_lock with the std::try_to_lock constructor.
3583
3584         * Modules/webaudio/AudioBufferSourceNode.cpp:
3585         (WebCore::AudioBufferSourceNode::process):
3586         (WebCore::AudioBufferSourceNode::setBuffer):
3587         * Modules/webaudio/AudioBufferSourceNode.h:
3588         * Modules/webaudio/AudioParamTimeline.cpp:
3589         (WebCore::AudioParamTimeline::insertEvent):
3590         (WebCore::AudioParamTimeline::cancelScheduledValues):
3591         (WebCore::AudioParamTimeline::valueForContextTime):
3592         (WebCore::AudioParamTimeline::valuesForTimeRange):
3593         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
3594         * Modules/webaudio/AudioParamTimeline.h:
3595         * Modules/webaudio/ConvolverNode.cpp:
3596         (WebCore::ConvolverNode::process):
3597         (WebCore::ConvolverNode::reset):
3598         (WebCore::ConvolverNode::setBuffer):
3599         * Modules/webaudio/ConvolverNode.h:
3600         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3601         (WebCore::MediaElementAudioSourceNode::setFormat):
3602         (WebCore::MediaElementAudioSourceNode::process):
3603         (WebCore::MediaElementAudioSourceNode::lock):
3604         (WebCore::MediaElementAudioSourceNode::unlock):
3605         * Modules/webaudio/MediaElementAudioSourceNode.h:
3606         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3607         (WebCore::MediaStreamAudioSourceNode::setFormat):
3608         (WebCore::MediaStreamAudioSourceNode::process):
3609         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3610         * Modules/webaudio/OscillatorNode.cpp:
3611         (WebCore::OscillatorNode::process):
3612         (WebCore::OscillatorNode::setPeriodicWave):
3613         * Modules/webaudio/OscillatorNode.h:
3614         * Modules/webaudio/PannerNode.cpp:
3615         (WebCore::PannerNode::process):
3616         (WebCore::PannerNode::setPanningModel):
3617         * Modules/webaudio/PannerNode.h:
3618         * Modules/webaudio/WaveShaperProcessor.cpp:
3619         (WebCore::WaveShaperProcessor::setCurve):
3620         (WebCore::WaveShaperProcessor::setOversample):
3621         (WebCore::WaveShaperProcessor::process):
3622         * Modules/webaudio/WaveShaperProcessor.h:
3623
3624 2014-01-19  Alberto Garcia  <berto@igalia.com>
3625
3626         Does not build with SVG disabled
3627         https://bugs.webkit.org/show_bug.cgi?id=127248
3628
3629         Reviewed by Sam Weinig.
3630
3631         Add missing #if ENABLE(SVG) guard.
3632
3633         * dom/ElementData.h:
3634
3635 2014-01-19  Anders Carlsson  <andersca@apple.com>
3636
3637         Use a strong enum for HTMLTreeBuilder::InsertionMode
3638         https://bugs.webkit.org/show_bug.cgi?id=127252
3639
3640         Reviewed by Antti Koivisto.
3641
3642         * html/parser/HTMLTreeBuilder.cpp:
3643         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3644         (WebCore::HTMLTreeBuilder::constructTree):
3645         (WebCore::HTMLTreeBuilder::processDoctypeToken):
3646         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3647         (WebCore::HTMLTreeBuilder::processTemplateStartTag):
3648         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
3649         (WebCore::HTMLTreeBuilder::closeTheCell):
3650         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
3651         (WebCore::HTMLTreeBuilder::processStartTag):
3652         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
3653         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
3654         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
3655         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
3656         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
3657         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
3658         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
3659         (WebCore::HTMLTreeBuilder::processEndTag):
3660         (WebCore::HTMLTreeBuilder::processComment):
3661         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
3662         (WebCore::HTMLTreeBuilder::processEndOfFile):
3663         (WebCore::HTMLTreeBuilder::defaultForInitial):
3664         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
3665         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3666         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
3667         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
3668         (WebCore::HTMLTreeBuilder::processScriptStartTag):
3669         * html/parser/HTMLTreeBuilder.h:
3670
3671 2014-01-19  Anders Carlsson  <andersca@apple.com>
3672
3673         Convert LoaderRunLoopCF.cpp and WebCoreThreadRun.cpp over to modern threading primitives
3674         https://bugs.webkit.org/show_bug.cgi?id=127251
3675
3676         Reviewed by Antti Koivisto.
3677
3678         Also add a condition to the loaderRunLoop() function to protect against spurious wake-ups.
3679
3680         * platform/ios/wak/WebCoreThreadRun.cpp:
3681         * platform/network/cf/LoaderRunLoopCF.cpp:
3682         (WebCore::loaderRunLoopMutex):
3683         (WebCore::loaderRunLoopConditionVariable):
3684         (WebCore::runLoaderThread):
3685         (WebCore::loaderRunLoop):
3686
3687 2014-01-19  Anders Carlsson  <andersca@apple.com>
3688
3689         Modernize ReverbConvolver
3690         https://bugs.webkit.org/show_bug.cgi?id=127250
3691
3692         Reviewed by Andreas Kling.
3693
3694         Use std::unique_ptr instead of OwnPtr and the STL threading primitives instead of the WTF ones.
3695
3696         * platform/audio/ReverbConvolver.cpp:
3697         (WebCore::ReverbConvolver::ReverbConvolver):
3698         (WebCore::ReverbConvolver::~ReverbConvolver):
3699         (WebCore::ReverbConvolver::backgroundThreadEntry):
3700         (WebCore::ReverbConvolver::process):
3701         * platform/audio/ReverbConvolver.h:
3702
3703 2014-01-18  Andy Estes  <aestes@apple.com>
3704
3705         [iOS] Rename GestureEventIOS.{cpp,h} to GestureEvent.{cpp,h} to fix the build
3706
3707         InFilesCompiler.pm assumes that <interface name>.h exists for each
3708         interface it processes. We renamed GestureEvent.h to GestureEventIOS.h
3709         but kept the interface named GestureEvent, so a non-existant file was
3710         being referenced by InFilesCompiler.pm (this was hard to detect since
3711         GestureEvent.h still existed in the SDK due to not having submitted
3712         WebKitAdditions recently).
3713
3714         Since we cannot rename the GestureEvent interface, and since there is
3715         no conflicting GestureEvent in open source, we can just rename
3716         GestureEventIOS.{cpp,h} back to GestureEvent.{cpp,h}.
3717
3718         * dom/ios/TouchEvents.cpp: Updated to include GestureEvent.cpp.
3719
3720 2014-01-18  Alexey Proskuryakov  <ap@apple.com>
3721
3722         Memory leak in JSSubtleCrypto::wrapKey
3723         https://bugs.webkit.org/show_bug.cgi?id=127241
3724
3725         Reviewed by Sam Weinig.
3726
3727         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey):
3728         Delete algorithmPtr and parametersPtr that aren't smart pointers because of lambdas.
3729
3730 2014-01-18  Andy Estes  <aestes@apple.com>
3731
3732         Fix the iOS Production build.
3733
3734         * Configurations/WebCore.xcconfig:
3735
3736 2014-01-18  Alberto Garcia  <berto@igalia.com>
3737
3738         [CodeGeneratorJS] Sort output of StructureFlags and function parameters
3739
3740         https://bugs.webkit.org/show_bug.cgi?id=127226
3741
3742         Reviewed by Alexey Proskuryakov.
3743
3744         The order of the keys in a hash is undefined and subject to change
3745         between different Perl versions, so we have to sort them to make
3746         sure that the output is always the same.
3747
3748         * bindings/scripts/CodeGeneratorJS.pm:
3749         (GenerateHeader):
3750         (GenerateParametersCheckExpression):
3751         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3752         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3753         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3754         * bindings/scripts/test/JS/JSTestEventTarget.h:
3755         * bindings/scripts/test/JS/JSTestException.h:
3756         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3757         * bindings/scripts/test/JS/JSTestInterface.h:
3758         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3759         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3760         * bindings/scripts/test/JS/JSTestNode.h:
3761         * bindings/scripts/test/JS/JSTestObj.cpp:
3762         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
3763         * bindings/scripts/test/JS/JSTestObj.h:
3764         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3765         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3766         * bindings/scripts/test/JS/JSTestTypedefs.h:
3767         * bindings/scripts/test/JS/JSattribute.h:
3768         * bindings/scripts/test/JS/JSreadonly.h:
3769
3770 2014-01-18  Anders Carlsson  <andersca@apple.com>
3771
3772         Replace a couple of uses of WTF::Function with std::function
3773         https://bugs.webkit.org/show_bug.cgi?id=127218
3774
3775         Reviewed by Andreas Kling.
3776
3777         * WebCore.exp.in:
3778         * page/scrolling/ScrollingThread.cpp:
3779         (WebCore::ScrollingThread::dispatch):
3780         (WebCore::ScrollingThread::dispatchBarrier):
3781         (WebCore::ScrollingThread::shared):
3782         (WebCore::ScrollingThread::createThreadIfNeeded):
3783         (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
3784         * page/scrolling/ScrollingThread.h:
3785         * page/scrolling/mac/ScrollingThreadMac.mm:
3786         (WebCore::ScrollingThread::initializeRunLoop):
3787
3788 2014-01-18  Anders Carlsson  <andersca@apple.com>
3789
3790         Modernize HTML parser code
3791         https://bugs.webkit.org/show_bug.cgi?id=127236
3792
3793         Reviewed by Andreas Kling.
3794
3795         * html/parser/AtomicHTMLToken.h:
3796         * html/parser/CSSPreloadScanner.cpp:
3797         (WebCore::CSSPreloadScanner::emitRule):
3798         * html/parser/HTMLDocumentParser.cpp:
3799         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3800         (WebCore::HTMLDocumentParser::detach):
3801         (WebCore::HTMLDocumentParser::stopParsing):
3802         (WebCore::HTMLDocumentParser::pumpTokenizer):
3803         (WebCore::HTMLDocumentParser::insert):
3804         (WebCore::HTMLDocumentParser::append):
3805         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3806         * html/parser/HTMLDocumentParser.h:
3807         * html/parser/HTMLElementStack.cpp:
3808         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
3809         (WebCore::HTMLElementStack::insertAbove):
3810         (WebCore::HTMLElementStack::pushCommon):
3811         * html/parser/HTMLElementStack.h:
3812         (WebCore::HTMLElementStack::ElementRecord::releaseNext):
3813         (WebCore::HTMLElementStack::ElementRecord::setNext):
3814         * html/parser/HTMLMetaCharsetParser.cpp:
3815         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
3816         * html/parser/HTMLMetaCharsetParser.h:
3817         * html/parser/HTMLParserScheduler.h:
3818         * html/parser/HTMLPreloadScanner.cpp:
3819         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
3820         (WebCore::TokenPreloadScanner::scan):
3821         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
3822         * html/parser/HTMLPreloadScanner.h:
3823         * html/parser/HTMLResourcePreloader.cpp:
3824         (WebCore::HTMLResourcePreloader::takeAndPreload):
3825         (WebCore::HTMLResourcePreloader::preload):
3826         * html/parser/HTMLResourcePreloader.h:
3827         (WebCore::PreloadRequest::PreloadRequest):
3828         * html/parser/HTMLScriptRunner.h:
3829         * html/parser/HTMLToken.h:
3830         (WebCore::HTMLToken::beginDOCTYPE):
3831         (WebCore::HTMLToken::releaseDoctypeData):
3832         * html/parser/HTMLTokenizer.h:
3833         * html/parser/HTMLTreeBuilder.h:
3834         * html/parser/HTMLViewSourceParser.cpp:
3835         (WebCore::HTMLViewSourceParser::HTMLViewSourceParser):
3836         * html/parser/HTMLViewSourceParser.h:
3837         * html/parser/XSSAuditor.cpp:
3838         (WebCore::XSSAuditor::init):
3839         (WebCore::XSSAuditor::filterToken):
3840         * html/parser/XSSAuditor.h:
3841         * html/parser/XSSAuditorDelegate.h:
3842         (WebCore::XSSInfo::XSSInfo):
3843         * loader/TextResourceDecoder.cpp:
3844         (WebCore::TextResourceDecoder::checkForHeadCharset):
3845         (WebCore::TextResourceDecoder::checkForMetaCharset):
3846         * loader/TextResourceDecoder.h:
3847
3848 2014-01-18  Benjamin Poulain  <benjamin@webkit.org>
3849
3850         Make ElementData JIT friendly
3851         https://bugs.webkit.org/show_bug.cgi?id=127209
3852
3853         Reviewed by Geoffrey Garen.
3854
3855         The offsets of ElementData's flags were not accessible by the JIT. This patch
3856         refactor ElementData to use explicit flags so that they can be used from
3857         the code generators.
3858
3859         * dom/Element.cpp:
3860         (WebCore::Element::synchronizeAllAttributes):
3861         (WebCore::Element::synchronizeAttribute):
3862         (WebCore::Element::attributeChanged):
3863         (WebCore::Element::removeAttribute):
3864         * dom/ElementData.cpp:
3865         (WebCore::ElementData::destroy):
3866         (WebCore::ElementData::ElementData):
3867         (WebCore::ShareableElementData::ShareableElementData):
3868         (WebCore::ShareableElementData::~ShareableElementData):
3869         (WebCore::ElementData::arraySizeAndFlagsFromOther):
3870         * dom/ElementData.h:
3871         (WebCore::ElementData::hasName):
3872         (WebCore::ElementData::isUnique):
3873         (WebCore::ElementData::updateFlag):
3874         (WebCore::ElementData::arraySize):
3875         (WebCore::ElementData::setHasNameAttribute):
3876         (WebCore::ElementData::styleAttributeIsDirty):
3877         (WebCore::ElementData::setStyleAttributeIsDirty):
3878         (WebCore::ElementData::presentationAttributeStyleIsDirty):
3879         (WebCore::ElementData::setPresentationAttributeStyleIsDirty):
3880         (WebCore::ElementData::animatedSVGAttributesAreDirty):
3881         (WebCore::ElementData::setAnimatedSVGAttributesAreDirty):
3882         (WebCore::ElementData::length):
3883         (WebCore::ElementData::attributeBase):
3884         (WebCore::ElementData::presentationAttributeStyle):
3885         * dom/StyledElement.cpp:
3886         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
3887         (WebCore::StyledElement::attributeChanged):
3888         (WebCore::StyledElement::styleAttributeChanged):
3889         (WebCore::StyledElement::inlineStyleChanged):
3890         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
3891         * dom/StyledElement.h:
3892         (WebCore::StyledElement::invalidateStyleAttribute):
3893         (WebCore::StyledElement::presentationAttributeStyle):
3894         * svg/SVGElement.cpp:
3895         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
3896         * svg/SVGElement.h:
3897         (WebCore::SVGElement::invalidateSVGAttributes):
3898
3899 2014-01-18  Zalan Bujtas  <zalan@apple.com>
3900
3901         Subpixel layout: IntRect::infiniteRect() overflows when subpixel layout is enabled.
3902         https://bugs.webkit.org/show_bug.cgi?id=126899
3903
3904         Reviewed by Tim Horton.
3905
3906         Use LayoutUnits when setting the infinite values on IntRect::infiniteRect() to ensure
3907         it won't overflow later when the IntRect gets converted to LayoutRect.
3908
3909         Covered by existing tests.
3910
3911         * platform/graphics/IntRect.h:
3912         (WebCore::IntRect::infiniteRect):
3913
3914 2014-01-18  Anders Carlsson  <andersca@apple.com>
3915
3916         Remove support for the viewsource attribute
3917         https://bugs.webkit.org/show_bug.cgi?id=127232
3918
3919         Reviewed by Andreas Kling.
3920
3921         The 'viewsource' attribute on frames is nonstandard, not used by anyone (the inspector has
3922         its own syntax highlighting) and not audited.
3923
3924         This patch removes parsing of the viewsource attribute and the associated tests. A subsequent
3925         patch will remove the code as well.
3926
3927         * html/HTMLFrameElementBase.cpp:
3928         (WebCore::HTMLFrameElementBase::parseAttribute):
3929
3930 2014-01-18  Anders Carlsson  <andersca@apple.com>
3931
3932         XMLTreeViewer shouldn't use the view source mode
3933         https://bugs.webkit.org/show_bug.cgi?id=127229
3934
3935         Reviewed by Andreas Kling.
3936
3937         Add the relevant styles from view-source.css to XMLViewer.css.
3938
3939         * xml/XMLTreeViewer.cpp:
3940         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
3941         * xml/XMLViewer.css:
3942         (body):
3943         (.comment):
3944         (.tag):
3945         (.attribute-name):
3946         (.attribute-value):
3947         * xml/XMLViewer.js:
3948         (createComment):
3949         (createTag):
3950         (createAttribute):
3951
3952 2014-01-18  Andreas Kling  <akling@apple.com>
3953
3954         Remove unused "touchDragDropEnabled" setting.
3955         <https://webkit.org/b/127227>
3956
3957         Reviewed by Sam Weinig.
3958
3959         * page/Settings.in:
3960
3961 2014-01-18  Brian Burg  <bburg@apple.com>
3962
3963         Web Inspector: Page should use std::unique_ptr for InspectorController
3964         https://bugs.webkit.org/show_bug.cgi?id=127068
3965
3966         Reviewed by Joseph Pecoraro.
3967
3968         Make Page and WorkerGlobalScope keep a std::unique_ptr to InspectorController
3969         and WorkerInspectorController. Store page references and return controller
3970         references where possible.
3971
3972         Convert call sites to use an InspectorController reference.
3973         Convert instantiations of InspectorFrontendClient to use std::unique_ptr.
3974         Convert InspectorOverlay to keep Page references.
3975
3976         * WebCore.exp.in:
3977         * bindings/js/JSDOMWindowBase.cpp:
3978         (WebCore::JSDOMWindowBase::supportsProfiling):
3979         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
3980         * dom/Node.cpp:
3981         (WebCore::Node::inspect):
3982         * inspector/InspectorController.cpp:
3983         (WebCore::InspectorController::InspectorController):
3984         (WebCore::InspectorController::inspectedPageDestroyed):
3985         (WebCore::InspectorController::setInspectorFrontendClient):
3986         (WebCore::InspectorController::hasInspectorFrontendClient):
3987         (WebCore::InspectorController::connectFrontend):
3988         (WebCore::InspectorController::disconnectFrontend):
3989         (WebCore::InspectorController::inspectedPage):
3990         (WebCore::InspectorController::developerExtrasEnabled):
3991         * inspector/InspectorController.h:
3992         * inspector/InspectorFrontendClientLocal.cpp:
3993         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
3994         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
3995         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
3996         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3997         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
3998         * inspector/InspectorOverlay.cpp:
3999         (WebCore::InspectorOverlay::InspectorOverlay):
4000         (WebCore::InspectorOverlay::getHighlight):
4001         (WebCore::InspectorOverlay::highlightQuad):
4002         (WebCore::InspectorOverlay::update):
4003         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
4004         (WebCore::InspectorOverlay::drawQuadHighlight):
4005         (WebCore::InspectorOverlay::overlayPage):
4006         (WebCore::InspectorOverlay::reset):
4007         * inspector/InspectorOverlay.h:
4008         * inspector/InstrumentingAgents.cpp:
4009         (WebCore::instrumentationForPage): remove null checks.
4010         (WebCore::instrumentationForWorkerGlobalScope): remove null checks.
4011         * inspector/WorkerInspectorController.cpp:
4012         (WebCore::WorkerInspectorController::WorkerInspectorController):
4013         (WebCore::WorkerInspectorController::connectFrontend):
4014         (WebCore::WorkerInspectorController::disconnectFrontend):
4015         * inspector/WorkerInspectorController.h:
4016         * loader/FrameLoader.cpp:
4017         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
4018         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
4019         * page/ContextMenuController.cpp:
4020         (WebCore::ContextMenuController::showContextMenu):
4021         (WebCore::ContextMenuController::contextMenuItemSelected):
4022         (WebCore::ContextMenuController::populate):
4023         (WebCore::ContextMenuController::addInspectElementItem):
4024         * page/FrameView.cpp:
4025         (WebCore::FrameView::sendResizeEventIfNeeded):
4026         * page/Page.cpp:
4027         (WebCore::Page::Page):
4028         * page/Page.h:
4029         (WebCore::Page::inspectorController):
4030         * page/PageDebuggable.cpp:
4031         (WebCore::PageDebuggable::hasLocalDebugger):
4032         (WebCore::PageDebuggable::parentProcessIdentifier):
4033         (WebCore::PageDebuggable::connect):
4034         (WebCore::PageDebuggable::disconnect):
4035         (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend):
4036         (WebCore::PageDebuggable::setIndicating):
4037         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
4038         (WebCore::CompositingCoordinator::syncDisplayState):
4039         * testing/Internals.cpp:
4040         (WebCore::Internals::resetToConsistentState):
4041         (WebCore::Internals::inspectorHighlightRects):
4042         (WebCore::Internals::inspectorHighlightObject):
4043         (WebCore::Internals::emitInspectorDidBeginFrame):
4044         (WebCore::Internals::emitInspectorDidCancelFrame):
4045         (WebCore::Internals::openDummyInspectorFrontend):
4046         (WebCore::Internals::closeDummyInspectorFrontend):
4047         (WebCore::Internals::setInspectorResourcesDataSizeLimits):
4048         (WebCore::Internals::setJavaScriptProfilingEnabled):
4049         * workers/WorkerGlobalScope.cpp:
4050         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
4051         * workers/WorkerGlobalScope.h: remove clearInspector().