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