Web Inspector: UI performance test for network panel is incorrect. The time is includ...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
2
3         Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
4         https://bugs.webkit.org/show_bug.cgi?id=69087
5
6         The fix has the changes for the test and minor perf framework improvements.
7
8         Reviewed by Yury Semikhatsky.
9
10         * inspector/front-end/NetworkPanel.js:
11         (WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh):
12
13 2011-09-29  Vsevolod Vlasov  <vsevik@chromium.org>
14
15         Web Inspector: Make search-in-resource test simpler.
16         https://bugs.webkit.org/show_bug.cgi?id=69025
17
18         Changed search-in-resource test.
19         Removed error parameter from content provider's searchInContent callback.
20
21         Reviewed by Pavel Feldman.
22
23         * inspector/InspectorPageAgent.cpp:
24         (WebCore::InspectorPageAgent::searchInResource):
25         (WebCore::InspectorPageAgent::searchInResources):
26         * inspector/front-end/Resource.js:
27         (WebInspector.Resource.prototype.searchInContent):
28
29 2011-09-29  Hans Wennborg  <hans@chromium.org>
30
31         IndexedDB: Use LevelDB also for in-memory databases
32         https://bugs.webkit.org/show_bug.cgi?id=68903
33
34         Reviewed by Steve Block.
35
36         Add LevelDBDatabase::openInMemory() which uses leveldb::NewMemEnv()
37         to create in-memory LevelDB databases.
38
39         Use this in IDBLeveLDBBackingStore::open() when the caller passes in
40         an empty file path.
41         This happens in Chromium's incognito mode, and when running layout
42         tests.
43
44         Fix IDBSQLiteBackingStore::backingStoreExists() so it doesn't create
45         files when passed in an empty file path, but uses the in-memory mode
46         instead.
47
48         Existing layout tests will all be run in-memory.
49
50         * platform/leveldb/LevelDBDatabase.cpp:
51         (WebCore::LevelDBDatabase::~LevelDBDatabase):
52         (WebCore::openDB):
53         (WebCore::LevelDBDatabase::open):
54         (WebCore::LevelDBDatabase::openInMemory):
55         * platform/leveldb/LevelDBDatabase.h:
56         * storage/IDBLevelDBBackingStore.cpp:
57         (WebCore::IDBLevelDBBackingStore::open):
58         * storage/IDBSQLiteBackingStore.cpp:
59         (WebCore::IDBSQLiteBackingStore::backingStoreExists):
60
61 2011-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
62
63         Web Inspector: speed-up Network panel. Change _staleResources type from array to object.
64         https://bugs.webkit.org/show_bug.cgi?id=69081
65
66         There is a test with 30 requests.
67         For the each stage of loading a resource we have an entry in _staleResources array. There are at least 4 stages per request.
68         NetworkLogView._refresh function is creating/updating the resource row for the each such entry.
69         This array can be replaced with a hash map just because the resource associated with the entry is the same for all the entries with the same request id.
70
71         Reviewed by Pavel Feldman.
72
73         Test: inspector/performance/resources/network-append-30-requests.html
74
75         * inspector/front-end/NetworkPanel.js:
76         (WebInspector.NetworkLogView):
77         (WebInspector.NetworkLogView.prototype._invalidateAllItems):
78         (WebInspector.NetworkLogView.prototype.refresh):
79         (WebInspector.NetworkLogView.prototype._reset):
80         (WebInspector.NetworkLogView.prototype._refreshResource):
81
82 2011-09-28  Pavel Feldman  <pfeldman@google.com>
83
84         Web Inspector: make inspector protocol validation a part of the build process.
85         https://bugs.webkit.org/show_bug.cgi?id=68999
86
87         Since we'd like to commit to inspector protocol backwards compatibility, violating it
88         should be a build failure.
89
90         Reviewed by Yury Semikhatsky.
91
92         * CMakeLists.txt:
93         * CodeGenerators.pri:
94         * DerivedSources.make:
95         * GNUmakefile.am:
96         * WebCore.gyp/WebCore.gyp:
97         * inspector/Inspector.draft-01.json:
98         * inspector/Inspector.json:
99         * inspector/generate-inspector-idl:
100         * inspector/generate-protocol-externs:
101         * inspector/validate-protocol-compatibility:
102
103 2011-09-27  Pavel Feldman  <pfeldman@google.com>
104
105         Web Inspector: Scripts panel without folders causes errors when creating content scripts section.
106         https://bugs.webkit.org/show_bug.cgi?id=68827
107
108         Reviewed by Yury Semikhatsky.
109
110         * inspector/front-end/ScriptsPanel.js:
111         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare):
112         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered):
113         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
114
115 2011-09-28  Andrey Kosyakov  <caseq@chromium.org>
116
117         Web Inspector: network log view refresh optimizations
118         https://bugs.webkit.org/show_bug.cgi?id=69010
119
120         Reviewed by Pavel Feldman.
121
122         * inspector/front-end/NetworkPanel.js:
123         (WebInspector.NetworkLogView.prototype.refresh):
124
125 2011-09-29  Pavel Podivilov  <podivilov@chromium.org>
126
127         Web Inspector: split SourceFile.js into RawSourceCode.js and UISourceCodeContentProviders.js.
128         https://bugs.webkit.org/show_bug.cgi?id=69068
129
130         Reviewed by Yury Semikhatsky.
131
132         * WebCore.gypi:
133         * WebCore.vcproj/WebCore.vcproj:
134         * inspector/front-end/RawSourceCode.js: Renamed from Source/WebCore/inspector/front-end/SourceFile.js.
135         (WebInspector.RawSourceCode): Moved from SourceFile.js.
136         (WebInspector.UILocation): Moved from SourceFile.js.
137         * inspector/front-end/UISourceCodeContentProviders.js: Added. Moved ContentProvider implementations from SourceFile.js
138         (WebInspector.ScriptContentProvider):
139         (WebInspector.ScriptContentProvider.prototype.requestContent):
140         (WebInspector.ConcatenatedScriptsContentProvider):
141         (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent):
142         (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent.appendChunk):
143         (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent):
144         (WebInspector.ResourceContentProvider):
145         (WebInspector.ResourceContentProvider.prototype.requestContent):
146         (WebInspector.StaticContentProvider):
147         (WebInspector.StaticContentProvider.prototype.requestContent):
148         * inspector/front-end/WebKit.qrc:
149         * inspector/front-end/inspector.html:
150
151 2011-09-29  Philippe Normand  <pnormand@igalia.com>
152
153         [GStreamer] 2 flaky media tests
154         https://bugs.webkit.org/show_bug.cgi?id=67407
155
156         Reviewed by Martin Robinson.
157
158         Workaround for GStreamer bug#639941. In GStreamer
159         0.10.35 basesink reports wrong duration in case of EOS and
160         negative playback rate. This workaround fixes two media tests,
161         media/video-timeupdate-reverse-play.html and
162         media/video-reverse-play-duration.html.
163
164         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
165         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
166         (WebCore::MediaPlayerPrivateGStreamer::currentTime):
167         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
168
169 2011-09-29  Philippe Normand  <pnormand@igalia.com>
170
171         [GStreamer] fullscreen video pause/play fails
172         https://bugs.webkit.org/show_bug.cgi?id=66936
173
174         Reviewed by Martin Robinson.
175
176         Don't use the identity element to avoid painting of the in-window
177         video. Instead simply make the sink aware of the fullscreen state
178         and ignore buffers if fullscreen and autovideosink are
179         active. Also fixed two deadlocks happening when a paused pipeline
180         is switched to fullscreen and when fullscreen is disabled for a
181         paused pipeline.
182
183         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
184         (WebCore::GStreamerGWorld::enterFullscreen):
185         (WebCore::GStreamerGWorld::exitFullscreen):
186         * platform/graphics/gstreamer/GStreamerGWorld.h:
187         (WebCore::GStreamerGWorld::isFullscreen):
188         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
189         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
190         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
191         (webkit_video_sink_render):
192         (webkit_video_sink_new):
193         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
194
195 2011-09-29  Tim Horton  <timothy_horton@apple.com>
196
197         REGRESSION(87010): elements in ECMA-cloud neither filled nor blurred
198         https://bugs.webkit.org/show_bug.cgi?id=68679
199         <rdar://problem/10204649>
200
201         Reviewed by Nikolas Zimmermann.
202
203         Strip prefixes from SVG attributes before testing if they're supported.
204         Namespaced attributes will be matched using their namespace instead of
205         the (user-choosable) prefix.
206
207         Test: svg/custom/xlink-custom-namespace.svg
208
209         * svg/SVGAElement.cpp:
210         (WebCore::SVGAElement::isSupportedAttribute):
211         * svg/SVGAnimateMotionElement.cpp:
212         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
213         * svg/SVGAnimateTransformElement.cpp:
214         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
215         * svg/SVGAnimationElement.cpp:
216         (WebCore::SVGAnimationElement::isSupportedAttribute):
217         * svg/SVGCircleElement.cpp:
218         (WebCore::SVGCircleElement::isSupportedAttribute):
219         * svg/SVGClipPathElement.cpp:
220         (WebCore::SVGClipPathElement::isSupportedAttribute):
221         * svg/SVGComponentTransferFunctionElement.cpp:
222         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
223         * svg/SVGCursorElement.cpp:
224         (WebCore::SVGCursorElement::isSupportedAttribute):
225         * svg/SVGElement.h:
226         (WebCore::SVGAttributeHashTranslator::hash):
227         (WebCore::SVGAttributeHashTranslator::equal):
228         * svg/SVGEllipseElement.cpp:
229         (WebCore::SVGEllipseElement::isSupportedAttribute):
230         * svg/SVGExternalResourcesRequired.h:
231         * svg/SVGFEBlendElement.cpp:
232         (WebCore::SVGFEBlendElement::isSupportedAttribute):
233         * svg/SVGFEColorMatrixElement.cpp:
234         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
235         * svg/SVGFEComponentTransferElement.cpp:
236         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
237         * svg/SVGFECompositeElement.cpp:
238         (WebCore::SVGFECompositeElement::isSupportedAttribute):
239         * svg/SVGFEConvolveMatrixElement.cpp:
240         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
241         * svg/SVGFEDiffuseLightingElement.cpp:
242         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
243         * svg/SVGFEDisplacementMapElement.cpp:
244         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
245         * svg/SVGFEDropShadowElement.cpp:
246         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
247         * svg/SVGFEGaussianBlurElement.cpp:
248         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
249         * svg/SVGFEImageElement.cpp:
250         (WebCore::SVGFEImageElement::isSupportedAttribute):
251         * svg/SVGFELightElement.cpp:
252         (WebCore::SVGFELightElement::isSupportedAttribute):
253         * svg/SVGFEMergeNodeElement.cpp:
254         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
255         * svg/SVGFEMorphologyElement.cpp:
256         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
257         * svg/SVGFEOffsetElement.cpp:
258         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
259         * svg/SVGFESpecularLightingElement.cpp:
260         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
261         * svg/SVGFETileElement.cpp:
262         (WebCore::SVGFETileElement::isSupportedAttribute):
263         * svg/SVGFETurbulenceElement.cpp:
264         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
265         * svg/SVGFilterElement.cpp:
266         (WebCore::SVGFilterElement::isSupportedAttribute):
267         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
268         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
269         * svg/SVGForeignObjectElement.cpp:
270         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
271         * svg/SVGGElement.cpp:
272         (WebCore::SVGGElement::isSupportedAttribute):
273         * svg/SVGGradientElement.cpp:
274         (WebCore::SVGGradientElement::isSupportedAttribute):
275         * svg/SVGImageElement.cpp:
276         (WebCore::SVGImageElement::isSupportedAttribute):
277         * svg/SVGLineElement.cpp:
278         (WebCore::SVGLineElement::isSupportedAttribute):
279         * svg/SVGLinearGradientElement.cpp:
280         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
281         * svg/SVGMPathElement.cpp:
282         (WebCore::SVGMPathElement::isSupportedAttribute):
283         * svg/SVGMarkerElement.cpp:
284         (WebCore::SVGMarkerElement::isSupportedAttribute):
285         * svg/SVGMaskElement.cpp:
286         (WebCore::SVGMaskElement::isSupportedAttribute):
287         * svg/SVGPathElement.cpp:
288         (WebCore::SVGPathElement::isSupportedAttribute):
289         * svg/SVGPatternElement.cpp:
290         (WebCore::SVGPatternElement::isSupportedAttribute):
291         * svg/SVGPolyElement.cpp:
292         (WebCore::SVGPolyElement::isSupportedAttribute):
293         * svg/SVGRadialGradientElement.cpp:
294         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
295         * svg/SVGRectElement.cpp:
296         (WebCore::SVGRectElement::isSupportedAttribute):
297         * svg/SVGScriptElement.cpp:
298         (WebCore::SVGScriptElement::isSupportedAttribute):
299         * svg/SVGStopElement.cpp:
300         (WebCore::SVGStopElement::isSupportedAttribute):
301         * svg/SVGStyleElement.cpp:
302         (WebCore::SVGStyleElement::isSupportedAttribute):
303         * svg/SVGStyledTransformableElement.cpp:
304         (WebCore::SVGStyledTransformableElement::isSupportedAttribute):
305         * svg/SVGSymbolElement.cpp:
306         (WebCore::SVGSymbolElement::isSupportedAttribute):
307         * svg/SVGTRefElement.cpp:
308         (WebCore::SVGTRefElement::isSupportedAttribute):
309         * svg/SVGTextContentElement.cpp:
310         (WebCore::SVGTextContentElement::isSupportedAttribute):
311         * svg/SVGTextElement.cpp:
312         (WebCore::SVGTextElement::isSupportedAttribute):
313         * svg/SVGTextPathElement.cpp:
314         (WebCore::SVGTextPathElement::isSupportedAttribute):
315         * svg/SVGTextPositioningElement.cpp:
316         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
317         * svg/SVGURIReference.cpp:
318         (WebCore::SVGURIReference::addSupportedAttributes):
319         * svg/SVGUseElement.cpp:
320         (WebCore::SVGUseElement::isSupportedAttribute):
321         * svg/SVGViewElement.cpp:
322         (WebCore::SVGViewElement::isSupportedAttribute):
323
324 2011-09-28  Kentaro Hara  <haraken@chromium.org>
325
326         "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&"
327         https://bugs.webkit.org/show_bug.cgi?id=68984
328
329         Reviewed by Darin Adler.
330
331         Just a follow-up fix for the bug 68345. For performance,
332         "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&".
333
334         Tests: fast/events/constructors/pop-state-event-constructor.html
335                fast/events/fire-popstate-event.html
336
337         * dom/PopStateEvent.cpp:
338         (WebCore::PopStateEvent::PopStateEvent):
339         (WebCore::PopStateEvent::create):
340         (WebCore::PopStateEvent::initPopStateEvent):
341         * dom/PopStateEvent.h:
342
343 2011-09-28  Martin Robinson  <mrobinson@igalia.com>
344
345         [GTK] Move drag-and-drop code which can be shared with WebKit2 to WebCore
346         https://bugs.webkit.org/show_bug.cgi?id=66890
347
348         Added a GtkDragAndDropHelper class to hold all the logic that is common
349         between WebKit1 and WebKit2. This will allow greater code sharing between
350         the two ports.
351
352         Reviewed by Philippe Normand.
353
354         No new tests. This patch should not change behavior.
355
356         * GNUmakefile.list.am: Added the GtkDragAndDropHelper to the sources list.
357         * platform/gtk/GtkDragAndDropHelper.cpp: Added.
358         * platform/gtk/GtkDragAndDropHelper.h: Added.
359
360 2011-09-28  Dan Bernstein  <mitz@apple.com>
361
362         <rdar://problem/10196497> first-letter after list marker not updated correctly
363
364         Reviewed by Simon Fraser.
365
366         Test: fast/dynamic/first-letter-after-list-marker.html
367
368         * rendering/RenderBlock.cpp:
369         (WebCore::RenderBlock::updateFirstLetter): Improved the logic for continuing past list markers
370         when trying to locate a first letter to update.
371
372 2011-09-28  Kent Tamura  <tkent@chromium.org>
373
374         REGRESSION(r93858): Can't type anything into input elements when maxlength is greater than 2^31
375         https://bugs.webkit.org/show_bug.cgi?id=68981
376
377         Reviewed by Darin Adler.
378
379         * html/parser/HTMLParserIdioms.cpp:
380         (WebCore::parseHTMLInteger):
381         Check the failure of charactersToIntStrict().
382         (WebCore::parseHTMLNonNegativeInteger):
383         Check the failure of charactersToUIntStrict().
384
385 2011-09-28  Antoine Labour  <piman@chromium.org>
386
387         Remove unused createRootLayerPainter from CCLayerTreeHostClient
388         https://bugs.webkit.org/show_bug.cgi?id=69042
389
390         Reviewed by James Robinson.
391
392         No new test needed: no semantic change.
393
394         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
395
396 2011-09-28  Luke Macpherson   <macpherson@chromium.org>
397
398         Only resolve direction aware properties when properties are direction aware.
399         https://bugs.webkit.org/show_bug.cgi?id=68968
400
401         Reviewed by Eric Seidel.
402
403         No new tests / no functionality changed.
404
405         Profiling showed a ~8% improvement in applyProperty by not calling resolveDirectionAwareProperty for every property.
406
407         * css/CSSStyleSelector.cpp:
408         (WebCore::CSSStyleSelector::applyProperty):
409
410 2011-09-28  Simon Fraser  <simon.fraser@apple.com>
411
412         fast/dom/scroll-element-to-rect.html fails on WK1 Mac port
413         https://bugs.webkit.org/show_bug.cgi?id=68815
414
415         Reviewed by Dan Bernstein.
416         
417         FrameView::scrollElementToRect() was incorrectly using Element::boundsInWindowSpace(),
418         which is window-relative (not web view-relative), and has flipped coordinates
419         in WebKit1.
420         
421         Change to use Node::getRect() which is what the author intended.
422
423         * dom/Element.h:
424         * page/FrameView.cpp:
425         (WebCore::FrameView::scrollElementToRect):
426
427 2011-09-28  Peter Beverloo  <peter@chromium.org>
428
429         Don't clamp cubic-bezier timing functions between 0 and 1
430         https://bugs.webkit.org/show_bug.cgi?id=45761
431
432         Remove the limitation of clamping the cubic-bezier timing function
433         values between 0 and 1, following the specification change made on
434         April 5 of this year.
435
436         Reviewed by Dean Jackson.
437
438         Tests: transitions/cubic-bezier-overflow-color.html
439                transitions/cubic-bezier-overflow-length.html
440                transitions/cubic-bezier-overflow-shadow.html
441                transitions/cubic-bezier-overflow-svg-length.html
442                transitions/cubic-bezier-overflow-transform.html
443
444         * css/CSSParser.cpp:
445         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
446
447 2011-09-28  Chris Rogers  <crogers@google.com>
448
449         DelayNode must set the context on delayTime AudioParam to support automation
450         https://bugs.webkit.org/show_bug.cgi?id=68828
451
452         Reviewed by Kenneth Russell.
453
454         Test: webaudio/delaynode-scheduling.html
455
456         * webaudio/DelayNode.cpp:
457         (WebCore::DelayNode::DelayNode):
458
459 2011-09-28  Sergey Glazunov  <serg.glazunov@gmail.com>
460
461         JavaScript generated documents don't inherit the cookie URL
462         https://bugs.webkit.org/show_bug.cgi?id=69003
463
464         Reviewed by Adam Barth.
465
466         Test: http/tests/security/cookies/cookie-theft-with-javascript-doc.html
467
468         * dom/Document.h:
469         (WebCore::Document::setCookieURL):
470         * loader/DocumentWriter.cpp:
471         (WebCore::DocumentWriter::replaceDocument):
472         (WebCore::DocumentWriter::begin):
473         * loader/DocumentWriter.h:
474
475 2011-09-27  Dimitri Glazkov  <dglazkov@chromium.org>
476
477         REGRESSION(r95573): Crash when loading SVG documents in a flattened frame or any SVG document in Chromium/Mac.
478         https://bugs.webkit.org/show_bug.cgi?id=68938
479
480         Reviewed by David Hyatt.
481
482         Test: all svg tests in LayoutTests.
483
484         * rendering/RenderBlock.cpp:
485         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): Added a null-check for containingBlock.
486
487 2011-09-28  Una Sabovic  <una.sabovic@palm.com>
488
489         Setting innerText to an empty string on editable div loses focus
490         https://bugs.webkit.org/show_bug.cgi?id=62092
491
492         Reviewed by Ryosuke Niwa.
493
494         When selection start or end node is being deleted do not clear the selection.
495         Instead update the start/end position to an equivalent parent-anchored positions.
496         When text is inserted/deleted update selection per range modification spec:
497         http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Mutation
498
499         Tests: editing/selection/document-mutation.html
500                editing/selection/editable-div-clear-on-keydown.html
501
502         * editing/FrameSelection.cpp:
503         (WebCore::FrameSelection::respondToNodeModification):
504         (WebCore::updatePositionAfterAdoptingTextReplacement):
505         (WebCore::FrameSelection::textWillBeReplaced):
506         * editing/htmlediting.cpp:
507         (WebCore::updatePositionForNodeRemoval):
508
509 2011-09-28  Joseph Pecoraro  <joepeck@webkit.org>
510
511         FTPDirectoryDocument Shows Garbled String for Last Modified Date
512         https://bugs.webkit.org/show_bug.cgi?id=69011
513
514         Reviewed by Dan Bernstein.
515
516         Force WTF::String concatenation instead of an accidental char* pointer addition.
517
518         * html/FTPDirectoryDocument.cpp:
519         (WebCore::processFileDateString):
520
521 2011-09-28  Nate Chapin  <japhet@chromium.org>
522
523         Fix a regression in r96060. ResourceLoader shouldn't get
524         initialized with a null DocumentLoader.
525         https://bugs.webkit.org/show_bug.cgi?id=69004
526
527         Reviewed by Csaba Osztrogonác.
528
529         This should fix a debug crash in some platforms in
530         plugins/js-from-destroy.html
531
532         * loader/ResourceLoader.cpp:
533         (WebCore::ResourceLoader::init): Move the activeDocumentLoader() null checks back
534             to SubresouceLoader::create().
535         * loader/SubresourceLoader.cpp:
536         (WebCore::SubresourceLoader::create):
537
538 2011-09-28  Adam Barth  <abarth@webkit.org>
539
540         CSP doesn't work for a wide variety of cases
541         https://bugs.webkit.org/show_bug.cgi?id=68921
542
543         Reviewed by Darin Adler.
544
545         Patch suggested by Sam Weinig.  It's unclear to me how to test this
546         change because all our tests run on non-default ports, which is why we
547         have this bug in the first place.  Mozilla uses a proxy while testing
548         so they can test with URLs like http://example.com, but we don't have
549         such a facility.
550
551         * page/ContentSecurityPolicy.cpp:
552         (WebCore::CSPSource::portMatches):
553
554 2011-09-28  Fady Samuel  <fsamuel@chromium.org>
555
556         [Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules
557         https://bugs.webkit.org/show_bug.cgi?id=68936
558
559         Reviewed by Tony Chang.
560
561         Chromium need to be built without Gtk for future version of ChromiumOS.
562
563         * WebCore.gyp/WebCore.gyp:
564
565 2011-09-28  Tom Sepez  <tsepez@chromium.org>
566
567         Revert change which broke displaying end script tags in view-source, instead
568         deal with any trailing </script> tag included by mistake in the XSSAuditor
569         itself.  Correct tests to detect the missing close tags.
570         https://bugs.webkit.org/show_bug.cgi?id=68898
571
572         Reviewed by Adam Barth.
573
574         * html/parser/HTMLSourceTracker.cpp:
575         (WebCore::HTMLSourceTracker::end):
576         * html/parser/HTMLTokenizer.cpp:
577         (WebCore::HTMLTokenizer::nextToken):
578         * html/parser/XSSAuditor.cpp:
579         (WebCore::startsHTMLEndTagAt):
580         (WebCore::XSSAuditor::snippetForJavaScript):
581
582 2011-09-28  Adam Barth  <abarth@webkit.org>
583
584         Remove empty directories.
585
586         * editing/brew: Removed.
587         * page/brew: Removed.
588         * platform/brew: Removed.
589         * platform/graphics/brew: Removed.
590         * platform/network/brew: Removed.
591         * platform/text/brew: Removed.
592
593 2011-09-28  Ilya Tikhonovsky  <loislo@chromium.org>
594
595         Web Inspector: optional arguments support for the frontend needs to be extended.
596         https://bugs.webkit.org/show_bug.cgi?id=69005
597
598         Generator supports optional arguments but they are transferred by value.
599         It is not suitable if the used type doesn't have operator bool.
600         I'll transfer such arguments by pointer.
601
602         Reviewed by Pavel Feldman.
603
604         Build is the test.
605
606         * inspector/CodeGeneratorInspector.pm:
607         (generateFrontendFunction):
608         (paramTypeTraits):
609         * inspector/InspectorDebuggerAgent.cpp:
610         (WebCore::InspectorDebuggerAgent::didParseSource):
611         * inspector/InspectorResourceAgent.cpp:
612         (WebCore::InspectorResourceAgent::didFailLoading):
613
614 2011-09-28  Antaryami Pandia  <antaryami.pandia@motorola.com>
615
616         Reflected attribute input.size wraps on negative values (Chrome), or
617         returns them (Safari).
618         https://bugs.webkit.org/show_bug.cgi?id=44886
619
620         Reviewed by Darin Adler.
621
622         Test: fast/dom/HTMLInputElement/input-size-attribute.html
623
624         * html/HTMLInputElement.cpp:
625         (WebCore::HTMLInputElement::parseMappedAttribute):
626
627 2011-09-28  Vsevolod Vlasov  <vsevik@chromium.org>
628
629         Web Inspector: Add support for search in single resource to page agent.
630         https://bugs.webkit.org/show_bug.cgi?id=68998
631
632         Reviewed by Pavel Feldman.
633
634         Test: http/tests/inspector/search/search-in-resource.html
635
636         * inspector/ContentSearchUtils.cpp:
637         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
638         * inspector/ContentSearchUtils.h:
639         * inspector/Inspector.json:
640         * inspector/InspectorPageAgent.cpp:
641         (WebCore::buildObjectForSearchMatch):
642         (WebCore::InspectorPageAgent::searchInResource):
643         * inspector/InspectorPageAgent.h:
644         * inspector/front-end/Resource.js:
645         (WebInspector.Resource.prototype.searchInContent):
646         * inspector/front-end/SourceFile.js:
647         (WebInspector.ResourceContentProvider.prototype.requestContent):
648         (WebInspector.ResourceContentProvider.prototype.searchInContent):
649         * inspector/front-end/UISourceCode.js:
650         (WebInspector.ContentProvider.prototype.requestContent):
651         (WebInspector.ContentProvider.prototype.searchInContent):
652
653 2011-09-28  Ilya Tikhonovsky  <loislo@chromium.org>
654
655         Web Inspector: It'd be useful to have performance stats for the back-end to front-end communication channel.
656         https://bugs.webkit.org/show_bug.cgi?id=69002
657
658         Reviewed by Yury Semikhatsky.
659
660         * inspector/CodeGeneratorInspector.pm:
661
662 2011-09-27  Pavel Podivilov  <podivilov@chromium.org>
663
664         Web Inspector: live edit cursor always appears at the beginning of the file.
665         https://bugs.webkit.org/show_bug.cgi?id=68900
666
667         Reviewed by Pavel Feldman.
668
669         * inspector/front-end/TextViewer.js:
670         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
671
672 2011-09-28  Vsevolod Vlasov  <vsevik@chromium.org>
673
674         Web Inspector: Refactor searching in inspector, add test (fixed non regex search).
675         https://bugs.webkit.org/show_bug.cgi?id=68930
676
677         Reviewed by Yury Semikhatsky.
678
679         Search moved out from page agent.
680         Fixed search for non regex case which is not yet used.
681
682         Test: http/tests/inspector/search/search-in-resources.html
683
684         * CMakeLists.txt:
685         * GNUmakefile.list.am:
686         * WebCore.gypi:
687         * WebCore.pro:
688         * WebCore.vcproj/WebCore.vcproj:
689         * WebCore.xcodeproj/project.pbxproj:
690         * inspector/ContentSearchUtils.cpp: Added.
691         (WebCore::ContentSearchUtils::createSearchRegexSource):
692         (WebCore::ContentSearchUtils::createSearchRegex):
693         (WebCore::ContentSearchUtils::countRegularExpressionMatches):
694         * inspector/ContentSearchUtils.h: Added.
695         * inspector/InspectorPageAgent.cpp:
696         (WebCore::hasTextContent):
697         (WebCore::InspectorPageAgent::cachedResourceContent):
698         (WebCore::textContentForCachedResource):
699         (WebCore::buildObjectForSearchResult):
700         (WebCore::InspectorPageAgent::searchInResources):
701         * inspector/front-end/utilities.js:
702         ():
703
704 2011-09-28  Kentaro Hara  <haraken@chromium.org>
705
706         Implement a PopStateEvent constructor for V8
707         https://bugs.webkit.org/show_bug.cgi?id=68896
708
709         Reviewed by Adam Barth.
710
711         Test: fast/events/constructors/pop-state-event-constructor.html
712
713         * bindings/v8/custom/V8EventConstructors.cpp: Added a PopStateEvent constructor.
714         * dom/PopStateEvent.idl: Added a 'V8CustomConstructor' attribute.
715
716 2011-09-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
717
718         [Texmap] Allow TextureMapperGL to work without a GraphicsContext
719         https://bugs.webkit.org/show_bug.cgi?id=68980
720
721         Reviewed by Andreas Kling.
722
723         Perform a null-check for m_context and initialize that variable.
724         If a graphics-context doesn't exist, we don't need to reset it.
725
726         No new functionality so no new tests.
727
728         * platform/graphics/opengl/TextureMapperGL.cpp:
729         (WebCore::TextureMapperGL::TextureMapperGL):
730         (WebCore::TextureMapperGL::beginPainting):
731         (WebCore::TextureMapperGL::endPainting):
732
733 2011-09-28  Kentaro Hara  <haraken@chromium.org>
734
735         Implement an ErrorEvent constructor for V8
736         https://bugs.webkit.org/show_bug.cgi?id=68336
737
738         Reviewed by Adam Barth.
739
740         Test: fast/events/constructors/error-event-constructor.html
741
742         * bindings/v8/OptionsObject.cpp:
743         (WebCore::OptionsObject::getKeyValue): Returns an unsigned value corresponding to a given key.
744         * bindings/v8/OptionsObject.h:
745         * bindings/v8/custom/V8EventConstructors.cpp: Added the ErrorEvent constructor.
746         * dom/ErrorEvent.idl: Added a 'V8CustomConstructor' attribute.
747
748 2011-09-27  Andy Estes  <aestes@apple.com>
749
750         WebKitLinkedOnOrAfter() check is ineffective for Solar Walk app-specific hack.
751         https://bugs.webkit.org/show_bug.cgi?id=68863
752
753         Reviewed by Darin Adler.
754
755         The SolarWalk binary does not link against WebKit.framework directly,
756         so calling NSVersionOfLinkTimeLibrary() will not return the version of
757         WebKit against which SolarWalk was linked. Since Solar Walk has
758         released an update that addresses the issue for which this app-specific
759         hack was originally added, we should just remove the hack.
760
761         * WebCore.exp.in: Remove applicationIsSolarWalkMac().
762         * platform/RuntimeApplicationChecks.cpp: Ditto.
763         * platform/RuntimeApplicationChecks.h: Ditto.
764
765 2011-09-28  Tim Horton  <timothy_horton@apple.com>
766
767         Fix potential SVG performance regression (over-invalidation of caches) from 96052
768         https://bugs.webkit.org/show_bug.cgi?id=68941
769         <rdar://problem/10196224>
770
771         Reviewed by Zoltan Herczeg.
772
773         Only invalidate the cache of a filter when target style changes, as of the different types of cached
774         resources, only filters make use of the style of the target element and thus need to be invalidated
775         when the target style changes.
776
777         No new tests, performance improvement.
778
779         * rendering/svg/SVGResourcesCache.cpp:
780         (WebCore::SVGResourcesCache::clientUpdatedFromElement):
781
782 2011-09-28  Adenilson Cavalcanti  <adenilson.silva@openbossa.org>
783
784         Missing initialization of member in ImageFrameQt class
785         https://bugs.webkit.org/show_bug.cgi?id=68943
786
787         Reviewed by Kenneth Rohde Christiansen.
788
789         No new tests, this fixes internal implementation detail.
790
791         * platform/image-decoders/qt/ImageFrameQt.cpp:
792         (WebCore::ImageFrame::ImageFrame):
793         (WebCore::ImageFrame::operator=):
794
795 2011-09-27  Luke Macpherson   <macpherson@chromium.org>
796
797         Defer call to CSSValue::isPrimitiveValue(), saves ~4% in CSSStyleSelector::applyProperty().
798         https://bugs.webkit.org/show_bug.cgi?id=68964
799
800         Reviewed by Eric Seidel.
801
802         No new tests / no functionality changed.
803
804         Doing value->isPrimitiveValue() is relatviely expensive, so moving it after the early returns but
805         before the result is used saves a significant number of cycles. (Tested with Shark profiler in Safari).
806
807         * css/CSSStyleSelector.cpp:
808         (WebCore::CSSStyleSelector::applyProperty):
809
810 2011-09-27  Ryosuke Niwa  <rniwa@webkit.org>
811
812         Simplify ReplaceSelectionCommand::positionAtStartOfInsertedContent
813         https://bugs.webkit.org/show_bug.cgi?id=68939
814
815         Reviewed by Darin Adler.
816
817         Simplified ReplaceSelectionCommand::positionAtStartOfInsertedContent.
818
819         This change revealed a bug in removeUnrenderedTextNodesAtEnds that text nodes without any visible
820         text at ends are not removed when it has a render object. Fixed the bug by checking the length of
821         the rendered text. (Tested by editing/pasteboard/pasting-word-in-div-extra-line.html)
822
823         This further revealed that caretMaxRenderedOffset doesn't return an offset and caretMaxRenderedOffset
824         on InlineBox, InlineTextBox, RenderObject, RenderBR, RenderPlaced are never called. To address this
825         issue, renamed caretMaxRenderedOffset to renderedTextLength for RenderText and removed the rest.
826
827         * dom/Position.cpp:
828         (WebCore::Position::rendersInDifferentPosition):
829         * editing/ReplaceSelectionCommand.cpp:
830         (WebCore::nodeHasVisibleRenderText): Added.
831         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Calls nodeHasVisibleRenderText.
832         (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Simplified.
833         * editing/visible_units.cpp:
834         (WebCore::startOfParagraph): Calls renderedTextLength.
835         (WebCore::endOfParagraph): Ditto.
836         * rendering/InlineBox.cpp: Removed caretMaxRenderedOffset.
837         * rendering/InlineBox.h: Ditto.
838         * rendering/InlineTextBox.cpp: Ditto.
839         * rendering/InlineTextBox.h: Ditto.
840         * rendering/RenderBR.cpp: Ditto.
841         * rendering/RenderBR.h: Ditto.
842         * rendering/RenderObject.cpp: Ditto.
843         * rendering/RenderObject.h: Ditto.
844         * rendering/RenderReplaced.cpp: Ditto.
845         * rendering/RenderReplaced.h: Ditto.
846         * rendering/RenderText.cpp:
847         (WebCore::RenderText::renderedTextLength): Renamed from caretMaxRenderedOffset.
848         * rendering/RenderText.h:
849
850 2011-09-27  James Robinson  <jamesr@chromium.org>
851
852         [chromium] LayerRenderChromium asserts about leaking textures.
853         https://bugs.webkit.org/show_bug.cgi?id=68190
854
855         Reviewed by Kenneth Russell.
856
857         This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures.
858         This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format
859         enum type, making it more testable.  It also allows us to track the allocations by subclassing TextureAllocator
860         to make sure we aren't leaking any textures.
861
862         * WebCore.gypi:
863         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
864         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
865         * platform/graphics/chromium/Canvas2DLayerChromium.h:
866         * platform/graphics/chromium/ImageLayerChromium.cpp:
867         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
868         * platform/graphics/chromium/LayerChromium.h:
869         (WebCore::LayerChromium::updateCompositorResources):
870         * platform/graphics/chromium/LayerRendererChromium.cpp:
871         (WebCore::LayerRendererChromium::LayerRendererChromium):
872         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
873         (WebCore::LayerRendererChromium::drawLayers):
874         (WebCore::LayerRendererChromium::useRenderSurface):
875         (WebCore::LayerRendererChromium::initializeSharedObjects):
876         (WebCore::LayerRendererChromium::cleanupSharedObjects):
877         * platform/graphics/chromium/LayerRendererChromium.h:
878         (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator):
879         (WebCore::LayerRendererChromium::contentsTextureAllocator):
880         * platform/graphics/chromium/LayerTextureUpdater.h:
881         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
882         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
883         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
884         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
885         * platform/graphics/chromium/ManagedTexture.cpp:
886         (WebCore::ManagedTexture::bindTexture):
887         (WebCore::ManagedTexture::framebufferTexture2D):
888         * platform/graphics/chromium/ManagedTexture.h:
889         * platform/graphics/chromium/TextureManager.cpp:
890         (WebCore::TextureManager::memoryUseBytes):
891         (WebCore::TextureManager::deleteEvictedTextures):
892         (WebCore::TextureManager::evictAndDeleteAllTextures):
893         (WebCore::TextureManager::removeTexture):
894         (WebCore::TextureManager::allocateTexture):
895         (WebCore::TextureManager::requestTexture):
896         * platform/graphics/chromium/TextureManager.h:
897         (WebCore::TextureAllocator::~TextureAllocator):
898         * platform/graphics/chromium/TiledLayerChromium.cpp:
899         (WebCore::TiledLayerChromium::updateCompositorResources):
900         * platform/graphics/chromium/TiledLayerChromium.h:
901         * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added.
902         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
903         (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator):
904         (WebCore::TrackingTextureAllocator::createTexture):
905         (WebCore::TrackingTextureAllocator::deleteTexture):
906         * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h.
907         (WebCore::TrackingTextureAllocator::create):
908         (WebCore::TrackingTextureAllocator::currentMemoryUseBytes):
909         * platform/graphics/chromium/VideoLayerChromium.cpp:
910         (WebCore::VideoLayerChromium::updateCompositorResources):
911         (WebCore::VideoLayerChromium::updateTexture):
912         * platform/graphics/chromium/VideoLayerChromium.h:
913         * platform/graphics/chromium/WebGLLayerChromium.cpp:
914         (WebCore::WebGLLayerChromium::updateCompositorResources):
915         * platform/graphics/chromium/WebGLLayerChromium.h:
916         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
917         (WebCore::CCHeadsUpDisplay::draw):
918         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
919         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
920         (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread):
921         (WebCore::CCLayerTreeHost::commitToOnCCThread):
922         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
923         (WebCore::CCLayerTreeHost::updateCompositorResources):
924         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
925         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
926         (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator):
927         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
928         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
929         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
930         (WebCore::CCRenderSurface::drawSurface):
931         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
932         (WebCore::CCSingleThreadProxy::setNeedsCommit):
933         (WebCore::CCSingleThreadProxy::stop):
934         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
935         (WebCore::CCSingleThreadProxy::commitIfNeeded):
936         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
937         (WebCore::CCThreadProxy::commitOnCCThread):
938         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
939 2011-09-27  James Robinson  <jamesr@chromium.org>
940
941         [chromium] Only initiate the beginFrameAndCommit sequence if a commit has been requested
942         https://bugs.webkit.org/show_bug.cgi?id=68967
943
944         Reviewed by Kenneth Russell.
945
946         When updating the scheduler state, we should only initiate a new commit flow if a commit has been requested (as
947         opposed to only a redraw).
948
949         Covered by the unit test CCLayerTreeHostTestSetNeedsRedraw with USE(THREADED_COMPOSITING) set to true.
950
951         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
952         (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread):
953
954 2011-09-27  Kentaro Hara  <haraken@chromium.com>
955
956         Implement a PageTransitionEvent constructor for V8
957         https://bugs.webkit.org/show_bug.cgi?id=68067
958
959         Reviewed by Adam Barth.
960
961         Test: fast/events/constructors/page-transition-event-constructor.html
962
963         * bindings/v8/custom/V8EventConstructors.cpp: Added the PageTransitionEvent constructor.
964         * dom/PageTransitionEvent.idl: Added a 'V8CustomConstructor' attribute.
965
966 2011-09-27  Kentaro Hara  <haraken@chromium.org>
967
968         Implement a MessageEvent constructor for JSC
969         https://bugs.webkit.org/show_bug.cgi?id=68883
970
971         Reviewed by Adam Barth.
972
973         The spec for MessageEvent is here:
974         http://www.whatwg.org/specs/web-apps/current-work/#messageevent
975
976         Currently, some tests in fast/events/constructors/message-event-constructor.html
977         are failing or crashing in DRT, as we commented in the test file.
978         This is because MessageEvent.data is implemented as SerializedScriptValue,
979         and thus it cannot keep ScriptValue passed by JavaScript.
980         This is the same issue as the bug (https://bugs.webkit.org/show_bug.cgi?id=68345).
981         We will soon make a follow-up patch to fix these failures, after this
982         patch is landed.
983
984         Test: fast/events/constructors/message-event-constructor.html
985
986         * bindings/generic/EventConstructors.h: Added a definition for the MessageEvent constructor.
987         * bindings/js/JSDictionary.cpp:
988         (WebCore::JSDictionary::convertValue): Generates MessagePortArray from the list of message ports in the format of JSValues.
989         * bindings/js/JSDictionary.h:
990         * bindings/js/JSEventConstructors.cpp: Added #includes for MessageEvent.
991         * dom/MessageEvent.cpp:
992         (WebCore::MessageEventInit::MessageEventInit):
993         (WebCore::MessageEvent::MessageEvent):
994         (WebCore::MessageEvent::initMessageEvent):
995         * dom/MessageEvent.h: Added a definition for MessageEvent. Removed an extra leading spaces.
996         (WebCore::MessageEvent::create):
997         (WebCore::MessageEvent::origin):
998         (WebCore::MessageEvent::lastEventId):
999         (WebCore::MessageEvent::source):
1000         (WebCore::MessageEvent::ports):
1001         (WebCore::MessageEvent::dataType):
1002         (WebCore::MessageEvent::dataAsSerializedScriptValue):
1003         (WebCore::MessageEvent::dataAsString):
1004         (WebCore::MessageEvent::dataAsBlob):
1005         (WebCore::MessageEvent::dataAsArrayBuffer):
1006         * dom/MessageEvent.idl: Makes MessageEvent constructible.
1007
1008 2011-09-27  Eric Uhrhane  <ericu@chromium.org>
1009
1010         [Chromium/FileWriter] race condition in FileWriter completion can lead to assert
1011         https://bugs.webkit.org/show_bug.cgi?id=67684
1012
1013         Reviewed by David Levin.
1014
1015         Tests: fast/filesystem/file-writer-abort-continue.html
1016                fast/filesystem/file-writer-abort.html
1017
1018         Track the state of the backend and be prepared for reentrant user
1019         requests.  Limit recursion depth to an arbitrary small constant.
1020         * fileapi/FileWriter.cpp: Lots of event-handling changes.
1021         * fileapi/FileWriter.h:
1022
1023 2011-09-27  Mihai Parparita  <mihaip@chromium.org>
1024
1025         Unreviewed, rolling out r96141.
1026         http://trac.webkit.org/changeset/96141
1027         https://bugs.webkit.org/show_bug.cgi?id=68190
1028
1029         Breaks PrerenderBrowserTest.PrerenderHTML5Video in
1030         browser_tests
1031
1032         * WebCore.gypi:
1033         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1034         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
1035         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1036         * platform/graphics/chromium/ImageLayerChromium.cpp:
1037         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1038         * platform/graphics/chromium/LayerChromium.h:
1039         (WebCore::LayerChromium::updateCompositorResources):
1040         * platform/graphics/chromium/LayerRendererChromium.cpp:
1041         (WebCore::LayerRendererChromium::LayerRendererChromium):
1042         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
1043         (WebCore::LayerRendererChromium::drawLayers):
1044         (WebCore::LayerRendererChromium::createLayerTexture):
1045         (WebCore::LayerRendererChromium::deleteLayerTexture):
1046         (WebCore::LayerRendererChromium::useRenderSurface):
1047         (WebCore::LayerRendererChromium::initializeSharedObjects):
1048         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1049         * platform/graphics/chromium/LayerRendererChromium.h:
1050         (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes):
1051         * platform/graphics/chromium/LayerTextureUpdater.h:
1052         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1053         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
1054         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
1055         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1056         * platform/graphics/chromium/ManagedTexture.cpp:
1057         (WebCore::ManagedTexture::bindTexture):
1058         (WebCore::ManagedTexture::framebufferTexture2D):
1059         * platform/graphics/chromium/ManagedTexture.h:
1060         * platform/graphics/chromium/TextureManager.cpp:
1061         (WebCore::memoryUseBytes):
1062         (WebCore::TextureManager::deleteEvictedTextures):
1063         (WebCore::TextureManager::evictAndDeleteAllTextures):
1064         (WebCore::TextureManager::removeTexture):
1065         (WebCore::TextureManager::allocateTexture):
1066         (WebCore::TextureManager::requestTexture):
1067         * platform/graphics/chromium/TextureManager.h:
1068         * platform/graphics/chromium/TiledLayerChromium.cpp:
1069         (WebCore::TiledLayerChromium::updateCompositorResources):
1070         * platform/graphics/chromium/TiledLayerChromium.h:
1071         * platform/graphics/chromium/TrackingTextureAllocator.cpp: Removed.
1072         * platform/graphics/chromium/TrackingTextureAllocator.h: Removed.
1073         * platform/graphics/chromium/VideoLayerChromium.cpp:
1074         (WebCore::VideoLayerChromium::updateCompositorResources):
1075         (WebCore::VideoLayerChromium::updateTexture):
1076         * platform/graphics/chromium/VideoLayerChromium.h:
1077         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1078         (WebCore::WebGLLayerChromium::updateCompositorResources):
1079         * platform/graphics/chromium/WebGLLayerChromium.h:
1080         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1081         (WebCore::CCHeadsUpDisplay::draw):
1082         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1083         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1084         (WebCore::CCLayerTreeHost::deleteContentsTextures):
1085         (WebCore::CCLayerTreeHost::commitTo):
1086         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
1087         (WebCore::CCLayerTreeHost::updateCompositorResources):
1088         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp.rej: Removed.
1089         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1090         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1091         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1092         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1093         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1094         (WebCore::CCRenderSurface::drawSurface):
1095         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1096         (WebCore::CCSingleThreadProxy::setNeedsCommit):
1097         (WebCore::CCSingleThreadProxy::stop):
1098         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
1099         (WebCore::CCSingleThreadProxy::commitIfNeeded):
1100         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1101         (WebCore::CCThreadProxy::commitOnCCThread):
1102         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
1103
1104 2011-09-27  James Robinson  <jamesr@chromium.org>
1105
1106         [chromium] Guard accelerated skia drawing logic with its own define to remove dependency on USE(THREADED_COMPOSITING)
1107         https://bugs.webkit.org/show_bug.cgi?id=68953
1108
1109         Reviewed by Kenneth Russell.
1110
1111         The accelerated drawing code is incompatible with threaded compositing. Rather than tying the two behaviors
1112         together via USE(THREADED_COMPOSITING), this patch guards the accelerated drawing code with its own USE() guard
1113         so the features can advance independently. Today, it's not safe to set both of these flags.
1114
1115         * platform/graphics/chromium/ContentLayerChromium.cpp:
1116         (WebCore::ContentLayerChromium::createTextureUpdater):
1117         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1118         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1119
1120 2011-09-27  Luke Macpherson   <macpherson@chromium.org>
1121
1122         Slightly improve performance of CSSStyleApplyProperty handler lookup.
1123         https://bugs.webkit.org/show_bug.cgi?id=68868
1124
1125         Reviewed by Eric Seidel.
1126
1127         No new tests as no functionality changed.
1128
1129         * css/CSSStyleApplyProperty.h:
1130         (WebCore::CSSStyleApplyProperty::propertyHandler):
1131         Make propertyHandler() public and remove redirecting functions.
1132         * css/CSSStyleSelector.cpp:
1133         (WebCore::CSSStyleSelector::applyProperty):
1134         Perform property handler lookup once and reuse the result.
1135
1136 2011-09-27  Kent Tamura  <tkent@chromium.org>
1137
1138         [V8] element.dataset.nonExistingKey should return undefined.
1139         https://bugs.webkit.org/show_bug.cgi?id=68877
1140
1141         Reviewed by Nate Chapin.
1142
1143         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1144         (WebCore::V8DOMStringMap::namedPropertyGetter): Uses v8StringOrUndefined() instead of v8String().
1145
1146 2011-09-23  Mark Hahnenberg  <mhahnenberg@apple.com>
1147
1148         Add static version of JSCell::visitChildren
1149         https://bugs.webkit.org/show_bug.cgi?id=68404
1150
1151         Reviewed by Darin Adler.
1152
1153         No new tests.
1154
1155         In this patch we just extract the bodies of the virtual visitChildren methods
1156         throughout the JSCell inheritance hierarchy out into static methods, which are 
1157         now called from the virtual methods.  This is an intermediate step in trying to 
1158         move the virtual-ness of visitChildren into our own custom vtable stored in 
1159         ClassInfo.  We need to convert the methods to static methods in order to be 
1160         able to more easily store and refer to them in our custom vtable since normal 
1161         member methods store some implicit information in their types, making it 
1162         impossible to store them generically in ClassInfo.
1163
1164         * WebCore.exp.in:
1165         * bindings/js/JSAttrCustom.cpp:
1166         (WebCore::JSAttr::visitChildrenVirtual):
1167         (WebCore::JSAttr::visitChildren):
1168         * bindings/js/JSAudioContextCustom.cpp:
1169         (WebCore::JSAudioContext::visitChildrenVirtual):
1170         (WebCore::JSAudioContext::visitChildren):
1171         * bindings/js/JSCSSRuleCustom.cpp:
1172         (WebCore::JSCSSRule::visitChildrenVirtual):
1173         (WebCore::JSCSSRule::visitChildren):
1174         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1175         (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
1176         (WebCore::JSCSSStyleDeclaration::visitChildren):
1177         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1178         (WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
1179         (WebCore::JSCanvasRenderingContext::visitChildren):
1180         * bindings/js/JSDOMGlobalObject.cpp:
1181         (WebCore::JSDOMGlobalObject::visitChildrenVirtual):
1182         (WebCore::JSDOMGlobalObject::visitChildren):
1183         * bindings/js/JSDOMGlobalObject.h:
1184         * bindings/js/JSDOMWindowCustom.cpp:
1185         (WebCore::JSDOMWindow::visitChildrenVirtual):
1186         (WebCore::JSDOMWindow::visitChildren):
1187         * bindings/js/JSDOMWindowShell.cpp:
1188         (WebCore::JSDOMWindowShell::visitChildrenVirtual):
1189         (WebCore::JSDOMWindowShell::visitChildren):
1190         * bindings/js/JSDOMWindowShell.h:
1191         * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
1192         (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
1193         (WebCore::JSJavaScriptAudioNode::visitChildren):
1194         * bindings/js/JSMessageChannelCustom.cpp:
1195         (WebCore::JSMessageChannel::visitChildrenVirtual):
1196         (WebCore::JSMessageChannel::visitChildren):
1197         * bindings/js/JSMessagePortCustom.cpp:
1198         (WebCore::JSMessagePort::visitChildrenVirtual):
1199         (WebCore::JSMessagePort::visitChildren):
1200         * bindings/js/JSNamedNodeMapCustom.cpp:
1201         (WebCore::JSNamedNodeMap::visitChildrenVirtual):
1202         (WebCore::JSNamedNodeMap::visitChildren):
1203         * bindings/js/JSNodeCustom.cpp:
1204         (WebCore::JSNode::visitChildrenVirtual):
1205         (WebCore::JSNode::visitChildren):
1206         * bindings/js/JSNodeFilterCustom.cpp:
1207         (WebCore::JSNodeFilter::visitChildrenVirtual):
1208         (WebCore::JSNodeFilter::visitChildren):
1209         * bindings/js/JSNodeIteratorCustom.cpp:
1210         (WebCore::JSNodeIterator::visitChildrenVirtual):
1211         (WebCore::JSNodeIterator::visitChildren):
1212         * bindings/js/JSSVGElementInstanceCustom.cpp:
1213         (WebCore::JSSVGElementInstance::visitChildrenVirtual):
1214         (WebCore::JSSVGElementInstance::visitChildren):
1215         * bindings/js/JSSharedWorkerCustom.cpp:
1216         (WebCore::JSSharedWorker::visitChildrenVirtual):
1217         (WebCore::JSSharedWorker::visitChildren):
1218         * bindings/js/JSStyleSheetCustom.cpp:
1219         (WebCore::JSStyleSheet::visitChildrenVirtual):
1220         (WebCore::JSStyleSheet::visitChildren):
1221         * bindings/js/JSTreeWalkerCustom.cpp:
1222         (WebCore::JSTreeWalker::visitChildrenVirtual):
1223         (WebCore::JSTreeWalker::visitChildren):
1224         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1225         (WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
1226         (WebCore::JSWebGLRenderingContext::visitChildren):
1227         * bindings/js/JSWorkerContextCustom.cpp:
1228         (WebCore::JSWorkerContext::visitChildrenVirtual):
1229         (WebCore::JSWorkerContext::visitChildren):
1230         * bindings/js/JSXMLHttpRequestCustom.cpp:
1231         (WebCore::JSXMLHttpRequest::visitChildrenVirtual):
1232         (WebCore::JSXMLHttpRequest::visitChildren):
1233         * bindings/js/JSXPathResultCustom.cpp:
1234         (WebCore::JSXPathResult::visitChildrenVirtual):
1235         (WebCore::JSXPathResult::visitChildren):
1236         * bindings/scripts/CodeGeneratorJS.pm:
1237         (GenerateHeader):
1238         (GenerateImplementation):
1239         * bindings/scripts/test/JS/JSTestObj.cpp:
1240         (WebCore::JSTestObj::visitChildrenVirtual):
1241         (WebCore::JSTestObj::visitChildren):
1242         * bindings/scripts/test/JS/JSTestObj.h:
1243         * bridge/qt/qt_instance.cpp:
1244         (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
1245         (JSC::Bindings::QtRuntimeObject::visitChildren):
1246         * bridge/qt/qt_runtime.cpp:
1247         (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
1248         (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
1249         * bridge/qt/qt_runtime.h:
1250         * workers/WorkerContext.h:
1251
1252 <<<<<<< .mine
1253 2011-09-27  Mark Hahnenberg  <mhahnenberg@apple.com>
1254
1255         Add static version of JSCell::getCallData
1256         https://bugs.webkit.org/show_bug.cgi?id=68741
1257
1258         Reviewed by Darin Adler.
1259
1260         No new tests.
1261
1262         In this patch we just extract the bodies of the virtual getCallData methods
1263         throughout the JSCell inheritance hierarchy out into static methods, which are 
1264         now called from the virtual methods.  This is an intermediate step in trying to 
1265         move the virtual-ness of getCallData into our own method table stored in 
1266         ClassInfo.  We need to convert the methods to static methods because static methods 
1267         can be represented as function pointers rather than pointers to member functions, and
1268         function pointers are smaller and faster to call than pointers to member functions.
1269
1270         * WebCore.exp.in:
1271         * bindings/js/JSCallbackData.cpp:
1272         (WebCore::JSCallbackData::invokeCallback):
1273         * bindings/js/JSCustomXPathNSResolver.cpp:
1274         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1275         * bindings/js/JSErrorHandler.cpp:
1276         (WebCore::JSErrorHandler::handleEvent):
1277         * bindings/js/JSEventListener.cpp:
1278         (WebCore::JSEventListener::handleEvent):
1279         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1280         (WebCore::JSHTMLAllCollection::getCallDataVirtual):
1281         (WebCore::JSHTMLAllCollection::getCallData):
1282         * bindings/js/JSHTMLAppletElementCustom.cpp:
1283         (WebCore::JSHTMLAppletElement::getCallDataVirtual):
1284         (WebCore::JSHTMLAppletElement::getCallData):
1285         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1286         (WebCore::JSHTMLEmbedElement::getCallDataVirtual):
1287         (WebCore::JSHTMLEmbedElement::getCallData):
1288         * bindings/js/JSHTMLObjectElementCustom.cpp:
1289         (WebCore::JSHTMLObjectElement::getCallDataVirtual):
1290         (WebCore::JSHTMLObjectElement::getCallData):
1291         * bindings/js/JSInjectedScriptHostCustom.cpp:
1292         (WebCore::JSInjectedScriptHost::evaluate):
1293         * bindings/js/JSPluginElementFunctions.cpp:
1294         (WebCore::runtimeObjectGetCallData):
1295         * bindings/scripts/CodeGeneratorJS.pm:
1296         (GenerateHeader):
1297         * bridge/objc/objc_runtime.h:
1298         * bridge/objc/objc_runtime.mm:
1299         (JSC::Bindings::ObjcFallbackObjectImp::getCallDataVirtual):
1300         (JSC::Bindings::ObjcFallbackObjectImp::getCallData):
1301         * bridge/qt/qt_runtime.cpp:
1302         (JSC::Bindings::QtRuntimeMetaMethod::getCallDataVirtual):
1303         (JSC::Bindings::QtRuntimeMetaMethod::getCallData):
1304         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1305         (JSC::Bindings::QtRuntimeConnectionMethod::getCallDataVirtual):
1306         (JSC::Bindings::QtRuntimeConnectionMethod::getCallData):
1307         (JSC::Bindings::isJavaScriptFunction):
1308         * bridge/qt/qt_runtime.h:
1309         * bridge/runtime_method.cpp:
1310         (JSC::RuntimeMethod::getCallDataVirtual):
1311         (JSC::RuntimeMethod::getCallData):
1312         * bridge/runtime_method.h:
1313         * bridge/runtime_object.cpp:
1314         (JSC::Bindings::RuntimeObject::getCallDataVirtual):
1315         (JSC::Bindings::RuntimeObject::getCallData):
1316         * bridge/runtime_object.h:
1317
1318 =======
1319 2011-09-27  Dean Jackson  <dino@apple.com>
1320
1321         Unreviewed. Remove duplicate FilterOperation{s}.h that were
1322         accidentally added to the top level of the Xcode project.
1323
1324         * WebCore.xcodeproj/project.pbxproj:
1325
1326 >>>>>>> .r96163
1327 2011-09-27  David Hyatt  <hyatt@apple.com>
1328
1329         https://bugs.webkit.org/show_bug.cgi?id=68940
1330
1331         Narrow the float/lines pagination heuristic to only kick in if
1332         the previous line broke cleanly and if the floats are occurring
1333         at the start of the line.
1334
1335         Reviewed by Dan Bernstein.
1336
1337         * rendering/RenderBlockLineLayout.cpp:
1338         (WebCore::RenderBlock::positionNewFloatOnLine):
1339
1340 2011-09-27  James Robinson  <jamesr@chromium.org>
1341
1342         Add a mechanism to test for the compositing tree mutated during painting
1343         https://bugs.webkit.org/show_bug.cgi?id=68738
1344
1345         Reviewed by Adam Barth.
1346
1347         Sets a static bool during GraphicsLayer::paintGraphicsLayerContents and ASSERT()s that we never create or
1348         destroy a GraphicsLayer inside this function. Painting should never mutate the GraphicsLayer tree.
1349
1350         Test: compositing/video/video-with-invalid-source.html
1351
1352         * platform/graphics/GraphicsLayer.cpp:
1353         (WebCore::GraphicsLayer::GraphicsLayer):
1354         (WebCore::GraphicsLayer::~GraphicsLayer):
1355         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
1356
1357 2011-09-27  Ojan Vafai  <ojan@chromium.org>
1358
1359         take padding/border on flexbox into account with direction:rtl
1360         https://bugs.webkit.org/show_bug.cgi?id=68846
1361
1362         Reviewed by David Hyatt.
1363
1364         Use the logicalWidth of the flexbox instead of it's availableLogicalWidth
1365         so that we include the flexbox's border and padding.
1366         
1367         Also, change all uses of availableLogicalWidth to contentLogicalWidth.
1368         The former takes multi-column into account. Multi-column flexboxes don't
1369         make any sense, so there's no point in calling availableLogicalWidth.
1370
1371         * rendering/RenderFlexibleBox.cpp:
1372         (WebCore::RenderFlexibleBox::flowAwareLogicalWidth):
1373         (WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth):
1374         (WebCore::RenderFlexibleBox::computePreferredLogicalWidth):
1375         (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection):
1376         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
1377         * rendering/RenderFlexibleBox.h:
1378
1379 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1380
1381         Unreviewed, rolling out r96139.
1382         http://trac.webkit.org/changeset/96139
1383         https://bugs.webkit.org/show_bug.cgi?id=68933
1384
1385         Broke table-percent-height.html on Mac bots (Requested by
1386         mwenge2 on #webkit).
1387
1388         * rendering/RenderBox.cpp:
1389         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1390         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1391         * rendering/RenderBox.h:
1392
1393 2011-09-27  Tim Horton  <timothy_horton@apple.com>
1394
1395         REGRESSION(65665): Pattern size being clamped to SVG size can prevent transformed elements from being fully covered by userSpaceOnUse patterns
1396         https://bugs.webkit.org/show_bug.cgi?id=67700
1397         <rdar://problem/10125102>
1398
1399         Reviewed by Darin Adler.
1400
1401         Clamp all resources to the same size, 4096x4096 (arbitrarily chosen), instead of to the size
1402         of the <svg> element. This fixes the case where a transformed element displays part of a resource
1403         outside of the size of the <svg> element.
1404
1405         When drawing an oversized pattern into its tile image, scale the content down to fit. When drawing
1406         the tile image to the screen, scale it back up to fit the expected area. This will cause pixelation
1407         when patterns are over the 4k limit.
1408
1409         Tests: svg/custom/transformed-pattern-clamp-svg-root.svg, svg/custom/oversized-pattern-scale.svg
1410
1411         * rendering/svg/RenderSVGResourceClipper.cpp:
1412         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1413         * rendering/svg/RenderSVGResourceGradient.cpp:
1414         (WebCore::createMaskAndSwapContextForTextGradient):
1415         (WebCore::clipToTextMask):
1416         * rendering/svg/RenderSVGResourceMasker.cpp:
1417         (WebCore::RenderSVGResourceMasker::applyResource):
1418         * rendering/svg/RenderSVGResourcePattern.cpp:
1419         (WebCore::RenderSVGResourcePattern::applyResource):
1420         (WebCore::RenderSVGResourcePattern::createTileImage):
1421         * rendering/svg/RenderSVGResourcePattern.h:
1422         * rendering/svg/SVGImageBufferTools.cpp:
1423         (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect):
1424         * rendering/svg/SVGImageBufferTools.h:
1425
1426 2011-09-27  Dan Bernstein  <mitz@apple.com>
1427
1428         <rdar://problem/10098679> Assertion failure in RenderLayer::paintPaginatedChildLayer()
1429
1430         Reviewed by Simon Fraser.
1431
1432         Test: fast/dynamic/layer-no-longer-paginated.html
1433
1434         FrameView::layout() calls adjustViewSize() before calling RenderLayer::updateLayerPositions().
1435         The former may trigger painting with a layer tree that is not entirely up-to-date. Specifically,
1436         the isPaginated() state of a layer may be incorrect, leading to the assertion in this bug. Instead
1437         of asserting, return early and count on the upcoming updateLayerPositions() to repaint as needed.
1438
1439         * rendering/RenderLayer.cpp:
1440         (WebCore::RenderLayer::paintPaginatedChildLayer): Replaced the assertion with an early return.
1441
1442 2011-09-27  Ojan Vafai  <ojan@chromium.org>
1443
1444         offsetTop/offsetLeft return the wrong values for horizontal-bt/vertical-rl writing modes
1445         https://bugs.webkit.org/show_bug.cgi?id=68304
1446
1447         Reviewed by David Hyatt.
1448
1449         When grabbing the x/y values of the RenderBox, we need to take writing mode
1450         flipping into account.
1451
1452         Test: fast/dom/offset-position-writing-modes.html
1453
1454         * rendering/RenderBox.cpp:
1455         (WebCore::RenderBox::locationIncludingFlipping):
1456         * rendering/RenderBox.h:
1457         (WebCore::RenderBox::yFlippedForWritingMode):
1458         (WebCore::RenderBox::xFlippedForWritingMode):
1459         * rendering/RenderBoxModelObject.cpp:
1460         (WebCore::RenderBoxModelObject::offsetLeft):
1461         (WebCore::RenderBoxModelObject::offsetTop):
1462
1463 2011-09-27  Tim Horton  <timothy_horton@apple.com>
1464
1465         Rapidly refreshing a feMorphology[erode] with r=0 can sometimes cause display corruption
1466         https://bugs.webkit.org/show_bug.cgi?id=68816
1467         <rdar://problem/10186468>
1468
1469         Reviewed by Simon Fraser.
1470
1471         If a filter returns without writing into its result buffer, make sure to return an cleared buffer.
1472
1473         Test: svg/filters/feMorphology-zero-radius.svg
1474
1475         * platform/graphics/filters/FEMorphology.cpp:
1476         (WebCore::FEMorphology::apply):
1477         * platform/graphics/filters/FETurbulence.cpp:
1478         (WebCore::FETurbulence::apply):
1479
1480 2011-09-27  Ryosuke Niwa  <rniwa@webkit.org>
1481
1482         CompositeEditCommand::prune should remove subtree at once
1483         https://bugs.webkit.org/show_bug.cgi?id=68866
1484
1485         Reviewed by Darin Adler.
1486
1487         Extracted the logic to find the highest ancestor to remove as highestNodeToRemoveInPruning from prune.
1488         This reduces the number of node removals from O(n) to O(1) where n is the depth of the tree.
1489
1490         * editing/CompositeEditCommand.cpp:
1491         (WebCore::hasARenderedDescendant): Takes excludedNode in addition to node. excludedNode is used to ignore
1492         the child node from which we climbed up the tree in highestNodeToRemoveInPruning.
1493         (WebCore::highestNodeToRemoveInPruning): Extracted from prune.
1494         (WebCore::CompositeEditCommand::prune):
1495         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
1496
1497 2011-09-27  David Hyatt  <hyatt@apple.com>
1498
1499         https://bugs.webkit.org/show_bug.cgi?id=68922
1500
1501         Paginated floats should not grow the height of a block when they don't end
1502         up being tied to a line. Floats encountered in skipLeadingWhitespace that
1503         paginate can't immediately grow the height of the block, since there may not
1504         end up being any actual line content. We only want to push the height of the
1505         block down if we have actual line content that we want to keep with the
1506         float.
1507         
1508         Make positionNewFloatOnLine check if the line is empty or not, and if it is,
1509         it just puts the desired pagination strut into LineInfo. If and when actual
1510         line content is encountered and setEmpty becomes false, we'll grow the block
1511         height then.
1512         
1513         Reviewed by Dan Bernstein.
1514
1515         Added fast/multicol/float-paginate-empty-lines.html and
1516         fast/regions/webkit-flow-double-pagination-float-push.html.
1517
1518         * rendering/RenderBlock.h:
1519         * rendering/RenderBlockLineLayout.cpp:
1520         (WebCore::LineWidth::LineWidth):
1521         (WebCore::LineWidth::fitsOnLine):
1522         (WebCore::LineWidth::currentWidth):
1523         (WebCore::LineWidth::uncommittedWidth):
1524         (WebCore::LineWidth::committedWidth):
1525         (WebCore::LineWidth::availableWidth):
1526         (WebCore::LineWidth::addUncommittedWidth):
1527         (WebCore::LineWidth::commit):
1528         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
1529         (WebCore::LineWidth::updateAvailableWidth):
1530         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
1531         (WebCore::LineWidth::applyOverhang):
1532         (WebCore::LineWidth::fitBelowFloats):
1533         (WebCore::LineInfo::LineInfo):
1534         (WebCore::LineInfo::floatPaginationStrut):
1535         (WebCore::LineInfo::setEmpty):
1536         (WebCore::LineInfo::setFloatPaginationStrut):
1537         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1538         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
1539         (WebCore::RenderBlock::positionNewFloatOnLine):
1540
1541 2011-09-27  Dean Jackson  <dino@apple.com>
1542
1543         Add 'filter' value to RenderStyle
1544         https://bugs.webkit.org/show_bug.cgi?id=68471
1545
1546         Reviewed by Simon Fraser.
1547
1548         Add a filter property to RenderStyle when ENABLE(CSS_FILTERS)
1549         is turned on. Similar to -webkit-transform, -webkit-filter is a
1550         list of FilterOperations, each identifying what type of operation
1551         it is. This change simply adds the basic objects, it does not
1552         parse the property to generate the list.
1553
1554         * CMakeLists.txt:
1555         * GNUmakefile.list.am:
1556         * WebCore.gypi:
1557         * WebCore.pro:
1558         * WebCore.vcproj/WebCore.vcproj:
1559         * WebCore.xcodeproj/project.pbxproj:
1560         * platform/graphics/filters/FilterOperation.h: Added.
1561         (WebCore::FilterOperation::~FilterOperation):
1562         (WebCore::FilterOperation::operator!=):
1563         (WebCore::FilterOperation::getOperationType):
1564         (WebCore::FilterOperation::isSameType):
1565         (WebCore::FilterOperation::FilterOperation):
1566         (WebCore::ReferenceFilterOperation::create):
1567         (WebCore::ReferenceFilterOperation::reference):
1568         (WebCore::ReferenceFilterOperation::operator==):
1569         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
1570         (WebCore::BasicColorMatrixFilterOperation::create):
1571         (WebCore::BasicColorMatrixFilterOperation::amount):
1572         (WebCore::BasicColorMatrixFilterOperation::operator==):
1573         (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation):
1574         (WebCore::BasicComponentTransferFilterOperation::create):
1575         (WebCore::BasicComponentTransferFilterOperation::amount):
1576         (WebCore::BasicComponentTransferFilterOperation::operator==):
1577         (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation):
1578         (WebCore::GammaFilterOperation::create):
1579         (WebCore::GammaFilterOperation::amplitude):
1580         (WebCore::GammaFilterOperation::exponent):
1581         (WebCore::GammaFilterOperation::offset):
1582         (WebCore::GammaFilterOperation::operator==):
1583         (WebCore::GammaFilterOperation::GammaFilterOperation):
1584         (WebCore::BlurFilterOperation::create):
1585         (WebCore::BlurFilterOperation::stdDeviationX):
1586         (WebCore::BlurFilterOperation::stdDeviationY):
1587         (WebCore::BlurFilterOperation::operator==):
1588         (WebCore::BlurFilterOperation::BlurFilterOperation):
1589         (WebCore::SharpenFilterOperation::create):
1590         (WebCore::SharpenFilterOperation::radius):
1591         (WebCore::SharpenFilterOperation::threshold):
1592         (WebCore::SharpenFilterOperation::amount):
1593         (WebCore::SharpenFilterOperation::operator==):
1594         (WebCore::SharpenFilterOperation::SharpenFilterOperation):
1595         (WebCore::DropShadowFilterOperation::create):
1596         (WebCore::DropShadowFilterOperation::shadow):
1597         (WebCore::DropShadowFilterOperation::operator==):
1598         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
1599         * platform/graphics/filters/FilterOperations.cpp: Added.
1600         (WebCore::FilterOperations::FilterOperations):
1601         (WebCore::FilterOperations::operator==):
1602         * platform/graphics/filters/FilterOperations.h: Added.
1603         (WebCore::FilterOperations::operator!=):
1604         (WebCore::FilterOperations::clear):
1605         (WebCore::FilterOperations::operations):
1606         (WebCore::FilterOperations::size):
1607         (WebCore::FilterOperations::at):
1608         * rendering/style/RenderStyle.cpp:
1609         (WebCore::RenderStyle::RenderStyle):
1610         * rendering/style/RenderStyle.h:
1611         (WebCore::InheritedFlags::filter):
1612         (WebCore::InheritedFlags::hasFilter):
1613         (WebCore::InheritedFlags::setFilter):
1614         (WebCore::InheritedFlags::initialFilter):
1615         * rendering/style/StyleAllInOne.cpp: Added include of new StyleFilterData.
1616         * rendering/style/StyleFilterData.cpp: Added.
1617         (WebCore::StyleFilterData::StyleFilterData):
1618         (WebCore::StyleFilterData::operator==):
1619         * rendering/style/StyleFilterData.h: Added.
1620         (WebCore::StyleFilterData::create):
1621         (WebCore::StyleFilterData::copy):
1622         (WebCore::StyleFilterData::operator!=):
1623         * rendering/style/StyleRareNonInheritedData.cpp:
1624         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1625         (WebCore::StyleRareNonInheritedData::operator==):
1626         * rendering/style/StyleRareNonInheritedData.h: New filter DataRef.
1627
1628 2011-09-27  James Robinson  <jamesr@chromium.org>
1629
1630         [chromium] LayerRenderChromium asserts about leaking textures.
1631         https://bugs.webkit.org/show_bug.cgi?id=68190
1632
1633         Reviewed by Kenneth Russell.
1634
1635         This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures.
1636         This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format
1637         enum type, making it more testable.  It also allows us to track the allocations by subclassing TextureAllocator
1638         to make sure we aren't leaking any textures.
1639
1640         * WebCore.gypi:
1641         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1642         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
1643         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1644         * platform/graphics/chromium/ImageLayerChromium.cpp:
1645         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1646         * platform/graphics/chromium/LayerChromium.h:
1647         (WebCore::LayerChromium::updateCompositorResources):
1648         * platform/graphics/chromium/LayerRendererChromium.cpp:
1649         (WebCore::LayerRendererChromium::LayerRendererChromium):
1650         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
1651         (WebCore::LayerRendererChromium::drawLayers):
1652         (WebCore::LayerRendererChromium::useRenderSurface):
1653         (WebCore::LayerRendererChromium::initializeSharedObjects):
1654         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1655         * platform/graphics/chromium/LayerRendererChromium.h:
1656         (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator):
1657         (WebCore::LayerRendererChromium::contentsTextureAllocator):
1658         * platform/graphics/chromium/LayerTextureUpdater.h:
1659         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1660         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
1661         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
1662         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1663         * platform/graphics/chromium/ManagedTexture.cpp:
1664         (WebCore::ManagedTexture::bindTexture):
1665         (WebCore::ManagedTexture::framebufferTexture2D):
1666         * platform/graphics/chromium/ManagedTexture.h:
1667         * platform/graphics/chromium/TextureManager.cpp:
1668         (WebCore::TextureManager::memoryUseBytes):
1669         (WebCore::TextureManager::deleteEvictedTextures):
1670         (WebCore::TextureManager::evictAndDeleteAllTextures):
1671         (WebCore::TextureManager::removeTexture):
1672         (WebCore::TextureManager::allocateTexture):
1673         (WebCore::TextureManager::requestTexture):
1674         * platform/graphics/chromium/TextureManager.h:
1675         (WebCore::TextureAllocator::~TextureAllocator):
1676         * platform/graphics/chromium/TiledLayerChromium.cpp:
1677         (WebCore::TiledLayerChromium::updateCompositorResources):
1678         * platform/graphics/chromium/TiledLayerChromium.h:
1679         * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added.
1680         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1681         (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator):
1682         (WebCore::TrackingTextureAllocator::createTexture):
1683         (WebCore::TrackingTextureAllocator::deleteTexture):
1684         * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h.
1685         (WebCore::TrackingTextureAllocator::create):
1686         (WebCore::TrackingTextureAllocator::currentMemoryUseBytes):
1687         * platform/graphics/chromium/VideoLayerChromium.cpp:
1688         (WebCore::VideoLayerChromium::updateCompositorResources):
1689         (WebCore::VideoLayerChromium::updateTexture):
1690         * platform/graphics/chromium/VideoLayerChromium.h:
1691         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1692         (WebCore::WebGLLayerChromium::updateCompositorResources):
1693         * platform/graphics/chromium/WebGLLayerChromium.h:
1694         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1695         (WebCore::CCHeadsUpDisplay::draw):
1696         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1697         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1698         (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread):
1699         (WebCore::CCLayerTreeHost::commitToOnCCThread):
1700         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
1701         (WebCore::CCLayerTreeHost::updateCompositorResources):
1702         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1703         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1704         (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator):
1705         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1706         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1707         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1708         (WebCore::CCRenderSurface::drawSurface):
1709         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1710         (WebCore::CCSingleThreadProxy::setNeedsCommit):
1711         (WebCore::CCSingleThreadProxy::stop):
1712         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
1713         (WebCore::CCSingleThreadProxy::commitIfNeeded):
1714         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1715         (WebCore::CCThreadProxy::commitOnCCThread):
1716         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
1717
1718 2011-06-28  Robert Hogan  <robert@webkit.org>
1719
1720         Reviewed by David Hyatt.
1721
1722         Replaced elements squeezed when width is specified as percentage inside a table with Auto layout
1723         https://bugs.webkit.org/show_bug.cgi?id=29447
1724
1725         If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from
1726         a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height.
1727
1728         Test: fast/replaced/table-percent-width.html
1729
1730         * rendering/RenderBox.cpp:
1731         (WebCore::avoidSqueezingWidth):
1732         (WebCore::avoidSqueezingHeight):
1733         (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent):
1734         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1735         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1736         * rendering/RenderBox.h:
1737
1738 2011-09-27  Simon Fraser  <simon.fraser@apple.com>
1739
1740         https://bugs.webkit.org/show_bug.cgi?id=67858
1741
1742         Roll r96070 back in now that the crash has been fixed in r96130.
1743
1744         Reviewed by Darin Adler.
1745         
1746         When non-overlay scrollbars are hidden on a composited iframe, nothing invalidated
1747         the scrollbar areas or the scroll corner, so the scrollbars appear to remain.
1748         
1749         Fix by invalidating the scrollbars and scroll corner when they are removed. Invalidation
1750         on scrollbar creation appears to happen via updating the scrollbar style.
1751
1752         Tested by compositing/iframes/repaint-after-losing-scrollbars.html which no longer shows
1753         stale scrollbars when run manually, even though the green squares are missing from the
1754         pixel result (bug 67878).
1755
1756         * page/FrameView.cpp:
1757         (WebCore::FrameView::updateScrollCorner): Pass the corner rect into invalidateScrollCorner().
1758         * platform/ScrollView.cpp:
1759         (WebCore::ScrollView::setHasHorizontalScrollbar): Invalidate the scrollbar area if hiding it.
1760         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
1761         (WebCore::ScrollView::updateScrollbars): In the case where both scrollbars are going away,
1762         compute the scroll corner rect while we still have scrollbars, and then invalidate it
1763         explicitly. (updateScrollCorner() doesn't, because it doesn't have access to the old corner
1764         rect.)
1765         * platform/ScrollableArea.cpp:
1766         (WebCore::ScrollableArea::invalidateScrollCorner): Pass the rect in, because we can't
1767         compute it in the case where the scrollbars are going away.
1768         * platform/ScrollableArea.h: Pass in a rect to invalidateScrollCorner(), which matches
1769         invalidateScrollbar().
1770         * rendering/RenderLayerCompositor.cpp:
1771         (WebCore::RenderLayerCompositor::destroyRootLayer): Pass the corner rect into invalidateScrollCorner().
1772         * rendering/RenderScrollbarPart.cpp: Ditto.
1773         (WebCore::RenderScrollbarPart::imageChanged): Ditto.
1774
1775 2011-09-27  Mihai Parparita  <mihaip@chromium.org>
1776
1777         Fix Chromium Mac build after r96130.
1778
1779         * page/FrameView.cpp:
1780         (WebCore::FrameView::layerForOverhangAreas):
1781
1782 2011-09-27  Kaustubh Atrawalkar  <kaustubh@motorola.com>
1783
1784         Autofocus on readonly inputs does not focus the element.
1785         https://bugs.webkit.org/show_bug.cgi?id=24092
1786
1787         Reviewed by Ryosuke Niwa.
1788
1789         Readonly input elements should be autofocusable. Removed the check.
1790
1791         Tests: fast/forms/autofocus-readonly-attribute.html
1792
1793         * html/HTMLFormControlElement.cpp:
1794         (WebCore::shouldAutofocus):
1795
1796 2011-09-27  Simon Fraser  <simon.fraser@apple.com>
1797
1798         Clean up how FrameView accesses the RenderView
1799         https://bugs.webkit.org/show_bug.cgi?id=68914
1800
1801         Reviewed by Sam Weinig.
1802
1803         Clean up how FrameView accesses the content renderer of its
1804         frame. Previously, this was done in several different ways,
1805         only some of which did null-checking.
1806         
1807         Use an inline method to avoid having to expose Frame
1808         in the header.
1809         
1810         Standardize the terminology to use 'root' for this RenderView.
1811
1812         * page/FrameView.cpp:
1813         (WebCore::rootRenderer):
1814         (WebCore::FrameView::setFrameRect):
1815         (WebCore::FrameView::adjustViewSize):
1816         (WebCore::FrameView::updateCompositingLayers):
1817         (WebCore::FrameView::clearBackingStores):
1818         (WebCore::FrameView::restoreBackingStores):
1819         (WebCore::FrameView::layerForHorizontalScrollbar):
1820         (WebCore::FrameView::layerForVerticalScrollbar):
1821         (WebCore::FrameView::layerForScrollCorner):
1822         (WebCore::FrameView::layerForOverhangAreas):
1823         (WebCore::FrameView::syncCompositingStateForThisFrame):
1824         (WebCore::FrameView::hasCompositedContent):
1825         (WebCore::FrameView::enterCompositingMode):
1826         (WebCore::FrameView::isSoftwareRenderable):
1827         (WebCore::FrameView::didMoveOnscreen):
1828         (WebCore::FrameView::willMoveOffscreen):
1829         (WebCore::FrameView::layout):
1830         (WebCore::FrameView::embeddedContentBox):
1831         (WebCore::FrameView::contentsInCompositedLayer):
1832         (WebCore::FrameView::scrollContentsFastPath):
1833         (WebCore::FrameView::scrollContentsSlowPath):
1834         (WebCore::FrameView::maintainScrollPositionAtAnchor):
1835         (WebCore::FrameView::scrollPositionChanged):
1836         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
1837         (WebCore::FrameView::visibleContentsResized):
1838         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1839         (WebCore::FrameView::needsLayout):
1840         (WebCore::FrameView::setNeedsLayout):
1841         (WebCore::FrameView::performPostLayoutTasks):
1842         (WebCore::FrameView::updateControlTints):
1843         (WebCore::FrameView::paintContents):
1844         (WebCore::FrameView::forceLayoutForPagination):
1845         (WebCore::FrameView::adjustPageHeightDeprecated):
1846         (WebCore::FrameView::isVerticalDocument):
1847         (WebCore::FrameView::isFlippedDocument):
1848
1849 2011-09-27  Dominic Mazzoni  <dmazzoni@google.com>
1850
1851         AXObjectCache cleared unnecessarily when non-top Document is detached.
1852         https://bugs.webkit.org/show_bug.cgi?id=68636
1853
1854         Reviewed by Chris Fleizach.
1855
1856         Test: accessibility/deleting-iframe-destroys-axcache.html
1857
1858         * dom/Document.cpp:
1859         (WebCore::Document::attach):
1860         (WebCore::Document::detach):
1861
1862 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1863
1864         Unreviewed, rolling out r96108, r96111, r96113, and r96116.
1865         http://trac.webkit.org/changeset/96108
1866         http://trac.webkit.org/changeset/96111
1867         http://trac.webkit.org/changeset/96113
1868         http://trac.webkit.org/changeset/96116
1869         https://bugs.webkit.org/show_bug.cgi?id=68913
1870
1871         Wait for working Qt5 (Requested by ossy on #webkit).
1872
1873         * WebCore.pri:
1874         * platform/graphics/qt/GraphicsLayerQt.cpp:
1875
1876 2011-09-27  Csaba Osztrogonác  <ossy@webkit.org>
1877
1878         Fix ENABLE(SQL_DATABASE)=0 build after r95919
1879         https://bugs.webkit.org/show_bug.cgi?id=68902
1880
1881         r95919 enabled OFFLINE_WEB_APPLICATIONS by default and
1882         it needs SQLite stuff even if ENABLE_SQL_DATABASE=0.
1883
1884         Reviewed by Adam Barth.
1885
1886         * platform/sql/SQLiteAuthorizer.cpp:
1887         * platform/sql/SQLiteDatabase.cpp:
1888         * platform/sql/SQLiteFileSystem.cpp:
1889         * platform/sql/SQLiteStatement.cpp:
1890         * platform/sql/SQLiteTransaction.cpp:
1891         * storage/DatabaseAuthorizer.cpp:
1892
1893 2011-09-27  Julien Chaffraix  <jchaffraix@webkit.org>
1894
1895         Crash because CSSPrimitiveValue::computeLengthDouble assumes fontMetrics are available
1896         https://bugs.webkit.org/show_bug.cgi?id=66291
1897
1898         Reviewed by Darin Adler.
1899
1900         Test: fast/canvas/crash-set-font.html
1901
1902         This is Yet Another Missing updateFont (similar to bug 57756 and likely others). Here the issue is that
1903         applying one of the font properties could mutate the parent style's font if m_parentStyle == m_style.
1904         We would then query the newly created font when applying CSSPropertyFontSize, which has no font fallback
1905         list as Font::update was never called.
1906
1907         The right fix would be to refactor of how we handle fonts to avoid such manual updates (see bug 62390).
1908         Until this happens, it is better not to crash.
1909
1910         * css/CSSStyleSelector.cpp:
1911         (WebCore::CSSStyleSelector::applyProperty): Added updateFont() here as the fonts could have been
1912         mutated by the previous property change. Also added a comment explaining why it is safe to do it
1913         this way.
1914
1915 2011-09-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
1916
1917         [Texmap] Code cleanup: remove unused boundingRect/visibleRect calculations
1918         https://bugs.webkit.org/show_bug.cgi?id=68897
1919
1920         Reviewed by Andreas Kling.
1921
1922         No new functionality so no new tests.
1923
1924         * platform/graphics/texmap/TextureMapperNode.cpp:
1925         (WebCore::TextureMapperNode::computeAllTransforms):
1926         (WebCore::TextureMapperNode::computeTiles):
1927         (WebCore::TextureMapperNode::syncCompositingState):
1928         * platform/graphics/texmap/TextureMapperNode.h:
1929
1930 2011-09-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
1931
1932         [Texmap][Qt] Refactor texture-upload to allow direct chunk update
1933         https://bugs.webkit.org/show_bug.cgi?id=68808
1934
1935         Add a function to BitmapTexture for direct pixel updates.
1936         Modify BitmapTextureGL::endPaint to use that function. Since the BGRA
1937         to RGBA swizzling is done inside that function, there's no need for the 
1938         RGBA32PremultipliedBuffer class to contain such function. Also,
1939         RGBA32PremultipliedBuffer was renamed to BGRA32PremultipliedBuffer, correcting
1940         an old mistake.
1941
1942         Reviewed by Andreas Kling.
1943
1944         No new tests. Existing tests in LayoutTests/compositing test this.
1945
1946         * platform/graphics/opengl/TextureMapperGL.cpp:
1947         (WebCore::BitmapTextureGL::beginPaint):
1948         (WebCore::BitmapTextureGL::endPaint):
1949         (WebCore::swizzleBGRAToRGBA):
1950         (WebCore::BitmapTextureGL::updateContents):
1951         * platform/graphics/opengl/TextureMapperGL.h:
1952         (WebCore::BGRA32PremultimpliedBuffer::~BGRA32PremultimpliedBuffer):
1953         * platform/graphics/qt/TextureMapperQt.cpp:
1954         (WebCore::BitmapTextureQt::updateContents):
1955         (WebCore::BGRA32PremultimpliedBufferQt::data):
1956         (WebCore::BGRA32PremultimpliedBuffer::create):
1957         * platform/graphics/qt/TextureMapperQt.h:
1958         * platform/graphics/texmap/TextureMapper.h:
1959
1960 2011-09-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1961
1962         [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
1963
1964         QWidget and friends now live in the QtWidgets library. We update
1965         includes in implementation files and private headers to us the
1966         non-module-prefixed path, and leave the lookup for the include
1967         path. For public headers we have to ifdef the includes as the
1968         user might now have the modules we need in his QT config.
1969
1970         Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
1971         have to update our code and use windowHandle() for setting the
1972         parent relationships.
1973
1974         https://bugs.webkit.org/show_bug.cgi?id=68687
1975
1976         Reviewed by Andreas Kling.
1977
1978         * WebCore.pri:
1979         * platform/graphics/qt/GraphicsLayerQt.cpp:
1980
1981 2011-09-27  Pavel Feldman  <pfeldman@google.com>
1982
1983         Web Inspector: split DOM.attributesUpdated into attributeModified and attributeRemoved.
1984         Send attribute name and value within the event.
1985         https://bugs.webkit.org/show_bug.cgi?id=68613
1986
1987         Reviewed by Yury Semikhatsky.
1988
1989         * dom/Element.cpp:
1990         (WebCore::Element::setAttribute):
1991         (WebCore::Element::removeAttribute):
1992         * inspector/Inspector.draft-01.json:
1993         * inspector/Inspector.json:
1994         * inspector/InspectorDOMAgent.cpp:
1995         (WebCore::InspectorDOMAgent::didModifyDOMAttr):
1996         (WebCore::InspectorDOMAgent::didRemoveDOMAttr):
1997         * inspector/InspectorDOMAgent.h:
1998         * inspector/InspectorInstrumentation.cpp:
1999         (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
2000         (WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
2001         * inspector/InspectorInstrumentation.h:
2002         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
2003         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
2004         * inspector/front-end/DOMAgent.js:
2005         (WebInspector.DOMNode.prototype._addAttribute):
2006         (WebInspector.DOMNode.prototype._setAttribute):
2007         (WebInspector.DOMNode.prototype._removeAttribute):
2008         (WebInspector.DOMAgent.prototype._attributeModified):
2009         (WebInspector.DOMAgent.prototype._attributeRemoved):
2010         (WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
2011         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
2012         (WebInspector.DOMDispatcher.prototype.attributeModified):
2013         (WebInspector.DOMDispatcher.prototype.attributeRemoved):
2014         * inspector/front-end/ElementsPanel.js:
2015         (WebInspector.ElementsPanel):
2016         (WebInspector.ElementsPanel.prototype._attributesUpdated):
2017         * inspector/front-end/MetricsSidebarPane.js:
2018         (WebInspector.MetricsSidebarPane):
2019         (WebInspector.MetricsSidebarPane.prototype._attributesUpdated):
2020         * inspector/front-end/StylesSidebarPane.js:
2021         (WebInspector.StylesSidebarPane):
2022         (WebInspector.StylesSidebarPane.prototype._attributesModified):
2023         (WebInspector.StylesSidebarPane.prototype._attributesRemoved):
2024         (WebInspector.StylesSidebarPane.prototype._styleInvalidated):
2025         (WebInspector.StylePropertyTreeElement.prototype.event):
2026         (WebInspector.StylePropertyTreeElement.prototype):
2027         * inspector/validate-protocol-compatibility:
2028
2029 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2030
2031         Unreviewed, rolling out r96070 and r96075.
2032         http://trac.webkit.org/changeset/96070
2033         http://trac.webkit.org/changeset/96075
2034         https://bugs.webkit.org/show_bug.cgi?id=68893
2035
2036         WK2 tests started crashing after r96070 for SL and Qt
2037         (Requested by torarne on #webkit).
2038
2039         * page/FrameView.cpp:
2040         (WebCore::FrameView::updateScrollCorner):
2041         * platform/ScrollView.cpp:
2042         (WebCore::ScrollView::setHasHorizontalScrollbar):
2043         (WebCore::ScrollView::setHasVerticalScrollbar):
2044         (WebCore::ScrollView::updateScrollbars):
2045         * platform/ScrollableArea.cpp:
2046         (WebCore::ScrollableArea::invalidateScrollCorner):
2047         * platform/ScrollableArea.h:
2048         * rendering/RenderLayerCompositor.cpp:
2049         (WebCore::RenderLayerCompositor::destroyRootLayer):
2050         * rendering/RenderScrollbarPart.cpp:
2051         (WebCore::RenderScrollbarPart::imageChanged):
2052
2053 2011-09-27  Andrey Kosyakov  <caseq@chromium.org>
2054
2055         Web Inspector: JS exception upon clicking on "Word Wrap" checkbox in Settings screen
2056         https://bugs.webkit.org/show_bug.cgi?id=68888
2057
2058         Reviewed by Pavel Feldman.
2059
2060         * inspector/front-end/ElementsPanel.js:
2061         (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged):
2062
2063 2011-09-21  Pavel Podivilov  <podivilov@chromium.org>
2064
2065         Web Inspector: migrate RawSourceCode clients to SourceMapping class.
2066         https://bugs.webkit.org/show_bug.cgi?id=68524
2067
2068         Clients should use uiSourceCode(), rawLocationToUILocation(), uiLocationToRawLocation() methods of SourceMapping class.
2069         Initially, RawSourceCode may not have associated SourceMapping, so it is natural to extract this methods and associated state to a separate class.
2070
2071         Reviewed by Yury Semikhatsky.
2072
2073         * inspector/front-end/BreakpointManager.js:
2074         (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
2075         (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
2076         * inspector/front-end/DebuggerPresentationModel.js:
2077         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
2078         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2079         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2080         (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping):
2081         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2082         (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages):
2083         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
2084         (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage):
2085         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
2086         (WebInspector.PresentationCallFrame.prototype.get url):
2087         (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated):
2088         (WebInspector.PresentationCallFrame.prototype.sourceLine):
2089         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent):
2090         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent):
2091         * inspector/front-end/SourceFile.js:
2092         (WebInspector.RawSourceCode.prototype.get sourceMapping):
2093
2094 2011-09-27  Vineet Chaudhary  <vineet.chaudhary@motorola.com>
2095
2096         wrap attribute of textarea element cannot be accessed by JavaScript.
2097         https://bugs.webkit.org/show_bug.cgi?id=68592
2098
2099         Reviewed by Kent Tamura.
2100
2101         Added JS interface for wrap attribute to HTMLTextAreaElement.idl.
2102
2103         Test: fast/forms/textarea-wrap-attribute.html
2104
2105         * html/HTMLTextAreaElement.idl:
2106
2107 2011-09-27  Xan Lopez  <xlopez@igalia.com>
2108
2109         [GTK] Add compatibility methods for DOM bindings
2110         https://bugs.webkit.org/show_bug.cgi?id=68884
2111
2112         Reviewed by Philippe Normand.
2113
2114         Add compatibility methods for our DOM bindings.
2115
2116         * bindings/gobject/WebKitDOMCustom.cpp:
2117         (webkit_dom_blob_slice): alias to the new method name.
2118         (webkit_dom_html_form_element_dispatch_form_change): this was
2119         removed from WebCore, so just print a warning about it.
2120         (webkit_dom_html_form_element_dispatch_form_input): ditto.
2121         * bindings/gobject/WebKitDOMCustom.h:
2122
2123 2011-09-27  Ryosuke Niwa  <rniwa@webkit.org>
2124
2125         Encapsulate m_firstNodeInserted and m_lastLeafInserted in node insertion logic
2126         https://bugs.webkit.org/show_bug.cgi?id=68875
2127
2128         Reviewed by Kent Tamura.
2129
2130         Added InsertedNode class inside ReplaceSelection to encapsulate m_firstNodeInserted and m_lastLeafInserted.
2131         Deployed it in removeRedundantStylesAndKeepStyleSpanInline, doApply, and insertAsListItems of ReplaceSelectionCommand.
2132
2133         * editing/DeleteSelectionCommand.cpp:
2134         (WebCore::DeleteSelectionCommand::removeNode):
2135         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2136         * editing/ReplaceSelectionCommand.cpp:
2137         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2138         (WebCore::ReplaceSelectionCommand::doApply):
2139         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2140         * editing/ReplaceSelectionCommand.h:
2141         (WebCore::ReplaceSelectionCommand::InsertedNodes::respondToNodeInsertion):
2142         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode):
2143         (WebCore::ReplaceSelectionCommand::InsertedNodes::firstNodeInserted):
2144         (WebCore::ReplaceSelectionCommand::InsertedNodes::lastLeafInserted):
2145         (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf):
2146         * editing/htmlediting.cpp:
2147         (WebCore::updatePositionForNodeRemoval): Moved from DeleteSelectionCommand.cpp.
2148         * editing/htmlediting.h:
2149
2150 2011-09-27  Arun Patole  <bmf834@motorola.com>
2151
2152         Audio element doesn't emit the 'playing' event every time it starts playing, after it has finished playing.
2153         https://bugs.webkit.org/show_bug.cgi?id=60972
2154
2155         Reviewed by Philippe Normand.
2156
2157         The paused attribute should be set to true and the media element should emit a 'paused' at the end of playback.
2158         WHATWG revision r6562: http://html5.org/tools/web-apps-tracker?from=6561&to=6562
2159
2160         Test: media/media-element-play-after-eos.html
2161
2162         * html/HTMLMediaElement.cpp:
2163         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): set m_paused to true and schedule 'pause' event when playback ended.
2164
2165 2011-09-27  Rakesh KN  <rakesh.kn@motorola.com>
2166
2167         <input> with autofocus doesn't lose focus when it has a certain onblur listener
2168         https://bugs.webkit.org/show_bug.cgi?id=68513
2169
2170         Reviewed by Kent Tamura.
2171
2172         Test: fast/forms/autofocus-focus-only-once.html
2173
2174         These changes make sure that an element is focused only once when autofocus attribute is used.
2175
2176         * html/HTMLFormControlElement.cpp:
2177         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2178         (WebCore::shouldAutofocus):
2179         (WebCore::HTMLFormControlElement::attach):
2180         * html/HTMLFormControlElement.h:
2181         (WebCore::HTMLFormControlElement::hasAutofocused):
2182         (WebCore::HTMLFormControlElement::setAutofocused):
2183
2184 2011-09-26  Kentaro Hara  <haraken@chromium.org>
2185
2186         Implement PopStateEvent.state with SerializedScriptValue and ScriptValue
2187         https://bugs.webkit.org/show_bug.cgi?id=68345
2188
2189         Reviewed by Adam Barth.
2190
2191         Previously, the following test cases fail or crash:
2192
2193         - shouldBe("new PopStateEvent('eventType', { state: object1 }).state", "object1") -> FAIL
2194         - new PopStateEvent('eventType', { state: document }).state -> CRASH in DRT
2195
2196         This is because PopStateEvent.state is implemented not as ScriptValue but as SerializedScriptValue.
2197         However, we cannot simply change the type of PopStateEvent.state to ScriptValue,
2198         since PopStateEvent can be constructed in the context that does not know ScriptValue.
2199         For example, Document.cpp calls PopStateEvent::create() with SerializedScriptValue
2200         popped from HistoryItem, but we cannot deserialize the SerializedScriptValue into
2201         the corresponding ScriptValue here because the deserialization requires ExecState.
2202         In other words, although we want to store PopStateEvent.state by ScriptValue internally,
2203         PopStateEvent still needs to provide an API to construct it with SerializedScriptValue.
2204         With these observations, this patch makes the following changes:
2205
2206         - If PopStateEvent is constructed with ScriptValue, it is stored as ScriptValue internally.
2207         When PopStateEvent.state is called, the ScriptValue is returned.
2208         - If PopStateEvent is constructed with SerializedScriptValue, it is stored as
2209         SerializedScriptValue internally (since we cannot deserialize it into ScriptValue
2210         at this point). When PopStateEvent.state is called, the SerializedScriptValue is
2211         deserialized into the corresponding ScriptValue, and the ScriptValue is returned.
2212
2213         Tests: fast/events/constructors/pop-state-event-constructor.html
2214                fast/events/fire-popstate-event.html
2215
2216         * GNUmakefile.list.am: Added JSPopStateEventCustom.cpp.
2217         * UseJSC.cmake: Ditto.
2218         * WebCore.gypi: Ditto.
2219         * WebCore.pro: Ditto.
2220         * WebCore.xcodeproj/project.pbxproj: Ditto.
2221         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
2222         * bindings/js/JSPopStateEventCustom.cpp:
2223         (WebCore::JSPopStateEvent::state): Custom getter for PopStateEvent.state.
2224         * bindings/v8/custom/V8PopStateEventCustom.cpp:
2225         (WebCore::V8PopStateEvent::stateAccessorGetter): Custom getter for PopStateEvent.state.
2226         * dom/PopStateEvent.cpp:
2227         (WebCore::PopStateEventInit::PopStateEventInit): Added initialization code for PopStateEvent.m_state.
2228         (WebCore::PopStateEvent::PopStateEvent): Ditto.
2229         (WebCore::PopStateEvent::create): Ditto.
2230         (WebCore::PopStateEvent::initPopStateEvent): Ditto.
2231         * dom/PopStateEvent.h:
2232         (WebCore::PopStateEvent::serializedState): Getter.
2233         (WebCore::PopStateEvent::state): Getter.
2234         * dom/PopStateEvent.idl: Change the type of 'stateArg' and 'state' to DOMObject. Added [CustomGetter] to 'state'.
2235
2236 2011-09-09  Simon Fraser  <simon.fraser@apple.com>
2237
2238         Pixel result shows that compositing/iframes/repaint-after-losing-scrollbars.html is failing
2239         https://bugs.webkit.org/show_bug.cgi?id=67858
2240
2241         Reviewed by Darin Adler.
2242         
2243         When non-overlay scrollbars are hidden on a composited iframe, nothing invalidated
2244         the scrollbar areas or the scroll corner, so the scrollbars appear to remain.
2245         
2246         Fix by invalidating the scrollbars and scroll corner when they are removed. Invalidation
2247         on scrollbar creation appears to happen via updating the scrollbar style.
2248
2249         Tested by compositing/iframes/repaint-after-losing-scrollbars.html which no longer shows
2250         stale scrollbars when run manually, even though the green squares are missing from the
2251         pixel result (bug 67878).
2252
2253         * page/FrameView.cpp:
2254         (WebCore::FrameView::updateScrollCorner): Pass the corner rect into invalidateScrollCorner().
2255         * platform/ScrollView.cpp:
2256         (WebCore::ScrollView::setHasHorizontalScrollbar): Invalidate the scrollbar area if hiding it.
2257         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
2258         (WebCore::ScrollView::updateScrollbars): In the case where both scrollbars are going away,
2259         compute the scroll corner rect while we still have scrollbars, and then invalidate it
2260         explicitly. (updateScrollCorner() doesn't, because it doesn't have access to the old corner
2261         rect.)
2262         * platform/ScrollableArea.cpp:
2263         (WebCore::ScrollableArea::invalidateScrollCorner): Pass the rect in, because we can't
2264         compute it in the case where the scrollbars are going away.
2265         * platform/ScrollableArea.h: Pass in a rect to invalidateScrollCorner(), which matches
2266         invalidateScrollbar().
2267         * rendering/RenderLayerCompositor.cpp:
2268         (WebCore::RenderLayerCompositor::destroyRootLayer): Pass the corner rect into invalidateScrollCorner().
2269         * rendering/RenderScrollbarPart.cpp: Ditto.
2270         (WebCore::RenderScrollbarPart::imageChanged): Ditto.
2271
2272 2011-09-09  Simon Fraser  <simon.fraser@apple.com>
2273
2274         Translucent scrollbars on composited layers render incorrectly
2275         https://bugs.webkit.org/show_bug.cgi?id=58515
2276
2277         Reviewed by Sam Weinig.
2278         
2279         Scrollbars in composited elements were getting drawn twice,
2280         because r41203 moved the call to paintOverflowControls() out of
2281         RenderLayer::paintLayer(), but forgot to change RenderLayerBacking::paintIntoLayer().
2282
2283         Test: compositing/scrollbar-painting.html
2284
2285         * rendering/RenderLayerBacking.cpp:
2286         (WebCore::RenderLayerBacking::paintIntoLayer):
2287
2288 2011-09-26  Nat Duca  <nduca@chromium.org>
2289
2290         [chromium] Make CCThreadProxy draw
2291         https://bugs.webkit.org/show_bug.cgi?id=67417
2292
2293         Update the CCThreadProxy to correctly implement the CCProxy
2294         interface, do all the right committing and updating steps, and
2295         draw a picture on the screen.
2296
2297         Reviewed by James Robinson.
2298
2299         * platform/graphics/IntRect.h:
2300         * platform/graphics/chromium/LayerRendererChromium.cpp:
2301         (WebCore::LayerRendererChromium::~LayerRendererChromium):
2302         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2303         (WebCore::CCHeadsUpDisplay::enabled):
2304         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2305         (WebCore::CCLayerImpl::CCLayerImpl):
2306         (WebCore::CCLayerImpl::~CCLayerImpl):
2307         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2308         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2309         (WebCore::CCLayerTreeHost::commitTo):
2310         (WebCore::CCLayerTreeHost::commitComplete):
2311         (WebCore::CCLayerTreeHost::setNeedsRedraw):
2312         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2313         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2314         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2315         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
2316         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2317         (WebCore::CCSingleThreadProxy::finishAllRendering):
2318         (WebCore::CCSingleThreadProxy::setNeedsCommit):
2319         (WebCore::CCSingleThreadProxy::commitIfNeeded):
2320         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2321         (WebCore::CCThreadProxy::CCThreadProxy):
2322         (WebCore::CCThreadProxy::~CCThreadProxy):
2323         (WebCore::CCThreadProxy::compositeAndReadback):
2324         (WebCore::CCThreadProxy::drawLayersAndReadbackOnCCThread):
2325         (WebCore::CCThreadProxy::finishAllRendering):
2326         (WebCore::CCThreadProxy::isStarted):
2327         (WebCore::CCThreadProxy::setNeedsCommit):
2328         (WebCore::CCThreadProxy::setNeedsCommitAndRedraw):
2329         (WebCore::CCThreadProxy::setNeedsRedraw):
2330         (WebCore::CCThreadProxy::start):
2331         (WebCore::CCThreadProxy::stop):
2332         (WebCore::CCThreadProxy::finishAllRenderingOnCCThread):
2333         (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread):
2334         (WebCore::CCThreadProxy::beginFrameAndCommit):
2335         (WebCore::CCThreadProxy::commitOnCCThread):
2336         (WebCore::CCThreadProxy::scheduleDrawTaskOnCCThread):
2337         (WebCore::CCThreadProxy::drawLayersAndPresentOnCCThread):
2338         (WebCore::CCThreadProxy::drawLayersOnCCThread):
2339         (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread):
2340         * platform/graphics/chromium/cc/CCThreadProxy.h:
2341
2342 2011-09-26  Adam Klein  <adamk@chromium.org>
2343
2344         [MutationObservers] implement MutationRecord
2345         https://bugs.webkit.org/show_bug.cgi?id=68824
2346
2347         Reviewed by Darin Adler.
2348
2349         Implements MutationRecord as specified in the thread at
2350         http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html,
2351         including some minor naming changes from the original proposal.
2352
2353         This is a small part of the MutationObserver API, see
2354         https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug covering
2355         this feature.
2356
2357         No new tests as this isn't yet exposed to the platform.
2358
2359         * CMakeLists.txt:
2360         * DerivedSources.cpp:
2361         * DerivedSources.make:
2362         * GNUmakefile.list.am:
2363         * WebCore.gypi:
2364         * WebCore.pro:
2365         * WebCore.vcproj/WebCore.vcproj:
2366         * WebCore.xcodeproj/project.pbxproj:
2367         * dom/MutationRecord.cpp: Added.
2368         (WebCore::MutationRecord::createChildList):
2369         (WebCore::MutationRecord::createAttributes):
2370         (WebCore::MutationRecord::createCharacterData):
2371         (WebCore::MutationRecord::MutationRecord):
2372         (WebCore::MutationRecord::~MutationRecord):
2373         * dom/MutationRecord.h: Added.
2374         (WebCore::MutationRecord::target):
2375         (WebCore::MutationRecord::addedNodes):
2376         (WebCore::MutationRecord::removedNodes):
2377         (WebCore::MutationRecord::previousSibling):
2378         (WebCore::MutationRecord::nextSibling):
2379         (WebCore::MutationRecord::attributeName):
2380         (WebCore::MutationRecord::attributeNamespace):
2381         (WebCore::MutationRecord::oldValue):
2382         (WebCore::MutationRecord::setOldValue):
2383         * dom/MutationRecord.idl: Added.
2384
2385 2011-09-26  Kentaro Hara  <haraken@chromium.org>
2386
2387         Implement a CloseEvent constructor for V8
2388         https://bugs.webkit.org/show_bug.cgi?id=68793
2389
2390         Reviewed by Adam Barth.
2391
2392         Test: fast/events/constructors/close-event-constructor.html
2393
2394         * bindings/v8/OptionsObject.cpp:
2395         (WebCore::OptionsObject::getKey): Just removed an extra space.
2396         (WebCore::OptionsObject::getKeyValue): Returns an unsigned short value corresponding to the given key.
2397         * bindings/v8/OptionsObject.h:
2398         * bindings/v8/custom/V8EventConstructors.cpp: Added the CloseEvent constructor.
2399         * websockets/CloseEvent.idl: Added a 'V8CustomConstructor' attribute.
2400
2401 2011-09-26  Nate Chapin  <japhet@chromium.org>
2402
2403         Clean up CachedResource::load(). Collapse its
2404         logic into a single callsite, taking just a
2405         CachedResourceLoader and a ResourceLoaderOptions.
2406
2407         1. Its 'incremental' parameter is redundant.
2408         2. With 'incremental' removed, the SecurityCheckPolicy is the only
2409            parameter difference between the CachedResource::load() variants.
2410            Making it a part of ResourceLoaderOptions removes yet another random
2411            enum that is passed around individually.
2412         3. We currently have to call setResourceLoaderOptions() before load() on a
2413            new CachedResource, so we should just take the ResourceLoaderOptions in load().
2414
2415         https://bugs.webkit.org/show_bug.cgi?id=67443
2416
2417         Reviewed by Antti Koivisto.
2418
2419         No new tests, refactor only.
2420
2421         * loader/DocumentThreadableLoader.cpp:
2422         * loader/FrameLoaderTypes.h: Move SecurityCheckPolicy to ResourceLoaderOptions.h.
2423         * loader/MainResourceLoader.cpp:
2424         * loader/NetscapePlugInStreamLoader.cpp:
2425         * loader/ResourceLoadScheduler.cpp:
2426         * loader/ResourceLoadScheduler.h:
2427         * loader/ResourceLoader.cpp: Enforce SecurityCheckPolicy here instead of SubresourceLoader.
2428         * loader/ResourceLoaderOptions.h: Store SecurityCheckPolicy on ResourceLoaderOptions.
2429         * loader/SubresourceLoader.cpp:
2430         * loader/SubresourceLoader.h:
2431         * loader/cache/CachedFont.cpp:
2432         * loader/cache/CachedFont.h:
2433         * loader/cache/CachedImage.cpp:
2434         * loader/cache/CachedImage.h:
2435         * loader/cache/CachedResource.cpp:
2436         * loader/cache/CachedResource.h:
2437         * loader/cache/CachedResourceLoader.cpp:
2438         (WebCore::defaultCachedResourceOptions): Define the default ResourceLoaderOptions for
2439             CachedResource loads here instead of as a default parameter on requestResource().
2440         * loader/cache/CachedResourceLoader.h:
2441         * loader/cache/CachedResourceRequest.cpp:
2442         (WebCore::CachedResourceRequest::didReceiveData): Remove m_incremental, since its purpose
2443             is already enforced in the data() implementation of every CachedResource that doesn't want
2444             incremental loads.
2445         * loader/cache/CachedResourceRequest.h:
2446
2447 2011-09-26  Joshua Bell  <jsbell@chromium.org>
2448
2449         IndexedDB: Second half of IDBFactory.getDatabaseNames implementation
2450         https://bugs.webkit.org/show_bug.cgi?id=68818
2451
2452         Reviewed by Tony Chang.
2453
2454         Test: storage/indexeddb/factory-basics.html
2455
2456         Adds ability to enumerate IndexedDB databases within an origin.
2457
2458         * bindings/v8/custom/V8IDBAnyCustom.cpp:
2459         (WebCore::toV8):
2460         * storage/IDBAny.cpp:
2461         (WebCore::IDBAny::domStringList):
2462         (WebCore::IDBAny::set):
2463         * storage/IDBAny.h:
2464         * storage/IDBBackingStore.h:
2465         * storage/IDBCallbacks.h:
2466         * storage/IDBFactory.cpp:
2467         (WebCore::IDBFactory::getDatabaseNames):
2468         * storage/IDBFactory.h:
2469         * storage/IDBFactory.idl:
2470         * storage/IDBFactoryBackendImpl.cpp:
2471         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
2472         (WebCore::IDBFactoryBackendImpl::open):
2473         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2474         * storage/IDBFactoryBackendImpl.h:
2475         * storage/IDBFactoryBackendInterface.h:
2476         * storage/IDBLevelDBBackingStore.cpp:
2477         (WebCore::IDBLevelDBBackingStore::getDatabaseNames):
2478         (WebCore::IDBLevelDBBackingStore::getObjectStores):
2479         (WebCore::IDBLevelDBBackingStore::getIndexes):
2480         * storage/IDBLevelDBBackingStore.h:
2481         * storage/IDBLevelDBCoding.cpp:
2482         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
2483         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
2484         * storage/IDBLevelDBCoding.h:
2485         * storage/IDBRequest.cpp:
2486         (WebCore::IDBRequest::onSuccess):
2487         * storage/IDBRequest.h:
2488         * storage/IDBSQLiteBackingStore.cpp:
2489         (WebCore::IDBSQLiteBackingStore::getDatabaseNames):
2490         * storage/IDBSQLiteBackingStore.h:
2491
2492 2011-09-26  Tim Horton  <timothy_horton@apple.com>
2493
2494         <animateColor> applied to filtered ellipse does not update
2495         https://bugs.webkit.org/show_bug.cgi?id=68457
2496         <rdar://problem/10154777>
2497
2498         Reviewed by Darin Adler.
2499
2500         Invalidate the filter's cache when style changes take place so that style changes are respected.
2501
2502         Test: svg/filters/animate-fill.svg
2503
2504         * rendering/svg/SVGResourcesCache.cpp:
2505         (WebCore::SVGResourcesCache::clientStyleChanged):
2506         (WebCore::SVGResourcesCache::clientUpdatedFromElement):
2507
2508 2011-09-26  Max Perepelitsyn  <pph34r@gmail.com>
2509
2510         Set but unused variables cleanup in v8 bindings (gcc 4.6)
2511         https://bugs.webkit.org/show_bug.cgi?id=68079
2512
2513         Reviewed by Adam Barth.
2514
2515         Test: http/tests/websocket/tests/hybi/send-object-tostring-check.html
2516
2517         * bindings/scripts/CodeGeneratorV8.pm:
2518         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2519         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
2520         * bindings/scripts/test/V8/V8TestObj.cpp:
2521         (WebCore::ConfigureV8TestObjTemplate):
2522         * bindings/v8/WorkerScriptDebugServer.cpp:
2523         (WebCore::WorkerScriptDebugServer::addListener):
2524         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2525         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
2526         * bindings/v8/custom/V8WebSocketCustom.cpp:
2527         (WebCore::V8WebSocket::sendCallback):
2528
2529 2011-09-26  Tony Chang  <tony@chromium.org>
2530
2531         switch the initial value of flex-order to 0
2532         https://bugs.webkit.org/show_bug.cgi?id=68820
2533
2534         The spec changed from having an initial value of 1 to 0.
2535
2536         Reviewed by Ojan Vafai.
2537
2538         * rendering/style/RenderStyle.h:
2539         (WebCore::InheritedFlags::initialFlexOrder):
2540
2541 2011-09-26  Chris Rogers  <crogers@google.com>
2542
2543         OfflineAudioDestinationNode must wait for thread completion in uninitialize()
2544         https://bugs.webkit.org/show_bug.cgi?id=68725
2545
2546         Reviewed by Kenneth Russell.
2547
2548         No new tests.  This fixes internal implementation details.
2549
2550         * webaudio/OfflineAudioDestinationNode.cpp:
2551         (WebCore::OfflineAudioDestinationNode::uninitialize):
2552
2553 2011-09-26  Xan Lopez  <xlopez@igalia.com>
2554
2555         [GTK] Do not ignore 'Replaceable' attributes in the DOM bindings
2556         https://bugs.webkit.org/show_bug.cgi?id=68837
2557
2558         Reviewed by Martin Robinson.
2559
2560         * bindings/scripts/CodeGeneratorGObject.pm: add getters (but not
2561         setters) for 'Replaceable' attributes. Punt for the future
2562         actually making them settable, since it seems non trivial.
2563
2564 2011-09-26  Ryosuke Niwa  <rniwa@webkit.org>
2565
2566         Leopard build fix.
2567
2568         * testing/Internals.cpp:
2569         (WebCore::Internals::setZoomAnimatorTransform):
2570
2571 2011-09-26  Joshua Bell  <jsbell@chromium.org>
2572
2573         IndexedDB: Null key path gets stored as empty string key path
2574         https://bugs.webkit.org/show_bug.cgi?id=68726
2575
2576         Reviewed by Tony Chang.
2577
2578         Store additional flag to indicate if object store key path
2579         is null vs. empty. Added additional runtime tests for integrity
2580         of object store metadata.
2581
2582         * storage/IDBLevelDBBackingStore.cpp:
2583         (WebCore::checkObjectStoreAndMetaDataType):
2584         (WebCore::IDBLevelDBBackingStore::getObjectStores):
2585         (WebCore::IDBLevelDBBackingStore::createObjectStore):
2586         * storage/IDBLevelDBCoding.cpp:
2587
2588 2011-09-26  John Bauman  <jbauman@chromium.org>
2589
2590         Fix nonpremultiplied webgl toDataURL to jpeg
2591         https://bugs.webkit.org/show_bug.cgi?id=68366
2592
2593         The canvas spec says that toDataURL to formats without an alpha must
2594         be "composited onto a solid black background using the source-over
2595         operator." Do that.
2596
2597         Reviewed by Kenneth Russell.
2598
2599         * platform/graphics/cg/ImageBufferCG.cpp:
2600         (WebCore::CGImageToDataURL):
2601         (WebCore::ImageBuffer::toDataURL):
2602         (WebCore::ImageDataToDataURL):
2603         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
2604         (WebCore::RGBAtoRGB):
2605
2606 2011-09-26  Raphael Kubo da Costa  <kubo@profusion.mobi>
2607
2608         [CMake] Remove FindFreetype.cmake
2609         https://bugs.webkit.org/show_bug.cgi?id=68778
2610
2611         Reviewed by Adam Barth.
2612
2613         CMake has provided its own FindFreetype.cmake forever, so there is no
2614         need to have another implementation in WebKit.
2615
2616         No new tests, just a buildsystem change.
2617
2618         * CMakeListsEfl.txt: Use FREETYPE_{LIBRARIES,INCLUDE_DIRS} instead of
2619         Freetype_{LIBRARIES,INCLUDE_DIRS}.
2620
2621 2011-09-26  Alexei Svitkine  <asvitkine@chromium.org>
2622
2623         Fix full-page rubber band overhang appearing when gesturing during a slow page load.
2624         https://bugs.webkit.org/show_bug.cgi?id=68568
2625
2626         Chromium bug: http://code.google.com/p/chromium/issues/detail?id=97243
2627
2628         (This also happens on Safari.)
2629
2630         The problem was that ScrollView::overhangAmount() was returning a full-page overhang due to contentsSize() being 0 briefly during a page load, which was then getting used by ScrollAnimatorChromiumMac.mm to update the overhang on a gesture event. This change makes the relevant logic not return an overhang if the contentsSize() is empty.
2631
2632         Reviewed by Adam Barth.
2633
2634         No new tests, since this is highly timing-related.
2635
2636         * platform/ScrollView.cpp:
2637         (WebCore::ScrollView::overhangAmount):
2638         (WebCore::ScrollView::wheelEvent):
2639
2640 2011-09-26  W. James MacLean  <wjmaclean@chromium.org>
2641
2642         [chromium] Revise zoom animator backend to use full transform instead of just scale.
2643         https://bugs.webkit.org/show_bug.cgi?id=68535
2644
2645         Reviewed by Kenneth Russell.
2646
2647         * page/Settings.cpp:
2648         (WebCore::Settings::Settings):
2649         * page/Settings.h:
2650         (WebCore::Settings::setZoomAnimatorScale):
2651         (WebCore::Settings::zoomAnimatorScale):
2652         (WebCore::Settings::setZoomAnimatorPosition):
2653         (WebCore::Settings::zoomAnimatorPosX):
2654         (WebCore::Settings::zoomAnimatorPosY):
2655         * platform/graphics/chromium/LayerRendererChromium.cpp:
2656         (WebCore::LayerRendererChromium::LayerRendererChromium):
2657         (WebCore::LayerRendererChromium::drawLayersInternal):
2658         * platform/graphics/chromium/LayerRendererChromium.h:
2659         (WebCore::LayerRendererChromium::setZoomAnimatorTransform):
2660         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2661         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2662         (WebCore::CCLayerTreeHost::commitTo):
2663         (WebCore::CCLayerTreeHost::setZoomAnimatorTransform):
2664         (WebCore::CCLayerTreeHost::updateLayers):
2665         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2666         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2667         (WebCore::CCLayerTreeHostImpl::setZoomAnimatorTransform):
2668         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2669         * testing/Internals.cpp:
2670         (WebCore::Internals::setZoomAnimatorTransform):
2671         * testing/Internals.h:
2672         * testing/Internals.idl:
2673
2674 2011-09-26  Dan Bernstein  <mitz@apple.com>
2675
2676         REGRESSION (r95926) Assert firing in svg/clip-path/clip-path-on-svg.svg
2677         https://bugs.webkit.org/show_bug.cgi?id=68819
2678
2679         Reviewed by Dave Hyatt.
2680
2681         * rendering/RenderObject.cpp:
2682         (WebCore::RenderObject::scheduleRelayout): Revert to using view() instead of the RenderView**
2683         parameter of isRooted, since only the former returns 0 when the document is detached.
2684
2685 2011-09-26  Vsevolod Vlasov  <vsevik@chromium.org>
2686
2687         Web Inspector: XMLHttpRequest console logging messages should link to network panel when possible.
2688         https://bugs.webkit.org/show_bug.cgi?id=67399
2689
2690         Reviewed by Pavel Feldman.
2691
2692         * inspector/ConsoleMessage.cpp:
2693         (WebCore::ConsoleMessage::ConsoleMessage):
2694         * inspector/ConsoleMessage.h:
2695         * inspector/InspectorConsoleAgent.cpp:
2696         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
2697         * inspector/InspectorConsoleAgent.h:
2698         * inspector/InspectorInstrumentation.cpp:
2699         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
2700         * inspector/front-end/ConsoleMessage.js:
2701         (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier):
2702         (WebInspector.ConsoleMessage.prototype._formatMessage):
2703         * inspector/front-end/ResourcesPanel.js:
2704         (WebInspector.ResourcesPanel.prototype.showAnchorLocation):
2705         * inspector/front-end/inspector.js:
2706         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
2707         (WebInspector.linkifyStringAsFragment):
2708
2709 2011-09-26  Jer Noble  <jer.noble@apple.com>
2710
2711         White flash when entering full-screen using element.webkitRequestFullScreen()
2712         https://bugs.webkit.org/show_bug.cgi?id=68481
2713
2714         Reviewed by Simon Fraser.
2715
2716         No new tests; covered by existing full screen tests.
2717
2718         During an animation, renderers may try to paint into the FullScreenRenderer's 
2719         GraphicsLayer, and an optimization we previously added for the FullScreenRenderer's 
2720         background will cause these paints to fail. Remove this optimization in 
2721         containsPaintedContent, and taking non-composited elements into full screen will
2722         animate correctly.
2723
2724         * rendering/RenderLayerBacking.cpp:
2725         (WebCore::RenderLayerBacking::containsPaintedContent):
2726
2727 2011-09-26  Mihai Parparita  <mihaip@chromium.org>
2728
2729         Unreviewed, rolling out r95960.
2730         http://trac.webkit.org/changeset/95960
2731         https://bugs.webkit.org/show_bug.cgi?id=58608
2732
2733         Significantly changes table border rendering
2734
2735         * rendering/RenderObject.cpp:
2736         (WebCore::RenderObject::drawLineForBoxSide):
2737
2738 2011-09-23  Simon Fraser  <simon.fraser@apple.com>
2739
2740         Repaint tests don't work in WebKit2
2741         https://bugs.webkit.org/show_bug.cgi?id=68453
2742
2743         Reviewed by Sam Weinig.
2744
2745         Have FrameView keep track of repaint rects when asked to, and
2746         expose this set of repaint rects via private WebKit API for later
2747         use by DumpRenderTree.
2748         
2749         The repaint rects are in WebView coordinates, so we have to
2750         unapply the scroll offset.
2751
2752         * WebCore.exp.in:
2753         * page/FrameView.cpp:
2754         (WebCore::FrameView::FrameView):
2755         (WebCore::FrameView::reset):
2756         (WebCore::FrameView::repaintContentRectangle):
2757         (WebCore::FrameView::setTracksRepaints):
2758         * page/FrameView.h:
2759         (WebCore::FrameView::isTrackingRepaints):
2760         (WebCore::FrameView::resetTrackedRepaints):
2761         (WebCore::FrameView::trackedRepaintRects):
2762
2763 2011-09-26  Antti Koivisto  <antti@apple.com>
2764
2765         Optimize matching of common pseudo classes
2766         https://bugs.webkit.org/show_bug.cgi?id=68633
2767
2768         Reviewed by Dave Hyatt, Darin Adler, Dimitri Glazkov.
2769         
2770         :link, :visited and :focus are quite common. They often used as univeral selectors (including in our
2771         default stylesheet) so we try to match them for all elements in the document. They take always the 
2772         slow matching path. In addition we match link styles twice due to visited link pseudo style generation
2773         so the overhead is doubled. As a result substantial portion of our style matching time is spent 
2774         dealing with these pseudo classes. 
2775         
2776         This patch adds new lists to RuleSet for common pseudo class rules. The rules on the lists are only checked
2777         if the element has approprate type and stat. ases where the rightmost pseudo class can then be rejected immediately.
2778         We can also enable the fast path checking for the rest of the selector in many cases.
2779     
2780         This seems to be >30% progression in selector matching performance with typical style sheets. It saves ~0.9s
2781         when loading the full HTML5 spec.
2782
2783         * css/CSSStyleSelector.cpp:
2784         (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash):
2785         (WebCore::RuleSet::idRules):
2786         (WebCore::RuleSet::classRules):
2787         (WebCore::RuleSet::tagRules):
2788         (WebCore::RuleSet::shadowPseudoElementRules):
2789         (WebCore::RuleSet::linkPseudoClassRules):
2790         (WebCore::RuleSet::visitedPseudoClassRules):
2791         (WebCore::RuleSet::focusPseudoClassRules):
2792         (WebCore::RuleSet::universalRules):
2793         (WebCore::RuleSet::pageRules):
2794         
2795             Add a new lists, some stylistic renamings.
2796     
2797         (WebCore::CSSStyleSelector::matchRules):
2798         
2799             New link and focus checks.
2800
2801         (WebCore::CSSStyleSelector::matchRulesForList):
2802         (WebCore::CSSStyleSelector::checkSelector):
2803         
2804             Inline the rightmost selector tag checking, skip if unnecessary.
2805         
2806         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
2807         
2808             Common pseudo classes now match based on early filtering (though it is not a hash in this case).
2809
2810         (WebCore::RuleData::RuleData):
2811         (WebCore::RuleSet::~RuleSet):
2812         (WebCore::RuleSet::addRule):
2813         
2814             Sort pseudo classes to new lists.
2815         
2816         (WebCore::RuleSet::collectFeatures):
2817         (WebCore::RuleSet::shrinkToFit):
2818         (WebCore::CSSStyleSelector::matchPageRules):
2819         * css/SelectorChecker.cpp:
2820         (WebCore::SelectorChecker::checkSelector):
2821         
2822             Adopt to expanded fast path (this is used by querySelectorAll).
2823
2824         (WebCore::SelectorChecker::fastCheckRightmostSelector):
2825         (WebCore::SelectorChecker::fastCheckSelector):
2826         
2827             Rightmost selector is now checked differently than the rest. RuleSet based selection in CSSStyleSelector
2828             is equivalent to fastCheckRightmostSelector().
2829         
2830         (WebCore::isFastCheckableRelation):
2831         (WebCore::isFastCheckableMatch):
2832         (WebCore::isFastCheckableRightmostSelector):
2833         (WebCore::SelectorChecker::isFastCheckableSelector):
2834         (WebCore::SelectorChecker::checkOneSelector):
2835         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
2836         (WebCore::SelectorChecker::isFrameFocused):
2837         * css/SelectorChecker.h:
2838         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
2839         (WebCore::SelectorChecker::linkMatchesVisitedPseudoClass):
2840         (WebCore::SelectorChecker::matchesFocusPseudoClass):
2841         (WebCore::SelectorChecker::tagMatches):
2842         
2843             Refactor a bunch of shared checks into functions.
2844
2845 2011-09-12  Ryosuke Niwa  <rniwa@webkit.org>
2846
2847         REGRESSION(r74971): Selection doesn't work correctly in BiDi Text
2848         https://bugs.webkit.org/show_bug.cgi?id=57340
2849
2850         Reviewed by Eric Seidel.
2851
2852         This patch adds the end point adjustment mechanism at bidi boundaries similar to the one NSTextView implements.
2853
2854         To understand the problem, suppose we have strong RTL letters "ABC" in a LTR block (visually laid out as CBA).
2855
2856         Per NSTextView convention, logical offsets between each letter is placed as (0)C(2)B(1)A(3). In other words,
2857         placing the caret visually on the left of CBA yields the position inside the text node of "ABC" at offset 0.
2858         Likewise, placing it between C and B yields ("ABC", 2), and placing it on the right of CBA yields ("ABC", 3).
2859
2860         Now suppose a user attempts to select the letter A by a mouse drag from the right of CBA to a point between
2861         B and A. First, the initial mouse down places the selection's base at ("ABC", 3). Then as the mouse pointer
2862         moves to a point on the left of A, the selection's extent is set at ("ABC", 1), selecting "BC".
2863
2864         To mitigate this issue, NSTextView adjusts selection base and extent under certain conditions. In the above
2865         example, NSTextView detects user's intent and changes the selection's base to ("ABC", 0) temporarily.
2866
2867         This patch implements a similar trick on WebKit. We adjust the base or the extent when they're at the left
2868         end or at the right end of a bidi run and the other end is inside of the run. In the above example, the
2869         base position on the right of A is the right end of a bidi run and the extent position between B and A is
2870         inside the same run (CBA), so we would adjust the base to be ("ABC", 0) as NSTextView does.
2871
2872         Take another example abcABC. Note offsets are assigned as (0)a(1)b(2)c(3)C(5)B(4)A(6) When the user starts
2873         a mouse drag from the right of A to a point between B and A, we adjust the selection base to be ("abcABC", 3)
2874         because the base is at the right end of a bidi run and the extent is in the same run. We keep the adjustment
2875         when the mouse pointer moves to a point between C and B. However, when the mouser pointer reaches a point
2876         between letters b and c, the selection extent is placed at ("abcABC", 2). Because the extent is outside of
2877         the bidi run started from the selection base, we restore the original base at this point. Had we not done this,
2878         we'll end up selecting just "c".
2879
2880         While this algorithm is implemented in FrameSelection::setNonDirectionalSelectionIfNeeded, this patch adds
2881         various member functions to RenderedPosition to facilitate abstraction around inline boxes and bidi runs.
2882
2883         Test: editing/selection/select-bidi-run.html
2884
2885         * editing/FrameSelection.cpp:
2886         (WebCore::adjustEndpointsAtBidiBoundary): Added. Implements the endpoints adjustment algorithm.
2887         (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): Calls adjustEndpointsAtBidiBoundary, and
2888         restores the original base as needed.
2889         * editing/FrameSelection.h:
2890         * editing/RenderedPosition.cpp:
2891         (WebCore::RenderedPosition::RenderedPosition):
2892         (WebCore::RenderedPosition::prevLeafChild): Added to cache prevLeafChild of the current inline box.
2893         (WebCore::RenderedPosition::nextLeafChild): Ditto for nextLeafChild.
2894         (WebCore::RenderedPosition::isEquivalent): Compares two RenderedPositions considering neighboring inline boxes
2895         so that the rightmost position in a box and the leftmost position in the following box is considered equal.
2896         (WebCore::RenderedPosition::bidiLevelOnLeft): Added. Returns the bidi level of the run on the left. We can't
2897         add a generic bidiLevel to this class because it'll be ambiguous at bidi boundaries.
2898         (WebCore::RenderedPosition::bidiLevelOnRight): Ditto for the run on the right.
2899         (WebCore::RenderedPosition::leftBoundaryOfBidiRun): Added.
2900         (WebCore::RenderedPosition::rightBoundaryOfBidiRun): Added.
2901         (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun): Added.
2902         (WebCore::RenderedPosition::atRightBoundaryOfBidiRun): Added.
2903         (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun): Returns Position at the left edge of a bidi run
2904         if RenderedPosition is at such a position. Asserts atLeftBoundaryOfBidiRun.
2905         (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun): Ditto for the right edge.
2906         * editing/RenderedPosition.h:
2907         (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun): Added.
2908         (WebCore::RenderedPosition::atRightBoundaryOfBidiRun): Added.
2909         (WebCore::RenderedPosition::atLeftmostOffsetInBox): Added.
2910         (WebCore::RenderedPosition::atRightmostOffsetInBox): Added.
2911         (WebCore::RenderedPosition::uncachedInlineBox): Added. We can't use a static const variable because gcc thinks
2912         reinterpret_cast<InlineBox*>(1) is not an integral value.
2913         (WebCore::RenderedPosition::RenderedPosition):
2914         * editing/VisibleSelection.h:
2915         (WebCore::VisibleSelection::visibleBase): Added.
2916         (WebCore::VisibleSelection::visibleExtent): Added.
2917         * page/EventHandler.cpp:
2918         (WebCore::EventHandler::updateSelectionForMouseDrag):
2919
2920 2011-09-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2921
2922         Unreviewed, rolling out r95256.
2923         http://trac.webkit.org/changeset/95256
2924         https://bugs.webkit.org/show_bug.cgi?id=68814
2925
2926         Temporary CRASH calls no longer needed (Requested by enne on
2927         #webkit).
2928
2929         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2930         (WebCore::CCLayerTreeHost::commitTo):
2931
2932 2011-09-26  Mark Rowe  <mrowe@apple.com>
2933
2934         <http://webkit.org/b/68809> IconDatabase::syncThreadMainLoop can assert if wakeSyncThread is called before thread starts executing
2935
2936         If wakeSyncThread is called before syncThreadMainLoop starts executing then m_syncThreadHasWorkToDo would be set
2937         while executing the body of the sync thread loop, causing us to skip blocking on the condition variable. This would
2938         lead to us hitting the assertion failure due to m_disabledSuddenTerminationForSyncThread being false, unless the main
2939         thread happened to call wakeSyncThread a second time while the first loop iteration was executing.
2940
2941         Reviewed by Anders Carlsson.
2942
2943         * loader/icon/IconDatabase.cpp:
2944         (WebCore::IconDatabase::syncThreadMainLoop): Clear m_syncThreadHasWorkToDo to indicate that we're about to perform
2945         all pending work.
2946
2947 2011-09-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
2948
2949         Groove/inset/outset borders show solid if the color is black.
2950         https://bugs.webkit.org/show_bug.cgi?id=58608
2951
2952         Reviewed by Simon Fraser.
2953
2954         Lightened the border side colors when drawing borders with styles as
2955         Outset/Inset/Groove/Ridge.
2956
2957         Tests: fast/borders/border-groove.html
2958                fast/borders/border-inset.html
2959                fast/borders/border-outset.html
2960                fast/borders/border-ridge.html
2961
2962         * rendering/RenderObject.cpp:
2963         (WebCore::RenderObject::drawLineForBoxSide):
2964
2965 2011-09-26  Abhishek Arya  <inferno@chromium.org>
2966
2967         Delete retired custom font data only on document
2968         destruction, and not on recalc style.
2969         https://bugs.webkit.org/show_bug.cgi?id=68805
2970
2971         Reviewed by Dave Hyatt.
2972
2973         Test: fast/text/custom-font-data-crash.html
2974
2975         * dom/Document.cpp:
2976         (WebCore::Document::recalcStyle):
2977
2978 2011-09-23  Adrienne Walker  <enne@google.com>
2979
2980         [chromium] Update VideoLayerChromium textures after texture resources are reclaimed
2981         https://bugs.webkit.org/show_bug.cgi?id=68742
2982
2983         Reviewed by James Robinson.
2984
2985         If video textures are reclaimed (such as during a visibility change on
2986         a tab), the dirty rect for the layer is empty and it skips out of
2987         updating compositor resources, leaving the video textures invalid.
2988         Instead, check the textures here to make sure they're still valid
2989         first before early out so that they can get reupdated if necessary.
2990
2991         Additionally, fix a small bug in pushPropertiesTo where 1 plane RGB
2992         videos would not get drawn because all 3 planes didn't have valid
2993         textures.
2994
2995         Test: compositing/video-page-visibility.html
2996
2997         * platform/graphics/chromium/VideoLayerChromium.cpp:
2998         (WebCore::VideoLayerChromium::VideoLayerChromium):
2999         (WebCore::VideoLayerChromium::cleanupResources):
3000         (WebCore::VideoLayerChromium::updateCompositorResources):
3001         (WebCore::VideoLayerChromium::pushPropertiesTo):
3002         (WebCore::VideoLayerChromium::setLayerTreeHost):
3003         (WebCore::VideoLayerChromium::texturesValid):
3004         * platform/graphics/chromium/VideoLayerChromium.h:
3005
3006 2011-09-26  Pavel Feldman  <pfeldman@google.com>
3007
3008         Web Inspector: introduce protocol backwards compatibility validator.
3009         https://bugs.webkit.org/show_bug.cgi?id=68800
3010
3011         Reviewed by Yury Semikhatsky.
3012
3013         * inspector/Inspector.json:
3014         * inspector/Inspector.draft-01.json: Copied from Source/WebCore/inspector/Inspector.json.
3015         * inspector/validate-protocol-compatibility: Added.
3016
3017 2011-09-26  Andreas Kling  <kling@webkit.org>
3018
3019         [Qt] Unused variable in QNetworkReplyHandler::sendNetworkRequest.
3020         https://bugs.webkit.org/show_bug.cgi?id=68798
3021
3022         Reviewed by Noam Rosenthal.
3023
3024         * platform/network/qt/QNetworkReplyHandler.cpp:
3025         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
3026
3027 2011-09-26  Ilya Tikhonovsky  <loislo@chromium.org>
3028
3029         Second unreviewed build fix for r95941
3030
3031         * inspector/InspectorInstrumentation.cpp:
3032         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
3033
3034 2011-09-26  Ilya Tikhonovsky  <loislo@chromium.org>
3035
3036         Unreviewed build fix for webkit builds after r95941.
3037
3038         * inspector/InspectorInstrumentation.cpp:
3039         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
3040
3041 2011-09-26  Andrey Kosyakov  <caseq@chromium.org>
3042
3043         Web Inspector: [Extensions API] allow resources to hook on click on resource links
3044         https://bugs.webkit.org/show_bug.cgi?id=68528
3045
3046         Reviewed by Yury Semikhatsky.
3047
3048         * WebCore.gypi:
3049         * WebCore.vcproj/WebCore.vcproj:
3050         * inspector/front-end/ExtensionAPI.js:
3051         (injectedExtensionAPI.Console.prototype.get Severity):
3052         (injectedExtensionAPI.Panels.prototype.create):
3053         (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler.else.callbackWrapper):
3054         (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler):
3055         (injectedExtensionAPI.ExtensionServerClient.prototype.hasHandler):
3056         (injectedExtensionAPI.ExtensionServerClient.prototype.deregisterHandler):
3057         * inspector/front-end/ExtensionServer.js:
3058         (WebInspector.ExtensionServer):
3059         (WebInspector.ExtensionServer.prototype._onSetOpenResourceHandler):
3060         (WebInspector.ExtensionServer.prototype._handleAnchorClicked):
3061         (WebInspector.ExtensionServer.prototype._addExtensions):
3062         (WebInspector.ExtensionServer.prototype._addExtension):
3063         (WebInspector.ExtensionServer.prototype._registerExtension):
3064         * inspector/front-end/SettingsScreen.js:
3065         (WebInspector.SettingsScreen):
3066         (WebInspector.SettingsScreen.prototype._createCustomSetting):
3067         * inspector/front-end/WebKit.qrc:
3068         * inspector/front-end/helpScreen.css:
3069         (.help-content select):
3070         (.help-content select:disabled):
3071         (.help-content option):
3072         * inspector/front-end/inspector.html:
3073         * inspector/front-end/inspector.js:
3074         (WebInspector.set attached):
3075         (WebInspector._showAnchorLocation):
3076
3077 2011-09-23  Ilya Tikhonovsky  <loislo@chromium.org>
3078
3079         Web Inspector: Timeline: record root event for the function calls enforced by console eval.
3080         https://bugs.webkit.org/show_bug.cgi?id=68695
3081
3082         In a complex web application developer might want to timeline a specific piece of code.
3083
3084         In this case he can do the next steps:
3085         1) start timeline;
3086         2) eval a command in console;
3087         3) stop timeline.
3088
3089         I think it'd be nice to have a root event for the all the events that happened as the result of such eval.
3090
3091         Reviewed by Yury Semikhatsky.
3092
3093         Test: inspector/timeline/timeline-injected-script-eval.html
3094
3095         * bindings/v8/ScriptFunctionCall.cpp:
3096         * inspector/InjectedScript.cpp:
3097         (WebCore::InjectedScript::makeCall):
3098         * inspector/InspectorInstrumentation.cpp:
3099         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
3100
3101 2011-09-26  No'am Rosenthal  <noam.rosenthal@nokia.com>
3102
3103         [Texmap][Qt] Enable TextureMapperGL in platforms where BGRA is not present
3104         https://bugs.webkit.org/show_bug.cgi?id=65473
3105
3106         Reviewed by Andreas Kling.
3107
3108         For now, swap RGBA->BGRA in software if we're in OpenGL ES 2.
3109         We do that by iterating on the pixels and manually swapping each pixel's red and blue
3110         values. This can be done faster with shaders, but for now this is a working solution
3111         for platforms without BGRA support.
3112
3113         No new tests. Existing layout tests cover this.
3114
3115         * platform/graphics/opengl/TextureMapperGL.cpp:
3116         (WebCore::BitmapTextureGL::endPaint):
3117         * platform/graphics/opengl/TextureMapperGL.h:
3118         * platform/graphics/qt/TextureMapperQt.cpp:
3119         (WebCore::RGBA32PremultimpliedBufferQt::swapRGB):
3120
3121 2011-09-26  Sergio Villar Senin  <svillar@igalia.com>
3122
3123         [GTK] Fix coding style bits in ResourceHandleSoup.cpp
3124         https://bugs.webkit.org/show_bug.cgi?id=68634
3125
3126         Reviewed by Martin Robinson.
3127
3128         No new tests needed.
3129
3130         * platform/network/soup/ResourceHandleSoup.cpp:
3131         (WebCore::ResourceHandle::defaultSession):
3132
3133 2011-09-26  James Robinson  <jamesr@chromium.org>
3134
3135         [mac] Timestamp parameter to requestAnimationFrame is busted in USE(REQUEST_ANIMATION_FRAME_TIMER) path
3136         https://bugs.webkit.org/show_bug.cgi?id=68769
3137
3138         Reviewed by Simon Fraser.
3139
3140         Convert the time parameter from double to DOMTimeStamp using convertSecondsToDOMTimeStamp rather than relying on
3141         implicit double->long conversion, which ignores the units of the value.
3142
3143         Test: fast/animation/request-animation-frame-timestamps-advance.html
3144
3145         * dom/ScriptedAnimationController.cpp:
3146         (WebCore::ScriptedAnimationController::animationTimerFired):
3147
3148 2011-09-25  Mark Hahnenberg  <mhahnenberg@apple.com>
3149
3150         Add custom vtable struct to ClassInfo struct
3151         https://bugs.webkit.org/show_bug.cgi?id=68567
3152
3153         Reviewed by Oliver Hunt.
3154
3155         No new tests.
3156
3157         Added CREATE_METHOD_TABLE macro to generate the custom vtable for the 
3158         specified class in its ClassInfo.  Also added to it the first function to use 
3159         this macro, visitChildren.  This is part of the process of getting rid of all 
3160         C++ virtual methods in JSCell.  Eventually all virtual functions in JSCell 
3161         that can't easily be converted to non-virtual functions will be put into 
3162         this custom vtable structure.
3163
3164         * bindings/js/JSAudioConstructor.cpp:
3165         * bindings/js/JSDOMGlobalObject.cpp:
3166         * bindings/js/JSDOMWindowBase.cpp:
3167         * bindings/js/JSDOMWindowShell.cpp:
3168         * bindings/js/JSImageConstructor.cpp:
3169         * bindings/js/JSImageDataCustom.cpp:
3170         (WebCore::toJS):
3171         * bindings/js/JSOptionConstructor.cpp:
3172         * bindings/js/JSWorkerContextBase.cpp:
3173
3174         Changed the bindings generator to add the call to the CREATE_METHOD_TABLE macro where
3175         necessary.
3176         * bindings/scripts/CodeGeneratorJS.pm:
3177         (GenerateImplementation):
3178         (GenerateConstructorDefinition):
3179         * bindings/scripts/test/JS/JSTestInterface.cpp:
3180         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3181         * bindings/scripts/test/JS/JSTestObj.cpp:
3182         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3183         * bridge/c/CRuntimeObject.cpp:
3184         * bridge/c/c_instance.cpp:
3185         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3186         * bridge/jni/jsc/JavaRuntimeObject.cpp:
3187         * bridge/objc/ObjCRuntimeObject.mm:
3188         * bridge/objc/objc_instance.mm:
3189         * bridge/objc/objc_runtime.mm:
3190         * bridge/qt/qt_instance.cpp:
3191         * bridge/qt/qt_pixmapruntime.cpp:
3192         * bridge/qt/qt_runtime.cpp:
3193         * bridge/runtime_array.cpp:
3194         * bridge/runtime_method.cpp:
3195         * bridge/runtime_object.cpp:
3196
3197 2011-09-25  Eunmi Lee  <eunmi15.lee@samsung.com>
3198
3199         [EFL] Move GtkWidgetBackingStoreCairo to the cairo directory and modify to use in the EFL.
3200         https://bugs.webkit.org/show_bug.cgi?id=63502
3201
3202         Reviewed by Martin Robinson.
3203
3204         The gtk/GtkWidgetBackingStoreCairo.cpp is moved to the cairo/WidgetBackingStoreCairo.cpp and
3205         some codes for EFL are added.
3206         WidgetBackingStoreCairo creates cairo_image_surface and has a role to copy reusable area
3207         when scrolling. So, it will be used in the WebKit2 EFL port's BackingStore.
3208
3209         * CMakeListsEfl.txt:
3210         * GNUmakefile.list.am:
3211         * platform/cairo/WidgetBackingStore.h:
3212         * platform/cairo/WidgetBackingStoreCairo.cpp: Renamed from Source/WebCore/platform/gtk/GtkWidgetBackingStoreCairo.cpp.
3213         (WebCore::createSurfaceForBackingStore):
3214         (WebCore::WidgetBackingStorePrivate::create):
3215         (WebCore::WidgetBackingStorePrivate::WidgetBackingStorePrivate):
3216         (WebCore::WidgetBackingStore::create):
3217         (WebCore::WidgetBackingStore::WidgetBackingStore):
3218         (WebCore::WidgetBackingStore::~WidgetBackingStore):
3219         (WebCore::WidgetBackingStore::cairoSurface):
3220         (WebCore::WidgetBackingStore::scroll):
3221         * platform/gtk/GtkWidgetBackingStoreX11.cpp:
3222
3223 2011-09-25  Adam Barth  <abarth@webkit.org>
3224
3225         Finish removing PLATFORM(BREWMP) by removing associated code
3226         https://bugs.webkit.org/show_bug.cgi?id=68779
3227
3228         Reviewed by Sam Weinig.
3229
3230         When Geoffrey Garen removed PLATFORM(BREWMP) in
3231         http://trac.webkit.org/changeset/95555, he did not remove all the
3232         associated code.  This completes the work started in r95555 by removing
3233         all the code assoicated with PLATFORM(BREWMP).
3234
3235         * WebCore.gyp/WebCore.gyp:
3236         * WebCore.gypi:
3237         * bindings/js/ScriptControllerBrew.cpp: Removed.
3238         * editing/brew: Removed.
3239         * editing/brew/EditorBrew.cpp: Removed.
3240         * gyp/WebCore.gyp:
3241         * page/brew: Removed.
3242         * page/brew/ChromeClientBrew.h: Removed.
3243         * page/brew/DragControllerBrew.cpp: Removed.
3244         * page/brew/EventHandlerBrew.cpp: Removed.
3245         * page/brew/FrameBrew.cpp: Removed.
3246         * platform/brew: Removed.
3247         * platform/brew/ClipboardBrew.cpp: Removed.
3248         * platform/brew/ClipboardBrew.h: Removed.
3249         * platform/brew/ContextMenuBrew.cpp: Removed.
3250         * platform/brew/ContextMenuItemBrew.cpp: Removed.
3251         * platform/brew/CursorBrew.cpp: Removed.
3252         * platform/brew/DragDataBrew.cpp: Removed.
3253         * platform/brew/EventLoopBrew.cpp: Removed.
3254         * platform/brew/FileSystemBrew.cpp: Removed.
3255         * platform/brew/KURLBrew.cpp: Removed.
3256         * platform/brew/LanguageBrew.cpp: Removed.
3257         * platform/brew/LocalizedStringsBrew.cpp: Removed.
3258         * platform/brew/LoggingBrew.cpp: Removed.
3259         * platform/brew/MIMETypeRegistryBrew.cpp: Removed.
3260         * platform/brew/PasteboardBrew.cpp: Removed.
3261         * platform/brew/PlatformKeyboardEventBrew.cpp: Removed.
3262         * platform/brew/PlatformMouseEventBrew.cpp: Removed.
3263         * platform/brew/PlatformTouchEventBrew.cpp: Removed.
3264         * platform/brew/PlatformTouchPointBrew.cpp: Removed.
3265         * platform/brew/PopupMenuBrew.cpp: Removed.
3266         * platform/brew/PopupMenuBrew.h: Removed.
3267         * platform/brew/SSLKeyGeneratorBrew.cpp: Removed.
3268         * platform/brew/ScreenBrew.cpp: Removed.
3269         * platform/brew/ScrollbarThemeBrew.cpp: Removed.
3270         * platform/brew/ScrollbarThemeBrew.h: Removed.
3271         * platform/brew/SearchPopupMenuBrew.cpp: Removed.
3272         * platform/brew/SearchPopupMenuBrew.h: Removed.
3273         * platform/brew/SharedBufferBrew.cpp: Removed.
3274         * platform/brew/SharedTimerBrew.cpp: Removed.
3275         * platform/brew/SoundBrew.cpp: Removed.
3276         * platform/brew/SystemTimeBrew.cpp: Removed.
3277         * platform/brew/TemporaryLinkStubs.cpp: Removed.
3278         * platform/brew/WidgetBrew.cpp: Removed.
3279         * platform/graphics/brew: Removed.
3280         * platform/graphics/brew/IconBrew.cpp: Removed.
3281         * platform/graphics/brew/ImageBrew.cpp: Removed.
3282         * platform/graphics/brew/IntPointBrew.cpp: Removed.
3283         * platform/graphics/brew/IntSizeBrew.cpp: Removed.
3284         * platform/network/brew: Removed.
3285         * platform/network/brew/DNSBrew.cpp: Removed.
3286         * platform/network/brew/SocketStreamError.h: Removed.
3287         * platform/network/brew/SocketStreamHandle.h: Removed.
3288         * platform/network/brew/SocketStreamHandleBrew.cpp: Removed.
3289         * platform/network/brew/SocketStreamHandlePrivate.h: Removed.
3290         * platform/text/brew: Removed.
3291         * platform/text/brew/TextBoundariesBrew.cpp: Removed.
3292         * platform/text/brew/TextBreakIteratorBrew.cpp: Removed.
3293         * platform/text/brew/TextCodecBrew.cpp: Removed.
3294         * platform/text/brew/TextCodecBrew.h: Removed.
3295
3296 2011-09-25  Kentaro Hara  <haraken@chromium.org>
3297
3298         Implement a CloseEvent constructor for JSC
3299         https://bugs.webkit.org/show_bug.cgi?id=68340
3300
3301         Reviewed by Oliver Hunt.
3302
3303         The spec of the CloseEvent constructor is here:
3304         http://dev.w3.org/html5/websockets/#closeevent
3305
3306         Test: fast/events/constructors/close-event-constructor.html
3307
3308         * bindings/generic/EventConstructors.h: Added a definition for the CloseEvent constructor.
3309         * bindings/js/JSEventConstructors.cpp: Added #includes for CloseEvent.
3310         * websockets/CloseEvent.h: Added a definition for CloseEventInit.
3311         (WebCore::CloseEventInit::CloseEventInit):
3312         (WebCore::CloseEvent::create):
3313         (WebCore::CloseEvent::CloseEvent):
3314         * websockets/CloseEvent.idl: Makes CloseEvent constructible.
3315
3316 2011-09-25  Mark Rowe  <mrowe@apple.com>
3317
3318         <rdar://problem/10177824> IconDatabase’s use of ThreadCondition leads to assertion failures in the face of spurious wakeups
3319
3320         It's possible for ThreadCondition::wait to return spuriously without the condition having been signaled.
3321         When that happens we should immediately return to waiting rather than doing our normal work, as some of that
3322         work relies on wakeSyncThread having been called to signal the condition.
3323
3324         Reviewed by Sam Weinig.
3325
3326         * loader/icon/IconDatabase.cpp:
3327         (WebCore::IconDatabase::IconDatabase):
3328         (WebCore::IconDatabase::wakeSyncThread): Note that we have work for the sync thread to do.
3329         (WebCore::IconDatabase::syncThreadMainLoop): If we were woken with no work to do, immediately
3330         go back to waiting on the condition variable. Otherwise, reset m_syncThreadHasWorkToDo and then
3331         do that work. We also switch to moving m_disabledSuddenTerminationForSyncThread immediately in to
3332         our local shouldReenableSuddenTermination variable since it can be updated by other threads while
3333         we don't hold the lock. This makes it inappropriate to make assumptions about its value after dropping
3334         and reacquiring the lock.
3335         * loader/icon/IconDatabase.h:
3336
3337 2011-09-25  Dan Bernstein  <mitz@apple.com>
3338
3339         <rdar://problem/10156263> ASSERT in WebCore::FrameView::scheduleRelayoutOfSubtree
3340
3341         Reviewed by Sam Weinig.
3342
3343         Test: fast/dynamic/subtree-unrooted.html
3344
3345         * rendering/RenderObject.cpp:
3346         (WebCore::RenderObject::scheduleRelayout): Replaced the check that the renderer is parented,
3347         which was added in r21162, with a check that it is “rooted”.
3348
3349 2011-09-24  Abhishek Arya  <inferno@chromium.org>
3350
3351         Issues with merging block children of a ruby
3352         base with another ruby base having inline children. 
3353         https://bugs.webkit.org/show_bug.cgi?id=66124
3354
3355         Reviewed by Dan Bernstein.
3356
3357         Test: fast/ruby/ruby-base-merge-block-children-crash.html
3358
3359         * rendering/RenderRubyBase.cpp:
3360         (WebCore::RenderRubyBase::moveInlineChildren): add a firstChild()
3361         check to prevent empty anonymous block addition, just like
3362         moveBlockChildren method.
3363         * rendering/RenderRubyBase.cpp:
3364         (WebCore::RenderRubyBase::moveBlockChildren): This was incorrectly
3365         doing optimizations to see if current ruby base has only inline
3366         children before beforeChild and then trying to take out them from 
3367         their parent anonymous blocks. The problem is those inlines could
3368         be split and have continuations because of encountering a block
3369         inside inline flow. In those cases, we cannot take the inline out.
3370         So, we should just make children non-inline in the destination
3371         block and transfer the children as it-is.
3372         * rendering/RenderRubyBase.h: remove unncessary functions.
3373
3374 2011-09-25  Adam Barth  <abarth@webkit.org>
3375
3376         Remove PLATFORM(HAIKU) and associated code
3377         https://bugs.webkit.org/show_bug.cgi?id=68774
3378
3379         Reviewed by Sam Weinig.
3380
3381         As discussed on webkit-dev, the Haiku port has been inactive for over a
3382         year.  A year and a half ago, we discussed removing the port, but folks
3383         said they planned to work on it more.  That work does not appear to
3384         have happened in the intervening time.
3385
3386         * WebCore.gyp/WebCore.gyp:
3387         * WebCore.gypi:
3388         * bindings/js/ScriptControllerHaiku.cpp: Removed.
3389         * editing/haiku: Removed.
3390         * editing/haiku/EditorHaiku.cpp: Removed.
3391         * gyp/WebCore.gyp:
3392         * loader/cache/CachedFont.cpp:
3393         * page/EventHandler.cpp:
3394         (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
3395         * page/haiku: Removed.
3396         * page/haiku/DragControllerHaiku.cpp: Removed.
3397         * page/haiku/EventHandlerHaiku.cpp: Removed.
3398         * page/haiku/FrameHaiku.cpp: Removed.
3399         * platform/ContextMenuItem.h:
3400         * platform/Cursor.h:
3401         * platform/DragData.h:
3402         * platform/DragImage.h:
3403         * platform/PlatformKeyboardEvent.h:
3404         * platform/PlatformMenuDescription.h:
3405         * platform/PlatformMouseEvent.h:
3406         * platform/Widget.h:
3407         * platform/graphics/BitmapImage.h:
3408         * platform/graphics/Color.h:
3409         * platform/graphics/FloatPoint.h:
3410         * platform/graphics/FloatRect.h:
3411         * platform/graphics/Gradient.h:
3412         * platform/graphics/GraphicsContext.cpp:
3413         * platform/graphics/GraphicsContext.h:
3414         * platform/graphics/ImageBufferData.h:
3415         * platform/graphics/ImageSource.h:
3416         * platform/graphics/IntPoint.h:
3417         * platform/graphics/IntRect.h:
3418         * platform/graphics/IntSize.h:
3419         * platform/graphics/Path.h:
3420         * platform/graphics/Pattern.h:
3421         * platform/graphics/SimpleFontData.h:
3422         * platform/graphics/haiku: Removed.
3423         * platform/graphics/haiku/ColorHaiku.cpp: Removed.
3424         * platform/graphics/haiku/FloatPointHaiku.cpp: Removed.
3425         * platform/graphics/haiku/FloatRectHaiku.cpp: Removed.
3426         * platform/graphics/haiku/FontCacheHaiku.cpp: Removed.
3427         * platform/graphics/haiku/FontCustomPlatformData.cpp: Removed.
3428         * platform/graphics/haiku/FontCustomPlatformData.h: Removed.
3429         * platform/graphics/haiku/FontHaiku.cpp: Removed.
3430         * platform/graphics/haiku/FontPlatformData.h: Removed.
3431         * platform/graphics/haiku/GlyphPageTreeNodeHaiku.cpp: Removed.
3432         * platform/graphics/haiku/GradientHaiku.cpp: Removed.
3433         * platform/graphics/haiku/GraphicsContextHaiku.cpp: Removed.
3434         * platform/graphics/haiku/IconHaiku.cpp: Removed.
3435         * platform/graphics/haiku/ImageBufferDataHaiku.h: Removed.
3436         * platform/graphics/haiku/ImageBufferHaiku.cpp: Removed.
3437         * platform/graphics/haiku/ImageHaiku.cpp: Removed.
3438         * platform/graphics/haiku/IntPointHaiku.cpp: Removed.
3439         * platform/graphics/haiku/IntRectHaiku.cpp: Removed.
3440         * platform/graphics/haiku/IntSizeHaiku.cpp: Removed.
3441         * platform/graphics/haiku/PathHaiku.cpp: Removed.
3442         * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Removed.
3443         * platform/graphics/haiku/StillImageHaiku.cpp: Removed.
3444         * platform/graphics/haiku/StillImageHaiku.h: Removed.