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