f9e786d4013a24f168f0ae2284043185ba364130
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-24  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r156379.
4         http://trac.webkit.org/changeset/156379
5         https://bugs.webkit.org/show_bug.cgi?id=121894
6
7         Caused many assertion failures (Requested by ap on #webkit).
8
9         * css/CSSValue.cpp:
10         (WebCore::CSSValue::destroy):
11         * css/StyleResolver.cpp:
12         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
13         (WebCore::StyleResolver::createFilterOperations):
14         * css/TransformFunctions.cpp:
15         (WebCore::transformsForValue):
16         * css/WebKitCSSArrayFunctionValue.h:
17         * css/WebKitCSSFilterValue.h:
18         * css/WebKitCSSMatFunctionValue.h:
19         * css/WebKitCSSMixFunctionValue.h:
20         * css/WebKitCSSSVGDocumentValue.h:
21         * css/WebKitCSSShaderValue.h:
22         (WebCore::toWebKitCSSShaderValue):
23         * css/WebKitCSSTransformValue.h:
24
25 2013-09-24  Ryosuke Niwa  <rniwa@webkit.org>
26
27         Crash in Document::setFocusedElement
28         https://bugs.webkit.org/show_bug.cgi?id=121888
29
30         Reviewed by Andreas Kling.
31
32         Merge https://chromium.googlesource.com/chromium/blink/+/4a594a3de7d9761462b55fb27a6850d767419af2
33
34         The crash was caused by attempting to call Chrome:focusedNodeChanged() after m_page had already
35         been cleared. This could happen when blur's event handler removes the iframe from which
36         the focus had been moved. Fixed the bug by adding a null pointer check.
37
38         Test: fast/events/blur-remove-parent-crash.html
39
40         * dom/Document.cpp:
41         (WebCore::Document::setFocusedElement):
42
43 2013-09-24  Antti Koivisto  <antti@apple.com>
44
45         Remove HTMLContentElement
46         https://bugs.webkit.org/show_bug.cgi?id=121891
47
48         Reviewed by Andreas Kling.
49
50         Remove an unsused Shadow DOM type.
51
52         * DerivedSources.make:
53         * WebCore.exp.in:
54         * WebCore.xcodeproj/project.pbxproj:
55         * html/HTMLDetailsElement.cpp:
56         * html/HTMLSummaryElement.cpp:
57         * html/HTMLTagNames.in:
58         * html/shadow/ContentDistributor.cpp:
59         * html/shadow/HTMLContentElement.cpp: Removed.
60         * html/shadow/HTMLContentElement.h: Removed.
61         * html/shadow/HTMLContentElement.idl: Removed.
62         * html/shadow/InsertionPoint.h:
63         (WebCore::InsertionPoint::matchTypeFor):
64         * testing/Internals.cpp:
65         * testing/Internals.h:
66         * testing/Internals.idl:
67
68 2013-09-24  Benjamin Poulain  <benjamin@webkit.org>
69
70         Remove a contradiction from SelectorChecker
71         https://bugs.webkit.org/show_bug.cgi?id=121881
72
73         Reviewed by Andreas Kling.
74
75         The matching code for PseudoHover and PseudoActive is done on the current
76         selector pseudo type. The current selector match type must be CSSSelector::PseudoClass
77         in order to reach this code. Consequently, selector->m_match == CSSSelector::Tag can
78         never be true.
79
80         * css/SelectorChecker.cpp:
81         (WebCore::SelectorChecker::checkOne):
82
83 2013-09-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
84
85         Add toWebKitCSS*Value functions to cast from CSSValue
86         https://bugs.webkit.org/show_bug.cgi?id=121776
87
88         Reviewed by Darin Adler.
89
90         CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually.
91
92         No new tests, no behavior change.
93
94         * css/CSSValue.cpp:
95         (WebCore::CSSValue::destroy):
96         * css/StyleResolver.cpp:
97         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
98         (WebCore::StyleResolver::createFilterOperations):
99         * css/TransformFunctions.cpp:
100         (WebCore::transformsForValue):
101         * css/WebKitCSSArrayFunctionValue.h:
102         (WebCore::toWebKitCSSArrayFunctionValue):
103         * css/WebKitCSSFilterValue.h:
104         (WebCore::toWebKitCSSFilterValue):
105         * css/WebKitCSSMatFunctionValue.h:
106         (WebCore::toWebKitCSSMatFunctionValue):
107         * css/WebKitCSSMixFunctionValue.h:
108         (WebCore::toWebKitCSSMixFunctionValue):
109         * css/WebKitCSSSVGDocumentValue.h:
110         (WebCore::toWebKitCSSSVGDocumentValue):
111         * css/WebKitCSSShaderValue.h:
112         (WebCore::toWebKitCSSShaderValue):
113         * css/WebKitCSSTransformValue.h:
114         (WebCore::toWebKitCSSTransformValue):
115
116 2013-09-24  Antti Koivisto  <antti@apple.com>
117
118         Clean up some uses of first/lastChildSlow
119         https://bugs.webkit.org/show_bug.cgi?id=121882
120
121         Reviewed by Andreas Kling.
122
123         Tighten typing and use first/lastChild instead.
124
125         * dom/Position.cpp:
126         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
127         (WebCore::Position::isCandidate):
128         (WebCore::Position::getInlineBoxAndOffset):
129         * dom/Position.h:
130         * dom/PositionIterator.cpp:
131         (WebCore::PositionIterator::isCandidate):
132         * editing/CompositeEditCommand.cpp:
133         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
134         * rendering/RenderBlock.cpp:
135         (WebCore::canMergeAnonymousBlock):
136         (WebCore::canMergeContiguousAnonymousBlocks):
137         (WebCore::RenderBlock::firstLineBlock):
138         (WebCore::RenderBlock::updateFirstLetter):
139         * rendering/RenderRegion.cpp:
140         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
141         (WebCore::RenderRegion::computeChildrenStyleInRegion):
142         * rendering/RenderRegion.h:
143         * rendering/RenderRuby.cpp:
144         (WebCore::rubyBeforeBlock):
145         (WebCore::rubyAfterBlock):
146         (WebCore::lastRubyRun):
147         * rendering/RenderTreeAsText.cpp:
148         (WebCore::write):
149         (WebCore::writeCounterValuesFromChildren):
150         * rendering/svg/RenderSVGText.cpp:
151         (WebCore::findPreviousAndNextAttributes):
152         * style/StyleResolveTree.cpp:
153         (WebCore::Style::textRendererIsNeeded):
154
155 2013-09-24  Mark Lam  <mark.lam@apple.com>
156
157         Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame.
158         https://bugs.webkit.org/show_bug.cgi?id=121867.
159
160         Reviewed by Geoffrey Garen.
161
162         No new tests.
163
164         * bindings/js/ScriptDebugServer.cpp:
165         (WebCore::ScriptDebugServer::createCallFrame):
166         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
167         (WebCore::ScriptDebugServer::callEvent):
168         (WebCore::ScriptDebugServer::atStatement):
169         (WebCore::ScriptDebugServer::returnEvent):
170         (WebCore::ScriptDebugServer::exception):
171         (WebCore::ScriptDebugServer::willExecuteProgram):
172         (WebCore::ScriptDebugServer::didExecuteProgram):
173         (WebCore::ScriptDebugServer::didReachBreakpoint):
174         * bindings/js/ScriptDebugServer.h:
175         * bindings/js/WorkerScriptDebugServer.cpp:
176         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
177         * bindings/js/WorkerScriptDebugServer.h:
178
179 2013-09-24  Andreas Kling  <akling@apple.com>
180
181         Move keyboard event dispatch from Node to Element.
182         <https://webkit.org/b/121873>
183
184         Reviewed by Antti Koivisto.
185
186         We only dispatch keyboard events on Elements so that logic shouldn't be in Node.
187
188         * dom/Document.cpp:
189         (WebCore::eventTargetElementForDocument):
190
191             Reworked to return Element instead of Node.
192
193         * dom/Document.h:
194         * dom/Element.h:
195         * dom/Element.cpp:
196         (WebCore::Element::dispatchKeyEvent):
197
198             Moved from Node to Element.
199
200         * editing/AlternativeTextController.cpp:
201         (WebCore::AlternativeTextController::insertDictatedText):
202         * page/EventHandler.cpp:
203         (WebCore::EventHandler::keyEvent):
204         (WebCore::EventHandler::handleTextInputEvent):
205
206             Adjusted for above changes.
207
208 2013-09-24  Zoltan Horvath  <zoltan@webkit.org>
209
210         [CSS Shapes] Modify updateSegmentsForShapes function to use logical coordinates
211         https://bugs.webkit.org/show_bug.cgi?id=121864
212
213         Reviewed by David Hyatt.
214
215         When I landed updateSegmentsForShapes in r156022, I didn't use logical coordinates. This change modifies the
216         code to use coordinates for positioning the float and the content around the float in a shape-inside. Now I
217         added only one writing mode tests, but I will add more later in bug #121866.
218
219         Test: fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content.html
220
221         * rendering/FloatingObjects.h:
222         (WebCore::FloatingObject::logicalHeight):
223         * rendering/RenderBlock.cpp:
224         (WebCore::RenderBlock::computeLogicalLocationForFloat):
225         * rendering/RenderBlockLineLayout.cpp:
226         (WebCore::updateSegmentsForShapes):
227
228 2013-09-24  Brady Eidson  <beidson@apple.com>
229
230         Remove IDBTransactionCallbacks.h from the .xcodeproj, as it's gone from the repository.
231
232         Rubberstamped by Anders Carlsson and Alexey Proskuryakov.
233
234         * WebCore.xcodeproj/project.pbxproj:
235
236 2013-09-24  Antti Koivisto  <antti@apple.com>
237
238         Tighten table rendering code
239         https://bugs.webkit.org/show_bug.cgi?id=121860
240
241         Reviewed by Andreas Kling.
242
243         Hide firstChild/lastChild/nextSibling/previousSibling in table renderers, 
244         expose correctly typed firstRow/nextCell etc instead.
245
246 2013-09-24  Dean Jackson  <dino@apple.com>
247
248         Implement symbol name hashing for WebGL shaders
249         https://bugs.webkit.org/show_bug.cgi?id=121849
250
251         Reviewed by Anders Carlsson.
252
253         Turn on ANGLE's symbol name mapping for shader programs.
254         This avoids compilation failures (or worse, crashers)
255         on some hardware that doesn't like it when shaders redefine
256         symbols like "sin", even though that is valid.
257
258         The way ANGLE exposes this is via setting a pointer
259         to a char* -> uint64_t hash function. Since we only have
260         a 32-bit hash in WebKit, I combine the 32-bit value with
261         a counter value that exists over the lifetime of a GC3D context.
262         Before calling ANGLE, I point the global hash map to the local
263         hash map, and then clean up after we're done. This introduces
264         a memory hit, in that the symbol table will build up until
265         the context is released.
266
267         Covered by Khronos WebGL tests, including
268         conformance/glsl/misc/shader-with-non-reserved-words.html
269
270         * platform/graphics/GraphicsContext3D.h: Define a ShaderNameHash type,
271         and add an OwnPtr to one as a member variable.
272         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
273         (WebCore::nameHashForShader): Global function used for ANGLE hashing.
274         (WebCore::GraphicsContext3D::compileShader): Set up the ANGLE properties,
275         point to the local hash map, and call compile/translate.
276
277 2013-09-24  Dean Jackson  <dino@apple.com>
278
279         Use mapped name in attribute location binding
280         https://bugs.webkit.org/show_bug.cgi?id=121847
281         <rdar://problem/15067526>
282
283         Reviewed by Eric Carlson.
284
285         The shader that we send down to OpenGL to compile
286         may have been translated by ANGLE, so we keep a
287         table around that maps input symbols to output symbols.
288         We used the table when binding to and looking up
289         uniforms, and when looking up attributes, but not
290         when actually binding to attribute locations.
291
292         Test: fast/canvas/webgl/gl-bind-attrib-mapped-names.html
293
294         * platform/graphics/ANGLEWebKitBridge.cpp:
295         (WebCore::getSymbolInfo): Add logging of symbol mapping.
296         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
297         (WebCore::GraphicsContext3D::bindAttribLocation): Used the mapped name.
298         (WebCore::GraphicsContext3D::getAttribLocation): Remove comment since
299         we do the lookup everywhere.
300         (WebCore::GraphicsContext3D::getUniformLocation): Ditto.
301
302 2013-09-24  Enrica Casucci  <enrica@apple.com>
303
304         Upstream changes to Pasteboard implementation for iOS.
305         https://bugs.webkit.org/show_bug.cgi?id=121818
306
307         Reviewed by Darin Adler.
308
309         * WebCore.xcodeproj/project.pbxproj:
310         * editing/Editor.cpp:
311         (WebCore::Editor::cut):
312         (WebCore::Editor::copyImage):
313         * editing/ios/EditorIOS.mm:
314         (WebCore::attributedStringForRange):
315         (WebCore::dataInRTFDFormat):
316         (WebCore::dataInRTFFormat):
317         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
318         (WebCore::Editor::selectionInWebArchiveFormat):
319         (WebCore::Editor::writeSelectionToPasteboard):
320         (WebCore::getImage):
321         (WebCore::Editor::writeImageToPasteboard):
322         * platform/Pasteboard.h:
323         * platform/PasteboardStrategy.h:
324         * platform/PlatformPasteboard.h:
325         * platform/ios/PasteboardIOS.mm:
326         * platform/ios/PlatformPasteboardIOS.mm: Added.
327         (WebCore::PlatformPasteboard::PlatformPasteboard):
328         (WebCore::PlatformPasteboard::getTypes):
329         (WebCore::PlatformPasteboard::bufferForType):
330         (WebCore::PlatformPasteboard::getPathnamesForType):
331         (WebCore::PlatformPasteboard::stringForType):
332         (WebCore::PlatformPasteboard::color):
333         (WebCore::PlatformPasteboard::url):
334         (WebCore::PlatformPasteboard::copy):
335         (WebCore::PlatformPasteboard::addTypes):
336         (WebCore::PlatformPasteboard::setTypes):
337         (WebCore::PlatformPasteboard::setBufferForType):
338         (WebCore::PlatformPasteboard::setPathnamesForType):
339         (WebCore::PlatformPasteboard::setStringForType):
340         (WebCore::PlatformPasteboard::changeCount):
341         (WebCore::PlatformPasteboard::uniqueName):
342         (WebCore::PlatformPasteboard::write):
343
344 2013-09-24  Mark Rowe  <mrowe@apple.com>
345
346         <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
347
348         Reviewed by Dan Bernstein.
349
350         * Configurations/Base.xcconfig:
351
352 2013-09-24  Daniel Bates  <dabates@apple.com>
353
354         [iOS] Upstream -webkit-touch-callout
355         https://bugs.webkit.org/show_bug.cgi?id=121507
356
357         Reviewed by Antti Koivisto.
358
359         * css/CSSComputedStyleDeclaration.cpp:
360         (WebCore::ComputedStyleExtractor::propertyValue):
361         * css/CSSParser.cpp:
362         (WebCore::CSSParser::parseValue):
363         * css/CSSPropertyNames.in: Added -webkit-touch-callout.
364         * css/StyleResolver.cpp:
365         (WebCore::StyleResolver::applyProperty):
366         * html/HTMLImageElement.cpp:
367         (WebCore::HTMLImageElement::willRespondToMouseClickEvents): Added.
368         * html/HTMLImageElement.h:
369         * rendering/style/RenderStyle.h:
370         * rendering/style/StyleRareInheritedData.cpp:
371         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
372         (WebCore::StyleRareInheritedData::operator==):
373         * rendering/style/StyleRareInheritedData.h:
374
375 2013-09-24  Bem Jones-Bey  <bjonesbe@adobe.com>
376
377         Properly handle bottom margin on float with shape-outside
378         https://bugs.webkit.org/show_bug.cgi?id=121808
379
380         Reviewed by David Hyatt.
381
382         When a float has a shape-outside, inline content must conform to the
383         shape, not to the margin box. Thus, if a float with shape-outside has
384         a bottom margin and the shape does not intrude into that margin, then
385         the inline content should ignore the margin. Before this patch, inline
386         content would drop below the margin box instead of obeying the shape.
387         
388         Note that content that should clear the float still clears the margin
389         box, not the shape's contour.
390
391         Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-002.html
392                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-003.html
393                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-004.html
394
395         * rendering/LineWidth.cpp:
396         (WebCore::LineWidth::fitBelowFloats): Compute the logical bottom based
397         on the shape.
398         * rendering/RenderBlock.cpp:
399         (WebCore::RenderBlock::nextFloatLogicalBottomBelow): Add option to
400         compute the logical bottom based on the shape instead of on the margin
401         box.
402         * rendering/RenderBlock.h:
403
404 2013-09-24  Lorenzo Tilve  <ltilve@igalia.com>
405
406         [GTK] Fix compilation problems when setting ENABLE_DRAG_SUPPORT = FALSE
407         https://bugs.webkit.org/show_bug.cgi?id=121782
408
409         Reviewed by Martin Robinson.
410
411         Disabled drag functions.
412
413         * page/gtk/EventHandlerGtk.cpp:
414         * platform/gtk/PasteboardGtk.cpp:
415
416 2013-09-24  Samuel White  <samuel_white@apple.com>
417
418         AX: Replace AXObjectCache postNotification method boolean arguments with enum values.
419         https://bugs.webkit.org/show_bug.cgi?id=121504
420
421         Reviewed by Chris Fleizach.
422
423         No new tests, no functional changes. Changed argument type from bool
424         to enum per "Names" rule #10 in the WebKit coding style guidelines.
425
426         * accessibility/AXObjectCache.cpp:
427         (WebCore::AXObjectCache::textChanged):
428         (WebCore::AXObjectCache::postNotification):
429         (WebCore::AXObjectCache::checkedStateChanged):
430         (WebCore::AXObjectCache::selectedChildrenChanged):
431         (WebCore::AXObjectCache::handleAttributeChanged):
432         * accessibility/AXObjectCache.h:
433         (WebCore::AXObjectCache::postNotification):
434         * accessibility/AccessibilityMenuList.cpp:
435         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
436         * accessibility/AccessibilityMenuListPopup.cpp:
437         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
438         * accessibility/AccessibilityNodeObject.cpp:
439         (WebCore::AccessibilityNodeObject::childrenChanged):
440         (WebCore::AccessibilityNodeObject::changeValueByStep):
441         (WebCore::AccessibilityNodeObject::changeValueByPercent):
442         * accessibility/AccessibilityRenderObject.cpp:
443         (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
444         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
445         (WebCore::AccessibilityRenderObject::textChanged):
446         * dom/Document.cpp:
447         (WebCore::Document::implicitClose):
448         * editing/Editor.cpp:
449         (WebCore::Editor::respondToChangedContents):
450         (WebCore::Editor::markAndReplaceFor):
451         * editing/mac/FrameSelectionMac.mm:
452         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
453         * html/HTMLTextFormControlElement.cpp:
454         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
455         * html/InputType.cpp:
456         (WebCore::InputType::applyStep):
457         * html/RangeInputType.cpp:
458         (WebCore::RangeInputType::handleKeydownEvent):
459         * page/FocusController.cpp:
460         (WebCore::FocusController::setInitialFocus):
461         * page/FrameView.cpp:
462         (WebCore::FrameView::layout):
463
464 2013-09-24  Andreas Kling  <akling@apple.com>
465
466         Make hoverAncestor() a RenderElement concept.
467         <https://webkit.org/b/121845>
468
469         Reviewed by Antti Koivisto.
470
471         The hover ancestor renderer is always a RenderElement, we only ever
472         ask RenderElements for their hover ancestors.
473
474         Updated Document::updateHoverActiveState() to take advantage of the
475         tighter typing, removing a few isElementNode() checks.
476
477 2013-09-24  Daniel Bates  <dabates@apple.com>
478
479         [iOS] Initialize settings mediaPlayback{AllowsInline, RequiresUserGesture} and
480         shouldRespectImageOrientation as appropriate
481         https://bugs.webkit.org/show_bug.cgi?id=121792
482
483         Reviewed by Darin Adler.
484
485         On iOS we explicitly want to disable mediaPlaybackAllowsInline, and enable
486         mediaPlaybackRequiresUserGesture and shouldRespectImageOrientation by default.
487         This differs from other platforms. We need to extract the initialization logic
488         for these settings into constants whose definition is conditioned on the platform.
489
490         * page/Settings.cpp:
491         * page/Settings.in:
492
493 2013-09-24  peavo@outlook.com  <peavo@outlook.com>
494
495         [WinCairo] Compile error.
496         https://bugs.webkit.org/show_bug.cgi?id=121839
497
498         Reviewed by Brent Fulgham.
499
500         * platform/graphics/GraphicsContext3DPrivate.cpp:
501         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): Added missing guard.
502
503 2013-09-24  Andreas Kling  <akling@apple.com>
504
505         Cache continuation() in a local to avoid repeat hash lookups.
506         <https://webkit.org/b/121840>
507
508         Reviewed by Geoffrey Garen.
509
510         RenderBoxModelObject::continuation() does a hash lookup every time.
511         Cache the result in a local instead of calling it repeatedly.
512
513         * rendering/RenderBlock.h:
514         (WebCore::RenderBlock::isAnonymousBlockContinuation):
515
516             Reorder to check bitfield before hash map.
517
518         * rendering/RenderBlock.cpp:
519         (WebCore::RenderBlock::updateDragState):
520         * rendering/RenderInline.cpp:
521         (WebCore::RenderInline::absoluteRects):
522         (WebCore::RenderInline::absoluteQuads):
523         (WebCore::RenderInline::clippedOverflowRectForRepaint):
524         (WebCore::RenderInline::updateDragState):
525         (WebCore::RenderInline::addFocusRingRects):
526
527             Cache continuation() in locals where it's used more than once.
528
529 2013-09-24  Allan Sandfeld Jensen  <allan.jensen@digia.com>
530
531         [Qt] Crash when trying to download blob url
532         https://bugs.webkit.org/show_bug.cgi?id=121681
533
534         Reviewed by Simon Hausmann.
535
536         Resolve any blob URLs before creating a QUrl.
537
538         * platform/network/qt/ResourceRequestQt.cpp:
539         (WebCore::appendBlobResolved):
540         (WebCore::resolveBlobUrl):
541         (WebCore::ResourceRequest::toNetworkRequest):
542
543 2013-09-23  Antti Koivisto  <antti@apple.com>
544
545         Move more style change code from RenderObject to RenderElement
546         https://bugs.webkit.org/show_bug.cgi?id=121822
547
548         Reviewed by Darin Adler.
549
550         * rendering/RenderElement.cpp:
551         (WebCore::RenderElement::~RenderElement):
552         
553             RenderTexts are no longer registered as image clients. They don't need be unregistered either.
554
555         (WebCore::RenderElement::adjustStyleDifference):
556         (WebCore::RenderElement::hasImmediateNonWhitespaceTextChild):
557         (WebCore::RenderElement::shouldRepaintForStyleDifference):
558         (WebCore::RenderElement::updateFillImages):
559         (WebCore::RenderElement::updateImage):
560         (WebCore::RenderElement::updateShapeImage):
561         (WebCore::RenderElement::setStyle):
562         
563             Move from RenderObject and remove the text specific bits.
564
565         * rendering/RenderElement.h:
566         * rendering/RenderObject.cpp:
567         (WebCore::RenderObject::setStyle):
568         (WebCore::RenderObject::arenaDelete):
569         * rendering/RenderObject.h:
570         
571             Remove styleWill/DidChange which move to subclasses.
572
573         * rendering/RenderText.cpp:
574         (WebCore::RenderText::setStyle):
575         
576             Add simple text specific setStyle.
577
578         * rendering/RenderText.h:
579
580 2013-09-24  Andrei Parvu  <parvu@adobe.com>
581
582         [CSS Background] repeat: round should round the number of tiles to the nearest natural number
583         https://bugs.webkit.org/show_bug.cgi?id=120668
584
585         Reviewed by Darin Adler.
586
587         Tests already available in css3/masking and css3/background
588
589         * rendering/RenderBoxModelObject.cpp: Rounded the number of tiles to the nearest natural number.
590         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
591
592 2013-09-24  Ryuan Choi  <ryuan.choi@samsung.com>
593
594         Remove ScrollView::platformInit() and ScrollView::platformDestroy()
595         https://bugs.webkit.org/show_bug.cgi?id=121824
596
597         Reviewed by Darin Adler.
598
599         ScrollView::platformInit() and ScrollView::platformDestroy() are just
600         empty functions for all ports after removed WX port at r149186.
601
602         * PlatformEfl.cmake: Removed ScrollViewEfl.cpp from source list.
603         * platform/ScrollView.cpp: Removed platformInit and PlatformDestroy.
604         (WebCore::ScrollView::ScrollView):
605         (WebCore::ScrollView::~ScrollView):
606         * platform/ScrollView.h: Ditto.
607         * platform/efl/ScrollViewEfl.cpp: Removed.
608
609 2013-09-23  Darin Adler  <darin@apple.com>
610
611         Use unique_ptr instead of deleteAllValues in FloatingObject code
612         https://bugs.webkit.org/show_bug.cgi?id=121823
613
614         Reviewed by Sam Weinig.
615
616         * rendering/FloatingObjects.cpp:
617         (WebCore::FloatingObject::create): Return a unique_ptr instead of PassOwnPtr.
618         Use auto and a word for the local variable instead of an abbreviation. Also
619         changed to take a reference instead of a pointer.
620         (WebCore::FloatingObject::copyToNewContainer): Ditto.
621         (WebCore::FloatingObject::unsafeClone): Ditto.
622         (WebCore::FloatingObjects::~FloatingObjects): Removed call to deleteAllValues.
623         (WebCore::FloatingObjects::clearLineBoxTreePointers): Use auto to make this
624         read clearly.
625         (WebCore::FloatingObjects::clear): Removed call to deleteAllValues.
626         (WebCore::FloatingObjects::moveAllToFloatInfoMap): Use std::move to move values
627         out of the set, into the map. Removed code to clear the set, since it was a
628         trick to prevent the values from being deleted when they were not moved.
629         (WebCore::FloatingObjects::add): Changed to take a unique_ptr and to move the
630         pointer into the set instead of using leakPtr.
631         (WebCore::FloatingObjects::remove): Rearranged code so that the remove is at
632         the end of the function rather than the beginning. Also had to use a hash
633         translator and a find/remove combo since we don't have hash translator version
634         of the remove function.
635         (WebCore::FloatingObjects::computePlacedFloatsTree): Updated for changes to
636         the types.
637         (WebCore::FloatingObjects::placedFloatsTree): Moved this function here instead
638         of having it in the header, since it's only used within the file.
639
640         * rendering/FloatingObjects.h: Changed functions to take references instead
641         of pointers and return unique_ptr instead of PassOwnPtr. Also made
642         constructors public so we can use them with make_unique. Changed types to
643         use unique_ptr instead of raw pointers, and made the FloatingObjectHashTranslator
644         work for both RenderBox& and FloatingObject&.
645
646         * rendering/LineWidth.cpp:
647         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
648         Updated for changes to types.
649
650         * rendering/RenderBlock.cpp:
651         (WebCore::RenderBlock::styleDidChange):
652         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
653         (WebCore::RenderBlock::addOverflowFromFloats):
654         (WebCore::RenderBlock::repaintOverhangingFloats):
655         (WebCore::RenderBlock::paintFloats):
656         (WebCore::RenderBlock::selectionGaps):
657         (WebCore::RenderBlock::insertFloatingObject):
658         (WebCore::RenderBlock::removeFloatingObject):
659         (WebCore::RenderBlock::removeFloatingObjectsBelow):
660         (WebCore::RenderBlock::positionNewFloats):
661         (WebCore::RenderBlock::nextFloatLogicalBottomBelow):
662         (WebCore::RenderBlock::lowestFloatLogicalBottom):
663         (WebCore::RenderBlock::addOverhangingFloats):
664         (WebCore::RenderBlock::hasOverhangingFloat):
665         (WebCore::RenderBlock::addIntrudingFloats):
666         (WebCore::RenderBlock::containsFloat):
667         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
668         (WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer):
669         (WebCore::RenderBlock::hitTestFloats):
670         (WebCore::RenderBlock::adjustForBorderFit):
671         Updated for changes to types.
672
673         * rendering/RenderBlockFlow.cpp:
674         (WebCore::RenderBlockFlow::clearFloats): Updated to use take instead of
675         a combination of remove and delete.
676
677         * rendering/RenderBlockLineLayout.cpp:
678         (WebCore::RenderBlock::layoutRunsAndFloats):
679         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
680         (WebCore::RenderBlock::linkToEndLineIfNeeded):
681         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
682         (WebCore::RenderBlock::positionNewFloatOnLine):
683         Updated for changes to types.
684
685 2013-09-23  Gurpreet Kaur  <k.gurpreet@samsung.com>
686
687         CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
688         https://bugs.webkit.org/show_bug.cgi?id=121422
689
690         Reviewed by Darin Adler.
691
692         Box-shadow properties were not applied incase its values
693         were given in vh, vw, vmax, vmin unit.
694
695         Tests: fast/css/box-shadow-negative-viewportlength.html
696                fast/css/box-shadow-viewport-height.html
697                fast/css/box-shadow-viewport-vmax.html
698                fast/css/box-shadow-viewport-vmin.html
699                fast/css/box-shadow-viewport-width.html
700
701         * css/CSSParser.cpp:
702         (WebCore::CSSParser::parseShadow):
703         * css/StyleResolver.cpp:
704         (WebCore::StyleResolver::applyProperty):
705         (WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
706         (WebCore::StyleResolver::viewportPercentageHeight):
707         (WebCore::StyleResolver::viewportPercentageWidth):
708         (WebCore::StyleResolver::viewportPercentageMax):
709         (WebCore::StyleResolver::viewportPercentageMin):
710         * css/StyleResolver.h:
711         Parsing and calculating the shadow values which has been specified
712         in viewport units.The vh/vw units are calcultated as percent of
713         viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
714         whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.
715
716 2013-09-23  Ryuan Choi  <ryuan.choi@samsung.com>
717
718         Unreviewed build fix for CMake ports with INDEXED_DATABASE after r156296
719
720         * CMakeLists.txt: Removed IDBBackingStore.cpp from source list.
721
722 2013-09-23  Anders Carlsson  <andersca@apple.com>
723
724         Remove WTF_USE_SCROLLBAR_PAINTER #define
725         https://bugs.webkit.org/show_bug.cgi?id=121819
726
727         Reviewed by Sam Weinig.
728
729         Remove unnecessary if checks and dead code.
730
731         * platform/mac/NSScrollerImpDetails.h:
732         * platform/mac/ScrollAnimatorMac.mm:
733         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
734         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
735         (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
736         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
737         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
738         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
739         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
740         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
741         (WebCore::ScrollAnimatorMac::willStartLiveResize):
742         (WebCore::ScrollAnimatorMac::contentsResized):
743         (WebCore::ScrollAnimatorMac::willEndLiveResize):
744         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
745         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
746         (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
747         (WebCore::ScrollAnimatorMac::didEndScrollGesture):
748         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
749         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
750         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
751         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
752         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
753         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
754         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
755         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
756         (WebCore::ScrollAnimatorMac::cancelAnimations):
757         (WebCore::ScrollAnimatorMac::setIsActive):
758         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
759         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
760         * platform/mac/ScrollViewMac.mm:
761         (WebCore::toNSScrollerKnobStyle):
762         (WebCore::ScrollView::platformSetScrollbarOverlayStyle):
763         * platform/mac/ScrollbarThemeMac.mm:
764         (WebCore::updateArrowPlacement):
765         (WebCore::ScrollbarThemeMac::registerScrollbar):
766         (WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
767         (WebCore::ScrollbarThemeMac::scrollbarThickness):
768         (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
769         (WebCore::ScrollbarThemeMac::hasThumb):
770         (WebCore::ScrollbarThemeMac::minimumThumbLength):
771         (WebCore::ScrollbarThemeMac::updateEnabledState):
772         (WebCore::ScrollbarThemeMac::paint):
773
774 2013-09-23  Brent Fulgham  <bfulgham@apple.com>
775
776         [Windows] Moving back in history from a page with <video>, then moving forward causes crash.
777         https://bugs.webkit.org/show_bug.cgi?id=120475
778
779         Reviewed by Anders Carlsson.
780
781         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
782         (WebCore::AVFWrapper::AVFWrapper): Add assertion that creation is on main thread.
783         (WebCore::AVFWrapper::~AVFWrapper): Add assertion that destruction is on main thread.
784         (WebCore::destroyAVFWrapper): Helper function to dispatch on main queue.
785         (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Spawn AVFoundationCF destruction to
786         main queue.
787
788 2013-09-23  Andreas Kling  <akling@apple.com>
789
790         RenderTextControlSingleLine::updateFromElement() override not needed.
791         <https://webkit.org/b/121815>
792
793         Reviewed by Anders Carlsson.
794
795         * rendering/RenderTextControlSingleLine.cpp:
796         * rendering/RenderTextControlSingleLine.h:
797
798 2013-09-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
799
800         Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
801         https://bugs.webkit.org/show_bug.cgi?id=121462
802
803         Reviewed by Darin Adler.
804
805         As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
806         by css value type casting as well. This type cast macros will help to detect
807         bad-cast bugs as well as improve a code readibility.
808
809         This patch adds the following methods,
810
811         - CSSFooValue* toCSSFooValue(CSSValue*)
812         - const CSSFooValue* toCSSFooValue(const CSSValue*)
813
814         This patch support CSSImageSetValue and CSSReflectValue first. Other CSS*Values
815         will use this macro step by step.
816
817         Besides this patch will remove unnecessary local variables.
818
819         No new tests, no behavior change.
820
821         * css/CSSCursorImageValue.cpp:
822         (WebCore::CSSCursorImageValue::cachedImage):
823         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
824         * css/CSSImageSetValue.h:
825         * css/CSSReflectValue.h:
826         * css/CSSValue.cpp:
827         (WebCore::CSSValue::destroy):
828         * css/CSSValue.h:
829         * css/StyleResolver.cpp:
830         (WebCore::hasVariableReference):
831         (WebCore::StyleResolver::applyProperty):
832         (WebCore::StyleResolver::styleImage):
833         * rendering/style/StylePendingImage.h:
834         (WebCore::StylePendingImage::cssImageSetValue):
835
836 2013-09-23  Antti Koivisto  <antti@apple.com>
837
838         Move style change analysis code to RenderElement
839         https://bugs.webkit.org/show_bug.cgi?id=121812
840
841         Reviewed by Andreas Kling.
842
843         Text renderers don't need this. There is no text renderer specific invalidation and text
844         style never changes independent from the containing RenderElement.
845
846 2013-09-23  Commit Queue  <commit-queue@webkit.org>
847
848         Unreviewed, rolling out r156307.
849         http://trac.webkit.org/changeset/156307
850         https://bugs.webkit.org/show_bug.cgi?id=121817
851
852         Broke the build, and crashes the compiler (Requested by ap on
853         #webkit).
854
855         * css/MediaQuery.cpp:
856         (WebCore::expressionCompare):
857         (WebCore::MediaQuery::MediaQuery):
858         * dom/MutationObserver.cpp:
859         (WebCore::MutationObserver::ObserverLessThan::operator()):
860         (WebCore::MutationObserver::deliverAllMutations):
861         * page/CaptionUserPreferences.cpp:
862         (WebCore::textTrackCompare):
863         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
864
865 2013-09-23  Andreas Kling  <akling@apple.com>
866
867         Move rendererForRootBackground() to RenderElement.
868         <http://webkit.org/b/121813>
869
870         Reviewed by Antti Koivisto.
871
872         Move this to RenderElement (and make it return one, too) since the
873         document element renderer will always be a RenderElement.
874
875 2013-09-23  Brady Eidson  <beidson@apple.com>
876
877         Make the Mac build work with IndexedDB enabled.
878         https://bugs.webkit.org/show_bug.cgi?id=121814
879
880         Reviewed by Alexey Proskuryakov.
881
882         This patch makes the Mac build work if one were to enable the IndexedDB feature flag.
883         This patch does not actually enable the flag for everyone.
884
885         * DerivedSources.make:
886         * WebCore.xcodeproj/project.pbxproj:
887
888         * Modules/indexeddb/IDBBackingStore.cpp: Added.
889         (WebCore::IDBBackingStore::open):
890         (WebCore::IDBBackingStore::openInMemory):
891         (WebCore::IDBBackingStore::getObjectStores):
892         (WebCore::IDBBackingStore::Cursor::advance):
893         (WebCore::IDBBackingStore::Cursor::continueFunction):
894         (WebCore::IDBBackingStore::Transaction::Transaction):
895         (WebCore::IDBBackingStore::Transaction::begin):
896         (WebCore::IDBBackingStore::Transaction::commit):
897         (WebCore::IDBBackingStore::Transaction::rollback):
898         * Modules/indexeddb/IDBBackingStore.h:
899         (WebCore::LevelDBFactory::~LevelDBFactory):
900         (WebCore::IDBBackingStore::Transaction::reset):
901         (WebCore::IDBBackingStore::Transaction::levelDBTransactionFrom):
902
903         * Modules/indexeddb/IDBKeyPath.cpp:
904         (WebCore::IDBIsValidKeyPath):
905
906         * bindings/js/IDBBindingUtilities.cpp:
907         (WebCore::createIDBKeyFromValue):
908
909         * bindings/js/JSIDBAnyCustom.cpp:
910         (WebCore::toJS):
911
912 2013-09-23  Andreas Kling  <akling@apple.com>
913
914         CTTE: RenderObject::container() should return a RenderElement*.
915         <https://webkit.org/b/121811>
916
917         Reviewed by Antti Koivisto.
918
919         The containing renderer is always a RenderElement.
920
921 2013-09-23  Anders Carlsson  <andersca@apple.com>
922
923         Test the waters and begin using lambdas
924         https://bugs.webkit.org/show_bug.cgi?id=121809
925
926         Reviewed by Andreas Kling.
927
928         Use lambdas instead of static functions and function objects.
929         
930         * css/MediaQuery.cpp:
931         (WebCore::MediaQuery::MediaQuery):
932         * dom/MutationObserver.cpp:
933         (WebCore::MutationObserver::deliverAllMutations):
934         * page/CaptionUserPreferences.cpp:
935         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
936
937 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
938
939         [WIN] Add implementation for WebCore::readFromFile()
940         https://bugs.webkit.org/show_bug.cgi?id=119210
941
942         Reviewed by Brent Fulgham.
943
944         * platform/win/FileSystemWin.cpp:
945         (WebCore::readFromFile):
946
947 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
948
949         [WIN] Implement WebMutableURLRequest::setHTTPBody()
950         https://bugs.webkit.org/show_bug.cgi?id=91920
951
952         Reviewed by Brent Fulgham.
953
954         Add a method to FormData for growing the internal buffer with a given size.
955
956         * platform/network/FormData.cpp:
957         (WebCore::FormData::appendData):
958         (WebCore::FormData::expandDataStore):
959         * platform/network/FormData.h:
960
961 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
962
963         use NOMINMAX instead of #define min min
964         https://bugs.webkit.org/show_bug.cgi?id=73563
965
966         Reviewed by Brent Fulgham.
967
968         Use NOMINMAX instead of #define min/max as a cleaner
969         way of ensuring that Windows system header files don't
970         define min/max as macro in the first place.
971
972         * WebCorePrefix.h:
973         * config.h:
974
975 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
976
977         REGRESSION (r155998): when zooming in, tiles are too small
978         https://bugs.webkit.org/show_bug.cgi?id=121765
979
980         Reviewed by Dean Jackson.
981
982         In r155998 I made GraphicsLayerCA take root-relative transforms
983         into account when computing contentsScale, and landed a bunch of
984         new results which should actually have told me that I broke page
985         scaling.
986         
987         We don't want to take page scale into account when computing contentsScale,
988         because we already do so, so ignore the transform on the layer that
989         applies page scale (the only transform it should ever has is the page scale).
990
991         * platform/graphics/ca/GraphicsLayerCA.cpp:
992         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
993
994 2013-09-23  Antonio Gomes  <a1.gomes@sisa.samsung.com>
995
996         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
997         https://bugs.webkit.org/show_bug.cgi?id=40981
998
999         Reviewed by Darin Adler.
1000
1001         RenderBox::calculateAutoscrollDirection does not properly translate
1002         inner frames' coordinates in order to determine its auto-scrollability.
1003         By coincidence, if the inner frame box it placed near to page's 0, 0 position
1004         (upper left corner), it might work.
1005
1006         Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
1007         with window coordinates, taking inner frames offset and scroll position into account.
1008         The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
1009         as it is used to.
1010
1011         Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
1012
1013         * rendering/RenderBox.cpp:
1014         (WebCore::RenderBox::calculateAutoscrollDirection):
1015
1016 2013-09-23  Brady Eidson  <beidson@apple.com>
1017
1018         Move LevelDB specific IDB files into their own subdirectory.
1019         https://bugs.webkit.org/show_bug.cgi?id=121804
1020
1021         Rubberstamped by Alexey Proskuryakov.
1022
1023         * CMakeLists.txt:
1024         * GNUmakefile.list.am:
1025         * WebCore.xcodeproj/project.pbxproj:
1026
1027         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp.
1028         (WebCore::recordInternalError):
1029         (WebCore::putBool):
1030         (WebCore::getInt):
1031         (WebCore::putInt):
1032         (WebCore::getVarInt):
1033         (WebCore::putVarInt):
1034         (WebCore::getString):
1035         (WebCore::putString):
1036         (WebCore::putIDBKeyPath):
1037         (WebCore::compareKeys):
1038         (WebCore::compareIndexKeys):
1039         (WebCore::Comparator::compare):
1040         (WebCore::Comparator::name):
1041         (WebCore::isSchemaKnown):
1042         (WebCore::setUpMetadata):
1043         (WebCore::getMaxObjectStoreId):
1044         (WebCore::DefaultLevelDBFactory::openLevelDB):
1045         (WebCore::DefaultLevelDBFactory::destroyLevelDB):
1046         (WebCore::IDBBackingStore::IDBBackingStore):
1047         (WebCore::IDBBackingStore::~IDBBackingStore):
1048         (WebCore::IDBBackingStore::open):
1049         (WebCore::IDBBackingStore::openInMemory):
1050         (WebCore::IDBBackingStore::create):
1051         (WebCore::IDBBackingStore::getDatabaseNames):
1052         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
1053         (WebCore::getNewDatabaseId):
1054         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
1055         (WebCore::IDBBackingStore::updateIDBDatabaseIntVersion):
1056         (WebCore::IDBBackingStore::updateIDBDatabaseMetaData):
1057         (WebCore::deleteRange):
1058         (WebCore::IDBBackingStore::deleteDatabase):
1059         (WebCore::checkObjectStoreAndMetaDataType):
1060         (WebCore::IDBBackingStore::getObjectStores):
1061         (WebCore::setMaxObjectStoreId):
1062         (WebCore::IDBBackingStore::createObjectStore):
1063         (WebCore::IDBBackingStore::deleteObjectStore):
1064         (WebCore::IDBBackingStore::getRecord):
1065         (WebCore::getNewVersionNumber):
1066         (WebCore::IDBBackingStore::putRecord):
1067         (WebCore::IDBBackingStore::clearObjectStore):
1068         (WebCore::IDBBackingStore::deleteRecord):
1069         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
1070         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
1071         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1072         (WebCore::checkIndexAndMetaDataKey):
1073         (WebCore::IDBBackingStore::getIndexes):
1074         (WebCore::setMaxIndexId):
1075         (WebCore::IDBBackingStore::createIndex):
1076         (WebCore::IDBBackingStore::deleteIndex):
1077         (WebCore::IDBBackingStore::putIndexDataForRecord):
1078         (WebCore::findGreatestKeyLessThanOrEqual):
1079         (WebCore::versionExists):
1080         (WebCore::IDBBackingStore::findKeyInIndex):
1081         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
1082         (WebCore::IDBBackingStore::keyExistsInIndex):
1083         (WebCore::IDBBackingStore::Cursor::Cursor):
1084         (WebCore::IDBBackingStore::Cursor::firstSeek):
1085         (WebCore::IDBBackingStore::Cursor::advance):
1086         (WebCore::IDBBackingStore::Cursor::continueFunction):
1087         (WebCore::IDBBackingStore::Cursor::haveEnteredRange):
1088         (WebCore::IDBBackingStore::Cursor::isPastBounds):
1089         (WebCore::ObjectStoreKeyCursorImpl::create):
1090         (WebCore::ObjectStoreKeyCursorImpl::clone):
1091         (WebCore::ObjectStoreKeyCursorImpl::value):
1092         (WebCore::ObjectStoreKeyCursorImpl::encodeKey):
1093         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
1094         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
1095         (WebCore::ObjectStoreCursorImpl::create):
1096         (WebCore::ObjectStoreCursorImpl::clone):
1097         (WebCore::ObjectStoreCursorImpl::value):
1098         (WebCore::ObjectStoreCursorImpl::encodeKey):
1099         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
1100         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
1101         (WebCore::IndexKeyCursorImpl::create):
1102         (WebCore::IndexKeyCursorImpl::clone):
1103         (WebCore::IndexKeyCursorImpl::value):
1104         (WebCore::IndexKeyCursorImpl::primaryKey):
1105         (WebCore::IndexKeyCursorImpl::recordIdentifier):
1106         (WebCore::IndexKeyCursorImpl::encodeKey):
1107         (WebCore::IndexKeyCursorImpl::IndexKeyCursorImpl):
1108         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
1109         (WebCore::IndexCursorImpl::create):
1110         (WebCore::IndexCursorImpl::clone):
1111         (WebCore::IndexCursorImpl::value):
1112         (WebCore::IndexCursorImpl::primaryKey):
1113         (WebCore::IndexCursorImpl::recordIdentifier):
1114         (WebCore::IndexCursorImpl::encodeKey):
1115         (WebCore::IndexCursorImpl::IndexCursorImpl):
1116         (WebCore::IndexCursorImpl::loadCurrentRow):
1117         (WebCore::objectStoreCursorOptions):
1118         (WebCore::indexCursorOptions):
1119         (WebCore::IDBBackingStore::openObjectStoreCursor):
1120         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
1121         (WebCore::IDBBackingStore::openIndexKeyCursor):
1122         (WebCore::IDBBackingStore::openIndexCursor):
1123         (WebCore::IDBBackingStore::Transaction::Transaction):
1124         (WebCore::IDBBackingStore::Transaction::begin):
1125         (WebCore::IDBBackingStore::Transaction::commit):
1126         (WebCore::IDBBackingStore::Transaction::rollback):
1127         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp.
1128         (WebCore::IDBLevelDBCoding::encodeByte):
1129         (WebCore::IDBLevelDBCoding::decodeByte):
1130         (WebCore::IDBLevelDBCoding::maxIDBKey):
1131         (WebCore::IDBLevelDBCoding::minIDBKey):
1132         (WebCore::IDBLevelDBCoding::encodeBool):
1133         (WebCore::IDBLevelDBCoding::decodeBool):
1134         (WebCore::IDBLevelDBCoding::encodeInt):
1135         (WebCore::IDBLevelDBCoding::decodeInt):
1136         (WebCore::IDBLevelDBCoding::compareInts):
1137         (WebCore::IDBLevelDBCoding::encodeVarInt):
1138         (WebCore::IDBLevelDBCoding::decodeVarInt):
1139         (WebCore::IDBLevelDBCoding::encodeString):
1140         (WebCore::IDBLevelDBCoding::decodeString):
1141         (WebCore::IDBLevelDBCoding::encodeStringWithLength):
1142         (WebCore::IDBLevelDBCoding::decodeStringWithLength):
1143         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength):
1144         (WebCore::IDBLevelDBCoding::encodeDouble):
1145         (WebCore::IDBLevelDBCoding::decodeDouble):
1146         (WebCore::IDBLevelDBCoding::encodeIDBKey):
1147         (WebCore::IDBLevelDBCoding::decodeIDBKey):
1148         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey):
1149         (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType):
1150         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
1151         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
1152         (WebCore::IDBLevelDBCoding::decodeIDBKeyPath):
1153         (WebCore::IDBLevelDBCoding::compare):
1154         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
1155         (WebCore::IDBLevelDBCoding::KeyPrefix::createWithSpecialIndex):
1156         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidDatabaseId):
1157         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidObjectStoreId):
1158         (WebCore::IDBLevelDBCoding::KeyPrefix::isValidIndexId):
1159         (WebCore::IDBLevelDBCoding::KeyPrefix::decode):
1160         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeEmpty):
1161         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
1162         (WebCore::IDBLevelDBCoding::KeyPrefix::encodeInternal):
1163         (WebCore::IDBLevelDBCoding::KeyPrefix::compare):
1164         (WebCore::IDBLevelDBCoding::KeyPrefix::type):
1165         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
1166         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
1167         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
1168         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::DatabaseFreeListKey):
1169         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::decode):
1170         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
1171         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey):
1172         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::databaseId):
1173         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::compare):
1174         (WebCore::IDBLevelDBCoding::DatabaseNameKey::decode):
1175         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
1176         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
1177         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
1178         (WebCore::IDBLevelDBCoding::DatabaseNameKey::compare):
1179         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
1180         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::ObjectStoreMetaDataKey):
1181         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::decode):
1182         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
1183         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey):
1184         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::objectStoreId):
1185         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::metaDataType):
1186         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
1187         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::IndexMetaDataKey):
1188         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::decode):
1189         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
1190         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey):
1191         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::compare):
1192         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::indexId):
1193         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::ObjectStoreFreeListKey):
1194         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::decode):
1195         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
1196         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey):
1197         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::objectStoreId):
1198         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::compare):
1199         (WebCore::IDBLevelDBCoding::IndexFreeListKey::IndexFreeListKey):
1200         (WebCore::IDBLevelDBCoding::IndexFreeListKey::decode):
1201         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
1202         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey):
1203         (WebCore::IDBLevelDBCoding::IndexFreeListKey::compare):
1204         (WebCore::IDBLevelDBCoding::IndexFreeListKey::objectStoreId):
1205         (WebCore::IDBLevelDBCoding::IndexFreeListKey::indexId):
1206         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::decode):
1207         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
1208         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::compare):
1209         (WebCore::IDBLevelDBCoding::IndexNamesKey::IndexNamesKey):
1210         (WebCore::IDBLevelDBCoding::IndexNamesKey::decode):
1211         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
1212         (WebCore::IDBLevelDBCoding::IndexNamesKey::compare):
1213         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::decode):
1214         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
1215         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare):
1216         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::userKey):
1217         (WebCore::IDBLevelDBCoding::ExistsEntryKey::decode):
1218         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
1219         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare):
1220         (WebCore::IDBLevelDBCoding::ExistsEntryKey::userKey):
1221         (WebCore::IDBLevelDBCoding::IndexDataKey::IndexDataKey):
1222         (WebCore::IDBLevelDBCoding::IndexDataKey::decode):
1223         (WebCore::IDBLevelDBCoding::IndexDataKey::encode):
1224         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMinKey):
1225         (WebCore::IDBLevelDBCoding::IndexDataKey::encodeMaxKey):
1226         (WebCore::IDBLevelDBCoding::IndexDataKey::compare):
1227         (WebCore::IDBLevelDBCoding::IndexDataKey::databaseId):
1228         (WebCore::IDBLevelDBCoding::IndexDataKey::objectStoreId):
1229         (WebCore::IDBLevelDBCoding::IndexDataKey::indexId):
1230         (WebCore::IDBLevelDBCoding::IndexDataKey::userKey):
1231         (WebCore::IDBLevelDBCoding::IndexDataKey::primaryKey):
1232         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.h.
1233         (WebCore::IDBLevelDBCoding::encodeIntSafely):
1234         (WebCore::IDBLevelDBCoding::KeyPrefix::validIds):
1235         (WebCore::IDBLevelDBCoding::DatabaseNameKey::origin):
1236         (WebCore::IDBLevelDBCoding::DatabaseNameKey::databaseName):
1237         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::metaDataType):
1238         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::objectStoreName):
1239         (WebCore::IDBLevelDBCoding::IndexNamesKey::indexName):
1240
1241 2013-09-23  Antti Koivisto  <antti@apple.com>
1242
1243         Try to fix GTK build.
1244         
1245         Not reviewed.
1246
1247         * accessibility/atk/AccessibilityObjectAtk.cpp:
1248         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1249         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1250         (textForRenderer):
1251
1252 2013-09-23  Alexandru Chiculita  <achicu@adobe.com>
1253
1254         Web Inspector: [CSS Regions] Display CSS Regions flow name in the inspector overlay
1255         https://bugs.webkit.org/show_bug.cgi?id=121794
1256
1257         Reviewed by Joseph Pecoraro.
1258
1259         No new tests, the previous test for CSS Regions highlighting covers the flow name.
1260
1261         This patch adds the "Flow" property in the inspector overlay. The region
1262         chain is already displayed with numbers, so it makes sense to have the flow 
1263         name around when a CSS region is highlighted.
1264
1265         I've consolidated the flow information into "elementInfo.flowInfo". 
1266         Flow info has two properties: "name" and "regions".
1267
1268         * inspector/InspectorOverlay.cpp:
1269         (WebCore::buildObjectForCSSRegionsHighlight):
1270         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
1271         * inspector/InspectorOverlayPage.css:
1272         (.css-property): Added the CSS property font color that the Inspector uses.
1273         * inspector/InspectorOverlayPage.html: Added a new element to be used to display the flow-from property.
1274         * inspector/InspectorOverlayPage.js:
1275         (_drawElementTitle):
1276         (drawNodeHighlight):
1277
1278 2013-09-23  Simon Fraser  <simon.fraser@apple.com>
1279
1280         Rapidly loading pages can result in !needsLayout() assertions in FrameView::paintContents() and RenderView::paint()
1281         https://bugs.webkit.org/show_bug.cgi?id=121725
1282         <rdar://problem/13982161> ASSERT(!needsLayout()) in WebCore::RenderView::paint (121196)
1283
1284         Reviewed by Dean Jackson.
1285         
1286         Layout has to be up-to-date before we paint, and when composited we rely on a
1287         CFRunLoopObserver owned by LayerFlushScheduler to enforce this. The contract is
1288         that changes to GraphicsLayers accumulate in those layers, and are all pushed to
1289         CALayers only inside of flushCompositingState(). CALayers must not be touched
1290         directly outside of flushCompositingState(), since this may trigger a CA commit
1291         and resultant painting without us having updated layout.
1292         
1293         In addition, we rely on the CA commits only happening after our runloop observer
1294         has fired in order for LayerFlushScheduler's suspend/resume to work (these are used
1295         for freezing the layer tree during page transitions).
1296         
1297         However, TileController was violating this contract. It called revalidateTiles()
1298         at random times, and on a timer. This would result in CA commits happening when
1299         layer flushing was suspended at the LayerFlushScheduler level, and thus before
1300         we'd had a chance to do layout.
1301         
1302         Fix by only ever revalidatingTiles inside of flushCompositingState(). Calls
1303         that used to result in revalidateTiles() at other times now just set a bit
1304         on GraphicsLayerCA to indicate that revalidation is required, and this triggers
1305         a later flush like any other GraphicsLayerCA change.
1306         
1307         There is one exception to the revalidate-inside-flush rule: when purging
1308         files for background tabs on a timer, we are only dealing with an unparented
1309         layer tree, so CALayer manipulation is safe at any time.
1310
1311         Very timing dependent, so hard to test.
1312
1313         * platform/graphics/TiledBacking.h: Expose revalidateTiles()
1314         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Remove
1315         platformCALayerDidCreateTiles() override.
1316         * platform/graphics/ca/GraphicsLayerCA.h: Keep track of m_isCommittingChanges
1317         so we can assert. Add TilingAreaChanged flag.
1318         * platform/graphics/ca/GraphicsLayerCA.cpp:
1319         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1320         (WebCore::GraphicsLayerCA::recursiveCommitChanges): noteSublayersChanged() is
1321         used inside of a commit in some cases to trigger a parent layer to update
1322         children after the children have been processed. To avoid trying to pointlessly
1323         schedule the flusher inside a flush, and for strong assertions, use a new flag
1324         that indicates that flushing is not required in this situation.
1325         Set the m_isCommittingChanges flag around committing state.
1326         (WebCore::GraphicsLayerCA::platformCALayerSetNeedsToRevalidateTiles): We used
1327         to use platformCALayerDidCreateTiles() to ensure that we would flush after adding
1328         new tiles to avoid garbage flashes. Now that we only ever create tiles inside
1329         a flush, this is no longer necessary.
1330         The new platformCALayerSetNeedsToRevalidateTiles() function just sets the
1331         TilingAreaChanged flag and triggers a flush.
1332         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
1333         visible rect, we look for the TilingAreaChanged flag to tell us whether to
1334         revalidate TiledBacking tiles.
1335         (WebCore::GraphicsLayerCA::ensureStructuralLayer): Use DontScheduleFlush when 
1336         telling a parent layer that it needs to reconsider sublayers.
1337         (WebCore::GraphicsLayerCA::updateTiles): The caller of revalidateTiles().
1338         (WebCore::GraphicsLayerCA::updateContentsRects): DontScheduleFlush again.
1339         (WebCore::GraphicsLayerCA::noteSublayersChanged): Pass scheduleFlush along.
1340         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged): Handle scheduleFlush.
1341         * platform/graphics/ca/PlatformCALayerClient.h:
1342         (WebCore::PlatformCALayerClient::platformCALayerSetNeedsToRevalidateTiles): Added
1343         so that TileController can call back out to GraphicsLayerCA.
1344         (WebCore::PlatformCALayerClient::isCommittingChanges):
1345         * platform/graphics/ca/mac/TileController.h: Need to keep track of secondary
1346         coverage rects in m_secondaryTileCoverageRects.
1347         * platform/graphics/ca/mac/TileController.mm:
1348         (WebCore::TileController::tileCacheLayerBoundsChanged): Just trigger a tile revalidate,
1349         which will happen later in this same commit.
1350         (WebCore::TileController::setScale): This is called inside the commit. Does an extra
1351         revalidate, which is needed to prune tiles. This could be optimized in future.
1352         (WebCore::TileController::setVisibleRect): Assert that we're inside a commit,
1353         and trigger a revalidate.
1354         (WebCore::TileController::setExposedRect): Trigger a revalidate.
1355         (WebCore::TileController::setClipsToExposedRect): Ditto.
1356         (WebCore::TileController::prepopulateRect): Save the rect and trigger a revalidate.
1357         (WebCore::TileController::setIsInWindow): If we're in the window, trigger a revalidate
1358         otherwise schedule the timer.
1359         (WebCore::TileController::revalidateTiles): Wrapper for the real revalidateTiles().
1360         (WebCore::TileController::tileRevalidationTimerFired): If we're in the window,
1361         schedule a revalidate. Otherwise our layer tree is disconnected, and it's OK to call revalidateTiles().
1362         (WebCore::TileController::setNeedsRevalidateTiles): Call through the client to GraphicsLayerCA
1363         which will schedule a layer tree flush.
1364         (WebCore::TileController::revalidateTiles):
1365         (WebCore::TileController::ensureTilesForRect): Move code from prepopulateRect
1366         into here; ensureTilesForRect() for each secondary rect, then clear the rects.
1367         No need to call platformCALayerDidCreateTiles() at the end.
1368         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Remove
1369         platformCALayerDidCreateTiles() override.
1370         * rendering/RenderLayerCompositor.cpp:
1371         (WebCore::RenderLayerCompositor::scheduleLayerFlush): This should only be
1372         called when we're not inside a flush, otherwise it will fail to schedule
1373         another one.
1374
1375 2013-09-23  Sam Weinig  <sam@webkit.org>
1376
1377         CTTE: htmlediting.h Element creation function should take a Document&
1378         https://bugs.webkit.org/show_bug.cgi?id=121800
1379
1380         Reviewed by Antti Koivisto.
1381
1382         Thread the Document&!
1383
1384 2013-09-23  Jacky Jiang  <zhajiang@blackberry.com>
1385
1386         [BlackBerry] Poor rendering opening a Google map short link
1387         https://bugs.webkit.org/show_bug.cgi?id=121687
1388
1389         Reviewed by Yong Li.
1390         Internally reviewed by Liam Quinn and Joe Mason.
1391
1392         Fix a regression. It turns out that LayerCompositingThread already has
1393         an API named isVisible() which by default returns false. So rename the
1394         one in the LayerData to isLayerVisible().
1395
1396         * platform/graphics/blackberry/LayerData.h:
1397         (WebCore::LayerData::isLayerVisible):
1398         * platform/graphics/blackberry/LayerRenderer.cpp:
1399         (WebCore::LayerRenderer::compositeLayersRecursive):
1400
1401 2013-09-23  Antti Koivisto  <antti@apple.com>
1402
1403         Rename RenderObject::first/lastChild to RenderObject::first/lastChildSlow
1404         https://bugs.webkit.org/show_bug.cgi?id=121784
1405
1406         Reviewed by Andreas Kling.
1407
1408         This will make it obvious in code where typing should be tightened.
1409         Handled some simple cases by tightening the code instead of renaming.
1410
1411 2013-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
1412
1413         [Texmap] Reloading a webgl page doesn't work
1414         https://bugs.webkit.org/show_bug.cgi?id=120593
1415
1416         Reviewed by Noam Rosenthal.
1417
1418         Let GraphicsLayerTextureMapper know it needs to detach the platform layer when a GraphicsContext3D is destroyed.
1419
1420         Test: fast/canvas/webgl/webgl-reload-crash.html
1421
1422         * platform/graphics/GraphicsContext3DPrivate.cpp:
1423         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1424         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1425         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
1426
1427 2013-09-23  Antti Koivisto  <antti@apple.com>
1428
1429         Remove RenderObjectChildList
1430         https://bugs.webkit.org/show_bug.cgi?id=121771
1431
1432         Reviewed by Darin Adler.
1433
1434         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
1435         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
1436         
1437         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
1438
1439 2013-09-23  Andreas Kling  <akling@apple.com>
1440
1441         Document::destroyRenderTree() shouldn't do anything but.
1442         <https://webkit.org/b/121786>
1443
1444         Reviewed by Anders Carlsson.
1445
1446         Move everything in destroyRenderTree() that doesn't actually destroy
1447         render trees to prepareForDestruction() instead.
1448
1449         Destroying the render tree is now a reparable operation.
1450
1451 2013-09-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1452
1453         [Qt] Tiled backing-store causes wrong translation
1454         https://bugs.webkit.org/show_bug.cgi?id=121789
1455
1456         Reviewed by Noam Rosenthal.
1457
1458         Move the translation inside save/restore of the GraphicsContext.
1459
1460         * platform/graphics/qt/TileQt.cpp:
1461         (WebCore::TileQt::updateBackBuffer):
1462
1463 2013-09-23  Andreas Kling  <akling@apple.com>
1464
1465         Unify code paths leading to render tree teardown.
1466         <https://webkit.org/b/121785>
1467
1468         Reviewed by Antti Koivisto.
1469
1470         Make Document::prepareForDestruction() fit all the call sites that were
1471         doing destroyRenderTree() + disconnectFromFrame().
1472
1473         - disconnectDescendantFrames() is already a no-op if there are no frames.
1474         - willDetachDocumentFromFrame() will only run if there is a frame.
1475
1476         This is another step towards making tree rebuild possible.
1477
1478         Removed some age-old FIXMEs about why we aren't calling willRemove(),
1479         a long-gone function.
1480
1481 2013-09-23  Patrick Gansterer  <paroga@webkit.org>
1482
1483         Cleanup CMake files in WebCore
1484         https://bugs.webkit.org/show_bug.cgi?id=119262
1485
1486         Reviewed by Gyuyoung Kim.
1487
1488         Sort files and unify style.
1489
1490         * CMakeLists.txt:
1491         * PlatformBlackBerry.cmake:
1492         * PlatformEfl.cmake:
1493         * PlatformGTK.cmake:
1494         * PlatformWin.cmake:
1495         * PlatformWinCE.cmake:
1496
1497 2013-09-22  Commit Queue  <commit-queue@webkit.org>
1498
1499         Unreviewed, rolling out r156254.
1500         http://trac.webkit.org/changeset/156254
1501         https://bugs.webkit.org/show_bug.cgi?id=121779
1502
1503         Caused assertions in fast/regions tests (Requested by ap on
1504         #webkit).
1505
1506         * CMakeLists.txt:
1507         * GNUmakefile.list.am:
1508         * Target.pri:
1509         * WebCore.vcxproj/WebCore.vcxproj:
1510         * WebCore.xcodeproj/project.pbxproj:
1511         * rendering/AutoTableLayout.cpp:
1512         (WebCore::AutoTableLayout::recalcColumn):
1513         * rendering/RenderBlock.cpp:
1514         (WebCore::RenderBlock::willBeDestroyed):
1515         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
1516         (WebCore::RenderBlock::splitBlocks):
1517         (WebCore::RenderBlock::splitFlow):
1518         (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks):
1519         (WebCore::RenderBlock::makeChildrenNonInline):
1520         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
1521         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1522         (WebCore::RenderBlock::removeChild):
1523         (WebCore::RenderBlock::updateFirstLetterStyle):
1524         * rendering/RenderBlock.h:
1525         (WebCore::RenderBlock::firstChild):
1526         (WebCore::RenderBlock::lastChild):
1527         * rendering/RenderBox.cpp:
1528         (WebCore::RenderBox::splitAnonymousBoxesAroundChild):
1529         * rendering/RenderBoxModelObject.cpp:
1530         (WebCore::RenderBoxModelObject::moveChildTo):
1531         * rendering/RenderElement.cpp:
1532         (WebCore::RenderElement::RenderElement):
1533         (WebCore::RenderElement::addChild):
1534         (WebCore::RenderElement::removeChild):
1535         * rendering/RenderElement.h:
1536         * rendering/RenderEmbeddedObject.cpp:
1537         (WebCore::RenderEmbeddedObject::layout):
1538         * rendering/RenderEmbeddedObject.h:
1539         * rendering/RenderFrameSet.h:
1540         * rendering/RenderInline.cpp:
1541         (WebCore::RenderInline::willBeDestroyed):
1542         (WebCore::RenderInline::splitInlines):
1543         (WebCore::RenderInline::splitFlow):
1544         (WebCore::RenderInline::childBecameNonInline):
1545         * rendering/RenderInline.h:
1546         (WebCore::RenderInline::firstChild):
1547         (WebCore::RenderInline::lastChild):
1548         * rendering/RenderLayerModelObject.cpp:
1549         (WebCore::RenderLayerModelObject::willBeDestroyed):
1550         * rendering/RenderLineBreak.h:
1551         * rendering/RenderListMarker.h:
1552         * rendering/RenderMedia.cpp:
1553         (WebCore::RenderMedia::layout):
1554         * rendering/RenderMedia.h:
1555         (WebCore::RenderMedia::firstChild):
1556         (WebCore::RenderMedia::lastChild):
1557         * rendering/RenderObject.cpp:
1558         (WebCore::RenderObject::handleDynamicFloatPositionChange):
1559         (WebCore::RenderObject::willBeDestroyed):
1560         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
1561         * rendering/RenderObject.h:
1562         (WebCore::RenderObject::firstChild):
1563         (WebCore::RenderObject::lastChild):
1564         (WebCore::RenderObject::children):
1565         (WebCore::RenderObject::canHaveChildren):
1566         * rendering/RenderObjectChildList.cpp: Added.
1567         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
1568         (WebCore::RenderObjectChildList::removeChildNode):
1569         (WebCore::RenderObjectChildList::insertChildNode):
1570         * rendering/RenderObjectChildList.h: Copied from Source/WebCore/rendering/RenderMedia.h.
1571         (WebCore::RenderObjectChildList::RenderObjectChildList):
1572         (WebCore::RenderObjectChildList::firstChild):
1573         (WebCore::RenderObjectChildList::lastChild):
1574         (WebCore::RenderObjectChildList::setFirstChild):
1575         (WebCore::RenderObjectChildList::setLastChild):
1576         (WebCore::RenderObjectChildList::appendChildNode):
1577         * rendering/RenderReplaced.h:
1578         (WebCore::RenderReplaced::canHaveChildren):
1579         * rendering/RenderReplica.h:
1580         * rendering/RenderRubyBase.cpp:
1581         (WebCore::RenderRubyBase::moveInlineChildren):
1582         (WebCore::RenderRubyBase::moveBlockChildren):
1583         * rendering/RenderTableCol.h:
1584         * rendering/RenderTableRow.h:
1585         * rendering/RenderTableSection.h:
1586         * rendering/RenderText.h:
1587         * rendering/RenderingAllInOne.cpp:
1588         * rendering/mathml/RenderMathMLOperator.cpp:
1589         (WebCore::RenderMathMLOperator::updateFromElement):
1590         * rendering/svg/RenderSVGContainer.h:
1591         (WebCore::RenderSVGContainer::firstChild):
1592         (WebCore::RenderSVGContainer::lastChild):
1593         * rendering/svg/RenderSVGGradientStop.h:
1594         * rendering/svg/RenderSVGImage.h:
1595         * rendering/svg/RenderSVGModelObject.cpp:
1596         (WebCore::RenderSVGModelObject::willBeDestroyed):
1597         * rendering/svg/RenderSVGRoot.h:
1598         * rendering/svg/RenderSVGShape.h:
1599
1600 2013-09-22  Commit Queue  <commit-queue@webkit.org>
1601
1602         Unreviewed, rolling out r156253.
1603         http://trac.webkit.org/changeset/156253
1604         https://bugs.webkit.org/show_bug.cgi?id=121778
1605
1606         Caused >20 tests to crash with assertion failures (Requested
1607         by ap on #webkit).
1608
1609         * css/CSSAspectRatioValue.h:
1610         * css/CSSBorderImageSliceValue.h:
1611         * css/CSSCalculationValue.cpp:
1612         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1613         * css/CSSCalculationValue.h:
1614         * css/CSSCrossfadeValue.cpp:
1615         (WebCore::subimageKnownToBeOpaque):
1616         * css/CSSCrossfadeValue.h:
1617         (WebCore::toCSSCrossfadeValue):
1618         * css/CSSCursorImageValue.cpp:
1619         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1620         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1621         (WebCore::CSSCursorImageValue::cachedImage):
1622         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
1623         (WebCore::CSSCursorImageValue::isSVGCursor):
1624         * css/CSSCursorImageValue.h:
1625         * css/CSSFilterImageValue.h:
1626         (WebCore::toCSSFilterImageValue):
1627         * css/CSSFontSelector.cpp:
1628         (WebCore::CSSFontSelector::addFontFaceRule):
1629         * css/CSSGradientValue.h:
1630         * css/CSSImageGeneratorValue.cpp:
1631         (WebCore::CSSImageGeneratorValue::image):
1632         (WebCore::CSSImageGeneratorValue::fixedSize):
1633         (WebCore::CSSImageGeneratorValue::loadSubimages):
1634         (WebCore::CSSImageGeneratorValue::subimageIsPending):
1635         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
1636         * css/CSSImageGeneratorValue.h:
1637         * css/CSSImageSetValue.cpp:
1638         (WebCore::CSSImageSetValue::fillImageSet):
1639         * css/CSSImageSetValue.h:
1640         * css/CSSImageValue.h:
1641         * css/CSSInheritedValue.h:
1642         * css/CSSInitialValue.h:
1643         * css/CSSLineBoxContainValue.h:
1644         * css/CSSParser.cpp:
1645         (WebCore::CSSParser::parseColor):
1646         (WebCore::CSSParser::addProperty):
1647         (WebCore::CSSParser::parse3ValuesFillPosition):
1648         (WebCore::CSSParser::parseFillPosition):
1649         (WebCore::CSSParser::parseFillRepeat):
1650         (WebCore::CSSParser::parseDeprecatedRadialGradient):
1651         (WebCore::CSSParser::parseRadialGradient):
1652         * css/CSSPrimitiveValue.h:
1653         * css/CSSReflectValue.h:
1654         * css/CSSToStyleMap.cpp:
1655         (WebCore::CSSToStyleMap::mapFillAttachment):
1656         (WebCore::CSSToStyleMap::mapFillClip):
1657         (WebCore::CSSToStyleMap::mapFillComposite):
1658         (WebCore::CSSToStyleMap::mapFillBlendMode):
1659         (WebCore::CSSToStyleMap::mapFillOrigin):
1660         (WebCore::CSSToStyleMap::mapFillRepeatX):
1661         (WebCore::CSSToStyleMap::mapFillRepeatY):
1662         (WebCore::CSSToStyleMap::mapFillSize):
1663         (WebCore::CSSToStyleMap::mapFillXPosition):
1664         (WebCore::CSSToStyleMap::mapFillYPosition):
1665         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
1666         (WebCore::CSSToStyleMap::mapAnimationDelay):
1667         (WebCore::CSSToStyleMap::mapAnimationDirection):
1668         (WebCore::CSSToStyleMap::mapAnimationDuration):
1669         (WebCore::CSSToStyleMap::mapAnimationFillMode):
1670         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
1671         (WebCore::CSSToStyleMap::mapAnimationName):
1672         (WebCore::CSSToStyleMap::mapAnimationPlayState):
1673         (WebCore::CSSToStyleMap::mapAnimationProperty):
1674         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
1675         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
1676         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
1677         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
1678         * css/CSSValue.cpp:
1679         (WebCore::CSSValue::destroy):
1680         * css/CSSValue.h:
1681         (WebCore::CSSValue::isCSSLineBoxContainValue):
1682         (WebCore::CSSValue::isCalculationValue):
1683         * css/CSSValueList.h:
1684         * css/CSSVariableValue.h:
1685         * css/DeprecatedStyleBuilder.cpp:
1686         (WebCore::ApplyPropertyDefault::applyValue):
1687         (WebCore::ApplyPropertyNumber::applyValue):
1688         (WebCore::ApplyPropertyAuto::applyValue):
1689         (WebCore::ApplyPropertyClip::applyValue):
1690         (WebCore::ApplyPropertyColor::applyValue):
1691         (WebCore::ApplyPropertyLength::applyValue):
1692         (WebCore::ApplyPropertyString::applyValue):
1693         (WebCore::ApplyPropertyBorderRadius::applyValue):
1694         (WebCore::ApplyPropertyComputeLength::applyValue):
1695         (WebCore::ApplyPropertyFont::applyValue):
1696         (WebCore::ApplyPropertyFontFamily::applyValue):
1697         (WebCore::ApplyPropertyFontSize::applyValue):
1698         (WebCore::ApplyPropertyFontWeight::applyValue):
1699         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
1700         (WebCore::ApplyPropertyCounter::applyValue):
1701         (WebCore::ApplyPropertyCursor::applyValue):
1702         (WebCore::ApplyPropertyTextAlign::applyValue):
1703         (WebCore::ApplyPropertyTextDecoration::applyValue):
1704         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
1705         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
1706         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
1707         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
1708         (WebCore::ApplyPropertyLineHeight::applyValue):
1709         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
1710         (WebCore::ApplyPropertyPageSize::applyValue):
1711         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
1712         (WebCore::ApplyPropertyResize::applyValue):
1713         (WebCore::ApplyPropertyVerticalAlign::applyValue):
1714         (WebCore::ApplyPropertyAspectRatio::applyValue):
1715         (WebCore::ApplyPropertyZoom::applyValue):
1716         (WebCore::ApplyPropertyDisplay::applyValue):
1717         (WebCore::ApplyPropertyClipPath::applyValue):
1718         (WebCore::ApplyPropertyShape::applyValue):
1719         (WebCore::ApplyPropertyImageResolution::applyValue):
1720         (WebCore::ApplyPropertyTextIndent::applyValue):
1721         * css/FontFeatureValue.h:
1722         * css/FontValue.h:
1723         * css/MediaList.cpp:
1724         (WebCore::reportMediaQueryWarningIfNeeded):
1725         * css/MediaQueryEvaluator.cpp:
1726         (WebCore::compareAspectRatioValue):
1727         (WebCore::numberValue):
1728         (WebCore::orientationMediaFeatureEval):
1729         (WebCore::evalResolution):
1730         (WebCore::device_pixel_ratioMediaFeatureEval):
1731         (WebCore::resolutionMediaFeatureEval):
1732         (WebCore::computeLength):
1733         (WebCore::view_modeMediaFeatureEval):
1734         (WebCore::pointerMediaFeatureEval):
1735         * css/SVGCSSStyleSelector.cpp:
1736         (WebCore::StyleResolver::applySVGProperty):
1737         * css/ShadowValue.h:
1738         * css/StylePropertySet.cpp:
1739         (WebCore::StylePropertySet::getLayeredShorthandValue):
1740         * css/StyleResolver.cpp:
1741         (WebCore::createGridTrackSize):
1742         (WebCore::createGridTrackList):
1743         (WebCore::createGridPosition):
1744         (WebCore::hasVariableReference):
1745         (WebCore::StyleResolver::applyProperty):
1746         (WebCore::StyleResolver::styleImage):
1747         (WebCore::StyleResolver::generatedOrPendingFromValue):
1748         (WebCore::StyleResolver::styleShader):
1749         (WebCore::StyleResolver::parseCustomFilterArrayParameter):
1750         (WebCore::StyleResolver::parseCustomFilterColorParameter):
1751         (WebCore::StyleResolver::parseCustomFilterNumberParameter):
1752         (WebCore::StyleResolver::parseCustomFilterParameter):
1753         (WebCore::StyleResolver::parseCustomFilterParameterList):
1754         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
1755         (WebCore::StyleResolver::createFilterOperations):
1756         * css/TransformFunctions.cpp:
1757         (WebCore::transformsForValue):
1758         * css/ViewportStyleResolver.cpp:
1759         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
1760         * css/WebKitCSSMatrix.cpp:
1761         (WebCore::WebKitCSSMatrix::setMatrixValue):
1762         * editing/ApplyStyleCommand.cpp:
1763         (WebCore::ApplyStyleCommand::computedFontSize):
1764         * editing/EditingStyle.cpp:
1765         (WebCore::identifierForStyleProperty):
1766         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
1767         (WebCore::cssValueToRGBA):
1768         (WebCore::EditingStyle::extractFontSizeDelta):
1769         (WebCore::EditingStyle::textDirection):
1770         (WebCore::EditingStyle::prepareToApplyAt):
1771         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1772         (WebCore::EditingStyle::legacyFontSize):
1773         (WebCore::EditingStyle::textDirectionForSelection):
1774         (WebCore::StyleChange::extractTextStyles):
1775         (WebCore::fontWeightIsBold):
1776         (WebCore::isTransparentColorValue):
1777         * editing/markup.cpp:
1778         (WebCore::propertyMissingOrEqualToNone):
1779         * page/PageSerializer.cpp:
1780         (WebCore::PageSerializer::retrieveResourcesForProperties):
1781         * rendering/style/StylePendingImage.h:
1782         (WebCore::StylePendingImage::data):
1783         (WebCore::StylePendingImage::cssImageValue):
1784         (WebCore::StylePendingImage::cssImageGeneratorValue):
1785         (WebCore::StylePendingImage::cssCursorImageValue):
1786         (WebCore::StylePendingImage::cssImageSetValue):
1787
1788 2013-09-22  Commit Queue  <commit-queue@webkit.org>
1789
1790         Unreviewed, rolling out r156257.
1791         http://trac.webkit.org/changeset/156257
1792         https://bugs.webkit.org/show_bug.cgi?id=121777
1793
1794         The test from this patch fails (Requested by ap on #webkit).
1795
1796         * rendering/RenderBox.cpp:
1797         (WebCore::RenderBox::calculateAutoscrollDirection):
1798
1799 2013-09-22  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1800
1801         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag
1802         https://bugs.webkit.org/show_bug.cgi?id=40981
1803
1804         Reviewed by Darin Adler.
1805
1806         RenderBox::calculateAutoscrollDirection does not properly translate
1807         inner frames' coordinates in order to determine its auto-scrollability.
1808         By coincidence, if the inner frame box it placed near to page's 0, 0 position
1809         (upper left corner), it might work.
1810
1811         Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate
1812         with window coordinates, taking inner frames offset and scroll position into account.
1813         The behavior of auto-scrollable non-frame overflow boxes, including divs, still works
1814         as it is used to.
1815
1816         Test: fast/events/drag-and-drop-autoscroll-inner-frame.html
1817
1818         * rendering/RenderBox.cpp:
1819         (WebCore::RenderBox::calculateAutoscrollDirection):
1820
1821 2013-09-22  Sam Weinig  <sam@webkit.org>
1822
1823         CTTE: Use references more in ContainerNode, ContainerNodeAlgorithms and related classes
1824         https://bugs.webkit.org/show_bug.cgi?id=121772
1825
1826         Reviewed by Andreas Kling.
1827
1828         Use references for never null Nodes in ContainerNode and related classes.
1829
1830 2013-09-22  Antti Koivisto  <antti@apple.com>
1831
1832         Fix functions calling to RenderObject superclass to call RenderElement instead
1833         https://bugs.webkit.org/show_bug.cgi?id=121773
1834
1835         Reviewed by Andreas Kling.
1836
1837         The class hierarchy has a new class. Superclass calls should be pointed there instead to
1838         avoid future bugs.
1839
1840         * rendering/RenderBoxModelObject.cpp:
1841         (WebCore::RenderBoxModelObject::setSelectionState):
1842         * rendering/RenderLayerModelObject.cpp:
1843         (WebCore::RenderLayerModelObject::styleWillChange):
1844         (WebCore::RenderLayerModelObject::styleDidChange):
1845         * rendering/svg/RenderSVGGradientStop.cpp:
1846         (WebCore::RenderSVGGradientStop::styleDidChange):
1847         * rendering/svg/RenderSVGModelObject.cpp:
1848         (WebCore::RenderSVGModelObject::styleWillChange):
1849         (WebCore::RenderSVGModelObject::styleDidChange):
1850
1851 2013-09-22  Antti Koivisto  <antti@apple.com>
1852
1853         Remove RenderObjectChildList
1854         https://bugs.webkit.org/show_bug.cgi?id=121771
1855
1856         Reviewed by Darin Adler.
1857
1858         Most RenderElement subclasses have m_children member (>90% of instances on typical page). It is not worth optimising
1859         for memory for the few cases that don't (RenderImage, RenderLineBreak mostly) in expense of performance.
1860         
1861         This patch moves child handling to RenderElement. This gets rid of virtual children() calls and simplifies the code.
1862
1863 2013-09-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1864
1865         Introduce CSS_VALUE_TYPE_CASTS macro in order to cast CSSValue type
1866         https://bugs.webkit.org/show_bug.cgi?id=121462
1867
1868         Reviewed by Andreas Kling.
1869
1870         As r155429 introduced ELEMENT_TYPE_CASTS, CSS_VALUE_TYPE_CASTS can be used
1871         by css value type casting as well. This type cast macros will help to detect
1872         bad-cast bugs as well as improve a code readibility.
1873
1874         This patch adds the following methods,
1875
1876         - CSSFooValue* toCSSFooValue(CSSValue*)
1877         - const CSSFooValue* toCSSFooValue(const CSSValue*)
1878
1879         To be consistent with other is*Value() naming style, isCSSLineBoxContainValue() and isCalculationValue()
1880         are changed with isLineBoxContainValue() and isCalcValue().
1881
1882         FontValue, FontFeatureValue, ShadowValue have a manual type case function because of different
1883         class naming style. So, toFontValue(), toFontFeatureValue() and toShadowValue() are added manually.
1884
1885         This patch removes unnecessary local variables.
1886
1887         No new tests, no behavior change.
1888
1889         * css/CSSAspectRatioValue.h:
1890         * css/CSSBorderImageSliceValue.h:
1891         * css/CSSCalculationValue.cpp:
1892         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1893         * css/CSSCalculationValue.h:
1894         * css/CSSCrossfadeValue.cpp:
1895         (WebCore::subimageKnownToBeOpaque):
1896         * css/CSSCrossfadeValue.h:
1897         * css/CSSCursorImageValue.cpp:
1898         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1899         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1900         (WebCore::CSSCursorImageValue::cachedImage):
1901         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
1902         (WebCore::CSSCursorImageValue::isSVGCursor):
1903         * css/CSSCursorImageValue.h:
1904         * css/CSSFilterImageValue.h:
1905         * css/CSSFontSelector.cpp:
1906         (WebCore::CSSFontSelector::addFontFaceRule):
1907         * css/CSSGradientValue.h:
1908         * css/CSSImageGeneratorValue.cpp:
1909         (WebCore::CSSImageGeneratorValue::image):
1910         (WebCore::CSSImageGeneratorValue::fixedSize):
1911         (WebCore::CSSImageGeneratorValue::loadSubimages):
1912         (WebCore::CSSImageGeneratorValue::subimageIsPending):
1913         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
1914         * css/CSSImageGeneratorValue.h:
1915         * css/CSSImageSetValue.cpp:
1916         (WebCore::CSSImageSetValue::fillImageSet):
1917         * css/CSSImageSetValue.h:
1918         * css/CSSImageValue.h:
1919         * css/CSSInheritedValue.h:
1920         * css/CSSInitialValue.h:
1921         * css/CSSLineBoxContainValue.h:
1922         * css/CSSParser.cpp:
1923         (WebCore::CSSParser::parseColor):
1924         (WebCore::CSSParser::addProperty):
1925         (WebCore::CSSParser::parse3ValuesFillPosition):
1926         (WebCore::CSSParser::parseFillPosition):
1927         (WebCore::CSSParser::parseFillRepeat):
1928         (WebCore::CSSParser::parseDeprecatedRadialGradient):
1929         (WebCore::CSSParser::parseRadialGradient):
1930         * css/CSSPrimitiveValue.h:
1931         * css/CSSReflectValue.h:
1932         * css/CSSToStyleMap.cpp:
1933         (WebCore::CSSToStyleMap::mapFillAttachment):
1934         (WebCore::CSSToStyleMap::mapFillClip):
1935         (WebCore::CSSToStyleMap::mapFillComposite):
1936         (WebCore::CSSToStyleMap::mapFillBlendMode):
1937         (WebCore::CSSToStyleMap::mapFillOrigin):
1938         (WebCore::CSSToStyleMap::mapFillRepeatX):
1939         (WebCore::CSSToStyleMap::mapFillRepeatY):
1940         (WebCore::CSSToStyleMap::mapFillSize):
1941         (WebCore::CSSToStyleMap::mapFillXPosition):
1942         (WebCore::CSSToStyleMap::mapFillYPosition):
1943         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
1944         (WebCore::CSSToStyleMap::mapAnimationDelay):
1945         (WebCore::CSSToStyleMap::mapAnimationDirection):
1946         (WebCore::CSSToStyleMap::mapAnimationDuration):
1947         (WebCore::CSSToStyleMap::mapAnimationFillMode):
1948         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
1949         (WebCore::CSSToStyleMap::mapAnimationName):
1950         (WebCore::CSSToStyleMap::mapAnimationPlayState):
1951         (WebCore::CSSToStyleMap::mapAnimationProperty):
1952         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
1953         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
1954         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
1955         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
1956         * css/CSSValue.cpp:
1957         (WebCore::CSSValue::destroy):
1958         * css/CSSValue.h:
1959         (WebCore::CSSValue::isLineBoxContainValue):
1960         (WebCore::CSSValue::isCalcValue):
1961         * css/CSSValueList.h:
1962         * css/CSSVariableValue.h:
1963         * css/DeprecatedStyleBuilder.cpp:
1964         (WebCore::ApplyPropertyDefault::applyValue):
1965         (WebCore::ApplyPropertyNumber::applyValue):
1966         (WebCore::ApplyPropertyAuto::applyValue):
1967         (WebCore::ApplyPropertyClip::applyValue):
1968         (WebCore::ApplyPropertyColor::applyValue):
1969         (WebCore::ApplyPropertyLength::applyValue):
1970         (WebCore::ApplyPropertyString::applyValue):
1971         (WebCore::ApplyPropertyBorderRadius::applyValue):
1972         (WebCore::ApplyPropertyComputeLength::applyValue):
1973         (WebCore::ApplyPropertyFont::applyValue):
1974         (WebCore::ApplyPropertyFontFamily::applyValue):
1975         (WebCore::ApplyPropertyFontSize::applyValue):
1976         (WebCore::ApplyPropertyFontWeight::applyValue):
1977         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
1978         (WebCore::ApplyPropertyCounter::applyValue):
1979         (WebCore::ApplyPropertyCursor::applyValue):
1980         (WebCore::ApplyPropertyTextAlign::applyValue):
1981         (WebCore::ApplyPropertyTextDecoration::applyValue):
1982         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
1983         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
1984         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
1985         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
1986         (WebCore::ApplyPropertyLineHeight::applyValue):
1987         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
1988         (WebCore::ApplyPropertyPageSize::applyValue):
1989         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
1990         (WebCore::ApplyPropertyResize::applyValue):
1991         (WebCore::ApplyPropertyVerticalAlign::applyValue):
1992         (WebCore::ApplyPropertyAspectRatio::applyValue):
1993         (WebCore::ApplyPropertyZoom::applyValue):
1994         (WebCore::ApplyPropertyDisplay::applyValue):
1995         (WebCore::ApplyPropertyClipPath::applyValue):
1996         (WebCore::ApplyPropertyShape::applyValue):
1997         (WebCore::ApplyPropertyImageResolution::applyValue):
1998         (WebCore::ApplyPropertyTextIndent::applyValue):
1999         * css/FontFeatureValue.h:
2000         (WebCore::toFontFeatureValue):
2001         * css/FontValue.h:
2002         (WebCore::toFontValue):
2003         * css/MediaList.cpp:
2004         (WebCore::reportMediaQueryWarningIfNeeded):
2005         * css/MediaQueryEvaluator.cpp:
2006         (WebCore::compareAspectRatioValue):
2007         (WebCore::numberValue):
2008         (WebCore::orientationMediaFeatureEval):
2009         (WebCore::evalResolution):
2010         (WebCore::device_pixel_ratioMediaFeatureEval):
2011         (WebCore::resolutionMediaFeatureEval):
2012         (WebCore::computeLength):
2013         (WebCore::view_modeMediaFeatureEval):
2014         (WebCore::pointerMediaFeatureEval):
2015         * css/SVGCSSStyleSelector.cpp:
2016         (WebCore::StyleResolver::applySVGProperty):
2017         * css/ShadowValue.h:
2018         (WebCore::toShadowValue):
2019         * css/StylePropertySet.cpp:
2020         (WebCore::StylePropertySet::getLayeredShorthandValue):
2021         * css/StyleResolver.cpp:
2022         (WebCore::createGridTrackSize):
2023         (WebCore::createGridTrackList):
2024         (WebCore::createGridPosition):
2025         (WebCore::hasVariableReference):
2026         (WebCore::StyleResolver::applyProperty):
2027         (WebCore::StyleResolver::styleImage):
2028         (WebCore::StyleResolver::generatedOrPendingFromValue):
2029         (WebCore::StyleResolver::styleShader):
2030         (WebCore::StyleResolver::parseCustomFilterArrayParameter):
2031         (WebCore::StyleResolver::parseCustomFilterColorParameter):
2032         (WebCore::StyleResolver::parseCustomFilterNumberParameter):
2033         (WebCore::StyleResolver::parseCustomFilterParameter):
2034         (WebCore::StyleResolver::parseCustomFilterParameterList):
2035         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2036         (WebCore::StyleResolver::createFilterOperations):
2037         * css/TransformFunctions.cpp:
2038         (WebCore::transformsForValue):
2039         * css/ViewportStyleResolver.cpp:
2040         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
2041         * css/WebKitCSSMatrix.cpp:
2042         (WebCore::WebKitCSSMatrix::setMatrixValue):
2043         * css/WebKitCSSShaderValue.h:
2044         (WebCore::toWebKitCSSShaderValue):
2045         * editing/ApplyStyleCommand.cpp:
2046         (WebCore::ApplyStyleCommand::computedFontSize):
2047         * editing/EditingStyle.cpp:
2048         (WebCore::identifierForStyleProperty):
2049         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
2050         (WebCore::cssValueToRGBA):
2051         (WebCore::EditingStyle::extractFontSizeDelta):
2052         (WebCore::EditingStyle::textDirection):
2053         (WebCore::EditingStyle::prepareToApplyAt):
2054         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2055         (WebCore::EditingStyle::legacyFontSize):
2056         (WebCore::EditingStyle::textDirectionForSelection):
2057         (WebCore::StyleChange::extractTextStyles):
2058         (WebCore::fontWeightIsBold):
2059         (WebCore::isTransparentColorValue):
2060         * editing/markup.cpp:
2061         (WebCore::propertyMissingOrEqualToNone):
2062         * page/PageSerializer.cpp:
2063         (WebCore::PageSerializer::retrieveResourcesForProperties):
2064         * rendering/style/StylePendingImage.h:
2065         (WebCore::StylePendingImage::data):
2066         (WebCore::StylePendingImage::cssImageValue):
2067         (WebCore::StylePendingImage::cssImageGeneratorValue):
2068         (WebCore::StylePendingImage::cssCursorImageValue):
2069         (WebCore::StylePendingImage::cssImageSetValue):
2070
2071 2013-09-22  Arunprasad Rajkumar  <ararunprasad@gmail.com>
2072
2073         Hiding a focused element should unfocus it and fire a blur event
2074         https://bugs.webkit.org/show_bug.cgi?id=29241
2075
2076         Reviewed by Darin Adler.
2077
2078         Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
2079
2080         We check whether the current focus element is really focusable after
2081         the style recalculation and layout change. If it is not focusable then schedule a
2082         timer to reset it asynchronously.
2083
2084         * dom/Document.cpp:
2085         (WebCore::Document::Document):
2086         (WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
2087         style recalculation.
2088         (WebCore::Document::updateLayout): Check isFocusable() on the focus element after
2089         layout.
2090         (WebCore::Document::resetHiddenFocusElementSoon):
2091         (WebCore::Document::resetHiddenFocusElementTimer):
2092         * dom/Document.h:
2093
2094 2013-09-22  Sam Weinig  <sam@webkit.org>
2095
2096         CTTE: StaticNodeLists often contain only Elements, we shouldn't store them as Vector<RefPtr<Node>> in those cases
2097         https://bugs.webkit.org/show_bug.cgi?id=121769
2098
2099         Reviewed by Andreas Kling.
2100
2101         Introduces StaticElementList and uses it.
2102
2103         * accessibility/AccessibilityRenderObject.cpp:
2104         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2105         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2106         (WebCore::getNamedItems):
2107         * bindings/js/JSHTMLCollectionCustom.cpp:
2108         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
2109         (WebCore::getNamedItems):
2110         * bindings/js/JSHTMLFormElementCustom.cpp:
2111         (WebCore::JSHTMLFormElement::nameGetter):
2112         * dom/SelectorQuery.cpp:
2113         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
2114         (WebCore::SelectorDataList::queryAll):
2115         * dom/StaticNodeList.cpp:
2116         (WebCore::StaticElementList::length):
2117         (WebCore::StaticElementList::item):
2118         (WebCore::StaticElementList::namedItem):
2119         * dom/StaticNodeList.h:
2120         * dom/WebKitNamedFlow.cpp:
2121         (WebCore::WebKitNamedFlow::getRegionsByContent):
2122         (WebCore::WebKitNamedFlow::getRegions):
2123         (WebCore::WebKitNamedFlow::getContent):
2124         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
2125         (WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
2126         * html/HTMLCollection.cpp:
2127         (WebCore::HTMLCollection::namedItems):
2128         * html/HTMLCollection.h:
2129         * html/HTMLFormElement.cpp:
2130         (WebCore::HTMLFormElement::getNamedElements):
2131         * html/HTMLFormElement.h:
2132         * svg/SVGSVGElement.cpp:
2133         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
2134
2135 2013-09-22  Sam Weinig  <sam@webkit.org>
2136
2137         CTTE: RenderNamedFlowThread and FlowThreadController should operate on Elements, not Nodes
2138         https://bugs.webkit.org/show_bug.cgi?id=121768
2139
2140         Reviewed by Andreas Kling.
2141
2142         * dom/Element.cpp:
2143         (WebCore::Element::unregisterNamedFlowContentElement):
2144         (WebCore::Element::shouldMoveToFlowThread):
2145         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
2146         * dom/Element.h:
2147         Update to new names and to pass this as a reference to the FlowThreadController.
2148
2149         * dom/Node.cpp:
2150         * dom/Node.h:
2151         Move isRegisteredWithNamedFlow() to Element.
2152
2153         * dom/WebKitNamedFlow.cpp:
2154         (WebCore::WebKitNamedFlow::getRegionsByContent):
2155         (WebCore::WebKitNamedFlow::getRegions):
2156         (WebCore::WebKitNamedFlow::getContent):
2157         Update for contentNodes() -> contentElements() name change. Modernize the code a bit
2158         as well.
2159
2160         * rendering/FlowThreadController.cpp:
2161         (WebCore::FlowThreadController::registerNamedFlowContentElement):
2162         (WebCore::FlowThreadController::unregisterNamedFlowContentElement):
2163         (WebCore::FlowThreadController::isContentElementRegisteredWithAnyNamedFlow):
2164         * rendering/FlowThreadController.h:
2165         Change the Node* -> RenderNamedFlowThread* map to a Element* -> RenderNamedFlowThread*. Update
2166         functions taking Node*s to take Element&s.
2167
2168         * rendering/RenderNamedFlowThread.cpp:
2169         (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
2170         (WebCore::RenderNamedFlowThread::clearContentElements):
2171         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
2172         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
2173         (WebCore::RenderNamedFlowThread::hasContentElement):
2174         (WebCore::isContainedInElements):
2175         (WebCore::nextNodeInsideContentElement):
2176         (WebCore::RenderNamedFlowThread::getRanges):
2177         * rendering/RenderNamedFlowThread.h:
2178         Change the NamedFlowContent set to store Elements rather than Nodes. Like with FlowThreadController,
2179         update registration functions to take Element&s instead of Node*s, removing asserts.
2180         
2181         * rendering/RenderRegion.cpp:
2182         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
2183         Update for new names.
2184
2185         * style/StyleResolveTree.cpp:
2186         (WebCore::Style::moveToFlowThreadIfNeeded):
2187         Pass the Element and RenderNamedFlowThread as references.
2188
2189 2013-09-22  Andreas Kling  <akling@apple.com>
2190
2191         Give purity hints to compiler to avoid penalizing repeated calls to some functions.
2192         <https://webkit.org/b/121744>
2193
2194         Reviewed by Darin Adler.
2195
2196         Mark the following functions pure:
2197
2198             - gcController()
2199             - cssValuePool()
2200             - threadGlobalData()
2201
2202         I had this idea when I saw Darin's patch to cache cssValuePool() in a local.
2203         We know that this function will always return the same value, so we should just
2204         share this knowledge with the compiler and let it do the cleverness instead.
2205
2206 2013-09-21  Darin Adler  <darin@apple.com>
2207
2208         Fix too-strict type error exceptions introduced in WebGL bindings
2209         https://bugs.webkit.org/show_bug.cgi?id=121759
2210
2211         Reviewed by Alexey Proskuryakov.
2212
2213         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2214         (WebCore::JSWebGLRenderingContext::getAttachedShaders): Allow undefined
2215         or null without throwing type error.
2216         (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
2217         (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
2218         (WebCore::dataFunctionf): Ditto.
2219         (WebCore::dataFunctioni): Ditto.
2220         (WebCore::dataFunctionMatrix): Ditto.
2221
2222 2013-09-21  Sam Weinig  <sam@webkit.org>
2223
2224         Event and EventTarget interfaces don't need to be store as AtomicStrings
2225         https://bugs.webkit.org/show_bug.cgi?id=121751
2226
2227         Reviewed by Andreas Kling.
2228
2229         Convert the Event and EventTarget interface identifiers from AtomicStrings to enums. They
2230         are not extensible and not exposed as Strings anywhere.
2231
2232         * Files elided *
2233
2234 2013-09-21  Darin Adler  <darin@apple.com>
2235
2236         Add ExecState::uncheckedArgument and use where possible to shrink a bit
2237         https://bugs.webkit.org/show_bug.cgi?id=121750
2238
2239         Reviewed by Andreas Kling.
2240
2241         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2242         (WebCore::JSHTMLCanvasElement::probablySupportsContext): Already checked count.
2243         (WebCore::JSHTMLCanvasElement::toDataURL): Ditto.
2244         * bindings/js/JSHTMLDocumentCustom.cpp:
2245         (WebCore::documentWrite): In a loop.
2246         * bindings/js/JSInjectedScriptHostCustom.cpp:
2247         (WebCore::JSInjectedScriptHost::inspectedObject): Already checked count.
2248         (WebCore::JSInjectedScriptHost::internalConstructorName): Ditto.
2249         (WebCore::JSInjectedScriptHost::isHTMLAllCollection): Ditto.
2250         (WebCore::JSInjectedScriptHost::type): Ditto.
2251         (WebCore::JSInjectedScriptHost::functionDetails): Ditto.
2252         (WebCore::JSInjectedScriptHost::getEventListeners): Ditto.
2253         (WebCore::JSInjectedScriptHost::inspect): Ditto.
2254         (WebCore::JSInjectedScriptHost::databaseId): Ditto.
2255         (WebCore::JSInjectedScriptHost::storageId): Ditto.
2256         * bindings/js/JSSQLTransactionSyncCustom.cpp:
2257         (WebCore::JSSQLTransactionSync::executeSql): Ditto.
2258         * bindings/js/JSSVGLengthCustom.cpp:
2259         (WebCore::JSSVGLength::convertToSpecifiedUnits): Ditto.
2260         * bindings/js/JSSharedWorkerCustom.cpp:
2261         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Ditto.
2262
2263         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2264         (WebCore::getObjectParameter): Already checked count.
2265         (WebCore::JSWebGLRenderingContext::getAttachedShaders): Removed tortured code
2266         to triply do the checking that the toWebGLProgram function already does, including
2267         spurious exception checking in code that can't create an exception. Also count is
2268         already checked.
2269         (WebCore::JSWebGLRenderingContext::getExtension): More of the same.
2270         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
2271         (WebCore::JSWebGLRenderingContext::getParameter): Ditto.
2272         (WebCore::JSWebGLRenderingContext::getProgramParameter): Ditto.
2273         (WebCore::JSWebGLRenderingContext::getShaderParameter): Ditto.
2274         (WebCore::JSWebGLRenderingContext::getUniform): Ditto.
2275         (WebCore::dataFunctionf): Ditto.
2276         (WebCore::dataFunctioni): Ditto.
2277         (WebCore::dataFunctionMatrix): Ditto.
2278
2279         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2280         (WebCore::JSWorkerGlobalScope::importScripts): In a loop.
2281         * bindings/js/JSXMLHttpRequestCustom.cpp:
2282         (WebCore::JSXMLHttpRequest::open): Already checked. Also removed some unneeded
2283         argument count checks.
2284         (WebCore::JSXMLHttpRequest::send): Removed unneeded special case for 0 argument
2285         count that does the same thing as the undefined case, since asking for an
2286         argument past the count yields undefined.
2287
2288         * bindings/js/JSXSLTProcessorCustom.cpp:
2289         (WebCore::JSXSLTProcessor::setParameter): Already checked.
2290         (WebCore::JSXSLTProcessor::getParameter): Already checked.
2291         (WebCore::JSXSLTProcessor::removeParameter): Already checked.
2292
2293         * bindings/js/ScheduledAction.cpp:
2294         (WebCore::ScheduledAction::ScheduledAction): In a loop.
2295         * bindings/js/ScriptCallStackFactory.cpp:
2296         (WebCore::createScriptArguments): Ditto.
2297
2298         * bindings/scripts/CodeGeneratorJS.pm:
2299         (GenerateParametersCheck): Removed some excess argumentCount checks.
2300         Used uncheckedArgument in a few places. More needs to be done, especially for
2301         overloaded functions.
2302
2303         * bridge/c/c_instance.cpp:
2304         (JSC::Bindings::CInstance::invokeMethod): In a loop.
2305         (JSC::Bindings::CInstance::invokeDefaultMethod): Ditto.
2306         * bridge/objc/objc_instance.mm:
2307         (ObjcInstance::invokeObjcMethod): Ditto.
2308         (ObjcInstance::invokeDefaultMethod): Ditto.
2309
2310         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2311         * bindings/scripts/test/JS/JSTestObj.cpp:
2312         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2313         Updated.
2314
2315 2013-09-21  Jon Lee  <jonlee@apple.com>
2316
2317         Fix Obj-C bindings test expectations.
2318         Unreviewed.
2319
2320         Bindings tests failed with r156232, from https://bugs.webkit.org/show_bug.cgi?id=121745.
2321
2322         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2323         (-[DOMTestObj reflectedStringAttr]): Update test expectations.
2324
2325 2013-09-21  Andreas Kling  <akling@apple.com>
2326
2327         Node: FINAL-ize EventTarget overrides.
2328         <https://webkit.org/b/121748>
2329
2330         Reviewed by Darin Adler.
2331
2332         Mark the following Node functions FINAL:
2333
2334             - scriptExecutionContext()
2335             - eventTargetData()
2336             - ensureEventTargetData()
2337
2338         This devirtualizes a myriad of generated calls in the JSC bindings.
2339
2340 2013-09-21  Andreas Kling  <akling@apple.com>
2341
2342         Don't bloat Obj-C bindings with inlined attribute retrieval.
2343         <https://webkit.org/b/121745>
2344
2345         Reviewed by Anders Carlsson.
2346
2347         Hack bindings generator to always use getAttribute() for Objective-C.
2348         Reduces WebCore binary size by 25120 bytes.
2349
2350 2013-09-20  Darin Adler  <darin@apple.com>
2351
2352         Shink attribute event listener code
2353         https://bugs.webkit.org/show_bug.cgi?id=121735
2354
2355         Reviewed by Antti Koivisto.
2356
2357         * GNUmakefile.list.am: Eliminate ScriptEventListener source files.
2358         * Target.pri: Ditto.
2359         * UseJSC.cmake: Ditto.
2360         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2361         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2362         * WebCore.xcodeproj/project.pbxproj: Ditto.
2363         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
2364
2365         * bindings/js/JSDOMGlobalObject.h: Removed unneeded forward declarations
2366         of JSEventListener and JSLazyEventListener.
2367
2368         * bindings/js/JSLazyEventListener.cpp:
2369         (WebCore::JSLazyEventListener::JSLazyEventListener): Changed type to
2370         ContainerNode because the node pointer is only ever used for elements
2371         and documents.
2372         (WebCore::eventParameterName): Moved this function here from
2373         ScriptEventListener.cpp, but also rewrote to use NeverDestroyed.
2374         (WebCore::JSLazyEventListener::createForNode): Moved this function
2375         here from ScriptEventListener.cpp, cleaned up a bit.
2376         (WebCore::JSLazyEventListener::createForDOMWindow): Ditto.
2377
2378         * bindings/js/JSLazyEventListener.h: Replaced the old create function
2379         with two new create functions we can use directly. Also used some
2380         OVERRIDE, some FINAL, and a bit of WTF_DELETED_FUNCTION so we don't
2381         accidentally call create and create a non-lazy listener.
2382
2383         * bindings/js/ScriptEventListener.cpp: Removed.
2384         * bindings/js/ScriptEventListener.h: Removed.
2385
2386         * dom/ContainerNode.cpp:
2387         (WebCore::ContainerNode::setAttributeEventListener): Added.
2388         Calls JSLazyEventListener::createForNode and then calls the other
2389         overload of setAttributeEventListener, to obviate having more code
2390         at the call site.
2391         * dom/ContainerNode.h: Added overload of setAttributeEventListener
2392         for convenient use in Document and Element implementations.
2393
2394         * dom/Document.cpp:
2395         (WebCore::Document::prepareForDestruction): Use m_domWindow instead
2396         of the domWindow() function.
2397         (WebCore::Document::removeAllEventListeners): Ditto.
2398         (WebCore::Document::errorEventTarget): Ditto.
2399         (WebCore::Document::takeDOMWindowFrom): Ditto.
2400         (WebCore::Document::setWindowAttributeEventListener): Ditto. Also
2401         added an overload that calls JSLazyEventListener::createForDOMWindow.
2402         (WebCore::Document::getWindowAttributeEventListener): Use m_domWindow.
2403         (WebCore::Document::dispatchWindowEvent): Ditto.
2404         (WebCore::Document::dispatchWindowLoadEvent): Ditto.
2405         (WebCore::Document::enqueueWindowEvent): Ditto.
2406         (WebCore::Document::enqueuePopstateEvent): Ditto.
2407         * dom/Document.h: Added overload of setWindowAttributeEventListener.
2408
2409         * html/HTMLBodyElement.cpp: Removed unnneded include.
2410         (WebCore::HTMLBodyElement::parseAttribute): Removed all the calls to
2411         createAttributeEventListener, and use the setAttributeEventListener
2412         overloads instead.
2413         * html/HTMLButtonElement.cpp: Ditto.
2414         * html/HTMLElement.cpp:
2415         (WebCore::HTMLElement::parseAttribute): Ditto.
2416         * html/HTMLFormControlElement.cpp: Ditto.
2417         * html/HTMLFormElement.cpp: Ditto.
2418         * html/HTMLFrameElementBase.cpp:
2419         (WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
2420         * html/HTMLFrameSetElement.cpp:
2421         (WebCore::HTMLFrameSetElement::parseAttribute): Ditto.
2422         * html/HTMLImageElement.cpp:
2423         (WebCore::HTMLImageElement::parseAttribute): Ditto.
2424         * html/HTMLInputElement.cpp:
2425         (WebCore::HTMLInputElement::parseAttribute): Ditto.
2426         * html/HTMLLinkElement.cpp:
2427         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
2428         * html/HTMLMediaElement.cpp:
2429         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
2430         * html/HTMLObjectElement.cpp:
2431         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
2432         * html/HTMLScriptElement.cpp:
2433         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
2434         * html/HTMLSelectElement.cpp: Ditto.
2435         * html/HTMLStyleElement.cpp: Ditto.
2436         * html/HTMLTextFormControlElement.cpp: Ditto.
2437         * html/HTMLTrackElement.cpp: Ditto.
2438         * html/track/LoadableTextTrack.cpp: Ditto.
2439         * svg/SVGElement.cpp:
2440         (WebCore::SVGElement::parseAttribute): Ditto.
2441         * svg/SVGSVGElement.cpp:
2442         (WebCore::SVGSVGElement::parseAttribute): Ditto.
2443         * svg/SVGScriptElement.cpp:
2444         (WebCore::SVGScriptElement::parseAttribute): Ditto.
2445
2446         * inspector/InspectorDOMAgent.cpp:
2447         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2448         Moved the code here to dig inside a JSEventListener for things like
2449         the source location. This used to be spread across multiple function
2450         calls in ScriptEventListener.h, which were doing and redoing the same
2451         things, so better to just get it all at once.
2452
2453         * html/parser/XSSAuditor.cpp:
2454         (WebCore::XSSAuditor::init): Fixed "minium" typo.
2455
2456 2013-09-21  Anders Carlsson  <andersca@apple.com>
2457
2458         Don't store the "processing-instruction" string for PI tokens in the XPath parser
2459         https://bugs.webkit.org/show_bug.cgi?id=121746
2460
2461         Reviewed by Antti Koivisto.
2462
2463         For PI tokens, the string is always going to be "processing-instruction", and it's never used so we don't need to save it.
2464
2465         * xml/XPathGrammar.y:
2466         * xml/XPathParser.cpp:
2467         (Parser::nextTokenInternal):
2468         (Parser::lex):
2469
2470 2013-09-21  Patrick Gansterer  <paroga@webkit.org>
2471
2472         Handle windows lineendings in makeprop.pl after r155511
2473         https://bugs.webkit.org/show_bug.cgi?id=121740
2474
2475         Reviewed by Ryosuke Niwa.
2476
2477         Check for an optinal \r at the end of a line in regular expressions
2478         to make it work again on native windows machines which use CRLF.
2479
2480         * css/makeprop.pl:
2481
2482 2013-09-21  Andreas Kling  <akling@apple.com>
2483
2484         Re-inline some hot ElementData functions.
2485         <https://webkit.org/b/121743>
2486
2487         Reviewed by Antti Koivisto.
2488
2489         Make the following functions inline again:
2490
2491             - deref()
2492             - addAttribute()
2493             - removeAttribute()
2494             - attributeAt()
2495
2496         They were out-of-lined in r154249 and perf.webkit.org reports a 1.4%
2497         regression on the html5 spec for that revision. This'll hopefully steer
2498         the graph back in the right direction.
2499
2500 2013-09-21  Tim Horton  <timothy_horton@apple.com>
2501
2502         GeneratorGeneratedImage should be called GradientImage
2503         https://bugs.webkit.org/show_bug.cgi?id=121085
2504
2505         Reviewed by Simon Fraser.
2506
2507         No new tests, just a refactor.
2508
2509         r150053 removed the concept of a Generator, making GeneratorGeneratedImage
2510         take a Gradient. This leaves GeneratorGeneratedImage's name not making a
2511         whole lot of sense, so let's rename it to GradientImage.
2512
2513         * CMakeLists.txt:
2514         * GNUmakefile.list.am:
2515         * Target.pri:
2516         * WebCore.vcxproj/WebCore.vcxproj:
2517         * WebCore.vcxproj/WebCore.vcxproj.filters:
2518         * WebCore.xcodeproj/project.pbxproj:
2519         * css/CSSGradientValue.cpp:
2520         (WebCore::CSSGradientValue::image):
2521         * platform/graphics/BitmapImage.h:
2522         * platform/graphics/GradientImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp.
2523         (WebCore::GradientImage::draw):
2524         (WebCore::GradientImage::drawPattern):
2525         * platform/graphics/GradientImage.h: Renamed from Source/WebCore/platform/graphics/GeneratorGeneratedImage.h.
2526         * platform/graphics/Image.h:
2527         * platform/graphics/ImageBuffer.h:
2528         Rename.
2529
2530         * css/CSSImageGeneratorValue.cpp:
2531         (WebCore::CSSImageGeneratorValue::cachedImageForSize):
2532         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
2533         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
2534         * css/CSSImageGeneratorValue.h:
2535         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image):
2536         Drive-by, the CSSImageGeneratorValue generated image cache should be
2537         in terms of GeneratedImage, not a random subclass, regardless
2538         of the fact that it's only used for GradientImage as of yet.
2539
2540 2013-09-21  Darin Adler  <darin@apple.com>
2541
2542         Shrink valueForBasicShape by removing repeated calls to cssValuePool()
2543         https://bugs.webkit.org/show_bug.cgi?id=121736
2544
2545         Reviewed by Sam Weinig.
2546
2547         * css/BasicShapeFunctions.cpp:
2548         (WebCore::valueForBasicShape): Put the pool into a local variable and use that.
2549
2550 2013-09-20  Darin Adler  <darin@apple.com>
2551
2552         Another CSS parser leak fix
2553         https://bugs.webkit.org/show_bug.cgi?id=121730
2554
2555         Reviewed by Alexey Proskuryakov.
2556
2557         * css/CSSGrammar.y.in: Added a missing adoptPtr.
2558
2559 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
2560
2561         Handle panning gestures messages properly on Windows
2562         https://bugs.webkit.org/show_bug.cgi?id=121711
2563
2564         Follow-up fix: five regression tests started to crash on Mac.
2565
2566         Reviewed by Anders Carlsson.
2567
2568         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollByRecursively):
2569         Added null checks, not all callers are interested in scrolled view pointer.
2570
2571 2013-09-20  Ryosuke Niwa  <rniwa@webkit.org>
2572
2573         Bad cast from CSSInitialValue to CSSValueList
2574         https://bugs.webkit.org/show_bug.cgi?id=121729
2575
2576         Reviewed by Beth Dakin.
2577
2578         Merge https://chromium.googlesource.com/chromium/blink/+/fcfaa51f9207b32cffe751c1a1380a921e464cbb
2579
2580         The issue was that we would cast to CSSValueList without checking
2581         the type of the CSSValue. After this change, we use the ASSERT'ing
2582         cast and explicitly check the type of the CSSValue before the cast.
2583
2584         Test: fast/css/crash-inherit-value-font-family.html
2585
2586         * css/CSSParser.cpp:
2587         (WebCore::CSSParser::parseFontFaceValue):
2588
2589 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
2590
2591         Remove includes from LineWidth.h
2592         https://bugs.webkit.org/show_bug.cgi?id=121716
2593
2594         Reviewed by Darin Adler.
2595
2596         In r156197 I removed logicalLineHeight from LineWidth.h, so we don't need to include RenderBlock.h
2597         and RenderRubyRun.h anymore in LineWidth.h.
2598
2599         No new tests, no behavior change.
2600
2601         * rendering/LineWidth.cpp:
2602         * rendering/LineWidth.h:
2603
2604 2013-09-20  Roger Fong  <roger_fong@apple.com>
2605
2606         Handle panning gestures messages properly on Windows.
2607         https://bugs.webkit.org/show_bug.cgi?id=121711.
2608
2609         Reviewed by Brent Fulgham.
2610
2611         This is needed by the Windows port to keep track to determine whether or not
2612         we need to overpan.
2613
2614         No new functionality added.
2615
2616         * rendering/RenderLayer.cpp:
2617         (WebCore::RenderLayer::scrollByRecursively):
2618         * rendering/RenderLayer.h: 
2619         Added an argument to keep track of which scrollview was actually scrolled
2620
2621 2013-09-20  Alexandru Chiculita  <achicu@adobe.com>
2622
2623         Web Inspector: [CSS Regions] Display CSS Regions chain when highlighting a CSS Region node
2624         https://bugs.webkit.org/show_bug.cgi?id=121719
2625
2626         Reviewed by Joseph Pecoraro.
2627
2628         Test: inspector/elements/highlight-node-regions.html
2629
2630         When a CSS Region node is highlighted through the WebInspector, it will also lookup all the regions
2631         that are part of the same flow and inject enough information into InspectorOverlayPage.js to get the other
2632         CSS Regions highlighted as well. A chain will also link the regions and a number will display the ordering
2633         of the content.
2634
2635         * WebCore.exp.in:
2636         * inspector/InspectorController.cpp:
2637         (WebCore::InspectorController::buildObjectForHighlightedNode):
2638         * inspector/InspectorController.h:
2639         * inspector/InspectorOverlay.cpp:
2640         (WebCore::buildObjectForRegionHighlight):
2641         (WebCore::buildObjectForCSSRegionsHighlight):
2642         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
2643         (WebCore::InspectorOverlay::drawNodeHighlight): Separated the InspectorObject building part out of this function,
2644         so that we can call buildObjectForHighlightedNode from the Internals APIs for testing.
2645         * inspector/InspectorOverlay.h:
2646         * inspector/InspectorOverlayPage.js:
2647         (_drawRegionNumber):
2648         (_quadMidPoint):
2649         (_drawRegionLink):
2650         (_fixQuadScrollPosition):
2651         (_drawRegionsHighlight):
2652         (drawNodeHighlight):
2653         * testing/Internals.cpp: Exposed the generated InspectorObject to the layout test.
2654         (WebCore::Internals::inspectorHighlightObject):
2655         * testing/Internals.h:
2656         * testing/Internals.idl:
2657
2658 2013-09-20  Commit Queue  <commit-queue@webkit.org>
2659
2660         Unreviewed, rolling out r156185.
2661         http://trac.webkit.org/changeset/156185
2662         https://bugs.webkit.org/show_bug.cgi?id=121727
2663
2664         Caused a lot of crashes in tests (Requested by ap on #webkit).
2665
2666         * dom/Document.cpp:
2667         (WebCore::Document::Document):
2668         (WebCore::Document::recalcStyle):
2669         (WebCore::Document::updateLayout):
2670         * dom/Document.h:
2671
2672 2013-09-20  Dean Jackson  <dino@apple.com>
2673
2674         Shaders that fail to compile should be marked as such
2675         https://bugs.webkit.org/show_bug.cgi?id=121721
2676
2677         Reviewed by Simon Fraser.
2678
2679         1. Add a new logging channel for WebGL.
2680
2681         2. If a translated shader fails to compile (technically
2682         this should never happen), mark it as invalid.
2683
2684         Test: https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shader-with-non-reserved-words.html
2685
2686         * platform/Logging.h: New WebGL channel.
2687         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2688         (WebCore::GraphicsContext3D::compileShader): Log the raw and translated
2689         input to glCompileShader, but mark the entry as invalid.
2690
2691 2013-09-20  Mario Sanchez Prada  <mario.prada@samsung.com>
2692
2693         [ATK] Do not expose aria-help in ATK based platforms
2694         https://bugs.webkit.org/show_bug.cgi?id=121675
2695
2696         Reviewed by Chris Fleizach.
2697
2698         Stop exposing the value for the 'aria-help' attribute as an
2699         AtkObject attribute, based in AccessibilityObject::helpText().
2700
2701         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2702         (webkitAccessibleGetAttributes): Remove the mapping.
2703
2704 2013-09-20  Simon Fraser  <simon.fraser@apple.com>
2705
2706         Scrollbars don't appear on long pages after r155660
2707         https://bugs.webkit.org/show_bug.cgi?id=121714
2708         <rdar://problem/15042478>
2709
2710         Reviewed by Beth Dakin.
2711         
2712         After r155660, we don't do any additional layouts when scrollbars are 
2713         added or removed. That caused us to not enter the code that creates or
2714         destroys composting layers for scrollbars in RenderLayerCompositor, resulting
2715         in missing scrollbars.
2716         
2717         Fix by having ScrollView::updateScrollbars() call addedOrRemovedScrollbar()
2718         when a scrollbar was added or removed, which is overridden in FrameView
2719         to call through to RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars().
2720
2721         Not testable since scrollbar layers aren't contained in layer tree dumps
2722         (to reduce diffs between platforms).
2723
2724         * page/FrameView.cpp:
2725         (WebCore::FrameView::addedOrRemovedScrollbar): New function to tell the compositor
2726         that scrollbars changed.
2727         * page/FrameView.h:
2728         * platform/ScrollView.cpp:
2729         (WebCore::ScrollView::setHasHorizontalScrollbar): Change the meaning of the return
2730         value to say if the scrollbar was added or removed. Add an out param that indicates
2731         whether the scrollbar change affects content size (not true for overlay scrollbars).
2732         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
2733         (WebCore::ScrollView::updateScrollbars): Keep track of whether scrollbars were
2734         added or removed, and call addedOrRemovedScrollbar() if true.
2735         * platform/ScrollView.h:
2736         * rendering/RenderLayerCompositor.cpp:
2737         (WebCore::RenderLayerCompositor::frameViewDidAddOrRemoveScrollbars): Call updateOverflowControlsLayers().
2738         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2739         * rendering/RenderLayerCompositor.h:
2740
2741 2013-09-20  Simon Fraser  <simon.fraser@apple.com>
2742
2743         Ensure that TileController tile coverage is updated on scrolling even when we don't have scrollbars
2744         https://bugs.webkit.org/show_bug.cgi?id=121700
2745         <rdar://problem/15030589>
2746
2747         Reviewed by Dean Jackson.
2748
2749         r155660 introduced a bug where we wouldn't make scrollbars on long pages. However,
2750         that revealed a fundamental flaw in the TiledBacking update logic; it relied on the
2751         GraphicsLayer flushes triggered by scrollbars updates in order to update the main
2752         TileController's tile coverage. No scrollbars meant no tile coverage updates.
2753         
2754         Fix by explicitly triggering a flush when the FrameView is scrolled (we get
2755         notified about this on the main thread after the scrolling thread has moved
2756         layers around).
2757         
2758         No test since this will only be exposed for a short time while scrollbars are
2759         broken.
2760
2761         * rendering/RenderLayerCompositor.cpp:
2762         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2763
2764 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
2765
2766         Refactoring LineBreaker and RenderTextInfo out of RenderBlock.h
2767         https://bugs.webkit.org/show_bug.cgi?id=121707
2768
2769         Reviewed by David Hyatt.
2770
2771         LineBreaker and RenderTextInfo are defined in RenderBlock.h, but only used in RenderBlockLineLayout.cpp.
2772         Moving them there (LineBreaker needs to be a friend class of RenderBlock) in the first step in the process
2773         of refactoring LineBreaker::NextSegmentBreak into more manageable chunks.
2774
2775         This change was reviewed and landed in Blink:
2776         https://src.chromium.org/viewvc/blink?revision=157402&view=revision
2777
2778         No new tests.
2779
2780         * rendering/RenderBlock.h:
2781         * rendering/RenderBlockLineLayout.cpp:
2782         (WebCore::LineBreaker::LineBreaker):
2783         (WebCore::LineBreaker::lineWasHyphenated):
2784         (WebCore::LineBreaker::positionedObjects):
2785         (WebCore::LineBreaker::clear):
2786         (WebCore::RenderTextInfo::RenderTextInfo):
2787         (WebCore::RenderTextInfo::~RenderTextInfo):
2788         (WebCore::LineBreaker::skipTrailingWhitespace):
2789         (WebCore::LineBreaker::skipLeadingWhitespace):
2790         (WebCore::LineBreaker::reset):
2791         (WebCore::LineBreaker::nextLineBreak):
2792         (WebCore::LineBreaker::nextSegmentBreak):
2793
2794 2013-09-20  Zoltan Horvath  <zoltan@webkit.org>
2795
2796         Move logicalHeightForLine out of LineWidth.h
2797         https://bugs.webkit.org/show_bug.cgi?id=121575
2798
2799         Reviewed by David Hyatt.
2800
2801         In bug #121107 (r155565), I moved logicalHeightForLine into LineWidth.h as part of LineWidth
2802         refactoring. LogicalHeightForLine without passing the second parameter uses RenderBlock::lineHeight
2803         anyway, except it doesn't take -line-box-contain CSS property into account. For Shapes we don't
2804         have implementation for variable-height lines (https://bugs.webkit.org/show_bug.cgi?id=95361) yet, so
2805         so I modified the affected functions to call lineHeight directly. I renamed logicalHeightForLine
2806         to minLineHeightForReplacedRenderer, and I made the second parameter a mandatory for that function.
2807
2808         No new tests, no behavior change.
2809
2810         * rendering/LineWidth.cpp:
2811         (WebCore::LineWidth::updateAvailableWidth):
2812         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2813         * rendering/LineWidth.h:
2814         * rendering/RenderBlock.cpp: Move the definition here.
2815         (WebCore::RenderBlock::minLineHeightForReplacedRenderer):
2816         * rendering/RenderBlock.h: Move the function here and rename it.
2817         * rendering/RenderBlockLineLayout.cpp:
2818         (WebCore::RenderBlock::layoutShapeInsideInfo):
2819         (WebCore::updateLogicalInlinePositions):
2820         (WebCore::updateSegmentsForShapes):
2821
2822 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
2823
2824         -[WebHTMLConveter _getFloat:forNode:property:] leaks
2825         https://bugs.webkit.org/show_bug.cgi?id=121709
2826
2827         Reviewed by Enrica Casucci.
2828
2829         * platform/mac/HTMLConverter.mm:
2830         (-[WebHTMLConverter _getFloat:forNode:property:]): Don't leak.
2831
2832 2013-09-20  Yongjun Zhang  <yongjun_zhang@apple.com>
2833
2834         Add an argument to ImageSource::createFrameAtIndex to hint a decoder that we expect a scaled image.
2835         https://bugs.webkit.org/show_bug.cgi?id=121696
2836
2837         Reviewed by Antti Koivisto.
2838
2839         Add an argument to ImageSource::createFrameAtIndex.  A platform image decoder can decide the optimal
2840         scale based on the hint and pass the real scale it used for decoding.
2841
2842         No new tests, no behavior change.
2843
2844         * platform/graphics/ImageSource.cpp:
2845         (WebCore::ImageSource::createFrameAtIndex):
2846         * platform/graphics/ImageSource.h:
2847         * platform/graphics/cg/ImageSourceCG.cpp:
2848         (WebCore::ImageSource::createFrameAtIndex):
2849
2850 2013-09-20  Andreas Kling  <akling@apple.com>
2851
2852         Make JSMainThreadNullState noncopyable.
2853
2854         Blindly rubber-stamped by Antti Koivisto.
2855
2856         * bindings/js/JSMainThreadExecState.h:
2857
2858 2013-09-20  Dan Bernstein  <mitz@apple.com>
2859
2860         Make extract-localizable-strings available to WebCore clients
2861         https://bugs.webkit.org/show_bug.cgi?id=121699
2862
2863         Reviewed by Darin Adler.
2864
2865         * WebCore.xcodeproj/project.pbxproj: Added a Scripts group with a reference to
2866         extract-localizable-strings.pl. Added a Copy Scripts build phase to the WebCore target that
2867         copies the script into PrivateHeaders/Scripts in the framework.
2868         * extract-localizable-strings.pl: Copied from Tools/Scripts/extract-localizable-strings.
2869
2870 2013-09-20  Antti Koivisto  <antti@apple.com>
2871
2872         Move layer hierarchy functions from RenderObject to RenderElement
2873         https://bugs.webkit.org/show_bug.cgi?id=121692
2874
2875         Reviewed by Andreas Kling.
2876
2877         * rendering/RenderElement.cpp:
2878         (WebCore::RenderElement::addLayers):
2879         (WebCore::RenderElement::removeLayers):
2880         (WebCore::RenderElement::moveLayers):
2881         (WebCore::RenderElement::findNextLayer):
2882         (WebCore::RenderElement::layerCreationAllowedForSubtree):
2883         
2884             Move these from RenderObject.
2885
2886         (WebCore::RenderElement::insertedIntoTree):
2887         (WebCore::RenderElement::willBeRemovedFromTree):
2888         
2889             Factor the layer related portion of these virtuals here.
2890
2891 2013-09-20  Benjamin Poulain  <benjamin@webkit.org>
2892
2893         Start cleaning the API of SelectorChecker
2894         https://bugs.webkit.org/show_bug.cgi?id=121654
2895
2896         Reviewed by Antti Koivisto.
2897
2898         Make the matching mode internal.
2899         Remove unused accessors.
2900         Make isFrameFocused() internal.
2901
2902         * css/ElementRuleCollector.cpp:
2903         (WebCore::ElementRuleCollector::ruleMatches):
2904         * css/SelectorChecker.cpp:
2905         (WebCore::SelectorChecker::matchRecursively):
2906         (WebCore::SelectorChecker::checkOne):
2907         (WebCore::isFrameFocused):
2908         * css/SelectorChecker.h:
2909         (WebCore::SelectorChecker::match):
2910         * css/StyleResolver.h:
2911         (WebCore::checkRegionSelector):
2912         * dom/SelectorQuery.cpp:
2913         (WebCore::SelectorDataList::selectorMatches):
2914
2915 2013-09-20  Benjamin Poulain  <benjamin@webkit.org>
2916
2917         Remove SelectorChecker's CrossesBoundary boundary mode
2918         https://bugs.webkit.org/show_bug.cgi?id=121653
2919
2920         Reviewed by Antti Koivisto.
2921
2922         This mode is an ancient vestige of shadow dom.
2923
2924         * css/SelectorChecker.cpp:
2925         (WebCore::SelectorChecker::match):
2926         (WebCore::SelectorChecker::checkOne):
2927         * css/SelectorChecker.h:
2928
2929 2013-09-20  Benjamin Poulain  <benjamin@webkit.org>
2930
2931         Move the SharingRules mode outside of SelectorChecker
2932         https://bugs.webkit.org/show_bug.cgi?id=121652
2933
2934         Reviewed by Antti Koivisto.
2935
2936         The SharingRules handling inside SelectorChecker is a weird hack
2937         to hit a specific branch of ElementRuleCollector.
2938
2939         This patch moves the exception to ElementRuleCollector, where it is easier
2940         to understand what it is for.
2941
2942         * css/ElementRuleCollector.cpp:
2943         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2944         * css/SelectorChecker.cpp:
2945         (WebCore::SelectorChecker::match):
2946
2947 2013-09-20  Yoav Weiss  <yoav@yoav.ws>
2948
2949         Fixed img src URLS with multiple spaces
2950         https://bugs.webkit.org/show_bug.cgi?id=121592
2951
2952         Reviewed by Darin Adler.
2953
2954         Test: fast/loader/image-src-multiple-space.html
2955
2956         I've removed the simplifyWhiteSpace step from HTMLImageElement's src attribute during the srcset selection algorithm.
2957         That step prevented URLs with multiple spaces from being loaded as images, minimizing the multiple spaces into a single one.
2958
2959         * html/parser/HTMLParserIdioms.cpp:
2960         (WebCore::bestFitSourceForImageAttributes):
2961
2962 2013-09-20  Arunprasad Rajkumar  <ararunprasad@gmail.com>
2963
2964         Hiding a focused element should unfocus it and fire a blur event
2965         https://bugs.webkit.org/show_bug.cgi?id=29241
2966
2967         Reviewed by Darin Adler.
2968
2969         Test: fast/dom/HTMLDocument/active-element-gets-unfocusable.html
2970
2971         We check whether the current focus element is really focusable after
2972         the style recalculation and layout change. If it is not focusable then schedule a
2973         timer to reset it asynchronously.
2974
2975         * dom/Document.cpp:
2976         (WebCore::Document::Document):
2977         (WebCore::Document::recalcStyle): Check isFocusable() on the focus element after
2978         style recalculation.
2979         (WebCore::Document::updateLayout): Check isFocusable() on the focus element after
2980         layout.
2981         (WebCore::Document::resetHiddenFocusElementSoon):
2982         (WebCore::Document::resetHiddenFocusElementTimer):
2983         * dom/Document.h:
2984
2985 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
2986
2987         REGRESSION (r156140): Srcset tests are frequently crashing
2988         https://bugs.webkit.org/show_bug.cgi?id=121695
2989
2990         Reviewed by Dean Jackson.
2991
2992         Returning a string created without copying bytes is not safe. It used to be OK
2993         because a new string was immediately created by decodeURLEscapeSequences().
2994         But even that was not great, because decodeURLEscapeSequences() could potentially
2995         return the same string, not a deep copy, if we decided to optimize it like that.
2996
2997         Also made a number of drive-by style fixes.
2998         - It's URL, not Url.
2999         - It's srcset, not srcSet.
3000         -  We don't add ".0" in floating point value initializers. It's particularly misleading
3001         to initialize a float with 1.0, which is a double value.
3002         - Renamed srcSetLength to srcsetAttributeLength to match srcsetAttribute variable
3003         whose length it caches.
3004
3005         * html/parser/HTMLParserIdioms.cpp:
3006         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
3007         (WebCore::bestFitSourceForImageAttributes):
3008
3009 2013-09-19  Martin Robinson  <mrobinson@igalia.com>
3010
3011         [GTK] Clean up the Skip* functions in the GObject DOM bindings code generator
3012         https://bugs.webkit.org/show_bug.cgi?id=121633
3013
3014         Reviewed by Gustavo Noronha Silva.
3015
3016         * bindings/scripts/CodeGeneratorGObject.pm:
3017         (SkipAttribute): Fold in some skipping checks that are used by all callers.
3018         (SkipFunction): Ditto.
3019         (GenerateProperties): Rely on SkipAttribute more thoroughly.
3020         (GenerateFunction): Rely on SkipFunction more thoroughly.
3021         (GenerateFunctions): Rely on SkipAttribute more thoroughly.
3022
3023 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
3024
3025         Fix the build after r156144
3026
3027         * html/canvas/CanvasRenderingContext2D.cpp: Added missing include.
3028
3029 2013-09-20  Ryosuke Niwa  <rniwa@webkit.org>
3030
3031         renderStyleOfEnclosingTextNode should update style before using a renderer
3032         https://bugs.webkit.org/show_bug.cgi?id=121690
3033
3034         Reviewed by Enrica Casucci.
3035
3036         Merge https://chromium.googlesource.com/chromium/blink/+/65f089545e8c18cb268dfcbe56cba1cd8045527a
3037
3038         When accessing a renderer editing should always make sure that the style has been updated for the node.
3039         Editing calls splitTextNode in a number of places and then accesses the renderer later. This patch is
3040         the first of many to make sure editing always updates the style before attempting to access the renderer
3041         (or style) of a node after calling a mutation method.
3042
3043         * editing/ApplyBlockElementCommand.cpp:
3044         (WebCore::ApplyBlockElementCommand::renderStyleOfEnclosingTextNode):
3045         * editing/ApplyBlockElementCommand.h:
3046
3047 2013-09-20  Darin Adler  <darin@apple.com>
3048
3049         Fix a couple more CSS leaks
3050         https://bugs.webkit.org/show_bug.cgi?id=121683
3051
3052         Reviewed by Alexey Proskuryakov.
3053
3054         * css/CSSDefaultStyleSheets.cpp:
3055         (WebCore::CSSDefaultStyleSheets::viewSourceStyle): Put the result of the
3056         parseUASheet into a global variable so it doesn't show up as a storage leak.
3057
3058         * css/CSSGrammar.y.in: Added a missing adoptRef. This was leaking any rule
3059         we parsed individually.
3060
3061 2013-09-20  Bem Jones-Bey  <bjonesbe@adobe.com>
3062
3063         Simplify the ShapeOutsideInfo and ShapeInfo interfaces
3064         https://bugs.webkit.org/show_bug.cgi?id=121685
3065
3066         Reviewed by Darin Adler.
3067
3068         With the creation ShapeInfo::computeSegmentsForLine, it became possible to
3069         simplify the ShapeInfo classes. ShapeOutsideInfo has no need to save the
3070         segments, and now that segment creation is in its own method, it doesn't have
3071         to save the segments anymore. This also simplifies the public interface of
3072         ShapeOutsideInfo, as it only has one method to do the computation.
3073
3074         Also, the methods in ShapeOutsideInfo have been renamed to reflect the fact
3075         that ShapeOutsideInfo isn't really interested in segments.
3076
3077         No new tests, no new behavior.
3078
3079         * rendering/FloatingObjects.cpp:
3080         (WebCore::FloatingObjects::logicalLeftOffset):
3081         (WebCore::FloatingObjects::logicalRightOffset):
3082         * rendering/LineWidth.cpp:
3083         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
3084         * rendering/shapes/ShapeInfo.cpp:
3085         * rendering/shapes/ShapeInfo.h:
3086         * rendering/shapes/ShapeInsideInfo.h:
3087         * rendering/shapes/ShapeOutsideInfo.cpp:
3088         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
3089         * rendering/shapes/ShapeOutsideInfo.h:
3090
3091 2013-09-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3092
3093         Making tests added in r156157 JS-only, given that other
3094         code generators are still broken.
3095
3096         Original bug 121305 (StrictTypeChecking extended attribute fails for methods with sequence<T>).
3097         https://bugs.webkit.org/show_bug.cgi?id=121305
3098
3099         Rubber stamped by Alexey Proskuryakov.
3100
3101         * bindings/scripts/test/TestObj.idl:
3102
3103 2013-09-20  Jacky Jiang  <zhajiang@blackberry.com>
3104
3105         [BlackBerry] Poor rendering opening a Google map short link
3106         https://bugs.webkit.org/show_bug.cgi?id=121687
3107
3108         Reviewed by Yong Li.
3109         Internally reviewed by Arvid Nilsson.
3110
3111         JIRA 495023
3112         Route lines on google map were shown even they were on a hidden canvas.
3113         Include visibility on LayerWebKitThread if it's a canvas layer and respect
3114         the visibility when compositing layers in LayerRenderer.
3115
3116         * platform/graphics/blackberry/LayerData.h:
3117         (WebCore::LayerData::isCanvasLayer):
3118         (WebCore::LayerData::isVisible):
3119         (WebCore::LayerData::includeVisibility):
3120         * platform/graphics/blackberry/LayerRenderer.cpp:
3121         (WebCore::LayerRenderer::compositeLayersRecursive):
3122
3123 2013-09-20  Sam White  <samuel_white@apple.com>
3124
3125         AX: WebArea claims to have a subrole, but always returns nil.
3126         https://bugs.webkit.org/show_bug.cgi?id=121658
3127
3128         Reviewed by Chris Fleizach.
3129
3130         No new tests, updated existing AXWebArea related test to reflect unused attribute removal.
3131
3132         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3133         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3134
3135 2013-09-20  Andreas Kling  <akling@apple.com>
3136
3137         Add valueForLength/minimumValueForLength wrappers to RenderElement.
3138         <https://webkit.org/b/121676>
3139
3140         Reviewed by Antti Koivisto.
3141
3142         Add two inline wrappers for these functions so we don't have to pass
3143         the RenderView everywhere.
3144
3145 2013-09-20  Martin Robinson  <mrobinson@igalia.com>
3146
3147         [GTK] Fix some small style issues in the bindings
3148         https://bugs.webkit.org/show_bug.cgi?id=121613
3149
3150         Reviewed by Carlos Garcia Campos.
3151
3152         * bindings/scripts/CodeGeneratorGObject.pm: When printing the license
3153         header use the more common comment style within the WebKit project.
3154         (GenerateProperty): Indent property definitions according to WebKit style, improve
3155         the nick and blurb properties, and improve the various parameter spec argument layout.
3156         (GenerateFunction): Remove the newline from function signatures to match WebKit style.
3157         * bindings/scripts/test/GObject: Update bindings test results.
3158
3159 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
3160
3161         [CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines
3162         https://bugs.webkit.org/show_bug.cgi?id=121672
3163
3164         Reviewed by Gyuyoung Kim.
3165
3166         Since the scope of add_definitions() is always a whole file, we need to use
3167         target properties instead to set definitions only for specific targets.
3168
3169         * CMakeLists.txt:
3170
3171 2013-09-18  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3172
3173         Make "autoscroll for drag'n drop" a setting
3174         https://bugs.webkit.org/show_bug.cgi?id=121559
3175
3176         Reviewed by Ryosuke Niwa.
3177
3178         Currently, there is a ChromeClient hook to make the
3179         feature opt'ed-in or out. That makes it harder to test the
3180         feature on ports that do not enable it, e.g. Mac/WebKit2 port.
3181         However, Mac/WebKit2 is the port that has the best drag'n drop
3182         WTR implementation.
3183
3184         Patch changes the toggle on/off mechanism to be a setting,
3185         and exposes it through InternalSetting interface for testing.
3186
3187         * page/AutoscrollController.cpp:
3188         (WebCore::AutoscrollController::updateDragAndDrop):
3189         * page/ChromeClient.h:
3190         * page/Settings.in:
3191         * testing/InternalSettings.cpp:
3192         (WebCore::InternalSettings::Backup::Backup):
3193         (WebCore::InternalSettings::Backup::restoreTo):
3194         (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled):
3195         * testing/InternalSettings.h:
3196         * testing/InternalSettings.idl:
3197
3198 2013-09-16  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3199
3200         StrictTypeChecking extended attribute fails for methods with sequence<T>
3201         https://bugs.webkit.org/show_bug.cgi?id=121305
3202
3203         Reviewed by Darin Adler.
3204
3205         The extended attribute StrictTypeChecking can not be set to methods if
3206         one of the parameters is a "sequence".
3207         Basically, since "sequence" is not considered a native type
3208         (see function IsNativeType) the Perl code generator tries to
3209         include its supposedly associated header, in this case "JSsequence.h"
3210         Compilation then fails.
3211
3212         It is a problem for bindings including WebGL, where all methods
3213         are supposed to be set as StrictTypeChecking (see bug 44202 [1]). Due to this restriction,
3214         it relaxed, but I would like to bring it back.
3215
3216         Patch fixes the issue by hardening the way includes are auto-added
3217         for methods where StrictTypeChecking extended attribute is present.
3218         Now, only wrapper types (see IsWrapperType) trigger header inclusion,
3219         excluding arrays, sequences, basic types, etc.
3220
3221         [1] https://bugs.webkit.org/show_bug.cgi?id=44202
3222
3223         * bindings/scripts/CodeGeneratorJS.pm:
3224         (GenerateParametersCheck):
3225         * bindings/scripts/test/JS/JSTestObj.cpp:
3226         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
3227         * bindings/scripts/test/JS/JSTestObj.h:
3228         * bindings/scripts/test/TestObj.idl:
3229
3230 2013-09-20  Andreas Kling  <akling@apple.com>
3231
3232         Optimize fetching the Node for never-anonymous renderers.
3233         <https://webkit.org/b/121627>
3234
3235         Reviewed by Antti Koivisto.
3236
3237         Add a RenderObject::nodeForNonAnonymous() that can be used instead
3238         of node() when a renderer is guaranteed non-anonymous.
3239
3240         Use this to implement reference element getters for the various
3241         renderers that are known at compile-time to correspond to a DOM node.
3242
3243         Also renamed existingElement() => element() since using an alternate
3244         name for a reference overload isn't actually necessary.
3245
3246 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
3247
3248         Remove duplicated secondsPerDay variables
3249         https://bugs.webkit.org/show_bug.cgi?id=121601
3250
3251         Reviewed by Andreas Kling.
3252
3253         Use secondsPerDay from DateMath.h instead of defining it again.
3254
3255         * history/HistoryItem.cpp:
3256         (WebCore::timeToDay):
3257
3258 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
3259
3260         Fix duplicated loop variable names after r155743
3261         https://bugs.webkit.org/show_bug.cgi?id=121667
3262
3263         Reviewed by Andreas Kling.
3264
3265         Do not use the same name for variables in nested loops to fix a compiler warning.
3266
3267         * page/animation/CSSPropertyAnimation.cpp:
3268         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3269
3270 2013-09-20  Antti Koivisto  <antti@apple.com>
3271
3272         Make RenderObject::parent() return RenderElement
3273         https://bugs.webkit.org/show_bug.cgi?id=121671
3274
3275         Reviewed by Andreas Kling.
3276
3277         Make RenderObject::parent() return RenderElement and adopt everywhere.
3278         Moved addChild/removeChild from RenderObject to RenderElement.
3279         Uninlined a few big RenderObject functions.
3280         Renamed RenderObject::remove() -> RenderObject::removeFromParent()
3281
3282 2013-09-20  Csaba Osztrogon√°c  <ossy@webkit.org>
3283
3284         Buildfix after r156133 for !ENABLE(WORKERS) platforms
3285         https://bugs.webkit.org/show_bug.cgi?id=121669
3286
3287         Reviewed by Antti Koivisto.
3288
3289         * platform/ThreadGlobalData.cpp:
3290         * platform/ThreadGlobalData.h:
3291
3292 2013-09-20  Antti Koivisto  <antti@apple.com>
3293
3294         Make createRenderer() return RenderElement
3295         https://bugs.webkit.org/show_bug.cgi?id=121666
3296
3297         Rubber-stamped by Andreas Kling.
3298         
3299         Tighter typing.
3300
3301 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
3302
3303         Buildfix for ENABLE(CSS_FILTERS) && !ENABLE(ACCELERATED_COMPOSITING) after r155131.
3304
3305         * rendering/RenderLayer.cpp:
3306         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
3307
3308 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
3309
3310         [WIN] Fix build without precompiled header after r154146.
3311
3312         * platform/win/WebCoreBundleWin.cpp:
3313
3314 2013-09-20  Antti Koivisto  <antti@apple.com>
3315
3316         Add covariant RenderElement* Element::renderer()
3317         https://bugs.webkit.org/show_bug.cgi?id=121638
3318
3319         Reviewed by Andreas Kling.
3320
3321         Also add isRenderElement() test and casting functions.
3322
3323 2013-09-19  Anders Carlsson  <andersca@apple.com>
3324
3325         Handle null font families.
3326
3327         Reviewed by Darin Adler.
3328
3329         * platform/graphics/Font.cpp:
3330         (WebCore::computeFontGlyphsCacheHash):
3331         Don't crash when trying to hash null strings.
3332
3333 2013-09-19  Darin Adler  <darin@apple.com>
3334
3335         Fix a couple mistakes in my recent CSS grammar leak patch
3336         https://bugs.webkit.org/show_bug.cgi?id=121659
3337
3338         Reviewed by Alexey Proskuryakov.
3339
3340         * css/CSSGrammar.y.in: Added initialization to nullptr for some error cases
3341         that were otherwise leaving a bad value for the result of the production.
3342         Also fixed a reversed logical expression.
3343
3344 2013-09-19  Yoav Weiss  <yoav@yoav.ws>
3345
3346         Remove URL decoding in srcset handling
3347         https://bugs.webkit.org/show_bug.cgi?id=121609
3348
3349         Reviewed by Benjamin Poulain.
3350
3351         Tests: fast/hidpi/image-srcset-question-mark.html
3352                fast/loader/image-src-question-mark.html
3353
3354         Removed URL decoding from src and srcset's handling algorithm, since they break encoded URLS.
3355
3356         * html/parser/HTMLParserIdioms.cpp:
3357         (WebCore::parseImagesWithScaleFromSrcSetAttribute):
3358         (WebCore::bestFitSourceForImageAttributes):
3359
3360 2013-09-19  Anders Carlsson  <andersca@apple.com>
3361
3362         Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
3363         https://bugs.webkit.org/show_bug.cgi?id=121656
3364
3365         Reviewed by Darin Adler.
3366
3367         Instead of lower casing AtomicStrings, store the strings as is and use the case folding
3368         hash and case insensitive compare to determine equality.
3369
3370         * platform/graphics/Font.cpp:
3371         (WebCore::operator==):
3372         (WebCore::makeFontGlyphsCacheKey):
3373         (WebCore::computeFontGlyphsCacheHash):
3374
3375 2013-09-19  Darin Adler  <darin@apple.com>
3376
3377         Fix leaks in CSS parser caused by overwriting owned raw pointers with 0
3378         https://bugs.webkit.org/show_bug.cgi?id=121655
3379
3380         Reviewed by Anders Carlsson.
3381
3382         * css/CSSGrammar.y.in: Use nullptr instead of 0. Use unique_ptr instead
3383         of a raw pointer in cases where we might or might not actually keep
3384         the allocated memory. This can still be cleaned up further, but this
3385         should fix the memory leaks we have been seeing.
3386
3387 2013-09-19  Eric Carlson  <eric.carlson@apple.com>
3388
3389         MediaStream API: update MediaStreamTrackEvent object to match spec
3390         https://bugs.webkit.org/show_bug.cgi?id=121624
3391
3392         Reviewed by Dean Jackson.
3393
3394         Test: fast/mediastream/MediaStreamTrackEvent-constructor.html
3395
3396         * Modules/mediastream/MediaStreamTrack.idl: Remove NoInterfaceObject.
3397
3398         * Modules/mediastream/MediaStreamTrackEvent.cpp: 
3399         (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit): New.
3400         (WebCore::MediaStreamTrackEvent::create): New form that takes an initialize.
3401         (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): Ditto.
3402         * Modules/mediastream/MediaStreamTrackEvent.h:
3403         * Modules/mediastream/MediaStreamTrackEvent.idl:
3404
3405         * bindings/js/JSDictionary.cpp:
3406         (WebCore::JSDictionary::convertValue): New.
3407         * bindings/js/JSDictionary.h:
3408
3409 2013-09-19  Anders Carlsson  <andersca@apple.com>
3410
3411         Remove #if !ENABLE(WORKERS) code in ThreadGlobalData
3412         https://bugs.webkit.org/show_bug.cgi?id=121649
3413
3414         Reviewed by Sam Weinig.
3415
3416         This lets us remove a FIXME. Also, move threadGlobalData out of line; there's no need for it to be inline.
3417
3418         * WebCore.exp.in:
3419         * platform/ThreadGlobalData.cpp:
3420         (WebCore::threadGlobalData):
3421         * platform/ThreadGlobalData.h:
3422
3423 2013-09-19  Anders Carlsson  <andersca@apple.com>
3424
3425         Modernize Length setters/getters
3426         https://bugs.webkit.org/show_bug.cgi?id=121647
3427
3428         Reviewed by Andreas Kling.
3429
3430         Add a move constructor and move assignment operator to Length and fixup some of the getters and setters.
3431
3432         * css/CSSComputedStyleDeclaration.cpp:
3433         (WebCore::getBorderRadiusCornerValues):
3434         (WebCore::getBorderRadiusCornerValue):
3435         * css/DeprecatedStyleBuilder.cpp:
3436         (WebCore::ApplyPropertyLength::setValue):
3437         (WebCore::ApplyPropertyLength::createHandler):
3438         (WebCore::ApplyPropertyBorderRadius::setValue):
3439         (WebCore::ApplyPropertyBorderRadius::createHandler):
3440         (WebCore::ApplyPropertyLineHeight::createHandler):
3441         * page/animation/CSSPropertyAnimation.cpp:
3442         (WebCore::LengthPropertyWrapper::LengthPropertyWrapper):
3443         (WebCore::LengthPropertyWrapper::blend):
3444         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
3445         (WebCore::FillLayerPropertyWrapper::blend):
3446         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3447         * platform/CalculationValue.h:
3448         (WebCore::CalcExpressionLength::CalcExpressionLength):
3449         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3450         * platform/Length.cpp:
3451         (WebCore::CalculationValueHandleMap::remove):
3452         (WebCore::CalculationValueHandleMap::find):
3453         (WebCore::Length::decrementCalculatedRef):
3454         * platform/Length.h:
3455         (WebCore::Length::Length):
3456         (WebCore::Length::operator=):
3457         (WebCore::Length::moveFromLength):
3458         * platform/LengthBox.cpp:
3459         (WebCore::LengthBox::logicalLeft):
3460         (WebCore::LengthBox::logicalRight):
3461         (WebCore::LengthBox::before):
3462         (WebCore::LengthBox::after):
3463         (WebCore::LengthBox::start):
3464         (WebCore::LengthBox::end):
3465         * platform/LengthBox.h:
3466         (WebCore::LengthBox::LengthBox):
3467         (WebCore::LengthBox::left):
3468         (WebCore::LengthBox::right):
3469         (WebCore::LengthBox::top):
3470         (WebCore::LengthBox::bottom):
3471         * platform/LengthSize.h:
3472         (WebCore::LengthSize::LengthSize):
3473         (WebCore::LengthSize::setWidth):
3474         (WebCore::LengthSize::width):
3475         (WebCore::LengthSize::setHeight):
3476         (WebCore::LengthSize::height):
3477         * platform/graphics/filters/FilterOperation.h:
3478         (WebCore::FilterOperation::BlurFilterOperation::create):
3479         (WebCore::FilterOperation::BlurFilterOperation::stdDeviation):
3480         (WebCore::FilterOperation::BlurFilterOperation::BlurFilterOperation):
3481         * rendering/style/BasicShapes.h:
3482         (WebCore::BasicShapeRectangle::x):
3483         (WebCore::BasicShapeRectangle::y):
3484         (WebCore::BasicShapeRectangle::width):
3485         (WebCore::BasicShapeRectangle::height):
3486         (WebCore::BasicShapeRectangle::cornerRadiusX):
3487         (WebCore::BasicShapeRectangle::cornerRadiusY):
3488         (WebCore::BasicShapeRectangle::setX):
3489         (WebCore::BasicShapeRectangle::setY):
3490         (WebCore::BasicShapeRectangle::setWidth):
3491         (WebCore::BasicShapeRectangle::setHeight):
3492         (WebCore::BasicShapeRectangle::setCornerRadiusX):
3493         (WebCore::BasicShapeRectangle::setCornerRadiusY):
3494         (WebCore::BasicShapeCircle::centerX):
3495         (WebCore::BasicShapeCircle::centerY):
3496         (WebCore::BasicShapeCircle::radius):
3497         (WebCore::BasicShapeCircle::setCenterX):
3498         (WebCore::BasicShapeCircle::setCenterY):
3499         (WebCore::BasicShapeCircle::setRadius):
3500         (WebCore::BasicShapeEllipse::centerX):
3501         (WebCore::BasicShapeEllipse::centerY):
3502         (WebCore::BasicShapeEllipse::radiusX):
3503         (WebCore::BasicShapeEllipse::radiusY):
3504         (WebCore::BasicShapeEllipse::setCenterX):
3505         (WebCore::BasicShapeEllipse::setCenterY):
3506         (WebCore::BasicShapeEllipse::setRadiusX):
3507         (WebCore::BasicShapeEllipse::setRadiusY):
3508         (WebCore::BasicShapePolygon::getXAt):
3509         (WebCore::BasicShapePolygon::getYAt):
3510         (WebCore::BasicShapePolygon::appendPoint):
3511         (WebCore::BasicShapeInsetRectangle::top):
3512         (WebCore::BasicShapeInsetRectangle::right):
3513         (WebCore::BasicShapeInsetRectangle::bottom):
3514         (WebCore::BasicShapeInsetRectangle::left):
3515         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
3516         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
3517         (WebCore::BasicShapeInsetRectangle::setTop):
3518         (WebCore::BasicShapeInsetRectangle::setRight):
3519         (WebCore::BasicShapeInsetRectangle::setBottom):
3520         (WebCore::BasicShapeInsetRectangle::setLeft):
3521         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
3522         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
3523         * rendering/style/FillLayer.h:
3524         (WebCore::FillSize::FillSize):
3525         (WebCore::FillLayer::xPosition):
3526         (WebCore::FillLayer::yPosition):
3527         (WebCore::FillLayer::sizeLength):
3528         (WebCore::FillLayer::setXPosition):
3529         (WebCore::FillLayer::setYPosition):
3530         * rendering/style/NinePieceImage.cpp:
3531         (WebCore::NinePieceImage::NinePieceImage):
3532         * rendering/style/NinePieceImage.h:
3533         (WebCore::NinePieceImage::setImageSlices):
3534         (WebCore::NinePieceImage::setBorderSlices):
3535         (WebCore::NinePieceImage::setOutset):
3536         (WebCore::NinePieceImage::computeOutset):
3537         * rendering/style/RenderStyle.cpp:
3538         (WebCore::RenderStyle::specifiedLineHeight):
3539         * rendering/style/RenderStyle.h:
3540         * rendering/style/StyleBoxData.h:
3541         (WebCore::StyleBoxData::width):
3542         (WebCore::StyleBoxData::height):
3543         (WebCore::StyleBoxData::minWidth):
3544         (WebCore::StyleBoxData::minHeight):
3545         (WebCore::StyleBoxData::maxWidth):
3546         (WebCore::StyleBoxData::maxHeight):
3547         (WebCore::StyleBoxData::verticalAlign):
3548         * rendering/style/StyleReflection.h:
3549         (WebCore::StyleReflection::offset):
3550         (WebCore::StyleReflection::setOffset):
3551
3552 2013-09-19  Andreas Kling  <akling@apple.com>
3553
3554         Out-of-line InspectorValues create() methods.
3555         <https://webkit.org/b/121639>
3556
3557         Reviewed by Joseph Pecoraro.
3558
3559         These functions are hardly performance-critical and are taking up
3560         quite a lot of space.
3561
3562         Shrinks the WebCore binary by 70500 bytes.
3563
3564 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
3565
3566         Layout Test http/tests/security/canvas-remote-read-remote-image-redirect.html is flaky
3567         https://bugs.webkit.org/show_bug.cgi?id=121458
3568
3569         Reviewed by Sam Weinig.
3570
3571         The code to automagically produce line numbers is quite fragile. Added some FIXMEs,
3572         and added an issue that was making reporting flaky for code is JS event handlers
3573         executed while parsing was paused.
3574
3575         * page/PageConsole.cpp: (WebCore::PageConsole::addMessage): Use actual "script is
3576         running" check instead of "parsing a script element" one.
3577
3578 2013-09-18  Ryosuke Niwa  <rniwa@webkit.org>
3579
3580         Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunction::type() in more places
3581         https://bugs.webkit.org/show_bug.cgi?id=121589
3582
3583         Reviewed by Dean Jackson.
3584  
3585         Replaced CSSLinearTimingFunctionValue by the identifier "linear" and used switch statements on
3586         TimingFunction::type() in more places where we were branching on every type.
3587
3588         Merge https://chromium.googlesource.com/chromium/blink/+/5454f20c71090c35bdd1053e5cc572d5c0bdede7
3589         Merge https://chromium.googlesource.com/chromium/blink/+/104ad42c523d32b67d108c6e59f4f27488fe38a5
3590
3591         * css/CSSComputedStyleDeclaration.cpp:
3592         (WebCore::createTimingFunctionValue):
3593         * css/CSSTimingFunctionValue.cpp:
3594         * css/CSSTimingFunctionValue.h:
3595         * css/CSSToStyleMap.cpp:
3596         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3597         * css/CSSValue.cpp:
3598         (WebCore::CSSValue::equals):
3599         (WebCore::CSSValue::cssText):
3600         (WebCore::CSSValue::destroy):
3601         * css/CSSValue.h:
3602         (WebCore::CSSValue::isCubicBezierTimingFunctionValue):
3603         * page/animation/AnimationBase.cpp:
3604         (WebCore::AnimationBase::progress):
3605
3606 2013-09-19  Commit Queue  <commit-queue@webkit.org>
3607
3608         Unreviewed, rolling out r156119.
3609         http://trac.webkit.org/changeset/156119
3610         https://bugs.webkit.org/show_bug.cgi?id=121640
3611
3612         broke builds in various ways (Requested by anttik on #webkit).
3613
3614         * accessibility/AccessibilitySpinButton.cpp:
3615         * bindings/scripts/CodeGeneratorObjC.pm:
3616         (GenerateImplementation):
3617         * css/SelectorChecker.cpp:
3618         * dom/ContainerNode.h:
3619         * dom/Element.h:
3620         * dom/PseudoElement.cpp:
3621         (WebCore::PseudoElement::didAttachRenderers):
3622         * editing/SplitTextNodeContainingElementCommand.cpp:
3623         (WebCore::SplitTextNodeContainingElementCommand::doApply):
3624         * editing/TypingCommand.cpp:
3625         * html/ImageDocument.cpp:
3626         * page/PageSerializer.cpp:
3627         * rendering/RenderElement.h:
3628         * rendering/RenderObject.h:
3629         * svg/SVGAnimatedColor.cpp:
3630         (WebCore::adjustForCurrentColor):
3631         * svg/SVGLocatable.cpp:
3632         * svg/graphics/filters/SVGFEImage.cpp:
3633         (WebCore::FEImage::determineAbsolutePaintRect):
3634         (WebCore::FEImage::referencedRenderer):
3635         * svg/graphics/filters/SVGFEImage.h:
3636
3637 2013-09-19  Antti Koivisto  <antti@apple.com>
3638
3639         Add covariant RenderElement* Element::renderer()
3640         https://bugs.webkit.org/show_bug.cgi?id=121638
3641
3642         Reviewed by Andreas Kling.
3643
3644         Also add isRenderElement() test and casting functions.
3645
3646 2013-09-19  Andreas Kling  <akling@apple.com>
3647
3648         Streamline JSMainThreadNullState.
3649         <https://webkit.org/b/121636>
3650
3651         Reviewed by Anders Carlsson.
3652
3653         JSMainThreadNullState is only used by non-JavaScript bindings and
3654         thus won't ever call didLeaveScriptContext() on destruction.
3655         Specialize the class for its use-case instead of sharing code
3656         with JSMainThreadExecState.
3657
3658         Shrinks the WebCore binary by 82848 bytes.
3659
3660 2013-09-19  Bear Travis  <betravis@adobe.com>
3661
3662         CSS_SHAPES not supported on AppleWin port
3663         https://bugs.webkit.org/show_bug.cgi?id=118810
3664
3665         Reviewed by Brent Fulgham.
3666
3667         Enabling fast/shapes on windows.
3668
3669         * WebCore.vcxproj/WebCore.vcxproj: Add missing shape includes.
3670         * WebCore.vcxproj/WebCoreCommon.props: Include shapes source folder.
3671         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy shapes headers.
3672         * css/CSSPropertyNames.in: Tweak to ensure shapes properties are regenerated.
3673
3674 2013-09-19  Andreas Kling  <akling@apple.com>
3675
3676         Add SVGPropertyInfo.cpp
3677         <https://webkit.org/b/121622>
3678
3679         Reviewed by Anders Carlsson.
3680
3681         Add a cpp file for this class to make it more hackable.
3682
3683         * CMakeLists.txt:
3684         * GNUmakefile.list.am:
3685         * Target.pri:
3686         * WebCore.vcxproj/WebCore.vcxproj:
3687         * WebCore.vcxproj/WebCore.vcxproj.filters:
3688         * WebCore.xcodeproj/project.pbxproj:
3689         * svg/properties/SVGPropertyInfo.cpp: Added.
3690         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
3691         * svg/properties/SVGPropertyInfo.h:
3692
3693 2013-09-19  Eric Carlson  <eric.carlson@apple.com>
3694
3695         MediaStream API: update NavigatorUserMediaError object to match spec
3696         https://bugs.webkit.org/show_bug.cgi?id=121584
3697
3698         Reviewed by Dean Jackson.
3699
3700         No new tests, updated getusermedia.html.
3701
3702         * CMakeLists.txt: Add NavigatorUserMediaError.cpp.
3703         * GNUmakefile.list.am: Ditto.
3704
3705         * Modules/mediastream/NavigatorUserMediaError.cpp: Added.
3706         * Modules/mediastream/NavigatorUserMediaError.h: Derive from DOMError, get rid of "message" attribute.
3707         * Modules/mediastream/NavigatorUserMediaError.idl: Ditto.
3708
3709         * Modules/mediastream/UserMediaRequest.cpp:
3710         (WebCore::UserMediaRequest::create): ASCIILiteral -> AtomicString. Rename constraint parameters.
3711         (WebCore::UserMediaRequest::UserMediaRequest): Rename constraint parameters.
3712         (WebCore::UserMediaRequest::audioConstraints): Return PassRefPtr<> instead of raw ptr.
3713         (WebCore::UserMediaRequest::videoConstraints): Ditto.
3714         (WebCore::UserMediaRequest::ownerDocument): Clean up style.
3715         (WebCore::UserMediaRequest::succeed): 
3716         (WebCore::UserMediaRequest::permissionFailure): Renamed from fail.
3717         (WebCore::UserMediaRequest::constraintFailure):  Renamed from failConstraint.
3718         (WebCore::UserMediaRequest::callSuccessHandler): New.
3719         (WebCore::UserMediaRequest::callErrorHandler): New.
3720         * Modules/mediastream/UserMediaRequest.h:
3721
3722         * WebCore.xcodeproj/project.pbxproj: Add NavigatorUserMediaError.cpp
3723
3724         * dom/DOMError.h: Make constructor protected.
3725
3726         * platform/mediastream/MediaStreamSourcesQueryClient.h: Make constraints available.
3727
3728 2013-09-19  Bem Jones-Bey  <bjonesbe@adobe.com>
3729
3730         Fix handling of top margin on float with shape-outside
3731         https://bugs.webkit.org/show_bug.cgi?id=121614
3732
3733         Reviewed by Alexandru Chiculita.
3734
3735         When a float has shape outside, the top margin should be treated as if
3736         there is no shape there, so inline content should be allowed to flow
3737         into that space. This patch fixes two issues:
3738         
3739         1) If the top margin is the same as the line height, a line should be
3740         able to fit into the margin. Before this patch, that line was being
3741         treated as if it intersected with the shape.
3742         
3743         2) The shape should be positioned (x, y) relative to the box sizing
3744         box of the float. While the x coordinate was being treated properly,
3745         the y coordinate was relative to the top of the margin box. This patch
3746         fixes this behavior.
3747         
3748         This patch also includes a simple test for right and left margins, as
3749         I wrote that test and then discovered the problems listed above.
3750         
3751         This patch also removes an unused override of the
3752         lineOverlapsShapeBounds method.
3753
3754         Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html
3755                csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html
3756
3757         * rendering/FloatingObjects.cpp:
3758         (WebCore::FloatingObjects::logicalLeftOffset): 
3759         (WebCore::FloatingObjects::logicalRightOffset):
3760         * rendering/LineWidth.cpp:
3761         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
3762         * rendering/shapes/ShapeInfo.h:
3763         * rendering/shapes/ShapeInsideInfo.h:
3764         * rendering/shapes/ShapeOutsideInfo.cpp:
3765         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
3766         * rendering/shapes/ShapeOutsideInfo.h:
3767
3768 2013-09-19  Antti Koivisto  <antti@apple.com>
3769
3770         Add RenderElement
3771         https://bugs.webkit.org/show_bug.cgi?id=121608
3772
3773         Reviewed by Dave Hyatt.
3774
3775         Add a common base class for all Element renderers. The class hierarchy will now look like this
3776         
3777         RenderObject
3778             RenderText
3779             RenderElement
3780                 RenderLayerModelObject
3781                     ...
3782                 RenderSVGModelObject
3783                     ...
3784                 RenderSVGGradientStop
3785                 
3786         This will allow tighter typing in both render and DOM trees.
3787         
3788         The patch also moves renderer factory function to RenderElement::createFor().
3789
3790 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
3791
3792         REGRESSION (r149928): CanvasStyle::operator= leaks everything
3793         https://bugs.webkit.org/show_bug.cgi?id=121591
3794
3795         Reviewed by Andreas Kling.
3796
3797         * html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::operator=): Don't leak.
3798
3799 2013-09-19  Andrei Parvu  <parvu@adobe.com>
3800
3801         [CSS Masking/Background] Position property should be ignored when using repeat: space
3802         https://bugs.webkit.org/show_bug.cgi?id=120623
3803
3804         The background/mask-position should be ignored when using repeat: space,
3805         unless there is not enough space for two copies of the image. In that case,
3806         only one image is placed and background/mask-position determines its position.
3807
3808         Reviewed by Dirk Schulze.
3809
3810         Test: css3/masking/mask-repeat-one-copy.html
3811
3812         * rendering/RenderBoxModelObject.cpp: Ignored position property if space value is positive, set no-repeat otherwise.
3813         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3814
3815 2013-09-19  Andreas Kling  <akling@apple.com>
3816
3817         CTTE: EllipsisBox::renderer() should return RenderBlock&.
3818         <https://webkit.org/b/121604>
3819
3820         Reviewed by Antti Koivisto.
3821
3822         I missed adding a renderer() overload when fixing up EllipsisBox.
3823         Flushed out one unnecessary type check.
3824
3825 2013-09-19  Andreas Kling  <akling@apple.com>
3826
3827         CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
3828         <https://webkit.org/b/121605>
3829
3830         Reviewed by Antti Koivisto.
3831
3832         Codify the following:
3833
3834         - InlineTextBox always has a RenderText.
3835         - SVGInlineTextBox always has a RenderSVGInlineText.
3836
3837         Removed InlineTextBox::textRenderer() and make renderer() simply
3838         return a RenderText&/RenderSVGInlineText& instead.
3839
3840         This turns some node() accessors into textNode() and removes a host
3841         of casts and assertions.
3842
3843 2013-09-19  Antti Koivisto  <antti@apple.com>
3844
3845         [CTTE] Hide nonPseudoNode and generatingNode, replace with Element versions
3846         https://bugs.webkit.org/show_bug.cgi?id=121606
3847
3848         Reviewed by Andreas Kling.
3849
3850 2013-09-19  Andreas Kling  <akling@apple.com>
3851
3852         CTTE: Tighten renderer types for InlineFlowBox and SVGInlineFlowBox.
3853         <https://webkit.org/b/121603>
3854
3855         Reviewed by Antti Koivisto.
3856
3857         Codify the following:
3858
3859         - InlineFlowBox always has a RenderBoxModelObject.
3860         - SVGInlineFlowBox always has a RenderSVGInline.
3861
3862         This turns some node() accessors into element(). Neato!
3863
3864 2013-09-19  Gurpreet Kaur  <k.gurpreet@samsung.com>
3865
3866         CSS Unit vmax and vmin in border-width not handled.
3867         https://bugs.webkit.org/show_bug.cgi?id=121421
3868
3869         Reviewed by Darin Adler.
3870
3871         Border properties were not applied incase its values 
3872         were given in vmax/vmin units.
3873
3874         Tests: fast/css/viewport-vmax-border.html
3875                fast/css/viewport-vmin-border.html
3876
3877         * css/CSSPrimitiveValue.cpp:
3878         (WebCore::CSSPrimitiveValue::computeLengthDouble):
3879         * css/CSSPrimitiveValue.h:
3880         (WebCore::CSSPrimitiveValue::isViewportPercentageMax):
3881         (WebCore::CSSPrimitiveValue::isViewportPercentageMin):
3882         * css/DeprecatedStyleBuilder.cpp:
3883         (WebCore::ApplyPropertyComputeLength::applyValue):
3884         Calculating the border values which has been specified in
3885         vmax/vmin units. 1vmax: 1vw or 1vh, whatever is largest.
3886         1vmin: 1vw or 1vh, whatever is smallest. The vh/vw units are 
3887         calcultated as percent of viewport height and viewport width respectively.
3888
3889 2013-09-19  Antti Koivisto  <antti@apple.com>
3890
3891         [CTTE] RenderText is always anonymous or associated with Text node
3892         https://bugs.webkit.org/show_bug.cgi?id=121596
3893
3894         Reviewed by Andreas Kling.
3895
3896         Tighten the node type of RenderText and its subclasses to Text.
3897         Switch to createAnonymous pattern.
3898         Switch a bunch of unnecessary StringImpl* use to Strings.
3899
3900 2013-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
3901
3902         Unreviewed build fix after 156082. Guard SVG code with defines.
3903
3904         * rendering/RenderNamedFlowThread.cpp:
3905         (WebCore::nextNodeInsideContentNode):
3906
3907 2013-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
3908
3909         [CSSRegions] Failed to retrieve named flow ranges for content with inline svg
3910         https://bugs.webkit.org/show_bug.cgi?id=121489
3911
3912         Reviewed by David Hyatt.
3913
3914         The inline SVG element behaves like a replaced element in HTML context. When computing the ranges
3915         that are displayed inside a region for a named flow that contains an inline SVG element, we have
3916         to treat the SVG as a replaced and run the checks only for the SVG root element, skipping the
3917         other SVG elements inside.
3918
3919         Test: fast/regions/get-region-flow-ranges-inline-svg.html
3920
3921         * rendering/RenderNamedFlowThread.cpp:
3922         (WebCore::nextNodeInsideContentNode): Add function to retrieve the next node in traversal
3923         under the contentNode subtree that should be used for getRanges inspection.
3924         (WebCore::RenderNamedFlowThread::getRanges): Replace NodeTravesal::next with nextNodeInsideContentNode.
3925
3926 2013-09-18  Bem Jones-Bey  <bjonesbe@adobe.com>
3927
3928         REGRESSION (r155854 - r155967) block with margin-left adjacent to floated block causes text of subsequent blocks to overlap the floated block.
3929         https://bugs.webkit.org/show_bug.cgi?id=121532
3930
3931         Reviewed by Andreas Kling.
3932
3933         When refactoring the code, I ended up adding the margin in instead of
3934         subtracting it in the case of an intruding float. This patch fixes
3935         that so that the margin is properly handled.
3936
3937         Test: fast/block/float/intruding-float-sibling-with-margin.html
3938
3939         * rendering/RenderBlock.cpp:
3940         (WebCore::RenderBlock::addIntrudingFloats):
3941
3942 2013-09-18  Ryosuke Niwa  <rniwa@webkit.org>
3943
3944         Merge HTMLBodyElement::didNotifySubtreeInsertions into HTMLBodyElement::insertedInto
3945         https://bugs.webkit.org/show_bug.cgi?id=121576
3946
3947         Reviewed by Andreas Kling.
3948
3949         Merge https://chromium.googlesource.com/chromium/blink/+/2a9cac908f4eceadfcf9d21bdf5b3e598075aa1f
3950
3951         The logic in didNotifySubtreeInsertions to set the marginwidth and marginheight attributes
3952         on the <body> of elements inside <iframe> and <frame> doesn't need to run after inserting
3953         all the children of the frame. In fact this means that when you have those attributes
3954         and then the script in the iframe touches offsetLeft or any layout dependent property
3955         we'll layout with the wrong values and then have to do another layout after these margin
3956         attributes are set.
3957
3958         I also remove the scheduleRelayout() call that was inside didNotifySubtreeInsertions. This
3959         call doesn't make any sense, inserting a <body> will always trigger a style recalc and
3960         a subsequent layout. The code is 9 years old: https://trac.webkit.org/changeset/8122
3961         and all tests run fine without it.
3962
3963         * html/HTMLBodyElement.cpp:
3964         (WebCore::HTMLBodyElement::insertedInto):
3965         * html/HTMLBodyElement.h:
3966         * html/HTMLFrameElementBase.h:
3967         (WebCore::isHTMLFrameElementBase):
3968         (WebCore::toHTMLFrameElementBase):
3969
3970 2013-09-18  Jer Noble  <jer.noble@apple.com>
3971
3972         [MSE] Throw exception when setting timestampOffset while 'updating' state is set.
3973         https://bugs.webkit.org/show_bug.cgi?id=121561
3974
3975         Reviewed by Eric Carlson.
3976
3977         Tests: Updated http/tests/media/media-source/mediasource-append-buffer.html.
3978
3979         Merge https://chromium.googlesource.com/chromium/blink/+/25285998be3d0edcd951d12d445a7375e50e512c
3980         by Changbin Shao.
3981
3982         The Media Source Extensions spec requires that an exception be thrown if the 'updating' attribute
3983         equals true while setting the timestampOffset of a SourceBuffer. 
3984
3985         * Modules/mediasource/SourceBuffer.cpp:
3986         (WebCore::SourceBuffer::setTimestampOffset):
3987
3988 2013-09-18  Anders Carlsson  <andersca@apple.com>
3989
3990         RefPtrHashMap should work with move only types
3991         https://bugs.webkit.org/show_bug.cgi?id=121564
3992
3993         Reviewed by Andreas Kling.
3994
3995         * bridge/IdentifierRep.cpp:
3996         (WebCore::IdentifierRep::get):
3997         * page/PageGroup.cpp:
3998         (WebCore::PageGroup::transientLocalStorage):
3999
4000 2013-09-18  Enrica Casucci  <enrica@apple.com>
4001
4002         Upstream changes to WebHTMLConverter to support HTML
4003         to NSAttributedString conversion on both iOS and OS X.
4004
4005         Reviewed by Benjamin Poulain.
4006
4007         This is a new submission of r156001 with the fix for the
4008         failing TestWebKitAPI test. The additional change has been
4009         reviewed by Tim Horton.
4010         
4011         * platform/mac/HTMLConverter.h:
4012         * platform/mac/HTMLConverter.mm:
4013         (WebDefaultFont):
4014         (_fontForNameAndSize):
4015         (+[WebHTMLConverter defaultParagraphStyle]):
4016         (-[WebHTMLConverter _computedStyleForElement:]):
4017         (-[WebHTMLConverter _specifiedStyleForElement:]):
4018         (-[WebHTMLConverter _computedStringForNode:property:]):
4019         (-[WebHTMLConverter _stringForNode:property:]):
4020         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
4021         (-[WebHTMLConverter _getFloat:forNode:property:]):
4022         (_NSFirstPathForDirectoriesInDomains):
4023         (_NSSystemLibraryPath):
4024         (-[WebHTMLConverter _webKitBundle]):
4025         (_colorForRGBColor):
4026         (_shadowForShadowStyle):
4027         (-[WebHTMLConverter _elementIsBlockLevel:]):
4028         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
4029         (-[WebHTMLConverter _computedColorForNode:property:]):
4030         (-[WebHTMLConverter _colorForNode:property:]):
4031         (-[WebHTMLConverter _computedAttributesForElement:]):
4032         (-[WebHTMLConverter _attributesForElement:]):
4033         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
4034         (-[WebHTMLConverter _newLineForElement:]):
4035         (-[WebHTMLConverter _newTabForElement:]):
4036         (-[WebHTMLConverter _WebMessageDocumentClass]):
4037         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
4038         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
4039         (-[WebHTMLConverter _addValue:forElement:]):
4040         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
4041         (_dateForString):
4042         (_colCompare):
4043         (-[WebHTMLConverter _processMetaElementWithName:content:]):
4044         (-[WebHTMLConverter _processHeadElement:]):
4045         (-[WebHTMLConverter _enterElement:tag:display:embedded:]):
4046         (-[WebHTMLConverter _addTableForElement:]):
4047         (-[WebHTMLConverter _addTableCellForElement:]):
4048         (-[WebHTMLConverter _processElement:tag:display:depth:]):
4049         (-[WebHTMLConverter _addMarkersToList:range:]):
4050         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
4051         (-[WebHTMLConverter _processText:]):
4052         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
4053         (-[WebHTMLConverter _traverseFooterNode:depth:]):
4054         (-[WebHTMLConverter _loadFromDOMRange]):
4055         (-[WebHTMLConverter dealloc]):
4056         (-[WebHTMLConverter init]):
4057         (-[WebHTMLConverter initWithDOMRange:]):
4058         (-[WebHTMLConverter attributedString]):
4059         (+[WebHTMLConverter editingAttributedStringFromRange:]):
4060
4061 2013-09-18  Antti Koivisto  <antti@apple.com>
4062
4063         Rename RenderBR to RenderLineBreak
4064         https://bugs.webkit.org/show_bug.cgi?id=121560
4065
4066         Reviewed by Sam Weinig.
4067
4068         It now represents both hard (br) and soft (wbr) line breaks.
4069
4070 2013-09-18  Robert Hogan  <robert@webkit.org>
4071
4072         Quirksmode: Break Tag Extra Space Bug
4073         https://bugs.webkit.org/show_bug.cgi?id=11943
4074
4075         Reviewed by David Hyatt.
4076
4077         Collapse away all space between text and a hard line-break when in a right-aligned
4078         container so that the trailing space doesn't push the text away from the container edge.
4079
4080         Test: fast/text/whitespace/trailing-space-before-br-in-right-aligned-text.html
4081
4082         * rendering/RenderBlockLineLayout.cpp:
4083         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
4084
4085 2013-09-18  Jer Noble  <jer.noble@apple.com>
4086
4087         Unreviewed build fix for Qt (and other) ports after 156049.