[chromium] rename newwtf target back to wtf
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-23  Tony Chang  <tony@chromium.org>
2
3         [chromium] rename newwtf target back to wtf
4         https://bugs.webkit.org/show_bug.cgi?id=82064
5
6         Reviewed by Adam Barth.
7
8         No new tests, only renaming a build target.
9
10         * WebCore.gyp/WebCore.gyp:
11
12 2012-03-23  Adrienne Walker  <enne@google.com>
13
14         [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
15         https://bugs.webkit.org/show_bug.cgi?id=82066
16
17         Reviewed by James Robinson.
18
19         With threaded compositing, OSX will crash and Windows will have black
20         scrollbars. Fix that by reverting to the previosu behavior of updating
21         scrollbars on the main thread instead.
22
23         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
24         (WebCore::scrollbarLayerDidChange):
25
26 2012-03-23  Dan Bernstein  <mitz@apple.com>
27
28         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
29         https://bugs.webkit.org/show_bug.cgi?id=81351
30
31         Rubber-stamped by Jessie Berlin.
32
33         * page/animation/AnimationBase.cpp:
34         (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that
35         the issue is still noticeable, but it does not automatically make the debug bots red.
36
37 2012-03-23  Mike Lawther  <mikelawther@chromium.org>
38
39         CSS3 calc: image sizing works with mixed percentage/absolute
40         https://bugs.webkit.org/show_bug.cgi?id=82017
41
42         Reviewed by Ojan Vafai.
43
44         Test: css3/calc/img-size-expected.html
45
46         * rendering/RenderBox.cpp:
47         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
48         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
49
50 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
51
52         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
53         https://bugs.webkit.org/show_bug.cgi?id=81826
54
55         Reviewed by Tony Chang.
56
57         Covered by tables/mozilla/bugs/bug27038-{1|2}.html.
58
59         This partly reverts r107971: the extra logical height distribution change was not needed
60         to fix the bug (it is needed by the test though). We revert to giving all the extra height
61         to the first tbody and not the first section.
62
63         This is broken but unfortunately some websites are relying on that. Getting a real
64         distribution algorithm is covered by bug 81824. However this is super tricky to get
65         right and I did not want to add more compatibility risks until I have something solid.
66
67         * rendering/RenderTable.cpp:
68         (WebCore::RenderTable::distributeExtraLogicalHeight):
69
70 2012-03-23  Xingnan Wang  <xingnan.wang@intel.com>
71
72         Optimize for IPP in DirectConvolver::process()
73         https://bugs.webkit.org/show_bug.cgi?id=80255
74
75         Reviewed by Chris Rogers.
76
77         Increase ~2X performance by conv() in IPP.
78
79         * platform/audio/DirectConvolver.cpp:
80         (WebCore::DirectConvolver::DirectConvolver):
81         (WebCore::DirectConvolver::process):
82         * platform/audio/DirectConvolver.h:
83         (DirectConvolver):
84
85 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
86
87         MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback
88         https://bugs.webkit.org/show_bug.cgi?id=81657
89
90         Reviewed by Adam Barth.
91
92         Last major WebCore patch for the JSEP PeerConnection, together with the associated
93         IceCallback (they both depend on each other and IceCallback has very few lines of real code).
94
95         My next patch after this one will do a major overhaul of the existing layout tests
96         and add a few new ones.
97
98         * GNUmakefile.list.am:
99         * Modules/mediastream/DOMWindowMediaStream.idl:
100         * Modules/mediastream/IceCallback.h: Added.
101         (WebCore):
102         (IceCallback):
103         (WebCore::IceCallback::~IceCallback):
104         * Modules/mediastream/IceCallback.idl: Added.
105         * Modules/mediastream/PeerConnection00.cpp: Added.
106         (WebCore):
107         (WebCore::PeerConnection00::create):
108         (WebCore::PeerConnection00::PeerConnection00):
109         (WebCore::PeerConnection00::~PeerConnection00):
110         (WebCore::PeerConnection00::hasLocalAudioTrack):
111         (WebCore::PeerConnection00::hasLocalVideoTrack):
112         (WebCore::PeerConnection00::parseMediaHints):
113         (WebCore::PeerConnection00::createOffer):
114         (WebCore::PeerConnection00::createAnswer):
115         (WebCore::PeerConnection00::setLocalDescription):
116         (WebCore::PeerConnection00::setRemoteDescription):
117         (WebCore::PeerConnection00::localDescription):
118         (WebCore::PeerConnection00::remoteDescription):
119         (WebCore::PeerConnection00::startIce):
120         (WebCore::PeerConnection00::processIceMessage):
121         (WebCore::PeerConnection00::readyState):
122         (WebCore::PeerConnection00::iceState):
123         (WebCore::PeerConnection00::addStream):
124         (WebCore::PeerConnection00::removeStream):
125         (WebCore::PeerConnection00::localStreams):
126         (WebCore::PeerConnection00::remoteStreams):
127         (WebCore::PeerConnection00::close):
128         (WebCore::PeerConnection00::didGenerateIceCandidate):
129         (WebCore::PeerConnection00::didChangeReadyState):
130         (WebCore::PeerConnection00::didChangeIceState):
131         (WebCore::PeerConnection00::didAddRemoteStream):
132         (WebCore::PeerConnection00::didRemoveRemoteStream):
133         (WebCore::PeerConnection00::interfaceName):
134         (WebCore::PeerConnection00::scriptExecutionContext):
135         (WebCore::PeerConnection00::stop):
136         (WebCore::PeerConnection00::eventTargetData):
137         (WebCore::PeerConnection00::ensureEventTargetData):
138         (WebCore::PeerConnection00::changeReadyState):
139         (WebCore::PeerConnection00::changeIceState):
140         * Modules/mediastream/PeerConnection00.h: Added.
141         (WebCore):
142         (PeerConnection00):
143         (WebCore::PeerConnection00::refEventTarget):
144         (WebCore::PeerConnection00::derefEventTarget):
145         * Modules/mediastream/PeerConnection00.idl: Added.
146         * WebCore.gypi:
147         * bindings/generic/RuntimeEnabledFeatures.h:
148         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
149         * bindings/js/JSPeerConnection00Custom.cpp: Added.
150         (WebCore):
151         (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00):
152         * dom/EventTargetFactory.in:
153
154 2012-03-23  Adrienne Walker  <enne@google.com>
155
156         [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
157         https://bugs.webkit.org/show_bug.cgi?id=82062
158
159         Reviewed by James Robinson.
160
161         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
162         (CCScrollbarLayerImpl):
163
164 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
165
166         [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
167         https://bugs.webkit.org/show_bug.cgi?id=81924
168
169         Reviewed by Adam Barth.
170
171         Nothing to test, just moving methods.
172
173         * platform/mediastream/MediaStreamCenter.cpp:
174         (WebCore::MediaStreamCenter::constructSDP):
175         (WebCore):
176
177 2012-03-23  Sami Kyostila  <skyostil@chromium.org>
178
179         Reuse buffer allocation if canvas size does not change
180         https://bugs.webkit.org/show_bug.cgi?id=80871
181
182         Reviewed by Stephen White.
183
184         If the user changes the width or height attributes of a canvas element,
185         the contents of the canvas should be cleared and the context state
186         should be reset. This has become a common idiom to clear the canvas
187         "efficiently" at the start of a frame.
188
189         Previously, this code path triggered a full reallocation of the image
190         buffer backing the canvas, leading to reduced performance. This patch
191         implements an optimization where we reuse the previous image buffer
192         allocation if the size of the canvas did not change. Also, instead of
193         clearing the canvas every time its dimensions are touched, we only clear
194         if anything has been drawn into the canvas since it was previously
195         cleared.
196
197         Note that for now this optimization only applies for 2D canvases,
198         since it is not entirely clear how touching the dimensions of a WebGL
199         canvas should work.
200
201         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
202               existing layout tests for canvas resetting.
203
204         * html/HTMLCanvasElement.cpp:
205         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
206         (WebCore::HTMLCanvasElement::reset):
207         (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial
208         graphics context state so we can restore it without creating a new
209         context.
210         (WebCore::HTMLCanvasElement::clearImageBuffer):
211         (WebCore):
212         (WebCore::HTMLCanvasElement::clearCopiedImage):
213         * html/HTMLCanvasElement.h:
214         (HTMLCanvasElement):
215         * html/canvas/CanvasRenderingContext2D.cpp:
216         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
217         compositor when the context is reset, because clearing the image buffer
218         does the same thing. We can also skip the notification if we did not
219         have an image buffer at the time of the reset, because the reset will
220         not have any visual impact in this case. Finally, if the canvas size
221         did change, the notification is also unnecessary because of the call
222         to RenderObject::repaint() from HTMLCanvasElement::reset().
223
224 2012-03-22  Martin Robinson  <mrobinson@igalia.com>
225
226         Fix some code generation warnings on GTK+.
227
228         Reviewed by Gustavo Noronha Silva.
229
230         No new tests. This just fixes warnings.
231
232         * GNUmakefile.am: Remove nonexistent directories from the list IDL directories.
233
234 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
235
236         Unreviewed, rolling out r111751.
237         http://trac.webkit.org/changeset/111751
238         https://bugs.webkit.org/show_bug.cgi?id=82060
239
240         caused 15% page cycler regression for chromium-linux
241         (Requested by eae on #webkit).
242
243         * css/CSSStyleSelector.cpp:
244         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
245
246 2012-03-23  Kentaro Hara  <haraken@chromium.org>
247
248         Support [ImplementedAs] for attributes
249         https://bugs.webkit.org/show_bug.cgi?id=81605
250
251         Reviewed by Adam Barth.
252
253         [ImplementedAs] just supports methods. [ImplementedAs] should support
254         attributes too.
255
256         Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs
257
258         Test: bindings/scripts/test/TestObj.idl
259
260         * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes.
261         (AttributeNameForGetterAndSetter):
262
263         * bindings/scripts/test/TestObj.idl: Added a test case.
264
265         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
266         (WebDOMTestObj::strawberry):
267         (WebDOMTestObj::setStrawberry):
268         * bindings/scripts/test/CPP/WebDOMTestObj.h:
269         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
270         (webkit_dom_test_obj_get_strawberry):
271         (webkit_dom_test_obj_set_strawberry):
272         (webkit_dom_test_obj_get_property):
273         (webkit_dom_test_obj_class_init):
274         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
275         * bindings/scripts/test/JS/JSTestObj.cpp:
276         (WebCore):
277         (WebCore::jsTestObjStrawberry):
278         (WebCore::setJSTestObjStrawberry):
279         * bindings/scripts/test/JS/JSTestObj.h:
280         (WebCore):
281         * bindings/scripts/test/ObjC/DOMTestObj.h:
282         * bindings/scripts/test/ObjC/DOMTestObj.mm:
283         (-[DOMTestObj strawberry]):
284         (-[DOMTestObj setStrawberry:]):
285         * bindings/scripts/test/V8/V8TestObj.cpp:
286         (WebCore::TestObjInternal::strawberryAttrGetter):
287         (TestObjInternal):
288         (WebCore::TestObjInternal::strawberryAttrSetter):
289         (WebCore):
290
291 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
292
293         The JSC code generator doesn't generate correct code for Constructors
294         https://bugs.webkit.org/show_bug.cgi?id=82046
295
296         Reviewed by Kentaro Hara.
297
298         The main bulk of generated code for constructors uses the name jsConstructor
299         for the created object, and then calls GenerateParametersCheck which generates
300         code that uses the name castedThis.
301
302         * bindings/scripts/CodeGeneratorJS.pm:
303         (GenerateConstructorDefinition):
304         * bindings/scripts/test/JS/JSTestInterface.cpp:
305         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
306         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
307         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
308         * bindings/scripts/test/JS/JSTestObj.cpp:
309         (WebCore::JSTestObjConstructor::finishCreation):
310         (WebCore::JSTestObjConstructor::constructJSTestObj):
311         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
312         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
313         * bindings/scripts/test/TestObj.idl:
314         * bindings/scripts/test/V8/V8TestObj.cpp:
315         (WebCore::V8TestObj::constructorCallback):
316
317 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
318
319         The JSC code generator can't handle boolean arguments for Callbacks
320         https://bugs.webkit.org/show_bug.cgi?id=82045
321
322         Reviewed by Kentaro Hara.
323
324         CodeGeneratorJS.pm only handles DOMStrings and objects as arguments
325         for a Callback, so I added support for boolean values as well.
326
327         * bindings/scripts/CodeGeneratorJS.pm:
328         (GenerateCallbackImplementation):
329         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
330         (WebDOMTestCallback::callbackWithBoolean):
331         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
332         (WebDOMTestCallback):
333         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
334         (webkit_dom_test_callback_callback_with_boolean):
335         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
336         * bindings/scripts/test/JS/JSTestCallback.cpp:
337         (WebCore::JSTestCallback::callbackWithBoolean):
338         (WebCore):
339         * bindings/scripts/test/JS/JSTestCallback.h:
340         (JSTestCallback):
341         * bindings/scripts/test/ObjC/DOMTestCallback.h:
342         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
343         (-[DOMTestCallback callbackWithBoolean:]):
344         * bindings/scripts/test/TestCallback.idl:
345         * bindings/scripts/test/V8/V8TestCallback.cpp:
346         (WebCore::V8TestCallback::callbackWithBoolean):
347         (WebCore):
348         * bindings/scripts/test/V8/V8TestCallback.h:
349         (V8TestCallback):
350
351 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
352
353         Touch adjustment forgets some subtarget quads.
354         https://bugs.webkit.org/show_bug.cgi?id=82044
355
356         Reviewed by Kenneth Rohde Christiansen.
357
358         Do not uncritically skip all nodes that are ancestors to other test results.
359         Instead return the inner-most element if multiple nodes have the same distance.
360
361         Test: touchadjustment/block-testing.html
362
363         * page/TouchAdjustment.cpp:
364         (WebCore::TouchAdjustment::compileSubtargetList):
365         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
366
367 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
368
369         TouchAdjustment does not correct for frame position
370         https://bugs.webkit.org/show_bug.cgi?id=82043
371
372         Reviewed by Kenneth Rohde Christiansen.
373
374         Convert geometry to window coordinates before calculating distance.
375
376         Test: touchadjustment/iframe.html
377
378         * page/TouchAdjustment.cpp:
379         (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
380
381 2012-03-23  Vlad Voicu  <vladv@rosedu.org>
382
383         Fixed minor WebInspector display issue
384         Clicking on disabled sections in Styles Sidebar Pane creates new elements.
385         https://bugs.webkit.org/show_bug.cgi?id=81925
386
387         Reviewed by Timothy Hatcher
388
389         No new tests should be required.
390
391         * inspector/front-end/StylesSidebarPane.js:
392         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
393         (WebInspector.StylePropertyTreeElement.prototype):
394
395 2012-03-23  Kentaro Hara  <haraken@chromium.org>
396
397         Unreviewed, rebaselined run-bindings-tests results.
398
399         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
400         * bindings/scripts/test/CPP/WebDOMTestObj.h:
401         * bindings/scripts/test/JS/JSTestObj.cpp:
402         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
403         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
404         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
405         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
406         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
407         * bindings/scripts/test/V8/V8TestObj.cpp:
408         (WebCore::TestObjInternal::methodWithCallbackArgCallback):
409         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
410         (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback):
411         (WebCore::TestObjInternal::overloadedMethod5Callback):
412         (WebCore::TestObjInternal::overloadedMethodCallback):
413
414 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
415
416         cssText should use StringBuilder
417         https://bugs.webkit.org/show_bug.cgi?id=82028
418
419         Reviewed by Hajime Morita.
420
421         Make StylePropertySet::asText more efficient by deploying StringBuilder;
422         avoids heap churn by String::operator+ and String::operator+=.
423
424         * css/StylePropertySet.cpp:
425         (WebCore::StylePropertySet::asText):
426
427 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
428
429         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
430         https://bugs.webkit.org/show_bug.cgi?id=82035
431
432         Rollout r111754 since it caused a test to fail and the test added by the patch
433         is failing on Mac WebKit 2.
434
435         * WebCore.exp.in:
436         * html/HTMLPlugInElement.cpp:
437         (WebCore::HTMLPlugInElement::detach):
438         (WebCore):
439         (WebCore::HTMLPlugInElement::removedFromDocument):
440         * html/HTMLPlugInElement.h:
441         (HTMLPlugInElement):
442         * testing/Internals.cpp:
443         * testing/Internals.h:
444         (Internals):
445         * testing/Internals.idl:
446
447 2012-03-23  Adam Barth  <abarth@webkit.org>
448
449         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2)
450         https://bugs.webkit.org/show_bug.cgi?id=82026
451
452         Reviewed by Kentaro Hara.
453
454         This patch removes DOMWindow::resetNotifications, which was unneeded
455         special-case logic for clearing the notifications center.  The previous
456         patch that tried to accomplish the same thing did not override
457         willDetachPage, which is why it caused crashes.
458
459         There's actually a cleaner way to handle these cases, which will let us
460         implement reconnectFrame, but that will need to wait for the next
461         patch.
462
463         * notifications/DOMWindowNotifications.cpp:
464         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
465         (WebCore::DOMWindowNotifications::from):
466         (WebCore::DOMWindowNotifications::webkitNotifications):
467         (WebCore):
468         (WebCore::DOMWindowNotifications::disconnectFrame):
469         (WebCore::DOMWindowNotifications::willDetachPage):
470         (WebCore::DOMWindowNotifications::reset):
471         * notifications/DOMWindowNotifications.h:
472         (DOMWindowNotifications):
473         * page/DOMWindow.cpp:
474         (WebCore::DOMWindow::willDetachPage):
475         (WebCore::DOMWindow::disconnectDOMWindowProperties):
476         (WebCore::DOMWindow::clearDOMWindowProperties):
477         * page/DOMWindow.h:
478         (DOMWindow):
479         * page/Frame.cpp:
480         (WebCore::Frame::willDetachPage):
481
482 2012-03-22  Adam Barth  <abarth@webkit.org>
483
484         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1)
485         https://bugs.webkit.org/show_bug.cgi?id=82015
486
487         Reviewed by Kentaro Hara.
488
489         This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to
490         DOMWindowNotificiations.idl in preparation for moving notificiations
491         into Modules.
492
493         A future patch will remove DOMWindow::resetNotificaitions in favor of
494         more general mechanisms.
495
496         * CMakeLists.txt:
497         * DerivedSources.make:
498         * DerivedSources.pri:
499         * GNUmakefile.list.am:
500         * Target.pri:
501         * WebCore.gypi:
502         * WebCore.vcproj/WebCore.vcproj:
503         * WebCore.xcodeproj/project.pbxproj:
504         * notifications/DOMWindowNotifications.cpp: Added.
505         (WebCore):
506         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
507         (WebCore::DOMWindowNotifications::~DOMWindowNotifications):
508         (WebCore::DOMWindowNotifications::from):
509         (WebCore::DOMWindowNotifications::webkitNotifications):
510         (WebCore::DOMWindowNotifications::reset):
511         (WebCore::DOMWindowNotifications::supplementName):
512         * notifications/DOMWindowNotifications.h: Added.
513         (WebCore):
514         (DOMWindowNotifications):
515         * notifications/DOMWindowNotifications.idl: Added.
516         * page/DOMWindow.cpp:
517         (WebCore::DOMWindow::~DOMWindow):
518         (WebCore):
519         (WebCore::DOMWindow::resetNotifications):
520         * page/DOMWindow.h:
521         (WebCore):
522         (DOMWindow):
523         * page/DOMWindow.idl:
524
525 2012-03-22  Li Yin  <li.yin@intel.com>
526
527         A client MUST close a connection if it detects a masked frame
528         https://bugs.webkit.org/show_bug.cgi?id=81361
529
530         Reviewed by Kent Tamura.
531
532         A server must not mask any frames that it sends to the client.
533         Change the test case, not mask the frames from server to client.
534         
535         Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html
536
537         * Modules/websockets/WebSocketChannel.cpp:
538         (WebCore::WebSocketChannel::processFrame):
539
540 2012-03-22  Li Yin  <li.yin@intel.com>
541
542         [WebSocket]The minimal number of bytes MUST be used to encode the length
543         https://bugs.webkit.org/show_bug.cgi?id=81443
544
545         Reviewed by Kent Tamura.
546
547         From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2
548         the minimal number of bytes MUST be used to encode the length
549         
550         New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html
551
552         * Modules/websockets/WebSocketChannel.cpp:
553         (WebCore::WebSocketChannel::parseFrame):
554
555 2012-03-22  Adam Barth  <abarth@webkit.org>
556
557         Unreviewed.  Sort xcodeproj file.
558
559         * WebCore.xcodeproj/project.pbxproj:
560
561 2012-03-22  Mao Yujie  <yujie.mao@intel.com>
562
563         Implement strict testing criterion for callback function definition
564         https://bugs.webkit.org/show_bug.cgi?id=80005
565
566         Reviewed by Adam Barth.
567
568         Callback function should be defined as the function type instead of
569         the object type.
570
571         LayoutTest: fast/dom/MediaStream/argument-types.html
572
573         * bindings/scripts/CodeGeneratorJS.pm:
574         (GenerateParametersCheckExpression):
575         (GenerateParametersCheck):
576         * bindings/scripts/CodeGeneratorV8.pm:
577         (GenerateParametersCheckExpression):
578         (GenerateParametersCheck):
579
580 2012-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
581
582         Convert hasGrammarMarker to use Internals interface
583         https://bugs.webkit.org/show_bug.cgi?id=82004
584
585         Reviewed by Ryosuke Niwa.
586
587         Remove hasGrammarMarker functions, because it is able to work in the
588         cross-port way through the Internals interface.
589
590         No new tests, since we are improving here the infra-structure
591         for testing a specific method.
592
593         * testing/Internals.cpp:
594         (WebCore::Internals::hasGrammarMarker):
595         (WebCore):
596         * testing/Internals.h:
597         (Internals):
598         * testing/Internals.idl:
599
600 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
601
602         Add exception for the setter of "fftSize" in RealtimeAnalyserNode
603         https://bugs.webkit.org/show_bug.cgi?id=81748
604
605         Reviewed by Chris Rogers.
606
607         * Modules/webaudio/RealtimeAnalyser.cpp:
608         (WebCore::RealtimeAnalyser::setFftSize):
609         * Modules/webaudio/RealtimeAnalyser.h:
610         (RealtimeAnalyser):
611         * Modules/webaudio/RealtimeAnalyserNode.cpp:
612         (WebCore::RealtimeAnalyserNode::setFftSize):
613         (WebCore):
614         * Modules/webaudio/RealtimeAnalyserNode.h:
615         (RealtimeAnalyserNode):
616         * Modules/webaudio/RealtimeAnalyserNode.idl:
617
618 2012-03-22  Leo Yang  <leo.yang@torchmobile.com.cn>
619
620         [BlackBerry] Add HistoryItemViewState for BlackBerry port
621         https://bugs.webkit.org/show_bug.cgi?id=81867
622
623         Reviewed by Rob Buis.
624
625         HistoryItemViewState is the blackberry specific field of HistoryItem.
626         It's used to maintain the porting specific view state.
627
628         No new test because the port can't be built yet.
629
630         * history/HistoryItem.h:
631         (HistoryItem):
632         (WebCore::HistoryItem::viewState):
633
634 2012-03-22  SravanKumar Sandela  <ssandela@innominds.com>
635
636         Fieldset unexpectedly stretches to minimum intrinsic width
637         https://bugs.webkit.org/show_bug.cgi?id=79128
638
639         Reviewed by Julien Chaffraix.
640
641         Fieldset element width will now check if css width is specified explicitly
642         before stretching to minimum intrinsic width. The reference
643         can be taken from IE9, instead of FF(FF acknowledged the broken behavior). 
644
645         Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html
646                fast/forms/fieldset-width-nostretch-ifspecified.html
647
648         * rendering/RenderFieldset.cpp:
649         (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth):
650         (WebCore):
651         * rendering/RenderFieldset.h:
652         (RenderFieldset):
653
654 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
655
656         [chromium] Target surface should be damaged for a new layers even when layer had no changes
657         https://bugs.webkit.org/show_bug.cgi?id=81879
658
659         Reviewed by Adrienne Walker.
660
661         Unit test added to CCDamageTrackerTest.
662
663         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
664         (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a
665         boolean arg to detect if the layer is new on this update.
666
667         (WebCore::CCDamageTracker::extendDamageForLayer): added logic that
668         damages the target surface if the layer is new.
669
670         (WebCore::CCDamageTracker::extendDamageForRenderSurface): added
671         logic that damages the target surface if the descendant surface is
672         new; similar logic for the surface's replica if the replica is new.
673
674         * platform/graphics/chromium/cc/CCDamageTracker.h:
675         (CCDamageTracker):
676
677 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
678
679         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
680         https://bugs.webkit.org/show_bug.cgi?id=82000
681
682         Reviewed by Rob Buis.
683
684         Internally reviewed by George Staikos.
685
686         No new tests, BlackBerry porting doesn't build yet upstreaming.
687
688         * history/blackberry/HistoryItemViewState.h:
689         (WebCore::HistoryItemViewState::HistoryItemViewState):
690         (HistoryItemViewState):
691
692 2012-03-22  Adam Klein  <adamk@chromium.org>
693
694         [v8] wrapSlow methods should ref underlying object before creating wrapper
695         https://bugs.webkit.org/show_bug.cgi?id=81919
696
697         Reviewed by Adam Barth.
698
699         Because instatiating the wrapper can trigger GC, it's important that
700         wrapSlow() hold a reference to an object when creating a wrapper for
701         that object. Once the V8 wrapper exists and is associated with the object,
702         the reference can be handed off (via leakRef) to be handled by the normal
703         binding code logic (where derefObject is called if the handle is GCed).
704
705         Binding tests have been updated to reflect this change.
706
707         Testing the change directly is hard. Any test landed today would only
708         be a valid test until V8's logic about when to GC changes, at which point
709         it would become dead weight. So I don't think it's worth landing a
710         layout test along with this.
711
712         * bindings/scripts/CodeGeneratorV8.pm:
713         (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects.
714         (GenerateToV8Converters): Get rid of the explicit call to ref() and
715         instead call leakRef() when adding a RefCounted object to the DOM map.
716         (GetPassRefPtrType): Helper to generate "PassRefPtr<T>", or "PassRefPtr<T<U> >" as appropriate.
717         * bindings/scripts/test/V8/V8Float64Array.cpp:
718         (WebCore::V8Float64Array::wrapSlow):
719         * bindings/scripts/test/V8/V8Float64Array.h:
720         (V8Float64Array):
721         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
722         (WebCore::V8TestActiveDOMObject::wrapSlow):
723         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
724         (V8TestActiveDOMObject):
725         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
726         (WebCore::V8TestCustomNamedGetter::wrapSlow):
727         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
728         (V8TestCustomNamedGetter):
729         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
730         (WebCore::V8TestEventConstructor::wrapSlow):
731         * bindings/scripts/test/V8/V8TestEventConstructor.h:
732         (V8TestEventConstructor):
733         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
734         (WebCore::V8TestEventTarget::wrapSlow):
735         * bindings/scripts/test/V8/V8TestEventTarget.h:
736         (V8TestEventTarget):
737         * bindings/scripts/test/V8/V8TestInterface.cpp:
738         (WebCore::V8TestInterface::wrapSlow):
739         * bindings/scripts/test/V8/V8TestInterface.h:
740         (V8TestInterface):
741         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
742         (WebCore::V8TestMediaQueryListListener::wrapSlow):
743         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
744         (V8TestMediaQueryListListener):
745         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
746         (WebCore::V8TestNamedConstructor::wrapSlow):
747         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
748         (V8TestNamedConstructor):
749         * bindings/scripts/test/V8/V8TestObj.cpp:
750         (WebCore::V8TestObj::wrapSlow):
751         * bindings/scripts/test/V8/V8TestObj.h:
752         (V8TestObj):
753         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
754         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
755         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
756         (V8TestSerializedScriptValueInterface):
757
758 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
759
760         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
761         https://bugs.webkit.org/show_bug.cgi?id=81887
762
763         Reviewed by Rob Buis.
764
765         Fixed SQL issue when clearing table logins and table never_remember.
766
767         No new tests.
768
769         * platform/network/blackberry/CredentialBackingStore.cpp:
770         (WebCore::CredentialBackingStore::clearLogins):
771         (WebCore::CredentialBackingStore::clearNeverRemember):
772
773 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
774
775         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
776         https://bugs.webkit.org/show_bug.cgi?id=80135
777
778         Reviewed by Rob Buis.
779
780         Modified the interface function authenticationChallenge() in class
781         PageClientBlackBerry, moved Credential from return value to the
782         function's reference parameter, and returned a bool to indicate if
783         user pressed Ok button or not.
784         Removed the logic which checks m_currentWebChallenge not null,
785         because we should challenge user again if the last provided credential
786         is not valid; also added the logic that will popup challenge
787         dialog again immediately if user press Ok buttton directly without
788         inputting anything.
789
790         No new tests.
791
792         * platform/blackberry/PageClientBlackBerry.h:
793         * platform/network/blackberry/NetworkJob.cpp:
794         (WebCore::NetworkJob::handleAuthHeader):
795         (WebCore::NetworkJob::sendRequestWithCredentials):
796
797 2012-03-22  Jason Liu  <jason.liu@torchmobile.com.cn>
798
799         [BlackBerry] Synchronize platform/network/blackberry
800         https://bugs.webkit.org/show_bug.cgi?id=81874
801
802         We changed a lot in these files locally. But the changes are not upstreamed.
803         It is not convenient to do the other upstreaming work based on these differences.
804         So upstream these changes.
805
806         Reviewed by Rob Buis.
807
808         No new tests. Just synchronize codes.
809
810         * platform/network/blackberry/NetworkJob.cpp:
811         (WebCore::NetworkJob::NetworkJob):
812         (WebCore::NetworkJob::initialize):
813         (WebCore::NetworkJob::handleNotifyHeaderReceived):
814         (WebCore::NetworkJob::handleNotifyDataReceived):
815         (WebCore::NetworkJob::sendResponseIfNeeded):
816         (WebCore::NetworkJob::sendRequestWithCredentials):
817         (WebCore::NetworkJob::handleAbout):
818         * platform/network/blackberry/NetworkJob.h:
819         (WebCore::NetworkJob::isError):
820         (NetworkJob):
821         * platform/network/blackberry/NetworkManager.cpp:
822         (WebCore::NetworkManager::startJob):
823         * platform/network/blackberry/ResourceRequest.h:
824         (WebCore::ResourceRequest::ResourceRequest):
825         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
826         (WebCore::platformTargetTypeForRequest):
827
828 2012-03-22  Tom Sepez  <tsepez@chromium.org>
829
830         XSS Auditor bypass via script tag src=data:, URLS.
831         https://bugs.webkit.org/show_bug.cgi?id=81948
832
833         Reviewed by Adam Barth.
834
835         This change fixes an XSSAuditor bypass wherby a script with a data: URL src
836         attribute could evade detection by using characters from the page to create
837         a snippet for matching not found in the URL's reflected vector.  This change 
838         terminates the snippet for matching earlier in these cases.
839         
840         Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html
841
842         * html/parser/XSSAuditor.cpp:
843         (WebCore::XSSAuditor::decodedSnippetForAttribute):
844
845 2012-03-22  Dana Jansens  <danakj@chromium.org>
846
847         [chromium] Incorrect assert on animating opacity for a surface
848         https://bugs.webkit.org/show_bug.cgi?id=81994
849
850         Reviewed by Adrienne Walker.
851
852         Draw opacity and animation state match on the surface itself. A
853         surface with animating opacity always has an owning layer without
854         animation, as the surface does the animation for it.
855
856         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
857         (WebCore::CCLayerTreeHost::paintLayerContents):
858
859 2012-03-22  Dana Jansens  <danakj@chromium.org>
860
861         [chromium] Skip frames when checkerboarding an animation
862         https://bugs.webkit.org/show_bug.cgi?id=81716
863
864         Reviewed by Adrienne Walker.
865
866         This will stop drawing frames when prepareToDraw fails, if the draw is
867         not forced. The expected behaviour is outlined below by the unit tests.
868
869         When a draw fails, we:
870         1. Set m_needsRedraw to try again next vsync
871         2. Set m_needsCommit because we need more data from webkit to succeed
872         3. Set m_drawIfPossibleFailed. This allows us to try draw again within
873         the same vsync *if* a commit finishes during this time.
874
875         Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw
876                    CCSchedulerTest.RequestCommitInsideFailedDraw
877                    CCSchedulerTest.NoBeginFrameWhenDrawFails
878                    CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
879                    CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw
880                    CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame
881                    CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame
882                    CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync
883
884         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
885         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
886         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
887         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
888         (CCLayerTreeHostImpl):
889         * platform/graphics/chromium/cc/CCScheduler.cpp:
890         (WebCore::CCScheduler::processScheduledActions):
891         * platform/graphics/chromium/cc/CCScheduler.h:
892         (CCSchedulerClient):
893         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
894         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
895         (WebCore::CCSchedulerStateMachine::nextAction):
896         (WebCore::CCSchedulerStateMachine::updateState):
897         (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted):
898         (WebCore):
899         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
900         (CCSchedulerStateMachine):
901         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
902         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
903         (WebCore):
904         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
905         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
906         * platform/graphics/chromium/cc/CCThreadProxy.h:
907         (CCThreadProxy):
908
909 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
910
911         [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created.
912         https://bugs.webkit.org/show_bug.cgi?id=81968
913
914         Reviewed by Adrienne Walker.
915
916         Added unit test to existing tests for TreeSynchronizer.
917
918         When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as
919         the new CCLayerImpl will default to an empty region.
920
921         * platform/graphics/chromium/LayerChromium.h:
922         (WebCore::LayerChromium::nonFastScrollableRegion):
923         (WebCore::LayerChromium::setNonFastScrollableRegionChanged):
924         * platform/graphics/chromium/TreeSynchronizer.cpp:
925         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
926
927 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
928
929         [CMake] Unreviewed build fix after r111778.
930
931         * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
932         ${WTF_DIR}/wtf ones.
933
934 2012-03-22  Tony Chang  <tony@chromium.org>
935
936         Unreviewed, fix chromium build after wtf move.
937
938         Only use newwtf, remove references to wtf.
939
940         * WebCore.gyp/WebCore.gyp:
941
942 2012-03-22  Benjamin Poulain  <bpoulain@apple.com>
943
944         Remove an obsolete comment regarding magic frames from Geolocation
945         https://bugs.webkit.org/show_bug.cgi?id=81871
946
947         Reviewed by Alexey Proskuryakov.
948
949         Moving a frame into another document is no longer possible after r111361. The comment
950         is now irrelevant.
951
952         * Modules/geolocation/Geolocation.cpp:
953         (WebCore::Geolocation::stop):
954
955 2012-03-22  Csaba Osztrogonác  <ossy@webkit.org>
956
957         Actually move WTF files to their new home
958         https://bugs.webkit.org/show_bug.cgi?id=81844
959
960         [Qt] Unreviewed buildfix after r111778.
961
962         * Target.pri:
963
964 2012-03-22  Kentaro Hara  <haraken@chromium.org>
965
966         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl
967         https://bugs.webkit.org/show_bug.cgi?id=81852
968
969         Reviewed by Adam Barth.
970
971         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl:
972
973         Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743.
974         Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119.
975         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969.
976         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972.
977         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367.
978         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368.
979         ...
980
981         This is because [Constructor(...)] does not yet support [Optional] arguments.
982         It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments:
983         https://trac.webkit.org/wiki/WebKitIDL#Constructor
984
985         This patch replaces [Optional] with [Optional=DefaultIsUndefined]
986         in TestSerializedScriptValueInterface.idl.
987
988         Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl
989
990         * bindings/scripts/CodeGeneratorJS.pm:
991         (GenerateConstructorDefinition):
992         * bindings/scripts/CodeGeneratorV8.pm:
993         (GenerateConstructorCallback):
994         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
995         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
996         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
997         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
998         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
999
1000 2012-03-22  Michal Mocny  <mmocny@google.com>
1001
1002         [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer.
1003         https://bugs.webkit.org/show_bug.cgi?id=81823
1004
1005         Reviewed by Adrienne Walker.
1006
1007         New UnitTests: LayerRendererChromiumTest
1008
1009         * platform/graphics/chromium/LayerRendererChromium.cpp:
1010         (LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
1011         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create):
1012         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
1013         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
1014         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
1015         (WebCore):
1016         (WebCore::LayerRendererChromium::LayerRendererChromium):
1017         (WebCore::LayerRendererChromium::initialize):
1018         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1019         (WebCore::LayerRendererChromium::setVisible):
1020         (WebCore::LayerRendererChromium::swapBuffers):
1021         (WebCore::LayerRendererChromium::discardFramebuffer):
1022         (WebCore::LayerRendererChromium::ensureFramebuffer):
1023         * platform/graphics/chromium/LayerRendererChromium.h:
1024         (WebCore):
1025         (LayerRendererChromiumClient):
1026         (LayerRendererChromium):
1027         (WebCore::LayerRendererChromium::isFramebufferDiscarded):
1028         (ScopedEnsureFramebufferAllocation):
1029         (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation):
1030         (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation):
1031         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1032         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
1033         (LayerRendererCapabilities):
1034         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1035         (WebCore::CCLayerTreeHostImpl::setVisible):
1036         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1037         (CCLayerTreeHostImpl):
1038         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1039         (WebCore::CCSingleThreadProxy::compositeAndReadback):
1040         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1041         (WebCore::CCThreadProxy::compositeAndReadback):
1042
1043 2012-03-22  Adam Barth  <abarth@webkit.org>
1044
1045         ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns
1046         https://bugs.webkit.org/show_bug.cgi?id=80570
1047
1048         Reviewed by Ryosuke Niwa.
1049
1050         These functions use weak iteration patterns, but as far as I can tell,
1051         we never execute script below these functions.  This patch adds ASSERTs
1052         to help us avoid adding events in the future.
1053
1054         * dom/ContainerNode.cpp:
1055         (WebCore::ContainerNode::insertedIntoTree):
1056         (WebCore::ContainerNode::removedFromTree):
1057         * html/HTMLMediaElement.cpp:
1058         (WebCore::HTMLMediaElement::loadInternal):
1059             - There's a somewhat complex call chain from insertedIntoTree into
1060               HTMLMediaElement, and somewhat complex control flow below
1061               loadInternal that eventually leads to the BeforeLoad event being
1062               fired.  In studying this code, I don't see a way for the
1063               BeforeLoad event to be fired during insertedIntoTree, but I've
1064               added this assert here to make sure we don't call loadInternal
1065               when we're not supposed to dispatch events.  This ASSERT should
1066               help us catch these BeforeLoad errors more quickly.
1067
1068 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
1069
1070         Crash in fast/dom/navigator-detached-nocrash.html
1071         https://bugs.webkit.org/show_bug.cgi?id=81773
1072
1073         Reviewed by Adam Barth.
1074
1075         BatteryManager::create() blindly assumes the Navigator* it
1076         receives has a valid Frame, which is not always the case, as made
1077         evident by the crashing test.
1078
1079         Follow abarth's suggestion and just stop
1080         NavigatorBattery::webkitBattery() before it reaches the call to
1081         BatteryManager::create() if that's the case.
1082
1083         No new tests, covered by fast/dom/navigator-detached-nocrash.html.
1084
1085         * Modules/battery/NavigatorBattery.cpp:
1086         (WebCore::NavigatorBattery::webkitBattery):
1087
1088 2012-03-22  Emil A Eklund  <eae@chromium.org>
1089
1090         Unreviewed, add missing include statement for CSSValueList.h.
1091
1092         * css/CSSStyleSelector.h:
1093
1094 2012-03-22  Tony Chang  <tony@chromium.org>
1095
1096         flexbox flexing implementation should match the spec
1097         https://bugs.webkit.org/show_bug.cgi?id=70796
1098
1099         Reviewed by Ojan Vafai.
1100
1101         Match the algorithm in the spec. Handling min/max constraints are slightly improved.
1102         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
1103
1104         New test cases in css3/flexbox/flex-algorithm-min-max.html.
1105
1106         * rendering/RenderFlexibleBox.cpp:
1107         (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths.
1108         (WebCore):
1109         (WebCore::RenderFlexibleBox::Violation::Violation):
1110         (RenderFlexibleBox::Violation):
1111         (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6.
1112         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1113         * rendering/RenderFlexibleBox.h:
1114
1115 2012-03-22  Emil A Eklund  <eae@chromium.org>
1116
1117         Unreviewed, add missing import.
1118
1119         * rendering/RenderThemeMac.mm:
1120
1121 2012-03-22  Anders Carlsson  <andersca@apple.com>
1122
1123         ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
1124         https://bugs.webkit.org/show_bug.cgi?id=81953
1125         <rdar://problem/11086998>
1126
1127         Reviewed by Sam Weinig.
1128
1129         If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal
1130         CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then
1131         we'll end up calling into painting code before all the layers have been flushed.
1132
1133         Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to
1134         mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted.
1135
1136         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1137         (WebCore::LayerClient::platformCALayerDidCreateTiles):
1138         * platform/graphics/ca/GraphicsLayerCA.cpp:
1139         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1140         * platform/graphics/ca/GraphicsLayerCA.h:
1141         (GraphicsLayerCA):
1142         * platform/graphics/ca/PlatformCALayerClient.h:
1143         (PlatformCALayerClient):
1144         * platform/graphics/ca/mac/TileCache.mm:
1145         (WebCore::TileCache::setScale):
1146         (WebCore::TileCache::revalidateTiles):
1147         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1148         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
1149
1150 2012-03-19  Robert Hogan  <robert@webkit.org>
1151
1152         Text should overflow when list item height set to 0
1153         https://bugs.webkit.org/show_bug.cgi?id=78726
1154
1155         Reviewed by Julien Chaffraix.
1156
1157         Tests: css2.1/20110323/height-applies-to-010a-expected.html
1158                fast/css/heightless-list-item-expected.html
1159                fast/css/heightless-list-item.html
1160
1161         * rendering/RenderListItem.cpp:
1162         (WebCore::RenderListItem::paint):
1163            If the list item has height:0, only paint it if the list item allows any block or inline content 
1164            to overflow unclipped. The zero-height check is a shortcut to avoid unnecessary painting and 
1165            this seems to be the only case where there's something to do.
1166
1167 2012-03-22  Dave Michael  <dmichael@chromium.org>
1168
1169         HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
1170         https://bugs.webkit.org/show_bug.cgi?id=80428
1171
1172         Reviewed by Eric Seidel.
1173
1174         Make HTMLPluginElement release its m_NPObject in detach() to break a
1175         reference-counting cycle that happens on reload or navigation. With this
1176         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
1177         was removed. Note that Releasing m_NPObject does not result in a call to
1178         the plugin; it simply releases a reference count on the wrapper object
1179         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
1180         when the render tree is destroyed, when PluginView calls
1181         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
1182         detach, because it can not result in layout or style changes.
1183
1184         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
1185         window.internals to enable testing.
1186
1187         Test: plugins/netscape-dom-access-and-reload.html
1188
1189         * WebCore.exp.in:
1190         * html/HTMLPlugInElement.cpp:
1191         (WebCore::HTMLPlugInElement::detach):
1192         * html/HTMLPlugInElement.h:
1193         (HTMLPlugInElement):
1194         * testing/Internals.cpp:
1195         (WebCore::Internals::numberOfLiveDocuments):
1196         (WebCore::Internals::numberOfLiveNodes):
1197         (WebCore):
1198         * testing/Internals.h:
1199         (Internals):
1200         * testing/Internals.idl:
1201
1202 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
1203
1204         [chromium] Make CCDamageTracker robust to empty layer lists
1205         https://bugs.webkit.org/show_bug.cgi?id=81831
1206
1207         Reviewed by Adrienne Walker.
1208
1209         Added a unit test in CCDamageTrackerTest that causes a crash in
1210         the old code. With this patch applied, the crash will not occur.
1211         In theory, that crash should never occur anyway, unless there is a
1212         bug outside the damage tracker, but for robustness it's
1213         appropriate to handle it properly.
1214
1215         In addition to this fix, performed some trivial maintenance on the
1216         damage tracker code.
1217
1218         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1219         (WebCore::CCDamageTracker::updateDamageTrackingState): removed
1220         unclean code that accessed the targetSurface to get necessary
1221         information. Instead, we now pass those args through the damage
1222         tracker's API.
1223
1224         * platform/graphics/chromium/cc/CCDamageTracker.h:
1225         (CCDamageTracker): modified args passed to damage tracker on update.
1226
1227         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1228         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
1229         modified args passed to damage tracker on update.
1230
1231 2012-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
1232
1233         Enable style sharing for elements with a style attribute
1234         https://bugs.webkit.org/show_bug.cgi?id=81523
1235
1236         Reviewed by Antti Koivisto.
1237
1238         Memory improvement change only.
1239
1240         Overall, this is a performance wash (some benchmarks may regress a bit due to the increase in time taken
1241         by CSSStyleSelector::locateSharedStyle as we try more nodes, others increase their performance due to style sharing).
1242
1243         Instrumenting our style sharing, this should give us some nice memory shavings on some benchmarks:
1244         - HTML5 isn't impacted as it doesn't use much inline style
1245         - page cyclers' intl1 showed a 6% increase in style sharing.
1246
1247         * css/CSSStyleSelector.cpp:
1248         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1249         This method now handles inline style like presentation attributes on the element.
1250
1251         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1252         (WebCore::CSSStyleSelector::locateSharedStyle):
1253         Don't bail out for an element with an inline style declaration.
1254
1255         (WebCore::CSSStyleSelector::stylesEqual):
1256         Generalized attributeStylesEqual to share the logic between attribute and
1257         inline style property set. This means that attribute checks are actually
1258         doing a little extra more work but that didn't impact our benchmarks.
1259
1260 2012-03-22  Kevin Ollivier  <kevino@theolliviers.com>
1261
1262         [wx] Unreviewed. WebDOM build fix after array type changes.
1263
1264         * bindings/scripts/CodeGeneratorCPP.pm:
1265         (ShouldSkipType):
1266
1267 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
1268
1269         Web Inspector: text gutter decorations should move upon edits.
1270         https://bugs.webkit.org/show_bug.cgi?id=81932
1271
1272         Reviewed by Vsevolod Vlasov.
1273
1274         Decorations set by the line number now shift as editing inserts / removes lines.
1275
1276         * inspector/front-end/TextViewer.js:
1277         (WebInspector.TextViewer.prototype._syncLineHeight):
1278         (WebInspector.TextEditorGutterPanel):
1279         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
1280         (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight):
1281         (WebInspector.TextEditorGutterPanel.prototype.addDecoration):
1282         (WebInspector.TextEditorGutterPanel.prototype.removeDecoration):
1283
1284 2012-03-21  Robert Hogan  <robert@webkit.org>
1285
1286         CSS 2.1 failure: fixed-table-layout-006 fails
1287         https://bugs.webkit.org/show_bug.cgi?id=78412
1288
1289         Reviewed by Julien Chaffraix.
1290
1291         Tests: css2.1/20110323/fixed-table-layout-006.htm
1292                fast/css/fixed-table-layout-cell-padding.htm
1293
1294         In fixed tables, positive width specified on a column should include borders and padding.
1295         See the thread at http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html. The discussion
1296         there resulted in a whole new set of tests for section 17.5.2.1 in the CSS 2.1 spec. See 
1297         http://test.csswg.org/harness/test/CSS21_DEV/section/17.5.2.1/. This patch allows WebKit
1298         to pass all of them, and all tests for the 17.5.2.1 section as a whole. I'll land them all separately.
1299     
1300         * rendering/FixedTableLayout.cpp:
1301         (WebCore::FixedTableLayout::calcWidthArray): Include border width and cell padding in the width of the column.
1302          Note that borderAndPaddingLogicalWidth() returns the border width for separate and collapsed borders as appropriate.
1303
1304 2012-03-22  Simon Fraser  <simon.fraser@apple.com>
1305
1306         Factor compositing layer updates after scroll into a new method
1307         https://bugs.webkit.org/show_bug.cgi?id=81943
1308
1309         Reviewed by Dean Jackson.
1310
1311         Move some code that updates compositing layers after scrolling
1312         into its own method, for cleanliness.
1313
1314         * rendering/RenderLayer.cpp:
1315         (WebCore::RenderLayer::scrollTo):
1316         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1317         (WebCore):
1318         * rendering/RenderLayer.h:
1319         (RenderLayer):
1320
1321 2012-03-22  Gavin Barraclough  <barraclough@apple.com>
1322
1323         Add JSValue::isFunction
1324         https://bugs.webkit.org/show_bug.cgi?id=81935
1325
1326         Reviewed by Geoff Garen.
1327
1328         This would be useful in the WebCore bindings code.
1329         Also, remove asFunction, replace with jsCast<JSFunction*>.
1330
1331         * bindings/js/JSInjectedScriptHostCustom.cpp:
1332         (WebCore::JSInjectedScriptHost::functionDetails):
1333         * bindings/js/ScriptCallStackFactory.cpp:
1334         (WebCore::createScriptCallStack):
1335
1336 2012-03-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1337
1338         TiledBackingStore: Fix test regressions that appeared with r111560.
1339         https://bugs.webkit.org/show_bug.cgi?id=81519
1340
1341         Reviewed by Kenneth Rohde Christiansen.
1342
1343         The visible rect wasn't intersected with the contents rect anymore which
1344         could lead to an astronomical layer size to check for intersecting tiles.
1345
1346         Add a visibleContentsRect that doesn't do the conversion and use it
1347         in visibleAreaIsCovered.
1348
1349         * platform/graphics/TiledBackingStore.cpp:
1350         (WebCore::TiledBackingStore::visibleContentsRect):
1351         (WebCore):
1352         (WebCore::TiledBackingStore::visibleRect):
1353         (WebCore::TiledBackingStore::visibleAreaIsCovered):
1354         * platform/graphics/TiledBackingStore.h:
1355         (TiledBackingStore):
1356
1357 2012-03-22  Joe Thomas  <joethomas@motorola.com>
1358
1359         Make Length Calculation functions non-inline
1360         https://bugs.webkit.org/show_bug.cgi?id=81733
1361
1362         Currently length calculation functions in LengthFunctions.h are inline. These functions are pretty big to be inline.
1363         And these functions are expected to grow again when new length units will be introduced in bug 27160.
1364
1365         A decent rule of thumb is to not inline a function if it is more than 10 lines long. Also it's typically not cost effective to inline
1366         functions with loops or switch statements. (Reference: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Inline_Functions).
1367
1368         Ran PerformanceTests/Parser/html5-full-render.html on Mac Snow-Leopard with and without the patch and did not see much performance difference.
1369
1370         Reviewed by Antti Koivisto.
1371
1372         * CMakeLists.txt:
1373         * GNUmakefile.list.am:
1374         * Target.pri:
1375         * WebCore.gypi:
1376         * WebCore.vcproj/WebCore.vcproj:
1377         * WebCore.xcodeproj/project.pbxproj:
1378         * css/LengthFunctions.cpp: Added.
1379         (WebCore):
1380         (WebCore::miminumValueForLength):
1381         (WebCore::valueForLength):
1382         (WebCore::floatValueForLength):
1383         * css/LengthFunctions.h:
1384         (WebCore):
1385
1386 2012-03-22  Alexis Menard  <alexis.menard@openbossa.org>
1387
1388         Increase code sharing between CSSParser and CSSPropertyLonghand.
1389         https://bugs.webkit.org/show_bug.cgi?id=81587
1390
1391         Reviewed by Antti Koivisto.
1392
1393         Expose the longhands declaration for a given shorthand in CSSPropertyLonghand and
1394         make CSSParser use them. It will make the declaration of longhands in one place only.
1395         Remove the map of CSSPropertyLonghand and replace it by a regular switch/case.
1396         The map doesn't bring much here and it's cleaner and faster to use the switch.
1397         It also shows a little performance improvement in CSS/CSSPropertySetterGetter.html.
1398
1399         No new tests : no behavior change.
1400
1401         * css/CSSParser.cpp:
1402         (WebCore::CSSParser::parseValue):
1403         (WebCore::CSSParser::parseAnimationShorthand):
1404         (WebCore::CSSParser::parseTransitionShorthand):
1405         (WebCore::CSSParser::parseShorthand):
1406         Modify the prototype of this function to directly use the CSSPropertyLonghand.
1407         * css/CSSParser.h:
1408         (WebCore):
1409         (CSSParser):
1410         * css/CSSPropertyLonghand.cpp:
1411         (WebCore):
1412         (WebCore::backgroundLonghand):
1413         (WebCore::backgroundPositionLonghand):
1414         (WebCore::backgroundRepeatLonghand):
1415         (WebCore::borderLonghand):
1416         (WebCore::borderBottomLonghand):
1417         (WebCore::borderColorLonghand):
1418         (WebCore::borderImageLonghand):
1419         (WebCore::borderLeftLonghand):
1420         (WebCore::borderRadiusLonghand):
1421         (WebCore::borderRightLonghand):
1422         (WebCore::borderSpacingLonghand):
1423         (WebCore::borderStyleLonghand):
1424         (WebCore::borderTopLonghand):
1425         (WebCore::borderWidthLonghand):
1426         (WebCore::listStyleLonghand):
1427         (WebCore::fontLonghand):
1428         (WebCore::marginLonghand):
1429         (WebCore::outlineLonghand):
1430         (WebCore::overflowLonghand):
1431         (WebCore::paddingLonghand):
1432         (WebCore::webkitAnimationLonghand):
1433         (WebCore::webkitBorderAfterLonghand):
1434         (WebCore::webkitBorderBeforeLonghand):
1435         (WebCore::webkitBorderEndLonghand):
1436         (WebCore::webkitBorderStartLonghand):
1437         (WebCore::webkitColumnsLonghand):
1438         (WebCore::webkitColumnRuleLonghand):
1439         (WebCore::webkitFlexFlowLonghand):
1440         (WebCore::webkitMarginCollapseLonghand):
1441         (WebCore::webkitMarqueeLonghand):
1442         (WebCore::webkitMaskLonghand):
1443         (WebCore::webkitMaskPositionLonghand):
1444         (WebCore::webkitMaskRepeatLonghand):
1445         (WebCore::webkitTextEmphasisLonghand):
1446         (WebCore::webkitTextStrokeLonghand):
1447         (WebCore::webkitTransitionLonghand):
1448         (WebCore::webkitTransformOriginLonghand):
1449         (WebCore::webkitWrapLonghand):
1450         (WebCore::longhandForProperty):
1451         * css/CSSPropertyLonghand.h:
1452         (WebCore):
1453
1454 2012-03-22  Emil A Eklund  <eae@chromium.org>
1455
1456         Unreviewed, touching file to force bots to pick up CSS_SHADERS flag change. 
1457
1458         * css/CSSStyleSelector.h:
1459         (CSSStyleSelector):
1460
1461 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
1462
1463         ReverbConvolver::latencyFrames() should return 0.
1464         https://bugs.webkit.org/show_bug.cgi?id=81806
1465
1466         Reviewed by Chris Rogers.
1467
1468         * platform/audio/ReverbConvolver.cpp:
1469         (WebCore::ReverbConvolver::latencyFrames):
1470
1471 2012-03-22  Tony Chang  <tony@chromium.org>
1472
1473         refactor flexbox in preparation for flex-line-pack
1474         https://bugs.webkit.org/show_bug.cgi?id=81843
1475
1476         Reviewed by Ojan Vafai.
1477
1478         Replace WrapReverseContext with a vector of LineContexts that contain
1479         the same information, plus values needed for flex-align.
1480
1481         alignChildren has been moved to after all the lines have been
1482         positioned. We want to align children after flex-line-pack has changed
1483         the size of each line to avoid unnecessary layouts.
1484
1485         Take 2: Remove the assert. If there are no children, then there are no
1486         flex lines. Instead, assert that child is not null.
1487
1488         No new tests, just refactoring.
1489
1490         * rendering/RenderFlexibleBox.cpp:
1491         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
1492         holds information needed for wrap-reverse and aligning children.
1493         (RenderFlexibleBox::LineContext):
1494         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
1495         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
1496         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
1497         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
1498         * rendering/RenderFlexibleBox.h:
1499
1500 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1501
1502         Event dispatching in XMLHttpRequestProgressEventThrottle should go through XMLHttpRequestProgressEventThrottle::dispatchEvent
1503         https://bugs.webkit.org/show_bug.cgi?id=46743
1504
1505         Reviewed by Julien Chaffraix
1506         Based on original patch by Anton D'Auria
1507
1508         In preparation for platform-specific queuing of XMLHttpRequest events,
1509         this patch changes all calls to m_target->dispatchEvent to
1510         XMLHttpRequestProgressEventThrottle::dispatchEvent.
1511         Currently, we queue only one progress event on suspend() if we have
1512         throttled progress events. We should be able to queue all XHR events
1513         that can be generated after suspend(), if the platform network layer
1514         continues to receive data.
1515         XMLHttpRequest uses XMLHttpRequestProgressEventThrottle to dispatch only
1516         download events, so this doesn't change behavior of upload events, which
1517         aren't throttled or queued.
1518
1519         * xml/XMLHttpRequest.cpp:
1520         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1521         * xml/XMLHttpRequestProgressEventThrottle.cpp:
1522         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
1523         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent):
1524         (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
1525         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchPausedEvent):
1526         (WebCore::XMLHttpRequestProgressEventThrottle::fired):
1527         * xml/XMLHttpRequestProgressEventThrottle.h:
1528         (XMLHttpRequestProgressEventThrottle):
1529
1530 2012-03-22  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1531
1532         [EFL] Map BackSpace key code to Unicode value
1533         https://bugs.webkit.org/show_bug.cgi?id=81130
1534
1535         Reviewed by Gustavo Noronha Silva.
1536
1537         Test: fast/events/backspace-navigates-back.html
1538
1539         * platform/efl/EflKeyboardUtilities.cpp:
1540         (WebCore::createKeyMap): Map BackSpace to Unicode value
1541
1542 2012-03-22  Abhishek Arya  <inferno@chromium.org>
1543
1544         Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren.
1545         https://bugs.webkit.org/show_bug.cgi?id=80297
1546
1547         Reviewed by Julien Chaffraix.
1548
1549         beforeChild might share the same anonymous block parent with other previous
1550         siblings. Before moving the children across ruby bases, we need to make sure
1551         to split the tree across the beforeChild correctly.
1552
1553         Test: fast/ruby/ruby-text-before-child-split.html
1554
1555         * rendering/RenderRubyBase.cpp:
1556         (WebCore::RenderRubyBase::moveChildren):
1557
1558 2012-03-22  Kristóf Kosztyó  <kkristof@inf.u-szeged.hu>
1559
1560         [Qt] Fix Qt minimal build after r111692
1561
1562         Reviewed by Csaba Osztrogonác.
1563
1564         * bindings/js/JSScriptProfileNodeCustom.cpp:
1565
1566 2012-03-22  Adrienne Walker  <enne@google.com>
1567
1568         [chromium] Fix scrollbar layers holding onto invalid textures after lost context
1569         https://bugs.webkit.org/show_bug.cgi?id=81841
1570
1571         Reviewed by James Robinson.
1572
1573         Unit test: CCLayerTreeHostImplTest.scrollbarLayerLostContext
1574
1575         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1576         (WebCore::CCScrollbarLayerImpl::willDraw):
1577
1578 2012-03-22  Philippe Normand  <pnormand@igalia.com>
1579
1580         [GTK] ASSERT bug in WebAudio (AudioFileReader)
1581         https://bugs.webkit.org/show_bug.cgi?id=81777
1582
1583         Reviewed by Martin Robinson.
1584
1585         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1586         (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal
1587         the GstBus floating reference.
1588         (WebCore::AudioFileReader::createBus): Ditto.
1589
1590 2012-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1591
1592         Unreviewed: Web Inspector: fix syntax error in text.
1593
1594         * English.lproj/localizedStrings.js:
1595         * inspector/front-end/HeapSnapshotProxy.js:
1596         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
1597
1598 2012-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1599
1600         Unreviewed, rolling out r111688.
1601         http://trac.webkit.org/changeset/111688
1602         https://bugs.webkit.org/show_bug.cgi?id=81912
1603
1604         "Heap profiler test fails" (Requested by yurys on #webkit).
1605
1606         * inspector/front-end/HeapSnapshot.js:
1607         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1608
1609 2012-03-22  Dana Jansens  <danakj@chromium.org>
1610
1611         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
1612         https://bugs.webkit.org/show_bug.cgi?id=81437
1613
1614         Reviewed by Adrienne Walker.
1615
1616         Split CCLayerTreeHostImpl::drawLayers() into two phases:
1617         prepareToDraw() and drawLayers().
1618
1619         When calculating a RenderPass, and we checkerboard a quad on a
1620         layer, bubble this info back up to CCLayerTreeHostImpl. If the
1621         layer is transforming in an animation, then abort the prepareToDraw()
1622         phase and cause it to return false back to the thread proxy.
1623
1624         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
1625
1626         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1627         (WebCore::CCLayerImpl::appendQuads):
1628         * platform/graphics/chromium/cc/CCLayerImpl.h:
1629         (CCLayerImpl):
1630         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1631         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1632         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1633         (WebCore):
1634         (WebCore::CCLayerTreeHostImpl::drawLayers):
1635         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1636         (CCLayerTreeHostImpl):
1637         (FrameData):
1638         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1639         (WebCore::CCQuadCuller::append):
1640         * platform/graphics/chromium/cc/CCQuadCuller.h:
1641         (CCQuadCuller):
1642         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1643         (WebCore::CCRenderPass::appendQuadsForLayer):
1644         * platform/graphics/chromium/cc/CCRenderPass.h:
1645         (CCRenderPass):
1646         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1647         (WebCore::CCScrollbarLayerImpl::appendQuads):
1648         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
1649         (CCScrollbarLayerImpl):
1650         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1651         (WebCore::CCSingleThreadProxy::doComposite):
1652         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
1653         (WebCore::CCSolidColorLayerImpl::appendQuads):
1654         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
1655         (CCSolidColorLayerImpl):
1656         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
1657         (WebCore::CCTextureLayerImpl::appendQuads):
1658         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
1659         (CCTextureLayerImpl):
1660         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1661         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
1662         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1663         (WebCore::CCTiledLayerImpl::appendQuads):
1664         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1665         (CCTiledLayerImpl):
1666         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1667         (WebCore::CCVideoLayerImpl::appendQuads):
1668         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1669         (CCVideoLayerImpl):
1670
1671 2012-03-22  Levi Weintraub  <leviw@chromium.org>
1672
1673         Correct LayoutUnit usage in Accessibility code
1674         https://bugs.webkit.org/show_bug.cgi?id=81789
1675
1676         Reviewed by Eric Seidel.
1677
1678         Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from
1679         the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly
1680         expose them to the embedder.
1681
1682         No new tests. No change in behavior.
1683
1684         * accessibility/AccessibilityListBox.cpp:
1685         (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above.
1686         * accessibility/AccessibilityListBox.h:
1687         (AccessibilityListBox):
1688         * accessibility/AccessibilityObject.cpp:
1689         (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu,
1690         which is always done with integer coordinates.
1691         (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We
1692         don't pixel snap floats, so we return an integer bounding box.
1693         (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above.
1694         (WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying
1695         up the code to position it at (0,0).
1696         * accessibility/AccessibilityObject.h:
1697         (WebCore::AccessibilityObject::accessibilityHitTest): See above.
1698         (AccessibilityObject):
1699         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers.
1700         * accessibility/AccessibilityRenderObject.cpp:
1701         (WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from
1702         screen coordinates and originates in embedder code. Reverting it to take an integer.
1703         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above.
1704         (WebCore::AccessibilityRenderObject::accessibilityHitTest): See above.
1705         * accessibility/AccessibilityRenderObject.h:
1706         (AccessibilityRenderObject):
1707         * accessibility/AccessibilityScrollView.cpp:
1708         (WebCore::AccessibilityScrollView::accessibilityHitTest): See above.
1709         * accessibility/AccessibilityScrollView.h:
1710         (AccessibilityScrollView):
1711         * accessibility/AccessibilitySlider.cpp:
1712         (WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above.
1713         * accessibility/AccessibilitySlider.h:
1714         (AccessibilitySlider):
1715
1716 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
1717
1718         Web Inspector: HeapProfiler: Heap snapshot worker has to report the errors to the front-end
1719         https://bugs.webkit.org/show_bug.cgi?id=81804
1720
1721         Sometimes the worker process of HeapSnapshot does some wrong thing and throw an Exception.
1722         At this momemnt we have no way to see the error in the front-end.
1723
1724         Reviewed by Yury Semikhatsky.
1725
1726         * English.lproj/localizedStrings.js:
1727         * inspector/front-end/HeapSnapshotProxy.js: check the exception field and dump it into front-end's console.
1728         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
1729         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: catch the exception and transfer it's text to requester's side.
1730         (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
1731
1732 2012-03-22  Carlos Garcia Campos  <cgarcia@bb-webkit-rel-64.local.igalia.com>
1733
1734         [GTK] Use the angle-bracket form to include wtf headers
1735         https://bugs.webkit.org/show_bug.cgi?id=81884
1736
1737         Reviewed by Eric Seidel.
1738
1739         Use #include <wtf/foo> instead of #include "foo".
1740
1741         * platform/graphics/freetype/FontPlatformData.h:
1742         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1743         * platform/gtk/DataObjectGtk.h:
1744         * platform/network/ResourceHandleInternal.h:
1745         * platform/network/soup/SocketStreamHandleSoup.cpp:
1746
1747 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
1748
1749         Web Inspector: Case of the elements of the xml document should be shown as it is in the console
1750         https://bugs.webkit.org/show_bug.cgi?id=81902
1751
1752         When registering a detached root, DOMAgent always presumes it is a node,
1753         while it can also be a document.
1754
1755         Reviewed by Vsevolod Vlasov.
1756
1757         Test: inspector/console/console-xml-document.html
1758
1759         * inspector/front-end/ConsoleMessage.js:
1760         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
1761         * inspector/front-end/DOMAgent.js:
1762         (WebInspector.DOMAgent.prototype._setDetachedRoot):
1763
1764 2012-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
1765
1766         Web Inspector: Introduce ScriptBound/ScriptUnbound events in ScriptMapping.
1767         https://bugs.webkit.org/show_bug.cgi?id=81904
1768
1769         Reviewed by Pavel Feldman.
1770
1771         This is another step on the way to cleaner BreakpointManager logic.
1772         Here we extract ScriptBound/ScriptUnbound events from UISourceCodeListChanged event.
1773         This allows us to handle script-uiSourceCode binding separately from
1774         uiSourceCode creation/deletion and to handle unbinding that was not
1775         possible at all before.
1776
1777         * inspector/front-end/CompilerScriptMapping.js:
1778         (WebInspector.CompilerScriptMapping.prototype._uiSourceCodesForSourceMap):
1779         (WebInspector.CompilerScriptMapping.prototype.addScript.get this):
1780         (WebInspector.CompilerScriptMapping.prototype.addScript):
1781         (WebInspector.CompilerScriptMapping.prototype.reset):
1782         * inspector/front-end/ResourceScriptMapping.js:
1783         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
1784         * inspector/front-end/ScriptMapping.js:
1785         (WebInspector.MainScriptMapping):
1786         (WebInspector.MainScriptMapping.prototype._updateLiveLocation):
1787         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
1788         (WebInspector.MainScriptMapping.prototype._handleScriptBound):
1789         (WebInspector.MainScriptMapping.prototype._handleScriptUnbound):
1790         * inspector/front-end/SnippetsModel.js:
1791         (WebInspector.SnippetsScriptMapping.prototype.addScript.get this):
1792         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
1793         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
1794         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this):
1795         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved):
1796         (WebInspector.SnippetsScriptMapping.prototype.reset):
1797
1798 2012-03-22  Vineet Chaudhary  <rgf748@motorola.com>
1799
1800         https://bugs.webkit.org/show_bug.cgi?id=81893
1801         Remove custom bindings form ScriptProfileNode.idl of attribute type Array.
1802
1803         Reviewed by Kentaro Hara.
1804
1805         Replace [CustomGetter] Array with sequence<ScriptProfileNode>.
1806         To remove the custom bindings code.
1807
1808         Test: No new tests. LayoutTests/fast/profiler/* test are enough for this.
1809
1810         * bindings/js/JSScriptProfileNodeCustom.cpp: Removed custom function.
1811         (WebCore::JSScriptProfileNode::callUID):
1812         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed custom function.
1813         (WebCore):
1814         * inspector/ScriptProfileNode.idl: Replaced Array with sequence<ScriptProfileNode>.
1815
1816 2012-03-22  Andrey Kosyakov  <caseq@chromium.org>
1817
1818         Web Inspector: only update timeline overview categories strips when these are visible
1819         https://bugs.webkit.org/show_bug.cgi?id=81903
1820
1821         Reviewed by Pavel Feldman.
1822
1823         - factor out category strips update into a separate method;
1824         - only invoke it when "Timeline" overview mode is selected.
1825
1826         * inspector/front-end/TimelineOverviewPane.js:
1827         (WebInspector.TimelineOverviewPane.prototype._showTimelines):
1828         (WebInspector.TimelineOverviewPane.prototype.update):
1829         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
1830
1831 2012-03-22  Levi Weintraub  <leviw@chromium.org>
1832
1833         Update LayoutUnit usage in FrameSelection
1834         https://bugs.webkit.org/show_bug.cgi?id=81754
1835
1836         Reviewed by Eric Seidel.
1837
1838         FrameSelection stores its caret and repaint bounds in absolute coordinates. Absolute coordinates
1839         we treat as pixel values, so this patch changes these values to integers. Sub-pixel precision
1840         will still be used when these coordinates are passed down and used locally.
1841
1842         No new tests. No change in behavior.
1843
1844         * editing/FrameSelection.cpp:
1845         (WebCore::absoluteCaretY): Uses absolute coordinates, which are ints.
1846         (WebCore::FrameSelection::modify): Uses absolute coordinates to handle vertical selection
1847         modification. Sub-pixel precision will be used when these values are converted to local ones.
1848         (WebCore::CaretBase::absoluteBoundsForLocalRect): Absolute coordinates -> ints.
1849         (WebCore::FrameSelection::absoluteCaretBounds): Ditto.
1850         (WebCore::CaretBase::caretRepaintRect): The caret repaint rect is stored in absolute coordinates.
1851         Reverting the values to ints.
1852         (WebCore::FrameSelection::recomputeCaretRect): Ditto.
1853         * editing/FrameSelection.h:
1854         (FrameSelection):
1855         * editing/mac/FrameSelectionMac.mm:
1856         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Switching to store absolute
1857         coordinates as integers.
1858
1859 2012-03-22  Alexei Filippov  <alexeif@chromium.org>
1860
1861         Web Inspector: Speed up the build retainers phase.
1862         https://bugs.webkit.org/show_bug.cgi?id=81763
1863
1864         Replacing the edge iterator with a raw loop makes it
1865         faster by more than 10 times.
1866
1867         Reviewed by Yury Semikhatsky.
1868
1869         * inspector/front-end/HeapSnapshot.js:
1870         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1871
1872 2012-03-22  No'am Rosenthal  <noam.rosenthal@nokia.com>
1873
1874         [Qt][WK2] The background appears to have one extra pixel from the contents
1875         https://bugs.webkit.org/show_bug.cgi?id=81830
1876
1877         Reviewed by Kenneth Rohde Christiansen.
1878
1879         TextureMapperGL applied a 1-offset that was covering for another bug,
1880         which was already fixed.
1881
1882         No new tests, this would be tested once we test GL rendering results.
1883
1884         * platform/graphics/texmap/TextureMapperGL.cpp:
1885         (WebCore::TextureMapperGLData::SharedGLData::scissorClip):
1886
1887 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
1888
1889         Rename touchpad fling curve, add curve parameters to constructor.
1890         https://bugs.webkit.org/show_bug.cgi?id=81820
1891
1892         Reviewed by Adrienne Walker.
1893
1894         Covered by existing unit tests.
1895
1896         * GNUmakefile.list.am:
1897         * WebCore.gypi:
1898         * platform/ScrollAnimatorNone.cpp:
1899         (WebCore::ScrollAnimatorNone::fireUpAnAnimation):
1900         * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp.
1901         (WebCore):
1902         (WebCore::TouchpadFlingPlatformGestureCurve::create):
1903         (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
1904         (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve):
1905         (WebCore::TouchpadFlingPlatformGestureCurve::apply):
1906         * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h.
1907         (WebCore):
1908         (TouchpadFlingPlatformGestureCurve):
1909
1910 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
1911
1912         Web Inspector: make CSS and JavaScript files editable by default.
1913         https://bugs.webkit.org/show_bug.cgi?id=81787
1914
1915         Reviewed by Vsevolod Vlasov.
1916
1917         This change removes cancelEditing and setReadOnly capabilities from source frame.
1918         It removes dblclick handler as well since one does not need to enter editing mode.
1919         It also establishes proper content dispatching so that views are updated with the
1920         resource content. All these are inter-dependent, need to be landed simultaneously.
1921         Drive-by follow up to the r111675 where range is modified prior to the exiting
1922         edit mode.
1923
1924         * inspector/front-end/JavaScriptSourceFrame.js:
1925         (WebInspector.JavaScriptSourceFrame):
1926         (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
1927         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1928         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1929         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
1930         (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
1931         * inspector/front-end/ResourceView.js:
1932         (WebInspector.ResourceSourceFrame):
1933         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
1934         (WebInspector.ResourceSourceFrame.prototype._contentChanged):
1935         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
1936         (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper):
1937         (WebInspector.EditableResourceSourceFrame.prototype.editContent):
1938         (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
1939         * inspector/front-end/ResourcesPanel.js:
1940         (WebInspector.ResourcesPanel.prototype._innerShowView):
1941         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
1942         * inspector/front-end/ScriptsPanel.js:
1943         (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty):
1944         * inspector/front-end/Settings.js:
1945         (WebInspector.ExperimentsSettings):
1946         * inspector/front-end/SourceFrame.js:
1947         (WebInspector.SourceFrame):
1948         (WebInspector.SourceFrame.prototype.wasShown):
1949         (WebInspector.SourceFrame.prototype.willHide):
1950         (WebInspector.SourceFrame.prototype.beforeTextChanged):
1951         (WebInspector.SourceFrame.prototype.setContent):
1952         (WebInspector.SourceFrame.prototype.commitEditing):
1953         (WebInspector.SourceFrame.prototype.didEditContent):
1954         (WebInspector.SourceFrame.prototype.editContent):
1955         * inspector/front-end/TextPrompt.js:
1956         (WebInspector.TextPrompt.prototype._startEditing):
1957         (WebInspector.TextPrompt.prototype._stopEditing):
1958         * inspector/front-end/TextViewer.js:
1959         (WebInspector.TextViewer):
1960         (WebInspector.TextViewer.prototype._registerShortcuts):
1961         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
1962
1963 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1964
1965         [Qt] Enable FAST_MOBILE_SCROLLING when scrolling is delegated.
1966         https://bugs.webkit.org/show_bug.cgi?id=81889
1967
1968         Reviewed by Kenneth Rohde Christiansen.
1969
1970         On the Qt platform only enable the fast mobile scroll feature when scrolling is delegated.
1971
1972         * rendering/RenderObject.cpp:
1973         (WebCore::RenderObject::styleWillChange):
1974
1975 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
1976
1977         Web Inspector: dispatch styleSheetChanged event synchronously.
1978         https://bugs.webkit.org/show_bug.cgi?id=81892
1979
1980         Reviewed by Vsevolod Vlasov.
1981
1982         Today, backend generates stylesheet change event synchronously from within set* command.
1983         But CSSStyleModel defers its dispatching until the stylesheet content is available. This
1984         prevents us from ignoring update events from within commands that initiated those updates.
1985
1986         This change makes stylesheet change event dispatch synchronously and delegates stylesheet
1987         content fetching to the event client.
1988
1989         * inspector/front-end/CSSStyleModel.js:
1990         (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
1991         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
1992         (WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
1993         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper):
1994         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent):
1995         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.callback):
1996         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged):
1997         (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged):
1998
1999 2012-03-21  Ian Vollick  <vollick@chromium.org>
2000
2001         [chromium] timing functions are getting incorrectly applied for accelerated css transitions
2002         https://bugs.webkit.org/show_bug.cgi?id=81692
2003
2004         Reviewed by Adrienne Walker.
2005
2006         Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction
2007
2008         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2009
2010 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2011
2012         Web Inspector: allow on-hover popover while in edit mode.
2013         https://bugs.webkit.org/show_bug.cgi?id=81898
2014
2015         Reviewed by Vsevolod Vlasov.
2016
2017         This change allows popover while in-edit mode, hides it upon Esc. It also introduces anchorOverride
2018         concept in ObjectPopoverHelper that allows dynamically switching the anchor (say if we want to highlight anchor itself).
2019
2020         * inspector/front-end/DetailedHeapshotView.js:
2021         * inspector/front-end/ElementsPanel.js:
2022         * inspector/front-end/JavaScriptSourceFrame.js:
2023         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover):
2024         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
2025         (WebInspector.JavaScriptSourceFrame.prototype._onKeyDown):
2026         * inspector/front-end/NetworkPanel.js:
2027         * inspector/front-end/ObjectPopoverHelper.js:
2028         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
2029         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2030         * inspector/front-end/Popover.js:
2031         (WebInspector.PopoverHelper.prototype.isPopoverVisible):
2032         * inspector/front-end/TimelinePanel.js:
2033
2034 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2035
2036         Web Inspector: breakpoints should shift when line break is inserted in the middle of the line.
2037         https://bugs.webkit.org/show_bug.cgi?id=81896
2038
2039         Reviewed by Vsevolod Vlasov.
2040
2041         There is a bug that collapses selection prior to exiting change mode, we should never
2042         collapse edit area prior committing.
2043
2044         * inspector/front-end/TextEditorModel.js:
2045         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2046         * inspector/front-end/TextViewer.js:
2047         (WebInspector.TextViewer):
2048         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
2049         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.callback):
2050         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
2051
2052 2012-03-22  Zoltan Herczeg  <zherczeg@webkit.org>
2053
2054         Merge SVGImageBufferTools to SVGRenderingContext
2055         https://bugs.webkit.org/show_bug.cgi?id=81890
2056
2057         Reviewed by Nikolas Zimmermann.
2058
2059         Copy the code to SVGRenderingContext and delete
2060         SVGImageBufferTools[.cpp.h]. Update build systems,
2061         no functionality change. This is the first step
2062         towards making SVGImageBufferTools stageful.
2063
2064         Existing tests cover this issue.
2065
2066         * CMakeLists.txt:
2067         * GNUmakefile.list.am:
2068         * Target.pri:
2069         * WebCore.gypi:
2070         * WebCore.xcodeproj/project.pbxproj:
2071         * platform/graphics/filters/FETile.cpp:
2072         (WebCore::FETile::platformApplySoftware):
2073         * rendering/svg/RenderSVGAllInOne.cpp:
2074         * rendering/svg/RenderSVGInlineText.cpp:
2075         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2076         * rendering/svg/RenderSVGResourceClipper.cpp:
2077         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2078         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2079         * rendering/svg/RenderSVGResourceFilter.cpp:
2080         (WebCore::RenderSVGResourceFilter::applyResource):
2081         * rendering/svg/RenderSVGResourceGradient.cpp:
2082         (WebCore::createMaskAndSwapContextForTextGradient):
2083         (WebCore::clipToTextMask):
2084         * rendering/svg/RenderSVGResourceMasker.cpp:
2085         (WebCore::RenderSVGResourceMasker::applyResource):
2086         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2087         * rendering/svg/RenderSVGResourcePattern.cpp:
2088         (WebCore::RenderSVGResourcePattern::applyResource):
2089         (WebCore::RenderSVGResourcePattern::createTileImage):
2090         * rendering/svg/SVGImageBufferTools.cpp: Removed.
2091         * rendering/svg/SVGImageBufferTools.h: Removed.
2092         * rendering/svg/SVGInlineTextBox.cpp:
2093         * rendering/svg/SVGRenderingContext.cpp:
2094         (WebCore::currentContentTransformation):
2095         (WebCore):
2096         (WebCore::SVGRenderingContext::calculateTransformationToOutermostSVGCoordinateSystem):
2097         (WebCore::SVGRenderingContext::createImageBuffer):
2098         (WebCore::SVGRenderingContext::createImageBufferForPattern):
2099         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
2100         (WebCore::SVGRenderingContext::clipToImageBuffer):
2101         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect):
2102         (WebCore::SVGRenderingContext::clampedAbsoluteSize):
2103         (WebCore::SVGRenderingContext::clear2DRotation):
2104         * rendering/svg/SVGRenderingContext.h:
2105         (SVGRenderingContext):
2106         (WebCore::SVGRenderingContext::calculateImageBufferRect):
2107         * svg/graphics/filters/SVGFEImage.cpp:
2108         (WebCore::FEImage::platformApplySoftware):
2109
2110 2012-03-22  Hyowon Kim  <hw1008.kim@samsung.com>
2111
2112         [EFL] Add PageClientEfl to WebCoreSupport.
2113         https://bugs.webkit.org/show_bug.cgi?id=80748
2114
2115         Reviewed by Noam Rosenthal.
2116
2117         * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient.
2118         (WebCore):
2119         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2120         (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type.
2121         * plugins/efl/PluginViewEfl.cpp:
2122         (WebCore::PluginView::platformGetValue): Use PageClientEfl.
2123
2124 2012-03-22  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2125
2126         blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees
2127         https://bugs.webkit.org/show_bug.cgi?id=81102
2128
2129         Reviewed by Hajime Morita.
2130
2131         This implementation will support blur for a focused element when its shadowHost's blur() is called.
2132         To achieve this Element::blur() function is modified to blur the focused node in it's treeScope.
2133
2134         Test: fast/dom/shadow/shadow-root-blur.html
2135
2136         * dom/Element.cpp:
2137         (WebCore::Element::blur): Modified to blur current treeScope's focused node.
2138         * dom/ShadowRoot.h:
2139         (WebCore::ShadowRoot::activeElement): Rework for code sharing.
2140         * dom/TreeScope.cpp:
2141         (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node.
2142         * dom/TreeScope.h:
2143         (TreeScope): New function declartion.
2144         * html/HTMLDocument.cpp:
2145         (WebCore::HTMLDocument::activeElement): Rework for code sharing.
2146
2147 2012-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
2148
2149         Web Inspector: RawSourceCode does not need uiSourceCode lists because it never has more than one.
2150         https://bugs.webkit.org/show_bug.cgi?id=81894
2151
2152         RawSourceCode never has more than one uiSourceCode, uiSourceCodeList
2153         are just remains of older implementation. This patch switches RawSourceCode
2154         and SourceMappings from uiSourceCodeList to uiSourceCode.
2155
2156         Reviewed by Pavel Feldman.
2157
2158         * inspector/front-end/RawSourceCode.js:
2159         (WebInspector.RawSourceCode.prototype.uiSourceCode):
2160         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
2161         (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation):
2162         (WebInspector.RawSourceCode.SourceMapping.prototype.uiSourceCode):
2163         (WebInspector.RawSourceCode.PlainSourceMapping):
2164         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation):
2165         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
2166         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCode):
2167         (WebInspector.RawSourceCode.FormattedSourceMapping):
2168         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
2169         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
2170         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCode):
2171         * inspector/front-end/ResourceScriptMapping.js:
2172         (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
2173         (WebInspector.ResourceScriptMapping.prototype.addScript):
2174         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
2175         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
2176         (WebInspector.ResourceScriptMapping.prototype.reset):
2177
2178 2012-03-22  Mario Sanchez Prada  <msanchez@igalia.com>
2179
2180         [GTK] Fix the only remaining coding style issue in GTK accessibility code
2181         https://bugs.webkit.org/show_bug.cgi?id=81885
2182
2183         Reviewed by Xan Lopez.
2184
2185         Add needed extra line and remove an unneeded one.
2186
2187         * accessibility/gtk/AccessibilityObjectAtk.cpp:
2188
2189 2012-03-22  Kent Tamura  <tkent@chromium.org>
2190
2191         Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect().
2192         https://bugs.webkit.org/show_bug.cgi?id=81866
2193
2194         Reviewed by Hajime Morita.
2195
2196         We need to expand the controlClipRect because the existing shadow
2197         tree of a text field can be wrapped by another shadow tree. e.g.
2198
2199         A current situation:
2200
2201         <input>
2202           ┗ ShadowRoot
2203              ┗ container element
2204         ┌────────────┐<input>'s border box
2205         │┌──────────┐│
2206         ││container box       ││
2207         │└──────────┘│
2208         └────────────┘
2209
2210         Wrapped by another ShadowRoot:
2211
2212         <input>
2213           ┗ New ShadowRoot
2214              ┣ <shadow> represents the existing shadow tree
2215              ┃  ┗ container element
2216              ┗ D: an additional decoration element
2217         ┌────────────┐<input>'s border box
2218         │┌───────┬──┐│
2219         ││container box │ D  ││
2220         │└───────┴──┘│
2221         └────────────┘
2222         In this case, if we clip child renderers by container box, D is not
2223         drawn. We should clip by the content box of the <input>.
2224
2225         A search field has an exceptional behavior. It can have the container
2226         box of which height is taller than the content box height. The
2227         controlClipRect should contain both of the container box and the content
2228         box in this case. In other cases, the container box is equivalent to the
2229         content box. So the code always unites them.
2230
2231         No new tests. This won't make any behavior change for now.
2232
2233         * rendering/RenderTextControlSingleLine.cpp:
2234         (WebCore::RenderTextControlSingleLine::controlClipRect):
2235
2236 2012-03-22  Yoshifumi Inoue  <yosin@chromium.org>
2237
2238         [Forms] The option element should not be form associated element.
2239         https://bugs.webkit.org/show_bug.cgi?id=79764
2240
2241         Reviewed by Kent Tamura.
2242
2243         This patch changes base class of HTMLOptionELement to HTMLElement
2244         from HTMLFormControlElement for saving memory space and iteration
2245         time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
2246         and matching the HTML5 specification for ease of maintenance.
2247
2248         This patch changes behavior of handling of CSS pseudo classes "invalid"
2249         and "valid". The "option" elements no longer use these CSS pseudo classes
2250         as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
2251
2252         Changes of TextIterator is lead by usage of isFormControlElement. This
2253         changes will be replaced with more meaningful predicate as part of
2254         https://bugs.webkit.org/show_bug.cgi?id=80381
2255
2256         No new tests but updated select-live-pseudo-selectors.html test.
2257
2258         * css/CSSStyleSelector.cpp:
2259         (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
2260         * css/SelectorChecker.cpp:
2261         (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
2262         * html/HTMLKeygenElement.cpp:
2263         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
2264         * html/HTMLOptionElement.cpp:
2265         (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
2266         (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
2267         (WebCore::HTMLOptionElement::attach): Changeid base class.
2268         (WebCore::HTMLOptionElement::detach): Changed base class.
2269         (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
2270         (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
2271         (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
2272         * html/HTMLOptionElement.h:
2273         (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
2274         (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
2275         * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
2276
2277 2012-03-21  Pavel Podivilov  <podivilov@chromium.org>
2278
2279         Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js.
2280         https://bugs.webkit.org/show_bug.cgi?id=81780
2281
2282         Reviewed by Pavel Feldman.
2283
2284         * WebCore.gypi:
2285         * WebCore.vcproj/WebCore.vcproj:
2286         * inspector/compile-front-end.py:
2287         * inspector/front-end/CompilerScriptMapping.js:
2288         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2289         (WebInspector.SourceMapParserPayload):
2290         (WebInspector.SourceMapParser):
2291         (WebInspector.SourceMapParser.prototype.load):
2292         (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation):
2293         (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation):
2294         (WebInspector.SourceMapParser.prototype.sources):
2295         (WebInspector.SourceMapParser.prototype.loadSourceCode):
2296         (WebInspector.SourceMapParser.prototype._findMapping):
2297         (WebInspector.SourceMapParser.prototype._parseMappingPayload):
2298         (WebInspector.SourceMapParser.prototype._parseSections):
2299         (WebInspector.SourceMapParser.prototype._parseMap):
2300         (WebInspector.SourceMapParser.prototype._isSeparator):
2301         (WebInspector.SourceMapParser.prototype._decodeVLQ):
2302         (WebInspector.SourceMapParser.prototype._canonicalizeURL):
2303         (WebInspector.SourceMapParser.StringCharIterator):
2304         (WebInspector.SourceMapParser.StringCharIterator.prototype.next):
2305         (WebInspector.SourceMapParser.StringCharIterator.prototype.peek):
2306         (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext):
2307         * inspector/front-end/CompilerSourceMapping.js: Removed.
2308         * inspector/front-end/WebKit.qrc:
2309         * inspector/front-end/inspector.html:
2310
2311 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
2312
2313         Web Inspector: IndexedDB transaction is not closed when requesting data.
2314         https://bugs.webkit.org/show_bug.cgi?id=81837
2315
2316         Reviewed by Pavel Feldman.
2317
2318         * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call.
2319         (WebCore):
2320
2321 2012-03-21  Yury Semikhatsky  <yurys@chromium.org>
2322
2323         Web Inspector: event listeners section is broken for about:blank page
2324         https://bugs.webkit.org/show_bug.cgi?id=81795
2325
2326         Parse about:blank as a valid URL.
2327
2328         Reviewed by Pavel Feldman.
2329
2330         Test: inspector/elements/event-listeners-about-blank.html
2331
2332         * inspector/front-end/utilities.js:
2333         (String.prototype.asParsedURL):
2334
2335 2012-03-21  Dan Bernstein  <mitz@apple.com>
2336
2337         REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests
2338         https://bugs.webkit.org/show_bug.cgi?id=81870
2339
2340         Reverted r111635, the fix for bug 81843.
2341
2342         * rendering/RenderFlexibleBox.cpp:
2343         (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext):
2344         (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset):
2345         (RenderFlexibleBox::WrapReverseContext):
2346         (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine):
2347         (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta):
2348         (WebCore::RenderFlexibleBox::layoutFlexItems):
2349         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2350         (WebCore::RenderFlexibleBox::alignChildren):
2351         (WebCore::RenderFlexibleBox::flipForWrapReverse):
2352         * rendering/RenderFlexibleBox.h:
2353
2354 2012-03-21  Emil A Eklund  <eae@chromium.org>
2355
2356         Unreviewed change touching CustomFilterProgram.h to try
2357         to force the chromium-win bots to rebuilt it and pick up
2358         on the fact that CSS_SHADERS is not set (since r111610). 
2359
2360         * platform/graphics/filters/CustomFilterProgram.h:
2361
2362 2012-03-21  Vangelis Kokkevis  <vangelis@chromium.org>
2363
2364         [chromium] FPS counter causes garbage to be displayed at top left corner
2365         https://bugs.webkit.org/show_bug.cgi?id=81851
2366
2367         The HUD expects the PlatformCanvas it paints on to be cleared on creation which is
2368         no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 .
2369         This patch does an explicit clearRect before the HUD contents are painted.
2370
2371         Reviewed by Adrienne Walker.
2372
2373         TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly.
2374
2375         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2376         (WebCore::CCHeadsUpDisplay::draw):
2377
2378 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
2379
2380         Touch a file to make Chromium Windows bots happy.
2381
2382         * css/CSSValueKeywords.in:
2383
2384 2012-03-19  Igor Oliveira  <igor.o@sisa.samsung.com>
2385
2386         Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2)
2387         https://bugs.webkit.org/show_bug.cgi?id=38025
2388
2389         Implement updateAnimationTimerForRender. This reduces unnecessary animation
2390         steps on the current RenderObject by checking the value of timeToNextService
2391         before starting a new timer.
2392
2393         Reviewed by Dean Jackson.
2394
2395         Test: animations/animation-welcome-safari.html
2396
2397         * page/animation/AnimationController.cpp:
2398         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
2399         (WebCore):
2400         (WebCore::AnimationController::updateAnimations):
2401         * page/animation/AnimationControllerPrivate.h:
2402         (AnimationControllerPrivate):
2403
2404 2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2405
2406         Unreviewed, rolling out r111616.
2407         http://trac.webkit.org/changeset/111616
2408         https://bugs.webkit.org/show_bug.cgi?id=81862
2409
2410         broke chromium mac (Requested by eae on #webkit).
2411
2412         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2413         (WebCore::CCLayerImpl::appendQuads):
2414         * platform/graphics/chromium/cc/CCLayerImpl.h:
2415         (CCLayerImpl):
2416         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2417         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2418         (WebCore::CCLayerTreeHostImpl::drawLayers):
2419         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2420         (CCLayerTreeHostImpl):
2421         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2422         (WebCore::CCQuadCuller::append):
2423         * platform/graphics/chromium/cc/CCQuadCuller.h:
2424         (CCQuadCuller):
2425         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2426         (WebCore::CCRenderPass::appendQuadsForLayer):
2427         * platform/graphics/chromium/cc/CCRenderPass.h:
2428         (CCRenderPass):
2429         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2430         (WebCore::CCScrollbarLayerImpl::appendQuads):
2431         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2432         (CCScrollbarLayerImpl):
2433         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2434         (WebCore::CCSingleThreadProxy::doComposite):
2435         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2436         (WebCore::CCSolidColorLayerImpl::appendQuads):
2437         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2438         (CCSolidColorLayerImpl):
2439         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2440         (WebCore::CCTextureLayerImpl::appendQuads):
2441         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
2442         (CCTextureLayerImpl):
2443         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2444         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
2445         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2446         (WebCore::CCTiledLayerImpl::appendQuads):
2447         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2448         (CCTiledLayerImpl):
2449         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2450         (WebCore::CCVideoLayerImpl::appendQuads):
2451         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2452         (CCVideoLayerImpl):
2453
2454 2012-03-21  Beth Dakin  <bdakin@apple.com>
2455
2456         https://bugs.webkit.org/show_bug.cgi?id=80322
2457         Implement image-set
2458
2459         Reviewed by Dean Jackson.
2460
2461         This initial implementation of -webkit-image-set. 
2462         http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html
2463         The idea behind the feature is to allow authors to provide multiple variants 
2464         of the same image at differing resolutions, and to allow the User Agent to 
2465         choose the resource that is most appropriate at the time. This patch will 
2466         choose the most appropriate image based on device scale factor.
2467
2468         CSSImageSetValue inherits from CSSValueList and behaves a lot like 
2469         CSSImageValue.
2470         * WebCore.xcodeproj/project.pbxproj:
2471         * css/CSSImageSetValue.h: Added.
2472         (WebCore):
2473         (CSSImageSetValue):
2474         (WebCore::CSSImageSetValue::create):
2475         (WebCore::CSSImageSetValue::isPending):
2476         (ImageWithScale):
2477         (WebCore::CSSImageSetValue::compareByScaleFactor):
2478         * css/CSSImageSetValue.cpp: Added.
2479         (WebCore):
2480         (WebCore::CSSImageSetValue::CSSImageSetValue):
2481         (WebCore::CSSImageSetValue::~CSSImageSetValue):
2482         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
2483         (WebCore::CSSImageSetValue::customCssText):
2484
2485         fillImageSet() iterates through the value list and turns the information into 
2486         a sorted Vector of ImageWithScales (which is a struct containing image URLs 
2487         and scale factors).
2488         (WebCore::CSSImageSetValue::fillImageSet):
2489
2490         cachedImageSet() finds which image is most appropriate based on the device 
2491         scale factor, and it loads only that image. In the future, additional scale 
2492         factors will be taken into account.
2493         (WebCore::CSSImageSetValue::bestImageForScaleFactor):
2494         (WebCore::CSSImageSetValue::cachedImageSet):
2495
2496         parseImageSet() is called everywhere in the CSSParser that a regular image or 
2497         generated image can be found.
2498         * css/CSSParser.cpp:
2499         (WebCore::CSSParser::parseValue):
2500         (WebCore::CSSParser::parseContent):
2501         (WebCore::CSSParser::parseFillImage):
2502         (WebCore::CSSParser::parseBorderImage):
2503         (WebCore):
2504         (WebCore::CSSParser::parseImageSet):
2505         * css/CSSParser.h:
2506
2507         Since CSSImageSetValue is implemented as a value list, 
2508         ApplyPropertyFillLayer::applyValue() needs to be more specific when it's 
2509         looking for a list of multiple URLs.
2510         * css/CSSStyleApplyProperty.cpp:
2511         (WebCore::ApplyPropertyFillLayer::applyValue):
2512
2513         Handle image-set as a valid image value.
2514         * css/CSSStyleSelector.cpp:
2515         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2516         * css/CSSStyleSelector.h:
2517         (CSSStyleSelector):
2518         * css/CSSValue.cpp:
2519         (WebCore::CSSValue::cssText):
2520         (WebCore::CSSValue::destroy):
2521         * css/CSSValue.h:
2522         (CSSValue):
2523         (WebCore::CSSValue::isImageSetValue):
2524
2525         computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image.
2526         * loader/cache/CachedImage.cpp:
2527         (WebCore::CachedImage::computeIntrinsicDimensions):
2528         * loader/cache/CachedImage.h:
2529         (CachedImage):
2530         * platform/graphics/GeneratedImage.h:
2531         (GeneratedImage):
2532         * platform/graphics/GeneratorGeneratedImage.cpp:
2533         (WebCore::GeneratedImage::computeIntrinsicDimensions):
2534         * platform/graphics/Image.cpp:
2535         (WebCore::Image::computeIntrinsicDimensions):
2536         * platform/graphics/Image.h:
2537         (Image):
2538         * platform/graphics/cg/PDFDocumentImage.cpp:
2539         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
2540         * platform/graphics/cg/PDFDocumentImage.h:
2541         (PDFDocumentImage):
2542         * svg/graphics/SVGImage.cpp:
2543         (WebCore::SVGImage::computeIntrinsicDimensions):
2544         * svg/graphics/SVGImage.h:
2545         (SVGImage):
2546
2547         Inherits from StyleImage and returns a scaled size for imageSize() and 
2548         computeIntrinsicDimensions().
2549         * rendering/style/StyleCachedImageSet.cpp: Added.
2550         (WebCore):
2551         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
2552         (WebCore::StyleCachedImageSet::cssValue):
2553         (WebCore::StyleCachedImageSet::canRender):
2554         (WebCore::StyleCachedImageSet::isLoaded):
2555         (WebCore::StyleCachedImageSet::errorOccurred):
2556         (WebCore::StyleCachedImageSet::imageSize):
2557         (WebCore::StyleCachedImageSet::imageHasRelativeWidth):
2558         (WebCore::StyleCachedImageSet::imageHasRelativeHeight):
2559         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
2560         (WebCore::StyleCachedImageSet::usesImageContainerSize):
2561         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
2562         (WebCore::StyleCachedImageSet::addClient):
2563         (WebCore::StyleCachedImageSet::removeClient):
2564         (WebCore::StyleCachedImageSet::image):
2565         * rendering/style/StyleCachedImageSet.h: Added.
2566         (WebCore):
2567         (StyleCachedImageSet):
2568         (WebCore::StyleCachedImageSet::create):
2569         (WebCore::StyleCachedImageSet::data):
2570         (WebCore::StyleCachedImageSet::cachedImage):
2571
2572         Handle image-set.
2573         * rendering/style/StyleImage.h:
2574         (WebCore::StyleImage::isCachedImageSet):
2575         (WebCore::StyleImage::StyleImage):
2576         (StyleImage):
2577         * rendering/style/StylePendingImage.h:
2578         (StylePendingImage):
2579         (WebCore::StylePendingImage::cssImageSetValue):
2580
2581 2012-03-21  David Barton  <dbarton@mathscribe.com>
2582
2583         MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp
2584         https://bugs.webkit.org/show_bug.cgi?id=81850
2585
2586         Reviewed by Eric Seidel.
2587
2588         This prepares these files for bug fixes, and eventually combining their common code. To
2589         understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's
2590         simpler than RenderMathMLRoot.cpp.
2591
2592         No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this.
2593
2594         * rendering/mathml/RenderMathMLRoot.cpp:
2595         (WebCore):
2596         (WebCore::RenderMathMLRoot::addChild):
2597         (WebCore::RenderMathMLRoot::paint):
2598         (WebCore::RenderMathMLRoot::layout):
2599         * rendering/mathml/RenderMathMLRoot.h:
2600         (WebCore):
2601         (RenderMathMLRoot):
2602         * rendering/mathml/RenderMathMLSquareRoot.cpp:
2603         (WebCore):
2604         (WebCore::RenderMathMLSquareRoot::paint):
2605         (WebCore::RenderMathMLSquareRoot::layout):
2606         * rendering/mathml/RenderMathMLSquareRoot.h:
2607         (WebCore):
2608         (RenderMathMLSquareRoot):
2609         * rendering/mathml/RenderMathMLSubSup.h:
2610         (WebCore):
2611
2612 2012-03-21  Tony Chang  <tony@chromium.org>
2613
2614         refactor flexbox in preparation for flex-line-pack
2615         https://bugs.webkit.org/show_bug.cgi?id=81843
2616
2617         Reviewed by Ojan Vafai.
2618
2619         Replace WrapReverseContext with a vector of LineContexts that contain
2620         the same information, plus values needed for flex-align.
2621
2622         alignChildren has been moved to after all the lines have been
2623         positioned. We want to align children after flex-line-pack has changed
2624         the size of each line to avoid unnecessary layouts.
2625
2626         No new tests, just refactoring.
2627
2628         * rendering/RenderFlexibleBox.cpp:
2629         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
2630         holds information needed for wrap-reverse and aligning children.
2631         (RenderFlexibleBox::LineContext):
2632         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
2633         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
2634         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
2635         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
2636         * rendering/RenderFlexibleBox.h:
2637
2638 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
2639
2640         BDI element should have dir=auto by default
2641         https://bugs.webkit.org/show_bug.cgi?id=68773
2642
2643         Reviewed by Daniel Bates.
2644
2645         Treat bdi elements without dir content attribute as if they have dir=auto per spec:
2646         http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-bdi-element
2647
2648         The patch tries to encapsulate the logic to look for dir content attribute and dir=auto.
2649
2650         It also adds HTMLBDIElement interface (binding remains to use HTMLElement) to set
2651         selfOrAncestorHasDirAutoAttribute flag true by default, which is used by functions like
2652         directionalityIfhasDirAutoAttribute to look for elements with dir=auto. Since dir=auto-ness of bdi
2653         elements can be overridden by dir content attribute, we must change and only change the default value.
2654
2655         Tests: fast/text/international/bdi-dir-default-to-auto-expected.html
2656                fast/text/international/bdi-dir-default-to-auto.html
2657
2658         * GNUmakefile.list.am:
2659         * Target.pri:
2660         * WebCore.gypi:
2661         * WebCore.vcproj/WebCore.vcproj:
2662         * WebCore.xcodeproj/project.pbxproj:
2663         * css/CSSStyleSelector.cpp:
2664         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2665         * html/HTMLBDIElement.h: Added.
2666         (WebCore):
2667         (HTMLBDIElement):
2668         (WebCore::HTMLBDIElement::create):
2669         (WebCore::HTMLBDIElement::HTMLBDIElement): Sets selfOrAncestorHasDirAutoAttribute to true because
2670         bdi elements are treated as if it has dir=auto by default.
2671         * html/HTMLElement.cpp:
2672         (WebCore::elementAffectsDirectionality): Added. Checks if the specified element is bdi or
2673         has dir content attribute.
2674         (WebCore):
2675         (WebCore::setHasDirAutoFlagRecursively):
2676         (WebCore::HTMLElement::hasDirectionAuto): Added. Checks if the specified element should be treated
2677         as if it has dir=auto (bdi or element with dir=auto).
2678         (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute):
2679         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
2680         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
2681         * html/HTMLElement.h:
2682         (HTMLElement):
2683         * html/HTMLTagNames.in: Use HTMLBDIElement instead of HTMLElement for constructing bdi element
2684         to set selfOrAncestorHasDirAutoAttribute true but still use HTMLElement for binding.
2685
2686 2012-03-21  Luke Macpherson  <macpherson@chromium.org>
2687
2688         Use CSSPrimitiveValue::convertToLength() in a few places.
2689         https://bugs.webkit.org/show_bug.cgi?id=81492
2690
2691         Reviewed by Eric Seidel.
2692
2693         No new tests - refactoring only.
2694
2695         CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated
2696         in many places in CSSStyleSelector. This patch removes some of that code duplication.
2697
2698         * css/CSSStyleApplyProperty.cpp:
2699         (WebCore::ApplyPropertyVerticalAlign::applyValue):
2700         * css/CSSStyleSelector.cpp:
2701         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2702
2703 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
2704
2705         Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r111601.
2706
2707         * rendering/svg/RenderSVGRoot.cpp:
2708
2709 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
2710
2711         Build fix for !ENABLE(INSPECTOR) after r104831.
2712
2713         * bindings/js/ScriptDebugServer.cpp:
2714         (WebCore::ScriptDebugServer::dispatchDidParseSource):
2715
2716 2012-03-21  Xiaomei Ji  <xji@chromium.org>
2717
2718         visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox
2719         https://bugs.webkit.org/show_bug.cgi?id=81408
2720
2721         Reviewed by Ryosuke Niwa.
2722
2723         Cache logically ordered leaf boxes under a particular root box.
2724         Also, move 'Vector<UChar, 1024> string' declared in visualWordPosition() to outside of loop (it is always
2725         clear-ed before use).
2726
2727         * editing/visible_units.cpp:
2728         (CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box.
2729         (WebCore::CachedLogicallyOrderedLeafBoxes::size):
2730         (WebCore::CachedLogicallyOrderedLeafBoxes::firstBox):
2731         (WebCore):
2732         (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
2733         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextBox):
2734         (WebCore::CachedLogicallyOrderedLeafBoxes::nextTextBox):
2735         (WebCore::CachedLogicallyOrderedLeafBoxes::collectBoxes):
2736         (WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
2737         (WebCore::logicallyPreviousBox): Pass CachedLogicallyOrderedLeafBoxes object around.
2738         (WebCore::logicallyNextBox):
2739         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2740         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2741         (WebCore::visualWordPosition):
2742
2743 2012-03-21  Dana Jansens  <danakj@chromium.org>
2744
2745         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
2746         https://bugs.webkit.org/show_bug.cgi?id=81437
2747
2748         Reviewed by Adrienne Walker.
2749
2750         Split CCLayerTreeHostImpl::drawLayers() into two phases:
2751         prepareToDraw() and drawLayers().
2752
2753         When calculating a RenderPass, and we checkerboard a quad on a
2754         layer, bubble this info back up to CCLayerTreeHostImpl. If the
2755         layer is transforming in an animation, then abort the prepareToDraw()
2756         phase and cause it to return false back to the thread proxy.
2757
2758         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
2759
2760         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2761         (WebCore::CCLayerImpl::appendQuads):
2762         * platform/graphics/chromium/cc/CCLayerImpl.h:
2763         (CCLayerImpl):
2764         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2765         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2766         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
2767         (WebCore):
2768         (WebCore::CCLayerTreeHostImpl::drawLayers):
2769         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2770         (CCLayerTreeHostImpl):
2771         (FrameData):
2772         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2773         (WebCore::CCQuadCuller::append):
2774         * platform/graphics/chromium/cc/CCQuadCuller.h:
2775         (CCQuadCuller):
2776         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2777         (WebCore::CCRenderPass::appendQuadsForLayer):
2778         * platform/graphics/chromium/cc/CCRenderPass.h:
2779         (CCRenderPass):
2780         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2781         (WebCore::CCScrollbarLayerImpl::appendQuads):
2782         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2783         (CCScrollbarLayerImpl):
2784         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2785         (WebCore::CCSingleThreadProxy::doComposite):
2786         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2787         (WebCore::CCSolidColorLayerImpl::appendQuads):
2788         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2789         (CCSolidColorLayerImpl):
2790         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2791         (WebCore::CCTextureLayerImpl::appendQuads):
2792         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
2793         (CCTextureLayerImpl):
2794         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2795         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
2796         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2797         (WebCore::CCTiledLayerImpl::appendQuads):
2798         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2799         (CCTiledLayerImpl):
2800         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2801         (WebCore::CCVideoLayerImpl::appendQuads):
2802         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2803         (CCVideoLayerImpl):
2804
2805 2012-03-21  Enrica Casucci  <enrica@apple.com>
2806
2807         WebKitURLWithTitles pasteboard format should support URLs containing Emoji characters.
2808         https://bugs.webkit.org/show_bug.cgi?id=81835
2809         <rdar://problem/11082749>
2810
2811         Reviewed by Brady Eidson.
2812
2813         When writing the URL in the pasteboard for the WebURLWithTitles format,
2814         we use the user visible string instead of the original URL.
2815         In case of URL with Unicode characters, we lose the encoding.
2816         
2817         Added TestWebKitAPI test.
2818
2819         * platform/mac/PasteboardMac.mm:
2820         (WebCore::writeURLForTypes): Writes to the pasteboard the original URL.
2821
2822 2012-03-21  Levi Weintraub  <leviw@chromium.org>
2823
2824         Correct LayoutUnit usage in VisiblePosition.cpp
2825         https://bugs.webkit.org/show_bug.cgi?id=81775
2826
2827         Reviewed by Eric Seidel.
2828
2829         Correcting a mismatch between the .h and .cpp for the definition of localCaretRect,
2830         and properly using LayoutUnits for local coordinates.
2831
2832         No new tests. No change in behavior.
2833
2834         * editing/VisiblePosition.cpp:
2835         (WebCore::VisiblePosition::localCaretRect): Switching to return a LayoutRect, as in the
2836         header. Local coordinates are in LayoutUnits.
2837         (WebCore::VisiblePosition::absoluteCaretBounds): Using LayoutRect for the localCaretRect.
2838         (WebCore::VisiblePosition::lineDirectionPointForBlockDirectionNavigation): Ditto.
2839
2840 2012-03-21  Adam Klein  <adamk@chromium.org>
2841
2842         "this" argument for MutationCallbacks should be the MutationObserver
2843         https://bugs.webkit.org/show_bug.cgi?id=81712
2844
2845         Reviewed by Adam Barth.
2846
2847         Test: fast/mutation/callback-arguments.html
2848
2849         * bindings/js/JSCallbackData.cpp:
2850         (WebCore::JSCallbackData::invokeCallback): Add an overload that takes
2851         an explicit this argument and have the old method call the new one.
2852         * bindings/js/JSCallbackData.h:
2853         (JSCallbackData):
2854         * bindings/js/JSMutationCallbackCustom.cpp:
2855         (WebCore::JSMutationCallback::handleEvent): Call the new overload.
2856         * bindings/v8/custom/V8CustomVoidCallback.cpp:
2857         (WebCore::invokeCallback): Add an overload that takes an explicit this
2858         argument and have the old method call the new one.
2859         * bindings/v8/custom/V8CustomVoidCallback.h:
2860         (WebCore):
2861         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
2862         (WebCore::V8MutationCallback::handleEvent): Call the new overload.
2863
2864 2012-03-21  Alexandru Chiculita  <achicu@adobe.com>
2865
2866         [CSS Shaders] Make CSS Shaders compile on Chromium
2867         https://bugs.webkit.org/show_bug.cgi?id=81435
2868
2869         Reviewed by Stephen White.
2870
2871         This patch enables the CSS Shaders compile time flag, but keeps the runtime flag disabled.
2872         The only way to test the functionality now is to use the overridePreference from dump render tree.
2873
2874         Also part of this patch I fix a layering violation: I removed the "Document" reference from the FECustomFilter.cpp and passed the
2875         HostWindow directly. There should be no problem when the HostWindow changes, because the RenderLayer and the FECustomFilter
2876         get recreated anyway.
2877
2878         No new tests. I've updated the existing custom filter tests to run under Chromium and added the expected results.
2879         I've just added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force 
2880         enable the feature at runtime. 
2881
2882         * loader/cache/CachedResource.cpp: Made CachedResource::ShaderResource report as ResourceRequest::TargetIsSubresource for Chromium.
2883         (WebCore::cachedResourceTypeToTargetType):
2884
2885         * platform/graphics/filters/FECustomFilter.cpp:
2886         (WebCore::FECustomFilter::FECustomFilter): Removed Document and just used the HostWindow directly.
2887         (WebCore::FECustomFilter::create):
2888         (WebCore::FECustomFilter::initializeContext):
2889         (WebCore::FECustomFilter::bindVertexAttribute): There was a typo and instead of using the "size" parameter it always used 4 component attribute.
2890         Other drivers didn't complain about it, but it was clearly a bug.
2891         (WebCore::FECustomFilter::bindProgramAndBuffers): Reading the image back from GPU will flip vertically the framebuffer in Chromium. I've flipped the
2892         projection matrix only on Chromium, so that we get the correct result.
2893
2894         * rendering/FilterEffectRenderer.cpp:
2895         (WebCore::FilterEffectRenderer::build): Passing the HostWindow instead of the Document.
2896
2897 2012-03-21  Mark Pilgrim  <pilgrim@chromium.org>
2898
2899         Realphabetize about webaudio move
2900         https://bugs.webkit.org/show_bug.cgi?id=81825
2901
2902         Reviewed by Adam Barth.
2903
2904         No new tests, all existing tests pass.
2905
2906         * CMakeLists.txt:
2907
2908 2012-03-21  Anders Carlsson  <andersca@apple.com>
2909
2910         Evict tiles from pages in background tabs
2911         https://bugs.webkit.org/show_bug.cgi?id=81829
2912         <rdar://problem/10866152>
2913
2914         Reviewed by Andreas Kling.
2915
2916         When the tile cache for a page is no longer in a window (which happens when it's moved to 
2917         a background tab), schedule a tile revalidation after 4 seconds. This tile revalidation 
2918         will ensure that tiles outside of the visible rect will be dropped.
2919
2920         * platform/graphics/ca/mac/TileCache.h:
2921         (TileCache):
2922         * platform/graphics/ca/mac/TileCache.mm:
2923         (WebCore::TileCache::tileCacheLayerBoundsChanged):
2924         (WebCore::TileCache::setIsInWindow):
2925         (WebCore::TileCache::tileCoverageRect):
2926         (WebCore):
2927         (WebCore::TileCache::scheduleTileRevalidation):
2928         (WebCore::TileCache::revalidateTiles):
2929
2930 2012-03-21  Stephen Chenney  <schenney@chromium.org>
2931
2932         SVG layout leaves objects still needing layout
2933         https://bugs.webkit.org/show_bug.cgi?id=81006
2934
2935         Reviewed by Nikolas Zimmermann.
2936
2937         Change the layout of SVG objects such that resources that trigger
2938         layout of other objects are handled in a distinct pass, and then
2939         objects still requiring layout are laid out again.
2940
2941         Test: svg/custom/delete-text-innerText-crash.html
2942
2943         * rendering/svg/RenderSVGResourceContainer.cpp:
2944         (WebCore::RenderSVGResourceContainer::layout):
2945         * rendering/svg/RenderSVGResourceMarker.cpp:
2946         (WebCore::RenderSVGResourceMarker::layout):
2947         * rendering/svg/RenderSVGRoot.cpp:
2948         (WebCore::RenderSVGRoot::layout):
2949         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
2950         (WebCore):
2951         * rendering/svg/RenderSVGRoot.h:
2952         (RenderSVGRoot):
2953
2954 2012-03-21  Tim Horton  <timothy_horton@apple.com>
2955
2956         Make use of CG rounded-rect primitives
2957         https://bugs.webkit.org/show_bug.cgi?id=79932
2958         <rdar://problem/9274953>
2959
2960         Reviewed by Simon Fraser.
2961
2962         Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman.
2963
2964         Dispatch to potentially platform-specific rounded rectangle path
2965         construction from addPathForRoundedRect. Make use of this to call
2966         wkCGPathAddRoundedRect on Lion and above, as long as the rounded
2967         corners are all equivalent.
2968
2969         The origin of the stroke dash differs between the bezier approach
2970         and the path added by wkCGPathAddRoundedRect, so Path::addRoundedRect()
2971         takes a new parameter allowing code which is sensitive to stroke dash
2972         origin (i.e. SVG) to fall back to the old behavior if need be.
2973
2974         Make use of the new Path::addRoundedRect() parameter to fall back to
2975         the old (bezier) rounded-rect behavior when constructing a dashed SVG path,
2976         in order to continue complying with the spec.
2977
2978         No new tests, as this is covered by many that use rounded corners,
2979         and is only a performance improvement.
2980
2981         * WebCore.exp.in:
2982         * platform/graphics/Path.cpp:
2983         (WebCore::Path::addRoundedRect):
2984         (WebCore):
2985         (WebCore::Path::addPathForRoundedRect):
2986         * platform/graphics/Path.h:
2987         (Path):
2988         * platform/graphics/cg/PathCG.cpp:
2989         (WebCore::Path::platformAddPathForRoundedRect):
2990         (WebCore):
2991         * platform/mac/WebCoreSystemInterface.h:
2992         * platform/mac/WebCoreSystemInterface.mm:
2993         * rendering/svg/SVGPathData.cpp:
2994         (WebCore::updatePathFromRectElement):
2995
2996 2012-03-21  David Reveman  <reveman@chromium.org>
2997
2998         [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support.
2999         https://bugs.webkit.org/show_bug.cgi?id=80988
3000
3001         Reviewed by Adrienne Walker.
3002
3003         Expose EXT_occlusion_query API to WebKit compositor. Add
3004         GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query
3005         enums.
3006
3007         * platform/graphics/chromium/Extensions3DChromium.h:
3008         (Extensions3DChromium):
3009
3010 2012-03-21  Tony Chang  <tony@chromium.org>
3011
3012         compute the sign of flexibility for new flexbox
3013         https://bugs.webkit.org/show_bug.cgi?id=81722
3014
3015         Reviewed by Ojan Vafai.
3016
3017         This implements the computation of the sign of flexibility used by the
3018         new flexing algorithm.
3019         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
3020
3021         No new tests, we don't use the sign of flexibility yet.
3022
3023         * rendering/RenderFlexibleBox.cpp:
3024         (WebCore::RenderFlexibleBox::layoutFlexItems):
3025         (WebCore::RenderFlexibleBox::computeNextFlexLine): Compute the size
3026         adjusted for min/max as well as not adjusted.
3027         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Renamed to match
3028         spec text better.
3029         * rendering/RenderFlexibleBox.h: Added enum for flex sign.
3030
3031 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
3032
3033         Web Inspector: Extract WebInspector.UIBreakpoint from WebInspector.Breakpoint.
3034         https://bugs.webkit.org/show_bug.cgi?id=81669
3035
3036         Reviewed by Pavel Feldman.
3037
3038         * inspector/front-end/BreakpointManager.js:
3039         (WebInspector.BreakpointManager.get for):
3040         (WebInspector.BreakpointManager):
3041         (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
3042         (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
3043         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
3044         (WebInspector.BreakpointManager.prototype.setBreakpoint):
3045         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
3046         (WebInspector.BreakpointManager.prototype._innerRemoveBreakpoint):
3047         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
3048         (WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
3049         (WebInspector.BreakpointManager.prototype._uiBreakpoints.get this):
3050         (WebInspector.BreakpointManager.prototype._uiBreakpoints):
3051         (WebInspector.BreakpointManager.prototype.get _uiBreakpoint):
3052         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
3053         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
3054         (WebInspector.BreakpointManager.prototype._breakpoints):
3055         (WebInspector.BreakpointManager.prototype._breakpoint):
3056         (WebInspector.BreakpointManager.prototype._addBreakpointToModel):
3057         (WebInspector.BreakpointManager.prototype._removeBreakpointFromModel):
3058         (WebInspector.BreakpointManager.prototype._forEachBreakpoint):
3059         (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
3060         (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
3061         (WebInspector.BreakpointManager.prototype.debuggerReset):
3062         (WebInspector.Breakpoint.prototype.serialize):
3063         (WebInspector.Breakpoint.prototype.get uiBreakpoint):
3064         (WebInspector.Breakpoint.prototype.createUIBreakpoint):
3065         (WebInspector.Breakpoint.prototype.removeUIBreakpoint):
3066         (WebInspector.UIBreakpoint):
3067         * inspector/front-end/DebuggerPresentationModel.js:
3068         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
3069         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
3070         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
3071         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
3072         * inspector/front-end/ScriptsPanel.js:
3073
3074 2012-03-21  Anders Carlsson  <andersca@apple.com>
3075
3076         TileCache needs to know if its containing page is in a window
3077         https://bugs.webkit.org/show_bug.cgi?id=81821
3078
3079         Reviewed by Andreas Kling.
3080
3081         This is in preparation for throwing away invisible tiles in background tabs to reduce memory usage.
3082
3083         * page/FrameView.cpp:
3084         (WebCore::FrameView::didMoveOnscreen):
3085         (WebCore::FrameView::willMoveOffscreen):
3086         * page/Page.cpp:
3087         (WebCore::Page::Page):
3088         (WebCore::Page::didMoveOnscreen):
3089         (WebCore::Page::willMoveOffscreen):
3090         * page/Page.h:
3091         (WebCore::Page::isOnscreen):
3092         (Page):
3093         * platform/graphics/TiledBacking.h:
3094         (TiledBacking):
3095         * platform/graphics/ca/mac/TileCache.h:
3096         (TileCache):
3097         * platform/graphics/ca/mac/TileCache.mm:
3098         (WebCore::TileCache::TileCache):
3099         (WebCore::TileCache::setIsInWindow):
3100         (WebCore):
3101         * rendering/RenderLayerBacking.cpp:
3102         (WebCore::RenderLayerBacking::RenderLayerBacking):
3103
3104 2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
3105
3106         Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp
3107         https://bugs.webkit.org/show_bug.cgi?id=81744
3108
3109         Reviewed by Chris Rogers.
3110
3111         * platform/audio/ReverbConvolverStage.cpp:
3112         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
3113
3114 2012-03-21  Xiaomei Ji  <xji@chromium.org>
3115
3116         [chromium] Font fallback in cr-win is wrong for string contains zero-width-space.
3117         https://bugs.webkit.org/show_bug.cgi?id=79961
3118
3119         Reviewed by Adam Barth.
3120
3121         Treat zero-width-space (\u200B) as true for treatAsZeroWidthSpaceInComplexScipt().
3122
3123         * platform/graphics/Font.h:
3124         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript):
3125         * platform/graphics/mac/ComplexTextController.cpp:
3126         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3127         * platform/graphics/win/UniscribeController.cpp:
3128         (WebCore::UniscribeController::shapeAndPlaceItem):
3129
3130 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
3131
3132         Build fix for !ENABLE(INSPECTOR) after r111005.
3133
3134         * inspector/ContentSearchUtils.h:
3135
3136 2012-03-21  Ulan Degenbaev  <ulan@chromium.org>
3137
3138         [V8] V8GCForContextDispose should indicate whether a context is disposed for the main frame or not
3139         https://bugs.webkit.org/show_bug.cgi?id=81200
3140
3141         Reviewed by Adam Barth.
3142
3143         Pass a hint to V8::IdleNotification that requests more aggressive GC
3144         when a main frame context is disposed and requests incremental GC otherwise.
3145
3146         * bindings/v8/V8DOMWindowShell.cpp:
3147         (WebCore::V8DOMWindowShell::disposeContextHandles):
3148         * bindings/v8/V8GCForContextDispose.cpp:
3149         (WebCore::V8GCForContextDispose::V8GCForContextDispose):
3150         (WebCore::V8GCForContextDispose::notifyContextDisposed):
3151         (WebCore::V8GCForContextDispose::pseudoIdleTimerFired):
3152         * bindings/v8/V8GCForContextDispose.h:
3153         (V8GCForContextDispose):
3154
3155 2012-03-21  Nat Duca  <nduca@chromium.org>
3156
3157         [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero
3158         https://bugs.webkit.org/show_bug.cgi?id=81790
3159
3160         Reviewed by James Robinson.
3161
3162         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3163         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3164
3165 2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
3166
3167         Add multichannel support in RealtimeAnalyser
3168         https://bugs.webkit.org/show_bug.cgi?id=81745
3169
3170         Reviewed by Chris Rogers.
3171
3172         * Modules/webaudio/RealtimeAnalyser.cpp:
3173         (WebCore::RealtimeAnalyser::writeInput):
3174         (WebCore):
3175
3176 2012-03-21  Eric Carlson  <eric.carlson@apple.com>
3177
3178         Removing HTMLTrackElement does not delete TextTrack
3179         https://bugs.webkit.org/show_bug.cgi?id=80873
3180
3181         Reviewed by Antti Koivisto.
3182
3183         No new tests, but media/track/track-language-preference.html has been updated
3184         to test this fix.
3185
3186         * html/HTMLMediaElement.cpp:
3187         (WebCore::HTMLMediaElement::didAddTrack): Renamed from trackWasAdded.
3188         (WebCore::HTMLMediaElement::willRemoveTrack): Renamed from trackWasRemoved because it is
3189         called before the track is removed, to allow the TextTrack to be removed.
3190         * html/HTMLMediaElement.h:
3191
3192         * html/HTMLTrackElement.cpp:
3193         (WebCore::HTMLTrackElement::insertedIntoTree): Renamed from insertedIntoDocument
3194         (WebCore::HTMLTrackElement::willRemove): Renamed from removedFromDocument.
3195         * html/HTMLTrackElement.h:
3196
3197         * html/track/LoadableTextTrack.cpp:
3198         (WebCore::LoadableTextTrack::trackElementIndex): Don't include tracks that are not in the
3199         document in the calcualtion.
3200
3201 2012-03-21  Zeno Albisser  <zeno@webkit.org>
3202
3203         [Qt][Mac] ranlib segfaults when creating symbol tables for libWebCore.a.
3204         https://bugs.webkit.org/show_bug.cgi?id=81750
3205
3206         Building WebCore on mac currently creates an archive that is bigger than
3207         4GB. But ranlib fails to create a symbol table for such a big archive,
3208         even on 64bit machines.
3209         Therefore we start using SVGAllInOne.cpp when building debug
3210         on mac. This reduces the size of the archive by about 300MB.
3211
3212         Reviewed by Tor Arne Vestbø.
3213
3214         * Target.pri:
3215
3216 2012-03-21  Tommy Widenflycht  <tommyw@google.com>
3217
3218         [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate
3219         https://bugs.webkit.org/show_bug.cgi?id=81339
3220
3221         Reviewed by Adam Barth.
3222
3223         Not possible to test until the entire JSEP feature is commited.
3224
3225         * Modules/mediastream/IceCandidate.cpp:
3226         (WebCore::IceCandidate::toSdp):
3227         * Modules/mediastream/SessionDescription.cpp:
3228         (WebCore::SessionDescription::toSdp):
3229         * platform/mediastream/IceCandidateDescriptor.cpp:
3230         (WebCore::IceCandidateDescriptor::toSDP):
3231         * platform/mediastream/IceCandidateDescriptor.h:
3232         (IceCandidateDescriptor):
3233         * platform/mediastream/MediaStreamCenter.cpp:
3234         (WebCore::MediaStreamCenter::constructSDP):
3235         * platform/mediastream/MediaStreamCenter.h:
3236         (MediaStreamCenter):
3237         * platform/mediastream/SessionDescriptionDescriptor.cpp:
3238         (WebCore::SessionDescriptionDescriptor::SessionDescriptionDescriptor):
3239         (WebCore::SessionDescriptionDescriptor::toSDP):
3240         (WebCore::SessionDescriptionDescriptor::initialSDP):
3241         * platform/mediastream/SessionDescriptionDescriptor.h:
3242         (SessionDescriptionDescriptor):
3243
3244 2012-03-21  Yuta Kitamura  <yutak@chromium.org>
3245
3246         Use RFC version of WebSocket protocol by default
3247         https://bugs.webkit.org/show_bug.cgi?id=81718
3248
3249         Reviewed by Kent Tamura.
3250
3251         Flip the default value of Settings::m_useHixie76WebSocketProtocol so WebKit ports will use
3252         RFC version of WebSocket protocol by default.
3253
3254         All the existing ports already use the RFC protocol as of now, so this change will not make
3255         any impact (hopefully).
3256
3257         No new tests. No change in functionality.
3258
3259         * page/Settings.cpp:
3260         (WebCore::Settings::Settings):
3261
3262 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
3263
3264         Web Inspector: only show JS event listeners in Event Listeners tab of Elements panel
3265         https://bugs.webkit.org/show_bug.cgi?id=81798
3266
3267         Reviewed by Pavel Feldman.
3268
3269         * bindings/js/JSInjectedScriptHostCustom.cpp:
3270         (WebCore::getJSListenerFunctions):
3271         * bindings/js/ScriptEventListener.cpp:
3272         (WebCore::eventListenerHandlerBody):
3273         (WebCore::eventListenerHandlerLocation):
3274         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3275         (WebCore::getJSListenerFunctions):
3276         * inspector/InspectorDOMAgent.cpp:
3277         (WebCore::InspectorDOMAgent::getEventListeners):
3278
3279 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
3280
3281         EventListener::Type enum has unused member InspectorDOMAgentType
3282         https://bugs.webkit.org/show_bug.cgi?id=81794
3283
3284         Reviewed by Pavel Feldman.
3285
3286         * dom/EventListener.h:
3287
3288 2012-03-21  Tom Hudson  <tomhudson@google.com>
3289
3290         Incremental cleanup of BitmapImage: inlined virtual functions
3291         https://bugs.webkit.org/show_bug.cgi?id=81688
3292
3293         Reviewed by James Robinson.
3294
3295         No change in functionality, so no new tests.
3296
3297         Move virtual functions defined in headers into .cpp files.
3298
3299         * WebCore.gypi:
3300         * platform/graphics/BitmapImage.cpp:
3301         (WebCore::BitmapImage::isBitmapImage):
3302         (WebCore):
3303         (WebCore::BitmapImage::hasSingleSecurityOrigin):
3304         (WebCore::BitmapImage::nativeImageForCurrentFrame):
3305         (WebCore::BitmapImage::currentFrameHasAlpha):
3306         (WebCore::BitmapImage::notSolidColor):
3307         (WebCore::BitmapImage::decodedSize):
3308         (WebCore::BitmapImage::mayFillWithSolidColor):
3309         (WebCore::BitmapImage::solidColor):
3310         * platform/graphics/BitmapImage.h:
3311         (BitmapImage):
3312         * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Added.
3313         (WebCore):
3314         (WebCore::BitmapImageSingleFrameSkia::isBitmapImage):
3315         (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha):
3316         (WebCore::BitmapImageSingleFrameSkia::size):
3317         (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData):
3318         (WebCore::BitmapImageSingleFrameSkia::decodedSize):
3319         (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame):
3320         (WebCore::BitmapImageSingleFrameSkia::notSolidColor):
3321         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
3322         (BitmapImageSingleFrameSkia):
3323
3324 2012-03-21  Alexey Proskuryakov  <ap@apple.com>
3325
3326         Remove obsolete File attributes
3327         https://bugs.webkit.org/show_bug.cgi?id=79383
3328
3329         Reviewed by Hajime Morita.
3330
3331         * bindings/objc/PublicDOMInterfaces.h:
3332         * fileapi/File.h:
3333         * fileapi/File.idl:
3334         Removed fileName and fileSize, they have different names now.
3335
3336         * html/FileInputType.cpp:
3337         (WebCore::FileInputType::appendFormData):
3338         (WebCore::FileInputType::getTypeSpecificValue):
3339         (WebCore::FileInputType::defaultToolTip):
3340         Updated to use new function names.
3341
3342 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3343
3344         TiledBackingStore: Create the first round of tiles synchronously after setting the visible rect.
3345         https://bugs.webkit.org/show_bug.cgi?id=81762
3346
3347         Reviewed by Kenneth Rohde Christiansen.
3348
3349         The first round of tiles should cover completely the visible rect.
3350         Creating the tiles synchronously allows us to get the new tiles immediately
3351         and prevents an extra AC layers sync to be able to remove the old tiles.
3352
3353         At some point it might also make sense to remove the tile creation timer
3354         completely.
3355
3356         * platform/graphics/TiledBackingStore.cpp:
3357         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
3358
3359 2012-03-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3360
3361         TiledBackingStore: When checking if the visible area is covered, only convert to scaled coordinates once.
3362         https://bugs.webkit.org/show_bug.cgi?id=81519
3363
3364         Reviewed by Kenneth Rohde Christiansen.
3365
3366         Both visibleRect and coverageRatio call mapFromContents on the input rect,
3367         this woulc cause the coverageRatio to never reach 1.0 when the contents is
3368         scaled up.
3369
3370         * platform/graphics/TiledBackingStore.cpp:
3371         (WebCore::TiledBackingStore::visibleAreaIsCovered):
3372
3373 2012-03-21  Mao Yujie  <yujie.mao@intel.com>
3374
3375         MediaStream API: Need to support MediaStream constructor for JSC
3376         https://bugs.webkit.org/show_bug.cgi?id=78781
3377
3378         Reviewed by Adam Barth.
3379
3380         No new tests.
3381
3382         * Modules/mediastream/DOMWindowMediaStream.idl:
3383         * bindings/generic/RuntimeEnabledFeatures.h:
3384         (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
3385
3386 2012-03-21  Philip Rogers  <pdr@google.com>
3387
3388         Skip building resources if SVGTRef is not in a document
3389         https://bugs.webkit.org/show_bug.cgi?id=81473
3390
3391         Reviewed by Nikolas Zimmermann.
3392
3393         We can skip the building of pending resources in SVGTRef if we're not
3394         yet in a document. This mirrors the nearly identical logic in
3395         SVGUseElement::buildPendingResource() and
3396         SVGFEImageElement::buildPendingResource().
3397
3398         Test: http/tests/svg/tref-adoptNode-crash.html
3399
3400         * svg/SVGTRefElement.cpp:
3401         (WebCore::SVGTRefElement::buildPendingResource):
3402
3403 2012-03-21  Sami Kyostila  <skyostil@chromium.org>
3404
3405         [chromium] Use floating point scroll deltas for layers
3406         https://bugs.webkit.org/show_bug.cgi?id=81546
3407
3408         Reviewed by James Robinson.
3409
3410         Use floating point scroll deltas for layers instead of integral scroll
3411         deltas. This is because due to page scaling it may be necessary to
3412         scroll layers in sub-CSS-pixel steps to avoid visible jumps. When the
3413         floating point scroll offset is committed to the main thread, it is
3414         truncated to integer, but the fractional part is kept on the CC side to
3415         make sure fractional scroll offsets are accumulated correctly over
3416         multiple commits.
3417
3418         Test: CCLayerTreeHostTestFractionalScroll
3419
3420         * platform/graphics/FloatPoint.h:
3421         (WebCore::toSize):
3422         (WebCore):
3423         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3424         (WebCore::CCLayerImpl::scrollBy):
3425         (WebCore::CCLayerImpl::setScrollDelta):
3426         * platform/graphics/chromium/cc/CCLayerImpl.h:
3427         (WebCore::CCLayerImpl::scrollDelta):
3428         (CCLayerImpl):
3429         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3430         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
3431         (WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange):
3432         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
3433         (WebCore::CCLayerTreeHostImpl::animatePageScale):
3434
3435 2012-03-21  Li Yin  <li.yin@intel.com>
3436
3437         [WebSocket]The Sec-WebSocket-Accept MUST NOT appear more than once in an HTTP response
3438         https://bugs.webkit.org/show_bug.cgi?id=81655
3439
3440         Reviewed by Adam Barth.
3441
3442         Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header.html
3443
3444         * Modules/websockets/WebSocketHandshake.cpp:
3445         (WebCore::WebSocketHandshake::readHTTPHeaders):
3446
3447 2012-03-21  Alexei Filippov  <alexeif@chromium.org>
3448
3449         Web Inspector: Speedup heap snapshot loading.
3450         https://bugs.webkit.org/show_bug.cgi?id=81788
3451
3452         Reviewed by Yury Semikhatsky.
3453
3454         * inspector/front-end/HeapSnapshot.js:
3455         (WebInspector.HeapSnapshotLoader.prototype._parseNodes):
3456
3457 2012-03-21  Pavel Feldman  <pfeldman@chromium.org>
3458
3459         Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element.
3460         https://bugs.webkit.org/show_bug.cgi?id=81766
3461
3462         Reviewed by Yury Semikhatsky.
3463
3464         We should check event target and its ancestors for being edited, not use some
3465         global property. This change also introduces Event.prototype.consume so that we
3466         were consistently consuming events.
3467
3468         * inspector/front-end/AdvancedSearchController.js:
3469         (WebInspector.SearchView.prototype._onKeyDown):
3470         * inspector/front-end/BreakpointsSidebarPane.js:
3471         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
3472         * inspector/front-end/CSSSelectorProfileView.js:
3473         * inspector/front-end/Checkbox.js:
3474         (WebInspector.Checkbox.prototype.addEventListener):
3475         * inspector/front-end/ConsoleView.js:
3476         (WebInspector.ConsoleView.prototype._enterKeyPressed):
3477   &n