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