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