Web Replay: memoize nondeterministic attributes of the Screen interface
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-08  Brian J. Burg  <burg@cs.washington.edu>
2
3         Web Replay: memoize nondeterministic attributes of the Screen interface
4         https://bugs.webkit.org/show_bug.cgi?id=131339
5
6         Reviewed by Timothy Hatcher.
7
8         The values from the screen interface are nondeterministic. Since we can't
9         change the physical screen dimensions, instead memoize values of attributes.
10
11         Test: ManualTests/inspector/replay-window-screen.html
12
13         * page/Screen.idl: Add Nondeterministic attribute.
14
15 2014-04-08  Beth Dakin  <bdakin@apple.com>
16
17         https://bugs.webkit.org/show_bug.cgi?id=131408
18         Scrollbars layers don't dynamically update when device scale factor changes
19         -and corresponding-
20         <rdar://problem/16503875>
21
22         Reviewed by Tim Horton.
23
24         The scrollbar layers are not children of the RenderView's layer, so they were 
25         completely skipped over by this function before. We need to start this higher up 
26         the tree in the rootGraphicsLayer(), which will typically return the 
27         m_overflowControlsHostLayer.
28         * rendering/RenderLayerCompositor.cpp:
29         (WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged):
30
31 2014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
32
33         HTMLConverter::aggregatedAttributesForAncestors should cache intermediate results
34         https://bugs.webkit.org/show_bug.cgi?id=131400
35
36         Reviewed by Sam Weinig.
37
38         Instead of accumulating attributes from a character node to the highest ancestor,
39         recursively call aggregatedAttributesForElementAndItsAncestors so that aggregated
40         attributes are cached on each ancestor to eliminate the old O(n^2) behavior.
41
42         * editing/cocoa/HTMLConverter.mm:
43         (HTMLConverter::aggregatedAttributesForAncestors):
44         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors): Extracted from aggregatedAttributesForAncestors.
45
46 2014-04-08  Jinwoo Song  <jinwoo7.song@samsung.com>
47
48         Unreviewed CMake build fix after r166965.
49
50         * UseJSC.cmake: Rename JSClipboardCustom.cpp to JSDataTransferCustom.cpp.
51
52 2014-04-08  Enrica Casucci  <enrica@apple.com>
53
54         Unreviewed iOS build fix.
55
56         Return false instead of nil in a function that returns BOOL.
57
58         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
59         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
60
61 2014-04-08  Brady Eidson  <beidson@apple.com>
62
63         Non-empty ranges misdetected as empty ranges, avoiding telephone number detection.
64         <rdar://problem/16553441> and https://bugs.webkit.org/show_bug.cgi?id=131397 
65
66         Reviewed by Tim Horton.
67
68         No new tests (Only affects a currently untested Mac-only WK2 feature)
69
70         * editing/Editor.cpp:
71         (WebCore::Editor::scanSelectionForTelephoneNumbers): Fix detection of empty ranges so we don’t
72           early return erroneously.
73
74 2014-04-08  Adenilson Cavalcanti  <cavalcantii@gmail.com>
75
76         [SVG] Fix CSS transform handling when zoomed
77         https://bugs.webkit.org/show_bug.cgi?id=125836
78
79         Reviewed by Tim Horton.
80
81         Tests: svg/zoom/page/zoom-css-transforms-expected.svg
82                svg/zoom/page/zoom-css-transforms.svg
83
84         Adjusts CSS transforms when used in SVG to account for unexpected
85         translation scale. Backport from Chromium #174910.
86
87         * svg/SVGGraphicsElement.cpp:
88         (WebCore::SVGGraphicsElement::animatedLocalTransform):
89
90 2014-04-08  Hans Muller  <hmuller@adobe.com>
91
92         [CSS Shapes] large corner radius combined with 0 radius does not wrap properly
93         https://bugs.webkit.org/show_bug.cgi?id=129739
94
95         Reviewed by Bem Jones-Bey.
96
97         Corrected special case handling for shape-outside border-box values with border-radius
98         values that greater than or equal to the box's height.
99
100         Tests: fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html
101                fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-002.html
102
103         * rendering/shapes/BoxShape.cpp:
104         (WebCore::BoxShape::getExcludedIntervals):
105
106 2014-04-08  Alexey Proskuryakov  <ap@apple.com>
107
108         Rename Clipboard to DataTransfer
109         https://bugs.webkit.org/show_bug.cgi?id=131371
110
111         Reviewed by Anders Carlsson.
112
113         This is the name used in HTML5, and it's much better than the confusing Clipboard one.
114
115         Renamed related enums too, and made DataTransferAccessPolicy an enum class.
116
117         * CMakeLists.txt:
118         * Configurations/WebCore.xcconfig:
119         * DerivedSources.cpp:
120         * DerivedSources.make:
121         * WebCore.exp.in:
122         * WebCore.vcxproj/WebCore.vcxproj:
123         * WebCore.vcxproj/WebCore.vcxproj.filters:
124         * WebCore.xcodeproj/project.pbxproj:
125         * bindings/js/JSBindingsAllInOne.cpp:
126         * bindings/js/JSClipboardCustom.cpp: Removed.
127         * bindings/js/JSDataTransferCustom.cpp: Copied from Source/WebCore/bindings/js/JSClipboardCustom.cpp.
128         (WebCore::JSDataTransfer::types):
129         (WebCore::JSClipboard::types): Deleted.
130         * bindings/js/JSEventCustom.cpp:
131         * dom/Clipboard.cpp: Removed.
132         * dom/Clipboard.h: Removed.
133         * dom/Clipboard.idl: Removed.
134         * dom/ClipboardAccessPolicy.h: Removed.
135         * dom/ClipboardEvent.cpp:
136         (WebCore::ClipboardEvent::ClipboardEvent):
137         * dom/ClipboardEvent.h:
138         (WebCore::ClipboardEvent::create):
139         (WebCore::ClipboardEvent::clipboard): Deleted.
140         * dom/ClipboardMac.mm: Removed.
141         * dom/DOMAllInOne.cpp:
142         * dom/DataTransfer.cpp: Copied from Source/WebCore/dom/Clipboard.cpp.
143         (WebCore::DataTransfer::DataTransfer):
144         (WebCore::DataTransfer::createForCopyAndPaste):
145         (WebCore::DataTransfer::~DataTransfer):
146         (WebCore::DataTransfer::setAccessPolicy):
147         (WebCore::DataTransfer::canReadTypes):
148         (WebCore::DataTransfer::canReadData):
149         (WebCore::DataTransfer::canWriteData):
150         (WebCore::DataTransfer::clearData):
151         (WebCore::DataTransfer::getData):
152         (WebCore::DataTransfer::setData):
153         (WebCore::DataTransfer::types):
154         (WebCore::DataTransfer::files):
155         (WebCore::DataTransfer::dropEffect):
156         (WebCore::DataTransfer::setDropEffect):
157         (WebCore::DataTransfer::effectAllowed):
158         (WebCore::DataTransfer::setEffectAllowed):
159         (WebCore::DataTransfer::setDragImage):
160         (WebCore::DataTransfer::createForDragAndDrop):
161         (WebCore::DataTransfer::canSetDragImage):
162         (WebCore::DataTransfer::updateDragImage):
163         (WebCore::DataTransfer::createDragImage):
164         (WebCore::DragImageLoader::DragImageLoader):
165         (WebCore::DragImageLoader::imageChanged):
166         (WebCore::DataTransfer::sourceOperation):
167         (WebCore::DataTransfer::destinationOperation):
168         (WebCore::DataTransfer::setSourceOperation):
169         (WebCore::DataTransfer::setDestinationOperation):
170         (WebCore::Clipboard::Clipboard): Deleted.
171         (WebCore::Clipboard::createForCopyAndPaste): Deleted.
172         (WebCore::Clipboard::~Clipboard): Deleted.
173         (WebCore::Clipboard::setAccessPolicy): Deleted.
174         (WebCore::Clipboard::canReadTypes): Deleted.
175         (WebCore::Clipboard::canReadData): Deleted.
176         (WebCore::Clipboard::canWriteData): Deleted.
177         (WebCore::Clipboard::clearData): Deleted.
178         (WebCore::Clipboard::getData): Deleted.
179         (WebCore::Clipboard::setData): Deleted.
180         (WebCore::Clipboard::types): Deleted.
181         (WebCore::Clipboard::files): Deleted.
182         (WebCore::Clipboard::dropEffect): Deleted.
183         (WebCore::Clipboard::setDropEffect): Deleted.
184         (WebCore::Clipboard::effectAllowed): Deleted.
185         (WebCore::Clipboard::setEffectAllowed): Deleted.
186         (WebCore::Clipboard::setDragImage): Deleted.
187         (WebCore::Clipboard::createForDragAndDrop): Deleted.
188         (WebCore::Clipboard::canSetDragImage): Deleted.
189         (WebCore::Clipboard::updateDragImage): Deleted.
190         (WebCore::Clipboard::createDragImage): Deleted.
191         (WebCore::Clipboard::sourceOperation): Deleted.
192         (WebCore::Clipboard::destinationOperation): Deleted.
193         (WebCore::Clipboard::setSourceOperation): Deleted.
194         (WebCore::Clipboard::setDestinationOperation): Deleted.
195         * dom/DataTransfer.h: Copied from Source/WebCore/dom/Clipboard.h.
196         * dom/DataTransfer.idl: Copied from Source/WebCore/dom/Clipboard.idl.
197         * dom/DataTransferAccessPolicy.h: Copied from Source/WebCore/dom/ClipboardAccessPolicy.h.
198         * dom/DataTransferItemList.h:
199         * dom/DataTransferMac.mm: Copied from Source/WebCore/dom/ClipboardMac.mm.
200         (WebCore::DataTransfer::createDragImage):
201         (WebCore::Clipboard::createDragImage): Deleted.
202         * dom/Event.h:
203         (WebCore::Event::clipboardData):
204         (WebCore::Event::internalDataTransfer):
205         (WebCore::Event::clipboard): Deleted.
206         * dom/Event.idl:
207         * dom/MouseEvent.cpp:
208         (WebCore::MouseEvent::create):
209         (WebCore::MouseEvent::MouseEvent):
210         (WebCore::MouseEvent::initMouseEvent):
211         * dom/MouseEvent.h:
212         (WebCore::MouseEvent::dataTransfer):
213         * dom/MouseEvent.idl:
214         * dom/WheelEvent.cpp:
215         * editing/Editor.cpp:
216         (WebCore::Editor::canDHTMLCut):
217         (WebCore::Editor::canDHTMLCopy):
218         (WebCore::Editor::canDHTMLPaste):
219         (WebCore::Editor::tryDHTMLCopy):
220         (WebCore::Editor::tryDHTMLCut):
221         (WebCore::Editor::tryDHTMLPaste):
222         (WebCore::Editor::dispatchCPPEvent):
223         (WebCore::Editor::performCutOrCopy):
224         (WebCore::Editor::selectedTextForDataTransfer):
225         (WebCore::Editor::selectedTextForClipboard): Deleted.
226         * editing/Editor.h:
227         * editing/ios/EditorIOS.mm:
228         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
229         * editing/mac/EditorMac.mm:
230         (WebCore::Editor::takeFindStringFromSelection):
231         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
232         * loader/EmptyClients.h:
233         * page/DragClient.h:
234         * page/DragController.cpp:
235         (WebCore::DragController::dragExited):
236         (WebCore::DragController::performDrag):
237         (WebCore::DragController::tryDHTMLDrag):
238         (WebCore::DragController::startDrag):
239         (WebCore::DragController::doImageDrag):
240         (WebCore::DragController::doSystemDrag):
241         * page/DragController.h:
242         * page/DragState.h:
243         * page/EventHandler.cpp:
244         (WebCore::EventHandler::dispatchDragEvent):
245         (WebCore::hasFileOfType):
246         (WebCore::hasStringOfType):
247         (WebCore::hasDropZoneType):
248         (WebCore::findDropZone):
249         (WebCore::EventHandler::updateDragAndDrop):
250         (WebCore::EventHandler::cancelDragAndDrop):
251         (WebCore::EventHandler::performDragAndDrop):
252         (WebCore::EventHandler::freeDataTransfer):
253         (WebCore::EventHandler::dragSourceEndedAt):
254         (WebCore::EventHandler::dispatchDragSrcEvent):
255         (WebCore::EventHandler::handleDrag):
256         (WebCore::EventHandler::freeClipboard): Deleted.
257         * page/EventHandler.h:
258         * page/efl/EventHandlerEfl.cpp:
259         (WebCore::EventHandler::createDraggingDataTransfer):
260         (WebCore::EventHandler::createDraggingClipboard): Deleted.
261         * page/gtk/DragControllerGtk.cpp:
262         (WebCore::DragController::declareAndWriteDragImage):
263         * page/gtk/EventHandlerGtk.cpp:
264         (WebCore::EventHandler::createDraggingDataTransfer):
265         (WebCore::EventHandler::createDraggingClipboard): Deleted.
266         * page/mac/DragControllerMac.mm:
267         (WebCore::DragController::declareAndWriteDragImage):
268         * page/mac/EventHandlerMac.mm:
269         (WebCore::EventHandler::createDraggingDataTransfer):
270         (WebCore::EventHandler::createDraggingClipboard): Deleted.
271         * page/win/DragControllerWin.cpp:
272         (WebCore::DragController::declareAndWriteDragImage):
273         * page/win/EventHandlerWin.cpp:
274         (WebCore::EventHandler::createDraggingataTransfer):
275         (WebCore::EventHandler::createDraggingClipboard): Deleted.
276         * platform/Pasteboard.h:
277         * platform/gtk/PasteboardGtk.cpp:
278         (WebCore::Pasteboard::writeSelection):
279         * platform/mac/PasteboardMac.mm:
280         * platform/win/PasteboardWin.cpp:
281         (WebCore::Pasteboard::writeRangeToDataObject):
282         (WebCore::Pasteboard::writeSelection):
283
284 2014-04-08  Jer Noble  <jer.noble@apple.com>
285
286         Unreviewed iOS build fix. Pass 0 instead of nil to the options parameter of addObserver:forKeyPath:options:context.
287
288         * platform/graphics/ios/TextTrackRepresentationIOS.mm:
289         (-[WebCoreTextTrackRepresentationIOSHelper setParent:]):
290
291 2014-04-08  Antti Koivisto  <antti@apple.com>
292
293         Remove exposedRect from TileController
294         https://bugs.webkit.org/show_bug.cgi?id=131378
295
296         Reviewed by Simon Fraser.
297
298         Having two separate visible rectangles is confusing. We should compute one on higher level.
299
300         * page/FrameView.cpp:
301         (WebCore::FrameView::setExposedRect):
302         
303             Push exposed rect to tile controller by doing a layer flush (like the changed visible rect is normally passed).
304
305         * platform/graphics/TiledBacking.h:
306         * platform/graphics/ca/mac/TileController.h:
307         * platform/graphics/ca/mac/TileController.mm:
308         
309             Remove exposedRect and just use visibleRect.
310
311         (WebCore::TileController::TileController):
312         (WebCore::TileController::setTiledScrollingIndicatorPosition):
313         
314             Update the scrolling indicator position.
315
316         (WebCore::TileController::updateTileCoverageMap):
317         (WebCore::TileController::setExposedRect): Deleted.
318         * platform/graphics/ca/mac/TileGrid.h:
319         * platform/graphics/ca/mac/TileGrid.mm:
320         (WebCore::TileGrid::tilesWouldChangeForVisibleRect):
321         (WebCore::TileGrid::revalidateTiles):
322         (WebCore::TileGrid::scaledExposedRect): Deleted.
323         * rendering/RenderLayerBacking.cpp:
324         (WebCore::RenderLayerBacking::RenderLayerBacking):
325         
326             No need to push exposedRect anymore.
327
328         * rendering/RenderLayerCompositor.cpp:
329         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
330         
331             Integrate exposed rect to visible rect when flushing layers.
332
333 2014-04-08  Andreas Kling  <akling@apple.com>
334
335         [Mac] Always do a full GC when simulating memory pressure.
336         <https://webkit.org/b/129790>
337
338         To get more consistent accounting on automated memory testers,
339         add a synchronous GC as part of the simulated memory pressure event.
340
341         Reviewed by Geoffrey Garen.
342
343         * platform/mac/MemoryPressureHandlerMac.mm:
344         (WebCore::MemoryPressureHandler::install):
345
346 2014-04-08  Jer Noble  <jer.noble@apple.com>
347
348         Unreviewed iOS build fix. Pass 0 instead of nil to setRate: when pausing.
349
350         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
351         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
352
353 2014-04-08  Mark Lam  <mark.lam@apple.com>
354
355         Refactor to make JSMainThreadExecState's constructor and destructor private.
356         <https://webkit.org/b/131372>
357
358         Reviewed by Mark Hahnenberg.
359
360         This is in preparation for subsequent patches to ensure that we don't
361         exit the VM with an exception still pending.
362
363         No new tests required.  This is only a refactor of existing behavior.
364
365         * bindings/js/JSDOMGlobalObjectTask.cpp:
366         * bindings/js/JSMainThreadExecState.h:
367         (WebCore::JSMainThreadExecState::runTask):
368
369 2014-04-07  Jer Noble  <jer.noble@apple.com>
370
371         [WK2][iOS] Consecutive videos in full screen display only black
372         https://bugs.webkit.org/show_bug.cgi?id=131316
373
374         Reviewed by Eric Carlson.
375
376         Update the MediaPlayer's full screen attributes whenever the underlying engine changes,
377         not just when the engine is initially created. Also, clear the videoLayer out of the
378         fullscreen layer when destroying the videoLayer.
379
380         * html/HTMLMediaElement.cpp:
381         (WebCore::HTMLMediaElement::parseAttribute):
382         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
383         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
384
385 2014-04-08  Morten Stenshorne  <mstensho@opera.com>
386
387         [New Multicolumn] Child top margin sometimes ignored for column balancing
388         https://bugs.webkit.org/show_bug.cgi?id=122754
389
390         Reviewed by David Hyatt.
391
392         We need to set zero page logical height in LayoutState when column
393         height is unknown (when the columns haven't yet been
394         balanced). There's code that assumes that non-zero page height means
395         that page height is known. Lying about this makes the pagination code
396         believe that every top margin is adjacent to a column break, which
397         makes it eat and ignore all top margins.
398
399         This should be cleaned up, but it's easier to wait until the old
400         multicol code has been removed.
401
402         Tests: fast/multicol/break-in-scrollable.html
403                fast/multicol/newmulticol/leading-and-trailing-margin.html
404                fast/multicol/newmulticol/leading-margin.html
405
406         * rendering/LayoutState.cpp:
407         (WebCore::LayoutState::LayoutState):
408         * rendering/RenderBlockFlow.cpp:
409         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
410         * rendering/RenderFlowThread.h:
411         * rendering/RenderMultiColumnFlowThread.cpp:
412         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
413         * rendering/RenderMultiColumnFlowThread.h:
414
415 2014-04-07  Dean Jackson  <dino@apple.com>
416
417         Allow elements to register for changes in page scale
418         https://bugs.webkit.org/show_bug.cgi?id=131319
419
420         Reviewed by Eric Carlson.
421
422         Some parts of WebCore need to react to changes in the page
423         scale factor, such as resizing when the user zooms. A followup
424         patch will enable this for media controls - this simply lays
425         the groundwork.
426
427         At the moment we only allow HTMLMediaElements to register, but if
428         necessary this could be expanded in the future.
429
430         * dom/Document.cpp: New methods to keep a list of HTMLMediaElements that
431         are interested in updates.
432         (WebCore::Document::registerForPageScaleFactorChangedCallbacks):
433         (WebCore::Document::unregisterForPageScaleFactorChangedCallbacks):
434         (WebCore::Document::pageScaleFactorChanged):
435         * dom/Document.h:
436         * html/HTMLMediaElement.cpp:
437         (WebCore::HTMLMediaElement::HTMLMediaElement):
438         (WebCore::HTMLMediaElement::registerWithDocument): Add ourselves to the
439         the document's pageScale callback.
440         (WebCore::HTMLMediaElement::unregisterWithDocument): Remove ourselves from the
441         the document's pageScale callback.
442         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Add/remove ourselves to/from
443         the callback if necessary.
444         (WebCore::HTMLMediaElement::pageScaleFactorChanged): The callback function. Empty for now.
445         * html/HTMLMediaElement.h:
446         (WebCore::HTMLMediaElement::mediaControlsDependOnPageScaleFactor): Accessor.
447         * page/Page.cpp:
448         (WebCore::Page::setPageScaleFactor): Tell all documents that the user has zoomed.
449
450 2014-04-08  peavo@outlook.com  <peavo@outlook.com>
451
452         [WinCairo] Compile error in TextureMapper.h
453         https://bugs.webkit.org/show_bug.cgi?id=131360
454
455         Reviewed by Brent Fulgham.
456
457         The TextureMapper class has pure virtual methods, and cannot be instantiated.
458
459         * platform/graphics/texmap/TextureMapper.h:
460         (WebCore::TextureMapper::platformCreateAccelerated):
461
462 2014-04-08  Zalan Bujtas  <zalan@apple.com>
463
464         Subpixel rendering: Slow paint path for inlines should snap to device pixels.
465         https://bugs.webkit.org/show_bug.cgi?id=131259
466
467         Reviewed by Simon Fraser.
468
469         InlineTextBox::paint needs to round to the same device pixel position as SimpleLineLayout does.
470
471         Test: fast/inline/hidpi-slow-path-text-on-subpixel-position.html
472
473         * rendering/InlineTextBox.cpp:
474         (WebCore::InlineTextBox::paint):
475         * rendering/TextPainter.h: Cleanup. No reason to have them as references here.
476
477 2014-04-07  Brent Fulgham  <bfulgham@apple.com>
478
479         Keep 'webkitClosedCaptionsVisible' API in sync with captions display preferences
480         https://bugs.webkit.org/show_bug.cgi?id=131344
481
482         Reviewed by Eric Carlson.
483
484         * html/HTMLMediaElement.cpp:
485         (WebCore::HTMLMediaElement::configureTextTrackGroup) If we decide that captions should
486         be active (due to user preferences) make sure the 'webkitClosedCaptionsVisible' state
487         is turned on.
488
489 2014-04-08  Zalan Bujtas  <zalan@apple.com>
490
491         Subpixel rendering: Paint the filter effect result image on device pixel position.
492         https://bugs.webkit.org/show_bug.cgi?id=131255
493
494         Reviewed by Simon Fraser.
495
496         This patch moves filter effect images from integral to device pixel position. However,
497         result images are still integral based.
498
499         Test: css3/filters/hidpi-filter-is-on-subpixel-position.html
500
501         * rendering/FilterEffectRenderer.cpp:
502         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
503
504 2014-04-08  Zalan Bujtas  <zalan@apple.com>
505
506         Subpixel rendering: Make border images device pixel aware.
507         https://bugs.webkit.org/show_bug.cgi?id=131209
508
509         Reviewed by Simon Fraser.
510
511         Snap border-image size and position to device pixels. It works both on generated and bitmap images.
512
513         Test: fast/borders/hidpi-border-image-gradient-on-subpixels.html
514
515         * rendering/RenderBoxModelObject.cpp:
516         (WebCore::RenderBoxModelObject::paintNinePieceImage):
517
518 2014-04-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
519
520         [SOUP] Control cookie management according ResourceRequest.allowCookies()
521         https://bugs.webkit.org/show_bug.cgi?id=131026
522
523         Reviewed by Sergio Villar Senin.
524
525         Added per soup-message disabling of cookie jar manager when related ResourceRequest does not allow cookies (e.g. some cross-origin requests).
526
527         Patch is covered by unskipped test http/tests/xmlhttprequest/cross-origin-cookie-storage.html.
528
529         * platform/network/soup/ResourceRequestSoup.cpp:
530         (WebCore::ResourceRequest::updateSoupMessageMembers): Added disabling of cookie jar manager if cookies are not allowed.
531
532 2014-04-08  Sergio Villar Senin  <svillar@igalia.com>
533
534         [CSS Grid Layout] Handle min/max height in the grid element
535         https://bugs.webkit.org/show_bug.cgi?id=131302
536
537         Reviewed by Darin Adler.
538
539         Removed a FIXME in the code as we're already handling min/max
540         height in the code. Added a couple of test cases to improve the
541         test coverage.
542
543         Merged from Blink r161876 by <jchaffraix@chromium.org>
544
545         Tests: fast/css-grid-layout/flex-content-sized-columns-resize.html
546                fast/css-grid-layout/grid-element-min-max-height.html
547
548         * rendering/RenderGrid.cpp:
549         (WebCore::RenderGrid::layoutGridItems):
550
551 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
552
553         [CSSRegions] Remove unused RenderBox::clearRenderBoxRegionInfo
554         https://bugs.webkit.org/show_bug.cgi?id=131352
555
556         Reviewed by Andrei Bucur.
557
558         No new tests, code clean-up.
559
560         * rendering/RenderBox.cpp:
561         (WebCore::RenderBox::clearRenderBoxRegionInfo): Deleted.
562         * rendering/RenderBox.h:
563
564 2014-04-08  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
565
566         Buildfix after r166917
567         https://bugs.webkit.org/show_bug.cgi?id=131351
568
569         Reviewed by Andrei Bucur.
570
571         * accessibility/AccessibilityNodeObject.cpp:
572         (WebCore::accessibleNameForNode):
573
574 2014-04-08  Darin Adler  <darin@apple.com>
575
576         Fix assertions triggered by CSS calc changes in r166860
577         https://bugs.webkit.org/show_bug.cgi?id=131346
578
579         Reviewed by Andrei Bucur.
580
581         * css/CSSComputedStyleDeclaration.cpp:
582         (WebCore::getBorderRadiusCornerValues): Use isPercentNotCalculated() instead of
583         type() == Percent; no behavior change.
584         (WebCore::getBorderRadiusCornerValue): Ditto.
585         (WebCore::lineHeightFromStyle): Use isPercentNotCalculated() before code
586         that calls percent(), which won't work for a calculated length.
587
588         * css/DeprecatedStyleBuilder.cpp:
589         (WebCore::ApplyPropertyBorderRadius::applyValue): Use isNegative and isZero rather
590         than calling value() unconditionally. Should make calculated values work better.
591
592         * html/HTMLPlugInImageElement.cpp:
593         (WebCore::is100Percent): Use isPercentNotCalculated() before code
594         that calls percent(), which won't work for a calculated length.
595
596         * platform/Length.cpp:
597         (WebCore::CalculationValueMap::deref): Use adoptRef here instead of calling deref
598         immediately, so the deref will happen after calling remove. This makes the code
599         work properly even if it's reentered inside the calculation value's destructor.
600
601         * platform/Length.h:
602         (WebCore::Length::percent): Change assert to isPercentNotCalculated, since the
603         value function this calls only works for non-calculated values anyway.
604         (WebCore::Length::isPercentNotCalculated): Added.
605         (WebCore::Length::isPercent): Changed to call isPercentNotCalculated.
606         (WebCore::Length::isSpecified): Changed to call isPercent.
607
608         * platform/graphics/transforms/TranslateTransformOperation.h:
609         (WebCore::TranslateTransformOperation::apply): Use isPercentNotCalculated()
610         instead of type() == Percent; no behavior change.
611
612         * rendering/AutoTableLayout.cpp:
613         (WebCore::AutoTableLayout::recalcColumn): Use isPercentNotCalculated()
614         before code that calls value() or percent(), which won't work for a calculated length.
615         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): Ditto.
616         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): Ditto.
617         (WebCore::AutoTableLayout::layout): Ditto.
618         * rendering/FixedTableLayout.cpp:
619         (WebCore::FixedTableLayout::layout): Ditto.
620         * rendering/RenderBoxModelObject.cpp:
621         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Ditto.
622         * rendering/RenderTableSection.cpp:
623         (WebCore::updateLogicalHeightForCell): Ditto.
624         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows): Ditto.
625         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows): Ditto.
626
627         * rendering/style/RenderStyle.cpp:
628         (WebCore::requireTransformOrigin): Use modern for loop. Also marked function static,
629         since it's private to this file.
630         (WebCore::RenderStyle::applyTransform): Use isPercentNotCalculated() instead of
631         type() == Percent; no behavior change. Also use a modern for loop and auto& to avoid
632         a really long type name.
633
634         * rendering/svg/RenderSVGRoot.cpp:
635         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Use isPercentNotCalculated()
636         before code that calls percent(), which won't work for a calculated length.
637
638         * platform/Length.h:
639         (WebCore::Length::percent):
640         (WebCore::Length::isPercentNotCalculated):
641         (WebCore::Length::isPercent):
642         (WebCore::Length::isSpecified):
643         * platform/graphics/transforms/TranslateTransformOperation.h:
644         (WebCore::TranslateTransformOperation::apply):
645         * rendering/AutoTableLayout.cpp:
646         (WebCore::AutoTableLayout::recalcColumn):
647         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
648         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
649         (WebCore::AutoTableLayout::layout):
650         * rendering/FixedTableLayout.cpp:
651         (WebCore::FixedTableLayout::layout):
652         * rendering/RenderBoxModelObject.cpp:
653         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
654         * rendering/RenderTableSection.cpp:
655         (WebCore::updateLogicalHeightForCell):
656         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
657         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
658         * rendering/style/RenderStyle.cpp:
659         (WebCore::requireTransformOrigin):
660         (WebCore::RenderStyle::applyTransform):
661         * rendering/svg/RenderSVGRoot.cpp:
662         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
663
664 2014-04-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
665
666         [GTK] Remove media controls dead code
667         https://bugs.webkit.org/show_bug.cgi?id=131300
668
669         Reviewed by Eric Carlson.
670
671         MediaControlsGtk.cpp is no longer used so we can remove it from
672         the repo.
673
674         No new tests needed.
675
676         * PlatformGTK.cmake: Remove html/shadow/MediaControlsGtk.cpp from
677         compilation.
678         * html/shadow/MediaControlsGtk.cpp: Removed.
679
680 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
681
682         [CSSRegions] Fixed positioned elements in named flows have fragmented content
683         https://bugs.webkit.org/show_bug.cgi?id=130595
684
685         Reviewed by Darin Adler.
686
687         Fixed positioned elements that have the named flow as parent are positioned
688         and sized relative to the viewport. Because of that, when the named flow
689         has an associated region chain, the fixed positioned elements should not
690         be fragmented.
691
692         By making a fixed positioned element with a named flow parent unsplittable
693         for fragmentation, we prevent this wrong behavior.
694
695         Test: fast/regions/fixed-pos-content-fragmented.html
696
697         * rendering/RenderBox.cpp:
698         (WebCore::RenderBox::isUnsplittableForPagination):
699
700 2014-04-07  Chris Fleizach  <cfleizach@apple.com>
701
702         Regression: AX: image labels no longer exposed to AX API in SVG test case
703         https://bugs.webkit.org/show_bug.cgi?id=131208
704
705         Reviewed by Daniel Bates.
706
707         accessibleNameForNode should work on any Element, not just HTML elements.
708
709         Test: accessibility/svg-labelledby.html
710
711         * accessibility/AccessibilityNodeObject.cpp:
712         (WebCore::accessibleNameForNode):
713
714 2014-04-08  Andres Gomez  <agomez@igalia.com>
715
716         [GTK] [EFL] Build fails with GCC < 4.8.x
717         https://bugs.webkit.org/show_bug.cgi?id=130585
718
719         Reviewed by Martin Robinson.
720
721         The behavior in lower versions of GCC seem to be related to
722         http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2132.
723
724         Provided explicit casts for the failing ambiguous overloads.
725
726         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
727         (WebCore::AudioFileReader::createBus):
728         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
729         (webKitMediaSrcChangeState):
730         (webKitMediaVideoSrcNeedDataCb):
731         (webKitMediaAudioSrcNeedDataCb):
732         (webKitMediaVideoSrcEnoughDataCb):
733         (webKitMediaAudioSrcEnoughDataCb):
734         (webKitMediaVideoSrcSeekDataCb):
735         (webKitMediaAudioSrcSeekDataCb):
736         * platform/gtk/GtkDragAndDropHelper.cpp:
737         (WebCore::GtkDragAndDropHelper::handleDragLeave):
738         * platform/gtk/SharedTimerGtk.cpp:
739         (WebCore::setSharedTimerFireInterval):
740
741 2014-04-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
742
743         Change NavigatorContentUtils client ownership from port side to NavigatorContentUtils
744         https://bugs.webkit.org/show_bug.cgi?id=131299
745
746         Reviewed by Darin Adler.
747
748         EFL and GTK ports have managed own client of NavigatorContentUtils though it is only passed to
749         NavigatorContentUtils. The NavigatorContentUtils has used the client to call port functions. So,
750         there is no reason port implementation needs to manage the ownership. To manage the client is
751         unnecessary work in current implementation.
752
753         No new tests, no behavior changes.
754
755         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
756         (WebCore::NavigatorContentUtils::create):
757         (WebCore::provideNavigatorContentUtilsTo):
758         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
759         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
760
761 2014-04-07  Zoltan Horvath  <zoltan@webkit.org>
762
763         [CSS Shapes] Simplify the parsing of width arguments for Inset shapes
764         https://bugs.webkit.org/show_bug.cgi?id=131305
765
766         Reviewed by Andreas Kling.
767
768         This code introduces some helper functions for setting the size arguments of inset shapes. This change
769         also modifies the code to be the same as in Blink, so it helps us to keep the shapes code similar.
770
771         No new tests, no behavior change.
772
773         * css/CSSBasicShapes.h:
774         (WebCore::CSSBasicShapeInset::updateShapeSize4Values):
775         (WebCore::CSSBasicShapeInset::updateShapeSize1Value):
776         (WebCore::CSSBasicShapeInset::updateShapeSize2Values):
777         (WebCore::CSSBasicShapeInset::updateShapeSize3Values):
778         * css/CSSParser.cpp:
779         (WebCore::CSSParser::parseBasicShapeInset):
780
781 2014-04-07  Martin Robinson  <mrobinson@igalia.com>
782
783         fast/css3-text/css3-text-decoration/text-decoration-thickness.html fails on GTK
784         https://bugs.webkit.org/show_bug.cgi?id=129957
785
786         Reviewed by Dean Jackson.
787
788         Causes existing tests to pass.
789
790         * platform/graphics/cairo/GraphicsContextCG.cpp: Use the now-shared computeLineBoundsAndAntialiasingModeForText.
791         * platform/graphics/cairo/GraphicsContextCairo.cpp: Align the Cairo version of text underline drawing with the CG version.
792         * platform/graphics/GraphicsContext.h: Add computeLineBoundsAndAntialiasingModeForText.
793         * platform/graphics/GraphicsContext.cpp: Ditto.
794
795 2014-04-07  Beth Dakin  <bdakin@apple.com>
796
797         REGRESSION (r163194-r163227): Garbage tiles in overflow of RTL page with 
798         background image
799         https://bugs.webkit.org/show_bug.cgi?id=131323
800         -and corresponding-
801         <rdar://problem/16402013>
802
803         Reviewed by Tim Horton.
804
805         Returning the TiledBacking::bounds() for the 
806         FrameView::extendedBackgroundRectForPainting() in convenient for ltr pages, but it 
807         is simply incorrect in rtl. There is no easy way to map the rect into the right 
808         coordinate space, so this patch re-works the code to use computations in 
809         RenderView to get the right rect.
810
811         Call RenderView::unextendedBackgroundRect() and expand and move it based on the 
812         TiledBacking’s margins.
813         * page/FrameView.cpp:
814         (WebCore::FrameView::extendedBackgroundRectForPainting):
815
816         The logic that used to be in backgroundRect() has been moved to 
817         unextendedBackgroundRect(). 
818         * rendering/RenderView.cpp:
819         (WebCore::RenderView::unextendedBackgroundRect):
820         (WebCore::RenderView::backgroundRect):
821         * rendering/RenderView.h:
822
823 2014-04-07  Zoltan Horvath  <zoltan@webkit.org>
824
825         [CSS Shapes] inset complex calc() args vanish in serialized computed style
826         https://bugs.webkit.org/show_bug.cgi?id=129838
827
828         Reviewed by Bem Jones-Bey.
829
830         We didn't pass the style parameter when setting the width members of CSSBasicShapeInset,
831         which lead to a 'should never reach asserttion' in CSSPrimitiveValue::init. This patch
832         adds the missing parameters to the call sites.
833
834         Extended existing parsing test script.
835
836         * css/BasicShapeFunctions.cpp:
837         (WebCore::valueForBasicShape):
838
839 2014-04-07  Eric Carlson  <eric.carlson@apple.com>
840
841         [iOS] MediaDocument should allow autoplay
842         https://bugs.webkit.org/show_bug.cgi?id=131301
843
844         Reviewed by Jer Noble.
845
846         * html/HTMLMediaElement.cpp:
847         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't add the RequireUserGestureForRateChange
848             behavior restriction when in a MediaDocument.
849
850 2014-04-07  Hyowon Kim  <hw1008.kim@samsung.com>
851
852         Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
853         https://bugs.webkit.org/show_bug.cgi?id=131276
854
855         Reviewed by Darin Adler.
856
857         Replace uses of OwnPtr and PassOwnPtr in code under WebCore/platform/graphics/
858         opengl, texmap, transforms and efl with std::unique_ptr.
859
860         * html/canvas/WebGLRenderingContext.cpp:
861         (WebCore::WebGLRenderingContext::initializeNewContext):
862         * platform/graphics/GraphicsContext3D.h:
863         * platform/graphics/GraphicsContext3DPrivate.cpp:
864         (WebCore::GraphicsContext3DPrivate::create): Deleted.
865         * platform/graphics/GraphicsContext3DPrivate.h:
866         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
867         (WebCore::GraphicsContext3D::GraphicsContext3D):
868         (WebCore::GraphicsContext3D::setContextLostCallback):
869         (WebCore::GraphicsContext3D::setErrorMessageCallback):
870         * platform/graphics/efl/EvasGLContext.h:
871         * platform/graphics/efl/EvasGLSurface.h:
872         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
873         (WebCore::GraphicsContext3D::setContextLostCallback):
874         (WebCore::GraphicsContext3D::setErrorMessageCallback):
875         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
876         (WebCore::GraphicsContext3DPrivate::create):
877         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
878         * platform/graphics/efl/GraphicsContext3DPrivate.h:
879         * platform/graphics/mac/GraphicsContext3DMac.mm:
880         (WebCore::GraphicsContext3D::GraphicsContext3D):
881         (WebCore::GraphicsContext3D::setContextLostCallback):
882         (WebCore::GraphicsContext3D::setErrorMessageCallback):
883         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
884         (WebCore::Extensions3DOpenGLES::setEXTContextLostCallback):
885         * platform/graphics/opengl/Extensions3DOpenGLES.h:
886         * platform/graphics/opengl/GLPlatformContext.cpp:
887         (WebCore::createOffScreenContext):
888         (WebCore::GLPlatformContext::createContext):
889         * platform/graphics/opengl/GLPlatformContext.h:
890         * platform/graphics/opengl/GLPlatformSurface.cpp:
891         (WebCore::GLPlatformSurface::createOffScreenSurface):
892         * platform/graphics/opengl/GLPlatformSurface.h:
893         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
894         * platform/graphics/surfaces/egl/EGLSurface.cpp:
895         (WebCore::EGLOffScreenSurface::createOffScreenSurface):
896         * platform/graphics/surfaces/egl/EGLSurface.h:
897         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
898         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
899         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
900         * platform/graphics/texmap/TextureMapper.cpp:
901         (WebCore::TextureMapper::create):
902         (WebCore::TextureMapper::TextureMapper):
903         * platform/graphics/texmap/TextureMapper.h:
904         (WebCore::TextureMapper::platformCreateAccelerated):
905         * platform/graphics/texmap/TextureMapperGL.cpp:
906         (WebCore::TextureMapper::platformCreateAccelerated):
907         * platform/graphics/texmap/TextureMapperGL.h:
908         (WebCore::TextureMapperGL::create): Deleted.
909         * platform/graphics/texmap/TextureMapperImageBuffer.h:
910         (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
911         (WebCore::TextureMapperImageBuffer::create): Deleted.
912         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
913         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
914         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
915         * platform/graphics/transforms/TransformState.cpp:
916         (WebCore::TransformState::operator=):
917         (WebCore::TransformState::applyTransform):
918         * platform/graphics/transforms/TransformState.h:
919         * platform/graphics/win/GraphicsContext3DWin.cpp:
920         (WebCore::GraphicsContext3D::GraphicsContext3D):
921         (WebCore::GraphicsContext3D::setContextLostCallback):
922         (WebCore::GraphicsContext3D::setErrorMessageCallback):
923
924 2014-04-07  Tim Horton  <timothy_horton@apple.com>
925
926         [iOS WebKit2] Make back-buffers purgeable when possible
927         https://bugs.webkit.org/show_bug.cgi?id=131213
928         <rdar://problem/15373906>
929
930         Reviewed by Simon Fraser.
931
932         * WebCore.exp.in:
933         * platform/graphics/cg/IOSurfacePool.cpp:
934         (WebCore::IOSurfacePool::takeSurface):
935         (WebCore::IOSurfacePool::markOlderSurfacesPurgeable):
936         (WebCore::IOSurfacePool::showPoolStatistics):
937         * platform/graphics/cocoa/IOSurface.h:
938         * platform/graphics/cocoa/IOSurface.mm:
939         (IOSurface::isVolatile):
940         (IOSurface::setIsVolatile):
941         Rename purgeability functions to match the system
942         and reduce confusion between purgeable memory
943         and volatile vs. non-volatile memory.
944
945 2014-04-07  Benjamin Poulain  <benjamin@webkit.org>
946
947         Split CSS Selectors pseudo class and pseudo elements
948         https://bugs.webkit.org/show_bug.cgi?id=131295
949
950         Reviewed by Andreas Kling.
951
952         Split pseudo class and pseudo element to make it clearer what pseudo types
953         are possible for a given match type.
954
955         Pseudo Element types are separated and Pseudo Class are left in place. The Pseudo Class
956         will have to be renamed too but that will be done separately to make this change smaller.
957
958         * css/CSSGrammar.y.in:
959         * css/CSSParser.cpp:
960         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
961         (WebCore::CSSParser::rewriteSpecifiers):
962         Use a method isPseudoElementCueFunction() to abstract the #ifdef out of the parser.
963
964         * css/CSSParserValues.cpp:
965         (WebCore::CSSParserSelector::parsePseudoElementSelector):
966
967         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
968         Rename to specify this is for the pseudo element cue function, not the pseudo element cue.
969
970         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
971         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
972         * css/CSSParserValues.h:
973         (WebCore::CSSParserSelector::isPseudoElementCueFunction):
974         * css/CSSSelector.cpp:
975         (WebCore::CSSSelector::specificityForOneSelector):
976         (WebCore::CSSSelector::pseudoId):
977         (WebCore::CSSSelector::parsePseudoElementType):
978         (WebCore::CSSSelector::operator==):
979         * css/CSSSelector.h:
980         (WebCore::CSSSelector::pseudoType):
981         (WebCore::CSSSelector::setPseudoElementType):
982         (WebCore::CSSSelector::pseudoElementType):
983         (WebCore::CSSSelector::isUnknownPseudoElement):
984         (WebCore::CSSSelector::isCustomPseudoElement):
985         (WebCore::pseudoClassIsRelativeToSiblings):
986         (WebCore::CSSSelector::isSiblingSelector):
987         * css/RuleFeature.cpp:
988         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
989         * css/RuleSet.cpp:
990         (WebCore::determinePropertyWhitelistType):
991         (WebCore::RuleSet::findBestRuleSetAndAdd):
992         * css/SelectorChecker.cpp:
993         (WebCore::SelectorChecker::matchRecursively):
994         (WebCore::SelectorChecker::checkOne):
995         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
996         (WebCore::SelectorChecker::determineLinkMatchType):
997         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
998         * css/SelectorPseudoElementTypeMap.in:
999         * css/SelectorPseudoTypeMap.h:
1000         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
1001         * css/makeSelectorPseudoElementsMap.py:
1002         (enumerablePseudoType):
1003         * page/DOMWindow.cpp:
1004         (WebCore::DOMWindow::getMatchedCSSRules):
1005
1006         * rendering/style/RenderStyleConstants.h:
1007         All the fullscreen pseudo types are pseudo class selectors. They should not have a pseudo ID.
1008
1009 2014-04-07  Brian J. Burg  <burg@cs.washington.edu>
1010
1011         Web Replay: detect possible replay divergence from unexpected DOM event dispatches
1012         https://bugs.webkit.org/show_bug.cgi?id=131193
1013
1014         Reviewed by Andreas Kling.
1015
1016         Add assertions to catch potential nondeterministic behavior.
1017
1018         The assertion added by this patch catches dispatched DOM events
1019         that are triggered by nondeterministic event loop cycles. If we
1020         did not capture an event loop input in the current event loop
1021         cycle nor are we manually simulating an event loop input during
1022         playback, then DOM events fired during the unordered cycle could
1023         run JavaScript and diverge the execution.
1024
1025         During playback, we can assert that EventLoopInputDispatcher is dispatching
1026         when a DOM event is be dispatched to a document that is being replayed.
1027
1028         During capturing, event loop inputs are captured rather than
1029         dispatched, so we add some accounting to track what caused a DOM
1030         event. To approximate the extent of computation triggered by an
1031         event loop input, we add RAII helpers to call sites where event
1032         loop inputs are captured.
1033
1034         The assertions are disabled by default until the most common
1035         sources of nondeterminism are handled and playback errors are
1036         gracefully surfaced to the user. <https://webkit.org/b/131279>
1037
1038         No new tests. This patch adds extra assertions for debugging purposes.
1039
1040         * WebCore.xcodeproj/project.pbxproj:
1041         * inspector/InspectorInstrumentation.cpp: Notify ReplayAgent of dispatched DOM event.
1042         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1043         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
1044         * inspector/InspectorReplayAgent.cpp: Forward dispatched DOM events to ReplayController.
1045         (WebCore::InspectorReplayAgent::willDispatchEvent): Added.
1046         * inspector/InspectorReplayAgent.h:
1047         * replay/CapturingInputCursor.cpp:
1048         (WebCore::CapturingInputCursor::CapturingInputCursor):
1049         (WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Added.
1050         * replay/CapturingInputCursor.h:
1051         * replay/EventLoopInput.cpp: Added.
1052         (WebCore::EventLoopInputExtent::EventLoopInputExtent): Added.
1053         (WebCore::EventLoopInputExtent::~EventLoopInputExtent): Added.
1054         * replay/EventLoopInput.h:
1055         * replay/EventLoopInputDispatcher.h:
1056         (WebCore::EventLoopInputDispatcher::isDispatching): Add a getter.
1057         * replay/ReplayController.cpp:
1058         (WebCore::logDispatchedDOMEvent): Added. This is useful for understanding script-visible events.
1059         (WebCore::ReplayController::willDispatchEvent): Added.
1060         * replay/ReplayController.h:
1061         * replay/UserInputBridge.cpp: Add extent helpers to call sites that capture inputs.
1062         (WebCore::UserInputBridge::handleMousePressEvent):
1063         (WebCore::UserInputBridge::handleMouseReleaseEvent):
1064         (WebCore::UserInputBridge::handleMouseMoveEvent):
1065         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
1066         (WebCore::UserInputBridge::handleKeyEvent):
1067         (WebCore::UserInputBridge::handleWheelEvent):
1068         (WebCore::UserInputBridge::scrollRecursively):
1069         (WebCore::UserInputBridge::logicalScrollRecursively):
1070
1071 2014-04-07  Timothy Hatcher  <timothy@apple.com>
1072
1073         Remove copy of combine-javascript-resources.pl that isn't used anymore
1074         https://bugs.webkit.org/show_bug.cgi?id=131307
1075
1076         Reviewed by Joseph Pecoraro.
1077
1078         * WebCore.xcodeproj/project.pbxproj:
1079         * inspector/combine-javascript-resources.pl: Removed.
1080
1081 2014-04-07  Zoltan Horvath  <zoltan@webkit.org>
1082
1083         [CSS Shapes] Clean up invalid FIXME
1084         https://bugs.webkit.org/show_bug.cgi?id=131304
1085
1086         Reviewed by Andreas Kling.
1087
1088         No new tests, no behavior change.
1089
1090         * page/animation/CSSPropertyAnimation.cpp:
1091         (WebCore::blendFunc):
1092
1093 2014-04-07  Ryuan Choi  <ryuan.choi@samsung.com>
1094
1095         [EFL] Turn on ENABLE_MEDIA_CONTROLS_SCRIPT
1096         https://bugs.webkit.org/show_bug.cgi?id=131257
1097
1098         Reviewed by Gyuyoung Kim.
1099
1100         no new tests. just rebased exisiting tests.
1101
1102         * PlatformEfl.cmake: Added the media controls script associated files.
1103         * css/mediaControlsEfl.css: Removed.
1104         * css/mediaControlsEflFullscreen.css: Removed.
1105         * platform/efl/DefaultTheme/CMakeLists.txt:
1106         * platform/efl/DefaultTheme/default.edc:
1107         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png: Removed.
1108         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png: Removed.
1109         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc: Removed.
1110         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc: Removed.
1111         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mutebutton.png: Removed.
1112         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/unmutebutton.png: Removed.
1113         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/pausebutton.png: Removed.
1114         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playbutton.png: Removed.
1115         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc: Removed.
1116         * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc: Removed.
1117         * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png: Removed.
1118         * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc: Removed.
1119         * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png: Removed.
1120         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption.png: Removed.
1121         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png: Removed.
1122         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc: Removed.
1123         * platform/efl/RenderThemeEfl.cpp:
1124         (WebCore::toEdjeGroup):
1125         (WebCore::RenderThemeEfl::RenderThemeEfl):
1126         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
1127         (WebCore::RenderThemeEfl::mediaControlsStyleSheet): Modified to load bundle style sheet.
1128         (WebCore::RenderThemeEfl::mediaControlsScript): Added to load bundle scripts.
1129         (WebCore::RenderThemeEfl::emitMediaButtonSignal): Deleted.
1130         (WebCore::RenderThemeEfl::extraMediaControlsStyleSheet): Deleted.
1131         (WebCore::RenderThemeEfl::extraFullScreenStyleSheet): Deleted.
1132         (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime): Deleted.
1133         (WebCore::RenderThemeEfl::hasOwnDisabledStateHandlingFor): Deleted.
1134         (WebCore::RenderThemeEfl::paintMediaFullscreenButton): Deleted.
1135         (WebCore::RenderThemeEfl::paintMediaMuteButton): Deleted.
1136         (WebCore::RenderThemeEfl::paintMediaPlayButton): Deleted.
1137         (WebCore::RenderThemeEfl::paintMediaSeekBackButton): Deleted.
1138         (WebCore::RenderThemeEfl::paintMediaSeekForwardButton): Deleted.
1139         (WebCore::RenderThemeEfl::paintMediaSliderTrack): Deleted.
1140         (WebCore::RenderThemeEfl::paintMediaSliderThumb): Deleted.
1141         (WebCore::RenderThemeEfl::paintMediaVolumeSliderContainer): Deleted.
1142         (WebCore::RenderThemeEfl::paintMediaVolumeSliderTrack): Deleted.
1143         (WebCore::RenderThemeEfl::paintMediaVolumeSliderThumb): Deleted.
1144         (WebCore::RenderThemeEfl::paintMediaCurrentTime): Deleted.
1145         (WebCore::RenderThemeEfl::supportsClosedCaptioning): Deleted.
1146         (WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton): Deleted.
1147         * platform/efl/RenderThemeEfl.h:
1148
1149 2014-04-07  Benjamin Poulain  <benjamin@webkit.org>
1150
1151         CSS JIT: change the node flags directly instead of using function calls when possible
1152         https://bugs.webkit.org/show_bug.cgi?id=131292
1153
1154         Reviewed by Andreas Kling.
1155
1156         For historical reasons, changing the node flags was always done with function calls.
1157         This patch changes those calls to modify the nodes directly.
1158
1159         * cssjit/SelectorCompiler.cpp:
1160         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1161         (WebCore::SelectorCompiler::setNodeFlag):
1162         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
1163         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1164         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1165         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1166         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByLastChildRules): Deleted.
1167         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByFirstChildAndLastChildRules): Deleted.
1168         * dom/Element.cpp:
1169         (WebCore::Element::setChildrenAffectedByFirstChildRules): Deleted.
1170         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
1171         * dom/Element.h:
1172         * dom/Node.h:
1173         (WebCore::Node::flagChildrenAffectedByFirstChildRulesFlag):
1174         (WebCore::Node::flagChildrenAffectedByLastChildRulesFlag):
1175         (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag):
1176
1177 2014-04-07  Krzysztof Czech  <k.czech@samsung.com>
1178
1179         Remove unused header from PlatformSpeechSynthesizer.h
1180         https://bugs.webkit.org/show_bug.cgi?id=131103
1181
1182         Reviewed by Anders Carlsson.
1183
1184         Since WebSpeech has switched to use std::unique_ptr, we do not need to include PassOwnPtr.
1185
1186         No new tests. No behaviour change, just quick fix.
1187
1188         * platform/PlatformSpeechSynthesizer.h:
1189
1190 2014-04-06  Mihnea Ovidenie  <mihnea@adobe.com>
1191
1192         [CSSRegions] Use RenderRegion::isValid() before using a region
1193         https://bugs.webkit.org/show_bug.cgi?id=131232
1194
1195         Reviewed by Andreas Kling.
1196
1197         RenderRegion method isValid() should be used to test whether a region
1198         is good to use instead of a mix between isValid() and flowThread().
1199         When the region is designed to fragment content from a parent flow thread,
1200         the m_flowThread is not nullified anymore, thus ensuring the same treatment for all invalid
1201         regions.
1202         Covered by existing regions tests.
1203
1204         * inspector/InspectorOverlay.cpp:
1205         (WebCore::buildObjectForElementInfo):
1206         * rendering/RenderBox.cpp:
1207         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1208         * rendering/RenderBoxModelObject.cpp:
1209         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1210         * rendering/RenderLayer.cpp:
1211         (WebCore::RenderLayer::updateLayerPositions):
1212         (WebCore::RenderLayer::paintLayer):
1213         (WebCore::RenderLayer::hitTestLayer):
1214         (WebCore::RenderLayer::calculateClipRects):
1215         * rendering/RenderNamedFlowFragment.cpp:
1216         (WebCore::RenderNamedFlowFragment::pageLogicalHeight):
1217         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
1218         * rendering/RenderNamedFlowThread.cpp:
1219         (WebCore::RenderNamedFlowThread::getRanges):
1220         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
1221         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
1222         * rendering/RenderRegion.cpp:
1223         (WebCore::RenderRegion::RenderRegion):
1224         (WebCore::RenderRegion::positionForPoint):
1225         (WebCore::RenderRegion::pageLogicalWidth):
1226         (WebCore::RenderRegion::pageLogicalHeight):
1227         (WebCore::RenderRegion::styleDidChange):
1228         (WebCore::RenderRegion::installFlowThread):
1229         (WebCore::RenderRegion::attachRegion):
1230         (WebCore::RenderRegion::detachRegion):
1231         (WebCore::RenderRegion::ensureOverflowForBox):
1232         (WebCore::RenderRegion::renderBoxRegionInfo):
1233
1234 2014-04-06  Benjamin Poulain  <benjamin@webkit.org>
1235
1236         Fix the debug bots after r166863
1237
1238         * css/PageRuleCollector.cpp:
1239         (WebCore::checkPageSelectorComponents): I forgot to update one call site for PagePseudoClass.
1240
1241 2014-04-06  Darin Adler  <darin@apple.com>
1242
1243         Make some bindings improvements, with smaller code size for error message generation
1244         https://bugs.webkit.org/show_bug.cgi?id=131285
1245
1246         Reviewed by Andreas Kling.
1247
1248         * WebCore.exp.in: Updated to remove old and add new functions, for use by the Internals
1249         JavaScript bindings.
1250
1251         * bindings/js/JSDOMBinding.cpp:
1252         (WebCore::makeDOMBindingsTypeErrorStringInternal): Deleted.
1253         (WebCore::throwTypeError): Added. Helper to avoid repeating throwVMError/createTypeError.
1254         (WebCore::appendArgumentMustBe): Added. Helper for building up argument error strings.
1255         (WebCore::reportDeprecatedGetterError): Added. For bindings to use.
1256         (WebCore::throwArgumentMustBeEnumError): Ditto.
1257         (WebCore::throwArgumentMustBeFunctionError): Ditto.
1258         (WebCore::throwArgumentTypeError): Ditto.
1259         (WebCore::throwArrayElementTypeError): Ditto.
1260         (WebCore::throwAttributeTypeError): Ditto.
1261         (WebCore::throwConstructorDocumentUnavailableError): Ditto.
1262         (WebCore::throwGetterTypeError): Ditto.
1263         (WebCore::throwSequenceTypeError): Ditto.
1264         (WebCore::throwSetterTypeError): Ditto.
1265         (WebCore::throwThisTypeError): Ditto.
1266
1267         * bindings/js/JSDOMBinding.h: Added declarations for new functions. Removed forward
1268         declarations for things not used in this file. Use nullptr instead of 0. Format
1269         templates consistently. Use a better for loop in the jsArray function. Removed
1270         unused HasMemoryCostMemberFunction, makeDOMBindingsTypeErrorString, and
1271         makeDOMBindingsTypeErrorStringInternal.
1272
1273         * bindings/js/JSNavigatorCustom.cpp: Fixed a hand-written binding that was using
1274         makeDOMBindingsTypeErrorString to make a string.
1275
1276         * bindings/js/ScriptController.h: Updated forward declarations.
1277
1278         * bindings/scripts/CodeGeneratorJS.pm:
1279         (GenerateImplementation): Cut down on use of UNUSED_PARAM. Use the new functions
1280         for errors, keeping the code in the generated file to a minimum.
1281         (GenerateParametersCheck): Ditto.
1282         (GenerateConstructorDefinition): Ditto.
1283
1284         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1285         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1286         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1287         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1288         * bindings/scripts/test/JS/JSTestException.cpp:
1289         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1290         * bindings/scripts/test/JS/JSTestInterface.cpp:
1291         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1292         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1293         * bindings/scripts/test/JS/JSTestNode.cpp:
1294         * bindings/scripts/test/JS/JSTestObj.cpp:
1295         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1296         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1297         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1298         * bindings/scripts/test/JS/JSattribute.cpp:
1299         * bindings/scripts/test/JS/JSreadonly.cpp:
1300         Updated expected results for changes above.
1301
1302 2014-04-06  Benjamin Poulain  <benjamin@webkit.org>
1303
1304         Move the PseudoPageClass types out of the pseudo element/class mix
1305         https://bugs.webkit.org/show_bug.cgi?id=131284
1306
1307         Reviewed by Darin Adler.
1308
1309         Some more cleanup of Selector's pseudo types. This patch moves the page pseudo
1310         class types into their own enumeration (PagePseudoClassType).
1311
1312         * css/CSSParserValues.cpp:
1313         (WebCore::CSSParserSelector::parsePagePseudoSelector):
1314         * css/CSSSelector.cpp:
1315         (WebCore::CSSSelector::specificityForPage):
1316         (WebCore::CSSSelector::pseudoId):
1317         (WebCore::CSSSelector::selectorText):
1318         * css/CSSSelector.h:
1319         (WebCore::CSSSelector::setPagePseudoType):
1320         (WebCore::CSSSelector::pagePseudoClassType):
1321         * css/PageRuleCollector.cpp:
1322         (WebCore::checkPageSelectorComponents):
1323         * cssjit/SelectorCompiler.cpp:
1324         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1325
1326 2014-04-06  Benjamin Poulain  <benjamin@webkit.org>
1327
1328         CSS JIT: add support for :last-child and :only-child
1329         https://bugs.webkit.org/show_bug.cgi?id=131283
1330
1331         Reviewed by Andreas Kling.
1332
1333         This is the straightforward implementation of :last-child and :only-child.
1334
1335         Both are extremely similar to :first-child. There are only minor differences:
1336         -:last-child has an additional check for the flag IsParsingChildrenFinished.
1337         -:only-child is like :first-child + :last-child but with combined marking.
1338
1339         * cssjit/SelectorCompiler.cpp:
1340         (WebCore::SelectorCompiler::addPseudoType):
1341         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToNextAdjacentElement):
1342         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1343         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
1344         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1345         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
1346         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByLastChildRules):
1347         (WebCore::SelectorCompiler::setLastChildState):
1348         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1349         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByFirstChildAndLastChildRules):
1350         (WebCore::SelectorCompiler::setOnlyChildState):
1351         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1352         * dom/Node.h:
1353         (WebCore::Node::nextSiblingMemoryOffset):
1354         (WebCore::Node::flagIsParsingChildrenFinished):
1355         * rendering/style/RenderStyle.h:
1356         Removed the unused flags, I will add them back later as needed.
1357
1358 2014-04-06  Darin Adler  <darin@apple.com>
1359
1360         Rework CSS calc logic, fixing some reference count mistakes in Length
1361         https://bugs.webkit.org/show_bug.cgi?id=131280
1362         rdar://problem/16400823
1363
1364         Reviewed by Andreas Kling.
1365
1366         New unit test in TestWebKitAPI.
1367
1368         Changed the classes related to CSS "calc" to make the code a bit easier to read by
1369         moving code out of class definitions. Also used final some more, made more things private,
1370         used references instead of pointers, and other such changes. Biggest change, though, is to
1371         Length, which had a broken system for managing reference counted calculated objects.
1372         There were multiple bugs including a basic design mistake of not having a reference count
1373         and trying to use the reference count in the object itself. Fixed and covered by the unit
1374         test now; test found multiple problems in both the old and new implementations.
1375
1376         * WebCore.exp.in: Updated exports, including symbols to make the unit test practical.
1377
1378         * WebCore.xcodeproj/project.pbxproj: Made CalculationValue.h a Private file so it can
1379         be used in a unit test. Also let Xcode update the file type for a gperf file.
1380
1381         * css/CSSCalculationValue.cpp:
1382         (WebCore::CSSCalcValue::equals): Updated since m_expression is a Ref now.
1383         (WebCore::CSSCalcValue::clampToPermittedRange): Marked inline and updated for data member
1384         name change.
1385         (WebCore::isIntegerResult): Changed argument order to put the operator first and use
1386         references instead of pointers. Also marked inline.
1387         (WebCore::createBlendHalf): Added. Helper to make the other functions more readable.
1388         (WebCore::createExpressionNode): Made non-member function private to this file. Also made
1389         many small improvements.
1390         (WebCore::CSSCalcValue::create): Updated so both of these call the same constructor.
1391
1392         * css/CSSCalculationValue.h: Cut down CSSCalcValue class by making more things private
1393         and deleting unneeded things. Also use Ref instead of RefPtr.
1394
1395         * css/CSSComputedStyleDeclaration.cpp:
1396         (WebCore::getPositionOffsetValue): Use isFixed function instead of type function.
1397
1398         * css/CSSGradientValue.cpp:
1399         (WebCore::CSSGradientValue::addStops): Updated code since toCalcValue now returns PassRef
1400         instead of PassRefPtr. Unfortunately the new code is a bit more verbose.
1401         (WebCore::positionFromValue): Ditto.
1402
1403         * css/CSSParser.cpp:
1404         (WebCore::CSSParser::parseCalculation):
1405
1406         * css/CSSPrimitiveValue.cpp:
1407         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated to pass reference rather than pointer.
1408         (WebCore::CSSPrimitiveValue::init): Ditto.
1409
1410         * css/CSSToStyleMap.h: Removed unneeded include of LengthBox.h.
1411
1412         * css/DeprecatedStyleBuilder.cpp:
1413         (WebCore::ApplyPropertyLength::applyValue): Updated for function name change.
1414         (WebCore::ApplyPropertyBorderRadius::applyValue): Removed extra parentheses.
1415         (WebCore::ApplyPropertyFontSize::applyValue): Ditto. Also updated since toCalcValue returns Ref.
1416
1417         * css/LengthFunctions.cpp:
1418         (WebCore::floatValueForLength): Updated to call value instead of getFloatValue; both are the same.
1419
1420         * css/StyleResolver.cpp:
1421         (WebCore::addIntrinsicMargins): Updated for function name change.
1422         (WebCore::createGridTrackBreadth): Ditto.
1423
1424         * platform/CalculationValue.cpp:
1425         (WebCore::CalculationValue::create): Changed to return PassRef.
1426         (WebCore::CalcExpressionNumber::evaluate): Moved this function out of the header, since it's
1427         virtual and not really going to be inlined.
1428         (WebCore::CalcExpressionNumber::operator==): Ditto.
1429         (WebCore::CalculationValue::evaluate): Ditto.
1430         (WebCore::CalcExpressionBinaryOperation::operator==): Ditto.
1431         (WebCore::CalcExpressionLength::evaluate): Ditto.
1432         (WebCore::CalcExpressionLength::operator==): Ditto.
1433         (WebCore::CalcExpressionBlendLength::evaluate): Ditto.
1434         (WebCore::CalcExpressionBlendLength::operator==): Ditto.
1435
1436         * platform/CalculationValue.h: Moved most functions out of the class bodies so the classes are
1437         easier to see. Made all the == operator functions non-member ones except for the polymorphic
1438         one from the base class. Changed the casting functions to work on references instead of pointers.
1439         Tweaked name of some members.
1440
1441         * platform/Length.cpp: Reworked the CalculationValueMap (formerly CalculationValueHandleMap) to
1442         use unsigned instead of int, and store reference counts in the map rather than trying to share the
1443         reference count of the underlying CalculationValue object, which can lead to storage leaks where
1444         handles end up in the map permanently.
1445         (WebCore::calculationValues): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
1446         (WebCore::Length::Length): Updated some data member names.
1447         (WebCore::Length::calculationValue): Updated to return a reference instead of a PassRefPtr.
1448         (WebCore::Length::ref): Renamed and updated for new interface to the map.
1449         (WebCore::Length::deref): Ditto.
1450         (WebCore::Length::nonNanCalculatedValue): Updated to use a reference instead of a pointer.
1451         (WebCore::Length::isCalculatedEqual): Updated since this is now only called if both objects are
1452         known to be calculated values.
1453
1454         * platform/Length.h: Moved most functions out of the class definition to make the class definition
1455         easier to read. Reworked the constructors and assignment operators to handle the reference counting
1456         correctly. Added various FIXMEs and assertions. Removed some unused functions, made others private.
1457
1458         * platform/LengthBox.h: Renamed some one-letter arguments to use words instead.
1459
1460         * rendering/AutoTableLayout.cpp:
1461         (WebCore::AutoTableLayout::recalcColumn): Updated for change to Length::setValue.
1462         * rendering/FixedTableLayout.cpp:
1463         (WebCore::FixedTableLayout::calcWidthArray): Ditto.
1464
1465         * rendering/style/FillLayer.h:
1466         (WebCore::FillLayer::initialFillXPosition): Updated to not convert a double to a float at runtime.
1467         (WebCore::FillLayer::initialFillYPosition): Ditto.
1468
1469         * rendering/style/RenderStyle.cpp:
1470         (WebCore::RenderStyle::setWordSpacing): Removed a bogus FALLTHROUGH that was clearly wrong, but
1471         harmless. Updated for changes to Length.
1472
1473         * rendering/style/RenderStyle.h: Updated for name changes and to avoid converting doubles to floats
1474         at runtime.
1475
1476 2014-04-06  Brent Fulgham  <bfulgham@apple.com>
1477
1478         Honor System-Level User Preferences for Caption Display
1479         https://bugs.webkit.org/show_bug.cgi?id=131258
1480
1481         Reviewed by Eric Carlson.
1482
1483         * html/HTMLMediaElement.cpp:
1484         (WebCore::HTMLMediaElement::setSelectedTextTrack): Allow preferenced change to fully dispatch
1485         so we can properly deal with captions being turned off.
1486         (WebCore::HTMLMediaElement::captionPreferencesChanged): Use 'webkit' variant of the
1487         setWebKitClosedCaptionsVisible method so we properly adjust settings needed for the JS API call.
1488         * html/shadow/MediaControlElements.cpp:
1489         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): When captions are turned off, e.g.
1490         because the user turned off the preference, don't inadvertently turn them back on just bacause there
1491         was an existing track that was not in a 'hidden' state.
1492
1493 2014-04-06  Brian J. Burg  <burg@cs.washington.edu>
1494
1495         Web Replay: add methods to encode a frame's index based on its FrameTree position
1496         https://bugs.webkit.org/show_bug.cgi?id=131281
1497
1498         Reviewed by Timothy Hatcher.
1499
1500         Given a frame, its encoded index is computed by traversing the frame tree
1501         and saving how many nodes have been traversed to reach a given frame.
1502
1503         This is used to disambiguate frames when dispatching frame-specific event
1504         loop inputs during replay, such as timers and resource loaders.
1505
1506         * replay/SerializationMethods.cpp:
1507         (WebCore::frameIndexFromDocument): Added.
1508         (WebCore::frameIndexFromFrame): Added.
1509         (WebCore::documentFromFrameIndex): Added.
1510         (WebCore::frameFromFrameIndex): Added.
1511         * replay/SerializationMethods.h:
1512
1513 2014-04-06  Alexey Proskuryakov  <ap@apple.com>
1514
1515         iOS build fix.
1516
1517         * WebCore.exp.in: Move newly exported function to a right section of this file.
1518
1519 2014-04-06  Darin Adler  <darin@apple.com>
1520
1521         Refactor post-attach and HTMLObjectElement-related code
1522         https://bugs.webkit.org/show_bug.cgi?id=131282
1523
1524         Reviewed by Antti Koivisto.
1525
1526         * dom/ContainerNode.cpp: Moved the post-attach callback code from here to
1527         StyleResolveTree.h/cpp.
1528         * dom/ContainerNode.h: Ditto.
1529
1530         * dom/Document.cpp:
1531         (WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
1532         PostAttachCallbackDisabler.
1533
1534         * dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
1535
1536         * html/HTMLEmbedElement.cpp:
1537         (WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
1538         it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
1539         code to trigger image loads.
1540
1541         * html/HTMLFormControlElement.cpp:
1542         (WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
1543         Style::queuePostResolutionCallback and use a lambda instead of a function.
1544         (WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
1545         of just using wishful thinking to keep the object alive.
1546         * html/HTMLFrameOwnerElement.cpp:
1547         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.
1548
1549         * html/HTMLObjectElement.cpp:
1550         (WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
1551         it into a 1-liner. Made dataAttr call setNeedsWidgetUpdate(true) unconditionally after
1552         checking carefully to see that's harmless if there is no renderer. Changed classidAttr
1553         to call setNeedsWidgetUpdate(true) unconditionally and not set m_classId.
1554         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
1555         instead of classId and descendantsOfType instead of getElementsByTagName.
1556         (WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
1557         (WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.
1558
1559         * html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
1560         attribute in a data member. Rearranged header, making more private, and fixing some typos,
1561         and doing a "using" instead of a function to disambiguate the inherited form functions.
1562
1563         * html/HTMLPlugInImageElement.cpp:
1564         (WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
1565         first child of the shadow root is guaranteed to be an element.
1566         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
1567         since m_needsDocumentActivationCallbacks can't be true if the old document was null.
1568         (WebCore::is100Percent): Added helper to make function below more readable.
1569         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
1570         bit. The part that attracted my attention was the local variable of type RenderBox, which
1571         was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
1572         is a renderer of type RenderEmbeddedObject, so depend on that.
1573
1574         * html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
1575         Marked more function members final. Made a protected imageLoader function so that
1576         m_imageLoader can be private eventually. Made m_imageLoader be std::unique_ptr.
1577
1578         * style/StyleResolveTree.cpp:
1579         (WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
1580         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
1581         (WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
1582         (WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
1583         (WebCore::Style::postResolutionCallbackQueue): Added.
1584         (WebCore::Style::queuePostResolutionCallback): Added.
1585         (WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
1586         PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
1587         of as a special case. It should not work for multiple documents across multiple pages instead of
1588         only the outermost one.
1589         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
1590         Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
1591         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
1592         (WebCore::Style::postResolutionCallbacksAreSuspended): Added.
1593
1594         * style/StyleResolveTree.h: Added queuePostResolutionCallback and
1595         postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
1596         eventually become a private implementation detail.
1597
1598 2014-04-04  Brian J. Burg  <burg@cs.washington.edu>
1599
1600         Enable WEB_REPLAY for PLATFORM(MAC)
1601         https://bugs.webkit.org/show_bug.cgi?id=130700
1602
1603         Reviewed by Timothy Hatcher.
1604
1605         Switch on WEB_REPLAY feature flag for non-production builds.
1606
1607         * Configurations/FeatureDefines.xcconfig:
1608         * replay/ReplayInputDispatchMethods.cpp: Fix the ENABLE(WEB_REPLAY) build.
1609         It was broken by the bool to enum refactoring in r166684.
1610         (WebCore::InitialNavigation::dispatch):
1611
1612 2014-04-05  Brian J. Burg  <burg@cs.washington.edu>
1613
1614         Web Inspector: remove unused test hook setInspectorResourcesDataSizeLimits
1615         https://bugs.webkit.org/show_bug.cgi?id=131268
1616
1617         Reviewed by Timothy Hatcher.
1618
1619         This was used in the old inspector frontend tests for the Network panel.
1620         It's no longer used by any tests or frontend code.
1621
1622         * WebCore.exp.in: Remove symbols.
1623         * inspector/InspectorController.cpp:
1624         (WebCore::InspectorController::setInspectorResourcesDataSizeLimits): Deleted.
1625         * inspector/InspectorController.h:
1626         * inspector/InspectorResourceAgent.cpp:
1627         (WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals): Deleted.
1628         * inspector/InspectorResourceAgent.h:
1629         * inspector/NetworkResourcesData.cpp:
1630         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits): Deleted.
1631         * inspector/NetworkResourcesData.h:
1632         * testing/Internals.cpp:
1633         (WebCore::Internals::setInspectorResourcesDataSizeLimits): Deleted.
1634         * testing/Internals.h:
1635         * testing/Internals.idl:
1636
1637 2014-04-05  Alexey Proskuryakov  <ap@apple.com>
1638
1639         REGRESSION (NetworkProcess): Subresources fail to load from AppCache
1640         https://bugs.webkit.org/show_bug.cgi?id=131262
1641         <rdar://problem/15370653>
1642
1643         Reviewed by Sam Weinig.
1644
1645         Exported ApplicationCacheHost::maybeLoadResource. Changed it to take a const
1646         reference to ResourceRequest, as appropriate for WebResourceLoadScheduler.
1647
1648         * WebCore.exp.in:
1649         * WebCore.xcodeproj/project.pbxproj:
1650         * loader/appcache/ApplicationCacheHost.cpp:
1651         (WebCore::ApplicationCacheHost::maybeLoadResource):
1652         * loader/appcache/ApplicationCacheHost.h:
1653
1654 2014-04-05  Brian J. Burg  <burg@cs.washington.edu>
1655
1656         Web Inspector: remove unused metrics and commands from the Timeline agent
1657         https://bugs.webkit.org/show_bug.cgi?id=131184
1658
1659         Reviewed by Timothy Hatcher.
1660
1661         This patch removes several instrumentation hooks that are not being
1662         used by the frontend in any way. Most of them are not hooked up to
1663         produce any data, so they just clutter up InspectorClient and the agent.
1664
1665         * WebCore.exp.in: Remove didBeginFrame/didCancelFrame.
1666         * inspector/InspectorClient.h: Remove client methods that are never overridden.
1667         (WebCore::InspectorClient::canMonitorMainThread): Deleted.
1668         (WebCore::InspectorClient::supportsFrameInstrumentation): Deleted.
1669         (WebCore::InspectorClient::getAllocatedObjects): Deleted.
1670         (WebCore::InspectorClient::dumpUncountedAllocatedObjects): Deleted.
1671
1672         * inspector/InspectorController.cpp: Remove unused instrumentation.
1673         (WebCore::InspectorController::didBeginFrame): Deleted.
1674         (WebCore::InspectorController::didCancelFrame): Deleted.
1675         (WebCore::InspectorController::didComposite): Deleted.
1676         (WebCore::InspectorController::wilComposite): Deleted.
1677         * inspector/InspectorController.h:
1678
1679         * inspector/InspectorTimelineAgent.cpp: Remove the backend's BeginFrame enum
1680         value, but keep it in the protocol for when it is reimplemented. Remove
1681         management of the current frame record, and simplify some code.
1682         (WebCore::toProtocol):
1683         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1684         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
1685         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
1686         (WebCore::InspectorTimelineAgent::clearRecordStack):
1687         (WebCore::InspectorTimelineAgent::canMonitorMainThread): Deleted.
1688         (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation): Deleted.
1689         (WebCore::InspectorTimelineAgent::didBeginFrame): Deleted.
1690         (WebCore::InspectorTimelineAgent::didCancelFrame): Deleted.
1691         (WebCore::InspectorTimelineAgent::didComposite): Deleted.
1692         (WebCore::InspectorTimelineAgent::wilComposite): Deleted.
1693         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): Deleted. Undo telescoping.
1694         (WebCore::usedHeapSize): Deleted.
1695         (WebCore::InspectorTimelineAgent::commitFrameRecord): Deleted.
1696         * inspector/InspectorTimelineAgent.h:
1697         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
1698         * inspector/protocol/Timeline.json:
1699
1700         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Remove
1701         instrumentation hook for beginFrame. This is the only backend that implements it.
1702         (WebCore::CompositingCoordinator::syncDisplayState):
1703
1704         * testing/Internals.cpp: Remove crufty test methods that aren't used.
1705         (WebCore::Internals::emitInspectorDidBeginFrame): Deleted.
1706         (WebCore::Internals::emitInspectorDidCancelFrame): Deleted.
1707         * testing/Internals.h:
1708         * testing/Internals.idl:
1709
1710 2014-04-05  Alexey Proskuryakov  <ap@apple.com>
1711
1712         REGRESSION (r163914): Application cache cannot be used in main frame
1713         https://bugs.webkit.org/show_bug.cgi?id=131263
1714         <rdar://problem/16532063>
1715
1716         Reviewed by Sam Weinig.
1717
1718         * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
1719         Don't check main frame origin when loading into main frame, it's not a 3rd party
1720         subframe, and the URL is unrelated to the page we are loading now.
1721
1722         * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
1723         Removed the same incorrect check that was duplicated here. The only caller already
1724         checks isApplicationCacheBlockedForRequest().
1725
1726 2014-04-05  Dan Bernstein  <mitz@apple.com>
1727
1728         [Xcode] Clean up the platform/graphics group
1729         https://bugs.webkit.org/show_bug.cgi?id=131271
1730
1731         Reviewed by Eric Carlson.
1732
1733         * WebCore.xcodeproj/project.pbxproj: Created an opentype group and moved opentype file
1734         references into it. Removed duplicate file references.
1735
1736 2014-04-05  Andreas Kling  <akling@apple.com>
1737
1738         Remove unused type casting helpers for HTMLUnknownElement...
1739
1740         ...to fix the debug build.
1741
1742         * html/HTMLUnknownElement.h:
1743
1744 2014-04-05  Dirk Schulze  <krit@webkit.org>
1745
1746         Canvas strokeText and fillText with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
1747         https://bugs.webkit.org/show_bug.cgi?id=66766
1748
1749         Reviewed by Andreas Kling.
1750
1751         Use transparency layers to draw text with certain compositing modes on
1752         the canvas. This follows the Canvas specification and makes WebKit fully
1753         compatible with IE. It also makes it more compatible with Firefox, even though
1754         Firefox still has some bugs.
1755
1756         Test: fast/canvas/canvas-composite-text-alpha.html
1757
1758         * html/canvas/CanvasRenderingContext2D.cpp:
1759         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1760
1761 2014-04-05  Andreas Kling  <akling@apple.com>
1762
1763         Devirtualize isHTMLUnknownElement().
1764         <https://webkit.org/b/131269>
1765
1766         We were hitting isHTMLUnknownElement() pretty hard when marking
1767         out-of-document Nodes. (The check is part of isHTMLAudioElement()
1768         which is called by JSNodeOwner::isReachableFromOpaqueRoots().)
1769
1770         This patch uses a Node flag for the unknown element instead.
1771         I'm also adding HTMLUnknownElement.{h,idl} to the Xcode project
1772         since they were suspiciously missing.
1773
1774         Reviewed by Benjamin Poulain.
1775
1776         * WebCore.xcodeproj/project.pbxproj:
1777         * dom/Node.h:
1778         * html/HTMLElement.h:
1779         (WebCore::HTMLElement::isHTMLUnknownElement):
1780         * html/HTMLUnknownElement.h:
1781         (WebCore::toHTMLUnknownElement): Deleted.
1782
1783 2014-04-05  Dirk Schulze  <krit@webkit.org>
1784
1785         Canvas stroke and strokeRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
1786         https://bugs.webkit.org/show_bug.cgi?id=66762
1787
1788         Reviewed by Andreas Kling.
1789
1790         For fill operations we create a new ImageBuffer to ensure that the results are composited
1791         correctly according to the Canvas spec. This patch creates a new transparency layer
1792         for stroking on certain compositing operators to archive the same. This makes WebKit's
1793         behavior interoperable with Firefox and IE as well. 
1794
1795         Test: fast/fast/canvas/canvas-composite-stroke-alpha.html
1796
1797         * html/canvas/CanvasRenderingContext2D.cpp:
1798         (WebCore::CanvasRenderingContext2D::strokeInternal):
1799         (WebCore::CanvasRenderingContext2D::strokeRect):
1800
1801 2014-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1802
1803         Use preallocated stack reference to store adjacentBacktrackingStart
1804         https://bugs.webkit.org/show_bug.cgi?id=131237
1805
1806         Reviewed by Benjamin Poulain.
1807
1808         * cssjit/SelectorCompiler.cpp:
1809         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1810         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
1811         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1812         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1813         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1814         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
1815         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent): Deleted.
1816         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures): Deleted.
1817         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail): Deleted.
1818         * cssjit/StackAllocator.h:
1819         (WebCore::StackAllocator::allocateUninitialized):
1820
1821 2014-04-05  Jeongeun Kim  <je_julie.kim@samsung.com>
1822
1823         bad values from HTMLImageElement x and y attributes (CSSOM-View)
1824         https://bugs.webkit.org/show_bug.cgi?id=130308
1825         
1826         Reviewed by Simon Fraser.
1827
1828         According to CSSOM-View, interface HTMLImageElement,
1829         The x attribute must return the x-coordinate.
1830         If style is not updated when x() is called, it can’t return anything.
1831         Style and layout should be done before getting value for x() and y(). 
1832
1833         Test: cssom/cssom-view-img-attributes-001.html
1834
1835         * html/HTMLImageElement.cpp:
1836         (WebCore::HTMLImageElement::x):
1837         (WebCore::HTMLImageElement::y):
1838
1839 2014-04-05  Zoltan Horvath  <zoltan@webkit.org>
1840
1841         [CSS Shapes] Remove CSSBoxType member from BasicShape and CSSBasicShape
1842         https://bugs.webkit.org/show_bug.cgi?id=129706
1843
1844         Reviewed by Andreas Kling.
1845
1846         The CSSBoxType has been moved up to ShapeValue and is no longer needed in the BasicShape classes.
1847
1848         No new tests, no behavior change.
1849
1850         * css/BasicShapeFunctions.cpp:
1851         (WebCore::valueForBasicShape):
1852         (WebCore::basicShapeForValue):
1853         * rendering/style/BasicShapes.cpp:
1854         (WebCore::BasicShape::canBlend):
1855         * rendering/style/BasicShapes.h:
1856         (WebCore::BasicShape::referenceBox): Deleted.
1857         (WebCore::BasicShape::setReferenceBox): Deleted.
1858         (WebCore::BasicShape::BasicShape): Deleted.
1859
1860 2014-04-05  Mark Rowe  <mrowe@apple.com>
1861
1862         Fix the 32-bit build after r166818.
1863
1864         * WebCore.exp.in:
1865
1866 2014-04-03  Brian J. Burg  <burg@cs.washington.edu>
1867
1868         Web Inspector: hook up probe samples to TimelineAgent's records
1869         https://bugs.webkit.org/show_bug.cgi?id=131127
1870
1871         Reviewed by Timothy Hatcher.
1872
1873         Hook up probe callbacks from ScriptDebugListener so that timeline records are
1874         created for probe samples. The record includes the probe identifier and hit count.
1875         The actual probe evaluation result is sent separately by DebuggerAgent, and
1876         can be looked up in frontend models using the identifier and hit count.
1877
1878         * inspector/InspectorTimelineAgent.cpp: Only listen to the debug server when recording.
1879         (WebCore::InspectorTimelineAgent::start):
1880         (WebCore::InspectorTimelineAgent::stop):
1881         (WebCore::InspectorTimelineAgent::breakpointActionProbe):
1882         (WebCore::toProtocol):
1883         * inspector/InspectorTimelineAgent.h:
1884         * inspector/TimelineRecordFactory.cpp:
1885         (WebCore::TimelineRecordFactory::createProbeSampleData):
1886         * inspector/TimelineRecordFactory.h:
1887         * inspector/protocol/Timeline.json: Add new enum value.
1888
1889 2014-04-04  Andreas Kling  <akling@apple.com>
1890
1891         Streamline cached wrapper lookup for Nodes in the normal world.
1892         <https://webkit.org/b/131249>
1893
1894         Inline the hot path for toJS(..., Node*) for cached wrapper lookups
1895         in the normal world. (Or really, out-of-line the cold path, since
1896         that was preventing the compiler from inlining this function.)
1897
1898         Also have JSDOMGlobalObject cache the "is normal world" flag from
1899         the DOMWrapperWorld so we can avoid the extra load.
1900
1901         Reviewed by Benjamin Poulain.
1902
1903         * WebCore.exp.in:
1904         * bindings/js/JSDOMGlobalObject.cpp:
1905         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1906         * bindings/js/JSDOMGlobalObject.h:
1907         (WebCore::JSDOMGlobalObject::worldIsNormal):
1908         * bindings/js/JSNodeCustom.cpp:
1909         (WebCore::getOutOfLineCachedWrapper):
1910         * bindings/js/JSNodeCustom.h:
1911         (WebCore::toJS):
1912
1913 2014-04-04  Brady Eidson  <beidson@apple.com>
1914
1915         Show DataDetector UI on scanned phone numbers.
1916         <rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131247
1917
1918         Reviewed by Tim Horton.
1919
1920         Gather the ranges of the scanned telephone numbers and send them up to WK2:
1921         * editing/Editor.cpp:
1922         (WebCore::Editor::respondToChangedSelection):
1923         (WebCore::Editor::scanSelectionForTelephoneNumbers):
1924         (WebCore::Editor::scanRangeForTelephoneNumbers):
1925         * editing/Editor.h:
1926
1927         Add client method to receive scanned telephone number ranges:
1928         * page/EditorClient.h:
1929         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
1930
1931         Remove unneeded placeholder UI:
1932         * rendering/InlineTextBox.cpp:
1933         (WebCore::InlineTextBox::paintDocumentMarkers):
1934         (WebCore::InlineTextBox::computeRectForReplacementMarker): Deleted.
1935         (WebCore::InlineTextBox::paintCompositionUnderline): Deleted.
1936         * rendering/InlineTextBox.h:
1937         (WebCore::InlineTextBox::expansionBehavior): Deleted.
1938
1939 2014-04-04  James Craig  <jcraig@apple.com>
1940
1941         AX: supportsARIAExpanded should always return true for a few roles: combobox, disclosure.
1942         https://bugs.webkit.org/show_bug.cgi?id=129787
1943
1944         Reviewed by Chris Fleizach.
1945
1946         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1947
1948         * accessibility/AccessibilityObject.cpp:
1949         (WebCore::AccessibilityObject::supportsARIAExpanded):
1950
1951 2014-04-04  Andreas Kling  <akling@apple.com>
1952
1953         JSGenerateToNativeObject should use fast JSNode/JSElement casts.
1954         <https://webkit.org/b/131245>
1955
1956         Make JSGenerateToNativeObject spit out code using the fast new wrapper
1957         casts for JSNode and JSElement.
1958
1959         This avoids walking the ClassInfo chain in many core functions, e.g:
1960
1961             - Node.insertBefore()
1962             - Node.replaceChild()
1963             - Node.removeChild()
1964             - Node.appendChild()
1965             - window.getComputedStyle()
1966
1967         Reviewed by Geoff Garen.
1968
1969         * bindings/scripts/CodeGeneratorJS.pm:
1970         (GenerateImplementation):
1971
1972 2014-04-04  Zoltan Horvath  <zoltan@webkit.org>
1973
1974         [CSS Shapes] polygon y-value calc() args serialize incorrectly
1975         https://bugs.webkit.org/show_bug.cgi?id=129842
1976
1977         Reviewed by Bem Jones-Bey.
1978
1979         The code hit ASSERT(isCalculation(value)) in CSSParser::createPrimitiveNumbericValue, because
1980         CSSParser::validUnit had been called on both coordinates, which set the value for m_parsedCalculation,
1981         but only one of the coordinates was calculation value. I reordered calling valudUnit and
1982         createPrimitiveNumbericValue to be called in the correct order on the coordinates.
1983
1984         I added the new test case to parsing-test-utils.js.
1985
1986         * css/CSSParser.cpp:
1987         (WebCore::CSSParser::parseBasicShapePolygon):
1988
1989 2014-04-04  Brian J. Burg  <burg@cs.washington.edu>
1990
1991         Web Replay: capture and replay wheel events and scroll commands
1992         https://bugs.webkit.org/show_bug.cgi?id=129402
1993
1994         Reviewed by Timothy Hatcher and Simon Fraser.
1995
1996         To capture and replay scrolling, the scrolling coordinator will force synchronous 
1997         scrolling during capture and replay. If the page is capturing or replaying,
1998         ForceOnMainThread will be added to the coordinator's SynchronousScrollingReasons.
1999
2000         A callback was added to signal that replay session state have changed,
2001         and thus the synchronous scrolling reasons should be recomputed.
2002
2003         Automated replay reftests for scrolling are not included, because they will be
2004         too flaky until more nondeterminism is handled. Specifically, resource loading,
2005         initial focus/active state, and parsing are known blocking issues.
2006
2007         Test: ManualTests/inspector/replay-wheel-events.html
2008
2009         * page/scrolling/ScrollingCoordinator.cpp: Add a new callback for replay state
2010         session changes. Add ForceOnMainThread if the page's active input cursor is
2011         capturing or replaying.
2012
2013         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
2014         (WebCore::ScrollingCoordinator::replaySessionStateDidChange): Added.
2015         * page/scrolling/ScrollingCoordinator.h:
2016
2017         * platform/PlatformWheelEvent.h:
2018         * platform/ScrollTypes.h: Add explicit enum storage types so these enums can
2019         be forward-declared. This is necessary to generate enum encode/decode implementations.
2020
2021         * replay/ReplayController.cpp:
2022         (WebCore::ReplayController::setForceDeterministicSettings): If async scrolling
2023         support is available, tell the scrolling tree to behave deterministically.
2024
2025         * replay/ReplayInputDispatchMethods.cpp:
2026         (WebCore::HandleWheelEvent::dispatch): Added.
2027         (WebCore::LogicalScrollPage::dispatch): Added.
2028         (WebCore::ScrollPage::dispatch): Added.
2029         * replay/SerializationMethods.cpp: Introduce more specific macros for values
2030         deserialized to arbitraray lvalues, scalars, RefPtr, and unique_ptr. Fix existing
2031         uses of decode macros.
2032
2033         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue): Fix macro name.
2034         (JSC::EncodingTraits<KeypressCommand>::encodeValue): Fix macro name.
2035         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Fix macro name.
2036         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Fix macro name.
2037         (JSC::PlatformWheelEventCocoa::PlatformWheelEventCocoa): Added. Encapsulate
2038         and initialize data members specific to PLATFORM(COCOA).
2039
2040         (JSC::EncodingTraits<PlatformWheelEvent>::encodeValue): Added.
2041         (JSC::EncodingTraits<PlatformWheelEvent>::decodeValue): Added.
2042         * replay/SerializationMethods.h:
2043         * replay/UserInputBridge.cpp: Fill in bridge methods to capture inputs.
2044         (WebCore::UserInputBridge::handleWheelEvent):
2045         (WebCore::UserInputBridge::scrollRecursively):
2046         (WebCore::UserInputBridge::logicalScrollRecursively):
2047         * replay/WebInputs.json: Add inputs and new enum types.
2048
2049 2014-04-04  Yusuke Suzuki  <utatane.tea@gmail.com>
2050
2051         Upgrade to SelectorFailsAllSiblings when Child selector is failed.
2052         https://bugs.webkit.org/show_bug.cgi?id=130961
2053
2054         Reviewed by Benjamin Poulain.
2055
2056         When Child selector fails, we should resume matching from the closest
2057         Descendant selector.
2058         So upgrading SelectorFailsLocally to SelectorFailsAllSibling at least
2059         to prevent unnecessary direct/indirect adjacent selectors matching.
2060
2061         * css/SelectorChecker.cpp:
2062         (WebCore::SelectorChecker::matchRecursively):
2063
2064 2014-04-04  Roger Fong  <roger_fong@apple.com>
2065
2066         Keep track of filtered active attribute/uniform indices per shader program.
2067         https://bugs.webkit.org/show_bug.cgi?id=131235.
2068
2069         Reviewed by Dean Jackson.
2070
2071         Tests: Covered by existing Khronos Conformance tests. 
2072         Will create a test to use multiple shader programs in a follow-up patch.
2073
2074         * html/canvas/WebGLProgram.cpp:
2075         (WebCore::WebGLProgram::cacheActiveAttribLocations): Use getActiveAttribImpl. We do not need to use the filtered list of attributes here.
2076         * html/canvas/WebGLRenderingContext.cpp:
2077         (WebCore::WebGLRenderingContext::getUniformLocation): Use filtered list of uniforms for uniform count.
2078         * platform/graphics/GraphicsContext3D.h: Create a map of shader programs to ActiveShaderSymbolCounts.
2079         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2080         (WebCore::GraphicsContext3D::attachShader): 
2081         When attaching or detaching a shader the shader program's active symbols list will change. Clear it so that it will be updated later.
2082         (WebCore::GraphicsContext3D::detachShader): Ditto.
2083         (WebCore::GraphicsContext3D::compileShader): No need to clear symbol counts here.
2084         (WebCore::GraphicsContext3D::getActiveAttrib): getActiveAttrib should only be able to query for attributes in the filtered list.
2085         (WebCore::GraphicsContext3D::getActiveUniform): getActiveUniform should only be able to query for uniforms in the filtered list.
2086         (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount): Return the filtered symbol count for a shader program.
2087
2088 2014-04-04  Ion Rosca  <rosca@adobe.com>
2089
2090         [CSS Blending] Add compositing reason for isolation.
2091         https://bugs.webkit.org/show_bug.cgi?id=131153
2092
2093         Reviewed by Joseph Pecoraro.
2094
2095         There are 2 reasons involving blend modes for a layer to be composited:
2096         1) the layer has blend mode and has composited descendants: CompositingReasonBlendingWithCompositedDescendants.
2097         2) the layer has to isolate composited blending descendants: CompositingReasonIsolatesCompositedBlendingDescendants
2098
2099         Test: inspector-protocol/layers/layers-blending-compositing-reasons.html
2100
2101         * inspector/InspectorLayerTreeAgent.cpp:
2102         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2103         * inspector/protocol/LayerTree.json:
2104         * rendering/RenderLayerCompositor.cpp:
2105         (WebCore::RenderLayerCompositor::reasonsForCompositing):
2106         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
2107         * rendering/RenderLayerCompositor.h: adding CompositingReasonIsolatesCompositedBlendingDescendants.
2108
2109 2014-04-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2110
2111         Use more const refs in ShapeOutsideInfo and some misc cleanup
2112         https://bugs.webkit.org/show_bug.cgi?id=131192
2113
2114         Reviewed by Dirk Schulze.
2115
2116         Use const refs for pretty much everything that can't be null. Also
2117         cleanup some code that got a bit messy when ShapeInfo was merged into
2118         ShapeOutsideInfo.
2119
2120         No new tests, no behavior change.
2121
2122         * rendering/shapes/ShapeOutsideInfo.cpp:
2123         (WebCore::ShapeOutsideInfo::shapeToRendererPoint):
2124         (WebCore::ShapeOutsideInfo::shapeToRendererSize):
2125         (WebCore::referenceBox):
2126         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
2127         (WebCore::getShapeImageAndRect):
2128         (WebCore::ShapeOutsideInfo::computedShape):
2129         (WebCore::ShapeOutsideInfo::logicalTopOffset):
2130         (WebCore::ShapeOutsideInfo::logicalLeftOffset):
2131         * rendering/shapes/ShapeOutsideInfo.h:
2132
2133 2014-04-04  Alexey Proskuryakov  <ap@apple.com>
2134
2135         REGRESSION (r166615): Pressing return doesn’t submit search term at bing.com
2136         https://bugs.webkit.org/show_bug.cgi?id=131212
2137         <rdar://problem/16521788>
2138
2139         Reviewed by Dan Bernstein.
2140
2141         Test: fast/forms/submit-while-you-submit.html
2142
2143         Turns out that m_shouldSubmit can actually be modified in a code path where we can't
2144         directly return the result. I'm not sure if the current behavior is entirely correct
2145         (we have open bugs about submitting forms multiple times), but let's restore it to
2146         pre-r166615 state.
2147
2148         * html/HTMLFormElement.cpp:
2149         (WebCore::HTMLFormElement::HTMLFormElement):
2150         (WebCore::HTMLFormElement::prepareForSubmission):
2151         (WebCore::HTMLFormElement::submit):
2152         * html/HTMLFormElement.h:
2153
2154 2014-04-04  Martin Hock  <mhock@apple.com>
2155
2156         [Mac] Change operation queue width to NSOperationQueueDefaultMaxConcurrentOperationCount.
2157         https://bugs.webkit.org/show_bug.cgi?id=131231
2158
2159         <rdar://problem/13913483>
2160
2161         Reviewed by Brady Eidson.
2162
2163         No new tests, no behavior change.
2164
2165         * platform/network/mac/ResourceHandleMac.mm:
2166         (WebCore::operationQueueForAsyncClients):
2167
2168 2014-04-04  Hans Muller  <hmuller@adobe.com>
2169
2170         [CSS Shapes] Simplify Polygon implementation
2171         https://bugs.webkit.org/show_bug.cgi?id=130975
2172
2173         Reviewed by Andreas Kling.
2174
2175         Only floats can specify shape-outside. For polygon shape-outside values, the problem
2176         of finding the left and right exclusion edges reduces to finding the X axis
2177         limits of the polygon edges that overlap a particular layout line. This is a much
2178         simpler version of the problem that PolygonShape was originally designed for, and so
2179         the implementation can also be simplified. There's more about the new algorithm in
2180         http://hansmuller-webkit.blogspot.com/2014/03/a-simpler-algorithm-for-css-shapes.html.
2181
2182         No new tests, since functionality was only removed.
2183
2184         * platform/graphics/FloatRect.h:
2185         (WebCore::FloatRect::overlapsYRange):
2186         (WebCore::FloatRect::overlapsXRange):
2187         * rendering/shapes/PolygonShape.cpp:
2188         (WebCore::OffsetPolygonEdge::xIntercept):
2189         (WebCore::circleXIntercept):
2190         (WebCore::OffsetPolygonEdge::clippedEdgeXRange): X axis extent of the edge clipped to a vertical interval.
2191         (WebCore::clippedCircleXRange): X axis extent of a circle clipped to a vertical interval.
2192         (WebCore::PolygonShape::shapeMarginLogicalBoundingBox):
2193         (WebCore::PolygonShape::getExcludedIntervals):
2194         (WebCore::PolygonShape::buildDisplayPaths):
2195         * rendering/shapes/PolygonShape.h:
2196         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
2197         (WebCore::OffsetPolygonEdge::isWithinYRange):
2198         (WebCore::OffsetPolygonEdge::overlapsYRange):
2199         (WebCore::PolygonShape::PolygonShape):
2200         * rendering/shapes/ShapeInterval.h:
2201         (WebCore::ShapeInterval::isEmpty):
2202         (WebCore::ShapeInterval::unite):
2203
2204 2014-04-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2205
2206         [CSS Shapes] shape-margin in percentage units always computes to 0px
2207         https://bugs.webkit.org/show_bug.cgi?id=130369
2208
2209         Reviewed by Andreas Kling.
2210
2211         Make shape-margin parsing accept percentages and properly compute the
2212         length once the percentage is accepted.
2213
2214         Test: fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-percent.html
2215
2216         * css/CSSParser.cpp:
2217         (WebCore::CSSParser::parseValue):
2218         * rendering/shapes/Shape.cpp:
2219         (WebCore::Shape::createShape):
2220         (WebCore::Shape::createRasterShape):
2221         (WebCore::Shape::createBoxShape):
2222         * rendering/shapes/Shape.h:
2223         * rendering/shapes/ShapeOutsideInfo.cpp:
2224         (WebCore::ShapeOutsideInfo::computedShape):
2225
2226 2014-04-04  Zoltan Horvath  <zoltan@webkit.org>
2227
2228         [CSS Shapes] Remove outside-shape CSS value
2229         https://bugs.webkit.org/show_bug.cgi?id=131201
2230
2231         Reviewed by Bem Jones-Bey.
2232
2233         Outside-shape is not a valid CSS value anymore. This patch removes it.
2234
2235         No new tests, existing tests are removed.
2236
2237         * css/CSSComputedStyleDeclaration.cpp:
2238         (WebCore::shapePropertyValue):
2239         * css/CSSValueKeywords.in:
2240         * css/DeprecatedStyleBuilder.cpp:
2241         (WebCore::ApplyPropertyShape::applyValue):
2242         * rendering/shapes/ShapeOutsideInfo.cpp:
2243         (WebCore::ShapeOutsideInfo::computedShape):
2244         (WebCore::ShapeOutsideInfo::isEnabledFor):
2245         * rendering/style/ShapeValue.h:
2246         (WebCore::ShapeValue::createOutsideValue): Deleted.
2247
2248 2014-04-04  Dirk Schulze  <krit@webkit.org>
2249
2250         Gradient offsets are off if compositing operator != source-over
2251         https://bugs.webkit.org/show_bug.cgi?id=129791
2252
2253         Reviewed by Andreas Kling.
2254
2255         Instead of transforming the path before drawing it on the context,
2256         the whole context should be transformed. This will make the gradient
2257         map correctly to the context space.
2258
2259         Test: fast/canvas/canvas-gradient-on-compositing.html
2260
2261         * html/canvas/CanvasRenderingContext2D.cpp:
2262         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
2263
2264 2014-04-04  Zalan Bujtas  <zalan@apple.com>
2265
2266         Subpixel rendering: Move background images to device pixel boundaries.
2267         https://bugs.webkit.org/show_bug.cgi?id=131144
2268
2269         Reviewed by Simon Fraser.
2270
2271         Replace integral snapping with device pixel snapping.
2272         Background image geometry calculation uses LayoutUnits and we snap to device pixels right before painting.
2273
2274         Tests: fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html
2275                fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position.html
2276                fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html
2277                fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html
2278
2279         * platform/graphics/GraphicsLayer.h:
2280         (WebCore::GraphicsLayer::setContentsTilePhase):
2281         (WebCore::GraphicsLayer::contentsTilePhase):
2282         (WebCore::GraphicsLayer::setContentsTileSize):
2283         (WebCore::GraphicsLayer::contentsTileSize):
2284         * platform/graphics/texmap/TextureMapperLayer.cpp:
2285         (WebCore::TextureMapperLayer::setContentsTileSize):
2286         (WebCore::TextureMapperLayer::setContentsTilePhase):
2287         * platform/graphics/texmap/TextureMapperLayer.h:
2288         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2289         (WebCore::CoordinatedGraphicsLayer::setContentsTileSize):
2290         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
2291         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2292         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2293         * rendering/RenderBox.cpp:
2294         (WebCore::RenderBox::repaintLayerRectsForImage):
2295         * rendering/RenderBoxModelObject.cpp:
2296         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2297         (WebCore::resolveWidthForRatio):
2298         (WebCore::resolveHeightForRatio):
2299         (WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio):
2300         (WebCore::resolveAgainstIntrinsicRatio):
2301         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2302         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2303         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
2304         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
2305         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
2306         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
2307         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
2308         (WebCore::getSpace):
2309         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2310         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2311         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2312         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2313         (WebCore::applySubPixelHeuristicForTileSize): Deleted.
2314         * rendering/RenderBoxModelObject.h:
2315         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
2316         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
2317         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
2318         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
2319         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
2320         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
2321         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
2322         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
2323         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
2324         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
2325         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
2326         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
2327         * rendering/RenderLayerBacking.cpp:
2328         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2329         * rendering/shapes/ShapeOutsideInfo.cpp:
2330         (WebCore::getShapeImageAndRect):
2331
2332 2014-04-04  Brent Fulgham  <bfulgham@apple.com>
2333
2334         [Win] Unreviewed test fix (crash in debug build).
2335
2336         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2337         (WebCore::AVFWrapper::legibleOutputCallback): Correct assertion. This
2338         callback is scheduled for the caption queue, not the main queue.
2339
2340 2014-04-03  Brent Fulgham  <bfulgham@apple.com>
2341
2342         [Win] Load Media Controls js/css from bundle
2343         https://bugs.webkit.org/show_bug.cgi?id=131194
2344
2345         Reviewed by Dean Jackson.
2346
2347         * DerivedSources.cpp: Remove no-longer generated file.
2348         * DerivedSources.make: Don't generate unneeded files.
2349         * WebCore.vcxproj/WebCore.vcxproj: Don't compile unneeded files.
2350         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2351         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Copy css/js to resource
2352         * rendering/RenderThemeSafari.cpp:
2353         * rendering/RenderThemeSafari.h:
2354         * rendering/RenderThemeWin.cpp:
2355         * rendering/RenderThemeWin.h:
2356
2357 2014-04-04  Mihnea Ovidenie  <mihnea@adobe.com>
2358
2359         [CSSRegions] Region's behaviour not updated when becoming valid from invalid
2360         https://bugs.webkit.org/show_bug.cgi?id=131211
2361
2362         Reviewed by Andrei Bucur.
2363
2364         When a region becomes valid again from invalid, it was part of a dependency cycle and the dependency cycle was broken,
2365         it needs to behave like a valid region again: if it has autoheight then it should compute its height based on the
2366         named flow content, if it has region styling then it should apply the additional style to the flowed content.
2367
2368         Added a new method, updateRegionFlags, that is used to ensure that auto-height and region-styling flags
2369         are properly set in several situations. Checking the behaviour, autoheight or styling, is done only
2370         if the region is valid.
2371
2372         Tests: fast/regions/auto-size/autoheight-region-valid-from-invalid.html
2373                fast/regions/region-styling/region-withstyling-valid-from-invalid.html
2374
2375         * rendering/RenderNamedFlowFragment.cpp:
2376         (WebCore::RenderNamedFlowFragment::updateRegionFlags):
2377         (WebCore::RenderNamedFlowFragment::styleDidChange):
2378         (WebCore::RenderNamedFlowFragment::updateRegionHasAutoLogicalHeightFlag):
2379         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
2380         (WebCore::RenderNamedFlowFragment::attachRegion):
2381         (WebCore::RenderNamedFlowFragment::detachRegion):
2382         * rendering/RenderNamedFlowFragment.h:
2383         * rendering/RenderNamedFlowThread.cpp:
2384         (WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
2385
2386 2014-04-04  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2387
2388         [GTK][CMake] Remove FindXt.cmake.
2389         https://bugs.webkit.org/show_bug.cgi?id=131227
2390
2391         Reviewed by Anders Carlsson.
2392
2393         * PlatformGTK.cmake: Use FindX11.cmake's Xt variables instead of our own FindXt.cmake's ones.
2394
2395 2014-04-03  Andreas Kling  <akling@apple.com>
2396
2397         Fast-path for casting JS wrappers to JSElement.
2398         <https://webkit.org/b/131210>
2399
2400         Add an extended JSType for Element wrappers so we can avoid walking
2401         the ClassInfo chain in those bindings as well.
2402
2403         Generalized the code to select a casting helper in the bindings
2404         generator into a function (GetCastingHelperForThisObject.)
2405         Updated all the jsDynamicCast call sites to go through this, in case
2406         there's an optimized cast available for the desired type.
2407
2408         Reviewed by Benjamin Poulain.
2409
2410         * WebCore.xcodeproj/project.pbxproj:
2411         * bindings/js/JSDOMWrapper.h:
2412         * bindings/js/JSElementCustom.h: Added.
2413         (WebCore::jsElementCast):
2414         * bindings/js/JSNodeCustom.h:
2415         (WebCore::jsNodeCast):
2416         * bindings/scripts/CodeGeneratorJS.pm:
2417         (GenerateHeader):
2418         (GetCastingHelperForThisObject):
2419         (GenerateImplementation):
2420         * dom/Element.idl:
2421
2422 2014-04-03  Andreas Kling  <akling@apple.com>
2423
2424         Rebaseline a bindings test.
2425
2426         * bindings/scripts/test/JS/JSTestNode.h:
2427         (WebCore::JSTestNode::createStructure):
2428
2429 2014-04-03  Andreas Kling  <akling@apple.com>
2430
2431         Fast-path for casting JS wrappers to JSNode.
2432         <https://webkit.org/b/131196>
2433
2434         Add a way to quickly determine that a given JSObject is a JSNode.
2435         This lets us avoid walking the ClassInfo chain in the DOM bindings
2436         for WebCore::Node.
2437
2438         Reviewed by Mark Hahnenberg and Geoff Garen.
2439
2440         * bindings/js/JSDOMWrapper.h:
2441
2442             Added a JSNodeType constant that extends beyond JSC::JSType.
2443
2444         * bindings/js/JSNodeCustom.h:
2445         (WebCore::jsNodeCast):
2446
2447             Added. Fast cast from JSValue to JSNode.
2448
2449         * bindings/scripts/CodeGeneratorJS.pm:
2450         (GenerateHeader):
2451         (GenerateImplementation):
2452
2453             Generate code that uses jsNodeCast in Node interfaces.
2454
2455 2014-04-03  Bem Jones-Bey  <bjonesbe@adobe.com>
2456
2457         Merge ShapeInfo & ShapeOutsideInfo now that ShapeInsideInfo is no more
2458         https://bugs.webkit.org/show_bug.cgi?id=131180
2459
2460         Reviewed by Andreas Kling.
2461
2462         Now that ShapeInsideInfo is gone, having a class hiearachy and
2463         templates doesn't make any sense. As a first step to cleaning up the
2464         code, this remove ShapeInfo and puts all of its functionality into
2465         ShapeOutsideInfo.
2466
2467         No new tests, no behavior change.
2468
2469         * CMakeLists.txt:
2470         * WebCore.vcxproj/WebCore.vcxproj:
2471         * WebCore.vcxproj/WebCore.vcxproj.filters:
2472         * WebCore.xcodeproj/project.pbxproj:
2473         * rendering/shapes/ShapeInfo.cpp: Removed.
2474         * rendering/shapes/ShapeInfo.h: Removed.
2475         * rendering/shapes/ShapeOutsideInfo.cpp:
2476         (WebCore::ShapeOutsideInfo::computedShapePhysicalBoundingBox):
2477         (WebCore::ShapeOutsideInfo::shapeToRendererPoint):
2478         (WebCore::ShapeOutsideInfo::shapeToRendererSize):
2479         (WebCore::referenceBox):
2480         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
2481         (WebCore::checkShapeImageOrigin):
2482         (WebCore::getShapeImageAndRect):
2483         (WebCore::getShapeImageMarginRect):
2484         (WebCore::ShapeOutsideInfo::computedShape):
2485         (WebCore::borderBeforeInWritingMode):
2486         (WebCore::borderAndPaddingBeforeInWritingMode):
2487         (WebCore::ShapeOutsideInfo::logicalTopOffset):
2488         (WebCore::borderStartWithStyleForWritingMode):
2489         (WebCore::borderAndPaddingStartWithStyleForWritingMode):
2490         (WebCore::ShapeOutsideInfo::logicalLeftOffset):
2491         (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
2492         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2493         (WebCore::ShapeOutsideInfo::shapeValue): Deleted.
2494         (WebCore::ShapeOutsideInfo::styleForWritingMode): Deleted.
2495         * rendering/shapes/ShapeOutsideInfo.h:
2496
2497 2014-04-03  Andreas Kling  <akling@apple.com>
2498
2499         Fix over-retain in SharedBufferCF's createCFData().
2500         <https://webkit.org/b/131139>
2501
2502         Constructing the return type (RetainPtr<CFDataRef>) will also retain
2503         the pointee, so this would end up leaking.
2504
2505         Reviewed by Anders Carlsson.
2506
2507         * platform/cf/SharedBufferCF.cpp:
2508         (WebCore::SharedBuffer::createCFData):
2509
2510 2014-04-03  Brent Fulgham  <bfulgham@apple.com>
2511
2512         [Win] Turn on ENABLE_CSS_GRID_LAYOUT
2513         https://bugs.webkit.org/show_bug.cgi?id=131147
2514
2515         Reviewed by Simon Fraser.
2516
2517         Covered by existing fast/css/getComputedStyle tests.
2518
2519         * css/CSSAllInOne.cpp: Add CSSGridLineNamesValue.cpp when building
2520         with ENABLE(CSS_GRID_LAYOUT)
2521
2522 2014-04-03  Simon Fraser  <simon.fraser@apple.com>
2523
2524         Pixelated WebView when display is changed from hiDPI to regularDPI
2525         https://bugs.webkit.org/show_bug.cgi?id=131185
2526
2527         Reviewed by Tim Horton.
2528
2529         r166309 added a short circuit in GraphicsLayerCA::updateContentsScale()
2530         when the scale didn't change. This broke layers which expected to
2531         unconditionally receive a setContentsScale(), namely the WebTiledBackingLayer
2532         which owns the TileController. WebTiledBackingLayer overrode -setContentsScale:
2533         to pass the scale down to the TileController; however, it didn't override
2534         -contentsScale, and it mucked with the scale passed in.
2535         
2536         Fix by having setting and fetching contentsScale on a WebTiledBackingLayer
2537         work as expected. Also rename the TileController functions to mirror the
2538         CALayer functions better.
2539
2540         * WebCore.exp.in:
2541         * platform/graphics/ca/GraphicsLayerCA.cpp:
2542         (WebCore::GraphicsLayerCA::updateContentsScale):
2543         * platform/graphics/ca/mac/TileController.h:
2544         * platform/graphics/ca/mac/TileController.mm:
2545         (WebCore::TileController::TileController):
2546         (WebCore::TileController::contentsScale):
2547         (WebCore::TileController::setContentsScale):
2548         (WebCore::TileController::scale): Deleted.
2549         (WebCore::TileController::setScale): Deleted.
2550         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
2551         (-[WebTiledBackingLayer setContentsScale:]):
2552         (-[WebTiledBackingLayer contentsScale]):
2553
2554 2014-04-03  Zoltan Horvath  <zoltan@webkit.org>
2555
2556         [CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
2557         https://bugs.webkit.org/show_bug.cgi?id=116160
2558
2559         Reviewed by Andreas Kling. 
2560
2561         LineSegment edges should not have been changed to LayoutUnit. These are
2562         used only as floats. I modified them back to floats. 
2563
2564         No new tests are needed, no behavior change.
2565
2566         * rendering/shapes/Shape.h:
2567
2568 2014-04-03  Dirk Schulze  <krit@webkit.org>
2569
2570         [CG] Canvas lineDashOffset does not handle negative numbers correctly
2571         https://bugs.webkit.org/show_bug.cgi?id=80560
2572
2573         Reviewed by Dean Jackson.
2574
2575         CG ignores negative dash array offsets. Check if we have a negative offset, if yes
2576         then calculate the length of the dash array and modulo the dash array offset with
2577         the dash array length.
2578
2579         Test: fast/canvas/canvas-negative-lineDashOffset.html
2580
2581         * platform/graphics/cg/GraphicsContextCG.cpp:
2582         (WebCore::GraphicsContext::setLineDash):
2583
2584 2014-04-03  David Hyatt  <hyatt@apple.com>
2585
2586         REGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html broken
2587         https://bugs.webkit.org/show_bug.cgi?id=131183
2588
2589         Reviewed by Simon Fraser.
2590
2591         Revert the loop to continue rather than breaking when an invalid block is encountered.
2592         This is what it used to do if it encountered a non-continuation block.
2593
2594         * rendering/RenderInline.cpp:
2595         (WebCore::updateStyleOfAnonymousBlockContinuations):
2596
2597 2014-04-02  Simon Fraser  <simon.fraser@apple.com>
2598
2599         Harden FilterOperation type casting
2600         https://bugs.webkit.org/show_bug.cgi?id=131142
2601
2602         Reviewed by Sam Weinig.
2603
2604         DefaultFilterOperation had an error-prone behavior where it set the base class
2605         OperationType to the type of some other filter class, but overrode isDefault(). 
2606         This made it very easy to write incorrect code that casted incorrectly based on type().
2607         
2608         Fix by making adding a DEFAULT filter operation type, and storing the represented
2609         type on DefaultFilterOperation().
2610         
2611         Also remove the OperationType argument for constructors of FilterOperations that
2612         can only be of one type, to avoid possible mistakes.
2613         
2614         Make the type cast macros a bit more normal, and use them in a few places.
2615         
2616         Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.
2617
2618         * WebCore.exp.in:
2619         * css/CSSComputedStyleDeclaration.cpp:
2620         (WebCore::ComputedStyleExtractor::valueForFilter):
2621         * css/StyleResolver.cpp:
2622         (WebCore::StyleResolver::createFilterOperations):
2623         * platform/graphics/ca/PlatformCAFilters.h:
2624         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2625         (PlatformCAFilters::filterValueForOperation):
2626         (PlatformCAFilters::colorMatrixValueForFilter):
2627         * platform/graphics/filters/FilterOperation.cpp:
2628         (WebCore::DefaultFilterOperation::operator==):
2629         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
2630         (WebCore::ReferenceFilterOperation::operator==):
2631         (WebCore::BlurFilterOperation::operator==):
2632         (WebCore::BlurFilterOperation::blend):
2633         (WebCore::DropShadowFilterOperation::operator==):
2634         (WebCore::DropShadowFilterOperation::blend):
2635         * platform/graphics/filters/FilterOperation.h:
2636         (WebCore::FilterOperation::blend):
2637         (WebCore::FilterOperation::type):
2638         (WebCore::FilterOperation::isBasicColorMatrixFilterOperation):
2639         (WebCore::FilterOperation::isBasicComponentTransferFilterOperation):
2640         (WebCore::FilterOperation::isSameType):
2641         (WebCore::DefaultFilterOperation::create):
2642         (WebCore::DefaultFilterOperation::representedType):
2643         (WebCore::DefaultFilterOperation::DefaultFilterOperation):
2644         (WebCore::ReferenceFilterOperation::create):
2645         (WebCore::BlurFilterOperation::create):
2646         (WebCore::BlurFilterOperation::BlurFilterOperation):
2647         (WebCore::DropShadowFilterOperation::create):
2648         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
2649         (WebCore::FilterOperation::isDefault): Deleted.
2650         * platform/graphics/filters/FilterOperations.cpp:
2651         (WebCore::FilterOperations::outsets):
2652         * rendering/FilterEffectRenderer.cpp:
2653         (WebCore::FilterEffectRenderer::build):
2654         * rendering/RenderLayerFilterInfo.cpp:
2655         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
2656
2657 2014-04-03  Andreas Kling  <akling@apple.com>
2658
2659         Stop throwing away the Document's StyleResolver on a timer.
2660         <https://webkit.org/b/131168>
2661         <rdar://problem/15227045>
2662
2663         This was causing some unfortunate pauses when returning to idle pages
2664         after a long-ish time. There's already a mechanism in place that will
2665         throw these away if the system comes under memory pressure.
2666
2667         Reviewed by Sam Weinig.
2668
2669         * css/StyleResolver.cpp:
2670         (WebCore::StyleResolver::styleForElement):
2671         (WebCore::StyleResolver::styleForKeyframe):
2672         (WebCore::StyleResolver::pseudoStyleForElement):
2673         (WebCore::StyleResolver::styleForPage):
2674         * dom/Document.cpp:
2675         (WebCore::Document::Document):
2676         (WebCore::Document::didAccessStyleResolver): Deleted.
2677         (WebCore::Document::styleResolverThrowawayTimerFired): Deleted.
2678         * dom/Document.h:
2679
2680 2014-04-02  Simon Fraser  <simon.fraser@apple.com>
2681
2682         Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
2683         https://bugs.webkit.org/show_bug.cgi?id=131150
2684
2685         Reviewed by Beth Dakin.
2686
2687         When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
2688         layout yet so our composting layers haven't been hooked together. Don't try
2689         to add a zero nodeID to the map in this case.
2690
2691         * rendering/RenderLayerCompositor.cpp:
2692         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2693
2694 2014-04-03  David Hyatt  <hyatt@apple.com>
2695
2696         Continuations casting issue.
2697         https://bugs.webkit.org/show_bug.cgi?id=130057
2698         <rdar://problem/16283406>
2699
2700         Reviewed by Simon Fraser.
2701
2702         The code to update relative positioned anonymous block continuations should not
2703         have assumed that all siblings were RenderBlocks. Make the code smarter and
2704         make it bail when it hits something that isn't part of the block continuation
2705         chain.
2706
2707         Added fast/block/continuation-crash.html
2708
2709         * rendering/RenderInline.cpp:
2710         (WebCore::updateStyleOfAnonymousBlockContinuations):
2711
2712 2014-04-03  Bem Jones-Bey  <bjonesbe@adobe.com>
2713
2714         [CSS Shapes] CRASH with calc() value args in inset round
2715         https://bugs.webkit.org/show_bug.cgi?id=129816
2716
2717         Reviewed by Andreas Kling.
2718
2719         The code to parse the inset rounded corners was adding the parser
2720         value arguments to a temporary CSSParserValueList. Unfortunately,
2721         CSSParserValueList expects to own the values it contains, and it frees
2722         the values it contains when the list is destroyed. This was a problem
2723         because the values are owned by the CSSParserValueList passed in to
2724         parseInsetRoundedCorners, and thus the calc's argument list would get
2725         double freed, resulting in a crash. This patch fixes this by using a
2726         Vector to hold the pointers instead.
2727
2728         Test: fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html
2729
2730         * css/CSSParser.cpp:
2731         (WebCore::CSSParser::parseInsetRoundedCorners):
2732
2733 2014-04-03  Jer Noble  <jer.noble@apple.com>
2734
2735         Leaving a streaming movie by going "Back" keeps playing the audio
2736         https://bugs.webkit.org/show_bug.cgi?id=131149
2737
2738         Reviewed by Eric Carlson.
2739
2740         When stopping a HTMLMediaElement, call userCancelledLoad() (which clears the
2741         MediaPlayer) only after calling setPausedInternal() (which pauses the MediaPlayer).
2742         Previously, and in the reverse order, the MediaPlayer would never get a chance to pause
2743         before being cleared. There is an underlying error with the QTKit media engine which
2744         is causing it to continue playing even after its last reference is released, but this
2745         does fix the symptom of playback continuing even after stopping.
2746
2747         * html/HTMLMediaElement.cpp:
2748         (WebCore::HTMLMediaElement::stop):
2749
2750 2014-04-03  Jer Noble  <jer.noble@apple.com>
2751
2752         [EME] Crash when passing a NULL initData to MediaKeys.createSession()
2753         https://bugs.webkit.org/show_bug.cgi?id=131156
2754
2755         Reviewed by Eric Carlson.
2756
2757         Update the checks at the start of createSession() to match the current spec, notably
2758         bailing early if the initData parameter is NULL or empty.
2759
2760         * Modules/encryptedmedia/MediaKeys.cpp:
2761         (WebCore::MediaKeys::createSession):
2762
2763 2014-04-03  Eric Carlson  <eric.carlson@apple.com>
2764
2765         [iOS] add missing QuickTime plug-in replacement API
2766         https://bugs.webkit.org/show_bug.cgi?id=131042
2767
2768         Reviewed by Dean Jackson.
2769
2770         Rename QuickTimePluginReplacement.cpp to QuickTimePluginReplacement.mm to make it possible
2771         to use the ObjC JSC API.
2772         * Modules/plugins/QuickTimePluginReplacement.cpp:
2773         * Modules/plugins/QuickTimePluginReplacement.h:
2774         (WebCore::QuickTimePluginReplacement::parentElement):
2775         * Modules/plugins/QuickTimePluginReplacement.idl:
2776
2777         * Modules/plugins/QuickTimePluginReplacement.js:
2778         (Replacement.prototype.timedMetadataUpdates): Implement.
2779         (Replacement.prototype.accessLog): Ditto.
2780         (Replacement.prototype.errorLog): Ditto.
2781
2782         Use the JSC ObjC API to create a JavaScript object from an array of AVMetadataItems. The
2783         JSC ObjC API supports basic NSTypes, but an AVMetadataItem can also contain NSData which 
2784         the existing plug-in returns as base-64 encoded data, so create wrappers for NSDictionary
2785         and NSArray.
2786         * Modules/plugins/QuickTimePluginReplacement.mm: Copied from Source/WebCore/Modules/plugins/QuickTimePluginReplacement.cpp.
2787         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): Disambiguate with "JSC::"
2788         (WebCore::QuickTimePluginReplacement::installReplacement): Ditto.
2789         (WebCore::jsValueWithDataInContext): Create JSValue* from NSData.
2790         (WebCore::jsValueWithArrayInContext): Create JSValue* from NSArray.
2791         (WebCore::jsValueWithDictionaryInContext): Create JSValue* from NSDictionary.
2792         (WebCore::jsValueWithValueInContext): Create JSValue* from basic NSTypes plus AVMetadataItem
2793             and NSData.
2794         (WebCore::jsValueWithAVMetadataItemInContext): Create JSValue* from AVMetadataItem.
2795         (WebCore::JSQuickTimePluginReplacement::timedMetaData): Script interface.
2796         (WebCore::JSQuickTimePluginReplacement::accessLog): Ditto.
2797         (WebCore::JSQuickTimePluginReplacement::errorLog): Ditto.
2798
2799         * WebCore.xcodeproj/project.pbxproj: QuickTimePluginReplacement.cpp -> QuickTimePluginReplacement.mm.
2800
2801         * platform/graphics/MediaPlayer.cpp:
2802         (WebCore::MediaPlayer::timedMetadata): iOS only accessor.
2803         (WebCore::MediaPlayer::accessLog): Ditto.
2804         (WebCore::MediaPlayer::errorLog): Ditto.
2805         * platform/graphics/MediaPlayer.h:
2806         * platform/graphics/MediaPlayerPrivate.h:
2807
2808         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2809         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2810         (WebCore::MediaPlayerPrivateAVFoundationObjC::timedMetadata):
2811         (WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog):
2812         (WebCore::MediaPlayerPrivateAVFoundationObjC::errorLog):
2813         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2814         (WebCore::itemKVOProperties):
2815         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2816
2817 2014-04-03  Andrei Bucur  <abucur@adobe.com>
2818
2819         [CSS Regions] Include region range information when printing the render tree
2820         https://bugs.webkit.org/show_bug.cgi?id=131159
2821
2822         Reviewed by Mihnea Ovidenie.
2823
2824         With this change showRenderObject() will print the region range for objects inside
2825         a flow thread. The format is:
2826         Rs: <startRegion> Re: <endRegion>
2827
2828         Because this can be called anytime during debugging, it's necessary to disable the
2829         current flow thread caching to prevent using the wrong flow thread for an object.
2830
2831         Tests: No new tests, no functional change.
2832
2833         * rendering/RenderFlowThread.cpp:
2834         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
2835         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
2836         * rendering/RenderFlowThread.h:
2837         * rendering/RenderObject.cpp:
2838         (WebCore::RenderObject::showRegionsInformation): Added.
2839         (WebCore::RenderObject::showRenderObject):
2840         * rendering/RenderObject.h:
2841
2842 2014-04-03  Antti Koivisto  <antti@apple.com>
2843
2844         RenderSnapshottedPlugIn::paint should use iterator for traversal.
2845         https://bugs.webkit.org/show_bug.cgi?id=131158
2846
2847         Reviewed by Dean Jackson.
2848
2849         * rendering/RenderSnapshottedPlugIn.cpp:
2850         (WebCore::RenderSnapshottedPlugIn::paint):
2851
2852 2014-03-27  Sergio Villar Senin  <svillar@igalia.com>
2853
2854         [CSS Grid Layout] <string> not allowed in grid-{area | row | column} syntax
2855         https://bugs.webkit.org/show_bug.cgi?id=129713
2856
2857         Reviewed by Darin Adler.
2858
2859         Grid positioning properties no longer accept <string> values for
2860         named grid lines as they did in previous versions of the specs. They
2861         were first replaced by <ident> and since the beginning of 2014 they
2862         should only accept <custom-ident>.
2863
2864         Updated the parser and the style resolver to this new syntax. Also
2865         updated the tests accordingly.
2866
2867         Test: fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html
2868
2869         * css/CSSParser.cpp:
2870         (WebCore::isValidCustomIdent): New function that checks that the
2871         <custom-ident> is valid.
2872         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
2873         (WebCore::CSSParser::parseGridPosition):
2874         (WebCore::CSSParser::parseIntegerOrStringFromGridPosition):
2875         Replaced by WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition.
2876         * css/CSSParser.h:
2877         * css/StyleResolver.cpp:
2878         (WebCore::createGridPosition):
2879
2880 2014-04-03  Antti Koivisto  <antti@apple.com>
2881
2882         Crash after mutating after pseudo style
2883         https://bugs.webkit.org/show_bug.cgi?id=130881
2884
2885         Reviewed by Andreas Kling.
2886
2887         Test: fast/css/pseudo-after-crash.html
2888
2889         * style/StyleResolveTree.cpp:
2890         (WebCore::Style::updateBeforeOrAfterPseudoElement):
2891         
2892             Invalidate the cached renderer for pseudo elements too.
2893     
2894         (WebCore::Style::needsPseudeElement): Deleted.
2895         
2896             Fix spelling.
2897
2898 2014-04-02  Chris Fleizach  <cfleizach@apple.com>
2899
2900         AX: AccessibilityObject::children() returns invalid results sometimes
2901         https://bugs.webkit.org/show_bug.cgi?id=130563
2902
2903         Reviewed by Joseph Pecoraro.
2904
2905         Allow the DOM inspector to handle AX objects that do not have Node equivalents
2906         (e.g. anonymous renderers).
2907
2908         * inspector/InspectorDOMAgent.cpp:
2909         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
2910         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2911         * inspector/InspectorDOMAgent.h:
2912
2913 2014-04-02  Alexey Proskuryakov  <ap@apple.com>
2914
2915         Sandbox violation in NetworkProcess when uploading a bundle
2916         https://bugs.webkit.org/show_bug.cgi?id=131133
2917
2918         Reviewed by Brady Eidson.
2919
2920         Track generated file ownership explicitly, so that each copy of FormData would know
2921         whether to delete the file.
2922
2923         This part is needed to prevent asserting in FormData destructor in NetworkProcess,
2924         because it doesn't delete the files. Also, some cleanup.
2925
2926         * WebCore.exp.in: Don't export FormData::removeGeneratedFilesIfNeeded(), WebKit2
2927         doesn't need it any more.
2928         * platform/network/FormData.cpp: Removed m_hasGeneratedFiles. There is no problem
2929         iterating over FormDataElements to compute it, and that's more robust when FormDatas
2930         are passed or stored on disk permanently.
2931         Updated touched functions to use C++ iteration, and renamed "e" to "element".
2932         (WebCore::FormData::encode): Keep encoding a boolean for hasGeneratedFiles, because
2933         the encoded FormData can be stored persitently, and we can't change the format.
2934
2935         * platform/network/FormData.h: (WebCore::FormDataElement::FormDataElement):
2936         Added m_ownsGeneratedFile. FormData will only delete files it owns. Since files
2937         are generated immediately before form submission, it's always the FormData being
2938         submitted that owns the generated files.
2939
2940 2014-04-02  Mihnea Ovidenie  <mihnea@adobe.com>
2941
2942         [CSSRegions] Use RenderStyle::hasFlowInto when needed
2943         https://bugs.webkit.org/show_bug.cgi?id=131092
2944
2945         Reviewed by Andrei Bucur.
2946
2947         Add hasFlowInto() helper method on RenderStyle to be used
2948         instead of directly checking the presence or absence of flowThread value.
2949         No new functionality, no new tests.
2950
2951         * css/CSSComputedStyleDeclaration.cpp:
2952         (WebCore::ComputedStyleExtractor::propertyValue):
2953         * dom/Element.cpp:
2954         (WebCore::Element::shouldMoveToFlowThread):
2955         * rendering/style/RenderStyle.h:
2956         * style/StyleResolveTree.cpp:
2957         (WebCore::Style::isRendererReparented):
2958
2959 2014-04-02  Benjamin Poulain  <benjamin@webkit.org>
2960
2961         CSS JIT: the adjacent position is never reset
2962         https://bugs.webkit.org/show_bug.cgi?id=131145
2963
2964         Reviewed by Andreas Kling.
2965
2966         Corresponding radar: <rdar://problem/16440036>. The backtracking action would use a tail
2967         when not needed.
2968
2969         Test: fast/selectors/multiple-adjacent-chain-without-adjacent-tail.html
2970
2971         * cssjit/SelectorCompiler.cpp:
2972         (WebCore::SelectorCompiler::updateChainStates):
2973
2974 2014-04-02  Brent Fulgham  <bfulgham@apple.com>
2975
2976         Speculative build fix for Windows.
2977
2978         * DerivedSources.make: Make sure we generate our media control
2979         scripts for Apple Windows (but not WinCairo)
2980
2981 2014-04-02  Tim Horton  <timothy_horton@apple.com>
2982
2983         Fix the !USE(IOSURFACE) iOS build.
2984
2985         * platform/ios/MemoryPressureHandlerIOS.mm:
2986         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2987
2988 2014-04-02  Mark Rowe  <mrowe@apple.com>
2989
2990         <https://webkit.org/b/131136> Remove FrameLoadRequest's m_lockHistory member since it's always false.
2991
2992         Reviewed by Andreas Kling.
2993
2994         * loader/FrameLoadRequest.cpp:
2995         (WebCore::FrameLoadRequest::FrameLoadRequest):
2996         * loader/FrameLoadRequest.h:
2997         (WebCore::FrameLoadRequest::FrameLoadRequest):
2998         (WebCore::FrameLoadRequest::lockHistory): Deleted.
2999         (WebCore::FrameLoadRequest::setLockHistory): Deleted.
3000         * loader/FrameLoader.cpp:
3001         (WebCore::FrameLoader::load): Remove an if whose body was never executed.
3002
3003 2014-04-02  Mark Rowe  <mrowe@apple.com>
3004
3005         <https://webkit.org/b/131135> Introduce LockHistory and LockBackForwardList enums to use in place of bools.
3006
3007         These arguments are often passed using literals at the call site, where the use of bools severely hinders
3008         the readability of the code.
3009
3010         Reviewed by Andreas Kling.
3011
3012         * WebCore.exp.in:
3013         * html/HTMLAnchorElement.cpp:
3014         (WebCore::HTMLAnchorElement::handleClick):
3015         * html/HTMLFormElement.cpp:
3016         (WebCore::HTMLFormElement::submit):
3017         * html/HTMLFrameElementBase.cpp:
3018         (WebCore::HTMLFrameElementBase::openURL):
3019         (WebCore::HTMLFrameElementBase::setLocation):
3020         * html/HTMLFrameElementBase.h:
3021         * inspector/InspectorFrontendClientLocal.cpp:
3022         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3023         * inspector/InspectorPageAgent.cpp:
3024         (WebCore::InspectorPageAgent::navigate):
3025         * loader/FormSubmission.cpp:
3026         (WebCore::FormSubmission::FormSubmission):
3027         (WebCore::FormSubmission::create):
3028         * loader/FormSubmission.h:
3029         (WebCore::FormSubmission::lockHistory):
3030         * loader/FrameLoader.cpp:
3031         (WebCore::FrameLoader::changeLocation):
3032         (WebCore::FrameLoader::urlSelected):
3033         (WebCore::FrameLoader::loadURLIntoChildFrame):
3034         (WebCore::FrameLoader::loadFrameRequest):
3035         (WebCore::FrameLoader::loadURL):
3036         (WebCore::FrameLoader::loadWithNavigationAction):
3037         (WebCore::FrameLoader::clientRedirected):
3038         (WebCore::FrameLoader::loadPostRequest):
3039         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3040         (WebCore::FrameLoader::loadDifferentDocumentItem):
3041         * loader/FrameLoader.h:
3042         * loader/FrameLoaderTypes.h:
3043         * loader/NavigationScheduler.cpp:
3044         (WebCore::ScheduledNavigation::ScheduledNavigation):
3045         (WebCore::ScheduledNavigation::lockHistory):
3046         (WebCore::ScheduledNavigation::lockBackForwardList):
3047         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
3048         (WebCore::ScheduledRedirect::ScheduledRedirect):
3049         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
3050         (WebCore::ScheduledRefresh::ScheduledRefresh):
3051         (WebCore::ScheduledHistoryNavigation::ScheduledHistoryNavigation):
3052         (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
3053         (WebCore::NavigationScheduler::scheduleRedirect):
3054         (WebCore::NavigationScheduler::mustLockBackForwardList):
3055         (WebCore::NavigationScheduler::scheduleLocationChange):
3056         (WebCore::NavigationScheduler::scheduleFormSubmission):
3057         * loader/NavigationScheduler.h:
3058         * loader/SubframeLoader.cpp:
3059         (WebCore::SubframeLoader::requestFrame):
3060         (WebCore::SubframeLoader::requestObject):
3061         (WebCore::SubframeLoader::loadOrRedirectSubframe):
3062         * loader/SubframeLoader.h:
3063         * page/ContextMenuController.cpp:
3064         (WebCore::openNewWindow):
3065         (WebCore::ContextMenuController::contextMenuItemSelected):
3066         * page/DOMWindow.cpp:
3067         (WebCore::DOMWindow::setLocation):
3068         (WebCore::DOMWindow::createWindow):
3069         (WebCore::DOMWindow::open):
3070         * svg/SVGAElement.cpp:
3071         (WebCore::SVGAElement::defaultEventHandler):
3072
3073 2014-04-02  Tim Horton  <timothy_horton@apple.com>
3074
3075         Pool IOSurfaces to help with allocation cost
3076         https://bugs.webkit.org/show_bug.cgi?id=131096
3077         <rdar://problem/15373942>
3078
3079         Reviewed by Simon Fraser.
3080
3081         * WebCore.exp.in:
3082         * WebCore.xcodeproj/project.pbxproj:
3083         
3084         * platform/Timer.h:
3085         (WebCore::TimerBase::startRepeating): Add a std::chrono startRepeating.
3086
3087         * platform/graphics/cg/IOSurfacePool.h: Added.
3088         (WebCore::IOSurfacePool::CachedSurfaceDetails::CachedSurfaceDetails):
3089         (WebCore::IOSurfacePool::CachedSurfaceDetails::resetLastUseTime):
3090         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Removed.
3091         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Removed.
3092         * platform/graphics/cg/IOSurfacePool.cpp: Added.
3093         (WebCore::IOSurfacePool::IOSurfacePool):
3094         (WebCore::IOSurfacePool::sharedPool):
3095         (WebCore::surfaceMatchesParameters):
3096         (WebCore::IOSurfacePool::willAddSurface):
3097         (WebCore::IOSurfacePool::didRemoveSurface):
3098         (WebCore::IOSurfacePool::didUseSurfaceOfSize):
3099         (WebCore::IOSurfacePool::takeSurface):
3100         (WebCore::IOSurfacePool::addSurface):
3101         (WebCore::IOSurfacePool::insertSurfaceIntoPool):
3102         (WebCore::IOSurfacePool::setPoolSize):
3103         (WebCore::IOSurfacePool::tryEvictInUseSurface):
3104         (WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
3105         (WebCore::IOSurfacePool::evict):
3106         (WebCore::IOSurfacePool::collectInUseSurfaces):
3107         (WebCore::IOSurfacePool::markOlderSurfacesPurgeable):
3108         (WebCore::IOSurfacePool::collectionTimerFired):
3109         (WebCore::IOSurfacePool::scheduleCollectionTimer):
3110         (WebCore::IOSurfacePool::discardAllSurfaces):
3111         (WebCore::IOSurfacePool::showPoolStatistics):
3112         Add a pool of IOSurfaces. It behaves as such:
3113
3114             - Keeps up to 64MB of surfaces.
3115             - Keeps unused and in-use surfaces (but never gets more than 1/2 full with the latter)
3116             - Marks surfaces purgeable after they've been unused for 2 seconds.
3117             - Tries to move surfaces from the in-use pool to the unused pool every 500ms.
3118             - Evicts in an LRU-ish fashion, interleaving eviction of the oldest
3119               surfaces and the in-use surfaces (since in-use surfaces are not immediately
3120               useful for the pool, but they are desirous because they were recently used).
3121             - Throws everything away under memory pressure.
3122
3123         * platform/graphics/cocoa/IOSurface.mm:
3124         (IOSurface::create):
3125         Try to grab a surface from the IOSurfacePool.
3126
3127         * platform/ios/MemoryPressureHandlerIOS.mm:
3128         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3129         * platform/mac/MemoryPressureHandlerMac.mm:
3130         (WebCore::MemoryPressureHandler::install):
3131         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3132         * platform/MemoryPressureHandler.cpp:
3133         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3134         Fix some includes, and throw away all surfaces when we're under memory pressure.
3135
3136 2014-04-02  Stephanie Lewis  <slewis@apple.com>
3137
3138         Roll out http://trac.webkit.org/changeset/166144
3139         <rdar://problem/16481284> PLT stops loading on news.google.com
3140
3141         Unreviewed rollout.
3142
3143         Rollout 166144 since it prevents the PLT from completing.
3144
3145         * dom/ContainerNode.cpp:
3146         (WebCore::ContainerNode::suspendPostAttachCallbacks):
3147         (WebCore::ContainerNode::resumePostAttachCallbacks):
3148         (WebCore::ContainerNode::queuePostAttachCallback):
3149         (WebCore::ContainerNode::postAttachCallbacksAreSuspended):
3150         (WebCore::ContainerNode::dispatchPostAttachCallbacks):
3151         * dom/ContainerNode.h:
3152         * dom/Document.cpp:
3153         (WebCore::Document::recalcStyle):
3154         * dom/Element.h:
3155         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
3156         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
3157         * html/HTMLEmbedElement.cpp:
3158         (WebCore::HTMLEmbedElement::parseAttribute):
3159         * html/HTMLFormControlElement.cpp:
3160         (WebCore::focusPostAttach):
3161         (WebCore::HTMLFormControlElement::didAttachRenderers):
3162         (WebCore::updateFromElementCallback):
3163         (WebCore::HTMLFormControlElement::didRecalcStyle):
3164         * html/HTMLFrameOwnerElement.cpp:
3165         (WebCore::needsStyleRecalcCallback):
3166         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
3167         * html/HTMLObjectElement.cpp:
3168         (WebCore::HTMLObjectElement::parseAttribute):
3169         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
3170         (WebCore::HTMLObjectElement::hasValidClassId):
3171         (WebCore::HTMLObjectElement::renderFallbackContent):
3172         * html/HTMLObjectElement.h:
3173         * html/HTMLPlugInImageElement.cpp:
3174         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3175         (WebCore::HTMLPlugInImageElement::createElementRenderer):
3176         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
3177         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
3178         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
3179         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
3180         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
3181         (WebCore::HTMLPlugInImageElement::startLoadingImage):
3182         (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
3183         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
3184         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
3185         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Deleted.
3186         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Deleted.
3187         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Deleted.
3188         (WebCore::HTMLPlugInImageElement::removedFrom): Deleted.
3189         (WebCore::is100Percent): Deleted.
3190         (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Deleted.
3191         * html/HTMLPlugInImageElement.h:
3192         (WebCore::HTMLPlugInImageElement::imageLoader): Deleted.
3193         (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Deleted.
3194         * style/StyleResolveTree.cpp:
3195         (WebCore::Style::needsPseudeElement):
3196         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
3197         (WebCore::Style::attachRenderTree):
3198         (WebCore::Style::updateBeforeOrAfterPseudoElement):
3199         (WebCore::Style::needsPseudoElement): Deleted.
3200         (WebCore::Style::postResolutionCallbackQueue): Deleted.
3201         (WebCore::Style::queuePostResolutionCallback): Deleted.
3202         (WebCore::Style::suspendMemoryCacheClientCalls): Deleted.
3203         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Deleted.
3204         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Deleted.
3205         (WebCore::Style::postResolutionCallbacksAreSuspended): Deleted.
3206         * style/StyleResolveTree.h:
3207
3208 2014-04-02  Jinwoo Song  <jinwoo7.song@samsung.com>
3209
3210         Page should use std::unique_ptr for PointerLockController
3211         https://bugs.webkit.org/show_bug.cgi?id=131098
3212
3213         Reviewed by Anders Carlsson.
3214
3215         Make Page keep a std::unique_ptr to PointerLockController. Store page 
3216         references and return controller references where possible.
3217
3218         * dom/Document.cpp:
3219         (WebCore::Document::prepareForDestruction):
3220         (WebCore::Document::webkitExitPointerLock):
3221         (WebCore::Document::webkitPointerLockElement):
3222         * dom/Element.cpp:
3223         (WebCore::Element::removedFrom):
3224         (WebCore::Element::webkitRequestPointerLock):
3225         * page/Page.cpp:
3226         (WebCore::Page::Page):
3227         * page/Page.h:
3228         (WebCore::Page::pointerLockController):
3229         * page/PointerLockController.cpp:
3230         (WebCore::PointerLockController::PointerLockController):
3231         (WebCore::PointerLockController::requestPointerLock):
3232         (WebCore::PointerLockController::requestPointerUnlock):
3233         (WebCore::PointerLockController::create): Deleted.
3234         * page/PointerLockController.h:
3235
3236 2014-04-02  Dean Jackson  <dino@apple.com>
3237
3238         Load Media Controls js/css from bundle
3239         https://bugs.webkit.org/show_bug.cgi?id=131086
3240
3241         Followup comments from Eric Carlson.
3242
3243         Remove the booleans that were guarding loading the resources.
3244
3245         * rendering/RenderThemeIOS.h:
3246         * rendering/RenderThemeIOS.mm:
3247         (WebCore::RenderThemeIOS::mediaControlsStyleSheet):
3248         (WebCore::RenderThemeIOS::mediaControlsScript):
3249         (WebCore::RenderThemeIOS::RenderThemeIOS):
3250         * rendering/RenderThemeMac.h:
3251         * rendering/RenderThemeMac.mm:
3252         (WebCore::RenderThemeMac::RenderThemeMac):
3253         (WebCore::RenderThemeMac::mediaControlsStyleSheet):
3254         (WebCore::RenderThemeMac::mediaControlsScript):
3255
3256 2014-04-01  Dean Jackson  <dino@apple.com>
3257
3258         Load Media Controls js/css from bundle
3259         https://bugs.webkit.org/show_bug.cgi?id=131086
3260
3261         Reviewed by Eric Carlson.
3262
3263         Rather than embed encoded versions of the JS and CSS files
3264         into C++ source, just load the files directly from the bundle.
3265
3266         * DerivedSources.make: Removed now unnecessary rules.
3267         * WebCore.xcodeproj/project.pbxproj: Copy mediaControls files to the bundle.
3268         * rendering/RenderThemeIOS.h:
3269         * rendering/RenderThemeIOS.mm:
3270         (WebCore::RenderThemeIOS::RenderThemeIOS):
3271         (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Load from the bundle.
3272         (WebCore::RenderThemeIOS::mediaControlsScript): Ditto.
3273         * rendering/RenderThemeMac.h:
3274         * rendering/RenderThemeMac.mm:
3275         (WebCore::RenderThemeMac::RenderThemeMac):
3276         (WebCore::RenderThemeMac::mediaControlsStyleSheet):
3277         (WebCore::RenderThemeMac::mediaControlsScript):
3278
3279 2014-04-02  Daniel Bates  <dabates@apple.com>
3280
3281         Move focus management API from HTMLDocument to Document
3282         https://bugs.webkit.org/show_bug.cgi?id=131079
3283         <rdar://problem/16220103>
3284
3285         Reviewed by Timothy Hatcher.
3286
3287         Merged from Blink (patch by Christophe Dumez):
3288         https://src.chromium.org/viewvc/blink?view=rev&revision=165515
3289
3290         Move hasFocus() and attribute activeElement from interface HTMLDocument
3291         to DOMDocument as per section Focus management APIs of the HTML5 standard:
3292         <http://www.whatwg.org/specs/web-apps/current-work/#focus-management-apis> (1 April 2014).
3293
3294         Test: fast/dom/Document/xml-document-focus.xml
3295
3296         * bindings/objc/PublicDOMInterfaces.h: Moved hasFocus() and property activeElement from
3297         interface DOMHTMLDocument to DOMDocument.
3298         * dom/Document.cpp:
3299         (WebCore::Document::activeElement): Added.
3300         (WebCore::Document::hasFocus): Added.
3301         * dom/Document.h:
3302         * dom/Document.idl:
3303         * html/HTMLDocument.cpp:
3304         (WebCore::HTMLDocument::activeElement): Deleted.
3305         (WebCore::HTMLDocument::hasFocus): Deleted.
3306         * html/HTMLDocument.h:
3307         * html/HTMLDocument.idl:
3308
3309 2014-04-02  Benjamin Poulain  <benjamin@webkit.org>
3310
3311         Refactor the function call generator to take the arguments by value
3312         https://bugs.webkit.org/show_bug.cgi?id=131129
3313
3314         Reviewed by Andreas Kling.
3315
3316         Nothing forces the pointed address to stay alive between setOneArgument/setTwoArguments
3317         and prepareAndCall.
3318
3319         This patch changes FunctionCall to:
3320         -Keep the register by value instead of using pointers.
3321         -Crash at compile time if a register is invalid.
3322
3323         * cssjit/FunctionCall.h:
3324         (WebCore::FunctionCall::FunctionCall):
3325         (WebCore::FunctionCall::setOneArgument):
3326         (WebCore::FunctionCall::setTwoArguments):
3327         (WebCore::FunctionCall::swapArguments):
3328         (WebCore::FunctionCall::prepareAndCall):
3329         * cssjit/RegisterAllocator.h:
3330         (WebCore::RegisterAllocator::isValidRegister):
3331
3332 2014-04-02  Daniel Bates  <dabates@apple.com>
3333
3334         Remove Settings::maximumDecodedImageSize()
3335         https://bugs.webkit.org/show_bug.cgi?id=131057
3336         <rdar://problem/15626368>
3337
3338         Reviewed by Darin Adler.
3339
3340         The setting Settings::maximumDecodedImageSize() and its related logic have various
3341         shortcomings, including the inability to cancel an image load when the estimated
3342         decoded image size exceeds the maximum decoded image size. In the iOS port, this
3343         setting is less useful given image subsampling support. For now, we remove this
3344         setting and its related logic. Should it turn out that such a setting is useful
3345         then we can implement it again taking care to address the shortcomings in the
3346         original design.
3347
3348         * html/HTMLCanvasElement.cpp: For the iOS port, define MaxCanvasArea to be 4580 * 1145
3349         pixels such that the maximum size of the image buffer is 20 MB (assumes 4 bytes per pixel).
3350         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3351         (WebCore::HTMLCanvasElement::createImageBuffer):
3352         * html/HTMLCanvasElement.h:
3353         * html/canvas/CanvasRenderingContext2D.cpp:
3354         (WebCore::CanvasRenderingContext2D::createImageData):
3355         (WebCore::CanvasRenderingContext2D::getImageData):
3356         * loader/cache/CachedImage.cpp:
3357         (WebCore::CachedImage::addIncrementalDataBuffer):
3358         (WebCore::CachedImage::finishLoading):
3359         * loader/cache/CachedImage.h:
3360         * page/Settings.in:
3361
3362 2014-04-02  Martin Hock  <mhock@apple.com>
3363
3364         Unify private browsing with sessions.
3365         https://bugs.webkit.org/show_bug.cgi?id=130099
3366
3367         Reviewed by Alexey Proskuryakov.
3368
3369         Unless otherwise noted, the following consists solely of mechanical changes to replace querying WebCore::Settings::privateBrowsingEnabled() with Page::usesEphemeralSession().
3370
3371         * Modules/webdatabase/DatabaseContext.cpp:
3372         (WebCore::DatabaseContext::allowDatabaseAccess):
3373         * WebCore.exp.in: Remove Settings::setPrivateBrowsingEnabled, add Page::legacyPrivateBrowsingEnabled.
3374         * html/HTMLMediaElement.cpp:
3375         (WebCore::HTMLMediaElement::parseAttribute):
3376         * loader/HistoryController.cpp:
3377         (WebCore::HistoryController::updateForStandardLoad):
3378         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
3379         (WebCore::HistoryController::updateForClientRedirect):
3380         (WebCore::HistoryController::updateForSameDocumentNavigation):
3381         (WebCore::HistoryController::pushState):
3382         (WebCore::HistoryController::replaceState):
3383         * loader/appcache/ApplicationCacheGroup.cpp:
3384         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3385         (WebCore::ApplicationCacheGroup::selectCache):
3386         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3387         (WebCore::ApplicationCacheGroup::update):
3388         * loader/appcache/ApplicationCacheHost.cpp:
3389         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
3390         * loader/icon/IconController.cpp:
3391         (WebCore::IconController::continueLoadWithDecision):
3392         * page/Page.cpp:
3393         (WebCore::Page::Page): Initialize with defaultSessionID.
3394         (WebCore::Page::legacyPrivateBrowsingEnabled): Legacy setting for private browsing.
3395         (WebCore::Page::privateBrowsingStateChanged): Move implementation to setSessionID.
3396         (WebCore::Page::sessionID): Simplify to just return m_sessionID.
3397         (WebCore::Page::setSessionID): Also perform privateBrowsingStateChanged action.a
3398         (WebCore::Page::privateBrowsingStateChanged): Deleted.
3399         (WebCore::Page::checkSubframeCountConsistency): Deleted.
3400         * page/Page.h:
3401         * page/PageConsole.cpp:
3402         (WebCore::PageConsole::addMessage):
3403         (WebCore::PageConsole::messageWithTypeAndLevel):
3404         * page/Settings.cpp: Remove privateBrowsingEnabled setting.
3405         (WebCore::Settings::Settings):
3406         (WebCore::Settings::setPrivateBrowsingEnabled): Page reflects setting using session.
3407         * page/Settings.h:
3408         * plugins/PluginView.cpp:
3409         (WebCore::PluginView::getValue):
3410         * rendering/RenderSearchField.cpp:
3411         (WebCore::RenderSearchField::addSearchResult):
3412         * storage/Storage.cpp:
3413         (WebCore::Storage::isDisabledByPrivateBrowsing):
3414
3415 2014-04-02  Antti Koivisto  <antti@apple.com>
3416
3417         Try to fix test failures.
3418
3419         * platform/graphics/ca/mac/TileGrid.mm:
3420         (WebCore::TileGrid::TileGrid):  Initialize a field.
3421
3422 2014-04-02  Timothy Hatcher  <timothy@apple.com>
3423
3424         Remove Input domain from the Web Inspector protocol.
3425
3426         https://bugs.webkit.org/show_bug.cgi?id=131073
3427
3428         Reviewed by Joseph Pecoraro.
3429
3430         * CMakeLists.txt:
3431         * DerivedSources.make:
3432         * WebCore.vcxproj/WebCore.vcxproj:
3433         * WebCore.vcxproj/WebCore.vcxproj.filters:
3434         * WebCore.xcodeproj/project.pbxproj:
3435         * inspector/InspectorAllInOne.cpp:
3436         * inspector/InspectorController.cpp:
3437         (WebCore::InspectorController::InspectorController):
3438         *