Source/JavaScriptCore: Qt build fix. Add a return to make the compiler happy.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-12  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Qt and Windows build fix.
4
5         * page/animation/CSSPropertyAnimation.cpp:
6
7 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
8
9         Encapsulate globals in CSSPropertyAnimation.cpp
10         https://bugs.webkit.org/show_bug.cgi?id=121205
11
12         Reviewed by Antti Koivisto.
13
14         Encapsulated the globals inside a newly added CSSPropertyAnimationWrapperMap. Also removed the circular
15         dependency from ShorthandPropertyWrapper's constructor to CSSPropertyAnimationWrapperMap::instance().
16         The circular dependency still exists in ensurePropertyMap but I'm going to remove it in the bug 121199.
17
18         * page/animation/CSSPropertyAnimation.cpp:
19         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Takes a Vector of longhand wrappers instead of
20         calling wrapperForProperty in the middle of constructing the very table. This circular dependency is now
21         encapsulated in CSSPropertyAnimationWrapperMap::ensurePropertyMap.
22         (WebCore::CSSPropertyAnimationWrapperMap::instance): Added.
23         (WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Renamed from WebCore::wrapperForProperty.
24         (WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Added.
25         (WebCore::CSSPropertyAnimationWrapperMap::size): Added.
26         (WebCore::CSSPropertyAnimationWrapperMap::addPropertyWrapper): Renamed from WebCore::addPropertyWrapper. Also
27         cleaned up boolean logics to use early exits instead of nested ifs.
28         (WebCore::CSSPropertyAnimationWrapperMap::addShorthandProperties): Renamed from WebCore::addShorthandProperties.
29         (WebCore::CSSPropertyAnimationWrapperMap::ensurePropertyMap): Renamed from WebCore::ensurePropertyMap.
30         Added an alias gPropertyWrappers for m_propertyWrappers; this aliasing will be removed in the bug 121199.
31         (WebCore::CSSPropertyAnimation::blendProperties):
32         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
33         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
34         (WebCore::CSSPropertyAnimation::propertiesEqual):
35         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
36         (WebCore::CSSPropertyAnimation::getNumProperties):
37         * page/animation/CSSPropertyAnimation.h:
38         * rendering/style/RenderStyle.h:
39
40 2013-09-12  Anders Carlsson  <andersca@apple.com>
41
42         SharedBuffer::createNSData should return a RetainPtr<NSData>
43         https://bugs.webkit.org/show_bug.cgi?id=121237
44
45         Reviewed by Darin Adler.
46
47         This makes memory management cleared and fixes a leak in PDFDocumentImage::createPDFDocument.
48         We use a RetainPtr subclass as a stopgap measure to prevent code that does [buffer->createNSData() autorelease]
49         from compiling and crashing due to the NSData object being overreleased.
50
51         * loader/ResourceBuffer.h:
52         * loader/mac/ResourceBuffer.mm:
53         (WebCore::ResourceBuffer::createNSData):
54         * platform/SharedBuffer.h:
55         (WebCore::SharedBuffer::NSDataRetainPtr::NSDataRetainPtr):
56         * platform/graphics/mac/PDFDocumentImageMac.mm:
57         (WebCore::PDFDocumentImage::createPDFDocument):
58         * platform/mac/HTMLConverter.mm:
59         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
60         (fileWrapperForURL):
61         * platform/mac/PasteboardMac.mm:
62         (WebCore::fileWrapper):
63         (WebCore::Pasteboard::read):
64         (WebCore::documentFragmentWithRTF):
65         (WebCore::fragmentFromWebArchive):
66         * platform/mac/PlatformPasteboardMac.mm:
67         (WebCore::PlatformPasteboard::setBufferForType):
68         * platform/mac/SharedBufferMac.mm:
69         (WebCore::SharedBuffer::createNSData):
70
71 2013-09-12  Timothy Hatcher  <timothy@apple.com>
72
73         Remove more Timeline stuff we don't use
74         https://bugs.webkit.org/show_bug.cgi?id=121246
75
76         Reviewed by Joseph Pecoraro.
77
78         * inspector/InspectorController.cpp:
79         * inspector/InspectorController.h:
80         * inspector/InspectorDOMDebuggerAgent.cpp:
81         * inspector/InspectorDOMDebuggerAgent.h:
82         * inspector/InspectorProfilerAgent.cpp:
83         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
84         * inspector/InspectorProfilerAgent.h:
85         * inspector/InspectorTimelineAgent.cpp:
86         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
87         * inspector/InspectorTimelineAgent.h:
88
89 2013-09-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
90
91         [EFL] Get rid of layering violations in PasteboardEfl.cpp
92         https://bugs.webkit.org/show_bug.cgi?id=121241
93
94         Reviewed by Darin Adler.
95
96         Get rid of layering violations in PasteboardEfl.cpp. For now, just mimic
97         the Mac port to avoid divergences and leave port-specific functions
98         unimplemented as the EFL port does not support the pasteboard functionality
99         yet.
100
101         No new tests, no behavior change.
102
103         * PlatformEfl.cmake:
104         * editing/Editor.cpp:
105         (WebCore::Editor::pasteAsPlainTextWithPasteboard):
106         (WebCore::Editor::cut):
107         (WebCore::Editor::copy):
108         (WebCore::Editor::copyURL):
109         (WebCore::Editor::copyImage):
110         * editing/Editor.h:
111         * editing/efl/EditorEfl.cpp: Added.
112         (WebCore::Editor::writeSelectionToPasteboard):
113         (WebCore::Editor::writeURLToPasteboard):
114         (WebCore::Editor::writeImageToPasteboard):
115         (WebCore::Editor::readPlainTextFromPasteboard):
116         (WebCore::Editor::pasteWithPasteboard):
117         * page/DragController.cpp:
118         (WebCore::DragController::startDrag):
119         * platform/Pasteboard.h:
120         * platform/efl/PasteboardEfl.cpp:
121
122 2013-09-12  Alberto Garcia  <berto@igalia.com>
123
124         [GTK] Unreviewed build fix after r155635.
125
126         Include DragData.h
127
128         * platform/gtk/PasteboardGtk.cpp:
129
130 2013-09-12  Brent Fulgham  <bfulgham@apple.com>
131
132         [Windows] Build fix after r155635.
133
134         Rubber Stamped by Darin Adler.
135
136         * platform/Pasteboard.h: Add missing compile guards for Windows port.
137
138 2013-09-12  Darin Adler  <darin@apple.com>
139
140         Reorganize Pasteboard.h to make it easier to read, and express plan for future work
141         https://bugs.webkit.org/show_bug.cgi?id=121234
142
143         Reviewed by Anders Carlsson.
144
145         * platform/Pasteboard.h: Move Mac/iOS-specific pasteboard names to the bottom of the
146         file rather than putting them up with forward declarations before the class. Removed
147         unneeded forward class declarations. Changed #if statements about migration to the
148         more modern non-layering-violation API to list platforms not yet migrated, rather than
149         listing platforms that have migrated (Mac). Move conditional code down below the
150         uncondiditional code so it's easier to see what the class is doing. Move layering-
151         violation code down to the bottom too, so it's easier to see the future class without
152         having the design mistakes mixed in. Sort platform-specific sections in alphabetical
153         order instead of random order. Did the destructor in a cleaner way so the #if is out
154         of the way after the class rather than in the class. Removed WebSmartPastePboardType,
155         WebURLPboardType, and WebURLsWithTitlesPboard declarations, since they are only used
156         inside the PasteboardMac.mm source file.
157
158         * platform/ios/PasteboardIOS.mm: Aded a FIXME comment.
159         * platform/mac/PasteboardMac.mm: Made the constants for pasteboard types be actual
160         constants, rather than global variables.
161
162 2013-09-12  Tamas Czene  <tczene@inf.u-szeged.hu>
163
164         [curl] Use utf8 for headers in CurlDownload.
165         https://bugs.webkit.org/show_bug.cgi?id=120413
166
167         Reviewed by Brent Fulgham.
168
169         * platform/network/curl/CurlDownload.cpp:
170         (WebCore::CurlDownload::headerCallback):
171
172 2013-09-12  Peter Gal  <galpeter@inf.u-szeged.hu>
173
174         [curl] Improve multipart response handling
175         https://bugs.webkit.org/show_bug.cgi?id=117735
176
177         Reviewed by Brent Fulgham.
178
179         The multipart/x-mixed-replace mime type in responses are ignored
180         with the curl network backend. To handle such responses the
181         MultipartHandle is introduced which will split the content using
182         the boundary specified by the mime type.
183
184         There are already existing tests (http/tests/multipart).
185
186         * WebCore.vcxproj/WebCore.vcxproj:
187         * WebCore.vcxproj/WebCore.vcxproj.filters:
188         * platform/network/HTTPParsers.cpp:
189         (WebCore::parseHTTPHeader):
190         * platform/network/HTTPParsers.h:
191         * platform/network/ResourceHandleInternal.h:
192         * platform/network/curl/MultipartHandle.cpp: Added.
193         (WebCore::MultipartHandle::extractBoundary):
194         (WebCore::MultipartHandle::matchForBoundary):
195         (WebCore::MultipartHandle::checkForBoundary):
196         (WebCore::MultipartHandle::parseHeadersIfPossible):
197         (WebCore::MultipartHandle::contentReceived):
198         (WebCore::MultipartHandle::processContent):
199         (WebCore::MultipartHandle::contentEnded):
200         (WebCore::MultipartHandle::didReceiveData):
201         (WebCore::MultipartHandle::didReceiveResponse):
202         * platform/network/curl/MultipartHandle.h: Added.
203         (WebCore::MultipartHandle::MultipartHandle):
204         (WebCore::MultipartHandle::~MultipartHandle):
205         * platform/network/curl/ResourceHandleManager.cpp:
206         (WebCore::writeCallback):
207         (WebCore::headerCallback):
208         (WebCore::ResourceHandleManager::downloadTimerCallback):
209
210 2013-09-12  Andreas Kling  <akling@apple.com>
211
212         Remove RenderApplet.
213         <https://webkit.org/b/121231>
214
215         Reviewed by Darin Adler.
216
217         Add a RenderEmbeddedObject::createForApplet(HTMLAppletElement&) and nuke
218         the RenderApplet class from orbit.
219
220 2013-09-12  Brent Fulgham  <bfulgham@apple.com>
221
222         [Windows] Build fix after r155621
223
224         Rubber-stamped by Anders Carlsson.
225
226         See also https://bugs.webkit.org/show_bug.cgi?id=121235 for
227         why this was necessary.
228
229         * css/MediaQueryEvaluator.cpp: Work around VS compiler bug.
230         * dom/make_names.pl: Ditto.
231         * loader/archive/ArchiveFactory.cpp: Ditto.
232         * rendering/svg/SVGPathData.cpp: Ditto.
233
234 2013-09-12  Anders Carlsson  <andersca@apple.com>
235
236         SharedBuffer::createCFData should return RetainPtr<CFDataRef>
237         https://bugs.webkit.org/show_bug.cgi?id=121230
238
239         Reviewed by Darin Adler.
240
241         * loader/ResourceBuffer.cpp:
242         (WebCore::ResourceBuffer::createCFData):
243         * loader/ResourceBuffer.h:
244         * loader/archive/cf/LegacyWebArchive.cpp:
245         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
246         (WebCore::LegacyWebArchive::create):
247         * platform/SharedBuffer.h:
248         * platform/cf/SharedBufferCF.cpp:
249         (WebCore::SharedBuffer::createCFData):
250         * platform/graphics/cg/ImageSourceCG.cpp:
251         (WebCore::ImageSource::setData):
252         * platform/graphics/cg/PDFDocumentImage.cpp:
253         (WebCore::PDFDocumentImage::createPDFDocument):
254         * platform/graphics/mac/FontCustomPlatformData.cpp:
255         (WebCore::createFontCustomPlatformData):
256         * platform/mac/SharedBufferMac.mm:
257         (WebCore::SharedBuffer::createCFData):
258
259 2013-09-12  Zoltan Horvath  <zoltan@webkit.org>
260
261         Move LineInfo class into LineInfo.h
262         https://bugs.webkit.org/show_bug.cgi?id=121191
263
264         Reviewed by David Hyatt.
265
266         No new tests, no behavior change.
267
268         * GNUmakefile.list.am:
269         * Target.pri:
270         * WebCore.vcxproj/WebCore.vcxproj:
271         * WebCore.xcodeproj/project.pbxproj:
272         * rendering/LineInfo.h: Added.
273         (WebCore::LineInfo::LineInfo):
274         (WebCore::LineInfo::isFirstLine):
275         (WebCore::LineInfo::isLastLine):
276         (WebCore::LineInfo::isEmpty):
277         (WebCore::LineInfo::previousLineBrokeCleanly):
278         (WebCore::LineInfo::floatPaginationStrut):
279         (WebCore::LineInfo::runsFromLeadingWhitespace):
280         (WebCore::LineInfo::resetRunsFromLeadingWhitespace):
281         (WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
282         (WebCore::LineInfo::setFirstLine):
283         (WebCore::LineInfo::setLastLine):
284         (WebCore::LineInfo::setEmpty):
285         (WebCore::LineInfo::setPreviousLineBrokeCleanly):
286         (WebCore::LineInfo::setFloatPaginationStrut):
287         * rendering/RenderBlockLineLayout.cpp:
288
289 2013-09-12  Bem Jones-Bey  <bjonesbe@adobe.com>
290
291         [CSS Shapes] Remove unnecessarily complex template from ShapeInfo classes
292         https://bugs.webkit.org/show_bug.cgi?id=121213
293
294         Reviewed by Darin Adler.
295
296         These classes were trying to be way too clever, and as a result were
297         hard to read and hard to debug. Replace the complex templated method
298         calls with virtual methods to make these classes much easier to
299         understand and maintain.
300
301         No new tests, no behavior change.
302
303         * rendering/shapes/ShapeInfo.cpp:
304         (WebCore::::computedShape):
305         (WebCore::::computeSegmentsForLine):
306         * rendering/shapes/ShapeInfo.h:
307         * rendering/shapes/ShapeInsideInfo.cpp:
308         (WebCore::ShapeInsideInfo::getShapeValue):
309         * rendering/shapes/ShapeInsideInfo.h:
310         (WebCore::ShapeInsideInfo::computeSegmentsForLine):
311         (WebCore::ShapeInsideInfo::ShapeInsideInfo):
312         * rendering/shapes/ShapeOutsideInfo.cpp:
313         (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
314         (WebCore::ShapeOutsideInfo::getShapeValue):
315         * rendering/shapes/ShapeOutsideInfo.h:
316         (WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
317
318 2013-09-12  Zoltan Horvath  <zoltan@webkit.org>
319
320         [CSS Shapes] Turn shape's logicalwidth/height into a LayoutSize
321         https://bugs.webkit.org/show_bug.cgi?id=121187
322
323         Reviewed by David Hyatt.
324
325         No new tests, no behavior change.
326
327         * rendering/shapes/ShapeInfo.cpp:
328         (WebCore::::computedShape):
329         * rendering/shapes/ShapeInfo.h:
330         (WebCore::ShapeInfo::setShapeSize):
331         (WebCore::ShapeInfo::shapeContainingBlockHeight):
332
333 2013-09-12  Darin Adler  <darin@apple.com>
334
335         Move layering-violating code from Pasteboard::plainText into Editor (Mac only at first)
336         https://bugs.webkit.org/show_bug.cgi?id=121075
337
338         Reviewed by Anders Carlsson.
339
340         * editing/Editor.cpp:
341         (WebCore::Editor::pasteAsPlainTextBypassingDHTML): Pass pasteboard as a reference.
342         (WebCore::Editor::pasteAsPlainTextWithPasteboard): Use readPlainTextFromPasteboard
343         for Mac. Also update to take a reference.
344         (WebCore::Editor::paste): Pass pasteboard as a reference.
345         (WebCore::Editor::pasteAsPlainText): Ditto.
346         * editing/Editor.h: Ditto.
347
348         * editing/mac/EditorMac.mm:
349         (WebCore::Editor::readSelectionFromPasteboard): Pass pasteboard as a reference.
350         (WebCore::Editor::readPlainTextFromPasteboard): Added. The declaration of this
351         was added (by mistake) in an earlier patch. This has code that used to be inside
352         Pasteboard::plainText.
353
354         * platform/Pasteboard.h: Added PasteboardPlainText. Reorganized functions in the
355         Pasteboard class and added some FIXMEs. Sorted platforms alphabetically and grouped
356         functions together and data members separate from them.
357
358         * platform/mac/DragDataMac.mm:
359         (WebCore::DragData::asPlainText): Updated to call readPlainTextFromPasteboard.
360         (WebCore::DragData::asURL): Tweaked style of unused parameter.
361
362         * platform/mac/PasteboardMac.mm:
363         (WebCore::Pasteboard::read): Renamed this from plainText, and refactored so that
364         the data goes out in the PasteboardPlainText structure.
365
366 2013-09-12  Gurpreet Kaur  <k.gurpreet@samsung.com>
367
368         CSS Unit vw in border-width maps to 0px.
369         https://bugs.webkit.org/show_bug.cgi?id=109229
370
371         Reviewed by Darin Adler.
372
373         Border and outline properties were not applied incase
374         its values were given in vh/vw units.
375
376         Tests: fast/css/viewport-height-border.html
377                fast/css/viewport-height-outline.html
378                fast/css/viewport-width-border.html
379                fast/css/viewport-width-outline.html
380
381         * css/CSSPrimitiveValue.cpp:
382         (WebCore::CSSPrimitiveValue::computeLengthDouble):
383         Added case CSS_VH and CSS_VW. 
384         * css/CSSPrimitiveValue.h:
385         (WebCore::CSSPrimitiveValue::isViewportPercentageWidth):
386         (WebCore::CSSPrimitiveValue::isViewportPercentageHeight):
387         Added APIs to check the unit type(CSS_VW and CSS_VH). 
388         * css/DeprecatedStyleBuilder.cpp:
389         (WebCore::ApplyPropertyComputeLength::applyValue):
390         Calculating the border values which has been specified
391         in vh/vw units.The vh/vw units are calcultated as percent
392         of viewport height and viewport width respectively.
393
394 2013-09-12  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
395
396         [Coordinated Graphics] Fix the build on MacOS 10.9
397         https://bugs.webkit.org/show_bug.cgi?id=121225
398
399         Reviewed by Darin Adler.
400
401         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
402
403 2013-09-12  Mark Lam  <mark.lam@apple.com>
404
405         Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
406         https://bugs.webkit.org/show_bug.cgi?id=121214.
407
408         Reviewed by Geoffrey Garen.
409
410         No new tests.
411
412         Also changed the Inspector's JavaScriptCallFrame to get the sourceID and
413         position info from its DebuggerCallFrame instead of caching those values.
414
415         * bindings/js/JavaScriptCallFrame.cpp:
416         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
417         * bindings/js/JavaScriptCallFrame.h:
418         (WebCore::JavaScriptCallFrame::create):
419         (WebCore::JavaScriptCallFrame::invalidate):
420         (WebCore::JavaScriptCallFrame::sourceID):
421         (WebCore::JavaScriptCallFrame::position):
422         (WebCore::JavaScriptCallFrame::line):
423         (WebCore::JavaScriptCallFrame::column):
424         (WebCore::JavaScriptCallFrame::update):
425         * bindings/js/ScriptDebugServer.cpp:
426         (WebCore::ScriptDebugServer::createCallFrame):
427         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
428         (WebCore::ScriptDebugServer::callEvent):
429         (WebCore::ScriptDebugServer::atStatement):
430         (WebCore::ScriptDebugServer::returnEvent):
431         (WebCore::ScriptDebugServer::exception):
432         (WebCore::ScriptDebugServer::willExecuteProgram):
433         (WebCore::ScriptDebugServer::didExecuteProgram):
434         (WebCore::ScriptDebugServer::didReachBreakpoint):
435         * bindings/js/ScriptDebugServer.h:
436         * bindings/js/WorkerScriptDebugServer.cpp:
437         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
438         * bindings/js/WorkerScriptDebugServer.h:
439
440 2013-09-12  peavo@outlook.com  <peavo@outlook.com>
441
442         [WinCairo] Compile errors, missing include.
443         https://bugs.webkit.org/show_bug.cgi?id=121222
444
445         Reviewed by Brent Fulgham.
446
447         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Include required header.
448         * platform/win/DragImageCairoWin.cpp: Include required header.
449
450 2013-09-12  Vivek Galatage  <vivek.vg@samsung.com>
451
452         XMLSerializer.serializeToString() should throw exception for invalid node value.
453         https://bugs.webkit.org/show_bug.cgi?id=121209
454
455         Reviewed by Darin Adler.
456
457         FF and Opera 12 (pre blink/webkit) throw exception in case the node value is invalid.
458         Blink sends an empty string as the result of serializeToString operation with invalid node.
459         We should match with other browsers for throwing it as an exception.
460
461         Blink review URL: https://chromiumcodereview.appspot.com/23532055/
462
463         Test: fast/dom/xmlserializer-serialize-to-string-exception.html
464
465         * xml/XMLSerializer.cpp:
466         (WebCore::XMLSerializer::serializeToString):
467
468 2013-09-12  Zalan Bujtas  <zalan@apple.com>
469
470         Crash in ScrollingStateStickyNode::updateConstraints
471         https://bugs.webkit.org/show_bug.cgi?id=119638
472
473         Reviewed by Simon Fraser.
474
475         Ensure when a scrolling state node is removed from the state tree,
476         we remove both the current node and all its children from the
477         associated m_stateNodeMap lookup table.
478
479         Test: fast/css/sticky/multiple-layers-sticky-crash.html
480
481         * page/scrolling/ScrollingStateNode.cpp:
482         (WebCore::ScrollingStateNode::removeChild):
483         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
484         * page/scrolling/ScrollingStateNode.h:
485
486 2013-09-12  Zalan Bujtas  <zalan@apple.com>
487
488         REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
489         https://bugs.webkit.org/show_bug.cgi?id=101047
490
491         Reviewed by Simon Fraser.
492
493         Compositing layers keep track of ancestors' clipping by constructing the RenderLayerBacking::m_ancestorClippingLayer.
494         It helps setting up the proper clipping context for the corresponding graphics layer.
495         When a RenderObject's clipping style changes, it needs to propagate this change not only
496         to the associated RenderLayer, but also to the descendants', if applicable.
497         Before r132516, it was mainly covered by initiating full style recalcs, which ensured that
498         style recalc on the descendant rendering tree took care of creating/destroying
499         RenderLayerBacking::m_ancestorClippingLayer at every compositing layer node. Without the full
500         recalc, the clipping of the compositing render layers and the corresponding render subtrees can get out of sync.
501         This patch updates the clipping context on the descendant subtree, when the clipping behaviour
502         changes on a render node.
503
504         Tests: compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html
505                compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html
506
507         * rendering/RenderLayer.cpp:
508         (WebCore::RenderLayer::updateDescendantClippingContext):
509         (WebCore::RenderLayer::styleChanged):
510         * rendering/RenderLayer.h:
511         * rendering/RenderLayerBacking.cpp:
512         (WebCore::RenderLayerBacking::~RenderLayerBacking):
513         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
514         (WebCore::RenderLayerBacking::updateAncestorClippingLayer):
515         (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
516         * rendering/RenderLayerBacking.h:
517
518 2013-09-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
519
520         Remove home-brewed nullptr
521         https://bugs.webkit.org/show_bug.cgi?id=119624
522
523         Reviewed by Anders Carlsson.
524
525         The standard C++11 nullptr and std::nullptr_t type should be used now.
526
527         * bindings/js/JSDOMBinding.h:
528
529 2013-09-12  Samuel White  <samuel_white@apple.com>
530
531         <meter> element text value exposed as AXTitle; should be exposing AXValueDescription
532         https://bugs.webkit.org/show_bug.cgi?id=117651
533
534         Reviewed by Mario Sanchez Prada.
535
536         No new tests, updated accessibility/meter-element to handle platform specific output.
537
538         * accessibility/AccessibilityObject.cpp:
539         (WebCore::AccessibilityObject::isMeter):
540         * accessibility/AccessibilityObject.h:
541         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
542         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
543
544 2013-09-12  Santosh Mahto  <santosh.ma@samsung.com>
545
546         class WeekInputType invokes wrong constructor
547         https://bugs.webkit.org/show_bug.cgi?id=120768
548
549         Reviewed by Andreas Kling.
550
551         Correcting wrong constuctor invocation.
552
553         * html/WeekInputType.h:
554         (WebCore::WeekInputType::WeekInputType):
555
556 2013-09-12  Samuel White  <samuel_white@apple.com>
557
558         AX: Self-referencing aria-labelledby only uses contents.
559         https://bugs.webkit.org/show_bug.cgi?id=120814
560
561         Reviewed by Mario Sanchez Prada.
562
563         Implemented additional 'Text Alternative Computation' steps documented at:
564         http://www.w3.org/WAI/PF/aria/complete#textalternativecomputation. This allows us to remove
565         our raw text node iteration that was previously forcing us to do our computation incorrectly.
566         Element content is now sourced using textUnderElement (step 2C of the computation).
567
568         Test: accessibility/self-referencing-aria-labelledby.html
569
570         * accessibility/AccessibilityNodeObject.cpp:
571         (WebCore::accessibleNameForNode):
572         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
573
574 2013-09-12  Commit Queue  <commit-queue@webkit.org>
575
576         Unreviewed, rolling out r155597.
577         http://trac.webkit.org/changeset/155597
578         https://bugs.webkit.org/show_bug.cgi?id=121220
579
580         broke windows build because there's no ews :( (Requested by
581         thorton on #webkit).
582
583         * WebCore.exp.in:
584         * platform/graphics/BitmapImage.cpp:
585         (WebCore::BitmapImage::isBitmapImage):
586         * platform/graphics/BitmapImage.h:
587         (WebCore::BitmapImage::create):
588         * platform/graphics/CrossfadeGeneratedImage.cpp:
589         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
590         (WebCore::CrossfadeGeneratedImage::drawPattern):
591         * platform/graphics/CrossfadeGeneratedImage.h:
592         (WebCore::CrossfadeGeneratedImage::setContainerSize):
593         (WebCore::CrossfadeGeneratedImage::usesContainerSize):
594         (WebCore::CrossfadeGeneratedImage::hasRelativeWidth):
595         (WebCore::CrossfadeGeneratedImage::hasRelativeHeight):
596         (WebCore::CrossfadeGeneratedImage::size):
597         * platform/graphics/GeneratedImage.h:
598         (WebCore::GeneratedImage::hasSingleSecurityOrigin):
599         (WebCore::GeneratedImage::setContainerSize):
600         (WebCore::GeneratedImage::usesContainerSize):
601         (WebCore::GeneratedImage::hasRelativeWidth):
602         (WebCore::GeneratedImage::hasRelativeHeight):
603         (WebCore::GeneratedImage::size):
604         (WebCore::GeneratedImage::destroyDecodedData):
605         (WebCore::GeneratedImage::decodedSize):
606         * platform/graphics/GeneratorGeneratedImage.cpp:
607         (WebCore::GeneratorGeneratedImage::draw):
608         (WebCore::GeneratorGeneratedImage::drawPattern):
609         * platform/graphics/GeneratorGeneratedImage.h:
610         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
611         * svg/graphics/SVGImage.h:
612         (WebCore::SVGImage::isSVGImage):
613         (WebCore::SVGImage::usesContainerSize):
614         (WebCore::SVGImage::destroyDecodedData):
615         (WebCore::SVGImage::decodedSize):
616         * svg/graphics/SVGImageForContainer.h:
617         (WebCore::SVGImageForContainer::destroyDecodedData):
618         (WebCore::SVGImageForContainer::decodedSize):
619
620 2013-09-12  Andreas Kling  <akling@apple.com>
621
622         RenderWidget elements are always HTMLFrameOwnerElement subclasses.
623         <https://webkit.org/b/121217>
624
625         Reviewed by Antti Koivisto.
626
627         Make RenderWidget constructor take HTMLFrameOwnerElement* and update subclasses
628         with even tighter types where possible.
629
630         Also added RenderWidget::frameOwnerElement() and deleted element().
631         Removed a handful of unnecessary type checks that were exposed by this.
632
633 2013-09-11  Tim Horton  <timothy_horton@apple.com>
634
635         Apply OVERRIDE and FINAL to Image subclasses and clean them up
636         https://bugs.webkit.org/show_bug.cgi?id=121086
637
638         Reviewed by Alexey Proskuryakov.
639
640         Everything other than the copious application of OVERRIDE and FINAL
641         is explicitly called out below.
642
643         * WebCore.exp.in:
644         Export the correct version of getCGImageRef for use by WebKit2.
645
646         * platform/graphics/BitmapImage.cpp:
647         * platform/graphics/BitmapImage.h:
648         Drive-by inline isBitmapImage.
649         Move create(HBITMAP) to be near the other create() functions.
650         Move all of the members and quite a few functions from protected to private.
651         Devirtualize frameCount().
652         Move notSolidColor() near the other solid color functions.
653
654         * platform/graphics/CrossfadeGeneratedImage.cpp:
655         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
656         (WebCore::CrossfadeGeneratedImage::drawPattern):
657         * platform/graphics/GeneratorGeneratedImage.cpp:
658         (WebCore::GeneratorGeneratedImage::draw):
659         (WebCore::GeneratorGeneratedImage::drawPattern):
660         Use size() and setContainerSize() instead of directly accessing a
661         superclass' (now private, previously protected) members.
662
663         * platform/graphics/CrossfadeGeneratedImage.h:
664         * platform/graphics/GeneratedImage.h:
665         Make m_size private, I don't think we do protected members.
666         
667         * platform/graphics/GeneratorGeneratedImage.h:
668         Make all the members private.
669
670         * svg/graphics/SVGImage.h:
671         * svg/graphics/SVGImageForContainer.h:
672
673 2013-09-11  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
674
675         Canvas fillText and measureText handle ideographic spaces differently
676         https://bugs.webkit.org/show_bug.cgi?id=108881
677
678         Reviewed by Darin Adler.
679
680         According to spec for text preparation algorithm
681         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
682         all the space characters mentioned in the spec
683         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
684         should be replaced by U+0020 space character.
685         The canvas functions fillText and measureText should run the text preparation algorithm.
686         This patch modifies the canvas functions drawTextInternal and measureText to conform to the above spec.
687
688         Tests: fast/canvas/canvas-measureText-ideographicSpace.html
689
690         * html/canvas/CanvasRenderingContext2D.cpp:
691         (WebCore::shouldSpaceBeReplaced):
692         (WebCore::replaceCharacterInString):
693         (WebCore::CanvasRenderingContext2D::measureText):
694         (WebCore::CanvasRenderingContext2D::drawTextInternal):
695
696 2013-09-11  Andreas Kling  <akling@apple.com>
697
698         Fix Windows build.
699
700         * rendering/RenderingAllInOne.cpp:
701
702 2013-09-11  Andreas Kling  <akling@apple.com>
703
704         Merge RenderPart into RenderWidget.
705         <https://webkit.org/b/121200>
706
707         Reviewed by Anders Carlsson.
708
709         Remove the RenderPart class and move its functionality into RenderWidget.
710         It was acting as a pointless extra layer between RenderWidget and renderers
711         for embedded objects, frames and iframes.
712
713 2013-09-11  Geoffrey Garen  <ggaren@apple.com>
714
715         Removed some unused functions from the debugger interface
716         https://bugs.webkit.org/show_bug.cgi?id=121194
717
718         Reviewed by Joseph Pecoraro.
719
720         We plan to use the "evaluate" API and debugger activation property access for all the features we need.
721
722         * inspector/JavaScriptCallFrame.idl: These are the interfaces I removed.
723
724         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
725         * inspector/InjectedScript.cpp:
726         * inspector/InjectedScript.h:
727         * inspector/InjectedScriptSource.js:
728         * inspector/Inspector.json:
729         * inspector/InspectorDebuggerAgent.cpp:
730         (WebCore::InspectorDebuggerAgent::setScriptSource):
731         * inspector/InspectorDebuggerAgent.h:
732         * inspector/JavaScriptCallFrame.idl:
733         * inspector/front-end/RemoteObject.js:
734         (WebInspector.RemoteObject.prototype.):
735         (WebInspector.RemoteObject.prototype.setPropertyValue): These files are mechanical removals of code that used
736         or implemented the interfaces I removed.
737
738 2013-09-11  Vivek Galatage  <vivek.vg@samsung.com>
739
740         DOMParser.parseFromString() should support creating HTML Document with mime-type text/html
741         https://bugs.webkit.org/show_bug.cgi?id=120826
742
743         Reviewed by Darin Adler.
744
745         The specification http://domparsing.spec.whatwg.org/#the-domparser-interface for DOMParser.parseFromString()
746         allows the document creation if the mimeType is one of the supported types:
747         ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"]
748
749         Also script elements get marked unexecutable and the contents of noscript get parsed as markup.
750
751         blink review URL: https://codereview.chromium.org/23903014/
752
753         Test: fast/dom/domparser-parsefromstring-mimetype-support.html
754
755         * xml/DOMParser.cpp:
756         (WebCore::DOMParser::parseFromString):
757
758 2013-09-11  Hans Muller  <hmuller@adobe.com>
759
760         [CSS Shapes] Improve the performance of image valued shapes
761         https://bugs.webkit.org/show_bug.cgi?id=120211
762
763         Reviewed by Alexandru Chiculita.
764
765         Replaced the implementation of RasterShapeIntervals with one based on the
766         new ShapeInterval<int> class. This eliminates the dependency the Region class
767         and delivers a 10X layout speedup for large image valued shapes.
768
769         This a just an implementation refactoring, no new tests were needed.
770
771         * rendering/shapes/RasterShape.cpp:
772         (WebCore::RasterShapeIntervals::appendInterval): Renamed this method, it was called addInterval().
773         (WebCore::shapeIntervalsContain):
774         (WebCore::RasterShapeIntervals::contains):
775         (WebCore::RasterShapeIntervals::getIntervalsInLine):
776         (WebCore::compareX1):
777         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
778         (WebCore::RasterShapeIntervals::getIncludedIntervals):
779         (WebCore::RasterShapeIntervals::getExcludedIntervals):
780         (WebCore::RasterShape::getExcludedIntervals):
781         (WebCore::RasterShape::getIncludedIntervals):
782         * rendering/shapes/RasterShape.h:
783         (WebCore::RasterShapeIntervals::RasterShapeIntervals): The constructor now takes a size argument which is used to allocate IntShapeIntervals storage.
784         (WebCore::RasterShapeIntervals::size):
785         (WebCore::RasterShapeIntervals::bounds):
786         (WebCore::RasterShapeIntervals::isEmpty):
787         (WebCore::RasterShapeIntervals::getIntervals):
788         * rendering/shapes/Shape.cpp:
789         (WebCore::Shape::createShape): Use appendInterval() instead of addInterval() (see above) and the new RasterShapeIntervals constructor.
790
791 2013-09-11  Eric Carlson  <eric.carlson@apple.com>
792
793         [MediaStream API] Updating NavigatorUserMediaError to match the spec
794         https://bugs.webkit.org/show_bug.cgi?id=120880
795
796         Reviewed by Darin Adler.
797         
798         Merge https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341
799         by Tommy Widenflycht.
800
801         The Blink change did not have any test changes because they don't appear to have any tests 
802         for NavigatorUserMediaError. I can't add tests now because the MediaStream feature isn't enabled 
803         yet, so https://bugs.webkit.org/show_bug.cgi?id=121182 tracks adding tests.
804
805         * Modules/mediastream/NavigatorUserMediaError.h:
806         (WebCore::NavigatorUserMediaError::create):
807         (WebCore::NavigatorUserMediaError::name):
808         (WebCore::NavigatorUserMediaError::message):
809         (WebCore::NavigatorUserMediaError::constraintName):
810         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
811         * Modules/mediastream/NavigatorUserMediaError.idl:
812         * Modules/mediastream/UserMediaRequest.cpp:
813         (WebCore::UserMediaRequest::fail):
814         (WebCore::UserMediaRequest::failConstraint):
815         * Modules/mediastream/UserMediaRequest.h:
816
817 2013-09-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
818
819         MediaStream API: Remove LocalMediaStream
820         https://bugs.webkit.org/show_bug.cgi?id=120875
821
822         blink merge: https://chromium.googlesource.com/chromium/blink/+/81643ee3fe048a64fa8931132e1294fa2c8e821a
823
824         Reviewed by Eric Carlson.
825
826         Existing tests were updated.
827
828         * CMakeLists.txt:
829         * DerivedSources.make:
830         * GNUmakefile.list.am:
831         * Modules/mediastream/LocalMediaStream.cpp: Removed.
832         * Modules/mediastream/LocalMediaStream.h: Removed.
833         * Modules/mediastream/LocalMediaStream.idl: Removed.
834         * Modules/mediastream/MediaStream.cpp:
835         (WebCore::MediaStream::stop):
836         * Modules/mediastream/MediaStream.h:
837         * Modules/mediastream/MediaStream.idl:
838         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h:
839         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
840         * Modules/mediastream/UserMediaRequest.cpp:
841         (WebCore::UserMediaRequest::succeed):
842         * Modules/mediastream/UserMediaRequest.h:
843         * Modules/webaudio/AudioContext.cpp:
844         (WebCore::AudioContext::createMediaStreamSource):
845         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
846         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
847         * WebCore.xcodeproj/project.pbxproj:
848         * dom/EventTarget.h:
849         * dom/EventTargetFactory.in:
850         * platform/mediastream/MediaStreamDescriptor.h:
851
852 2013-09-11  Timothy Hatcher  <timothy@apple.com>
853
854         Remove PlatformInstrumentation since we don't show decode or resize in the new Web Inspector
855         https://bugs.webkit.org/show_bug.cgi?id=121181
856
857         Reviewed by Joseph Pecoraro.
858
859         * CMakeLists.txt:
860         * GNUmakefile.list.am:
861         * Target.pri:
862         * WebCore.order:
863         * WebCore.vcxproj/WebCore.vcxproj:
864         * WebCore.vcxproj/WebCore.vcxproj.filters:
865         * WebCore.xcodeproj/project.pbxproj:
866         * inspector/InspectorTimelineAgent.cpp:
867         (WebCore::InspectorTimelineAgent::willPaint):
868         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
869         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
870         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
871         (WebCore::InspectorTimelineAgent::clearRecordStack):
872         * inspector/InspectorTimelineAgent.h:
873         * platform/PlatformInstrumentation.cpp: Removed.
874         * platform/PlatformInstrumentation.h: Removed.
875         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
876         (WebCore::BMPImageDecoder::frameBufferAtIndex):
877         * platform/image-decoders/gif/GIFImageDecoder.cpp:
878         (WebCore::GIFImageDecoder::frameBufferAtIndex):
879         * platform/image-decoders/ico/ICOImageDecoder.cpp:
880         (WebCore::ICOImageDecoder::frameBufferAtIndex):
881         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
882         (WebCore::JPEGImageDecoder::frameBufferAtIndex):
883         * platform/image-decoders/png/PNGImageDecoder.cpp:
884         (WebCore::PNGImageDecoder::frameBufferAtIndex):
885         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
886         (WebCore::WEBPImageDecoder::frameBufferAtIndex):
887
888 2013-09-11  Brent Fulgham  <bfulgham@apple.com>
889
890         [Windows] Avoid converting from IntSize->SIZE->IntSize.
891         https://bugs.webkit.org/show_bug.cgi?id=121180
892
893         Reviewed by Anders Carlsson.
894
895         * platform/graphics/BitmapImage.h: Take const IntSize* as
896         argument, rather than LPSIZE.
897         * platform/graphics/Image.h: Ditto.
898         (WebCore::Image::getHBITMAPOfSize):
899         * platform/graphics/win/ImageCGWin.cpp:
900         (WebCore::BitmapImage::getHBITMAPOfSize): Use passed-in
901         IntSize, rather than converting from SIZE.
902         * platform/graphics/win/ImageCairoWin.cpp:
903         (WebCore::BitmapImage::getHBITMAPOfSize): Ditto.
904
905 2013-09-11  Zoltan Horvath  <zoltan@webkit.org>
906
907         Unreviewed debug build fix after r155567.
908
909         * rendering/LineWidth.cpp:
910         (WebCore::LineWidth::LineWidth):
911
912 2013-09-11  Zoltan Horvath  <zoltan@webkit.org>
913
914         Move LineWidth out of RenderBlockLineLayout
915         https://bugs.webkit.org/show_bug.cgi?id=121107
916
917         Reviewed by David Hyatt.
918
919         Move LineWidth class and related code into LineWidth.{h,cpp}.
920
921         No new tests, no behavior change.
922
923         * CMakeLists.txt:
924         * GNUmakefile.list.am:
925         * Target.pri:
926         * WebCore.vcxproj/WebCore.vcxproj:
927         * WebCore.xcodeproj/project.pbxproj:
928         * rendering/LineWidth.cpp: Added.
929         (WebCore::LineWidth::applyOverhang):
930         (WebCore::LineWidth::fitBelowFloats):
931         * rendering/LineWidth.h: Added.
932         (WebCore::logicalHeightForLine):
933         (WebCore::LineWidth::LineWidth):
934         (WebCore::LineWidth::fitsOnLine):
935         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
936         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
937         (WebCore::LineWidth::currentWidth):
938         (WebCore::LineWidth::uncommittedWidth):
939         (WebCore::LineWidth::committedWidth):
940         (WebCore::LineWidth::availableWidth):
941         (WebCore::LineWidth::addUncommittedWidth):
942         (WebCore::LineWidth::commit):
943         (WebCore::LineWidth::setTrailingWhitespaceWidth):
944         (WebCore::LineWidth::shouldIndentText):
945         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
946         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
947         (WebCore::LineWidth::updateAvailableWidth):
948         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
949         * rendering/RenderBlockLineLayout.cpp:
950
951 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
952
953         HTMLEntityTable could use char to reduce binary size
954         https://bugs.webkit.org/show_bug.cgi?id=121176
955
956         Reviewed by Anders Carlsson.
957
958         Use LChar instead.
959
960         * html/parser/HTMLEntityParser.cpp:
961         (WebCore::HTMLEntityParser::consumeNamedEntity):
962         * html/parser/HTMLEntityTable.h:
963         (WebCore::HTMLEntityTableEntry::lastCharacter):
964         * html/parser/create-html-entity-table:
965
966 2013-09-11  Brent Fulgham  <bfulgham@apple.com>
967
968         [Windows] Revise GDI Create Functions to use GDIObject Smart Pointer.
969         https://bugs.webkit.org/show_bug.cgi?id=121100
970
971         Reviewed by Anders Carlsson.
972
973         * platform/graphics/FontPlatformData.h: Use GDIObject instead of bare pointer.
974         * platform/graphics/win/FontCacheWin.cpp:
975         (WebCore::createGDIFont): No longer need to leak the pointer; use move semantic
976         to pass ownership to FontPlatformData.
977         (WebCore::FontCache::createFontPlatformData):
978         * platform/graphics/win/FontCustomPlatformData.cpp:
979         (WebCore::FontCustomPlatformData::fontPlatformData): Use move operation.
980         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
981         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
982         * platform/graphics/win/FontPlatformDataCGWin.cpp:
983         (WebCore::FontPlatformData::FontPlatformData): Ditto.
984         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
985         (WebCore::FontPlatformData::FontPlatformData): Ditto.
986         * platform/graphics/win/FontPlatformDataWin.cpp:
987         (WebCore::FontPlatformData::FontPlatformData): Ditto.
988         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
989         (WebCore::GlyphPage::fill): Use HWndDC smart pointer instead of bare HDC.
990         * platform/graphics/win/SimpleFontDataWin.cpp:
991         (WebCore::SimpleFontData::platformCreateScaledFontData): Use move operation.
992         * platform/win/DragImageCGWin.cpp:
993         (WebCore::allocImage): Change to use GDIObject.
994         (WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
995         (WebCore::createDragImageFromImage): Ditto.
996         * platform/win/DragImageCairoWin.cpp:
997         (WebCore::allocImage): Change to use GDIObject.
998         (WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
999         (WebCore::createDragImageFromImage): Ditto.
1000         * platform/win/DragImageWin.cpp:
1001         (WebCore::createDragImageForLink): Update for GDIObject.
1002         * platform/win/PopupMenuWin.cpp:
1003         (WebCore::PopupMenuWin::PopupMenuWin): Switch to GDIObject.
1004         (WebCore::PopupMenuWin::~PopupMenuWin): Remove uneeded deallocs.
1005         (WebCore::PopupMenuWin::paint): Update for GDIObject.
1006         * platform/win/PopupMenuWin.h: Use smart pointers instead of bare GDI objects.
1007
1008 2013-09-11  Patrick Gansterer  <paroga@webkit.org>
1009
1010         Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792.
1011         https://bugs.webkit.org/show_bug.cgi?id=121159
1012
1013         Reviewed by Simon Fraser.
1014
1015         CSSPropertyAnimation::blendProperties() is available always
1016         and needs to be called to make the animations work.
1017
1018         * page/animation/ImplicitAnimation.cpp:
1019         (WebCore::ImplicitAnimation::animate):
1020         * page/animation/KeyframeAnimation.cpp:
1021         (WebCore::KeyframeAnimation::animate):
1022
1023 2013-09-11  David Hyatt  <hyatt@apple.com>
1024
1025         Move all collapsing margin code out of RenderBlock and into RenderBlockFlow.
1026         https://bugs.webkit.org/show_bug.cgi?id=121049
1027
1028         Reviewed by Dean Jackson.
1029
1030         This patch begins the migration of the rare data struct of RenderBlock into
1031         RenderBlockFlow. During this process we will temporarily have rare data structs
1032         in both places, but ultimately all of the members are going to move down into
1033         RenderBlockFlow, and if any don't, they will get forced into a hash.
1034         
1035         For this patch, the margin information is being shifted out of RenderBlock and into
1036         RenderBlockFlow. Any functions that refer to MarginValues or to MarginInfo also got
1037         moved down into RenderBlockFlow. Most of block child layout is now in RenderBlockFlow
1038         after this patch.
1039         
1040         Note that in many cases the code didn't simply move. There is some type tightening
1041         that happened as well, i.e., places that look for RenderBlock can now look for
1042         RenderBlockFlow instead and let RenderBlock execute the base RenderBox functions.
1043
1044         * rendering/RenderBlock.cpp:
1045         (WebCore::RenderBlock::RenderBlock):
1046         (WebCore::RenderBlock::setPaginationStrut):
1047         (WebCore::RenderBlock::setPageLogicalOffset):
1048         (WebCore::RenderBlock::setBreakAtLineToAvoidWidow):
1049         * rendering/RenderBlock.h:
1050         (WebCore::RenderBlock::setLineGridBox):
1051         (WebCore::RenderBlock::setShapeInsideInfo):
1052         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
1053         * rendering/RenderBlockFlow.cpp:
1054         (WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
1055         (WebCore::RenderBlockFlow::RenderBlockFlow):
1056         (WebCore::RenderBlockFlow::layoutBlockChild):
1057         (WebCore::RenderBlockFlow::adjustPositionedBlock):
1058         (WebCore::RenderBlockFlow::adjustFloatingBlock):
1059         (WebCore::RenderBlockFlow::marginValuesForChild):
1060         (WebCore::RenderBlockFlow::collapseMargins):
1061         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
1062         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
1063         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
1064         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
1065         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
1066         (WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
1067         (WebCore::RenderBlockFlow::setMaxMarginAfterValues):
1068         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
1069         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
1070         (WebCore::RenderBlockFlow::mustDiscardMarginBefore):
1071         (WebCore::RenderBlockFlow::mustDiscardMarginAfter):
1072         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
1073         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
1074         (WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild):
1075         (WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild):
1076         (WebCore::inNormalFlow):
1077         (WebCore::RenderBlockFlow::applyBeforeBreak):
1078         (WebCore::RenderBlockFlow::applyAfterBreak):
1079         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
1080         * rendering/RenderBlockFlow.h:
1081         (WebCore::RenderBlockFlow::MarginValues::MarginValues):
1082         (WebCore::RenderBlockFlow::MarginValues::positiveMarginBefore):
1083         (WebCore::RenderBlockFlow::MarginValues::negativeMarginBefore):
1084         (WebCore::RenderBlockFlow::MarginValues::positiveMarginAfter):
1085         (WebCore::RenderBlockFlow::MarginValues::negativeMarginAfter):
1086         (WebCore::RenderBlockFlow::MarginValues::setPositiveMarginBefore):
1087         (WebCore::RenderBlockFlow::MarginValues::setNegativeMarginBefore):
1088         (WebCore::RenderBlockFlow::MarginValues::setPositiveMarginAfter):
1089         (WebCore::RenderBlockFlow::MarginValues::setNegativeMarginAfter):
1090         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
1091         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginBeforeDefault):
1092         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginBeforeDefault):
1093         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginAfterDefault):
1094         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginAfterDefault):
1095         (WebCore::RenderBlockFlow::MarginInfo::setAtBeforeSideOfBlock):
1096         (WebCore::RenderBlockFlow::MarginInfo::setAtAfterSideOfBlock):
1097         (WebCore::RenderBlockFlow::MarginInfo::clearMargin):
1098         (WebCore::RenderBlockFlow::MarginInfo::setHasMarginBeforeQuirk):
1099         (WebCore::RenderBlockFlow::MarginInfo::setHasMarginAfterQuirk):
1100         (WebCore::RenderBlockFlow::MarginInfo::setDeterminedMarginBeforeQuirk):
1101         (WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
1102         (WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
1103         (WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
1104         (WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
1105         (WebCore::RenderBlockFlow::MarginInfo::setMargin):
1106         (WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
1107         (WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin):
1108         (WebCore::RenderBlockFlow::MarginInfo::atBeforeSideOfBlock):
1109         (WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginBefore):
1110         (WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginAfter):
1111         (WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginBeforeWithChildren):
1112         (WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginAfterWithChildren):
1113         (WebCore::RenderBlockFlow::MarginInfo::quirkContainer):
1114         (WebCore::RenderBlockFlow::MarginInfo::determinedMarginBeforeQuirk):
1115         (WebCore::RenderBlockFlow::MarginInfo::hasMarginBeforeQuirk):
1116         (WebCore::RenderBlockFlow::MarginInfo::hasMarginAfterQuirk):
1117         (WebCore::RenderBlockFlow::MarginInfo::positiveMargin):
1118         (WebCore::RenderBlockFlow::MarginInfo::negativeMargin):
1119         (WebCore::RenderBlockFlow::MarginInfo::discardMargin):
1120         (WebCore::RenderBlockFlow::MarginInfo::margin):
1121         (WebCore::RenderBlockFlow::maxPositiveMarginBefore):
1122         (WebCore::RenderBlockFlow::maxNegativeMarginBefore):
1123         (WebCore::RenderBlockFlow::maxPositiveMarginAfter):
1124         (WebCore::RenderBlockFlow::maxNegativeMarginAfter):
1125         (WebCore::RenderBlockFlow::initMaxMarginValues):
1126         * rendering/RenderDeprecatedFlexibleBox.cpp:
1127         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1128         * rendering/RenderTable.cpp:
1129         (WebCore::RenderTable::layout):
1130
1131 2013-09-11  Myles C. Maxfield  <mmaxfield@apple.com>
1132
1133         Fix nested unicode-bidi: isolate
1134         https://bugs.webkit.org/show_bug.cgi?id=120504
1135
1136         Reviewed by Darin Adler.
1137
1138         When we have a nested isolate renderer if the outer isolate has a text
1139         and this text is not the first child, the isolated chain is not
1140         rendered correctly. This happens because constructBidiRunsForSegment
1141         uses always the first inner isolated renderer as isolated inline
1142         container. This patch fixes the behavior described changing
1143         containingIsolate to find the right isolated container.
1144
1145         Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/840a57050eade39dd04dde0c6603e129b783151c
1146
1147         Tests: fast/text/international/unicode-bidi-isolate-nested-first-child-text.html
1148                fast/text/international/unicode-bidi-isolate-nested-simple.html
1149
1150         * rendering/InlineIterator.h:
1151         (WebCore::containingIsolate):
1152         * rendering/RenderBlockLineLayout.cpp:
1153         (WebCore::constructBidiRunsForSegment):
1154
1155 2013-09-11  Alexey Proskuryakov  <ap@apple.com>
1156
1157         https://bugs.webkit.org/show_bug.cgi?id=121169
1158         media/track/track-cue-rendering-vertical.html is flaky on Mac
1159
1160         Reviewed by Eric Carlson.
1161
1162         * html/shadow/MediaControlElements.cpp:
1163         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Added a FIXME.
1164
1165 2013-09-11  Anders Carlsson  <andersca@apple.com>
1166
1167         Stop using deleteAllValues in SVG code
1168         https://bugs.webkit.org/show_bug.cgi?id=121172
1169
1170         Reviewed by Antti Koivisto.
1171
1172         Use OwnPtr for values instead.
1173
1174         * rendering/svg/RenderSVGResourceClipper.cpp:
1175         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
1176         (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
1177         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
1178         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1179         * rendering/svg/RenderSVGResourceClipper.h:
1180         * rendering/svg/RenderSVGResourceFilter.cpp:
1181         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
1182         (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
1183         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
1184         (WebCore::RenderSVGResourceFilter::applyResource):
1185         (WebCore::RenderSVGResourceFilter::postApplyResource):
1186         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
1187         * rendering/svg/RenderSVGResourceFilter.h:
1188         * rendering/svg/RenderSVGResourceMasker.cpp:
1189         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
1190         (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
1191         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
1192         (WebCore::RenderSVGResourceMasker::applyResource):
1193         * rendering/svg/RenderSVGResourceMasker.h:
1194
1195 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
1196
1197         Make the table static const.
1198
1199         * css/makeprop.pl:
1200
1201 2013-09-11  Timothy Hatcher  <timothy@apple.com>
1202
1203         Remove TimelineTraceEventProcessor since no current ports use it
1204         https://bugs.webkit.org/show_bug.cgi?id=121171
1205
1206         Reviewed by Joseph Pecoraro.
1207
1208         * CMakeLists.txt:
1209         * GNUmakefile.list.am:
1210         * Target.pri:
1211         * WebCore.vcxproj/WebCore.vcxproj:
1212         * WebCore.vcxproj/WebCore.vcxproj.filters:
1213         * WebCore.xcodeproj/project.pbxproj:
1214         * inspector/InspectorAllInOne.cpp:
1215         * inspector/InspectorClient.h:
1216         * inspector/InspectorInstrumentation.cpp:
1217         * inspector/InspectorInstrumentation.h:
1218         * inspector/InspectorTimelineAgent.cpp:
1219         (WebCore::InspectorTimelineAgent::start):
1220         (WebCore::InspectorTimelineAgent::stop):
1221         * inspector/InspectorTimelineAgent.h:
1222         * inspector/TimelineTraceEventProcessor.cpp: Removed.
1223         * inspector/TimelineTraceEventProcessor.h: Removed.
1224
1225 2013-09-11  Commit Queue  <commit-queue@webkit.org>
1226
1227         Unreviewed, rolling out r155519.
1228         http://trac.webkit.org/changeset/155519
1229         https://bugs.webkit.org/show_bug.cgi?id=121174
1230
1231         Included regression test fails, and an existing test started
1232         to crash (Requested by ap on #webkit).
1233
1234         * dom/Document.cpp:
1235         (WebCore::Document::hoveredElementDidDetach):
1236         * page/EventHandler.cpp:
1237         (WebCore::EventHandler::EventHandler):
1238         (WebCore::EventHandler::clear):
1239         (WebCore::EventHandler::handleMouseMoveEvent):
1240         (WebCore::EventHandler::scheduleHoverStateUpdate):
1241         (WebCore::EventHandler::hoverTimerFired):
1242         * page/EventHandler.h:
1243
1244 2013-09-11  Anders Carlsson  <andersca@apple.com>
1245
1246         Stop using deleteAllValues in SVG code
1247         https://bugs.webkit.org/show_bug.cgi?id=121172
1248
1249         Reviewed by Antti Koivisto.
1250
1251         Use OwnPtr for values instead.
1252
1253         * rendering/svg/RenderSVGResourceClipper.cpp:
1254         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
1255         (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
1256         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
1257         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1258         * rendering/svg/RenderSVGResourceClipper.h:
1259         * rendering/svg/RenderSVGResourceFilter.cpp:
1260         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
1261         (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
1262         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
1263         (WebCore::RenderSVGResourceFilter::applyResource):
1264         (WebCore::RenderSVGResourceFilter::postApplyResource):
1265         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
1266         * rendering/svg/RenderSVGResourceFilter.h:
1267         * rendering/svg/RenderSVGResourceMasker.cpp:
1268         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
1269         (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
1270         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
1271         (WebCore::RenderSVGResourceMasker::applyResource):
1272         * rendering/svg/RenderSVGResourceMasker.h:
1273
1274 2013-09-10  Simon Fraser  <simon.fraser@apple.com>
1275
1276         REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
1277         https://bugs.webkit.org/show_bug.cgi?id=121137
1278
1279         Reviewed by Ryosuke Niwa.
1280         
1281         The change in r143483 made it so that negative text-indent gets added
1282         to visual oveflow even when we have overflow:hidden, which is really bad
1283         because it causes large repaints (and large layers) for a common-on-the-web
1284         pattern.
1285         
1286         Revert the change, and add a new test to make sure it doesn't regress.
1287         
1288         I can't reproduce the bug it was trying to fix with the change reverted.
1289
1290         Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html
1291                fast/repaint/negative-text-indent-with-overflow-hidden.html
1292
1293         * rendering/RenderBlock.cpp:
1294         (WebCore::RenderBlock::computeOverflow):
1295
1296 2013-09-10  Simon Fraser  <simon.fraser@apple.com>
1297
1298         Optionally show visual and layout overflow rects in layer tree dumps
1299         https://bugs.webkit.org/show_bug.cgi?id=121135
1300
1301         Reviewed by Beth Dakin.
1302
1303         When calling showLayerTree() from the debugger, show overflow rects
1304         (visaul and layout) for renderers.
1305         
1306         Does not affect test output.
1307
1308         * rendering/RenderLayer.cpp:
1309         (showLayerTree): Pass the new flag to show overflow rects.
1310         * rendering/RenderTreeAsText.cpp:
1311         (WebCore::RenderTreeAsText::writeRenderObject): Print the rects.
1312         (WebCore::write): Don't force layout on subframes if the "dont' layout"
1313         flag is set.
1314         * rendering/RenderTreeAsText.h: New flag.
1315
1316 2013-09-11  Chris Fleizach  <cfleizach@apple.com>
1317
1318         AX: WebKit exposes AXTitleUIElement incorrectly on checkboxes and radio buttons
1319         https://bugs.webkit.org/show_bug.cgi?id=121039
1320
1321         Reviewed by Sam Weinig.
1322
1323         Stop hiding <label> elements for radio buttons and checkboxes (and using the text inside them for the AXTitle).
1324         Instead, expose the <label> element as the titleUIElement if appropriate for the input.
1325
1326         This implies:
1327            1) The web will no longer match MacOS behavior exactly (the text and the checkbox control are combined on MacOS into one element)
1328            2) But, the user will now be able to explore the <label> element which may include links or other important controls.
1329         I think sacrificing 1) here is a good tradeoff. The user will likely never know the difference in terms of output.
1330
1331         Test: platform/mac/accessibility/label-elements-exposed-as-title-ui-elements.html
1332
1333         * accessibility/AccessibilityNodeObject.cpp:
1334         (WebCore::AccessibilityNodeObject::titleElementText):
1335         (WebCore::AccessibilityNodeObject::title):
1336         * accessibility/AccessibilityRenderObject.cpp:
1337         (WebCore::AccessibilityRenderObject::hasTextAlternative):
1338         (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
1339
1340 2013-09-11  Andreas Kling  <akling@apple.com>
1341
1342         Remove unnecessary Document::frame() null checks in rendererIsNeeded().
1343         <https://webkit.org/b/121166>
1344
1345         Reviewed by Anders Carlsson.
1346
1347         rendererIsNeeded() is only called during style resolve, which only happens
1348         while there's a Frame present.
1349
1350         * html/HTMLEmbedElement.cpp:
1351         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1352         * html/HTMLMediaElement.cpp:
1353         (WebCore::HTMLMediaElement::rendererIsNeeded):
1354         * html/HTMLObjectElement.cpp:
1355         * html/HTMLObjectElement.h:
1356
1357 2013-09-11  Csaba Osztrogon√°c  <ossy@webkit.org>
1358
1359         ARM buildfix after r155491
1360         https://bugs.webkit.org/show_bug.cgi?id=121152
1361
1362         Reviewed by Anders Carlsson.
1363
1364         FELightingNEON.cpp and FELightingNEON.h is inside COMPILER(GCC) guard, so it's safe to use GCC attribute.
1365
1366         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Use __aligned__ GCC attribute directly.
1367         * platform/graphics/cpu/arm/filters/FELightingNEON.h: Use __aligned__ GCC attribute instead of ugly template magic.
1368         (WebCore::FELighting::platformApplyNeon):
1369
1370 2013-09-11  peavo@outlook.com  <peavo@outlook.com>
1371
1372         [WinCairo] Compile errors.
1373         https://bugs.webkit.org/show_bug.cgi?id=121153
1374
1375         Reviewed by Brent Fulgham.
1376
1377         * page/win/FrameCairoWin.cpp:
1378         (WebCore::imageFromRect): Return empty GDIObject.
1379         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1380         (WebCore::FontCustomPlatformData::fontPlatformData): Get actual handle from GDIObject.
1381
1382 2013-09-11  Darin Adler  <darin@apple.com>
1383
1384         Rework CSS parser, eliminating "floating" concept and using %destructor
1385         https://bugs.webkit.org/show_bug.cgi?id=121161
1386
1387         Reviewed by Antti Koivisto.
1388
1389         This is some basic improvement, but there is still room for a lot more
1390         consistent approach and formatting in this file. There is a mix of code that
1391         works by side effects in the CSSParser class and code that works with the
1392         values that bison generates in the union that is more or less random. And
1393         the data structures seem too costly, with too much heap allocation. And the
1394         CSSParser class has grown massive, with a mix of both function for use by
1395         code that wants to trigger parsing, and helper functions called by code in
1396         the grammar file. All of that can benefit from more refinement in the future.
1397
1398         * css/CSSGrammar.y.in: Made some incremental improvements to the structure
1399         of the grammar file, including:
1400         - Breaking up the %union so types are declared next to their use
1401         - Eliminating one shift/reduce conflict caused by two "maybe_space" in a row
1402         - Breaking the conditional sections out into their own sections instead of
1403           scattering them in with the other code.
1404         - Eliminating unused return values in productions such as charset,
1405           ignored_charset, namespace, margin_box, invalid_rule, save_block,
1406           invalid_at, and declarations_and_margins.
1407         - Adding %destructor to productions that return values that need to be deleted
1408           or deref'd. This removes the need for CSSParser to separately track these
1409           as "floating" to clean up in case of errors.
1410         - Removing unneeded productions such as media_feature, region_selector,
1411           attr_name, and medium.
1412         - Removing explicit code blocks that just say "$$ = $1" or empty blocks when
1413           there is no return type, since those are default.
1414         - Formatting many productions on single lines since I find them easier to read.
1415           Later I think we could make many more CSSParser functions and make even
1416           more of the production single lines in the grammar file.
1417         - Using adoptPtr, adoptRef, delete, deref, leakPtr, and leakRef to put
1418           heap allocated values into and out of the union without storage leaks.
1419           
1420         * css/CSSParser.cpp:
1421         (WebCore::CSSParser::~CSSParser): Remove the now-unneeded deleteAllValues for
1422         the various colections of floating things.
1423         (WebCore::CSSParser::createFilterRule): Don't put the rule into m_parsedRules,
1424         just return a PassRefPtr instead.
1425         (WebCore::CSSParser::createImportRule): Ditto.
1426         (WebCore::CSSParser::createMediaRule): Ditto.
1427         (WebCore::CSSParser::createEmptyMediaRule): Ditto.
1428         (WebCore::CSSParser::createSupportsRule): Ditto.
1429         (WebCore::CSSParser::createKeyframesRule): Ditto.
1430         (WebCore::CSSParser::createStyleRule): Ditto.
1431         (WebCore::CSSParser::createFontFaceRule): Ditto.
1432         (WebCore::CSSParser::createHostRule): Ditto.
1433         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Got rid of the
1434         unused return value from this function and changed it to to take a reference
1435         instead of a pointer.
1436         (WebCore::CSSParser::rewriteSpecifiersWithElementName): Ditto.
1437         (WebCore::CSSParser::rewriteSpecifiers): Changed this to take and return OwnPtr.
1438         (WebCore::CSSParser::createPageRule): Don't put rule into m_parsedRules, return
1439         PassRefPtr instead.
1440         (WebCore::CSSParser::createSelectorVector): Added. Used to implement the
1441         optimization where we recycle a single selector vector. Not sure we still need
1442         this, or maybe we need more optimizations like it, but for now keep it.
1443         (WebCore::CSSParser::recycleSelectorVector): Ditto.
1444         (WebCore::CSSParser::createRegionRule): Don't put rule into m_parsedRules, return
1445         PassRefPtr instead.
1446         (WebCore::CSSParser::createMarginAtRule): Got rid of unused return value.
1447         When this function is implemented for real, we might add a return value.
1448         (WebCore::CSSParser::createKeyframe): Don't put keyframe into m_parsedKeyframes,
1449         return PassRefPtr instead.
1450         (WebCore::CSSParser::createViewportRule): Don't put rule into m_parsedRules, return
1451         PassRefPtr instead.
1452
1453         * css/CSSParser.h: Removed many now-needed functions to manage floating items.
1454         Changed rule creation functions to return PassRefPtr. Other changes as mentioned above.
1455
1456         * css/CSSParserValues.cpp:
1457         (WebCore::destroy): Added.
1458         (WebCore::CSSParserValueList::~CSSParserValueList): Updated to call destroy.
1459         * css/CSSParserValues.h: Ditto.
1460
1461 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1462
1463         [GTK] Remove Gail dependency from build system for GTK3
1464         https://bugs.webkit.org/show_bug.cgi?id=119673
1465
1466         Reviewed by Gustavo Noronha Silva.
1467
1468         * GNUmakefile.am: Removed GAIL_CFLAGS.
1469         * PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES.
1470
1471 2013-09-11  Andreas Kling  <akling@apple.com>
1472
1473         Remove Widget::widgetPositionsUpdated().
1474         <https://webkit.org/b/121160>
1475
1476         Reviewed by Anders Carlsson.
1477
1478         Remove this no-op virtual that was only used by chromium.
1479
1480 2013-09-11  Andreas Kling  <akling@apple.com>
1481
1482         Page::backForward() should return a reference.
1483         <https://webkit.org/b/121151>
1484
1485         Reviewed by Anders Carlsson.
1486
1487         There is always a BackForwardController, so make backForward() return a reference.
1488         Also made it store a Page& internally since it's tied to the lifetime of Page.
1489
1490 2013-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1491
1492         WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
1493         https://bugs.webkit.org/show_bug.cgi?id=120773
1494
1495         Reviewed by Anders Carlsson.
1496
1497         Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
1498         for the following reasons:
1499         - It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
1500         - It was potential error-prone as it actually modified the type given by the Client in opaque way.
1501
1502         * page/animation/CSSPropertyAnimation.cpp:
1503         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
1504         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
1505
1506 2013-09-11  Andreas Kling  <akling@apple.com>
1507
1508         FrameView: Tighten widget handling code.
1509         <https://webkit.org/b/121155>
1510
1511         Reviewed by Antti Koivisto.
1512
1513         Harden typing in this code to work with RenderEmbeddedObject& instead of RenderObject*.
1514         Functions and members renamed to reflect that they only deal with embedded objects.
1515
1516         * html/HTMLPlugInImageElement.h:
1517         (WebCore::toHTMLPlugInImageElement):
1518
1519             Add a toHTMLPlugInImageElement that takes an Element&.
1520
1521         * html/HTMLTagNames.in:
1522
1523             Generate type helpers for applet and embed elements.
1524
1525         * page/FrameView.h:
1526         * page/FrameView.cpp:
1527         (WebCore::FrameView::addEmbeddedObjectToUpdate):
1528         (WebCore::FrameView::removeEmbeddedObjectToUpdate):
1529         (WebCore::FrameView::updateEmbeddedObjects):
1530         (WebCore::FrameView::updateEmbeddedObject):
1531
1532             Re-ordered this function in early return style. Change locals into references.
1533
1534         * rendering/RenderEmbeddedObject.cpp:
1535         (WebCore::RenderEmbeddedObject::~RenderEmbeddedObject):
1536         (WebCore::RenderEmbeddedObject::layout):
1537         * rendering/RenderSnapshottedPlugIn.cpp:
1538         (WebCore::RenderSnapshottedPlugIn::layout):
1539
1540             Updated for new FrameView function signatures.
1541
1542 2013-09-11  Patrick Gansterer  <paroga@webkit.org>
1543
1544         [CMake] Split out generic Windows files into its own file
1545         https://bugs.webkit.org/show_bug.cgi?id=119514
1546
1547         Reviewed by Gyuyoung Kim.
1548
1549         This allows us to add smaller CMakeLists.txt files when
1550         adding additional Windows ports.
1551
1552         * PlatformWin.cmake: Copied from Source/WebCore/PlatformWinCE.cmake.
1553         * PlatformWinCE.cmake:
1554
1555 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1556
1557         [GTK] Get rid of Pango/Gail dependencies in accessibility for ATK
1558         https://bugs.webkit.org/show_bug.cgi?id=114867
1559
1560         Reviewed by Martin Robinson.
1561
1562         Removed all trace of Gail and Pango specific code from the AtkText
1563         implementation, now everything has been reimplemented.
1564
1565         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1566         (webkitAccessibleTextGetTextForOffset): Removed fallback code
1567         relying in Gail/Pango, now all the related code has been
1568         removed. Also, replaced the collection of if statements with a
1569         switch, for better readability of the code.
1570
1571 2013-09-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1572
1573         Mouseenter/-leave not triggered when element under cursor is moved/removed
1574         https://bugs.webkit.org/show_bug.cgi?id=120786
1575
1576         Reviewed by Antonio Gomes.
1577
1578         When a hovered element is detached it will now emit a fake mousemove event
1579         similar to what happens when a hovered element has CSS display set to none.
1580
1581         Test: fast/events/mouseenterleave-detached-element.html
1582
1583         * dom/Document.cpp:
1584         (WebCore::Document::hoveredElementDidDetach):
1585         * page/EventHandler.cpp:
1586         (WebCore::EventHandler::EventHandler):
1587         (WebCore::EventHandler::clear):
1588         (WebCore::EventHandler::handleMouseMoveEvent):
1589         * page/EventHandler.h:
1590
1591 2013-09-11  Krzysztof Czech  <k.czech@samsung.com>
1592
1593         [ATK] Adds mapping MenuItemRadioRole to ATK
1594         https://bugs.webkit.org/show_bug.cgi?id=121149
1595
1596         Reviewed by Mario Sanchez Prada.
1597
1598         Adds mapping MenuItemRadioRole to ATK.
1599
1600         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1601         (atkRole):
1602
1603 2013-09-10  Mario Sanchez Prada  <mario.prada@samsung.com>
1604
1605         [GTK] Reimplement atk_text_get_text_*_offset for LINE boundaries
1606         https://bugs.webkit.org/show_bug.cgi?id=114872
1607
1608         Reviewed by Gustavo Noronha Silva.
1609
1610         Re-implement these functions without using GailTextUtil nor Pango.
1611
1612         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1613         (lineAtPositionForAtkBoundary): New helper function to find the
1614         line at a given position considering values of AtkTextBoundary.
1615         (webkitAccessibleTextLineForBoundary): New function,
1616         implementing atk_text_get_text_*_offset for LINE.
1617         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
1618         LINE boundaries with webkitAccessibleTextLineForBoundary().
1619
1620 2013-09-11  Andreas Kling  <akling@apple.com>
1621
1622         Missed one BackForwardListImpl.h in the last commit.
1623
1624         * history/BackForwardList.cpp:
1625
1626 2013-09-11  Andreas Kling  <akling@apple.com>
1627
1628         Rename BackForwardListImpl.{cpp,h} => BackForwardClient.{cpp,h}
1629
1630         Rubber-stamped by Antti Koivisto.
1631
1632 2013-09-10  Ryosuke Niwa  <rniwa@webkit.org>
1633
1634         CSSProperty::isInheritedProperty is large
1635         https://bugs.webkit.org/show_bug.cgi?id=121083
1636
1637         Reviewed by Sam Weinig.
1638
1639         Support [Inherited] option in makeprop.pl and generate CSSProperty::isInheritedProperty in CSSPropertyNames.cpp
1640         using a lookup table. We can pack the table better by using bitfield in the future but I think boolean lookup
1641         table is a good first cut.
1642
1643         Updated CSSPropertyNames.in and SVGCSSPropertyNames.in to use the new option and removed the old code from
1644         CSSProperty.cpp.
1645
1646         * css/CSSProperty.cpp:
1647         * css/CSSPropertyNames.in:
1648         * css/SVGCSSPropertyNames.in:
1649         * css/makeprop.pl:
1650
1651 2013-09-11  Andreas Kling  <akling@apple.com>
1652
1653         Rename BackForwardListImpl => BackForwardList.
1654         <https://webkit.org/b/121146>
1655
1656         Reviewed by Antti Koivisto.
1657
1658         Nuke another old FIXME.
1659
1660 2013-09-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1661
1662         Generate more HTML type checks and casting
1663         https://bugs.webkit.org/show_bug.cgi?id=121080
1664
1665         Reviewed by Andreas Kling.
1666
1667         Clean-up remained functions of HTML elements using auto-generated isFooElement(),
1668         and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
1669
1670         Besides this patch clean-up unnecessary checks which are being supported by
1671         auto-generated isFooElement().
1672
1673         No new tests, no behavior change.
1674
1675         * accessibility/atk/AXObjectCacheAtk.cpp:
1676         (WebCore::notifyChildrenSelectionChange):
1677         * html/HTMLFrameElementBase.h:
1678         (WebCore::toHTMLFrameElementBase):
1679         * html/HTMLIFrameElement.h:
1680         * html/HTMLImageLoader.cpp:
1681         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1682         (WebCore::HTMLImageLoader::notifyFinished):
1683         * html/HTMLObjectElemenaeh:
1684         * html/HTMLOptionsCollection.cpp:
1685         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
1686         * html/HTMLSelectElement.h:
1687         * html/HTMLTagNames.in:
1688         * html/HTMLVideoElement.h:
1689         * html/shadow/HTMLContentElement.h:
1690         * loader/ImageLoader.cpp:
1691         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1692         * loader/archive/cf/LegacyWebArchive.cpp:
1693         (WebCore::LegacyWebArchive::create):
1694         * page/PageSerializer.cpp:
1695         (WebCore::frameOwnerURLAttributeName):
1696         * page/SpatialNavigation.cpp:
1697         (WebCore::canScrollInDirection):
1698         * platform/gtk/PasteboardGtk.cpp:
1699         (WebCore::getURLForImageNode):
1700         * plugins/IFrameShimSupport.cpp:
1701         (WebCore::getPluginOcclusions):
1702         * rendering/HitTestResult.cpp:
1703         (WebCore::HitTestResult::mediaSupportsFullscreen):
1704         (WebCore::HitTestResult::mediaElement):
1705         (WebCore::HitTestResult::enterFullscreenForVideo):
1706         (WebCore::HitTestResult::mediaIsVideo):
1707
1708         * rendering/RenderLayerCompositor.cpp:
1709         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1710         * rendering/RenderListBox.cpp:
1711         (WebCore::RenderListBox::RenderListBox):
1712         * rendering/RenderMenuList.cpp:
1713         (WebCore::RenderMenuList::RenderMenuList):
1714         * testing/Internals.cpp:
1715         (WebCore::Internals::isSelectPopupVisible):
1716
1717 2013-09-11  Chris Fleizach  <cfleizach@apple.com>
1718
1719         AX: Mac platform is not using accessibilityTitle from the Base implementation
1720         https://bugs.webkit.org/show_bug.cgi?id=121109
1721
1722         Reviewed by Sam Weinig.
1723
1724         Remove the Mac platform overrides of accessibilityTitle, Description, HelpText. 
1725         The Base implementation has these and we can share them between iOS and Mac
1726
1727         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1728         (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
1729         (-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
1730         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1731
1732 2013-09-11  Andreas Kling  <akling@apple.com>
1733
1734         Rename BackForwardList.h => BackForwardClient.h
1735
1736         Rubber-stamped by Antti Koivisto.
1737
1738 2013-09-11  Andreas Kling  <akling@apple.com>
1739
1740         Rename BackForwardList => BackForwardClient.
1741         <https://webkit.org/b/121143>
1742
1743         Reviewed by Antti Koivisto.
1744
1745         Nuke a 3 year old FIXME about renaming this class.
1746
1747 2013-09-10  Daniel Bates  <dabates@apple.com>
1748
1749         [iOS] Upstream text autosizing
1750         https://bugs.webkit.org/show_bug.cgi?id=121111
1751
1752         Reviewed by Andy Estes and Sam Weinig.
1753
1754         Tests: platform/iphone-simulator/text-autosizing/anonymous-block.html
1755                platform/iphone-simulator/text-autosizing/contenteditable.html
1756                platform/iphone-simulator/text-autosizing/first-letter.html
1757                platform/iphone-simulator/text-autosizing/font-family-case-insensitive.html
1758                platform/iphone-simulator/text-autosizing/lists.html
1759                platform/iphone-simulator/text-autosizing/overflow.html
1760                platform/iphone-simulator/text-autosizing/percent-adjust-length-line-height.html
1761                platform/iphone-simulator/text-autosizing/percent-adjust-number-line-height.html
1762                platform/iphone-simulator/text-autosizing/percent-adjust-percent-line-height.html
1763
1764         * WebCore.exp.in:
1765         * WebCore.xcodeproj/project.pbxproj:
1766         * css/CSSComputedStyleDeclaration.cpp:
1767         (WebCore::ComputedStyleExtractor::propertyValue):
1768         * css/CSSParser.cpp:
1769         (WebCore::isValidKeywordPropertyAndValue):
1770         (WebCore::CSSParser::parseValue):
1771         * css/CSSProperty.cpp:
1772         (WebCore::CSSProperty::isInheritedProperty):
1773         * css/CSSPropertyNames.in: Add property -webkit-text-size-adjust.
1774         * css/DeprecatedStyleBuilder.cpp:
1775         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Added.
1776         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Added.
1777         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Added.
1778         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Added.
1779         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1780         * css/StyleResolver.cpp:
1781         (WebCore::StyleResolver::updateFont):
1782         (WebCore::StyleResolver::applyProperties): Add COMPILE_ASSERT to ensure that
1783         all properties that affect font size, including -webkit-text-size-adjust, are
1784         resolved before properties that depend on them; see <rdar://problem/13522835>.
1785         (WebCore::StyleResolver::applyProperty):
1786         (WebCore::StyleResolver::checkForTextSizeAdjust): Added.
1787         * css/StyleResolver.h:
1788         * dom/Document.cpp:
1789         (WebCore::TextAutoSizingTraits::constructDeletedValue): Added.
1790         (WebCore::TextAutoSizingTraits::isDeletedValue): Added.
1791         (WebCore::Document::detach):
1792         (WebCore::Document::addAutoSizingNode): Added.
1793         (WebCore::Document::validateAutoSizingNodes): Added.
1794         (WebCore::Document::resetAutoSizingNodes): Added.
1795         * dom/Document.h:
1796         * editing/EditingStyle.cpp:
1797         * page/Frame.h: Add declarations for setTextAutosizingWidth(), textAutosizingWidth().
1798         * page/FrameView.cpp:
1799         (WebCore::FrameView::layout):
1800         * page/Settings.in: Generate setter and getter for setting minimumZoomFontSize.
1801         * platform/graphics/Font.h:
1802         (WebCore::Font::equalForTextAutoSizing): Added.
1803         * platform/graphics/FontDescription.cpp:
1804         (WebCore::FontDescription::familiesEqualForTextAutoSizing): Added.
1805         * platform/graphics/FontDescription.h:
1806         (WebCore::FontDescription::equalForTextAutoSizing): Added.
1807         * rendering/RenderBlock.cpp:
1808         (WebCore::RenderBlock::RenderBlock):
1809         (WebCore::isVisibleRenderText): Added.
1810         (WebCore::resizeTextPermitted): Added.
1811         (WebCore::RenderBlock::immediateLineCount): Added.
1812         (WebCore::isNonBlocksOrNonFixedHeightListItems): Added.
1813         (WebCore::oneLineTextMultiplier): Added.
1814         (WebCore::textMultiplier): Added.
1815         (WebCore::RenderBlock::adjustComputedFontSizes): Added.
1816         * rendering/RenderBlock.h:
1817         (WebCore::RenderBlock::resetComputedFontSize): Added.
1818         * rendering/RenderObject.cpp:
1819         (WebCore::RenderObject::traverseNext): Added.
1820         (WebCore::includeNonFixedHeight): Added.
1821         (WebCore::RenderObject::adjustComputedFontSizesOnBlocks): Added.
1822         (WebCore::RenderObject::resetTextAutosizing): Added.
1823         * rendering/RenderObject.h:
1824         * rendering/RenderText.cpp:
1825         (WebCore::RenderText::RenderText):
1826         * rendering/RenderText.h:
1827         (WebCore::RenderText::candidateComputedTextSize): Added.
1828         (WebCore::RenderText::setCandidateComputedTextSize): Added.
1829         * rendering/style/RenderStyle.cpp:
1830         (WebCore::computeFontHash):
1831         (WebCore::RenderStyle::hashForTextAutosizing): Added.
1832         (WebCore::RenderStyle::equalForTextAutosizing): Added.
1833         (WebCore::RenderStyle::changeRequiresLayout):
1834         (WebCore::RenderStyle::specifiedLineHeight): Added; iOS-specific variant.
1835         We should reconcile this getter with the getter of the same name that is
1836         compiled when building with IOS_TEXT_AUTOSIZING disabled.
1837         (WebCore::RenderStyle::setSpecifiedLineHeight): Added.
1838         * rendering/style/RenderStyle.h:
1839         (WebCore::RenderStyle::initialSpecifiedLineHeight): Added.
1840         (WebCore::RenderStyle::initialTextSizeAdjust): Added.
1841         (WebCore::RenderStyle::setTextSizeAdjust): Added.
1842         (WebCore::RenderStyle::textSizeAdjust): Added.
1843         * rendering/style/StyleInheritedData.cpp:
1844         (WebCore::StyleInheritedData::StyleInheritedData):
1845         (WebCore::StyleInheritedData::operator==):
1846         * rendering/style/StyleInheritedData.h:
1847         * rendering/style/StyleRareInheritedData.cpp:
1848         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1849         (WebCore::StyleRareInheritedData::operator==):
1850         * rendering/style/StyleRareInheritedData.h:
1851         * rendering/style/TextSizeAdjustment.h: Added.
1852         (TextSizeAdjustment::TextSizeAdjustment):
1853         (TextSizeAdjustment::percentage):
1854         (TextSizeAdjustment::multiplier):
1855         (TextSizeAdjustment::isAuto):
1856         (TextSizeAdjustment::isNone):
1857         (TextSizeAdjustment::isPercentage):
1858         (TextSizeAdjustment::operator == ):
1859         (TextSizeAdjustment::operator != ):
1860
1861 2013-09-10  Chris Fleizach  <cfleizach@apple.com>
1862
1863         AX: AXValue/AXMenuItemMarkChar not defined for menuitemradio (should be false (0) with aria-checked=mixed | undefined)
1864         https://bugs.webkit.org/show_bug.cgi?id=120372
1865
1866         Reviewed by Mario Sanchez Prada.
1867
1868         Add new roles to make the distinction between menu item, menu item radio and menu item checkbox.
1869         Expose AXValue for menu items, so that they can convey the, on/off/mixed state of aria-checked.
1870
1871         Test: platform/mac/accessibility/menu-item-values.html
1872
1873         * accessibility/AccessibilityNodeObject.cpp:
1874         (WebCore::AccessibilityNodeObject::isMenuRelated):
1875         (WebCore::AccessibilityNodeObject::isMenuItem):
1876         (WebCore::AccessibilityNodeObject::isChecked):
1877         (WebCore::AccessibilityNodeObject::actionElement):
1878         (WebCore::AccessibilityNodeObject::visibleText):
1879         (WebCore::AccessibilityNodeObject::title):
1880         * accessibility/AccessibilityObject.cpp:
1881         (WebCore::createARIARoleMap):
1882         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1883         * accessibility/AccessibilityObject.h:
1884         * accessibility/AccessibilityRenderObject.cpp:
1885         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1886         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1887         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
1888         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1889         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1890         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1891         (createAccessibilityRoleMap):
1892         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1893
1894 2013-09-10  Anders Carlsson  <andersca@apple.com>
1895
1896         Remove wtf/Alignment.h
1897         https://bugs.webkit.org/show_bug.cgi?id=121077
1898
1899         Reviewed by Andreas Kling.
1900
1901         * platform/PODArena.h:
1902         (WebCore::PODArena::minAlignment):
1903         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
1904         (WebCore::FELighting::platformApplyNeon):
1905
1906 2013-09-10  Zoltan Horvath  <zoltan@webkit.org>
1907
1908         [Qt] Add FloatingObjects.h to Target.pri
1909         https://bugs.webkit.org/show_bug.cgi?id=121117
1910
1911         Reviewed by Andreas Kling.
1912
1913         No new tests, no behavior change.
1914
1915         * Target.pri:
1916
1917 2013-09-10  Sergio Correia  <sergio.correia@openbossa.org>
1918
1919         Fix EFL build after r155477
1920         https://bugs.webkit.org/show_bug.cgi?id=121126
1921
1922         Reviewed by Antonio Gomes.
1923
1924         No new tests, build fix.
1925
1926         * CMakeLists.txt: MediaStreamComponent.cpp and MediaStreamDescriptor.cpp
1927         were added with an incorrect path.
1928
1929 2013-09-10  Andreas Kling  <akling@apple.com>
1930
1931         AnimationController should have a Frame& internally.
1932         <https://webkit.org/b/121078>
1933
1934         Reviewed by Anders Carlsson.
1935
1936         The AnimationController is owned by the Frame so make the back-pointer
1937         a reference. This knocks off a couple of null checks.
1938
1939 2013-09-10  Anders Carlsson  <andersca@apple.com>
1940
1941         More WTF/Alignment.h removal
1942         https://bugs.webkit.org/show_bug.cgi?id=121125
1943
1944         Reviewed by Andreas Kling.
1945
1946         * platform/PODArena.h:
1947
1948 2013-09-10  Eric Carlson  <eric.carlson@apple.com>
1949
1950         Make MediaStream objects ScriptWrappable
1951         https://bugs.webkit.org/show_bug.cgi?id=120879
1952
1953         Reviewed by Jer Noble.
1954
1955         * Modules/mediastream/MediaStream.h: Inherit from ScriptWrappable.
1956         * Modules/mediastream/MediaStreamTrack.h: Ditto.
1957         * Modules/mediastream/RTCDTMFSender.h: Ditto.
1958         * Modules/mediastream/RTCDataChannel.h: Ditto.
1959         * Modules/mediastream/RTCIceCandidate.h: Ditto.
1960         * Modules/mediastream/RTCPeerConnection.h: Ditto.
1961         * Modules/mediastream/RTCSessionDescription.h: Ditto.
1962         * Modules/mediastream/RTCStatsReport.h: Ditto.
1963         * Modules/mediastream/RTCStatsResponse.h: Ditto.
1964
1965 2013-09-10  Eric Carlson  <eric.carlson@apple.com>
1966
1967         Split MediaStreamDescriptor.h and MediaStreamComponent.h into .h and .cpp
1968         https://bugs.webkit.org/show_bug.cgi?id=120878
1969
1970         Reviewed by Jer Noble.
1971
1972         No new tests, no functional change.
1973
1974         * CMakeLists.txt: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
1975         * GNUmakefile.list.am: Ditto.
1976
1977         * Modules/mediastream/LocalMediaStream.cpp:
1978         (WebCore::LocalMediaStream::create): MediaStreamDescriptor::create() doesn't take a UUID.
1979
1980         * Modules/mediastream/MediaStream.cpp:
1981         (WebCore::createFromSourceVectors): Ditto.
1982
1983         * WebCore.xcodeproj/project.pbxproj: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
1984
1985         * platform/mediastream/MediaStreamComponent.cpp: Added.
1986         * platform/mediastream/MediaStreamComponent.h:
1987
1988         * platform/mediastream/MediaStreamDescriptor.cpp: Added.
1989         * platform/mediastream/MediaStreamDescriptor.h:
1990
1991 2013-09-10  Brent Fulgham  <bfulgham@apple.com>
1992
1993         [Windows] Create SharedGDIObject Class Template
1994         https://bugs.webkit.org/show_bug.cgi?id=121037
1995
1996         Reviewed by Anders Carlsson.
1997
1998         * WebCore.vcxproj/WebCore.vcxproj: Remove RefCountedGDIHandle.h, and
1999         add new SharedGDIObject.h file.
2000         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2001         * platform/graphics/FontPlatformData.h:
2002         (WebCore::FontPlatformData::hfont): Switch to new SharedGDIObject.
2003         * platform/graphics/win/FontPlatformDataCGWin.cpp:
2004         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2005         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2006         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2007         * platform/graphics/win/FontPlatformDataWin.cpp:
2008         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2009         * platform/graphics/win/RefCountedGDIHandle.h: Removed.
2010         * platform/graphics/win/SharedGDIObject.h: Added.
2011         (WebCore::SharedGDIObject::create):
2012         (WebCore::SharedGDIObject::get):
2013         (WebCore::SharedGDIObject::hash):
2014         (WebCore::SharedGDIObject::SharedGDIObject):
2015
2016 2013-09-10  Tim Horton  <timothy_horton@apple.com>
2017
2018         [mac] PDFDocumentImage should use PDFKit to draw
2019         https://bugs.webkit.org/show_bug.cgi?id=120651
2020         <rdar://problem/12810731>
2021
2022         Unreviewed hopeful build fix.
2023
2024         * platform/graphics/mac/PDFDocumentImageMac.mm:
2025
2026 2013-09-10  Tim Horton  <timothy_horton@apple.com>
2027
2028         [mac] PDFDocumentImage should use PDFKit to draw
2029         https://bugs.webkit.org/show_bug.cgi?id=120651
2030         <rdar://problem/12810731>
2031
2032         Reviewed by Alexey Proskuryakov.
2033
2034         Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
2035
2036         Test: fast/images/pdf-as-image-with-annotations.html
2037
2038         * WebCore.xcodeproj/project.pbxproj:
2039         Add PDFDocumentImageMac.mm.
2040
2041         * platform/graphics/cg/PDFDocumentImage.cpp:
2042         (WebCore::PDFDocumentImage::PDFDocumentImage):
2043         We don't need to initialize m_document anymore because it's now a RetainPtr.
2044         Initialize m_hasPage to false.
2045
2046         (WebCore::PDFDocumentImage::~PDFDocumentImage):
2047         We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
2048
2049         (WebCore::PDFDocumentImage::size):
2050         Use expandedIntSize for explicitness.
2051
2052         (WebCore::PDFDocumentImage::applyRotationForPainting):
2053         Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
2054         We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
2055         Also, explicitly use std::min instead of importing the whole std namespace.
2056
2057         (WebCore::PDFDocumentImage::dataChanged):
2058         Assert that we don't re-enter dataChanged after we've created a document,
2059         because it seems like that shouldn't happen - we only create a document when
2060         we've supposedly received all data, and it would be nice if we didn't have
2061         all this varying code to deal with SharedBuffers changing out from under each other.
2062         Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
2063         replace it with a different implementation that creates a PDFDocument.
2064
2065         (WebCore::PDFDocumentImage::setCurrentPage):
2066         Make all page-number-related things unsigned, since they are in CG and PDFKit,
2067         and add m_hasPage to denote whether we've acquired a valid page yet.
2068         Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
2069         Remove setCurrentPage itself, as we never use a page other than the first page;
2070         we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
2071
2072         (WebCore::PDFDocumentImage::draw):
2073         Fix a weird comment.
2074         Factor code that actually draws the PDF out into drawPDFPage.
2075
2076         The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
2077
2078         (WebCore::PDFDocumentImage::createPDFDocument):
2079         Factored out of dataChanged(). Use the PLATFORM(MAC) way of making a
2080         CGDataProvider from a SharedBuffer everywhere; we're already using it on
2081         iOS, and it should also work for Windows, the only other USE(CG) platform.
2082         Since we only createPDFDocument() after all data has been received, remove
2083         the comment about the SharedBuffer being secretly written to behind its back.
2084
2085         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2086         Factored out of setCurrentPage().
2087         Use deg2rad since we have it.
2088
2089         (WebCore::PDFDocumentImage::pageCount):
2090         (WebCore::PDFDocumentImage::drawPDFPage):
2091         Factored out of draw().
2092         Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
2093
2094         * platform/graphics/cg/PDFDocumentImage.h:
2095         Unindent all the things, as we don't indent the first level inside a namespace scope.
2096         Forward-declare PDFDocument.
2097         Make m_currentPage unsigned as it should be.
2098         Add m_hasPage.
2099         Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
2100
2101         * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
2102         Soft-link in PDFKit and specifically the PDFDocument class.
2103
2104         (WebCore::PDFDocumentImage::createPDFDocument):
2105         Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
2106         (with respect to the SharedBuffer's data being appended to in secret), because we've waited
2107         for the document to finish loading before getting here.
2108
2109         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2110         Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
2111         Ask PDFKit for the page's rotation.
2112
2113         (WebCore::PDFDocumentImage::pageCount):
2114         Ask PDFKit for the page count.
2115
2116         (WebCore::PDFDocumentImage::drawPDFPage):
2117         Paint the current page of the PDF. Note that we do not apply the rotation here
2118         via applyRotationForPainting because PDFKit will do it itself.
2119         Save and restore two bits of CG state which aren't saved and restored with the
2120         graphics state, as PDFKit can mutate them above us (<rdar://problem/14951759>).
2121
2122         * platform/mac/SoftLinking.h:
2123         I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
2124         so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
2125         of the umbrella framework and the subframework, so I could use it to soft link
2126         Quartz.framework's PDFKit.framework.
2127
2128 2013-09-10  Tim Horton  <timothy_horton@apple.com>
2129
2130         [mac] <progress> has rendering artifacts along the bottom
2131         https://bugs.webkit.org/show_bug.cgi?id=120865
2132         <rdar://problem/11571240>
2133
2134         Reviewed by Simon Fraser.
2135
2136         Allow RenderTheme to force the height of a <progress> bar.
2137
2138         Test: platform/mac/fast/forms/indeterminate-progress-inline-height.html
2139
2140         * rendering/RenderProgress.cpp:
2141         (WebCore::RenderProgress::computeLogicalHeight):
2142         Borrowed from RenderMeter, allow the theme to override the size of the progress bar.
2143
2144         * rendering/RenderProgress.h:
2145         Drive-by add OVERRIDE to a few things.
2146
2147         * rendering/RenderTheme.cpp:
2148         (WebCore::RenderTheme::progressBarRectForBounds):
2149         * rendering/RenderTheme.h:
2150         Add a default implementation of progressBarRectForBounds that just passes the bounds through.
2151
2152         * rendering/RenderThemeMac.h:
2153         * rendering/RenderThemeMac.mm:
2154         (WebCore::RenderThemeMac::progressBarRectForBounds):
2155         Override progressBarRectForBounds; the implementation is factored out of paintProgressBar.
2156
2157         (WebCore::RenderThemeMac::paintProgressBar):
2158         Make use of the factored-out progressBarRectForBounds().
2159
2160         Drive-by apply the device scale factor to the progress bar's image buffer,
2161         so that it is rendered at 2x on appropriate hardware. Also, multiply the
2162         progress animation phase by the device scale factor, as the phase value seems
2163         to be proportional to the actual pixel offset of the animation; without this,
2164         the animation would appear to progress half as slowly in HiDPI.
2165
2166 2013-09-10  Chris Fleizach  <cfleizach@apple.com>
2167
2168         AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
2169         https://bugs.webkit.org/show_bug.cgi?id=120552
2170
2171         Reviewed by Darin Adler.
2172
2173         Add Mac support for exposing the DOM ID and DOM class list so that accessibility
2174         clients can leverage that information.
2175
2176         Test: platform/mac/accessibility/id-class-attributes.html
2177
2178         * accessibility/AccessibilityObject.cpp:
2179         (WebCore::AccessibilityObject::domIdentifier):
2180         (WebCore::AccessibilityObject::domClassList):
2181         * accessibility/AccessibilityObject.h:
2182         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2183         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2184         (convertStringsToNSArray):
2185         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2186
2187 2013-09-10  Denis Nomiyama  <d.nomiyama@samsung.com>
2188
2189         [GTK] accessibility/loading-iframe-sends-notification.html is failing
2190         https://bugs.webkit.org/show_bug.cgi?id=98370
2191
2192         Reviewed by Chris Fleizach.
2193
2194         Enabled AXLayoutComplete on the GTK platform.
2195
2196         No new tests are required because this feature will use an existing
2197         accessibility layout test that is currently failing on the GTK+ platform
2198         (e.g. loading-iframe-sends-notification.html).
2199
2200         * accessibility/atk/AXObjectCacheAtk.cpp:
2201         (WebCore::AXObjectCache::postPlatformNotification): Send layout-complete
2202         signal in case of AXLayoutComplete.
2203         * dom/Document.cpp:
2204         (WebCore::Document::implicitClose): Enabled AXLayoutComplete on the GTK
2205         platform.
2206         * page/FrameView.cpp:
2207         (WebCore::FrameView::layout): Enabled AXLayoutComplete on the GTK
2208         platform.
2209
2210 2013-09-09  Brent Fulgham  <bfulgham@apple.com>
2211
2212         [Windows] Change from using OwnPtr<GDI Stuff> to new GDIObject template.
2213         https://bugs.webkit.org/show_bug.cgi?id=120778
2214
2215         Reviewed by Anders Carlsson.
2216
2217         Change code to use a GDI-specific smart pointer, rather than OwnPtr. This
2218         is a first step to simplifying OwnPtr. It also gets rid of some Windows-
2219         specific code in WTF.
2220
2221         * WebCore.vcxproj/WebCore.vcxproj: Add the new header file.
2222         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2223         * page/win/FrameCGWin.cpp:
2224         (WebCore::imageFromRect): Switch to GDIObject.
2225         * page/win/FrameCairoWin.cpp:
2226         (WebCore::imageFromRect): Switch to GDIObject.
2227         * page/win/FrameWin.cpp:
2228         (WebCore::imageFromSelection): Switch to GDIObject.
2229         (WebCore::Frame::dragImageForSelection): Ditto.
2230         (WebCore::Frame::nodeImage): Ditto.
2231         * page/win/FrameWin.h:
2232         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2233         (WebCore::getDirtyRects): Switch from OwnPtr to GDIObject.
2234         * platform/graphics/win/FontCacheWin.cpp:
2235         (WebCore::createGDIFont): Switch to GDIObject.
2236         (WebCore::FontCache::createFontPlatformData): Ditto.
2237         * platform/graphics/win/FontCustomPlatformData.cpp:
2238         (WebCore::FontCustomPlatformData::fontPlatformData): Switch to GDIObject.
2239         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2240         (WebCore::FontCustomPlatformData::fontPlatformData): Switch to GDIObject.
2241         * platform/graphics/win/GraphicsContextCGWin.cpp:
2242         (WebCore::GraphicsContext::releaseWindowsContext): Switch to GDIObject.
2243         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2244         (WebCore::GraphicsContext::releaseWindowsContext): Switch to GDIObject.
2245         * platform/graphics/win/GraphicsContextWin.cpp:
2246         (WebCore::GraphicsContext::getWindowsContext): Switch to GDIObject.
2247         * platform/graphics/win/SimpleFontDataWin.cpp:
2248         (WebCore::SimpleFontData::platformCreateScaledFontData): Switch to GDIObject.
2249         * platform/win/CursorWin.cpp:
2250         (WebCore::createSharedCursor): Switch to GDIObject.
2251         * platform/win/DragImageCGWin.cpp:
2252         (WebCore::scaleDragImage): Switch to GDIObject.
2253         (WebCore::createDragImageFromImage):
2254         * platform/win/DragImageCairoWin.cpp: 
2255         (WebCore::scaleDragImage): Switch to GDIObject.
2256         (WebCore::createDragImageFromImage): Ditto.
2257         * platform/win/DragImageWin.cpp:
2258         (WebCore::createDragImageForLink): Switch to GDIObject.
2259         * platform/win/PasteboardWin.cpp:
2260         (WebCore::Pasteboard::writeImage): Switch to GDIObject.
2261         * platform/win/ScrollbarThemeWin.cpp:
2262         (WebCore::ScrollbarThemeWin::paintTrackPiece): Switch to GDIObject.
2263         * plugins/win/PluginViewWin.cpp:
2264         (WebCore::PluginView::updatePluginWidget): Switch to GDIObject.
2265         (WebCore::PluginView::snapshot): Ditto.
2266         * rendering/RenderThemeWin.cpp:
2267         (WebCore::drawControl): Switch to GDIObject.
2268
2269 2013-09-10  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2270
2271         REGRESSION (r147454): Youtube annotation links to new window broken
2272         https://bugs.webkit.org/show_bug.cgi?id=114242
2273
2274         Reviewed by Anders Carlsson.
2275
2276         Set the UserGestureIndicator to allow popups the same way the issue was solved for WebKit2.
2277
2278         * plugins/PluginView.cpp:
2279         (WebCore::PluginView::performRequest):
2280
2281 2013-09-10  Alberto Garcia  <berto@igalia.com>
2282
2283         [GTK] The code generator produces a warning if a parameter can be NULL
2284         https://bugs.webkit.org/show_bug.cgi?id=121093
2285
2286         Reviewed by Christophe Dumez.
2287
2288         Return an empty string instead of an undefined value if a
2289         particular parameter doesn't need to be checked.
2290
2291         * bindings/scripts/CodeGeneratorGObject.pm:
2292         (GetGReturnMacro):
2293
2294 2013-09-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2295
2296         MediaStream API: Enhance MediaStreamDescriptor add/remove component
2297         https://bugs.webkit.org/show_bug.cgi?id=120874
2298
2299         Merge blink https://chromium.googlesource.com/chromium/blink/+/67fcacf13ce922a762d7a1c6fb9e1b8e51e662ea
2300
2301         Reviewed by Eric Carlson.
2302
2303         No new tests needed.
2304
2305         * Modules/mediastream/MediaStream.cpp:
2306         (WebCore::MediaStream::addTrack):
2307         (WebCore::MediaStream::removeTrack):
2308         (WebCore::MediaStream::addRemoteTrack):
2309         (WebCore::MediaStream::removeRemoteTrack):
2310         * platform/mediastream/MediaStreamDescriptor.h:
2311         (WebCore::MediaStreamDescriptor::addRemoteTrack):
2312         (WebCore::MediaStreamDescriptor::removeRemoteTrack):
2313         (WebCore::MediaStreamDescriptor::addComponent):
2314         (WebCore::MediaStreamDescriptor::removeComponent):
2315
2316 2013-09-10  Andreas Kling  <akling@apple.com>
2317
2318         toFooElement() should use static_cast, not reinterpret_cast.
2319         <https://webkit.org/b/121087>
2320
2321         Reviewed by Antti Koivisto.
2322
2323         reinterpret_cast is not safe for downcasting with multiple inheritance.
2324         Add a ELEMENT_TYPE_CASTS(classname) macro that goes after class definitions.
2325         It expands into the following methods:
2326
2327             - FooElement* toFooElement(Node*)
2328             - const FooElement* toFooElement(const Node*)
2329             - FooElement& toFooElement(Node&)
2330             - const FooElement& toFooElement(const Node&)
2331
2332         As a bonus, it also adds these to catch unnecessary casting:
2333
2334             - void toFooElement(const Node*)
2335             - void toFooElement(const Node&)
2336
2337         There might be a more clever way of doing this, but this gets us to a
2338         correct place so we can think in peace.
2339
2340         * bridge/qt/qt_pixmapruntime.cpp:
2341         (JSC::Bindings::assignToHTMLImageElement):
2342         (JSC::Bindings::QtPixmapRuntime::toQt):
2343         * dom/Element.h:
2344         (WebCore::isElement):
2345         * dom/make_names.pl:
2346         (printTypeHelpers):
2347         * html/HTMLAnchorElement.h:
2348         * html/HTMLAreaElement.h:
2349         * html/HTMLAudioElement.h:
2350         * html/HTMLBaseElement.h:
2351         * html/HTMLCanvasElement.h:
2352         * html/HTMLElement.h:
2353         (WebCore::isHTMLElement):
2354         * html/HTMLFieldSetElement.h:
2355         * html/HTMLFormElement.h:
2356         * html/HTMLFrameSetElement.h:
2357         * html/HTMLImageElement.h:
2358         * html/HTMLInputElement.h:
2359         * html/HTMLLabelElement.h:
2360         * html/HTMLLegendElement.h:
2361         * html/HTMLMapElement.h:
2362         * html/HTMLMeterElement.h:
2363         * html/HTMLOptGroupElement.h:
2364         * html/HTMLOptionElement.h:
2365         * html/HTMLParamElement.h:
2366         * html/HTMLProgressElement.h:
2367         * html/HTMLScriptElement.h:
2368         * html/HTMLSourceElement.h:
2369         * html/HTMLStyleElement.h:
2370         * html/HTMLTableElement.h:
2371         * html/HTMLTableRowElement.h:
2372         * html/HTMLTextAreaElement.h:
2373         * html/HTMLTitleElement.h:
2374         * html/HTMLTrackElement.h:
2375         * svg/SVGAltGlyphDefElement.h:
2376         * svg/SVGAltGlyphElement.h:
2377         * svg/SVGAltGlyphItemElement.h:
2378         * svg/SVGAnimateMotionElement.h:
2379         * svg/SVGAnimateTransformElement.h:
2380         * svg/SVGCircleElement.h:
2381         * svg/SVGClipPathElement.h:
2382         * svg/SVGCursorElement.h:
2383         * svg/SVGEllipseElement.h:
2384         * svg/SVGFEDistantLightElement.h:
2385         * svg/SVGFEFuncAElement.h:
2386         * svg/SVGFEFuncBElement.h:
2387         * svg/SVGFEFuncGElement.h:
2388         * svg/SVGFEFuncRElement.h:
2389         * svg/SVGFEMergeNodeElement.h:
2390         * svg/SVGFEPointLightElement.h:
2391         * svg/SVGFESpotLightElement.h:
2392         * svg/SVGFilterElement.h:
2393         * svg/SVGFontElement.h:
2394         * svg/SVGFontFaceElement.h:
2395         * svg/SVGFontFaceNameElement.h:
2396         * svg/SVGFontFaceSrcElement.h:
2397         * svg/SVGFontFaceUriElement.h:
2398         * svg/SVGForeignObjectElement.h:
2399         * svg/SVGGlyphElement.h:
2400         * svg/SVGGlyphRefElement.h:
2401         * svg/SVGHKernElement.h:
2402         * svg/SVGImageElement.h:
2403         * svg/SVGLineElement.h:
2404         * svg/SVGLinearGradientElement.h:
2405         * svg/SVGMPathElement.h:
2406         * svg/SVGMarkerElement.h:
2407         * svg/SVGMaskElement.h:
2408         * svg/SVGMissingGlyphElement.h:
2409         * svg/SVGPathElement.h:
2410         * svg/SVGPatternElement.h:
2411         * svg/SVGRadialGradientElement.h:
2412         * svg/SVGRectElement.h:
2413         * svg/SVGSVGElement.h:
2414         * svg/SVGScriptElement.h:
2415         * svg/SVGStyleElement.h:
2416         * svg/SVGTextElement.h:
2417         * svg/SVGTextPathElement.h:
2418         * svg/SVGTitleElement.h:
2419         * svg/SVGUseElement.h:
2420         * svg/SVGVKernElement.h:
2421         * svg/SVGViewElement.h:
2422
2423 2013-09-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2424
2425         [GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails
2426         https://bugs.webkit.org/show_bug.cgi?id=105538
2427
2428         Reviewed by Chris Fleizach.
2429
2430         Expose '\n' for linebreaks when they were explicitly set by the
2431         author of the web content with a <br> tag.
2432
2433         Tests: accessibility/paragraph-with-linebreaks.html
2434
2435         * accessibility/AccessibilityNodeObject.cpp:
2436         (WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper
2437         function to decide when to append spaces when building the text
2438         under an element, considering line breaks.
2439         (WebCore::AccessibilityNodeObject::textUnderElement): Use the
2440         shouldAddSpaceBeforeAppendingNextElement() function here.
2441         * accessibility/AccessibilityRenderObject.cpp:
2442         (WebCore::AccessibilityRenderObject::textUnderElement): Return the
2443         renderer's text for accessibility objects exposing <br> elements.
2444         * html/parser/HTMLParserIdioms.h:
2445         (WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful
2446         to be passed to other functions like simplifyWhiteSpace().
2447
2448 2013-09-10  Arpita Bahuguna  <a.bah@samsung.com>
2449
2450         When deleting editable content, typing style should be reset when moving into another node.
2451         https://bugs.webkit.org/show_bug.cgi?id=120726
2452
2453         Reviewed by Ryosuke Niwa.
2454
2455         When moving from one text node to the other, while deleting characters,
2456         the deleted text node's style was being applied to any new characters
2457         added into the existing text node.
2458
2459         Typing Style in the frame selection maintains the editing style for the
2460         deleted text node, so that if new characters are inserted at the position
2461         of the deleted text node, it's style can be applied to them.
2462
2463         However, when moving into another text node, we should reset or clear the
2464         typing style maintained by the frame selection. This ensures that any new
2465         content inserted within the existing node does not take on any uncleared
2466         style of the deleted node.
2467
2468         Test: editing/deleting/maintain-style-after-delete.html
2469
2470         * editing/DeleteSelectionCommand.cpp:
2471         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2472         Calling clearTypingStyle() on frame selection whenever deletion occurs
2473         within the same text node. Thus any existing typing styleh held by the
2474         frame selection shall be cleared.
2475
2476 2013-09-09  Darin Adler  <darin@apple.com>
2477
2478         Some refinements in FrameView::layout
2479         https://bugs.webkit.org/show_bug.cgi?id=121076
2480
2481         Reviewed by Andreas Kling.
2482
2483         * page/FrameView.cpp:
2484         (WebCore::FrameView::layout): Use a reference for the document in
2485         this function since code assumes it's non-null anyway. Change code to
2486         only call styleResolverIfExists once. Rewrite comments about blocks
2487         and the scopes they create for better clarity. Make m_nestedLayoutCount
2488         easier to read. Use HTMLElement* for the pointer to the body element.
2489         Moved the call to calculateScrollbarModesForLayout in so we don't
2490         waste time doing it for subtree layouts. Get rid of the unhelpful
2491         currentHMode and currentVMode local variables. Get rid of an extra
2492         block scope we did not need.
2493
2494 2013-09-09  Santosh Mahto  <santosh.ma@samsung.com>
2495
2496         Adding "explicit" keyword in DOM related classes constructor
2497         https://bugs.webkit.org/show_bug.cgi?id=121031
2498
2499         Reviewed by Ryosuke Niwa.
2500
2501         Added the explicit keyword in constructors.
2502
2503         * dom/ActiveDOMObject.h:
2504         * dom/ContainerNode.h:
2505         * dom/DocumentStyleSheetCollection.h:
2506         * dom/ElementAncestorIterator.h:
2507         * dom/ElementData.h:
2508         * dom/ElementRareData.h:
2509         * dom/EventListenerMap.h:
2510         * dom/QualifiedName.h:
2511         (WebCore::QualifiedName::QualifiedName):
2512         * dom/TreeScope.h:
2513         * dom/ViewportArguments.h:
2514         (WebCore::ViewportArguments::ViewportArguments):
2515         * dom/VisitedLinkState.h:
2516
2517 2013-09-09  Andreas Kling  <akling@apple.com>
2518
2519         Remove unreviewed gunk I just accidentally committed :|
2520
2521 2013-09-09  Andreas Kling  <akling@apple.com>
2522
2523         HTMLTextAreaElement no longer needs custom style resolve callbacks.
2524         <https://webkit.org/b/121073>
2525
2526         Reviewed by Ryosuke Niwa.
2527
2528         After r155408 HTMLTextAreaElement doesn't override didAttachRenderer() anymore,
2529         so we don't need to fire callbacks on textarea elements during style resolve.
2530
2531         * html/HTMLTextAreaElement.cpp:
2532         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2533
2534 2013-09-09  Andreas Kling  <akling@apple.com>
2535
2536         ScriptController should have a Frame& internally.
2537         <https://webkit.org/b/121071>
2538
2539         Reviewed by Anders Carlsson.
2540
2541         Change ScriptController::m_frame to a reference since it's tied to
2542         the lifetime of the owning Frame.
2543
2544 2013-09-09  Andreas Kling  <akling@apple.com>
2545
2546         ScriptRunner should have a Document& internally.
2547         <https://webkit.org/b/121072>
2548
2549         Reviewed by Anders Carlsson.
2550
2551         Change ScriptRunner::m_document to a reference since it's tied to
2552         the lifetime of the Document.
2553
2554 2013-09-09  Andreas Kling  <akling@apple.com>
2555
2556         Ref-ify more stack guards.
2557         <https://webkit.org/b/121070>
2558
2559         Rubber-stamped by Anders Carlsson.
2560
2561         RefPtr<Foo> protect(this) => Ref<Foo> protect(*this).
2562
2563 2013-09-09  Andreas Kling  <akling@apple.com>
2564
2565         Generate more SVG type checks and conversions.
2566         <https://webkit.org/b/121066>
2567
2568         Reviewed by Anders Carlsson.
2569
2570         Switch another slew of SVG elements to auto-generated isFooElement()
2571         and toFooElement() helpers.
2572
2573         Removed now-unnecessary casts and assertions as appropriate.
2574         Converted some simple loops to childrenOfType iteration instead of
2575         traversing child Nodes.
2576
2577         PS. This patch also adds const versions of toFooElement().
2578
2579 2013-09-09  Dean Jackson  <dino@apple.com>
2580
2581         [WebGL] Allow multithreaded OpenGL contexts
2582         https://bugs.webkit.org/show_bug.cgi?id=121062
2583
2584         Reviewed by Simon Fraser.
2585
2586         Expose a new preference "multithreadedWebGLEnabled".
2587
2588         Also examine the value of that preference and, on Mac,
2589         tell the CGLContext that it should go to multithreaded mode.
2590
2591         * html/canvas/WebGLRenderingContext.cpp:
2592         (WebCore::WebGLRenderingContext::create): Look at the value of the new setting, and
2593         toggle a flag on the context attributes.
2594         * page/Settings.in: New Setting "multithreadedWebGLEnabled".
2595         * platform/graphics/GraphicsContext3D.h:
2596         (WebCore::GraphicsContext3D::Attributes::Attributes): Add a "multithreaded" flag.
2597         * platform/graphics/mac/GraphicsContext3DMac.mm:
2598         (WebCore::GraphicsContext3D::GraphicsContext3D): If the context attributes
2599         suggest we should, tell the OpenGL context to go into multithreaded mode.
2600
2601 2013-09-09  Ryosuke Niwa  <rniwa@webkit.org>
2602
2603         Remove HTMLTextFormControl::fixPlaceholderRenderer
2604         https://bugs.webkit.org/show_bug.cgi?id=121058
2605
2606         Reviewed by Kent Tamura.
2607
2608         HTMLTextFormControl::fixPlaceholderRenderer was added in r118733 to swap the order in which placeholder appears.
2609         Namely, when a text form control element is focused, placeholder should be rendered behind the text for the caret
2610         to render on top of, not behind, the placeholder text.  However, we can achieve the same effect by changing
2611         the order of elements in the shadow DOM instead of manually manipuating the render tree as the assertion failure
2612         mentioned in the change log is a bogus one.
2613
2614         Cleaned up the code by removing HTMLTextFormControl::fixPlaceholderRenderer and changed the order in which inner
2615         text element and placeholder element appear. Also fixed the assertion in Position's constructor.
2616
2617         * dom/Position.cpp:
2618         (WebCore::Position::Position): The original assertion was bogus. What we don't want have is for a Position to be
2619         before or after a shadow root. It's fine for it be anchroed against the shadow root as long as it's inside.
2620
2621         * html/HTMLTextAreaElement.cpp:
2622         (WebCore::HTMLTextAreaElement::updatePlaceholderText): Insert the placeholder before the inner text element.
2623         * html/HTMLTextAreaElement.h:
2624         * html/HTMLTextFormControlElement.cpp:
2625         * html/HTMLTextFormControlElement.h:
2626         * html/TextFieldInputType.cpp:
2627         (WebCore::TextFieldInputType::updatePlaceholderText): Ditto.
2628         * html/TextFieldInputType.h:
2629
2630 2013-09-09  Andreas Kling  <akling@apple.com>
2631
2632         Hide node() below RenderSVGModelObject, use element() instead.
2633         <https://webkit.org/b/121051>
2634
2635         Reviewed by Darin Adler.
2636
2637         This was almost already there, just delete node() and add an element() that returns a SVGElement*.
2638         The SVG render tree is crazy casual about compile-time types, this is only scratching the surface.
2639
2640 2013-09-09  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2641
2642         Fixing EFL build
2643         https://bugs.webkit.org/show_bug.cgi?id=121048
2644
2645         Reviewed by Darin Adler.
2646
2647         No new tests needed.
2648
2649         * platform/efl/RenderThemeEfl.cpp:
2650         (WebCore::RenderThemeEfl::applyEdjeRTLState):
2651
2652 2013-09-09  Bem Jones-Bey  <bjonesbe@adobe.com>
2653
2654         Move Floats out of RenderBlock
2655         https://bugs.webkit.org/show_bug.cgi?id=120779
2656
2657         Reviewed by Alexandru Chiculita.
2658
2659         Move FloatingObject, FloatingObjects and related code into
2660         FloatingObjects.{h,cpp}. This not only makes the code more readable
2661         and maintainable, it also will allow for more decoupling of
2662         RenderBlock and the FloatingObjects, hopefully making it possible for
2663         FloatingObjects to be more central and not need to have one for each
2664         RenderBlock that is affected by floats.
2665
2666         No new tests, no behavior change.
2667
2668         * CMakeLists.txt:
2669         * GNUmakefile.list.am:
2670         * Target.pri:
2671         * WebCore.vcxproj/WebCore.vcxproj:
2672         * WebCore.xcodeproj/project.pbxproj:
2673         * rendering/FloatingObjects.cpp: Added.
2674         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
2675         (WebCore::ComputeFloatOffsetAdapter::lowValue):
2676         (WebCore::ComputeFloatOffsetAdapter::highValue):
2677         (WebCore::ComputeFloatOffsetAdapter::outermostFloat):
2678         (WebCore::FloatingObjects::FloatingObjects):
2679         (WebCore::FloatingObjects::~FloatingObjects):
2680         (WebCore::FloatingObjects::clearLineBoxTreePointers):
2681         (WebCore::FloatingObjects::clear):
2682         (WebCore::FloatingObjects::increaseObjectsCount):
2683         (WebCore::FloatingObjects::decreaseObjectsCount):
2684         (WebCore::FloatingObjects::intervalForFloatingObject):
2685         (WebCore::FloatingObjects::addPlacedObject):
2686         (WebCore::FloatingObjects::removePlacedObject):
2687         (WebCore::FloatingObjects::add):
2688         (WebCore::FloatingObjects::remove):
2689         (WebCore::FloatingObjects::computePlacedFloatsTree):
2690         (WebCore::FloatingObjects::logicalLeftOffset):
2691         (WebCore::FloatingObjects::logicalRightOffset):
2692         (WebCore::rangesIntersect):
2693         (WebCore::::updateOffsetIfNeeded):
2694         (WebCore::::collectIfNeeded):
2695         (WebCore::::getHeightRemaining):
2696         (WebCore::::string):
2697         * rendering/FloatingObjects.h: Added.
2698         (WebCore::FloatingObject::FloatingObject):
2699         (WebCore::FloatingObject::clone):
2700         (WebCore::FloatingObject::type):
2701         (WebCore::FloatingObject::renderer):
2702         (WebCore::FloatingObject::isPlaced):
2703         (WebCore::FloatingObject::setIsPlaced):
2704         (WebCore::FloatingObject::x):
2705         (WebCore::FloatingObject::maxX):
2706         (WebCore::FloatingObject::y):
2707         (WebCore::FloatingObject::maxY):
2708         (WebCore::FloatingObject::width):
2709         (WebCore::FloatingObject::height):
2710         (WebCore::FloatingObject::setX):
2711         (WebCore::FloatingObject::setY):
2712         (WebCore::FloatingObject::setWidth):
2713         (WebCore::FloatingObject::setHeight):
2714         (WebCore::FloatingObject::frameRect):
2715         (WebCore::FloatingObject::setFrameRect):
2716         (WebCore::FloatingObject::paginationStrut):
2717         (WebCore::FloatingObject::setPaginationStrut):
2718         (WebCore::FloatingObject::isInPlacedTree):
2719         (WebCore::FloatingObject::setIsInPlacedTree):
2720         (WebCore::FloatingObject::shouldPaint):
2721         (WebCore::FloatingObject::setShouldPaint):
2722         (WebCore::FloatingObject::isDescendant):
2723         (WebCore::FloatingObject::setIsDescendant):
2724         (WebCore::FloatingObject::setRenderer):
2725         (WebCore::FloatingObject::originatingLine):
2726         (WebCore::FloatingObject::setOriginatingLine):
2727         (WebCore::FloatingObject::logicalTop):
2728         (WebCore::FloatingObject::logicalBottom):
2729         (WebCore::FloatingObject::logicalLeft):
2730         (WebCore::FloatingObject::logicalRight):
2731         (WebCore::FloatingObject::logicalWidth):
2732         (WebCore::FloatingObject::pixelSnappedLogicalTop):
2733         (WebCore::FloatingObject::pixelSnappedLogicalBottom):
2734         (WebCore::FloatingObject::pixelSnappedLogicalLeft):
2735         (WebCore::FloatingObject::pixelSnappedLogicalRight):
2736         (WebCore::FloatingObject::setLogicalTop):
2737         (WebCore::FloatingObject::setLogicalLeft):
2738         (WebCore::FloatingObject::setLogicalHeight):
2739         (WebCore::FloatingObject::setLogicalWidth):
2740         (WebCore::FloatingObjectHashFunctions::hash):
2741         (WebCore::FloatingObjectHashFunctions::equal):
2742         (WebCore::FloatingObjectHashTranslator::hash):
2743         (WebCore::FloatingObjectHashTranslator::equal):
2744         (WebCore::FloatingObjects::setHorizontalWritingMode):
2745         (WebCore::FloatingObjects::hasLeftObjects):
2746         (WebCore::FloatingObjects::hasRightObjects):
2747         (WebCore::FloatingObjects::set):
2748         (WebCore::FloatingObjects::placedFloatsTree):
2749         * rendering/RenderBlock.cpp:
2750         (WebCore::RenderBlock::RenderBlock):
2751         (WebCore::RenderBlock::insertFloatingObject):
2752         * rendering/RenderBlock.h:
2753         * rendering/RenderBlockLineLayout.cpp:
2754         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2755         (WebCore::LineLayoutState::lastFloat):
2756         (WebCore::LineLayoutState::setLastFloat):
2757         * rendering/RenderView.cpp:
2758         (WebCore::RenderView::intervalArena):
2759
2760 2013-09-09  David Hyatt  <hyatt@apple.com>
2761
2762         REGRESSION (r155377): Convert the media elements that were RenderBlocks to RenderBlockFlows
2763         https://bugs.webkit.org/show_bug.cgi?id=121052
2764
2765         Reviewed by Anders Carlsson.
2766
2767         Convert a couple of media renderers that I missed from RenderBlock to RenderBlockFlow.
2768         The previous patch that I landed added asserts that get triggered now when this
2769         situation occurs.
2770
2771         * rendering/RenderMediaControlElements.cpp:
2772         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
2773         (WebCore::RenderMediaVolumeSliderContainer::layout):
2774         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
2775         (WebCore::RenderTextTrackContainerElement::layout):
2776         * rendering/RenderMediaControlElements.h:
2777
2778 2013-09-09  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2779
2780         [Bug Fix] Calling m_audioComponents.remove in removeAudioComponent (MediaStreamDescriptor)
2781         https://bugs.webkit.org/show_bug.cgi?id=121034
2782
2783         Reviewed by Eric Carlson.
2784
2785         No new tests needed.
2786
2787         * platform/mediastream/MediaStreamDescriptor.h:
2788         (WebCore::MediaStreamDescriptor::removeAudioComponent):
2789
2790 2013-09-09  Anders Carlsson  <andersca@apple.com>
2791
2792         Stop using WTF type traits in WebCore
2793         https://bugs.webkit.org/show_bug.cgi?id=121042
2794
2795         Reviewed by Andreas Kling.
2796
2797         Replace uses of WTF type traits in CrossThreadCopier with a simpler solution
2798         that uses std::is_convertible_to and some helpers.
2799
2800         * dom/CrossThreadTask.h:
2801         * platform/CrossThreadCopier.h:
2802         * platform/MainThreadTask.h:
2803
2804 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2805
2806         Internals should always cause a layout before calling into TextIterator
2807         https://bugs.webkit.org/show_bug.cgi?id=120891
2808
2809         Reviewed by Antti Koivisto.
2810
2811         Inspired by https://chromium.googlesource.com/chromium/blink/+/5fee5da7b04a710171c79bd6e87eca3533188e45.
2812
2813         Force a layout in the constructors of TextIterator, and SimplifiedBackwardsTextIterator and remove
2814         superfluous calls to updateLayout() in other places.
2815
2816         As much as I hate for a constructor to have a side effect like this, I couldn't think of a better place
2817         to update the layout. Unfortunately, we're slowly moving away from manually createing TextIterator and
2818         wrapping them in a static function.
2819
2820         * editing/TextIterator.cpp:
2821         (WebCore::TextIterator::TextIterator):
2822         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2823         (WebCore::TextIterator::rangeFromLocationAndLength):
2824         (WebCore::findPlainText):
2825
2826 2013-09-09  David Hyatt  <hyatt@apple.com>
2827
2828         Move layoutBlock and layoutBlockChildren into RenderBlockFlow
2829         https://bugs.webkit.org/show_bug.cgi?id=121036
2830
2831         Reviewed by Dean Jackson.
2832
2833         Move layoutBlock into RenderBlockFlow and make the base class version of
2834         the method ASSERT_NOT_REACHED. Begin the process of moving block layout 
2835         into RenderBlockFlow by putting layoutBlockChildren there as well.
2836         
2837         This patch also puts clearFloats into RenderBlockFlow and just ditches the
2838         SVG-specific forceLayoutInlineChildren by letting RenderSVGText do what it
2839         needs in its own file.
2840
2841         Convert RenderListBox to be a RenderBlockFlow, since this is necessary for it
2842         to get the correct layoutBlock method.
2843         
2844         Patch RenderRegion to call RenderBlockFlow::layoutBlock rather than RenderBlock::layoutBlock.
2845         
2846         Fix run-ins so that they create block flows rather than blocks, and restrict run-ins to
2847         only be block flows.
2848
2849         * rendering/RenderBlock.cpp:
2850         (WebCore::RenderBlock::layoutBlock):
2851         (WebCore::RenderBlock::createReplacementRunIn):
2852         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
2853         * rendering/RenderBlock.h:
2854         * rendering/RenderBlockFlow.cpp:
2855         (WebCore::RenderBlockFlow::clearFloats):
2856         (WebCore::RenderBlockFlow::layoutBlock):
2857         (WebCore::RenderBlockFlow::layoutBlockChildren):
2858         * rendering/RenderBlockFlow.h:
2859         * rendering/RenderBlockLineLayout.cpp:
2860         (WebCore::RenderBlockFlow::layoutInlineChildren):
2861         * rendering/RenderListBox.cpp:
2862         (WebCore::RenderListBox::RenderListBox):
2863         (WebCore::RenderListBox::layout):
2864         (WebCore::RenderListBox::paintObject):
2865         (WebCore::RenderListBox::addFocusRingRects):
2866         (WebCore::RenderListBox::nodeAtPoint):
2867         * rendering/RenderListBox.h:
2868         * rendering/RenderRegion.cpp:
2869         (WebCore::RenderRegion::paintObject):
2870         (WebCore::RenderRegion::styleDidChange):
2871         (WebCore::RenderRegion::layoutBlock):
2872         (WebCore::RenderRegion::insertedIntoTree):
2873         (WebCore::RenderRegion::willBeRemovedFromTree):
2874         (WebCore::RenderRegion::computeIntrinsicLogicalWidths):
2875         (WebCore::RenderRegion::computePreferredLogicalWidths):
2876         (WebCore::RenderRegion::updateLogicalHeight):
2877         * rendering/RenderTextControlSingleLine.cpp:
2878         (WebCore::RenderTextControlSingleLine::layout):
2879         * rendering/svg/RenderSVGText.cpp:
2880         (WebCore::RenderSVGText::layout):
2881
2882 2013-09-09  Antti Koivisto  <antti@apple.com>
2883
2884         Try to fix GTK build.
2885         
2886         Not reviewed.
2887
2888         * accessibility/AccessibilityTable.cpp:
2889         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2890
2891 2013-09-09  Antti Koivisto  <antti@apple.com>
2892
2893         Hide node() below RenderLayerModelObject, use element() instead
2894         https://bugs.webkit.org/show_bug.cgi?id=121038
2895
2896         Reviewed by Dave Hyatt.
2897
2898         Switch all call sites to element(). Remove now unnecessary casts, type checks and dead code.
2899         Make constructors below RenderLayerModelObject take an Element instead of a ContainerNode.
2900         
2901         This also removes a branch from many hasTagName() and isFooElement() calls.
2902
2903         * accessibility/AccessibilityRenderObject.cpp:
2904         (WebCore::startOfContinuations):
2905         * accessibility/AccessibilityTable.cpp:
2906         (WebCore::AccessibilityTable::isDataTable):
2907         * accessibility/AccessibilityTableCell.cpp:
2908         (WebCore::AccessibilityTableCell::titleUIElement):
2909         * accessibility/AccessibilityTableColumn.cpp:
2910         (WebCore::AccessibilityTableColumn::headerObjectForSection):
2911         * editing/markup.cpp:
2912         (WebCore::highestAncestorToWrapMarkup):
2913         * html/HTMLTableCellElement.cpp:
2914         (WebCore::HTMLTableCellElement::cellAbove):
2915         * html/shadow/SliderThumbElement.cpp:
2916         (WebCore::RenderSliderThumb::updateAppearance):
2917         (WebCore::RenderSliderContainer::computeLogicalHeight):
2918         (WebCore::RenderSliderContainer::layout):
2919         * page/Frame.cpp:
2920         (WebCore::Frame::frameForWidget):
2921         * rendering/RenderBlock.cpp:
2922         (WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
2923         (WebCore::RenderBlock::RenderBlock):
2924         (WebCore::RenderBlock::clone):
2925         (WebCore::RenderBlock::createReplacementRunIn):
2926         (WebCore::RenderBlock::paintObject):
2927         (WebCore::RenderBlock::isSelectionRoot):
2928         (WebCore::RenderBlock::nodeForHitTest):
2929         (WebCore::RenderBlock::hasLineIfEmpty):
2930         (WebCore::RenderBlock::addFocusRingRects):
2931         * rendering/RenderBlock.h:
2932         * rendering/RenderBlockFlow.cpp:
2933         (WebCore::RenderBlockFlow::RenderBlockFlow):
2934         * rendering/RenderBlockFlow.h:
2935         * rendering/RenderBlockLineLayout.cpp:
2936         (WebCore::RenderBlock::addOverflowFromInlineChildren):
2937         * rendering/RenderBox.cpp:
2938         (WebCore::RenderBox::RenderBox):
2939         (WebCore::RenderBox::updateFromStyle):
2940         (WebCore::RenderBox::scroll):
2941         (WebCore::RenderBox::logicalScroll):
2942         (WebCore::RenderBox::canBeProgramaticallyScrolled):
2943         (WebCore::RenderBox::nodeAtPoint):
2944         (WebCore::RenderBox::paintCustomHighlight):
2945         (WebCore::RenderBox::computeLogicalWidthInRegion):
2946         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
2947         (WebCore::RenderBox::localCaretRect):
2948         * rendering/RenderBox.h:
2949         * rendering/RenderBoxModelObject.cpp:
2950         (WebCore::RenderBoxModelObject::RenderBoxModelObject):
2951         * rendering/RenderBoxModelObject.h:
2952         * rendering/RenderButton.cpp:
2953         (WebCore::RenderButton::updateFromElement):
2954         (WebCore::RenderButton::canHaveGeneratedChildren):
2955         * rendering/RenderButton.h:
2956         * rendering/RenderEmbeddedObject.cpp:
2957         (WebCore::RenderEmbeddedObject::paintContents):
2958         (WebCore::RenderEmbeddedObject::isReplacementObscured):
2959         (WebCore::RenderEmbeddedObject::layout):
2960         (WebCore::RenderEmbeddedObject::viewCleared):
2961         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2962         * rendering/RenderFileUploadControl.cpp:
2963         (WebCore::RenderFileUploadControl::updateFromElement):
2964         (WebCore::RenderFileUploadControl::maxFilenameWidth):
2965         (WebCore::RenderFileUploadControl::paintObject):
2966         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2967         (WebCore::RenderFileUploadControl::uploadButton):
2968         (WebCore::RenderFileUploadControl::fileTextValue):
2969         * rendering/RenderFrame.cpp:
2970         (WebCore::RenderFrame::edgeInfo):
2971         (WebCore::RenderFrame::viewCleared):
2972         * rendering/RenderFrameBase.cpp:
2973         (WebCore::RenderFrameBase::layoutWithFlattening):
2974         * rendering/RenderFrameSet.cpp:
2975         (WebCore::RenderFrameSet::frameSet):
2976         * rendering/RenderHTMLCanvas.cpp:
2977         (WebCore::RenderHTMLCanvas::requiresLayer):
2978         (WebCore::RenderHTMLCanvas::paintReplaced):
2979         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
2980         * rendering/RenderIFrame.cpp:
2981         (WebCore::RenderIFrame::isSeamless):
2982         (WebCore::RenderIFrame::flattenFrame):
2983         * rendering/RenderImage.cpp:
2984         (WebCore::RenderImage::imageChanged):
2985         (WebCore::RenderImage::paintAreaElementFocusRing):
2986         (WebCore::RenderImage::areaElementFocusChanged):
2987         (WebCore::RenderImage::paintIntoRect):
2988         (WebCore::RenderImage::imageMap):
2989         (WebCore::RenderImage::nodeAtPoint):
2990         (WebCore::RenderImage::updateAltText):
2991         * rendering/RenderInline.cpp:
2992         (WebCore::RenderInline::clone):
2993         (WebCore::RenderInline::hitTestCulledInline):
2994         (WebCore::RenderInline::updateHitTestResult):
2995         * rendering/RenderInline.h:
2996         * rendering/RenderLayer.cpp:
2997         (WebCore::RenderLayer::RenderLayer):
2998         (WebCore::RenderLayer::~RenderLayer):
2999         (WebCore::RenderLayer::name):
3000         (WebCore::RenderLayer::isTransparent):
3001         (WebCore::RenderLayer::scrollTo):
3002         (WebCore::RenderLayer::resize):
3003         (WebCore::RenderLayer::filterNeedsRepaint):
3004         * rendering/RenderLayerBacking.cpp:
3005         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
3006         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
3007         * rendering/RenderLayerCompositor.cpp:
3008         (WebCore::RenderLayerCompositor::frameContentsCompositor):
3009         * rendering/RenderLayerFilterInfo.cpp:
3010         (WebCore::RenderLayer::FilterInfo::notifyFinished):
3011         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
3012         (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded):
3013         * rendering/RenderLayerModelObject.cpp:
3014         (WebCore::RenderLayerModelObject::RenderLayerModelObject):
3015         * rendering/RenderLayerModelObject.h:
3016         (WebCore::RenderLayerModelObject::element):
3017         * rendering/RenderListBox.cpp:
3018         (WebCore::RenderListBox::selectElement):
3019         (WebCore::RenderListBox::paintItemForeground):
3020         (WebCore::RenderListBox::paintItemBackground):
3021         (WebCore::RenderListBox::scrollTo):
3022         (WebCore::RenderListBox::createScrollbar):
3023         * rendering/RenderListItem.cpp:
3024         (WebCore::isList):
3025         (WebCore::enclosingList):
3026         (WebCore::nextListItem):
3027         (WebCore::previousListItem):
3028         (WebCore::RenderListItem::calcValue):
3029         (WebCore::RenderListItem::explicitValueChanged):
3030         (WebCore::RenderListItem::setExplicitValue):
3031         (WebCore::RenderListItem::clearExplicitValue):
3032         (WebCore::previousOrNextItem):
3033         (WebCore::RenderListItem::updateListMarkerNumbers):
3034         * rendering/RenderMarquee.cpp:
3035         (WebCore::RenderMarquee::marqueeSpeed):
3036         * rendering/RenderMedia.cpp:
3037         (WebCore::RenderMedia::mediaElement):
3038         * rendering/RenderMediaControlElements.cpp:
3039         (WebCore::RenderMediaControlTimelineContainer::layout):
3040         (WebCore::RenderTextTrackContainerElement::layout):
3041         * rendering/RenderMenuList.cpp:
3042         (WebCore::RenderMenuList::selectElement):
3043         (WebCore::RenderMenuList::valueChanged):
3044         (WebCore::RenderMenuList::createScrollbar):
3045         * rendering/RenderMeter.cpp:
3046         (WebCore::RenderMeter::meterElement):
3047         * rendering/RenderPart.cpp:
3048         (WebCore::RenderPart::requiresAcceleratedCompositing):
3049         (WebCore::RenderPart::embeddedContentBox):
3050         * rendering/RenderProgress.cpp:
3051         (WebCore::RenderProgress::progressElement):
3052         * rendering/RenderReplaced.cpp:
3053         (WebCore::RenderReplaced::positionForPoint):
3054         (WebCore::RenderReplaced::isSelected):
3055         * rendering/RenderSearchField.cpp:
3056         (WebCore::RenderSearchField::autosaveName):
3057         (WebCore::RenderSearchField::createScrollbar):
3058         * rendering/RenderSlider.cpp:
3059         (WebCore::RenderSlider::layout):
3060         (WebCore::RenderSlider::inDragMode):
3061         * rendering/RenderSnapshottedPlugIn.cpp:
3062         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
3063         * rendering/RenderTable.cpp:
3064         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
3065         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3066         (WebCore::RenderTable::nodeAtPoint):
3067         * rendering/RenderTableCell.cpp:
3068         (WebCore::RenderTableCell::parseColSpanFromDOM):
3069         (WebCore::RenderTableCell::parseRowSpanFromDOM):
3070         (WebCore::RenderTableCell::updateColAndRowSpanFlags):
3071         (WebCore::RenderTableCell::colSpanOrRowSpanChanged):
3072         (WebCore::RenderTableCell::computePreferredLogicalWidths):
3073         * rendering/RenderTableCol.cpp:
3074         (WebCore::RenderTableCol::updateFromElement):
3075         * rendering/RenderTextControl.cpp:
3076         (WebCore::RenderTextControl::textFormControlElement):
3077         (WebCore::RenderTextControl::adjustInnerTextStyle):
3078         (WebCore::RenderTextControl::updateFromElement):
3079         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
3080         * rendering/RenderTextControlMultiLine.cpp:
3081         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
3082         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3083         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
3084         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
3085         * rendering/RenderTextControlSingleLine.cpp:
3086         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3087         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
3088         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
3089         (WebCore::RenderTextControlSingleLine::inputElement):
3090         * rendering/RenderThemeMac.mm:
3091         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3092         * rendering/RenderTreeAsText.cpp:
3093         (WebCore::writeRenderRegionList):
3094         * rendering/RenderVideo.cpp:
3095         (WebCore::RenderVideo::updateIntrinsicSize):
3096         (WebCore::RenderVideo::videoElement):
3097         * rendering/RenderWidget.cpp:
3098         (WebCore::RenderWidget::setWidgetGeometry):
3099         (WebCore::RenderWidget::updateWidgetPosition):
3100         (WebCore::RenderWidget::nodeAtPoint):
3101         * rendering/mathml/RenderMathMLFenced.cpp:
3102         (WebCore::RenderMathMLFenced::updateFromElement):
3103         (WebCore::RenderMathMLFenced::createMathMLOperator):
3104         (WebCore::RenderMathMLFenced::styleDidChange):
3105         * rendering/mathml/RenderMathMLFraction.cpp:
3106         (WebCore::RenderMathMLFraction::updateFromElement):
3107         * rendering/mathml/RenderMathMLOperator.cpp:
3108         (WebCore::RenderMathMLOperator::updateFromElement):
3109         (WebCore::RenderMathMLOperator::createGlyph):
3110         * rendering/mathml/RenderMathMLSpace.cpp:
3111         (WebCore::RenderMathMLSpace::updateFromElement):
3112         * rendering/svg/RenderSVGForeignObject.cpp:
3113         (WebCore::RenderSVGForeignObject::layout):
3114         * rendering/svg/RenderSVGRoot.cpp:
3115         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
3116         (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
3117         (WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument):
3118         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
3119         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
3120         (WebCore::RenderSVGRoot::layout):
3121         (WebCore::RenderSVGRoot::paintReplaced):
3122         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
3123         (WebCore::RenderSVGRoot::nodeAtPoint):
3124         (WebCore::RenderSVGRoot::hasRelativeDimensions):
3125         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
3126         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
3127         * rendering/svg/RenderSVGText.cpp:
3128         (WebCore::RenderSVGText::layout):
3129         (WebCore::RenderSVGText::strokeBoundingBox):
3130         * rendering/svg/RenderSVGTextPath.cpp:
3131         (WebCore::RenderSVGTextPath::layoutPath):
3132         (WebCore::RenderSVGTextPath::startOffset):
3133         (WebCore::RenderSVGTextPath::exactAlignment):
3134         (WebCore::RenderSVGTextPath::stretchMethod):
3135
3136 2013-09-09  Antti Koivisto  <antti@apple.com>
3137
3138         Make RenderView anonymous
3139         https://bugs.webkit.org/show_bug.cgi?id=121013
3140
3141         Reviewed by Darin Adler and Dave Hyatt.
3142
3143         RenderView is currently the only renderer that has an associated Node that is not either Element or Text.
3144         By making it anonymous (not have associated node, RenderView::node() returns null) we will be able to 
3145         significantly tighten typing in both render and DOM trees.
3146
3147         * accessibility/AccessibilityRenderObject.cpp:
3148         (WebCore::AccessibilityRenderObject::node):
3149         
3150             We need to grab document() instead of node() in a few places for RenderViews to keep existing code
3151             behaving like it did.
3152
3153         * inspector/InspectorLayerTreeAgent.cpp:
3154         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3155         
3156             Don't tell inspector that the root layer is anonymous for now to avoid changing behavior.
3157
3158         * rendering/RenderBlock.cpp:
3159         (WebCore::RenderBlock::nodeForHitTest):
3160         * rendering/RenderBox.cpp:
3161         (WebCore::RenderBox::canBeProgramaticallyScrolled):
3162         
3163             The old non-virtual RenderView test renderer->node == &renderer->document() does not work anymore.
3164             Switch to isRenderView() which is now non-virtual in a number of places.
3165
3166         (WebCore::RenderBox::canAutoscroll):
3167         (WebCore::RenderBox::findAutoscrollable):
3168         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3169         * rendering/RenderBoxModelObject.cpp:
3170         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
3171         * rendering/RenderLayerBacking.cpp:
3172         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3173         * rendering/RenderObject.h:
3174         (WebCore::RenderObject::isRenderReplaced):
3175         (WebCore::RenderObject::isAnonymousBlock):
3176         
3177             RenderView is anonymous but not a CSS anonymous block.
3178
3179         (WebCore::RenderObject::isText):
3180         (WebCore::RenderObject::isRenderView):
3181         
3182             Make isRenderView non-virtual since it is now hot. Reuse existing bits.
3183
3184         (WebCore::RenderObject::setIsText):
3185         (WebCore::RenderObject::setIsRenderView):
3186         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
3187         * rendering/RenderTreeAsText.cpp:
3188         (WebCore::writeSelection):
3189         * rendering/RenderView.cpp:
3190         
3191             Make anonymous.
3192
3193         (WebCore::RenderView::RenderView):
3194         * rendering/RenderView.h:
3195         * rendering/svg/RenderSVGRoot.cpp:
3196         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
3197
3198 2013-09-09  Bem Jones-Bey  <bjonesbe@adobe.com>
3199
3200         Move logical(Left|Right)FloatOffsetForLine methods into FloatingObjects
3201         https://bugs.webkit.org/show_bug.cgi?id=120705
3202
3203         Reviewed by Sam Weinig.
3204
3205         These are the only consumers of the CalculateFloatOffsetAdapter and
3206         the placed floats tree, so it will allow us to reduce the public
3207         interface of FloatingObjects and make the placed floats tree private.
3208
3209         No new tests, no behavior change.
3210
3211         * rendering/RenderBlock.cpp:
3212         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
3213         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
3214         (WebCore::RenderBlock::FloatingObjects::logicalLeftOffset):
3215         (WebCore::RenderBlock::FloatingObjects::logicalRightOffset):
3216         * rendering/RenderBlock.h:
3217         (WebCore::RenderBlock::FloatingObjects::placedFloatsTree):
3218
3219 2013-09-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3220
3221         Add support for BeforeUnloadEvent interface
3222         https://bugs.webkit.org/show_bug.cgi?id=120849
3223
3224         Reviewed by Darin Adler.
3225
3226         Add support for BeforeUnloadEvent as per the specification:
3227         http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
3228
3229         BeforeUnloadEvent has a returnValue attribute. Setting returnValue to a non-empty
3230         string in an event handler causes the user agent should ask the user to confirm
3231         that they wish to unload the document. This is equivalent to returning a non-empty
3232         string in the EventHandler:
3233         http://www.whatwg.org/specs/web-apps/current-work/#onbeforeunloadeventhandler
3234
3235         BeforeUnloadEvent and returnValue are already supported by IE and Firefox. Previously,
3236         WebKit was passing a base Event type to the beforeunload event handlers instead of
3237         a BeforeUnloadEvent.
3238
3239         Note that this patch keeps support for the legacy Event.returnValue attribute. This used
3240         to be an IE extension but this is no longer supported by IE (nor Firefox). The standard
3241         preventDefault() should be used instead however (supported in IE >= 9).
3242
3243         Test: fast/events/before-unload-returnValue.html
3244
3245         * CMakeLists.txt:
3246         * DerivedSources.cpp:
3247         * DerivedSources.make:
3248         * DerivedSources.pri:
3249         * GNUmakefile.list.am:
3250         * WebCore.order:
3251         * WebCore.vcxproj/WebCore.vcxproj:
3252         * bindings/js/JSEventListener.cpp:
3253         (WebCore::JSEventListener::handleEvent):
3254         * dom/BeforeUnloadEvent.cpp:
3255         (WebCore::BeforeUnloadEvent::isBeforeUnloadEvent):
3256         (WebCore::BeforeUnloadEvent::~BeforeUnloadEvent):
3257         * dom/BeforeUnloadEvent.h:
3258         (WebCore::BeforeUnloadEvent::create):
3259         (WebCore::BeforeUnloadEvent::returnValue):
3260         (WebCore::BeforeUnloadEvent::setReturnValue):
3261         (WebCore::toBeforeUnloadEvent):
3262         * dom/BeforeUnloadEvent.idl: Added.
3263         * dom/Event.cpp:
3264         (WebCore::Event::isBeforeUnloadEvent):
3265         * dom/Event.h:
3266         (WebCore::Event::legacyReturnValue):
3267         (WebCore::Event::setLegacyReturnValue):
3268         * dom/Event.idl:
3269         * dom/EventNames.in:
3270         * loader/FrameLoader.cpp:
3271         (WebCore::FrameLoader::handleBeforeUnloadEvent):
3272
3273 2013-09-06  David Hyatt  <hyatt@apple.com>
3274
3275         Get rid of isBlockFlowFlexBoxOrGrid().
3276         https://bugs.webkit.org/show_bug.cgi?id=120897
3277
3278         Convert all callers and get rid of this method.
3279
3280         Reviewed by Beth Dakin.
3281
3282         * accessibility/AccessibilityRenderObject.cpp:
3283         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3284         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3285         * dom/Position.cpp:
3286         (WebCore::Position::isCandidate):
3287         (WebCore::Position::getInlineBoxAndOffset):
3288         (WebCore::Position::primaryDirection):
3289         * dom/PositionIterator.cpp:
3290         (WebCore::PositionIterator::isCandidate):
3291         * editing/CompositeEditCommand.cpp:
3292         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
3293         * editing/Editor.cpp:
3294         (WebCore::Editor::baseWritingDirectionForSelectionStart):
3295         * editing/FrameSelection.cpp:
3296         (WebCore::caretRenderer):
3297         * editing/TextIterator.cpp:
3298         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
3299         * editing/TypingCommand.cpp:
3300         (WebCore::TypingCommand::makeEditableRootEmpty):
3301         * editing/htmlediting.cpp:
3302         (WebCore::isBlockFlowElement):
3303         * rendering/LayoutState.cpp:
3304         (WebCore::LayoutState::LayoutState):
3305         * rendering/RenderBlock.cpp:
3306         (WebCore::RenderBlock::layoutBlock):
3307         (WebCore::RenderBlock::collapseMargins):
3308         (WebCore::RenderBlock::selectionGaps):
3309         (WebCore::RenderBlock::firstLineBoxBaseline):
3310         (WebCore::RenderBlock::lastLineBoxBaseline):
3311         (WebCore::RenderBlock::firstLineBlock):
3312         (WebCore::findFirstLetterBlock):
3313         (WebCore::shouldCheckLines):
3314         (WebCore::RenderBlock::adjustForBorderFit):
3315         * rendering/RenderBox.cpp:
3316         (WebCore::RenderBox::computeRectForRepaint):
3317         (WebCore::RenderBox::positionForPoint):
3318         * rendering/RenderBoxModelObject.h:
3319         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
3320         * rendering/RenderInline.cpp:
3321         (WebCore::RenderInline::computeRectForRepaint):
3322         * rendering/RenderLineBoxList.cpp:
3323         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
3324         * rendering/RenderObject.cpp:
3325         (WebCore::RenderObject::computeRectForRepaint):
3326         (WebCore::RenderObject::styleWillChange):
3327         (WebCore::firstLineStyleForCachedUncachedType):
3328         * rendering/RenderObject.h:
3329         * rendering/RenderObjectChildList.cpp:
3330         (WebCore::RenderObjectChildList::insertChildNode):
3331         * rendering/RenderView.h:
3332
3333 2013-09-09  Eric Carlson  <eric.carlson@apple.com>
3334
3335         MediaStream API: Stop means stop
3336         https://bugs.webkit.org/show_bug.cgi?id=120873
3337
3338         Reviewed by Jer Noble.
3339
3340         Merge blink https://chromium.googlesource.com/chromium/blink/+/9a97b0f3892320fa5741485e06a78183b77c3635
3341         by Tommy Widenflycht.
3342
3343         Removing notification functionality from MediaStreamTrack::stop because the world is being torn down.
3344
3345         No new tests, the original author was unable to come up with a reliable test case.
3346
3347         * Modules/mediastream/MediaStreamTrack.cpp:
3348         (WebCore::MediaStreamTrack::stop): Don't call didEndTrack, the world is going away.
3349
3350 2013-09-09  Filip Pizlo  <fpizlo@apple.com>
3351
3352         Unreviewed, fix build.
3353
3354         * Modules/encryptedmedia/MediaKeySession.h:
3355
3356 2013-09-09  Eric Carlson  <eric.carlson@apple.com>
3357
3358         MediaStream API: Moving Add/Remove track from WebMediaStreamCenterClient to WebMediaStream
3359         https://bugs.webkit.org/show_bug.cgi?id=120872
3360
3361         Reviewed by Jer Noble.
3362
3363         Merge https://chromium.googlesource.com/chromium/blink/+/7d740fd27c1f345b59c846df01c3adce53c18e6e
3364         Simple cleanup that makes the API cleaner.
3365
3366         * Modules/mediastream/MediaStream.cpp:
3367         (WebCore::MediaStream::removeTrack):
3368         (WebCore::MediaStream::addRemoteTrack):
3369         (WebCore::MediaStream::removeRemoteTrack):
3370         * platform/mediastream/MediaStreamCenter.cpp:
3371         * platform/mediastream/MediaStreamCenter.h:
3372         * platform/mediastream/MediaStreamDescriptor.h:
3373         (WebCore::MediaStreamDescriptor::removeAudioComponent):
3374         (WebCore::MediaStreamDescriptor::addRemoteTrack):
3375         (WebCore::MediaStreamDescriptor::removeRemoteTrack):
3376
3377 2013-09-09  ChangSeok Oh  <changseok.oh@collabora.com>
3378
3379         [WK2] Assertion failure in WebCore::Page::checkSubframeCountConsistency when going back
3380         https://bugs.webkit.org/show_bug.cgi?id=119781
3381
3382         Reviewed by Alexey Proskuryakov.
3383
3384         We should pair restoring a cached frame and adding it to FrameTree so that
3385         actual added frame count in FrameTree keeps same with restored frame count.
3386         Otherwise assert failure occurs in Page::CheckSubframeCountConsistency.
3387         We have added cached frames to FrameTree ahead and then restored them by tree travelsal.
3388         But this way doesn't guarantee subframecount of Page and the number of child of FrameTree are equal.
3389         In addition, we still make sure that adding a cached frame to FrameTree should happen
3390         before opening it. Because FrameTree might be used while restoring a cached page.
3391
3392         Test: fast/history/go-back-to-iframe-with-plugin.html
3393
3394         * history/CachedFrame.cpp:
3395         (WebCore::CachedFrameBase::restore):
3396         (WebCore::CachedFrame::open):
3397
3398 2013-09-09  Luciano Wolf  <luciano.wolf@openbossa.org>
3399
3400         Nix upstreaming - Adding stubs and Nix specific platform files
3401         https://bugs.webkit.org/show_bug.cgi?id=118358
3402
3403         Reviewed by Benjamin Poulain.
3404
3405         Basically adding all files that have "Nix" in their names and
3406         are related to WebCore module.
3407
3408         No new tests. They will be uploaded on another patch during the
3409         upstreaming process.
3410
3411         * css/mediaControlsNix.css: Added.
3412         * css/mediaControlsNixFullscreen.css: Added.
3413         * page/nix/EventHandlerNix.cpp: Added.
3414         * platform/graphics/egl/GLContextFromCurrentEGL.cpp: Added.
3415         * platform/graphics/egl/GLContextFromCurrentEGL.h: Added.
3416         * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Added.
3417         * platform/graphics/nix/IconNix.cpp: Added.
3418         * platform/graphics/nix/ImageNix.cpp: Added.
3419         * platform/nix/CursorNix.cpp: Added.
3420         * platform/nix/DragDataNix.cpp: Added.
3421         * platform/nix/DragImageNix.cpp: Added.
3422         * platform/nix/GamepadsNix.cpp: Added.
3423         * platform/nix/LanguageNix.cpp: Added.
3424         * platform/nix/LocalizedStringsNix.cpp: Added.
3425         * platform/nix/NixKeyboardUtilities.cpp: Added.
3426         * platform/nix/NixKeyboardUtilities.h: Added.
3427         * platform/nix/PasteboardNix.cpp: Added.
3428         * platform/nix/PlatformKeyboardEventNix.cpp: Added.
3429         * platform/nix/PlatformScreenNix.cpp: Added.
3430         * platform/nix/SoundNix.cpp: Added.
3431         * platform/nix/WidgetNix.cpp: Added.
3432         * platform/text/nix/TextBreakIteratorInternalICUNix.cpp: Added.
3433
3434 2013-09-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
3435
3436         Preparing WebCore to receive Nix Port
3437         https://bugs.webkit.org/show_bug.cgi?id=118326
3438
3439         Reviewed by Eric Carlson.
3440
3441         Only adding the compilation directives that are Nix specific, in the
3442         existent WebCore files
3443
3444         * loader/FrameLoader.cpp:
3445         (WebCore::FrameLoader::defaultObjectContentType):
3446         * platform/Cursor.h:
3447         * platform/DragData.h:
3448         * platform/DragImage.h:
3449         * platform/FileSystem.h:
3450         * platform/RunLoop.h:
3451         * platform/Widget.h:
3452         * platform/audio/FFTFrame.h:
3453         * platform/audio/HRTFElevation.cpp:
3454         * platform/cairo/WidgetBackingStore.h:
3455         * platform/graphics/ANGLEWebKitBridge.h:
3456         * platform/graphics/FontPlatformData.h:
3457         * platform/graphics/GraphicsContext3D.cpp:
3458         * platform/graphics/GraphicsContext3D.h:
3459         * platform/graphics/OpenGLESShims.h:
3460         * platform/graphics/OpenGLShims.cpp:
3461         (WebCore::getProcAddress):