2010-07-30 Rafael Antognolli <antognolli@profusion.mobi>
[WebKit-https.git] / WebCore / ChangeLog
1 2010-07-30  Rafael Antognolli  <antognolli@profusion.mobi>
2
3         Reviewed by Antonio Gomes.
4
5         [EFL] Add library version and soname to EFL generated libraries and binary.
6         https://bugs.webkit.org/show_bug.cgi?id=43212
7
8         Add version and soname to libwebcore.so in case of linking as shared
9         library.
10
11         No new feature, so no new tests.
12
13         * CMakeLists.txt:
14
15 2010-07-30  Steve Block  <steveblock@google.com>
16
17         Reviewed by Steve Block.
18
19         Add LayoutTestController methods to test DeviceOrientation
20         https://bugs.webkit.org/show_bug.cgi?id=39589
21
22         This patch does not hook up the new LayoutTestController method to WebKit
23         for any platform. This will be done in later patches.
24         https://bugs.webkit.org/show_bug.cgi?id=43181 tracks this for Mac.
25
26         Test: fast/dom/DeviceOrientation/basic-operation.html
27
28         * Android.mk:
29         * CMakeLists.txt:
30         * GNUmakefile.am:
31         * WebCore.exp.in:
32         * WebCore.gypi:
33         * WebCore.pro:
34         * WebCore.vcproj/WebCore.vcproj:
35         * WebCore.xcodeproj/project.pbxproj:
36         * dom/DeviceOrientationClient.h:
37         (WebCore::DeviceOrientationClient::~DeviceOrientationClient):
38         * dom/DeviceOrientationController.cpp:
39         (WebCore::DeviceOrientationController::DeviceOrientationController):
40         * dom/DeviceOrientationEvent.cpp:
41         * platform/mock/DeviceOrientationClientMock.cpp: Added.
42         (WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
43         (WebCore::DeviceOrientationClientMock::setController):
44         (WebCore::DeviceOrientationClientMock::startUpdating):
45         (WebCore::DeviceOrientationClientMock::stopUpdating):
46         (WebCore::DeviceOrientationClientMock::setOrientation):
47         (WebCore::DeviceOrientationClientMock::timerFired):
48         * platform/mock/DeviceOrientationClientMock.h: Added.
49         (WebCore::DeviceOrientationClientMock::lastOrientation):
50
51 2010-07-30  Satish Sampath  <satish@chromium.org>
52
53         Reviewed by Jeremy Orlow.
54
55         Add a mock in WebCore for testing speech input
56         https://bugs.webkit.org/show_bug.cgi?id=42603
57
58         Layout tests will be added in a subsequent patch using this mock.
59
60         * Android.mk:
61         * GNUmakefile.am:
62         * WebCore.gypi:
63         * WebCore.pro:
64         * WebCore.vcproj/WebCore.vcproj:
65         * WebCore.xcodeproj/project.pbxproj:
66         * platform/mock/SpeechInputClientMock.cpp: Added.
67         (WebCore::SpeechInputClientMock::SpeechInputClientMock):
68         (WebCore::SpeechInputClientMock::startRecognition):
69         (WebCore::SpeechInputClientMock::stopRecording):
70         (WebCore::SpeechInputClientMock::cancelRecognition):
71         (WebCore::SpeechInputClientMock::setRecognitionResult):
72         (WebCore::SpeechInputClientMock::timerFired):
73         * platform/mock/SpeechInputClientMock.h: Added.
74
75 2010-07-30  Nikolas Zimmermann  <nzimmermann@rim.com>
76
77         Reviewed by Dirk Schulze.
78
79         Optimize SVGResources memory usage
80         https://bugs.webkit.org/show_bug.cgi?id=43236
81
82         Instead of storing pointers to all possible resources that could be applied to an element, group them in three categories:
83         clipper/filter/masker, marker-start/marker-mid/marker-end, and fill/stroke.
84
85         Only build the cached resources data for elements where the properties can be applied to. Maintain a static list of tagnames
86         for each of the three categories, to avoid doing unncessary work.
87
88         Doesn't affect any tests.
89
90         * rendering/SVGResources.cpp:
91         (WebCore::SVGResources::SVGResources):
92         (WebCore::clipperFilterMaskerTags):
93         (WebCore::markerTags):
94         (WebCore::fillAndStrokeTags):
95         (WebCore::SVGResources::buildCachedResources):
96         (WebCore::SVGResources::invalidateClient):
97         (WebCore::SVGResources::resourceDestroyed):
98         (WebCore::SVGResources::buildSetOfResources):
99         (WebCore::SVGResources::setClipper):
100         (WebCore::SVGResources::resetClipper):
101         (WebCore::SVGResources::setFilter):
102         (WebCore::SVGResources::resetFilter):
103         (WebCore::SVGResources::setMarkerStart):
104         (WebCore::SVGResources::resetMarkerStart):
105         (WebCore::SVGResources::setMarkerMid):
106         (WebCore::SVGResources::resetMarkerMid):
107         (WebCore::SVGResources::setMarkerEnd):
108         (WebCore::SVGResources::resetMarkerEnd):
109         (WebCore::SVGResources::setMasker):
110         (WebCore::SVGResources::resetMasker):
111         (WebCore::SVGResources::setFill):
112         (WebCore::SVGResources::resetFill):
113         (WebCore::SVGResources::setStroke):
114         (WebCore::SVGResources::resetStroke):
115         (WebCore::SVGResources::dump):
116         * rendering/SVGResources.h:
117         (WebCore::SVGResources::clipper):
118         (WebCore::SVGResources::filter):
119         (WebCore::SVGResources::markerStart):
120         (WebCore::SVGResources::markerMid):
121         (WebCore::SVGResources::markerEnd):
122         (WebCore::SVGResources::masker):
123         (WebCore::SVGResources::fill):
124         (WebCore::SVGResources::stroke):
125         (WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData):
126         (WebCore::SVGResources::ClipperFilterMaskerData::create):
127         (WebCore::SVGResources::MarkerData::MarkerData):
128         (WebCore::SVGResources::MarkerData::create):
129         (WebCore::SVGResources::FillStrokeData::FillStrokeData):
130         (WebCore::SVGResources::FillStrokeData::create):
131
132 2010-07-26  Andrei Popescu  <andreip@google.com>
133
134         Reviewed by Jeremy Orlow.
135
136         [IndexedDB] IndexedDatabase should be called IDBFactory.
137         https://bugs.webkit.org/show_bug.cgi?id=42967
138
139         Rename IndexedDatabase to IDBFactory to match the specification.
140
141         Also implement the following new naming convention:
142         IDBFoo IDL interfaces are implemented using IDBFoo C++ classes.
143         IDBFoo objects have pointers to IDBFooBackendInterface objects.
144         IDBFooBackendInterface is implemented by IDBFooBackendImpl and
145         IDBFooBackendProxy (for Chromium).
146
147         No new tests needed, just renaming.
148
149         * Android.derived.jscbindings.mk:
150         * Android.derived.v8bindings.mk:
151         * Android.mk:
152         * CMakeLists.txt:
153         * DerivedSources.cpp:
154         * DerivedSources.make:
155         * GNUmakefile.am:
156         * WebCore.gyp/WebCore.gyp:
157         * WebCore.gypi:
158         * WebCore.pri:
159         * WebCore.pro:
160         * WebCore.xcodeproj/project.pbxproj:
161         * bindings/js/JSIDBAnyCustom.cpp:
162         (WebCore::toJS):
163         * bindings/v8/custom/V8IDBAnyCustom.cpp:
164         (WebCore::toV8):
165         * page/DOMWindow.cpp:
166         (WebCore::DOMWindow::clear):
167         (WebCore::DOMWindow::indexedDB):
168         * page/DOMWindow.h:
169         * page/DOMWindow.idl:
170         * page/PageGroup.cpp:
171         (WebCore::PageGroup::idbFactory):
172         * page/PageGroup.h:
173         * platform/chromium/ChromiumBridge.h:
174         * storage/IDBAny.cpp:
175         (WebCore::IDBAny::idbFactory):
176         (WebCore::IDBAny::set):
177         * storage/IDBAny.h:
178         (WebCore::IDBAny::):
179         * storage/IDBDatabaseRequest.cpp:
180         * storage/IDBFactory.cpp: Added.
181         (WebCore::IDBFactory::IDBFactory):
182         (WebCore::IDBFactory::~IDBFactory):
183         (WebCore::IDBFactory::open):
184         * storage/IDBFactory.h: Added.
185         (WebCore::IDBFactory::create):
186         * storage/IDBFactory.idl: Added.
187         * storage/IDBFactoryBackendInterface.cpp: Added.
188         (WebCore::IDBFactoryBackendInterface::create):
189         * storage/IDBFactoryBackendInterface.h: Added.
190         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
191         * storage/IDBFactoryBackendImpl.cpp: Added.
192         (WebCore::IDBFactoryBackendImpl::create):
193         (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
194         (WebCore::IDBFactoryBackendImpl::~IDBFactoryBackendImpl):
195         (WebCore::IDBFactoryBackendImpl::open):
196         * storage/IDBFactoryBackendImpl.h: Added.
197         * storage/IDBKeyRange.cpp:
198         (WebCore::IDBKeyRange::only):
199         (WebCore::IDBKeyRange::leftBound):
200         (WebCore::IDBKeyRange::rightBound):
201         (WebCore::IDBKeyRange::bound):
202         * storage/IDBKeyRange.h:
203         * storage/IDBKeyRange.idl:
204         * storage/IndexedDatabase.cpp: Removed.
205         * storage/IndexedDatabase.h: Removed.
206         * storage/IndexedDatabaseImpl.cpp: Removed.
207         * storage/IndexedDatabaseImpl.h: Removed.
208         * storage/IndexedDatabaseRequest.cpp: Removed.
209         * storage/IndexedDatabaseRequest.h: Removed.
210         * storage/IndexedDatabaseRequest.idl: Removed.
211         * storage/chromium/IDBFactoryBackendInterface.cpp: Added.
212         (WebCore::IDBFactoryBackendInterface::create):
213         * storage/chromium/IndexedDatabase.cpp: Removed.
214
215 2010-07-29  Alexander Pavlov  <apavlov@chromium.org>
216
217         Reviewed by Pavel Feldman.
218
219         Web Inspector: Crash on refresh with a comment selected in the Elements panel
220         https://bugs.webkit.org/show_bug.cgi?id=43183
221
222         * inspector/InspectorDOMAgent.cpp:
223         (WebCore::InspectorDOMAgent::nodeForPath):
224         * inspector/front-end/ElementsPanel.js:
225         (WebInspector.ElementsPanel.prototype.reset):
226
227 2010-07-30  Renata Hodovan  <reni@inf.u-szeged.hu>
228
229         Reviewed by Nikolas Zimmermann.
230
231         feTurbulence is not implemented.
232         https://bugs.webkit.org/show_bug.cgi?id=5864
233
234         This code is based on the previous implementation of
235         Dirk Schulze, extended with some modification and optimization.
236
237         LayoutTests: Updating expected values for turbulence filter.
238         svg/W3C-SVG-1.1/filters-turb-01-f.svg
239
240         * svg/SVGFETurbulenceElement.cpp:
241         (WebCore::SVGFETurbulenceElement::build):
242         * svg/graphics/filters/SVGFETurbulence.cpp:
243         (WebCore::FETurbulence::FETurbulence):
244         (WebCore::FETurbulence::create):
245         (WebCore::FETurbulence::PaintingData::PaintingData):
246         (WebCore::FETurbulence::PaintingData::random):
247         (WebCore::smoothCurve):
248         (WebCore::linearInterpolation):
249         (WebCore::FETurbulence::initPaint):
250         (WebCore::checkNoise):
251         (WebCore::FETurbulence::noise2D):
252         (WebCore::Noise::if):
253         (WebCore::FETurbulence::calculateTurbulenceValueForPoint):
254         (WebCore::FETurbulence::apply):
255         * svg/graphics/filters/SVGFETurbulence.h:
256         (WebCore::):
257
258 2010-07-29  Martin Robinson  <mrobinson@igalia.com>
259
260         Reviewed by Dirk Schulze.
261
262         Cairo: Need to implement GraphicsContext::clipConvexPolygon()
263         https://bugs.webkit.org/show_bug.cgi?id=41308
264
265         Implement clipConvexPolygon for Cairo ports and enable new path based
266         borders for that port as well.
267
268         * platform/graphics/cairo/GraphicsContextCairo.cpp:
269         (WebCore::addConvexPolygonToContext): Add this helper method.
270         (WebCore::GraphicsContext::drawConvexPolygon): Use the new addConvexPolygonToContext helper.
271         (WebCore::GraphicsContext::clipConvexPolygon): Implement this method.
272         * rendering/RenderObject.h: Enable path based borders for Cairo.
273
274 2010-07-29  Ryosuke Niwa  <rniwa@webkit.org>
275
276         Reviewed by Darin Adler.
277
278         InsertOrderedList does not switch the list type properly when it has an inner list.
279         https://bugs.webkit.org/show_bug.cgi?id=43166
280
281         The bug was caused by forcedCreateList was not set to true when the start and the end
282         of the selection lies in the same list. Added selectionHasListOfType to fix this problem.
283
284         WebKit used not to convert the outer lists even when the list is fully selected.
285         Corrected this behavior by converting the entire list at once when the list is fully selected.
286         To decide whether or not a list is fully selected, added currentSelection argument to doApplyForSingleParagraph.
287
288         Tests: editing/execCommand/switch-list-type-with-inner-list.html
289                editing/execCommand/switch-list-type-with-orphaned-li.html
290
291         * editing/InsertListCommand.cpp:
292         (WebCore::InsertListCommand::mergeWithNeighboringLists): Extracted the code to merge lists.
293         (WebCore::InsertListCommand::selectionHasListOfType): attachment.cgi
294         (WebCore::InsertListCommand::doApply): Calls selectionHasListOfType.
295         (WebCore::InsertListCommand::doApplyForSingleParagraph): See above.
296         (WebCore::InsertListCommand::listifyParagraph): Calls mergeWithNeighboringLists.
297         * editing/InsertListCommand.h:
298         * editing/htmlediting.cpp:
299         (WebCore::canMergeLists): Ensures lists being merged are instances of HTMLElement.
300         (WebCore::isNodeVisiblyContainedWithin): Works properly when one end is inside the range.
301
302 2010-07-29  Martin Robinson  <mrobinson@igalia.com>
303
304         Reviewed by Dirk Schulze.
305
306         [Cairo] Bring behavior of paths on the Cairo GraphicsContext into line with the CoreGraphics port
307         https://bugs.webkit.org/show_bug.cgi?id=41732
308
309         Do not apply paths added to the Cairo GraphicsContext, until they are used.
310         This prevents drawing routines such as fillRect from interacting with any
311         path which callers are constructing on the GraphicsContext.
312
313          This behavior is necessary to close bug https://bugs.webkit.org/show_bug.cgi?id=41308
314          so tests for that issue will test this fix.
315
316         * platform/graphics/cairo/GraphicsContextCairo.cpp:
317         (WebCore::appendPathToCairoContext): Added. A helper method which adds a path
318         to a native Cairo context.
319         (WebCore::setPathOnCairoContext): Added. Like appendPathToCairoContext, but clears the
320         existing path first.
321         (WebCore::appendWebCorePathToCairoContext): Added. Like appendPathToCairoContext, but
322         operates on a WebCore path.
323         (WebCore::fillCurrentCairoPath): Added. Helper which fills the current cairo context path.
324         (WebCore::strokeCurrentCairoPath): Added. Helper which strokes the current cairo context path.
325         (WebCore::GraphicsContext::drawEllipse): Only clear the Cairo path if cairo_stroke
326         was not called, because cairo_stroke implicitly clears the path.
327         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
328         (WebCore::GraphicsContext::fillPath): Copy the path from m_pendingPath to the context
329         and clear m_pendingPath, instead of relying on the pre-existing context path. Do the
330         actual fill via the new helper.
331         (WebCore::GraphicsContext::strokePath): Ditto.
332         (WebCore::GraphicsContext::drawPath): Ditto.
333         (WebCore::GraphicsContext::fillRect): Use the new fillCurrentCairoPath helper.
334         (WebCore::GraphicsContext::drawFocusRing): Use the new appendWebCorePathToCairoContext helper instead
335         of addPath (which will blow away any path callers are building).
336         (WebCore::GraphicsContext::addInnerRoundedRectClip): Use the new appendWebCorePathToCairoContext helper instead
337         of addPath (which will blow away any path callers are building).
338         (WebCore::GraphicsContext::strokeRect): Use the new strokeCurrentCairoPath helper.
339         (WebCore::GraphicsContext::beginPath): Clear out m_pendingPath here instead of the main native context.
340         (WebCore::GraphicsContext::addPath): Add the path to m_pendingPath instead of the main native context.
341         Also ensure that the transformation matrix of the m_pendingPath is equal to that of the main
342         cairo context.
343         (WebCore::GraphicsContext::clipOut): Use the appendWebCorePathToCairoContext helper here.
344         (WebCore::GraphicsContext::fillRoundedRect): Ditto and remove an unnecessary beginPath call.
345         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Add a new m_pendingPath member.
346
347 2010-07-29  Sheriff Bot  <webkit.review.bot@gmail.com>
348
349         Unreviewed, rolling out r64313.
350         http://trac.webkit.org/changeset/64313
351         https://bugs.webkit.org/show_bug.cgi?id=43233
352
353         Some Chromium bots are not happy with it for some unknown
354         reason. (Requested by dumi on #webkit).
355
356         * bindings/js/JSCustomVoidCallback.cpp:
357         (WebCore::JSCustomVoidCallback::~JSCustomVoidCallback):
358         * bindings/scripts/CodeGeneratorJS.pm:
359         * bindings/scripts/test/JS/JSTestCallback.cpp:
360         (WebCore::JSTestCallback::~JSTestCallback):
361         * platform/sql/SQLiteDatabase.cpp:
362         (WebCore::SQLiteDatabase::SQLiteDatabase):
363         (WebCore::SQLiteDatabase::close):
364         (WebCore::SQLiteDatabase::lock):
365         (WebCore::SQLiteDatabase::unlock):
366         * platform/sql/SQLiteDatabase.h:
367         * platform/sql/SQLiteStatement.cpp:
368         (WebCore::SQLiteStatement::prepare):
369         (WebCore::SQLiteStatement::step):
370         * storage/AbstractDatabase.cpp:
371         * storage/AbstractDatabase.h:
372         * storage/DatabaseTracker.cpp:
373         * storage/DatabaseTracker.h:
374         * storage/SQLStatement.cpp:
375         (WebCore::SQLStatement::execute):
376         * storage/SQLStatementSync.cpp:
377         (WebCore::SQLStatementSync::execute):
378         * storage/SQLTransaction.cpp:
379         (WebCore::SQLTransaction::checkAndHandleClosedDatabase):
380         (WebCore::SQLTransaction::performNextStep):
381         (WebCore::SQLTransaction::performPendingCallback):
382         (WebCore::SQLTransaction::deliverTransactionCallback):
383         (WebCore::SQLTransaction::postflightAndCommit):
384         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
385         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
386         * storage/SQLTransaction.h:
387         * storage/chromium/DatabaseTrackerChromium.cpp:
388         * workers/WorkerThread.cpp:
389         (WebCore::WorkerThread::stop):
390
391 2010-07-29  Martin Robinson  <mrobinson@igalia.com>
392
393         Unreviewed, rolling out r64318.
394         http://trac.webkit.org/changeset/64318
395         https://bugs.webkit.org/show_bug.cgi?id=41732
396
397         This change broke many tests.
398
399         * platform/graphics/cairo/GraphicsContextCairo.cpp:
400         (WebCore::GraphicsContext::drawEllipse):
401         (WebCore::GraphicsContext::drawConvexPolygon):
402         (WebCore::GraphicsContext::fillPath):
403         (WebCore::GraphicsContext::strokePath):
404         (WebCore::GraphicsContext::drawPath):
405         (WebCore::GraphicsContext::drawFocusRing):
406         (WebCore::GraphicsContext::addInnerRoundedRectClip):
407         (WebCore::GraphicsContext::beginPath):
408         (WebCore::GraphicsContext::addPath):
409         (WebCore::GraphicsContext::clipOut):
410         (WebCore::GraphicsContext::fillRoundedRect):
411         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
412
413 2010-07-29  Martin Robinson  <mrobinson@igalia.com>
414
415         Reviewed by Dirk Schulze.
416
417         [Cairo] Bring behavior of paths on the Cairo GraphicsContext into line with the CoreGraphics port
418         https://bugs.webkit.org/show_bug.cgi?id=41732
419
420         Do not apply paths added to the Cairo GraphicsContext, until they are used.
421         This prevents drawing routines such as fillRect from interacting with any
422         path which callers are constructing on the GraphicsContext.
423
424          This behavior is necessary to close bug https://bugs.webkit.org/show_bug.cgi?id=41308
425          so tests for that issue will test this fix.
426
427         * platform/graphics/cairo/GraphicsContextCairo.cpp:
428         (WebCore::appendPathToCairoContext): Added. A helper method which adds a path
429         to a native Cairo context.
430         (WebCore::setPathOnCairoContext): Added. Like appendPathToCairoContext, but clears the
431         existing path first.
432         (WebCore::appendWebCorePathToCairoContext): Added. Like appendPathToCairoContext, but
433         operates on a WebCore path.
434         (WebCore::GraphicsContext::drawEllipse): Only clear the Cairo path if cairo_stroke
435         was not called, because cairo_stroke implicitly clears the path.
436         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
437         (WebCore::GraphicsContext::fillPath): Copy the path from m_pendingPath to the context
438         and clear m_pendingPath, instead of relying on the pre-existing context path.
439         (WebCore::GraphicsContext::strokePath): Ditto.
440         (WebCore::GraphicsContext::drawPath): Ditto.
441         (WebCore::GraphicsContext::drawFocusRing): Use the new appendWebCorePathToCairoContext helper instead
442         of addPath (which will blow away any path callers are building).
443         (WebCore::GraphicsContext::addInnerRoundedRectClip): Use the new appendWebCorePathToCairoContext helper instead
444         of addPath (which will blow away any path callers are building).
445         (WebCore::GraphicsContext::beginPath): Clear out m_pendingPath here instead of the main native context.
446         (WebCore::GraphicsContext::addPath): Add the path to m_pendingPath instead of the main native context.
447         Also ensure that the transformation matrix of the m_pendingPath is equal to that of the main
448         cairo context.
449         (WebCore::GraphicsContext::clipOut): Use the appendWebCorePathToCairoContext helper here.
450         (WebCore::GraphicsContext::fillRoundedRect): Ditto and remove an unnecessary beginPath call.
451         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Add a new m_pendingPath member.
452
453 2010-07-29  Martin Robinson  <mrobinson@igalia.com>
454
455         Reviewed by Dirk Schulze.
456
457         [Cairo] Remove setStrokeStyle workaround for InlineTextBoxes
458         https://bugs.webkit.org/show_bug.cgi?id=43136
459
460         Remove workaround added in https://bugs.webkit.org/show_bug.cgi?id=15659
461         to fix stroke style for InlineTextBox underlines.
462
463         No new tests as this should not change functionality.
464
465         * platform/graphics/cairo/GraphicsContextCairo.cpp:
466         (WebCore::GraphicsContext::drawLineForText): Remove old workaround.
467
468 2010-07-28  Dumitru Daniliuc  <dumi@chromium.org>
469
470         Reviewed by David Levin.
471
472         Interrupt all DB operations when the worker is terminating.
473         https://bugs.webkit.org/show_bug.cgi?id=42843
474
475         Tests: fast/workers/storage/interrupt-database-sync.html
476                fast/workers/storage/interrupt-database.html
477
478         * bindings/js/JSCustomVoidCallback.cpp:
479         (WebCore::JSCustomVoidCallback::~JSCustomVoidCallback): If the
480         destructor is called on the context thread, delete m_data directly
481         instead of posting a task to do that. We need to do that to make
482         sure that all JS objects are destroyed before
483         WorkerThreadShutdownFinishTask (in WorkerThread.cpp) calls
484         WorkerContext::clearScript().
485
486         * bindings/scripts/CodeGeneratorJS.pm: Same change as above, for
487         all auto-generated callbacks.
488
489         * bindings/scripts/test/JS/JSTestCallback.cpp:
490         (WebCore::JSTestCallback::~JSTestCallback): Updated the
491         expectations for run-bindings-tests.
492
493         * platform/sql/SQLiteDatabase.cpp: Added the ability to interrupt
494         all DB operations in progress, unless the database was closed or
495         is being closed. Unlike sqlite3_interrupt(),
496         SQLiteDatabase::interrupt() is sticky: once it's called, trying to
497         run any statement on that database will fail with a
498         SQLITE_INTERRUPT error code.
499         (WebCore::SQLiteDatabase::SQLiteDatabase):
500         (WebCore::SQLiteDatabase::close):
501         (WebCore::SQLiteDatabase::interrupt):
502         (WebCore::SQLiteDatabase::isInterrupted):
503
504         * platform/sql/SQLiteDatabase.h: Added a mutex that can used by
505         SQLiteStatement to check if the database was interrupted.
506         (WebCore::SQLiteDatabase::databaseMutex):
507
508         * platform/sql/SQLiteStatement.cpp: Changed prepare() and step()
509         to check if the database was interrupted, before trying to prepare
510         or run the statement. The other methods don't need to hold on to
511         the DB lock while running, because they're fast, so we don't need
512         to interrupt them.
513         (WebCore::SQLiteStatement::prepare):
514         (WebCore::SQLiteStatement::step):
515
516         * storage/AbstractDatabase.cpp: Made SQLiteDatabase::interrupt()
517         and isInterrupted() visible to WebSQLDatabases classes.
518         (WebCore::AbstractDatabase::interrupt):
519         (WebCore::AbstractDatabase::isInterrupted):
520         * storage/AbstractDatabase.h:
521
522         * storage/DatabaseTracker.cpp: Added a method to interrupt all
523         databases in a given context.
524         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
525         * storage/DatabaseTracker.h:
526
527         * storage/SQLStatement.cpp: Changed the exception/error reported
528         when a statement is interrupted.
529         (WebCore::SQLStatement::execute):
530         * storage/SQLStatementSync.cpp:
531         (WebCore::SQLStatementSync::execute):
532
533         * storage/SQLTransaction.cpp: Changed the code to release the
534         callback objects as soon as they're not needed.
535         (WebCore::SQLTransaction::checkAndHandleClosedOrInterruptedDatabase):
536         Changed this method to not schedule the next transaction step when
537         the database is interrupted.
538         (WebCore::SQLTransaction::performNextStep):
539         (WebCore::SQLTransaction::performPendingCallback):
540         (WebCore::SQLTransaction::deliverTransactionCallback):
541         (WebCore::SQLTransaction::postflightAndCommit):
542         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
543         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
544         * storage/SQLTransaction.h:
545
546         * storage/chromium/DatabaseTrackerChromium.cpp: Added a method to
547         interrupt all databases in a given context.
548         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
549
550         * workers/WorkerThread.cpp:
551         (WebCore::WorkerThread::stop): Added a call to
552         DatabaseTracker::interruptAllDatabasesForContext().
553
554 2010-07-29  Bernhard Bauer  <bauerb@chromium.org>
555
556         Reviewed by Darin Fisher.
557
558         Check if plugins are allowed before creating a Java applet.
559         https://bugs.webkit.org/show_bug.cgi?id=43196
560
561         * loader/SubframeLoader.cpp:
562         (WebCore::SubframeLoader::createJavaAppletWidget):
563
564 2010-07-29  James Robinson  <jamesr@chromium.org>
565
566         Reviewed by Simon Fraser.
567
568         Ask a canvas' rendering context if it is accelerated instead tying it directly to webgl
569         https://bugs.webkit.org/show_bug.cgi?id=43206
570
571         This unifies the logic for whether a canvas is accelerated or not into one place
572         and makes it easier to expand the logic in the future to, for example, cover some
573         2d canvases.
574
575         Just a refactoring, no change in behavior so no new tests.
576
577         * html/canvas/CanvasRenderingContext.h:
578         (WebCore::CanvasRenderingContext::isAccelerated):
579         * html/canvas/WebGLRenderingContext.h:
580         (WebCore::WebGLRenderingContext::isAccelerated):
581         * rendering/RenderHTMLCanvas.cpp:
582         (WebCore::RenderHTMLCanvas::requiresLayer):
583         * rendering/RenderLayerCompositor.cpp:
584         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
585
586 2010-07-29  Anders Carlsson  <andersca@apple.com>
587
588         Reviewed by Sam Weinig.
589
590         Implement NPN_Status
591         https://bugs.webkit.org/show_bug.cgi?id=43205
592
593         * WebCore.exp.in:
594         Export Chrome::setStatusText.
595
596 2010-07-29  Victor Wang  <victorw@chromium.org>
597
598         Unreviewed, rolling out r64270.
599         http://trac.webkit.org/changeset/64270
600         https://bugs.webkit.org/show_bug.cgi?id=39589
601
602         The patch breaks chromium webkit unittest
603
604         * WebCore.exp.in:
605         * WebCore.xcodeproj/project.pbxproj:
606         * dom/DeviceOrientationClient.h:
607         (WebCore::DeviceOrientationClient::~DeviceOrientationClient):
608         * dom/DeviceOrientationController.cpp:
609         (WebCore::DeviceOrientationController::DeviceOrientationController):
610         * dom/DeviceOrientationEvent.cpp:
611         * platform/mock/DeviceOrientationClientMock.cpp: Removed.
612         * platform/mock/DeviceOrientationClientMock.h: Removed.
613
614 2010-07-29  Simon Fraser  <simon.fraser@apple.com>
615
616         Reviewed by Darin Adler.
617
618         Resizer control does not paint in otherwise empty compositing layer
619         https://bugs.webkit.org/show_bug.cgi?id=42306
620         
621         Ensure that we create backing store for an empty element with resize: both,
622         in order to render the resizer control.
623
624         Test: compositing/overflow/resize-painting.html
625
626         * rendering/RenderLayerBacking.h:
627         * rendering/RenderLayerBacking.cpp:
628         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Check for hasOverflowControls()
629         earlier, before any child checks.
630         (WebCore::RenderLayerBacking::hasNonCompositingDescendants): Renamed from hasNonCompositingContent()
631         to clarify its purpose.
632
633 2010-07-29  Adam Roben  <aroben@apple.com>
634
635         Remove WKCACFLayer::Lanczos
636
637         This member is also unused.
638
639         Rubber-stamped in advance by John Sullivan.
640
641         * platform/graphics/win/WKCACFLayer.cpp:
642         (WebCore::toCACFFilterType):
643         (WebCore::fromCACFFilterType):
644         * platform/graphics/win/WKCACFLayer.h:
645         (WebCore::WKCACFLayer::):
646
647 2010-07-29  Adam Roben  <aroben@apple.com>
648
649         Remove some unused WKCACFLayer members
650
651         Fixes <http://webkit.org/b/43200> WKCACFLayer has some unused members
652
653         Reviewed by John Sullivan.
654
655         * platform/graphics/win/WKCACFLayer.h: Removed [set]ClearsContext,
656         [set]Filters, and [set]SortsSublayers.
657
658 2010-07-28  Justin Schuh  <jschuh@chromium.org>
659
660         Reviewed by Nate Chapin.
661
662         Clear PluginData's page pointer on Page destruction
663         https://bugs.webkit.org/show_bug.cgi?id=43147
664
665         Test: plugins/access-after-page-destroyed.html
666
667         * page/Page.cpp:
668         (WebCore::Page::~Page):
669
670 2010-07-29  Simon Fraser  <simon.fraser@apple.com>
671
672         Reviewed by Darin Adler.
673
674         SHOULD NEVER BE REACHED assertion when switching tabs with composited content
675         https://bugs.webkit.org/show_bug.cgi?id=43167
676
677         When the root layer becomes unattached (e.g. when switching tabs), don't return
678         'false' from paintingGoesToWindow() because that will cause a -setNeedsDispay, which
679         both allocates wasteful backing store, and causes an assertion when we try to
680         paint the layer.
681         
682         Test: manual-tests/compositing/assert-on-tab-switch.html: Added.
683         
684         * rendering/RenderLayerBacking.cpp:
685         (WebCore::RenderLayerBacking::paintingGoesToWindow):
686
687 2010-07-29  Simon Fraser  <simon.fraser@apple.com>
688
689         Reviewed by Pavel Feldman.
690
691         Crash when computing pseudo-style of a vanished scrollbar in inspector
692         https://bugs.webkit.org/show_bug.cgi?id=42561
693         
694         When a styled overflow:scroll scrollbar gets destroyed, we need to clear out the m_owner pointer,
695         otherwise the event handling code (which keeps the Scrollbar alive) later causes the scrollbar
696         to try to use m_owner to get pseudo style.
697
698         Test: scrollbars/overflow-custom-scrollbar-crash.html
699
700         * rendering/RenderLayer.cpp:
701         (WebCore::RenderLayer::destroyScrollbar): If this is a custom scrollbar, clear the owning renderer.
702         * rendering/RenderScrollbar.cpp:
703         (WebCore::RenderScrollbar::getScrollbarPseudoStyle): Bail if m_owner is 0.
704         * rendering/RenderScrollbar.h:
705         (WebCore::RenderScrollbar::clearOwningRenderer): New method.
706
707 2010-07-29  Nikolas Zimmermann  <nzimmermann@rim.com>
708
709         Not reviewed. Fix release builds, by removing unused variables, that only served for ASSERTs that are no longer needed.
710
711         * rendering/SVGRenderSupport.cpp:
712         (WebCore::SVGRenderSupport::prepareToRenderSVGContent):
713         (WebCore::SVGRenderSupport::pointInClippingArea):
714
715 2010-07-29  Nikolas Zimmermann  <nzimmermann@rim.com>
716
717         Not reviewed. Fix build warning about unreachable code, seen on the windows slave.
718
719         * rendering/RenderSVGContainer.cpp:
720         (WebCore::RenderSVGContainer::selfWillPaint):
721         * rendering/RenderSVGRoot.cpp:
722         (WebCore::RenderSVGRoot::selfWillPaint):
723
724 2010-07-29  Nikolas Zimmermann  <nzimmermann@rim.com>
725
726         Reviewed by Dirk Schulze.
727
728         WebKit shouldn't ignore resource cycles, but break them as Opera does
729         https://bugs.webkit.org/show_bug.cgi?id=43031
730
731         mask images are not updated when render objects' bounds change
732         https://bugs.webkit.org/show_bug.cgi?id=15124
733
734         SVG Gradients do not resize correctly
735         https://bugs.webkit.org/show_bug.cgi?id=41902
736
737         svg/dynamic-updates: SVGMarkerElement markerHeight/Width tests are broken
738         https://bugs.webkit.org/show_bug.cgi?id=42616
739
740         svg/dynamic-updates: SVGMaskElement tests are all broken
741         https://bugs.webkit.org/show_bug.cgi?id=42617
742
743         Don't ignore resources containing cyclic references, but break them, as discussed on SVG WG mailing lists - to be compatible with Opera which already does that.
744
745         We used to lookup RenderSVGResourceContainers objects, by extracting the URI reference from the SVGRenderStyle, then utilizing getElementById() to lookup the
746         node, and access its renderer. Opera ignores such references, if they point to resources that contain cyclic references. Ignoring them would mean we have
747         to mutate the render style to empty the resource strings. That obviously doesn't work, as it would break expectations (getComputedStyle, etc.).
748
749         Introduce a SVGResources class that stores pointers to all resources, that can be applied to a RenderObject (clipper/filter/markers/masker).
750         Add a SVGResourcesCache class, which is basically a HashMap<RenderObject*, SVGResources*>. Whenever a RenderObject receives style, we extract the URI references
751         from the SVGRenderStyle, look up the RenderSVGResourceContainer* objects, and store them in a SVGResources* class. Then we execute a cycle detection logic,
752         which detects cyclic references and breaks them. Breaking them means just nulling the pointer to the resource in the SVGResources object. Those SVGResources
753         objects are cached, and used throughout the render tree to access resources. This way it's guaranteed that all cyclic references are resolved until layout/paint
754         phase begins.
755
756         Add destroy/styleDidChange/updateFromElement methods to all SVG renderers, in order to keep track of resource/client changes in the SVGResourcesCache.
757         As side-effect the SVGResourcesCache now knows which RenderObject references which resource, and thus can handle client registration for a RenderSVGResourceContainer.
758         The RenderSVGResourceContainer now holds a HashSet of RenderObjects, that's always up2date, and not related to the fact wheter a resources has already been used
759         for painting. The old logic missed to register clients for a resource, when the resource was in an invalid state. Fixing that fixes the svg/dynamic-updates/SVGMaskElement* tests.
760
761         Rewrite all svg/custom/recursive-(filter|gradient|mask|pattern).svg tests to contain a reference image how it should be renderered. All 1:1 compatible with Opera now.
762
763         * rendering/RenderForeignObject.cpp:
764         (WebCore::RenderForeignObject::layout): Grab selfNeedsLayout() before calling RenderBlock::layout(), otherwhise it's always false.
765         * rendering/RenderPath.cpp: Don't look up resources manually, use SVGResourcesCache.
766         (WebCore::RenderPath::fillContains): Remove constness, to avoid the need to pass around const RenderObjects* to the SVGResourcesCache.
767         (WebCore::RenderPath::strokeContains): Ditto.
768         (WebCore::RenderPath::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
769         (WebCore::RenderPath::calculateMarkerBoundsIfNeeded): Remove special client handling for markers, it's all unified now.
770         (WebCore::RenderPath::styleWillChange): Only call setNeedsBoundariesUpdate when handling StyleDifferenceRepaint/Layout.
771         * rendering/RenderPath.h:
772         * rendering/RenderSVGBlock.cpp:
773         (WebCore::RenderSVGBlock::destroy): Forward to SVGResourcesCache::clientDestroyed.
774         (WebCore::RenderSVGBlock::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
775         (WebCore::RenderSVGBlock::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
776         * rendering/RenderSVGBlock.h:
777         * rendering/RenderSVGContainer.cpp:
778         (WebCore::RenderSVGContainer::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
779         (WebCore::RenderSVGContainer::selfWillPaint): Don't look up resources manually, use SVGResourcesCache.
780         * rendering/RenderSVGContainer.h:
781         * rendering/RenderSVGGradientStop.cpp:
782         (WebCore::RenderSVGGradientStop::styleDidChange): Rewrite, as invalidateResourceClients() is gone.
783         * rendering/RenderSVGHiddenContainer.h: Make layout() protected, as RenderSVGResourceContainer overrides it.
784         * rendering/RenderSVGImage.cpp:
785         (WebCore::RenderSVGImage::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
786         (WebCore::RenderSVGImage::destroy): Forward to SVGResourcesCache::clientDestroyed.
787         (WebCore::RenderSVGImage::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
788         (WebCore::RenderSVGImage::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
789         (WebCore::RenderSVGImage::imageChanged): Don't look up resources manually, use SVGResourcesCache.
790         * rendering/RenderSVGImage.h:
791         * rendering/RenderSVGInline.cpp:
792         (WebCore::RenderSVGInline::destroy): Forward to SVGResourcesCache::clientDestroyed.
793         (WebCore::RenderSVGInline::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
794         (WebCore::RenderSVGInline::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
795         * rendering/RenderSVGInline.h:
796         * rendering/RenderSVGModelObject.cpp:
797         (WebCore::RenderSVGModelObject::destroy): Forward to SVGResourcesCache::clientDestroyed.
798         (WebCore::RenderSVGModelObject::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
799         (WebCore::RenderSVGModelObject::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
800         * rendering/RenderSVGModelObject.h:
801         * rendering/RenderSVGResource.cpp:
802         (WebCore::RenderSVGResource::fillPaintingResource): Remove const from RenderObject parameter.
803         (WebCore::RenderSVGResource::strokePaintingResource): Ditto.
804         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): Early exit if we found the first parent resource.
805         * rendering/RenderSVGResource.h:
806         * rendering/RenderSVGResourceClipper.cpp:
807         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper): Early exit if m_clipper is empty.
808         (WebCore::RenderSVGResourceClipper::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
809         (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto.
810         (WebCore::RenderSVGResourceClipper::applyResource): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
811         (WebCore::RenderSVGResourceClipper::createClipData): Don't look up resources manually, use SVGResourcesCache.
812         (WebCore::RenderSVGResourceClipper::hitTestClipContent): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
813         * rendering/RenderSVGResourceClipper.h:
814         * rendering/RenderSVGResourceContainer.cpp:
815         (WebCore::svgExtensionsFromNode):
816         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): Stop registering resource from the constructor, delegate to styleDidChange.
817         (WebCore::RenderSVGResourceContainer::~RenderSVGResourceContainer): Only deregister resource if it was ever registered.
818         (WebCore::RenderSVGResourceContainer::layout): invalidateClients() here, to avoid the need for invalidateResourceClients() in the SVG DOM. Just call setNeedsLayout() from the SVG DOM.
819         (WebCore::RenderSVGResourceContainer::destroy): Forward to SVGResourcesCache::resourceDestroyed.
820         (WebCore::RenderSVGResourceContainer::styleDidChange): Register resource not in the constructor but when it first receives style.
821         (WebCore::RenderSVGResourceContainer::idChanged): Don't duplicate code, use existing methods from SVGResourcesCache.
822         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Add new helper function, to share code between all resources.
823         (WebCore::RenderSVGResourceContainer::markClientForInvalidation): Ditto.
824         (WebCore::RenderSVGResourceContainer::addClient): SVGResourcesCache now manages the list of clients. It calls addClient() for each RenderObject that uses this resource.
825         (WebCore::RenderSVGResourceContainer::removeClient): SVGResourcesCache now manages the list of clients.
826         (WebCore::RenderSVGResourceContainer::registerResource): New helper function sharing code between idChanged / styleDidChange.
827         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): Add FIXME that the function is misplaced.
828         * rendering/RenderSVGResourceContainer.h: Move most functions to the new RenderSVGResourceContainer.cpp file.
829         * rendering/RenderSVGResourceFilter.cpp:
830         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter): Early exit if m_filter is empty.
831         (WebCore::RenderSVGResourceFilter::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
832         (WebCore::RenderSVGResourceFilter::invalidateClient): Ditto.
833         * rendering/RenderSVGResourceGradient.cpp:
834         (WebCore::RenderSVGResourceGradient::~RenderSVGResourceGradient): Early exit if m_gradient is empty.
835         (WebCore::RenderSVGResourceGradient::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
836         (WebCore::RenderSVGResourceGradient::invalidateClient): Ditto.
837         * rendering/RenderSVGResourceMarker.cpp:
838         (WebCore::RenderSVGResourceMarker::~RenderSVGResourceMarker): Now a no-op, markers are unified within the new client handling concept, no more special code needed.
839         (WebCore::RenderSVGResourceMarker::layout): As RenderSVGResourceMarker skips the RenderSVGResourceContainer::layout() method, we also need to call invalidateClients() here.
840         (WebCore::RenderSVGResourceMarker::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
841         (WebCore::RenderSVGResourceMarker::invalidateClient): Ditto.
842         (WebCore::RenderSVGResourceMarker::draw): Remove marker specific logic to catch circular references.
843         * rendering/RenderSVGResourceMarker.h:
844         * rendering/RenderSVGResourceMasker.cpp:
845         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker): Early exit if m_masker is empty.
846         (WebCore::RenderSVGResourceMasker::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
847         (WebCore::RenderSVGResourceMasker::invalidateClient): Ditto.
848         (WebCore::RenderSVGResourceMasker::applyResource): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
849         * rendering/RenderSVGResourceMasker.h:
850         * rendering/RenderSVGResourcePattern.cpp:
851         (WebCore::RenderSVGResourcePattern::~RenderSVGResourcePattern): Early exit if m_pattern is empty.
852         (WebCore::RenderSVGResourcePattern::invalidateClients): Use new helper functions to invalidate clients, shared between all resources in RenderSVGResourceContainer.
853         (WebCore::RenderSVGResourcePattern::invalidateClient): Ditto.
854         (WebCore::RenderSVGResourcePattern::createTileImage): Remove containsCyclicReference() check, SVGResourcesCycleSolver breaks cyclic references, resources do not need to take care anymore.
855         * rendering/RenderSVGResourcePattern.h:
856         * rendering/RenderSVGRoot.cpp:
857         (WebCore::RenderSVGRoot::selfWillPaint): Don't look up resources manually, use SVGResourcesCache.
858         (WebCore::RenderSVGRoot::destroy): Forward to SVGResourcesCache::clientDestroyed.
859         (WebCore::RenderSVGRoot::styleDidChange): Forward to SVGResourcesCache::clientStyleChanged.
860         (WebCore::RenderSVGRoot::updateFromElement): Forward to SVGResourcesCache::clientUpdatedFromElement.
861         * rendering/RenderSVGRoot.h:
862         * rendering/RenderSVGText.cpp:
863         (WebCore::RenderSVGText::layout): s/RenderSVGResource::invalidateAllResourcesOfRenderer/SVGResourcesCache::clientLayoutChanged/.
864         * rendering/RenderSVGText.h:
865         * rendering/SVGInlineTextBox.cpp:
866         (WebCore::SVGInlineTextBox::acquirePaintingResource): Add RenderObject* parameter, don't assume the style comes from the InlineTextBox parent renderer.
867         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting): Pass the parent()->renderer() to acquirePaintingResource.
868         (WebCore::SVGInlineTextBox::paintDecoration): Pass the decoration renderer to acquirePaintingResource.
869         (WebCore::SVGInlineTextBox::paintDecorationWithStyle): Ditto.
870         (WebCore::SVGInlineTextBox::paintText): When a selection pseudo style is used to paint the selection, swap styles in the SVGResourcesCache, to take the right resources when painting.
871         * rendering/SVGInlineTextBox.h:
872         * rendering/SVGRenderSupport.cpp:
873         (WebCore::SVGRenderSupport::prepareToRenderSVGContent): Don't look up resources manually, use SVGResourcesCache.
874         (WebCore::SVGRenderSupport::finishRenderSVGContent): Ditto.
875         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources): Ditto.
876         (WebCore::SVGRenderSupport::pointInClippingArea): Remove const from RenderObject parameter. 
877         * rendering/SVGRenderSupport.h:
878         * rendering/SVGRenderTreeAsText.cpp:
879         (WebCore::writeStyle): Add two const_cast now that fill/strokePaintingResource take RenderObject* parameters. This was the less intrusive approach, otherwhise more const_casts would be needed.
880         (WebCore::writeResources): Add FIXME that we should dump the resources present in the SVGResourcesCache instead of manually looking them up from the SVGRenderStyle, to avoid dumping cycles.
881         * rendering/SVGResourcesCache.cpp:
882         (WebCore::SVGResourcesCache::clientStyleChanged): Use markForLayoutAndParentResourceInvalidation() instead of duplicating code.
883         * rendering/SVGResourcesCycleSolver.cpp:
884         (WebCore::setFollowLinkForChainableResource): Implemented stub method.
885         * rendering/style/SVGRenderStyle.cpp:
886         (WebCore::SVGRenderStyle::diff): Return StyleDifferenceLayout, not Repaint for stroke paint changes, otherwhise the cached boundaries are not correctly updated.
887         * svg/SVGClipPathElement.cpp:
888         (WebCore::SVGClipPathElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
889         (WebCore::SVGClipPathElement::childrenChanged): Ditto.
890         * svg/SVGClipPathElement.h:
891         (WebCore::SVGClipPathElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
892         * svg/SVGElement.cpp:
893         (WebCore::SVGElement::insertedIntoDocument): Only execute buildPendingResource() logic, if needsPendingResourceHandling() returns true. Cleaned up code a bit, to deploy early returns.
894         * svg/SVGElement.h:
895         (WebCore::SVGElement::needsPendingResourceHandling): Return true (default). Only needed by SVGTextPathElement/SVGUseElement, and should be removed in future.
896         * svg/SVGFilterElement.cpp:
897         (WebCore::SVGFilterElement::SVGFilterElement): Initialize m_followLink=true.
898         (WebCore::SVGFilterElement::setFilterRes): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
899         (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
900         (WebCore::SVGFilterElement::childrenChanged): Ditto.
901         * svg/SVGFilterElement.h:
902         (WebCore::SVGFilterElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
903         (WebCore::SVGFilterElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references.
904         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
905         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged): Don't use invalidateResourceClients(), it's a no-op as effects don't have a renderer -> use invalidateFilter().
906         * svg/SVGFilterPrimitiveStandardAttributes.h:
907         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidateFilter): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
908         * svg/SVGGradientElement.cpp:
909         (WebCore::SVGGradientElement::SVGGradientElement): Initialize m_followLink=true.
910         (WebCore::SVGGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
911         (WebCore::SVGGradientElement::childrenChanged): Ditto.
912         * svg/SVGGradientElement.h:
913         (WebCore::SVGGradientElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
914         (WebCore::SVGGradientElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references.
915         * svg/SVGLinearGradientElement.cpp:
916         (WebCore::SVGLinearGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
917         (WebCore::SVGLinearGradientElement::collectGradientProperties): Only follow xlink:href links if m_followLinks == true.
918         * svg/SVGMarkerElement.cpp:
919         (WebCore::SVGMarkerElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
920         (WebCore::SVGMarkerElement::childrenChanged): Ditto.
921         (WebCore::SVGMarkerElement::setOrientToAuto): Ditto.
922         (WebCore::SVGMarkerElement::setOrientToAngle): Ditto.
923         * svg/SVGMarkerElement.h:
924         (WebCore::SVGMarkerElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
925         * svg/SVGMaskElement.cpp:
926         (WebCore::SVGMaskElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
927         (WebCore::SVGMaskElement::childrenChanged): Ditto.
928         * svg/SVGMaskElement.h:
929         (WebCore::SVGMaskElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
930         * svg/SVGPatternElement.cpp:
931         (WebCore::SVGPatternElement::SVGPatternElement): Initialize m_followLink=true.
932         (WebCore::SVGPatternElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
933         (WebCore::SVGPatternElement::childrenChanged): Ditto.
934         (WebCore::SVGPatternElement::collectPatternProperties): Only follow xlink:href links if m_followLinks == true.
935         * svg/SVGPatternElement.h:
936         (WebCore::SVGPatternElement::needsPendingResourceHandling): Return false, buildPendingResource() logic not needed anymore for resources, handled by RenderSVGResourceContainer.
937         (WebCore::SVGPatternElement::setFollowLink): Used by SVGResourcesCycleSolver, to stop following xlink:href links, if that leads to cyclic references.
938         * svg/SVGRadialGradientElement.cpp:
939         (WebCore::SVGRadialGradientElement::svgAttributeChanged): Don't use invalidateResourceClients(), it's not needed anymore, only call setNeedsLayout() on the renderer.
940         (WebCore::SVGRadialGradientElement::collectGradientProperties): Only follow xlink:href links if m_followLinks == true.
941         * svg/SVGStyledElement.cpp:
942         (WebCore::SVGStyledElement::attach): Call updateFromElement upon attach(), needed by all resource renderers. Defaults to a no-op in RenderObject.h
943         * svg/SVGStyledElement.h: Remove invalidateResourceClients(), it's not needed anymore.
944
945 2010-07-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
946
947         Reviewed by Kenneth Rohde Christiansen.
948
949         [EFL] Support to enable WML in WebKit EFL
950         https://bugs.webkit.org/show_bug.cgi?id=43178
951
952         WebKit EFL cannot enable WML. WML files are added to CMakeLists.txt
953         to enable WML in WebKit EFL.
954
955         * CMakeLists.txt: Support to enable WML.
956
957 2010-07-21 Grace Kloba  <klobag@gmail.com> , Antonio Gomes  <tonikitoo@webkit.org>
958
959         Reviewed by David Hyatt.
960
961         Enhance the hit testing to take a rectangle instead of a point
962         https://bugs.webkit.org/show_bug.cgi?id=40197
963
964         The primary goal of this change is to provide mechanisms for more precise tap
965         actions by the users on mobile devices.
966
967         Patch extends the hit testing system to work considering a rectangular area
968         as input instead of a point, when applicable. For that, the HitTestResult class
969         was modified to take a padding (IntSize). The padding specifies a fuzzy range for
970         accepting input events in pixels coordinates for both vertical and horizontal
971         orientations. In other words, it tells how much to expand the search rect
972         around a supposed touch point.
973
974         If it is non-positive padding (e.g. (-1, -1), (5, -1), (0, 0)), hit testing will behavior
975         as the current point based hit testing: methods are no-op'ed to not regress it performance-wise
976         since it is the common behavior. When positive padding is provided, the HitTestResult class will
977         keep record of all nodes that intersect the built up test area. The logic will continue searching
978         when it finds a candidate until the hit test area is fully enclosed by the boundaries of a candidate.
979         The result will be a list of nodes in the z-order they are hit-tested. Caller will decide how
980         to process them.
981
982         In order to expose the functionality, the patch:
983
984         - Adds a nodesFromRect method to the Document class, exposing the funcionality
985         to the DOM. Method returns a NodeList with all nodes that intersect the given
986         hit-tested area.
987         - Extends hitTestResultAtPoint method of the EventHandler with an extra 'padding'
988         parameter, defaulting to IntSize(-1, -1). The rect-based hit test is performed when a
989         non-negative padding is passed in.
990
991         Test: fast/dom/nodesFromRect-basic.html
992
993         * WebCore.base.exp:
994         * dom/Document.cpp:
995         (WebCore::Document::nodesFromRect): This method exposes the rect based funcionality to
996         the DOM. It works similarly to elementFromPoint, however receiving a rectangular area
997         as input instead of a point, and returning a z-index ordered list of nodes (not elements)
998         whose area intersect the hit test rect.
999         * dom/Document.h: Ditto.
1000         * dom/Document.idl: Ditto.
1001         * page/EventHandler.cpp:
1002         (WebCore::EventHandler::hitTestResultAtPoint): The funcionality is also exposed through this
1003         method. Patch adds a additional IntSize parameter to work as the padding area, building up
1004         the hit test rect.
1005         * page/EventHandler.h: Ditto.
1006         * rendering/HitTestResult.cpp:
1007         (WebCore::HitTestResult::HitTestResult): Rect based hit test constructor. Receives a
1008         padding IntSize as parameter. It can be (0,0).
1009         (WebCore::HitTestResult::operator=): Modified to assign the m_rectBasedTestResult as well.
1010         (WebCore::HitTestResult::append): Merge to HitTestResult objects in a way that the
1011         list node's of both objects get amended.
1012         (WebCore::HitTestResult::addNodeToRectBasedTestResult): Adds a given Node to the list of
1013         hit nodes.
1014         * rendering/HitTestResult.h:
1015         (WebCore::HitTestResult::padding): Returns the padding as an IntSize.
1016         (WebCore::HitTestResult::isRectBasedTest): Returns if the HitTestResult is rect based or not.
1017         (WebCore::HitTestResult::.rectBasedTestResult): Returns the list nodes hit.
1018         (WebCore::HitTestResult::rectFromPoint): Returns the hit test rect given the hit test point
1019         and padding.
1020         * rendering/RenderLayer.cpp:
1021         (WebCore::RenderLayer::hitTestLayer):
1022         (WebCore::RenderLayer::hitTestList):
1023         (WebCore::RenderLayer::hitTestChildLayerColumns):
1024         * rendering/EllipsisBox.cpp:
1025         (WebCore::EllipsisBox::nodeAtPoint): Method is modified to support rect based hit test extension.
1026         Now it not just checks if the boundary of the node being hit-tested contains a hit test point, but
1027         instead it checks if the boundary of the node intersects a hit test rect. It is implemented so
1028         that the common case (point based hit test) works as previously.
1029         * rendering/InlineFlowBox.cpp:
1030         (WebCore::InlineFlowBox::nodeAtPoint): Ditto.
1031         * rendering/InlineTextBox.cpp:
1032         (WebCore::InlineTextBox::nodeAtPoint): Ditto.
1033         * rendering/RenderBlock.cpp:
1034         (WebCore::RenderBlock::nodeAtPoint): Ditto.
1035         (WebCore::RenderBlock::hitTestColumns): Ditto.
1036         * rendering/RenderBox.cpp:
1037         (WebCore::RenderBox::nodeAtPoint): Ditto.
1038         * rendering/RenderImage.cpp:
1039         (WebCore::RenderImage::nodeAtPoint): Ditto.
1040         * rendering/RenderLineBoxList.cpp:
1041         (WebCore::RenderLineBoxList::hitTest):
1042         * rendering/RenderSVGRoot.cpp:
1043         (WebCore::RenderSVGRoot::nodeAtPoint): Ditto.
1044         * rendering/RenderTable.cpp:
1045         (WebCore::RenderTable::nodeAtPoint): Ditto.
1046         * rendering/RenderTableSection.cpp:
1047         (WebCore::RenderTableSection::nodeAtPoint): Ditto.
1048         * rendering/RenderWidget.cpp:
1049         (WebCore::RenderWidget::nodeAtPoint): Ditto.
1050
1051 2010-07-29  Steve Block  <steveblock@google.com>
1052
1053         Reviewed by Jeremy Orlow.
1054
1055         Add LayoutTestController methods to test DeviceOrientation
1056         https://bugs.webkit.org/show_bug.cgi?id=39589
1057
1058         This patch does not hook up the new LayoutTestController method to WebKit
1059         for any platform. This will be done in later patches.
1060         https://bugs.webkit.org/show_bug.cgi?id=43181 tracks this for Mac.
1061
1062         Test: fast/dom/DeviceOrientation/basic-operation.html
1063
1064         * WebCore/WebCore.exp.in:
1065         * WebCore.xcodeproj/project.pbxproj:
1066         * dom/DeviceOrientationClient.h:
1067         (WebCore::DeviceOrientationClient::~DeviceOrientationClient):
1068         * dom/DeviceOrientationController.cpp:
1069         (WebCore::DeviceOrientationController::DeviceOrientationController):
1070         * dom/DeviceOrientationEvent.cpp:
1071         * platform/mock/DeviceOrientationClientMock.cpp: Added.
1072         (WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
1073         (WebCore::DeviceOrientationClientMock::setController):
1074         (WebCore::DeviceOrientationClientMock::startUpdating):
1075         (WebCore::DeviceOrientationClientMock::stopUpdating):
1076         (WebCore::DeviceOrientationClientMock::setOrientation):
1077         (WebCore::DeviceOrientationClientMock::timerFired):
1078         * platform/mock/DeviceOrientationClientMock.h: Added.
1079         (WebCore::DeviceOrientationClientMock::lastOrientation):
1080
1081 2010-07-29  Satish Sampath  <satish@chromium.org>
1082
1083         Reviewed by Steve Block.
1084
1085         Runtime feature switch for speech input.
1086         https://bugs.webkit.org/show_bug.cgi?id=43146
1087
1088         Add a runtime feature switch that decides whether speech input attributes are available or not.
1089         Defaults to true.
1090
1091         * bindings/generic/RuntimeEnabledFeatures.cpp:
1092         * bindings/generic/RuntimeEnabledFeatures.h:
1093         (WebCore::RuntimeEnabledFeatures::setSpeechInputEnabled):
1094         (WebCore::RuntimeEnabledFeatures::speechInputEnabled):
1095         (WebCore::RuntimeEnabledFeatures::speechEnabled):
1096         * html/HTMLInputElement.idl:
1097
1098 2010-07-27  Alexander Pavlov  <apavlov@chromium.org>
1099
1100         Reviewed by Pavel Feldman.
1101
1102         Inspector should display CDATA section data
1103         https://bugs.webkit.org/show_bug.cgi?id=16259
1104
1105         * inspector/InspectorDOMAgent.cpp:
1106         (WebCore::InspectorDOMAgent::buildObjectForNode):
1107         * inspector/front-end/ElementsTreeOutline.js:
1108         ():
1109
1110 2010-07-28  Kavita Kanetkar  <kkanetkar@chromium.org>
1111
1112         Reviewed by Pavel Feldman.
1113
1114         Web Inspector: Enable UI for chromium's appcache inspection.
1115         https://bugs.webkit.org/show_bug.cgi?id=43098
1116
1117         * inspector/front-end/Settings.js: Removed appCacheEnabled.
1118         * inspector/front-end/StoragePanel.js: Removed appCacheEnabled condition.
1119         (WebInspector.StoragePanel):
1120         (WebInspector.StoragePanel.prototype.reset):
1121         (WebInspector.StoragePanel.prototype.addApplicationCache):
1122
1123 2010-07-28  Bryan Gislason  <bgislason@rim.com>
1124
1125         Reviewed by Nate Chapin.
1126
1127         Minor compile errors in loadMediaPlayerProxyPlugin
1128         https://bugs.webkit.org/show_bug.cgi?id=43141
1129
1130         * WebCore/loader/SubframeLoader.cpp:
1131
1132 2010-07-28  Dominic Mazzoni  <dmazzoni@google.com>
1133
1134         Reviewed by Dimitri Glazkov.
1135
1136         Add a missing dependency.
1137         https://bugs.webkit.org/show_bug.cgi?id=43044
1138
1139         * css/CSSPrimitiveValueMappings.h:
1140
1141 2010-07-28  Alex Nicolaou  <anicolao@chromium.org>
1142
1143         Reviewed by Ojan Vafai.
1144
1145         Set incorrect but close expectations for mask-colorspace.svg on mac
1146         https://bugs.webkit.org/show_bug.cgi?id=43102
1147
1148         Blocks:
1149           [chromium] r63450 caused some svg mask tests to fail pixel tests
1150           https://bugs.webkit.org/show_bug.cgi?id=42403
1151
1152         ImageBufferCG.cpp uses CoreGraphics to do the transform of SVG masks
1153         into LinearRGB, but only for MAC which means not for CHROMIUM, so I
1154         have changed the #if to account for both platforms. I am assuming this
1155         isn't in for windows because it's missing in CG itself, but I didn't
1156         verify that.
1157
1158         * platform/graphics/cg/ImageBufferCG.cpp:
1159         (WebCore::ImageBuffer::ImageBuffer):
1160
1161 2010-07-28  Kent Tamura  <tkent@chromium.org>
1162
1163         Reviewed by Darin Fisher.
1164
1165         [Chromium] Improve read-only arrow button appearance
1166         https://bugs.webkit.org/show_bug.cgi?id=43108
1167
1168         No new tests. This is a fix for fast/forms/
1169         input-appearance-spinbutton-disabled-readonly.html
1170
1171         * platform/chromium/PlatformThemeChromiumGtk.cpp:
1172         (WebCore::PlatformThemeChromiumGtk::paintArrowButton):
1173         If the button has ReadOnlyState, paint the button as same as it is disabled.
1174
1175 2010-07-28  Tony Chang  <tony@chromium.org>
1176
1177         Reviewed by Ojan Vafai.
1178
1179         implement getData('text/html') for webkit win
1180         https://bugs.webkit.org/show_bug.cgi?id=37981
1181
1182         * platform/win/ClipboardUtilitiesWin.cpp:
1183         (WebCore::extractMarkupFromCFHTML):
1184         (WebCore::getCFHTML):
1185         (WebCore::fragmentFromCFHTML):
1186         (WebCore::fragmentFromHTML):
1187         * platform/win/ClipboardUtilitiesWin.h:
1188         * platform/win/ClipboardWin.cpp:
1189         (WebCore::):
1190         (WebCore::clipboardTypeFromMIMEType):
1191         (WebCore::ClipboardWin::getData):
1192
1193 2010-07-28  Adam Barth  <abarth@webkit.org>
1194
1195         Reviewed by Eric Seidel.
1196
1197         Update numbered header element closing to match recent spec change
1198         https://bugs.webkit.org/show_bug.cgi?id=43072
1199
1200         Pretty straightforward transcription of the spec change.
1201
1202         * html/HTMLElementStack.cpp:
1203         (WebCore::HTMLNames::isNumberedHeaderElement):
1204         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
1205         (WebCore::HTMLElementStack::hasOnlyHTMLElementsInScope):
1206         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
1207         * html/HTMLElementStack.h:
1208         * html/HTMLTreeBuilder.cpp:
1209         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1210         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1211
1212 2010-07-28  Anders Carlsson  <andersca@apple.com>
1213
1214         Reviewed by Sam Weinig.
1215
1216         Add support for calling NPObject methods
1217         https://bugs.webkit.org/show_bug.cgi?id=43145
1218
1219         * WebCore.exp.in:
1220         Export JSHTMLElement::s_info and pluginScriptObject.
1221
1222         * WebCore.xcodeproj/project.pbxproj:
1223         Make JSHTMLElement.h and JSPluginElementFunctions.h private headers.
1224
1225         * bindings/js/JSPluginElementFunctions.cpp:
1226         (WebCore::pluginScriptObject):
1227         * bindings/js/JSPluginElementFunctions.h:
1228         Make pluginScriptObject a public function.
1229
1230 2010-07-28  James Robinson  <jamesr@chromium.org>
1231
1232         Reviewed by Darin Fisher.
1233
1234         [chromium] Add a bool to Settings to control accelerated 2d canvas
1235         https://bugs.webkit.org/show_bug.cgi?id=43094
1236
1237         Currently this doesn't control anything, but it will soon.
1238
1239         * page/Settings.cpp:
1240         (WebCore::Settings::Settings):
1241         (WebCore::Settings::setAccelerated2dCanvasEnabled):
1242         * page/Settings.h:
1243         (WebCore::Settings::accelerated2dCanvasEnabled):
1244
1245 2010-07-28  Robin Dunn  <robin@alldunn.com>
1246
1247         Reviewed by Kevin Ollivier.
1248
1249         Add DOM bindings support for wx port.
1250
1251         * DerivedSources.make:
1252         * bindings/scripts/CodeGeneratorCPP.pm:
1253         * platform/graphics/wx/FontPlatformDataWx.cpp:
1254         (WebCore::FontPlatformData::FontPlatformData):
1255         * platform/wx/MouseEventWx.cpp:
1256         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1257         * wscript:
1258
1259 2010-07-28  Stephen White  <senorblanco@chromium.org>
1260
1261         Reviewed by Darin Fisher.
1262
1263         Hook the GLES2 rendering path up to GraphicsContextSkia.
1264         https://bugs.webkit.org/show_bug.cgi?id=43119
1265         
1266         This connects the state-setting and drawing calls implemented in
1267         so far in GLES2Canvas, and calls PlatformContextSkia's
1268         prepareForSoftwareDraw() for all the non-accelerated paths.
1269
1270         * platform/graphics/skia/GraphicsContextSkia.cpp:
1271         (WebCore::GraphicsContext::addInnerRoundedRectClip):
1272         (WebCore::GraphicsContext::addPath):
1273         (WebCore::GraphicsContext::beginPath):
1274         (WebCore::GraphicsContext::clip):
1275         (WebCore::GraphicsContext::drawConvexPolygon):
1276         (WebCore::GraphicsContext::drawEllipse):
1277         (WebCore::GraphicsContext::drawFocusRing):
1278         (WebCore::GraphicsContext::drawLine):
1279         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1280         (WebCore::GraphicsContext::drawLineForText):
1281         (WebCore::GraphicsContext::drawRect):
1282         (WebCore::GraphicsContext::fillPath):
1283         (WebCore::GraphicsContext::fillRoundedRect):
1284         (WebCore::GraphicsContext::strokeArc):
1285         (WebCore::GraphicsContext::strokePath):
1286         (WebCore::GraphicsContext::strokeRect):
1287         These calls are software-only; call preSoftwareDraw() for these.
1288         (WebCore::GraphicsContext::savePlatformState):
1289         (WebCore::GraphicsContext::restorePlatformState):
1290         (WebCore::GraphicsContext::setAlpha):
1291         (WebCore::GraphicsContext::setCompositeOperation):
1292         (WebCore::GraphicsContext::setPlatformFillColor):
1293         (WebCore::GraphicsContext::scale):
1294         (WebCore::GraphicsContext::rotate):
1295         (WebCore::GraphicsContext::translate):
1296         (WebCore::GraphicsContext::concatCTM):
1297         These ones set state on both Skia and GLES2Canvas.
1298         (WebCore::GraphicsContext::clearRect):
1299         (WebCore::GraphicsContext::fillRect):
1300         These ones have a GLES2 implementation; call through to it if PlatformContextSkia's useGPU() flag is set and the state permits.
1301         * platform/graphics/skia/PlatformContextSkia.cpp:
1302         (PlatformContextSkia::prepareForSoftwareDraw):
1303         (PlatformContextSkia::prepareForHardwareDraw):
1304         Rename preXXXDraw() -> prepareForXXXDraw().
1305         * platform/graphics/skia/PlatformContextSkia.h:
1306         (PlatformContextSkia::prepareForSoftwareDraw):
1307         (PlatformContextSkia::prepareForHardwareDraw):
1308         Rename preXXXDraw() -> prepareForXXXDraw().
1309
1310 2010-07-28  fsamuel@chromium.org  <fsamuel@chromium.org>
1311
1312         Reviewed by David Hyatt.
1313
1314         REGRESSION (r63994): Bank of America's home page is horribly mis-rendered
1315         https://bugs.webkit.org/show_bug.cgi?id=42993
1316
1317         Fixed bug introduced by patch for bug 40775.
1318
1319         The new table rendering code did not take into account table layouts starting
1320         during a partial construction of the table render tree. As such,
1321         multiple layouts on the same table resulted in more columns being generated.
1322         This patch solves this issue.
1323
1324         * rendering/AutoTableLayout.cpp:
1325         (WebCore::AutoTableLayout::recalcColumn):
1326         * rendering/RenderTable.cpp:
1327         (WebCore::RenderTable::cellAbove):
1328         (WebCore::RenderTable::cellBelow):
1329         (WebCore::RenderTable::cellBefore):
1330         * rendering/RenderTableSection.cpp:
1331         (WebCore::RenderTableSection::ensureRows):
1332         (WebCore::RenderTableSection::addCell):
1333         (WebCore::RenderTableSection::setCellWidths):
1334         (WebCore::RenderTableSection::calcRowHeight):
1335         (WebCore::RenderTableSection::layoutRows):
1336         (WebCore::RenderTableSection::paintObject):
1337         (WebCore::RenderTableSection::appendColumn):
1338         (WebCore::RenderTableSection::splitColumn):
1339         * rendering/RenderTableSection.h:
1340         (WebCore::RenderTableSection::CellStruct::CellStruct):
1341
1342 2010-07-28  Tony Gentilcore  <tonyg@chromium.org>
1343
1344         Reviewed by Pavel Feldman.
1345
1346         Exclude DNS and SSL time from connect time
1347         https://bugs.webkit.org/show_bug.cgi?id=43083
1348
1349         The ResourceLoadTiming API's definition of the connect phase includes
1350         DNS and SSL time. However, the Web Timing spec wants just the TCP time.
1351         So this patch subtracts those phases out.
1352
1353         No new tests because ResourceLoadTiming fields are not populated by
1354         TestShell yet.
1355
1356         * page/Timing.cpp:
1357         (WebCore::Timing::connectStart):
1358         (WebCore::Timing::connectEnd):
1359
1360 2010-07-26  Steve Block  <steveblock@google.com>
1361
1362         Reviewed by Jeremy Orlow.
1363
1364         Page clients should be passed to Page constructor via structure of pointers
1365         https://bugs.webkit.org/show_bug.cgi?id=42834
1366
1367         No new tests, refactoring only.
1368
1369         * WebCore.exp.in:
1370         * page/Page.cpp:
1371         (WebCore::Page::Page):
1372         * page/Page.h:
1373         (WebCore::Page::PageClients::PageClients):
1374         * svg/graphics/SVGImage.cpp:
1375         (WebCore::SVGImage::dataChanged):
1376
1377 2010-07-28  Xianzhu Wang  <phnixwxz@gmail.com>
1378
1379         Reviewed by Dan Bernstein.
1380
1381         Line not wrapped at certain punctuations
1382         https://bugs.webkit.org/show_bug.cgi?id=37698
1383         Added a line breaking table for all printable ASCII chars to replace
1384         the original line breaking table for only '?'.
1385
1386         Test: fast/text/line-breaks-after-closing-punctuations.html
1387
1388         * rendering/break_lines.cpp:
1389         (WebCore::isBreakableSpace):
1390         (WebCore::):
1391         (WebCore::shouldBreakAfter):
1392         (WebCore::needsLineBreakIterator):
1393
1394 2010-07-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
1395
1396         Unreviewed build fix.
1397
1398         Fix EFL build with SHARED_CORE=ON after r64124.
1399
1400         * CMakeLists.txt:
1401
1402 2010-07-28  Jay Civelli  <jcivelli@chromium.org>
1403
1404         Reviewed by Kent Tamura.
1405
1406         [Chromium] The popup now layouts properly its rows by
1407         taking into account the label width.
1408         https://bugs.webkit.org/show_bug.cgi?id=42910
1409
1410         * platform/chromium/PopupMenuChromium.cpp:
1411         (WebCore::PopupListBox::layout):
1412
1413 2010-07-28  Pavel Feldman  <pfeldman@chromium.org>
1414
1415         Not reviewed: chromium tests fix.
1416         Chromium Dev Tools: [REGRESSION] Pause is not working.
1417
1418         https://bugs.webkit.org/show_bug.cgi?id=43118
1419
1420         * inspector/front-end/InspectorBackendStub.js:
1421
1422 2010-07-28  Ilya Tikhonovsky  <loislo@chromium.org>
1423
1424         Reviewed by Pavel Feldman.
1425
1426         WebInspector: Navigating to anchor prior to opening WebInspector
1427         makes resource have 'other' type.
1428         https://bugs.webkit.org/show_bug.cgi?id=43110
1429
1430         * inspector/InspectorResource.cpp:
1431         (WebCore::InspectorResource::type):
1432         (WebCore::InspectorResource::resourceData):
1433         * inspector/front-end/ResourceView.js:
1434         (WebInspector.ResourceView.prototype._innerSelectContentTab):
1435
1436 2010-07-28  Andreas Kling  <andreas.kling@nokia.com>
1437
1438         Reviewed by Kenneth Rohde Christiansen.
1439
1440         [Qt] putImageData(): Combine premultiplication and BGR->RGB
1441         https://bugs.webkit.org/show_bug.cgi?id=43114
1442
1443         Further optimized putImageData() by doing BGR->RGB inside the
1444         premultiplication routine.
1445
1446         * platform/graphics/qt/ImageBufferQt.cpp:
1447         (WebCore::premultiplyABGRtoARGB): Renamed from premultiply.
1448         (WebCore::putImageData):
1449
1450 2010-07-28  Andrei Popescu  <andreip@google.com>
1451
1452         Reviewed by Jeremy Orlow.
1453
1454         [IndexedDB] IDBKeyRange should be a runtime-enabled feature.
1455         https://bugs.webkit.org/show_bug.cgi?id=43116
1456
1457         IDBKeyRange should be enabled at runtime only when IndexedDB is also
1458         enabled.
1459
1460         No new tests needed, functionality not changed.
1461
1462         * bindings/generic/RuntimeEnabledFeatures.h:
1463         (WebCore::RuntimeEnabledFeatures::iDBKeyRangeEnabled):
1464         * page/DOMWindow.idl:
1465
1466 2010-07-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1467
1468         Not reviewed. Forgot to land GNUmakefile.am changes, broke build in r64196.
1469
1470         * GNUmakefile.am: Add SVGResources.* / SVGResourcesCache.* / SVGResourcesCycleSolver.* to build.
1471
1472 2010-07-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1473
1474         Reviewed by Dirk Schulze.
1475
1476         SVGMaskElement/SVGForeignObjectElement should not inherit from SVGURIReference
1477         https://bugs.webkit.org/show_bug.cgi?id=43113
1478
1479         Remove wrong SVGURIReference inheritance for SVGMaskElement/SVGForeignObjectElement. Old copy/paste bug.
1480
1481         * svg/SVGForeignObjectElement.cpp:
1482         (WebCore::SVGForeignObjectElement::synchronizeProperty):
1483         * svg/SVGForeignObjectElement.h:
1484         * svg/SVGMaskElement.cpp:
1485         (WebCore::SVGMaskElement::SVGMaskElement):
1486         (WebCore::SVGMaskElement::parseMappedAttribute):
1487         (WebCore::SVGMaskElement::svgAttributeChanged):
1488         (WebCore::SVGMaskElement::synchronizeProperty):
1489         * svg/SVGMaskElement.h:
1490
1491 2010-07-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1492
1493         Reviewed by Dirk Schulze.
1494
1495         WebKit shouldn't ignore resource cycles, but break them as Opera does
1496         https://bugs.webkit.org/show_bug.cgi?id=43031
1497
1498         Don't ignore resources containing cyclic references, but break them, as discussed on SVG WG mailing lists - to be compatible with Opera which already does that.
1499
1500         We used to lookup RenderSVGResourceContainers objects, by extracting the URI reference from the SVGRenderStyle, then utilizing getElementById() to lookup the
1501         node, and access its renderer. Opera ignores such references, if they point to resources that contain cyclic references. Ignoring them would mean we have
1502         to mutate the render style to empty the resource strings. That obviously doesn't work, as it would break expectations (getComputedStyle, etc.).
1503
1504         Introduce a SVGResources class that stores pointers to all resources, that can be applied to a RenderObject (clipper/filter/markers/masker).
1505         Add a SVGResourcesCache class, which is basically a HashMap<RenderObject*, SVGResources*>. Whenever a RenderObject receives style, we extract the URI references
1506         from the SVGRenderStyle, look up the RenderSVGResourceContainer* objects, and store them in a SVGResources* class. Then we execute a cycle detection logic,
1507         which detects cyclic references and breaks them. Breaking them means just nulling the pointer to the resource in the SVGResources object. Those SVGResources
1508         objects are cached, and used throughout the render tree to access resources. This way it's guaranteed that all cyclic references are resolved until layout/paint
1509         phase begins.
1510
1511         This is the first chunk, which just adds the new SVGResources/SVGResourcesCache/SVGResourcesCycleSolver files, and does minor cleanups.
1512         It's not yet glued in and doesn't affect any tests.
1513
1514         * Android.mk: Add SVGResources.* / SVGResourcesCache.* / SVGResourcesCycleSolver.* to build.
1515         * CMakeLists.txt: Ditto.
1516         * WebCore.gypi: Ditto.
1517         * WebCore.pro: Ditto.
1518         * WebCore.vcproj/WebCore.vcproj: Ditto. 
1519         * WebCore.xcodeproj/project.pbxproj: Ditto.
1520         * rendering/RenderInline.h: Make styleDidChange protected, RenderSVGInline wants to override it.
1521         * rendering/RenderSVGAllInOne.cpp: Add SVGResources.* / SVGResourcesCache.* / SVGResourcesCycleSolver.* to build.
1522         * rendering/RenderSVGHiddenContainer.h:
1523         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer): Make isSVGHiddenContainer() private and renderName() public.
1524         * rendering/RenderSVGResourceContainer.cpp: Added. Moved most methods from the header in the implementation file.
1525         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
1526         (WebCore::RenderSVGResourceContainer::~RenderSVGResourceContainer):
1527         (WebCore::RenderSVGResourceContainer::idChanged):
1528         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
1529         (WebCore::RenderSVGResourceContainer::containsCyclicReference):
1530         * rendering/RenderSVGResourceContainer.h: Add stubs, that SVGResourcesCache uses - a follow-up patch will add the logic.
1531         (WebCore::RenderSVGResourceContainer::addClient):
1532         (WebCore::RenderSVGResourceContainer::removeClient):
1533         * rendering/SVGResources.cpp: Added. Holds a list of resources applyable to a RenderObject (fill/stroke, mask/markers/clipper/filter)
1534         (WebCore::paintingResourceFromSVGPaint): Helper function looking up a RenderSVGResource for a SVGPaint object.
1535         (WebCore::registerPendingResource): Helper function that register a RenderSVGResource as pending in the SVGDocumentExtensions. 
1536         (WebCore::SVGResources::buildCachedResources): Build a list of resources for a RenderObject/RenderStyle pair, handles pending resources, if needed.
1537         (WebCore::SVGResources::invalidateClient): Helper function that calls invalidateClient() on all resources.
1538         (WebCore::SVGResources::resourceDestroyed): Helper function that calls invalidateClients() on a certain resource, and nulls it.
1539         (WebCore::SVGResources::buildSetOfResources): Helper function that stashes all resources present in the SVGResources members in a HashSet, used in SVGResourcesCycleSolver.
1540         (WebCore::SVGResources::resetClipper): Helper methods nulling a resource.
1541         (WebCore::SVGResources::resetFilter): Ditto.
1542         (WebCore::SVGResources::resetMarkerStart): Ditto.
1543         (WebCore::SVGResources::resetMarkerMid): Ditto.
1544         (WebCore::SVGResources::resetMarkerEnd): Ditto.
1545         (WebCore::SVGResources::resetMasker): Ditto.
1546         (WebCore::SVGResources::resetFill): Ditto.
1547         (WebCore::SVGResources::resetStroke): Ditto.
1548         (WebCore::SVGResources::dump):
1549         * rendering/SVGResources.h: Added.
1550         (WebCore::SVGResources::clipper): Accesor of the cached m_foo variable.
1551         (WebCore::SVGResources::filter): Ditto.
1552         (WebCore::SVGResources::markerStart): Ditto.
1553         (WebCore::SVGResources::markerMid): Ditto.
1554         (WebCore::SVGResources::markerEnd): Ditto.
1555         (WebCore::SVGResources::masker): Ditto.
1556         (WebCore::SVGResources::fill): Ditto.
1557         (WebCore::SVGResources::stroke): Ditto.
1558         * rendering/SVGResourcesCache.cpp: Added. Holds a HashMap<RenderObject*, SVGResources*> and utility functions that update/invalidate the cache.
1559         (WebCore::SVGResourcesCache::SVGResourcesCache):
1560         (WebCore::SVGResourcesCache::~SVGResourcesCache):
1561         (WebCore::SVGResourcesCache::addResourcesFromRenderObject): Build a SVGResources object for a RenderObject and adds it to the cache, then detects & breaks cycles using SVGResourcesCycleSolver.
1562         (WebCore::SVGResourcesCache::removeResourcesFromRenderObject): Remove a SVGResources object from the cache.
1563         (WebCore::resourcesCacheFromRenderObject): Helper function, retrieving a SVGResourcesCache method from a RenderObject.
1564         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Returns a SVGResources object from the cache.
1565         (WebCore::SVGResourcesCache::clientLayoutChanged): (static) Calls invalidateClient() on all resources that are used by the passed RenderObject.
1566         (WebCore::SVGResourcesCache::clientStyleChanged): (static) Updates the cache (calling removeResourceFromRenderObject/addResourcesFrom...) and invalidates resources in the ancestor chain.
1567         (WebCore::SVGResourcesCache::clientUpdatedFromElement): (static) Does the same, without invalidating the ancestor chain.
1568         (WebCore::SVGResourcesCache::clientDestroyed): (static) Calls removeResourcesFromRenderObject() on the SVGResourcesCache, for the given renderer.
1569         (WebCore::SVGResourcesCache::resourceDestroyed): (static) Updates all SVGResources objects in the cache, that refer to the given resource.
1570         * rendering/SVGResourcesCache.h: Added.
1571         * rendering/SVGResourcesCycleSolver.cpp: Added. Detects and breaks cyclic references, just the way Opera handles it. Break cycles as they are detected.
1572         (WebCore::SVGResourcesCycleSolver::SVGResourcesCycleSolver):
1573         (WebCore::SVGResourcesCycleSolver::~SVGResourcesCycleSolver):
1574         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles): Operates only on the render tree
1575         (WebCore::targetReferenceFromResource): Helper method for chainableResourceContainsCycles().
1576         (WebCore::setFollowLinkForChainableResource): Ditto.
1577         (WebCore::SVGResourcesCycleSolver::chainableResourceContainsCycles): Handles cycles for resources that are chainable through xlink:href (filter/gradient/pattern).
1578         (WebCore::SVGResourcesCycleSolver::resolveCycles): Main method executing the cycle breaking logic, utilizing (chainableResource)resourceContainsCycles.
1579         (WebCore::SVGResourcesCycleSolver::breakCycle): Nulls a resource in the given SVGResources* object, to avoid using an invalid resource while rendering/layouting.
1580         * rendering/SVGResourcesCycleSolver.h: Added.
1581         * svg/SVGDocumentExtensions.cpp:
1582         (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): Create SVGResourcesCache object once per SVGDocumentExtensions.
1583         * svg/SVGDocumentExtensions.h:
1584         (WebCore::SVGDocumentExtensions::resourcesCache): Expose accesor method for the SVGResourcesCache.
1585
1586 2010-07-28  Zoltan Herczeg  <zherczeg@webkit.org>
1587
1588         Reviewed by Nikolas Zimmermann.
1589
1590         SVGFilterElement & SVGFE*Element don't support dynamic invalidation, when attributes change
1591         https://bugs.webkit.org/show_bug.cgi?id=42244
1592
1593         Implementing svgAttributeChanged for SVGFEOffsetElement object.
1594
1595         Tests: svg/dynamic-updates/SVGFEOffsetElement-dom-dx-attr.html
1596                svg/dynamic-updates/SVGFEOffsetElement-dom-dy-attr.html
1597                svg/dynamic-updates/SVGFEOffsetElement-dom-in-attr.html
1598                svg/dynamic-updates/SVGFEOffsetElement-svgdom-dx-prop.html
1599                svg/dynamic-updates/SVGFEOffsetElement-svgdom-dy-prop.html
1600                svg/dynamic-updates/SVGFEOffsetElement-svgdom-in-prop.html
1601
1602         * svg/SVGFEOffsetElement.cpp:
1603         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
1604         * svg/SVGFEOffsetElement.h:
1605
1606 2010-07-28  Zoltan Herczeg  <zherczeg@webkit.org>
1607
1608         Reviewed by Nikolas Zimmermann.
1609
1610         SVGFilterElement & SVGFE*Element don't support dynamic invalidation, when attributes change
1611         https://bugs.webkit.org/show_bug.cgi?id=42244
1612
1613         Implementing svgAttributeChanged for SVGFEDiffuseLightingElement object.
1614
1615         Tests: svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-diffuseConstant-attr.html
1616                svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-in-attr.html
1617                svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-lighting-color-attr.html
1618                svg/dynamic-updates/SVGFEDiffuseLightingElement-dom-surfaceScale-attr.html
1619                svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop.html
1620                svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-diffuseConstant-prop.html
1621                svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-in-prop.html
1622                svg/dynamic-updates/SVGFEDiffuseLightingElement-svgdom-surfaceScale-prop.html
1623
1624         * svg/SVGFEDiffuseLightingElement.cpp:
1625         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
1626         * svg/SVGFEDiffuseLightingElement.h:
1627
1628 2010-07-27  Kinuko Yasuda  <kinuko@chromium.org>
1629
1630         Reviewed by Ojan Vafai.
1631
1632         Add FILE_SYSTEM build flag for FileSystem API
1633         https://bugs.webkit.org/show_bug.cgi?id=42915
1634
1635         * Configurations/FeatureDefines.xcconfig:
1636         * GNUmakefile.am:
1637         * WebCore.pri:
1638
1639 2010-07-26  Yuzo Fujishima  <yuzo@google.com>
1640
1641         Reviewed by Shinichiro Hamaji.
1642
1643         @page rules in media queries should be tested.
1644         https://bugs.webkit.org/show_bug.cgi?id=42971
1645
1646         * page/PrintContext.cpp:
1647         (WebCore::PrintContext::pageProperty): Fixed to properly begin
1648         printing. Added support for size property.
1649
1650 2010-07-27  James Hawkins  <jhawkins@chromium.org>
1651
1652         Reviewed by Darin Fisher.
1653
1654         Add itemIcon() method to the PopupMenuClient, used by Chrome AutoFill
1655         to display right-aligned credit card icons in the suggestions popup.
1656         https://bugs.webkit.org/show_bug.cgi?id=43076
1657
1658         No new tests as this is only used by the Chromium WebKit API.
1659
1660         * platform/PopupMenuClient.h:
1661         * platform/chromium/PopupMenuChromium.cpp:
1662         (WebCore::PopupListBox::paintRow):
1663         * rendering/RenderMenuList.cpp:
1664         (WebCore::RenderMenuList::itemIcon):
1665         * rendering/RenderMenuList.h:
1666         * rendering/RenderTextControlSingleLine.cpp:
1667         (WebCore::RenderTextControlSingleLine::itemIcon):
1668         * rendering/RenderTextControlSingleLine.h:
1669
1670 2010-07-27  Andreas Kling  <andreas.kling@nokia.com>
1671
1672         Reviewed by Kenneth Rohde Christiansen.
1673
1674         [Qt] putImageData(): Fast premultiply() if alpha == 255
1675
1676         * platform/graphics/qt/ImageBufferQt.cpp:
1677         (WebCore::premultiply): Do nothing for opaque pixels.
1678
1679 2010-07-27  Jian Li  <jianli@chromium.org>
1680
1681         Reviewed by David Levin.
1682
1683         Enhance FileThreadTask to support return type.
1684         https://bugs.webkit.org/show_bug.cgi?id=43078
1685
1686         This is needed to support synchronous calls of FileStream methods in
1687         addition to asynchronous calls via FileThreadTask.
1688
1689         * html/FileThreadTask.h:
1690         (WebCore::createFileThreadTask):
1691
1692 2010-07-27  James Robinson  <jamesr@chromium.org>
1693
1694         Reviewed by Darin Fisher.
1695
1696         [chromium] Let PlatformContextSkia draw to a GLES2Canvas in addition to an SkCanvas
1697         https://bugs.webkit.org/show_bug.cgi?id=43070
1698
1699         This adds a GLES2Canvas as drawing surface to PlatformContextSkia and lets callers
1700         issue draw commands to either.  The PlatformContextSkia keeps track of where
1701         rendering results are being accumulated and can blend the hardware and software
1702         backing stores into each other when necessary.
1703
1704         Still just plumbing, no functionality change.
1705
1706         * platform/graphics/chromium/GLES2Canvas.cpp:
1707         (WebCore::GLES2Canvas::GLES2Canvas):
1708         * platform/graphics/chromium/GLES2Canvas.h:
1709         * platform/graphics/skia/PlatformContextSkia.cpp:
1710         (PlatformContextSkia::PlatformContextSkia):
1711         (PlatformContextSkia::setGLES2Context):
1712         (PlatformContextSkia::preSoftwareDraw):
1713         (PlatformContextSkia::preHardwareDraw):
1714         (PlatformContextSkia::forceToSoftware):
1715         (PlatformContextSkia::uploadSoftwareToHardware):
1716         (PlatformContextSkia::readbackHardwareToSoftware):
1717         * platform/graphics/skia/PlatformContextSkia.h:
1718         (PlatformContextSkia::useGPU):
1719         (PlatformContextSkia::gpuCanvas):
1720         (PlatformContextSkia::preSoftwareDraw):
1721         (PlatformContextSkia::preHardwareDraw):
1722         (PlatformContextSkia::forceToSoftware):
1723         (PlatformContextSkia::):
1724
1725 2010-07-27  Simon Fraser  <simon.fraser@apple.com>
1726
1727         Reviewed by Darin Adler.
1728
1729         Incomplete repaint of some Safari extension content which falls into a composited iframe
1730         <rdar://problem/8235044>
1731         
1732         syncCompositingStateRecursive() bails if it thinks that a layout is pending, because
1733         the layout may update layers and make this sync obsolete. However, it only checked for an
1734         active layout timer. This ignores other sources of pending style changes and layouts, like
1735         the document's style recalc timer. So use needsLayout(), which does check this.
1736
1737         Unable to create a test because it depends on Safari extension behavior.
1738
1739         * page/FrameView.cpp:
1740         (WebCore::FrameView::syncCompositingStateRecursive):
1741
1742 2010-07-27  Andreas Kling  <andreas.kling@nokia.com>
1743
1744         Reviewed by Kenneth Rohde Christiansen.
1745
1746         [Qt] putImageData() optimizations
1747         https://bugs.webkit.org/show_bug.cgi?id=43059
1748
1749         - Single-pass premultiplication and BGR->RGB conversion
1750         - Use ARGB32PM for the temporary image so Qt calls the
1751           fast Source composition function
1752
1753         * platform/graphics/qt/ImageBufferQt.cpp:
1754         (WebCore::premultiply): Added (static inline)
1755         (WebCore::putImageData):
1756
1757 2010-07-27  Anders Carlsson  <andersca@apple.com>
1758
1759         Reviewed by Sam Weinig.
1760
1761         Expose interface for returning the plug-in script JSObject
1762         https://bugs.webkit.org/show_bug.cgi?id=43074
1763
1764         PluginViewBase::scriptObject should be a virtual function.
1765
1766         * plugins/PluginViewBase.h:
1767         (WebCore::PluginViewBase::scriptObject):
1768
1769 2010-07-27  Jian Li  <jianli@chromium.org>
1770
1771         Reviewed by David Levin.
1772
1773         Add ScriptExecutionContext argument to File/Blob constructors.
1774         https://bugs.webkit.org/show_bug.cgi?id=40587
1775
1776         Remove DragData::createClipboard and add Clipboard::create for it to be
1777         called directly in DragController. This is because we need to pass
1778         Frame pointer to Clipboard class and use it to get ScriptExecutionContext
1779         in order to construct File objects in Clipboard::files().
1780
1781         * bindings/js/SerializedScriptValue.cpp:
1782         (WebCore::DeserializingTreeWalker::convertIfTerminal):
1783         * bindings/v8/SerializedScriptValue.cpp:
1784         (WebCore::ZigZag::Reader::readBlob):
1785         (WebCore::ZigZag::Reader::readFile):
1786         (WebCore::ZigZag::Reader::readFileList):
1787         * dom/Clipboard.h:
1788         * editing/Editor.cpp:
1789         (WebCore::Editor::dispatchCPPEvent):
1790         * editing/Editor.h:
1791         * editing/android/EditorAndroid.cpp:
1792         (WebCore::Editor::newGeneralClipboard):
1793         * editing/brew/EditorBrew.cpp:
1794         (WebCore::Editor::newGeneralClipboard):
1795         * editing/chromium/EditorChromium.cpp:
1796         (WebCore::Editor::newGeneralClipboard):
1797         * editing/haiku/EditorHaiku.cpp:
1798         (WebCore::Editor::newGeneralClipboard):
1799         * editing/mac/EditorMac.mm:
1800         (WebCore::Editor::newGeneralClipboard):
1801         * editing/qt/EditorQt.cpp:
1802         (WebCore::Editor::newGeneralClipboard):
1803         * editing/wx/EditorWx.cpp:
1804         (WebCore::Editor::newGeneralClipboard):
1805         * html/Blob.cpp:
1806         (WebCore::Blob::Blob):
1807         (WebCore::Blob::slice):
1808         * html/Blob.h:
1809         (WebCore::Blob::create):
1810         * html/Blob.idl:
1811         * html/BlobBuilder.cpp:
1812         (WebCore::BlobBuilder::getBlob):
1813         * html/BlobBuilder.h:
1814         * html/BlobBuilder.idl:
1815         * html/File.cpp:
1816         (WebCore::File::File):
1817         * html/File.h:
1818         (WebCore::File::create):
1819         * html/HTMLInputElement.cpp:
1820         (WebCore::HTMLInputElement::appendFormData):
1821         (WebCore::HTMLInputElement::setFileListFromRenderer):
1822         * page/DragController.cpp:
1823         (WebCore::DragController::dragExited):
1824         (WebCore::DragController::performDrag):
1825         (WebCore::DragController::tryDHTMLDrag):
1826         * page/chromium/EventHandlerChromium.cpp:
1827         (WebCore::EventHandler::createDraggingClipboard):
1828         * page/gtk/EventHandlerGtk.cpp:
1829         (WebCore::EventHandler::createDraggingClipboard):
1830         * page/win/EventHandlerWin.cpp:
1831         (WebCore::EventHandler::createDraggingClipboard):
1832         * platform/DragData.h:
1833         * platform/android/ClipboardAndroid.cpp:
1834         (WebCore::Clipboard::create):
1835         * platform/android/DragDataAndroid.cpp:
1836         * platform/brew/ClipboardBrew.cpp:
1837         (WebCore::Clipboard::create):
1838         * platform/brew/DragDataBrew.cpp:
1839         * platform/chromium/ClipboardChromium.cpp:
1840         (WebCore::Clipboard::create):
1841         (WebCore::ClipboardChromium::ClipboardChromium):
1842         (WebCore::ClipboardChromium::create):
1843         (WebCore::ClipboardChromium::files):
1844         * platform/chromium/ClipboardChromium.h:
1845         * platform/chromium/DragDataChromium.cpp:
1846         * platform/efl/ClipboardEfl.cpp:
1847         (WebCore::Editor::newGeneralClipboard):
1848         (WebCore::Clipboard::create):
1849         * platform/efl/DragDataEfl.cpp:
1850         * platform/gtk/ClipboardGtk.cpp:
1851         (WebCore::Editor::newGeneralClipboard):
1852         (WebCore::Clipboard::create):
1853         (WebCore::ClipboardGtk::ClipboardGtk):
1854         (WebCore::ClipboardGtk::files):
1855         * platform/gtk/ClipboardGtk.h:
1856         (WebCore::ClipboardGtk::create):
1857         * platform/gtk/DragDataGtk.cpp:
1858         * platform/haiku/ClipboardHaiku.cpp:
1859         (WebCore::Clipboard::create):
1860         * platform/haiku/DragDataHaiku.cpp:
1861         * platform/mac/ClipboardMac.mm:
1862         (WebCore::Clipboard::create):
1863         (WebCore::ClipboardMac::files):
1864         * platform/mac/DragDataMac.mm:
1865         * platform/qt/ClipboardQt.cpp:
1866         (WebCore::Clipboard::create):
1867         * platform/qt/DragDataQt.cpp:
1868         * platform/win/ClipboardWin.cpp:
1869         (WebCore::Clipboard::create):
1870         (WebCore::ClipboardWin::ClipboardWin):
1871         (WebCore::ClipboardWin::files):
1872         * platform/win/ClipboardWin.h:
1873         (WebCore::ClipboardWin::create):
1874         * platform/win/DragDataWin.cpp:
1875         * platform/win/EditorWin.cpp:
1876         (WebCore::Editor::newGeneralClipboard):
1877         * platform/wince/DragDataWince.cpp:
1878         * platform/wince/EditorWince.cpp:
1879         (WebCore::Editor::newGeneralClipboard):
1880         * platform/wx/ClipboardWx.cpp:
1881         (WebCore::Clipboard::create):
1882         * platform/wx/DragDataWx.cpp:
1883
1884 2010-07-27  Dumitru Daniliuc  <dumi@chromium.org>
1885
1886         Reviewed by David Levin.
1887
1888         Move all WebSQLDatabases-specific code behind #if ENABLE(DATABASE).
1889         https://bugs.webkit.org/show_bug.cgi?id=43035
1890
1891         Make Chromium compile with ENABLE_DATABASE=0. The #ifdefs in
1892         DatabaseAuthorizer and ChromiumBridge are removed, because they're
1893         used by non-HTML5 DBs too (the classes in WebCore/platform/sql/),
1894         which are used by other features too. So they need to be compiled
1895         in even if HTML5 DBs are disabled.
1896
1897         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1898         * page/DOMWindow.idl:
1899         * platform/chromium/ChromiumBridge.h:
1900         * storage/DatabaseAuthorizer.cpp:
1901         * storage/chromium/DatabaseObserver.h:
1902         * storage/chromium/DatabaseTrackerChromium.cpp:
1903         * storage/chromium/QuotaTracker.cpp:
1904         * storage/chromium/QuotaTracker.h:
1905         * storage/chromium/SQLTransactionClientChromium.cpp:
1906
1907 2010-07-27  Chris Fleizach  <cfleizach@apple.com>
1908
1909         Reviewed by David Kilzer.
1910
1911         AX: Misspellings not shown in AXAttributedStringForTextMarkerRange when selection is on word
1912         https://bugs.webkit.org/show_bug.cgi?id=41817
1913
1914         Change how misspelled words are identified for accessibility. No longer rely on the 
1915         cached markers in Document. Calculate on the fly, which is more accurate in a variety of 
1916         circumstances (like when selection has not moved across words, of if the cursor is in the middle
1917         of a misspelled word). 
1918
1919         Test: platform/mac/accessibility/attributed-string-includes-misspelled-with-selection.html
1920
1921         * accessibility/mac/AccessibilityObjectWrapper.mm:
1922         (AXAttributeStringSetSpelling):
1923         (AXAttributedStringAppendText):
1924         (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
1925
1926 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
1927
1928         Reviewed by Oliver Hunt.
1929
1930         Bug 42621 - Add a bump allocator for the YARR interpreter
1931
1932         The regex engine requires lifo allocation, however currently uses the general purpose
1933         malloc/free memory allocation.  A simple bump pointer allocator should provide a lower
1934         overhead allocation solution.
1935
1936         * ForwardingHeaders/wtf/BumpPointerAllocator.h: Added.
1937
1938 2010-07-27  Pavel Feldman  <pfeldman@chromium.org>
1939
1940         Reviewed by Joseph Pecoraro.
1941
1942         Web Inspector: render network timing as gant chart in popover.
1943
1944         https://bugs.webkit.org/show_bug.cgi?id=43051
1945
1946         * inspector/InspectorResource.cpp:
1947         (WebCore::InspectorResource::buildObjectForTiming):
1948         * inspector/front-end/ResourcesPanel.js:
1949         (WebInspector.ResourcesPanel.prototype._showPopover):
1950         * inspector/front-end/inspector.css:
1951         (.resource-timing-row):
1952         (.resource-timing-bar):
1953         (.resource-timing-bar-title):
1954         * inspector/front-end/utilities.js:
1955
1956 2010-07-27  Victor Wang  <victorw@chromium.org>
1957
1958         Unreviewed, rolling out r64104.
1959         http://trac.webkit.org/changeset/64104
1960         https://bugs.webkit.org/show_bug.cgi?id=40768
1961
1962         The patch causes chromium webkit socket laytest crashes on
1963         windows randomly
1964
1965         * inspector/InspectorController.cpp:
1966         (WebCore::InspectorController::addResource):
1967         (WebCore::InspectorController::removeResource):
1968         * inspector/InspectorController.h:
1969         * inspector/InspectorResource.cpp:
1970         (WebCore::InspectorResource::InspectorResource):
1971         (WebCore::InspectorResource::updateScriptObject):
1972         (WebCore::InspectorResource::cachedResource):
1973         (WebCore::InspectorResource::type):
1974         (WebCore::InspectorResource::resourceData):
1975         * inspector/InspectorResource.h:
1976         (WebCore::InspectorResource::):
1977         (WebCore::InspectorResource::create):
1978         * inspector/front-end/Resource.js:
1979         (WebInspector.Resource.Type.toString):
1980         (WebInspector.Resource.prototype.set type):
1981         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
1982         * inspector/front-end/ResourceView.js:
1983         (WebInspector.ResourceView.prototype._refreshRequestHeaders):
1984         (WebInspector.ResourceView.prototype._refreshResponseHeaders):
1985         (WebInspector.ResourceView.prototype._refreshHeaders):
1986         * inspector/front-end/inspector.css:
1987         (.resources-category-scripts, .resources-category-xhr, .resources-category-fonts, .resources-category-other):
1988         * inspector/front-end/inspector.js:
1989         (WebInspector.loaded):
1990         (WebInspector.updateResource):
1991         * websockets/WebSocketChannel.cpp:
1992         (WebCore::WebSocketChannel::WebSocketChannel):
1993         (WebCore::WebSocketChannel::disconnect):
1994         (WebCore::WebSocketChannel::didOpen):
1995         (WebCore::WebSocketChannel::didClose):
1996         (WebCore::WebSocketChannel::processBuffer):
1997         * websockets/WebSocketChannel.h:
1998
1999 2010-07-27  Andrei Popescu  <andreip@google.com>
2000
2001         Reviewed by Jeremy Orlow.
2002
2003         [IndexedDB] Key range methods belong to the IDBKeyRange interface
2004         https://bugs.webkit.org/show_bug.cgi?id=43052
2005
2006         Move the key range methods from the IndexedDatabaseRequest interface
2007         to the IDBKeyRange interface. Also add a global IDBKeyRange object
2008         that can be used to access the IDBKeyRange constants and factory methods. 
2009
2010         * page/DOMWindow.cpp:
2011         (WebCore::DOMWindow::clear):
2012         (WebCore::DOMWindow::iDBKeyRange):
2013         * page/DOMWindow.h:
2014         * page/DOMWindow.idl:
2015         * storage/IDBKeyRange.cpp:
2016         (WebCore::IDBKeyRange::only):
2017         (WebCore::IDBKeyRange::leftBound):
2018         (WebCore::IDBKeyRange::rightBound):
2019         (WebCore::IDBKeyRange::bound):
2020         * storage/IDBKeyRange.h:
2021         * storage/IDBKeyRange.idl:
2022         * storage/IndexedDatabaseRequest.cpp:
2023         * storage/IndexedDatabaseRequest.h:
2024         * storage/IndexedDatabaseRequest.idl:
2025
2026 2010-07-27  Chris Fleizach  <cfleizach@apple.com>
2027
2028         Reviewed by Darin Adler.
2029
2030         AX: consolidate parentObjectIfExists() and parentObject() code
2031         https://bugs.webkit.org/show_bug.cgi?id=42981
2032
2033         Consolidate duplicate code in parentObject and parentObjectIfExists
2034
2035         No tests. No functionality changed.
2036
2037         * accessibility/AccessibilityRenderObject.cpp:
2038         (WebCore::AccessibilityRenderObject::renderParentObject):
2039         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
2040         (WebCore::AccessibilityRenderObject::parentObject):
2041         * accessibility/AccessibilityRenderObject.h:
2042
2043 2010-07-27  Chris Fleizach  <cfleizach@apple.com>
2044
2045         Reviewed by Adam Barth.
2046
2047         AX: replace m_renderer->document->axObjectCache() with just axObjectCache()
2048         https://bugs.webkit.org/show_bug.cgi?id=42979
2049
2050         No new tests. Code cleanup only.
2051
2052         * accessibility/AccessibilityRenderObject.cpp:
2053         (WebCore::AccessibilityRenderObject::firstChild):
2054         (WebCore::AccessibilityRenderObject::lastChild):
2055         (WebCore::AccessibilityRenderObject::previousSibling):
2056         (WebCore::AccessibilityRenderObject::nextSibling):
2057         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
2058         (WebCore::AccessibilityRenderObject::parentObject):
2059         (WebCore::AccessibilityRenderObject::menuForMenuButton):
2060         (WebCore::AccessibilityRenderObject::menuButtonForMenu):
2061         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2062         (WebCore::AccessibilityRenderObject::axObjectCache):
2063         (WebCore::AccessibilityRenderObject::contentChanged):
2064         (WebCore::AccessibilityRenderObject::addChildren):
2065
2066 2010-07-27  Pavel Podivilov  <podivilov@chromium.org>
2067
2068         Reviewed by Pavel Feldman.
2069
2070         Web Inspector: do not activate all breakpoints on page reload
2071         https://bugs.webkit.org/show_bug.cgi?id=41461
2072
2073         Test: inspector/debugger-breakpoints-not-activated-on-reload.html
2074
2075         * inspector/front-end/ScriptView.js:
2076         (WebInspector.ScriptView.prototype._addBreakpoint):
2077         * inspector/front-end/ScriptsPanel.js:
2078         (WebInspector.ScriptsPanel):
2079         (WebInspector.ScriptsPanel.prototype._breakpointAdded):
2080         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
2081         * inspector/front-end/SourceView.js:
2082         (WebInspector.SourceView.prototype._addBreakpoint):
2083
2084 2010-07-27  Pranav Kedia  <pranavk@chromium.org>
2085
2086         Reviewed by Adam Barth.
2087
2088         Chrome browser Bug: Pause button stays when <audio> hits end
2089         https://bugs.webkit.org/show_bug.cgi?id=42677
2090
2091         The change is just in chromium media. Tested using media part of
2092         WebKit layout tests. The following test that was failing is passing.
2093         media/video-duration-known-after-eos.html -> unexpected pass
2094
2095         * rendering/RenderMediaControlsChromium.cpp:
2096         (WebCore::paintMediaPlayButton):
2097         Using mediaElement->canPlay() instead of mediaElement->paused() to
2098         paint the play/pause button.
2099
2100 2010-07-27  Steve Block  <steveblock@google.com>
2101
2102         Reviewed by Jeremy Orlow.
2103
2104         Client-based Geolocation does not pass enableHighAccuracy option to controller and client
2105         https://bugs.webkit.org/show_bug.cgi?id=40374
2106
2107         This change passes the enableHighAccuracy request option to the GeolocationController.
2108         The GeolocationController tracks whether this should be used by the client.
2109
2110         No new tests possible as the mock provider doesn't support this feature.
2111
2112         * page/Geolocation.cpp:
2113         (WebCore::Geolocation::setIsAllowed):
2114         (WebCore::Geolocation::startUpdating):
2115         * page/GeolocationController.cpp:
2116         (WebCore::GeolocationController::addObserver):
2117         (WebCore::GeolocationController::removeObserver):
2118         * page/GeolocationController.h:
2119         * page/GeolocationControllerClient.h:
2120
2121 2010-07-27  Ilya Tikhonovsky  <loislo@chromium.org>
2122
2123         Reviewed by Pavel Feldman.
2124
2125         WebInspector: Current implementation of message based inspector
2126         transport generated by CodeGeneratorInspector should be upstreamed
2127         from WebKit/chromium to WebCore.
2128         https://bugs.webkit.org/show_bug.cgi?id=42983
2129
2130         * Android.derived.v8bindings.mk:
2131         * CMakeLists.txt:
2132         * DerivedSources.cpp:
2133         * DerivedSources.make:
2134         * GNUmakefile.am:
2135         * WebCore.exp.in:
2136         * WebCore.gypi:
2137         * WebCore.pri:
2138         * WebCore.vcproj/WebCore.vcproj:
2139         * WebCore.xcodeproj/project.pbxproj:
2140         * bindings/js/ScriptObject.cpp:
2141         * bindings/js/ScriptObject.h:
2142         * bindings/v8/ScriptObject.cpp:
2143         * bindings/v8/ScriptObject.h:
2144         * inspector/CodeGeneratorInspector.pm:
2145         * inspector/InspectorBackend.idl: Removed.
2146         * inspector/InspectorFrontendClient.h:
2147         * inspector/InspectorFrontendClientLocal.cpp:
2148         (WebCore::InspectorFrontendClientLocal::windowObjectCleared):
2149         (WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
2150         * inspector/InspectorFrontendClientLocal.h:
2151         * inspector/InspectorFrontendHost.cpp:
2152         (WebCore::InspectorFrontendHost::sendMessageToBackend):
2153         * inspector/InspectorFrontendHost.h:
2154         * inspector/InspectorFrontendHost.idl:
2155         * inspector/front-end/InspectorBackendStub.js:
2156         (.WebInspector.InspectorBackendStub):
2157         (.WebInspector.InspectorBackendStub.prototype._registerDelegate):
2158         (.WebInspector.InspectorBackendStub.prototype.sendMessageToBackend):
2159
2160 2010-07-27  Satish Sampath  <satish@chromium.org>
2161
2162         Reviewed by Kent Tamura.
2163
2164         Simplify speech input plumbing in webcore and webkit
2165         https://bugs.webkit.org/show_bug.cgi?id=43008
2166
2167         No new tests as functionality is not changed.
2168
2169         * GNUmakefile.am: Removed a header file.
2170         * WebCore.gypi:
2171         * WebCore.pro:
2172         * WebCore.vcproj/WebCore.vcproj:
2173         * WebCore.xcodeproj/project.pbxproj:
2174         * page/Page.cpp:
2175         (WebCore::Page::speechInput): Creates and returns SpeechInput when needed.
2176         * page/Page.h:
2177         * page/SpeechInput.cpp: Added methods to proxy and callbacks between input elements and WebKit
2178         (WebCore::SpeechInput::SpeechInput):
2179         (WebCore::SpeechInput::didCompleteRecording):
2180         (WebCore::SpeechInput::didCompleteRecognition):
2181         (WebCore::SpeechInput::setRecognitionResult):
2182         (WebCore::SpeechInput::startRecognition):
2183         (WebCore::SpeechInput::stopRecording):
2184         * page/SpeechInput.h:
2185         * page/SpeechInputClient.h:
2186         * page/SpeechInputClientListener.h: Removed.
2187         * page/SpeechInputListener.h:
2188         * rendering/TextControlInnerElements.cpp: Added one more callback.
2189         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
2190         (WebCore::InputFieldSpeechButtonElement::speechInput):
2191         (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition):
2192         * rendering/TextControlInnerElements.h:
2193
2194 2010-07-27  Kent Tamura  <tkent@chromium.org>
2195
2196         Reviewed by Ojan Vafai.
2197
2198         Add a runtime setting for interactive form validation.
2199         https://bugs.webkit.org/show_bug.cgi?id=40520
2200
2201         The interactive validation feature was disabled for non-strict
2202         modes by r61059 to avoid a compatibility issue. This removes the
2203         mode checking and introduce a runtime setting to enable/disable
2204         the feature instead.
2205         The default value is 'disable' and we'll remove the setting when
2206         the compatibility issue is resolved and interactive validation
2207         implementation is completed.
2208
2209         * html/HTMLFormElement.cpp:
2210         (WebCore::HTMLFormElement::validateInteractively):
2211         * page/Settings.cpp:
2212         (WebCore::Settings::Settings):
2213         * page/Settings.h:
2214         (WebCore::Settings::setInteractiveFormValidationEnabled):
2215         (WebCore::Settings::interactiveFormValidationEnabled):
2216
2217 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
2218
2219         Reviewed by Oliver Hunt.
2220
2221         Bug 43009 - Abstract out page allocation from executable allocators
2222
2223         * ForwardingHeaders/wtf/PageAllocation.h: Added.
2224
2225 2010-07-26  Yuta Kitamura  <yutak@chromium.org>
2226
2227         Reviewed by Pavel Feldman.
2228
2229         Add WebSocket resource type to Web Inspector.
2230
2231         When a new WebSocket connection is established, a line for that connection
2232         will appear in Web Inspector's Resources tab. If the resource name is
2233         clicked, the details of handshake request and response will be shown.
2234
2235         Web Inspector: WebSocket in Resources tab
2236         https://bugs.webkit.org/show_bug.cgi?id=40768
2237
2238         * inspector/InspectorController.cpp:
2239         (WebCore::InspectorController::addResource): WebSocket resource does not
2240         have an associated loader, thus frame might be null. Need to check it.
2241         (WebCore::InspectorController::removeResource): Ditto.
2242         (WebCore::InspectorController::didCreateWebSocket):
2243         (WebCore::InspectorController::willSendWebSocketHandshakeRequest):
2244         (WebCore::InspectorController::didReceiveWebSocketHandshakeResponse):
2245         (WebCore::InspectorController::didCloseWebSocket):
2246         * inspector/InspectorController.h:
2247         * inspector/InspectorResource.cpp: Add null checks of m_loader and m_frame,
2248         because WebSocket does not have a loader and we need to allow null for
2249         these variables.
2250         (WebCore::createReadableStringFromBinary):
2251         (WebCore::InspectorResource::InspectorResource):
2252         (WebCore::InspectorResource::create): Factory function of
2253         regular (non-WebSocket) resources.
2254         (WebCore::InspectorResource::createWebSocket): Factory function of
2255         WebSocket resources.
2256         (WebCore::InspectorResource::updateWebSocketRequest):
2257         (WebCore::InspectorResource::updateWebSocketResponse):
2258         (WebCore::InspectorResource::updateScriptObject): m_frame->document() becomes
2259         available when Frame::setDocument() is called. We cannot obtain documentURL
2260         during the constructor or updateRequest() function, because m_frame->document()
2261         is not available yet at that point and documentURL will contain a wrong URL.
2262         As far as I know, updateScriptObject() is the only place where we can safely
2263         obtain documentURL.
2264         (WebCore::InspectorResource::cachedResource):
2265         (WebCore::InspectorResource::type):
2266         (WebCore::InspectorResource::resourceData):
2267         * inspector/InspectorResource.h:
2268         (WebCore::InspectorResource::):
2269         (WebCore::InspectorResource::markWebSocket):
2270         * inspector/front-end/Resource.js:
2271         (WebInspector.Resource.Type.toString):
2272         (WebInspector.Resource.prototype.set type):
2273         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
2274         * inspector/front-end/ResourceView.js:
2275         (WebInspector.ResourceView.prototype._refreshRequestHeaders):
2276         (WebInspector.ResourceView.prototype._refreshResponseHeaders):
2277         (WebInspector.ResourceView.prototype._refreshHeaders):
2278         * inspector/front-end/inspector.css:
2279         (.resources-category-websockets, .resources-category-other):
2280         (.resources-category-websockets .resources-graph-bar):
2281         (.resources-category-websockets.resource-cached .resources-graph-bar):
2282         * inspector/front-end/inspector.js:
2283         (WebInspector.loaded):
2284         (WebInspector.updateResource):
2285         * websockets/WebSocketChannel.cpp:
2286         (WebCore::WebSocketChannel::WebSocketChannel):
2287         (WebCore::WebSocketChannel::disconnect):
2288         (WebCore::WebSocketChannel::didOpen):
2289         (WebCore::WebSocketChannel::didClose):
2290         (WebCore::WebSocketChannel::processBuffer):
2291         (WebCore::WebSocketChannel::identifier):
2292         * websockets/WebSocketChannel.h:
2293
2294 2010-07-26  Cosmin Truta  <ctruta@chromium.org>
2295
2296         Reviewed by Eric Seidel.
2297
2298         Some SVGs with empty <g> elements crash Chromium on Linux
2299         https://bugs.webkit.org/show_bug.cgi?id=41175
2300
2301         Redo the old fix using a different approach, to avoid regressing
2302         svg/batik/filters/filterRegions.svg with Chromium on Linux.
2303         Specifically, handle empty SkBitmap objects by exiting early upon
2304         encountering unconfigured (i.e. empty) bitmaps.
2305
2306         No new tests. This bug's old test (svg/filters/filter-empty-g.svg)
2307         and the above-mentioned regressed test are expected to pass.
2308
2309         * WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
2310         (ImageBuffer::ImageBuffer): Undo the old fix.
2311         (getImageData): The new fix.
2312
2313 2010-07-26  Simon Fraser  <simon.fraser@apple.com>
2314
2315         Reviewed by Dan Bernstein.
2316
2317         Google image search results broken on pages with Flash
2318         https://bugs.webkit.org/show_bug.cgi?id=43014
2319
2320         The test for overflow added in r63452 is wrong in that it ignores the effects
2321         of positioning on overflow.
2322         
2323         The correct approach is to start by using RenderView's layoutOverflowRect as the largest bounds,
2324         then getting the oveflow rect via backgroundClipRect() relative to the root layer.
2325         
2326         Test: compositing/geometry/limit-layer-bounds-overflow-root.html
2327
2328         * rendering/RenderLayerBacking.cpp:
2329         (WebCore::layerOrAncestorIsTransformed):
2330         (WebCore::RenderLayerBacking::updateCompositedBounds):
2331
2332 2010-07-26  Anders Carlsson  <andersca@apple.com>
2333
2334         Reviewed by Sam Weinig.
2335
2336         Plug-in views should be able to return JSObjects directly
2337         https://bugs.webkit.org/show_bug.cgi?id=43019
2338
2339         * bindings/js/JSHTMLAppletElementCustom.cpp:
2340         (WebCore::JSHTMLAppletElement::putDelegate):
2341         (WebCore::JSHTMLAppletElement::getCallData):
2342         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2343         (WebCore::JSHTMLEmbedElement::putDelegate):
2344         (WebCore::JSHTMLEmbedElement::getCallData):
2345         * bindings/js/JSHTMLObjectElementCustom.cpp:
2346         (WebCore::JSHTMLObjectElement::putDelegate):
2347         (WebCore::JSHTMLObjectElement::getCallData):
2348         runtimeObjectCustomPut and runtimeObjectGetCallData now take a JSHTMLElement instead of a HTMLElement.
2349
2350         * bindings/js/JSPluginElementFunctions.cpp:
2351         (WebCore::pluginScriptObject):
2352         First, ask the PluginViewBase for a JSObject and fall back to getting the JSObject from the instance.
2353
2354         (WebCore::runtimeObjectPropertyGetter):
2355         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
2356         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
2357         Call pluginScriptObject.
2358         
2359         (WebCore::runtimeObjectCustomPut):
2360         Change to take a JSHTMLElement. Call pluginScriptObject.
2361         
2362         (WebCore::runtimeObjectGetCallData):
2363         Change to take a JSHTMLElement.
2364
2365         * bridge/jsc/BridgeJSC.cpp:
2366         * bridge/jsc/BridgeJSC.h:
2367         (JSC::Bindings::Instance::createRuntimeObject):
2368         Change this to return a JSObject.
2369         
2370         * html/HTMLPlugInElement.cpp:
2371         (WebCore::HTMLPlugInElement::getInstance):
2372         Call pluginWidget.
2373
2374         (WebCore::HTMLPlugInElement::pluginWidget):
2375         Return the plug-in widget for this element.
2376
2377         * html/HTMLPlugInElement.h:
2378         * plugins/PluginViewBase.h:
2379         (WebCore::PluginViewBase::scriptObject):
2380         Add default implementation of scriptObject.
2381
2382 2010-07-26  Chris Fleizach  <cfleizach@apple.com>
2383
2384         Reviewed by Darin Adler.
2385
2386         AX: Safari does not support ARIA mixed checkboxes
2387         https://bugs.webkit.org/show_bug.cgi?id=43016
2388
2389         Test: platform/mac/accessibility/mixed-checkbox.html
2390
2391         * accessibility/AccessibilityObject.cpp:
2392         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2393         * accessibility/AccessibilityObject.h:
2394         * accessibility/AccessibilityRenderObject.cpp:
2395         (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
2396         (WebCore::AccessibilityRenderObject::checkboxOrRadioValue):
2397         * accessibility/AccessibilityRenderObject.h:
2398         * accessibility/mac/AccessibilityObjectWrapper.mm:
2399         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2400
2401 2010-07-26  Shimeng (Simon) Wang  <swang@google.com>
2402
2403         Reviewed by Darin Adler.
2404
2405         Add auto hyphenation support for Android.
2406         https://bugs.webkit.org/show_bug.cgi?id=42800
2407
2408         * platform/text/android/HyphenationAndroid.cpp: Added.
2409         (WebCore::loadHyphenationDictionary):
2410         (WebCore::lastHyphenLocation):
2411
2412 2010-07-26  Sam Weinig  <sam@webkit.org>
2413
2414         Reviewed by Anders Carlsson.
2415
2416         Patch for https://bugs.webkit.org/show_bug.cgi?id=43013
2417         Part of <rdar://problem/8152434>
2418         Add support for scrolling using the keyboard in WebKit2
2419
2420         Add a new export and make WindowsKeyboardCodes private.
2421
2422         * WebCore.exp.in:
2423         * WebCore.xcodeproj/project.pbxproj:
2424
2425 2010-07-26  Darin Adler  <darin@apple.com>
2426
2427         Reviewed by Eric Carlson.
2428
2429         Don't handle empty URL attributes specially in reflection, even in cases such as <img src="">
2430         https://bugs.webkit.org/show_bug.cgi?id=42087
2431
2432         * html/HTMLMediaElement.cpp:
2433         (WebCore::HTMLMediaElement::insertedIntoDocument): Check if the src attribute is empty
2434         by calling getAttribute instead of calling the src function. This keeps the behavior
2435         correct with the reflection change, and has a side benefit of being more efficient as
2436         well since there is no reason to resolve the URL.
2437         (WebCore::HTMLMediaElement::loadResource): Call getNonEmptyURLAttribute directly here
2438         instead of using the poster function.
2439         (WebCore::HTMLMediaElement::getPluginProxyParams): Ditto.
2440
2441         * html/HTMLMediaElement.h: Removed the poster virtual function. The code that gets the
2442         poster attribute is already video-specific and uses generic attribute fetching code, so
2443         we no longer need a virtual function. Removed the src function. Since this would give
2444         a different result from the JavaScript reflected src attribute, it's safer not to have
2445         it, and it was easy to convert all the callers.
2446
2447         * html/HTMLMediaElement.idl: Removed the NonEmpty extended attribute from the src
2448         attribute.
2449
2450         * html/HTMLSourceElement.cpp: Removed the src function for the same reason as above.
2451         * html/HTMLSourceElement.h: Ditto.
2452
2453         * html/HTMLSourceElement.idl: Removed the NonEmpty extended attribute from the src
2454         attribute.
2455
2456         * html/HTMLVideoElement.cpp:
2457         (WebCore::HTMLVideoElement::parseMappedAttribute): Removed code to update m_posterURL,
2458         which is no longer needed. Changed call site that used the poster() function to instead
2459         use getNonEmptyURLAttribute.
2460         (WebCore::HTMLVideoElement::updatePosterImage): Check if the poster attribute is empty
2461         by calling getAttribute instead of calling the poster function. This keeps the behavior
2462         correct with the reflection change, and has a side benefit of being more efficient as
2463         well since there is no reason to resolve the URL.
2464
2465         * html/HTMLVideoElement.h: Removed the poster function for the same reason we removed
2466         the src function above. Also removed now-unneeded m_posterURL data member.
2467
2468         * html/HTMLVideoElement.idl: Removed the NonEmpty extended attribute from the poster
2469         attribute.
2470
2471 2010-07-26  Chris Fleizach  <cfleizach@apple.com>
2472
2473         Reviewed by Darin Adler.
2474
2475         AX: remove intValue() hasIntValue() from AccessibilityObject
2476         https://bugs.webkit.org/show_bug.cgi?id=43006
2477
2478         These methods are very Mac centric. The mac centric code should be moved into the Mac wrapper.
2479
2480         No new tests, existing tests cover changes to logic.
2481
2482         * accessibility/AccessibilityObject.cpp:
2483         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2484         * accessibility/AccessibilityObject.h:
2485         (WebCore::):
2486         * accessibility/AccessibilityRenderObject.cpp:
2487         (WebCore::AccessibilityRenderObject::selectedRadioButton):
2488         (WebCore::AccessibilityRenderObject::selectedTabItem):
2489         (WebCore::AccessibilityRenderObject::checkboxOrRadioValue):
2490         * accessibility/AccessibilityRenderObject.h:
2491         * accessibility/mac/AccessibilityObjectWrapper.mm:
2492         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2493
2494 2010-07-26  Ryosuke Niwa  <rniwa@webkit.org>
2495
2496         Reviewed by Darin Adler.
2497
2498         Applying inline style to a text node whose parent is an inline editable root causes crash
2499         https://bugs.webkit.org/show_bug.cgi?id=39989
2500
2501         The crash was caused by splitTextElementAtStart and splitTextElementAtEnd assuming that the parent
2502         and the grandparent of the specified text node is editable.
2503
2504         Modified splitTextElementAtStart and splitTextElementAtEnd so that they call splitTextAtStart
2505         and splitTextAtEnd respectively when the grandparent is not editable.
2506
2507         Also modified SplitTextNodeContainingElement to exit early if the grandparent of m_text is not editable.
2508
2509         Test: editing/style/style-text-node-without-editable-parent.html
2510
2511         * editing/ApplyStyleCommand.cpp:
2512         (WebCore::ApplyStyleCommand::splitTextElementAtStart):
2513         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
2514         * editing/SplitTextNodeContainingElementCommand.cpp:
2515         (WebCore::SplitTextNodeContainingElementCommand::doApply):
2516
2517 2010-07-26  Simon Fraser  <simon.fraser@apple.com>
2518
2519         Reviewed by Anders Carlsson.
2520
2521         Gmail compose is upside-down after r64054
2522         https://bugs.webkit.org/show_bug.cgi?id=43000
2523         
2524         We need to call setGeometryOrientation() whenever the iframe compositing layer attachment changes,
2525         not just when requiresScrollLayer() returns false. This ensures that the orientation is updated
2526         correctly.
2527
2528         Test: compositing/iframes/iframe-content-flipping.html
2529
2530         * rendering/RenderLayerCompositor.cpp:
2531         (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
2532
2533 2010-07-26  Justin Schuh  <jschuh@chromium.org>
2534
2535         Reviewed by Darin Fisher.
2536
2537         Check history state against origin before setting
2538         https://bugs.webkit.org/show_bug.cgi?id=42858
2539
2540         Tests: fast/loader/stateobjects/replacestate-base-illegal.html
2541                fast/loader/stateobjects/replacestate-base-legal.html
2542
2543         * page/History.cpp:
2544         (WebCore::History::urlForState):
2545         (WebCore::History::stateObjectAdded):
2546
2547 2010-07-26  Martin Robinson  <mrobinson@igalia.com>
2548
2549         Reviewed by Xan Lopez.
2550
2551         [GTK] Get rid of libgdom
2552         https://bugs.webkit.org/show_bug.cgi?id=42378
2553
2554         Remove all build steps for building GObject DOM bindings.
2555
2556         * GNUmakefile.am: Remove GObject DOM bindings build.
2557
2558 2010-07-26  Mark Rowe  <mrowe@apple.com>
2559
2560         Reviewed by Dan Bernstein.
2561
2562         <http://webkit.org/b/42990> REGRESSION (r63854): Safari RSS layout is broken due to changes in vendor prefix handling
2563
2564         In r63854 support for properties with the -khtml vendor prefix was removed. This breaks the layout of
2565         Safari's RSS interface, several Dashboard widgets that are included with Mac OS X, and at least one
2566         popular third-party Mac OS X application. This change will need to be revisited in a manner that has
2567         a clearer backwards-compatibility strategy. <http://webkit.org/b/42093> will be reopened to track that.
2568
2569         * css/CSSParser.cpp:
2570         (WebCore::cssPropertyID): Revert the WebCore change from r63854.
2571
2572 2010-07-26  Brady Eidson  <beidson@apple.com>
2573
2574         Reviewed by Sam Weinig.
2575
2576         Add ability for WK2 to register a scheme to always be displayed as an empty document
2577         https://bugs.webkit.org/show_bug.cgi?id=42995
2578
2579         No new tests. (Currently not possible to test in WebKit1 DRT, can be testing in future WK2 tester)
2580
2581         * WebCore.exp.in:
2582         
2583         * loader/MainResourceLoader.cpp:
2584         (WebCore::shouldLoadAsEmptyDocument):
2585         
2586         * platform/SchemeRegistry.cpp:
2587         (WebCore::emptyDocumentSchemes):
2588         (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument):
2589         (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument):
2590         * platform/SchemeRegistry.h:
2591
2592 2010-07-26  Patrick Gansterer  <paroga@paroga.com>
2593
2594         Reviewed by Kent Tamura.
2595
2596         [WINCE] Port ClipboardUtilities to WinCE
2597         https://bugs.webkit.org/show_bug.cgi?id=42929
2598
2599         Make ClipboardUtilitiesWin more portable and remove the global namespace prefix
2600         from GlobalLock/GlobalUnlock, since they are only macros on WinCE.
2601
2602         * platform/win/ClipboardUtilitiesWin.cpp:
2603         (WebCore::urlFromPath):
2604         (WebCore::getWebLocData):
2605         (WebCore::createGlobalData):
2606         (WebCore::getURL):
2607         (WebCore::getPlainText):
2608         (WebCore::fragmentFromHTML):
2609
2610 2010-07-26  Patrick Gansterer  <paroga@paroga.com>
2611
2612         Reviewed by Adam Roben.
2613
2614         [WINCE] Buildfix for BitmapImage.h
2615         https://bugs.webkit.org/show_bug.cgi?id=42931
2616
2617         Use AffineTransform insted of TransformationMatrix.
2618
2619         * platform/graphics/BitmapImage.h:
2620
2621 2010-07-26  Dirk Schulze  <krit@webkit.org>
2622
2623         Unreviewed sort of XCode project file.
2624
2625         * WebCore.xcodeproj/project.pbxproj:
2626
2627 2010-07-26  David Kilzer  <ddkilzer@apple.com>
2628
2629         <http://webkit.org/b/42982> Streamline Inspector Source build phase script should use CONFIGURATION not BUILD_STYLE
2630         <rdar://problem/6341764>
2631
2632         Reviewed by Mark Rowe.
2633
2634         * WebCore.xcodeproj/project.pbxproj: Switched Streamline
2635         Inspector Source build phase script to use CONFIGURATION instead
2636         of BUILD_STYLE.
2637
2638 2010-07-23  Ojan Vafai  <ojan@chromium.org>
2639
2640         Reviewed by Darin Adler.
2641
2642         crash in insertParagraph in a contentEditable list
2643         https://bugs.webkit.org/show_bug.cgi?id=42919
2644
2645         Don't try to break out of a list item if the list it's in
2646         is the rootEditableElement.
2647
2648         * editing/CompositeEditCommand.cpp:
2649         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
2650
2651 2010-07-26  Marcus Bulach  <bulach@chromium.org>
2652
2653         Reviewed by Jeremy Orlow.
2654
2655         Moves IDBKeyRange to use IDBKey rather than SerializedScriptValue / IDBAny.
2656         https://bugs.webkit.org/show_bug.cgi?id=42583
2657
2658         Tests: existing storage/indexeddb/idb-keyrange.html must pass.
2659
2660         * storage/IDBKeyRange.cpp:
2661         (WebCore::IDBKeyRange::IDBKeyRange):
2662         * storage/IDBKeyRange.h:
2663         (WebCore::IDBKeyRange::create):
2664         (WebCore::IDBKeyRange::left):
2665         (WebCore::IDBKeyRange::right):
2666         * storage/IDBKeyRange.idl:
2667         * storage/IndexedDatabaseRequest.cpp:
2668         (WebCore::IndexedDatabaseRequest::makeSingleKeyRange):
2669         (WebCore::IndexedDatabaseRequest::makeLeftBoundKeyRange):
2670         (WebCore::IndexedDatabaseRequest::makeRightBoundKeyRange):
2671         (WebCore::IndexedDatabaseRequest::makeBoundKeyRange):
2672         * storage/IndexedDatabaseRequest.h:
2673         * storage/IndexedDatabaseRequest.idl:
2674
2675 2010-07-26  Simon Fraser  <simon.fraser@apple.com>
2676
2677         Reviewed by Anders Carlsson.
2678
2679         Composited layers don't scroll in WebKit2
2680         https://bugs.webkit.org/show_bug.cgi?id=42771
2681
2682         Rename two methods on RenderLayerCompositor to make their use more clear, and call them
2683         when the FrameView gets resized and scrolled.
2684
2685         * page/FrameView.h:
2686         * page/FrameView.cpp:
2687         (WebCore::FrameView::setFrameRect): override so we know when the size of the FrameView changes, so that the
2688         RenderLayerCompositor can update its clipping layer.
2689         (WebCore::FrameView::scrollPositionChanged): Call compositor()->frameViewDidScroll().
2690
2691         * rendering/RenderLayerBacking.cpp:
2692         (WebCore::RenderLayerBacking::updateAfterWidgetResize): updateContentLayerOffset() was renamed.
2693
2694         * rendering/RenderLayerCompositor.h:
2695         * rendering/RenderLayerCompositor.cpp:
2696         (WebCore::RenderLayerCompositor::frameViewDidChangeSize): Renamed from updateContentLayerOffset().
2697         (WebCore::RenderLayerCompositor::frameViewDidScroll): Renamed from updateContentLayerScrollPosition().
2698         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame): Propagate compositing on Mac
2699         for any FrameView that doesn't have a native widget, which is the case with WebKit2.
2700         (WebCore::RenderLayerCompositor::requiresScrollLayer): New method to tell us whether we need to handle
2701         scrolling (and clipping) ourselves.
2702         (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Do geometry flipping on the root platform
2703         layer only if we're not doing our own scrolling, and use the new requiresScrollLayer() method.
2704         (WebCore::RenderLayerCompositor::attachRootPlatformLayer): Send out the rootPlatformLayer(),
2705         so that it returns the clipping layer if we have one.
2706
2707 2010-07-26  Tony Gentilcore  <tonyg@chromium.org>
2708
2709         Reviewed by Darin Fisher.
2710
2711         Move DocumentLoadTiming struct to a new file
2712         https://bugs.webkit.org/show_bug.cgi?id=42917
2713
2714         Also makes DocumentLoadTiming Noncopyable.
2715
2716         No new tests because no new functionality.
2717
2718         * GNUmakefile.am:
2719         * WebCore.gypi:
2720         * WebCore.vcproj/WebCore.vcproj:
2721         * WebCore.xcodeproj/project.pbxproj:
2722         * loader/DocumentLoadTiming.h: Added.
2723         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
2724         * loader/DocumentLoader.h:
2725         * loader/FrameLoader.cpp:
2726         * loader/FrameLoaderTypes.h:
2727         * loader/MainResourceLoader.cpp:
2728         * page/Timing.cpp:
2729
2730 2010-07-26  Mark Rowe  <mrowe@apple.com>
2731
2732         Fix an #if in WebCore.exp.in to correctly detect whether SVG filters are enabled.
2733
2734         * WebCore.exp.in:
2735
2736 2010-07-26  Steve Block  <steveblock@google.com>
2737
2738         Reviewed by Jeremy Orlow.
2739
2740         DeviceOrientation event listeners should never be called synchronously from addEventListener()
2741         https://bugs.webkit.org/show_bug.cgi?id=42304
2742
2743         No new tests as there are currently no implementations to test. Tests will be
2744         added once LayoutTestController methods for providing a mock implementation are
2745         in place, see Bug 39589.
2746
2747         * dom/DeviceOrientationController.cpp:
2748         (WebCore::DeviceOrientationController::DeviceOrientationController):
2749         (WebCore::DeviceOrientationController::timerFired):
2750         (WebCore::DeviceOrientationController::addListener):
2751         (WebCore::DeviceOrientationController::removeListener):
2752         (WebCore::DeviceOrientationController::removeAllListeners):
2753         * dom/DeviceOrientationController.h:
2754
2755 2010-07-26  Andreas Kling  <andreas.kling@nokia.com>
2756
2757         Reviewed by Tor Arne Vestbø.
2758
2759         [Qt] Canvas: Optimize GraphicsContext::addPath()
2760
2761         Avoid "deep concatenating" the canvas path onto the GC path
2762         if the GC path has no elements.
2763
2764         * platform/graphics/qt/GraphicsContextQt.cpp:
2765         (WebCore::GraphicsContext::addPath):
2766
2767 2010-07-23  Stephen White  <senorblanco@chromium.org>
2768
2769         Reviewed by Darin Fisher.
2770
2771         Implement OpenGLES2 helper classes.
2772         https://bugs.webkit.org/show_bug.cgi?id=42905
2773
2774         GLES2Canvas and GLES2Texture are some simple OpenGLES2 helper classes
2775         for managing state, samplers and textures.
2776
2777         When this is hooked up, it will be covered by many layout tests.
2778
2779         * WebCore.gypi:
2780         Add new files to chromium build (contents are protected by #if's for now).
2781         * platform/graphics/chromium/GLES2Canvas.cpp: Added.
2782         (WebCore::affineTo3x3):
2783         (WebCore::GLES2Canvas::State::State):
2784         (WebCore::GLES2Canvas::GLES2Canvas):
2785         (WebCore::GLES2Canvas::~GLES2Canvas):
2786         (WebCore::GLES2Canvas::clearRect):
2787         (WebCore::GLES2Canvas::fillRect):
2788         (WebCore::GLES2Canvas::setFillColor):
2789         (WebCore::GLES2Canvas::setAlpha):
2790         (WebCore::GLES2Canvas::translate):
2791         (WebCore::GLES2Canvas::rotate):
2792         (WebCore::GLES2Canvas::scale):
2793         (WebCore::GLES2Canvas::concatCTM):
2794         (WebCore::GLES2Canvas::save):
2795         (WebCore::GLES2Canvas::restore):
2796         (WebCore::GLES2Canvas::drawTexturedRect):
2797         (WebCore::GLES2Canvas::setCompositeOperation):
2798         (WebCore::GLES2Canvas::applyCompositeOperator):
2799         (WebCore::GLES2Canvas::getQuadVertices):
2800         (WebCore::GLES2Canvas::getQuadIndices):
2801         (WebCore::loadShader):
2802         (WebCore::GLES2Canvas::getSimpleProgram):
2803         (WebCore::GLES2Canvas::getTexProgram):
2804         (WebCore::GLES2Canvas::createTexture):
2805         (WebCore::GLES2Canvas::getTexture):
2806         (WebCore::GLES2Canvas::checkGLError):
2807         * platform/graphics/chromium/GLES2Canvas.h: Added.
2808         (WebCore::GLES2Canvas::gles2Context):
2809         * platform/graphics/chromium/GLES2Texture.cpp: Added.
2810         (WebCore::GLES2Texture::GLES2Texture):
2811         (WebCore::GLES2Texture::~GLES2Texture):
2812         (WebCore::GLES2Texture::create):
2813         (WebCore::convertFormat):
2814         (WebCore::GLES2Texture::load):
2815         (WebCore::GLES2Texture::bind):
2816         * platform/graphics/chromium/GLES2Texture.h: Added.
2817         (WebCore::GLES2Texture::):
2818         (WebCore::GLES2Texture::format):
2819         (WebCore::GLES2Texture::width):
2820         (WebCore::GLES2Texture::height):
2821
2822
2823 2010-07-26  Jeremy Orlow  <jorlow@chromium.org>
2824
2825         Reviewed by Steve Block.
2826
2827         Fix IndexedDB release build on mac
2828         https://bugs.webkit.org/show_bug.cgi?id=42377
2829
2830         * storage/IDBDatabaseImpl.cpp:
2831         (WebCore::IDBDatabaseImpl::objectStore):
2832
2833 2010-07-26  Satish Sampath  <satish@chromium.org>
2834
2835         Reviewed by Steve Block.
2836
2837         Add WebKit plumbing to connect speech requests and callbacks between WebCore and the embedder.
2838         https://bugs.webkit.org/show_bug.cgi?id=42367
2839
2840         No new tests, the relevant LayoutTestController bindings will be added in the next patch.
2841
2842         * page/SpeechInput.cpp: renamed a method.
2843         * page/SpeechInput.h: renamed a method.
2844         * page/SpeechInputClient.h: added an extra method to optionally let users stop recording once they have spoken.
2845         * page/SpeechInputClientListener.h: renamed a method.
2846         * page/SpeechInputListener.h: renamed a method.
2847
2848 2010-07-26  Andreas Kling  <andreas.kling@nokia.com>
2849
2850         Reviewed by Kenneth Rohde Christiansen.
2851
2852         [Qt] getImageData(): Single-pass RGB->BGR and un-premultiplication
2853         https://bugs.webkit.org/show_bug.cgi?id=42945
2854
2855         Combine the two operations into a single loop over the pixel data.
2856         Yields a considerable FPS gain on http://www.semantix.gr/statue.html
2857
2858         * platform/graphics/qt/ImageBufferQt.cpp:
2859         (WebCore::getImageData):
2860
2861 2010-07-26  Pavel Feldman  <pfeldman@chromium.org>
2862
2863         Reviewed by Shinichiro Hamaji.
2864
2865         Web Inspector: make sure proxy objects are JSON-stringifiable.
2866
2867         https://bugs.webkit.org/show_bug.cgi?id=42961
2868
2869         * inspector/front-end/InjectedScript.js:
2870         (injectedScriptConstructor):
2871
2872 2010-07-26  Alexander Pavlov  <apavlov@chromium.org>
2873
2874         Reviewed by Joseph Pecoraro.
2875
2876         Inspector should remember resources sorting set by the user
2877         https://bugs.webkit.org/show_bug.cgi?id=19208
2878
2879         Sorting options both for time and size graphs are memorized in a single property,
2880         which makes them possible to retrieve in a single message (e.g. useful for remote debugging).
2881
2882         * inspector/front-end/ResourcesPanel.js:
2883         (WebInspector.ResourcesPanel.prototype.populateSidebar):
2884         (WebInspector.ResourcesPanel.prototype._settingsLoaded):
2885         (WebInspector.ResourcesPanel.prototype._loadSortOptions):
2886         (WebInspector.ResourcesPanel.prototype._loadSortOptionForGraph):
2887         (WebInspector.ResourcesPanel.prototype._graphSelected):
2888         (WebInspector.ResourcesPanel.prototype._changeSortingFunction):
2889         (WebInspector.ResourcesPanel.prototype._selectedOptionNameForGraph):
2890         (WebInspector.ResourcesPanel.prototype._doChangeSortingFunction):
2891         * inspector/front-end/Settings.js:
2892         (WebInspector.populateApplicationSettings):
2893
2894 2010-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2895
2896         Reviewed by Darin Adler.
2897
2898         Redo fails after text node is split by SplitTextNodeCommand
2899         https://bugs.webkit.org/show_bug.cgi?id=42941
2900
2901         The bug was caused by SplitTextNodeCommand not implementing doReapply.
2902         Implemented doReapply and added insertText1AndTrimText2 to share the code between doApply and doReapply.
2903
2904         Test: editing/undo/redo-split-text-node.html
2905               editing/undo/redo-split-text-node-with-removal.html
2906
2907         * editing/SplitTextNodeCommand.cpp:
2908         (WebCore::SplitTextNodeCommand::doApply): Calls executeApply.
2909         (WebCore::SplitTextNodeCommand::doUnapply): Don't delete m_text1, which is later used in doReapply.
2910         (WebCore::SplitTextNodeCommand::doReapply): Added.
2911         (WebCore::SplitTextNodeCommand::insertText1AndTrimText2): Added.
2912         * editing/SplitTextNodeCommand.h:
2913
2914 2010-07-23  Philippe Normand  <pnormand@igalia.com>
2915
2916         Reviewed by Eric Carlson.
2917
2918         [GTK] media/media-can-play-mpeg-audio.html fails
2919         https://bugs.webkit.org/show_bug.cgi?id=42895
2920
2921         Fixed advertizing of mp3, mpeg and mp4 mime-types in the player.
2922
2923         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2924         (WebCore::mimeTypeCache):
2925
2926 2010-07-23  Philippe Normand  <pnormand@igalia.com>
2927
2928         Reviewed by Eric Carlson.
2929
2930         LayoutTests/media/media-document-audio-size.html failure
2931         https://bugs.webkit.org/show_bug.cgi?id=38376
2932
2933         Advertize audio/x-wav along with audio/wav when appropriate,
2934         otherwise WebKit attempts to use a plugin to play the media.
2935
2936         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2937         (WebCore::mimeTypeCache):
2938
2939 2010-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2940
2941         Reviewed by Kent Tamura.
2942
2943         splitTextAt*IfNeed and splitTextElementAt*IfNeed need to be cleaned up
2944         https://bugs.webkit.org/show_bug.cgi?id=42937
2945
2946         Isolated the code to decide whether or not text node should be split into isValidCaretPositionInTextNode.
2947         Moved the condition check out of *IfNeeded methods to applyRelativeFontStyleChange and applyInlineStyle.
2948
2949         No new tests added since this is a clean up.
2950
2951         * editing/ApplyStyleCommand.cpp:
2952         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Uses isValidCaretPositionInTextNode.
2953         (WebCore::ApplyStyleCommand::applyInlineStyle): Uses isValidCaretPositionInTextNode.
2954         (WebCore::ApplyStyleCommand::splitTextAtStart): Renamed from splitTextAtStartIfNeeded.
2955         (WebCore::ApplyStyleCommand::splitTextAtEnd): Renamed from splitTextAtEndIfNeeded.
2956         (WebCore::ApplyStyleCommand::splitTextElementAtStart): Renamed from splitTextElementAtStartIfNeeded.
2957         (WebCore::ApplyStyleCommand::splitTextElementAtEnd): Renamed from splitTextElementAtEndIfNeeded.
2958         (WebCore::ApplyStyleCommand::isValidCaretPositionInTextNode): Returns true if the position lies within a text node.
2959         * editing/ApplyStyleCommand.h:
2960
2961 2010-07-25  Patrick Gansterer  <paroga@paroga.com>
2962
2963         Reviewed by Kent Tamura.
2964
2965         [WINCE] Buildfix for ImageBufferWince
2966         https://bugs.webkit.org/show_bug.cgi?id=42928
2967
2968         * platform/graphics/wince/ImageBufferWince.cpp:
2969         (WebCore::):
2970         (WebCore::BufferedImage::draw): Pass through ColorSpace parameter.
2971         (WebCore::BufferedImage::drawPattern): Ditto.
2972         (WebCore::ImageBuffer::platformTransformColorSpace): Added.
2973
2974 2010-07-25  Patrick Gansterer  <paroga@paroga.com>
2975
2976         Reviewed by Kent Tamura.
2977
2978         [WINCE] Buildfix for PopupMenuWin.cpp
2979         https://bugs.webkit.org/show_bug.cgi?id=42932
2980
2981         Add #if !OS(WINCE) around unsupported window messages.
2982
2983         * platform/win/PopupMenuWin.cpp:
2984         (WebCore::PopupMenu::show):
2985         (WebCore::PopupMenu::wndProc):
2986
2987 2010-07-25  Adam Barth  <abarth@webkit.org>
2988
2989         Reviewed by Eric Seidel.
2990
2991         Implement adjustMathMLAttributes
2992         https://bugs.webkit.org/show_bug.cgi?id=42952
2993
2994         This is kind of mechanical overkill for adjusting one attribute name,
2995         but it's nice to use the same machinery as SVG.
2996
2997         * html/HTMLTreeBuilder.cpp:
2998         * mathml/mathattrs.in:
2999
3000 2010-07-25  Adam Barth  <abarth@webkit.org>
3001
3002         Reviewed by Eric Seidel.
3003
3004         Functions supporting the legacy tree builder are confusing
3005         https://bugs.webkit.org/show_bug.cgi?id=42951
3006
3007         This patch just inlines these functions into their one call site and
3008         removes the notImplemented() calls.  We thought we were going to grow
3009         these to support the new tree builder, but we took a different path.
3010         Previous to this patch, these functions were confusing because they
3011         looked like part of the new tree builder.
3012
3013         * html/HTMLTreeBuilder.cpp:
3014         (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
3015         * html/HTMLTreeBuilder.h:
3016
3017 2010-07-25  Adam Barth  <abarth@webkit.org>
3018
3019         Reviewed by Eric Seidel.
3020
3021         Recent HTML5 TreeBuilder Regression?  All canvas tests ASSERT
3022         https://bugs.webkit.org/show_bug.cgi?id=42948
3023
3024         Remove ASSERT and replace with correct branch.  I put this ASSERT in
3025         to make sure we had test coverage for this branch.  I guess we do.  :)
3026
3027         * html/HTMLConstructionSite.cpp:
3028         (WebCore::HTMLConstructionSite::attach):
3029
3030 2010-07-25  Pavel Feldman  <pfeldman@chromium.org>
3031
3032         Reviewed by Timothy Hatcher.
3033
3034         Web Inspector: check of jQuery object type prior to treating it as an array.
3035
3036         https://bugs.webkit.org/show_bug.cgi?id=42946
3037
3038         * inspector/front-end/InjectedScript.js:
3039         (injectedScriptConstructor):
3040
3041 2010-07-24  Daniel Bates  <dbates@rim.com>
3042
3043         Unreviewed, build fix when building with WML support.
3044
3045         PageCache.cpp compile error when WML is enabled
3046         https://bugs.webkit.org/show_bug.cgi?id=40765
3047
3048         Remove extraneous semicolon.
3049
3050         Note, building with WML support enabled is broken
3051         even with this fix. See Bug #42943 for more details.
3052
3053         * history/PageCache.cpp:
3054         (WebCore::PageCache::canCachePageContainingThisFrame):
3055
3056 2010-07-24  Adam Barth  <abarth@webkit.org>
3057
3058         Reviewed by Eric Seidel.
3059
3060         Atomize strings used by the HTML5 tree builder
3061         https://bugs.webkit.org/show_bug.cgi?id=42875
3062
3063         This is about a 1% improvement to the parsing benchmark.
3064
3065         * html/HTMLTagNames.in:
3066         * html/HTMLTreeBuilder.cpp:
3067         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3068         (WebCore::HTMLTreeBuilder::processStartTag):
3069         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3070         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3071
3072 2010-07-24  Patrick Gansterer  <paroga@paroga.com>
3073
3074         Reviewed by Darin Adler.
3075
3076         Buildfix for !ENABLE(INSPECTOR) after r63891.
3077         https://bugs.webkit.org/show_bug.cgi?id=42925
3078
3079         * bindings/js/ScriptValue.cpp: Added property svn:eol-style.
3080         * bindings/js/ScriptValue.h: Added property svn:eol-style.
3081         * inspector/ConsoleMessage.cpp: Added property svn:eol-style.
3082         * inspector/ConsoleMessage.h: Added property svn:eol-style.
3083
3084 2010-07-24  Adam Barth  <abarth@webkit.org>
3085
3086         Reviewed by Eric Seidel.
3087
3088         Re-order whitespace checks in the tokenizer
3089         https://bugs.webkit.org/show_bug.cgi?id=42923
3090
3091         This saves about 0.5% on the parsing benchmark.
3092
3093         * html/HTMLTokenizer.cpp:
3094
3095 2010-07-24  Andreas Kling  <andreas.kling@nokia.com>
3096
3097         Reviewed by Simon Hausmann.
3098
3099         [Qt] tst_QWebFrame::callQtInvokable() fails
3100         https://bugs.webkit.org/show_bug.cgi?id=41065
3101
3102         Converting JS objects to QVariantMaps was broken.
3103         This is a partial revert of <http://trac.webkit.org/changeset/61478>
3104
3105         * bridge/qt/qt_runtime.cpp:
3106         (JSC::Bindings::convertValueToQVariant): Remove erroneous crash guard
3107         around JSObject::getPropertyNames()
3108
3109 2010-07-24  Adam Barth  <abarth@webkit.org>
3110
3111         Reviewed by Eric Seidel.
3112
3113         Save a per-character branch in the HTML parser
3114         https://bugs.webkit.org/show_bug.cgi?id=42921
3115
3116         The parsing benchmark claims this is a wash, but it makes me feel
3117         better.
3118
3119         * html/HTMLToken.h:
3120         (WebCore::HTMLToken::clear):
3121         (WebCore::HTMLToken::beginStartTag):
3122         (WebCore::HTMLToken::beginEndTag):
3123         (WebCore::HTMLToken::ensureIsCharacterToken):
3124         (WebCore::HTMLToken::beginComment):
3125         (WebCore::HTMLToken::beginDOCTYPE):
3126         * html/HTMLTokenizer.cpp:
3127         (WebCore::HTMLTokenizer::bufferCharacter):
3128
3129 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
3130
3131         Reviewed by Darin Adler.
3132
3133         Buildfix for !ENABLE(FILTERS) after r63531.
3134         https://bugs.webkit.org/show_bug.cgi?id=42914
3135
3136         * rendering/RenderSVGContainer.cpp: Add missing header.
3137
3138 2010-07-23  Kavita Kanetkar  <kkanetkar@chromium.org>
3139
3140         Reviewed by Joseph Pecoraro.
3141
3142         Implement remaining Inspector support for chrome's appcache
3143         https://bugs.webkit.org/show_bug.cgi?id=42426
3144
3145         * inspector/InspectorApplicationCacheAgent.cpp:
3146         (WebCore::InspectorApplicationCacheAgent::getApplicationCaches):
3147         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
3148         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
3149         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
3150         * inspector/InspectorApplicationCacheAgent.h:
3151         (WebCore::InspectorController::connectFrontend):
3152         * loader/appcache/ApplicationCacheHost.cpp:
3153         (WebCore::ApplicationCacheHost::fillResourceList):
3154         (WebCore::ApplicationCacheHost::applicationCacheInfo):
3155         * loader/appcache/ApplicationCacheHost.h: Changed creation + update times to double and moved appcache info here from InspectorApplicationCacheAgent.h
3156         (WebCore::ApplicationCacheHost::CacheInfo::CacheInfo):
3157         (WebCore::ApplicationCacheHost::ResourceInfo::ResourceInfo):
3158
3159 2010-07-23  Rafael Antognolli  <antognolli@profusion.mobi>
3160
3161         Reviewed by Antonio Gomes.
3162
3163         [EFL] Cleanup glib support (make it optional)
3164         https://bugs.webkit.org/show_bug.cgi?id=42480
3165
3166         No new tests, no new features added.
3167         Just add flags and directories for glib if necessary.
3168         Put some ifdefs on glib calls.
3169
3170         * CMakeListsEfl.txt:
3171         * platform/graphics/cairo/FontPlatformDataCairo.cpp:
3172         (WebCore::FontPlatformData::FontPlatformData):
3173
3174 2010-07-23  James Robinson  <jamesr@chromium.org>
3175
3176         Reviewed by Dimitri Glazkov.
3177
3178         CanvasRenderingContext2D has lots of style errors
3179         https://bugs.webkit.org/show_bug.cgi?id=42918
3180
3181         CanvasRenderingContext2D.h and .cpp have lots of style errors.  I'm planning to post patches
3182         to both of these files soon, so to minimize merge conflicts and additional style violations
3183         it seems best to fix all of these errors in bulk before posting any functional changes.  In
3184         particular the header file is incorrectly indented so any correctly formatted addition will
3185         be out of place.
3186
3187         * html/canvas/CanvasRenderingContext2D.cpp:
3188         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3189         (WebCore::CanvasRenderingContext2D::setFillStyle):
3190         (WebCore::CanvasRenderingContext2D::transform):
3191         (WebCore::CanvasRenderingContext2D::setTransform):
3192         (WebCore::CanvasRenderingContext2D::arcTo):
3193         (WebCore::CanvasRenderingContext2D::arc):
3194         (WebCore::validateRectForCanvas):
3195         (WebCore::CanvasRenderingContext2D::strokeRect):
3196         (WebCore::CanvasRenderingContext2D::drawImage):
3197         (WebCore::CanvasRenderingContext2D::createRadialGradient):
3198         (WebCore::CanvasRenderingContext2D::createPattern):
3199         (WebCore::CanvasRenderingContext2D::willDraw):
3200         (WebCore::CanvasRenderingContext2D::createImageData):
3201         (WebCore::CanvasRenderingContext2D::putImageData):
3202         (WebCore::CanvasRenderingContext2D::setFont):
3203         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3204         * html/canvas/CanvasRenderingContext2D.h:
3205         (WebCore::CanvasRenderingContext2D::is2d):
3206         (WebCore::CanvasRenderingContext2D::getLineCap):
3207         (WebCore::CanvasRenderingContext2D::getLineJoin):
3208         (WebCore::CanvasRenderingContext2D::state):
3209         (WebCore::CanvasRenderingContext2D::):
3210
3211 2010-07-23  Adam Barth  <abarth@webkit.org>
3212
3213         Remove FIXME that we already fixed.
3214
3215         * html/HTMLTreeBuilder.cpp:
3216         (WebCore::HTMLTreeBuilder::processCharacter):
3217
3218 2010-06-24  Dimitri Glazkov  <dglazkov@chromium.org>
3219
3220         Reviewed by Kent Tamura.
3221
3222         Move more form submission logic into FormSubmission.
3223         https://bugs.webkit.org/show_bug.cgi?id=41110
3224
3225         Two major moves:
3226         * Fold HTMLFormElement::prepareFormSubmission into FormSubmission::create
3227         * Move non-static (non-FormData-building) methods of FormDataBuilder
3228             to FormSubmission::Attributes.
3229
3230         Mechanical moving, no change in behavior, so no new tests.
3231
3232         * WebCore.xcodeproj/project.pbxproj: Gave FormDataBuilder.h "project" and
3233             FormSubmission.h "private" visibility.
3234         * html/HTMLFormElement.cpp:
3235         (WebCore::HTMLFormElement::submit): Changed to use FormSubmission::create.
3236         (WebCore::HTMLFormElement::parseMappedAttribute): Changed to use m_attributes.
3237         * html/HTMLFormElement.h:
3238         (WebCore::HTMLFormElement::enctype): Ditto.
3239         (WebCore::HTMLFormElement::encoding): Ditto.
3240         (WebCore::HTMLFormElement::acceptCharset): Ditto.
3241         * loader/FormSubmission.cpp:
3242         (WebCore::generateFormDataIdentifier): Moved from HTMLFormElement.
3243         (WebCore::appendMailtoPostFormDataToURL): Ditto.
3244         (WebCore::FormSubmission::Attributes::parseAction): Moved from FormDataBuilder.
3245         (WebCore::FormSubmission::Attributes::parseEncodingType): Ditto.
3246         (WebCore::FormSubmission::Attributes::parseMethodType): Ditto.
3247         (WebCore::FormSubmission::FormSubmission): Made inline.
3248         (WebCore::FormSubmission::create): Added logic that used to be in
3249             HTMLFormElement::prepareFormSubmission.
3250         * loader/FormSubmission.h:
3251         (WebCore::FormSubmission::):
3252         (WebCore::FormSubmission::Attributes::Attributes): Added new class.
3253         (WebCore::FormSubmission::Attributes::method): Moved from FormDataBuilder.
3254         (WebCore::FormSubmission::Attributes::isMultiPartForm): Ditto.
3255         (WebCore::FormSubmission::Attributes::action): Ditto.
3256         (WebCore::FormSubmission::Attributes::target): Ditto.
3257         (WebCore::FormSubmission::Attributes::setTarget): Ditto.
3258         (WebCore::FormSubmission::Attributes::encodingType): Ditto.
3259         (WebCore::FormSubmission::Attributes::acceptCharset): Ditto.
3260         (WebCore::FormSubmission::Attributes::setAcceptCharset): Ditto.
3261         (WebCore::FormSubmission::target): Ditto.
3262         (WebCore::FormSubmission::contentType): Const-ified return type.
3263         (WebCore::FormSubmission::boundary): Ditto.
3264         * platform/network/FormDataBuilder.cpp:
3265         (WebCore::FormDataBuilder::encodingFromAcceptCharset): Renamed method for clarity,
3266             made it use param instead of a class member.
3267         * platform/network/FormDataBuilder.h:
3268         (WebCore::FormDataBuilder::FormDataBuilder): Made constructor private.
3269         * wml/WMLGoElement.cpp: Changed to use FormSubmision::Attributes.
3270         * wml/WMLGoElement.h: Ditto.
3271
3272 2010-07-23  Adam Barth  <abarth@webkit.org>
3273
3274         Reviewed by Eric Seidel.
3275
3276         HTML5 Parser: document.write in a asynchronous script which is specified to load before page finish blows away document
3277         https://bugs.webkit.org/show_bug.cgi?id=42365
3278
3279         This patch implements the changes Ian made to HTML5 to address these
3280         issues.  Let's try it and see how well it works.
3281
3282         Test: http/tests/misc/write-from-dom-script.html
3283
3284         * dom/Document.cpp:
3285         (WebCore::Document::Document):
3286         (WebCore::Document::write):
3287         * dom/Document.h:
3288         (WebCore::Document::writeDisabled):
3289         (WebCore::Document::setWriteDisabled):
3290         * dom/DocumentParser.h:
3291         (WebCore::DocumentParser::hasInsertionPoint):
3292         * dom/ScriptElement.cpp:
3293         (WebCore::ScriptElement::insertedIntoDocument):
3294         (WebCore::ScriptElementData::ScriptElementData):
3295         (WebCore::ScriptElementData::evaluateScript):
3296         * dom/ScriptElement.h:
3297         (WebCore::ScriptElementData::writeDisabled):
3298         (WebCore::ScriptElementData::setWriteDisabled):
3299         * html/HTMLDocumentParser.cpp:
3300         (WebCore::HTMLDocumentParser::hasInsertionPoint):
3301         (WebCore::HTMLDocumentParser::insert):
3302         * html/HTMLDocumentParser.h:
3303
3304 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
3305
3306         Reviewed by Adam Roben.
3307
3308         [WINCE] Buildfix for PopupMenuWin.cpp
3309         https://bugs.webkit.org/show_bug.cgi?id=42906
3310
3311         Use correct API for BitmapInfo landed in r63944.
3312
3313         * platform/win/PopupMenuWin.cpp:
3314         (WebCore::PopupMenu::paint):
3315
3316 2010-07-23  fsamuel@chromium.org  <fsamuel@chromium.org>
3317
3318         Reviewed by David Hyatt.
3319
3320         Updated table painting to draw cell layers in the correct order.
3321
3322         Table Cell Layering
3323         https://bugs.webkit.org/show_bug.cgi?id=40775
3324
3325         Tests: tables/layering/paint-test-layering-1.html
3326                tables/layering/paint-test-layering-2.html
3327
3328         * accessibility/AccessibilityTable.cpp:
3329         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
3330         (WebCore::AccessibilityTable::addChildren):
3331         (WebCore::AccessibilityTable::cellForColumnAndRow):
3332         * accessibility/AccessibilityTableCell.cpp:
3333         (WebCore::AccessibilityTableCell::titleUIElement):
3334         * accessibility/AccessibilityTableColumn.cpp:
3335         (WebCore::AccessibilityTableColumn::headerObjectForSection):
3336         * rendering/AutoTableLayout.cpp:
3337         (WebCore::AutoTableLayout::recalcColumn):
3338         * rendering/RenderTable.cpp:
3339         (WebCore::RenderTable::splitColumn):
3340         (WebCore::RenderTable::calcBorderLeft):
3341         (WebCore::RenderTable::calcBorderRight):
3342         (WebCore::RenderTable::cellAbove):
3343         (WebCore::RenderTable::cellBelow):
3344         (WebCore::RenderTable::cellBefore):
3345         (WebCore::RenderTable::cellAfter):
3346         * rendering/RenderTableSection.cpp:
3347         (WebCore::RenderTableSection::RenderTableSection):
3348         (WebCore::RenderTableSection::ensureRows):
3349         (WebCore::RenderTableSection::addCell):
3350         (WebCore::RenderTableSection::setCellWidths):
3351         (WebCore::RenderTableSection::calcRowHeight):
3352         (WebCore::RenderTableSection::layoutRows):
3353         (WebCore::RenderTableSection::calcOuterBorderTop):
3354         (WebCore::RenderTableSection::calcOuterBorderBottom):
3355         (WebCore::RenderTableSection::calcOuterBorderLeft):
3356         (WebCore::RenderTableSection::calcOuterBorderRight):
3357         (WebCore::RenderTableSection::firstLineBoxBaseline):
3358         (WebCore::compareCellPositions):
3359         (WebCore::RenderTableSection::paintCell):
3360         (WebCore::RenderTableSection::paintObject):
3361         (WebCore::RenderTableSection::numColumns):
3362         (WebCore::RenderTableSection::appendColumn):
3363         (WebCore::RenderTableSection::splitColumn):
3364         (WebCore::RenderTableSection::nodeAtPoint):
3365         * rendering/RenderTableSection.h:
3366         (WebCore::RenderTableSection::CellStruct::CellStruct):
3367         (WebCore::RenderTableSection::CellStruct::primaryCell):
3368         (WebCore::RenderTableSection::CellStruct::hasCells):
3369         (WebCore::RenderTableSection::primaryCellAt):
3370
3371 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
3372
3373         Reviewed by Adam Roben.
3374
3375         [WINCE] Buildfix for Path.h
3376         https://bugs.webkit.org/show_bug.cgi?id=42904
3377
3378         * platform/graphics/Path.h: Add missing typedef PlatformPath.
3379
3380 2010-07-23  Adam Barth  <abarth@webkit.org>
3381
3382         Reviewed by Eric Seidel.
3383
3384         Reserve capacity for attributes
3385         https://bugs.webkit.org/show_bug.cgi?id=42877
3386
3387         This is about a 1.7% improvement to the parsing benchmark.
3388
3389         * html/HTMLToken.h:
3390         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3391
3392 2010-07-23  Adam Barth  <abarth@webkit.org>
3393
3394         Reviewed by Eric Seidel.
3395
3396         Inline HTMLElementStack::top
3397         https://bugs.webkit.org/show_bug.cgi?id=42879
3398
3399         According to sampling, HTMLElementStack::top is the hotest function in
3400         the treebuilder.  Inlining it is about a 0.3% improvement to the
3401         parsing benchmark.  This squares with how often it occurs in samples.
3402
3403         * html/HTMLElementStack.cpp:
3404         * html/HTMLElementStack.h:
3405         (WebCore::HTMLElementStack::top):
3406
3407 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
3408
3409         Reviewed by Adam Roben.
3410
3411         [WINCE] Buildfix for GraphicsContext
3412         https://bugs.webkit.org/show_bug.cgi?id=42888
3413
3414         Use AffineTransform insted of TransformationMatrix and
3415         add ColorSpace parameter to the drawBitmap methods.
3416
3417         * platform/graphics/GraphicsContext.h:
3418         * platform/graphics/wince/GraphicsContextWince.cpp:
3419         (WebCore::GraphicsContext::affineTransform):
3420         (WebCore::GraphicsContext::fillRoundedRect):
3421         (WebCore::GraphicsContext::drawBitmap):
3422         (WebCore::GraphicsContext::drawBitmapPattern):
3423
3424 2010-07-23  Rafael Antognolli  <antognolli@profusion.mobi>
3425
3426         Reviewed by Antonio Gomes.
3427
3428         [EFL] Add support for using libcurl network backend.
3429         https://bugs.webkit.org/show_bug.cgi?id=42286
3430
3431         Add files and flags for soup/curl specific backend being
3432         used.
3433         Put some ifdefs around soup/glib calls.
3434
3435         No new tests, no new features implemented.
3436
3437         * CMakeListsEfl.txt:
3438         * platform/efl/FileSystemEfl.cpp:
3439         (WebCore::fileSystemRepresentation):
3440
3441 2010-07-23  Adam Barth  <abarth@webkit.org>
3442
3443         Reviewed by Eric Seidel.
3444
3445         Add fast-reject path for InputStreamPreprocessor::peek
3446         https://bugs.webkit.org/show_bug.cgi?id=42881
3447
3448         This is about a 2.5% speedup on the parsing benchmark.
3449
3450         * html/HTMLTokenizer.h:
3451         (WebCore::HTMLTokenizer::InputStreamPreprocessor::peek):
3452
3453 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
3454
3455         Reviewed by Adam Roben.
3456
3457         [WINCE] Merge PasteboardWince.cpp into PasteboardWin.cpp
3458         https://bugs.webkit.org/show_bug.cgi?id=42885
3459
3460         Make PasteboardWin more portable and remove the global namespace prefix
3461         from GlobalLock/GlobalUnlock, since they are only macros on WinCE.
3462
3463         * platform/win/PasteboardWin.cpp:
3464         (WebCore::PasteboardOwnerWndProc):
3465         (WebCore::Pasteboard::Pasteboard):
3466         (WebCore::Pasteboard::plainText):
3467         (WebCore::Pasteboard::documentFragment):
3468
3469 2010-07-23  Justin Schuh  <jschuh@chromium.org>
3470
3471         Unreviewed, rolling out r63925.
3472         http://trac.webkit.org/changeset/63925
3473         https://bugs.webkit.org/show_bug.cgi?id=42858
3474
3475         Introduced a regression in history state.
3476
3477         * page/History.cpp:
3478         (WebCore::History::urlForState):
3479
3480 2010-07-23  Martin Robinson  <mrobinson@igalia.com>
3481
3482         Unreviewed build fix.
3483
3484         Fix make dist by aligning the source list with currently used headers.
3485
3486         * GNUmakefile.am:
3487
3488 2010-07-23  Alex Milowski  <alex@milowski.com>
3489
3490         Reviewed by Darin Adler.
3491
3492         Moved the 'mathml' group back to where it belongs as
3493         siblings of the other major folders.
3494
3495         * WebCore.xcodeproj/project.pbxproj:
3496
3497 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
3498
3499         Reviewed by Adam Roben.
3500
3501         Buildfix for WinCE graphics after r56015.
3502         https://bugs.webkit.org/show_bug.cgi?id=41354
3503
3504         Use fabs() insetead of abs().
3505
3506         * platform/graphics/wince/GraphicsContextWince.cpp:
3507         (WebCore::GraphicsContext::fillRect):
3508         * platform/graphics/wince/PlatformPathWince.cpp:
3509         (WebCore::PlatformPath::addArcTo):
3510
3511 2010-07-23  ryuan choi  <ryuan.choi@samsung.com>
3512
3513         Reviewed by Antonio Gomes.
3514
3515         [EFL]build break because of r63927