Web Inspector: Do not dispatch mousemove when emulating touch event and no touch...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-21  Alexander Pavlov  <apavlov@chromium.org>
2
3         Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
4         https://bugs.webkit.org/show_bug.cgi?id=107419
5
6         Reviewed by Pavel Feldman.
7
8         mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
9
10         * page/EventHandler.cpp:
11         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
12
13 2013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
14
15         Web Inspector: fix highlight bug in DTE.
16         https://bugs.webkit.org/show_bug.cgi?id=107433
17
18         Reviewed by Pavel Feldman.
19
20         Do not re-create |state.ranges| array when it already contains highlight.
21
22         Test: inpector/editor/highlighter-chunk-limit.txt
23
24         * inspector/front-end/TextEditorHighlighter.js:
25         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
26
27 2013-01-21  Takashi Sakamoto  <tasak@google.com>
28
29         [Refactoring] rename StyleRuleBlock -> StyleRuleGroup
30         https://bugs.webkit.org/show_bug.cgi?id=107415
31
32         Reviewed by Antti Koivisto.
33
34         StyleRuleBlock should be renamed StyleRuleGroup, because
35         CSSGroupingRule (not CSSBlockRule) is an interface for an at-rule that
36         contains other rules nested inside itself:
37         http://www.w3.org/TR/2012/WD-css3-conditional-20121213/#the-cssgroupingrule-interface
38         To match the name: CSSGroupingRule, StyleRuleGroup looks better.
39
40         No new tests, because just refactoring.
41
42         * css/CSSGroupingRule.cpp:
43         (WebCore::CSSGroupingRule::CSSGroupingRule):
44         (WebCore::CSSGroupingRule::reattach):
45         * css/CSSGroupingRule.h:
46         (CSSGroupingRule):
47         * css/StyleRule.cpp:
48         (WebCore::StyleRuleGroup::StyleRuleGroup):
49         (WebCore::StyleRuleGroup::wrapperInsertRule):
50         (WebCore::StyleRuleGroup::wrapperRemoveRule):
51         (WebCore::StyleRuleGroup::reportDescendantMemoryUsage):
52         (WebCore::StyleRuleMedia::StyleRuleMedia):
53         (WebCore::StyleRuleSupports::StyleRuleSupports):
54         (WebCore::StyleRuleRegion::StyleRuleRegion):
55         * css/StyleRule.h:
56         (StyleRuleGroup):
57         (WebCore::StyleRuleHost::StyleRuleHost):
58         (WebCore::toStyleRuleMedia):
59         (WebCore::toStyleRuleSupports):
60         (WebCore::toStyleRuleRegion):
61         Just replaced StyleRuleBlock with StyleRuleGroup.
62
63 2013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
64
65         Web Inspector: refactoring to use string as argument for highlightRegex API
66         https://bugs.webkit.org/show_bug.cgi?id=107243
67
68         Reviewed by Pavel Feldman.
69
70         Use string as argument for highlightRegex API instead of using regex object.
71
72         No new tests: no change in behaviour.
73
74         * inspector/front-end/DefaultTextEditor.js:
75         (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
76         * inspector/front-end/TextEditor.js:
77
78 2013-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
79
80         Unreviewed, rolling out r140311.
81         http://trac.webkit.org/changeset/140311
82         https://bugs.webkit.org/show_bug.cgi?id=107431
83
84         Broke selection-related tests (Requested by apavlov on
85         #webkit).
86
87         * page/EventHandler.cpp:
88         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
89
90 2013-01-21  Kentaro Hara  <haraken@chromium.org>
91
92         Unreviewed. Build fix.
93
94         * bindings/v8/V8NPObject.cpp:
95         (WebCore::createV8ObjectForNPObject):
96
97 2013-01-20  Alexander Pavlov  <apavlov@chromium.org>
98
99         Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
100         https://bugs.webkit.org/show_bug.cgi?id=107419
101
102         Reviewed by Pavel Feldman.
103
104         mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
105
106         * page/EventHandler.cpp:
107         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
108
109 2013-01-21  Tommy Widenflycht  <tommyw@google.com>
110
111         MediaStream API: Update the RTCPeerConnection states to match the latest specification
112         https://bugs.webkit.org/show_bug.cgi?id=107120
113
114         Reviewed by Adam Barth.
115
116         http://dev.w3.org/2011/webrtc/editor/webrtc.html#interface-definition
117
118         RTCPeerConnection::readyState and iceState are history and instead signalingState,
119         iceConnectionState and iceGatheringState have been introduced.
120
121         Existing tests updated to cover this patch.
122
123         * Modules/mediastream/RTCPeerConnection.cpp:
124         (WebCore::RTCPeerConnection::RTCPeerConnection):
125         (WebCore::RTCPeerConnection::createOffer):
126         (WebCore::RTCPeerConnection::createAnswer):
127         (WebCore::RTCPeerConnection::setLocalDescription):
128         (WebCore::RTCPeerConnection::localDescription):
129         (WebCore::RTCPeerConnection::setRemoteDescription):
130         (WebCore::RTCPeerConnection::remoteDescription):
131         (WebCore::RTCPeerConnection::updateIce):
132         (WebCore::RTCPeerConnection::addIceCandidate):
133         (WebCore::RTCPeerConnection::readyState):
134         (WebCore):
135         (WebCore::RTCPeerConnection::signalingState):
136         (WebCore::RTCPeerConnection::iceConnectionState):
137         (WebCore::RTCPeerConnection::addStream):
138         (WebCore::RTCPeerConnection::removeStream):
139         (WebCore::RTCPeerConnection::createDataChannel):
140         (WebCore::RTCPeerConnection::close):
141         (WebCore::RTCPeerConnection::didChangeSignalingState):
142         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
143         (WebCore::RTCPeerConnection::didChangeIceConnectionState):
144         (WebCore::RTCPeerConnection::didAddRemoteStream):
145         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
146         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
147         (WebCore::RTCPeerConnection::stop):
148         (WebCore::RTCPeerConnection::changeSignalingState):
149         (WebCore::RTCPeerConnection::changeIceGatheringState):
150         (WebCore::RTCPeerConnection::changeIceConnectionState):
151         * Modules/mediastream/RTCPeerConnection.h:
152         (RTCPeerConnection):
153         * Modules/mediastream/RTCPeerConnection.idl:
154         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
155         (RTCPeerConnectionHandlerClient):
156         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
157         (WebCore::RTCPeerConnectionHandlerChromium::didChangeSignalingState):
158         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEConnectionState):
159         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
160         (RTCPeerConnectionHandlerChromium):
161
162 2013-01-21  Kent Tamura  <tkent@chromium.org>
163
164         Use ISO8601 date/time formats as fallbacks for date/time input types
165         https://bugs.webkit.org/show_bug.cgi?id=107418
166
167         Reviewed by Kentaro Hara.
168
169         We obtain date/time formats from OSes to build date/time input type
170         UIs. If something wrong happens in the code, fallback formats are
171         used. Such fallback formats should not be English formats in order that
172         we can find defects easily.
173
174         No new tests. These formats should not be used unless the current code
175         has defects.
176
177         * html/DateTimeInputType.cpp:
178         (WebCore::DateTimeInputType::setupLayoutParameters):
179         Use an ISO8601 format which is same as a format used in HTML5.
180         * html/DateTimeLocalInputType.cpp:
181         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
182         * html/MonthInputType.cpp:
183         (WebCore::MonthInputType::setupLayoutParameters): Ditto.
184         * html/WeekInputType.cpp:
185         (WebCore::WeekInputType::setupLayoutParameters): Ditto.
186         * platform/text/LocaleICU.cpp:
187         (WebCore::LocaleICU::dateFormat): Ditto.
188         * platform/text/LocaleNone.cpp:
189         (WebCore::LocaleNone::dateFormat): Ditto.
190         (WebCore::LocaleNone::dateTimeFormatWithSeconds): Ditto.
191         (WebCore::LocaleNone::dateTimeFormatWithoutSeconds): Ditto.
192
193 2013-01-20  Matt Falkenhagen  <falken@chromium.org>
194
195         Elements must be reattached when inserted/removed from top layer
196         https://bugs.webkit.org/show_bug.cgi?id=105489
197
198         Relanding r139402 as rollout due to suspected perf regression did not help (bug 106726).
199
200         Reviewed by Julien Chaffraix.
201
202         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
203         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
204
205         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
206         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
207         followed immediately by show() results in no style change.
208
209         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
210                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
211
212         * dom/Element.cpp:
213         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
214         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
215         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
216
217 2013-01-20  Yury Semikhatsky  <yurys@chromium.org>
218
219         Web Inspector: change HeapSnapshotLoader to allow loading native heap snapshots
220         https://bugs.webkit.org/show_bug.cgi?id=107282
221
222         Reviewed by Pavel Feldman.
223
224         Conctete heap snapshot constructor name is passed as a parameter to HeapSnapshotLoaderProxy and
225         propagated to HeapSnapshotLoader.buildSnapshot to support different types of heap snapshots.
226
227         * inspector/front-end/HeapSnapshotLoader.js:
228         (WebInspector.HeapSnapshotLoader.prototype.buildSnapshot):
229         * inspector/front-end/HeapSnapshotProxy.js:
230         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
231         (WebInspector.HeapSnapshotLoaderProxy):
232         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
233         * inspector/front-end/HeapSnapshotView.js:
234         (WebInspector.HeapProfileHeader.prototype._setupWorker):
235
236 2013-01-20  Kentaro Hara  <haraken@chromium.org>
237
238         Implement MediaStreamEvent constructor
239         https://bugs.webkit.org/show_bug.cgi?id=107411
240
241         Reviewed by Adam Barth.
242
243         Spec: http://www.w3.org/TR/webrtc/#mediastreamevent
244
245         Test: fast/events/constructors/media-stream-event-constructor.html
246
247         * Modules/mediastream/MediaStreamEvent.cpp:
248         (WebCore::MediaStreamEventInit::MediaStreamEventInit):
249         (WebCore):
250         (WebCore::MediaStreamEvent::create):
251         (WebCore::MediaStreamEvent::MediaStreamEvent):
252         * Modules/mediastream/MediaStreamEvent.h:
253         (MediaStreamEventInit):
254         (WebCore):
255         (MediaStreamEvent):
256         * Modules/mediastream/MediaStreamEvent.idl:
257         * bindings/js/JSDictionary.cpp:
258         (WebCore):
259         (WebCore::JSDictionary::convertValue):
260         * bindings/js/JSDictionary.h:
261         (WebCore):
262         * bindings/v8/Dictionary.cpp:
263         (WebCore):
264         (WebCore::Dictionary::get):
265         * bindings/v8/Dictionary.h:
266         (Dictionary):
267
268 2013-01-20  Vladislav Kaznacheev  <kaznacheev@chromium.org>
269
270         Web Inspector: Allow SplitView to change orientation after the construction.
271         https://bugs.webkit.org/show_bug.cgi?id=107263
272
273         Added SplitView.prototype.setIsVertical to change the orientation on the fly.
274         Instead of passing default sidebar size to the constructor the client
275         may now pass separate defaults for the sidebar width and height. Passing
276         just one default works as before.
277
278         Reviewed by Pavel Feldman.
279
280         No new tests.
281
282         * inspector/front-end/SplitView.js:
283         (WebInspector.SplitView):
284         (WebInspector.SplitView.prototype.isVertical):
285         (WebInspector.SplitView.prototype.setIsVertical):
286         (WebInspector.SplitView.prototype._innerSetIsVertical):
287         (WebInspector.SplitView.prototype._updateLayout):
288         (WebInspector.SplitView.prototype.isSidebarSecond):
289         (WebInspector.SplitView.prototype.showBoth):
290         (WebInspector.SplitView.prototype._updateTotalSize):
291         (WebInspector.SplitView.prototype._innerSetSidebarSize):
292         (WebInspector.SplitView.prototype.wasShown):
293         (WebInspector.SplitView.prototype.onResize):
294         (WebInspector.SplitView.prototype.installResizer):
295         (WebInspector.SplitView.prototype._onDragStart):
296         (WebInspector.SplitView.prototype._sizeSetting):
297         (WebInspector.SplitView.prototype._lastSidebarSize):
298         (WebInspector.SplitView.prototype.get _saveSidebarSize):
299
300 2013-01-20  Kentaro Hara  <haraken@chromium.org>
301
302         Add a [ConstructorConditional] IDL attribute
303         https://bugs.webkit.org/show_bug.cgi?id=107407
304
305         Reviewed by Adam Barth.
306
307         Per discussion in webkit-dev, we need to implement DOM4 event constructors
308         under a enable flag. For that purpose, we implement a [ConstructorConditional]
309         IDL attribute.
310
311         Test: bindings/scripts/test/TestInterface.idl
312
313         * bindings/scripts/CodeGenerator.pm:
314         (GenerateConstructorConditionalString):
315         * bindings/scripts/CodeGeneratorJS.pm:
316         (GenerateConstructorDeclaration):
317         (GenerateConstructorHelperMethods):
318         * bindings/scripts/CodeGeneratorV8.pm:
319         (GenerateHeader):
320         (GenerateImplementation):
321         * bindings/scripts/IDLAttributes.txt:
322         * bindings/scripts/test/JS/JSTestInterface.cpp:
323         (WebCore):
324         * bindings/scripts/test/JS/JSTestInterface.h:
325         (JSTestInterfaceConstructor):
326         * bindings/scripts/test/TestInterface.idl:
327         * bindings/scripts/test/V8/V8TestInterface.cpp:
328         (WebCore::ConfigureV8TestInterfaceTemplate):
329         * bindings/scripts/test/V8/V8TestInterface.h:
330         (V8TestInterface):
331
332 2013-01-20  Kentaro Hara  <haraken@chromium.org>
333
334         [V8] We should set a class id for a NPObject wrapper
335         https://bugs.webkit.org/show_bug.cgi?id=107249
336
337         Reviewed by Adam Barth.
338
339         This is one of steps to avoid hitting an ASSERT()
340         that will be added in https://bugs.webkit.org/show_bug.cgi?id=107137 .
341
342         No tests. No change in behavior.
343
344         * bindings/v8/V8DOMWrapper.h:
345         (V8DOMWrapper):
346         (WebCore::V8DOMWrapper::setWrapperClass):
347         (WebCore):
348         * bindings/v8/V8NPObject.cpp:
349         (WebCore::createV8ObjectForNPObject):
350
351 2013-01-20  Mike Lawther  <mikelawther@chromium.org>
352
353         CSS3 calc: unprefix implementation
354         https://bugs.webkit.org/show_bug.cgi?id=91951
355
356         Reviewed by Ojan Vafai.
357
358         Add support for the unprefixed 'calc()' function, while retaining support for the prefixed version.
359
360         Test: css3/calc/simple-calcs-prefixed.html
361
362         * css/CSSCalculationValue.cpp:
363         (WebCore::buildCssText):
364         (WebCore::CSSCalcValue::create):
365         * css/CSSParser.cpp:
366         (WebCore::CSSParser::isCalculation):
367         (WebCore::CSSParser::detectFunctionTypeToken):
368
369 2013-01-20  Shinya Kawanaka  <shinyak@chromium.org>
370
371         Distribution state becomes inconsistent with content/shadow reprojection
372         https://bugs.webkit.org/show_bug.cgi?id=106634
373
374         Reviewed by Hajime Morita.
375
376         Distribution should be resolved from shallower ShadowDOM to deeper Shadow DOM. However, in the current implementation,
377         there is a case that distribution for deeper ShadowDOM happens to be resolved before distribution
378         for shallower ShadowDOM is resolved.
379
380         Here, we have 2 problems about distribution.
381         1) Invalidation state is not propagated to nested (= deeper) ShadowDOM.
382             - This causes deeper ShadowDOM looks having a valid distribution though it should be invalid.
383         2) We are not resolving shallower ShadowDOM when deeper ShadowDOM's distribution is needed.
384             - Because of (1), we have to check all the ancestor ShadowDOM.
385
386         For (1), we change invalidate() to invalidate nested ShadowDOM's distribution as well.
387         For (2), when resolving distribution, we will check the ancestor ShadowDOM's distribution state. If the ancestor's
388         distribution is not valid, we resolve it first.
389
390         For optimization of (1), actually we can skip invalidating distribution of some ShadowDOMs.
391         If ShadowRoot of deeper ShadowDOM does not have an InsertionPoint as children, we can skip invalidating
392         its distribution, because only children can be distributed to InsertionPoint.
393
394         Tests: fast/dom/shadow/distribution-crash.html
395                fast/dom/shadow/nested-reprojection-inconsistent.html
396
397         * dom/ElementShadow.cpp:
398         (WebCore::ElementShadow::attach): Should resolve distribution from ancestor.
399         * dom/ElementShadow.h:
400         * html/shadow/ContentDistributor.cpp:
401         (WebCore::ContentDistributor::distribute): Added ASSERT that the parent ShadowRoot's distribution is resolved.
402         (WebCore::ContentDistributor::invalidate): For each InsertionPoint, we have to invalidate
403         its parent element's distribution (if it has ElementShadow).
404         (WebCore::ContentDistributor::ensureDistribution):
405         * html/shadow/ContentDistributor.h:
406         (WebCore::ContentDistributor::isValid):
407         * html/shadow/HTMLShadowElement.cpp:
408         (WebCore::HTMLShadowElement::olderShadowRoot): Should resolve distribution from ancestor.
409         * html/shadow/InsertionPoint.cpp:
410         (WebCore::InsertionPoint::attach): ditto.
411         (WebCore::InsertionPoint::detach): ditto.
412         (WebCore::InsertionPoint::getDistributedNodes): ditto.
413         (WebCore::resolveReprojection): ditto.
414
415 2013-01-20  Dominic Mazzoni  <dmazzoni@google.com>
416
417         Make SpeechSynthesis compile in the Chromium port
418         https://bugs.webkit.org/show_bug.cgi?id=107382
419
420         Reviewed by Adam Barth.
421
422         Add stubs for the Chromium implementation of speech synthesis,
423         and add all source and header files to WebCore.gypi. Everything
424         is behind the ENABLE_SPEECH_SYNTHESIS flag.
425
426         * Modules/speech/chromium/SpeechSynthesisChromium.cpp: Added.
427         (WebCore):
428         (WebCore::SpeechSynthesis::initializeVoiceList):
429         (WebCore::SpeechSynthesis::pending):
430         (WebCore::SpeechSynthesis::speaking):
431         (WebCore::SpeechSynthesis::paused):
432         (WebCore::SpeechSynthesis::speak):
433         (WebCore::SpeechSynthesis::cancel):
434         (WebCore::SpeechSynthesis::pause):
435         (WebCore::SpeechSynthesis::resume):
436         * WebCore.gypi:
437
438 2013-01-20  Kent Tamura  <tkent@chromium.org>
439
440         Re-layout child blocks when border/padding of the box-sizing:border-box parent is updated
441         https://bugs.webkit.org/show_bug.cgi?id=104997
442
443         Reviewed by Tony Chang.
444
445         When padding or border is updated for a parent block with
446         box-sizing:border-box and width, the width of its child block was not
447         updated.
448
449         Tests: fast/css/box-sizing-border-box-dynamic-padding-border-update.html
450                fast/forms/text/text-padding-dynamic-change.html
451
452         * rendering/RenderBox.cpp:
453         (WebCore::RenderBox::styleDidChange):
454         If box-sizing of the old style and/or the new style is border-box and
455         padding or border is changed, apply setChildNeedsLayout(true) for child
456         boxes.
457
458 2013-01-20  Kentaro Hara  <haraken@chromium.org>
459
460         [V8] Remove custom V8ScriptProfileCustom::toV8()
461         https://bugs.webkit.org/show_bug.cgi?id=107246
462
463         Reviewed by Adam Barth.
464
465         V8ScriptProfileCustom::toV8() needs not to be custom.
466         Furthermore, the current custom toV8() is wrong in that
467         it doesn't use a creationContext and it doesn't set a
468         wrapper class id. This is one of steps to avoiding
469         ASSERT()s that will be added in
470         https://bugs.webkit.org/show_bug.cgi?id=107137 .
471
472         No tests. No change in behavior.
473
474         * UseV8.cmake:
475         * WebCore.gypi:
476         * bindings/v8/custom/V8ScriptProfileCustom.cpp: Removed.
477         * inspector/ScriptProfile.idl:
478
479 2013-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
480
481         Unreviewed, rolling out r140290.
482         http://trac.webkit.org/changeset/140290
483         https://bugs.webkit.org/show_bug.cgi?id=107412
484
485         Broke tests of inspector and calendar picker in debug build
486         (Requested by tkent on #webkit).
487
488         * rendering/RenderBox.cpp:
489         (WebCore::RenderBox::styleDidChange):
490
491 2013-01-20  Yongsheng Zhu  <yongsheng.zhu@intel.com>
492
493         Dispatch LongPress to inner frames
494         https://bugs.webkit.org/show_bug.cgi?id=106874
495
496         Reviewed by Antonio Gomes.
497
498         Do check whether a LongPress gesture event should be passed
499         to inner frames. If needed, dispatch it.
500
501         Tests: fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html
502                fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html
503
504         * page/EventHandler.cpp:
505         (WebCore::EventHandler::handleGestureLongPress):
506
507 2013-01-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
508
509         Clean up missing *explicit* keyword in ctors of WebCore/rendering.
510         https://bugs.webkit.org/show_bug.cgi?id=107373
511
512         Reviewed by Darin Adler.
513
514         Need to add *explicit* keyword to avoid implicit type conversion.
515
516         * rendering/RenderApplet.h:
517         (RenderApplet):
518         * rendering/RenderArena.h:
519         (RenderArena):
520         * rendering/RenderBR.h:
521         (RenderBR):
522         * rendering/RenderBlock.h:
523         (RenderBlock):
524         * rendering/RenderBox.h:
525         (RenderBox):
526         * rendering/RenderDetailsMarker.h:
527         (RenderDetailsMarker):
528         * rendering/RenderFlexibleBox.h:
529         (RenderFlexibleBox):
530         * rendering/RenderFlowThread.h:
531         * rendering/RenderFullScreen.h:
532         (RenderFullScreen):
533         * rendering/RenderGeometryMap.h:
534         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep):
535         * rendering/RenderGrid.h:
536         (RenderGrid):
537         * rendering/RenderImage.h:
538         (RenderImage):
539         * rendering/RenderLayerBacking.h:
540         (RenderLayerBacking):
541         * rendering/RenderLayerCompositor.h:
542         (RenderLayerCompositor):
543         * rendering/RenderLayerModelObject.h:
544         (RenderLayerModelObject):
545         * rendering/RenderListBox.h:
546         (RenderListBox):
547         * rendering/RenderListMarker.h:
548         (RenderListMarker):
549         * rendering/RenderMedia.h:
550         (RenderMedia):
551         * rendering/RenderMeter.h:
552         (RenderMeter):
553         * rendering/RenderMultiColumnBlock.h:
554         (RenderMultiColumnBlock):
555         * rendering/RenderMultiColumnFlowThread.h:
556         (RenderMultiColumnFlowThread):
557         * rendering/RenderObject.h:
558         (RenderObject):
559         * rendering/RenderPart.h:
560         (RenderPart):
561         * rendering/RenderProgress.h:
562         (RenderProgress):
563         * rendering/RenderReplaced.h:
564         (RenderReplaced):
565         * rendering/RenderReplica.h:
566         (RenderReplica):
567         * rendering/RenderRuby.h:
568         (RenderRubyAsInline):
569         * rendering/RenderRubyBase.h:
570         (RenderRubyBase):
571         * rendering/RenderRubyRun.h:
572         (RenderRubyRun):
573         * rendering/RenderRubyText.h:
574         (RenderRubyText):
575         * rendering/RenderSearchField.h:
576         (RenderSearchField):
577         * rendering/RenderSlider.h:
578         (RenderSlider):
579         * rendering/RenderSnapshottedPlugIn.h:
580         (RenderSnapshottedPlugIn):
581         * rendering/RenderTextControlMultiLine.h:
582         (RenderTextControlMultiLine):
583         * rendering/RenderTextControlSingleLine.h:
584         (RenderTextControlSingleLine):
585         * rendering/RenderView.h:
586         (RenderView):
587         * rendering/RenderWidgetProtector.h:
588         (WebCore::RenderWidgetProtector::RenderWidgetProtector):
589         * rendering/RootInlineBox.h:
590         (RootInlineBox): Remove meaningless parameter name.
591         * rendering/TableLayout.h:
592         (WebCore::TableLayout::TableLayout):
593
594 2013-01-20  Kent Tamura  <tkent@chromium.org>
595
596         Re-layout child blocks when border/padding of the box-sizing:border-box parent is updated
597         https://bugs.webkit.org/show_bug.cgi?id=104997
598
599         Reviewed by Tony Chang.
600
601         When padding or border is updated for a parent block with
602         box-sizing:border-box and width, the width of its child block was not
603         updated.
604
605         Tests: fast/css/box-sizing-border-box-dynamic-padding-border-update.html
606                fast/forms/text/text-padding-dynamic-change.html
607
608         * rendering/RenderBox.cpp:
609         (WebCore::RenderBox::styleDidChange):
610         If box-sizing of the old style and/or the new style is border-box and
611         padding or border is changed, apply setChildNeedsLayout(true) for child
612         boxes.
613
614 2013-01-20  Kentaro Hara  <haraken@chromium.org>
615
616         Unreviewed, rolling out r140270.
617         http://trac.webkit.org/changeset/140270
618         https://bugs.webkit.org/show_bug.cgi?id=107253
619
620         Hit asserts in a debug build
621
622         * bindings/v8/V8DOMWindowShell.cpp:
623         (WebCore::V8DOMWindowShell::installDOMWindow):
624
625 2013-01-20  Shinya Kawanaka  <shinyak@chromium.org>
626
627         [Shadow DOM] Specifying scrollbar style of an element having RenderLayer in ShadowDOM does not work.
628         https://bugs.webkit.org/show_bug.cgi?id=107222
629
630         Reviewed by Simon Fraser.
631
632         When specifying scrollbar style in ShadowDOM, it's not used. If the host element of ShadowDOM has scrollbar style,
633         it's used instead.
634
635         The root cause of this bug is that RenderLayer always see shadowAncestorNode's style. Some elements having
636         UserAgent ShadowDOM (e.g. <textarea>) should see host's style, but most of elements should see its style.
637
638         Test: fast/dom/shadow/scrollbar.html
639
640         * rendering/RenderLayer.cpp:
641         (WebCore::rendererForScrollbar):
642         (WebCore):
643         (WebCore::RenderLayer::createScrollbar):
644         (WebCore::RenderLayer::updateScrollCornerStyle):
645         (WebCore::RenderLayer::updateResizerStyle):
646
647 2013-01-20  Yoshifumi Inoue  <yosin@chromium.org>
648
649         Dragging over an element with scrollbars should scroll the element when dragging near edges
650         https://bugs.webkit.org/show_bug.cgi?id=39725
651
652         Reviewed by Hajime Morita.
653
654         This patch introduces auto scrolling functionality during drag-and-drop
655         when drop source is near edge of scrollable element.
656
657         When drop source is inside 20px of scrollable element more than 200ms,
658         scrollable element is automatically scrolled every 50ms toward drop
659         source position, e.g. vertically scroll up when drop source is in top
660         edge.
661
662         Test: fast/events/drag-and-drop-autoscroll.html
663
664         * page/AutoscrollController.cpp:
665         (WebCore::AutoscrollController::AutoscrollController): Changed to initialize m_dragAndDropAutoscrollStartTime.
666         (WebCore::AutoscrollController::updateDragAndDrop): Added for start/stop autoscroll during drag-and-drop.
667         (WebCore::AutoscrollController::autoscrollTimerFired): Changed to add autoscroll for drag-and-drop, and to pass last know position to RenderBox::autoscroll().
668         * page/AutoscrollController.h:
669         (AutoscrollController): Changed to add updateDragAndDrop() and m_dragAndDropAutoscrollReferencePosition and m_dragAndDropAutoscrollStartTime.
670         * page/ChromeClient.h:
671         (WebCore::ChromeClient): Changed to add new function shouldAutoscrollForDragAndDrop().
672         * page/EventHandler.cpp:
673         (WebCore::EventHandler::updateDragAndDrop): Changed to call AutoscrollController::updateDragAndDrop().
674         (WebCore::EventHandler::clearDragState): Changed to call stopAutoscrollTimer().
675         * rendering/RenderBox.cpp:
676         (WebCore::RenderBox::autoscroll): Changed for new parameter position.
677         (WebCore::RenderBox::calculateAutoscrollDirection): Added for autoscroll.
678         * rendering/RenderBox.h:
679         (RenderBox):
680         * rendering/RenderLayer.cpp:
681         (WebCore::RenderLayer::autoscroll):  Changed for new parameter position and move updateSelectionForMouseDrag() to AutoscrollController.
682         * rendering/RenderLayer.h:
683         (RenderLayer):
684         * rendering/RenderListBox.cpp:
685         (WebCore::RenderListBox::autoscroll):  Changed for new parameter position.
686         * rendering/RenderListBox.h:
687         (RenderListBox):
688         * rendering/RenderTextControlSingleLine.cpp:
689         (WebCore::RenderTextControlSingleLine::autoscroll):  Changed for new parameter position.
690         * rendering/RenderTextControlSingleLine.h:
691         (RenderTextControlSingleLine):
692
693 2013-01-20  Laszlo Gombos  <l.gombos@samsung.com>
694
695         Simplify a list of negative PLATFORM() tests
696         https://bugs.webkit.org/show_bug.cgi?id=107365
697
698         Reviewed by Eric Seidel.
699
700         Simplify a list of negative PLATFORM() tests into a simpler list
701         of positive tests for better readability and maintenance.
702
703         No new tests as there is no new functionality.
704
705         * config.h:
706
707 2013-01-20  Simon Fraser  <simon.fraser@apple.com>
708
709         Avoid filling a rounded rect when radii are zero
710         https://bugs.webkit.org/show_bug.cgi?id=107402
711         <rdar://problem/12793315>
712
713         Reviewed by Sam Weinig.
714
715         It's more efficient to clip and fill rects than rounded rects,
716         so optimize for the case where rounded rect radii are zero.
717
718         * platform/graphics/GraphicsContext.cpp:
719         (WebCore::GraphicsContext::clipRoundedRect):
720         (WebCore::GraphicsContext::clipOutRoundedRect):
721         (WebCore::GraphicsContext::fillRoundedRect):
722
723 2013-01-20  Alexey Proskuryakov  <ap@apple.com>
724
725         Remove obsolete plug-in sandboxing code.
726         https://bugs.webkit.org/show_bug.cgi?id=107362
727
728         Reviewed by Darin Adler.
729
730         * WebCore.xcodeproj/project.pbxproj:
731         * plugins/npapi-sandbox.h: Removed.
732
733 2013-01-20  Peter Rybin  <peter.rybin@gmail.com>
734
735         Web Inspector: Make V8 LiveEdit API disabled by default
736         https://bugs.webkit.org/show_bug.cgi?id=106668
737
738         Reviewed by Yury Semikhatsky.
739
740         Initialize method is patched accordingly.
741
742         * bindings/v8/JavaScriptCallFrame.cpp:
743         (WebCore::JavaScriptCallFrame::restart): missing enable/disable calls added for restart
744         * bindings/v8/V8Initializer.cpp:
745         (WebCore::initializeV8Common): initializer method patched
746
747 2013-01-20  Christophe Dumez  <christophe.dumez@intel.com>
748
749         [gstreamer]  assertion in g_object_unref from _WebKitWebAudioSourcePrivate destructor
750         https://bugs.webkit.org/show_bug.cgi?id=107374
751
752         Reviewed by Philippe Normand.
753
754         WebKitWebAudioSrc object gets unrefed one time too many in
755         _WebKitWebAudioSourcePrivate destructor, causing an assertion
756         in g_object_unref. This patch passes NULL instead of
757         g_object_unref to gst_task_new() so that the WebKitWebAudioSrc
758         object does not get unrefed when the GstTask is destroyed.
759
760         No new tests, already covered by webaudio tests.
761
762         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
763         (webkit_web_audio_src_init):
764
765 2013-01-20  Kentaro Hara  <haraken@chromium.org>
766
767         [V8] Create a persistent wrapper for Window.prototype and innerGlobalObject
768         https://bugs.webkit.org/show_bug.cgi?id=107253
769
770         Reviewed by Adam Barth.
771
772         This is one of steps to avoid hitting an ASSERT()
773         that will be added in https://bugs.webkit.org/show_bug.cgi?id=107137 .
774         We should have a persistent wrapper for all DOM objects
775         and set a class id on the wrapper.
776
777         No tests. No change in behavior.
778
779         * bindings/v8/V8DOMWindowShell.cpp:
780         (WebCore::V8DOMWindowShell::installDOMWindow):
781
782 2013-01-19  Philip Rogers  <pdr@google.com>
783
784         Refactor SVGSVGElement to inherit from SVGStyledTransformableElement
785         https://bugs.webkit.org/show_bug.cgi?id=107393
786
787         Reviewed by Dirk Schulze.
788
789         This patch refactors SVGSVGElement to inherit from SVGStyledTransformableElement instead
790         of SVGStyledLocatableElement. In a followup patch, SVGStyledTransformableElement will
791         be refactored into SVGGraphicsElement which will match the spec:
792         https://svgwg.org/svg2-draft/single-page.html#struct-InterfaceSVGSVGElement
793
794         Tests: svg/transforms/svgsvgelement-transform-expected.svg
795                svg/transforms/svgsvgelement-transform.svg
796
797         * svg/SVGSVGElement.cpp:
798         (WebCore):
799         (WebCore::SVGSVGElement::SVGSVGElement):
800         (WebCore::SVGSVGElement::didMoveToNewDocument):
801         (WebCore::SVGSVGElement::parseAttribute):
802         (WebCore::SVGSVGElement::insertedInto):
803         (WebCore::SVGSVGElement::removedFrom):
804         * svg/SVGSVGElement.h:
805         (SVGSVGElement):
806         * svg/SVGSVGElement.idl:
807
808 2013-01-19  Philip Rogers  <pdr@google.com>
809
810         Merge SVGStylable into SVGStyledElement
811         https://bugs.webkit.org/show_bug.cgi?id=106877
812
813         Reviewed by Dirk Schulze.
814
815         SVG2 changes element inheritance so all SVGElements are stylable. As a first-step towards a
816         cleaner class hierarchy, this patch moves SVGStylable into SVGStyledElement.
817
818         No new tests as this is just a refactoring.
819
820         * CMakeLists.txt:
821         * DerivedSources.make:
822         * GNUmakefile.list.am:
823         * Target.pri:
824         * WebCore.exp.in:
825         * WebCore.gyp/WebCore.gyp:
826         * WebCore.gypi:
827         * WebCore.vcproj/WebCore.vcproj:
828         * WebCore.xcodeproj/project.pbxproj:
829         * bindings/objc/DOMSVG.h:
830         * bindings/scripts/CodeGeneratorObjC.pm:
831         * page/DOMWindow.idl:
832         * svg/SVGAElement.idl:
833         * svg/SVGAllInOne.cpp:
834         * svg/SVGCircleElement.idl:
835         * svg/SVGClipPathElement.idl:
836         * svg/SVGDefsElement.idl:
837         * svg/SVGDescElement.idl:
838         * svg/SVGEllipseElement.idl:
839         * svg/SVGFEBlendElement.idl:
840         * svg/SVGFEColorMatrixElement.idl:
841         * svg/SVGFEComponentTransferElement.idl:
842         * svg/SVGFECompositeElement.idl:
843         * svg/SVGFEConvolveMatrixElement.idl:
844         * svg/SVGFEDiffuseLightingElement.idl:
845         * svg/SVGFEDisplacementMapElement.idl:
846         * svg/SVGFEDropShadowElement.idl:
847         * svg/SVGFEFloodElement.idl:
848         * svg/SVGFEGaussianBlurElement.idl:
849         * svg/SVGFEImageElement.idl:
850         * svg/SVGFEMergeElement.idl:
851         * svg/SVGFEMorphologyElement.idl:
852         * svg/SVGFEOffsetElement.idl:
853         * svg/SVGFESpecularLightingElement.idl:
854         * svg/SVGFETileElement.idl:
855         * svg/SVGFETurbulenceElement.idl:
856         * svg/SVGFilterElement.idl:
857         * svg/SVGFilterPrimitiveStandardAttributes.idl:
858         * svg/SVGForeignObjectElement.idl:
859         * svg/SVGGElement.idl:
860         * svg/SVGGlyphRefElement.idl:
861         * svg/SVGGradientElement.idl:
862         * svg/SVGImageElement.idl:
863         * svg/SVGLineElement.idl:
864         * svg/SVGMarkerElement.idl:
865         * svg/SVGMaskElement.idl:
866         * svg/SVGMissingGlyphElement.idl:
867         * svg/SVGPathElement.idl:
868         * svg/SVGPatternElement.idl:
869         * svg/SVGPolygonElement.idl:
870         * svg/SVGPolylineElement.idl:
871         * svg/SVGRectElement.idl:
872         * svg/SVGSVGElement.idl:
873         * svg/SVGStopElement.idl:
874         * svg/SVGStylable.cpp: Removed.
875         * svg/SVGStylable.h: Removed.
876         * svg/SVGStylable.idl: Removed.
877         * svg/SVGStyledElement.h:
878         (WebCore):
879         * svg/SVGStyledElement.idl: Added.
880         * svg/SVGSwitchElement.idl:
881         * svg/SVGSymbolElement.idl:
882         * svg/SVGTextContentElement.idl:
883         * svg/SVGTitleElement.idl:
884         * svg/SVGUseElement.idl:
885
886 2013-01-19  Tim Horton  <timothy_horton@apple.com>
887
888         CanvasRenderingContext2D::drawTextInternal should create a mask buffer compatible with that of the canvas
889         https://bugs.webkit.org/show_bug.cgi?id=107372
890
891         Reviewed by Simon Fraser.
892
893         No new tests, just matching acceleration modes.
894
895         * html/canvas/CanvasRenderingContext2D.cpp:
896         (WebCore::CanvasRenderingContext2D::drawTextInternal): Create a buffer with the same acceleration mode as the canvas
897         instead of forcing the use of an accelerated buffer if we support acceleration; the canvas could be unaccelerated
898         even if USE(IOSURFACE_CANVAS_BACKING_STORE) is on.
899
900 2013-01-19  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
901
902         Delegated scrolling: Assertion on attempt to show a CSS sticky element
903         https://bugs.webkit.org/show_bug.cgi?id=106890
904
905         Reviewed by Kenneth Rohde Christiansen.
906
907         The problem was that frame view (when delegated scrolling enabled) calculated the positions of sticky elements for
908         a scroll event before sending scroll request. In case of multiple scroll events that caused assertion as the response
909         for previous scroll request was received after the expected sticky elements positions had been already updated for the following
910         scroll request.
911
912         No new tests. Covered by existing 'fast/css/sticky' tests.
913
914         * page/FrameView.cpp:
915         (WebCore::FrameView::setFixedVisibleContentRect):
916         * platform/ScrollView.cpp:
917         (WebCore::ScrollView::scrollTo):
918
919 2013-01-19  Kondapally Kalyan  <kalyan.kondapally@intel.com>
920
921         [EFL][WebGL] Regression: WebGL Content is not drawn after resizing the canvas.
922         https://bugs.webkit.org/show_bug.cgi?id=107366
923
924         Reviewed by Kenneth Rohde Christiansen.
925
926         Window is shared between GraphicsSurface and its client.
927         Client doesn't own the Window. This patch ensures that client
928         doesn't delete the shared Window handle.
929
930         Covered by existing WebGL tests.
931
932         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
933         (WebCore::GraphicsSurfacePrivate::clear):
934
935 2013-01-18  Antti Koivisto  <antti@apple.com>
936
937         Make renderer constructors take Element where possible
938         https://bugs.webkit.org/show_bug.cgi?id=107138
939
940         Reviewed by David Hyatt.
941         
942         Tighter typing prevents bugs and enables optimizations.
943
944         The patch changes how anonymous rendererer are constructed. Previously Document* as the node parameter
945         indicated that the renderer was anonymous. This forced the code to operate on ContainerNodes (Document
946         is not an Element). Now anonymous renderers are constructed by passing null and the document is set by
947         separate setDocumentForAnonymous() call. The patch uses RenderFoo::createAnonymous() pattern consistently.
948
949         Most constructors are switched to take Element. RenderBlock still takes ContainerNode due to a few subclasses
950         (RenderView and RenderFlowThread) that pass in a Document.
951
952         * page/FrameView.cpp:
953         (WebCore::FrameView::updateScrollCorner):
954         * rendering/RenderBlock.cpp:
955         (WebCore::RenderBlock::createAnonymous):
956         (WebCore::RenderBlock::createReplacementRunIn):
957         (WebCore::RenderBlock::updateFirstLetterStyle):
958         (WebCore::RenderBlock::createFirstLetterRenderer):
959         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
960         (WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer):
961         (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer):
962         * rendering/RenderBlock.h:
963         * rendering/RenderDeprecatedFlexibleBox.cpp:
964         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
965         (WebCore::RenderDeprecatedFlexibleBox::createAnonymous):
966         * rendering/RenderDeprecatedFlexibleBox.h:
967         (RenderDeprecatedFlexibleBox):
968         * rendering/RenderDetailsMarker.cpp:
969         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
970         * rendering/RenderDetailsMarker.h:
971         (RenderDetailsMarker):
972         * rendering/RenderDialog.h:
973         (WebCore::RenderDialog::RenderDialog):
974         * rendering/RenderFieldset.cpp:
975         (WebCore::RenderFieldset::RenderFieldset):
976         * rendering/RenderFieldset.h:
977         * rendering/RenderFlexibleBox.cpp:
978         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
979         * rendering/RenderFlexibleBox.h:
980         (RenderFlexibleBox):
981         * rendering/RenderFlowThread.cpp:
982         (WebCore::RenderFlowThread::RenderFlowThread):
983         * rendering/RenderFlowThread.h:
984         * rendering/RenderFullScreen.cpp:
985         (RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
986         (RenderFullScreen::RenderFullScreen):
987         (RenderFullScreen::createAnonymous):
988         (RenderFullScreen::wrapRenderer):
989         * rendering/RenderFullScreen.h:
990         (RenderFullScreen):
991         * rendering/RenderGrid.cpp:
992         (WebCore::RenderGrid::RenderGrid):
993         * rendering/RenderGrid.h:
994         * rendering/RenderImage.cpp:
995         (WebCore::RenderImage::RenderImage):
996         (WebCore::RenderImage::createAnonymous):
997         * rendering/RenderImage.h:
998         * rendering/RenderInline.cpp:
999         (WebCore::RenderInline::RenderInline):
1000         (WebCore::RenderInline::createAnonymous):
1001         (WebCore::RenderInline::addChildIgnoringContinuation):
1002         * rendering/RenderInline.h:
1003         (RenderInline):
1004         (WebCore::RenderInline::node):
1005         
1006             Add version with covariant Element return type.
1007
1008         * rendering/RenderLayer.cpp:
1009         (WebCore::RenderLayer::updateScrollCornerStyle):
1010         (WebCore::RenderLayer::updateResizerStyle):
1011         (WebCore::RenderLayer::createReflection):
1012         (WebCore::RenderListItem::RenderListItem):
1013         (WebCore::RenderListItem::styleDidChange):
1014         * rendering/RenderListItem.h:
1015         * rendering/RenderListMarker.cpp:
1016         (WebCore::RenderListMarker::RenderListMarker):
1017         (WebCore::RenderListMarker::createAnonymous):
1018         * rendering/RenderListMarker.h:
1019         * rendering/RenderMediaControlElements.cpp:
1020         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
1021         (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
1022         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
1023         * rendering/RenderMediaControlElements.h:
1024         (RenderMediaVolumeSliderContainer):
1025         (RenderMediaControlTimeDisplay):
1026         (RenderTextTrackContainerElement):
1027         * rendering/RenderMultiColumnBlock.cpp:
1028         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
1029         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
1030         * rendering/RenderMultiColumnBlock.h:
1031         * rendering/RenderMultiColumnFlowThread.cpp:
1032         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
1033         * rendering/RenderMultiColumnFlowThread.h:
1034         (RenderMultiColumnFlowThread):
1035         * rendering/RenderMultiColumnSet.cpp:
1036         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1037         (WebCore::RenderMultiColumnSet::createAnonymous):
1038         * rendering/RenderMultiColumnSet.h:
1039         (RenderMultiColumnSet):
1040         * rendering/RenderNamedFlowThread.cpp:
1041         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1042         * rendering/RenderNamedFlowThread.h:
1043         (RenderNamedFlowThread):
1044         * rendering/RenderObject.cpp:
1045         (WebCore::RenderObject::RenderObject):
1046         * rendering/RenderObject.h:
1047         
1048              Passed in null node indicates that the renderer is anonymous. Remove now unnecessary setIsAnonymous() function.
1049
1050         (WebCore::RenderObject::isAnonymous):
1051         (WebCore::RenderObject::setDocumentForAnonymous):
1052         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
1053         * rendering/RenderRegion.cpp:
1054         (WebCore::RenderRegion::RenderRegion):
1055         * rendering/RenderRegion.h:
1056         * rendering/RenderRegionSet.cpp:
1057         (WebCore::RenderRegionSet::RenderRegionSet):
1058         * rendering/RenderRegionSet.h:
1059         * rendering/RenderReplaced.cpp:
1060         (WebCore::RenderReplaced::RenderReplaced):
1061         * rendering/RenderReplaced.h:
1062         * rendering/RenderReplica.cpp:
1063         (WebCore::RenderReplica::RenderReplica):
1064         (WebCore::RenderReplica::createAnonymous):
1065         * rendering/RenderReplica.h:
1066         (RenderReplica):
1067         * rendering/RenderRuby.cpp:
1068         (WebCore::createAnonymousRubyInlineBlock):
1069         (WebCore::RenderRubyAsInline::RenderRubyAsInline):
1070         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
1071         * rendering/RenderRuby.h:
1072         (RenderRubyAsInline):
1073         (RenderRubyAsBlock):
1074         * rendering/RenderRubyBase.cpp:
1075         (WebCore::RenderRubyBase::RenderRubyBase):
1076         (WebCore::RenderRubyBase::createAnonymous):
1077         * rendering/RenderRubyBase.h:
1078         (RenderRubyBase):
1079         * rendering/RenderRubyRun.cpp:
1080         (WebCore::RenderRubyRun::RenderRubyRun):
1081         (WebCore::RenderRubyRun::createRubyBase):
1082         (WebCore::RenderRubyRun::staticCreateRubyRun):
1083         * rendering/RenderRubyRun.h:
1084         * rendering/RenderRubyText.cpp:
1085         (WebCore::RenderRubyText::RenderRubyText):
1086         * rendering/RenderRubyText.h:
1087         * rendering/RenderScrollbar.cpp:
1088         (WebCore::RenderScrollbar::updateScrollbarPart):
1089         * rendering/RenderScrollbarPart.cpp:
1090         (WebCore::RenderScrollbarPart::RenderScrollbarPart):
1091         (WebCore::RenderScrollbarPart::createAnonymous):
1092         * rendering/RenderScrollbarPart.h:
1093         (RenderScrollbarPart):
1094         * rendering/RenderSearchField.cpp:
1095         (WebCore::RenderSearchField::RenderSearchField):
1096         * rendering/RenderSearchField.h:
1097         (RenderSearchField):
1098         * rendering/RenderTable.cpp:
1099         (WebCore::RenderTable::RenderTable):
1100         (WebCore::RenderTable::createAnonymousWithParentRenderer):
1101         * rendering/RenderTable.h:
1102         * rendering/RenderTableCaption.cpp:
1103         (WebCore::RenderTableCaption::RenderTableCaption):
1104         * rendering/RenderTableCaption.h:
1105         * rendering/RenderTableCell.cpp:
1106         (WebCore::RenderTableCell::RenderTableCell):
1107         (WebCore::RenderTableCell::createAnonymousWithParentRenderer):
1108         * rendering/RenderTableCell.h:
1109         * rendering/RenderTableCol.cpp:
1110         (WebCore::RenderTableCol::RenderTableCol):
1111         * rendering/RenderTableCol.h:
1112         * rendering/RenderTableRow.cpp:
1113         (WebCore::RenderTableRow::RenderTableRow):
1114         (WebCore::RenderTableRow::createAnonymousWithParentRenderer):
1115         * rendering/RenderTableRow.h:
1116         * rendering/RenderTableSection.cpp:
1117         (WebCore::RenderTableSection::RenderTableSection):
1118         (WebCore::RenderTableSection::createAnonymousWithParentRenderer):
1119         * rendering/RenderTableSection.h:
1120         * rendering/RenderText.cpp:
1121         (WebCore::RenderText::RenderText):
1122         
1123             Pass null and use setDocumentForAnonymous() if a RenderText is created with the Document as renderer
1124             to keep them working. Text renderers should be factored similarly to the rest.
1125
1126         * rendering/RenderTextControl.cpp:
1127         (WebCore::RenderTextControl::RenderTextControl):
1128         * rendering/RenderTextControl.h:
1129         * rendering/RenderTextControlMultiLine.cpp:
1130         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
1131         * rendering/RenderTextControlMultiLine.h:
1132         (RenderTextControlMultiLine):
1133         * rendering/RenderTextControlSingleLine.cpp:
1134         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1135         * rendering/RenderTextControlSingleLine.h:
1136         (RenderTextControlSingleLine):
1137         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
1138         * rendering/RenderTextTrackCue.cpp:
1139         (WebCore::RenderTextTrackCue::RenderTextTrackCue):
1140         * rendering/RenderView.cpp:
1141         (WebCore::RenderView::RenderView):
1142         * rendering/RenderWidget.cpp:
1143         (WebCore::RenderWidget::RenderWidget):
1144         * rendering/RenderWidget.h:
1145         * rendering/mathml/RenderMathMLBlock.cpp:
1146         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
1147         (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):
1148         * rendering/mathml/RenderMathMLBlock.h:
1149         * rendering/mathml/RenderMathMLFenced.cpp:
1150         (WebCore::RenderMathMLFenced::createMathMLOperator):
1151         * rendering/mathml/RenderMathMLOperator.cpp:
1152         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
1153         (WebCore::RenderMathMLOperator::updateFromElement):
1154         (WebCore::RenderMathMLOperator::createGlyph):
1155         * rendering/mathml/RenderMathMLOperator.h:
1156         * rendering/mathml/RenderMathMLRow.cpp:
1157         (WebCore::RenderMathMLRow::RenderMathMLRow):
1158         (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):
1159         * rendering/mathml/RenderMathMLRow.h:
1160         * rendering/style/ContentData.cpp:
1161         (WebCore::ImageContentData::createRenderer):
1162         * rendering/svg/RenderSVGBlock.cpp:
1163         (WebCore::RenderSVGBlock::RenderSVGBlock):
1164         * rendering/svg/RenderSVGInline.cpp:
1165         (WebCore::RenderSVGInline::RenderSVGInline):
1166         * rendering/svg/RenderSVGInline.h:
1167         * rendering/svg/RenderSVGTSpan.cpp:
1168         (WebCore::RenderSVGTSpan::RenderSVGTSpan):
1169         * rendering/svg/RenderSVGTSpan.h:
1170         * rendering/svg/RenderSVGTextPath.cpp:
1171         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
1172         * rendering/svg/RenderSVGTextPath.h:
1173
1174 2013-01-19  Zan Dobersek  <zdobersek@igalia.com>
1175
1176         Unreviewed GTK build fix.
1177
1178         Add the build targets introduced in r140231 to the list.
1179
1180         * GNUmakefile.list.am:
1181
1182 2013-01-18  Huang Dongsung  <luxtella@company100.net>
1183
1184         [Mac] Remove unused pageScaleFactor and positionRelativeToBase arguments in GraphicsLayerCA.
1185         https://bugs.webkit.org/show_bug.cgi?id=107357
1186
1187         Reviewed by Ryosuke Niwa.
1188
1189         Several methods in GraphicsLayerCA receive a pageScaleFactor or a
1190         positionRelativeToBase argument but don't use the arguments, so this patch
1191         removes them.
1192
1193         No new tests. This is just a refactoring of the existing code.
1194
1195         * platform/graphics/ca/GraphicsLayerCA.cpp:
1196         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1197         (WebCore::GraphicsLayerCA::updateGeometry):
1198         (WebCore::GraphicsLayerCA::updateStructuralLayer):
1199         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1200         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
1201         (WebCore::GraphicsLayerCA::updateContentsScale):
1202         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1203         * platform/graphics/ca/GraphicsLayerCA.h:
1204         (GraphicsLayerCA):
1205
1206 2013-01-18  Dimitri Glazkov  <dglazkov@chromium.org>
1207
1208         Move attributeNameMatches from SelectorChecker to its proper place on Attribute.
1209         https://bugs.webkit.org/show_bug.cgi?id=107358
1210
1211         Reviewed by Andreas Kling.
1212
1213         Refactoring, covered by existing tests.
1214
1215         * css/SelectorChecker.cpp:
1216         (WebCore::anyAttributeMatches): Changed to use the new name.
1217         * css/SelectorChecker.h:
1218         (SelectorChecker): Moved attributeNameMatches out of here.
1219         (WebCore::SelectorChecker::checkExactAttribute): Changed to use the new name.
1220         * dom/Attribute.h:
1221         (WebCore::Attribute::matches): Moved attributeNameMatches to here.
1222
1223 2013-01-18  Simon Fraser  <simon.fraser@apple.com>
1224
1225         Fix bug that caused pages with fixed backgrounds to not be fast scrollable
1226         https://bugs.webkit.org/show_bug.cgi?id=107354
1227
1228         Reviewed by Sam Weinig.
1229
1230         Correct the change to RenderObject::styleWillChange() made in r140223. This
1231         condition is checking that we're painting the root background, so it checks if
1232         the renderer is the root, or if it's the body, and the document element's renderer
1233         has no background (which means that the body's background propagates to the root).
1234
1235         * rendering/RenderObject.cpp:
1236         (WebCore::RenderObject::styleWillChange):
1237
1238 2013-01-18  Dima Gorbik  <dgorbik@apple.com>
1239
1240         Remove a TextTrack.h include from the Element.h and move WebVTT related stuff outside the Element
1241         https://bugs.webkit.org/show_bug.cgi?id=107080
1242
1243         Reviewed by Sam Weinig.
1244
1245         WebVTT objects are now subclasses of the Element. This allows us to remove major WebVTT chunks of code from
1246         Element.h and NodeRareData. WebVTTElement is deriving from HTMLElement and not Element to prevent possible
1247         problems that could happen because we reuse qTags that are being used in HTML like <b>, <i> and <u>.
1248
1249         No new tests. This is just a refactoring of the existing code.
1250
1251         * CMakeLists.txt:
1252         * WebCore.gypi:
1253         * WebCore.xcodeproj/project.pbxproj:
1254         * css/SelectorChecker.cpp:
1255         (WebCore::SelectorChecker::checkOne):
1256         * css/StyleResolver.cpp:
1257         (WebCore::StyleResolver::collectMatchingRules):
1258         (WebCore::StyleResolver::canShareStyleWithElement):
1259         * dom/Element.cpp:
1260         * dom/Element.h:
1261         * dom/ElementRareData.h:
1262         (WebCore::ElementRareData::ElementRareData):
1263         * dom/Node.h:
1264         (WebCore::Node::isWebVTTElement):
1265         * html/track/TextTrack.h:
1266         * html/track/TextTrackCue.cpp:
1267         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree):
1268         (WebCore::TextTrackCue::markFutureAndPastNodes):
1269         * html/track/WebVTTElement.cpp: Added.
1270         (WebCore::WebVTTElement::create):
1271         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
1272         * html/track/WebVTTElement.h: Added.
1273         (WebCore::WebVTTElement::setWebVTTNodeType):
1274         (WebCore::WebVTTElement::webVTTNodeType):
1275         (WebCore::WebVTTElement::WebVTTElement):
1276         (WebCore::toWebVTTElement):
1277         * html/track/WebVTTParser.cpp:
1278         (WebCore::WebVTTParser::constructTreeFromToken):
1279
1280 2013-01-18  Beth Dakin  <bdakin@apple.com>
1281
1282         https://bugs.webkit.org/show_bug.cgi?id=106946
1283         Sticky-position elements can jump around/hide on rubber-banding
1284
1285         Reviewed by Simon Fraser.
1286
1287         This patch adds a new function called viewportConstrainedVisibleContentRect() 
1288         since there are a number of places where we need a visibleContectRect() that does 
1289         not allow scroll offsets that indicate the rubber-banding that is happening. And 
1290         this patch fixes the bug for sticky by calling this function in two new places.
1291
1292         * page/FrameView.cpp:
1293         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
1294         (WebCore):
1295         * page/FrameView.h:
1296         (FrameView):
1297         * page/scrolling/ScrollingCoordinator.cpp:
1298         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
1299         * rendering/RenderBoxModelObject.cpp:
1300         (WebCore::RenderBoxModelObject::stickyPositionOffset):
1301         * rendering/RenderLayerCompositor.cpp:
1302         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
1303         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
1304
1305 2013-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1306
1307         Unreviewed, rolling out r140206.
1308         http://trac.webkit.org/changeset/140206
1309         https://bugs.webkit.org/show_bug.cgi?id=107346
1310
1311         Caused crash on wordpress.com (Requested by smfr on #webkit).
1312
1313         * rendering/RenderBox.cpp:
1314         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1315
1316 2013-01-18  Simon Fraser  <simon.fraser@apple.com>
1317
1318         Allow fixed background layers to be moved by the ScrollingCoordinator
1319         https://bugs.webkit.org/show_bug.cgi?id=107213
1320
1321         Reviewed by Tim Horton.
1322         
1323         Start using the RenderView's RenderLayerBacking's background layer for
1324         fixed root backgrounds (those which have background images all of which have
1325         background-attachment: fixed).
1326         
1327         The background-layer is contained in the RenderLayer's RenderLayerBacking's
1328         containment view, so it gets page scale applied to it, but scrolling happens
1329         above this layer, so the background has to be counter-scrolled. We plumb
1330         this layer through to the ScrollingCoordinator so that this counter-scrolling
1331         can be done on the scrolling thread.
1332         
1333         Test: platform/mac/tiled-drawing/fixed-background/fixed-body-background-positioned.html
1334
1335         * WebCore.xcodeproj/project.pbxproj: Add ScrollingStateScrollingNodeMac.mm
1336         * page/scrolling/ScrollingCoordinator.cpp:
1337         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView): New function to get
1338         the counter-scrolling layer.
1339         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): Sync or set the position of the
1340         counter-scrolling layer just like we do for the main scrolling layer.
1341         * page/scrolling/ScrollingCoordinator.h:
1342         (WebCore::ScrollingCoordinator::updateScrollingNode):
1343         * page/scrolling/ScrollingStateNode.cpp:
1344         (WebCore::ScrollingStateNode::ScrollingStateNode): setScrollLayer() renamed to setScrollPlatformLayer(),
1345         and added a FIXME comment because this code is confusing and possibly wrong.
1346         * page/scrolling/ScrollingStateNode.h: Renamed setScrollLayer() to setScrollPlatformLayer().
1347         * page/scrolling/ScrollingStateScrollingNode.cpp:
1348         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1349         * page/scrolling/ScrollingStateScrollingNode.h:
1350         (ScrollingStateScrollingNode): Track the counter-scrolling layer.
1351         (WebCore::ScrollingStateScrollingNode::counterScrollingLayer):
1352         (WebCore::ScrollingStateScrollingNode::counterScrollingLayerDidChange):
1353         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayerDidChange):
1354         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1355         (ScrollingCoordinatorMac): Add updateScrollingNode() which is less expensive than frameViewRootLayerDidChange()
1356         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1357         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange): Fetch the counter-scrolling layer if we have one.
1358         (WebCore::ScrollingCoordinatorMac::setCounterScrollingLayerForNode):
1359         (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
1360         * page/scrolling/mac/ScrollingStateNodeMac.mm:
1361         (WebCore::ScrollingStateNode::setScrollPlatformLayer):
1362         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: New file for implementation of setCounterScrollingLayer().
1363         (WebCore::ScrollingStateScrollingNode::counterScrollingPlatformLayer):
1364         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
1365         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1366         (ScrollingTreeScrollingNodeMac):
1367         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1368         (WebCore::ScrollingTreeScrollingNodeMac::update):
1369         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1370         * rendering/RenderBoxModelObject.cpp:
1371         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
1372         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): If we're painting into the fixed root layer,
1373         we want to always paint with the top,left at 0,0.
1374         * rendering/RenderBoxModelObject.h:
1375         * rendering/RenderLayerBacking.cpp:
1376         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): In the fixed root background case,
1377         we can make the background layer viewport-sized, and we have to set its counter-scrolled position.
1378         (WebCore::RenderLayerBacking::updateBackgroundLayer): If the background layer was created or destroyed,
1379         we have to tell the ScrollingCoordinator.
1380         (WebCore::RenderLayerBacking::didCommitChangesForLayer): Send the GraphicsLayer down.
1381         * rendering/RenderLayerCompositor.cpp:
1382         (WebCore::RenderLayerCompositor::didFlushChangesForLayer): If the background layer changed (e.g. it became
1383         tiled) we need to tell the ScrollingCoordinator.
1384         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): We failed to update the borders on new
1385         layers sometimes; this fixes that.
1386         (WebCore::RenderLayerCompositor::frameViewDidScroll): In the non-threaded scrolling case, if we have
1387         a fixed background layer, we need to update its position.
1388         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged): Feed the newly created/destroyed layer
1389         down to the ScrollingCoordinator.
1390         (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
1391         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
1392         * rendering/RenderLayerCompositor.h:
1393         * rendering/RenderObject.cpp:
1394         (WebCore::rendererHasBackground):
1395         (WebCore::RenderObject::styleWillChange): If the compositor supports fixed root backgrounds, we no longer
1396         treat these as slow repaint objects.
1397         * rendering/RenderView.cpp:
1398         (WebCore::RenderView::rootBackgroundIsEntirelyFixed): Helper function called by RLC.
1399         * rendering/RenderView.h:
1400
1401 2013-01-18  Alec Flett  <alecflett@chromium.org>
1402
1403         IndexedDB: Switch to new createTransaction call
1404         https://bugs.webkit.org/show_bug.cgi?id=107311
1405
1406         Reviewed by Tony Chang.
1407
1408         Convert frontend callers to use the new backend createTransaction
1409         call which is the final divorce between the frontend and backend
1410         transaction objects. This allows an asynchronous call in Chromium
1411         and allows the front and backend to have their own lifecycle,
1412         allowing the backend to be cleaned up as soon as a transaction is complete,
1413         rather than waiting for the JS object to get cleaned up.
1414
1415         No new tests, this is a refactor covered by existing tests.
1416
1417         * Modules/indexeddb/IDBDatabase.cpp:
1418         (WebCore::IDBDatabase::transaction):
1419         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1420         (WebCore::IDBDatabaseBackendImpl::commit):
1421         (WebCore::IDBDatabaseBackendImpl::abort):
1422         (WebCore::IDBDatabaseBackendImpl::createTransaction):
1423         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
1424         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
1425         (WebCore::IDBDatabaseCallbacksImpl::onAbort):
1426         (WebCore::IDBDatabaseCallbacksImpl::onComplete):
1427         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1428         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1429         * Modules/indexeddb/IDBTransaction.cpp:
1430         (WebCore::IDBTransaction::create):
1431         (WebCore::IDBTransaction::IDBTransaction):
1432         (WebCore::IDBTransaction::setActive):
1433         (WebCore::IDBTransaction::abort):
1434         * Modules/indexeddb/IDBTransaction.h:
1435         (WebCore):
1436         (IDBTransaction):
1437         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1438         (WebCore::IDBTransactionBackendImpl::create):
1439         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1440         (WebCore::IDBTransactionBackendImpl::abort):
1441         (WebCore::IDBTransactionBackendImpl::commit):
1442         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1443         (IDBTransactionBackendImpl):
1444         (WebCore::IDBTransactionBackendImpl::setCallbacks):
1445
1446 2013-01-18  Brady Eidson  <beidson@apple.com>
1447
1448         Rework NetworkProcess resource load identifiers.
1449         <rdar://problem/12934449> and https://bugs.webkit.org/show_bug.cgi?id=107192
1450
1451         Reviewed by Alexey Proskuryakov.
1452
1453         No new tests (No effect in tested configs).
1454
1455         * WebCore.exp.in:
1456
1457         Include an identifier argument for synchronous loads:
1458         * loader/LoaderStrategy.cpp:
1459         (WebCore::LoaderStrategy::loadResourceSynchronously):
1460         * loader/LoaderStrategy.h:
1461
1462         Pass along a unique identifier to the synchronous load:
1463         * loader/FrameLoader.cpp:
1464         (WebCore::FrameLoader::loadResourceSynchronously):
1465
1466         Remove the "setIdentifier" method:
1467         * loader/ResourceLoader.cpp:
1468         * loader/ResourceLoader.h:
1469
1470 2013-01-18  Shinya Kawanaka  <shinyak@chromium.org>
1471
1472         Introduce isHTMLTextFormControlElement and toHTMLTextFormControlElement instead of toTextFormControl
1473         https://bugs.webkit.org/show_bug.cgi?id=107089
1474
1475         Reviewed by Kent Tamura.
1476
1477         toTextFormControl(node) returns 0 if node is not HTMLTextFormControl. In recent coding convention,
1478         we only have ASSERT and statc_cast in this kind of conversion function. So this code looks like
1479         having a bad cast, though it does not.
1480
1481         In this patch, we convert toTextFromControl to isHTMLTextFormControlElement and toHTMLFormControlElement,
1482         which aligns our coding convention.
1483
1484         No new tests, simple refactoring.
1485
1486         * editing/Editor.cpp:
1487         (WebCore::Editor::selectionForCommand):
1488         (WebCore::Editor::setBaseWritingDirection):
1489         * html/HTMLElement.cpp:
1490         (WebCore::HTMLElement::directionality):
1491         * html/HTMLTextFormControlElement.cpp:
1492         (WebCore::enclosingTextFormControl):
1493         * html/HTMLTextFormControlElement.h:
1494         (WebCore::isHTMLTextFormControlElement):
1495         (WebCore):
1496         (WebCore::toHTMLTextFormControlElement):
1497         * rendering/RenderTextControl.cpp:
1498         (WebCore::RenderTextControl::RenderTextControl):
1499         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
1500         * testing/Internals.cpp:
1501         (WebCore::Internals::visiblePlaceholder):
1502
1503 2013-01-18  Emil A Eklund  <eae@chromium.org>
1504
1505         Change RenderStyle::getRoundedInnerBorderFor to take ints for border widths
1506         https://bugs.webkit.org/show_bug.cgi?id=107331
1507
1508         Reviewed by Levi Weintraub.
1509         
1510         Borders are always represented as ints yet RenderStyle::
1511         getRoundedInnerBorderFor upcasts from int to LayoutUnit when
1512         calling getRoundedInnerBorderFor.
1513
1514         No new tests, no change in functionality.
1515
1516         * rendering/style/RenderStyle.cpp:
1517         (WebCore::RenderStyle::getRoundedInnerBorderFor):
1518         * rendering/style/RenderStyle.h:
1519         Change getRoundedInnerBorderFor to use ints for border widths.
1520
1521 2013-01-18  Adam Barth  <abarth@webkit.org>
1522
1523         BackgroundHTMLParser shouldn't create AtomicStrings
1524         https://bugs.webkit.org/show_bug.cgi?id=107150
1525
1526         Reviewed by Tony Gentilcore.
1527
1528         Previously, we were creating an AtomicString from the HTMLToken for
1529         every start and end tag. This caused us to have a static dependency on
1530         the parser thread's atomic string table. We want to avoid static
1531         dependencies because we want to eventually run the background parser
1532         using a library like libdispatch that will let us run many version in
1533         parallel.
1534
1535         This patch uses a different approach whereby we use the tag name from
1536         the CompactHTMLToken. In order to avoid calling strcmp excessively, we
1537         use StringImpl::hash to quickly reject matches with some common tag
1538         names. As a side effect, the hash value will be cached in the
1539         StringImpl, speeding up atomization once these StringImpls arrive on
1540         the main thread.
1541
1542         This patch also improves the performance on html-parser-srcdoc.html.
1543         With the patch in bug 107236 applied (which focuses the benchmark more
1544         tightly on the parser), we spend 2.3% less time on the main thread
1545         (likely due to pre-caching the hash values) and 11.5% less time on the
1546         parser thread.
1547
1548         * html/parser/BackgroundHTMLParser.cpp:
1549         (WebCore):
1550         (WebCore::threadSafeEqual):
1551         (WebCore::threadSafeMatch):
1552         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1553
1554 2013-01-18  Tony Gentilcore  <tonyg@chromium.org>
1555
1556         Run defer scripts in the threaded HTML parser
1557         https://bugs.webkit.org/show_bug.cgi?id=107320
1558
1559         Reviewed by Eric Seidel.
1560
1561         No new tests because covered by http/tests/misc/script-defer.html.
1562
1563         * html/parser/HTMLDocumentParser.cpp:
1564         (WebCore::HTMLDocumentParser::prepareToStopParsing):
1565         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
1566
1567 2013-01-18  Robert Hogan  <robert@webkit.org>
1568
1569         fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html is crashing after r140024
1570         https://bugs.webkit.org/show_bug.cgi?id=107209
1571
1572         Reviewed by David Hyatt.
1573
1574         * rendering/RenderBlock.cpp:
1575         (WebCore::RenderBlock::layoutPositionedObjects): r140024 forgot to layout the fixedpos object after
1576         marking it.
1577
1578 2013-01-18  Abhishek Arya  <inferno@chromium.org>
1579
1580         Heap-use-after-free in WebCore::RenderObject::isDescendantOf
1581         https://bugs.webkit.org/show_bug.cgi?id=107226
1582
1583         Reviewed by David Hyatt.
1584
1585         Test: fast/block/float/overhanging-float-not-removed-crash.html
1586
1587         * rendering/RenderBox.cpp:
1588         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1589         Skip anonymous blocks in the chain to get the enclosing block and
1590         be able to correctly mark the overhanging floats in the next siblings.
1591
1592 2013-01-18  Chris Hopman  <cjhopman@google.com>
1593
1594         Fix scrollRectToVisible in the presence of transforms
1595         https://bugs.webkit.org/show_bug.cgi?id=105574
1596
1597         Reviewed by Simon Fraser.
1598
1599         When scrolling to reveal an overflow layer, the required scroll was
1600         being calculated in absolute coordinates. To properly account for
1601         transforms, this calculation should be done in the local coordinates
1602         of the renderBox.
1603
1604         Tests: editing/input/reveal-selection-transformed-overflow-parent.html
1605                editing/input/reveal-selection-transformed-textarea.html
1606
1607         * rendering/RenderLayer.cpp:
1608         (WebCore::RenderLayer::scrollRectToVisible):
1609         When scrolling to reveal an overflow layer, calculate the required
1610         scroll in the local coordinates of the RenderBox.
1611         * rendering/RenderObject.cpp:
1612         (WebCore::RenderObject::absoluteToLocalQuad):
1613         (WebCore):
1614         * rendering/RenderObject.h:
1615         (RenderObject):
1616         Add function to convert an absolute quad to a local quad.
1617
1618 2013-01-18  Julien Chaffraix  <jchaffraix@webkit.org>
1619
1620         [CSS Grid Layout] Add support for min-content
1621         https://bugs.webkit.org/show_bug.cgi?id=106474
1622
1623         Reviewed by Ojan Vafai.
1624
1625         Tests: fast/css-grid-layout/minmax-min-content-column-resolution-columns.html
1626                fast/css-grid-layout/minmax-min-content-column-resolution-rows.html
1627
1628         This change adds support to properly size min-content as long as the grid items and the grid element
1629         don't have orthogonal writing-modes. Orthogonal writing modes will be handled in a follow-up bug
1630         to keep the patch small-ish.
1631
1632         This change implements a subset of the specification's algorithm, taking some shortcuts where the
1633         extra complexity wasn't a clear win for now: e.g. the specification relies on behavior customization
1634         through functors to share code among more complex cases - like spanning columns / rows. These shortcuts
1635         have been marked as FIXME / comments in the code so that they can be evaluated and fixed as we implement
1636         more of the complexity.
1637
1638         * platform/Length.h:
1639         (WebCore::Length::isMinContent):
1640         (WebCore::Length::isMaxContent):
1641         Helper functions.
1642
1643         * rendering/RenderGrid.cpp:
1644         (WebCore::GridTrack::maxBreadthIfNotInfinite):
1645         Helper function that returns the max breadth if finite and the used breadth otherwise.
1646
1647         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
1648         Updated to call resolveContentBasedTrackSizingFunctions.
1649
1650         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
1651         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
1652         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1653         Split computeUsedBreadthOfLength into min and max side so that we can return the default values accordingly.
1654         computeUsedBreadthOfSpecifiedLength shares the common code. Also made these functions 'const'.
1655
1656         (WebCore::RenderGrid::minContentForChild):
1657         This function returns the 'min-content' value based on layout / compute preferred logical widths information.
1658
1659         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1660         This is the core function that implements the sizing. It currently doesn't share much code between the branches,
1661         which will be done as we implement more of the algorithm.
1662
1663         (WebCore::RenderGrid::distributeSpaceToTracks):
1664         Clamped the growthShare to positive value only. This is required to handle cases where min-content is bigger
1665         than max track breadth. Added a comment about this deviation from the specification.
1666
1667         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
1668         Debug only method. It is a sanity check as our algorithm should *never* shrink the used breadth to a value
1669         smaller than the computed min track breadth.
1670
1671         (WebCore::RenderGrid::layoutGridItems):
1672         Added 2 ASSERT using tracksAreWiderThanMinTrackBreadth.
1673
1674         (WebCore::RenderGrid::resolveGridPosition):
1675         Helper overriden instance.
1676         * rendering/RenderGrid.h:
1677         Added the new functions. Also made more core functions take both grid tracks.
1678
1679 2013-01-18  Geoffrey Garen  <ggaren@apple.com>
1680
1681         Weak GC maps should be easier to use
1682         https://bugs.webkit.org/show_bug.cgi?id=107312
1683
1684         Reviewed by Sam Weinig.
1685
1686         Since weak GC maps are so easy to use now, let's use them for the DOM
1687         string cache.
1688
1689         * WebCore.exp.in:
1690         * bindings/js/DOMWrapperWorld.cpp:
1691         (WebCore):
1692         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1693         * bindings/js/DOMWrapperWorld.h:
1694         (WebCore):
1695         (WebCore::DOMWrapperWorld::globalData):
1696         (DOMWrapperWorld):
1697         * bindings/js/JSDOMBinding.cpp:
1698         (WebCore):
1699         * bindings/js/JSDOMBinding.h:
1700         (WebCore):
1701         (WebCore::jsStringWithCache):
1702
1703 2013-01-18  Tim Volodine  <timvolodine@chromium.org>
1704
1705         Text Autosizing: don't autosize headers with multiple inline links.
1706         https://bugs.webkit.org/show_bug.cgi?id=106792
1707
1708         Reviewed by Kenneth Rohde Christiansen.
1709
1710         This patch includes code for detecting rows of links typically seen
1711         in headers or footers of webpages. Such rows of links should not be
1712         autosized.
1713
1714         The heuristics to detect such rows of links are based on the appearance
1715         of headers in most websites: i.e. links are inline, there are at least three
1716         of them, they should have the same font size with possibly only short textual
1717         separators between them (max 3 characters) and there should be no line breaks
1718         (i.e. <br> elements) between them.
1719
1720         Tests: fast/text-autosizing/header-li-links-autosizing.html
1721                fast/text-autosizing/header-links-autosizing-different-fontsize.html
1722                fast/text-autosizing/header-links-autosizing.html
1723
1724         * rendering/TextAutosizer.cpp:
1725         (WebCore::TextAutosizer::containerShouldBeAutosized):
1726         (WebCore::TextAutosizer::containerIsRowOfLinks):
1727         (WebCore):
1728         * rendering/TextAutosizer.h:
1729
1730 2013-01-18  Levi Weintraub  <leviw@chromium.org>
1731
1732         LayoutUnit should round half consistently, not away from zero
1733         https://bugs.webkit.org/show_bug.cgi?id=107208
1734
1735         Reviewed by Eric Seidel.
1736
1737         The current implementation of LayoutUnit::round() always rounds half away from zero. This can result in
1738         a shift of 1 pixel moving an element aligned at a half-pixel by 2. This problem is particularly common with
1739         RenderLayers, which pass the sub-pixel accumulation into their renderers after translating the graphics
1740         context passed in by their rounded location. This changes round() to always round 0.5 up.
1741
1742         Test: fast/sub-pixel/sub-pixel-root-layer.html
1743
1744         * platform/LayoutUnit.h:
1745         (WebCore::LayoutUnit::round): Always round 0.5 up.
1746         * rendering/RenderLayer.cpp:
1747         (WebCore::RenderLayer::paintLayerContents): We no longer need to prevent rootLayers from passing in a
1748         sub-pixel offset. This eliminates the shifting of elements when applying translateZ(0) or similar.
1749
1750 2013-01-18  Kentaro Hara  <haraken@chromium.org>
1751
1752         [V8] Remove custom V8ScriptProfileNodeCustom::toV8()
1753         https://bugs.webkit.org/show_bug.cgi?id=107245
1754
1755         Reviewed by Adam Barth.
1756
1757         V8ScriptProfileNodeCustom::toV8() needs not to be custom.
1758         Furthermore, the current custom toV8() is wrong in that
1759         it doesn't use a creationContext and it doesn't set a wrapper
1760         class id. This is one of steps to avoiding ASSERT()s
1761         that will be added in https://bugs.webkit.org/show_bug.cgi?id=107137 .
1762
1763         No tests. No change in behavior.
1764
1765         * UseV8.cmake:
1766         * WebCore.gypi:
1767         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed.
1768         * inspector/ScriptProfileNode.idl:
1769
1770 2013-01-18  Ali Juma  <ajuma@chromium.org>
1771
1772         [chromium] Convert WebTransformOperations into pure virtual
1773         https://bugs.webkit.org/show_bug.cgi?id=105553
1774
1775         Reviewed by James Robinson.
1776
1777         This removes the implementation of WebTransformOperations and updates
1778         users to construct instances using a factory function. This also adds
1779         the implementation of WebTransformKeyFrame.
1780
1781         No new tests, no change in functionality.
1782
1783         * WebCore.gypi:
1784         * platform/chromium/support/WebTransformKeyframe.cpp: Copied from Source/Platform/chromium/public/WebTransformKeyframe.h.
1785         (WebKit):
1786         (WebKit::WebTransformKeyframe::WebTransformKeyframe):
1787         (WebKit::WebTransformKeyframe::~WebTransformKeyframe):
1788         (WebKit::WebTransformKeyframe::time):
1789         (WebKit::WebTransformKeyframe::value):
1790         * platform/chromium/support/WebTransformOperations.cpp: Removed.
1791         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
1792         (WebCore::toWebTransformOperations):
1793         (WebCore::WebTransformAnimationCurve):
1794
1795 2013-01-18  Arko Saha  <arko@motorola.com>
1796
1797         PropertyCollection test fails on JavaScriptCore
1798         https://bugs.webkit.org/show_bug.cgi?id=106997
1799
1800         Reviewed by Kentaro Hara.
1801
1802         Made changes in CodeGeneratorJS.pm so that it can use
1803         toJS(JSC::ExecState*, JSDOMGlobalObject*, PropertyNodeList*)
1804         to wrap the object and return PropertyNodeList instead of NodeList.
1805
1806         Test: fast/dom/MicroData/propertiescollection-crash.html
1807               fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
1808
1809         * bindings/scripts/CodeGeneratorJS.pm:
1810         (GenerateImplementation):
1811
1812 2013-01-18  Dominic Mazzoni  <dmazzoni@google.com>
1813
1814         AX: Improve table-guessing heuristics
1815         https://bugs.webkit.org/show_bug.cgi?id=107042
1816
1817         Reviewed by Chris Fleizach.
1818
1819         Adds some more rules so that tables with cell borders, empty-cells,
1820         col, colgroup, or >= 20 rows are all considered data tables, not
1821         layout tables.
1822
1823         Test: accessibility/table-detection.html (modified)
1824
1825         * accessibility/AccessibilityTable.cpp:
1826         (WebCore::AccessibilityTable::isDataTable):
1827
1828 2013-01-18  Terry Anderson  <tdanderson@chromium.org>
1829
1830         Scroll gestures should not create wheel events
1831         https://bugs.webkit.org/show_bug.cgi?id=103952
1832
1833         Reviewed by James Robinson.
1834
1835         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html
1836                fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html
1837                fast/events/touch/gesture/touch-gesture-scroll-iframe-editable.html
1838                fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html
1839                fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html
1840
1841         In EventHandler::handleGestureEvent(), scroll gestures should not be handled by synthesizing
1842         and dispatching wheel events; we should instead scroll the relevant layer directly.
1843
1844         Note that this patch should be landed together with the patch for
1845         https://bugs.webkit.org/show_bug.cgi?id=106589.
1846
1847         * page/EventHandler.cpp:
1848         (WebCore::EventHandler::EventHandler):
1849         (WebCore::EventHandler::clear):
1850         (WebCore::EventHandler::handleGestureEvent):
1851         (WebCore::EventHandler::passGestureEventToWidget):
1852         (WebCore::EventHandler::passGestureEventToWidgetIfPossible):
1853         (WebCore):
1854         (WebCore::closestScrollableNodeInDocumentIfPossibleOrSelfIfNotScrollable):
1855         (WebCore::EventHandler::handleGestureScrollBegin):
1856         (WebCore::EventHandler::handleGestureScrollUpdate):
1857         (WebCore::EventHandler::isScrollbarHandlingGestures):
1858         * page/EventHandler.h:
1859         (EventHandler):
1860         * rendering/RenderLayer.cpp:
1861         (WebCore::RenderLayer::scrollByRecursively):
1862         * rendering/RenderLayer.h:
1863
1864 2013-01-18  Nate Chapin  <japhet@chromium.org>
1865
1866         Cannot abort multiple XHR POSTs made to same url
1867         https://bugs.webkit.org/show_bug.cgi?id=106937
1868
1869         Reviewed by Alexey Proskuryakov.
1870
1871         Test: http/tests/cache/cancel-multiple-post-xhrs.html
1872
1873         * loader/cache/CachedResource.cpp:
1874         (WebCore::CachedResource::removeClient): Call allClientsRemoved() regardless
1875             of whether this resource is inCache(). Otherwise, CachedRawResources will
1876             not have the opportunity to cancel as expected. However, don't cancel
1877             if the last client was removed because we're in the middle of switching
1878             the clients over to a successfully revalidated resource.
1879
1880 2013-01-18  Dima Gorbik  <dgorbik@apple.com>
1881
1882         Implement ::cue() pseudo element property whitelist
1883         https://bugs.webkit.org/show_bug.cgi?id=105477
1884
1885         Reviewed by Antti Koivisto.
1886
1887         Only allowed by specs properties are applied to WebVTT nodes. We used whitelists before for the region
1888         style rule so this refactors the code a little bit to pass bitfields that contain the information on which 
1889         whitelists should be used.
1890
1891         Test: media/track/track-css-property-whitelist.html
1892
1893         * css/RuleSet.cpp: 
1894         (WebCore::RuleData::RuleData): set a region bit when creating a RuleData.
1895         (WebCore::RuleSet::addRule): set a cue bit when PseudoCue type is set for a selector.
1896         * css/RuleSet.h: add the new bitfield as an ivar and setters/getters to access it.
1897         (WebCore::RuleData::isInRegionRule):
1898         (WebCore::RuleData::whitelistType):
1899         (WebCore::RuleData::isInCueRule):
1900         (WebCore::RuleData::setIsInCueRule):
1901         * css/StyleResolver.cpp: refactor the code to pass a bitfield instead of single bits.
1902         (WebCore::StyleResolver::addMatchedProperties):
1903         (WebCore::StyleResolver::sortAndTransferMatchedRules):
1904         (WebCore::StyleResolver::applyProperties):
1905         (WebCore::StyleResolver::applyMatchedProperties):
1906         (WebCore::StyleResolver::isValidCueStyleProperty): 
1907         * css/StyleResolver.h:
1908
1909 2013-01-18  Tony Chang  <tony@chromium.org>
1910
1911         Incorrect scrollable height during simplified layout
1912         https://bugs.webkit.org/show_bug.cgi?id=107193
1913
1914         Reviewed by Ojan Vafai.
1915
1916         Test: fast/overflow/height-during-simplified-layout.html
1917
1918         When computing overflow, we use the height of the block before it was clamped
1919         (i.e., before updateLogicalHeight() has been called).
1920
1921         During simplfied layout, we use the previous sizes rather than doing a full
1922         layout. We still compute overflow, but we were using the clamped height rather
1923         than the full height.
1924
1925         This caused us to incorrectly compute the overflow by the vertical padding.
1926         Since we were passing in the already clamped clientHeight to RenderBlock::computeOverflow,
1927         we would only include the overflow from our children sizes and not include the overflow
1928         from ourselves caused by padding + content.
1929
1930         * rendering/RenderBlock.cpp:
1931         (WebCore::RenderBlock::simplifiedLayout): Use the scrollable height rather than the
1932         already clamped height.
1933
1934 2013-01-18  Joe Mason  <jmason@rim.com>
1935
1936         [BlackBerry] fix compile warnings in NetworkJob
1937         https://bugs.webkit.org/show_bug.cgi?id=107293
1938
1939         Reviewed by Yong Li.
1940
1941         Internal PR: 283096
1942
1943         * platform/network/blackberry/NetworkJob.cpp:
1944         (WebCore):
1945         (WebCore::isAppendableHeader):
1946
1947 2013-01-18  Dominic Mazzoni  <dmazzoni@google.com>
1948
1949         REGRESSION (r132699): Crashes in WebCore::TextIterator::handleTextNodeFirstLetter
1950         https://bugs.webkit.org/show_bug.cgi?id=100688
1951
1952         Reviewed by Martin Robinson.
1953
1954         Prevent crashes when accessibilityObjectIsIgnored calls textUnderElement
1955         while a subtree is being destroyed.
1956
1957         Covered by existing tests.
1958
1959         * accessibility/atk/AccessibilityObjectAtk.cpp:
1960         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1961
1962 2013-01-18  Joe Mason  <jmason@rim.com>
1963
1964         [BlackBerry] Only clear credentials when purgeCredentials is called
1965         https://bugs.webkit.org/show_bug.cgi?id=107124
1966
1967         Reviewed by Yong Li.
1968
1969         Stop clearing credentials when sending out a request just in case they're wrong. That's stupid and
1970         has race conditions. Only clear them when we know they're wrong.
1971
1972         Internal PR: 231158
1973         Internal Reviewer: George Staikos
1974
1975         * platform/network/blackberry/NetworkJob.cpp:
1976         (WebCore::NetworkJob::sendRequestWithCredentials):
1977         (WebCore::NetworkJob::purgeCredentials):
1978
1979 2013-01-18  Andrey Adaikin  <aandrey@chromium.org>
1980
1981         Web Inspector: [Canvas] UI: add a context selector to show screenshot of any canvas in the log
1982         https://bugs.webkit.org/show_bug.cgi?id=107274
1983
1984         Reviewed by Pavel Feldman.
1985
1986         Adding a canvas context selector to display in the replay image screenshot.
1987         Drive-by: Reuse common CSS class "status-bar-item" to remove a lot of CSS duplication.
1988
1989         * English.lproj/localizedStrings.js:
1990         * inspector/front-end/CanvasProfileView.js:
1991         (WebInspector.CanvasProfileView):
1992         (WebInspector.CanvasProfileView.prototype._createControlButton):
1993         (WebInspector.CanvasProfileView.prototype._onReplayContextChanged):
1994         (WebInspector.CanvasProfileView.prototype._onReplayFirstStepClick):
1995         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
1996         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
1997         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
1998         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
1999         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
2000         (WebInspector.CanvasProfileView.prototype._requestReplayContextInfo.didReceiveResourceInfo):
2001         (WebInspector.CanvasProfileView.prototype._requestReplayContextInfo):
2002         * inspector/front-end/canvasProfiler.css:
2003         * inspector/front-end/inspector.css:
2004         (.status-bar button.status-bar-item img):
2005
2006 2013-01-18  Andrey Adaikin  <aandrey@chromium.org>
2007
2008         Web Inspector: [Canvas] add getResourceInfo and getResourceState methods to the protocol
2009         https://bugs.webkit.org/show_bug.cgi?id=107280
2010
2011         Reviewed by Pavel Feldman.
2012
2013         We need to expose replayable resource info and replay state via the protocol.
2014         The ResourceInfo describes a replayable resource, i.e. the info about a resource that was stored to replay it later.
2015         The ResourceState describes a current state of a resource being replayed on the back-end.
2016
2017         * inspector/CodeGeneratorInspector.py:
2018         * inspector/InjectedScriptCanvasModule.cpp:
2019         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
2020         (WebCore):
2021         (WebCore::InjectedScriptCanvasModule::resourceInfo):
2022         (WebCore::InjectedScriptCanvasModule::resourceState):
2023         * inspector/InjectedScriptCanvasModule.h:
2024         (InjectedScriptCanvasModule):
2025         * inspector/InjectedScriptCanvasModuleSource.js:
2026         (.):
2027         * inspector/Inspector.json:
2028         * inspector/InspectorCanvasAgent.cpp:
2029         (WebCore::InspectorCanvasAgent::replayTraceLog):
2030         (WebCore):
2031         (WebCore::InspectorCanvasAgent::getResourceInfo):
2032         (WebCore::InspectorCanvasAgent::getResourceState):
2033         * inspector/InspectorCanvasAgent.h:
2034         (InspectorCanvasAgent):
2035         * inspector/front-end/CanvasProfileView.js:
2036         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
2037         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
2038
2039 2013-01-18  Sergio Villar Senin  <svillar@igalia.com>
2040
2041         [Soup] Frequent crashes on redirections
2042         https://bugs.webkit.org/show_bug.cgi?id=107240
2043
2044         Reviewed by Martin Robinson.
2045
2046         We must ensure that the ResourceHandle has not being cancelled
2047         before performing a redirect. This could happen while we close the
2048         stream used to read the redirect response because it is done
2049         asynchronously.
2050
2051         * platform/network/soup/ResourceHandleSoup.cpp:
2052         (WebCore::redirectCloseCallback): also renamed res to result.
2053
2054 2013-01-18  Andrey Adaikin  <aandrey@chromium.org>
2055
2056         Web Inspector: array grouping does not work big sparse arrays
2057         https://bugs.webkit.org/show_bug.cgi?id=106897
2058
2059         Reviewed by Pavel Feldman.
2060
2061         Now we will choose between array index iteration and object properties iteration for sparse arrays.
2062
2063         * inspector/front-end/ObjectPropertiesSection.js:
2064         (.doLoop):
2065         (.countIterationCallback):
2066         (.loopIterationCallback):
2067
2068 2013-01-18  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2069
2070         [EFL][WebGL] Fix Memory leaks in EGL and GLX surface.
2071         https://bugs.webkit.org/show_bug.cgi?id=107100
2072
2073         Reviewed by Laszlo Gombos.
2074
2075         GLX and EGL surface don't release GL resources created by them.
2076         This patch ensures that the leaks are fixed and
2077         native display is not closed before releasing the current
2078         context and surface.
2079
2080         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2081         (GraphicsContext3DPrivate::releaseResources):
2082         * platform/graphics/surfaces/egl/EGLSurface.cpp:
2083         (WebCore::EGLWindowTransportSurface::destroy): Call base class to free any allocated GL resources.
2084         * platform/graphics/surfaces/glx/GLXContext.cpp:
2085         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
2086         (WebCore::GLXOffScreenContext::freeResources): Don't reset the display to null.
2087         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2088         (WebCore::GLXTransportSurface::destroy): Call base class to free any allocated GL resources.
2089         (WebCore::GLXPBuffer::freeResources): Call base class to free any allocated GL resources.
2090
2091 2013-01-18  Andrey Adaikin  <aandrey@chromium.org>
2092
2093         Web Inspector: [Canvas] introduce Resource.toDataURL
2094         https://bugs.webkit.org/show_bug.cgi?id=107019
2095
2096         Reviewed by Pavel Feldman.
2097
2098         Resource.toDataURL will return string data url representation of a resource, if applicable.
2099         For example, for a rendering context resource (2D or WebGL) it will return canvas.toDataURL().
2100
2101         * inspector/InjectedScriptCanvasModuleSource.js:
2102         (.):
2103
2104 2013-01-18  Csaba Osztrogonác  <ossy@webkit.org>
2105
2106         One more unreviewed Windows buildfix after r140097.
2107
2108         * html/HTMLPlugInElement.h: Remove non-existent include.
2109
2110 2013-01-18  Csaba Osztrogonác  <ossy@webkit.org>
2111
2112         Unreviewed Windows buildfix after r140097.
2113
2114         * html/HTMLPlugInElement.h:
2115
2116 2013-01-18  Yury Semikhatsky  <yurys@chromium.org>
2117
2118         Web Inspector: remove dead code from heap profiler front-end
2119         https://bugs.webkit.org/show_bug.cgi?id=107265
2120
2121         Reviewed by Pavel Feldman.
2122
2123         * inspector/front-end/HeapSnapshotView.js: removed unused methods.
2124
2125 2013-01-18  Yury Semikhatsky  <yurys@chromium.org>
2126
2127         Unreviewed. Fix Qt minimal compilation after r140127
2128
2129         * inspector/InspectorInstrumentation.h:
2130         (InspectorInstrumentationCookie):
2131
2132 2013-01-18  Yury Semikhatsky  <yurys@chromium.org>
2133
2134         Web Inspector: make sure InspectorInstrumentationCookie is invalidated if inspected page was destroyed
2135         https://bugs.webkit.org/show_bug.cgi?id=107232
2136
2137         Reviewed by Pavel Feldman.
2138
2139         Made InstrumentingAgents reference counted to make sure it is not deleted while there is
2140         InspectorInstrumentationCookie with reference to it.
2141
2142         Introduced InstrumentingAgents::reset that is called from inspector controller destructor
2143         to double check that references to all deleted agents are cleared.
2144
2145         InspectorInstrumentationCookie turned from std::pair into a custom class so that
2146         we can avoid inclusion of InstrumentingAgents.h into InspectorInstrumentation.h
2147
2148         * inspector/InspectorController.cpp:
2149         (WebCore::InspectorController::InspectorController):
2150         (WebCore::InspectorController::~InspectorController):
2151         * inspector/InspectorController.h:
2152         (InspectorController):
2153         * inspector/InspectorInstrumentation.cpp:
2154         (WebCore):
2155         (WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
2156         (WebCore::InspectorInstrumentationCookie::operator=):
2157         (WebCore::InspectorInstrumentationCookie::~InspectorInstrumentationCookie):
2158         (WebCore::InspectorInstrumentation::didHandleEventImpl):
2159         (WebCore::InspectorInstrumentation::didFireTimerImpl):
2160         (WebCore::InspectorInstrumentation::didLayoutImpl):
2161         (WebCore::InspectorInstrumentation::didPaintImpl):
2162         (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
2163         (WebCore::InspectorInstrumentation::didMatchRuleImpl):
2164         (WebCore::InspectorInstrumentation::didProcessRuleImpl):
2165         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
2166         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
2167         * inspector/InspectorInstrumentation.h:
2168         (InspectorInstrumentationCookie):
2169         (WebCore::InspectorInstrumentation::didCallFunction):
2170         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
2171         (WebCore::InspectorInstrumentation::didDispatchEvent):
2172         (WebCore::InspectorInstrumentation::didHandleEvent):
2173         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
2174         (WebCore::InspectorInstrumentation::didEvaluateScript):
2175         (WebCore::InspectorInstrumentation::didFireTimer):
2176         (WebCore::InspectorInstrumentation::didLayout):
2177         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
2178         (WebCore::InspectorInstrumentation::didPaint):
2179         (WebCore::InspectorInstrumentation::didRecalculateStyle):
2180         (WebCore::InspectorInstrumentation::didMatchRule):
2181         (WebCore::InspectorInstrumentation::didProcessRule):
2182         (WebCore::InspectorInstrumentation::didReceiveResourceData):
2183         (WebCore::InspectorInstrumentation::didWriteHTML):
2184         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
2185         * inspector/InstrumentingAgents.cpp:
2186         (WebCore::InstrumentingAgents::InstrumentingAgents):
2187         (WebCore):
2188         (WebCore::InstrumentingAgents::reset):
2189         * inspector/InstrumentingAgents.h:
2190         (WebCore::InstrumentingAgents::create):
2191         (InstrumentingAgents):
2192         * inspector/WorkerInspectorController.cpp:
2193         (WebCore::WorkerInspectorController::WorkerInspectorController):
2194         (WebCore::WorkerInspectorController::~WorkerInspectorController):
2195         * inspector/WorkerInspectorController.h:
2196         (WorkerInspectorController):
2197
2198 2013-01-18  Jussi Kukkonen  <jussi.kukkonen@intel.com>
2199
2200         [CMake] Fix indexeddb module build
2201         https://bugs.webkit.org/show_bug.cgi?id=107247
2202
2203         Reviewed by Kentaro Hara.
2204
2205         Add missing files to WebCore_SOURCES so the indexeddb module
2206         can be built.
2207
2208         * CMakeLists.txt:
2209
2210 2013-01-17  Vsevolod Vlasov  <vsevik@chromium.org>
2211
2212         Web Inspector: Add early version of file system mappings editor to settings.
2213         https://bugs.webkit.org/show_bug.cgi?id=107136
2214
2215         Reviewed by Pavel Feldman.
2216
2217         FileMapping simplified to use only one type of entries.
2218         Added start/stopBatchUpdates to FileSystemWorkspaceProvider for better TabbedPane performance.
2219         Added fileSystemProject experiment for file system support and (early and ugly) file system mappings editor behind this experiment.
2220
2221         * English.lproj/localizedStrings.js:
2222         * WebCore.gypi:
2223         * inspector/front-end/FileMapping.js:
2224         (WebInspector.FileMapping):
2225         (WebInspector.FileMapping.prototype._entryMatchesURL):
2226         (WebInspector.FileMapping.prototype._entryURIPrefix):
2227         (WebInspector.FileMapping.prototype.hasMappingForURL):
2228         (WebInspector.FileMapping.prototype._innerURIForURL):
2229         (WebInspector.FileMapping.prototype.uriForURL):
2230         (WebInspector.FileMapping.prototype.urlForURI):
2231         (WebInspector.FileMapping.prototype.mappingEntries):
2232         (WebInspector.FileMapping.prototype.setMappingEntries):
2233         (WebInspector.FileMapping.prototype.set _loadFromSettings.get this):
2234         (WebInspector.FileMapping.prototype.set _loadFromSettings):
2235         (WebInspector.FileMapping.Entry):
2236         * inspector/front-end/FileSystemWorkspaceProvider.js:
2237         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
2238         * inspector/front-end/IsolatedFileSystemModel.js:
2239         (WebInspector.IsolatedFileSystemModel.prototype._fileSystemAdded):
2240         * inspector/front-end/Settings.js:
2241         (WebInspector.ExperimentsSettings):
2242         * inspector/front-end/SettingsScreen.js:
2243         (WebInspector.WorkspaceSettingsTab):
2244         (WebInspector.WorkspaceSettingsTab.prototype._createFileSystemsEditor):
2245         (WebInspector.WorkspaceSettingsTab.prototype._createShowTextInput):
2246         (WebInspector.WorkspaceSettingsTab.prototype._createEditTextInput):
2247         (WebInspector.WorkspaceSettingsTab.prototype._createRemoveButton):
2248         (WebInspector.WorkspaceSettingsTab.prototype._createAddButton):
2249         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow.removeFileSystemClicked):
2250         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow.fileSystemRemoved):
2251         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow):
2252         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemClicked):
2253         (WebInspector.WorkspaceSettingsTab.prototype._fileSystemAdded):
2254         (WebInspector.WorkspaceSettingsTab.prototype._createFileMappingEditor):
2255         (WebInspector.WorkspaceSettingsTab.prototype._addMappingRow.removeMappingClicked):
2256         (WebInspector.WorkspaceSettingsTab.prototype._addMappingRow):
2257         (WebInspector.WorkspaceSettingsTab.prototype._addFileMappingClicked):
2258         * inspector/front-end/helpScreen.css:
2259         (.settings-tab .file-systems-editor input.file-system-path):
2260         (.settings-tab .file-mappings-editor .workspace-settings-row input):
2261         (.settings-tab .file-mappings-editor .workspace-settings-row input.file-mapping-url):
2262         (#workspace-tab-content .button:hover):
2263         (#workspace-tab-content .workspace-settings-row:hover .button):
2264         (#workspace-tab-content .workspace-settings-row .button):
2265         (#workspace-tab-content .workspace-settings-row .remove-button):
2266         (#workspace-tab-content .workspace-settings-row .add-button):
2267         (#workspace-tab-content .workspace-settings-row .file-system-add-button):
2268         (#workspace-tab-content .workspace-settings-row .file-system-add-button:hover):
2269         * inspector/front-end/addIcon.png: Added.
2270
2271 2013-01-18  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2272
2273         Web Inspector: Timeline: nest time/timeEnd records when possible (in glue-mode)
2274         https://bugs.webkit.org/show_bug.cgi?id=100114
2275
2276         Reviewed by Pavel Feldman.
2277
2278         Nesting time/timeEnd intervals will provide a better overview on
2279         what is happening.
2280
2281         * inspector/front-end/TimelinePresentationModel.js: Added logic that
2282         reparents "time" record when "timeEnd" arrives.
2283
2284 2013-01-18  Pavel Feldman  <pfeldman@chromium.org>
2285
2286         Web Inspector: do not use localeCompare unless necessary
2287         https://bugs.webkit.org/show_bug.cgi?id=107242
2288
2289         Reviewed by Vsevolod Vlasov.
2290
2291         Saving on performance here.
2292
2293         * inspector/front-end/CSSSelectorProfileView.js:
2294         (WebInspector.CSSSelectorProfileView.prototype._sortProfile.selectorComparator):
2295         (WebInspector.CSSSelectorProfileView.prototype._sortProfile.sourceComparator):
2296         * inspector/front-end/CookiesTable.js:
2297         (WebInspector.CookiesTable.prototype._sortCookies.compareTo):
2298         (WebInspector.CookiesTable.prototype._sortCookies):
2299         * inspector/front-end/DirectoryContentView.js:
2300         (.nameCompare):
2301         (.typeCompare):
2302         * inspector/front-end/FileSystemModel.js:
2303         (WebInspector.FileSystemModel.Entry.compare):
2304         * inspector/front-end/FileSystemView.js:
2305         (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
2306         * inspector/front-end/FilteredItemSelectionDialog.js:
2307         (WebInspector.OpenResourceDialog.compareFunction):
2308         (WebInspector.OpenResourceDialog):
2309         * inspector/front-end/NetworkRequest.js:
2310         * inspector/front-end/ScriptsSearchScope.js:
2311         (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes.comparator):
2312         (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes):
2313         * inspector/front-end/StylesSidebarPane.js:
2314         (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate):
2315         * inspector/front-end/utilities.js:
2316
2317 2013-01-18  Andrey Lushnikov  <lushnikov@chromium.org>
2318
2319         Web Inspector: fix Closure r2388 warnings
2320         https://bugs.webkit.org/show_bug.cgi?id=107252
2321
2322         Reviewed by Pavel Feldman.
2323
2324         Surround all casts with brackets to avoid Closure warnings.
2325
2326         No new tests: no change in behaviour.
2327
2328         * inspector/front-end/BottomUpProfileDataGridTree.js:
2329         (WebInspector.BottomUpProfileDataGridTree):
2330         * inspector/front-end/BreakpointManager.js:
2331         (WebInspector.BreakpointManager.prototype._filteredBreakpointLocations):
2332         (WebInspector.BreakpointManager.prototype.toggleAllBreakpoints):
2333         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
2334         * inspector/front-end/DOMAgent.js:
2335         (WebInspector.DOMAgent.prototype.pushNodeToFrontend):
2336         (WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend):
2337         (WebInspector.DOMAgent.prototype.querySelector):
2338         (WebInspector.DOMAgent.prototype.querySelectorAll):
2339         * inspector/front-end/DefaultScriptMapping.js:
2340         (WebInspector.DefaultScriptMapping.prototype._scriptEdited):
2341         * inspector/front-end/ScriptSnippetModel.js:
2342         (WebInspector.SnippetScriptMapping.prototype.rawLocationToUILocation):
2343         * inspector/front-end/TopDownProfileDataGridTree.js:
2344         (WebInspector.TopDownProfileDataGridTree):
2345         (WebInspector.TopDownProfileDataGridTree.prototype.exclude):
2346
2347 2013-01-18  Takashi Sakamoto  <tasak@google.com>
2348
2349         Implement CSSHostRule for @host @-rules.
2350         https://bugs.webkit.org/show_bug.cgi?id=102344
2351
2352         Reviewed by Dimitri Glazkov.
2353
2354         CSSHostRule is defined in Shadow DOM spec:
2355         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface
2356         To see or to modify @host @-rules by using inspector, we need to
2357         implement CSSHostRule interface.
2358
2359         Test: fast/dom/shadow/css-hostrule-api.html
2360
2361         * DerivedSources.cpp:
2362         Modified to include JSCSSHostRule.cpp.
2363         * CMakeLists.txt:
2364         * DerivedSources.make:
2365         * DerivedSources.pri:
2366         * GNUmakefile.list.am:
2367         * Target.pri:
2368         * WebCore.gypi:
2369         * WebCore.vcproj/WebCore.vcproj:
2370         * WebCore.xcodeproj/project.pbxproj:
2371         Added CSSHostRule.cpp, CSSHostRule.h, and CSSHostRule.idl.
2372         * bindings/js/JSCSSRuleCustom.cpp:
2373         (WebCore::toJS):
2374         Add a new case that the given rule is @host @-rules to support @host
2375         @-rules.
2376         * bindings/objc/DOMCSS.mm:
2377         (kitClass):
2378         Add a new case that the given rule is @host @-rules to support @host
2379         @-rules.
2380         * bindings/v8/custom/V8CSSRuleCustom.cpp:
2381         (WebCore::wrap):
2382         * css/CSSAllInOne.cpp:
2383         * css/CSSHostRule.cpp: Added.
2384         (WebCore):
2385         (WebCore::CSSHostRule::CSSHostRule):
2386         (WebCore::CSSHostRule::cssText):
2387         * css/CSSHostRule.h: Added.
2388         (WebCore):
2389         (CSSHostRule):
2390         (WebCore::CSSHostRule::create):
2391         Implemented class CSSHostRule which inherits CSSGroupingRule.
2392         Since CSSHostRule has the same interface as CSSGroupingRule, it is
2393         required to implement its constructor and to override only type
2394         method and cssText method.
2395         * css/CSSHostRule.idl: Added.
2396         * css/CSSRule.h:
2397         * css/CSSRule.idl:
2398         Added internal HOST_RULE type number.
2399         * css/StyleResolver.cpp:
2400         (WebCore::collectCSSOMWrappers):
2401         * css/StyleRule.cpp:
2402         (WebCore::StyleRuleBase::reportMemoryUsage):
2403         (WebCore::StyleRuleBase::destroy):
2404         (WebCore::StyleRuleBase::copy):
2405         (WebCore::StyleRuleBase::createCSSOMWrapper):
2406         Modified to handle StyleRuleHost.
2407         * css/StyleRule.h:
2408         (WebCore::StyleRuleBase::isHostRule):
2409         (WebCore::StyleRuleHost::StyleRuleHost):
2410         * css/StyleSheetContents.cpp:
2411         (WebCore::childRulesHaveFailedOrCanceledSubresources):
2412         * page/DOMWindow.idl:
2413         Added CSSHostRule constructor.
2414
2415 2013-01-18  John J. Barton  <johnjbarton@chromium.org>
2416
2417         Web Inspector: inspectedWindow.eval("IamUndefined.prop", callback) fails to give exception text
2418         https://bugs.webkit.org/show_bug.cgi?id=106926
2419
2420         Reviewed by Pavel Feldman.
2421
2422         Return .description from exceptions rather than .value (which is undefined)
2423
2424         New test added to extensions/extensions-eval.html
2425
2426         * inspector/front-end/ExtensionServer.js:
2427         (WebInspector.ExtensionServer.prototype.):
2428         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2429
2430 2013-01-14  Dominik Röttsches  <dominik.rottsches@intel.com>
2431
2432         [EFL] Update freetype in jhbuild to 2.4.11 and activate subpixel layout
2433         https://bugs.webkit.org/show_bug.cgi?id=106774
2434
2435         In order to fix a long standing linespacing/font ascent & descent issue
2436         we found that FreeType commit b0962ac34e660 solves that problem.
2437         Let's update FreeType accordingly, but bump it to 2.4.11 due to the
2438         maintainer recommending several security updates after that said commit.
2439
2440         Also, in order to avoid extra rebaselining, let's activate subpixel
2441         layout at the same time. With subpixel layout I propose to remove
2442         rounding of the linespacing value in order to not introduce rounding
2443         inaccuracies at the SimpleFontData level. Other platforms don't do that
2444         anymore, furthermore the linegap value is not rounded either.
2445
2446         Reviewed by Martin Robinson.
2447
2448         No new tests, affects a large number of tests that will require rebaselining.
2449
2450         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2451         (WebCore::SimpleFontData::platformInit): Remove rounding when setting linespacing.
2452
2453 2013-01-18  Vivek Galatage  <vivek.vg@samsung.com>
2454
2455         Web Inspector: Search shortcut clears the current search box contents
2456         https://bugs.webkit.org/show_bug.cgi?id=107109
2457
2458         Reviewed by Pavel Feldman.
2459
2460         The search box contents should be changed only when the current focus element is
2461         different than the _searchInputElement.
2462
2463         * inspector/front-end/SearchController.js:
2464         (WebInspector.SearchController.prototype.showSearchField):
2465
2466 2013-01-18  Eugene Klyuchnikov  <eustas@chromium.org>
2467
2468         Web Inspector: [Network] Fix JSDocs and deduplicate code.
2469         https://bugs.webkit.org/show_bug.cgi?id=107116
2470
2471         Reviewed by Pavel Feldman.
2472
2473         Add / fix JSDocs to see possible type mismatches.
2474         Deduplicate code for styling network log items.
2475
2476         * inspector/front-end/NetworkPanel.js: Fix JSDocs.
2477         (WebInspector.NetworkDataGridNode.prototype._updateElementStyleClasses):
2478         Extract common code.
2479         * inspector/front-end/NetworkRequest.js: Fix JSDocs.
2480
2481 2013-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2482
2483         Unreviewed, rolling out r140005.
2484         http://trac.webkit.org/changeset/140005
2485         https://bugs.webkit.org/show_bug.cgi?id=107235
2486
2487         broke downstream Chromium interactive_ui_tests (Requested by
2488         dominicc on #webkit).
2489
2490         * WebCore.exp.in:
2491         * dom/Document.cpp:
2492         * dom/Document.h:
2493         (WebCore::Document::documentElement):
2494         * loader/FrameLoader.cpp:
2495         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
2496         * loader/MainResourceLoader.cpp:
2497         (WebCore::MainResourceLoader::MainResourceLoader):
2498         (WebCore::MainResourceLoader::receivedError):
2499         (WebCore::MainResourceLoader::willSendRequest):
2500         (WebCore::MainResourceLoader::responseReceived):
2501         (WebCore::MainResourceLoader::didFinishLoading):
2502         (WebCore::MainResourceLoader::load):
2503         (WebCore::MainResourceLoader::identifier):
2504         * loader/MainResourceLoader.h:
2505         (MainResourceLoader):
2506         * loader/cache/CachedRawResource.cpp:
2507         (WebCore::CachedRawResource::didAddClient):
2508         (WebCore::CachedRawResource::willSendRequest):
2509         (WebCore::CachedRawResource::canReuse):
2510         * loader/cache/CachedRawResource.h:
2511         (CachedRawResource):
2512         * loader/cache/CachedResource.cpp:
2513         (WebCore::CachedResource::addClientToSet):
2514         * loader/cache/CachedResource.h:
2515         (CachedResource):
2516         * loader/cache/CachedResourceLoader.cpp:
2517         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2518         * testing/Internals.cpp:
2519         * testing/Internals.h:
2520         (Internals):
2521         * testing/Internals.idl:
2522
2523 2013-01-18  Yoshifumi Inoue  <yosin@chromium.org>
2524
2525         REGRESSION(r137726): Spring Loaded Pan Scrolling doesn't stop
2526         https://bugs.webkit.org/show_bug.cgi?id=107205
2527
2528         Reviewed by Hajime Morita.
2529
2530         The bug is caused by forgetting to set true m_panScrollButtonPressed
2531         in AutoscrollController::startPanScroll().
2532
2533         This patch changes state management during pan scroll by replacing
2534         m_panScrollButtonPressed and m_springLoadedPanScrollInProgress by
2535         m_autoscrollType with introducing new AutoscrollController state
2536         AutoscrollForPanCanStop.
2537
2538         Tests: platform/chromium-win/fast/events/panScroll-click.html
2539                platform/chromium-win/fast/events/panScroll-drag.html
2540
2541         * page/AutoscrollController.cpp:
2542         (WebCore::AutoscrollController::AutoscrollController): Changed to remove initialization of m_panScrollButtonPressed and m_springLoadedPanScrollInProgress.
2543         (WebCore::AutoscrollController::stopAutoscrollTimer): Changed to remove resetting m_panScrollButtonPressed and m_springLoadedPanScrollInProgress.
2544         (WebCore::AutoscrollController::handleMouseReleaseEvent): Changed to handle AutoscrollForPan and AutoscrollForPanCanStop.
2545         (WebCore::AutoscrollController::panScrollInProgress): Changed to check AutoscrollForPanCanStop too.
2546         (WebCore::AutoscrollController::startPanScrolling): Changed to remove setting of m_springLoadedPanScrollInProgress.
2547         (WebCore::AutoscrollController::autoscrollTimerFired): Changed to add case for AutoscrollForPanCanStop.
2548         (WebCore::AutoscrollController::updatePanScrollState): Chagned to use AutoscrollForPan and AutoscrollForPanCanStop.
2549         * page/AutoscrollController.h:
2550         (AutoscrollController): Changed to add AutoscrollForPanCanStop to AutoscrollType.
2551
2552 2013-01-17  Takashi Sakamoto  <tasak@google.com>
2553
2554         Heap-use-after-free in WebCore::LiveNodeListBase::invalidateCache
2555         https://bugs.webkit.org/show_bug.cgi?id=106958
2556
2557         Reviewed by Ryosuke Niwa.
2558
2559         Need to update node lists that nodes in shadow dom trees have
2560         when document is changed.
2561
2562         No new tests; it is difficult to reproduce crash by using
2563         DumpRenderTree. Manually tested by using attached repro.html.
2564
2565         * dom/NodeRareData.h:
2566         (WebCore::NodeListsNodeData::adoptTreeScope):
2567         Added to adopt node lists when tree scope is changed.
2568         (WebCore::NodeListsNodeData::adoptDocument):
2569         Renamed the original adoptTreeScope to adoptDocument.
2570         * dom/TreeScopeAdopter.cpp:
2571         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2572         If document scope is not changed, modify to invoke adoptTreeScope.
2573         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2574         Modify to invoked adoptDocument.
2575
2576 2013-01-17  Sankeerth V S  <sankeerth.vs@samsung.com>
2577
2578         Search for a selected word should trigger _performSearch to populate
2579         search results
2580         https://bugs.webkit.org/show_bug.cgi?id=106423
2581
2582         Reviewed by Pavel Feldman.
2583
2584         No new tests as this is a UI related change.
2585
2586         * inspector/front-end/SearchController.js:
2587         (WebInspector.SearchController.prototype.showSearchField):
2588
2589 2013-01-17  Rafael Weinstein  <rafaelw@chromium.org>
2590
2591         Ensure the parser adopts foster-parented children into the document of their parent.
2592         https://bugs.webkit.org/show_bug.cgi?id=107023
2593
2594         Reviewed by Adam Barth.
2595
2596         Tests: fast/parser/foster-parent-adopted.html
2597                fast/parser/foster-parent-adopted2.html
2598
2599         * html/parser/HTMLConstructionSite.cpp:
2600         (WebCore::HTMLConstructionSite::insertTextNode):
2601         (WebCore::HTMLConstructionSite::fosterParent):
2602
2603 2013-01-17  Martin Robinson  <mrobinson@igalia.com>
2604
2605         2013-01-17  Martin Robinson  <mrobinson@igalia.com>
2606
2607         IndexedDB: Conditionalize usage of env_idb.h to fix build for non-Chromium ports
2608         https://bugs.webkit.org/show_bug.cgi?id=107182
2609
2610         No new tests. This is a build fix.
2611
2612         * platform/leveldb/LevelDBDatabase.cpp: Use the default environment for non-Chromium
2613         ports instead of the Chromium-specific one provided by env_idb.h.
2614
2615 2013-01-17  Rik Cabanier  <cabanier@adobe.com>
2616
2617         Update GraphicsContext to support winding rule in clip operator for Chromium
2618         https://bugs.webkit.org/show_bug.cgi?id=106872
2619
2620         Reviewed by Dirk Schulze.
2621
2622         Added support for winding to clip() and canvasClip() functions.
2623
2624         No new tests, no change in behavior.
2625
2626         * platform/graphics/skia/GraphicsContextSkia.cpp:
2627         (WebCore::GraphicsContext::clip): Call clipPath() instead with winding rule.
2628         (WebCore::GraphicsContext::canvasClip): Honor the winding rule.
2629
2630 2013-01-17  Shinya Kawanaka  <shinyak@chromium.org>
2631
2632         Revert r122824 for a while
2633         https://bugs.webkit.org/show_bug.cgi?id=97867
2634
2635         Reviewed by Hajime Morita.
2636
2637         In r122824, we have introduced ImageInnerElement for making an image element ShadowDOM-available.
2638         However, it turned out that making a replaced-element ShadowDOM-available has a lot of difficulty.
2639         So we would like to postpone it for a while.
2640
2641         Since that patch makes an image element really complicated, we would like to revert it.
2642
2643         * CMakeLists.txt:
2644         * GNUmakefile.list.am:
2645         * Target.pri:
2646         * WebCore.gypi:
2647         * WebCore.vcproj/WebCore.vcproj:
2648         * WebCore.xcodeproj/project.pbxproj:
2649         * css/html.css:
2650         * html/HTMLImageElement.cpp:
2651         (WebCore):
2652         (WebCore::HTMLImageElement::parseAttribute):
2653         (WebCore::HTMLImageElement::createRenderer):
2654         (WebCore::HTMLImageElement::attach):
2655         * html/HTMLImageElement.h:
2656         (WebCore):
2657         (HTMLImageElement):
2658         * html/HTMLImageLoader.cpp:
2659         (WebCore::HTMLImageLoader::HTMLImageLoader):
2660         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2661         (WebCore::HTMLImageLoader::sourceURI):
2662         (WebCore::HTMLImageLoader::notifyFinished):
2663         * html/HTMLImageLoader.h:
2664         (HTMLImageLoader):
2665         * html/HTMLInputElement.h:
2666         * html/HTMLObjectElement.h:
2667         * html/HTMLPlugInElement.h:
2668         (WebCore):
2669         * html/HTMLPlugInImageElement.h:
2670         * html/HTMLTagNames.in:
2671         * html/HTMLVideoElement.h:
2672         * html/shadow/ImageInnerElement.cpp: Removed.
2673         * html/shadow/ImageInnerElement.h: Removed.
2674         * loader/ImageLoader.cpp:
2675         (WebCore::ImageLoader::ImageLoader):
2676         (WebCore::ImageLoader::~ImageLoader):
2677         (WebCore::ImageLoader::updateFromElement):
2678         (WebCore::ImageLoader::notifyFinished):
2679         (WebCore::ImageLoader::renderImageResource):
2680         (WebCore::ImageLoader::updatedHasPendingEvent):
2681         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
2682         (WebCore::ImageLoader::dispatchPendingLoadEvent):
2683         (WebCore::ImageLoader::dispatchPendingErrorEvent):
2684         * loader/ImageLoader.h:
2685         (WebCore):
2686         (ImageLoader):
2687         (WebCore::ImageLoader::element):
2688         * loader/ImageLoaderClient.h: Removed.
2689         * rendering/RenderImage.cpp:
2690         (WebCore::RenderImage::paintIntoRect):
2691         (WebCore::RenderImage::imageMap):
2692         (WebCore::RenderImage::updateAltText):
2693         * rendering/RenderImage.h:
2694         (WebCore):
2695         (RenderImage):
2696         * rendering/RenderObject.cpp:
2697         (WebCore::RenderObject::shouldRespectImageOrientation):
2698         * svg/SVGImageElement.h:
2699         (SVGImageElement):
2700         * svg/SVGImageLoader.cpp:
2701         (WebCore::SVGImageLoader::SVGImageLoader):
2702         (WebCore::SVGImageLoader::dispatchLoadEvent):
2703         (WebCore::SVGImageLoader::sourceURI):
2704         * svg/SVGImageLoader.h:
2705         (SVGImageLoader):
2706
2707 2013-01-17  Joanmarie Diggs  <jdiggs@igalia.com>
2708
2709         REGRESSION (r139444): Crashes in three accessibility tests on GTK
2710         https://bugs.webkit.org/show_bug.cgi?id=106922
2711
2712         Reviewed by Chris Fleizach.
2713
2714         r139444 exposed an infinite loop that was just waiting to happen.
2715         Currently, getting the role value of an ARIA table row involves
2716         getting the parent table via parentObjectUnignored() which in turn
2717         can lead to the role value of the table row being checked. Moving
2718         the roleValue() logic to determineAccessibilityRole() avoids this.
2719
2720         This fix, however, introduced a regression when an accessible row
2721         was examined without having first examined the parent table for
2722         non-ARIA tables. Now that it is safe to call parentObjectUnignored(),
2723         the parentTable() method used for ARIA table rows can also be used
2724         by non-ARIA table rows.
2725
2726         No new tests; instead unskipped the three crashing tests.
2727
2728         * accessibility/AccessibilityTableRow.cpp:
2729         (WebCore::AccessibilityTableRow::determineAccessibilityRole):
2730         * accessibility/AccessibilityTableRow.h:
2731         (AccessibilityTableRow):
2732
2733 2013-01-17  Rik Cabanier  <cabanier@adobe.com>
2734
2735         Update GraphicsContext to support winding rule in clip operator for QT
2736         https://bugs.webkit.org/show_bug.cgi?id=106873
2737
2738         Reviewed by Dirk Schulze.
2739
2740         Added support for winding to clip() and canvasClip() functions.
2741
2742         No new tests, no change in behavior.
2743
2744         * platform/graphics/qt/GraphicsContextQt.cpp:
2745         (WebCore::GraphicsContext::clip): Use passed in winding rule.
2746         (WebCore::GraphicsContext::canvasClip): Rename variable.
2747
2748 2013-01-17  Rik Cabanier  <cabanier@adobe.com>
2749
2750         Update GraphicsContext to support winding rule in clip operator for Cairo
2751         https://bugs.webkit.org/show_bug.cgi?id=107065
2752
2753         Reviewed by Dirk Schulze.
2754
2755         Added support for winding to clip() and canvasClip() functions.
2756
2757         No new tests, no change in behavior.
2758
2759         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2760         (WebCore::GraphicsContext::clip): Use passed in winding rule.
2761         (WebCore::GraphicsContext::canvasClip): Rename variable.
2762
2763 2013-01-17  Elliott Sprehn  <esprehn@chromium.org>
2764
2765         Track subframe count to avoid traversing the tree when there's no subframes
2766         https://bugs.webkit.org/show_bug.cgi?id=101821
2767
2768         Reviewed by Ojan Vafai.
2769
2770         Make removeChild 9-14% faster by not walking the descendants looking for
2771         frames when there's known to be no frames.
2772
2773         This is a more generalized version of the fix in Bug 101619 that only
2774         avoided this walk when the whole document had no frames. This patch extends
2775         it to skip traversing subtrees that have no frames by tracking the number of
2776         frames in subtrees and then only walking those subtrees that are known to
2777         contain frames in removeChild.
2778
2779         Test: fast/frames/parser-append-subframe-count.html
2780
2781         * dom/ContainerNode.cpp:
2782         (WebCore::willRemoveChildren):
2783         (WebCore::parserAppendChild):
2784         (WebCore::parserRemoveChild):
2785         (WebCore::parserInsertBefore):
2786             The parser may move nodes without doing frame disconnection so we
2787             must maintain the connected subframe count manually during these
2788             mutations.
2789         * dom/ContainerNodeAlgorithms.cpp:
2790         (WebCore::ChildFrameDisconnector::collectFrameOwners):
2791         * dom/ContainerNodeAlgorithms.h:
2792         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
2793         (ChildFrameDisconnector):
2794         (WebCore::ChildFrameDisconnector::collectFrameOwners):
2795           Renamed from collectDescendant() to better reflect what it really does.
2796         (WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners):
2797           Renamed from disconnect() to better reflect what it really does.
2798         (WebCore::ChildFrameDisconnector::disconnect):
2799           New method that does the collection of frame owners on either the root
2800           or only it's descendants.
2801         * dom/Node.cpp:
2802         (WebCore::Node::connectedSubframeCount):
2803         (WebCore::Node::incrementConnectedSubframeCount):
2804         (WebCore::Node::decrementConnectedSubframeCount):
2805         * dom/Node.h:
2806         * dom/NodeRareData.h:
2807         (WebCore::NodeRareData::NodeRareData):
2808         (WebCore::NodeRareData::connectedSubframeCount):
2809         (WebCore::NodeRareData::incrementConnectedSubframeCount):
2810         (WebCore::NodeRareData::decrementConnectedSubframeCount):
2811         * html/HTMLFrameOwnerElement.cpp:
2812         (WebCore::HTMLFrameOwnerElement::setContentFrame):
2813         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
2814
2815 2013-01-17  Tim Horton  <timothy_horton@apple.com>
2816
2817         [WK2] Minimum layout width auto-sizing should use FrameView::enableAutoSizeMode so that it can shrink the viewport
2818         https://bugs.webkit.org/show_bug.cgi?id=107200
2819         <rdar://problem/12849029>
2820
2821         Reviewed by Simon Fraser.
2822
2823         * WebCore.exp.in: Export FrameView::enableAutoSize(...).
2824
2825 2013-01-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2826
2827         Unreviewed, rolling out r139402.
2828         http://trac.webkit.org/changeset/139402
2829         https://bugs.webkit.org/show_bug.cgi?id=107212
2830
2831         Perf regression on DOMDivWalk (Requested by falken_ on
2832         #webkit).
2833
2834         * dom/Element.cpp:
2835         (WebCore::Element::removedFrom):
2836         (WebCore::Element::setIsInTopLayer):
2837
2838 2013-01-17  Adam Barth  <abarth@webkit.org>
2839
2840         BackgroundHTMLParser should go 18% faster on html-parser-srcdoc benchmark
2841         https://bugs.webkit.org/show_bug.cgi?id=107201
2842
2843         Reviewed by Tony Gentilcore.
2844
2845         Prior to this patch, we would tokenize all the input before delivering
2846         any tokens to the main thread. Effectively, that prevented the
2847         background parser from running in parallel with the main thread.
2848
2849         This patch causes us to send tokens to the main thread periodically.
2850         The constant in this patch is somewhat arbitrary. We'll need to tune it
2851         later with more realistic workloads.
2852
2853         This patch improves the performance of the html-parser-srcdoc benchmark
2854         by 18%. (This patch is based on Eric's work in
2855         https://github.com/tonygentilcore/webkit/commit/072331194520c7770b5e34baefbbbba948834971.)
2856
2857         * html/parser/BackgroundHTMLParser.cpp:
2858         (WebCore):
2859         (WebCore::BackgroundHTMLParser::pumpTokenizer):
2860         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
2861
2862 2013-01-17  Matt Falkenhagen  <falken@chromium.org>
2863
2864         Top layer fails for inline elements
2865         https://bugs.webkit.org/show_bug.cgi?id=106538
2866
2867         Reviewed by Hajime Morita.
2868
2869         This patch makes position 'static' and 'relative' compute to
2870         'absolute' for elements in the top layer, as mandated by the
2871         Fullscreen spec.[1] By doing so, we also fix a crash that occurred in
2872         RenderLayer::rebuildZOrderLists when an inline element wrapped in an
2873         anonymous block was added to the top layer.
2874
2875         [1]: http://fullscreen.spec.whatwg.org/#new-stacking-layer
2876
2877         Tests: fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position.html
2878                fast/dom/HTMLDialogElement/top-layer-position-relative.html
2879                fast/dom/HTMLDialogElement/top-layer-position-static.html
2880
2881         * css/StyleResolver.cpp:
2882         (WebCore::StyleResolver::adjustRenderStyle): Set position 'absolute'
2883         for an element in the top layer. Typically, absolutely positioned
2884         elements also automatically get display 'block', but it seems we must do
2885         that manually here. We require display 'block' to ensure the renderer is not
2886         considered inline and consequently wrapped in an anonymous block.
2887         * rendering/RenderLayer.cpp:
2888         (WebCore::RenderLayer::rebuildZOrderLists): Check node() so we don't
2889         crash on, e.g., an anonymous block. We don't expect top layer
2890         renderers to have anonymous blocks anymore, but we nevertheless
2891         shouldn't crash if some other renderer is parented by RenderView.
2892
2893 2013-01-17  Simon Fraser  <simon.fraser@apple.com>
2894
2895         Fix crash accessing RenderView's layer's backing when not composited
2896         https://bugs.webkit.org/show_bug.cgi?id=107203
2897
2898         Reviewed by Benjamin Poulain.
2899
2900         The RenderView isn't always layer-backed in WebKit1, so null-check the backing.
2901
2902         * rendering/RenderLayerCompositor.cpp:
2903         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
2904
2905 2013-01-16  Ryosuke Niwa  <rniwa@webkit.org>
2906
2907         Remove NodeListsNodeData when it's no longer needed
2908         https://bugs.webkit.org/show_bug.cgi?id=107074
2909
2910         Reviewed by Darin Adler.
2911
2912         Remove NodeListsNodeData when the last node list is removed from it.
2913
2914         If we detect that we have only one node list left in the data structure,
2915         we'll simply destroy the entire "this" object to free up the memory space.
2916
2917         This reduced the memory usage of the micro benchmark by roughly 3%.
2918
2919         Performance Tests: DOM/TraverseChildNodes.html
2920
2921         * dom/Node.cpp:
2922         (WebCore::Node::clearNodeLists): Added.
2923         * dom/Node.h:
2924         * dom/NodeRareData.h:
2925         (WebCore::NodeListsNodeData::removeChildNodeList):
2926         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
2927         (WebCore::NodeListsNodeData::removeCacheWithName):
2928         (WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
2929         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList): Added.
2930         Removes "this" NodeListsNodeData if there is only one node list left.
2931
2932 2013-01-17  Abhishek Arya  <inferno@chromium.org>
2933
2934         Heap-use-after-free in WebCore::RenderBlock::checkFloatsInCleanLine
2935         https://bugs.webkit.org/show_bug.cgi?id=90802
2936
2937         Reviewed by Julien Chaffraix.
2938
2939         Test: fast/multicol/float-not-removed-crash.html
2940
2941         * rendering/RenderBoxModelObject.cpp:
2942         (WebCore::RenderBoxModelObject::moveChildrenTo):
2943         1. When fullRemoveInsert is True, make sure to clear the
2944         floating objects from our list (similar to positioned objects).
2945         Our children are getting moved to another block and we won't
2946         get notified when they are going away.
2947         2. Remove the redundant hasPositionedObjects check since it
2948         is already done inside removePositionedObjects.
2949
2950 2013-01-17  Simon Fraser  <simon.fraser@apple.com>
2951
2952         Make it possible for the root background to be painted into its own GraphicsLayer
2953         https://bugs.webkit.org/show_bug.cgi?id=107177
2954
2955         Reviewed by Dave Hyatt.
2956         
2957         Make it possible to paint the root background into its own GraphicsLayer, and enable
2958         this when the root background has background-images that are all background-attachment: fixed.
2959         
2960         This is a step towards optimizing scrolling on pages with fixed root backgrounds.        
2961
2962         Tests: platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer.html
2963                platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html.html
2964                platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html.html
2965                platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed.html
2966                platform/mac/tiled-drawing/fixed-background/fixed-body-background.html
2967                platform/mac/tiled-drawing/fixed-background/fixed-html-background.html
2968                platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background.html
2969
2970         * rendering/PaintInfo.h:
2971         (WebCore::PaintInfo::skipRootBackground): Utility function to check the paintBehavior flag.
2972         (WebCore::PaintInfo::paintRootBackgroundOnly): Ditto.
2973         * rendering/PaintPhase.h: New paint behavior flags to indicate that we should skip painting
2974         the root background, and only paint the root background.
2975         * rendering/RenderBlock.cpp:
2976         (WebCore::RenderBlock::paint): When we're only painting the root background, avoid painting column
2977         rules, and bail early.
2978         (WebCore::RenderBlock::paintObject): Don't paint children if we're just painting the root background.
2979         * rendering/RenderBox.cpp:
2980         (WebCore::RenderBox::styleWillChange): If this box can paint the root background, tell the compositor
2981         when the fixedness of those backgrounds changes.
2982         (WebCore::RenderBox::paintRootBoxFillLayers): If the paintBehavior flag is set to skip painting the root
2983         background, bail. This will be true for the non-background GraphicsLayers which are painting the root.
2984         * rendering/RenderLayer.cpp:
2985         (WebCore::RenderLayer::paintLayerContents): We can bail early if we're not a root-like renderer and the
2986         flag is set to paint the root background only. This avoids walking the whole layer tree when just painting
2987         into the root background GraphicsLayer.
2988         Migrate layer paint flags into PaintBehavior flags, and use them.
2989         * rendering/RenderLayer.h: Layer painting flags that replicate the paintBehavior flags.
2990         * rendering/RenderLayerBacking.cpp:
2991         (WebCore::RenderLayerBacking::RenderLayerBacking): Init the m_backgroundLayerPaintsFixedRootBackground bit.
2992         (WebCore::RenderLayerBacking::~RenderLayerBacking): Clear the background layer.
2993         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): No need to handle the transparent background
2994         stuff here. We'll do it later in updateRootLayerConfiguration().
2995         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Actually make a background layer now
2996         if the compositor says we should.
2997         Call updateRootLayerConfiguration() to adjust the background color and opaqueness of the background/primary layers.
2998         (WebCore::RenderLayerBacking::updateInternalHierarchy): Parent the m_backgroundLayer in the containment layer,
2999         not m_graphicsLayer (this is a bug fix).
3000         (WebCore::RenderLayerBacking::updateDrawsContent):
3001         (WebCore::RenderLayerBacking::setBackgroundLayerPaintsFixedRootBackground):
3002         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
3003         (WebCore::RenderLayerBacking::updateBackgroundColor): This no longer needs to update the tile cache
3004         background color; updateRootLayerConfiguration() does this now.
3005         (WebCore::RenderLayerBacking::updateRootLayerConfiguration): Update the opaqueness and background color
3006         of the background and/or main graphics layers.
3007         (WebCore::RenderLayerBacking::setContentsNeedDisplay): Invalidate the background layer if we have one.
3008         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Invalidate the background layer if we have one.
3009         This will be optimized to only repaint the background if it was the background that changed.
3010         (WebCore::RenderLayerBacking::paintIntoLayer): Take a GraphicsLayer, not a RenderLayer argument.
3011         Adjust the paintFlags if we're being asked to paint the background layer, or if we have one, but are painting the foreground.
3012         (WebCore::RenderLayerBacking::paintContents):
3013         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
3014         (WebCore::RenderLayerBacking::reportMemoryUsage):
3015         * rendering/RenderLayerBacking.h:
3016         (WebCore::RenderLayerBacking::backgroundLayer):
3017         (WebCore::RenderLayerBacking::backgroundLayerPaintsFixedRootBackground):
3018         (RenderLayerBacking):
3019         * rendering/RenderLayerCompositor.cpp:
3020         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): If we're told that the fixed-ness of
3021         the root background changed and we're using a TileCache, we need to re-evaluate compositing (this could be
3022         optimized to only update the root layer).
3023         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer): For the root (RenderView's) layer,
3024         check whether the renderer that will paint the root (taking background propagation into account) has
3025         background images that are all fixed.
3026         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayer): Accessor for the GraphicsLayer that paints
3027         the root background (will be used later).
3028         * rendering/RenderLayerCompositor.h:
3029         (RenderLayerCompositor):
3030         * rendering/RenderObject.cpp:
3031         (WebCore::RenderObject::hasEntirelyFixedBackground): Returns true there are background images
3032         and all are fixed.
3033         * rendering/RenderObject.h:
3034         * rendering/RenderView.cpp:
3035         (WebCore::RenderView::paintBoxDecorations): This function paints a solid color if we know that the root
3036         isn't going to fill the viewport; we want to avoid this painting if we're not painting the root background
3037         in this pass.
3038         * rendering/style/RenderStyle.cpp:
3039         (WebCore::allLayersAreFixed):
3040         (WebCore::RenderStyle::hasEntirelyFixedBackground): New helper function.
3041         * rendering/style/RenderStyle.h:
3042
3043 2013-01-17  Rafael Weinstein  <rafaelw@chromium.org>
3044
3045         [Template] Avoid reading beyond the end of the buffer in preload scanner when check for </template>
3046         https://bugs.webkit.org/show_bug.cgi?id=107143
3047
3048         Reviewed by Adam Barth.
3049
3050         This patch corrects to use AtomicString constructor which takes an explicit size. Additionally, the logic
3051         for exiting early is slightly improved.
3052
3053         No new tests.
3054
3055         * html/parser/HTMLPreloadScanner.cpp:
3056         (WebCore::PreloadTask::PreloadTask):
3057         (WebCore::HTMLPreloadScanner::processToken):
3058
3059 2013-01-17  Huang Dongsung  <luxtella@company100.net>
3060
3061         [TexMap] Match initializing members in GraphicsLayerTransform to initializing members in GraphicsLayer.
3062         https://bugs.webkit.org/show_bug.cgi?id=107090
3063
3064         Reviewed by Noam Rosenthal.
3065
3066         GraphicsLayer initializes m_anchorPoint to FloatPoint3D(0.5, 0.5, 0) and
3067         m_preserves3D to false, while GraphicsLayerTransform initializes m_anchorPoint
3068         to FloatPoint3D(0, 0, 0) and m_flattening (= !m_preserves3D) to false. It is a
3069         potential bug. This patch corrects initialization of GraphicsLayerTransform.
3070
3071         Covered by existing compositing pixel tests.
3072
3073         * platform/graphics/GraphicsLayerTransform.cpp:
3074         (WebCore::GraphicsLayerTransform::GraphicsLayerTransform):
3075
3076 2013-01-17  Filip Pizlo  <fpizlo@apple.com>
3077
3078         ScriptDebugServer::didExecuteProgram should not try to pop stack if there is no stack to pop
3079         https://bugs.webkit.org/show_bug.cgi?id=107186
3080
3081         Reviewed by Geoffrey Garen.
3082
3083         No new tests, because I'm not sure how to test this. I can repro it on a gnarly web site,
3084         but I don't know how to create a reduced case that triggers it.
3085
3086         * bindings/js/ScriptDebugServer.cpp:
3087         (WebCore::ScriptDebugServer::didExecuteProgram):
3088
3089 2013-01-17  Michael Pruett  <michael@68k.org>
3090
3091         [GTK] IndexedDB: Add LevelDB headers to include path if IndexedDB is enabled
3092         https://bugs.webkit.org/show_bug.cgi?id=107181
3093
3094         Reviewed by Martin Robinson.
3095
3096         No new tests as this is just a build change.
3097
3098         * GNUmakefile.am:
3099
3100 2013-01-17  Eric Seidel  <eric@webkit.org>
3101
3102         The threaded html parser hangs when parsing empty documents (and about:blank)
3103         https://bugs.webkit.org/show_bug.cgi?id=107160
3104
3105         Reviewed by Tony Gentilcore.
3106
3107         This is covered by many existing tests including the html5lib suite.
3108
3109         * html/parser/HTMLDocumentParser.cpp:
3110         (WebCore::HTMLDocumentParser::finish):
3111
3112 2013-01-17  Alexis Hetu  <sugoi@chromium.org>
3113
3114         imageSmoothingEnabled frequent, unpredictable crashes
3115         https://bugs.webkit.org/show_bug.cgi?id=107161
3116
3117         Reviewed by Stephen White.
3118
3119         Added a NULL pointer check to fix a crash.
3120
3121         Test: fast/canvas/canvas-imageSmoothingEnabled-zero-size.html
3122
3123         * html/canvas/CanvasRenderingContext2D.cpp:
3124         (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled):
3125
3126 2013-01-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3127
3128         Unreviewed, rolling out r140049.
3129         http://trac.webkit.org/changeset/140049
3130         https://bugs.webkit.org/show_bug.cgi?id=107187
3131
3132         Breaks lots of stuff (Requested by schenney on #webkit).
3133
3134         * svg/SVGViewSpec.cpp:
3135         (WebCore::SVGViewSpec::setPreserveAspectRatioString):
3136         (WebCore):
3137         (WebCore::SVGViewSpec::viewTarget):
3138         (WebCore::SVGViewSpec::transform):
3139         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
3140         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
3141         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
3142         * svg/SVGViewSpec.h:
3143         (SVGViewSpec):
3144         (WebCore::SVGViewSpec::viewBoxAnimated):
3145         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
3146         * svg/SVGViewSpec.idl:
3147
3148 2013-01-17  Eric Seidel  <eric@webkit.org>
3149
3150         Threaded parser hangs when encountering an unmatched </script> tag
3151         https://bugs.webkit.org/show_bug.cgi?id=107170
3152
3153         Reviewed by Adam Barth.
3154
3155         The bug was that the BackgroundHTMLParser naively yields to the
3156         main thread every time it encounters a </script>
3157         (as we may have to run script on the main thread).  However, not every
3158         </script> results in script execution, so the main thread needs to know
3159         how to tell the BackgroundHTMLParser to continue in cases where no
3160         script execution is needed.
3161
3162         This whole infrastructure will be replaced when we let the BackgroundHTMLParser
3163         continue speculatively tokenizing after yielding.
3164
3165         * html/parser/BackgroundHTMLParser.cpp:
3166         (WebCore::TokenDelivery::TokenDelivery):
3167         (TokenDelivery):
3168         (WebCore::TokenDelivery::execute):
3169         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
3170         * html/parser/HTMLDocumentParser.cpp:
3171         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
3172         * html/parser/HTMLDocumentParser.h:
3173         (HTMLDocumentParser):
3174
3175 2013-01-17  Eric Seidel  <eric@webkit.org>
3176
3177         Stop the background parser when canceling parsing to avoid crashing on many layout tests
3178         https://bugs.webkit.org/show_bug.cgi?id=107159
3179
3180         Reviewed by Adam Barth.
3181
3182         Covered by many existing tests.
3183
3184         * html/parser/HTMLDocumentParser.cpp:
3185         (WebCore::HTMLDocumentParser::stopParsing):
3186
3187 2013-01-17  Stephen Chenney  <schenney@chromium.org>
3188
3189         SVGViewSpec fails when corresponding element has been removed
3190         https://bugs.webkit.org/show_bug.cgi?id=106957
3191
3192         Reviewed by Dirk Schulze.
3193
3194         When JS holds an SVGViewSpec object while deleting the object that
3195         defines the spec (an SVGSVGElement, or one of a few others) the
3196         pointer to the target is cleared in the SVGViewSpec but the methods
3197         that serve JS queries do not check and try to access the now null
3198         target. This atch fixes the prooblem, throwing JS exceptions where
3199         possible and returning null where necessary.
3200
3201         Test: svg/dom/SVGViewSpec-invalid-ref-crash.html
3202
3203         * svg/SVGViewSpec.cpp:
3204         (WebCore):
3205         (WebCore::SVGViewSpec::viewTarget): Check for null target and throw an exception.
3206         (WebCore::SVGViewSpec::transform): Check for null target and return
3207         null. It is not possible to throw an exception here because it leads
3208         to an invalid cast in the code generated from IDLs.
3209         (WebCore::SVGViewSpec::viewBoxAnimated): Check for null target and throw an exception.
3210         (WebCore::SVGViewSpec::preserveAspectRatioAnimated): Check for null target and throw an exception.
3211         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): ASSERT non-null target
3212         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): ASSERT non-null target
3213         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): ASSERT non-null target
3214         * svg/SVGViewSpec.h:
3215         (SVGViewSpec): Add Exception arguments to getter methods.
3216         * svg/SVGViewSpec.idl: Mark attributes as throwing exceptions.
3217
3218 2013-01-17  Alec Flett  <alecflett@chromium.org>
3219
3220         IndexedDB: Remove unnecessary call to IDBDatabaseBackendInterface::metadata()
3221         https://bugs.webkit.org/show_bug.cgi?id=107142
3222
3223         Reviewed by Kentaro Hara.
3224
3225         This call isn't necessary, and probably slipped through an earlier review
3226         because of the mention of 'm_metadata'.
3227
3228         No new tests, as this code has no side effects and all tests sill pass.
3229
3230         * Modules/indexeddb/IDBIndex.cpp:
3231         (WebCore::IDBIndex::count):
3232
3233 2013-01-17  Ojan Vafai  <ojan@chromium.org>
3234
3235         Table layout does not need to explicitly call computePreferredLogicalWidths
3236         https://bugs.webkit.org/show_bug.cgi?id=106931
3237
3238         Reviewed by Julien Chaffraix.
3239
3240         Code shouldn't need to explicitly call computePreferredLogicalWidths.
3241         It should only get called as a by-product of calling minPreferredLogicalWidth
3242         or maxPreferredLogicalWidth.
3243
3244         Instead, make it clear that the calling code is just trying to clear
3245         preferred width dirty bits.
3246
3247         * rendering/AutoTableLayout.cpp:
3248         (WebCore::AutoTableLayout::recalcColumn):
3249         The computePreferredLogicalWidths call on the table cell is redundant
3250         with the minPreferredLogicalWidth call on the next line.
3251
3252         * rendering/FixedTableLayout.cpp:
3253         (WebCore::FixedTableLayout::calcWidthArray):
3254         We only need to clear the dirty bit here. Table cells don't use
3255         their preferred widths in fixed table layout calculations.
3256
3257         * rendering/RenderTableCell.h:
3258         * rendering/RenderTableCol.cpp:
3259         (WebCore::RenderTableCol::clearPreferredLogicalWidthsDirtyBits):
3260         * rendering/RenderTableCol.h:
3261
3262 2013-01-17  Julien Chaffraix  <jchaffraix@webkit.org>
3263
3264         [CSS Grid Layout] Updating -webkit-grid-rows or -webkit-grid-columns doesn't work as expected
3265         https://bugs.webkit.org/show_bug.cgi?id=107062
3266
3267         Reviewed by Tony Chang.
3268
3269         Tests: fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update.html
3270                fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update.html
3271
3272         This change makes -webkit-grid-rows and -webkit-grid-columns dynamic change properly
3273         relayout their children, thus making them work!
3274
3275         * rendering/RenderGrid.cpp:
3276         (WebCore::RenderGrid::layoutGridItems):
3277         Fixed the logic to force a grid item relayout if the grid area size changes. This is the
3278         safest approach as margins or paddings can also be a percent of the grid area's size.
3279
3280         * rendering/style/RenderStyle.cpp:
3281         (WebCore::RenderStyle::diff):
3282         Fixed a dumb mistake.
3283
3284 2013-01-17  Timothy Hatcher  <timothy@apple.com>
3285
3286         Make logging console messages to STDOUT work in WebKit2 via a new setting.
3287
3288         https://bugs.webkit.org/show_bug.cgi?id=107157
3289
3290         Reviewed by Joseph Pecoraro.
3291
3292         * page/Console.cpp:
3293         (WebCore::Console::addMessage): Check logsPageMessagesToSystemConsoleEnabled(). 
3294         (WebCore::internalAddMessage): Ditto. Refactored to return early and drop printExceptions argument.
3295         (WebCore::Console::error): Removed call to shouldPrintExceptions().
3296         (WebCore::Console::log): Ditto.
3297         (WebCore::Console::warn): Ditto.
3298         (WebCore::Console::dir): Ditto.
3299         (WebCore::Console::dirxml): Ditto.
3300         (WebCore::Console::clear): Ditto.
3301         (WebCore::Console::trace): Ditto.
3302         (WebCore::Console::assertCondition): Ditto.
3303         * page/Settings.in: Added logsPageMessagesToSystemConsoleEnabled.
3304
3305 2013-01-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3306
3307         Unreviewed, rolling out r140023.
3308         http://trac.webkit.org/changeset/140023
3309         https://bugs.webkit.org/show_bug.cgi?id=107176
3310
3311         Broke some tests (Requested by anttik on #webkit).
3312
3313         * page/FrameView.cpp:
3314         (WebCore::FrameView::updateScrollCorner):
3315         * rendering/RenderBlock.cpp:
3316         (WebCore::RenderBlock::createReplacementRunIn):
3317         (WebCore::RenderBlock::updateFirstLetterStyle):
3318         (WebCore::RenderBlock::createFirstLetterRenderer):
3319         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
3320         (WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer):
3321         (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer):
3322         * rendering/RenderBlock.h:
3323         (RenderBlock):
3324         * rendering/RenderDeprecatedFlexibleBox.cpp:
3325         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
3326         * rendering/RenderDeprecatedFlexibleBox.h:
3327         (RenderDeprecatedFlexibleBox):
3328         * rendering/RenderDetailsMarker.cpp:
3329         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
3330         * rendering/RenderDetailsMarker.h:
3331         (RenderDetailsMarker):
3332         * rendering/RenderDialog.h:
3333         (WebCore::RenderDialog::RenderDialog):
3334         * rendering/RenderFieldset.cpp:
3335         (WebCore::RenderFieldset::RenderFieldset):
3336         * rendering/RenderFieldset.h:
3337         (RenderFieldset):
3338         * rendering/RenderFlexibleBox.cpp:
3339         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
3340         * rendering/RenderFlexibleBox.h:
3341         (RenderFlexibleBox):
3342         * rendering/RenderFlowThread.cpp:
3343         (WebCore::RenderFlowThread::RenderFlowThread):
3344         * rendering/RenderFlowThread.h:
3345         * rendering/RenderFullScreen.cpp:
3346         (RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
3347         (RenderFullScreen::RenderFullScreen):
3348         (RenderFullScreen::wrapRenderer):
3349         * rendering/RenderFullScreen.h:
3350         (RenderFullScreen):
3351         * rendering/RenderGrid.cpp:
3352         (WebCore::RenderGrid::RenderGrid):
3353         * rendering/RenderGrid.h:
3354         (RenderGrid):
3355         * rendering/RenderImage.cpp:
3356         (WebCore::RenderImage::RenderImage):
3357         * rendering/RenderImage.h:
3358         (RenderImage):
3359         * rendering/RenderInline.cpp:
3360         (WebCore::RenderInline::RenderInline):
3361         (WebCore::RenderInline::addChildIgnoringContinuation):
3362         * rendering/RenderInline.h:
3363         (RenderInline):
3364         * rendering/RenderLayer.cpp:
3365         (WebCore::RenderLayer::updateScrollCornerStyle):
3366         (WebCore::RenderLayer::updateResizerStyle):
3367         (WebCore::RenderLayer::createReflection):
3368         * rendering/RenderListItem.cpp:
3369         (WebCore::RenderListItem::RenderListItem):
3370         (WebCore::RenderListItem::styleDidChange):
3371         * rendering/RenderListItem.h:
3372         (RenderListItem):
3373         * rendering/RenderListMarker.cpp:
3374         (WebCore::RenderListMarker::RenderListMarker):
3375         * rendering/RenderListMarker.h:
3376         (RenderListMarker):
3377         * rendering/RenderMediaControlElements.cpp:
3378         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
3379         (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
3380         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
3381         * rendering/RenderMediaControlElements.h:
3382         (RenderMediaVolumeSliderContainer):
3383         (RenderMediaControlTimeDisplay):
3384         (RenderTextTrackContainerElement):
3385         * rendering/RenderMultiColumnBlock.cpp:
3386         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
3387         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
3388         * rendering/RenderMultiColumnBlock.h:
3389         (RenderMultiColumnBlock):
3390         * rendering/RenderMultiColumnFlowThread.cpp:
3391         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
3392         * rendering/RenderMultiColumnFlowThread.h:
3393         (RenderMultiColumnFlowThread):
3394         * rendering/RenderMultiColumnSet.cpp:
3395         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3396         * rendering/RenderMultiColumnSet.h:
3397         (RenderMultiColumnSet):
3398         * rendering/RenderNamedFlowThread.cpp:
3399         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3400         * rendering/RenderNamedFlowThread.h:
3401         (RenderNamedFlowThread):
3402         * rendering/RenderObject.cpp:
3403         (WebCore::RenderObject::RenderObject):
3404         * rendering/RenderObject.h:
3405         (WebCore::RenderObject::setIsAnonymous):
3406         (RenderObject):
3407         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
3408         * rendering/RenderRegion.cpp:
3409         (WebCore::RenderRegion::RenderRegion):
3410         * rendering/RenderRegion.h:
3411         (RenderRegion):
3412         * rendering/RenderRegionSet.cpp:
3413         (WebCore::RenderRegionSet::RenderRegionSet):
3414         * rendering/RenderRegionSet.h:
3415         (RenderRegionSet):
3416         * rendering/RenderReplaced.cpp:
3417         (WebCore::RenderReplaced::RenderReplaced):
3418         * rendering/RenderReplaced.h:
3419         (RenderReplaced):
3420         * rendering/RenderReplica.cpp:
3421         (WebCore::RenderReplica::RenderReplica):
3422         * rendering/RenderReplica.h:
3423         (RenderReplica):
3424         * rendering/RenderRuby.cpp:
3425         (WebCore::createAnonymousRubyInlineBlock):
3426         (WebCore::RenderRubyAsInline::RenderRubyAsInline):
3427         (WebCore):
3428         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
3429         * rendering/RenderRuby.h:
3430         (RenderRubyAsInline):
3431         (RenderRubyAsBlock):
3432         * rendering/RenderRubyBase.cpp:
3433         (WebCore::RenderRubyBase::RenderRubyBase):
3434         * rendering/RenderRubyBase.h:
3435         (RenderRubyBase):
3436         * rendering/RenderRubyRun.cpp:
3437         (WebCore::RenderRubyRun::RenderRubyRun):
3438         (WebCore::RenderRubyRun::createRubyBase):
3439         (WebCore::RenderRubyRun::staticCreateRubyRun):
3440         * rendering/RenderRubyRun.h:
3441         (RenderRubyRun):
3442         * rendering/RenderRubyText.cpp:
3443         (WebCore::RenderRubyText::RenderRubyText):
3444         * rendering/RenderRubyText.h:
3445         (RenderRubyText):
3446         * rendering/RenderScrollbar.cpp:
3447         (WebCore::RenderScrollbar::updateScrollbarPart):
3448         * rendering/RenderScrollbarPart.cpp:
3449         (WebCore::RenderScrollbarPart::RenderScrollbarPart):
3450         * rendering/RenderScrollbarPart.h:
3451         (RenderScrollbarPart):
3452         * rendering/RenderSearchField.cpp:
3453         (WebCore::RenderSearchField::RenderSearchField):
3454         * rendering/RenderSearchField.h: